From 2282bd0df4acf23c91357785e81efcac6e8dedc2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 13 Dec 2008 15:26:19 +0000 Subject: [PATCH] Tweak r44534: simplify this --- includes/filerepo/LocalFile.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index 2072ebda39..bf81043ca2 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -631,12 +631,11 @@ class LocalFile extends File $fields = OldLocalFile::selectFields(); $conds = $opts = array(); $conds[] = "oi_name = " . $dbr->addQuotes( $this->title->getDBKey() ); - if( $start !== null ) { + if( $start ) { $conds[] = "oi_timestamp <= " . $dbr->addQuotes( $dbr->timestamp( $start ) ); } - if( $end !== null ) { - $endTS = $end ? $dbr->timestamp( $end ) : ""; - $conds[] = "oi_timestamp >= " . $dbr->addQuotes( $endTS ); + if( $end ) { + $conds[] = "oi_timestamp >= " . $dbr->addQuotes( $end ); } if( $limit ) { $opts['LIMIT'] = $limit; -- 2.20.1