Minor validations in order to avoid warnings

skala
Julio Montoya 13 years ago
parent 57b9e8fac8
commit 9fc9dccf9b
  1. 6
      main/install/install.lib.php

@ -611,9 +611,13 @@ function database_server_connect() {
* @return boolean
*/
function database_exists($database_name) {
if (empty($database_name)) {
return false;
}
$select_database = @Database::select_db($database_name);
$show_database = false;
$result = @Database::query("SHOW DATABASES LIKE '".Database::escape_string($database_name)."' ");
$sql = "SHOW DATABASES LIKE '".addslashes($database_name)."'";
$result = @Database::query($sql);
if (Database::num_rows($result)) {
$show_database = true;
}

Loading…
Cancel
Save