MediaWiki  1.23.16
SpecialPageFactory.php
Go to the documentation of this file.
1 <?php
50  private static $list = array(
51  // Maintenance Reports
52  'BrokenRedirects' => 'BrokenRedirectsPage',
53  'Deadendpages' => 'DeadendPagesPage',
54  'DoubleRedirects' => 'DoubleRedirectsPage',
55  'Longpages' => 'LongPagesPage',
56  'Ancientpages' => 'AncientPagesPage',
57  'Lonelypages' => 'LonelyPagesPage',
58  'Fewestrevisions' => 'FewestrevisionsPage',
59  'Withoutinterwiki' => 'WithoutInterwikiPage',
60  'Protectedpages' => 'SpecialProtectedpages',
61  'Protectedtitles' => 'SpecialProtectedtitles',
62  'Shortpages' => 'ShortpagesPage',
63  'Uncategorizedcategories' => 'UncategorizedCategoriesPage',
64  'Uncategorizedimages' => 'UncategorizedImagesPage',
65  'Uncategorizedpages' => 'UncategorizedPagesPage',
66  'Uncategorizedtemplates' => 'UncategorizedTemplatesPage',
67  'Unusedcategories' => 'UnusedCategoriesPage',
68  'Unusedimages' => 'UnusedimagesPage',
69  'Unusedtemplates' => 'UnusedtemplatesPage',
70  'Unwatchedpages' => 'UnwatchedpagesPage',
71  'Wantedcategories' => 'WantedCategoriesPage',
72  'Wantedfiles' => 'WantedFilesPage',
73  'Wantedpages' => 'WantedPagesPage',
74  'Wantedtemplates' => 'WantedTemplatesPage',
75 
76  // List of pages
77  'Allpages' => 'SpecialAllpages',
78  'Prefixindex' => 'SpecialPrefixindex',
79  'Categories' => 'SpecialCategories',
80  'Listredirects' => 'ListredirectsPage',
81  'PagesWithProp' => 'SpecialPagesWithProp',
82  'TrackingCategories' => 'SpecialTrackingCategories',
83 
84  // Login/create account
85  'Userlogin' => 'LoginForm',
86  'CreateAccount' => 'SpecialCreateAccount',
87 
88  // Users and rights
89  'Block' => 'SpecialBlock',
90  'Unblock' => 'SpecialUnblock',
91  'BlockList' => 'SpecialBlockList',
92  'ChangePassword' => 'SpecialChangePassword',
93  'PasswordReset' => 'SpecialPasswordReset',
94  'DeletedContributions' => 'DeletedContributionsPage',
95  'Preferences' => 'SpecialPreferences',
96  'ResetTokens' => 'SpecialResetTokens',
97  'Contributions' => 'SpecialContributions',
98  'Listgrouprights' => 'SpecialListGroupRights',
99  'Listusers' => 'SpecialListUsers',
100  'Listadmins' => 'SpecialListAdmins',
101  'Listbots' => 'SpecialListBots',
102  'Userrights' => 'UserrightsPage',
103  'EditWatchlist' => 'SpecialEditWatchlist',
104 
105  // Recent changes and logs
106  'Newimages' => 'SpecialNewFiles',
107  'Log' => 'SpecialLog',
108  'Watchlist' => 'SpecialWatchlist',
109  'Newpages' => 'SpecialNewpages',
110  'Recentchanges' => 'SpecialRecentChanges',
111  'Recentchangeslinked' => 'SpecialRecentChangesLinked',
112  'Tags' => 'SpecialTags',
113 
114  // Media reports and uploads
115  'Listfiles' => 'SpecialListFiles',
116  'Filepath' => 'SpecialFilepath',
117  'MIMEsearch' => 'MIMEsearchPage',
118  'FileDuplicateSearch' => 'FileDuplicateSearchPage',
119  'Upload' => 'SpecialUpload',
120  'UploadStash' => 'SpecialUploadStash',
121  'ListDuplicatedFiles' => 'ListDuplicatedFilesPage',
122 
123  // Data and tools
124  'Statistics' => 'SpecialStatistics',
125  'Allmessages' => 'SpecialAllmessages',
126  'Version' => 'SpecialVersion',
127  'Lockdb' => 'SpecialLockdb',
128  'Unlockdb' => 'SpecialUnlockdb',
129 
130  // Redirecting special pages
131  'LinkSearch' => 'LinkSearchPage',
132  'Randompage' => 'RandomPage',
133  'RandomInCategory' => 'SpecialRandomInCategory',
134  'Randomredirect' => 'SpecialRandomredirect',
135  'GoToInterwiki' => 'SpecialGoToInterwiki',
136 
137  // High use pages
138  'Mostlinkedcategories' => 'MostlinkedCategoriesPage',
139  'Mostimages' => 'MostimagesPage',
140  'Mostinterwikis' => 'MostinterwikisPage',
141  'Mostlinked' => 'MostlinkedPage',
142  'Mostlinkedtemplates' => 'MostlinkedTemplatesPage',
143  'Mostcategories' => 'MostcategoriesPage',
144  'Mostrevisions' => 'MostrevisionsPage',
145 
146  // Page tools
147  'ComparePages' => 'SpecialComparePages',
148  'Export' => 'SpecialExport',
149  'Import' => 'SpecialImport',
150  'Undelete' => 'SpecialUndelete',
151  'Whatlinkshere' => 'SpecialWhatLinksHere',
152  'MergeHistory' => 'SpecialMergeHistory',
153  'ExpandTemplates' => 'SpecialExpandTemplates',
154 
155  // Other
156  'Booksources' => 'SpecialBookSources',
157 
158  // Unlisted / redirects
159  'Blankpage' => 'SpecialBlankpage',
160  'Diff' => 'SpecialDiff',
161  'Emailuser' => 'SpecialEmailUser',
162  'Movepage' => 'MovePageForm',
163  'Mycontributions' => 'SpecialMycontributions',
164  'Mypage' => 'SpecialMypage',
165  'Mytalk' => 'SpecialMytalk',
166  'Myuploads' => 'SpecialMyuploads',
167  'AllMyUploads' => 'SpecialAllMyUploads',
168  'PermanentLink' => 'SpecialPermanentLink',
169  'Redirect' => 'SpecialRedirect',
170  'Revisiondelete' => 'SpecialRevisionDelete',
171  'RunJobs' => 'SpecialRunJobs',
172  'Specialpages' => 'SpecialSpecialpages',
173  'Userlogout' => 'SpecialUserlogout',
174  );
175 
176  private static $aliases;
177 
183  static function getList() {
184  global $wgSpecialPages;
185  global $wgDisableCounters, $wgDisableInternalSearch, $wgEmailAuthentication;
186  global $wgEnableEmail, $wgEnableJavaScriptTest;
187 
188  if ( !is_object( self::$list ) ) {
189  wfProfileIn( __METHOD__ );
190 
191  if ( !$wgDisableCounters ) {
192  self::$list['Popularpages'] = 'PopularPagesPage';
193  }
194 
195  if ( !$wgDisableInternalSearch ) {
196  self::$list['Search'] = 'SpecialSearch';
197  }
198 
199  if ( $wgEmailAuthentication ) {
200  self::$list['Confirmemail'] = 'EmailConfirmation';
201  self::$list['Invalidateemail'] = 'EmailInvalidation';
202  }
203 
204  if ( $wgEnableEmail ) {
205  self::$list['ChangeEmail'] = 'SpecialChangeEmail';
206  }
207 
208  if ( $wgEnableJavaScriptTest ) {
209  self::$list['JavaScriptTest'] = 'SpecialJavaScriptTest';
210  }
211 
212  self::$list['Activeusers'] = 'SpecialActiveUsers';
213 
214  // Add extension special pages
215  self::$list = array_merge( self::$list, $wgSpecialPages );
216 
217  // Run hooks
218  // This hook can be used to remove undesired built-in special pages
219  wfRunHooks( 'SpecialPage_initList', array( &self::$list ) );
220 
221  // Cast to object: func()[$key] doesn't work, but func()->$key does
222  settype( self::$list, 'object' );
223 
224  wfProfileOut( __METHOD__ );
225  }
226 
227  return self::$list;
228  }
229 
238  static function getAliasList() {
239  if ( !is_object( self::$aliases ) ) {
241  $aliases = $wgContLang->getSpecialPageAliases();
242 
243  // Objects are passed by reference by default, need to create a copy
244  $missingPages = clone self::getList();
245 
246  self::$aliases = array();
247  foreach ( $aliases as $realName => $aliasList ) {
248  foreach ( $aliasList as $alias ) {
249  self::$aliases[$wgContLang->caseFold( $alias )] = $realName;
250  }
251  unset( $missingPages->$realName );
252  }
253  foreach ( $missingPages as $name => $stuff ) {
254  self::$aliases[$wgContLang->caseFold( $name )] = $name;
255  }
256 
257  // Cast to object: func()[$key] doesn't work, but func()->$key does
258  self::$aliases = (object)self::$aliases;
259  }
260 
261  return self::$aliases;
262  }
263 
272  public static function resolveAlias( $alias ) {
274  $bits = explode( '/', $alias, 2 );
275 
276  $caseFoldedAlias = $wgContLang->caseFold( $bits[0] );
277  $caseFoldedAlias = str_replace( ' ', '_', $caseFoldedAlias );
278  if ( isset( self::getAliasList()->$caseFoldedAlias ) ) {
279  $name = self::getAliasList()->$caseFoldedAlias;
280  } else {
281  return array( null, null );
282  }
283 
284  if ( !isset( $bits[1] ) ) { // bug 2087
285  $par = null;
286  } else {
287  $par = $bits[1];
288  }
289 
290  return array( $name, $par );
291  }
292 
300  public static function setGroup( $page, $group ) {
301  wfDeprecated( __METHOD__, '1.21' );
302 
303  global $wgSpecialPageGroups;
304  $name = is_object( $page ) ? $page->getName() : $page;
305  $wgSpecialPageGroups[$name] = $group;
306  }
307 
315  public static function getGroup( &$page ) {
316  wfDeprecated( __METHOD__, '1.21' );
317 
318  return $page->getFinalGroupName();
319  }
320 
327  public static function exists( $name ) {
328  list( $title, /*...*/ ) = self::resolveAlias( $name );
329 
330  return property_exists( self::getList(), $title );
331  }
332 
339  public static function getPage( $name ) {
340  list( $realName, /*...*/ ) = self::resolveAlias( $name );
341  if ( property_exists( self::getList(), $realName ) ) {
342  $rec = self::getList()->$realName;
343  if ( is_string( $rec ) ) {
344  $className = $rec;
345 
346  return new $className;
347  } elseif ( is_array( $rec ) ) {
348  // @deprecated, officially since 1.18, unofficially since forever
349  wfDebug( "Array syntax for \$wgSpecialPages is deprecated, " .
350  "define a subclass of SpecialPage instead." );
351  $className = array_shift( $rec );
352  self::getList()->$realName = MWFunction::newObj( $className, $rec );
353  }
354 
355  return self::getList()->$realName;
356  } else {
357  return null;
358  }
359  }
360 
369  public static function getUsablePages( User $user = null ) {
370  $pages = array();
371  if ( $user === null ) {
372  global $wgUser;
373  $user = $wgUser;
374  }
375  foreach ( self::getList() as $name => $rec ) {
376  $page = self::getPage( $name );
377  if ( $page ) { // not null
378  $page->setContext( RequestContext::getMain() );
379  if ( $page->isListed()
380  && ( !$page->isRestricted() || $page->userCanExecute( $user ) )
381  ) {
382  $pages[$name] = $page;
383  }
384  }
385  }
386 
387  return $pages;
388  }
389 
395  public static function getRegularPages() {
396  $pages = array();
397  foreach ( self::getList() as $name => $rec ) {
398  $page = self::getPage( $name );
399  if ( $page->isListed() && !$page->isRestricted() ) {
400  $pages[$name] = $page;
401  }
402  }
403 
404  return $pages;
405  }
406 
413  public static function getRestrictedPages() {
414  global $wgUser;
415  $pages = array();
416  foreach ( self::getList() as $name => $rec ) {
417  $page = self::getPage( $name );
418  if (
419  $page->isListed()
420  && $page->isRestricted()
421  && $page->userCanExecute( $wgUser )
422  ) {
423  $pages[$name] = $page;
424  }
425  }
426 
427  return $pages;
428  }
429 
444  public static function executePath( Title &$title, IContextSource &$context, $including = false ) {
445  wfProfileIn( __METHOD__ );
446 
447  // @todo FIXME: Redirects broken due to this call
448  $bits = explode( '/', $title->getDBkey(), 2 );
449  $name = $bits[0];
450  if ( !isset( $bits[1] ) ) { // bug 2087
451  $par = null;
452  } else {
453  $par = $bits[1];
454  }
455  $page = self::getPage( $name );
456  // Nonexistent?
457  if ( !$page ) {
458  $context->getOutput()->setArticleRelated( false );
459  $context->getOutput()->setRobotPolicy( 'noindex,nofollow' );
460 
461  global $wgSend404Code;
462  if ( $wgSend404Code ) {
463  $context->getOutput()->setStatusCode( 404 );
464  }
465 
466  $context->getOutput()->showErrorPage( 'nosuchspecialpage', 'nospecialpagetext' );
467  wfProfileOut( __METHOD__ );
468 
469  return false;
470  }
471 
472  // Page exists, set the context
473  $page->setContext( $context );
474 
475  if ( !$including ) {
476  // Redirect to canonical alias for GET commands
477  // Not for POST, we'd lose the post data, so it's best to just distribute
478  // the request. Such POST requests are possible for old extensions that
479  // generate self-links without being aware that their default name has
480  // changed.
481  if ( $name != $page->getLocalName() && !$context->getRequest()->wasPosted() ) {
482  $query = $context->getRequest()->getQueryValues();
483  unset( $query['title'] );
484  $title = $page->getPageTitle( $par );
485  $url = $title->getFullURL( $query );
486  $context->getOutput()->redirect( $url );
487  wfProfileOut( __METHOD__ );
488 
489  return $title;
490  } else {
491  $context->setTitle( $page->getPageTitle( $par ) );
492  }
493  } elseif ( !$page->isIncludable() ) {
494  wfProfileOut( __METHOD__ );
495 
496  return false;
497  }
498 
499  $page->including( $including );
500 
501  // Execute special page
502  $profName = 'Special:' . $page->getName();
503  wfProfileIn( $profName );
504  $page->run( $par );
505  wfProfileOut( $profName );
506  wfProfileOut( __METHOD__ );
507 
508  return true;
509  }
510 
525  static function capturePath( Title $title, IContextSource $context ) {
526  global $wgOut, $wgTitle, $wgRequest, $wgUser, $wgLang;
527 
528  // Save current globals
530  $oldOut = $wgOut;
531  $oldRequest = $wgRequest;
532  $oldUser = $wgUser;
533  $oldLang = $wgLang;
534 
535  // Set the globals to the current context
536  $wgTitle = $title;
537  $wgOut = $context->getOutput();
538  $wgRequest = $context->getRequest();
539  $wgUser = $context->getUser();
540  $wgLang = $context->getLanguage();
541 
542  // The useful part
543  $ret = self::executePath( $title, $context, true );
544 
545  // And restore the old globals
547  $wgOut = $oldOut;
548  $wgRequest = $oldRequest;
549  $wgUser = $oldUser;
550  $wgLang = $oldLang;
551 
552  return $ret;
553  }
554 
562  static function getLocalNameFor( $name, $subpage = false ) {
564  $aliases = $wgContLang->getSpecialPageAliases();
565 
566  if ( isset( $aliases[$name][0] ) ) {
567  $name = $aliases[$name][0];
568  } else {
569  // Try harder in case someone misspelled the correct casing
570  $found = false;
571  foreach ( $aliases as $n => $values ) {
572  if ( strcasecmp( $name, $n ) === 0 ) {
573  wfWarn( "Found alias defined for $n when searching for " .
574  "special page aliases for $name. Case mismatch?" );
575  $name = $values[0];
576  $found = true;
577  break;
578  }
579  }
580  if ( !$found ) {
581  wfWarn( "Did not find alias for special page '$name'. " .
582  "Perhaps no aliases are defined for it?" );
583  }
584  }
585  if ( $subpage !== false && !is_null( $subpage ) ) {
586  $name = "$name/$subpage";
587  }
588 
589  return $wgContLang->ucfirst( $name );
590  }
591 
598  static function getTitleForAlias( $alias ) {
599  $name = self::resolveAlias( $alias );
600  if ( $name ) {
602  } else {
603  return null;
604  }
605  }
606 }
SpecialPageFactory\getList
static getList()
Get the special page list.
Definition: SpecialPageFactory.php:183
$wgUser
$wgUser
Definition: Setup.php:572
object
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php For a description of the see design txt $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest object
Definition: globals.txt:25
SpecialPageFactory
Factory for handling the special page list and generating SpecialPage objects.
Definition: SpecialPageFactory.php:46
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
SpecialPageFactory\$list
static $list
List of special page names to the subclass of SpecialPage which handles them.
Definition: SpecialPageFactory.php:50
wfProfileIn
wfProfileIn( $functionname)
Begin profiling of a function.
Definition: Profiler.php:33
$n
$n
Definition: RandomTest.php:76
$ret
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 & $ret
Definition: hooks.txt:1530
SpecialPage\getTitleFor
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
Definition: SpecialPage.php:74
SpecialPageFactory\getRestrictedPages
static getRestrictedPages()
Return categorised listable special pages which are available for the current user,...
Definition: SpecialPageFactory.php:413
$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
SpecialPageFactory\executePath
static executePath(Title &$title, IContextSource &$context, $including=false)
Execute a special page path.
Definition: SpecialPageFactory.php:444
SpecialPageFactory\getUsablePages
static getUsablePages(User $user=null)
Return categorised listable special pages which are available for the current user,...
Definition: SpecialPageFactory.php:369
SpecialPageFactory\getGroup
static getGroup(&$page)
Get the group that the special page belongs in on Special:SpecialPage.
Definition: SpecialPageFactory.php:315
wfDeprecated
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
Definition: GlobalFunctions.php:1174
wfProfileOut
wfProfileOut( $functionname='missing')
Stop profiling of a function.
Definition: Profiler.php:46
$wgOut
$wgOut
Definition: Setup.php:582
$oldTitle
versus $oldTitle
Definition: globals.txt:16
wfRunHooks
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
Definition: GlobalFunctions.php:4066
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
SpecialPageFactory\exists
static exists( $name)
Check if a given name exist as a special page or as a special page alias.
Definition: SpecialPageFactory.php:327
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
SpecialPageFactory\getRegularPages
static getRegularPages()
Return categorised listable special pages for all users.
Definition: SpecialPageFactory.php:395
list
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
Definition: deferred.txt:11
MWFunction\newObj
static newObj( $class, $args=array())
Definition: MWFunction.php:54
wfDebug
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
Definition: GlobalFunctions.php:980
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
SpecialPageFactory\setGroup
static setGroup( $page, $group)
Add a page to a certain display group for Special:SpecialPages.
Definition: SpecialPageFactory.php:300
SpecialPageFactory\resolveAlias
static resolveAlias( $alias)
Given a special page name with a possible subpage, return an array where the first element is the spe...
Definition: SpecialPageFactory.php:272
SpecialPageFactory\getTitleForAlias
static getTitleForAlias( $alias)
Get a title for a given alias.
Definition: SpecialPageFactory.php:598
SpecialPageFactory\getLocalNameFor
static getLocalNameFor( $name, $subpage=false)
Get the local name for a specified canonical name.
Definition: SpecialPageFactory.php:562
IContextSource\getUser
getUser()
Get the User object.
SpecialPageFactory\capturePath
static capturePath(Title $title, IContextSource $context)
Just like executePath() but will override global variables and execute the page in "inclusion" mode.
Definition: SpecialPageFactory.php:525
RequestContext\getMain
static getMain()
Static methods.
Definition: RequestContext.php:420
$user
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Definition: hooks.txt:237
IContextSource
Interface for objects which can provide a context on request.
Definition: IContextSource.php:29
Title
Represents a title within MediaWiki.
Definition: Title.php:35
$wgLang
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 $wgLang
Definition: design.txt:56
SpecialPageFactory\$aliases
static $aliases
Definition: SpecialPageFactory.php:176
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
IContextSource\getRequest
getRequest()
Get the WebRequest object.
SpecialPageFactory\getAliasList
static getAliasList()
Initialise and return the list of special page aliases.
Definition: SpecialPageFactory.php:238
wfWarn
wfWarn( $msg, $callerOffset=1, $level=E_USER_NOTICE)
Send a warning either to the debug log or in a PHP error depending on $wgDevelopmentWarnings.
Definition: GlobalFunctions.php:1188
SpecialPageFactory\getPage
static getPage( $name)
Find the object with a given name and return it (or NULL)
Definition: SpecialPageFactory.php:339
$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
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:59
IContextSource\getOutput
getOutput()
Get the OutputPage object.
IContextSource\getLanguage
getLanguage()
Get the Language object.
$wgTitle
if(! $wgRequest->checkUrlExtension()) if(! $wgEnableAPI) $wgTitle
Definition: api.php:63