Merge "Revert "Use display name in category page subheadings if provided""
[lhc/web/wiklou.git] / includes / MergeHistory.php
index dd1fd37..e57f880 100644 (file)
@@ -42,7 +42,7 @@ class MergeHistory {
        /** @var Title Page to which history will be merged */
        protected $dest;
 
-       /** @var DatabaseBase Database that we are using */
+       /** @var IDatabase Database that we are using */
        protected $dbw;
 
        /** @var MWTimestamp Maximum timestamp that we can use (oldest timestamp of dest) */
@@ -90,7 +90,8 @@ class MergeHistory {
                                        'revision',
                                        'MAX(rev_timestamp)',
                                        [
-                                               'rev_timestamp <= ' . $this->dbw->timestamp( $mwTimestamp ),
+                                               'rev_timestamp <= ' .
+                                                       $this->dbw->addQuotes( $this->dbw->timestamp( $mwTimestamp ) ),
                                                'rev_page' => $this->source->getArticleID()
                                        ],
                                        __METHOD__
@@ -118,7 +119,8 @@ class MergeHistory {
                                $this->timestampLimit = $lasttimestamp;
                        }
 
-                       $this->timeWhere = "rev_timestamp <= {$this->dbw->timestamp( $timeInsert )}";
+                       $this->timeWhere = "rev_timestamp <= " .
+                               $this->dbw->addQuotes( $this->dbw->timestamp( $timeInsert ) );
                } catch ( TimestampException $ex ) {
                        // The timestamp we got is screwed up and merge cannot continue
                        // This should be detected by $this->isValidMerge()