summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2006-12-17 21:40:52 +0000
committerSeth Mos <seth.mos@xs4all.nl>2006-12-17 21:40:52 +0000
commit656a2feab27346b251e20767260d98b86e1691b1 (patch)
tree8cde244b37288f7a849bd88b760caf6d275c3870 /usr
parent1cbc2a1c68aa0a125a9c13b620201b7464cd511b (diff)
downloadpfsense-656a2feab27346b251e20767260d98b86e1691b1.zip
pfsense-656a2feab27346b251e20767260d98b86e1691b1.tar.gz
MFC fixes for Ticket 1187 by proxy for Scott Dale
Diffstat (limited to 'usr')
-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