MediaWiki REL1_33
SpecialPageFactory.php
Go to the documentation of this file.
1<?php
26
27use Config;
28use Hooks;
30use Language;
32use Profiler;
34use SpecialPage;
35use Title;
36use User;
37
69 private static $coreList = [
70 // Maintenance Reports
71 'BrokenRedirects' => \BrokenRedirectsPage::class,
72 'Deadendpages' => \DeadendPagesPage::class,
73 'DoubleRedirects' => \DoubleRedirectsPage::class,
74 'Longpages' => \LongPagesPage::class,
75 'Ancientpages' => \AncientPagesPage::class,
76 'Lonelypages' => \LonelyPagesPage::class,
77 'Fewestrevisions' => \FewestrevisionsPage::class,
78 'Withoutinterwiki' => \WithoutInterwikiPage::class,
79 'Protectedpages' => \SpecialProtectedpages::class,
80 'Protectedtitles' => \SpecialProtectedtitles::class,
81 'Shortpages' => \ShortPagesPage::class,
82 'Uncategorizedcategories' => \UncategorizedCategoriesPage::class,
83 'Uncategorizedimages' => \UncategorizedImagesPage::class,
84 'Uncategorizedpages' => \UncategorizedPagesPage::class,
85 'Uncategorizedtemplates' => \UncategorizedTemplatesPage::class,
86 'Unusedcategories' => \UnusedCategoriesPage::class,
87 'Unusedimages' => \UnusedimagesPage::class,
88 'Unusedtemplates' => \UnusedtemplatesPage::class,
89 'Unwatchedpages' => \UnwatchedpagesPage::class,
90 'Wantedcategories' => \WantedCategoriesPage::class,
91 'Wantedfiles' => \WantedFilesPage::class,
92 'Wantedpages' => \WantedPagesPage::class,
93 'Wantedtemplates' => \WantedTemplatesPage::class,
94
95 // List of pages
96 'Allpages' => \SpecialAllPages::class,
97 'Prefixindex' => \SpecialPrefixindex::class,
98 'Categories' => \SpecialCategories::class,
99 'Listredirects' => \ListredirectsPage::class,
100 'PagesWithProp' => \SpecialPagesWithProp::class,
101 'TrackingCategories' => \SpecialTrackingCategories::class,
102
103 // Authentication
104 'Userlogin' => \SpecialUserLogin::class,
105 'Userlogout' => \SpecialUserLogout::class,
106 'CreateAccount' => \SpecialCreateAccount::class,
107 'LinkAccounts' => \SpecialLinkAccounts::class,
108 'UnlinkAccounts' => \SpecialUnlinkAccounts::class,
109 'ChangeCredentials' => \SpecialChangeCredentials::class,
110 'RemoveCredentials' => \SpecialRemoveCredentials::class,
111
112 // Users and rights
113 'Activeusers' => \SpecialActiveUsers::class,
114 'Block' => \SpecialBlock::class,
115 'Unblock' => \SpecialUnblock::class,
116 'BlockList' => \SpecialBlockList::class,
117 'AutoblockList' => \SpecialAutoblockList::class,
118 'ChangePassword' => \SpecialChangePassword::class,
119 'BotPasswords' => \SpecialBotPasswords::class,
120 'PasswordReset' => \SpecialPasswordReset::class,
121 'DeletedContributions' => \DeletedContributionsPage::class,
122 'Preferences' => \SpecialPreferences::class,
123 'ResetTokens' => \SpecialResetTokens::class,
124 'Contributions' => \SpecialContributions::class,
125 'Listgrouprights' => \SpecialListGroupRights::class,
126 'Listgrants' => \SpecialListGrants::class,
127 'Listusers' => \SpecialListUsers::class,
128 'Listadmins' => \SpecialListAdmins::class,
129 'Listbots' => \SpecialListBots::class,
130 'Userrights' => \UserrightsPage::class,
131 'EditWatchlist' => \SpecialEditWatchlist::class,
132 'PasswordPolicies' => \SpecialPasswordPolicies::class,
133
134 // Recent changes and logs
135 'Newimages' => \SpecialNewFiles::class,
136 'Log' => \SpecialLog::class,
137 'Watchlist' => \SpecialWatchlist::class,
138 'Newpages' => \SpecialNewpages::class,
139 'Recentchanges' => \SpecialRecentChanges::class,
140 'Recentchangeslinked' => \SpecialRecentChangesLinked::class,
141 'Tags' => \SpecialTags::class,
142
143 // Media reports and uploads
144 'Listfiles' => \SpecialListFiles::class,
145 'Filepath' => \SpecialFilepath::class,
146 'MediaStatistics' => \MediaStatisticsPage::class,
147 'MIMEsearch' => \MIMEsearchPage::class,
148 'FileDuplicateSearch' => \FileDuplicateSearchPage::class,
149 'Upload' => \SpecialUpload::class,
150 'UploadStash' => \SpecialUploadStash::class,
151 'ListDuplicatedFiles' => \ListDuplicatedFilesPage::class,
152
153 // Data and tools
154 'ApiSandbox' => \SpecialApiSandbox::class,
155 'Statistics' => \SpecialStatistics::class,
156 'Allmessages' => \SpecialAllMessages::class,
157 'Version' => \SpecialVersion::class,
158 'Lockdb' => \SpecialLockdb::class,
159 'Unlockdb' => \SpecialUnlockdb::class,
160
161 // Redirecting special pages
162 'LinkSearch' => \LinkSearchPage::class,
163 'Randompage' => \RandomPage::class,
164 'RandomInCategory' => \SpecialRandomInCategory::class,
165 'Randomredirect' => \SpecialRandomredirect::class,
166 'Randomrootpage' => \SpecialRandomrootpage::class,
167 'GoToInterwiki' => \SpecialGoToInterwiki::class,
168
169 // High use pages
170 'Mostlinkedcategories' => \MostlinkedCategoriesPage::class,
171 'Mostimages' => \MostimagesPage::class,
172 'Mostinterwikis' => \MostinterwikisPage::class,
173 'Mostlinked' => \MostlinkedPage::class,
174 'Mostlinkedtemplates' => \MostlinkedTemplatesPage::class,
175 'Mostcategories' => \MostcategoriesPage::class,
176 'Mostrevisions' => \MostrevisionsPage::class,
177
178 // Page tools
179 'ComparePages' => \SpecialComparePages::class,
180 'Export' => \SpecialExport::class,
181 'Import' => \SpecialImport::class,
182 'Undelete' => \SpecialUndelete::class,
183 'Whatlinkshere' => \SpecialWhatLinksHere::class,
184 'MergeHistory' => \SpecialMergeHistory::class,
185 'ExpandTemplates' => \SpecialExpandTemplates::class,
186
187 // Other
188 'Booksources' => \SpecialBookSources::class,
189
190 // Unlisted / redirects
191 'ApiHelp' => \SpecialApiHelp::class,
192 'Blankpage' => \SpecialBlankpage::class,
193 'Diff' => \SpecialDiff::class,
194 'EditTags' => \SpecialEditTags::class,
195 'Emailuser' => \SpecialEmailUser::class,
196 'Movepage' => \MovePageForm::class,
197 'Mycontributions' => \SpecialMycontributions::class,
198 'MyLanguage' => \SpecialMyLanguage::class,
199 'Mypage' => \SpecialMypage::class,
200 'Mytalk' => \SpecialMytalk::class,
201 'Myuploads' => \SpecialMyuploads::class,
202 'AllMyUploads' => \SpecialAllMyUploads::class,
203 'PermanentLink' => \SpecialPermanentLink::class,
204 'Redirect' => \SpecialRedirect::class,
205 'Revisiondelete' => \SpecialRevisionDelete::class,
206 'RunJobs' => \SpecialRunJobs::class,
207 'Specialpages' => \SpecialSpecialpages::class,
208 'PageData' => \SpecialPageData::class,
209 ];
210
212 private $list;
213
215 private $aliases;
216
218 private $config;
219
221 private $contLang;
222
228 $this->config = $config;
229 $this->contLang = $contLang;
230 }
231
238 public function getNames() : array {
239 return array_keys( $this->getPageList() );
240 }
241
247 private function getPageList() : array {
248 if ( !is_array( $this->list ) ) {
249 $this->list = self::$coreList;
250
251 if ( !$this->config->get( 'DisableInternalSearch' ) ) {
252 $this->list['Search'] = \SpecialSearch::class;
253 }
254
255 if ( $this->config->get( 'EmailAuthentication' ) ) {
256 $this->list['Confirmemail'] = \EmailConfirmation::class;
257 $this->list['Invalidateemail'] = \EmailInvalidation::class;
258 }
259
260 if ( $this->config->get( 'EnableEmail' ) ) {
261 $this->list['ChangeEmail'] = \SpecialChangeEmail::class;
262 }
263
264 if ( $this->config->get( 'EnableJavaScriptTest' ) ) {
265 $this->list['JavaScriptTest'] = \SpecialJavaScriptTest::class;
266 }
267
268 if ( $this->config->get( 'PageLanguageUseDB' ) ) {
269 $this->list['PageLanguage'] = \SpecialPageLanguage::class;
270 }
271 if ( $this->config->get( 'ContentHandlerUseDB' ) ) {
272 $this->list['ChangeContentModel'] = \SpecialChangeContentModel::class;
273 }
274
275 // Add extension special pages
276 $this->list = array_merge( $this->list, $this->config->get( 'SpecialPages' ) );
277
278 // This hook can be used to disable unwanted core special pages
279 // or conditionally register special pages.
280 Hooks::run( 'SpecialPage_initList', [ &$this->list ] );
281
282 }
283
284 return $this->list;
285 }
286
293 private function getAliasList() : array {
294 if ( is_null( $this->aliases ) ) {
295 $aliases = $this->contLang->getSpecialPageAliases();
296 $pageList = $this->getPageList();
297
298 $this->aliases = [];
299 $keepAlias = [];
300
301 // Force every canonical name to be an alias for itself.
302 foreach ( $pageList as $name => $stuff ) {
303 $caseFoldedAlias = $this->contLang->caseFold( $name );
304 $this->aliases[$caseFoldedAlias] = $name;
305 $keepAlias[$caseFoldedAlias] = 'canonical';
306 }
307
308 // Check for $aliases being an array since Language::getSpecialPageAliases can return null
309 if ( is_array( $aliases ) ) {
310 foreach ( $aliases as $realName => $aliasList ) {
311 $aliasList = array_values( $aliasList );
312 foreach ( $aliasList as $i => $alias ) {
313 $caseFoldedAlias = $this->contLang->caseFold( $alias );
314
315 if ( isset( $this->aliases[$caseFoldedAlias] ) &&
316 $realName === $this->aliases[$caseFoldedAlias]
317 ) {
318 // Ignore same-realName conflicts
319 continue;
320 }
321
322 if ( !isset( $keepAlias[$caseFoldedAlias] ) ) {
323 $this->aliases[$caseFoldedAlias] = $realName;
324 if ( !$i ) {
325 $keepAlias[$caseFoldedAlias] = 'first';
326 }
327 } elseif ( !$i ) {
328 wfWarn( "First alias '$alias' for $realName conflicts with " .
329 "{$keepAlias[$caseFoldedAlias]} alias for " .
330 $this->aliases[$caseFoldedAlias]
331 );
332 }
333 }
334 }
335 }
336 }
337
338 return $this->aliases;
339 }
340
349 public function resolveAlias( $alias ) {
350 $bits = explode( '/', $alias, 2 );
351
352 $caseFoldedAlias = $this->contLang->caseFold( $bits[0] );
353 $caseFoldedAlias = str_replace( ' ', '_', $caseFoldedAlias );
354 $aliases = $this->getAliasList();
355 if ( !isset( $aliases[$caseFoldedAlias] ) ) {
356 return [ null, null ];
357 }
358 $name = $aliases[$caseFoldedAlias];
359 $par = $bits[1] ?? null; // T4087
360
361 return [ $name, $par ];
362 }
363
370 public function exists( $name ) {
371 list( $title, /*...*/ ) = $this->resolveAlias( $name );
372
373 $specialPageList = $this->getPageList();
374 return isset( $specialPageList[$title] );
375 }
376
383 public function getPage( $name ) {
384 list( $realName, /*...*/ ) = $this->resolveAlias( $name );
385
386 $specialPageList = $this->getPageList();
387
388 if ( isset( $specialPageList[$realName] ) ) {
389 $rec = $specialPageList[$realName];
390
391 if ( is_callable( $rec ) ) {
392 // Use callback to instantiate the special page
393 $page = $rec();
394 } elseif ( is_string( $rec ) ) {
395 $className = $rec;
396 $page = new $className;
397 } elseif ( $rec instanceof SpecialPage ) {
398 $page = $rec; // XXX: we should deep clone here
399 } else {
400 $page = null;
401 }
402
403 if ( $page instanceof SpecialPage ) {
404 return $page;
405 }
406
407 // It's not a classname, nor a callback, nor a legacy constructor array,
408 // nor a special page object. Give up.
409 wfLogWarning( "Cannot instantiate special page $realName: bad spec!" );
410 }
411
412 return null;
413 }
414
423 public function getUsablePages( User $user ) : array {
424 $pages = [];
425 foreach ( $this->getPageList() as $name => $rec ) {
426 $page = $this->getPage( $name );
427 if ( $page ) { // not null
428 $page->setContext( RequestContext::getMain() );
429 if ( $page->isListed()
430 && ( !$page->isRestricted() || $page->userCanExecute( $user ) )
431 ) {
432 $pages[$name] = $page;
433 }
434 }
435 }
436
437 return $pages;
438 }
439
445 public function getRegularPages() : array {
446 $pages = [];
447 foreach ( $this->getPageList() as $name => $rec ) {
448 $page = $this->getPage( $name );
449 if ( $page && $page->isListed() && !$page->isRestricted() ) {
450 $pages[$name] = $page;
451 }
452 }
453
454 return $pages;
455 }
456
464 public function getRestrictedPages( User $user ) : array {
465 $pages = [];
466 foreach ( $this->getPageList() as $name => $rec ) {
467 $page = $this->getPage( $name );
468 if ( $page
469 && $page->isListed()
470 && $page->isRestricted()
471 && $page->userCanExecute( $user )
472 ) {
473 $pages[$name] = $page;
474 }
475 }
476
477 return $pages;
478 }
479
495 public function executePath( Title &$title, IContextSource &$context, $including = false,
497 ) {
498 // @todo FIXME: Redirects broken due to this call
499 $bits = explode( '/', $title->getDBkey(), 2 );
500 $name = $bits[0];
501 $par = $bits[1] ?? null; // T4087
502
503 $page = $this->getPage( $name );
504 if ( !$page ) {
505 $context->getOutput()->setArticleRelated( false );
506 $context->getOutput()->setRobotPolicy( 'noindex,nofollow' );
507
508 global $wgSend404Code;
509 if ( $wgSend404Code ) {
510 $context->getOutput()->setStatusCode( 404 );
511 }
512
513 $context->getOutput()->showErrorPage( 'nosuchspecialpage', 'nospecialpagetext' );
514
515 return false;
516 }
517
518 if ( !$including ) {
519 // Narrow DB query expectations for this HTTP request
520 $trxLimits = $context->getConfig()->get( 'TrxProfilerLimits' );
521 $trxProfiler = Profiler::instance()->getTransactionProfiler();
522 if ( $context->getRequest()->wasPosted() && !$page->doesWrites() ) {
523 $trxProfiler->setExpectations( $trxLimits['POST-nonwrite'], __METHOD__ );
524 $context->getRequest()->markAsSafeRequest();
525 }
526 }
527
528 // Page exists, set the context
529 $page->setContext( $context );
530
531 if ( !$including ) {
532 // Redirect to canonical alias for GET commands
533 // Not for POST, we'd lose the post data, so it's best to just distribute
534 // the request. Such POST requests are possible for old extensions that
535 // generate self-links without being aware that their default name has
536 // changed.
537 if ( $name != $page->getLocalName() && !$context->getRequest()->wasPosted() ) {
538 $query = $context->getRequest()->getQueryValues();
539 unset( $query['title'] );
540 $title = $page->getPageTitle( $par );
541 $url = $title->getFullURL( $query );
542 $context->getOutput()->redirect( $url );
543
544 return $title;
545 }
546
547 $context->setTitle( $page->getPageTitle( $par ) );
548 } elseif ( !$page->isIncludable() ) {
549 return false;
550 }
551
552 $page->including( $including );
553 if ( $linkRenderer ) {
554 $page->setLinkRenderer( $linkRenderer );
555 }
556
557 // Execute special page
558 $page->run( $par );
559
560 return true;
561 }
562
578 public function capturePath(
580 ) {
582 $main = RequestContext::getMain();
583
584 // Save current globals and main context
585 $glob = [
586 'title' => $wgTitle,
587 'output' => $wgOut,
588 'request' => $wgRequest,
589 'user' => $wgUser,
590 'language' => $wgLang,
591 ];
592 $ctx = [
593 'title' => $main->getTitle(),
594 'output' => $main->getOutput(),
595 'request' => $main->getRequest(),
596 'user' => $main->getUser(),
597 'language' => $main->getLanguage(),
598 ];
599 if ( $main->canUseWikiPage() ) {
600 $ctx['wikipage'] = $main->getWikiPage();
601 }
602
603 // Override
605 $wgOut = $context->getOutput();
606 $wgRequest = $context->getRequest();
607 $wgUser = $context->getUser();
608 $wgLang = $context->getLanguage();
609 $main->setTitle( $title );
610 $main->setOutput( $context->getOutput() );
611 $main->setRequest( $context->getRequest() );
612 $main->setUser( $context->getUser() );
613 $main->setLanguage( $context->getLanguage() );
614
615 // The useful part
616 $ret = $this->executePath( $title, $context, true, $linkRenderer );
617
618 // Restore old globals and context
619 $wgTitle = $glob['title'];
620 $wgOut = $glob['output'];
621 $wgRequest = $glob['request'];
622 $wgUser = $glob['user'];
623 $wgLang = $glob['language'];
624 $main->setTitle( $ctx['title'] );
625 $main->setOutput( $ctx['output'] );
626 $main->setRequest( $ctx['request'] );
627 $main->setUser( $ctx['user'] );
628 $main->setLanguage( $ctx['language'] );
629 if ( isset( $ctx['wikipage'] ) ) {
630 $main->setWikiPage( $ctx['wikipage'] );
631 }
632
633 return $ret;
634 }
635
643 public function getLocalNameFor( $name, $subpage = false ) {
644 $aliases = $this->contLang->getSpecialPageAliases();
645 $aliasList = $this->getAliasList();
646
647 // Find the first alias that maps back to $name
648 if ( isset( $aliases[$name] ) ) {
649 $found = false;
650 foreach ( $aliases[$name] as $alias ) {
651 $caseFoldedAlias = $this->contLang->caseFold( $alias );
652 $caseFoldedAlias = str_replace( ' ', '_', $caseFoldedAlias );
653 if ( isset( $aliasList[$caseFoldedAlias] ) &&
654 $aliasList[$caseFoldedAlias] === $name
655 ) {
656 $name = $alias;
657 $found = true;
658 break;
659 }
660 }
661 if ( !$found ) {
662 wfWarn( "Did not find a usable alias for special page '$name'. " .
663 "It seems all defined aliases conflict?" );
664 }
665 } else {
666 // Check if someone misspelled the correct casing
667 if ( is_array( $aliases ) ) {
668 foreach ( $aliases as $n => $values ) {
669 if ( strcasecmp( $name, $n ) === 0 ) {
670 wfWarn( "Found alias defined for $n when searching for " .
671 "special page aliases for $name. Case mismatch?" );
672 return $this->getLocalNameFor( $n, $subpage );
673 }
674 }
675 }
676
677 wfWarn( "Did not find alias for special page '$name'. " .
678 "Perhaps no aliases are defined for it?" );
679 }
680
681 if ( $subpage !== false && !is_null( $subpage ) ) {
682 // Make sure it's in dbkey form
683 $subpage = str_replace( ' ', '_', $subpage );
684 $name = "$name/$subpage";
685 }
686
687 return $this->contLang->ucfirst( $name );
688 }
689
696 public function getTitleForAlias( $alias ) {
697 list( $name, $subpage ) = $this->resolveAlias( $alias );
698 if ( $name != null ) {
699 return SpecialPage::getTitleFor( $name, $subpage );
700 }
701
702 return null;
703 }
704}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
$wgSend404Code
Some web hosts attempt to rewrite all responses with a 404 (not found) status code,...
wfWarn( $msg, $callerOffset=1, $level=E_USER_NOTICE)
Send a warning either to the debug log or in a PHP error depending on $wgDevelopmentWarnings.
wfLogWarning( $msg, $callerOffset=1, $level=E_USER_WARNING)
Send a warning as a PHP error and the debug log.
$wgOut
Definition Setup.php:880
if(! $wgDBerrorLogTZ) $wgRequest
Definition Setup.php:728
$wgLang
Definition Setup.php:875
return[ 'abap'=> true, 'abl'=> true, 'abnf'=> true, 'aconf'=> true, 'actionscript'=> true, 'actionscript3'=> true, 'ada'=> true, 'ada2005'=> true, 'ada95'=> true, 'adl'=> true, 'agda'=> true, 'aheui'=> true, 'ahk'=> true, 'alloy'=> true, 'ambienttalk'=> true, 'ambienttalk/2'=> true, 'ampl'=> true, 'antlr'=> true, 'antlr-actionscript'=> true, 'antlr-as'=> true, 'antlr-c#'=> true, 'antlr-cpp'=> true, 'antlr-csharp'=> true, 'antlr-java'=> true, 'antlr-objc'=> true, 'antlr-perl'=> true, 'antlr-python'=> true, 'antlr-rb'=> true, 'antlr-ruby'=> true, 'apache'=> true, 'apacheconf'=> true, 'apl'=> true, 'applescript'=> true, 'arduino'=> true, 'arexx'=> true, 'as'=> true, 'as3'=> true, 'asm'=> true, 'aspectj'=> true, 'aspx-cs'=> true, 'aspx-vb'=> true, 'asy'=> true, 'asymptote'=> true, 'at'=> true, 'autohotkey'=> true, 'autoit'=> true, 'awk'=> true, 'b3d'=> true, 'basemake'=> true, 'bash'=> true, 'basic'=> true, 'bat'=> true, 'batch'=> true, 'bbcode'=> true, 'bc'=> true, 'befunge'=> true, 'bf'=> true, 'bib'=> true, 'bibtex'=> true, 'blitzbasic'=> true, 'blitzmax'=> true, 'bmax'=> true, 'bnf'=> true, 'boo'=> true, 'boogie'=> true, 'bplus'=> true, 'brainfuck'=> true, 'bro'=> true, 'bsdmake'=> true, 'bst'=> true, 'bst-pybtex'=> true, 'bugs'=> true, 'c'=> true, 'c#'=> true, 'c++'=> true, 'c++-objdumb'=> true, 'c-objdump'=> true, 'ca65'=> true, 'cadl'=> true, 'camkes'=> true, 'capdl'=> true, 'capnp'=> true, 'cbmbas'=> true, 'ceylon'=> true, 'cf3'=> true, 'cfc'=> true, 'cfengine3'=> true, 'cfg'=> true, 'cfm'=> true, 'cfs'=> true, 'chai'=> true, 'chaiscript'=> true, 'chapel'=> true, 'cheetah'=> true, 'chpl'=> true, 'cirru'=> true, 'cl'=> true, 'clay'=> true, 'clean'=> true, 'clipper'=> true, 'clj'=> true, 'cljs'=> true, 'clojure'=> true, 'clojurescript'=> true, 'cmake'=> true, 'cobol'=> true, 'cobolfree'=> true, 'coffee'=> true, 'coffee-script'=> true, 'coffeescript'=> true, 'common-lisp'=> true, 'componentpascal'=> true, 'console'=> true, 'control'=> true, 'coq'=> true, 'cp'=> true, 'cpp'=> true, 'cpp-objdump'=> true, 'cpsa'=> true, 'cr'=> true, 'crmsh'=> true, 'croc'=> true, 'cry'=> true, 'cryptol'=> true, 'crystal'=> true, 'csh'=> true, 'csharp'=> true, 'csound'=> true, 'csound-csd'=> true, 'csound-document'=> true, 'csound-orc'=> true, 'csound-sco'=> true, 'csound-score'=> true, 'css'=> true, 'css+django'=> true, 'css+erb'=> true, 'css+genshi'=> true, 'css+genshitext'=> true, 'css+jinja'=> true, 'css+lasso'=> true, 'css+mako'=> true, 'css+mozpreproc'=> true, 'css+myghty'=> true, 'css+php'=> true, 'css+ruby'=> true, 'css+smarty'=> true, 'cu'=> true, 'cucumber'=> true, 'cuda'=> true, 'cxx-objdump'=> true, 'cypher'=> true, 'cython'=> true, 'd'=> true, 'd-objdump'=> true, 'dart'=> true, 'debcontrol'=> true, 'debsources'=> true, 'delphi'=> true, 'dg'=> true, 'diff'=> true, 'django'=> true, 'do'=> true, 'docker'=> true, 'dockerfile'=> true, 'dosbatch'=> true, 'doscon'=> true, 'dosini'=> true, 'dpatch'=> true, 'dtd'=> true, 'duby'=> true, 'duel'=> true, 'dylan'=> true, 'dylan-console'=> true, 'dylan-lid'=> true, 'dylan-repl'=> true, 'earl-grey'=> true, 'earlgrey'=> true, 'easytrieve'=> true, 'ebnf'=> true, 'ec'=> true, 'ecl'=> true, 'eg'=> true, 'eiffel'=> true, 'elisp'=> true, 'elixir'=> true, 'elm'=> true, 'emacs'=> true, 'emacs-lisp'=> true, 'erb'=> true, 'erl'=> true, 'erlang'=> true, 'evoque'=> true, 'ex'=> true, 'exs'=> true, 'extempore'=> true, 'ezhil'=> true, 'factor'=> true, 'fan'=> true, 'fancy'=> true, 'felix'=> true, 'fish'=> true, 'fishshell'=> true, 'flatline'=> true, 'flx'=> true, 'forth'=> true, 'fortran'=> true, 'fortranfixed'=> true, 'foxpro'=> true, 'fsharp'=> true, 'fy'=> true, 'gap'=> true, 'gas'=> true, 'gawk'=> true, 'genshi'=> true, 'genshitext'=> true, 'gherkin'=> true, 'glsl'=> true, 'gnuplot'=> true, 'go'=> true, 'golo'=> true, 'gooddata-cl'=> true, 'gosu'=> true, 'groff'=> true, 'groovy'=> true, 'gst'=> true, 'haml'=> true, 'handlebars'=> true, 'haskell'=> true, 'haxe'=> true, 'haxeml'=> true, 'hexdump'=> true, 'hs'=> true, 'hsa'=> true, 'hsail'=> true, 'html'=> true, 'html+cheetah'=> true, 'html+django'=> true, 'html+erb'=> true, 'html+evoque'=> true, 'html+genshi'=> true, 'html+handlebars'=> true, 'html+jinja'=> true, 'html+kid'=> true, 'html+lasso'=> true, 'html+mako'=> true, 'html+myghty'=> true, 'html+ng2'=> true, 'html+php'=> true, 'html+ruby'=> true, 'html+smarty'=> true, 'html+spitfire'=> true, 'html+twig'=> true, 'html+velocity'=> true, 'htmlcheetah'=> true, 'htmldjango'=> true, 'http'=> true, 'hx'=> true, 'hxml'=> true, 'hxsl'=> true, 'hy'=> true, 'hybris'=> true, 'hylang'=> true, 'i6'=> true, 'i6t'=> true, 'i7'=> true, 'idl'=> true, 'idl4'=> true, 'idr'=> true, 'idris'=> true, 'iex'=> true, 'igor'=> true, 'igorpro'=> true, 'ik'=> true, 'inform6'=> true, 'inform7'=> true, 'ini'=> true, 'io'=> true, 'ioke'=> true, 'irb'=> true, 'irc'=> true, 'isabelle'=> true, 'j'=> true, 'jade'=> true, 'jags'=> true, 'jasmin'=> true, 'jasminxt'=> true, 'java'=> true, 'javascript'=> true, 'javascript+cheetah'=> true, 'javascript+django'=> true, 'javascript+erb'=> true, 'javascript+genshi'=> true, 'javascript+genshitext'=> true, 'javascript+jinja'=> true, 'javascript+lasso'=> true, 'javascript+mako'=> true, 'javascript+mozpreproc'=> true, 'javascript+myghty'=> true, 'javascript+php'=> true, 'javascript+ruby'=> true, 'javascript+smarty'=> true, 'javascript+spitfire'=> true, 'jbst'=> true, 'jcl'=> true, 'jinja'=> true, 'jl'=> true, 'jlcon'=> true, 'jproperties'=> true, 'js'=> true, 'js+cheetah'=> true, 'js+django'=> true, 'js+erb'=> true, 'js+genshi'=> true, 'js+genshitext'=> true, 'js+jinja'=> true, 'js+lasso'=> true, 'js+mako'=> true, 'js+myghty'=> true, 'js+php'=> true, 'js+ruby'=> true, 'js+smarty'=> true, 'js+spitfire'=> true, 'jsgf'=> true, 'json'=> true, 'json-ld'=> true, 'json-object'=> true, 'jsonld'=> true, 'jsonml+bst'=> true, 'jsp'=> true, 'julia'=> true, 'juttle'=> true, 'kal'=> true, 'kconfig'=> true, 'kernel-config'=> true, 'kid'=> true, 'koka'=> true, 'kotlin'=> true, 'ksh'=> true, 'lagda'=> true, 'lasso'=> true, 'lassoscript'=> true, 'latex'=> true, 'lcry'=> true, 'lcryptol'=> true, 'lean'=> true, 'less'=> true, 'lhaskell'=> true, 'lhs'=> true, 'lid'=> true, 'lidr'=> true, 'lidris'=> true, 'lighttpd'=> true, 'lighty'=> true, 'limbo'=> true, 'linux-config'=> true, 'liquid'=> true, 'lisp'=> true, 'literate-agda'=> true, 'literate-cryptol'=> true, 'literate-haskell'=> true, 'literate-idris'=> true, 'live-script'=> true, 'livescript'=> true, 'llvm'=> true, 'logos'=> true, 'logtalk'=> true, 'lsl'=> true, 'lua'=> true, 'm2'=> true, 'make'=> true, 'makefile'=> true, 'mako'=> true, 'man'=> true, 'maql'=> true, 'mask'=> true, 'mason'=> true, 'mathematica'=> true, 'matlab'=> true, 'matlabsession'=> true, 'mawk'=> true, 'md'=> true, 'menuconfig'=> true, 'mf'=> true, 'minid'=> true, 'mma'=> true, 'modelica'=> true, 'modula2'=> true, 'moin'=> true, 'monkey'=> true, 'monte'=> true, 'moo'=> true, 'moocode'=> true, 'moon'=> true, 'moonscript'=> true, 'mozhashpreproc'=> true, 'mozpercentpreproc'=> true, 'mq4'=> true, 'mq5'=> true, 'mql'=> true, 'mql4'=> true, 'mql5'=> true, 'msc'=> true, 'mscgen'=> true, 'mupad'=> true, 'mxml'=> true, 'myghty'=> true, 'mysql'=> true, 'nasm'=> true, 'nawk'=> true, 'nb'=> true, 'ncl'=> true, 'nemerle'=> true, 'nesc'=> true, 'newlisp'=> true, 'newspeak'=> true, 'ng2'=> true, 'nginx'=> true, 'nim'=> true, 'nimrod'=> true, 'nit'=> true, 'nix'=> true, 'nixos'=> true, 'nroff'=> true, 'nsh'=> true, 'nsi'=> true, 'nsis'=> true, 'numpy'=> true, 'nusmv'=> true, 'obj-c'=> true, 'obj-c++'=> true, 'obj-j'=> true, 'objc'=> true, 'objc++'=> true, 'objdump'=> true, 'objdump-nasm'=> true, 'objective-c'=> true, 'objective-c++'=> true, 'objective-j'=> true, 'objectivec'=> true, 'objectivec++'=> true, 'objectivej'=> true, 'objectpascal'=> true, 'objj'=> true, 'ocaml'=> true, 'octave'=> true, 'odin'=> true, 'ooc'=> true, 'opa'=> true, 'openbugs'=> true, 'openedge'=> true, 'pacmanconf'=> true, 'pan'=> true, 'parasail'=> true, 'pas'=> true, 'pascal'=> true, 'pawn'=> true, 'pcmk'=> true, 'perl'=> true, 'perl6'=> true, 'php'=> true, 'php3'=> true, 'php4'=> true, 'php5'=> true, 'pig'=> true, 'pike'=> true, 'pkgconfig'=> true, 'pl'=> true, 'pl6'=> true, 'plpgsql'=> true, 'po'=> true, 'posh'=> true, 'postgres'=> true, 'postgres-console'=> true, 'postgresql'=> true, 'postgresql-console'=> true, 'postscr'=> true, 'postscript'=> true, 'pot'=> true, 'pov'=> true, 'powershell'=> true, 'praat'=> true, 'progress'=> true, 'prolog'=> true, 'properties'=> true, 'proto'=> true, 'protobuf'=> true, 'ps1'=> true, 'ps1con'=> true, 'psm1'=> true, 'psql'=> true, 'pug'=> true, 'puppet'=> true, 'py'=> true, 'py3'=> true, 'py3tb'=> true, 'pycon'=> true, 'pypy'=> true, 'pypylog'=> true, 'pyrex'=> true, 'pytb'=> true, 'python'=> true, 'python3'=> true, 'pyx'=> true, 'qbasic'=> true, 'qbs'=> true, 'qml'=> true, 'qvt'=> true, 'qvto'=> true, 'r'=> true, 'racket'=> true, 'ragel'=> true, 'ragel-c'=> true, 'ragel-cpp'=> true, 'ragel-d'=> true, 'ragel-em'=> true, 'ragel-java'=> true, 'ragel-objc'=> true, 'ragel-rb'=> true, 'ragel-ruby'=> true, 'raw'=> true, 'rb'=> true, 'rbcon'=> true, 'rconsole'=> true, 'rd'=> true, 'rebol'=> true, 'red'=> true, 'red/system'=> true, 'redcode'=> true, 'registry'=> true, 'resource'=> true, 'resourcebundle'=> true, 'rest'=> true, 'restructuredtext'=> true, 'rexx'=> true, 'rhtml'=> true, 'rkt'=> true, 'rnc'=> true, 'rng-compact'=> true, 'roboconf-graph'=> true, 'roboconf-instances'=> true, 'robotframework'=> true, 'rout'=> true, 'rql'=> true, 'rsl'=> true, 'rst'=> true, 'rts'=> true, 'ruby'=> true, 'rust'=> true, 's'=> true, 'sage'=> true, 'salt'=> true, 'sas'=> true, 'sass'=> true, 'sc'=> true, 'scala'=> true, 'scaml'=> true, 'scheme'=> true, 'scilab'=> true, 'scm'=> true, 'scss'=> true, 'sh'=> true, 'shell'=> true, 'shell-session'=> true, 'shen'=> true, 'silver'=> true, 'slim'=> true, 'sls'=> true, 'smali'=> true, 'smalltalk'=> true, 'smarty'=> true, 'sml'=> true, 'snobol'=> true, 'snowball'=> true, 'sources.list'=> true, 'sourceslist'=> true, 'sp'=> true, 'sparql'=> true, 'spec'=> true, 'spitfire'=> true, 'splus'=> true, 'sql'=> true, 'sqlite3'=> true, 'squeak'=> true, 'squid'=> true, 'squid.conf'=> true, 'squidconf'=> true, 'ssp'=> true, 'st'=> true, 'stan'=> true, 'stata'=> true, 'supercollider'=> true, 'sv'=> true, 'swift'=> true, 'swig'=> true, 'systemverilog'=> true, 't-sql'=> true, 'tads3'=> true, 'tap'=> true, 'tasm'=> true, 'tcl'=> true, 'tcsh'=> true, 'tcshcon'=> true, 'tea'=> true, 'termcap'=> true, 'terminfo'=> true, 'terraform'=> true, 'tex'=> true, 'text'=> true, 'tf'=> true, 'thrift'=> true, 'todotxt'=> true, 'trac-wiki'=> true, 'trafficscript'=> true, 'treetop'=> true, 'ts'=> true, 'tsql'=> true, 'turtle'=> true, 'twig'=> true, 'typescript'=> true, 'typoscript'=> true, 'typoscriptcssdata'=> true, 'typoscripthtmldata'=> true, 'udiff'=> true, 'urbiscript'=> true, 'v'=> true, 'vala'=> true, 'vapi'=> true, 'vb.net'=> true, 'vbnet'=> true, 'vcl'=> true, 'vclsnippet'=> true, 'vclsnippets'=> true, 'vctreestatus'=> true, 'velocity'=> true, 'verilog'=> true, 'vfp'=> true, 'vgl'=> true, 'vhdl'=> true, 'vim'=> true, 'wdiff'=> true, 'whiley'=> true, 'winbatch'=> true, 'winbugs'=> true, 'x10'=> true, 'xbase'=> true, 'xml'=> true, 'xml+cheetah'=> true, 'xml+django'=> true, 'xml+erb'=> true, 'xml+evoque'=> true, 'xml+genshi'=> true, 'xml+jinja'=> true, 'xml+kid'=> true, 'xml+lasso'=> true, 'xml+mako'=> true, 'xml+myghty'=> true, 'xml+php'=> true, 'xml+ruby'=> true, 'xml+smarty'=> true, 'xml+spitfire'=> true, 'xml+velocity'=> true, 'xq'=> true, 'xql'=> true, 'xqm'=> true, 'xquery'=> true, 'xqy'=> true, 'xslt'=> true, 'xten'=> true, 'xtend'=> true, 'xul+mozpreproc'=> true, 'yaml'=> true, 'yaml+jinja'=> true, 'zephir'=> true, 'zsh'=> true,]
if(! $wgRequest->checkUrlExtension()) if(isset( $_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] !='') $wgTitle
Definition api.php:57
Hooks class.
Definition Hooks.php:34
Internationalisation code.
Definition Language.php:36
Class that generates HTML links for pages.
Factory for handling the special page list and generating SpecialPage objects.
getRestrictedPages(User $user)
Return categorised listable special pages which are available for the current user,...
resolveAlias( $alias)
Given a special page name with a possible subpage, return an array where the first element is the spe...
getRegularPages()
Return categorised listable special pages for all users.
array $list
Special page name => class name.
getPage( $name)
Find the object with a given name and return it (or NULL)
exists( $name)
Check if a given name exist as a special page or as a special page alias.
getNames()
Returns a list of canonical special page names.
getUsablePages(User $user)
Return categorised listable special pages which are available for the current user,...
getTitleForAlias( $alias)
Get a title for a given alias.
getLocalNameFor( $name, $subpage=false)
Get the local name for a specified canonical name.
getPageList()
Get the special page list as an array.
static $coreList
List of special page names to the subclass of SpecialPage which handles them.
getAliasList()
Initialise and return the list of special page aliases.
__construct(Config $config, Language $contLang)
executePath(Title &$title, IContextSource &$context, $including=false, LinkRenderer $linkRenderer=null)
Execute a special page path.
capturePath(Title $title, IContextSource $context, LinkRenderer $linkRenderer=null)
Just like executePath() but will override global variables and execute the page in "inclusion" mode.
Profiler base class that defines the interface and some trivial functionality.
Definition Profiler.php:33
Group all the pieces relevant to the context of a request into one instance.
Parent class for all special pages.
Represents a title within MediaWiki.
Definition Title.php:40
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition User.php:48
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
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
Definition hooks.txt:2848
namespace and then decline to actually register it file or subcat img or subcat $title
Definition hooks.txt:955
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
Definition hooks.txt:783
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:2003
Allows to change the fields on the form that will be generated $name
Definition hooks.txt:271
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:1617
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 an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form before processing starts Return false to skip default processing and return $ret $linkRenderer
Definition hooks.txt:2054
Interface for configuration instances.
Definition Config.php:28
Interface for objects which can provide a MediaWiki context on request.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))