From 63552f4ef169f3386f7003136d42bef0ab8945da Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Mon, 17 Nov 2008 12:11:22 +0000 Subject: Make sure to delete the proper entry. --- usr/local/www/system_gateways.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'usr') diff --git a/usr/local/www/system_gateways.php b/usr/local/www/system_gateways.php index 976a9e9..c6d9410 100755 --- a/usr/local/www/system_gateways.php +++ b/usr/local/www/system_gateways.php @@ -68,8 +68,12 @@ if ($_POST) { if ($_GET['act'] == "del") { if ($a_gateways[$_GET['id']]) { - $changedesc .= "removed gateway {$_GET['id']}"; - unset($a_gateways[$_GET['id']]); + /* remove the real entry */ + $realid = $a_gateways[$_GET['id']]['attribute']; + $a_gateways = &$config['gateways']['gateway_item']; + + $changedesc .= "removed gateway {$realid}"; + unset($a_gateways[$realid]); write_config($changedesc); touch($d_staticroutesdirty_path); header("Location: system_gateways.php"); @@ -77,6 +81,7 @@ if ($_GET['act'] == "del") { } } + $pgtitle = array("System","Gateways"); include("head.inc"); -- cgit v1.1