Tweak r44534: simplify this
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 13 Dec 2008 15:26:19 +0000 (15:26 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 13 Dec 2008 15:26:19 +0000 (15:26 +0000)
includes/filerepo/LocalFile.php

index 2072ebd..bf81043 100644 (file)
@@ -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;