Index: branches/5.2.x/core/kernel/db/db_connection.php =================================================================== diff -u -N -r14609 -r14811 --- branches/5.2.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 14609) +++ branches/5.2.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 14811) @@ -1,6 +1,6 @@ GetCol('SHOW TABLES')); } - if (!isset($table_found[$table_name])) { - $table_found[$table_name] = $this->Query('SHOW TABLES LIKE "'.$table_name.'"'); + if ( !preg_match('/^' . preg_quote(TABLE_PREFIX, '/') . '(.*)/', $table_name) ) { + $table_name = TABLE_PREFIX . $table_name; } - return $table_found[$table_name]; + if ( $force ) { + if ( $this->Query('SHOW TABLES LIKE ' . $this->qstr($table_name)) ) { + $table_found[$table_name] = 1; + } + else { + unset($table_found[$table_name]); + } + } + + return isset($table_found[$table_name]); } /**