From 0e3aa71cd00836a3621ca68cb7e060b0d07e1327 Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Wed, 10 Mar 2010 19:26:08 -0700 Subject: Fix sorting issues that were introduced in an old commit, resulting in the incorrect item sometimes being shown when clicking edit buttons. --- usr/local/www/services_dnsmasq_edit.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'usr/local/www/services_dnsmasq_edit.php') diff --git a/usr/local/www/services_dnsmasq_edit.php b/usr/local/www/services_dnsmasq_edit.php index 307927b..7438758 100755 --- a/usr/local/www/services_dnsmasq_edit.php +++ b/usr/local/www/services_dnsmasq_edit.php @@ -57,7 +57,6 @@ require("guiconfig.inc"); if (!is_array($config['dnsmasq']['hosts'])) $config['dnsmasq']['hosts'] = array(); -hosts_sort(); $a_hosts = &$config['dnsmasq']['hosts']; $id = $_GET['id']; @@ -109,11 +108,11 @@ if ($_POST) { $hostent['ip'] = $_POST['ip']; $hostent['descr'] = $_POST['descr']; - hosts_sort(); if (isset($id) && $a_hosts[$id]) $a_hosts[$id] = $hostent; else $a_hosts[] = $hostent; + hosts_sort(); mark_subsystem_dirty('hosts'); -- cgit v1.1