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 | |
| 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 () | |
| powerSearchFocus () | |
| formHeader ($term) | |
| 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. | |
| namespaceTables ($namespaces, $rowsPerTable=3) | |
Definition at line 54 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 64 of file SpecialSearch.php.
References $user, powerSearch(), and SearchEngine::userNamespaces().
| SpecialSearch::formHeader | ( | $ | term | ) | [protected] |
Definition at line 673 of file SpecialSearch.php.
References $out, $sep, $wgCanonicalNamespaceNames, $wgContLang, $wgLang, Xml::closeElement(), SearchEngine::defaultNamespaces(), Xml::element(), makeSearchLink(), SearchEngine::namespacesAsText(), Xml::openElement(), SearchEngine::projectNamespaces(), SearchEngine::searchableNamespaces(), startsWithImage(), and wfMsg().
Referenced by powerSearchBox(), and shortDialog().
| SpecialSearch::goResult | ( | $ | term | ) |
If an exact title match can be found, jump straight ahead to it.
| string | $term |
Definition at line 84 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 777 of file SpecialSearch.php.
References $n, Xml::element(), SpecialPage::getTitleFor(), wfArrayToCGI(), and wfMsg().
Referenced by formHeader().
| SpecialSearch::namespaceTables | ( | $ | namespaces, | |
| $ | rowsPerTable = 3 | |||
| ) | [protected] |
Definition at line 803 of file SpecialSearch.php.
References $i, $name, $ns, $numRows, $rows, $wgContLang, Xml::checkLabel(), Xml::closeElement(), MWNamespace::getSubject(), Xml::openElement(), and wfMsg().
Referenced by powerSearchBox(), and shortDialog().
| 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 334 of file SpecialSearch.php.
References $name, $ns, 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 609 of file SpecialSearch.php.
References $out, $t, $wgScript, Xml::check(), Xml::closeElement(), Xml::element(), formHeader(), SpecialPage::getTitleFor(), Xml::hidden(), Xml::inputLabel(), Xml::label(), namespaceTables(), Title::newFromText(), Xml::openElement(), SearchEngine::searchableNamespaces(), Xml::submitButton(), wfMsg(), and wfMsgExt().
Referenced by showResults().
| SpecialSearch::powerSearchFocus | ( | ) | [protected] |
Definition at line 664 of file SpecialSearch.php.
References $wgJsMimeType.
Referenced by showResults().
| SpecialSearch::powerSearchOptions | ( | ) | [protected] |
Reconstruct the 'power search' options for links.
Definition at line 348 of file SpecialSearch.php.
References $n.
Referenced by showHit(), and showResults().
| SpecialSearch::searchFocus | ( | ) | [protected] |
Definition at line 655 of file SpecialSearch.php.
References $wgJsMimeType.
Referenced by showResults().
| SpecialSearch::setupPage | ( | $ | term | ) | [protected] |
Definition at line 301 of file SpecialSearch.php.
References $wgOut, SearchEngine::defaultNamespaces(), SearchEngine::projectNamespaces(), SearchEngine::searchableNamespaces(), startsWithImage(), and wfMsg().
Referenced by goResult(), and showResults().
| SpecialSearch::shortDialog | ( | $ | term | ) | [protected] |
Definition at line 737 of file SpecialSearch.php.
References $ns, $out, $t, $wgScript, Xml::closeElement(), Xml::element(), formHeader(), SpecialPage::getTitleFor(), Xml::hidden(), Xml::input(), namespaceTables(), Title::newFromText(), Xml::openElement(), SearchEngine::searchableNamespaces(), Xml::submitButton(), wfMsg(), and wfMsgExt().
Referenced by showResults().
| SpecialSearch::showHit | ( | $ | result, | |
| $ | terms | |||
| ) | [protected] |
Format a single hit result.
| SearchResult | $result | |
| array | $terms terms to highlight |
Definition at line 394 of file SpecialSearch.php.
References $result, $section, $size, $t, $wgContLang, $wgLang, $wgUser, SpecialPage::getTitleFor(), powerSearchOptions(), wfArrayToCGI(), wfFindFile(), wfMsg(), wfMsgExt(), wfMsgForContent(), wfProfileIn(), and wfProfileOut().
Referenced by showMatches().
| SpecialSearch::showInterwiki | ( | &$ | matches, | |
| $ | query | |||
| ) | [protected] |
Show results from other wikis.
| SearchResultSet | $matches |
Definition at line 514 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 556 of file SpecialSearch.php.
References $out, $result, $t, $wgContLang, $wgLang, Title::newFromText(), wfArrayToCGI(), wfMsg(), wfProfileIn(), and wfProfileOut().
Referenced by showInterwiki().
| SpecialSearch::showMatches | ( | &$ | matches | ) | [protected] |
Show whole set of results.
| SearchResultSet | $matches |
Definition at line 365 of file SpecialSearch.php.
References $out, $result, $wgContLang, showHit(), wfProfileIn(), and wfProfileOut().
Referenced by showResults().
| SpecialSearch::showResults | ( | $ | term | ) |
| string | $term |
Definition at line 116 of file SpecialSearch.php.
References $t, $url, $wgContLang, $wgDisableTextSearch, $wgInputEncoding, $wgOut, $wgSearchForwardUrl, $wgUser, Xml::closeElement(), SearchEngine::create(), Xml::element(), SpecialPage::getTitleFor(), Title::newFromText(), Xml::openElement(), powerSearchBox(), powerSearchFocus(), powerSearchOptions(), searchFocus(), setupPage(), shortDialog(), showInterwiki(), showMatches(), wfArrayToCGI(), wfEscapeWikiText(), wfMsg(), wfMsgExt(), wfProfileIn(), wfProfileOut(), wfRunHooks(), wfShowingResults(), wfShowingResultsNum(), and wfViewPrevNext().
Referenced by goResult().
| SpecialSearch::startsWithImage | ( | $ | term | ) | [protected] |
Check if query starts with image: prefix.
Definition at line 793 of file SpecialSearch.php.
References $wgContLang.
Referenced by formHeader(), and setupPage().
1.5.9