diff options
author | Sean Comeau <sean@ftlnetworks.ca> | 2013-01-14 12:36:50 -0800 |
---|---|---|
committer | Sean Comeau <sean@ftlnetworks.ca> | 2013-01-14 12:36:50 -0800 |
commit | 0132a0b2cf1af95b4d56475dc80b576bccfab0d0 (patch) | |
tree | 17931923e3e2c2cdbcb77c234d58f51827721ae3 /lib/setup.php | |
parent | 42cd99626e260b807e859ccd124340927cbfaa47 (diff) | |
download | nextcloud-server-0132a0b2cf1af95b4d56475dc80b576bccfab0d0.tar.gz nextcloud-server-0132a0b2cf1af95b4d56475dc80b576bccfab0d0.zip |
Rename TestException to DatabaseSetupException
Diffstat (limited to 'lib/setup.php')
-rw-r--r-- | lib/setup.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/setup.php b/lib/setup.php index 9da17a53747..8985d7d8296 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -1,6 +1,6 @@ <?php -class HintException extends Exception +class DatabaseSetupException extends Exception { private $hint; @@ -87,7 +87,7 @@ class OC_Setup { try { self::setupMySQLDatabase($dbhost, $dbuser, $dbpass, $dbname, $dbtableprefix, $username); - } catch (HintException $e) { + } catch (DatabaseSetupException $e) { $error[] = array( 'error' => $e->getMessage(), 'hint' => $e->getHint() @@ -190,7 +190,7 @@ class OC_Setup { //check if the database user has admin right $connection = @mysql_connect($dbhost, $dbuser, $dbpass); if(!$connection) { - throw new HintException('MySQL username and/or password not valid','You need to enter either an existing account or the administrator.'); + throw new DatabaseSetupException('MySQL username and/or password not valid','You need to enter either an existing account or the administrator.'); } $oldUser=OC_Config::getValue('dbuser', false); @@ -254,12 +254,12 @@ class OC_Setup { $query = "CREATE USER '$name'@'localhost' IDENTIFIED BY '$password'"; $result = mysql_query($query, $connection); if (!$result) { - throw new HintException("MySQL user '" . "$name" . "'@'localhost' already exists","Delete this user from MySQL."); + throw new DatabaseSetupException("MySQL user '" . "$name" . "'@'localhost' already exists","Delete this user from MySQL."); } $query = "CREATE USER '$name'@'%' IDENTIFIED BY '$password'"; $result = mysql_query($query, $connection); if (!$result) { - throw new HintException("MySQL user '" . "$name" . "'@'%' already exists","Delete this user from MySQL."); + throw new DatabaseSetupException("MySQL user '" . "$name" . "'@'%' already exists","Delete this user from MySQL."); } } |