From 785a3e18c6050c7beaa5848c459d314508fb63c8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 4 Mar 2006 12:34:35 +0000 Subject: [PATCH] fixed addressbook prefs for customfields: - customfields could not be saved if the name contained eg. upper case letters - using the user-defined title from the field and not generate one from the name --- addressbook/inc/class.uiaddressbook.inc.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/addressbook/inc/class.uiaddressbook.inc.php b/addressbook/inc/class.uiaddressbook.inc.php index e571485c2c..d10c10c177 100644 --- a/addressbook/inc/class.uiaddressbook.inc.php +++ b/addressbook/inc/class.uiaddressbook.inc.php @@ -1204,7 +1204,7 @@ // while(list($x,$y) = @each($custom)) foreach($custom as $x => $y) { - $customfields[$y['name']] = $y['name']; + $customfields[$y['name']] = $y['title']; } $qfields = $this->bo->stock_contact_fields + $this->extrafields + $customfields; @@ -1284,16 +1284,14 @@ '; $tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color); $i = 0; - while(list($cf) = each($customfields)) + foreach($customfields as $name => $title) { if(!($i % 6)) { $custom_var .= "\n \n"; } - $custom_var .= ' prefs[$cf] ? ' checked' : '') - . '>' . str_replace('_',' ',$cf) . '' . "\n"; + $custom_var .= ' prefs[$name] ? ' checked' : ''). ' />' . htmlspecialchars($title) . '' . "\n"; if(!(++$i % 6)) {