summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg_edit.php
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/local/www/pkg_edit.php
parent1cbc2a1c68aa0a125a9c13b620201b7464cd511b (diff)
downloadpfsense-656a2feab27346b251e20767260d98b86e1691b1.zip
pfsense-656a2feab27346b251e20767260d98b86e1691b1.tar.gz
MFC fixes for Ticket 1187 by proxy for Scott Dale
Diffstat (limited to 'usr/local/www/pkg_edit.php')
-rwxr-xr-xusr/local/www/pkg_edit.php14
1 files changed, 12 insertions, 2 deletions
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