MediaWiki  1.23.2
ApiQuerySearch.php
Go to the documentation of this file.
1 <?php
33 
40  const BACKEND_NULL_PARAM = 'database-backed';
41 
42  public function __construct( $query, $moduleName ) {
43  parent::__construct( $query, $moduleName, 'sr' );
44  }
45 
46  public function execute() {
47  $this->run();
48  }
49 
50  public function executeGenerator( $resultPageSet ) {
51  $this->run( $resultPageSet );
52  }
53 
58  private function run( $resultPageSet = null ) {
60  $params = $this->extractRequestParams();
61 
62  // Extract parameters
63  $limit = $params['limit'];
64  $query = $params['search'];
65  $what = $params['what'];
66  $interwiki = $params['interwiki'];
67  $searchInfo = array_flip( $params['info'] );
68  $prop = array_flip( $params['prop'] );
69 
70  // Create search engine instance and set options
71  $search = isset( $params['backend'] ) && $params['backend'] != self::BACKEND_NULL_PARAM ?
73  $search->setLimitOffset( $limit + 1, $params['offset'] );
74  $search->setNamespaces( $params['namespace'] );
75 
76  $query = $search->transformSearchTerm( $query );
77  $query = $search->replacePrefixes( $query );
78 
79  // Perform the actual search
80  if ( $what == 'text' ) {
81  $matches = $search->searchText( $query );
82  } elseif ( $what == 'title' ) {
83  $matches = $search->searchTitle( $query );
84  } elseif ( $what == 'nearmatch' ) {
86  } else {
87  // We default to title searches; this is a terrible legacy
88  // of the way we initially set up the MySQL fulltext-based
89  // search engine with separate title and text fields.
90  // In the future, the default should be for a combined index.
91  $what = 'title';
92  $matches = $search->searchTitle( $query );
93 
94  // Not all search engines support a separate title search,
95  // for instance the Lucene-based engine we use on Wikipedia.
96  // In this case, fall back to full-text search (which will
97  // include titles in it!)
98  if ( is_null( $matches ) ) {
99  $what = 'text';
100  $matches = $search->searchText( $query );
101  }
102  }
103  if ( is_null( $matches ) ) {
104  $this->dieUsage( "{$what} search is disabled", "search-{$what}-disabled" );
105  } elseif ( $matches instanceof Status && !$matches->isGood() ) {
106  $this->dieUsage( $matches->getWikiText(), 'search-error' );
107  }
108 
109  $apiResult = $this->getResult();
110  // Add search meta data to result
111  if ( isset( $searchInfo['totalhits'] ) ) {
112  $totalhits = $matches->getTotalHits();
113  if ( $totalhits !== null ) {
114  $apiResult->addValue( array( 'query', 'searchinfo' ),
115  'totalhits', $totalhits );
116  }
117  }
118  if ( isset( $searchInfo['suggestion'] ) && $matches->hasSuggestion() ) {
119  $apiResult->addValue( array( 'query', 'searchinfo' ),
120  'suggestion', $matches->getSuggestionQuery() );
121  }
122 
123  // Add the search results to the result
124  $terms = $wgContLang->convertForSearchResult( $matches->termMatches() );
125  $titles = array();
126  $count = 0;
127  $result = $matches->next();
128 
129  while ( $result ) {
130  if ( ++$count > $limit ) {
131  // We've reached the one extra which shows that there are
132  // additional items to be had. Stop here...
133  $this->setContinueEnumParameter( 'offset', $params['offset'] + $params['limit'] );
134  break;
135  }
136 
137  // Silently skip broken and missing titles
138  if ( $result->isBrokenTitle() || $result->isMissingRevision() ) {
139  $result = $matches->next();
140  continue;
141  }
142 
143  $title = $result->getTitle();
144  if ( is_null( $resultPageSet ) ) {
145  $vals = array();
147 
148  if ( isset( $prop['snippet'] ) ) {
149  $vals['snippet'] = $result->getTextSnippet( $terms );
150  }
151  if ( isset( $prop['size'] ) ) {
152  $vals['size'] = $result->getByteSize();
153  }
154  if ( isset( $prop['wordcount'] ) ) {
155  $vals['wordcount'] = $result->getWordCount();
156  }
157  if ( isset( $prop['timestamp'] ) ) {
158  $vals['timestamp'] = wfTimestamp( TS_ISO_8601, $result->getTimestamp() );
159  }
160  if ( !is_null( $result->getScore() ) && isset( $prop['score'] ) ) {
161  $vals['score'] = $result->getScore();
162  }
163  if ( isset( $prop['titlesnippet'] ) ) {
164  $vals['titlesnippet'] = $result->getTitleSnippet( $terms );
165  }
166  if ( !is_null( $result->getRedirectTitle() ) ) {
167  if ( isset( $prop['redirecttitle'] ) ) {
168  $vals['redirecttitle'] = $result->getRedirectTitle();
169  }
170  if ( isset( $prop['redirectsnippet'] ) ) {
171  $vals['redirectsnippet'] = $result->getRedirectSnippet( $terms );
172  }
173  }
174  if ( !is_null( $result->getSectionTitle() ) ) {
175  if ( isset( $prop['sectiontitle'] ) ) {
176  $vals['sectiontitle'] = $result->getSectionTitle()->getFragment();
177  }
178  if ( isset( $prop['sectionsnippet'] ) ) {
179  $vals['sectionsnippet'] = $result->getSectionSnippet();
180  }
181  }
182  if ( isset( $prop['hasrelated'] ) && $result->hasRelated() ) {
183  $vals['hasrelated'] = '';
184  }
185 
186  // Add item to results and see whether it fits
187  $fit = $apiResult->addValue( array( 'query', $this->getModuleName() ),
188  null, $vals );
189  if ( !$fit ) {
190  $this->setContinueEnumParameter( 'offset', $params['offset'] + $count - 1 );
191  break;
192  }
193  } else {
194  $titles[] = $title;
195  }
196 
197  $result = $matches->next();
198  }
199 
200  $hasInterwikiResults = false;
201  if ( $interwiki && $resultPageSet === null && $matches->hasInterwikiResults() ) {
202  $matches = $matches->getInterwikiResults();
203  $iwprefixes = array();
204  $hasInterwikiResults = true;
205 
206  // Include number of results if requested
207  if ( isset( $searchInfo['totalhits'] ) ) {
208  $totalhits = $matches->getTotalHits();
209  if ( $totalhits !== null ) {
210  $apiResult->addValue( array( 'query', 'interwikisearchinfo' ),
211  'totalhits', $totalhits );
212  }
213  }
214 
215  $result = $matches->next();
216  while ( $result ) {
217  $title = $result->getTitle();
218  $vals = array(
219  'namespace' => $result->getInterwikiNamespaceText(),
220  'title' => $title->getText(),
221  'url' => $title->getFullUrl(),
222  );
223 
224  // Add item to results and see whether it fits
225  $fit = $apiResult->addValue( array( 'query', 'interwiki' . $this->getModuleName(), $result->getInterwikiPrefix() ),
226  null, $vals );
227  if ( !$fit ) {
228  // We hit the limit. We can't really provide any meaningful
229  // pagination info so just bail out
230  break;
231  }
232 
233  $result = $matches->next();
234  }
235  }
236 
237  if ( is_null( $resultPageSet ) ) {
238  $apiResult->setIndexedTagName_internal( array(
239  'query', $this->getModuleName()
240  ), 'p' );
241  if ( $hasInterwikiResults ) {
242  $apiResult->setIndexedTagName_internal( array(
243  'query', 'interwiki' . $this->getModuleName()
244  ), 'p' );
245  }
246  } else {
247  $resultPageSet->populateFromTitles( $titles );
248  }
249  }
250 
251  public function getCacheMode( $params ) {
252  return 'public';
253  }
254 
255  public function getAllowedParams() {
256  global $wgSearchType;
257 
258  $params = array(
259  'search' => array(
260  ApiBase::PARAM_TYPE => 'string',
262  ),
263  'namespace' => array(
265  ApiBase::PARAM_TYPE => 'namespace',
266  ApiBase::PARAM_ISMULTI => true,
267  ),
268  'what' => array(
269  ApiBase::PARAM_DFLT => null,
271  'title',
272  'text',
273  'nearmatch',
274  )
275  ),
276  'info' => array(
277  ApiBase::PARAM_DFLT => 'totalhits|suggestion',
279  'totalhits',
280  'suggestion',
281  ),
282  ApiBase::PARAM_ISMULTI => true,
283  ),
284  'prop' => array(
285  ApiBase::PARAM_DFLT => 'size|wordcount|timestamp|snippet',
287  'size',
288  'wordcount',
289  'timestamp',
290  'score',
291  'snippet',
292  'titlesnippet',
293  'redirecttitle',
294  'redirectsnippet',
295  'sectiontitle',
296  'sectionsnippet',
297  'hasrelated',
298  ),
299  ApiBase::PARAM_ISMULTI => true,
300  ),
301  'offset' => 0,
302  'limit' => array(
303  ApiBase::PARAM_DFLT => 10,
304  ApiBase::PARAM_TYPE => 'limit',
305  ApiBase::PARAM_MIN => 1,
308  ),
309  'interwiki' => false,
310  );
311 
312  $alternatives = SearchEngine::getSearchTypes();
313  if ( count( $alternatives ) > 1 ) {
314  if ( $alternatives[0] === null ) {
315  $alternatives[0] = self::BACKEND_NULL_PARAM;
316  }
317  $params['backend'] = array(
318  ApiBase::PARAM_DFLT => $wgSearchType,
319  ApiBase::PARAM_TYPE => $alternatives,
320  );
321  }
322 
323  return $params;
324  }
325 
326  public function getParamDescription() {
327  $descriptions = array(
328  'search' => 'Search for all page titles (or content) that has this value',
329  'namespace' => 'The namespace(s) to enumerate',
330  'what' => 'Search inside the text or titles',
331  'info' => 'What metadata to return',
332  'prop' => array(
333  'What properties to return',
334  ' size - Adds the size of the page in bytes',
335  ' wordcount - Adds the word count of the page',
336  ' timestamp - Adds the timestamp of when the page was last edited',
337  ' score - Adds the score (if any) from the search engine',
338  ' snippet - Adds a parsed snippet of the page',
339  ' titlesnippet - Adds a parsed snippet of the page title',
340  ' redirectsnippet - Adds a parsed snippet of the redirect title',
341  ' redirecttitle - Adds the title of the matching redirect',
342  ' sectionsnippet - Adds a parsed snippet of the matching section title',
343  ' sectiontitle - Adds the title of the matching section',
344  ' hasrelated - Indicates whether a related search is available',
345  ),
346  'offset' => 'Use this value to continue paging (return by query)',
347  'limit' => 'How many total pages to return',
348  'interwiki' => 'Include interwiki results in the search, if available'
349  );
350 
351  if ( count( SearchEngine::getSearchTypes() ) > 1 ) {
352  $descriptions['backend'] = 'Which search backend to use, if not the default';
353  }
354 
355  return $descriptions;
356  }
357 
358  public function getResultProperties() {
359  return array(
360  '' => array(
361  'ns' => 'namespace',
362  'title' => 'string'
363  ),
364  'snippet' => array(
365  'snippet' => 'string'
366  ),
367  'size' => array(
368  'size' => 'integer'
369  ),
370  'wordcount' => array(
371  'wordcount' => 'integer'
372  ),
373  'timestamp' => array(
374  'timestamp' => 'timestamp'
375  ),
376  'score' => array(
377  'score' => array(
378  ApiBase::PROP_TYPE => 'string',
379  ApiBase::PROP_NULLABLE => true
380  )
381  ),
382  'titlesnippet' => array(
383  'titlesnippet' => 'string'
384  ),
385  'redirecttitle' => array(
386  'redirecttitle' => array(
387  ApiBase::PROP_TYPE => 'string',
388  ApiBase::PROP_NULLABLE => true
389  )
390  ),
391  'redirectsnippet' => array(
392  'redirectsnippet' => array(
393  ApiBase::PROP_TYPE => 'string',
394  ApiBase::PROP_NULLABLE => true
395  )
396  ),
397  'sectiontitle' => array(
398  'sectiontitle' => array(
399  ApiBase::PROP_TYPE => 'string',
400  ApiBase::PROP_NULLABLE => true
401  )
402  ),
403  'sectionsnippet' => array(
404  'sectionsnippet' => array(
405  ApiBase::PROP_TYPE => 'string',
406  ApiBase::PROP_NULLABLE => true
407  )
408  ),
409  'hasrelated' => array(
410  'hasrelated' => 'boolean'
411  )
412  );
413  }
414 
415  public function getDescription() {
416  return 'Perform a full text search.';
417  }
418 
419  public function getPossibleErrors() {
420  return array_merge( parent::getPossibleErrors(), array(
421  array( 'code' => 'search-text-disabled', 'info' => 'text search is disabled' ),
422  array( 'code' => 'search-title-disabled', 'info' => 'title search is disabled' ),
423  array( 'code' => 'search-error', 'info' => 'search error has occurred' ),
424  ) );
425  }
426 
427  public function getExamples() {
428  return array(
429  'api.php?action=query&list=search&srsearch=meaning',
430  'api.php?action=query&list=search&srwhat=text&srsearch=meaning',
431  'api.php?action=query&generator=search&gsrsearch=meaning&prop=info',
432  );
433  }
434 
435  public function getHelpUrls() {
436  return 'https://www.mediawiki.org/wiki/API:Search';
437  }
438 }
ApiQuerySearch\run
run( $resultPageSet=null)
Definition: ApiQuerySearch.php:58
$result
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
Definition: hooks.txt:1528
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
ApiBase\PARAM_REQUIRED
const PARAM_REQUIRED
Definition: ApiBase.php:62
ApiQuerySearch\BACKEND_NULL_PARAM
const BACKEND_NULL_PARAM
When $wgSearchType is null, $wgSearchAlternatives[0] is null.
Definition: ApiQuerySearch.php:40
ApiQuerySearch\getExamples
getExamples()
Returns usage examples for this module.
Definition: ApiQuerySearch.php:427
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:2483
ApiBase\PARAM_TYPE
const PARAM_TYPE
Definition: ApiBase.php:50
ApiBase\getResult
getResult()
Get the result object.
Definition: ApiBase.php:205
$params
$params
Definition: styleTest.css.php:40
$limit
if( $sleep) $limit
Definition: importImages.php:99
ApiQuerySearch\getPossibleErrors
getPossibleErrors()
Definition: ApiQuerySearch.php:419
$wgContLang
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
Definition: design.txt:56
Status
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Definition: Status.php:40
ApiQuerySearch\executeGenerator
executeGenerator( $resultPageSet)
Execute this module as a generator.
Definition: ApiQuerySearch.php:50
NS_MAIN
const NS_MAIN
Definition: Defines.php:79
ApiQueryGeneratorBase\setContinueEnumParameter
setContinueEnumParameter( $paramName, $paramValue)
Overrides base in case of generator & smart continue to notify ApiQueryMain instead of adding them to...
Definition: ApiQueryBase.php:676
ApiBase\PARAM_MIN
const PARAM_MIN
Definition: ApiBase.php:56
ApiQuerySearch\getAllowedParams
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
Definition: ApiQuerySearch.php:255
ApiQuerySearch\getParamDescription
getParamDescription()
Returns an array of parameter descriptions.
Definition: ApiQuerySearch.php:326
$titles
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed and for links in the navigation areas of the skin The link cache was formerly used to track links used in a document for the purposes of updating the link tables This application is now deprecated To create a you can use the following $titles
Definition: linkcache.txt:17
TS_ISO_8601
const TS_ISO_8601
ISO 8601 format with no timezone: 1986-02-09T20:00:00Z.
Definition: GlobalFunctions.php:2448
ApiBase\PARAM_MAX
const PARAM_MAX
Definition: ApiBase.php:52
ApiQuerySearch\execute
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
Definition: ApiQuerySearch.php:46
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
ApiBase\PROP_TYPE
const PROP_TYPE
Definition: ApiBase.php:74
ApiBase\extractRequestParams
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
Definition: ApiBase.php:687
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
SearchEngine\getNearMatchResultSet
static getNearMatchResultSet( $searchterm)
Do a near match (see SearchEngine::getNearMatch) and wrap it into a SearchResultSet.
Definition: SearchEngine.php:136
$matches
if(!defined( 'MEDIAWIKI')) if(!isset( $wgVersion)) $matches
Definition: NoLocalSettings.php:33
ApiBase\LIMIT_SML2
const LIMIT_SML2
Definition: ApiBase.php:81
ApiBase\dieUsage
dieUsage( $description, $errorCode, $httpRespCode=0, $extradata=null)
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an...
Definition: ApiBase.php:1363
ApiQuerySearch\getDescription
getDescription()
Returns the description string for this module.
Definition: ApiQuerySearch.php:415
ApiQuerySearch\getCacheMode
getCacheMode( $params)
Get the cache mode for the data generated by this module.
Definition: ApiQuerySearch.php:251
ApiBase\PROP_NULLABLE
const PROP_NULLABLE
Definition: ApiBase.php:76
$count
$count
Definition: UtfNormalTest2.php:96
ApiQueryGeneratorBase
Definition: ApiQueryBase.php:626
ApiQuerySearch
Query module to perform full text search within wiki titles and content.
Definition: ApiQuerySearch.php:32
ApiQuerySearch\__construct
__construct( $query, $moduleName)
Definition: ApiQuerySearch.php:42
ApiBase\PARAM_DFLT
const PARAM_DFLT
Definition: ApiBase.php:46
ApiBase\getModuleName
getModuleName()
Get the name of the module being executed by this instance.
Definition: ApiBase.php:148
ApiBase\PARAM_ISMULTI
const PARAM_ISMULTI
Definition: ApiBase.php:48
ApiQuerySearch\getResultProperties
getResultProperties()
Returns possible properties in the result, grouped by the value of the prop parameter that shows them...
Definition: ApiQuerySearch.php:358
ApiBase\PARAM_MAX2
const PARAM_MAX2
Definition: ApiBase.php:54
$query
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition: hooks.txt:1105
ApiQuerySearch\getHelpUrls
getHelpUrls()
Definition: ApiQuerySearch.php:435
SearchEngine\create
static create( $type=null)
Load up the appropriate search engine class for the currently active database backend,...
Definition: SearchEngine.php:447
SearchEngine\getSearchTypes
static getSearchTypes()
Return the search engines we support.
Definition: SearchEngine.php:472
ApiQueryBase\addTitleInfo
static addTitleInfo(&$arr, $title, $prefix='')
Add information (title and namespace) about a Title object to a result array.
Definition: ApiQueryBase.php:339
ApiBase\LIMIT_SML1
const LIMIT_SML1
Definition: ApiBase.php:80