MediaWiki  REL1_24
WantedQueryPage Class Reference

Class definition for a wanted query page like WantedPages, WantedTemplates, etc. More...

Inheritance diagram for WantedQueryPage:
Collaboration diagram for WantedQueryPage:

List of all members.

Public Member Functions

 forceExistenceCheck ()
 Should formatResult() always check page existence, even if the results are fresh? This is a (hopefully temporary) kluge for Special:WantedFiles, which may contain false positives for files that exist e.g.
 formatResult ($skin, $result)
 Format an individual result.
 isExpensive ()
 Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
 isSyndicated ()
 Sometime we don't want to build rss / atom feeds.
 preprocessResults ($db, $res)
 Cache page existence for performance.

Protected Member Functions

 existenceCheck (Title $title)
 Does the Title currently exists.

Private Member Functions

 makeWlhLink ($title, $result)
 Make a "what links here" link for a given title.

Detailed Description

Class definition for a wanted query page like WantedPages, WantedTemplates, etc.

Definition at line 29 of file WantedQueryPage.php.


Member Function Documentation

WantedQueryPage::existenceCheck ( Title title) [protected]

Does the Title currently exists.

This method allows a subclass to override this check (For example, wantedfiles, would want to check if the file exists not just that a page in the file namespace exists).

This will only control if the link is crossed out. Whether or not the link is blue vs red is controlled by if the title exists.

Note:
This will only be run if the page is cached (ie $wgMiserMode = true) unless forceExistenceCheck() is true.
Since:
1.24
Returns:
boolean

Reimplemented in WantedFilesPage.

Definition at line 114 of file WantedQueryPage.php.

References Title\isKnown().

Referenced by formatResult().

Should formatResult() always check page existence, even if the results are fresh? This is a (hopefully temporary) kluge for Special:WantedFiles, which may contain false positives for files that exist e.g.

in a shared repo (bug 6220).

Returns:
bool

Reimplemented in WantedFilesPage.

Definition at line 66 of file WantedQueryPage.php.

Referenced by formatResult().

WantedQueryPage::formatResult ( skin,
result 
)

Format an individual result.

Parameters:
Skin$skinSkin to use for UI elements
object$resultResult row
Returns:
string

Reimplemented from QueryPage.

Reimplemented in WantedCategoriesPage.

Definition at line 77 of file WantedQueryPage.php.

References $result, $title, array(), existenceCheck(), forceExistenceCheck(), SpecialPage\getLanguage(), QueryPage\isCached(), Linker\link(), Title\makeTitleSafe(), makeWlhLink(), and SpecialPage\msg().

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:
bool

Reimplemented from QueryPage.

Definition at line 30 of file WantedQueryPage.php.

Sometime we don't want to build rss / atom feeds.

Returns:
bool

Reimplemented from QueryPage.

Definition at line 34 of file WantedQueryPage.php.

WantedQueryPage::makeWlhLink ( title,
result 
) [private]

Make a "what links here" link for a given title.

Parameters:
Title$titleTitle to make the link for
object$resultResult row
Returns:
string

Definition at line 125 of file WantedQueryPage.php.

References $result, $title, SpecialPage\getTitleFor(), Linker\link(), and SpecialPage\msg().

Referenced by formatResult().

WantedQueryPage::preprocessResults ( db,
res 
)

Cache page existence for performance.

Parameters:
DatabaseBase$db
ResultWrapper$res

Reimplemented from QueryPage.

Reimplemented in WantedCategoriesPage.

Definition at line 43 of file WantedQueryPage.php.

References $batch, $res, and as.


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