60 parent::__construct(
$query, $moduleName,
'in' );
68 $pageSet->requestField(
'page_restrictions' );
72 $pageSet->requestField(
'page_is_redirect' );
73 $pageSet->requestField(
'page_is_new' );
75 $pageSet->requestField(
'page_touched' );
76 $pageSet->requestField(
'page_latest' );
77 $pageSet->requestField(
'page_len' );
78 if ( $config->get(
'ContentHandlerUseDB' ) ) {
79 $pageSet->requestField(
'page_content_model' );
81 if ( $config->get(
'PageLanguageUseDB' ) ) {
82 $pageSet->requestField(
'page_lang' );
95 if ( isset( $this->tokenFunctions ) ) {
105 $this->tokenFunctions = [
116 Hooks::run(
'APIQueryInfoTokens', [ &$this->tokenFunctions ] );
127 self::$cachedTokens = [];
138 if ( !
$wgUser->isAllowed(
'edit' ) ) {
143 if ( !isset( self::$cachedTokens[
'edit'] ) ) {
144 self::$cachedTokens[
'edit'] =
$wgUser->getEditToken();
147 return self::$cachedTokens[
'edit'];
155 if ( !
$wgUser->isAllowed(
'delete' ) ) {
160 if ( !isset( self::$cachedTokens[
'delete'] ) ) {
161 self::$cachedTokens[
'delete'] =
$wgUser->getEditToken();
164 return self::$cachedTokens[
'delete'];
172 if ( !
$wgUser->isAllowed(
'protect' ) ) {
177 if ( !isset( self::$cachedTokens[
'protect'] ) ) {
178 self::$cachedTokens[
'protect'] =
$wgUser->getEditToken();
181 return self::$cachedTokens[
'protect'];
189 if ( !
$wgUser->isAllowed(
'move' ) ) {
194 if ( !isset( self::$cachedTokens[
'move'] ) ) {
195 self::$cachedTokens[
'move'] =
$wgUser->getEditToken();
198 return self::$cachedTokens[
'move'];
206 if ( !
$wgUser->isAllowed(
'block' ) ) {
211 if ( !isset( self::$cachedTokens[
'block'] ) ) {
212 self::$cachedTokens[
'block'] =
$wgUser->getEditToken();
215 return self::$cachedTokens[
'block'];
231 if ( !
$wgUser->canSendEmail() ||
$wgUser->isBlockedFromEmailuser() ) {
236 if ( !isset( self::$cachedTokens[
'email'] ) ) {
237 self::$cachedTokens[
'email'] =
$wgUser->getEditToken();
240 return self::$cachedTokens[
'email'];
248 if ( !
$wgUser->isAllowedAny(
'import',
'importupload' ) ) {
253 if ( !isset( self::$cachedTokens[
'import'] ) ) {
254 self::$cachedTokens[
'import'] =
$wgUser->getEditToken();
257 return self::$cachedTokens[
'import'];
265 if ( !
$wgUser->isLoggedIn() ) {
270 if ( !isset( self::$cachedTokens[
'watch'] ) ) {
271 self::$cachedTokens[
'watch'] =
$wgUser->getEditToken(
'watch' );
274 return self::$cachedTokens[
'watch'];
282 if ( !
$wgUser->isLoggedIn() ) {
287 if ( !isset( self::$cachedTokens[
'options'] ) ) {
288 self::$cachedTokens[
'options'] =
$wgUser->getEditToken();
291 return self::$cachedTokens[
'options'];
296 if ( !is_null( $this->params[
'prop'] ) ) {
297 $prop = array_flip( $this->params[
'prop'] );
298 $this->fld_protection = isset( $prop[
'protection'] );
299 $this->fld_watched = isset( $prop[
'watched'] );
300 $this->fld_watchers = isset( $prop[
'watchers'] );
301 $this->fld_visitingwatchers = isset( $prop[
'visitingwatchers'] );
302 $this->fld_notificationtimestamp = isset( $prop[
'notificationtimestamp'] );
303 $this->fld_talkid = isset( $prop[
'talkid'] );
304 $this->fld_subjectid = isset( $prop[
'subjectid'] );
305 $this->fld_url = isset( $prop[
'url'] );
306 $this->fld_readable = isset( $prop[
'readable'] );
307 $this->fld_preload = isset( $prop[
'preload'] );
308 $this->fld_displaytitle = isset( $prop[
'displaytitle'] );
309 $this->fld_varianttitles = isset( $prop[
'varianttitles'] );
313 $this->titles = $pageSet->getGoodTitles();
314 $this->missing = $pageSet->getMissingTitles();
318 uasort( $this->everything, [ Title::class,
'compare' ] );
319 if ( !is_null( $this->params[
'continue'] ) ) {
322 $cont = explode(
'|', $this->params[
'continue'] );
324 $conttitle = Title::makeTitleSafe( $cont[0], $cont[1] );
325 foreach ( $this->everything as $pageid => $title ) {
326 if ( Title::compare( $title, $conttitle ) >= 0 ) {
329 unset( $this->titles[$pageid] );
330 unset( $this->missing[$pageid] );
331 unset( $this->everything[$pageid] );
335 $this->pageRestrictions = $pageSet->getCustomField(
'page_restrictions' );
337 $this->pageIsRedir = !$pageSet->isResolvingRedirects()
338 ? $pageSet->getCustomField(
'page_is_redirect' )
340 $this->pageIsNew = $pageSet->getCustomField(
'page_is_new' );
342 $this->pageTouched = $pageSet->getCustomField(
'page_touched' );
343 $this->pageLatest = $pageSet->getCustomField(
'page_latest' );
344 $this->pageLength = $pageSet->getCustomField(
'page_len' );
347 if ( $this->fld_protection ) {
351 if ( $this->fld_watched || $this->fld_notificationtimestamp ) {
355 if ( $this->fld_watchers ) {
359 if ( $this->fld_visitingwatchers ) {
364 if ( $this->fld_talkid || $this->fld_subjectid ) {
368 if ( $this->fld_displaytitle ) {
372 if ( $this->fld_varianttitles ) {
377 foreach ( $this->everything as $pageid => $title ) {
379 $fit = $pageInfo !==
null && $result->addValue( [
382 ], $pageid, $pageInfo );
385 $title->getNamespace() .
'|' .
401 $titleExists = $pageid > 0;
402 $ns = $title->getNamespace();
403 $dbkey = $title->getDBkey();
405 $pageInfo[
'contentmodel'] = $title->getContentModel();
407 $pageLanguage = $title->getPageLanguage();
408 $pageInfo[
'pagelanguage'] = $pageLanguage->getCode();
409 $pageInfo[
'pagelanguagehtmlcode'] = $pageLanguage->getHtmlCode();
410 $pageInfo[
'pagelanguagedir'] = $pageLanguage->getDir();
412 if ( $titleExists ) {
413 $pageInfo[
'touched'] =
wfTimestamp( TS_ISO_8601, $this->pageTouched[$pageid] );
414 $pageInfo[
'lastrevid'] = intval( $this->pageLatest[$pageid] );
415 $pageInfo[
'length'] = intval( $this->pageLength[$pageid] );
417 if ( isset( $this->pageIsRedir[$pageid] ) && $this->pageIsRedir[$pageid] ) {
418 $pageInfo[
'redirect'] =
true;
420 if ( $this->pageIsNew[$pageid] ) {
421 $pageInfo[
'new'] =
true;
425 if ( !is_null( $this->params[
'token'] ) ) {
427 $pageInfo[
'starttimestamp'] =
wfTimestamp( TS_ISO_8601, time() );
428 foreach ( $this->params[
'token'] as
$t ) {
430 if ( $val ===
false ) {
431 $this->
addWarning( [
'apiwarn-tokennotallowed', $t ] );
433 $pageInfo[
$t .
'token'] = $val;
438 if ( $this->fld_protection ) {
439 $pageInfo[
'protection'] = [];
440 if ( isset( $this->protections[$ns][$dbkey] ) ) {
441 $pageInfo[
'protection'] =
442 $this->protections[$ns][$dbkey];
446 $pageInfo[
'restrictiontypes'] = [];
447 if ( isset( $this->restrictionTypes[$ns][$dbkey] ) ) {
448 $pageInfo[
'restrictiontypes'] =
449 $this->restrictionTypes[$ns][$dbkey];
454 if ( $this->fld_watched && $this->watched !==
null ) {
455 $pageInfo[
'watched'] = $this->watched[$ns][$dbkey];
458 if ( $this->fld_watchers ) {
459 if ( $this->watchers !==
null && $this->watchers[$ns][$dbkey] !== 0 ) {
460 $pageInfo[
'watchers'] = $this->watchers[$ns][$dbkey];
461 } elseif ( $this->showZeroWatchers ) {
462 $pageInfo[
'watchers'] = 0;
466 if ( $this->fld_visitingwatchers ) {
467 if ( $this->visitingwatchers !==
null && $this->visitingwatchers[$ns][$dbkey] !== 0 ) {
468 $pageInfo[
'visitingwatchers'] = $this->visitingwatchers[$ns][$dbkey];
469 } elseif ( $this->showZeroWatchers ) {
470 $pageInfo[
'visitingwatchers'] = 0;
474 if ( $this->fld_notificationtimestamp ) {
475 $pageInfo[
'notificationtimestamp'] =
'';
476 if ( $this->notificationtimestamps[$ns][$dbkey] ) {
477 $pageInfo[
'notificationtimestamp'] =
478 wfTimestamp( TS_ISO_8601, $this->notificationtimestamps[$ns][$dbkey] );
482 if ( $this->fld_talkid && isset( $this->talkids[$ns][$dbkey] ) ) {
483 $pageInfo[
'talkid'] = $this->talkids[$ns][$dbkey];
486 if ( $this->fld_subjectid && isset( $this->subjectids[$ns][$dbkey] ) ) {
487 $pageInfo[
'subjectid'] = $this->subjectids[$ns][$dbkey];
490 if ( $this->fld_url ) {
495 if ( $this->fld_readable ) {
496 $pageInfo[
'readable'] = $title->userCan(
'read', $this->
getUser() );
499 if ( $this->fld_preload ) {
500 if ( $titleExists ) {
501 $pageInfo[
'preload'] =
'';
504 Hooks::run(
'EditFormPreloadText', [ &$text, &$title ] );
506 $pageInfo[
'preload'] = $text;
510 if ( $this->fld_displaytitle ) {
511 if ( isset( $this->displaytitles[$pageid] ) ) {
512 $pageInfo[
'displaytitle'] = $this->displaytitles[$pageid];
514 $pageInfo[
'displaytitle'] = $title->getPrefixedText();
518 if ( $this->fld_varianttitles ) {
519 if ( isset( $this->variantTitles[$pageid] ) ) {
520 $pageInfo[
'varianttitles'] = $this->variantTitles[$pageid];
524 if ( $this->params[
'testactions'] ) {
526 if ( $this->countTestedActions >= $limit ) {
531 $pageInfo[
'actions'] = [];
532 foreach ( $this->params[
'testactions'] as $action ) {
533 $this->countTestedActions++;
534 $pageInfo[
'actions'][$action] = $title->userCan( $action, $user );
545 $this->protections = [];
546 $db = $this->
getDB();
549 if ( count( $this->titles ) ) {
552 $this->
addFields( [
'pr_page',
'pr_type',
'pr_level',
553 'pr_expiry',
'pr_cascade' ] );
554 $this->
addWhereFld(
'pr_page', array_keys( $this->titles ) );
557 foreach (
$res as $row ) {
559 $title = $this->titles[$row->pr_page];
561 'type' => $row->pr_type,
562 'level' => $row->pr_level,
565 if ( $row->pr_cascade ) {
566 $a[
'cascade'] =
true;
568 $this->protections[$title->getNamespace()][$title->getDBkey()][] = $a;
571 foreach ( $this->titles as $pageId => $title ) {
572 if ( $this->pageRestrictions[$pageId] ) {
573 $namespace = $title->getNamespace();
574 $dbKey = $title->getDBkey();
575 $restrictions = explode(
':', trim( $this->pageRestrictions[$pageId] ) );
576 foreach ( $restrictions as $restrict ) {
577 $temp = explode(
'=', trim( $restrict ) );
578 if ( count( $temp ) == 1 ) {
580 $restriction = trim( $temp[0] );
582 if ( $restriction ==
'' ) {
585 $this->protections[$namespace][$dbKey][] = [
587 'level' => $restriction,
588 'expiry' =>
'infinity',
590 $this->protections[$namespace][$dbKey][] = [
592 'level' => $restriction,
593 'expiry' =>
'infinity',
596 $restriction = trim( $temp[1] );
597 if ( $restriction ==
'' ) {
600 $this->protections[$namespace][$dbKey][] = [
602 'level' => $restriction,
603 'expiry' =>
'infinity',
612 if ( count( $this->missing ) ) {
616 $this->
addFields( [
'pt_title',
'pt_namespace',
'pt_create_perm',
'pt_expiry' ] );
617 $this->
addWhere( $lb->constructSet(
'pt', $db ) );
619 foreach (
$res as $row ) {
620 $this->protections[$row->pt_namespace][$row->pt_title][] = [
622 'level' => $row->pt_create_perm,
630 $images = $others = [];
631 foreach ( $this->everything as $title ) {
632 if ( $title->getNamespace() ==
NS_FILE ) {
633 $images[] = $title->getDBkey();
638 $this->restrictionTypes[$title->getNamespace()][$title->getDBkey()] =
639 array_values( $title->getRestrictionTypes() );
642 if ( count( $others ) ) {
646 $this->
addTables( [
'page_restrictions',
'page',
'templatelinks' ] );
647 $this->
addFields( [
'pr_type',
'pr_level',
'pr_expiry',
648 'page_title',
'page_namespace',
649 'tl_title',
'tl_namespace' ] );
650 $this->
addWhere( $lb->constructSet(
'tl', $db ) );
651 $this->
addWhere(
'pr_page = page_id' );
652 $this->
addWhere(
'pr_page = tl_from' );
656 foreach (
$res as $row ) {
657 $source = Title::makeTitle( $row->page_namespace, $row->page_title );
658 $this->protections[$row->tl_namespace][$row->tl_title][] = [
659 'type' => $row->pr_type,
660 'level' => $row->pr_level,
662 'source' =>
$source->getPrefixedText()
667 if ( count( $images ) ) {
670 $this->
addTables( [
'page_restrictions',
'page',
'imagelinks' ] );
671 $this->
addFields( [
'pr_type',
'pr_level',
'pr_expiry',
672 'page_title',
'page_namespace',
'il_to' ] );
673 $this->
addWhere(
'pr_page = page_id' );
674 $this->
addWhere(
'pr_page = il_from' );
679 foreach (
$res as $row ) {
680 $source = Title::makeTitle( $row->page_namespace, $row->page_title );
681 $this->protections[
NS_FILE][$row->il_to][] = [
682 'type' => $row->pr_type,
683 'level' => $row->pr_level,
685 'source' =>
$source->getPrefixedText()
696 $getTitles = $this->talkids = $this->subjectids = [];
699 foreach ( $this->everything as
$t ) {
700 if ( MWNamespace::isTalk(
$t->getNamespace() ) ) {
701 if ( $this->fld_subjectid ) {
702 $getTitles[] =
$t->getSubjectPage();
704 } elseif ( $this->fld_talkid ) {
705 $getTitles[] =
$t->getTalkPage();
708 if ( !count( $getTitles ) ) {
712 $db = $this->
getDB();
719 $this->
addFields( [
'page_title',
'page_namespace',
'page_id' ] );
720 $this->
addWhere( $lb->constructSet(
'page', $db ) );
722 foreach (
$res as $row ) {
723 if ( MWNamespace::isTalk( $row->page_namespace ) ) {
724 $this->talkids[MWNamespace::getSubject( $row->page_namespace )][$row->page_title] =
725 intval( $row->page_id );
727 $this->subjectids[MWNamespace::getTalk( $row->page_namespace )][$row->page_title] =
728 intval( $row->page_id );
734 $this->displaytitles = [];
736 $pageIds = array_keys( $this->titles );
738 if ( !count( $pageIds ) ) {
744 $this->
addFields( [
'pp_page',
'pp_value' ] );
746 $this->
addWhereFld(
'pp_propname',
'displaytitle' );
749 foreach (
$res as $row ) {
750 $this->displaytitles[$row->pp_page] = $row->pp_value;
755 if ( !count( $this->titles ) ) {
758 $this->variantTitles = [];
759 foreach ( $this->titles as $pageId =>
$t ) {
760 $this->variantTitles[$pageId] = isset( $this->displaytitles[$pageId] )
769 foreach (
$wgContLang->getVariants() as $variant ) {
770 $convertTitle =
$wgContLang->autoConvert( $text, $variant );
772 $convertNs =
$wgContLang->convertNamespace( $ns, $variant );
773 $convertTitle = $convertNs .
':' . $convertTitle;
775 $result[$variant] = $convertTitle;
787 if ( $user->isAnon() || count( $this->everything ) == 0
788 || !$user->isAllowed(
'viewmywatchlist' )
794 $this->notificationtimestamps = [];
796 $store = MediaWikiServices::getInstance()->getWatchedItemStore();
797 $timestamps = $store->getNotificationTimestampsBatch( $user, $this->everything );
799 if ( $this->fld_watched ) {
800 foreach ( $timestamps as $namespaceId => $dbKeys ) {
801 $this->watched[$namespaceId] = array_map(
809 if ( $this->fld_notificationtimestamp ) {
810 $this->notificationtimestamps = $timestamps;
818 if ( count( $this->everything ) == 0 ) {
823 $canUnwatchedpages = $user->isAllowed(
'unwatchedpages' );
824 $unwatchedPageThreshold = $this->
getConfig()->get(
'UnwatchedPageThreshold' );
825 if ( !$canUnwatchedpages && !is_int( $unwatchedPageThreshold ) ) {
829 $this->showZeroWatchers = $canUnwatchedpages;
832 if ( !$canUnwatchedpages ) {
833 $countOptions[
'minimumWatchers'] = $unwatchedPageThreshold;
836 $this->watchers = MediaWikiServices::getInstance()->getWatchedItemStore()->countWatchersMultiple(
851 $db = $this->
getDB();
853 $canUnwatchedpages = $user->isAllowed(
'unwatchedpages' );
854 $unwatchedPageThreshold = $this->
getConfig()->get(
'UnwatchedPageThreshold' );
855 if ( !$canUnwatchedpages && !is_int( $unwatchedPageThreshold ) ) {
859 $this->showZeroWatchers = $canUnwatchedpages;
861 $titlesWithThresholds = [];
862 if ( $this->titles ) {
867 $this->
addTables( [
'page',
'revision' ] );
868 $this->
addFields( [
'page_namespace',
'page_title',
'rev_timestamp' ] );
870 'page_latest = rev_id',
871 $lb->constructSet(
'page', $db ),
873 $this->
addOption(
'GROUP BY', [
'page_namespace',
'page_title' ] );
874 $timestampRes = $this->
select( __METHOD__ );
876 $age = $config->get(
'WatchersMaxAge' );
878 foreach ( $timestampRes as $row ) {
879 $revTimestamp =
wfTimestamp( TS_UNIX, (
int)$row->rev_timestamp );
880 $timestamps[$row->page_namespace][$row->page_title] = $revTimestamp - $age;
882 $titlesWithThresholds = array_map(
883 function (
LinkTarget $target ) use ( $timestamps ) {
892 if ( $this->missing ) {
893 $titlesWithThresholds = array_merge(
894 $titlesWithThresholds,
897 return [ $target, null ];
903 $store = MediaWikiServices::getInstance()->getWatchedItemStore();
904 $this->visitingwatchers = $store->countVisitingWatchersMultiple(
905 $titlesWithThresholds,
906 !$canUnwatchedpages ? $unwatchedPageThreshold : null
921 if ( array_diff( (array)
$params[
'prop'], $publicProps ) ) {
926 if (
$params[
'testactions'] ) {
930 if ( !is_null(
$params[
'token'] ) ) {
945 'watchers', #
private
946 'visitingwatchers', #
private
947 'notificationtimestamp', #
private
950 'readable', #
private
976 'action=query&prop=info&titles=Main%20Page'
977 =>
'apihelp-query+info-example-simple',
978 'action=query&prop=info&inprop=protection&titles=Main%20Page'
979 =>
'apihelp-query+info-example-protection',
984 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Info';
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
const PARAM_DEPRECATED
(boolean) Is the parameter deprecated (will show a warning)?
dieContinueUsageIf( $condition)
Die with the 'badcontinue' error.
getMain()
Get the main module.
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below.
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
const PARAM_HELP_MSG_PER_VALUE
((string|array|Message)[]) When PARAM_TYPE is an array, this is an array mapping those values to $msg...
const LIMIT_SML2
Slow query, apihighlimits limit.
getResult()
Get the result object.
const LIMIT_SML1
Slow query, standard limit.
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
addWarning( $msg, $code=null, $data=null)
Add a warning for this module.
const PARAM_ISMULTI
(boolean) Accept multiple pipe-separated values for this parameter (e.g.
lacksSameOriginSecurity()
Returns true if the current request breaks the same-origin policy.
This is a base class for all Query modules.
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
resetQueryParams()
Blank the internal arrays with query parameters.
addFields( $value)
Add a set of fields to select to the internal array.
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
getDB()
Get the Query database connection (read-only)
addWhereFld( $field, $value)
Equivalent to addWhere(array($field => $value))
getPageSet()
Get the PageSet object to work on.
addWhere( $value)
Add a set of WHERE clauses to the internal array.
A query module to show basic page information.
$fld_notificationtimestamp
getTokenFunctions()
Get an array mapping token names to their handler functions.
getVisitingWatcherInfo()
Get the count of watchers who have visited recent edits and put it in $this->visitingwatchers.
getExamplesMessages()
Returns usage examples for this module.
static getUnblockToken( $pageid, $title)
static getWatchToken( $pageid, $title)
static getDeleteToken( $pageid, $title)
getAllVariants( $text, $ns=NS_MAIN)
static getEditToken( $pageid, $title)
static getMoveToken( $pageid, $title)
static getEmailToken( $pageid, $title)
static getProtectToken( $pageid, $title)
getWatchedInfo()
Get information about watched status and put it in $this->watched and $this->notificationtimestamps.
__construct(ApiQuery $query, $moduleName)
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
static getOptionsToken( $pageid, $title)
getProtectionInfo()
Get information about protections and put it in $protections.
static getBlockToken( $pageid, $title)
requestExtraData( $pageSet)
getWatcherInfo()
Get the count of watchers and put it in $this->watchers.
extractPageInfo( $pageid, $title)
Get a result array with information about a title.
getHelpUrls()
Return links to more detailed help pages about the module.
static getImportToken( $pageid, $title)
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
getTSIDs()
Get talk page IDs (if requested) and subject page IDs (if requested) and put them in $talkids and $su...
getCacheMode( $params)
Get the cache mode for the data generated by this module.
This is the main query class.
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
static formatExpiry( $expiry, $infinity='infinity')
Format an expiry timestamp for API output.
Class representing a list of titles The execute() method checks them all for existence and adds them ...
Represents a title within MediaWiki.
We use the convention $dbr for read and $dbw for write to help you keep track of whether the database object is a the world will explode Or to be a subsequent write query which succeeded on the master may fail when replicated to the slave due to a unique key collision Replication on the slave will stop and it may take hours to repair the database and get it back online Setting read_only in my cnf on the slave will avoid this but given the dire we prefer to have as many checks as possible We provide a but the wrapper functions like select() and insert() are usually more convenient. They take care of things like table prefixes and escaping for you. If you really need to make your own SQL
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
namespace being checked & $result
namespace and then decline to actually register it file or subcat img or subcat $title
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
you have access to all of the normal MediaWiki so you can get a DB use the etc For full docs on the Maintenance class