diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-26 19:50:17 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-26 19:50:17 +0000 |
commit | 1b7ad79245cfdd235a1b4d5ab0093efc725dc278 (patch) | |
tree | e5fd0af72c263fb8d8bcc9910fb0bee1a13f268d | |
parent | 0bb3c90d358178b6e413c5cf183c0b353906c3ab (diff) | |
download | pfsense-packages-1b7ad79245cfdd235a1b4d5ab0093efc725dc278.tar.gz pfsense-packages-1b7ad79245cfdd235a1b4d5ab0093efc725dc278.tar.bz2 pfsense-packages-1b7ad79245cfdd235a1b4d5ab0093efc725dc278.zip |
Remove _ from field names, the xml toolkit seems to not like it.
-rw-r--r-- | packages/spamd.xml | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/packages/spamd.xml b/packages/spamd.xml index 9754f453..2b831c82 100644 --- a/packages/spamd.xml +++ b/packages/spamd.xml @@ -30,11 +30,11 @@ <adddeleteeditpagefields> <columnitem> <fielddescr>Provider Name</fielddescr> - <fieldname>provider_name</fieldname> + <fieldname>providername</fieldname> </columnitem> <columnitem> <fielddescr>Description</fielddescr> - <fieldname>provider_description</fieldname> + <fieldname>providerdescription</fieldname> </columnitem> </adddeleteeditpagefields> <!-- fields gets invoked when the user adds or edits a item. the following items @@ -42,14 +42,14 @@ <fields> <field> <fielddescr>Provider Name</fielddescr> - <fieldname>provider_name</fieldname> + <fieldname>providername</fieldname> <description>Enter the name of the source</description> <size>30</size> <type>input</type> </field> <field> <fielddescr>Provider Type</fielddescr> - <fieldname>provider_type</fieldname> + <fieldname>providertype</fieldname> <description>Select the Provider Type</description> <type>select</type> <value>black</value> @@ -61,21 +61,21 @@ </field> <field> <fielddescr>Provider Description</fielddescr> - <fieldname>provider_description</fieldname> + <fieldname>providerdescription</fieldname> <description>Enter the description for this item</description> <type>input</type> <size>30</size> </field> <field> <fielddescr>Reject message</fielddescr> - <fieldname>reject_message</fieldname> + <fieldname>rejectmessage</fieldname> <description>Enter the message to display to emailing parties that are on this providers list</description> <type>input</type> <size>30</size> </field> <field> <fielddescr>Provider Method</fielddescr> - <fieldname>provider_method</fieldname> + <fieldname>providermethod</fieldname> <description>Select the Provider Method</description> <type>select</type> <value>http</value> @@ -87,7 +87,7 @@ </field> <field> <fielddescr>Provider URL or Filename</fielddescr> - <fieldname>provider_url</fieldname> + <fieldname>providerurl</fieldname> <description>Enter the URL to the provider.</description> <rows>3</rows> <cols>40</cols> @@ -105,27 +105,28 @@ fwrite($fd, "# package management system\n\n"); fwrite($fd, "all:whitelist:\\\n\t"); foreach($config['installedpackages']['spamd']['config'] as $spamd) { - fwrite($fd, ":" . $spamd['provider_name']); + fwrite($fd, ":" . rtrim($spamd['provider_name'])); } - fwrite($fd, "# begin of whitelist\n"); + fwrite($fd, "\n\n# begin of whitelist\n"); fwrite($fd, ":whitelist:\\ \n"); fwrite($fd, ":white:\\ \n"); fwrite($fd, ":file=/var/mail/whitelist.txt\n\n"); /* loop through each item and write out its configuration */ fwrite($fd, "\n# begin of user created entries\n"); foreach($config['installedpackages']['spamd']['config'] as $spamd) { - fwrite($fd, $spamd['provider_name'] . ":\\ \n"); - fwrite($fd, ":" . $spamd['provider_method'] . ":\\ \n"); - fwrite($fd, ":msg=\"" . $spamd['reject_message'] . "\":\\ \n"); - fwrite($fd, ":" . $spamd['provider_method'] . ":\\ \n"); - fwrite($fd, ":file=" . $spamd['provider_url'] . ":\n\n"); + fwrite($fd, rtrim($spamd['provider_name']) . ":\\ \n"); + fwrite($fd, ":" . rtrim($spamd['provider_method']) . ":\\ \n"); + fwrite($fd, ":msg=\"" . rtrim($spamd['reject_message']) . "\":\\ \n"); + fwrite($fd, ":" . rtrim($spamd['provider_method']) . ":\\ \n"); + fwrite($fd, ":file=" . rtrim($spamd['provider_url']) . ":\n\n"); } fwrite($fd, ":\n"); fclose($fd); $fd = fopen("/var/mail/whitelist.txt","w"); - foreach($config['installedpackages']['spamd-whitelist']['config'] as $spamd) { - fwrite($fd, $spamd['ip'] . "\n"); - } + if($config['installedpackages']['spamd-whitelist']['config'] != "") + foreach($config['installedpackages']['spamd-whitelist']['config'] as $spamd) { + fwrite($fd, $spamd['ip'] . "\n"); + } fclose($fd); conf_mount_ro(); config_unlock(); |