From 427242cf32da2dbdabada5b6311ae96685fb1112 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 17 Mar 2013 14:32:01 +0100 Subject: [PATCH] Use the correct property for connection object --- lib/db.php | 12 ++++++------ lib/setup.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/db.php b/lib/db.php index 518fcc56a09..49eeeea430c 100644 --- a/lib/db.php +++ b/lib/db.php @@ -308,7 +308,7 @@ class OC_DB { */ public static function getDbStructure( $file, $mode=MDB2_SCHEMA_DUMP_STRUCTURE) { self::connectDoctrine(); - return OC_DB_Schema::getDbStructure(self::$connection, $file); + return OC_DB_Schema::getDbStructure(self::$DOCTRINE, $file); } /** @@ -320,7 +320,7 @@ class OC_DB { */ public static function createDbFromStructure( $file ) { self::connectDoctrine(); - return OC_DB_Schema::createDbFromStructure(self::$connection, $file); + return OC_DB_Schema::createDbFromStructure(self::$DOCTRINE, $file); /* FIXME: use CURRENT_TIMESTAMP for all databases. mysql supports it as a default for DATETIME since 5.6.5 [1] * as a fallback we could use 0000-01-01 00:00:00 everywhere * [1] http://bugs.mysql.com/bug.php?id=27645 @@ -343,7 +343,7 @@ class OC_DB { public static function updateDbFromStructure($file) { self::connectDoctrine(); try { - $result = OC_DB_Schema::updateDbFromStructure(self::$connection, $file); + $result = OC_DB_Schema::updateDbFromStructure(self::$DOCTRINE, $file); } catch (Exception $e) { OC_Log::write('core', 'Failed to update database structure ('.$e.')', OC_Log::FATAL); throw $e; @@ -543,7 +543,7 @@ class OC_DB { */ public static function dropTable($tableName) { self::connectDoctrine(); - OC_DB_Schema::dropTable(self::$connection, $tableName); + OC_DB_Schema::dropTable(self::$DOCTRINE, $tableName); } /** @@ -552,7 +552,7 @@ class OC_DB { */ public static function removeDBStructure($file) { self::connectDoctrine(); - OC_DB_Schema::removeDBStructure(self::$connection, $file); + OC_DB_Schema::removeDBStructure(self::$DOCTRINE, $file); } /** @@ -561,7 +561,7 @@ class OC_DB { */ public static function replaceDB( $file ) { self::connectDoctrine(); - OC_DB_Schema::replaceDB(self::$connection, $file); + OC_DB_Schema::replaceDB(self::$DOCTRINE, $file); } /** diff --git a/lib/setup.php b/lib/setup.php index 8814447f52f..bee70e7ebcc 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -178,7 +178,7 @@ class OC_Setup { } } else { - //delete the old sqlite database first, might cause infinte loops otherwise + //delete the old sqlite database first, might cause infinite loops otherwise if(file_exists("$datadir/owncloud.db")) { unlink("$datadir/owncloud.db"); } -- 2.39.5