Timestamp should be matched
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 28 Mar 2008 00:32:48 +0000 (00:32 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 28 Mar 2008 00:32:48 +0000 (00:32 +0000)
includes/filerepo/OldLocalFile.php

index ea6b1d0..581bce4 100644 (file)
@@ -89,7 +89,7 @@ class OldLocalFile extends LocalFile {
                        } else {
                                krsort( $oldImages );
                                foreach ( $oldImages as $timestamp => $info ) {
-                                       if ( $timestamp <= $this->requestedTime ) {
+                                       if ( $timestamp == $this->requestedTime ) {
                                                $found = true;
                                                break;
                                        }
@@ -168,7 +168,7 @@ class OldLocalFile extends LocalFile {
                if ( is_null( $this->requestedTime ) ) {
                        $conds['oi_archive_name'] = $this->archive_name;
                } else {
-                       $conds[] = 'oi_timestamp <= ' . $dbr->addQuotes( $dbr->timestamp( $this->requestedTime ) );
+                       $conds[] = 'oi_timestamp = ' . $dbr->addQuotes( $dbr->timestamp( $this->requestedTime ) );
                }
                $row = $dbr->selectRow( 'oldimage', $this->getCacheFields( 'oi_' ),
                        $conds, __METHOD__, array( 'ORDER BY' => 'oi_timestamp DESC' ) );