MediaWiki  1.23.2
ApiQueryCategoryMembers.php
Go to the documentation of this file.
1 <?php
33 
34  public function __construct( $query, $moduleName ) {
35  parent::__construct( $query, $moduleName, 'cm' );
36  }
37 
38  public function execute() {
39  $this->run();
40  }
41 
42  public function getCacheMode( $params ) {
43  return 'public';
44  }
45 
46  public function executeGenerator( $resultPageSet ) {
47  $this->run( $resultPageSet );
48  }
49 
54  private function run( $resultPageSet = null ) {
55  $params = $this->extractRequestParams();
56 
57  $categoryTitle = $this->getTitleOrPageId( $params )->getTitle();
58  if ( $categoryTitle->getNamespace() != NS_CATEGORY ) {
59  $this->dieUsage( 'The category name you entered is not valid', 'invalidcategory' );
60  }
61 
62  $prop = array_flip( $params['prop'] );
63  $fld_ids = isset( $prop['ids'] );
64  $fld_title = isset( $prop['title'] );
65  $fld_sortkey = isset( $prop['sortkey'] );
66  $fld_sortkeyprefix = isset( $prop['sortkeyprefix'] );
67  $fld_timestamp = isset( $prop['timestamp'] );
68  $fld_type = isset( $prop['type'] );
69 
70  if ( is_null( $resultPageSet ) ) {
71  $this->addFields( array( 'cl_from', 'cl_sortkey', 'cl_type', 'page_namespace', 'page_title' ) );
72  $this->addFieldsIf( 'page_id', $fld_ids );
73  $this->addFieldsIf( 'cl_sortkey_prefix', $fld_sortkeyprefix );
74  } else {
75  $this->addFields( $resultPageSet->getPageTableFields() ); // will include page_ id, ns, title
76  $this->addFields( array( 'cl_from', 'cl_sortkey', 'cl_type' ) );
77  }
78 
79  $this->addFieldsIf( 'cl_timestamp', $fld_timestamp || $params['sort'] == 'timestamp' );
80 
81  $this->addTables( array( 'page', 'categorylinks' ) ); // must be in this order for 'USE INDEX'
82 
83  $this->addWhereFld( 'cl_to', $categoryTitle->getDBkey() );
84  $queryTypes = $params['type'];
85  $contWhere = false;
86 
87  // Scanning large datasets for rare categories sucks, and I already told
88  // how to have efficient subcategory access :-) ~~~~ (oh well, domas)
89  global $wgMiserMode;
90  $miser_ns = array();
91  if ( $wgMiserMode ) {
92  $miser_ns = $params['namespace'];
93  } else {
94  $this->addWhereFld( 'page_namespace', $params['namespace'] );
95  }
96 
97  $dir = in_array( $params['dir'], array( 'asc', 'ascending', 'newer' ) ) ? 'newer' : 'older';
98 
99  if ( $params['sort'] == 'timestamp' ) {
100  $this->addTimestampWhereRange( 'cl_timestamp',
101  $dir,
102  $params['start'],
103  $params['end'] );
104  // Include in ORDER BY for uniqueness
105  $this->addWhereRange( 'cl_from', $dir, null, null );
106 
107  if ( !is_null( $params['continue'] ) ) {
108  $cont = explode( '|', $params['continue'] );
109  $this->dieContinueUsageIf( count( $cont ) != 2 );
110  $op = ( $dir === 'newer' ? '>' : '<' );
111  $db = $this->getDB();
112  $continueTimestamp = $db->addQuotes( $db->timestamp( $cont[0] ) );
113  $continueFrom = (int)$cont[1];
114  $this->dieContinueUsageIf( $continueFrom != $cont[1] );
115  $this->addWhere( "cl_timestamp $op $continueTimestamp OR " .
116  "(cl_timestamp = $continueTimestamp AND " .
117  "cl_from $op= $continueFrom)"
118  );
119  }
120 
121  $this->addOption( 'USE INDEX', 'cl_timestamp' );
122  } else {
123  if ( $params['continue'] ) {
124  $cont = explode( '|', $params['continue'], 3 );
125  $this->dieContinueUsageIf( count( $cont ) != 3 );
126 
127  // Remove the types to skip from $queryTypes
128  $contTypeIndex = array_search( $cont[0], $queryTypes );
129  $queryTypes = array_slice( $queryTypes, $contTypeIndex );
130 
131  // Add a WHERE clause for sortkey and from
132  // pack( "H*", $foo ) is used to convert hex back to binary
133  $escSortkey = $this->getDB()->addQuotes( pack( 'H*', $cont[1] ) );
134  $from = intval( $cont[2] );
135  $op = $dir == 'newer' ? '>' : '<';
136  // $contWhere is used further down
137  $contWhere = "cl_sortkey $op $escSortkey OR " .
138  "(cl_sortkey = $escSortkey AND " .
139  "cl_from $op= $from)";
140  // The below produces ORDER BY cl_sortkey, cl_from, possibly with DESC added to each of them
141  $this->addWhereRange( 'cl_sortkey', $dir, null, null );
142  $this->addWhereRange( 'cl_from', $dir, null, null );
143  } else {
144  $startsortkey = $params['startsortkeyprefix'] !== null ?
145  Collation::singleton()->getSortkey( $params['startsortkeyprefix'] ) :
146  $params['startsortkey'];
147  $endsortkey = $params['endsortkeyprefix'] !== null ?
148  Collation::singleton()->getSortkey( $params['endsortkeyprefix'] ) :
149  $params['endsortkey'];
150 
151  // The below produces ORDER BY cl_sortkey, cl_from, possibly with DESC added to each of them
152  $this->addWhereRange( 'cl_sortkey',
153  $dir,
154  $startsortkey,
155  $endsortkey );
156  $this->addWhereRange( 'cl_from', $dir, null, null );
157  }
158  $this->addOption( 'USE INDEX', 'cl_sortkey' );
159  }
160 
161  $this->addWhere( 'cl_from=page_id' );
162 
163  $limit = $params['limit'];
164  $this->addOption( 'LIMIT', $limit + 1 );
165 
166  if ( $params['sort'] == 'sortkey' ) {
167  // Run a separate SELECT query for each value of cl_type.
168  // This is needed because cl_type is an enum, and MySQL has
169  // inconsistencies between ORDER BY cl_type and
170  // WHERE cl_type >= 'foo' making proper paging impossible
171  // and unindexed.
172  $rows = array();
173  $first = true;
174  foreach ( $queryTypes as $type ) {
175  $extraConds = array( 'cl_type' => $type );
176  if ( $first && $contWhere ) {
177  // Continuation condition. Only added to the
178  // first query, otherwise we'll skip things
179  $extraConds[] = $contWhere;
180  }
181  $res = $this->select( __METHOD__, array( 'where' => $extraConds ) );
182  $rows = array_merge( $rows, iterator_to_array( $res ) );
183  if ( count( $rows ) >= $limit + 1 ) {
184  break;
185  }
186  $first = false;
187  }
188  } else {
189  // Sorting by timestamp
190  // No need to worry about per-type queries because we
191  // aren't sorting or filtering by type anyway
192  $res = $this->select( __METHOD__ );
193  $rows = iterator_to_array( $res );
194  }
195 
196  $result = $this->getResult();
197  $count = 0;
198  foreach ( $rows as $row ) {
199  if ( ++$count > $limit ) {
200  // We've reached the one extra which shows that there are
201  // additional pages to be had. Stop here...
202  // @todo Security issue - if the user has no right to view next
203  // title, it will still be shown
204  if ( $params['sort'] == 'timestamp' ) {
205  $this->setContinueEnumParameter( 'continue', "$row->cl_timestamp|$row->cl_from" );
206  } else {
207  $sortkey = bin2hex( $row->cl_sortkey );
208  $this->setContinueEnumParameter( 'continue',
209  "{$row->cl_type}|$sortkey|{$row->cl_from}"
210  );
211  }
212  break;
213  }
214 
215  // Since domas won't tell anyone what he told long ago, apply
216  // cmnamespace here. This means the query may return 0 actual
217  // results, but on the other hand it could save returning 5000
218  // useless results to the client. ~~~~
219  if ( count( $miser_ns ) && !in_array( $row->page_namespace, $miser_ns ) ) {
220  continue;
221  }
222 
223  if ( is_null( $resultPageSet ) ) {
224  $vals = array();
225  if ( $fld_ids ) {
226  $vals['pageid'] = intval( $row->page_id );
227  }
228  if ( $fld_title ) {
229  $title = Title::makeTitle( $row->page_namespace, $row->page_title );
231  }
232  if ( $fld_sortkey ) {
233  $vals['sortkey'] = bin2hex( $row->cl_sortkey );
234  }
235  if ( $fld_sortkeyprefix ) {
236  $vals['sortkeyprefix'] = $row->cl_sortkey_prefix;
237  }
238  if ( $fld_type ) {
239  $vals['type'] = $row->cl_type;
240  }
241  if ( $fld_timestamp ) {
242  $vals['timestamp'] = wfTimestamp( TS_ISO_8601, $row->cl_timestamp );
243  }
244  $fit = $result->addValue( array( 'query', $this->getModuleName() ),
245  null, $vals );
246  if ( !$fit ) {
247  if ( $params['sort'] == 'timestamp' ) {
248  $this->setContinueEnumParameter( 'continue', "$row->cl_timestamp|$row->cl_from" );
249  } else {
250  $sortkey = bin2hex( $row->cl_sortkey );
251  $this->setContinueEnumParameter( 'continue',
252  "{$row->cl_type}|$sortkey|{$row->cl_from}"
253  );
254  }
255  break;
256  }
257  } else {
258  $resultPageSet->processDbRow( $row );
259  }
260  }
261 
262  if ( is_null( $resultPageSet ) ) {
263  $result->setIndexedTagName_internal(
264  array( 'query', $this->getModuleName() ), 'cm' );
265  }
266  }
267 
268  public function getAllowedParams() {
269  return array(
270  'title' => array(
271  ApiBase::PARAM_TYPE => 'string',
272  ),
273  'pageid' => array(
274  ApiBase::PARAM_TYPE => 'integer'
275  ),
276  'prop' => array(
277  ApiBase::PARAM_DFLT => 'ids|title',
278  ApiBase::PARAM_ISMULTI => true,
280  'ids',
281  'title',
282  'sortkey',
283  'sortkeyprefix',
284  'type',
285  'timestamp',
286  )
287  ),
288  'namespace' => array(
289  ApiBase::PARAM_ISMULTI => true,
290  ApiBase::PARAM_TYPE => 'namespace',
291  ),
292  'type' => array(
293  ApiBase::PARAM_ISMULTI => true,
294  ApiBase::PARAM_DFLT => 'page|subcat|file',
296  'page',
297  'subcat',
298  'file'
299  )
300  ),
301  'continue' => null,
302  'limit' => array(
303  ApiBase::PARAM_TYPE => 'limit',
304  ApiBase::PARAM_DFLT => 10,
305  ApiBase::PARAM_MIN => 1,
308  ),
309  'sort' => array(
310  ApiBase::PARAM_DFLT => 'sortkey',
312  'sortkey',
313  'timestamp'
314  )
315  ),
316  'dir' => array(
317  ApiBase::PARAM_DFLT => 'ascending',
319  'asc',
320  'desc',
321  // Normalising with other modules
322  'ascending',
323  'descending',
324  'newer',
325  'older',
326  )
327  ),
328  'start' => array(
329  ApiBase::PARAM_TYPE => 'timestamp'
330  ),
331  'end' => array(
332  ApiBase::PARAM_TYPE => 'timestamp'
333  ),
334  'startsortkey' => null,
335  'endsortkey' => null,
336  'startsortkeyprefix' => null,
337  'endsortkeyprefix' => null,
338  );
339  }
340 
341  public function getParamDescription() {
342  global $wgMiserMode;
343  $p = $this->getModulePrefix();
344  $desc = array(
345  'title' => "Which category to enumerate (required). Must include " .
346  "'Category:' prefix. Cannot be used together with {$p}pageid",
347  'pageid' => "Page ID of the category to enumerate. Cannot be used together with {$p}title",
348  'prop' => array(
349  'What pieces of information to include',
350  ' ids - Adds the page ID',
351  ' title - Adds the title and namespace ID of the page',
352  ' sortkey - Adds the sortkey used for sorting in the category (hexadecimal string)',
353  ' sortkeyprefix - Adds the sortkey prefix used for sorting in the ' .
354  'category (human-readable part of the sortkey)',
355  ' type - Adds the type that the page has been categorised as (page, subcat or file)',
356  ' timestamp - Adds the timestamp of when the page was included',
357  ),
358  'namespace' => 'Only include pages in these namespaces',
359  'type' => "What type of category members to include. Ignored when {$p}sort=timestamp is set",
360  'sort' => 'Property to sort by',
361  'dir' => 'In which direction to sort',
362  'start' => "Timestamp to start listing from. Can only be used with {$p}sort=timestamp",
363  'end' => "Timestamp to end listing at. Can only be used with {$p}sort=timestamp",
364  'startsortkey' => "Sortkey to start listing from. Must be given in " .
365  "binary format. Can only be used with {$p}sort=sortkey",
366  'endsortkey' => "Sortkey to end listing at. Must be given in binary " .
367  "format. Can only be used with {$p}sort=sortkey",
368  'startsortkeyprefix' => "Sortkey prefix to start listing from. Can " .
369  "only be used with {$p}sort=sortkey. Overrides {$p}startsortkey",
370  'endsortkeyprefix' => "Sortkey prefix to end listing BEFORE (not at, " .
371  "if this value occurs it will not be included!). Can only be used with " .
372  "{$p}sort=sortkey. Overrides {$p}endsortkey",
373  'continue' => 'For large categories, give the value returned from previous query',
374  'limit' => 'The maximum number of pages to return.',
375  );
376 
377  if ( $wgMiserMode ) {
378  $desc['namespace'] = array(
379  $desc['namespace'],
380  "NOTE: Due to \$wgMiserMode, using this may result in fewer than \"{$p}limit\" results",
381  'returned before continuing; in extreme cases, zero results may be returned.',
382  "Note that you can use {$p}type=subcat or {$p}type=file instead of {$p}namespace=14 or 6.",
383  );
384  }
385 
386  return $desc;
387  }
388 
389  public function getResultProperties() {
390  return array(
391  'ids' => array(
392  'pageid' => 'integer'
393  ),
394  'title' => array(
395  'ns' => 'namespace',
396  'title' => 'string'
397  ),
398  'sortkey' => array(
399  'sortkey' => 'string'
400  ),
401  'sortkeyprefix' => array(
402  'sortkeyprefix' => 'string'
403  ),
404  'type' => array(
405  'type' => array(
407  'page',
408  'subcat',
409  'file'
410  )
411  )
412  ),
413  'timestamp' => array(
414  'timestamp' => 'timestamp'
415  )
416  );
417  }
418 
419  public function getDescription() {
420  return 'List all pages in a given category.';
421  }
422 
423  public function getPossibleErrors() {
424  return array_merge( parent::getPossibleErrors(),
426  array(
427  array( 'code' => 'invalidcategory', 'info' => 'The category name you entered is not valid' ),
428  )
429  );
430  }
431 
432  public function getExamples() {
433  return array(
434  'api.php?action=query&list=categorymembers&cmtitle=Category:Physics'
435  => 'Get first 10 pages in [[Category:Physics]]',
436  'api.php?action=query&generator=categorymembers&gcmtitle=Category:Physics&prop=info'
437  => 'Get page info about first 10 pages in [[Category:Physics]]',
438  );
439  }
440 
441  public function getHelpUrls() {
442  return 'https://www.mediawiki.org/wiki/API:Categorymembers';
443  }
444 }
ApiQueryCategoryMembers\getResultProperties
getResultProperties()
Returns possible properties in the result, grouped by the value of the prop parameter that shows them...
Definition: ApiQueryCategoryMembers.php:389
Title\makeTitle
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:398
ApiQueryCategoryMembers\getExamples
getExamples()
Returns usage examples for this module.
Definition: ApiQueryCategoryMembers.php:432
ApiQueryCategoryMembers\getAllowedParams
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
Definition: ApiQueryCategoryMembers.php:268
$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
ApiQueryBase\addFields
addFields( $value)
Add a set of fields to select to the internal array.
Definition: ApiQueryBase.php:117
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
ApiQueryBase\addTimestampWhereRange
addTimestampWhereRange( $field, $dir, $start, $end, $sort=true)
Add a WHERE clause corresponding to a range, similar to addWhereRange, but converts $start and $end t...
Definition: ApiQueryBase.php:240
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:2483
ApiBase\getTitleOrPageId
getTitleOrPageId( $params, $load=false)
Definition: ApiBase.php:853
ApiBase\PARAM_TYPE
const PARAM_TYPE
Definition: ApiBase.php:50
ApiBase\getResult
getResult()
Get the result object.
Definition: ApiBase.php:205
ApiQueryBase\select
select( $method, $extraQuery=array())
Execute a SELECT query based on the values in the internal arrays.
Definition: ApiQueryBase.php:274
$from
$from
Definition: importImages.php:90
ApiQueryCategoryMembers
A query module to enumerate pages that belong to a category.
Definition: ApiQueryCategoryMembers.php:32
$params
$params
Definition: styleTest.css.php:40
$limit
if( $sleep) $limit
Definition: importImages.php:99
ApiQueryBase\addOption
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
Definition: ApiQueryBase.php:252
ApiQueryBase\addFieldsIf
addFieldsIf( $value, $condition)
Same as addFields(), but add the fields only if a condition is met.
Definition: ApiQueryBase.php:131
Collation\singleton
static singleton()
Definition: Collation.php:29
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
ApiQueryCategoryMembers\getPossibleErrors
getPossibleErrors()
Definition: ApiQueryCategoryMembers.php:423
ApiBase\LIMIT_BIG1
const LIMIT_BIG1
Definition: ApiBase.php:78
TS_ISO_8601
const TS_ISO_8601
ISO 8601 format with no timezone: 1986-02-09T20:00:00Z.
Definition: GlobalFunctions.php:2448
ApiQueryBase\getDB
getDB()
Get the Query database connection (read-only)
Definition: ApiQueryBase.php:417
ApiBase\PARAM_MAX
const PARAM_MAX
Definition: ApiBase.php:52
ApiQueryBase\addTables
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
Definition: ApiQueryBase.php:82
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
NS_CATEGORY
const NS_CATEGORY
Definition: Defines.php:93
ApiBase\PROP_TYPE
const PROP_TYPE
Definition: ApiBase.php:74
ApiBase\getModulePrefix
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
Definition: ApiBase.php:165
ApiQueryBase\addWhereRange
addWhereRange( $field, $dir, $start, $end, $sort=true)
Add a WHERE clause corresponding to a range, and an ORDER BY clause to sort in the right direction.
Definition: ApiQueryBase.php:205
ApiQueryCategoryMembers\run
run( $resultPageSet=null)
Definition: ApiQueryCategoryMembers.php:54
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
ApiQueryCategoryMembers\getHelpUrls
getHelpUrls()
Definition: ApiQueryCategoryMembers.php:441
ApiBase\dieContinueUsageIf
dieContinueUsageIf( $condition)
Die with the $prefix.
Definition: ApiBase.php:1965
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
ApiQueryBase\addWhereFld
addWhereFld( $field, $value)
Equivalent to addWhere(array($field => $value))
Definition: ApiQueryBase.php:185
ApiQueryCategoryMembers\getCacheMode
getCacheMode( $params)
Get the cache mode for the data generated by this module.
Definition: ApiQueryCategoryMembers.php:42
ApiQueryCategoryMembers\getParamDescription
getParamDescription()
Returns an array of parameter descriptions.
Definition: ApiQueryCategoryMembers.php:341
ApiQueryCategoryMembers\getDescription
getDescription()
Returns the description string for this module.
Definition: ApiQueryCategoryMembers.php:419
$count
$count
Definition: UtfNormalTest2.php:96
ApiQueryGeneratorBase
Definition: ApiQueryBase.php:626
ApiBase\LIMIT_BIG2
const LIMIT_BIG2
Definition: ApiBase.php:79
$dir
if(count( $args)==0) $dir
Definition: importImages.php:49
ApiBase\PARAM_DFLT
const PARAM_DFLT
Definition: ApiBase.php:46
as
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
ApiQueryCategoryMembers\executeGenerator
executeGenerator( $resultPageSet)
Execute this module as a generator.
Definition: ApiQueryCategoryMembers.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
ApiBase\PARAM_MAX2
const PARAM_MAX2
Definition: ApiBase.php:54
ApiQueryCategoryMembers\execute
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
Definition: ApiQueryCategoryMembers.php:38
ApiQueryBase\addWhere
addWhere( $value)
Add a set of WHERE clauses to the internal array.
Definition: ApiQueryBase.php:152
$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
$res
$res
Definition: database.txt:21
ApiQueryCategoryMembers\__construct
__construct( $query, $moduleName)
Definition: ApiQueryCategoryMembers.php:34
ApiQueryBase\addTitleInfo
static addTitleInfo(&$arr, $title, $prefix='')
Add information (title and namespace) about a Title object to a result array.
Definition: ApiQueryBase.php:339
$type
$type
Definition: testCompression.php:46
ApiBase\getTitleOrPageIdErrorMessage
getTitleOrPageIdErrorMessage()
Definition: ApiBase.php:885