|
MediaWiki master
|
Handles the backend logic of moving a page from one title to another. More...

Public Member Functions | |
| __construct (PageIdentity $oldTitle, PageIdentity $newTitle, ServiceOptions $options, IConnectionProvider $dbProvider, NamespaceInfo $nsInfo, WatchedItemStoreInterface $watchedItems, RepoGroup $repoGroup, IContentHandlerFactory $contentHandlerFactory, BagOStuff $recentMovesCache, RevisionStore $revisionStore, SpamChecker $spamChecker, HookContainer $hookContainer, DomainEventDispatcher $eventDispatcher, WikiPageFactory $wikiPageFactory, UserFactory $userFactory, UserEditTracker $userEditTracker, MovePageFactory $movePageFactory, CollationFactory $collationFactory, PageUpdaterFactory $pageUpdaterFactory, RestrictionStore $restrictionStore, DeletePageFactory $deletePageFactory, LogFormatterFactory $logFormatterFactory, WriteDuplicator $linkWriteDuplicator) | |
| authorizeMove (Authority $performer, ?string $reason=null) | |
| Authorize the move by $performer. | |
| checkPermissions (Authority $performer, $reason) | |
| Check if the user is allowed to perform the move. | |
| isValidMove () | |
| Does various checks that the move is valid. | |
| move (UserIdentity $user, $reason=null, $createRedirect=true, array $changeTags=[]) | |
| Move a page without taking user permissions into account. | |
| moveIfAllowed (Authority $performer, $reason=null, $createRedirect=true, array $changeTags=[]) | |
| Same as move(), but with permissions checks. | |
| moveSubpages (UserIdentity $user, $reason=null, $createRedirect=true, array $changeTags=[]) | |
| Move the source page's subpages to be subpages of the target page, without checking user permissions. | |
| moveSubpagesIfAllowed (Authority $performer, $reason=null, $createRedirect=true, array $changeTags=[]) | |
| Move the source page's subpages to be subpages of the target page, with user permission checks. | |
| probablyCanMove (Authority $performer, ?string $reason=null) | |
| Check whether $performer can execute the move. | |
| setMaximumMovedPages ( $max) | |
| Override $wgMaximumMovedPages. | |
Public Attributes | |
| CollationFactory | $collationFactory |
| const | CONSTRUCTOR_OPTIONS |
Protected Member Functions | |
| isValidFileMove () | |
| Checks for when a file is being moved. | |
| isValidMoveTarget () | |
| Checks if $this can be moved to a given Title. | |
Protected Attributes | |
| IConnectionProvider | $dbProvider |
| Title | $newTitle |
| NamespaceInfo | $nsInfo |
| Title | $oldTitle |
| ServiceOptions | $options |
| RepoGroup | $repoGroup |
| WatchedItemStoreInterface | $watchedItems |
Handles the backend logic of moving a page from one title to another.
Definition at line 57 of file MovePage.php.
| MediaWiki\Page\MovePage::__construct | ( | PageIdentity | $oldTitle, |
| PageIdentity | $newTitle, | ||
| ServiceOptions | $options, | ||
| IConnectionProvider | $dbProvider, | ||
| NamespaceInfo | $nsInfo, | ||
| WatchedItemStoreInterface | $watchedItems, | ||
| RepoGroup | $repoGroup, | ||
| IContentHandlerFactory | $contentHandlerFactory, | ||
| BagOStuff | $recentMovesCache, | ||
| RevisionStore | $revisionStore, | ||
| SpamChecker | $spamChecker, | ||
| HookContainer | $hookContainer, | ||
| DomainEventDispatcher | $eventDispatcher, | ||
| WikiPageFactory | $wikiPageFactory, | ||
| UserFactory | $userFactory, | ||
| UserEditTracker | $userEditTracker, | ||
| MovePageFactory | $movePageFactory, | ||
| CollationFactory | $collationFactory, | ||
| PageUpdaterFactory | $pageUpdaterFactory, | ||
| RestrictionStore | $restrictionStore, | ||
| DeletePageFactory | $deletePageFactory, | ||
| LogFormatterFactory | $logFormatterFactory, | ||
| WriteDuplicator | $linkWriteDuplicator ) |
Definition at line 97 of file MovePage.php.
References MediaWiki\Page\MovePage\$collationFactory, MediaWiki\Page\MovePage\$dbProvider, MediaWiki\Page\MovePage\$newTitle, MediaWiki\Page\MovePage\$nsInfo, MediaWiki\Page\MovePage\$oldTitle, MediaWiki\Page\MovePage\$options, MediaWiki\Page\MovePage\$repoGroup, MediaWiki\Page\MovePage\$watchedItems, and MediaWiki\MainConfigNames\MaximumMovedPages.
| MediaWiki\Page\MovePage::authorizeMove | ( | Authority | $performer, |
| ?string | $reason = null ) |
Authorize the move by $performer.
self::probablyCanMove instead.| Authority | $performer | |
| string | null | $reason |
Definition at line 232 of file MovePage.php.
References MediaWiki\Permissions\Authority\authorizeWrite().
| MediaWiki\Page\MovePage::checkPermissions | ( | Authority | $performer, |
| $reason ) |
Check if the user is allowed to perform the move.
| Authority | $performer | |
| string | null | $reason | To check against summary spam regex. Set to null to skip the check, for instance to display errors preemptively before the user has filled in a summary. |
Definition at line 251 of file MovePage.php.
References MediaWiki\Permissions\Authority\definitelyCan().
|
protected |
Checks for when a file is being moved.
Definition at line 350 of file MovePage.php.
References NS_FILE, and wfStripIllegalFilenameChars().
| MediaWiki\Page\MovePage::isValidMove | ( | ) |
Does various checks that the move is valid.
Only things based on the two titles should be checked here.
Definition at line 269 of file MovePage.php.
References NS_FILE, and wfMessage().
|
protected |
Checks if $this can be moved to a given Title.
Definition at line 393 of file MovePage.php.
| MediaWiki\Page\MovePage::move | ( | UserIdentity | $user, |
| $reason = null, | |||
| $createRedirect = true, | |||
| array | $changeTags = [] ) |
Move a page without taking user permissions into account.
Only checks if the move is itself invalid, e.g., trying to move a special page or trying to move a page onto one that already exists.
| UserIdentity | $user | |
| string | null | $reason | |
| bool | null | $createRedirect | |
| string[] | $changeTags | Change tags to apply to the entry in the move log |
moveToInternal() Definition at line 451 of file MovePage.php.
| MediaWiki\Page\MovePage::moveIfAllowed | ( | Authority | $performer, |
| $reason = null, | |||
| $createRedirect = true, | |||
| array | $changeTags = [] ) |
Same as move(), but with permissions checks.
| Authority | $performer | |
| string | null | $reason | |
| bool | $createRedirect | Ignored if user doesn't have suppressredirect permission |
| string[] | $changeTags | Change tags to apply to the entry in the move log |
moveToInternal() Definition at line 473 of file MovePage.php.
References MediaWiki\Permissions\Authority\getUser(), and MediaWiki\Permissions\Authority\isAllowed().
| MediaWiki\Page\MovePage::moveSubpages | ( | UserIdentity | $user, |
| $reason = null, | |||
| $createRedirect = true, | |||
| array | $changeTags = [] ) |
Move the source page's subpages to be subpages of the target page, without checking user permissions.
The caller is responsible for moving the source page itself. We will still not do moves that are inherently not allowed, nor will we move more than $wgMaximumMovedPages.
| UserIdentity | $user | |
| string | null | $reason | The reason for the move |
| bool | null | $createRedirect | Whether to create redirects from the old subpages to the new ones |
| string[] | $changeTags | Applied to entries in the move log and redirect page revision |
moveSubpagesInternal() Definition at line 510 of file MovePage.php.
| MediaWiki\Page\MovePage::moveSubpagesIfAllowed | ( | Authority | $performer, |
| $reason = null, | |||
| $createRedirect = true, | |||
| array | $changeTags = [] ) |
Move the source page's subpages to be subpages of the target page, with user permission checks.
The caller is responsible for moving the source page itself.
| Authority | $performer | |
| string | null | $reason | The reason for the move |
| bool | null | $createRedirect | Whether to create redirects from the old subpages to the new ones. Ignored if the user doesn't have the 'suppressredirect' right. |
| string[] | $changeTags | Applied to entries in the move log and redirect page revision |
moveSubpagesInternal() Definition at line 533 of file MovePage.php.
References MediaWiki\Permissions\Authority\authorizeWrite().
| MediaWiki\Page\MovePage::probablyCanMove | ( | Authority | $performer, |
| ?string | $reason = null ) |
Check whether $performer can execute the move.
self::authorizeMove instead.| Authority | $performer | |
| string | null | $reason |
Definition at line 211 of file MovePage.php.
References MediaWiki\Permissions\Authority\probablyCan().
| MediaWiki\Page\MovePage::setMaximumMovedPages | ( | $max | ) |
Override $wgMaximumMovedPages.
| int | $max | The maximum number of subpages to move, or -1 for no limit |
Definition at line 155 of file MovePage.php.
| CollationFactory MediaWiki\Page\MovePage::$collationFactory |
Definition at line 76 of file MovePage.php.
Referenced by MediaWiki\Page\MovePage\__construct().
|
protected |
Definition at line 62 of file MovePage.php.
Referenced by MediaWiki\Page\MovePage\__construct().
|
protected |
Definition at line 60 of file MovePage.php.
Referenced by MediaWiki\Page\MovePage\__construct().
|
protected |
Definition at line 63 of file MovePage.php.
Referenced by MediaWiki\Page\MovePage\__construct().
|
protected |
Definition at line 59 of file MovePage.php.
Referenced by MediaWiki\Page\MovePage\__construct().
|
protected |
Definition at line 61 of file MovePage.php.
Referenced by MediaWiki\Page\MovePage\__construct().
|
protected |
Definition at line 65 of file MovePage.php.
Referenced by MediaWiki\Page\MovePage\__construct().
|
protected |
Definition at line 64 of file MovePage.php.
Referenced by MediaWiki\Page\MovePage\__construct().
| const MediaWiki\Page\MovePage::CONSTRUCTOR_OPTIONS |
Definition at line 89 of file MovePage.php.