From dd7c36808d647b909fa33722601c4cb4140bb76b Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 15 Jul 2008 16:28:10 +0000 Subject: * Correctly tally database counts * Add greylisting count --- packages/spamd_db.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'packages/spamd_db.php') diff --git a/packages/spamd_db.php b/packages/spamd_db.php index 1e49c830..9105709a 100644 --- a/packages/spamd_db.php +++ b/packages/spamd_db.php @@ -181,12 +181,12 @@ include("head.inc"); if(file_exists("/var/db/whitelist.txt")) $whitelist_items = `cat /var/db/whitelist.txt | wc -l`; else - $whitelist_items = "0"; + $whitelist_items = 0; if(file_exists("/var/db/blacklist.txt")) $blacklist_items = `cat /var/db/blacklist.txt | wc -l`; else - $blacklist_items = "0"; + $blacklist_items = 0; // Get an overall count of the database $spamdb_items = `/usr/local/sbin/spamdb | wc -l`; @@ -194,10 +194,11 @@ $spamdb_items = `/usr/local/sbin/spamdb | wc -l`; // Get blacklist and whitelist count from database $spamdb_white = `/usr/local/sbin/spamdb | grep WHITE | wc -l`; $spamdb_black = `/usr/local/sbin/spamdb | grep BLACK | wc -l`; +$spamdb_grey = `/usr/local/sbin/spamdb | grep GREY | wc -l`; // Now count the user contributed whitelist and blacklist count +$whitelist_items = $whitelist_items + $spamdb_white; $blacklist_items = $blacklist_items + $spamdb_black; -$whiteList_items = $whiteList_items + $spamdb_white; ?> @@ -436,6 +437,7 @@ if (typeof getURL == 'undefined') { "; echo "  {$blacklist_items} total items in the blacklist.
"; + echo "  {$spamdb_grey} total items in the greylist.
"; echo "  {$spamdb_items} total items in the SpamDB.
"; ?> -- cgit v1.2.3