From 89675213bfafe923094e7b31dcc86026bfa59206 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 12 Dec 2007 22:50:54 +0000 Subject: [PATCH] - Make address2 never required, and setup the system so we can easily add more fields that shoudl never be required. I do it this way so I don't have to duplicate the field select array in user.inc.php for the requried fields too. - Swap the City and Address2 locations so that Address1 and Address2 are on top of each other, instead of beside each other. --- user.inc.php | 5 +++++ user_personal.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/user.inc.php b/user.inc.php index 700b406..c3147de 100644 --- a/user.inc.php +++ b/user.inc.php @@ -493,6 +493,11 @@ function user_personal_required_fields($type) $ret = array_merge($ret, $user_personal_fields_map[$f]); } } + /* Filter some elements that are never required. + * - address2 + */ + $ret = array_diff($ret, array('address2')); + return $ret; } diff --git a/user_personal.php b/user_personal.php index cfd23cf..8132a21 100644 --- a/user_personal.php +++ b/user_personal.php @@ -194,10 +194,10 @@ item($u, "Password", 'password'); echo "\n"; echo "\n"; item($u, "Address 1", 'address'); -item($u, "Address 2", 'address2'); +item($u, "City", 'city'); echo "\n"; echo "\n"; -item($u, "City", 'city'); +item($u, "Address 2", 'address2'); if(in_array('province', $fields)) { echo ''.i18n('Province').': '; echo '';