From a7c00d8dba79bb76feeecc7deee35a757653ca61 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 9 Sep 2013 11:28:53 -0300 Subject: [PATCH] Delete the old mac when action changes, not the current one --- usr/local/www/services_captiveportal_mac_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php index 095e36d46a..dfd471fd4d 100755 --- a/usr/local/www/services_captiveportal_mac_edit.php +++ b/usr/local/www/services_captiveportal_mac_edit.php @@ -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);