diff options
Diffstat (limited to 'lib/migrate.php')
-rw-r--r-- | lib/migrate.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/migrate.php b/lib/migrate.php index e998cf1f4a8..7d7169c4e46 100644 --- a/lib/migrate.php +++ b/lib/migrate.php @@ -196,7 +196,7 @@ class OC_Migrate{ * @param optional $uid userid of new user */ public static function import( $path, $type='user', $uid=null ){ - + $datadir = OC_Config::getValue( 'datadirectory' ); // Extract the zip if( !$extractpath = self::extractZip( $path ) ){ @@ -222,13 +222,13 @@ class OC_Migrate{ if( self::$exporttype == 'user' ){ self::$uid = !is_null($uid) ? $uid : $currentuser; } - + // We need to be an admin if we are not importing our own data if(($type == 'user' && self::$uid != $currentuser) || $type != 'user' ){ if( !OC_Group::inGroup( OC_User::getUser(), 'admin' )){ // Naughty. OC_Log::write( 'migration', 'Import not permitted.', OC_Log::ERROR ); - return json_encode( array( 'success' => false ) ); + return json_encode( array( 'success' => false ) ); } } @@ -411,7 +411,7 @@ class OC_Migrate{ $success = false; } } - + // Run the export function? if( $success ){ // Set the provider properties @@ -421,7 +421,7 @@ class OC_Migrate{ $return['apps'][$provider->getID()]['success'] = false; $return['apps'][$provider->getID()]['message'] = 'failed to create the app tables'; } - + // Now add some app info the the return array $appinfo = OC_App::getAppInfo( $provider->getID() ); $return['apps'][$provider->getID()]['version'] = OC_App::getAppVersion($provider->getID()); |