aboutsummaryrefslogtreecommitdiffstats
path: root/packages/spamd_db.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-07-15 16:16:40 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-07-15 16:16:40 +0000
commit7e5409a199a75940c4c827636adfbf639110099d (patch)
tree3c48aec6ba53d455ef1ed4307152d7f27125c377 /packages/spamd_db.php
parentbe63011822d15fc8b393a2754f88c14a49514b6f (diff)
downloadpfsense-packages-7e5409a199a75940c4c827636adfbf639110099d.tar.gz
pfsense-packages-7e5409a199a75940c4c827636adfbf639110099d.tar.bz2
pfsense-packages-7e5409a199a75940c4c827636adfbf639110099d.zip
Correctly get a user contributed white and black count.
Diffstat (limited to 'packages/spamd_db.php')
-rw-r--r--packages/spamd_db.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/spamd_db.php b/packages/spamd_db.php
index 35ba5329..4b13a2b4 100644
--- a/packages/spamd_db.php
+++ b/packages/spamd_db.php
@@ -183,8 +183,17 @@ if(file_exists("/var/db/blacklist.txt"))
else
$blacklist_items = "0";
+// Get an overall count of the database
$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`;
+
+// Now count the user contributed whitelist and blacklist count
+$blacklist_items = $blacklist_items + $spamdb_black;
+$whiteList_items = $whiteList_items + $spamdb_white;
+
?>
<body link="#000000" vlink="#000000" alink="#000000">
<?php include("fbegin.inc"); ?>