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 | |
parent | e93ce26f27fa8c2c364696a7a7ce5122eb4a91e2 (diff) | |
download | nextcloud-server-60eb63e35ade1ef53e907a637d746d93ed906feb.tar.gz nextcloud-server-60eb63e35ade1ef53e907a637d746d93ed906feb.zip |
Fix review items
Diffstat (limited to 'lib/setup')
-rw-r--r-- | lib/setup/abstractdatabase.php | 4 | ||||
-rw-r--r-- | lib/setup/mssql.php | 2 | ||||
-rw-r--r-- | lib/setup/mysql.php | 2 | ||||
-rw-r--r-- | lib/setup/oci.php | 2 | ||||
-rw-r--r-- | lib/setup/postgresql.php | 2 | ||||
-rw-r--r-- | lib/setup/sqlite.php | 2 |
6 files changed, 8 insertions, 6 deletions
diff --git a/lib/setup/abstractdatabase.php b/lib/setup/abstractdatabase.php index 66202251e97..0beada7bd29 100644 --- a/lib/setup/abstractdatabase.php +++ b/lib/setup/abstractdatabase.php @@ -4,14 +4,16 @@ namespace OC\Setup; abstract class AbstractDatabase { protected $trans; + protected $dbDefinitionFile; protected $dbuser; protected $dbpassword; protected $dbname; protected $dbhost; protected $tableprefix; - public function __construct($trans) { + public function __construct($trans, $dbDefinitionFile) { $this->trans = $trans; + $this->dbDefinitionFile = $dbDefinitionFile; } public function validate($config) { diff --git a/lib/setup/mssql.php b/lib/setup/mssql.php index 5ed0d030c7c..b8329f99079 100644 --- a/lib/setup/mssql.php +++ b/lib/setup/mssql.php @@ -172,7 +172,7 @@ class MSSQL extends AbstractDatabase { \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); } else { if ($row == null) { - \OC_DB::createDbFromStructure('db_structure.xml'); + \OC_DB::createDbFromStructure($this->dbDefinitionFile); } } } diff --git a/lib/setup/mysql.php b/lib/setup/mysql.php index 1ab1b6ea8ae..0cf04fde5a1 100644 --- a/lib/setup/mysql.php +++ b/lib/setup/mysql.php @@ -52,7 +52,7 @@ class MySQL extends AbstractDatabase { $row=mysql_fetch_row($result); } if(!$result or $row[0]==0) { - \OC_DB::createDbFromStructure('db_structure.xml'); + \OC_DB::createDbFromStructure($this->dbDefinitionFile); } mysql_close($connection); } diff --git a/lib/setup/oci.php b/lib/setup/oci.php index cda7ff7c50c..577948766bd 100644 --- a/lib/setup/oci.php +++ b/lib/setup/oci.php @@ -128,7 +128,7 @@ class OCI extends AbstractDatabase { $row = oci_fetch_row($stmt); } if(!$result or $row[0]==0) { - \OC_DB::createDbFromStructure('db_structure.xml'); + \OC_DB::createDbFromStructure($this->dbDefinitionFile); } } diff --git a/lib/setup/postgresql.php b/lib/setup/postgresql.php index d5b135a9577..49fcbf0326e 100644 --- a/lib/setup/postgresql.php +++ b/lib/setup/postgresql.php @@ -75,7 +75,7 @@ class PostgreSQL extends AbstractDatabase { $row = pg_fetch_row($result); } if(!$result or $row[0]==0) { - \OC_DB::createDbFromStructure('db_structure.xml'); + \OC_DB::createDbFromStructure($this->dbDefinitionFile); } } diff --git a/lib/setup/sqlite.php b/lib/setup/sqlite.php index 4b0a572bb39..fd4df792d62 100644 --- a/lib/setup/sqlite.php +++ b/lib/setup/sqlite.php @@ -21,6 +21,6 @@ class Sqlite extends AbstractDatabase { } //in case of sqlite, we can always fill the database error_log("creating sqlite db"); - \OC_DB::createDbFromStructure('db_structure.xml'); + \OC_DB::createDbFromStructure($this->dbDefinitionFile); } } |