summaryrefslogtreecommitdiffstats
path: root/usr/local/www/guiconfig.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-07 10:01:23 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-07 10:01:23 -0300
commit253b37d8c1da5f0d863e3cd034a4df21d6f8d8a6 (patch)
treefcdc426e329bccf32fd5e049ae3800f534d8ccd1 /usr/local/www/guiconfig.inc
parent0bd239d97935560bc4aee414f395cd203b3c42eb (diff)
downloadpfsense-253b37d8c1da5f0d863e3cd034a4df21d6f8d8a6.zip
pfsense-253b37d8c1da5f0d863e3cd034a4df21d6f8d8a6.tar.gz
Read tab information from package xml file instead of config.xml
Diffstat (limited to 'usr/local/www/guiconfig.inc')
-rw-r--r--usr/local/www/guiconfig.inc16
1 files changed, 9 insertions, 7 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 804869c..8ad9e92 100644
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -1105,20 +1105,22 @@ function display_top_tabs(& $tab_array, $no_drop_down = false) {
}
}
-function add_package_tabs($tabgroup, & $tab_array) {
+function add_package_tabs($pkgname, &$tab_array) {
global $config, $g;
- if (!is_array($config['installedpackages'])) {
+ $pkg = get_pkg_data($pkgname);
+
+ if (!isset($pkg['configurationfile']) || !file_exists('/usr/local/pkg/' . $pkg['configurationfile'])) {
return;
}
- if (!is_array($config['installedpackages']['tab'])) {
+
+ $pkg_config = parse_xml_config_pkg('/usr/local/pkg/' . $pkg['configurationfile'], "packagegui");
+
+ if (!isset($pkg_config['tabs']['tab'])) {
return;
}
- foreach ($config['installedpackages']['tab'] as $tab) {
- if ($tab['group'] !== $group) {
- continue;
- }
+ foreach($pkg_config['tabs']['tab'] as $tab) {
$tab_entry = array();
if ($tab['name']) {
$tab_entry[] = $tab['name'];
OpenPOWER on IntegriCloud