summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/fbegin.inc13
-rwxr-xr-xusr/local/www/pkg_edit.php14
2 files changed, 24 insertions, 3 deletions
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index c0594ac..6f44a89 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -8,7 +8,18 @@ require_once("notices.inc");
foreach($config['installedpackages']['menu'] as $menuitem) {
if($menuitem['section'] != $section) continue;
if($menuitem['url'] <> "") {
- $description = str_replace('$myurl', getenv("HTTP_HOST"), $menuitem['url']);
+ $addresswithport = getenv("HTTP_HOST");
+ $colonpos = strpos($addresswithport, ":");
+ 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']);
} else {
$description = '/pkg.php?xml=' . $menuitem['configfile'];
}
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index 0091f74..34efc8a 100755
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -293,9 +293,19 @@ if ($pkg['tabs'] <> "") {
if($tab['url'] <> "") $urltmp = $tab['url'];
if($tab['xml'] <> "") $urltmp = "pkg_edit.php?xml=" . $tab['xml'];
- $myurl = getenv("HTTP_HOST");
+ $addresswithport = getenv("HTTP_HOST");
+ $colonpos = strpos($addresswithport, ":");
+ if ($colonpos !== False){
+ //my url is actually just the IP address of the pfsense box
+ $myurl = substr($addresswithport, 0, $colonpos);
+ }
+ else
+ {
+ $myurl = $addresswithport;
+ }
// eval url so that above $myurl item can be processed if need be.
$url = str_replace('$myurl', $myurl, $urltmp);
+
$tab_array[] = array(
$tab['text'],
$active,
@@ -724,4 +734,4 @@ function parse_package_templates() {
}
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud