From 73bbcaed4d62d336224bd069876bc0e3d2e21d1f Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 23 Apr 2015 20:10:30 +0545 Subject: Do not process dhcpd implementation if input errors If I go to Service->DHCP Server, make some edits that are invalid (e.g. change range start or end to some invalid string) and press Save then the page comes back displaying the input error(s). But it also says: "The changes have been applied successfully." Actually, the changes (which were invalid) have not been applied to the config - all is well there - but dhcpd has been stopped and started and dnsmasq or unbound has been kicked... which is all unnecessary processing since the user has not yet provided valid values to save. --- usr/local/www/services_dhcp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index 971b0a6..f0b5be9 100644 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -490,7 +490,7 @@ if (isset($_POST['submit'])) { } } -if (isset($_POST['submit']) || isset($_POST['apply'])) { +if ((isset($_POST['submit']) || isset($_POST['apply'])) && (!$input_errors)) { $retval = 0; $retvaldhcp = 0; $retvaldns = 0; -- cgit v1.1