From: Brad Jorsch Date: Sun, 18 Mar 2018 01:41:45 +0000 (-0400) Subject: RevisionStore: Properly encode timestamp X-Git-Tag: 1.31.0-rc.0~358^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=ff35ae61958412f22e79466a6dbab95c4d2bebd7;p=lhc%2Fweb%2Fwiklou.git RevisionStore: Properly encode timestamp Timestamps in database queries need to be passed through IDatabase::timestamp(). Change-Id: I1c163d80b2111a78bb10de49fe06d61f02c21d07 --- diff --git a/includes/Storage/RevisionStore.php b/includes/Storage/RevisionStore.php index 98ad2876c8..2e3103c527 100644 --- a/includes/Storage/RevisionStore.php +++ b/includes/Storage/RevisionStore.php @@ -1044,9 +1044,10 @@ class RevisionStore * @return RevisionRecord|null */ public function getRevisionByTimestamp( $title, $timestamp ) { + $db = $this->getDBConnection( DB_REPLICA ); return $this->newRevisionFromConds( [ - 'rev_timestamp' => $timestamp, + 'rev_timestamp' => $db->timestamp( $timestamp ), 'page_namespace' => $title->getNamespace(), 'page_title' => $title->getDBkey() ],