Public Member Functions | |
setParams ($params) | |
getName () | |
Subclasses return their name here. | |
isSyndicated () | |
Disable RSS/Atom feeds. | |
linkParameters () | |
If using extra form wheely-dealies, return a set of parameters here as an associative array. | |
getSQL () | |
Subclasses return an SQL query here. | |
formatResult ($skin, $result) | |
Formats the results of the query for display. | |
doQuery ($offset, $limit, $shownavigation=true) | |
Override to check query validity. | |
getOrder () | |
Override to squash the ORDER BY. | |
Static Public Member Functions | |
static | mungeQuery ($query, $prot) |
Return an appropriately formatted LIKE query and the clause. |
Definition at line 76 of file SpecialLinkSearch.php.
LinkSearchPage::doQuery | ( | $ | offset, | |
$ | limit, | |||
$ | shownavigation = true | |||
) |
Override to check query validity.
Reimplemented from QueryPage.
Definition at line 163 of file SpecialLinkSearch.php.
References QueryPage::$limit, QueryPage::$offset, $wgOut, mungeQuery(), and wfMsg().
LinkSearchPage::formatResult | ( | $ | skin, | |
$ | result | |||
) |
Formats the results of the query for display.
The skin is the current skin; you can use it for making links. The result is a single row of result data. You should be able to grab SQL results off of it. If the function return "false", the line output will be skipped.
Reimplemented from QueryPage.
Definition at line 151 of file SpecialLinkSearch.php.
References $result, $title, $url, Title::makeTitle(), and wfMsgHtml().
LinkSearchPage::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.
Reimplemented from QueryPage.
Definition at line 83 of file SpecialLinkSearch.php.
LinkSearchPage::getOrder | ( | ) |
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 182 of file SpecialLinkSearch.php.
LinkSearchPage::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 120 of file SpecialLinkSearch.php.
References $dbr, $page, $wgMiserMode, mungeQuery(), and wfGetDB().
LinkSearchPage::isSyndicated | ( | ) |
Disable RSS/Atom feeds.
Reimplemented from QueryPage.
Definition at line 90 of file SpecialLinkSearch.php.
LinkSearchPage::linkParameters | ( | ) |
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 110 of file SpecialLinkSearch.php.
References $wgMiserMode.
static LinkSearchPage::mungeQuery | ( | $ | query, | |
$ | prot | |||
) | [static] |
Return an appropriately formatted LIKE query and the clause.
Definition at line 97 of file SpecialLinkSearch.php.
References LinkFilter::makeLike().
LinkSearchPage::setParams | ( | $ | params | ) |
Definition at line 77 of file SpecialLinkSearch.php.