diff --git a/htdocs/sql/libraries/db_table_exists.lib.php b/htdocs/sql/libraries/db_table_exists.lib.php deleted file mode 100755 --- a/htdocs/sql/libraries/db_table_exists.lib.php +++ /dev/null @@ -1,95 +0,0 @@ - back to the welcome page - if (! defined('IS_TRANSFORMATION_WRAPPER')) { - $url_params = array('reload' => 1); - if (isset($message)) { - $url_params['message'] = $message; - } - if (! empty($sql_query)) { - $url_params['sql_query'] = $sql_query; - } - if (isset($show_as_php)) { - $url_params['show_as_php'] = $show_as_php; - } - PMA_sendHeaderLocation( - $cfg['PmaAbsoluteUri'] . 'main.php' - . PMA_generate_common_url($url_params, '&')); - } - exit; - } -} // end if (ensures db exists) - -if (empty($is_table) && !defined('PMA_SUBMIT_MULT')) { - // Not a valid table name -> back to the db_sql.php - if (strlen($table)) { - $_result = PMA_DBI_try_query( - 'SHOW TABLES LIKE \'' . PMA_sqlAddslashes($table, true) . '\';', - null, PMA_DBI_QUERY_STORE); - $is_table = @PMA_DBI_num_rows($_result); - PMA_DBI_free_result($_result); - } else { - $is_table = false; - } - - if (! $is_table) { - if (! defined('IS_TRANSFORMATION_WRAPPER')) { - if (strlen($table)) { - // SHOW TABLES doesn't show temporary tables, so try select - // (as it can happen just in case temporary table, it should be - // fast): - - /** - * @todo should this check really only happen if IS_TRANSFORMATION_WRAPPER? - */ - $_result = PMA_DBI_try_query( - 'SELECT COUNT(*) FROM ' . PMA_backquote($table) . ';', - null, PMA_DBI_QUERY_STORE); - $is_table = ($_result && @PMA_DBI_num_rows($_result)); - PMA_DBI_free_result($_result); - } - - if (! $is_table) { - $url_params = array('reload' => 1, 'db' => $db); - if (isset($message)) { - $url_params['message'] = $message; - } - if (! empty($sql_query)) { - $url_params['sql_query'] = $sql_query; - } - if (isset($display_query)) { - $url_params['display_query'] = $display_query; - } - PMA_sendHeaderLocation( - $cfg['PmaAbsoluteUri'] . 'db_sql.php' - . PMA_generate_common_url($url_params, '&')); - } - } - - if (! $is_table) { - exit; - } - } -} // end if (ensures table exists) -?>