MediaWiki
REL1_24
|
implements Special:Search - Run text & title search and display the output More...
Public Member Functions | |
__construct () | |
execute ($par) | |
Entry point. | |
getNamespaces () | |
Current namespaces. | |
getProfile () | |
Current search profile. | |
getSearchEngine () | |
goResult ($term) | |
If an exact title match can be found, jump straight ahead to it. | |
load () | |
Set up basic search parameters from the request and user settings. | |
setExtraParam ($key, $value) | |
Users of hook SpecialSearchSetupEngine can use this to add more params to links to not lose selection when user navigates search results. | |
showResults ($term) | |
Public Attributes | |
string | $fulltext |
int | $offset |
const | NAMESPACES_CURRENT = 'sense' |
Protected Member Functions | |
formHeader ($term) | |
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'. | |
getSearchProfiles () | |
makeSearchLink ($term, $namespaces, $label, $tooltip, $params=array()) | |
Make a search link with some target namespaces. | |
powerSearch (&$request) | |
Extract "power search" namespace settings from the request object, returning a list of index numbers to search. | |
powerSearchBox ($term, $opts) | |
Generates the power search box at [[Special:Search]]. | |
powerSearchOptions () | |
Reconstruct the 'power search' options for links. | |
saveNamespaces () | |
Save namespace preferences when we're supposed to. | |
setupPage ($term) | |
shortDialog ($term, $resultsShown, $totalNum) | |
showCreateLink ($title, $num, $titleMatches, $textMatches) | |
showHit ($result, $terms) | |
Format a single hit result. | |
showInterwiki ($matches, $query) | |
Show results from other wikis. | |
showInterwikiHit ($result, $lastInterwiki, $query, $customCaptions) | |
Show single interwiki link. | |
showMatches (&$matches) | |
Show whole set of results. | |
startsWithAll ($term) | |
Check if query starts with all: prefix. | |
startsWithImage ($term) | |
Check if query starts with image: prefix. | |
Protected Attributes | |
string | $didYouMeanHtml |
array | $extraParams = array() |
For links *. | |
int | $limit |
string | $mPrefix |
No idea, apparently used by some other classes *. | |
array | $namespaces |
null string | $profile |
Current search profile. | |
SearchEngine | $searchEngine |
Search engine *. | |
string | $searchEngineType |
Search engine type, if not default *. |
implements Special:Search - Run text & title search and display the output
Definition at line 30 of file SpecialSearch.php.
Definition at line 62 of file SpecialSearch.php.
SpecialSearch::execute | ( | $ | par | ) |
Entry point.
string | $par |
Reimplemented from SpecialPage.
Definition at line 71 of file SpecialSearch.php.
SpecialSearch::formHeader | ( | $ | term | ) | [protected] |
SpecialSearch::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 1193 of file SpecialSearch.php.
SpecialSearch::getSearchProfiles | ( | ) | [protected] |
Definition at line 943 of file SpecialSearch.php.
SpecialSearch::goResult | ( | $ | term | ) |
If an exact title match can be found, jump straight ahead to it.
string | $term |
Definition at line 170 of file SpecialSearch.php.
Set up basic search parameters from the request and user settings.
Definition at line 118 of file SpecialSearch.php.
SpecialSearch::makeSearchLink | ( | $ | term, |
$ | namespaces, | ||
$ | label, | ||
$ | tooltip, | ||
$ | params = array() |
||
) | [protected] |
Make a search link with some target namespaces.
string | $term | |
array | $namespaces | Ignored |
string | $label | Link's text |
string | $tooltip | Link's tooltip |
array | $params | Query string parameters |
Definition at line 1091 of file SpecialSearch.php.
SpecialSearch::powerSearch | ( | &$ | request | ) | [protected] |
Extract "power search" namespace settings from the request object, returning a list of index numbers to search.
WebRequest | $request |
Definition at line 479 of file SpecialSearch.php.
References $name, array(), as, and SearchEngine\searchableNamespaces().
SpecialSearch::powerSearchBox | ( | $ | term, |
$ | opts | ||
) | [protected] |
Generates the power search box at [[Special:Search]].
string | $term | Search term |
array | $opts |
Definition at line 854 of file SpecialSearch.php.
References $key, $name, $term, $user, $value, $wgContLang, array(), as, Xml\checkLabel(), Xml\closeElement(), Xml\element(), MWNamespace\getSubject(), SpecialPage\getUser(), global, Html\hidden(), SpecialPage\msg(), namespaces, Xml\openElement(), SearchEngine\searchableNamespaces(), Xml\tags(), text, wfMessage(), and wfRunHooks().
SpecialSearch::powerSearchOptions | ( | ) | [protected] |
Reconstruct the 'power search' options for links.
Definition at line 495 of file SpecialSearch.php.
SpecialSearch::saveNamespaces | ( | ) | [protected] |
Save namespace preferences when we're supposed to.
Definition at line 513 of file SpecialSearch.php.
SpecialSearch::setExtraParam | ( | $ | key, |
$ | value | ||
) |
Users of hook SpecialSearchSetupEngine can use this to add more params to links to not lose selection when user navigates search results.
string | $key | |
mixed | $value |
Definition at line 1189 of file SpecialSearch.php.
SpecialSearch::setupPage | ( | $ | term | ) | [protected] |
string | $term |
Definition at line 457 of file SpecialSearch.php.
SpecialSearch::shortDialog | ( | $ | term, |
$ | resultsShown, | ||
$ | totalNum | ||
) | [protected] |
string | $term | |
int | $resultsShown | |
int | $totalNum |
Definition at line 1052 of file SpecialSearch.php.
SpecialSearch::showCreateLink | ( | $ | title, |
$ | num, | ||
$ | titleMatches, | ||
$ | textMatches | ||
) | [protected] |
Title | $title | |
int | $num | The number of search results found |
null | SearchResultSet | $titleMatches | Results from title search |
null | SearchResultSet | $textMatches | Results from text search |
Definition at line 414 of file SpecialSearch.php.
SpecialSearch::showHit | ( | $ | result, |
$ | terms | ||
) | [protected] |
Format a single hit result.
SearchResult | $result | |
array | $terms | Terms to highlight |
Definition at line 577 of file SpecialSearch.php.
Referenced by showMatches().
SpecialSearch::showInterwiki | ( | $ | matches, |
$ | query | ||
) | [protected] |
Show results from other wikis.
SearchResultSet | array | $matches | |
string | $query |
Definition at line 728 of file SpecialSearch.php.
SpecialSearch::showInterwikiHit | ( | $ | result, |
$ | lastInterwiki, | ||
$ | query, | ||
$ | customCaptions | ||
) | [protected] |
Show single interwiki link.
SearchResult | $result | |
string | $lastInterwiki | |
string | $query | |
array | $customCaptions | Interwiki prefix -> caption |
Definition at line 780 of file SpecialSearch.php.
SpecialSearch::showMatches | ( | &$ | matches | ) | [protected] |
Show whole set of results.
SearchResultSet | $matches |
Definition at line 549 of file SpecialSearch.php.
References $matches, $out, $profile, $result, $wgContLang, global, and showHit().
SpecialSearch::showResults | ( | $ | term | ) |
string | $term |
Definition at line 207 of file SpecialSearch.php.
SpecialSearch::startsWithAll | ( | $ | term | ) | [protected] |
Check if query starts with all: prefix.
string | $term | The string to check |
Definition at line 1138 of file SpecialSearch.php.
SpecialSearch::startsWithImage | ( | $ | term | ) | [protected] |
Check if query starts with image: prefix.
string | $term | The string to check |
Definition at line 1121 of file SpecialSearch.php.
string SpecialSearch::$didYouMeanHtml [protected] |
Definition at line 58 of file SpecialSearch.php.
For links *.
Definition at line 44 of file SpecialSearch.php.
string SpecialSearch::$fulltext |
Definition at line 58 of file SpecialSearch.php.
int SpecialSearch::$limit [protected] |
Definition at line 50 of file SpecialSearch.php.
string SpecialSearch::$mPrefix [protected] |
No idea, apparently used by some other classes *.
Definition at line 46 of file SpecialSearch.php.
array SpecialSearch::$namespaces [protected] |
Definition at line 54 of file SpecialSearch.php.
int SpecialSearch::$offset |
Definition at line 50 of file SpecialSearch.php.
null string SpecialSearch::$profile [protected] |
Current search profile.
Search profile is just a name that identifies the active search tab on the search page (content, discussions...) For users tt replaces the set of enabled namespaces from the query string when applicable. Extensions can add new profiles with hooks with custom search options just for that profile.
Definition at line 38 of file SpecialSearch.php.
Referenced by showMatches().
SearchEngine SpecialSearch::$searchEngine [protected] |
Search engine *.
Definition at line 40 of file SpecialSearch.php.
string SpecialSearch::$searchEngineType [protected] |
Search engine type, if not default *.
Definition at line 42 of file SpecialSearch.php.
const SpecialSearch::NAMESPACES_CURRENT = 'sense' |
Definition at line 60 of file SpecialSearch.php.