136 parent::__construct(
'Movepage' );
166 $target = $par ?? $request->getText(
'target' );
167 $oldTitleText = $request->getText(
'wpOldTitle', $target );
170 if ( !$this->oldTitle ) {
174 $this->
getOutput()->addBacklinkSubtitle( $this->oldTitle );
176 if ( !$this->oldTitle->exists() ) {
180 $newTitleTextMain = $request->getText(
'wpNewTitleMain' );
181 $newTitleTextNs = $request->getInt(
'wpNewTitleNs', $this->oldTitle->getNamespace() );
184 $newTitleText_bc = $request->getText(
'wpNewTitle' );
185 $this->newTitle = strlen( $newTitleText_bc ) > 0
192 $permErrors = $this->permManager->getPermissionErrors(
'move', $user, $this->oldTitle );
193 if ( count( $permErrors ) ) {
196 $user->spreadAnyEditBlock();
201 $def = !$request->wasPosted();
203 $this->reason = $request->getText(
'wpReason' );
204 $this->moveTalk = $request->getBool(
'wpMovetalk', $def );
205 $this->fixRedirects = $request->getBool(
'wpFixRedirects', $def );
206 $this->leaveRedirect = $request->getBool(
'wpLeaveRedirect', $def );
208 $this->moveSubpages = $request->getBool(
'wpMovesubpages', $def );
209 $this->deleteAndMove = $request->getBool(
'wpDeleteAndMove' );
210 $this->moveOverShared = $request->getBool(
'wpMoveOverSharedFile' );
211 $this->watch = $request->getCheck(
'wpWatch' ) && $user->isRegistered();
213 if ( $request->getRawVal(
'action' ) ==
'submit' && $request->wasPosted()
214 && $user->matchEditToken( $request->getVal(
'wpEditToken' ) )
230 protected function showForm( $err, $isPermError =
false ) {
231 $this->
getSkin()->setRelevantTitle( $this->oldTitle );
234 $out->setPageTitle( $this->
msg(
'move-page', $this->oldTitle->getPrefixedText() ) );
235 $out->addModuleStyles( [
237 'mediawiki.interface.helpers.styles'
239 $out->addModules(
'mediawiki.misc-authed-ooui' );
242 $handlerSupportsRedirects = $this->contentHandlerFactory
243 ->getContentHandler( $this->oldTitle->getContentModel() )
244 ->supportsRedirects();
246 if ( $this->
getConfig()->
get( MainConfigNames::FixDoubleRedirects ) ) {
247 $out->addWikiMsg(
'movepagetext' );
249 $out->addWikiMsg( $handlerSupportsRedirects ?
250 'movepagetext-noredirectfixer' :
251 'movepagetext-noredirectsupport' );
254 if ( $this->oldTitle->getNamespace() ===
NS_USER && !$this->oldTitle->isSubpage() ) {
257 $out->msg(
'moveuserpage-warning' )->parse(),
258 'mw-moveuserpage-warning'
261 } elseif ( $this->oldTitle->getNamespace() ===
NS_CATEGORY ) {
264 $out->msg(
'movecategorypage-warning' )->parse(),
265 'mw-movecategorypage-warning'
278 # Show the current title as a default
279 # when the form is first opened.
281 } elseif ( !count( $err ) ) {
282 # If a title was supplied, probably from the move log revert
283 # link, check for validity. We can then show some diagnostic
284 # information and save a click.
285 $mp = $this->movePageFactory->newMovePage( $this->oldTitle,
$newTitle );
286 $status = $mp->isValidMove();
287 $status->merge( $mp->probablyCanMove( $this->getAuthority() ) );
288 if ( $status->getErrors() ) {
289 $err = $status->getErrorsArray();
293 if ( count( $err ) == 1 && isset( $err[0][0] ) ) {
294 if ( $err[0][0] ==
'articleexists'
295 && $this->permManager->quickUserCan(
'delete', $user,
$newTitle )
304 } elseif ( $err[0][0] ==
'redirectexists' && (
306 $this->permManager->quickUserCan(
'delete-redirect', $user,
$newTitle ) ||
307 $this->permManager->quickUserCan(
'delete', $user,
$newTitle ) )
316 } elseif ( $err[0][0] ==
'file-exists-sharedrepo'
317 && $this->permManager->userHasRight( $user,
'reupload-shared' )
329 $oldTalk = $this->oldTitle->getTalkPage();
330 $oldTitleSubpages = $this->oldTitle->hasSubpages();
331 $oldTitleTalkSubpages = $this->oldTitle->getTalkPage()->hasSubpages();
333 $canMoveSubpage = ( $oldTitleSubpages || $oldTitleTalkSubpages ) &&
334 !count( $this->permManager->getPermissionErrors(
340 # We also want to be able to move assoc. subpage talk-pages even if base page
341 # has no associated talk page, so || with $oldTitleTalkSubpages.
342 $considerTalk = !$this->oldTitle->isTalkPage() &&
344 || ( $oldTitleTalkSubpages && $canMoveSubpage ) );
347 if ( $this->
getConfig()->get( MainConfigNames::FixDoubleRedirects ) ) {
348 $hasRedirects = (bool)
$dbr->selectField(
'redirect',
'1',
350 'rd_namespace' => $this->oldTitle->getNamespace(),
351 'rd_title' => $this->oldTitle->getDBkey(),
354 $hasRedirects =
false;
357 if ( count( $err ) ) {
358 '@phan-var array[] $err';
359 if ( $isPermError ) {
360 $action_desc = $this->
msg(
'action-move' )->plain();
361 $errMsgHtml = $this->
msg(
'permissionserrorstext-withaction',
362 count( $err ), $action_desc )->parseAsBlock();
364 $errMsgHtml = $this->
msg(
'cannotmove', count( $err ) )->parseAsBlock();
367 if ( count( $err ) == 1 ) {
369 $errMsgName = array_shift( $errMsg );
371 if ( $errMsgName ==
'hookaborted' ) {
372 $errMsgHtml .=
"<p>{$errMsg[0]}</p>\n";
374 $errMsgHtml .= $this->
msg( $errMsgName, $errMsg )->parseAsBlock();
379 foreach ( $err as $errMsg ) {
380 if ( $errMsg[0] ==
'hookaborted' ) {
381 $errStr[] = $errMsg[1];
383 $errMsgName = array_shift( $errMsg );
384 $errStr[] = $this->
msg( $errMsgName, $errMsg )->parse();
388 $errMsgHtml .=
'<ul><li>' . implode(
"</li>\n<li>", $errStr ) .
"</li></ul>\n";
393 if ( $this->restrictionStore->isProtected( $this->oldTitle,
'move' ) ) {
394 # Is the title semi-protected?
395 if ( $this->restrictionStore->isSemiProtected( $this->oldTitle,
'move' ) ) {
396 $noticeMsg =
'semiprotectedpagemovewarning';
398 # Then it must be protected based on static groups (regular)
399 $noticeMsg =
'protectedpagemovewarning';
406 [
'lim' => 1,
'msgKey' => $noticeMsg ]
413 $immovableNamespaces = [];
414 foreach ( array_keys( $this->
getLanguage()->getNamespaces() ) as $nsId ) {
415 if ( !$this->nsInfo->isMovable( $nsId ) ) {
416 $immovableNamespaces[] = $nsId;
423 $fields[] =
new OOUI\FieldLayout(
424 new MediaWiki\Widget\ComplexTitleInputWidget( [
425 'id' =>
'wpNewTitle',
427 'id' =>
'wpNewTitleNs',
428 'name' =>
'wpNewTitleNs',
430 'exclude' => $immovableNamespaces,
433 'id' =>
'wpNewTitleMain',
434 'name' =>
'wpNewTitleMain',
437 'suggestions' =>
false,
442 'label' => $this->msg(
'newtitle' )->text(),
450 $fields[] =
new OOUI\FieldLayout(
451 new OOUI\TextInputWidget( [
452 'name' =>
'wpReason',
456 'value' => $this->reason,
459 'label' => $this->
msg(
'movereason' )->text(),
464 if ( $considerTalk ) {
465 $fields[] =
new OOUI\FieldLayout(
466 new OOUI\CheckboxInputWidget( [
467 'name' =>
'wpMovetalk',
468 'id' =>
'wpMovetalk',
470 'selected' => $this->moveTalk,
473 'label' => $this->
msg(
'movetalk' )->text(),
474 'help' =>
new OOUI\HtmlSnippet( $this->
msg(
'movepagetalktext' )->parseAsBlock() ),
475 'helpInline' =>
true,
477 'id' =>
'wpMovetalk-field',
482 if ( $this->permManager->userHasRight( $user,
'suppressredirect' ) ) {
483 if ( $handlerSupportsRedirects ) {
490 $fields[] =
new OOUI\FieldLayout(
491 new OOUI\CheckboxInputWidget( [
492 'name' =>
'wpLeaveRedirect',
493 'id' =>
'wpLeaveRedirect',
495 'selected' => $isChecked,
496 'disabled' => $isDisabled,
499 'label' => $this->
msg(
'move-leave-redirect' )->text(),
505 if ( $hasRedirects ) {
506 $fields[] =
new OOUI\FieldLayout(
507 new OOUI\CheckboxInputWidget( [
508 'name' =>
'wpFixRedirects',
509 'id' =>
'wpFixRedirects',
511 'selected' => $this->fixRedirects,
514 'label' => $this->
msg(
'fix-double-redirects' )->text(),
520 if ( $canMoveSubpage ) {
521 $maximumMovedPages = $this->
getConfig()->get( MainConfigNames::MaximumMovedPages );
522 $fields[] =
new OOUI\FieldLayout(
523 new OOUI\CheckboxInputWidget( [
524 'name' =>
'wpMovesubpages',
525 'id' =>
'wpMovesubpages',
527 'selected' => $this->moveSubpages,
530 'label' =>
new OOUI\HtmlSnippet(
532 ( $this->oldTitle->hasSubpages()
534 :
'move-talk-subpages' )
535 )->numParams( $maximumMovedPages )->params( $maximumMovedPages )->parse()
542 # Don't allow watching if user is not logged in
543 if ( $user->isRegistered() ) {
544 $watchChecked = ( $this->watch || $this->userOptionsLookup->getBoolOption( $user,
'watchmoves' )
545 || $this->watchlistManager->isWatched( $user, $this->oldTitle ) );
546 $fields[] =
new OOUI\FieldLayout(
547 new OOUI\CheckboxInputWidget( [
549 'id' =>
'watch', # ew
551 'selected' => $watchChecked,
554 'label' => $this->
msg(
'move-watch' )->text(),
562 $hiddenFields .=
Html::hidden(
'wpMoveOverSharedFile',
'1' );
566 $fields[] =
new OOUI\FieldLayout(
567 new OOUI\CheckboxInputWidget( [
568 'name' =>
'wpDeleteAndMove',
569 'id' =>
'wpDeleteAndMove',
573 'label' => $this->
msg(
'delete_and_move_confirm' )->text(),
579 $fields[] =
new OOUI\FieldLayout(
580 new OOUI\ButtonInputWidget( [
582 'value' => $this->
msg(
'movepagebtn' )->text(),
583 'label' => $this->
msg(
'movepagebtn' )->text(),
584 'flags' => [
'primary',
'progressive' ],
592 $fieldset =
new OOUI\FieldsetLayout( [
593 'label' => $this->
msg(
'move-page-legend' )->text(),
594 'id' =>
'mw-movepage-table',
598 $form =
new OOUI\FormLayout( [
600 'action' => $this->
getPageTitle()->getLocalURL(
'action=submit' ),
603 $form->appendContent(
605 new OOUI\HtmlSnippet(
607 Html::hidden(
'wpOldTitle', $this->oldTitle->getPrefixedText() ) .
613 new OOUI\PanelLayout( [
614 'classes' => [
'movepage-wrapper' ],
629 if ( $user->pingLimiter(
'move' ) ) {
636 # don't allow moving to pages with # in
637 if ( !$nt || $nt->hasFragment() ) {
638 $this->
showForm( [ [
'badtitletext' ] ] );
643 # Show a warning if the target file exists on a shared repo
644 if ( $nt->getNamespace() ===
NS_FILE
645 && !( $this->moveOverShared && $this->permManager->userHasRight( $user,
'reupload-shared' ) )
646 && !$this->repoGroup->getLocalRepo()->findFile( $nt )
647 && $this->repoGroup->findFile( $nt )
649 $this->
showForm( [ [
'file-exists-sharedrepo' ] ] );
654 # Delete to make way if requested
655 if ( $this->deleteAndMove ) {
656 $redir2 = $nt->isSingleRevRedirect();
658 $permErrors = $this->permManager->getPermissionErrors(
659 $redir2 ?
'delete-redirect' :
'delete',
662 if ( count( $permErrors ) ) {
664 if ( count( $this->permManager->getPermissionErrors(
'delete', $user, $nt ) ) ) {
667 $this->
showForm( $permErrors,
true );
677 $this->
showForm( $permErrors,
true );
682 $page = $this->wikiPageFactory->newFromTitle( $nt );
685 if ( $page->isBatchedDelete( 5 ) ) {
686 $this->
showForm( [ [
'movepage-delete-first' ] ] );
691 $reason = $this->
msg(
'delete_and_move_reason', $ot )->inContentLanguage()->text();
694 if ( $nt->getNamespace() ===
NS_FILE ) {
695 $file = $this->repoGroup->getLocalRepo()->newFile( $nt );
696 $file->load( File::READ_LATEST );
697 if (
$file->exists() ) {
703 $deletionLog = $redir2 ?
'delete_redir2' :
'delete';
704 $deleteStatus = $page->doDeleteArticleReal(
705 $reason, $user,
false,
null, $error,
706 null, [], $deletionLog
708 if ( !$deleteStatus->isGood() ) {
709 $this->
showForm( $deleteStatus->getErrorsArray() );
715 $handler = $this->contentHandlerFactory->getContentHandler( $ot->getContentModel() );
717 if ( !$handler->supportsRedirects() ) {
718 $createRedirect =
false;
719 } elseif ( $this->permManager->userHasRight( $user,
'suppressredirect' ) ) {
722 $createRedirect =
true;
725 # Do the actual move.
726 $mp = $this->movePageFactory->newMovePage( $ot, $nt );
728 # check whether the requested actions are permitted / possible
729 $userPermitted = $mp->authorizeMove( $this->
getAuthority(), $this->reason )->isOK();
730 if ( $ot->isTalkPage() || $nt->isTalkPage() ) {
731 $this->moveTalk =
false;
733 if ( $this->moveSubpages ) {
734 $this->moveSubpages = $this->permManager->userCan(
'move-subpages', $user, $ot );
737 $status = $mp->moveIfAllowed( $this->
getAuthority(), $this->reason, $createRedirect );
738 if ( !$status->isOK() ) {
739 $this->
showForm( $status->getErrorsArray(), !$userPermitted );
743 if ( $this->
getConfig()->
get( MainConfigNames::FixDoubleRedirects ) &&
744 $this->fixRedirects ) {
749 $out->setPageTitle( $this->
msg(
'pagemovedsub' ) );
755 [
'id' =>
'movepage-oldlink' ],
756 [
'redirect' =>
'no' ]
761 [
'id' =>
'movepage-newlink' ]
763 $oldText = $ot->getPrefixedText();
764 $newText = $nt->getPrefixedText();
766 if ( $status->getValue()[
'redirectRevision'] !==
null ) {
767 $msgName =
'movepage-moved-redirect';
769 $msgName =
'movepage-moved-noredirect';
772 $out->addHTML( $this->
msg(
'movepage-moved' )->rawParams( $oldLink,
773 $newLink )->params( $oldText, $newText )->parseAsBlock() );
774 $out->addWikiMsg( $msgName );
776 $this->
getHookRunner()->onSpecialMovepageAfterMove( $this, $ot, $nt );
794 if ( $this->moveSubpages && (
795 $this->nsInfo->hasSubpages( $nt->getNamespace() ) || (
797 && $this->nsInfo->hasSubpages( $nt->getTalkPage()->getNamespace() )
801 'page_title' .
$dbr->buildLike( $ot->getDBkey() .
'/',
$dbr->anyString() )
802 .
' OR page_title = ' .
$dbr->addQuotes( $ot->getDBkey() )
804 $conds[
'page_namespace'] = [];
805 if ( $this->nsInfo->hasSubpages( $nt->getNamespace() ) ) {
806 $conds[
'page_namespace'][] = $ot->getNamespace();
808 if ( $this->moveTalk &&
809 $this->nsInfo->hasSubpages( $nt->getTalkPage()->getNamespace() )
811 $conds[
'page_namespace'][] = $ot->getTalkPage()->getNamespace();
813 } elseif ( $this->moveTalk ) {
815 'page_namespace' => $ot->getTalkPage()->getNamespace(),
816 'page_title' => $ot->getDBkey()
824 if ( $conds !==
null ) {
826 $dbr->select(
'page',
827 [
'page_id',
'page_namespace',
'page_title' ],
836 foreach ( $extraPages as $oldSubpage ) {
837 if ( $ot->equals( $oldSubpage ) || $nt->equals( $oldSubpage ) ) {
838 # Already did this one.
842 $newPageName = preg_replace(
843 '#^' . preg_quote( $ot->getDBkey(),
'#' ) .
'#',
845 $oldSubpage->getDBkey()
848 if ( $oldSubpage->isSubpage() && ( $ot->isTalkPage() xor $nt->isTalkPage() ) ) {
850 $newNs = $nt->getNamespace();
851 } elseif ( $oldSubpage->isTalkPage() ) {
852 $newNs = $nt->getTalkPage()->getNamespace();
854 $newNs = $nt->getSubjectPage()->getNamespace();
857 # T16385: we need makeTitleSafe because the new page names may
858 # be longer than 255 characters.
860 if ( !$newSubpage ) {
862 $extraOutput[] = $this->
msg(
'movepage-page-unmoved' )->rawParams( $oldLink )
867 $mp = $this->movePageFactory->newMovePage( $oldSubpage, $newSubpage );
868 # This was copy-pasted from Renameuser, bleh.
869 if ( $newSubpage->exists() && !$mp->isValidMove()->isOK() ) {
871 $extraOutput[] = $this->
msg(
'movepage-page-exists' )->rawParams( $link )->escaped();
873 $status = $mp->moveIfAllowed( $this->
getAuthority(), $this->reason, $createRedirect );
875 if ( $status->isOK() ) {
876 if ( $this->fixRedirects ) {
883 [
'redirect' =>
'no' ]
887 $extraOutput[] = $this->
msg(
'movepage-page-moved' )
888 ->rawParams( $oldLink, $newLink )->escaped();
892 $this->
getConfig()->get( MainConfigNames::MaximumMovedPages );
893 if ( $count >= $maximumMovedPages ) {
894 $extraOutput[] = $this->
msg(
'movepage-max-pages' )
895 ->numParams( $maximumMovedPages )->escaped();
901 $extraOutput[] = $this->
msg(
'movepage-page-unmoved' )
902 ->rawParams( $oldLink, $newLink )->escaped();
907 if ( $extraOutput !== [] ) {
908 $out->addHTML(
"<ul>\n<li>" . implode(
"</li>\n<li>", $extraOutput ) .
"</li>\n</ul>" );
911 # Deal with watches (we don't watch subpages)
912 $this->watchlistManager->setWatch( $this->watch, $this->
getAuthority(), $ot );
913 $this->watchlistManager->setWatch( $this->watch, $this->
getAuthority(), $nt );
917 $moveLogPage =
new LogPage(
'move' );
919 $out->addHTML(
Xml::element(
'h2',
null, $moveLogPage->getName()->text() ) );
930 $nsHasSubpages = $this->nsInfo->hasSubpages(
$title->getNamespace() );
931 $subpages =
$title->getSubpages();
932 $count = $subpages instanceof
TitleArray ? $subpages->count() : 0;
934 $titleIsTalk =
$title->isTalkPage();
935 $subpagesTalk =
$title->getTalkPage()->getSubpages();
936 $countTalk = $subpagesTalk instanceof
TitleArray ? $subpagesTalk->count() : 0;
937 $totalCount = $count + $countTalk;
939 if ( !$nsHasSubpages && $countTalk == 0 ) {
945 [
'movesubpage', ( $titleIsTalk ? $count : $totalCount ) ]
948 if ( $nsHasSubpages ) {
952 if ( !$titleIsTalk && $countTalk > 0 ) {
953 $this->
showSubpagesList( $subpagesTalk, $countTalk,
'movesubpagetalktext' );
957 private function showSubpagesList( $subpages, $pagecount, $wikiMsg, $noSubpageMsg =
false ) {
961 if ( $pagecount == 0 && $noSubpageMsg ) {
962 $out->addWikiMsg(
'movenosubpage' );
966 $out->addWikiMsg( $wikiMsg, $this->
getLanguage()->formatNum( $pagecount ) );
967 $out->addHTML(
"<ul>\n" );
969 $linkBatch = $this->linkBatchFactory->newLinkBatch( $subpages );
970 $linkBatch->setCaller( __METHOD__ );
971 $linkBatch->execute();
974 foreach ( $subpages as $subpage ) {
976 $out->addHTML(
"<li>$link</li>\n" );
978 $out->addHTML(
"</ul>\n" );
990 return $this->
prefixSearchString( $search, $limit, $offset, $this->searchEngineFactory );
static addCallableUpdate( $callable, $stage=self::POSTSEND, $dbw=null)
Add an update to the pending update queue that invokes the specified callback when run.
static fixRedirects( $reason, $redirTitle)
Insert jobs into the job queue to fix redirects to the given title.
An error page which can definitely be safely rendered using the OutputPage.
static warningBox( $html, $className='')
Return a warning box.
static errorBox( $html, $heading='', $className='')
Return an error box.
static hidden( $name, $value, array $attribs=[])
Convenience function to produce an input element with type=hidden.
static showLogExtract(&$out, $types=[], $page='', $user='', $param=[])
Show log extract.
Class to simplify the use of log pages.
A class containing constants representing the names of configuration variables.
Service for creating WikiPage objects.
A special page that allows users to change page titles.
PermissionManager $permManager
execute( $par)
Default execute method Checks user permissions.
RestrictionStore $restrictionStore
IContentHandlerFactory $contentHandlerFactory
showSubpages( $title)
Show subpages of the page being moved.
doesWrites()
Indicates whether this special page may perform database writes.
WikiPageFactory $wikiPageFactory
WatchlistManager $watchlistManager
ILoadBalancer $loadBalancer
showSubpagesList( $subpages, $pagecount, $wikiMsg, $noSubpageMsg=false)
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
LinkBatchFactory $linkBatchFactory
__construct(MovePageFactory $movePageFactory, PermissionManager $permManager, UserOptionsLookup $userOptionsLookup, ILoadBalancer $loadBalancer, IContentHandlerFactory $contentHandlerFactory, NamespaceInfo $nsInfo, LinkBatchFactory $linkBatchFactory, RepoGroup $repoGroup, WikiPageFactory $wikiPageFactory, SearchEngineFactory $searchEngineFactory, WatchlistManager $watchlistManager, RestrictionStore $restrictionStore)
showForm( $err, $isPermError=false)
Show the form.
SearchEngineFactory $searchEngineFactory
string $reason
Text input.
prefixSearchSubpages( $search, $limit, $offset)
Return an array of subpages beginning with $search that this special page will accept.
UserOptionsLookup $userOptionsLookup
MovePageFactory $movePageFactory
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Show an error when a user tries to do something they do not have the necessary permissions for.
Prioritized list of file repositories.
Factory class for SearchEngine.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
getUser()
Shortcut to get the User executing this instance.
getSkin()
Shortcut to get the skin being used for this instance.
LinkRenderer null $linkRenderer
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getAuthority()
Shortcut to get the Authority executing this instance.
getConfig()
Shortcut to get main config object.
getRequest()
Get the WebRequest being used for this instance.
checkReadOnly()
If the wiki is currently in readonly mode, throws a ReadOnlyError.
prefixSearchString( $search, $limit, $offset, SearchEngineFactory $searchEngineFactory=null)
Perform a regular substring search for prefixSearchSubpages.
getPageTitle( $subpage=false)
Get a self-referential title object.
useTransactionalTimeLimit()
Call wfTransactionalTimeLimit() if this request was POSTed.
getLanguage()
Shortcut to get user's language.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
static escapeRegexReplacement( $string)
Escape a string to make it suitable for inclusion in a preg_replace() replacement parameter.
Show an error when the user hits a rate limit.
The TitleArray class only exists to provide the newFromResult method at pre- sent.
static newFromResult( $res)
getNamespace()
Get the namespace index, i.e.
static makeName( $ns, $title, $fragment='', $interwiki='', $canonicalNamespace=false)
Make a prefixed DB key from a DB key and a namespace index.
getText()
Get the text form (spaces not underscores) of the main part.
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
getPrefixedText()
Get the prefixed title with spaces.
Shortcut to construct a special page which is unlisted by default.
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
Service for page rename actions.
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.