diff options
author | Tom Needham <needham.thomas@gmail.com> | 2012-02-04 00:32:06 +0400 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2012-02-04 00:32:06 +0400 |
commit | 5507db9b15034c73d9a121596da4bf440206f173 (patch) | |
tree | 30cf00274e39beacc546c1b4ba51e42b119cefb3 /apps/admin_export | |
parent | 6583d30e26d752c5ddccb1e350e075f59b7ba75d (diff) |
Initial migration code, and basic export for bookmarks
Diffstat (limited to 'apps/admin_export')
-rw-r--r-- | apps/admin_export/settings.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/admin_export/settings.php b/apps/admin_export/settings.php index a33c872ccf4..cafd35570c6 100644 --- a/apps/admin_export/settings.php +++ b/apps/admin_export/settings.php @@ -5,6 +5,8 @@ * * @author Thomas Schmidt * @copyright 2011 Thomas Schmidt tom@opensuse.org + * @author Tom Needham + * @copyright 2012 Tom Needham tom@owncloud.com * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -22,13 +24,15 @@ */ OC_Util::checkAdminUser(); OC_Util::checkAppEnabled('admin_export'); + + if (isset($_POST['admin_export'])) { $root = OC::$SERVERROOT . "/"; $zip = new ZipArchive(); $filename = get_temp_dir() . "/owncloud_export_" . date("y-m-d_H-i-s") . ".zip"; OC_Log::write('admin_export',"Creating export file at: " . $filename,OC_Log::INFO); if ($zip->open($filename, ZIPARCHIVE::CREATE) !== TRUE) { - exit("Cannot open <$filename>\n"); + exit("Cannot open <$filename>\n"); } if (isset($_POST['owncloud_system'])) { @@ -49,6 +53,7 @@ if (isset($_POST['admin_export'])) { } if (isset($_POST['user_files'])) { + // needs to handle data outside of the default data dir. // adding user files $zip->addFile($root . '/data/.htaccess', basename($root) . "/data/.htaccess"); $zip->addFile($root . '/data/index.html', basename($root) . "/data/index.html"); |