From 6eca1220568a4f78da9d6ef7b59f54b6ef78aab6 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Thu, 27 Mar 2008 21:55:39 +0000 Subject: [PATCH] Wrap timestamp for DB query in $dbr->timestamp() call. Bug 13532. --- includes/filerepo/OldLocalFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/filerepo/OldLocalFile.php b/includes/filerepo/OldLocalFile.php index bc712c75c6..ea6b1d0f12 100644 --- a/includes/filerepo/OldLocalFile.php +++ b/includes/filerepo/OldLocalFile.php @@ -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( $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' ) ); -- 2.20.1