MediaWiki  REL1_19
MostlinkedPage Class Reference

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

Inheritance diagram for MostlinkedPage:
Collaboration diagram for MostlinkedPage:

List of all members.

Public Member Functions

 __construct ($name= 'Mostlinked')
 formatResult ($skin, $result)
 Make links to the page corresponding to the item, and the "what links here" page for it.
 getQueryInfo ()
 Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s) for passing to Database::select() fields => Field(s) for passing to Database::select(), may be * conds => WHERE conditions options => options join_conds => JOIN conditions.
 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.
 makeWlhLink ($title, $caption)
 Make a link to "what links here" for the specified title.
 preprocessResults ($db, $res)
 Pre-fill the link cache.

Detailed Description

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

Definition at line 33 of file SpecialMostlinked.php.


Constructor & Destructor Documentation

MostlinkedPage::__construct ( name = 'Mostlinked')

Definition at line 35 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:
$skinSkin to be used
$resultResult row
Returns:
string

Reimplemented from QueryPage.

Definition at line 94 of file SpecialMostlinked.php.

References $result, $title, SpecialPage\getLanguage(), Linker\link(), Title\makeTitleSafe(), makeWlhLink(), and SpecialPage\msg().

Here is the call graph for this function:

Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s) for passing to Database::select() fields => Field(s) for passing to Database::select(), may be * conds => WHERE conditions options => options join_conds => JOIN conditions.

Note that the query itself should return the following three columns: 'namespace', 'title', and 'value'. '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 (except if they're timestamps, see usesTimestamps()).

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

If this function is not overridden or returns something other than an array, getSQL() will be used instead. This is for backwards compatibility only and is strongly deprecated.

Returns:
array
Since:
1.18

Reimplemented from QueryPage.

Definition at line 42 of file SpecialMostlinked.php.

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 39 of file SpecialMostlinked.php.

Sometime we dont want to build rss / atom feeds.

Returns:
Boolean

Reimplemented from QueryPage.

Definition at line 40 of file SpecialMostlinked.php.

MostlinkedPage::makeWlhLink ( title,
caption 
)

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

Parameters:
$titleTitle being queried
$captionString: text to display on the link
Returns:
String

Definition at line 82 of file SpecialMostlinked.php.

References $title, SpecialPage\getTitleFor(), and Linker\linkKnown().

Referenced by formatResult().

Here is the call graph for this function:

Here is the caller graph for this function:

MostlinkedPage::preprocessResults ( db,
res 
)

Pre-fill the link cache.

Parameters:
$dbDatabaseBase
$res

Reimplemented from QueryPage.

Definition at line 64 of file SpecialMostlinked.php.

References $res.


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