Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

I know I fixed this before, somewhere.

  • Loading branch information...
commit fcd719cd4722014b117078a127fced0334cb3b18 1 parent ac6921f
@pudge pudge authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 plugins/ResKey/ResKey.pm
View
5 plugins/ResKey/ResKey.pm
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.