From 7235086ba6d12cd2899be080c4e3cea5db575fa6 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 28 Jan 2006 05:46:38 +0000 Subject: * Dont process empty items * Misc changes Now works out of the box --- packages/spamd.inc | 14 ++++++++------ packages/spamd.xml | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'packages') diff --git a/packages/spamd.inc b/packages/spamd.inc index 211c2ff1..e2fc15c0 100644 --- a/packages/spamd.inc +++ b/packages/spamd.inc @@ -20,12 +20,14 @@ function sync_package_spamd() { fwrite($fd, "\n# begin of user created entries\n"); if($config['installedpackages']['spamd']['config'] != "") { foreach($config['installedpackages']['spamd']['config'] as $spamd) { - fwrite($fd, rtrim($spamd['providername']) . ":\\\n"); - fwrite($fd, "\t:" . rtrim($spamd['providertype']) . ":\\\n"); - fwrite($fd, "\t:msg=\"" . rtrim($spamd['rejectmessage']) . "\":\\\n"); - fwrite($fd, "\t:method=" . rtrim($spamd['providermethod']) . ":\\\n"); - fwrite($fd, "\t:" . rtrim($spamd['providermethod']) . ":\\\n"); - fwrite($fd, "\t:file=" . rtrim($spamd['providerurl']) . ":\n\n"); + if(rtrim($spamd['providername'])) { + fwrite($fd, rtrim($spamd['providername']) . ":\\\n"); + fwrite($fd, "\t:" . rtrim($spamd['providertype']) . ":\\\n"); + fwrite($fd, "\t:msg=\"" . rtrim($spamd['rejectmessage']) . "\":\\\n"); + fwrite($fd, "\t:method=" . rtrim($spamd['providermethod']) . ":\\\n"); + fwrite($fd, "\t:" . rtrim($spamd['providermethod']) . ":\\\n"); + fwrite($fd, "\t:file=" . rtrim($spamd['providerurl']) . ":\n\n"); + } } } fclose($fd); diff --git a/packages/spamd.xml b/packages/spamd.xml index 38229f22..743179ee 100644 --- a/packages/spamd.xml +++ b/packages/spamd.xml @@ -6,7 +6,7 @@ - spamd + SpamD
Services
spamd.xml
@@ -17,12 +17,12 @@ - spamd Settings + SpamD Settings /pkg.php?xml=spamd.xml - spamd Whitelist + SpamD Whitelist /pkg.php?xml=spamd_whitelist.xml -- cgit v1.2.3