summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-11-20 17:11:08 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-11-20 17:11:08 +0100
commit985f8c3f69a5dd940271481ba18eea784893406e (patch)
treeb87ce9683930d53e48e3d7f4296f0bcebdd44312 /lib
parent7fa4c6d0bc8e683878d8254fb83e8e90894d622d (diff)
parent8ae8eb47349f2510976637c6a1e8fa91e8d9f8d3 (diff)
downloadnextcloud-server-985f8c3f69a5dd940271481ba18eea784893406e.tar.gz
nextcloud-server-985f8c3f69a5dd940271481ba18eea784893406e.zip
Merge pull request #12330 from owncloud/jenkins-eat-that
drop dependency of some commands on old config object
Diffstat (limited to 'lib')
-rw-r--r--lib/private/db/mdb2schemamanager.php6
-rw-r--r--lib/private/db/mdb2schemareader.php11
-rw-r--r--lib/private/legacy/config.php8
3 files changed, 10 insertions, 15 deletions
diff --git a/lib/private/db/mdb2schemamanager.php b/lib/private/db/mdb2schemamanager.php
index 632e320576c..78267094d0e 100644
--- a/lib/private/db/mdb2schemamanager.php
+++ b/lib/private/db/mdb2schemamanager.php
@@ -49,7 +49,7 @@ class MDB2SchemaManager {
* TODO: write more documentation
*/
public function createDbFromStructure($file) {
- $schemaReader = new MDB2SchemaReader(\OC_Config::getObject(), $this->conn->getDatabasePlatform());
+ $schemaReader = new MDB2SchemaReader(\OC::$server->getConfig(), $this->conn->getDatabasePlatform());
$toSchema = $schemaReader->loadSchemaFromFile($file);
return $this->executeSchemaChange($toSchema);
}
@@ -83,7 +83,7 @@ class MDB2SchemaManager {
*/
private function readSchemaFromFile($file) {
$platform = $this->conn->getDatabasePlatform();
- $schemaReader = new MDB2SchemaReader(\OC_Config::getObject(), $platform);
+ $schemaReader = new MDB2SchemaReader(\OC::$server->getConfig(), $platform);
return $schemaReader->loadSchemaFromFile($file);
}
@@ -131,7 +131,7 @@ class MDB2SchemaManager {
* @param string $file the xml file describing the tables
*/
public function removeDBStructure($file) {
- $schemaReader = new MDB2SchemaReader(\OC_Config::getObject(), $this->conn->getDatabasePlatform());
+ $schemaReader = new MDB2SchemaReader(\OC::$server->getConfig(), $this->conn->getDatabasePlatform());
$fromSchema = $schemaReader->loadSchemaFromFile($file);
$toSchema = clone $fromSchema;
/** @var $table \Doctrine\DBAL\Schema\Table */
diff --git a/lib/private/db/mdb2schemareader.php b/lib/private/db/mdb2schemareader.php
index 288eef5cda0..7dd4168fb6e 100644
--- a/lib/private/db/mdb2schemareader.php
+++ b/lib/private/db/mdb2schemareader.php
@@ -8,6 +8,9 @@
namespace OC\DB;
+use Doctrine\DBAL\Platforms\AbstractPlatform;
+use OCP\IConfig;
+
class MDB2SchemaReader {
/**
* @var string $DBNAME
@@ -25,13 +28,13 @@ class MDB2SchemaReader {
protected $platform;
/**
- * @param \OC\Config $config
+ * @param \OCP\IConfig $config
* @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
*/
- public function __construct($config, $platform) {
+ public function __construct(IConfig $config, AbstractPlatform $platform) {
$this->platform = $platform;
- $this->DBNAME = $config->getValue('dbname', 'owncloud');
- $this->DBTABLEPREFIX = $config->getValue('dbtableprefix', 'oc_');
+ $this->DBNAME = $config->getSystemValue('dbname', 'owncloud');
+ $this->DBTABLEPREFIX = $config->getSystemValue('dbtableprefix', 'oc_');
}
/**
diff --git a/lib/private/legacy/config.php b/lib/private/legacy/config.php
index 13ff0dbe040..7b711204256 100644
--- a/lib/private/legacy/config.php
+++ b/lib/private/legacy/config.php
@@ -23,14 +23,6 @@ class OC_Config {
public static $object;
/**
- * Returns the config instance
- * @return \OC\Config
- */
- public static function getObject() {
- return self::$object;
- }
-
- /**
* Lists all available config keys
* @return array an array of key names
*