summaryrefslogtreecommitdiffstats
path: root/src/usr/local
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-09-29 10:23:27 -0400
committerStephen Beaver <sbeaver@netgate.com>2015-09-29 10:23:27 -0400
commit567d7fd6c23b2712ae08cc870f199184a3edfae2 (patch)
tree542901510b0e4cd988cbf671a0d8855fba8835e2 /src/usr/local
parenteb3743d898f322ef4a08929e68e2be95aebb8047 (diff)
downloadpfsense-567d7fd6c23b2712ae08cc870f199184a3edfae2.zip
pfsense-567d7fd6c23b2712ae08cc870f199184a3edfae2.tar.gz
Fixed #5212
Diffstat (limited to 'src/usr/local')
-rwxr-xr-xsrc/usr/local/www/head.inc31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc
index 7821e89..1382753 100755
--- a/src/usr/local/www/head.inc
+++ b/src/usr/local/www/head.inc
@@ -111,9 +111,11 @@ if (($pagename == "pkg.php") || ($pagename == "pkg_edit.php") || ($pagename == "
}
}
-/* Build the full help URL. */
+// Build the full help URL.
$helpurl .= "{$g['help_base_url']}?page={$pagename}";
+// Create a menu entry of any installed packages in the specified category
+// (Now reads the menu information from $config['installedpackages']['menu'] only)
function return_ext_menu($section) {
global $config;
@@ -121,39 +123,35 @@ function return_ext_menu($section) {
$extarray = array();
if (!empty($config['installedpackages']['package'])) {
- foreach ($config['installedpackages']['package'] as $package) {
-
- if ($package['category'] != $section) {
+ foreach ($config['installedpackages']['menu'] as $menu) {
+// print('Name: ' . $menu['name'] . ', Pkg category: ' . $menu['category'] . ', Section: ' . $section . '<br />');
+ if ($menu['section'] != $section) {
continue;
}
- // A package has been found that matches the specified category. We need to read it's config file
- $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "packagegui");
-
- $menuitem = $pkg_config['menu'][0];
-
- if ($menuitem['url'] != "") {
- $test_url=$menuitem['url'];
+ if ($menu['url'] != "") {
+ $test_url = $menu['url'];
$addresswithport = getenv("HTTP_HOST");
$colonpos = strpos($addresswithport, ":");
- if ($colonpos !== False) {
+
+ if ($colonpos !== false) {
//my url is actually just the IP address of the pfsense box
$myurl = substr($addresswithport, 0, $colonpos);
} else {
$myurl = $addresswithport;
}
- $description = str_replace('$myurl', $myurl, $menuitem['url']);
+ $description = str_replace('$myurl', $myurl, $menu['url']);
} else {
- $description = '/pkg.php?xml=' . $menuitem['configfile'];
+ $description = '/pkg.php?xml=' . $menu['configfile'];
$test_url=$description;
}
if (isAllowedPage($test_url)) {
- $extarray[] = array($menuitem['name'], $description);
+ $extarray[] = array($menu['name'], $description);
}
-
}
}
+
return $extarray;
}
@@ -233,6 +231,7 @@ if ($g['services_dhcp_server_enable']) {
$services_menu[] = array(gettext("DHCP Server"), "/services_dhcp.php");
$services_menu[] = array(gettext("DHCPv6 Server/RA"), "/services_dhcpv6.php");
}
+
$services_menu[] = array(gettext("Dynamic DNS"), "/services_dyndns.php");
$services_menu[] = array(gettext("IGMP proxy"), "/services_igmpproxy.php");
$services_menu[] = array(gettext("Load Balancer"), "/load_balancer_pool.php");
OpenPOWER on IntegriCloud