MediaWiki
REL1_22
|
Special:LinkSearch to search the external-links table. More...
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'. |
Special:LinkSearch to search the external-links table.
Definition at line 29 of file SpecialLinkSearch.php.
LinkSearchPage::__construct | ( | $ | name = 'LinkSearch' | ) |
Definition at line 36 of file SpecialLinkSearch.php.
References $name.
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::execute | ( | $ | par | ) |
This is the actual workhorse.
It does everything needed to make a real, honest-to-gosh query page. $par
Reimplemented from QueryPage.
Definition at line 44 of file SpecialLinkSearch.php.
References $out, $s, array(), as, Html\closeElement(), Html\element(), SpecialPage\getLanguage(), SpecialPage\getOutput(), SpecialPage\getRequest(), SpecialPage\getTitle(), global, Html\hidden(), Xml\inputLabel(), SpecialPage\msg(), Html\namespaceSelector(), Html\openElement(), SpecialPage\outputHeader(), SpecialPage\setHeaders(), setParams(), Xml\submitButton(), and text.
LinkSearchPage::formatResult | ( | $ | skin, |
$ | result | ||
) |
Skin | $skin | |
object | $result | Result row |
Reimplemented from QueryPage.
Definition at line 219 of file SpecialLinkSearch.php.
References $result, $title, Linker\linkKnown(), Linker\makeExternalLink(), Title\makeTitle(), and SpecialPage\msg().
LinkSearchPage::getGroupName | ( | ) | [protected] |
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.
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.
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.
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.
Reimplemented from QueryPage.
Definition at line 40 of file SpecialLinkSearch.php.
Disable RSS/Atom feeds.
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).
Reimplemented from QueryPage.
Definition at line 168 of file SpecialLinkSearch.php.
static LinkSearchPage::mungeQuery | ( | $ | query, |
$ | prot | ||
) | [static] |
Return an appropriately formatted LIKE query and the clause.
string | $query | |
string | $prot |
Definition at line 152 of file SpecialLinkSearch.php.
References $dbr, $query, array(), LinkFilter\makeLikeArray(), and wfGetDB().
Referenced by doQuery(), and getQueryInfo().
LinkSearchPage::setParams | ( | $ | params | ) |