Tweak timestamp handling to allow no lower limit
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 13 Dec 2008 14:59:08 +0000 (14:59 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 13 Dec 2008 14:59:08 +0000 (14:59 +0000)
includes/filerepo/LocalFile.php

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