[geeklog-cvs] geeklog: Fixed Config search to include fieldsets in the search ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Feb 13 13:23:59 EST 2011


changeset 8106:4a921775e34d
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/4a921775e34d
user: Tom <websitemaster at cogeco.net>
date: Sun Feb 13 13:23:19 2011 -0500
description:
Fixed Config search to include fieldsets in the search results

diffstat:

 system/classes/config.class.php |  18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 003b420ee3d9 -r 4a921775e34d system/classes/config.class.php
--- a/system/classes/config.class.php	Sun Feb 13 12:53:19 2011 -0500
+++ b/system/classes/config.class.php	Sun Feb 13 13:23:19 2011 -0500
@@ -249,7 +249,7 @@
             // group the fieldset type
             if ($row[3] == 'fieldset') {
                 $this->conf_type['fieldset'][$row[2]][$row[0]] = $row[0];
-                continue;
+            //    continue;
             }               
             
             if ($row[1] !== 'unset') {
@@ -1645,7 +1645,7 @@
      * @return string JS variable in string
      */
     function _UI_autocomplete_data() {
-        global $_CONF, $LANG_configsections, $LANG_confignames, $LANG_tab, $LANG_CONFIG;
+        global $_CONF, $LANG_configsections, $LANG_confignames, $LANG_fs, $LANG_tab, $LANG_CONFIG;
         
         $permitted_groups = $this->_get_groups();
         $retval = array();
@@ -1670,8 +1670,18 @@
                     
                     foreach ($this->conf_tab_arr[$group][$sg][$tab] as $tab_id => $configs) {
                         foreach ($configs as $conf => $conf_var) {
-                            $label = array_key_exists($conf, $LANG_confignames[$group]) ?
-                                        $LANG_confignames[$group][$conf] : $conf;
+                            // Check to see if label exists for config name
+                            if (array_key_exists($conf, $LANG_confignames[$group])) {
+                                $label = $LANG_confignames[$group][$conf];    
+                            } else {
+                                // Maybe a fieldset, check to see if fieldset label exits
+                                if (array_key_exists($conf, $LANG_fs[$group])) {
+                                    $label = $LANG_fs[$group][$conf];
+                                } else {
+                                    // No label found, set name
+                                    $label = $conf;
+                                }
+                            }
                             
                             if ( is_array($conf_var) ) {
                                 foreach ( $conf_var as $_conf_var ) {



More information about the geeklog-cvs mailing list