From 66f4571e8defbd1136ba5b967d71b556d7f77a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Sun, 19 Aug 2001 00:55:58 +0000 Subject: [PATCH] Move back to the welcome page if the current database has been dropped --- db_details.php3 | 13 +++++++++---- main.php3 | 26 +++++++++++++++++++------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/db_details.php3 b/db_details.php3 index fe86e58c0..fd6e73848 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -20,6 +20,11 @@ if (!isset($message)) { // 1. Gets the list of the tables $tables = mysql_list_tables($db); $num_tables = @mysql_numrows($tables); +// Not a valid db name -> back to the welcome page +if (mysql_error() != '') { + header('Location: main.php3?lang=' . $lang . '&server=' . $server . '&reload=true'); + exit(); +} // speedup view on locked tables - staybyte - 11 June 2001 if ($num_tables > 0 && MYSQL_MAJOR_VERSION >= 3.23 && intval(MYSQL_MINOR_VERSION) >= 3) { @@ -200,16 +205,16 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) { ?> - + - + - + - + diff --git a/main.php3 b/main.php3 index c6f9ce0b6..87532a2f2 100755 --- a/main.php3 +++ b/main.php3 @@ -10,6 +10,18 @@ require('./header.inc.php3'); if (isset($message)) { show_message($message); } +else if (!empty($reload) && $reload == 'true') { + // Reloads the navigation frame via JavaScript if required + echo "\n"; + ?> + + 0  

- -
  • +
  • -   -
  • +   + 0) ?> +
  • - +
  • @@ -292,7 +304,7 @@ if ($server > 0
  • -     +     [ChangeLog]  [CVS]