[geeklog-hg] geeklog: Fixes for changeset a1d813d30d1b

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Feb 1 17:48:25 EST 2014


changeset 9463:1104eee5695b
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/1104eee5695b
user: Tom <websitemaster at cogeco.net>
date: Sat Feb 01 17:47:28 2014 -0500
description:
Fixes for changeset a1d813d30d1b

diffstat:

 plugins/spamx/SLVbase.class.php      |  4 +++-
 plugins/spamx/functions.inc          |  4 +++-
 public_html/docs/english/spamx.html  |  2 +-
 public_html/docs/japanese/spamx.html |  2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)

diffs (59 lines):

diff -r a1d813d30d1b -r 1104eee5695b plugins/spamx/SLVbase.class.php
--- a/plugins/spamx/SLVbase.class.php	Sat Feb 01 17:18:18 2014 -0500
+++ b/plugins/spamx/SLVbase.class.php	Sat Feb 01 17:47:28 2014 -0500
@@ -118,6 +118,8 @@
     public function checkWhitelist(&$links)
     {
         global $_TABLES;
+        
+        $timestamp = DB_escapeString(date('Y-m-d H:i:s'));
 
         $result = DB_query("SELECT value FROM {$_TABLES['spamx']} WHERE name='SLVwhitelist'", 1);
         $nrows = DB_numRows($result);
@@ -131,7 +133,7 @@
                 if (!empty($link)) {
                     if (preg_match("#$val#i", $link)) {
                         $links[$key] = '';
-                        DB_query("UPDATE {$_TABLES['spamx']} SET counter = counter + 1 WHERE name='SLVwhitelist' AND value='" . DB_escapeString($A['value']) . "'", 1);
+                        DB_query("UPDATE {$_TABLES['spamx']} SET counter = counter + 1, regdate = '$timestamp' WHERE name='SLVwhitelist' AND value='" . DB_escapeString($A['value']) . "'", 1);
                     }
                 }
             }
diff -r a1d813d30d1b -r 1104eee5695b plugins/spamx/functions.inc
--- a/plugins/spamx/functions.inc	Sat Feb 01 17:18:18 2014 -0500
+++ b/plugins/spamx/functions.inc	Sat Feb 01 17:47:28 2014 -0500
@@ -382,7 +382,9 @@
     // Clear out any old records
     if ($_SPX_CONF['max_age'] > 1) {
         $timestamp = DB_escapeString(date('Y-m-d'));
-        $sql = "DELETE FROM {$_TABLES['spamx']} WHERE DATE_ADD(regdate,INTERVAL {$_SPX_CONF['max_age']} DAY) < '$timestamp'";
+        $sql = "DELETE FROM {$_TABLES['spamx']} 
+            WHERE DATE_ADD(regdate,INTERVAL {$_SPX_CONF['max_age']} DAY) < '$timestamp' 
+            AND name <> 'SLVwhitelist'";
         DB_query($sql);        
     }
 
diff -r a1d813d30d1b -r 1104eee5695b public_html/docs/english/spamx.html
--- a/public_html/docs/english/spamx.html	Sat Feb 01 17:18:18 2014 -0500
+++ b/public_html/docs/english/spamx.html	Sat Feb 01 17:47:28 2014 -0500
@@ -307,7 +307,7 @@
 <tr>
   <td><a name="desc_max_age">max_age</a></td>
   <td>0</td>
-  <td>The max age in days to keep spamx records since there last update (0 = infinite).</td>
+  <td>The max age in days to keep spamx records since there last update (0 = infinite). SLV Whitelist records will not be deleted.</td>
 </tr>
 </table>
 
diff -r a1d813d30d1b -r 1104eee5695b public_html/docs/japanese/spamx.html
--- a/public_html/docs/japanese/spamx.html	Sat Feb 01 17:18:18 2014 -0500
+++ b/public_html/docs/japanese/spamx.html	Sat Feb 01 17:47:28 2014 -0500
@@ -194,7 +194,7 @@
 <tr>
   <td><a name="desc_max_age">max_age</a></td>
   <td>0</td>
-  <td>The max age in days to keep spamx records since there last update (0 = infinite).</td>
+  <td>The max age in days to keep spamx records since there last update (0 = infinite). SLV Whitelist records will not be deleted.</td>
 </tr>
 </table>
 



More information about the geeklog-cvs mailing list