From 5038eb20d7322af95d1fef7035f6d533b49c25a6 Mon Sep 17 00:00:00 2001 From: pb1dft Date: Sat, 28 Oct 2006 01:23:00 +0000 Subject: minor glitch in ip_history fixed --- lib/ui.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ui.lib.php b/lib/ui.lib.php index dffe38fd..a24b1ce0 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -158,8 +158,9 @@ function show_users () { function show_ip_history (){ $dbh = dbh(); - $date = time() - (86400*conf('user_ip_cardinality')); - $sql = "SELECT ip,date FROM ip_history where user = '$_REQUEST[user]' and date >= '$date' ORDER BY date DESC"; + if (conf('user_ip_cardinality')) { $cardinality = conf('user_ip_cardinality'); } else { $cardinality = '42'; } + $date = time() - (86400*$cardinality); + $sql = "SELECT ip,date FROM ip_history where user = '$_REQUEST[user]' and date >= '$cardinality' ORDER BY date DESC"; $db_results = mysql_query($sql, $dbh); show_box_top(); -- cgit