summaryrefslogtreecommitdiffstats
path: root/apps/admin_export/settings.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/admin_export/settings.php')
-rw-r--r--apps/admin_export/settings.php7
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");