It appears that the search_keywords_log will never be purged. And, the accesslog table is purged instead!

/**
 * Implementation of hook_cron().
 */
function search_keywords_cron() {
  /* clean expired access logs */
  db_query('DELETE FROM {accesslog} WHERE timestamp < %d', time() - variable_get('search_keywords_flush_accesslog_timer', 259200));
}

If I am correct, this means that the search_keywords_log table can grow to unlimited size.

Comments

mcurry’s picture

Status: Active » Needs review

Please find attached patch - This should do the trick.

mcurry’s picture

Oops, lost attachment. Let's try again.

mcurry’s picture

Ok, I'm confused - I've tried attaching the patch file twice, and nothing appears. Perhaps drupal.org is feeling under the weather? Here's the text of the patch:

cvs -z9 diff -u -F^function -- search_keywords.module (in directory C:\devroot\cvs-drupal\contributions\modules\search_keywords\)
Index: search_keywords.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/search_keywords/search_keywords.module,v
retrieving revision 1.15
diff -u -F^function -r1.15 search_keywords.module
--- search_keywords.module	15 Sep 2006 14:31:26 -0000	1.15
+++ search_keywords.module	1 Jan 2007 04:33:36 -0000
@@ -117,7 +117,7 @@ function search_keywords_settings() {
  */
 function search_keywords_cron() {
   /* clean expired access logs */
-  db_query('DELETE FROM {accesslog} WHERE timestamp < %d', time() - variable_get('search_keywords_flush_accesslog_timer', 259200));
+  db_query('DELETE FROM {search_keywords_log} WHERE timestamp < %d', time() - variable_get('search_keywords_flush_accesslog_timer', 259200));
 }
 
 /**

I'll try attaching it one more time

mcurry’s picture

Trying to attach patch file. If it doesn't work, email me (exodusdev@gmail.com) for the file, I'll send it to you.

mcurry’s picture

Or, give me CVS access and I'll apply the patch myself.

Thanks!

sugree’s picture

Assigned: Unassigned » sugree
Status: Needs review » Fixed

Oops! It's all my fault.

Anonymous’s picture

Status: Fixed » Closed (fixed)