/**
  * @param ItemId $fromId
  * @param ItemId $toId
  * @param string[] $ignoreConflicts
  * @param string $summary
  * @param bool $bot
  */
 private function mergeItems(ItemId $fromId, ItemId $toId, array $ignoreConflicts, $summary, $bot)
 {
     list($newRevisionFrom, $newRevisionTo, $redirected) = $this->interactor->mergeItems($fromId, $toId, $ignoreConflicts, $summary, $bot);
     $this->resultBuilder->setValue(null, 'success', 1);
     $this->resultBuilder->setValue(null, 'redirected', (int) $redirected);
     $this->addEntityToOutput($newRevisionFrom, 'from');
     $this->addEntityToOutput($newRevisionTo, 'to');
 }
Пример #2
0
 /**
  * @param ItemId $fromId
  * @param ItemId $toId
  * @param string[] $ignoreConflicts
  * @param string $summary
  */
 private function mergeItems(ItemId $fromId, ItemId $toId, array $ignoreConflicts, $summary)
 {
     $this->tokenCheck->checkRequestToken($this->getRequest(), 'wpEditToken');
     /** @var EntityRevision $newRevisionFrom  */
     /** @var EntityRevision $newRevisionTo */
     list($newRevisionFrom, $newRevisionTo, ) = $this->interactor->mergeItems($fromId, $toId, $ignoreConflicts, $summary);
     //XXX: might be nicer to pass pre-rendered links as parameters
     $this->getOutput()->addWikiMsg('wikibase-mergeitems-success', $fromId->getSerialization(), $newRevisionFrom->getRevisionId(), $toId->getSerialization(), $newRevisionTo->getRevisionId());
 }