MediaWiki
REL1_22
|
implements Special:Search - Run text & title search and display the output More...
Public Member Functions | |
__construct () | |
execute ($par) | |
Entry point. | |
getNamespaces () | |
getProfile () | |
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, $resultsShown, $totalNum) | |
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'. | |
getProfileForm ($profile, $term) | |
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. | |
setupPage ($term) | |
shortDialog ($term) | |
showCreateLink ($t) | |
showHit ($result, $terms) | |
Format a single hit result. | |
showInterwiki (&$matches, $query) | |
Show results from other wikis. | |
showInterwikiHit ($result, $lastInterwiki, $terms, $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 |
$extraParams = array() | |
For links. | |
int | $limit |
$mPrefix | |
No idea, apparently used by some other classes. | |
array | $namespaces |
$profile | |
Current search profile. | |
$searchEngine | |
Search engine. | |
$searchEngineType | |
Search engine type, if not default. | |
bool | $searchRedirects |
implements Special:Search - Run text & title search and display the output
Definition at line 30 of file SpecialSearch.php.
Definition at line 73 of file SpecialSearch.php.
SpecialSearch::execute | ( | $ | par | ) |
Entry point.
string | $par | or null |
Reimplemented from SpecialPage.
Definition at line 82 of file SpecialSearch.php.
SpecialSearch::formHeader | ( | $ | term, |
$ | resultsShown, | ||
$ | totalNum | ||
) | [protected] |
$term | |
$resultsShown | |
$totalNum |
Definition at line 1014 of file SpecialSearch.php.
Referenced by showResults().
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 1194 of file SpecialSearch.php.
Definition at line 61 of file SpecialSearch.php.
Definition at line 40 of file SpecialSearch.php.
SpecialSearch::getProfileForm | ( | $ | profile, |
$ | term | ||
) | [protected] |
$profile | |
$term |
Definition at line 856 of file SpecialSearch.php.
Referenced by showResults().
Definition at line 1173 of file SpecialSearch.php.
Referenced by showResults().
SpecialSearch::getSearchProfiles | ( | ) | [protected] |
Definition at line 958 of file SpecialSearch.php.
References array(), as, SearchEngine\defaultNamespaces(), SearchEngine\helpNamespaces(), SearchEngine\namespacesAsText(), SearchEngine\searchableNamespaces(), and wfRunHooks().
SpecialSearch::goResult | ( | $ | term | ) |
If an exact title match can be found, jump straight ahead to it.
$term | String |
Definition at line 172 of file SpecialSearch.php.
Set up basic search parameters from the request and user settings.
Definition at line 117 of file SpecialSearch.php.
SpecialSearch::makeSearchLink | ( | $ | term, |
$ | namespaces, | ||
$ | label, | ||
$ | tooltip, | ||
$ | params = array() |
||
) | [protected] |
Make a search link with some target namespaces.
$term | String | |
array | $namespaces | ignored |
string | $label | link's text |
string | $tooltip | link's tooltip |
array | $params | query string parameters |
Definition at line 1110 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.
$request | WebRequest |
Definition at line 489 of file SpecialSearch.php.
SpecialSearch::powerSearchBox | ( | $ | term, |
$ | opts | ||
) | [protected] |
Generates the power search box at [[Special:Search]].
string | $term | search term |
$opts | array |
Definition at line 878 of file SpecialSearch.php.
SpecialSearch::powerSearchOptions | ( | ) | [protected] |
Reconstruct the 'power search' options for links.
Definition at line 505 of file SpecialSearch.php.
Referenced by showResults().
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.
$key | |
$value |
Definition at line 1190 of file SpecialSearch.php.
SpecialSearch::setupPage | ( | $ | term | ) | [protected] |
$term | string |
Definition at line 468 of file SpecialSearch.php.
References $out, $term, SpecialPage\getOutput(), SpecialPage\msg(), and text.
Referenced by showResults().
SpecialSearch::shortDialog | ( | $ | term | ) | [protected] |
$term | string |
Definition at line 1086 of file SpecialSearch.php.
Referenced by showResults().
SpecialSearch::showCreateLink | ( | $ | t | ) | [protected] |
$t | Title |
Definition at line 435 of file SpecialSearch.php.
References $params, $t, array(), SpecialPage\getOutput(), wfEscapeWikiText(), and wfRunHooks().
Referenced by showResults().
SpecialSearch::showHit | ( | $ | result, |
$ | terms | ||
) | [protected] |
Format a single hit result.
$result | SearchResult | |
array | $terms | terms to highlight |
Definition at line 558 of file SpecialSearch.php.
SpecialSearch::showInterwiki | ( | &$ | matches, |
$ | query | ||
) | [protected] |
Show results from other wikis.
$matches | SearchResultSet |
$query | String |
Definition at line 737 of file SpecialSearch.php.
Referenced by showResults().
SpecialSearch::showInterwikiHit | ( | $ | result, |
$ | lastInterwiki, | ||
$ | terms, | ||
$ | query, | ||
$ | customCaptions | ||
) | [protected] |
Show single interwiki link.
$result | SearchResult | |
$lastInterwiki | String | |
$terms | Array | |
$query | String | |
array | $customCaptions | iw prefix -> caption |
Definition at line 783 of file SpecialSearch.php.
SpecialSearch::showMatches | ( | &$ | matches | ) | [protected] |
Show whole set of results.
$matches | SearchResultSet |
Definition at line 525 of file SpecialSearch.php.
Referenced by showResults().
SpecialSearch::showResults | ( | $ | term | ) |
$term | String |
Definition at line 212 of file SpecialSearch.php.
References $out, $t, $term, $wgContLang, array(), Xml\closeElement(), Xml\element(), formHeader(), SpecialPage\getLanguage(), SpecialPage\getOutput(), getProfileForm(), getSearchEngine(), SpecialPage\getTitle(), SpecialPage\getTitleFor(), global, Linker\linkKnown(), SpecialPage\msg(), namespaces, Title\newFromText(), Xml\openElement(), powerSearchOptions(), setupPage(), shortDialog(), showCreateLink(), showInterwiki(), showMatches(), text, wfEscapeWikiText(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
SpecialSearch::startsWithAll | ( | $ | term | ) | [protected] |
Check if query starts with all: prefix.
string | $term | the string to check |
Definition at line 1157 of file SpecialSearch.php.
SpecialSearch::startsWithImage | ( | $ | term | ) | [protected] |
Check if query starts with image: prefix.
string | $term | the string to check |
Definition at line 1141 of file SpecialSearch.php.
string SpecialSearch::$didYouMeanHtml [protected] |
Definition at line 69 of file SpecialSearch.php.
SpecialSearch::$extraParams = array() [protected] |
For links.
Definition at line 49 of file SpecialSearch.php.
string SpecialSearch::$fulltext |
Definition at line 69 of file SpecialSearch.php.
int SpecialSearch::$limit [protected] |
Definition at line 56 of file SpecialSearch.php.
SpecialSearch::$mPrefix [protected] |
No idea, apparently used by some other classes.
Definition at line 52 of file SpecialSearch.php.
array SpecialSearch::$namespaces [protected] |
Definition at line 60 of file SpecialSearch.php.
int SpecialSearch::$offset |
Definition at line 56 of file SpecialSearch.php.
SpecialSearch::$profile [protected] |
Current search profile.
Search profile is just a name that identifies the active search tab on the search page (content, help, 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. null|string
Definition at line 39 of file SpecialSearch.php.
SpecialSearch::$searchEngine [protected] |
Search engine.
Definition at line 43 of file SpecialSearch.php.
SpecialSearch::$searchEngineType [protected] |
Search engine type, if not default.
Definition at line 46 of file SpecialSearch.php.
bool SpecialSearch::$searchRedirects [protected] |
Definition at line 65 of file SpecialSearch.php.
const SpecialSearch::NAMESPACES_CURRENT = 'sense' |
Definition at line 71 of file SpecialSearch.php.