Inherits SpecialPage.
Inherited by SpecialRandomredirect.
Public Member Functions | |
| __construct ($name= 'Randompage') | |
| getNamespaces () | |
| setNamespace ($ns) | |
| isRedirect () | |
| execute ($par) | |
| Default execute method Checks user permissions, calls the function given in mFunction. | |
| getRandomTitle () | |
| Choose a random title. | |
| addExtraSQL () | |
Protected Attributes | |
| $isRedir = false | |
| $extra = array() | |
Private Member Functions | |
| getNsList () | |
| Get a comma-delimited list of namespaces we don't have any pages in. | |
| selectRandomPageFromDB ($randstr) | |
Private Attributes | |
| $namespaces | |
Definition at line 10 of file SpecialRandompage.php.
| RandomPage::__construct | ( | $ | name = 'Randompage' |
) |
| RandomPage::addExtraSQL | ( | ) |
| RandomPage::execute | ( | $ | par | ) |
Default execute method Checks user permissions, calls the function given in mFunction.
This may be overridden by subclasses.
Reimplemented from SpecialPage.
Definition at line 35 of file SpecialRandompage.php.
References $title, $wgContLang, $wgOut, getNsList(), getRandomTitle(), isRedirect(), SpecialPage::setHeaders(), and setNamespace().
| RandomPage::getNamespaces | ( | ) |
Definition at line 21 of file SpecialRandompage.php.
| RandomPage::getNsList | ( | ) | [private] |
Get a comma-delimited list of namespaces we don't have any pages in.
Definition at line 60 of file SpecialRandompage.php.
References $n, $wgContLang, and wfMsgForContent().
Referenced by execute().
| RandomPage::getRandomTitle | ( | ) |
Choose a random title.
Definition at line 77 of file SpecialRandompage.php.
References $title, Title::makeTitleSafe(), selectRandomPageFromDB(), wfRandom(), and wfRunHooks().
Referenced by execute().
| RandomPage::isRedirect | ( | ) |
Definition at line 31 of file SpecialRandompage.php.
Referenced by execute(), and selectRandomPageFromDB().
| RandomPage::selectRandomPageFromDB | ( | $ | randstr | ) | [private] |
Definition at line 101 of file SpecialRandompage.php.
References $dbr, $extra, $page, $res, $wgExtraRandompageSQL, addExtraSQL(), isRedirect(), and wfGetDB().
Referenced by getRandomTitle().
| RandomPage::setNamespace | ( | $ | ns | ) |
RandomPage::$extra = array() [protected] |
RandomPage::$isRedir = false [protected] |
Definition at line 12 of file SpecialRandompage.php.
RandomPage::$namespaces [private] |
Definition at line 11 of file SpecialRandompage.php.
1.5.9