[geeklog-cvs] geeklog: Make sure the Notification Email config option (in the ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Feb 7 15:30:49 EST 2010


changeset 7718:d2d1c428c4eb
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/d2d1c428c4eb
user: Dirk Haun <dirk at haun-online.de>
date: Sun Feb 07 20:56:53 2010 +0100
description:
Make sure the Notification Email config option (in the Spam-X plugin's configuration) can be disabled

diffstat:

 plugins/spamx/functions.inc |  10 ++++++++++
 public_html/docs/history    |   1 +
 2 files changed, 11 insertions(+), 0 deletions(-)

diffs (31 lines):

diff -r 41e3e632a245 -r d2d1c428c4eb plugins/spamx/functions.inc
--- a/plugins/spamx/functions.inc	Sun Feb 07 14:14:24 2010 -0500
+++ b/plugins/spamx/functions.inc	Sun Feb 07 20:56:53 2010 +0100
@@ -210,6 +210,16 @@
             $c = config::get_instance();
             $c->del('admin_override', 'spamx');
 
+            // late fix: ensure 'notification_email' option can be disabled
+            $result = DB_query("SELECT value, default_value FROM {$_TABLES['conf_values']} WHERE name = 'notification_email' AND group_name = 'spamx'");
+            list($value, $default_value) = DB_fetchArray($result);
+            if ($value != 'unset') {
+                if (substr($default_value, 0, 6) != 'unset:') {
+                    $unset = addslashes('unset:' . $default_value);
+                    DB_query("UPDATE {$_TABLES['conf_values']} SET default_value = '$unset' WHERE name = 'notification_email' AND group_name = 'spamx'");
+                }
+            }
+
             $current_version = '1.2.1';
             break;
 
diff -r 41e3e632a245 -r d2d1c428c4eb public_html/docs/history
--- a/public_html/docs/history	Sun Feb 07 14:14:24 2010 -0500
+++ b/public_html/docs/history	Sun Feb 07 20:56:53 2010 +0100
@@ -82,6 +82,7 @@
 
 Spam-X Plugin
 -------------
+- Make sure the Notification Email config option can be disabled [Dirk]
 - List $_CONF['site_url'] as a non-editable entry in the SLV whitelist to
   indicate that the site's URL is whitelisted automatically [Dirk]
 



More information about the geeklog-cvs mailing list