summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-08-13 22:44:10 +0000
committerBill Marquette <billm@pfsense.org>2005-08-13 22:44:10 +0000
commit6485deb5a7187967a6ee229f4cc2a01db1e6d43d (patch)
tree49a69d3d08e97e277155afda32ca7ec038c1dbd5 /usr/local
parente2c41c393f2a9db396e27dc5bc757c0a920ff7f0 (diff)
downloadpfsense-6485deb5a7187967a6ee229f4cc2a01db1e6d43d.zip
pfsense-6485deb5a7187967a6ee229f4cc2a01db1e6d43d.tar.gz
Ticket #338: better fix, this works even when the user access pfsense
via a name or IP other than pfsense thinks it is
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/system.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/usr/local/www/system.php b/usr/local/www/system.php
index e9c693c..40e5d76 100755
--- a/usr/local/www/system.php
+++ b/usr/local/www/system.php
@@ -146,6 +146,15 @@ if ($_POST) {
if ($changecount > 0)
write_config($changedesc);
+ if ($restart_webgui) {
+ global $_SERVER;
+ if ($pconfig['webguiport']) {
+ $url="{$pconfig['webguiproto']}://{$_SERVER['HTTP_HOST']}:{$pconfig['webguiport']}/system.php";
+ } else {
+ $url = "{$pconfig['webguiproto']}://{$_SERVER['HTTP_HOST']}/system.php";
+ }
+ }
+
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
config_lock();
@@ -164,6 +173,8 @@ if ($_POST) {
}
$savemsg = get_std_save_message($retval);
+ if ($restart_webgui)
+ $savemsg .= "<br />One moment...redirecting to {$url}";
}
}
@@ -274,13 +285,6 @@ include("head.inc");
<?php
// restart webgui if proto or port changed
if ($restart_webgui) {
- global $_SERVER;
- if ($pconfig['webguiport']) {
- $url="{$pconfig['webguiproto']}://{$_SERVER['SERVER_ADDR']}:{$pconfig['webguiport']}/system.php";
- } else {
- $url = "{$pconfig['webguiproto']}://{$_SERVER['SERVER_ADDR']}/system.php";
- }
- echo "<p>One moment... switching https mode/port...</p>";
echo "<meta http-equiv=\"refresh\" content=\"10;url={$url}\">";
}
@@ -288,7 +292,5 @@ include("head.inc");
</body>
</html>
<?php
- if ($restart_webgui) {
- system_webgui_start();
- }
-?> \ No newline at end of file
+if ($restart_webgui)
+ system_webgui_start();
OpenPOWER on IntegriCloud