|
MediaWiki
REL1_23
|
Special page to direct the user to a random page. More...


Public Member Functions | |
| __construct ($name= 'Randompage') | |
| execute ($par) | |
| Default execute method Checks user permissions, calls the function given in mFunction. | |
| getNamespaces () | |
| getRandomTitle () | |
| Choose a random title. | |
| isRedirect () | |
| setNamespace ($ns) | |
Protected Member Functions | |
| getGroupName () | |
| Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'. | |
| getQueryInfo ($randstr) | |
Protected Attributes | |
| $extra = array() | |
| $isRedir = false | |
Private Member Functions | |
| getNsList () | |
| Get a comma-delimited list of namespaces we don't have any pages in. | |
| selectRandomPageFromDB ($randstr, $fname=__METHOD__) | |
Private Attributes | |
| $namespaces | |
Special page to direct the user to a random page.
Definition at line 30 of file SpecialRandompage.php.
| RandomPage::__construct | ( | $ | name = 'Randompage' | ) |
Definition at line 35 of file SpecialRandompage.php.
References $name, MWNamespace\getContentNamespaces(), and namespaces.
| RandomPage::execute | ( | $ | subPage | ) |
Default execute method Checks user permissions, calls the function given in mFunction.
This must be overridden by subclasses; it will be made abstract in a future version
| string | null | $subPage |
Reimplemented from SpecialPage.
Definition at line 56 of file SpecialRandompage.php.
References $query, $title, $wgContLang, array(), SpecialPage\getName(), getNsList(), SpecialPage\getOutput(), getRandomTitle(), SpecialPage\getRequest(), global, isRedirect(), namespaces, SpecialPage\setHeaders(), and setNamespace().
| RandomPage::getGroupName | ( | ) | [protected] |
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.
Reimplemented from SpecialPage.
Definition at line 169 of file SpecialRandompage.php.
Definition at line 40 of file SpecialRandompage.php.
References namespaces.
| RandomPage::getNsList | ( | ) | [private] |
Get a comma-delimited list of namespaces we don't have any pages in.
Definition at line 85 of file SpecialRandompage.php.
References $n, $wgContLang, array(), as, global, SpecialPage\msg(), and namespaces.
Referenced by execute().
| RandomPage::getQueryInfo | ( | $ | randstr | ) | [protected] |
Definition at line 134 of file SpecialRandompage.php.
References array(), isRedirect(), and namespaces.
Referenced by selectRandomPageFromDB().
Choose a random title.
Definition at line 103 of file SpecialRandompage.php.
References $title, array(), Title\makeTitleSafe(), namespaces, selectRandomPageFromDB(), wfRandom(), and wfRunHooks().
Referenced by execute().
Definition at line 52 of file SpecialRandompage.php.
Referenced by execute(), and getQueryInfo().
| RandomPage::selectRandomPageFromDB | ( | $ | randstr, |
| $ | fname = __METHOD__ |
||
| ) | [private] |
Definition at line 153 of file SpecialRandompage.php.
References $dbr, $fname, $query, $res, getQueryInfo(), and wfGetDB().
Referenced by getRandomTitle().
| RandomPage::setNamespace | ( | $ | ns | ) |
Definition at line 44 of file SpecialRandompage.php.
References array(), and namespaces.
Referenced by execute().
RandomPage::$extra = array() [protected] |
Definition at line 33 of file SpecialRandompage.php.
RandomPage::$isRedir = false [protected] |
Definition at line 32 of file SpecialRandompage.php.
RandomPage::$namespaces [private] |
Definition at line 31 of file SpecialRandompage.php.