Skip to content
Snippets Groups Projects
Commit cfc78d44 authored by Tom Needham's avatar Tom Needham
Browse files

Return correct json response, fix syntax

parent c7a4075a
No related branches found
No related tags found
No related merge requests found
......@@ -278,7 +278,7 @@ class OC_Migrate{
return json_encode( array( 'success' => false ) );
}
// Done
return json_encode( 'success' => true );
return json_encode( array( 'success' => true ) );
*/
break;
}
......@@ -443,21 +443,10 @@ class OC_Migrate{
'ocversion' => OC_Util::getVersion(),
'exporttime' => time(),
'exportedby' => OC_User::getUser(),
'exporttype' => self::$exporttype
'exporttype' => self::$exporttype,
'exporteduser' => self::$uid
);
// Add hash if user export
if( self::$exporttype == 'user' ){
$query = OC_DB::prepare( "SELECT password FROM *PREFIX*users WHERE uid = ?" );
$result = $query->execute( array( self::$uid ) );
$row = $result->fetchRow();
$hash = $row ? $row['password'] : false;
if( !$hash ){
OC_Log::write( 'migration', 'Failed to get the users password hash', OC_log::ERROR);
return false;
}
$info['hash'] = $hash;
$info['exporteduser'] = self::$uid;
}
if( !is_array( $array ) ){
OC_Log::write( 'migration', 'Supplied $array was not an array in getExportInfo()', OC_Log::ERROR );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment