use MediaWiki\Permissions\PermissionManager;
use MediaWiki\Revision\SlotRecord;
use Wikimedia\Rdbms\IDatabase;
-use Wikimedia\Rdbms\LoadBalancer;
+use Wikimedia\Rdbms\ILoadBalancer;
/**
* Handles the backend logic of moving a page from one title
protected $options;
/**
- * @var LoadBalancer
+ * @var ILoadBalancer
*/
protected $loadBalancer;
protected $nsInfo;
/**
- * @var WatchedItemStore
+ * @var WatchedItemStoreInterface
*/
protected $watchedItems;
* @param Title $oldTitle
* @param Title $newTitle
* @param ServiceOptions|null $options
- * @param LoadBalancer|null $loadBalancer
+ * @param ILoadBalancer|null $loadBalancer
* @param NamespaceInfo|null $nsInfo
* @param WatchedItemStore|null $watchedItems
* @param PermissionManager|null $permMgr
Title $oldTitle,
Title $newTitle,
ServiceOptions $options = null,
- LoadBalancer $loadBalancer = null,
+ ILoadBalancer $loadBalancer = null,
NamespaceInfo $nsInfo = null,
- WatchedItemStore $watchedItems = null,
+ WatchedItemStoreInterface $watchedItems = null,
PermissionManager $permMgr = null,
RepoGroup $repoGroup = null
) {
$status = Status::newFatal( 'movepage-max-pages', $wgMaximumMovedPages );
$perTitleStatus[$oldSubpage->getPrefixedText()] = $status;
$topStatus->merge( $status );
- $topStatus->setOk( true );
+ $topStatus->setOK( true );
break;
}
$mp = new MovePage( $oldSubpage, $newSubpage );
$method = $checkPermissions ? 'moveIfAllowed' : 'move';
+ /** @var Status $status */
$status = $mp->$method( $user, $reason, $createRedirect, $changeTags );
if ( $status->isOK() ) {
$status->setResult( true, $newSubpage->getPrefixedText() );
}
$perTitleStatus[$oldSubpage->getPrefixedText()] = $status;
$topStatus->merge( $status );
- $topStatus->setOk( true );
+ $topStatus->setOK( true );
}
$topStatus->value = $perTitleStatus;
Hooks::run( 'TitleMoveStarting', [ $this->oldTitle, $this->newTitle, $user ] );
- $pageid = $this->oldTitle->getArticleID( Title::GAID_FOR_UPDATE );
+ $pageid = $this->oldTitle->getArticleID( Title::READ_LATEST );
$protected = $this->oldTitle->isProtected();
// Do the actual move; if this fails, it will throw an MWException(!)
'4::oldtitle' => $this->oldTitle->getPrefixedText(),
] );
$logEntry->setRelations( [ 'pr_id' => $logRelationsValues ] );
- $logEntry->setTags( $changeTags );
+ $logEntry->addTags( $changeTags );
$logId = $logEntry->insert();
$logEntry->publish( $logId );
}
# Log the move
$logid = $logEntry->insert();
- $logEntry->setTags( $changeTags );
+ $logEntry->addTags( $changeTags );
$logEntry->publish( $logid );
return $nullRevision;