Skip to content
This repository has been archived by the owner on Aug 25, 2019. It is now read-only.

Commit

Permalink
unneeded if
Browse files Browse the repository at this point in the history
  • Loading branch information
dietrichm committed Apr 9, 2011
1 parent fc220eb commit 29408c9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions sources/session.php
Expand Up @@ -190,13 +190,9 @@ function update($location=NULL, $user_id=NULL) {
//
// Remove outdated sessions and searches if needed
//
if ( $functions->get_config('session_max_lifetime') ) {

$min_updated = $current_time - ( $functions->get_config('session_max_lifetime') * 60 );
$add_to_remove_query[] = "updated < ".$min_updated;
$db->query("DELETE FROM ".TABLE_PREFIX."searches WHERE time < ".$min_updated);

}
$min_updated = $current_time - ( $functions->get_config('session_max_lifetime') * 60 );
$add_to_remove_query[] = "updated < ".$min_updated;
$db->query("DELETE FROM ".TABLE_PREFIX."searches WHERE time < ".$min_updated);

//
// Remove sessions with banned IP addresses
Expand Down

0 comments on commit 29408c9

Please sign in to comment.