}
$toTalk = $toTitle->getTalkPageIfDefined();
+ $repoGroup = MediaWikiServices::getInstance()->getRepoGroup();
if ( $toTitle->getNamespace() == NS_FILE
- && !RepoGroup::singleton()->getLocalRepo()->findFile( $toTitle )
- && MediaWikiServices::getInstance()->getRepoGroup()->findFile( $toTitle )
+ && !$repoGroup->getLocalRepo()->findFile( $toTitle )
+ && $repoGroup->findFile( $toTitle )
) {
if ( !$params['ignorewarnings'] &&
$this->getPermissionManager()->userHasRight( $user, 'reupload-shared' ) ) {
$mp = new MovePage( $fromTitle, $toTitle );
$result =
$mp->moveSubpagesIfAllowed( $this->getUser(), $reason, !$noredirect, $changeTags );
- if ( !$result->isOk() ) {
+ if ( !$result->isOK() ) {
// This means the whole thing failed
return [ 'errors' => $this->getErrorFormatter()->arrayFromStatus( $result ) ];
}