X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMergeHistory.php;h=e57f88099ac65bf5681c81a14e8f0431196522bf;hb=9a05e34a1072228fe2ad4068115b07295b02b77e;hp=dd1fd3705114db7cb7e3e6f2855aabd3c1cfaaa1;hpb=32628487e17c27f3437d44bd54edb8438e837b82;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php index dd1fd37051..e57f88099a 100644 --- a/includes/MergeHistory.php +++ b/includes/MergeHistory.php @@ -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()