MediaWiki  1.27.2
ApiQuerySearch.php
Go to the documentation of this file.
1 <?php
28 
35 
42  const BACKEND_NULL_PARAM = 'database-backed';
43 
44  public function __construct( ApiQuery $query, $moduleName ) {
45  parent::__construct( $query, $moduleName, 'sr' );
46  }
47 
48  public function execute() {
49  $this->run();
50  }
51 
52  public function executeGenerator( $resultPageSet ) {
53  $this->run( $resultPageSet );
54  }
55 
60  private function run( $resultPageSet = null ) {
62  $params = $this->extractRequestParams();
63 
64  // Extract parameters
65  $limit = $params['limit'];
66  $query = $params['search'];
67  $what = $params['what'];
68  $interwiki = $params['interwiki'];
69  $searchInfo = array_flip( $params['info'] );
70  $prop = array_flip( $params['prop'] );
71 
72  // Deprecated parameters
73  if ( isset( $prop['hasrelated'] ) ) {
74  $this->logFeatureUsage( 'action=search&srprop=hasrelated' );
75  $this->setWarning( 'srprop=hasrelated has been deprecated' );
76  }
77  if ( isset( $prop['score'] ) ) {
78  $this->logFeatureUsage( 'action=search&srprop=score' );
79  $this->setWarning( 'srprop=score has been deprecated' );
80  }
81 
82  // Create search engine instance and set options
83  $type = isset( $params['backend'] ) && $params['backend'] != self::BACKEND_NULL_PARAM ?
84  $params['backend'] : null;
85  $search = MediaWikiServices::getInstance()->getSearchEngineFactory()->create( $type );
86  $search->setLimitOffset( $limit + 1, $params['offset'] );
87  $search->setNamespaces( $params['namespace'] );
88  $search->setFeatureData( 'rewrite', (bool)$params['enablerewrites'] );
89 
90  $query = $search->transformSearchTerm( $query );
91  $query = $search->replacePrefixes( $query );
92 
93  // Perform the actual search
94  if ( $what == 'text' ) {
95  $matches = $search->searchText( $query );
96  } elseif ( $what == 'title' ) {
97  $matches = $search->searchTitle( $query );
98  } elseif ( $what == 'nearmatch' ) {
99  // near matches must receive the user input as provided, otherwise
100  // the near matches within namespaces are lost.
101  $matches = $search->getNearMatcher( $this->getConfig() )
102  ->getNearMatchResultSet( $params['search'] );
103  } else {
104  // We default to title searches; this is a terrible legacy
105  // of the way we initially set up the MySQL fulltext-based
106  // search engine with separate title and text fields.
107  // In the future, the default should be for a combined index.
108  $what = 'title';
109  $matches = $search->searchTitle( $query );
110 
111  // Not all search engines support a separate title search,
112  // for instance the Lucene-based engine we use on Wikipedia.
113  // In this case, fall back to full-text search (which will
114  // include titles in it!)
115  if ( is_null( $matches ) ) {
116  $what = 'text';
117  $matches = $search->searchText( $query );
118  }
119  }
120  if ( is_null( $matches ) ) {
121  $this->dieUsage( "{$what} search is disabled", "search-{$what}-disabled" );
122  } elseif ( $matches instanceof Status && !$matches->isGood() ) {
123  $this->dieUsage( $matches->getWikiText( false, false, 'en' ), 'search-error' );
124  }
125 
126  if ( $resultPageSet === null ) {
127  $apiResult = $this->getResult();
128  // Add search meta data to result
129  if ( isset( $searchInfo['totalhits'] ) ) {
130  $totalhits = $matches->getTotalHits();
131  if ( $totalhits !== null ) {
132  $apiResult->addValue( [ 'query', 'searchinfo' ],
133  'totalhits', $totalhits );
134  }
135  }
136  if ( isset( $searchInfo['suggestion'] ) && $matches->hasSuggestion() ) {
137  $apiResult->addValue( [ 'query', 'searchinfo' ],
138  'suggestion', $matches->getSuggestionQuery() );
139  $apiResult->addValue( [ 'query', 'searchinfo' ],
140  'suggestionsnippet', $matches->getSuggestionSnippet() );
141  }
142  if ( isset( $searchInfo['rewrittenquery'] ) && $matches->hasRewrittenQuery() ) {
143  $apiResult->addValue( [ 'query', 'searchinfo' ],
144  'rewrittenquery', $matches->getQueryAfterRewrite() );
145  $apiResult->addValue( [ 'query', 'searchinfo' ],
146  'rewrittenquerysnippet', $matches->getQueryAfterRewriteSnippet() );
147  }
148  }
149 
150  // Add the search results to the result
151  $terms = $wgContLang->convertForSearchResult( $matches->termMatches() );
152  $titles = [];
153  $count = 0;
154  $result = $matches->next();
155 
156  while ( $result ) {
157  if ( ++$count > $limit ) {
158  // We've reached the one extra which shows that there are
159  // additional items to be had. Stop here...
160  $this->setContinueEnumParameter( 'offset', $params['offset'] + $params['limit'] );
161  break;
162  }
163 
164  // Silently skip broken and missing titles
165  if ( $result->isBrokenTitle() || $result->isMissingRevision() ) {
166  $result = $matches->next();
167  continue;
168  }
169 
170  $title = $result->getTitle();
171  if ( $resultPageSet === null ) {
172  $vals = [];
174 
175  if ( isset( $prop['snippet'] ) ) {
176  $vals['snippet'] = $result->getTextSnippet( $terms );
177  }
178  if ( isset( $prop['size'] ) ) {
179  $vals['size'] = $result->getByteSize();
180  }
181  if ( isset( $prop['wordcount'] ) ) {
182  $vals['wordcount'] = $result->getWordCount();
183  }
184  if ( isset( $prop['timestamp'] ) ) {
185  $vals['timestamp'] = wfTimestamp( TS_ISO_8601, $result->getTimestamp() );
186  }
187  if ( isset( $prop['titlesnippet'] ) ) {
188  $vals['titlesnippet'] = $result->getTitleSnippet();
189  }
190  if ( isset( $prop['categorysnippet'] ) ) {
191  $vals['categorysnippet'] = $result->getCategorySnippet();
192  }
193  if ( !is_null( $result->getRedirectTitle() ) ) {
194  if ( isset( $prop['redirecttitle'] ) ) {
195  $vals['redirecttitle'] = $result->getRedirectTitle()->getPrefixedText();
196  }
197  if ( isset( $prop['redirectsnippet'] ) ) {
198  $vals['redirectsnippet'] = $result->getRedirectSnippet();
199  }
200  }
201  if ( !is_null( $result->getSectionTitle() ) ) {
202  if ( isset( $prop['sectiontitle'] ) ) {
203  $vals['sectiontitle'] = $result->getSectionTitle()->getFragment();
204  }
205  if ( isset( $prop['sectionsnippet'] ) ) {
206  $vals['sectionsnippet'] = $result->getSectionSnippet();
207  }
208  }
209  if ( isset( $prop['isfilematch'] ) ) {
210  $vals['isfilematch'] = $result->isFileMatch();
211  }
212 
213  // Add item to results and see whether it fits
214  $fit = $apiResult->addValue( [ 'query', $this->getModuleName() ],
215  null, $vals );
216  if ( !$fit ) {
217  $this->setContinueEnumParameter( 'offset', $params['offset'] + $count - 1 );
218  break;
219  }
220  } else {
221  $titles[] = $title;
222  }
223 
224  $result = $matches->next();
225  }
226 
227  $hasInterwikiResults = false;
228  $totalhits = null;
229  if ( $interwiki && $resultPageSet === null && $matches->hasInterwikiResults() ) {
230  foreach ( $matches->getInterwikiResults() as $matches ) {
231  $matches = $matches->getInterwikiResults();
232  $hasInterwikiResults = true;
233 
234  // Include number of results if requested
235  if ( $resultPageSet === null && isset( $searchInfo['totalhits'] ) ) {
236  $totalhits += $matches->getTotalHits();
237  }
238 
239  $result = $matches->next();
240  while ( $result ) {
241  $title = $result->getTitle();
242 
243  if ( $resultPageSet === null ) {
244  $vals = [
245  'namespace' => $result->getInterwikiNamespaceText(),
246  'title' => $title->getText(),
247  'url' => $title->getFullUrl(),
248  ];
249 
250  // Add item to results and see whether it fits
251  $fit = $apiResult->addValue(
252  [ 'query', 'interwiki' . $this->getModuleName(), $result->getInterwikiPrefix() ],
253  null,
254  $vals
255  );
256 
257  if ( !$fit ) {
258  // We hit the limit. We can't really provide any meaningful
259  // pagination info so just bail out
260  break;
261  }
262  } else {
263  $titles[] = $title;
264  }
265 
266  $result = $matches->next();
267  }
268  }
269  if ( $totalhits !== null ) {
270  $apiResult->addValue( [ 'query', 'interwikisearchinfo' ],
271  'totalhits', $totalhits );
272  }
273  }
274 
275  if ( $resultPageSet === null ) {
276  $apiResult->addIndexedTagName( [
277  'query', $this->getModuleName()
278  ], 'p' );
279  if ( $hasInterwikiResults ) {
280  $apiResult->addIndexedTagName( [
281  'query', 'interwiki' . $this->getModuleName()
282  ], 'p' );
283  }
284  } else {
285  $resultPageSet->setRedirectMergePolicy( function ( $current, $new ) {
286  if ( !isset( $current['index'] ) || $new['index'] < $current['index'] ) {
287  $current['index'] = $new['index'];
288  }
289  return $current;
290  } );
291  $resultPageSet->populateFromTitles( $titles );
292  $offset = $params['offset'] + 1;
293  foreach ( $titles as $index => $title ) {
294  $resultPageSet->setGeneratorData( $title, [ 'index' => $index + $offset ] );
295  }
296  }
297  }
298 
299  public function getCacheMode( $params ) {
300  return 'public';
301  }
302 
303  public function getAllowedParams() {
304  $params = [
305  'search' => [
306  ApiBase::PARAM_TYPE => 'string',
308  ],
309  'namespace' => [
311  ApiBase::PARAM_TYPE => 'namespace',
312  ApiBase::PARAM_ISMULTI => true,
313  ],
314  'what' => [
315  ApiBase::PARAM_TYPE => [
316  'title',
317  'text',
318  'nearmatch',
319  ]
320  ],
321  'info' => [
322  ApiBase::PARAM_DFLT => 'totalhits|suggestion|rewrittenquery',
323  ApiBase::PARAM_TYPE => [
324  'totalhits',
325  'suggestion',
326  'rewrittenquery',
327  ],
328  ApiBase::PARAM_ISMULTI => true,
329  ],
330  'prop' => [
331  ApiBase::PARAM_DFLT => 'size|wordcount|timestamp|snippet',
332  ApiBase::PARAM_TYPE => [
333  'size',
334  'wordcount',
335  'timestamp',
336  'snippet',
337  'titlesnippet',
338  'redirecttitle',
339  'redirectsnippet',
340  'sectiontitle',
341  'sectionsnippet',
342  'isfilematch',
343  'categorysnippet',
344  'score', // deprecated
345  'hasrelated', // deprecated
346  ],
347  ApiBase::PARAM_ISMULTI => true,
349  ],
350  'offset' => [
351  ApiBase::PARAM_DFLT => 0,
352  ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
353  ],
354  'limit' => [
355  ApiBase::PARAM_DFLT => 10,
356  ApiBase::PARAM_TYPE => 'limit',
357  ApiBase::PARAM_MIN => 1,
360  ],
361  'interwiki' => false,
362  'enablerewrites' => false,
363  ];
364 
365  $searchConfig = MediaWikiServices::getInstance()->getSearchEngineConfig();
366  $alternatives = $searchConfig->getSearchTypes();
367  if ( count( $alternatives ) > 1 ) {
368  if ( $alternatives[0] === null ) {
369  $alternatives[0] = self::BACKEND_NULL_PARAM;
370  }
371  $params['backend'] = [
372  ApiBase::PARAM_DFLT => $searchConfig->getSearchType(),
373  ApiBase::PARAM_TYPE => $alternatives,
374  ];
375  }
376 
377  return $params;
378  }
379 
380  protected function getExamplesMessages() {
381  return [
382  'action=query&list=search&srsearch=meaning'
383  => 'apihelp-query+search-example-simple',
384  'action=query&list=search&srwhat=text&srsearch=meaning'
385  => 'apihelp-query+search-example-text',
386  'action=query&generator=search&gsrsearch=meaning&prop=info'
387  => 'apihelp-query+search-example-generator',
388  ];
389  }
390 
391  public function getHelpUrls() {
392  return 'https://www.mediawiki.org/wiki/API:Search';
393  }
394 }
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below...
Definition: ApiBase.php:88
const LIMIT_BIG2
Fast query, apihighlimits limit.
Definition: ApiBase.php:186
run($resultPageSet=null)
null for the local wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition: hooks.txt:1418
getResult()
Get the result object.
Definition: ApiBase.php:584
const NS_MAIN
Definition: Defines.php:69
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
const PARAM_DFLT
(null|boolean|integer|string) Default value of the parameter.
Definition: ApiBase.php:50
const LIMIT_BIG1
Fast query, standard limit.
Definition: ApiBase.php:184
const PARAM_MAX
(integer) Max value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
Definition: ApiBase.php:91
const PARAM_REQUIRED
(boolean) Is the parameter required?
Definition: ApiBase.php:112
extractRequestParams($parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user...
Definition: ApiBase.php:685
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency MediaWikiServices
Definition: injection.txt:23
const PARAM_HELP_MSG_PER_VALUE
((string|array|Message)[]) When PARAM_TYPE is an array, this is an array mapping those values to $msg...
Definition: ApiBase.php:157
getCacheMode($params)
setContinueEnumParameter($paramName, $paramValue)
Overridden to set the generator param if in generator mode.
when a variable name is used in a it is silently declared as a new local masking the global
Definition: design.txt:93
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.Return false to stop further processing of the tag $reader:XMLReader object $logInfo:Array of information 'ImportHandlePageXMLTag':When parsing a XML tag in a page.Return false to stop further processing of the tag $reader:XMLReader object &$pageInfo:Array of information 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision.Return false to stop further processing of the tag $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information 'ImportHandleToplevelXMLTag':When parsing a top level XML tag.Return false to stop further processing of the tag $reader:XMLReader object 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload.Return false to stop further processing of the tag $reader:XMLReader object $revisionInfo:Array of information 'ImportLogInterwikiLink':Hook to change the interwiki link used in log entries and edit summaries for transwiki imports.&$fullInterwikiPrefix:Interwiki prefix, may contain colons.&$pageTitle:String that contains page title. 'ImportSources':Called when reading from the $wgImportSources configuration variable.Can be used to lazy-load the import sources list.&$importSources:The value of $wgImportSources.Modify as necessary.See the comment in DefaultSettings.php for the detail of how to structure this array. '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 '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 '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 '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. '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 IP::isTrustedProxy() &$ip:IP being check &$result:Change this value to override the result of IP::isTrustedProxy() '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 Sanitizer::validateEmail(), 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. '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) '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 '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. 'LanguageSelector':Hook to change the language selector available on a page.$out:The output page.$cssClassName:CSS class name of the language selector. '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:1796
wfTimestamp($outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
Definition: hooks.txt:1798
__construct(ApiQuery $query, $moduleName)
const TS_ISO_8601
ISO 8601 format with no timezone: 1986-02-09T20:00:00Z.
getConfig()
Get the Config object.
$params
namespace and then decline to actually register it file or subcat img or subcat $title
Definition: hooks.txt:912
getModuleName()
Get the name of the module being executed by this instance.
Definition: ApiBase.php:464
const PARAM_MAX2
(integer) Max value allowed for the parameter for users with the apihighlimits right, for PARAM_TYPE 'limit'.
Definition: ApiBase.php:97
This is the main query class.
Definition: ApiQuery.php:38
setWarning($warning)
Set warning section for this module.
Definition: ApiBase.php:1495
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter...
Definition: ApiBase.php:125
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
executeGenerator($resultPageSet)
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
const PARAM_ISMULTI
(boolean) Accept multiple pipe-separated values for this parameter (e.g.
Definition: ApiBase.php:53
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:1526
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context the output can only depend on parameters provided to this hook not on global state indicating whether full HTML should be generated If generation of HTML may be but other information should still be present in the ParserOutput object to manipulate or replace but no entry for that model exists in $wgContentHandlers if desired whether it is OK to use $contentModel on $title Handler functions that modify $ok should generally return false to prevent further hooks from further modifying $ok inclusive $limit
Definition: hooks.txt:1004
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 local content language as $wgContLang
Definition: design.txt:56
$count
const PARAM_MIN
(integer) Lowest value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
Definition: ApiBase.php:100
logFeatureUsage($feature)
Write logging information for API features to a debug log, for usage analysis.
Definition: ApiBase.php:2239
static addTitleInfo(&$arr, $title, $prefix= '')
Add information (title and namespace) about a Title object to a result array.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values before the output is cached one of or reset my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled allows for interception of redirect as a string mapping parameter names to values & $type
Definition: hooks.txt:2338
const BACKEND_NULL_PARAM
When $wgSearchType is null, $wgSearchAlternatives[0] is null.
Query module to perform full text search within wiki titles and content.
$matches