]> source.dussan.org Git - nextcloud-server.git/commitdiff
Return correct json response, fix syntax
authorTom Needham <needham.thomas@gmail.com>
Sat, 30 Jun 2012 10:57:47 +0000 (10:57 +0000)
committerTom Needham <needham.thomas@gmail.com>
Sat, 30 Jun 2012 22:56:47 +0000 (22:56 +0000)
lib/migrate.php

index 731b6a6839c90a52c811e81b4eb5c4ff66cb2de8..f788a637d3ce1ae4753c62d34425d1b8adc4bca4 100644 (file)
@@ -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 );
                }