diff --git a/tbl_properties_common.php3 b/tbl_properties_common.php3 index 695db12ef..b3257e953 100755 --- a/tbl_properties_common.php3 +++ b/tbl_properties_common.php3 @@ -26,33 +26,7 @@ $err_url = 'tbl_properties.php3' . '&table=' . urlencode($table); -/** - * Ensures the database and the table exist (else move to the "parent" script) - * and displays headers - */ -if (!isset($is_db) || !$is_db) { - // Not a valid db name -> back to the welcome page - if (!empty($db)) { - $is_db = @PMA_mysql_select_db($db); - } - if (empty($db) || !$is_db) { - header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); - exit(); - } -} // end if (ensures db exists) -if (!isset($is_table) || !$is_table) { - // Not a valid table name -> back to the db_details.php3 - if (!empty($table)) { - $is_table = @PMA_mysql_query('SHOW TABLES LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\''); - } - if (empty($table) - || !($is_table && @mysql_numrows($is_table))) { - header('Location: ' . $cfg['PmaAbsoluteUri'] . 'db_details.php3?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . '&db=' . urlencode($db) . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); - exit(); - } else if (isset($is_table)) { - mysql_free_result($is_table); - } -} // end if (ensures table exists) +require('./libraries/db_table_exists.lib.php3'); // Displays headers if (!isset($message)) {