From 0b70757c1c76e26e250a99da4d2426bb23861a1e Mon Sep 17 00:00:00 2001 From: e107steved Date: Tue, 2 Dec 2008 20:23:32 +0000 Subject: [PATCH] Add option to get fields indexed by field name --- e107_handlers/user_extended_class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/e107_handlers/user_extended_class.php b/e107_handlers/user_extended_class.php index 3d26d6bf8..f808f930b 100755 --- a/e107_handlers/user_extended_class.php +++ b/e107_handlers/user_extended_class.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/user_extended_class.php,v $ -| $Revision: 1.16 $ -| $Date: 2008-11-30 23:15:15 $ -| $Author: mcfly_e107 $ +| $Revision: 1.17 $ +| $Date: 2008-12-02 20:23:32 $ +| $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -160,15 +160,15 @@ class e107_user_extended } // Get the definition of all fields, or those in a specific category, indexed by field ID - function user_extended_get_fieldList($cat = "") + function user_extended_get_fieldList($cat = "", $indexField = 'user_extended_struct_id') { global $sql; $more = ($cat != '') ? " AND user_extended_struct_parent = ".intval($cat)." " : ""; - if($sql->db_Select("user_extended_struct", "*", "user_extended_struct_type > 0 {$more} ORDER BY user_extended_struct_order ASC")) + if($sql->db_Select("user_extended_struct", "*", "user_extended_struct_type > 0 AND user_extended_struct_text != '_system_' {$more} ORDER BY user_extended_struct_order ASC")) { while($row = $sql->db_Fetch()) { - $ret[$row['user_extended_struct_id']] = $row; + $ret[$row[$indexField]] = $row; } } return $ret;