Public Member Functions | |
| __construct (&$request, &$user) | |
| Set up basic search parameters from the request and user settings. | |
| goResult ($term) | |
| If an exact title match can be found, jump straight ahead to it. | |
| showResults ($term) | |
Protected Member Functions | |
| showCreateLink ($t) | |
| setupPage ($term) | |
| powerSearch (&$request) | |
| Extract "power search" namespace settings from the request object, returning a list of index numbers to search. | |
| powerSearchOptions () | |
| Reconstruct the 'power search' options for links. | |
| showMatches (&$matches) | |
| Show whole set of results. | |
| 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. | |
| powerSearchBox ($term) | |
| Generates the power search box at bottom of [[Special:Search]]. | |
| searchFocus () | |
| getSearchProfiles () | |
| formHeader ($term, $resultsShown, $totalNum) | |
| shortDialog ($term) | |
| makeSearchLink ($term, $namespaces, $label, $tooltip, $params=array()) | |
| Make a search link with some target namespaces. | |
| startsWithImage ($term) | |
| Check if query starts with image: prefix. | |
| startsWithAll ($term) | |
| Check if query starts with all: prefix. | |
Definition at line 53 of file SpecialSearch.php.
| SpecialSearch::__construct | ( | &$ | request, | |
| &$ | user | |||
| ) |
Set up basic search parameters from the request and user settings.
Typically you'll pass $wgRequest and $wgUser.
| WebRequest | $request | |
| User | $user |
Definition at line 63 of file SpecialSearch.php.
References powerSearch(), and SearchEngine::userNamespaces().
| SpecialSearch::formHeader | ( | $ | term, | |
| $ | resultsShown, | |||
| $ | totalNum | |||
| ) | [protected] |
Definition at line 874 of file SpecialSearch.php.
References $out, $wgContLang, $wgLang, Xml::closeElement(), Xml::element(), getSearchProfiles(), Xml::hidden(), makeSearchLink(), Xml::openElement(), startsWithImage(), Xml::tags(), wfEscapeWikiText(), wfMsg(), wfMsgExt(), wfShowingResults(), and wfShowingResultsNum().
Referenced by showResults().
| SpecialSearch::getSearchProfiles | ( | ) | [protected] |
Definition at line 826 of file SpecialSearch.php.
References SearchEngine::defaultNamespaces(), SearchEngine::helpNamespaces(), SearchEngine::namespacesAsText(), SearchEngine::searchableNamespaces(), and wfRunHooks().
Referenced by formHeader(), and setupPage().
| SpecialSearch::goResult | ( | $ | term | ) |
If an exact title match can be found, jump straight ahead to it.
| string | $term |
Definition at line 83 of file SpecialSearch.php.
References $t, $wgGoToEdit, $wgOut, SearchEngine::getNearMatch(), Title::newFromText(), setupPage(), showResults(), and wfRunHooks().
| SpecialSearch::makeSearchLink | ( | $ | term, | |
| $ | namespaces, | |||
| $ | label, | |||
| $ | tooltip, | |||
| $ | params = array() | |||
| ) | [protected] |
Make a search link with some target namespaces.
Definition at line 962 of file SpecialSearch.php.
References $n, Xml::element(), SpecialPage::getTitleFor(), and wfMsg().
Referenced by formHeader().
| 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 377 of file SpecialSearch.php.
References $name, and SearchEngine::searchableNamespaces().
Referenced by __construct().
| SpecialSearch::powerSearchBox | ( | $ | term | ) | [protected] |
Generates the power search box at bottom of [[Special:Search]].
| $term | string: search term |
Definition at line 725 of file SpecialSearch.php.
References $i, $name, $rows, $wgContLang, $wgScript, Xml::check(), Xml::checkLabel(), Xml::closeElement(), Xml::element(), MWNamespace::getSubject(), SpecialPage::getTitleFor(), Xml::hidden(), Xml::label(), Xml::openElement(), SearchEngine::searchableNamespaces(), Xml::tags(), wfMsg(), and wfMsgExt().
Referenced by showResults().
| SpecialSearch::powerSearchOptions | ( | ) | [protected] |
Reconstruct the 'power search' options for links.
Definition at line 391 of file SpecialSearch.php.
References $n.
Referenced by showHit(), and showResults().
| SpecialSearch::searchFocus | ( | ) | [protected] |
Definition at line 818 of file SpecialSearch.php.
References Html::inlineScript().
Referenced by showResults().
| SpecialSearch::setupPage | ( | $ | term | ) | [protected] |
Definition at line 342 of file SpecialSearch.php.
References $wgOut, getSearchProfiles(), SearchEngine::searchableNamespaces(), and wfMsg().
Referenced by goResult(), and showResults().
| SpecialSearch::shortDialog | ( | $ | term | ) | [protected] |
Definition at line 944 of file SpecialSearch.php.
References $out, SpecialPage::getTitleFor(), Html::hidden(), Html::input(), SearchEngine::searchableNamespaces(), Xml::submitButton(), and wfMsg().
Referenced by showResults().
| SpecialSearch::showCreateLink | ( | $ | t | ) | [protected] |
Definition at line 319 of file SpecialSearch.php.
References $t, $wgOut, and wfEscapeWikiText().
Referenced by showResults().
| SpecialSearch::showHit | ( | $ | result, | |
| $ | terms | |||
| ) | [protected] |
Format a single hit result.
| SearchResult | $result | |
| array | $terms terms to highlight |
Definition at line 437 of file SpecialSearch.php.
References $result, $section, $size, $t, $wgContLang, $wgLang, $wgUser, SpecialPage::getTitleFor(), powerSearchOptions(), wfFindFile(), wfMsg(), wfMsgExt(), wfMsgForContent(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by showMatches().
| SpecialSearch::showInterwiki | ( | &$ | matches, | |
| $ | query | |||
| ) | [protected] |
Show results from other wikis.
| SearchResultSet | $matches |
Definition at line 605 of file SpecialSearch.php.
References $out, $result, $wgContLang, showInterwikiHit(), wfMsg(), wfProfileIn(), and wfProfileOut().
Referenced by showResults().
| SpecialSearch::showInterwikiHit | ( | $ | result, | |
| $ | lastInterwiki, | |||
| $ | terms, | |||
| $ | query, | |||
| $ | customCaptions | |||
| ) | [protected] |
Show single interwiki link.
| SearchResult | $result | |
| string | $lastInterwiki | |
| array | $terms | |
| string | $query | |
| array | $customCaptions iw prefix -> caption |
Definition at line 647 of file SpecialSearch.php.
References $out, $result, $t, $wgContLang, $wgLang, Title::newFromText(), wfMsg(), wfProfileIn(), and wfProfileOut().
Referenced by showInterwiki().
| SpecialSearch::showMatches | ( | &$ | matches | ) | [protected] |
Show whole set of results.
| SearchResultSet | $matches |
Definition at line 408 of file SpecialSearch.php.
References $out, $result, $wgContLang, showHit(), wfProfileIn(), and wfProfileOut().
Referenced by showResults().
| SpecialSearch::showResults | ( | $ | term | ) |
| string | $term |
Definition at line 115 of file SpecialSearch.php.
References $t, $url, $wgContLang, $wgDisableTextSearch, $wgInputEncoding, $wgOut, $wgScript, $wgSearchForwardUrl, $wgUser, Xml::closeElement(), SearchEngine::create(), Xml::element(), formHeader(), SpecialPage::getTitleFor(), Title::newFromText(), Xml::openElement(), powerSearchBox(), powerSearchOptions(), searchFocus(), setupPage(), shortDialog(), showCreateLink(), showInterwiki(), showMatches(), wfArrayToCGI(), wfEscapeWikiText(), wfMsg(), wfProfileIn(), wfProfileOut(), wfRunHooks(), and wfViewPrevNext().
Referenced by goResult().
| SpecialSearch::startsWithAll | ( | $ | term | ) | [protected] |
Check if query starts with all: prefix.
Definition at line 1001 of file SpecialSearch.php.
References wfMsgForContent().
| SpecialSearch::startsWithImage | ( | $ | term | ) | [protected] |
Check if query starts with image: prefix.
Definition at line 990 of file SpecialSearch.php.
References $wgContLang.
Referenced by formHeader().
1.5.9