MediaWiki
1.27.3
|
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. More... | |
move (User $user, $reason, $createRedirect) | |
Protected Member Functions | |
isValidFileMove () | |
Sanity checks for when a file is being moved. More... | |
isValidMoveTarget () | |
Checks if $this can be moved to a given Title. More... | |
Protected Attributes | |
Title | $newTitle |
Title | $oldTitle |
Private Member Functions | |
moveToInternal (User $user, &$nt, $reason= '', $createRedirect=true) | |
Move page to a title which is either a redirect to the source page or nonexistent. More... | |
Handles the backend logic of moving a page from one title to another.
Definition at line 28 of file MovePage.php.
Definition at line 40 of file MovePage.php.
MovePage::checkPermissions | ( | User | $user, |
$reason | |||
) |
Definition at line 45 of file MovePage.php.
References $status, as, User\isAllowed(), EditPage\matchSummarySpamRegex(), Hooks\run(), and wfMergeErrorArrays().
|
protected |
Sanity checks for when a file is being moved.
Definition at line 154 of file MovePage.php.
References $status, File\checkExtensionCompatibility(), NS_FILE, IDBAccessObject\READ_LATEST, 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 86 of file MovePage.php.
References $status, ContentHandler\getLocalizedName(), global, isValidFileMove(), isValidMoveTarget(), NS_FILE, and Hooks\run().
|
protected |
Checks if $this can be moved to a given Title.
Definition at line 181 of file MovePage.php.
References $content, $rev, Revision\newFromTitle(), NS_FILE, IDBAccessObject\READ_LATEST, wfDebug(), and wfLocalFile().
Referenced by isValidMove().
MovePage::move | ( | User | $user, |
$reason, | |||
$createRedirect | |||
) |
User | $user | |
string | $reason | |
bool | $createRedirect |
Definition at line 228 of file MovePage.php.
References $comment, $newTitle, $oldTitle, $params, $status, $type, $user, as, cache, DB_MASTER, DBO_TRX, Title\GAID_FOR_UPDATE, WatchedItemStore\getDefaultInstance(), MWNamespace\getSubject(), global, moveToInternal(), Status\newGood(), NS_CATEGORY, NS_FILE, IDBAccessObject\READ_LATEST, Hooks\run(), Collation\singleton(), RepoGroup\singleton(), use, wfGetDB(), wfLocalFile(), and wfMessage().
Move page to a title which is either a redirect to the source page or nonexistent.
This was basically directly moved from Title, it should be split into smaller functions
User | $user | the User doing the move |
Title | $nt | The page to move to, which should be a redirect or nonexistent |
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 |
MWException |
Definition at line 415 of file MovePage.php.
References $comment, $oldTitle, $user, $wgContLang, DB_MASTER, WikiPage\factory(), ContentHandler\getDefaultModelFor(), ContentHandler\getForTitle(), User\getId(), User\getName(), global, Revision\insertOn(), RequestContext\newExtraneousContext(), LogFormatter\newFromEntry(), Revision\newNullRevision(), NS_CATEGORY, WikiPage\onArticleCreate(), WikiPage\onArticleDelete(), IDBAccessObject\READ_LOCKING, Hooks\run(), wfGetDB(), and wfMessage().
Referenced by move().
|
protected |
Definition at line 38 of file MovePage.php.
Referenced by __construct(), and move().
|
protected |
Definition at line 33 of file MovePage.php.
Referenced by __construct(), move(), and moveToInternal().