Use the correct property for connection object
This commit is contained in:
parent
e9213a6711
commit
427242cf32
12
lib/db.php
12
lib/db.php
|
@ -308,7 +308,7 @@ class OC_DB {
|
||||||
*/
|
*/
|
||||||
public static function getDbStructure( $file, $mode=MDB2_SCHEMA_DUMP_STRUCTURE) {
|
public static function getDbStructure( $file, $mode=MDB2_SCHEMA_DUMP_STRUCTURE) {
|
||||||
self::connectDoctrine();
|
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 ) {
|
public static function createDbFromStructure( $file ) {
|
||||||
self::connectDoctrine();
|
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]
|
/* 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 <default>0000-01-01 00:00:00</default> everywhere
|
* as a fallback we could use <default>0000-01-01 00:00:00</default> everywhere
|
||||||
* [1] http://bugs.mysql.com/bug.php?id=27645
|
* [1] http://bugs.mysql.com/bug.php?id=27645
|
||||||
|
@ -343,7 +343,7 @@ class OC_DB {
|
||||||
public static function updateDbFromStructure($file) {
|
public static function updateDbFromStructure($file) {
|
||||||
self::connectDoctrine();
|
self::connectDoctrine();
|
||||||
try {
|
try {
|
||||||
$result = OC_DB_Schema::updateDbFromStructure(self::$connection, $file);
|
$result = OC_DB_Schema::updateDbFromStructure(self::$DOCTRINE, $file);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
OC_Log::write('core', 'Failed to update database structure ('.$e.')', OC_Log::FATAL);
|
OC_Log::write('core', 'Failed to update database structure ('.$e.')', OC_Log::FATAL);
|
||||||
throw $e;
|
throw $e;
|
||||||
|
@ -543,7 +543,7 @@ class OC_DB {
|
||||||
*/
|
*/
|
||||||
public static function dropTable($tableName) {
|
public static function dropTable($tableName) {
|
||||||
self::connectDoctrine();
|
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) {
|
public static function removeDBStructure($file) {
|
||||||
self::connectDoctrine();
|
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 ) {
|
public static function replaceDB( $file ) {
|
||||||
self::connectDoctrine();
|
self::connectDoctrine();
|
||||||
OC_DB_Schema::replaceDB(self::$connection, $file);
|
OC_DB_Schema::replaceDB(self::$DOCTRINE, $file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -178,7 +178,7 @@ class OC_Setup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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")) {
|
if(file_exists("$datadir/owncloud.db")) {
|
||||||
unlink("$datadir/owncloud.db");
|
unlink("$datadir/owncloud.db");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue