|
MediaWiki
REL1_19
|
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 | |
| 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 MWNamespace\getContentNamespaces().

| RandomPage::execute | ( | $ | par | ) |
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
| $par | String subpage string, if one was specified |
Reimplemented from SpecialPage.
Definition at line 56 of file SpecialRandompage.php.
References $title, $wgContLang, SpecialPage\getName(), getNsList(), SpecialPage\getOutput(), getRandomTitle(), SpecialPage\getRequest(), isRedirect(), SpecialPage\setHeaders(), and setNamespace().

Definition at line 40 of file SpecialRandompage.php.
| RandomPage::getNsList | ( | ) | [private] |
Get a comma-delimited list of namespaces we don't have any pages in.
Definition at line 83 of file SpecialRandompage.php.
References $n, $wgContLang, and wfMsgNoTrans().
Referenced by execute().


| RandomPage::getQueryInfo | ( | $ | randstr | ) | [protected] |
Definition at line 127 of file SpecialRandompage.php.
References isRedirect().
Referenced by selectRandomPageFromDB().


Choose a random title.
Definition at line 100 of file SpecialRandompage.php.
References $title, Title\makeTitleSafe(), 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 147 of file SpecialRandompage.php.
References $dbr, $fname, $res, getQueryInfo(), and wfGetDB().
Referenced by getRandomTitle().


| RandomPage::setNamespace | ( | $ | ns | ) |
Definition at line 44 of file SpecialRandompage.php.
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.