public function real_table_name($assoc_name)
{
$assoc_name_new = $assoc_name;
static $config_prefix = false;
if (!$config_prefix) {
$config_prefix = $this->get_prefix();
}
$this->table_prefix = $config_prefix;
if ($this->table_prefix != false) {
$assoc_name_new = str_ireplace('table_', $this->table_prefix, $assoc_name_new);
}
$assoc_name_new = str_ireplace('table_', $this->table_prefix, $assoc_name_new);
$assoc_name_new = str_ireplace($this->table_prefix . $this->table_prefix, $this->table_prefix, $assoc_name_new);
if ($this->table_prefix and $this->table_prefix != '' and stristr($assoc_name_new, $this->table_prefix) == false) {
$assoc_name_new = $this->table_prefix . $assoc_name_new;
}
return $assoc_name_new;
}