diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-03-29 03:54:00 -0400 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-03-29 03:54:00 -0400 |
commit | d728c76ed01e371e52806ef2edd269cc6ebac51d (patch) | |
tree | 6f6ab0c17d7c4ec89c97313a6d2781557f560411 | |
parent | 415880faad8a11f81787f4819823ec22115f03ed (diff) | |
download | ampache-d728c76ed01e371e52806ef2edd269cc6ebac51d.tar.gz ampache-d728c76ed01e371e52806ef2edd269cc6ebac51d.tar.bz2 ampache-d728c76ed01e371e52806ef2edd269cc6ebac51d.zip |
Drop nonworking Dba::check_database_exists()
It didn't work.
-rw-r--r-- | lib/class/dba.class.php | 8 | ||||
-rw-r--r-- | lib/install.lib.php | 7 |
2 files changed, 2 insertions, 13 deletions
diff --git a/lib/class/dba.class.php b/lib/class/dba.class.php index bfa77773..8cbc6f55 100644 --- a/lib/class/dba.class.php +++ b/lib/class/dba.class.php @@ -280,14 +280,6 @@ class Dba { return true; } - public static function check_database_exists() { - $dbh = self::_connect(); - if ($dbh) { - return $dbh->exec('USE `' . Config::get('database_name') . '`'); - } - return false; - } - /** * check_database_inserted * diff --git a/lib/install.lib.php b/lib/install.lib.php index 882c065b..1d981d45 100644 --- a/lib/install.lib.php +++ b/lib/install.lib.php @@ -134,7 +134,8 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false return false; } - $db_exists = Dba::check_database_exists(); + // FIXME + $db_exists = false; if ($db_exists && $_POST['existing_db']) { // Rien a faire, we've got the db just blow through @@ -240,10 +241,6 @@ function install_create_config($web_path,$username,$password,$hostname,$database Error::add('general', T_("Database Connection Failed Check Hostname, Username and Password")); return false; } - if (!Dba::check_database_exists()) { - Error::add('general', sprintf(T_('Database selection failed. Check existence of %s'), $database)); - return false; - } $final = generate_config($data); |