summaryrefslogtreecommitdiffstats
path: root/apps/contacts/ajax/deleteproperty.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/deleteproperty.php
parent375ba986452b190745b9388be92737d7e5771673 (diff)
downloadnextcloud-server-43caa3b3b9cc9dbbf73ab2f6695a801a07a1dba5.tar.gz
nextcloud-server-43caa3b3b9cc9dbbf73ab2f6695a801a07a1dba5.zip
ported oc_json
Diffstat (limited to 'apps/contacts/ajax/deleteproperty.php')
-rwxr-xr-xapps/contacts/ajax/deleteproperty.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/contacts/ajax/deleteproperty.php b/apps/contacts/ajax/deleteproperty.php
index 4c753816218..9bb1208cdd1 100755
--- a/apps/contacts/ajax/deleteproperty.php
+++ b/apps/contacts/ajax/deleteproperty.php
@@ -24,8 +24,8 @@
// Check if we are a user
-OC_JSON::checkLoggedIn();
-OC_JSON::checkAppEnabled('contacts');
+OCP\JSON::checkLoggedIn();
+OCP\JSON::checkAppEnabled('contacts');
$id = $_GET['id'];
$checksum = $_GET['checksum'];
@@ -33,16 +33,16 @@ $checksum = $_GET['checksum'];
$vcard = OC_Contacts_App::getContactVCard( $id );
$line = OC_Contacts_App::getPropertyLineByChecksum($vcard, $checksum);
if(is_null($line)){
- OC_JSON::error(array('data' => array( 'message' => OC_Contacts_App::$l10n->t('Information about vCard is incorrect. Please reload the page.'))));
+ OCP\JSON::error(array('data' => array( 'message' => OC_Contacts_App::$l10n->t('Information about vCard is incorrect. Please reload the page.'))));
exit();
}
unset($vcard->children[$line]);
if(!OC_Contacts_VCard::edit($id,$vcard)) {
- OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error deleting contact property.'))));
+ OCP\JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error deleting contact property.'))));
OCP\Util::writeLog('contacts','ajax/deleteproperty.php: Error deleting contact property', OCP\Util::ERROR);
exit();
}
-OC_JSON::success(array('data' => array( 'id' => $id )));
+OCP\JSON::success(array('data' => array( 'id' => $id )));