aboutsummaryrefslogtreecommitdiffstats
path: root/apps/contacts/ajax/currentphoto.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-03 12:23:29 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-03 12:23:29 +0200
commit43caa3b3b9cc9dbbf73ab2f6695a801a07a1dba5 (patch)
treef4b191f0d039cb7de942554ea23df3fff9de7ad6 /apps/contacts/ajax/currentphoto.php
parent375ba986452b190745b9388be92737d7e5771673 (diff)
downloadnextcloud-server-43caa3b3b9cc9dbbf73ab2f6695a801a07a1dba5.tar.gz
nextcloud-server-43caa3b3b9cc9dbbf73ab2f6695a801a07a1dba5.zip
ported oc_json
Diffstat (limited to 'apps/contacts/ajax/currentphoto.php')
-rwxr-xr-xapps/contacts/ajax/currentphoto.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/contacts/ajax/currentphoto.php b/apps/contacts/ajax/currentphoto.php
index 488f064836b..d8afa060b1e 100755
--- a/apps/contacts/ajax/currentphoto.php
+++ b/apps/contacts/ajax/currentphoto.php
@@ -24,11 +24,11 @@
// Check if we are a user
// Firefox and Konqueror tries to download application/json for me. --Arthur
-OC_JSON::setContentTypeHeader('text/plain');
-OC_JSON::checkLoggedIn();
-OC_JSON::checkAppEnabled('contacts');
+OCP\JSON::setContentTypeHeader('text/plain');
+OCP\JSON::checkLoggedIn();
+OCP\JSON::checkAppEnabled('contacts');
function bailOut($msg) {
- OC_JSON::error(array('data' => array('message' => $msg)));
+ OCP\JSON::error(array('data' => array('message' => $msg)));
OCP\Util::writeLog('contacts','ajax/currentphoto.php: '.$msg, OCP\Util::ERROR);
exit();
}
@@ -55,7 +55,7 @@ if( is_null($contact)) {
}
if($image->valid()) {
if($image->save($tmpfname)) {
- OC_JSON::success(array('data' => array('id'=>$_GET['id'], 'tmp'=>$tmpfname)));
+ OCP\JSON::success(array('data' => array('id'=>$_GET['id'], 'tmp'=>$tmpfname)));
exit();
} else {
bailOut(OC_Contacts_App::$l10n->t('Error saving temporary file.'));