summaryrefslogtreecommitdiffstats
path: root/lib/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/db.php b/lib/db.php
index ecaf9e37ee5..de72dee2554 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -592,21 +592,21 @@ class OC_DB {
* @param $file string path to the MDB2 xml db export file
*/
public static function replaceDB( $file ){
- $apps = OC_App::getAllApps();
- self::beginTransaction();
- // Delete the old tables
- self::removeDBStructure( OC::$SERVERROOT . '/db_structure.xml' );
-
- foreach($apps as $app){
- $path = OC_App::getAppPath($app).'/appinfo/database.xml';
- if(file_exists($path)){
- self::removeDBStructure( $path );
- }
- }
-
- // Create new tables
- self::createDBFromStructure( $file );
- self::commit();
+ $apps = OC_App::getAllApps();
+ self::beginTransaction();
+ // Delete the old tables
+ self::removeDBStructure( OC::$SERVERROOT . '/db_structure.xml' );
+
+ foreach($apps as $app){
+ $path = OC_App::getAppPath($app).'/appinfo/database.xml';
+ if(file_exists($path)){
+ self::removeDBStructure( $path );
+ }
+ }
+
+ // Create new tables
+ self::createDBFromStructure( $file );
+ self::commit();
}