MediaWiki  master
RedirectSpecialArticle Class Reference

SpecialMypage, SpecialMytalk and SpecialMycontributions special pages are used to get user independant links pointing to the user page, talk page and list of contributions. More...

Inheritance diagram for RedirectSpecialArticle:
Collaboration diagram for RedirectSpecialArticle:

List of all members.

Public Member Functions

 __construct ($name)

Detailed Description

SpecialMypage, SpecialMytalk and SpecialMycontributions special pages are used to get user independant links pointing to the user page, talk page and list of contributions.

This can let us cache a single copy of any generated content for all users. Superclass for any RedirectSpecialPage which redirects the user to a particular article (as opposed to user contributions, logs, etc.).

For security reasons these special pages are restricted to pass on the following subset of GET parameters to the target page while removing all others:

  • useskin, uselang, printable: to alter the appearance of the resulting page
  • redirect: allows viewing one's user page or talk page even if it is a redirect.
  • rdfrom: allows redirecting to one's user page or talk page from an external wiki with the "Redirect from..." notice.
  • preloadtitle: Can be used to provide a default section title for a preloaded new comment on one's own talk page.
  • summary : Can be used to provide a default edit summary for a preloaded edit to one's own user page or talk page.
  • preview: Allows showing/hiding preview on first edit regardless of user preference, useful for preloaded edits where you know preview wouldn't be useful.
  • internaledit, externaledit, mode: Allows forcing the use of the internal/external editor, e.g. to force the internal editor for short/simple preloaded edits.
  • debug: determines whether the debug parameter is passed to load.php, which disables reformatting and allows scripts to be debugged. Useful when debugging scripts that manipulate one's own user page or talk page.
Hook extension:
Extensions can add to the redirect parameters list by using the hook RedirectSpecialArticleRedirectParams

This hook allows extensions which add GET parameters like FlaggedRevs to retain those parameters when redirecting using special pages.

Hook extension example:
        $wgHooks['RedirectSpecialArticleRedirectParams'][] =
                'MyExtensionHooks::onRedirectSpecialArticleRedirectParams';
        public static function onRedirectSpecialArticleRedirectParams( &$redirectParams ) {
                $redirectParams[] = 'stable';
                return true;
        }

Definition at line 1203 of file SpecialPage.php.


Constructor & Destructor Documentation

Definition at line 1204 of file SpecialPage.php.

References $name, action, array(), edits, in, options(), settings, some, user, and wfRunHooks().


The documentation for this class was generated from the following file: