Exclude whitelisted domains from showing up in the Top Ads List

This commit is contained in:
DL6ER
2017-01-31 11:48:02 +01:00
parent 2e44c6897c
commit 5e728255fa

View File

@@ -103,6 +103,20 @@
);
}
// Test if variable exists and is positive
function ispositive(&$arg)
{
if(isset($arg))
{
if($arg > 0)
{
return true;
}
return false;
}
return false;
}
function getTopItems($argument) {
global $log,$setupVars,$privacyMode;
@@ -136,7 +150,7 @@
// Process sorted domain names
foreach ($dns_domains as $key => $value) {
if(isset($gravity_domains[$key]) && $adcounter < $qty)
if(ispositive($gravity_domains[$key]) && $adcounter < $qty)
{
// New entry for Top Ads
$topAds[$key] = $value;