summaryrefslogtreecommitdiffstats
path: root/apps/user_migrate/ajax/export.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_migrate/ajax/export.php')
-rwxr-xr-xapps/user_migrate/ajax/export.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/user_migrate/ajax/export.php b/apps/user_migrate/ajax/export.php
index ef8e331c68c..07c35c73470 100755
--- a/apps/user_migrate/ajax/export.php
+++ b/apps/user_migrate/ajax/export.php
@@ -24,33 +24,33 @@
// Check if we are a user
-OC_JSON::checkLoggedIn();
+OCP\JSON::checkLoggedIn();
OCP\App::checkAppEnabled('user_migrate');
// Which operation
if( $_GET['operation']=='create' ){
$uid = !empty( $_POST['uid'] ) ? $_POST['uid'] : OCP\USER::getUser();
if( $uid != OCP\USER::getUser() ){
// Needs to be admin to export someone elses account
- OC_JSON::error();
+ OCP\JSON::error();
die();
}
// Create the export zip
$response = json_decode( OC_Migrate::export( $uid ) );
if( !$response->success ){
// Error
- OC_JSON::error();
+ OCP\JSON::error();
die();
} else {
// Save path in session
$_SESSION['ocuserexportpath'] = $response->data;
}
- OC_JSON::success();
+ OCP\JSON::success();
die();
} else if( $_GET['operation']=='download' ){
// Download the export
$path = isset( $_SESSION['ocuserexportpath'] ) ? $_SESSION['ocuserexportpath'] : false;
if( !$path ){
- OC_JSON::error();
+ OCP\JSON::error();
}
header("Content-Type: application/zip");
header("Content-Disposition: attachment; filename=" . basename($path));