From: Jeff Janes Date: Thu, 17 Dec 2015 05:30:46 +0000 (-0800) Subject: PostgreSQL: Add quotes to timestamp X-Git-Tag: 1.31.0-rc.0~8544 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E//%22%22?a=commitdiff_plain;h=0623aeb922e49b866bf3a56e7590623fd39c23d1;p=lhc%2Fweb%2Fwiklou.git PostgreSQL: Add quotes to timestamp The fix for bug T114806 doesn't quote timestamps it sends directly to the database (i.e. not in bind variables). Timestamps in PostgreSQL require quotes. Add addQuotes call. Bug: T121743 Change-Id: If8da1a0171f55d59c63f5501c854aa8fa48d5992 --- diff --git a/includes/Import.php b/includes/Import.php index 67f7ba50cb..f59cf47d37 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -1654,7 +1654,7 @@ class WikiRevision { $prevId = $dbw->selectField( 'revision', 'rev_id', array( 'rev_page' => $pageId, - 'rev_timestamp <= ' . $dbw->timestamp( $this->timestamp ), + 'rev_timestamp <= ' . $dbw->addQuotes( $dbw->timestamp( $this->timestamp ) ), ), __METHOD__, array( 'ORDER BY' => array(