MediaWiki  REL1_22
LinkSearchPage Class Reference

Special:LinkSearch to search the external-links table. More...

Inheritance diagram for LinkSearchPage:
Collaboration diagram for LinkSearchPage:

List of all members.

Public Member Functions

 __construct ($name= 'LinkSearch')
 doQuery ($offset=false, $limit=false)
 Override to check query validity.
 execute ($par)
 This is the actual workhorse.
 formatResult ($skin, $result)
 getOrderFields ()
 Override to squash the ORDER BY.
 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.
 isCacheable ()
 Is the output of this query cacheable? Non-cacheable expensive pages will be disabled in miser mode and will not have their results written to the querycache table.
 isSyndicated ()
 Disable RSS/Atom feeds.
 linkParameters ()
 If using extra form wheely-dealies, return a set of parameters here as an associative array.
 setParams ($params)

Static Public Member Functions

static mungeQuery ($query, $prot)
 Return an appropriately formatted LIKE query and the clause.

Protected Member Functions

 getGroupName ()
 Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.

Detailed Description

Special:LinkSearch to search the external-links table.

Definition at line 29 of file SpecialLinkSearch.php.


Constructor & Destructor Documentation

LinkSearchPage::__construct ( name = 'LinkSearch')

Definition at line 36 of file SpecialLinkSearch.php.

References $name.


Member Function Documentation

LinkSearchPage::doQuery ( offset = false,
limit = false 
)

Override to check query validity.

Reimplemented from QueryPage.

Definition at line 231 of file SpecialLinkSearch.php.

References QueryPage\$limit, QueryPage\$offset, SpecialPage\getOutput(), list, and mungeQuery().

LinkSearchPage::formatResult ( skin,
result 
)
Parameters:
Skin$skin
object$resultResult row
Returns:
string

Reimplemented from QueryPage.

Definition at line 219 of file SpecialLinkSearch.php.

References $result, $title, Linker\linkKnown(), Linker\makeExternalLink(), Title\makeTitle(), and SpecialPage\msg().

Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.

Returns:
string
Since:
1.21

Reimplemented from SpecialPage.

Definition at line 254 of file SpecialLinkSearch.php.

Override to squash the ORDER BY.

We do a truncated index search, so the optimizer won't trust it as good enough for optimizing sort. The implicit ordering from the scan will usually do well enough for our needs.

Returns:
array

Reimplemented from QueryPage.

Definition at line 250 of file SpecialLinkSearch.php.

References array().

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 179 of file SpecialLinkSearch.php.

References $dbr, $retval, array(), global, LinkFilter\keepOneWildcard(), list, mungeQuery(), and wfGetDB().

Is the output of this query cacheable? Non-cacheable expensive pages will be disabled in miser mode and will not have their results written to the querycache table.

Returns:
bool
Since:
1.18

Reimplemented from QueryPage.

Definition at line 40 of file SpecialLinkSearch.php.

Disable RSS/Atom feeds.

Returns:
bool

Reimplemented from QueryPage.

Definition at line 141 of file SpecialLinkSearch.php.

If using extra form wheely-dealies, return a set of parameters here as an associative array.

They will be encoded and added to the paging links (prev/next/lengths).

Returns:
array

Reimplemented from QueryPage.

Definition at line 168 of file SpecialLinkSearch.php.

References $params, array(), and global.

static LinkSearchPage::mungeQuery ( query,
prot 
) [static]

Return an appropriately formatted LIKE query and the clause.

Parameters:
string$query
string$prot
Returns:
array

Definition at line 152 of file SpecialLinkSearch.php.

References $dbr, $query, array(), LinkFilter\makeLikeArray(), and wfGetDB().

Referenced by doQuery(), and getQueryInfo().

Definition at line 30 of file SpecialLinkSearch.php.

References $params.

Referenced by execute().


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