summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-06-30 10:57:47 +0000
committerTom Needham <needham.thomas@gmail.com>2012-06-30 22:56:47 +0000
commitcfc78d44bbde0426337ba6dbacf32a87667f9334 (patch)
tree31f649104f8de955a25c1d6c2d4d927765ea0413 /lib
parentc7a4075aaa133a0ad9a6d84b525924866a8bd9a3 (diff)
downloadnextcloud-server-cfc78d44bbde0426337ba6dbacf32a87667f9334.tar.gz
nextcloud-server-cfc78d44bbde0426337ba6dbacf32a87667f9334.zip
Return correct json response, fix syntax
Diffstat (limited to 'lib')
-rw-r--r--lib/migrate.php19
1 files changed, 4 insertions, 15 deletions
diff --git a/lib/migrate.php b/lib/migrate.php
index 731b6a6839c..f788a637d3c 100644
--- a/lib/migrate.php
+++ b/lib/migrate.php
@@ -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 );
}