diff options
Diffstat (limited to 'lib/migrate.php')
-rw-r--r-- | lib/migrate.php | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/lib/migrate.php b/lib/migrate.php index 87bdd016fe4..a0a329705a3 100644 --- a/lib/migrate.php +++ b/lib/migrate.php @@ -167,7 +167,19 @@ class OC_Migrate{ self::$content = new OC_Migration_Content( self::$zip ); // Creates a zip with the owncloud system files self::$content->addDir( OC::$SERVERROOT . '/', false, '/'); - foreach (array(".git", "3rdparty", "apps", "core", "files", "l10n", "lib", "ocs", "search", "settings", "tests") as $dir) { + foreach (array( + ".git", + "3rdparty", + "apps", + "core", + "files", + "l10n", + "lib", + "ocs", + "search", + "settings", + "tests" + ) as $dir) { self::$content->addDir( OC::$SERVERROOT . '/' . $dir, true, "/"); } break; @@ -181,7 +193,7 @@ class OC_Migrate{ return json_encode( array( 'success' => false ) ); } return json_encode( array( 'success' => true, 'data' => self::$zippath ) ); - } + } /** * @brief imports a user, or owncloud instance @@ -245,7 +257,9 @@ class OC_Migrate{ } // Import user app data if(file_exists($extractpath . $json->exporteduser . '/migration.db')) { - if( !$appsimported = self::importAppData( $extractpath . $json->exporteduser . '/migration.db', $json, self::$uid ) ) { + if( !$appsimported = self::importAppData( $extractpath . $json->exporteduser . '/migration.db', + $json, + self::$uid ) ) { return json_encode( array( 'success' => false ) ); } } @@ -553,7 +567,9 @@ class OC_Migrate{ return false; } if ( self::$zip->open( self::$zippath, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE ) !== true ) { - OC_Log::write('migration', 'Failed to create the zip with error: '.self::$zip->getStatusString(), OC_Log::ERROR); + OC_Log::write('migration', + 'Failed to create the zip with error: '.self::$zip->getStatusString(), + OC_Log::ERROR); return false; } else { return true; @@ -610,7 +626,9 @@ class OC_Migrate{ if( isset( $info->apps->$id ) ) { // Is the app installed if( !OC_App::isEnabled( $id ) ) { - OC_Log::write( 'migration', 'App: ' . $id . ' is not installed, can\'t import data.', OC_Log::INFO ); + OC_Log::write( 'migration', + 'App: ' . $id . ' is not installed, can\'t import data.', + OC_Log::INFO ); $appsstatus[$id] = 'notsupported'; } else { // Did it succeed on export? @@ -624,7 +642,9 @@ class OC_Migrate{ // Then do the import if( !$appsstatus[$id] = $provider->import( $info->apps->$id, $importinfo ) ) { // Failed to import app - OC_Log::write( 'migration', 'Failed to import app data for user: ' . self::$uid . ' for app: ' . $id, OC_Log::ERROR ); + OC_Log::write( 'migration', + 'Failed to import app data for user: ' . self::$uid . ' for app: ' . $id, + OC_Log::ERROR ); } } else { // Add to failed list |