From 0da988a1bb70e98c13c4dee79e9cdee8709c4485 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Mon, 26 Mar 2012 22:07:19 +0200 Subject: [PATCH] Check for empty value. Added missing classes on action icons. --- apps/contacts/ajax/saveproperty.php | 5 +++++ apps/contacts/templates/part.contact.php | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/apps/contacts/ajax/saveproperty.php b/apps/contacts/ajax/saveproperty.php index 272a3f9b325..112d9031cea 100644 --- a/apps/contacts/ajax/saveproperty.php +++ b/apps/contacts/ajax/saveproperty.php @@ -71,6 +71,11 @@ 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); diff --git a/apps/contacts/templates/part.contact.php b/apps/contacts/templates/part.contact.php index a1acb20b9cb..a93069fa722 100644 --- a/apps/contacts/templates/part.contact.php +++ b/apps/contacts/templates/part.contact.php @@ -51,11 +51,11 @@ $id = isset($_['id']) ? $_['id'] : ''; - + - + - + @@ -100,7 +100,7 @@ $id = isset($_['id']) ? $_['id'] : ''; - + @@ -112,7 +112,7 @@ $id = isset($_['id']) ? $_['id'] : ''; -- 2.39.5