From 05c00c713afc90f239f3a81f41cc2ab9d18ff04d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 13 Dec 2008 14:59:08 +0000 Subject: [PATCH] Tweak timestamp handling to allow no lower limit --- includes/filerepo/LocalFile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index ea92fe5085..2072ebda39 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -635,7 +635,8 @@ class LocalFile extends File $conds[] = "oi_timestamp <= " . $dbr->addQuotes( $dbr->timestamp( $start ) ); } if( $end !== null ) { - $conds[] = "oi_timestamp >= " . $dbr->addQuotes( $dbr->timestamp( $end ) ); + $endTS = $end ? $dbr->timestamp( $end ) : ""; + $conds[] = "oi_timestamp >= " . $dbr->addQuotes( $endTS ); } if( $limit ) { $opts['LIMIT'] = $limit; -- 2.20.1