diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-03-26 22:26:06 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-03-26 22:26:06 +0200 |
commit | 60a939dfcfceddbe1563e1712044a4a625bc70ac (patch) | |
tree | a36321420d5c061bbe74fa306df09444407af232 /apps/contacts/ajax | |
parent | 0da988a1bb70e98c13c4dee79e9cdee8709c4485 (diff) | |
download | nextcloud-server-60a939dfcfceddbe1563e1712044a4a625bc70ac.tar.gz nextcloud-server-60a939dfcfceddbe1563e1712044a4a625bc70ac.zip |
Small change and muting debug.
Diffstat (limited to 'apps/contacts/ajax')
-rw-r--r-- | apps/contacts/ajax/saveproperty.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/contacts/ajax/saveproperty.php b/apps/contacts/ajax/saveproperty.php index 112d9031cea..924d873652c 100644 --- a/apps/contacts/ajax/saveproperty.php +++ b/apps/contacts/ajax/saveproperty.php @@ -35,9 +35,9 @@ function bailOut($msg) { function debug($msg) { OC_Log::write('contacts','ajax/saveproperty.php: '.$msg, OC_Log::DEBUG); } -foreach ($_POST as $key=>$element) { - debug('_POST: '.$key.'=>'.print_r($element, true)); -} +// foreach ($_POST as $key=>$element) { +// debug('_POST: '.$key.'=>'.print_r($element, true)); +// } $id = isset($_POST['id'])?$_POST['id']:null; $name = isset($_POST['name'])?$_POST['name']:null; @@ -71,11 +71,6 @@ if(is_array($value)){ } else { $value = trim(strip_tags($value)); } -if(!$value) { - bailOut(OC_Contacts_App::$l10n->t('Cannot save empty value.')); -} - -debug('Element: '.$name.', value: '.print_r($value, true)); $vcard = OC_Contacts_App::getContactVCard( $id ); $line = OC_Contacts_App::getPropertyLineByChecksum($vcard, $checksum); @@ -112,6 +107,10 @@ switch($element) { break; } +if(!$value) { + bailOut(OC_Contacts_App::$l10n->t('Cannot save empty value.')); +} + /* setting value */ switch($element) { case 'BDAY': |