summaryrefslogtreecommitdiffstats
path: root/lib/private/db/mdb2schemawriter.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-12-22 10:44:30 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-12-22 10:55:52 +0100
commitdbc465de973660ec0530967cd3ae54aeacab70ee (patch)
tree845018a6194d74d3eaa6fa7dee89d17a864f6c7b /lib/private/db/mdb2schemawriter.php
parentde25084defa361e6d85af1d469b4b59e8a69c694 (diff)
downloadnextcloud-server-dbc465de973660ec0530967cd3ae54aeacab70ee.tar.gz
nextcloud-server-dbc465de973660ec0530967cd3ae54aeacab70ee.zip
use injected config object and fix typos
Diffstat (limited to 'lib/private/db/mdb2schemawriter.php')
-rw-r--r--lib/private/db/mdb2schemawriter.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/private/db/mdb2schemawriter.php b/lib/private/db/mdb2schemawriter.php
index 3c91f3c784a..aa6d578e9b5 100644
--- a/lib/private/db/mdb2schemawriter.php
+++ b/lib/private/db/mdb2schemawriter.php
@@ -10,19 +10,21 @@ class OC_DB_MDB2SchemaWriter {
/**
* @param string $file
- * @param \Doctrine\DBAL\Schema\AbstractSchemaManager $sm
+ * @param \OC\DB\Connection $conn
* @return bool
*/
- static public function saveSchemaToFile($file, $conn) {
+ static public function saveSchemaToFile($file, \OC\DB\Connection $conn) {
+ $config = \OC::$server->getConfig();
+
$xml = new SimpleXMLElement('<database/>');
- $xml->addChild('name', OC_Config::getValue( "dbname", "owncloud" ));
+ $xml->addChild('name', $config->getSystemValue('dbname', 'owncloud'));
$xml->addChild('create', 'true');
$xml->addChild('overwrite', 'false');
$xml->addChild('charset', 'utf8');
-
+
$conn->getConfiguration()->
- setFilterSchemaAssetsExpression('/^'.\OCP\Config::getSystemValue('dbtableprefix'.'/'));
-
+ setFilterSchemaAssetsExpression('/^' . $config->getSystemValue('dbtableprefix') . '/');
+
foreach ($conn->getSchemaManager()->listTables() as $table) {
self::saveTable($table, $xml->addChild('table'));
}