Permalink
Browse files

Issue #1246468 - Increase the default time period before deleting old…

… activity by IceCreamYou
  • Loading branch information...
1 parent b6c5264 commit db927295a63109b751e4d5f86c6568495715b022 @IceCreamYou committed Aug 16, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 activity_log.admin.inc
  2. +1 −1 activity_log.module
@@ -20,7 +20,7 @@ function activity_log_admin($form_state) {
'#type' => 'textfield',
'#title' => t('Number of days to store an activity record'),
'#description' => t('Activity records older than this many days will be deleted when cron runs.'),
- '#default_value' => variable_get('activity_log_max_age', 30),
+ '#default_value' => variable_get('activity_log_max_age', 365),
'#maxlength' => 6,
'#size' => 4,
);
View
@@ -68,7 +68,7 @@ function activity_log_perm() {
*/
function activity_log_cron() {
// Delete event logs.
- $time = time() - (86400 * variable_get('activity_log_maxage', 30));
+ $time = time() - (86400 * variable_get('activity_log_max_age', 365));
db_query("DELETE FROM {activity_log_events} WHERE created < %d", $time);
db_query("DELETE FROM {activity_log_messages} WHERE last_updated < %d", $time);
}

0 comments on commit db92729

Please sign in to comment.