codacy fixes

This commit is contained in:
DL6ER
2016-12-31 16:44:03 +00:00
parent c409cf20bf
commit 33714c540c
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -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
+1 -1
View File
@@ -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