From 60a939dfcfceddbe1563e1712044a4a625bc70ac Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Mon, 26 Mar 2012 22:26:06 +0200 Subject: [PATCH] Small change and muting debug. --- apps/contacts/ajax/saveproperty.php | 15 +++++++-------- 1 file 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': -- 2.39.5