bug #1745257 Invalid DB name is still displayed

This commit is contained in:
Marc Delisle
2007-06-29 14:22:48 +00:00
parent 941dee7e41
commit 0940641fae
2 changed files with 14 additions and 10 deletions

View File

@@ -79,6 +79,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #1729027 Sorting results of VIEW browsing - bug #1729027 Sorting results of VIEW browsing
- bug #1733012 Unwanted table alias in delete button - bug #1733012 Unwanted table alias in delete button
- bug #1736405 Pretty printer and HTML line breaks - bug #1736405 Pretty printer and HTML line breaks
- bug #1745257 Invalid DB name is still displayed
2.10.2.0 (2007-06-15) 2.10.2.0 (2007-06-15)

View File

@@ -10,10 +10,8 @@
*/ */
require_once './libraries/common.inc.php'; require_once './libraries/common.inc.php';
$js_to_run = 'functions.js'; $js_to_run = 'functions.js';
require_once './libraries/header.inc.php';
require_once './libraries/mysql_charsets.lib.php'; require_once './libraries/mysql_charsets.lib.php';
PMA_checkParameters(array('db')); PMA_checkParameters(array('db'));
/** /**
@@ -34,13 +32,18 @@ if (!empty($db_collation) && PMA_MYSQL_INT_VERSION >= 40101) {
} }
$sql_query .= ';'; $sql_query .= ';';
$result = PMA_DBI_query($sql_query); $result = PMA_DBI_try_query($sql_query);
/**
* Displays the result and calls default page
*/
$message = $strDatabase . ' ' . htmlspecialchars($db) . ' ' . $strHasBeenCreated;
require_once './' . $cfg['DefaultTabDatabase'];
if (! $result) {
$message = PMA_DBI_getError();
// avoid displaying the not-created db name in header or navi panel
$GLOBALS['db'] = '';
$GLOBALS['table'] = '';
require_once './libraries/header.inc.php';
require_once './main.php';
} else {
$message = $strDatabase . ' ' . htmlspecialchars($db) . ' ' . $strHasBeenCreated;
require_once './libraries/header.inc.php';
require_once './' . $cfg['DefaultTabDatabase'];
}
?> ?>