Unset enable parameter instead of set its value to false. Fixes #1838

This commit is contained in:
Renato Botelho 2013-02-22 15:10:47 -03:00
parent c4bd43ccba
commit d348160eb4

View File

@ -117,7 +117,11 @@ if ($_POST) {
$dyndns['host'] = $_POST['host'];
$dyndns['mx'] = $_POST['mx'];
$dyndns['wildcard'] = $_POST['wildcard'] ? true : false;
$dyndns['enable'] = $_POST['enable'] ? false : true;
/* In this place enable means disabled */
if ($_POST['enable'])
unset($dyndns['enable']);
else
$dyndns['enable'] = true;
$dyndns['interface'] = $_POST['interface'];
$dyndns['zoneid'] = $_POST['zoneid'];
$dyndns['ttl'] = $_POST['ttl'];