mirror of
https://github.com/pi-hole/web.git
synced 2026-05-08 09:39:05 +01:00
codacy fixes
This commit is contained in:
@@ -58,7 +58,14 @@ function refresh(fade) {
|
||||
|
||||
if(data.length === 0) {
|
||||
$("h3").hide();
|
||||
list.html("<div class=\"alert alert-info\" role=\"alert\">Your " + fullName + " is empty!</div>");
|
||||
if(listw)
|
||||
{
|
||||
listw.html("<div class=\"alert alert-info\" role=\"alert\">Your " + fullName + " is empty!</div>");
|
||||
}
|
||||
else
|
||||
{
|
||||
list.html("<div class=\"alert alert-info\" role=\"alert\">Your " + fullName + " is empty!</div>");
|
||||
}
|
||||
}
|
||||
else {
|
||||
data.forEach(function (entry, index) {
|
||||
@@ -74,7 +81,6 @@ function refresh(fade) {
|
||||
// Handle button
|
||||
$("#list-wildcard #"+index+"").on("click", "button", function() {
|
||||
sub(index, entry, "wild");
|
||||
console.log("wild rm");
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
@@ -22,7 +22,7 @@ switch ($listtype) {
|
||||
|
||||
|
||||
function getListContent($type) {
|
||||
$rawList = file_get_contents(checkfile("/etc/pihole/${type}list.txt"));
|
||||
$rawList = file_get_contents(checkfile("/etc/pihole/".$type."list.txt"));
|
||||
$list = explode("\n", $rawList);
|
||||
|
||||
// Get rid of empty lines
|
||||
|
||||
Reference in New Issue
Block a user