Delete the old mac when action changes, not the current one

This commit is contained in:
Renato Botelho 2013-09-09 11:28:53 -03:00
parent 0d33f1fc6f
commit a7c00d8dba

View File

@ -142,7 +142,7 @@ if ($_POST) {
write_config();
if (isset($config['captiveportal'][$cpzone]['enable'])) {
$rules = captiveportal_passthrumac_delete_entry($mac);
$rules = captiveportal_passthrumac_delete_entry($oldmac);
$rules .= captiveportal_passthrumac_configure_entry($mac);
$uniqid = uniqid("{$cpzone}_macedit");
file_put_contents("{$g['tmp_path']}/{$uniqid}_tmp", $rules);