RandomPage Class Reference
[SpecialPage]

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

Inherits SpecialPage.

Inherited by SpecialRandomredirect.

List of all members.

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.

Private Member Functions

 selectRandomPageFromDB ($randstr)

Private Attributes

 $namespaces


Detailed Description

Special page to direct the user to a random page.

Author:
Rob Church <robchur@gmail.com>, Ilmari Karonen GNU General Public Licence 2.0 or later

Definition at line 10 of file SpecialRandompage.php.


Constructor & Destructor Documentation

RandomPage::__construct ( name = 'Randompage'  ) 

Definition at line 13 of file SpecialRandompage.php.

References $name, and $wgContentNamespaces.


Member Function Documentation

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 36 of file SpecialRandompage.php.

References $title, $wgContLang, $wgOut, getRandomTitle(), isRedirect(), SpecialPage::setHeaders(), and setNamespace().

RandomPage::getNamespaces (  ) 

Definition at line 21 of file SpecialRandompage.php.

RandomPage::getRandomTitle (  ) 

Choose a random title.

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

Definition at line 59 of file SpecialRandompage.php.

References $row, Title::makeTitleSafe(), selectRandomPageFromDB(), and wfRandom().

Referenced by execute().

RandomPage::isRedirect (  ) 

Reimplemented in SpecialRandomredirect.

Definition at line 32 of file SpecialRandompage.php.

Referenced by execute(), and selectRandomPageFromDB().

RandomPage::selectRandomPageFromDB ( randstr  )  [private]

Definition at line 79 of file SpecialRandompage.php.

References $dbr, $fname, $ns, $page, $res, $sql, $wgExtraRandompageSQL, isRedirect(), and wfGetDB().

Referenced by getRandomTitle().

RandomPage::setNamespace ( ns  ) 

Definition at line 25 of file SpecialRandompage.php.

References $ns.

Referenced by execute().


Member Data Documentation

RandomPage::$namespaces [private]

Definition at line 11 of file SpecialRandompage.php.


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

Generated on Sat Sep 5 02:08:45 2009 for MediaWiki by  doxygen 1.5.9