diff options
author | Renato Botelho <renato@netgate.com> | 2015-10-22 18:48:59 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-10-22 18:48:59 -0200 |
commit | a2b0d90982e6d0e2b6e36cf3cf2b258628244ca3 (patch) | |
tree | cff98ddcf62e94b4c6d1df69ccec58699953c8bb /src/usr/local/www/guiconfig.inc | |
parent | cf093b35443966b7cbf4f466308fa2358cd3cd31 (diff) | |
download | pfsense-a2b0d90982e6d0e2b6e36cf3cf2b258628244ca3.zip pfsense-a2b0d90982e6d0e2b6e36cf3cf2b258628244ca3.tar.gz |
Rework the way GUI reads packages tabs, it fixes #5311
Diffstat (limited to 'src/usr/local/www/guiconfig.inc')
-rw-r--r-- | src/usr/local/www/guiconfig.inc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index 969ec46..1dd8ed7 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -1098,28 +1098,28 @@ function display_top_tabs(& $tab_array, $no_drop_down = false, $type = 'pills') <?php endif; } -function add_package_tabs($pkgname, &$tab_array) { +function add_package_tabs($tabgroup, &$tab_array) { global $config, $g; -// $pkg = get_pkg_data($pkgname); - - if (!isset($pkg['configurationfile']) || !file_exists('/usr/local/pkg/' . $pkg['configurationfile'])) { + if (!isset($config['installedpackages']['package'])) { return; } - $pkg_config = parse_xml_config_pkg('/usr/local/pkg/' . $pkg['configurationfile'], "packagegui"); + foreach ($config['installedpackages']['package'] as $pkg){ + $pkg_config = read_package_configurationfile($pkg['name']); - if (!isset($pkg_config['tabs']['tab'])) { - return; - } + if (!isset($pkg_config['tabs']['tab'])) { + continue; + } - foreach ($pkg_config['tabs']['tab'] as $tab) { - $tab_entry = array(); - if ($tab['name']) { - $tab_entry[] = $tab['name']; - $tab_entry[] = false; - $tab_entry[] = $tab['url']; - $tab_array[] = $tab_entry; + foreach ($pkg_config['tabs']['tab'] as $tab) { + $tab_entry = array(); + if ($tab['name']) { + $tab_entry[] = $tab['name']; + $tab_entry[] = false; + $tab_entry[] = $tab['url']; + $tab_array[] = $tab_entry; + } } } } |