Make sure to delete the proper entry.

This commit is contained in:
Seth Mos 2008-11-17 12:11:22 +00:00
parent 9ad878a1ec
commit 63552f4ef1

View File

@ -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");