MostlinkedPage Class Reference
[SpecialPage]

A special page to show pages ordered by the number of pages linking to them. More...

Inherits QueryPage.

List of all members.

Public Member Functions

 getName ()
 Subclasses return their name here.
 isExpensive ()
 Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
 isSyndicated ()
 Sometime we dont want to build rss / atom feeds.
 getSQL ()
 Subclasses return an SQL query here.
 preprocessResults ($db, $res)
 Pre-fill the link cache.
 makeWlhLink (&$title, $caption, &$skin)
 Make a link to "what links here" for the specified title.
 formatResult ($skin, $result)
 Make links to the page corresponding to the item, and the "what links here" page for it.


Detailed Description

A special page to show pages ordered by the number of pages linking to them.

Implements Special:Mostlinked

Author:
Ævar Arnfjörð Bjarmason <avarab@gmail.com>

Rob Church <robchur@gmail.com> Copyright © 2005, Ævar Arnfjörð Bjarmason © 2006 Rob Church http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later

Definition at line 19 of file SpecialMostlinked.php.


Member Function Documentation

MostlinkedPage::formatResult ( skin,
result 
)

Make links to the page corresponding to the item, and the "what links here" page for it.

Parameters:
$skin Skin to be used
$result Result row
Returns:
string

Reimplemented from QueryPage.

Definition at line 89 of file SpecialMostlinked.php.

References $result, $title, $wgLang, Title::makeTitleSafe(), makeWlhLink(), wfMsgExt(), and wfSpecialList().

MostlinkedPage::getName (  ) 

Subclasses return their name here.

Make sure the name is also specified in SpecialPage.php and in Language.php as a language message param.

Returns:
String

Reimplemented from QueryPage.

Definition at line 21 of file SpecialMostlinked.php.

MostlinkedPage::getSQL (  ) 

Subclasses return an SQL query here.

Note that the query itself should return the following four columns: 'type' (your special page's name), 'namespace', 'title', and 'value' *in that order*. 'value' is used for sorting.

These may be stored in the querycache table for expensive queries, and that cached data will be returned sometimes, so the presence of extra fields can't be relied upon. The cached 'value' column will be an integer; non-numeric values are useful only for sorting the initial query.

Don't include an ORDER or LIMIT clause, this will be added.

Reimplemented from QueryPage.

Definition at line 25 of file SpecialMostlinked.php.

References $dbr, $page, $wgMiserMode, SiteStats::pages(), and wfGetDB().

MostlinkedPage::isExpensive (  ) 

Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.

$wgDisableQueryPages causes all query pages to be declared expensive. Some query pages are always expensive.

Returns:
Boolean

Reimplemented from QueryPage.

Definition at line 22 of file SpecialMostlinked.php.

MostlinkedPage::isSyndicated (  ) 

Sometime we dont want to build rss / atom feeds.

Returns:
Boolean

Reimplemented from QueryPage.

Definition at line 23 of file SpecialMostlinked.php.

MostlinkedPage::makeWlhLink ( &$  title,
caption,
&$  skin 
)

Make a link to "what links here" for the specified title.

Parameters:
$title Title being queried
$caption String: text to display on the link
$skin Skin to use
Returns:
String

Definition at line 77 of file SpecialMostlinked.php.

References $title, and SpecialPage::getTitleFor().

Referenced by formatResult().

MostlinkedPage::preprocessResults ( db,
res 
)

Pre-fill the link cache.

Reimplemented from QueryPage.

Definition at line 59 of file SpecialMostlinked.php.

References $res.


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

Generated on Sat Apr 30 22:57:43 2011 for MediaWiki by  doxygen 1.5.9