From 45316b1c161aa0c8ae05e08caf427ee9e90f97b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Sun, 26 Apr 2009 15:19:22 +0000 Subject: Resotre check back seems like empty() does not like 0. --- usr/local/www/interfaces_groups_edit.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/interfaces_groups_edit.php b/usr/local/www/interfaces_groups_edit.php index a67359f..a612aff 100755 --- a/usr/local/www/interfaces_groups_edit.php +++ b/usr/local/www/interfaces_groups_edit.php @@ -43,7 +43,8 @@ if (!is_array($config['ifgroups']['ifgroupentry'])) $a_ifgroups = &$config['ifgroups']['ifgroupentry']; -$id = $_GET['id']; +if (isset($_GET['id'])) + $id = $_GET['id']; if (isset($_POST['id'])) $id = $_POST['id']; @@ -59,13 +60,11 @@ if ($_POST) { unset($input_errors); $pconfig = $_POST; - /* - if (empty($id)) { + if (!isset($id)) { foreach ($a_ifgroups as $groupentry) if ($groupentry['ifname'] == $_POST['ifname']) $input_errors[] = "Group name already exists!"; } - */ if (preg_match("/([^a-zA-Z])+/", $_POST['ifname'], $match)) $input_errors[] = "Only characters in a-z A-Z are allowed as interface name."; -- cgit v1.1