diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-06-27 20:19:51 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-06-29 21:15:06 +0200 |
commit | 60eb63e35ade1ef53e907a637d746d93ed906feb (patch) | |
tree | 112a8a51ca70c424f773939b94bb787a433bb603 /lib/setup.php | |
parent | e93ce26f27fa8c2c364696a7a7ce5122eb4a91e2 (diff) | |
download | nextcloud-server-60eb63e35ade1ef53e907a637d746d93ed906feb.tar.gz nextcloud-server-60eb63e35ade1ef53e907a637d746d93ed906feb.zip |
Fix review items
Diffstat (limited to 'lib/setup.php')
-rw-r--r-- | lib/setup.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/setup.php b/lib/setup.php index 11c6cc76b66..d8f4cbfbcbd 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -19,7 +19,7 @@ class DatabaseSetupException extends Exception } class OC_Setup { - static $db_setup_classes = array( + static $dbSetupClasses = array( 'mysql' => '\OC\Setup\MySQL', 'pgsql' => '\OC\Setup\PostgreSQL', 'oci' => '\OC\Setup\OCI', @@ -48,13 +48,13 @@ class OC_Setup { $options['directory'] = OC::$SERVERROOT."/data"; } - if (!isset(self::$db_setup_classes[$dbtype])) { + if (!isset(self::$dbSetupClasses[$dbtype])) { $dbtype = 'sqlite'; } - $class = self::$db_setup_classes[$dbtype]; - $db_setup = new $class(self::getTrans()); - $error = array_merge($error, $db_setup->validate($options)); + $class = self::$dbSetupClasses[$dbtype]; + $dbSetup = new $class(self::getTrans(), 'db_structure.xml'); + $error = array_merge($error, $dbSetup->validate($options)); if(count($error) != 0) { return $error; @@ -83,8 +83,8 @@ class OC_Setup { OC_Config::setValue('dbtype', $dbtype); OC_Config::setValue('version', implode('.', OC_Util::getVersion())); try { - $db_setup->initialize($options); - $db_setup->setupDatabase($username); + $dbSetup->initialize($options); + $dbSetup->setupDatabase($username); } catch (DatabaseSetupException $e) { $error[] = array( 'error' => $e->getMessage(), |