MediaWiki REL1_33
|
Handles the backend logic of moving a page from one title to another. More...
Public Member Functions | |
__construct (Title $oldTitle, Title $newTitle) | |
checkPermissions (User $user, $reason) | |
isValidMove () | |
Does various sanity checks that the move is valid. | |
move (User $user, $reason, $createRedirect, array $changeTags=[]) | |
Protected Member Functions | |
isValidFileMove () | |
Sanity checks for when a file is being moved. | |
isValidMoveTarget () | |
Checks if $this can be moved to a given Title. | |
Protected Attributes | |
Title | $newTitle |
Title | $oldTitle |
Private Member Functions | |
moveFile ( $oldTitle, $newTitle) | |
Move a file associated with a page to a new location. | |
moveToInternal (User $user, &$nt, $reason='', $createRedirect=true, array $changeTags=[]) | |
Move page to a title which is either a redirect to the source page or nonexistent. | |
Handles the backend logic of moving a page from one title to another.
Definition at line 32 of file MovePage.php.
Definition at line 44 of file MovePage.php.
MovePage::checkPermissions | ( | User | $user, |
$reason | |||
) |
Definition at line 49 of file MovePage.php.
References $user, as, EditPage\matchSummarySpamRegex(), and wfMergeErrorArrays().
|
protected |
Sanity checks for when a file is being moved.
Definition at line 167 of file MovePage.php.
References $file, File\checkExtensionCompatibility(), NS_FILE, wfLocalFile(), and wfStripIllegalFilenameChars().
Referenced by isValidMove().
MovePage::isValidMove | ( | ) |
Does various sanity checks that the move is valid.
Only things based on the two titles should be checked here.
Definition at line 90 of file MovePage.php.
References $wgContentHandlerUseDB, isValidFileMove(), and NS_FILE.
|
protected |
Checks if $this can be moved to a given Title.
Definition at line 194 of file MovePage.php.
References $content, $file, $rev, Revision\newFromTitle(), NS_FILE, wfDebug(), and wfLocalFile().
User | $user | |
string | $reason | |
bool | $createRedirect | |
string[] | $changeTags | Change tags to apply to the entry in the move log. Caller should perform permission checks with ChangeTags::canAddTagsAccompanyingChange |
Definition at line 243 of file MovePage.php.
References $newTitle, $oldTitle, $params, $res, $type, $user, $wgCategoryCollation, as, DB_MASTER, moveFile(), moveToInternal(), NS_FILE, Collation\singleton(), use, wfGetDB(), and wfMessage().
|
private |
Move a file associated with a page to a new location.
Can also be used to revert after a DB failure.
Title | $oldTitle | Old location to move the file from. |
Title | $newTitle | New location to move the file to. |
Definition at line 434 of file MovePage.php.
References $file, $newTitle, $oldTitle, cache, Title\getPrefixedText(), RepoGroup\singleton(), and wfLocalFile().
Referenced by move().
|
private |
Move page to a title which is either a redirect to the source page or nonexistent.
User | $user | the User doing the move |
Title | $nt | The page to move to, which should be a redirect or non-existent |
string | $reason | The reason for the move |
bool | $createRedirect | Whether to leave a redirect at the old title. Does not check if the user has the suppressredirect right |
string[] | $changeTags | Change tags to apply to the entry in the move log |
MWException |
Definition at line 467 of file MovePage.php.
References $oldTitle, $user, ChangeTags\addTags(), DB_MASTER, ChangeTags\getSoftwareTags(), LogFormatter\newFromEntry(), Revision\newNullRevision(), NS_CATEGORY, plain, wfGetDB(), and wfMessage().
Referenced by move().
|
protected |
Definition at line 42 of file MovePage.php.
Referenced by __construct(), move(), and moveFile().
|
protected |
Definition at line 37 of file MovePage.php.
Referenced by __construct(), move(), moveFile(), and moveToInternal().