From: Aaron Schulz Date: Sat, 13 Dec 2008 15:26:19 +0000 (+0000) Subject: Tweak r44534: simplify this X-Git-Tag: 1.31.0-rc.0~43993 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=2282bd0df4acf23c91357785e81efcac6e8dedc2;p=lhc%2Fweb%2Fwiklou.git Tweak r44534: simplify this --- 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;