mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Merge pull request #1029 from pi-hole/tweak/AddCommentEntryToBlocklistPage
Add ability for user to include comment when adding a blocklist
This commit is contained in:
@@ -707,9 +707,10 @@ function readAdlists()
|
||||
if(strlen($_POST["newuserlists"]) > 1)
|
||||
{
|
||||
$domains = array_filter(preg_split('/\r\n|[\r\n]/', $_POST["newuserlists"]));
|
||||
$comment = "'".$_POST["newusercomment"]."'";
|
||||
foreach($domains as $domain)
|
||||
{
|
||||
exec("sudo pihole -a adlist add ".escapeshellcmd($domain));
|
||||
exec("sudo pihole -a adlist add ".escapeshellcmd($domain)." ".escapeshellcmd($comment));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user