From bd58d23037f3fc8f10d7ab915099e4253bda458d Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 28 Aug 2008 20:19:52 +0000 Subject: [PATCH] * Simplify by using $_REQUEST * Hard code WAN description if it is blank --- usr/local/www/interfaces.php | 17 ++++++++--------- usr/local/www/interfaces_wan.php | 17 ++++++++--------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index af9666580c..a674f3bfe3 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -38,15 +38,10 @@ ##|*MATCH=interfaces_wan.php* ##|-PRIV -unset($if); -if ($_GET['if']) - $if = $_GET['if']; -else if ($_POST['if']) - $if = $_POST['if']; - -if (!$if) - $if = "wan"; - +if ($_REQUEST['if']) + $if = $_REQUEST['if']; +else + $if = "wan"; define("CRON_MONTHLY_PATTERN", "0 0 1 * *"); define("CRON_WEEKLY_PATTERN", "0 0 * * 0"); @@ -542,6 +537,10 @@ n already exists."; } } +// Populate page descr if it does not exist. +if($if == "wan" && !$wancfg['descr']) + $wancfg['descr'] = "WAN"; + $pgtitle = array("Interfaces", $wancfg['descr']); $closehead = false; include("head.inc"); diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php index af9666580c..a674f3bfe3 100755 --- a/usr/local/www/interfaces_wan.php +++ b/usr/local/www/interfaces_wan.php @@ -38,15 +38,10 @@ ##|*MATCH=interfaces_wan.php* ##|-PRIV -unset($if); -if ($_GET['if']) - $if = $_GET['if']; -else if ($_POST['if']) - $if = $_POST['if']; - -if (!$if) - $if = "wan"; - +if ($_REQUEST['if']) + $if = $_REQUEST['if']; +else + $if = "wan"; define("CRON_MONTHLY_PATTERN", "0 0 1 * *"); define("CRON_WEEKLY_PATTERN", "0 0 * * 0"); @@ -542,6 +537,10 @@ n already exists."; } } +// Populate page descr if it does not exist. +if($if == "wan" && !$wancfg['descr']) + $wancfg['descr'] = "WAN"; + $pgtitle = array("Interfaces", $wancfg['descr']); $closehead = false; include("head.inc");