1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Small change and muting debug.

This commit is contained in:
Thomas Tanghus 2012-03-26 22:26:06 +02:00
parent 7221ff525b
commit adb118a3a2

View 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':