summaryrefslogtreecommitdiffstats
path: root/apps/contacts/ajax/editname.php
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-02-06 14:18:40 +0100
committerThomas Tanghus <thomas@tanghus.net>2012-02-08 08:47:03 +0100
commit0c5eb542bdd3742cada1fa5331b1a3f4ae3f6975 (patch)
tree9afd1df7cdda00ca088ac1d1562fc76ff1d103c8 /apps/contacts/ajax/editname.php
parent6112cdc7e8b80f8cb23fc36c872b94e620c5d086 (diff)
downloadnextcloud-server-0c5eb542bdd3742cada1fa5331b1a3f4ae3f6975.tar.gz
nextcloud-server-0c5eb542bdd3742cada1fa5331b1a3f4ae3f6975.zip
Fixed broken "Add new" contact.
Possible fix for cards with missing 'FN' property added through DAV. Misc. UI cleanups.
Diffstat (limited to 'apps/contacts/ajax/editname.php')
-rw-r--r--apps/contacts/ajax/editname.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/contacts/ajax/editname.php b/apps/contacts/ajax/editname.php
index 6205cc74b0a..c7a7bcdeaf8 100644
--- a/apps/contacts/ajax/editname.php
+++ b/apps/contacts/ajax/editname.php
@@ -9,14 +9,23 @@
require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
+function bailOut($msg) {
+ OC_JSON::error(array('data' => array('message' => $msg)));
+ OC_Log::write('contacts','ajax/editname.php: '.$msg, OC_Log::DEBUG);
+ exit();
+}
+function debug($msg) {
+ OC_Log::write('contacts','ajax/editname.php: '.$msg, OC_Log::DEBUG);
+}
+foreach ($_GET as $key=>$element) {
+ debug('_GET: '.$key.'=>'.$element);
+}
$tmpl = new OC_TEMPLATE("contacts", "part.edit_name_dialog");
$id = $_GET['id'];
if($id) {
$vcard = OC_Contacts_App::getContactVCard($id);
-
-
$name = array('', '', '', '', '');
if($vcard->__isset('N')) {
$property = $vcard->__get('N');