summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-06-02 07:21:30 +0545
committerRenato Botelho <garga@FreeBSD.org>2015-06-02 08:33:48 -0300
commit379dc6f2362f80f778e0347c4a6cfc7bb60ae0f9 (patch)
treeb44b84101ea17966535e2a71bb7cf24acdb63861 /usr/local
parent796cc21860438122bb01f26d3be3a5f8e5de9dd1 (diff)
downloadpfsense-379dc6f2362f80f778e0347c4a6cfc7bb60ae0f9.zip
pfsense-379dc6f2362f80f778e0347c4a6cfc7bb60ae0f9.tar.gz
Supply current WAN gateway name to wizard
As the name of the WAN gateway is not always WANGW. Should fix redmine #4713
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/wizards/setup_wizard.xml7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml
index 95582fd..da6c6d4 100644
--- a/usr/local/www/wizards/setup_wizard.xml
+++ b/usr/local/www/wizards/setup_wizard.xml
@@ -410,9 +410,14 @@
</fields>
<stepbeforeformdisplay>
<![CDATA[
+ if (empty($config['interfaces']['wan']['gateway'])) {
+ $wangw_name = "WANGW";
+ } else {
+ $wangw_name = $config['interfaces']['wan']['gateway'];
+ }
if (is_array($config['gateways']['gateway_item']))
foreach ($config['gateways']['gateway_item'] as $gw)
- if ($gw['name'] == 'WANGW' || (!empty($config['wizardtemp']['wangateway']) && $gw['gateway'] == $config['wizardtemp']['wangateway']))
+ if ($gw['name'] == $wangw_name || (!empty($config['wizardtemp']['wangateway']) && $gw['gateway'] == $config['wizardtemp']['wangateway']))
$config['wizardtemp']['wangateway'] = $gw['gateway'];
]]>
</stepbeforeformdisplay>
OpenPOWER on IntegriCloud