]> source.dussan.org Git - nextcloud-server.git/commitdiff
Small change and muting debug.
authorThomas Tanghus <thomas@tanghus.net>
Mon, 26 Mar 2012 20:26:06 +0000 (22:26 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 26 Mar 2012 20:26:06 +0000 (22:26 +0200)
apps/contacts/ajax/saveproperty.php

index 112d9031cea4b4df052686f65c1118b89b5871ed..924d873652c753c61adfff199c7ebcbc7efc3924 100644 (file)
@@ -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':