MediaWiki  REL1_19
RandomPage Class Reference

Special page to direct the user to a random page. More...

Inheritance diagram for RandomPage:
Collaboration diagram for RandomPage:

List of all members.

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

Detailed Description

Special page to direct the user to a random page.

Definition at line 30 of file SpecialRandompage.php.


Constructor & Destructor Documentation

RandomPage::__construct ( name = 'Randompage')

Definition at line 35 of file SpecialRandompage.php.

References MWNamespace\getContentNamespaces().

Here is the call graph for this function:


Member Function Documentation

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

Parameters:
$parString 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().

Here is the call graph for this function:

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.

Returns:
String

Definition at line 83 of file SpecialRandompage.php.

References $n, $wgContLang, and wfMsgNoTrans().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

RandomPage::getQueryInfo ( randstr) [protected]

Definition at line 127 of file SpecialRandompage.php.

References isRedirect().

Referenced by selectRandomPageFromDB().

Here is the call graph for this function:

Here is the caller graph for this function:

Choose a random title.

Returns:
Title object (or null if nothing to choose from)

Definition at line 100 of file SpecialRandompage.php.

References $title, Title\makeTitleSafe(), selectRandomPageFromDB(), wfRandom(), and wfRunHooks().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 52 of file SpecialRandompage.php.

Referenced by execute(), and getQueryInfo().

Here is the caller graph for this function:

RandomPage::selectRandomPageFromDB ( randstr,
fname = __METHOD__ 
) [private]

Definition at line 147 of file SpecialRandompage.php.

References $dbr, $fname, $res, getQueryInfo(), and wfGetDB().

Referenced by getRandomTitle().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 44 of file SpecialRandompage.php.

Referenced by execute().

Here is the caller graph for this function:


Member Data Documentation

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.


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