aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-04-08 19:08:17 +0000
committerTom Needham <needham.thomas@gmail.com>2012-04-08 19:08:17 +0000
commitecc596534a9d6d6faffc6038a5bce61ebdf59781 (patch)
tree52892a54aa45b6a29f72ee8793298f4328c0e9ff /apps
parente5ebbacc9e951d1da82762daf67f993ee20e95cb (diff)
downloadnextcloud-server-ecc596534a9d6d6faffc6038a5bce61ebdf59781.tar.gz
nextcloud-server-ecc596534a9d6d6faffc6038a5bce61ebdf59781.zip
Decode json response for admin exports
Diffstat (limited to 'apps')
-rw-r--r--apps/admin_migrate/settings.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/admin_migrate/settings.php b/apps/admin_migrate/settings.php
index 981d5f4ca63..94bf6052a6b 100644
--- a/apps/admin_migrate/settings.php
+++ b/apps/admin_migrate/settings.php
@@ -28,10 +28,12 @@ OC_Util::checkAppEnabled('admin_migrate');
// Export?
if (isset($_POST['admin_export'])) {
// Create the export zip
- if( !$path = OC_Migrate::export( null, $_POST['export_type'] ) ){
+ $response = json_decode( OC_Migrate::export( null, $_POST['export_type'] ) );
+ if( !$response->success ){
// Error
die('error');
} else {
+ $path = $response->data;
// Download it
header("Content-Type: application/zip");
header("Content-Disposition: attachment; filename=" . basename($path));