Add a class for better readability of list type within the code

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner
2019-12-08 18:47:08 +00:00
parent 3a0a596b11
commit 258ea04432
5 changed files with 24 additions and 19 deletions

View File

@@ -27,19 +27,19 @@ $db = SQLite3_connect($GRAVITYDB, SQLITE3_OPEN_READWRITE);
switch($type) {
case "white":
echo remove_from_table($db, "domainlist", $domains, false, 0);
echo remove_from_table($db, "domainlist", $domains, false, ListType::whitelist);
break;
case "black":
echo remove_from_table($db, "domainlist", $domains, false, 1);
echo remove_from_table($db, "domainlist", $domains, false, ListType::blacklist);
break;
case "white_regex":
echo remove_from_table($db, "domainlist", $domains, false, 2);
echo remove_from_table($db, "domainlist", $domains, false, ListType::regex_whitelist);
break;
case "black_regex":
echo remove_from_table($db, "domainlist", $domains, false, 3);
echo remove_from_table($db, "domainlist", $domains, false, ListType::regex_blacklist);
break;
default: