diff options
author | Tom Needham <needham.thomas@gmail.com> | 2012-03-10 18:18:58 +0000 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2012-03-10 18:18:58 +0000 |
commit | d712d7f52c667e70edefcbd64c036afada678863 (patch) | |
tree | e730233606a5be00e6745fda35e51cb92acb2851 /apps/user_migrate | |
parent | 3ca76d24a9b27101661c454be84c7126315315d6 (diff) | |
download | nextcloud-server-d712d7f52c667e70edefcbd64c036afada678863.tar.gz nextcloud-server-d712d7f52c667e70edefcbd64c036afada678863.zip |
Lots of fixes, improve copyRows() method and update settings page.
Diffstat (limited to 'apps/user_migrate')
-rw-r--r-- | apps/user_migrate/settings.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/apps/user_migrate/settings.php b/apps/user_migrate/settings.php index ed08abe79d7..c35d46b3511 100644 --- a/apps/user_migrate/settings.php +++ b/apps/user_migrate/settings.php @@ -25,7 +25,6 @@ OC_Util::checkAppEnabled('user_migrate'); if (isset($_POST['user_migrate'])) { // Looks like they want to migrate - $errors = array(); $root = OC::$SERVERROOT . "/"; $user = OC_User::getUser(); $zip = new ZipArchive(); @@ -49,21 +48,21 @@ if (isset($_POST['user_migrate'])) { // adding owncloud system files OC_Log::write('user_migrate',"Adding app data to user export file",OC_Log::INFO); // Call to OC_Migrate for the xml file. - $appdatafile = $tempdir . "/userexport.json"; - $appdata = OC_Migrate::export(OC_User::getUser()); - file_put_contents($appdatafile, $appdata); - $zip->addFile($appdatafile, "userexport.json"); + // Create migration.db + var_dump(OC_Migrate::export(OC_User::getUser())); + // Add export db to zip + $zip->addFile($root.'data/'.$user.'/migration.db', "migration.db"); } $zip->close(); - header("Content-Type: application/zip"); - header("Content-Disposition: attachment; filename=" . basename($filename)); - header("Content-Length: " . filesize($filename)); - readfile($filename); - unlink($filename); + //header("Content-Type: application/zip"); + //header("Content-Disposition: attachment; filename=" . basename($filename)); + //header("Content-Length: " . filesize($filename)); + //readfile($filename); + //unlink($filename); } else { // fill template |