Skip to content

Commit

Permalink
I know I fixed this before, somewhere.
Browse files Browse the repository at this point in the history
  • Loading branch information
pudge committed Oct 5, 2005
1 parent ac6921f commit fcd719c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/ResKey/ResKey.pm
Expand Up @@ -83,9 +83,8 @@ sub key {
# For tasks/reskey_purge.pl
sub purge_old {
my($self) = @_;
my $timeframe = getCurrentStatic('reskey_timeframe');
my $delete_before_time = time - ($timeframe || 14400);
$self->sqlDelete('reskeys', 'ts < $delete_before_time');
my $timeframe = getCurrentStatic('reskey_timeframe') || 14400;
$self->sqlDelete('reskeys', "create_ts < DATE_SUB(NOW(), INTERVAL $timeframe SECOND)");
}

1;
Expand Down

0 comments on commit fcd719c

Please sign in to comment.