wiki.techinc.nl/includes/AutoLoader.php

1271 lines
66 KiB
PHP
Raw Normal View History

<?php
/**
* This defines autoloading handler for whole MediaWiki framework
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
/**
* Locations of core classes
* Extension classes are specified with $wgAutoloadClasses
* This array is a global instead of a static member of AutoLoader to work around a bug in APC
*/
2008-07-24 12:51:26 +00:00
global $wgAutoloadLocalClasses;
$wgAutoloadLocalClasses = array(
# Includes
'AjaxDispatcher' => 'includes/AjaxDispatcher.php',
'AjaxResponse' => 'includes/AjaxResponse.php',
'AlphabeticPager' => 'includes/Pager.php',
'AtomFeed' => 'includes/Feed.php',
'AuthPlugin' => 'includes/AuthPlugin.php',
'AuthPluginUser' => 'includes/AuthPlugin.php',
'Autopromote' => 'includes/Autopromote.php',
'BaseTemplate' => 'includes/SkinTemplate.php',
'Block' => 'includes/Block.php',
'CacheHelper' => 'includes/CacheHelper.php',
'Category' => 'includes/Category.php',
'Categoryfinder' => 'includes/Categoryfinder.php',
2011-10-15 17:37:05 +00:00
'CategoryViewer' => 'includes/CategoryViewer.php',
'ChangesFeed' => 'includes/ChangesFeed.php',
'ChangeTags' => 'includes/ChangeTags.php',
'ChannelFeed' => 'includes/Feed.php',
'Collation' => 'includes/Collation.php',
'CollationCkb' => 'includes/Collation.php',
'ConcatenatedGzipHistoryBlob' => 'includes/HistoryBlob.php',
'Cookie' => 'includes/Cookie.php',
'CookieJar' => 'includes/Cookie.php',
'CurlHttpRequest' => 'includes/HttpFunctions.php',
'DeprecatedGlobal' => 'includes/DeprecatedGlobal.php',
'DerivativeRequest' => 'includes/WebRequest.php',
'DiffHistoryBlob' => 'includes/HistoryBlob.php',
2011-04-03 14:59:58 +00:00
'DummyLinker' => 'includes/Linker.php',
'Dump7ZipOutput' => 'includes/Export.php',
'DumpBZip2Output' => 'includes/Export.php',
'DumpFileOutput' => 'includes/Export.php',
'DumpFilter' => 'includes/Export.php',
'DumpGZipOutput' => 'includes/Export.php',
'DumpLatestFilter' => 'includes/Export.php',
'DumpMultiWriter' => 'includes/Export.php',
'DumpNamespaceFilter' => 'includes/Export.php',
'DumpNotalkFilter' => 'includes/Export.php',
'DumpOutput' => 'includes/Export.php',
'DumpPipeOutput' => 'includes/Export.php',
'EditPage' => 'includes/EditPage.php',
'EmailNotification' => 'includes/UserMailer.php',
'Fallback' => 'includes/Fallback.php',
'FauxRequest' => 'includes/WebRequest.php',
'FauxResponse' => 'includes/WebResponse.php',
'FeedItem' => 'includes/Feed.php',
'FeedUtils' => 'includes/FeedUtils.php',
'FileDeleteForm' => 'includes/FileDeleteForm.php',
'ForkController' => 'includes/ForkController.php',
'FormOptions' => 'includes/FormOptions.php',
'GitInfo' => 'includes/GitInfo.php',
'HistoryBlob' => 'includes/HistoryBlob.php',
'HistoryBlobCurStub' => 'includes/HistoryBlob.php',
'HistoryBlobStub' => 'includes/HistoryBlob.php',
'Hooks' => 'includes/Hooks.php',
'Html' => 'includes/Html.php',
'HtmlFormatter' => 'includes/HtmlFormatter.php',
'HTMLApiField' => 'includes/htmlform/HTMLApiField.php',
'HTMLButtonField' => 'includes/htmlform/HTMLButtonField.php',
'HTMLCheckField' => 'includes/htmlform/HTMLCheckField.php',
'HTMLCheckMatrix' => 'includes/htmlform/HTMLCheckMatrix.php',
'HTMLFormFieldCloner' => 'includes/htmlform/HTMLFormFieldCloner.php',
'HTMLEditTools' => 'includes/htmlform/HTMLEditTools.php',
'HTMLFloatField' => 'includes/htmlform/HTMLFloatField.php',
'HTMLForm' => 'includes/htmlform/HTMLForm.php',
'HTMLFormField' => 'includes/htmlform/HTMLFormField.php',
'HTMLFormFieldRequiredOptionsException' =>
'includes/htmlform/HTMLFormFieldRequiredOptionsException.php',
'HTMLHiddenField' => 'includes/htmlform/HTMLHiddenField.php',
'HTMLInfoField' => 'includes/htmlform/HTMLInfoField.php',
'HTMLIntField' => 'includes/htmlform/HTMLIntField.php',
'HTMLNestedFilterable' => 'includes/htmlform/HTMLNestedFilterable.php',
'HTMLMultiSelectField' => 'includes/htmlform/HTMLMultiSelectField.php',
'HTMLRadioField' => 'includes/htmlform/HTMLRadioField.php',
'HTMLSelectAndOtherField' => 'includes/htmlform/HTMLSelectAndOtherField.php',
'HTMLSelectField' => 'includes/htmlform/HTMLSelectField.php',
'HTMLSelectOrOtherField' => 'includes/htmlform/HTMLSelectOrOtherField.php',
'HTMLSubmitField' => 'includes/htmlform/HTMLSubmitField.php',
'HTMLTextAreaField' => 'includes/htmlform/HTMLTextAreaField.php',
'HTMLTextField' => 'includes/htmlform/HTMLTextField.php',
'Http' => 'includes/HttpFunctions.php',
'ICacheHelper' => 'includes/CacheHelper.php',
'IcuCollation' => 'includes/Collation.php',
'IdentityCollation' => 'includes/Collation.php',
'ImportStreamSource' => 'includes/Import.php',
'ImportStringSource' => 'includes/Import.php',
'IndexPager' => 'includes/Pager.php',
'Interwiki' => 'includes/interwiki/Interwiki.php',
'LCStore' => 'includes/cache/LocalisationCache.php',
'LCStoreAccel' => 'includes/cache/LocalisationCache.php',
'LCStoreCDB' => 'includes/cache/LocalisationCache.php',
'LCStoreDB' => 'includes/cache/LocalisationCache.php',
'LCStoreNull' => 'includes/cache/LocalisationCache.php',
'License' => 'includes/Licenses.php',
'Licenses' => 'includes/Licenses.php',
'Linker' => 'includes/Linker.php',
'LinkFilter' => 'includes/LinkFilter.php',
'LocalisationCache' => 'includes/cache/LocalisationCache.php',
'LocalisationCacheBulkLoad' => 'includes/cache/LocalisationCache.php',
'MagicWord' => 'includes/MagicWord.php',
'MagicWordArray' => 'includes/MagicWord.php',
'MailAddress' => 'includes/UserMailer.php',
'MediaWiki' => 'includes/Wiki.php',
'MediaWikiI18N' => 'includes/SkinTemplate.php',
Make it possible for extensions to specify which version of MediaWiki they support via Composer. This change allows extensions to specify they depend on a specific version or version range of MediaWiki. This is done by adding the package mediawiki/mediawiki in their composer.json require section. As MediaWiki itself is not a Composer package and is quite far away from becoming one, a workaround was needed, which is provided by this commit. It works as follows. When "composer install" or "composer update" is run, a Composer hook is invoked. This hook programmatically indicates the root package provides MediaWiki, as it indeed does when extensions are installed into MediaWiki. The package link of type "provides" includes the MediaWiki version, which is read from DefaultSettings.php. This functionality has been tested and confirmed to work. One needs a recent Composer version for it to have an effect. The upcoming Composer alpha8 release will suffice. See https://github.com/composer/composer/issues/2520 Tests are included. Composer independent tests will run always, while the Composer specific ones are skipped when Composer is not installed. People that already have a composer.json file in their MediaWiki root directory will need to make the same additions there as this commit makes to composer-json.example. If this is not done, the new behaviour will not work for them (though no existing behaviour will break). The change to the json file has been made in such a way to minimize the likelihood that any future modifications there will be needed. Thanks go to @beausimensen (Sculpin) and @seldaek (Composer) for their support. Change-Id: I8df66a92971146ab79cd4fcbd181e559115ca240
2013-12-20 22:34:49 +00:00
'MediaWikiVersionFetcher' => 'includes/MediaWikiVersionFetcher.php',
'Message' => 'includes/Message.php',
'MessageBlobStore' => 'includes/MessageBlobStore.php',
'MimeMagic' => 'includes/MimeMagic.php',
'MWHookException' => 'includes/Hooks.php',
'MWHttpRequest' => 'includes/HttpFunctions.php',
'MWInit' => 'includes/Init.php',
'MWNamespace' => 'includes/Namespace.php',
'OutputPage' => 'includes/OutputPage.php',
'Pager' => 'includes/Pager.php',
'PasswordError' => 'includes/User.php',
'PathRouter' => 'includes/PathRouter.php',
'PathRouterPatternReplacer' => 'includes/PathRouter.php',
2010-11-21 14:35:39 +00:00
'PhpHttpRequest' => 'includes/HttpFunctions.php',
'PoolCounter' => 'includes/poolcounter/PoolCounter.php',
'PoolCounter_Stub' => 'includes/poolcounter/PoolCounter.php',
'PoolCounterRedis' => 'includes/poolcounter/PoolCounterRedis.php',
'PoolCounterWork' => 'includes/poolcounter/PoolCounterWork.php',
'PoolCounterWorkViaCallback' => 'includes/poolcounter/PoolCounterWork.php',
'PoolWorkArticleView' => 'includes/poolcounter/PoolWorkArticleView.php',
'Preferences' => 'includes/Preferences.php',
'PreferencesForm' => 'includes/Preferences.php',
'PrefixSearch' => 'includes/PrefixSearch.php',
'ProtectionForm' => 'includes/ProtectionForm.php',
'QuickTemplate' => 'includes/SkinTemplate.php',
'RawMessage' => 'includes/Message.php',
'ReverseChronologicalPager' => 'includes/Pager.php',
'RevisionItem' => 'includes/RevisionList.php',
'RevisionItemBase' => 'includes/RevisionList.php',
'RevisionListBase' => 'includes/RevisionList.php',
'Revision' => 'includes/Revision.php',
'RevisionList' => 'includes/RevisionList.php',
'RSSFeed' => 'includes/Feed.php',
'Sanitizer' => 'includes/Sanitizer.php',
'SiteConfiguration' => 'includes/SiteConfiguration.php',
'SiteStats' => 'includes/SiteStats.php',
'SiteStatsInit' => 'includes/SiteStats.php',
'Skin' => 'includes/Skin.php',
'SkinTemplate' => 'includes/SkinTemplate.php',
'SquidPurgeClient' => 'includes/SquidPurgeClient.php',
'SquidPurgeClientPool' => 'includes/SquidPurgeClient.php',
'StatCounter' => 'includes/StatCounter.php',
'Status' => 'includes/Status.php',
'StreamFile' => 'includes/StreamFile.php',
'StringPrefixSearch' => 'includes/PrefixSearch.php',
2010-01-27 07:00:07 +00:00
'StubContLang' => 'includes/StubObject.php',
'StubObject' => 'includes/StubObject.php',
'StubUserLang' => 'includes/StubObject.php',
'TablePager' => 'includes/Pager.php',
'MWTimestamp' => 'includes/MWTimestamp.php',
'TimestampException' => 'includes/TimestampException.php',
'Title' => 'includes/Title.php',
'TitleArray' => 'includes/TitleArray.php',
'TitleArrayFromResult' => 'includes/TitleArrayFromResult.php',
'TitlePrefixSearch' => 'includes/PrefixSearch.php',
'UploadSourceAdapter' => 'includes/Import.php',
'UppercaseCollation' => 'includes/Collation.php',
'User' => 'includes/User.php',
'UserArray' => 'includes/UserArray.php',
'UserArrayFromResult' => 'includes/UserArrayFromResult.php',
'UserCache' => 'includes/cache/UserCache.php',
'UserMailer' => 'includes/UserMailer.php',
'UserRightsProxy' => 'includes/UserRightsProxy.php',
'WatchedItem' => 'includes/WatchedItem.php',
'WebRequest' => 'includes/WebRequest.php',
'WebRequestUpload' => 'includes/WebRequest.php',
'WebResponse' => 'includes/WebResponse.php',
'WikiExporter' => 'includes/Export.php',
'WikiImporter' => 'includes/Import.php',
'WikiRevision' => 'includes/Import.php',
'WikiMap' => 'includes/WikiMap.php',
'WikiReference' => 'includes/WikiMap.php',
'Xml' => 'includes/Xml.php',
'XmlDumpWriter' => 'includes/Export.php',
'XmlJsCode' => 'includes/Xml.php',
'XMLReader2' => 'includes/Import.php',
'XmlSelect' => 'includes/Xml.php',
# includes/actions
'Action' => 'includes/actions/Action.php',
'CachedAction' => 'includes/actions/CachedAction.php',
'CreditsAction' => 'includes/actions/CreditsAction.php',
'DeleteAction' => 'includes/actions/DeleteAction.php',
'EditAction' => 'includes/actions/EditAction.php',
'FormlessAction' => 'includes/actions/FormlessAction.php',
'FormAction' => 'includes/actions/FormAction.php',
'HistoryAction' => 'includes/actions/HistoryAction.php',
'HistoryPage' => 'includes/actions/HistoryAction.php',
'HistoryPager' => 'includes/actions/HistoryAction.php',
'InfoAction' => 'includes/actions/InfoAction.php',
'MarkpatrolledAction' => 'includes/actions/MarkpatrolledAction.php',
'ProtectAction' => 'includes/actions/ProtectAction.php',
'PurgeAction' => 'includes/actions/PurgeAction.php',
'RawAction' => 'includes/actions/RawAction.php',
'RawPage' => 'includes/actions/RawAction.php',
'RenderAction' => 'includes/actions/RenderAction.php',
'RevertAction' => 'includes/actions/RevertAction.php',
'RevertFileAction' => 'includes/actions/RevertAction.php',
'RevisiondeleteAction' => 'includes/actions/RevisiondeleteAction.php',
'RollbackAction' => 'includes/actions/RollbackAction.php',
'SubmitAction' => 'includes/actions/EditAction.php',
'UnprotectAction' => 'includes/actions/ProtectAction.php',
'UnwatchAction' => 'includes/actions/WatchAction.php',
'ViewAction' => 'includes/actions/ViewAction.php',
'WatchAction' => 'includes/actions/WatchAction.php',
# includes/api
'ApiBase' => 'includes/api/ApiBase.php',
'ApiBlock' => 'includes/api/ApiBlock.php',
'ApiComparePages' => 'includes/api/ApiComparePages.php',
'ApiCreateAccount' => 'includes/api/ApiCreateAccount.php',
'ApiDelete' => 'includes/api/ApiDelete.php',
'ApiDisabled' => 'includes/api/ApiDisabled.php',
'ApiEditPage' => 'includes/api/ApiEditPage.php',
'ApiEmailUser' => 'includes/api/ApiEmailUser.php',
'ApiExpandTemplates' => 'includes/api/ApiExpandTemplates.php',
'ApiFeedContributions' => 'includes/api/ApiFeedContributions.php',
'ApiFeedRecentChanges' => 'includes/api/ApiFeedRecentChanges.php',
'ApiFeedWatchlist' => 'includes/api/ApiFeedWatchlist.php',
'ApiFileRevert' => 'includes/api/ApiFileRevert.php',
'ApiFormatBase' => 'includes/api/ApiFormatBase.php',
'ApiFormatDbg' => 'includes/api/ApiFormatDbg.php',
'ApiFormatDump' => 'includes/api/ApiFormatDump.php',
'ApiFormatFeedWrapper' => 'includes/api/ApiFormatBase.php',
'ApiFormatJson' => 'includes/api/ApiFormatJson.php',
'ApiFormatNone' => 'includes/api/ApiFormatNone.php',
'ApiFormatPhp' => 'includes/api/ApiFormatPhp.php',
'ApiFormatRaw' => 'includes/api/ApiFormatRaw.php',
'ApiFormatTxt' => 'includes/api/ApiFormatTxt.php',
'ApiFormatWddx' => 'includes/api/ApiFormatWddx.php',
'ApiFormatXml' => 'includes/api/ApiFormatXml.php',
'ApiFormatXmlRsd' => 'includes/api/ApiRsd.php',
'ApiFormatYaml' => 'includes/api/ApiFormatYaml.php',
'ApiHelp' => 'includes/api/ApiHelp.php',
'ApiImageRotate' => 'includes/api/ApiImageRotate.php',
'ApiImport' => 'includes/api/ApiImport.php',
'ApiImportReporter' => 'includes/api/ApiImport.php',
'ApiLogin' => 'includes/api/ApiLogin.php',
'ApiLogout' => 'includes/api/ApiLogout.php',
'ApiMain' => 'includes/api/ApiMain.php',
'ApiModuleManager' => 'includes/api/ApiModuleManager.php',
'ApiMove' => 'includes/api/ApiMove.php',
'ApiOpenSearch' => 'includes/api/ApiOpenSearch.php',
'ApiOptions' => 'includes/api/ApiOptions.php',
'ApiPageSet' => 'includes/api/ApiPageSet.php',
'ApiParamInfo' => 'includes/api/ApiParamInfo.php',
'ApiParse' => 'includes/api/ApiParse.php',
'ApiPatrol' => 'includes/api/ApiPatrol.php',
'ApiProtect' => 'includes/api/ApiProtect.php',
'ApiPurge' => 'includes/api/ApiPurge.php',
'ApiQuery' => 'includes/api/ApiQuery.php',
'ApiQueryAllCategories' => 'includes/api/ApiQueryAllCategories.php',
'ApiQueryAllImages' => 'includes/api/ApiQueryAllImages.php',
'ApiQueryAllLinks' => 'includes/api/ApiQueryAllLinks.php',
'ApiQueryAllMessages' => 'includes/api/ApiQueryAllMessages.php',
'ApiQueryAllPages' => 'includes/api/ApiQueryAllPages.php',
'ApiQueryAllUsers' => 'includes/api/ApiQueryAllUsers.php',
'ApiQueryBacklinks' => 'includes/api/ApiQueryBacklinks.php',
'ApiQueryBase' => 'includes/api/ApiQueryBase.php',
'ApiQueryBlocks' => 'includes/api/ApiQueryBlocks.php',
'ApiQueryCategories' => 'includes/api/ApiQueryCategories.php',
'ApiQueryCategoryInfo' => 'includes/api/ApiQueryCategoryInfo.php',
'ApiQueryCategoryMembers' => 'includes/api/ApiQueryCategoryMembers.php',
'ApiQueryContributions' => 'includes/api/ApiQueryUserContributions.php',
'ApiQueryContributors' => 'includes/api/ApiQueryContributors.php',
'ApiQueryDeletedrevs' => 'includes/api/ApiQueryDeletedrevs.php',
'ApiQueryDisabled' => 'includes/api/ApiQueryDisabled.php',
'ApiQueryDuplicateFiles' => 'includes/api/ApiQueryDuplicateFiles.php',
'ApiQueryExternalLinks' => 'includes/api/ApiQueryExternalLinks.php',
'ApiQueryExtLinksUsage' => 'includes/api/ApiQueryExtLinksUsage.php',
'ApiQueryFilearchive' => 'includes/api/ApiQueryFilearchive.php',
'ApiQueryGeneratorBase' => 'includes/api/ApiQueryBase.php',
'ApiQueryImageInfo' => 'includes/api/ApiQueryImageInfo.php',
'ApiQueryImages' => 'includes/api/ApiQueryImages.php',
'ApiQueryInfo' => 'includes/api/ApiQueryInfo.php',
'ApiQueryIWBacklinks' => 'includes/api/ApiQueryIWBacklinks.php',
'ApiQueryIWLinks' => 'includes/api/ApiQueryIWLinks.php',
'ApiQueryLangBacklinks' => 'includes/api/ApiQueryLangBacklinks.php',
'ApiQueryLangLinks' => 'includes/api/ApiQueryLangLinks.php',
'ApiQueryLinks' => 'includes/api/ApiQueryLinks.php',
'ApiQueryLogEvents' => 'includes/api/ApiQueryLogEvents.php',
'ApiQueryORM' => 'includes/api/ApiQueryORM.php',
'ApiQueryPageProps' => 'includes/api/ApiQueryPageProps.php',
'ApiQueryPagesWithProp' => 'includes/api/ApiQueryPagesWithProp.php',
'ApiQueryPagePropNames' => 'includes/api/ApiQueryPagePropNames.php',
'ApiQueryPrefixSearch' => 'includes/api/ApiQueryPrefixSearch.php',
'ApiQueryProtectedTitles' => 'includes/api/ApiQueryProtectedTitles.php',
'ApiQueryQueryPage' => 'includes/api/ApiQueryQueryPage.php',
'ApiQueryRandom' => 'includes/api/ApiQueryRandom.php',
'ApiQueryRecentChanges' => 'includes/api/ApiQueryRecentChanges.php',
'ApiQueryFileRepoInfo' => 'includes/api/ApiQueryFileRepoInfo.php',
'ApiQueryRedirects' => 'includes/api/ApiQueryRedirects.php',
'ApiQueryRevisions' => 'includes/api/ApiQueryRevisions.php',
'ApiQuerySearch' => 'includes/api/ApiQuerySearch.php',
'ApiQuerySiteinfo' => 'includes/api/ApiQuerySiteinfo.php',
'ApiQueryStashImageInfo' => 'includes/api/ApiQueryStashImageInfo.php',
'ApiQueryTags' => 'includes/api/ApiQueryTags.php',
'ApiQueryUserInfo' => 'includes/api/ApiQueryUserInfo.php',
'ApiQueryUsers' => 'includes/api/ApiQueryUsers.php',
'ApiQueryWatchlist' => 'includes/api/ApiQueryWatchlist.php',
'ApiQueryWatchlistRaw' => 'includes/api/ApiQueryWatchlistRaw.php',
'ApiResult' => 'includes/api/ApiResult.php',
'ApiRevisionDelete' => 'includes/api/ApiRevisionDelete.php',
'ApiRollback' => 'includes/api/ApiRollback.php',
'ApiRsd' => 'includes/api/ApiRsd.php',
'ApiSetNotificationTimestamp' => 'includes/api/ApiSetNotificationTimestamp.php',
'ApiTokens' => 'includes/api/ApiTokens.php',
'ApiUnblock' => 'includes/api/ApiUnblock.php',
'ApiUndelete' => 'includes/api/ApiUndelete.php',
here it is ... the upload-api, script-server, js2 (javascript phase2) branch merge 1st attempt. Here is a short overview of changes and associated default configuration variables (most everything is off by default) also see ~soon to be updated~: http://www.mediawiki.org/wiki/Media_Projects_Overview = Upload Improvements = ==Upload API == * Based on the early work of Bryan Tong and others it adds the upload option to the api. * We rewrite Special:Upload page to include use the new refactoring * Added in token checks in both the SpecialUpload.php page so avoids DOS / xss copy-by-url JavaScript based cross site POST file submissions == Copy by URL== $wgAllowCopyUploads = false; * http class rewrite includes a new http background download see: includes/HttpFunctions.php * spins off a php process that calls: maintenance/http_session_download.php * pushes updates to the session and gives the user a progress bar on http copy uploads from other server progress (using js2 upload interface) (if not using the js2 upload interface it does the request in-place but the download is limited to the php ini timeout time) == Firefogg == * Firefogg enables resumable upload by chunks * progress indicators and conditional invokation (js2 system) * and of-course client side transcoding. = Script Server = $wgEnableScriptLoader = false; * off by default if $wgEnableScriptLoader is turned on script files are grouped, gziped, cached etc. for more info see: http://www.mediawiki.org/wiki/Extension:ScriptLoader * Includes some early skin js include fixes (skin/script system still lots of love) * Includes a "javascript class autoloader" this is packaged into mwEmbed so that the mwEmbed library can work in stand alone mode (while retaining localization and script serving) (one such application is the make page for firefogg.org : http://www.firefogg.org/make/index.html ) * The file that contains the autojavascript loading classes is: js2/php/jsAutoloadLocalClasses.php * One can use this auto class loading dependency system with extensions and add-ons but I need to better document that. = js2 system / mwEmbed= $wgEnableJS2system = false * includes initial rewrite towards more jquery based javascript code * especially for the Special:Upload page. * Also the edit page include support for the "add-media-wizard" * includes dependency loader for javascript that optionally takes advantage of the script-loader * remote embedding of javascript interfaces (like embedding video, or commons media searching) * $wgDebugJavaScript = false; .. .this variable lets you always get "always fresh javascript". When used with the script-loader it does not minify the script-loader output. = mwEmbed = * Will commit a separate patch to oggHandler that conditionally outputs <video tag> to use the new javascript video player. ** mv_embed player includes: play-head, volume control, remote embedding, oggz-chop support across plugins. * add-media-wizard adds easy inserts of media to pages (with import) == jQuery== * we include a base install of jQuery, jQuery ui and some plugins. * all the javascript classes are in the scriptloader so its easy to load any set of jquery ui components that you may need using the script-server. You get a callback so you can then execute js with dependencies loaded. == other stuff == there is a bit more code in js2 that pertains to sequence editing, timed text display and basic image editing. We include a base import of pixastic-lib & pixastic-editor... will work with the pixastic developer to try and ensure upstream compatibility on our usage of the library for in-browser photo and sequence manipulation.
2009-07-14 23:52:14 +00:00
'ApiUpload' => 'includes/api/ApiUpload.php',
'ApiUserrights' => 'includes/api/ApiUserrights.php',
2008-08-21 15:44:13 +00:00
'ApiWatch' => 'includes/api/ApiWatch.php',
'UsageException' => 'includes/api/ApiMain.php',
# includes/cache
'BacklinkCache' => 'includes/cache/BacklinkCache.php',
'CacheDependency' => 'includes/cache/CacheDependency.php',
'ConstantDependency' => 'includes/cache/CacheDependency.php',
'DependencyWrapper' => 'includes/cache/CacheDependency.php',
'FileCacheBase' => 'includes/cache/FileCacheBase.php',
'FileDependency' => 'includes/cache/CacheDependency.php',
2012-01-10 07:39:51 +00:00
'GenderCache' => 'includes/cache/GenderCache.php',
'GlobalDependency' => 'includes/cache/CacheDependency.php',
'HTMLFileCache' => 'includes/cache/HTMLFileCache.php',
2011-04-25 21:38:48 +00:00
'LinkBatch' => 'includes/cache/LinkBatch.php',
'LinkCache' => 'includes/cache/LinkCache.php',
'MapCacheLRU' => 'includes/cache/MapCacheLRU.php',
2011-04-25 21:38:48 +00:00
'MessageCache' => 'includes/cache/MessageCache.php',
'ObjectFileCache' => 'includes/cache/ObjectFileCache.php',
'ResourceFileCache' => 'includes/cache/ResourceFileCache.php',
# includes/changes
'ChangesList' => 'includes/changes/ChangesList.php',
'EnhancedChangesList' => 'includes/changes/EnhancedChangesList.php',
'OldChangesList' => 'includes/changes/OldChangesList.php',
'RCCacheEntry' => 'includes/changes/RCCacheEntry.php',
'RCCacheEntryFactory' => 'includes/changes/RCCacheEntryFactory.php',
'RecentChange' => 'includes/changes/RecentChange.php',
# includes/clientpool
'RedisConnectionPool' => 'includes/clientpool/RedisConnectionPool.php',
'RedisConnRef' => 'includes/clientpool/RedisConnectionPool.php',
Make it possible for extensions to specify which version of MediaWiki they support via Composer. This change allows extensions to specify they depend on a specific version or version range of MediaWiki. This is done by adding the package mediawiki/mediawiki in their composer.json require section. As MediaWiki itself is not a Composer package and is quite far away from becoming one, a workaround was needed, which is provided by this commit. It works as follows. When "composer install" or "composer update" is run, a Composer hook is invoked. This hook programmatically indicates the root package provides MediaWiki, as it indeed does when extensions are installed into MediaWiki. The package link of type "provides" includes the MediaWiki version, which is read from DefaultSettings.php. This functionality has been tested and confirmed to work. One needs a recent Composer version for it to have an effect. The upcoming Composer alpha8 release will suffice. See https://github.com/composer/composer/issues/2520 Tests are included. Composer independent tests will run always, while the Composer specific ones are skipped when Composer is not installed. People that already have a composer.json file in their MediaWiki root directory will need to make the same additions there as this commit makes to composer-json.example. If this is not done, the new behaviour will not work for them (though no existing behaviour will break). The change to the json file has been made in such a way to minimize the likelihood that any future modifications there will be needed. Thanks go to @beausimensen (Sculpin) and @seldaek (Composer) for their support. Change-Id: I8df66a92971146ab79cd4fcbd181e559115ca240
2013-12-20 22:34:49 +00:00
# includes/composer
'ComposerPackageModifier' => 'includes/composer/ComposerPackageModifier.php',
'ComposerVersionNormalizer' => 'includes/composer/ComposerVersionNormalizer.php',
# includes/config
'Config' => 'includes/config/Config.php',
Make abstract Config class truly implementation-agnostic Follow up to I13baec0b6 ("Config: Add Config and GlobalConfig classes"): Config: * Rather than returning Status objects, Config::set will now throw an exception if an error is encountered * Config::factory was moved into it's own ConfigFactory class. * Since there are no more functions in it, Config was turned into an interface. GlobalConfig: * Remove $prefix args from Config::set and ::get. The idea of having an abstract Config class is to abstract some notion of configuration data from the particular way in which it is currently implemented (global variables). So the abstract base class has no business dealing with variable name prefixes. ** Instead GlobalVarConfig's implementations of get and set call getWithPrefix and setWithPrefix internally, which are now protected * Rename GlobalConfig to GlobalVarConfig, which makes it clearer that it isn't referring to the scope of the configuration value, but to the scope of the variable name which provides it. ConfigFactory: * ConfigFactory is where Config objects are registered, and later constructed. * Config objects are registered with a given name, and a callback factory function. This allows for implementations to construct the object with the parameters they want, and avoids the overhead of needing an entire class. ** The name 'main' is the default object returned by RequestContext::getConfig(), and is intended to be used by core. * This is a singleton class, the main instance can be obtained with: ConfigFactory::getDefaultInstance() In addition to the above: * $wgConfigClass was removed, and $wgConfigRegistry was introduced, which stores a name => callback. The name is to be what the Config instance is registered with, and the callback should return an implementation of Config. * Tests were written for the new ConfigFactory, and GlobalVarConfig's tests were improved. Co-Authored-By: Ori Livneh <ori@wikimedia.org> Co-Authored-By: Chad Horohoe <chadh@wikimedia.org> Co-Authored-By: Mattflaschen <mflaschen@wikimedia.org> Co-Authored-By: Parent5446 <tylerromeo@gmail.com> Co-Authored-By: Reedy <reedy@wikimedia.org> Co-Authored-By: Daniel Kinzler <daniel.kinzler@wikimedia.de> Change-Id: I5a5857fcfa07598ba4ce9ae5bbb4ce54a567d31e
2014-05-10 08:19:00 +00:00
'ConfigException' => 'includes/config/ConfigException.php',
'ConfigFactory' => 'includes/config/ConfigFactory.php',
'GlobalVarConfig' => 'includes/config/GlobalVarConfig.php',
# includes/content
'AbstractContent' => 'includes/content/AbstractContent.php',
'ContentHandler' => 'includes/content/ContentHandler.php',
'Content' => 'includes/content/Content.php',
'CssContentHandler' => 'includes/content/CssContentHandler.php',
'CssContent' => 'includes/content/CssContent.php',
'JavaScriptContentHandler' => 'includes/content/JavaScriptContentHandler.php',
'JavaScriptContent' => 'includes/content/JavaScriptContent.php',
'MessageContent' => 'includes/content/MessageContent.php',
'MWContentSerializationException' => 'includes/content/ContentHandler.php',
'TextContentHandler' => 'includes/content/TextContentHandler.php',
'TextContent' => 'includes/content/TextContent.php',
'WikitextContentHandler' => 'includes/content/WikitextContentHandler.php',
'WikitextContent' => 'includes/content/WikitextContent.php',
# includes/context
'ContextSource' => 'includes/context/ContextSource.php',
'DerivativeContext' => 'includes/context/DerivativeContext.php',
'IContextSource' => 'includes/context/IContextSource.php',
'RequestContext' => 'includes/context/RequestContext.php',
# includes/dao
'IDBAccessObject' => 'includes/dao/IDBAccessObject.php',
'DBAccessBase' => 'includes/dao/DBAccessBase.php',
# includes/db
'Blob' => 'includes/db/DatabaseUtility.php',
'ChronologyProtector' => 'includes/db/ChronologyProtector.php',
'CloneDatabase' => 'includes/db/CloneDatabase.php',
'DatabaseBase' => 'includes/db/Database.php',
'DatabaseMssql' => 'includes/db/DatabaseMssql.php',
'DatabaseMysql' => 'includes/db/DatabaseMysql.php',
'DatabaseMysqlBase' => 'includes/db/DatabaseMysqlBase.php',
'DatabaseMysqli' => 'includes/db/DatabaseMysqli.php',
'DatabaseOracle' => 'includes/db/DatabaseOracle.php',
'DatabasePostgres' => 'includes/db/DatabasePostgres.php',
'DatabaseSqlite' => 'includes/db/DatabaseSqlite.php',
'DatabaseSqliteStandalone' => 'includes/db/DatabaseSqlite.php',
'DatabaseType' => 'includes/db/Database.php',
'DBAccessError' => 'includes/db/LBFactory.php',
'DBConnectionError' => 'includes/db/DatabaseError.php',
'DBConnRef' => 'includes/db/LoadBalancer.php',
'DBError' => 'includes/db/DatabaseError.php',
'DBExpectedError' => 'includes/db/DatabaseError.php',
'DBObject' => 'includes/db/DatabaseUtility.php',
'IDatabase' => 'includes/db/Database.php',
'IORMRow' => 'includes/db/IORMRow.php',
'IORMTable' => 'includes/db/IORMTable.php',
'DBMasterPos' => 'includes/db/DatabaseUtility.php',
'DBQueryError' => 'includes/db/DatabaseError.php',
'DBUnexpectedError' => 'includes/db/DatabaseError.php',
'FakeResultWrapper' => 'includes/db/DatabaseUtility.php',
'Field' => 'includes/db/DatabaseUtility.php',
'LBFactory' => 'includes/db/LBFactory.php',
'LBFactoryFake' => 'includes/db/LBFactory.php',
'LBFactoryMulti' => 'includes/db/LBFactoryMulti.php',
'LBFactorySimple' => 'includes/db/LBFactory.php',
'LBFactorySingle' => 'includes/db/LBFactorySingle.php',
'LikeMatch' => 'includes/db/DatabaseUtility.php',
'LoadBalancer' => 'includes/db/LoadBalancer.php',
'LoadBalancerSingle' => 'includes/db/LBFactorySingle.php',
'LoadMonitor' => 'includes/db/LoadMonitor.php',
'LoadMonitorMySQL' => 'includes/db/LoadMonitor.php',
'LoadMonitorNull' => 'includes/db/LoadMonitor.php',
'MssqlField' => 'includes/db/DatabaseMssql.php',
'MssqlBlob' => 'includes/db/DatabaseMssql.php',
'MssqlResultWrapper' => 'includes/db/DatabaseMssql.php',
'MySQLField' => 'includes/db/DatabaseMysqlBase.php',
'MySQLMasterPos' => 'includes/db/DatabaseMysqlBase.php',
'ORAField' => 'includes/db/DatabaseOracle.php',
'ORAResult' => 'includes/db/DatabaseOracle.php',
'ORMIterator' => 'includes/db/ORMIterator.php',
'ORMResult' => 'includes/db/ORMResult.php',
'ORMRow' => 'includes/db/ORMRow.php',
'ORMTable' => 'includes/db/ORMTable.php',
'PostgresField' => 'includes/db/DatabasePostgres.php',
'PostgresTransactionState' => 'includes/db/DatabasePostgres.php',
'ResultWrapper' => 'includes/db/DatabaseUtility.php',
'SavepointPostgres' => 'includes/db/DatabasePostgres.php',
'SQLiteField' => 'includes/db/DatabaseSqlite.php',
# includes/debug
'MWDebug' => 'includes/debug/Debug.php',
# includes/deferred
'DataUpdate' => 'includes/deferred/DataUpdate.php',
'DeferrableUpdate' => 'includes/deferred/DeferredUpdates.php',
'DeferredUpdates' => 'includes/deferred/DeferredUpdates.php',
'HTMLCacheUpdate' => 'includes/deferred/HTMLCacheUpdate.php',
'LinksDeletionUpdate' => 'includes/deferred/LinksUpdate.php',
'LinksUpdate' => 'includes/deferred/LinksUpdate.php',
'MWCallableUpdate' => 'includes/deferred/CallableUpdate.php',
'SearchUpdate' => 'includes/deferred/SearchUpdate.php',
'SiteStatsUpdate' => 'includes/deferred/SiteStatsUpdate.php',
'SqlDataUpdate' => 'includes/deferred/SqlDataUpdate.php',
'SquidUpdate' => 'includes/deferred/SquidUpdate.php',
'ViewCountUpdate' => 'includes/deferred/ViewCountUpdate.php',
# includes/diff
'DiffEngine' => 'includes/diff/DairikiDiff.php',
'DiffOp' => 'includes/diff/DairikiDiff.php',
'DiffOpAdd' => 'includes/diff/DairikiDiff.php',
'DiffOpChange' => 'includes/diff/DairikiDiff.php',
'DiffOpCopy' => 'includes/diff/DairikiDiff.php',
'DiffOpDelete' => 'includes/diff/DairikiDiff.php',
'HWLDFWordAccumulator' => 'includes/diff/DairikiDiff.php',
'ArrayDiffFormatter' => 'includes/diff/ArrayDiffFormatter.php',
'Diff' => 'includes/diff/DairikiDiff.php',
'DifferenceEngine' => 'includes/diff/DifferenceEngine.php',
'DiffFormatter' => 'includes/diff/DiffFormatter.php',
'MappedDiff' => 'includes/diff/DairikiDiff.php',
'RangeDifference' => 'includes/diff/WikiDiff3.php',
'TableDiffFormatter' => 'includes/diff/TableDiffFormatter.php',
'UnifiedDiffFormatter' => 'includes/diff/UnifiedDiffFormatter.php',
'WikiDiff3' => 'includes/diff/WikiDiff3.php',
'WordLevelDiff' => 'includes/diff/DairikiDiff.php',
# includes/exception
'UserBlockedError' => 'includes/exception/UserBlockedError.php',
'UserNotLoggedIn' => 'includes/exception/UserNotLoggedIn.php',
'ThrottledError' => 'includes/exception/ThrottledError.php',
'ReadOnlyError' => 'includes/exception/ReadOnlyError.php',
'PermissionsError' => 'includes/exception/PermissionsError.php',
'MWException' => 'includes/exception/MWException.php',
'MWExceptionHandler' => 'includes/exception/MWExceptionHandler.php',
'HttpError' => 'includes/exception/HttpError.php',
'BadTitleError' => 'includes/exception/BadTitleError.php',
'ErrorPageError' => 'includes/exception/ErrorPageError.php',
'FatalError' => 'includes/exception/FatalError.php',
# includes/externalstore
'ExternalStore' => 'includes/externalstore/ExternalStore.php',
'ExternalStoreDB' => 'includes/externalstore/ExternalStoreDB.php',
'ExternalStoreHttp' => 'includes/externalstore/ExternalStoreHttp.php',
'ExternalStoreMedium' => 'includes/externalstore/ExternalStoreMedium.php',
'ExternalStoreMwstore' => 'includes/externalstore/ExternalStoreMwstore.php',
# includes/filebackend
'FileBackendGroup' => 'includes/filebackend/FileBackendGroup.php',
'FileBackend' => 'includes/filebackend/FileBackend.php',
'FileBackendError' => 'includes/filebackend/FileBackend.php',
'FileBackendException' => 'includes/filebackend/FileBackend.php',
'FileBackendStore' => 'includes/filebackend/FileBackendStore.php',
'FileBackendStoreShardListIterator' => 'includes/filebackend/FileBackendStore.php',
'FileBackendStoreShardDirIterator' => 'includes/filebackend/FileBackendStore.php',
'FileBackendStoreShardFileIterator' => 'includes/filebackend/FileBackendStore.php',
'FileBackendMultiWrite' => 'includes/filebackend/FileBackendMultiWrite.php',
'FileBackendStoreOpHandle' => 'includes/filebackend/FileBackendStore.php',
'FSFile' => 'includes/filebackend/FSFile.php',
'FSFileBackend' => 'includes/filebackend/FSFileBackend.php',
'FSFileBackendList' => 'includes/filebackend/FSFileBackend.php',
'FSFileBackendDirList' => 'includes/filebackend/FSFileBackend.php',
'FSFileBackendFileList' => 'includes/filebackend/FSFileBackend.php',
'FSFileOpHandle' => 'includes/filebackend/FSFileBackend.php',
'MemoryFileBackend' => 'includes/filebackend/MemoryFileBackend.php',
'SwiftFileBackend' => 'includes/filebackend/SwiftFileBackend.php',
'SwiftFileBackendList' => 'includes/filebackend/SwiftFileBackend.php',
'SwiftFileBackendDirList' => 'includes/filebackend/SwiftFileBackend.php',
'SwiftFileBackendFileList' => 'includes/filebackend/SwiftFileBackend.php',
'SwiftFileOpHandle' => 'includes/filebackend/SwiftFileBackend.php',
'TempFSFile' => 'includes/filebackend/TempFSFile.php',
'FileJournal' => 'includes/filebackend/filejournal/FileJournal.php',
'DBFileJournal' => 'includes/filebackend/filejournal/DBFileJournal.php',
'NullFileJournal' => 'includes/filebackend/filejournal/FileJournal.php',
'LockManagerGroup' => 'includes/filebackend/lockmanager/LockManagerGroup.php',
'LockManager' => 'includes/filebackend/lockmanager/LockManager.php',
'ScopedLock' => 'includes/filebackend/lockmanager/ScopedLock.php',
'FSLockManager' => 'includes/filebackend/lockmanager/FSLockManager.php',
'DBLockManager' => 'includes/filebackend/lockmanager/DBLockManager.php',
'MemcLockManager' => 'includes/filebackend/lockmanager/MemcLockManager.php',
'QuorumLockManager' => 'includes/filebackend/lockmanager/QuorumLockManager.php',
'MySqlLockManager' => 'includes/filebackend/lockmanager/DBLockManager.php',
'PostgreSqlLockManager' => 'includes/filebackend/lockmanager/DBLockManager.php',
'RedisLockManager' => 'includes/filebackend/lockmanager/RedisLockManager.php',
'NullLockManager' => 'includes/filebackend/lockmanager/LockManager.php',
'FileOp' => 'includes/filebackend/FileOp.php',
'FileOpBatch' => 'includes/filebackend/FileOpBatch.php',
'StoreFileOp' => 'includes/filebackend/FileOp.php',
'CopyFileOp' => 'includes/filebackend/FileOp.php',
'MoveFileOp' => 'includes/filebackend/FileOp.php',
'DeleteFileOp' => 'includes/filebackend/FileOp.php',
'CreateFileOp' => 'includes/filebackend/FileOp.php',
'DescribeFileOp' => 'includes/filebackend/FileOp.php',
'NullFileOp' => 'includes/filebackend/FileOp.php',
# includes/filerepo
'FileRepo' => 'includes/filerepo/FileRepo.php',
'FileRepoStatus' => 'includes/filerepo/FileRepoStatus.php',
'ForeignAPIRepo' => 'includes/filerepo/ForeignAPIRepo.php',
'ForeignDBRepo' => 'includes/filerepo/ForeignDBRepo.php',
'ForeignDBViaLBRepo' => 'includes/filerepo/ForeignDBViaLBRepo.php',
'FSRepo' => 'includes/filerepo/FSRepo.php',
'LocalRepo' => 'includes/filerepo/LocalRepo.php',
'NullRepo' => 'includes/filerepo/NullRepo.php',
'RepoGroup' => 'includes/filerepo/RepoGroup.php',
'TempFileRepo' => 'includes/filerepo/FileRepo.php',
# includes/filerepo/file
'ArchivedFile' => 'includes/filerepo/file/ArchivedFile.php',
'File' => 'includes/filerepo/file/File.php',
'ForeignAPIFile' => 'includes/filerepo/file/ForeignAPIFile.php',
'ForeignDBFile' => 'includes/filerepo/file/ForeignDBFile.php',
'LocalFile' => 'includes/filerepo/file/LocalFile.php',
'LocalFileDeleteBatch' => 'includes/filerepo/file/LocalFile.php',
'LocalFileMoveBatch' => 'includes/filerepo/file/LocalFile.php',
'LocalFileRestoreBatch' => 'includes/filerepo/file/LocalFile.php',
'OldLocalFile' => 'includes/filerepo/file/OldLocalFile.php',
'UnregisteredLocalFile' => 'includes/filerepo/file/UnregisteredLocalFile.php',
# includes/installer
'CliInstaller' => 'includes/installer/CliInstaller.php',
'DatabaseInstaller' => 'includes/installer/DatabaseInstaller.php',
'DatabaseUpdater' => 'includes/installer/DatabaseUpdater.php',
'InstallDocFormatter' => 'includes/installer/InstallDocFormatter.php',
'Installer' => 'includes/installer/Installer.php',
'LocalSettingsGenerator' => 'includes/installer/LocalSettingsGenerator.php',
'MssqlInstaller' => 'includes/installer/MssqlInstaller.php',
'MssqlUpdater' => 'includes/installer/MssqlUpdater.php',
'MysqlInstaller' => 'includes/installer/MysqlInstaller.php',
'MysqlUpdater' => 'includes/installer/MysqlUpdater.php',
'OracleInstaller' => 'includes/installer/OracleInstaller.php',
'OracleUpdater' => 'includes/installer/OracleUpdater.php',
'PhpXmlBugTester' => 'includes/installer/PhpBugTests.php',
'PostgresInstaller' => 'includes/installer/PostgresInstaller.php',
'PostgresUpdater' => 'includes/installer/PostgresUpdater.php',
'SqliteInstaller' => 'includes/installer/SqliteInstaller.php',
'SqliteUpdater' => 'includes/installer/SqliteUpdater.php',
'WebInstaller' => 'includes/installer/WebInstaller.php',
'WebInstallerComplete' => 'includes/installer/WebInstallerPage.php',
'WebInstallerCopying' => 'includes/installer/WebInstallerPage.php',
'WebInstallerDBConnect' => 'includes/installer/WebInstallerPage.php',
'WebInstallerDBSettings' => 'includes/installer/WebInstallerPage.php',
'WebInstallerDocument' => 'includes/installer/WebInstallerPage.php',
'WebInstallerExistingWiki' => 'includes/installer/WebInstallerPage.php',
'WebInstallerInstall' => 'includes/installer/WebInstallerPage.php',
'WebInstallerLanguage' => 'includes/installer/WebInstallerPage.php',
'WebInstallerName' => 'includes/installer/WebInstallerPage.php',
'WebInstallerOptions' => 'includes/installer/WebInstallerPage.php',
'WebInstallerReadme' => 'includes/installer/WebInstallerPage.php',
'WebInstallerReleaseNotes' => 'includes/installer/WebInstallerPage.php',
'WebInstallerRestart' => 'includes/installer/WebInstallerPage.php',
'WebInstallerUpgrade' => 'includes/installer/WebInstallerPage.php',
'WebInstallerUpgradeDoc' => 'includes/installer/WebInstallerPage.php',
'WebInstallerWelcome' => 'includes/installer/WebInstallerPage.php',
'WebInstallerOutput' => 'includes/installer/WebInstallerOutput.php',
'WebInstallerPage' => 'includes/installer/WebInstallerPage.php',
2010-06-17 22:28:06 +00:00
# includes/job
'IJobSpecification' => 'includes/jobqueue/JobSpecification.php',
'Job' => 'includes/jobqueue/Job.php',
'JobQueue' => 'includes/jobqueue/JobQueue.php',
'JobQueueAggregator' => 'includes/jobqueue/aggregator/JobQueueAggregator.php',
'JobQueueAggregatorMemc' => 'includes/jobqueue/aggregator/JobQueueAggregatorMemc.php',
'JobQueueAggregatorRedis' => 'includes/jobqueue/aggregator/JobQueueAggregatorRedis.php',
'JobQueueDB' => 'includes/jobqueue/JobQueueDB.php',
'JobQueueConnectionError' => 'includes/jobqueue/JobQueue.php',
'JobQueueError' => 'includes/jobqueue/JobQueue.php',
'JobQueueGroup' => 'includes/jobqueue/JobQueueGroup.php',
'JobQueueFederated' => 'includes/jobqueue/JobQueueFederated.php',
'JobQueueRedis' => 'includes/jobqueue/JobQueueRedis.php',
'JobSpecification' => 'includes/jobqueue/JobSpecification.php',
# includes/jobqueue/jobs
'DoubleRedirectJob' => 'includes/jobqueue/jobs/DoubleRedirectJob.php',
'DuplicateJob' => 'includes/jobqueue/jobs/DuplicateJob.php',
'EmaillingJob' => 'includes/jobqueue/jobs/EmaillingJob.php',
'EnotifNotifyJob' => 'includes/jobqueue/jobs/EnotifNotifyJob.php',
'HTMLCacheUpdateJob' => 'includes/jobqueue/jobs/HTMLCacheUpdateJob.php',
'NullJob' => 'includes/jobqueue/jobs/NullJob.php',
'RefreshLinksJob' => 'includes/jobqueue/jobs/RefreshLinksJob.php',
'RefreshLinksJob2' => 'includes/jobqueue/jobs/RefreshLinksJob2.php',
'UploadFromUrlJob' => 'includes/jobqueue/jobs/UploadFromUrlJob.php',
'AssembleUploadChunksJob' => 'includes/jobqueue/jobs/AssembleUploadChunksJob.php',
'PublishStashedFileJob' => 'includes/jobqueue/jobs/PublishStashedFileJob.php',
2010-06-17 22:28:06 +00:00
# includes/jobqueue/utils
'BacklinkJobUtils' => 'includes/jobqueue/utils/BacklinkJobUtils.php',
# includes/json
'FormatJson' => 'includes/json/FormatJson.php',
# includes/libs
'CSSJanus' => 'includes/libs/CSSJanus.php',
'CSSJanusTokenizer' => 'includes/libs/CSSJanus.php',
'CSSMin' => 'includes/libs/CSSMin.php',
'GenericArrayObject' => 'includes/libs/GenericArrayObject.php',
'HashRing' => 'includes/libs/HashRing.php',
'HttpStatus' => 'includes/libs/HttpStatus.php',
2010-08-26 23:31:00 +00:00
'IEContentAnalyzer' => 'includes/libs/IEContentAnalyzer.php',
'IEUrlExtension' => 'includes/libs/IEUrlExtension.php',
'MappedIterator' => 'includes/libs/MappedIterator.php',
'IPSet' => 'includes/libs/IPSet.php',
'JavaScriptMinifier' => 'includes/libs/JavaScriptMinifier.php',
'JSCompilerContext' => 'includes/libs/jsminplus.php',
'JSMinPlus' => 'includes/libs/jsminplus.php',
'JSNode' => 'includes/libs/jsminplus.php',
'JSParser' => 'includes/libs/jsminplus.php',
'JSToken' => 'includes/libs/jsminplus.php',
'JSTokenizer' => 'includes/libs/jsminplus.php',
'MultiHttpClient' => 'includes/libs/MultiHttpClient.php',
'MWMessagePack' => 'includes/libs/MWMessagePack.php',
'ProcessCacheLRU' => 'includes/libs/ProcessCacheLRU.php',
'RunningStat' => 'includes/libs/RunningStat.php',
'ScopedCallback' => 'includes/libs/ScopedCallback.php',
'ScopedPHPTimeout' => 'includes/libs/ScopedPHPTimeout.php',
'SwiftVirtualRESTService' => 'includes/libs/virtualrest/SwiftVirtualRESTService.php',
'VirtualRESTService' => 'includes/libs/virtualrest/VirtualRESTService.php',
'VirtualRESTServiceClient' => 'includes/libs/virtualrest/VirtualRESTServiceClient.php',
'XmlTypeCheck' => 'includes/libs/XmlTypeCheck.php',
Support LESS stylesheets in ResourceLoader This patch adds support for the LESS stylesheet language to ResourceLoader. LESS is a stylesheet language that compiles into CSS. The patch includes lessphp, a LESS compiler implemented in PHP. The rationale for choosing LESS is explained in a MediaWiki RFC which accompanies this patch, available at <https://www.mediawiki.org/wiki/Requests_for_comment/LESS>. LESS support is provided for ResourceLoader file modules. It is triggered by the presence of the '.less' extension in stylesheet filenames. LESS files are compiled by lessc, and the resultant CSS is subjected to the standard set of transformations (CSSJanus & CSSMin). The immediate result of LESS compilation is encoded as an array, which includes the list of LESS files that were compiled and their mtimes. This array is cached. Cache invalidation is performed by comparing the cached mtimes with the mtimes of the files on disk. If the compiler itself throws an exception, ResourceLoader constructs a compilation result which consists of the error message encoded as a CSS comment. Failed compilation results are cached too, but with an expiration time of five minutes. The expiration time is required because the full list of referenced files is not known. Three configuration variables configure the global environment for LESS modules: $wgResourceLoaderLESSVars, $wgResourceLoaderLESSFunctions, and $wgResourceLoaderLESSImportPaths. $wgResourceLoaderLESSVars maps variable names to CSS values, specified as strings. Variables declared in this array are available in all LESS files. $wgResourceLoaderLESSFunctions is similar, except it maps custom function names to PHP callables. These functions can be called from within LESS to transform values. Read more about custom functions at <http://leafo.net/lessphp/docs/#custom_functions>. Finally, $wgResourceLoaderLESSImportPaths specifies file system paths in addition to the current module's path where the LESS compiler should look up files referenced in @import statements. The issue of handling of /* @embed */ and /* @noflip */ annotations is left unresolved. Earlier versions of this patch included an @embed analog implemented as a LESS custom function, but there was enough ambiguity about whether the strategy it took was optimal to merit discussing it in a separate, follow-up patch. Bug: 40964 Change-Id: Id052a04dd2f76a1f4aef39fbd454bd67f5fd282f
2013-08-11 16:40:20 +00:00
# includes/libs/lessphp
'lessc' => 'includes/libs/lessc.inc.php',
'lessc_parser' => 'includes/libs/lessc.inc.php',
'lessc_formatter_classic' => 'includes/libs/lessc.inc.php',
'lessc_formatter_compressed' => 'includes/libs/lessc.inc.php',
'lessc_formatter_lessjs' => 'includes/libs/lessc.inc.php',
# includes/logging
'DatabaseLogEntry' => 'includes/logging/LogEntry.php',
'DeleteLogFormatter' => 'includes/logging/DeleteLogFormatter.php',
'LegacyLogFormatter' => 'includes/logging/LogFormatter.php',
'LogEntry' => 'includes/logging/LogEntry.php',
'LogEventsList' => 'includes/logging/LogEventsList.php',
'LogEntryBase' => 'includes/logging/LogEntry.php',
'LogFormatter' => 'includes/logging/LogFormatter.php',
'LogPage' => 'includes/logging/LogPage.php',
'LogPager' => 'includes/logging/LogPager.php',
'ManualLogEntry' => 'includes/logging/LogEntry.php',
'MoveLogFormatter' => 'includes/logging/MoveLogFormatter.php',
'NewUsersLogFormatter' => 'includes/logging/NewUsersLogFormatter.php',
'PageLangLogFormatter' => 'includes/logging/PageLangLogFormatter.php',
'PatrolLog' => 'includes/logging/PatrolLog.php',
'PatrolLogFormatter' => 'includes/logging/PatrolLogFormatter.php',
'RCDatabaseLogEntry' => 'includes/logging/LogEntry.php',
'RightsLogFormatter' => 'includes/logging/RightsLogFormatter.php',
New more slick gallery display This extension adds a "mode" parameter to the gallery tag, allowing different formats for the gallery tag (galleries in the ui can be controlled by a global) The added modes are: *traditional - The original gallery *nolines - Like the original, no borders, less padding *packed - All images aligned by having same height. JS also justifies the images. (I think this one is the one that will go over best with users.) *packed-overlay - like packed, but caption goes over top the image in a transloucent box. *packed-hover - like packed-overlay, but caption only visible on hover. Degrades gracefully on screen readers, and falls back to packed-overlay if you are using a touch screen. I kind of like this mode when the caption is not that important (ex a category where its just the file name). This also adds a hook to allow people to make their own gallery version. I believe there would be interest in this, as different people have done different experiments. For example: * Wikia: http://community.wikia.com/wiki/Help:Galleries,_Slideshows,_and_Sliders/wikitext * Wikinews: https://en.wikinews.org/wiki/Template:Picture_select What I would like to see for this patch, is first it gets enabled, with the default still "traditional". After about a month or two we consult with users. If feedback is positive, we change the default mode to one of the others (probably "packed"). Adds a "mode" parameter to gallery for different mode, including one 'height-constrained-overlay' which looks much more like other modern websites. Note: This makes one change to the old gallery format. It makes Nonexistent files be rendered like thumbnails (i.e. they are rendered with a little grey border). One thing I'm slightly worried about with this patch, is that I added an option to MediaTransformOutput::toHtml to override the width attribute. I'm not sure if that is the best approach, and would appreciate thoughts on that. This should be merged at the same time as Ie82c1548 Change-Id: I33462a8b52502ed76aeb163b66e3704c8618ba23
2013-06-08 04:47:07 +00:00
# Image gallery
'ImageGallery' => 'includes/gallery/TraditionalImageGallery.php',
'ImageGalleryBase' => 'includes/gallery/ImageGalleryBase.php',
'NolinesImageGallery' => 'includes/gallery/NolinesImageGallery.php',
'TraditionalImageGallery' => 'includes/gallery/TraditionalImageGallery.php',
'PackedImageGallery' => 'includes/gallery/PackedImageGallery.php',
'PackedHoverImageGallery' => 'includes/gallery/PackedOverlayImageGallery.php',
'PackedOverlayImageGallery' => 'includes/gallery/PackedOverlayImageGallery.php',
# includes/media
'BitmapHandler' => 'includes/media/Bitmap.php',
'BitmapHandler_ClientOnly' => 'includes/media/Bitmap_ClientOnly.php',
'BitmapMetadataHandler' => 'includes/media/BitmapMetadataHandler.php',
'BmpHandler' => 'includes/media/BMP.php',
'DjVuHandler' => 'includes/media/DjVu.php',
'DjVuImage' => 'includes/media/DjVuImage.php',
'Exif' => 'includes/media/Exif.php',
'ExifBitmapHandler' => 'includes/media/ExifBitmap.php',
'FormatExif' => 'includes/media/FormatMetadata.php',
'FormatMetadata' => 'includes/media/FormatMetadata.php',
2010-06-17 22:28:06 +00:00
'GIFHandler' => 'includes/media/GIF.php',
'GIFMetadataExtractor' => 'includes/media/GIFMetadataExtractor.php',
'ImageHandler' => 'includes/media/ImageHandler.php',
'IPTC' => 'includes/media/IPTC.php',
'JpegHandler' => 'includes/media/Jpeg.php',
'JpegMetadataExtractor' => 'includes/media/JpegMetadataExtractor.php',
'MediaHandler' => 'includes/media/MediaHandler.php',
2010-06-17 22:28:06 +00:00
'MediaTransformError' => 'includes/media/MediaTransformOutput.php',
'MediaTransformOutput' => 'includes/media/MediaTransformOutput.php',
'PNGHandler' => 'includes/media/PNG.php',
'PNGMetadataExtractor' => 'includes/media/PNGMetadataExtractor.php',
'SvgHandler' => 'includes/media/SVG.php',
'SVGMetadataExtractor' => 'includes/media/SVGMetadataExtractor.php',
'SVGReader' => 'includes/media/SVGMetadataExtractor.php',
2010-06-17 22:28:06 +00:00
'ThumbnailImage' => 'includes/media/MediaTransformOutput.php',
'TiffHandler' => 'includes/media/Tiff.php',
'TransformParameterError' => 'includes/media/MediaTransformOutput.php',
'XCFHandler' => 'includes/media/XCF.php',
'XMPInfo' => 'includes/media/XMPInfo.php',
'XMPReader' => 'includes/media/XMP.php',
'XMPValidate' => 'includes/media/XMPValidate.php',
# includes/normal
'UtfNormal' => 'includes/normal/UtfNormal.php',
# includes/objectcache
'APCBagOStuff' => 'includes/objectcache/APCBagOStuff.php',
'BagOStuff' => 'includes/objectcache/BagOStuff.php',
* Rewrote ObjectCache.php to conform to the modern coding style, and to be less convoluted about how CACHE_ANYTHING and CACHE_ACCEL are resolved. Moved most functionality to static members of a new ObjectCache class. * Moved the global functions to GlobalFunctions.php, where they are now just convenience wrappers. Made them return non-references. Updated callers (none found in extensions). * Added an advanced configuration method, $wgObjectCaches, which allows a lot more detail in the object cache configuration than $wgMainCacheType. * Made all object cache classes derive from BagOStuff. * Split the MWMemcached class into a generic client class and a MediaWiki-specific wrapper class. The wrapper class presents a simple BagOStuff interface to calling code, hiding memcached client internals, and will simplify the task of supporting the PECL extension. * Added some extra constructor parameters to MWMemcached, configurable via $wgObjectCaches. * Removed the *_multi() methods from BagOStuff, my grepping indicates that they are not used. * Rewrote FakeMemCachedClient as a BagOStuff subclass, called EmptyBagOStuff. * Added an optional "server" parameter to SQLBagOStuff. This allows the server holding the objectcache table to be different from the server holding the core DB. * Added MultiWriteBagOStuff: a cache class which writes to multiple locations, and reads from them in a defined fallback sequence. This can be used to extend the cache space by adding disk-backed storage to existing in-memory caches. * Made MWMemcached::get() return false on failure instead of null, to match the BagOStuff documentation and the other BagOStuff subclasses. Anything that was relying on it returning null would have already been broken with SqlBagOStuff. * Fixed a bug in the memcached client causing keys with spaces or line breaks in them to break the memcached protocol, injecting arbitrary commands or parameters. Since the PECL client apparently also has this flaw, I implemented the fix in the wrapper class. * Renamed BagOStuff::set_debug() to setDebug(), since we aren't emulating the memcached client anymore * Fixed spelling error in MWMemcached: persistant -> persistent
2011-03-03 09:37:37 +00:00
'EmptyBagOStuff' => 'includes/objectcache/EmptyBagOStuff.php',
'HashBagOStuff' => 'includes/objectcache/HashBagOStuff.php',
'MediaWikiBagOStuff' => 'includes/objectcache/SqlBagOStuff.php',
'MemCachedClientforWiki' => 'includes/objectcache/MemcachedClient.php',
'MemcachedBagOStuff' => 'includes/objectcache/MemcachedBagOStuff.php',
'MemcachedPeclBagOStuff' => 'includes/objectcache/MemcachedPeclBagOStuff.php',
* Rewrote ObjectCache.php to conform to the modern coding style, and to be less convoluted about how CACHE_ANYTHING and CACHE_ACCEL are resolved. Moved most functionality to static members of a new ObjectCache class. * Moved the global functions to GlobalFunctions.php, where they are now just convenience wrappers. Made them return non-references. Updated callers (none found in extensions). * Added an advanced configuration method, $wgObjectCaches, which allows a lot more detail in the object cache configuration than $wgMainCacheType. * Made all object cache classes derive from BagOStuff. * Split the MWMemcached class into a generic client class and a MediaWiki-specific wrapper class. The wrapper class presents a simple BagOStuff interface to calling code, hiding memcached client internals, and will simplify the task of supporting the PECL extension. * Added some extra constructor parameters to MWMemcached, configurable via $wgObjectCaches. * Removed the *_multi() methods from BagOStuff, my grepping indicates that they are not used. * Rewrote FakeMemCachedClient as a BagOStuff subclass, called EmptyBagOStuff. * Added an optional "server" parameter to SQLBagOStuff. This allows the server holding the objectcache table to be different from the server holding the core DB. * Added MultiWriteBagOStuff: a cache class which writes to multiple locations, and reads from them in a defined fallback sequence. This can be used to extend the cache space by adding disk-backed storage to existing in-memory caches. * Made MWMemcached::get() return false on failure instead of null, to match the BagOStuff documentation and the other BagOStuff subclasses. Anything that was relying on it returning null would have already been broken with SqlBagOStuff. * Fixed a bug in the memcached client causing keys with spaces or line breaks in them to break the memcached protocol, injecting arbitrary commands or parameters. Since the PECL client apparently also has this flaw, I implemented the fix in the wrapper class. * Renamed BagOStuff::set_debug() to setDebug(), since we aren't emulating the memcached client anymore * Fixed spelling error in MWMemcached: persistant -> persistent
2011-03-03 09:37:37 +00:00
'MemcachedPhpBagOStuff' => 'includes/objectcache/MemcachedPhpBagOStuff.php',
'MultiWriteBagOStuff' => 'includes/objectcache/MultiWriteBagOStuff.php',
'MWMemcached' => 'includes/objectcache/MemcachedClient.php',
* Rewrote ObjectCache.php to conform to the modern coding style, and to be less convoluted about how CACHE_ANYTHING and CACHE_ACCEL are resolved. Moved most functionality to static members of a new ObjectCache class. * Moved the global functions to GlobalFunctions.php, where they are now just convenience wrappers. Made them return non-references. Updated callers (none found in extensions). * Added an advanced configuration method, $wgObjectCaches, which allows a lot more detail in the object cache configuration than $wgMainCacheType. * Made all object cache classes derive from BagOStuff. * Split the MWMemcached class into a generic client class and a MediaWiki-specific wrapper class. The wrapper class presents a simple BagOStuff interface to calling code, hiding memcached client internals, and will simplify the task of supporting the PECL extension. * Added some extra constructor parameters to MWMemcached, configurable via $wgObjectCaches. * Removed the *_multi() methods from BagOStuff, my grepping indicates that they are not used. * Rewrote FakeMemCachedClient as a BagOStuff subclass, called EmptyBagOStuff. * Added an optional "server" parameter to SQLBagOStuff. This allows the server holding the objectcache table to be different from the server holding the core DB. * Added MultiWriteBagOStuff: a cache class which writes to multiple locations, and reads from them in a defined fallback sequence. This can be used to extend the cache space by adding disk-backed storage to existing in-memory caches. * Made MWMemcached::get() return false on failure instead of null, to match the BagOStuff documentation and the other BagOStuff subclasses. Anything that was relying on it returning null would have already been broken with SqlBagOStuff. * Fixed a bug in the memcached client causing keys with spaces or line breaks in them to break the memcached protocol, injecting arbitrary commands or parameters. Since the PECL client apparently also has this flaw, I implemented the fix in the wrapper class. * Renamed BagOStuff::set_debug() to setDebug(), since we aren't emulating the memcached client anymore * Fixed spelling error in MWMemcached: persistant -> persistent
2011-03-03 09:37:37 +00:00
'ObjectCache' => 'includes/objectcache/ObjectCache.php',
'ObjectCacheSessionHandler' => 'includes/objectcache/ObjectCacheSessionHandler.php',
'RedisBagOStuff' => 'includes/objectcache/RedisBagOStuff.php',
'SqlBagOStuff' => 'includes/objectcache/SqlBagOStuff.php',
'WinCacheBagOStuff' => 'includes/objectcache/WinCacheBagOStuff.php',
'XCacheBagOStuff' => 'includes/objectcache/XCacheBagOStuff.php',
# includes/page
'Article' => 'includes/page/Article.php',
'CategoryPage' => 'includes/page/CategoryPage.php',
'ImageHistoryList' => 'includes/page/ImagePage.php',
'ImageHistoryPseudoPager' => 'includes/page/ImagePage.php',
'ImagePage' => 'includes/page/ImagePage.php',
'Page' => 'includes/page/WikiPage.php',
'WikiCategoryPage' => 'includes/page/WikiCategoryPage.php',
'WikiFilePage' => 'includes/page/WikiFilePage.php',
'WikiPage' => 'includes/page/WikiPage.php',
# includes/parser
'CacheTime' => 'includes/parser/CacheTime.php',
'CoreParserFunctions' => 'includes/parser/CoreParserFunctions.php',
'CoreTagHooks' => 'includes/parser/CoreTagHooks.php',
'DateFormatter' => 'includes/parser/DateFormatter.php',
'LinkHolderArray' => 'includes/parser/LinkHolderArray.php',
'MWTidy' => 'includes/parser/Tidy.php',
'MWTidyWrapper' => 'includes/parser/Tidy.php',
'PPCustomFrame_DOM' => 'includes/parser/Preprocessor_DOM.php',
'PPCustomFrame_Hash' => 'includes/parser/Preprocessor_Hash.php',
'PPDAccum_Hash' => 'includes/parser/Preprocessor_Hash.php',
'PPDPart' => 'includes/parser/Preprocessor_DOM.php',
'PPDPart_Hash' => 'includes/parser/Preprocessor_Hash.php',
'PPDStack' => 'includes/parser/Preprocessor_DOM.php',
'PPDStackElement' => 'includes/parser/Preprocessor_DOM.php',
'PPDStackElement_Hash' => 'includes/parser/Preprocessor_Hash.php',
'PPDStack_Hash' => 'includes/parser/Preprocessor_Hash.php',
'PPFrame' => 'includes/parser/Preprocessor.php',
'PPFrame_DOM' => 'includes/parser/Preprocessor_DOM.php',
'PPFrame_Hash' => 'includes/parser/Preprocessor_Hash.php',
'PPNode' => 'includes/parser/Preprocessor.php',
'PPNode_DOM' => 'includes/parser/Preprocessor_DOM.php',
'PPNode_Hash_Array' => 'includes/parser/Preprocessor_Hash.php',
'PPNode_Hash_Attr' => 'includes/parser/Preprocessor_Hash.php',
'PPNode_Hash_Text' => 'includes/parser/Preprocessor_Hash.php',
'PPNode_Hash_Tree' => 'includes/parser/Preprocessor_Hash.php',
'PPTemplateFrame_DOM' => 'includes/parser/Preprocessor_DOM.php',
'PPTemplateFrame_Hash' => 'includes/parser/Preprocessor_Hash.php',
'Parser' => 'includes/parser/Parser.php',
'ParserCache' => 'includes/parser/ParserCache.php',
'ParserOptions' => 'includes/parser/ParserOptions.php',
'ParserOutput' => 'includes/parser/ParserOutput.php',
'ParserDiffTest' => 'includes/parser/ParserDiffTest.php',
'Preprocessor' => 'includes/parser/Preprocessor.php',
'Preprocessor_DOM' => 'includes/parser/Preprocessor_DOM.php',
'Preprocessor_Hash' => 'includes/parser/Preprocessor_Hash.php',
'StripState' => 'includes/parser/StripState.php',
# includes/profiler
2011-04-16 11:09:20 +00:00
'Profiler' => 'includes/profiler/Profiler.php',
'ProfilerMwprof' => 'includes/profiler/ProfilerMwprof.php',
'ProfilerSimpleDB' => 'includes/profiler/ProfilerSimpleDB.php',
2011-04-16 11:09:20 +00:00
'ProfilerSimpleText' => 'includes/profiler/ProfilerSimpleText.php',
'ProfilerSimpleTrace' => 'includes/profiler/ProfilerSimpleTrace.php',
2011-04-16 11:09:20 +00:00
'ProfilerSimpleUDP' => 'includes/profiler/ProfilerSimpleUDP.php',
'ProfilerStandard' => 'includes/profiler/ProfilerStandard.php',
2011-04-16 11:09:20 +00:00
'ProfilerStub' => 'includes/profiler/ProfilerStub.php',
'ProfileSection' => 'includes/profiler/Profiler.php',
'TransactionProfiler' => 'includes/profiler/Profiler.php',
# includes/rcfeed
'RCFeedEngine' => 'includes/rcfeed/RCFeedEngine.php',
'RedisPubSubFeedEngine' => 'includes/rcfeed/RedisPubSubFeedEngine.php',
'UDPRCFeedEngine' => 'includes/rcfeed/UDPRCFeedEngine.php',
'RCFeedFormatter' => 'includes/rcfeed/RCFeedFormatter.php',
'IRCColourfulRCFeedFormatter' => 'includes/rcfeed/IRCColourfulRCFeedFormatter.php',
'JSONRCFeedFormatter' => 'includes/rcfeed/JSONRCFeedFormatter.php',
'XMLRCFeedFormatter' => 'includes/rcfeed/XMLRCFeedFormatter.php',
'MachineReadableRCFeedFormatter' => 'includes/rcfeed/MachineReadableRCFeedFormatter.php',
# includes/resourceloader
'ResourceLoader' => 'includes/resourceloader/ResourceLoader.php',
'ResourceLoaderContext' => 'includes/resourceloader/ResourceLoaderContext.php',
'ResourceLoaderFileModule' => 'includes/resourceloader/ResourceLoaderFileModule.php',
'ResourceLoaderFilePageModule' => 'includes/resourceloader/ResourceLoaderFilePageModule.php',
'ResourceLoaderLESSFunctions' => 'includes/resourceloader/ResourceLoaderLESSFunctions.php',
'ResourceLoaderModule' => 'includes/resourceloader/ResourceLoaderModule.php',
'ResourceLoaderNoscriptModule' => 'includes/resourceloader/ResourceLoaderNoscriptModule.php',
'ResourceLoaderSiteModule' => 'includes/resourceloader/ResourceLoaderSiteModule.php',
'ResourceLoaderStartUpModule' => 'includes/resourceloader/ResourceLoaderStartUpModule.php',
'ResourceLoaderUserCSSPrefsModule' =>
'includes/resourceloader/ResourceLoaderUserCSSPrefsModule.php',
'ResourceLoaderUserGroupsModule' => 'includes/resourceloader/ResourceLoaderUserGroupsModule.php',
'ResourceLoaderUserModule' => 'includes/resourceloader/ResourceLoaderUserModule.php',
'ResourceLoaderUserOptionsModule' => 'includes/resourceloader/ResourceLoaderUserOptionsModule.php',
'ResourceLoaderUserTokensModule' => 'includes/resourceloader/ResourceLoaderUserTokensModule.php',
'ResourceLoaderLanguageDataModule' =>
'includes/resourceloader/ResourceLoaderLanguageDataModule.php',
'ResourceLoaderLanguageNamesModule' =>
'includes/resourceloader/ResourceLoaderLanguageNamesModule.php',
'ResourceLoaderWikiModule' => 'includes/resourceloader/ResourceLoaderWikiModule.php',
# includes/revisiondelete
'RevDelArchivedFileItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDelArchivedFileList' => 'includes/revisiondelete/RevisionDelete.php',
'RevDelArchivedRevisionItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDelArchiveItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDelArchiveList' => 'includes/revisiondelete/RevisionDelete.php',
'RevDelFileItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDelFileList' => 'includes/revisiondelete/RevisionDelete.php',
'RevDelItem' => 'includes/revisiondelete/RevisionDeleteAbstracts.php',
'RevDelList' => 'includes/revisiondelete/RevisionDeleteAbstracts.php',
'RevDelLogItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDelLogList' => 'includes/revisiondelete/RevisionDelete.php',
'RevDelRevisionItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDelRevisionList' => 'includes/revisiondelete/RevisionDelete.php',
'RevisionDeleter' => 'includes/revisiondelete/RevisionDeleter.php',
'RevisionDeleteUser' => 'includes/revisiondelete/RevisionDeleteUser.php',
# includes/search
'PostgresSearchResult' => 'includes/search/SearchPostgres.php',
'PostgresSearchResultSet' => 'includes/search/SearchPostgres.php',
'SearchDatabase' => 'includes/search/SearchDatabase.php',
'SearchEngine' => 'includes/search/SearchEngine.php',
'SearchEngineDummy' => 'includes/search/SearchEngine.php',
'SearchHighlighter' => 'includes/search/SearchHighlighter.php',
'SearchMssql' => 'includes/search/SearchMssql.php',
'SearchMySQL' => 'includes/search/SearchMySQL.php',
'SearchNearMatchResultSet' => 'includes/search/SearchResultSet.php',
'SearchOracle' => 'includes/search/SearchOracle.php',
'SearchPostgres' => 'includes/search/SearchPostgres.php',
'SearchResult' => 'includes/search/SearchResult.php',
'SearchResultSet' => 'includes/search/SearchResultSet.php',
'SearchSqlite' => 'includes/search/SearchSqlite.php',
'SqlSearchResultSet' => 'includes/search/SearchResultSet.php',
# includes/site
'MediaWikiSite' => 'includes/site/MediaWikiSite.php',
'Site' => 'includes/site/Site.php',
'SiteObject' => 'includes/site/Site.php',
'SiteArray' => 'includes/site/SiteList.php',
'SiteList' => 'includes/site/SiteList.php',
'SiteSQLStore' => 'includes/site/SiteSQLStore.php',
'Sites' => 'includes/site/SiteSQLStore.php',
'SiteStore' => 'includes/site/SiteStore.php',
# includes/specialpage
'ChangesListSpecialPage' => 'includes/specialpage/ChangesListSpecialPage.php',
'FormSpecialPage' => 'includes/specialpage/FormSpecialPage.php',
'ImageQueryPage' => 'includes/specialpage/ImageQueryPage.php',
'IncludableSpecialPage' => 'includes/specialpage/IncludableSpecialPage.php',
'PageQueryPage' => 'includes/specialpage/PageQueryPage.php',
'QueryPage' => 'includes/specialpage/QueryPage.php',
'RedirectSpecialArticle' => 'includes/specialpage/RedirectSpecialPage.php',
'RedirectSpecialPage' => 'includes/specialpage/RedirectSpecialPage.php',
'SpecialPage' => 'includes/specialpage/SpecialPage.php',
'SpecialPageFactory' => 'includes/specialpage/SpecialPageFactory.php',
'SpecialRedirectToSpecial' => 'includes/specialpage/RedirectSpecialPage.php',
'UnlistedSpecialPage' => 'includes/specialpage/UnlistedSpecialPage.php',
'WantedQueryPage' => 'includes/specialpage/WantedQueryPage.php',
# includes/specials
'ActiveUsersPager' => 'includes/specials/SpecialActiveusers.php',
'AllMessagesTablePager' => 'includes/specials/SpecialAllMessages.php',
'AncientPagesPage' => 'includes/specials/SpecialAncientpages.php',
'BlockListPager' => 'includes/specials/SpecialBlockList.php',
'BrokenRedirectsPage' => 'includes/specials/SpecialBrokenRedirects.php',
'CategoryPager' => 'includes/specials/SpecialCategories.php',
'ContribsPager' => 'includes/specials/SpecialContributions.php',
'DeadendPagesPage' => 'includes/specials/SpecialDeadendpages.php',
'DeletedContribsPager' => 'includes/specials/SpecialDeletedContributions.php',
'DeletedContributionsPage' => 'includes/specials/SpecialDeletedContributions.php',
'DoubleRedirectsPage' => 'includes/specials/SpecialDoubleRedirects.php',
'EditWatchlistCheckboxSeriesField' => 'includes/specials/SpecialEditWatchlist.php',
'EditWatchlistNormalHTMLForm' => 'includes/specials/SpecialEditWatchlist.php',
'EmailConfirmation' => 'includes/specials/SpecialConfirmemail.php',
'EmailInvalidation' => 'includes/specials/SpecialConfirmemail.php',
'FewestrevisionsPage' => 'includes/specials/SpecialFewestrevisions.php',
'FileDuplicateSearchPage' => 'includes/specials/SpecialFileDuplicateSearch.php',
'HTMLBlockedUsersItemSelect' => 'includes/specials/SpecialBlockList.php',
'ImageListPager' => 'includes/specials/SpecialListfiles.php',
'ImportReporter' => 'includes/specials/SpecialImport.php',
'LinkSearchPage' => 'includes/specials/SpecialLinkSearch.php',
'ListredirectsPage' => 'includes/specials/SpecialListredirects.php',
'ListDuplicatedFilesPage' => 'includes/specials/SpecialListDuplicatedFiles.php',
'LoginForm' => 'includes/specials/SpecialUserlogin.php',
'LonelyPagesPage' => 'includes/specials/SpecialLonelypages.php',
'LongPagesPage' => 'includes/specials/SpecialLongpages.php',
'MergeHistoryPager' => 'includes/specials/SpecialMergeHistory.php',
'MIMEsearchPage' => 'includes/specials/SpecialMIMEsearch.php',
'MostcategoriesPage' => 'includes/specials/SpecialMostcategories.php',
'MostimagesPage' => 'includes/specials/SpecialMostimages.php',
'MostinterwikisPage' => 'includes/specials/SpecialMostinterwikis.php',
'MostlinkedCategoriesPage' => 'includes/specials/SpecialMostlinkedcategories.php',
'MostlinkedPage' => 'includes/specials/SpecialMostlinked.php',
'MostlinkedTemplatesPage' => 'includes/specials/SpecialMostlinkedtemplates.php',
'MostrevisionsPage' => 'includes/specials/SpecialMostrevisions.php',
'MovePageForm' => 'includes/specials/SpecialMovepage.php',
'NewFilesPager' => 'includes/specials/SpecialNewimages.php',
'NewPagesPager' => 'includes/specials/SpecialNewpages.php',
'PageArchive' => 'includes/specials/SpecialUndelete.php',
'PopularPagesPage' => 'includes/specials/SpecialPopularpages.php',
'ProtectedPagesPager' => 'includes/specials/SpecialProtectedpages.php',
'ProtectedTitlesPager' => 'includes/specials/SpecialProtectedtitles.php',
'RandomPage' => 'includes/specials/SpecialRandompage.php',
'ShortPagesPage' => 'includes/specials/SpecialShortpages.php',
'SpecialActiveUsers' => 'includes/specials/SpecialActiveusers.php',
'SpecialAllMessages' => 'includes/specials/SpecialAllMessages.php',
'SpecialAllMyUploads' => 'includes/specials/SpecialMyRedirectPages.php',
'SpecialAllPages' => 'includes/specials/SpecialAllPages.php',
'SpecialBlankpage' => 'includes/specials/SpecialBlankpage.php',
'SpecialBlock' => 'includes/specials/SpecialBlock.php',
'SpecialBlockList' => 'includes/specials/SpecialBlockList.php',
'SpecialBookSources' => 'includes/specials/SpecialBooksources.php',
'SpecialCachedPage' => 'includes/specials/SpecialCachedPage.php',
'SpecialCategories' => 'includes/specials/SpecialCategories.php',
'SpecialChangeEmail' => 'includes/specials/SpecialChangeEmail.php',
'SpecialChangePassword' => 'includes/specials/SpecialChangePassword.php',
'SpecialComparePages' => 'includes/specials/SpecialComparePages.php',
'SpecialContributions' => 'includes/specials/SpecialContributions.php',
'SpecialCreateAccount' => 'includes/specials/SpecialCreateAccount.php',
'SpecialDiff' => 'includes/specials/SpecialDiff.php',
'SpecialEditWatchlist' => 'includes/specials/SpecialEditWatchlist.php',
'SpecialEmailUser' => 'includes/specials/SpecialEmailuser.php',
'SpecialExpandTemplates' => 'includes/specials/SpecialExpandTemplates.php',
'SpecialExport' => 'includes/specials/SpecialExport.php',
'SpecialFilepath' => 'includes/specials/SpecialFilepath.php',
'SpecialImport' => 'includes/specials/SpecialImport.php',
'SpecialJavaScriptTest' => 'includes/specials/SpecialJavaScriptTest.php',
'SpecialListAdmins' => 'includes/specials/SpecialListusers.php',
'SpecialListBots' => 'includes/specials/SpecialListusers.php',
'SpecialListFiles' => 'includes/specials/SpecialListfiles.php',
'SpecialListGroupRights' => 'includes/specials/SpecialListgrouprights.php',
'SpecialListUsers' => 'includes/specials/SpecialListusers.php',
'SpecialLockdb' => 'includes/specials/SpecialLockdb.php',
'SpecialLog' => 'includes/specials/SpecialLog.php',
'SpecialMergeHistory' => 'includes/specials/SpecialMergeHistory.php',
'SpecialMycontributions' => 'includes/specials/SpecialMyRedirectPages.php',
'SpecialMypage' => 'includes/specials/SpecialMyRedirectPages.php',
'SpecialMytalk' => 'includes/specials/SpecialMyRedirectPages.php',
'SpecialMyuploads' => 'includes/specials/SpecialMyRedirectPages.php',
'SpecialNewFiles' => 'includes/specials/SpecialNewimages.php',
'SpecialNewpages' => 'includes/specials/SpecialNewpages.php',
'SpecialPageLanguage' => 'includes/specials/SpecialPageLanguage.php',
'SpecialPasswordReset' => 'includes/specials/SpecialPasswordReset.php',
'SpecialPagesWithProp' => 'includes/specials/SpecialPagesWithProp.php',
'SpecialPermanentLink' => 'includes/specials/SpecialPermanentLink.php',
'SpecialPreferences' => 'includes/specials/SpecialPreferences.php',
'SpecialPrefixindex' => 'includes/specials/SpecialPrefixindex.php',
'SpecialProtectedpages' => 'includes/specials/SpecialProtectedpages.php',
'SpecialProtectedtitles' => 'includes/specials/SpecialProtectedtitles.php',
'SpecialRandomInCategory' => 'includes/specials/SpecialRandomInCategory.php',
'SpecialRandomredirect' => 'includes/specials/SpecialRandomredirect.php',
'SpecialRecentChanges' => 'includes/specials/SpecialRecentchanges.php',
'SpecialRecentChangesLinked' => 'includes/specials/SpecialRecentchangeslinked.php',
'SpecialRedirect' => 'includes/specials/SpecialRedirect.php',
2013-06-14 16:59:59 +00:00
'SpecialResetTokens' => 'includes/specials/SpecialResetTokens.php',
'SpecialRevisionDelete' => 'includes/specials/SpecialRevisiondelete.php',
'SpecialRunJobs' => 'includes/specials/SpecialRunJobs.php',
'SpecialSearch' => 'includes/specials/SpecialSearch.php',
'SpecialSpecialpages' => 'includes/specials/SpecialSpecialpages.php',
'SpecialStatistics' => 'includes/specials/SpecialStatistics.php',
'SpecialTags' => 'includes/specials/SpecialTags.php',
'SpecialTrackingCategories' => 'includes/specials/SpecialTrackingCategories.php',
'SpecialUnblock' => 'includes/specials/SpecialUnblock.php',
'SpecialUndelete' => 'includes/specials/SpecialUndelete.php',
'SpecialUnlockdb' => 'includes/specials/SpecialUnlockdb.php',
'SpecialUpload' => 'includes/specials/SpecialUpload.php',
'SpecialUploadStash' => 'includes/specials/SpecialUploadStash.php',
'SpecialUploadStashTooLargeException' => 'includes/specials/SpecialUploadStash.php',
'SpecialUserlogout' => 'includes/specials/SpecialUserlogout.php',
'SpecialVersion' => 'includes/specials/SpecialVersion.php',
'SpecialWatchlist' => 'includes/specials/SpecialWatchlist.php',
'SpecialWhatLinksHere' => 'includes/specials/SpecialWhatlinkshere.php',
'UncategorizedCategoriesPage' => 'includes/specials/SpecialUncategorizedcategories.php',
'UncategorizedImagesPage' => 'includes/specials/SpecialUncategorizedimages.php',
'UncategorizedPagesPage' => 'includes/specials/SpecialUncategorizedpages.php',
'UncategorizedTemplatesPage' => 'includes/specials/SpecialUncategorizedtemplates.php',
'UnusedCategoriesPage' => 'includes/specials/SpecialUnusedcategories.php',
'UnusedimagesPage' => 'includes/specials/SpecialUnusedimages.php',
'UnusedtemplatesPage' => 'includes/specials/SpecialUnusedtemplates.php',
'UnwatchedpagesPage' => 'includes/specials/SpecialUnwatchedpages.php',
'UploadChunkFileException' => 'includes/upload/UploadFromChunks.php',
'UploadChunkZeroLengthFileException' => 'includes/upload/UploadFromChunks.php',
'UploadChunkVerificationException' => 'includes/upload/UploadFromChunks.php',
'UploadForm' => 'includes/specials/SpecialUpload.php',
'UploadSourceField' => 'includes/specials/SpecialUpload.php',
'UserrightsPage' => 'includes/specials/SpecialUserrights.php',
'UsersPager' => 'includes/specials/SpecialListusers.php',
'WantedCategoriesPage' => 'includes/specials/SpecialWantedcategories.php',
2008-09-11 22:30:27 +00:00
'WantedFilesPage' => 'includes/specials/SpecialWantedfiles.php',
'WantedPagesPage' => 'includes/specials/SpecialWantedpages.php',
'WantedTemplatesPage' => 'includes/specials/SpecialWantedtemplates.php',
'WithoutInterwikiPage' => 'includes/specials/SpecialWithoutinterwiki.php',
# includes/templates
2011-12-20 15:02:39 +00:00
'UserloginTemplate' => 'includes/templates/Userlogin.php',
'UsercreateTemplate' => 'includes/templates/Usercreate.php',
# includes/title
'PageLinkRenderer' => 'includes/title/PageLinkRenderer.php',
'TitleFormatter' => 'includes/title/TitleFormatter.php',
'TitleParser' => 'includes/title/TitleParser.php',
'TitleValue' => 'includes/title/TitleValue.php',
'MalformedTitleException' => 'includes/title/MalformedTitleException.php',
'MediaWikiPageLinkRenderer' => 'includes/title/MediaWikiPageLinkRenderer.php',
'MediaWikiTitleCodec' => 'includes/title/MediaWikiTitleCodec.php',
2010-06-17 22:28:06 +00:00
# includes/upload
'UploadBase' => 'includes/upload/UploadBase.php',
'UploadFromFile' => 'includes/upload/UploadFromFile.php',
'UploadFromChunks' => 'includes/upload/UploadFromChunks.php',
'UploadFromStash' => 'includes/upload/UploadFromStash.php',
2010-06-17 22:28:06 +00:00
'UploadFromUrl' => 'includes/upload/UploadFromUrl.php',
2010-11-06 11:52:14 +00:00
'UploadStash' => 'includes/upload/UploadStash.php',
'UploadStashBadPathException' => 'includes/upload/UploadStash.php',
'UploadStashException' => 'includes/upload/UploadStash.php',
'UploadStashFile' => 'includes/upload/UploadStash.php',
2010-11-06 11:52:14 +00:00
'UploadStashFileException' => 'includes/upload/UploadStash.php',
'UploadStashFileNotFoundException' => 'includes/upload/UploadStash.php',
'UploadStashNotAvailableException' => 'includes/upload/UploadStash.php',
'UploadStashZeroLengthFileException' => 'includes/upload/UploadStash.php',
'UploadStashNotLoggedInException' => 'includes/upload/UploadStash.php',
'UploadStashWrongOwnerException' => 'includes/upload/UploadStash.php',
'UploadStashNoSuchKeyException' => 'includes/upload/UploadStash.php',
# includes/utils
'ArrayUtils' => 'includes/utils/ArrayUtils.php',
'CdbException' => 'includes/utils/Cdb.php',
'CdbFunctions' => 'includes/utils/CdbPHP.php',
'CdbReader' => 'includes/utils/Cdb.php',
'CdbReaderDBA' => 'includes/utils/CdbDBA.php',
'CdbReaderPHP' => 'includes/utils/CdbPHP.php',
'CdbWriter' => 'includes/utils/Cdb.php',
'CdbWriterDBA' => 'includes/utils/CdbDBA.php',
'CdbWriterPHP' => 'includes/utils/CdbPHP.php',
'DoubleReplacer' => 'includes/utils/StringUtils.php',
'ExplodeIterator' => 'includes/utils/StringUtils.php',
'HashtableReplacer' => 'includes/utils/StringUtils.php',
'IP' => 'includes/utils/IP.php',
'MWCryptRand' => 'includes/utils/MWCryptRand.php',
'MWCryptHKDF' => 'includes/utils/MWCryptHKDF.php',
'MWFunction' => 'includes/utils/MWFunction.php',
'RegexlikeReplacer' => 'includes/utils/StringUtils.php',
'ReplacementArray' => 'includes/utils/StringUtils.php',
'Replacer' => 'includes/utils/StringUtils.php',
'StringUtils' => 'includes/utils/StringUtils.php',
'UIDGenerator' => 'includes/utils/UIDGenerator.php',
'ZipDirectoryReader' => 'includes/utils/ZipDirectoryReader.php',
'ZipDirectoryReaderError' => 'includes/utils/ZipDirectoryReader.php',
# languages
'ConverterRule' => 'languages/ConverterRule.php',
'FakeConverter' => 'languages/FakeConverter.php',
'Language' => 'languages/Language.php',
2010-01-04 05:55:33 +00:00
'LanguageConverter' => 'languages/LanguageConverter.php',
'CLDRPluralRuleConverter' => 'languages/utils/CLDRPluralRuleConverter.php',
'CLDRPluralRuleConverterExpression' => 'languages/utils/CLDRPluralRuleConverterExpression.php',
'CLDRPluralRuleConverterFragment' => 'languages/utils/CLDRPluralRuleConverterFragment.php',
'CLDRPluralRuleConverterOperator' => 'languages/utils/CLDRPluralRuleConverterOperator.php',
'CLDRPluralRuleEvaluator' => 'languages/utils/CLDRPluralRuleEvaluator.php',
'CLDRPluralRuleEvaluatorRange' => 'languages/utils/CLDRPluralRuleEvaluatorRange.php',
'CLDRPluralRuleError' => 'languages/utils/CLDRPluralRuleError.php',
# maintenance
'BackupDumper' => 'maintenance/backup.inc',
'ConvertLinks' => 'maintenance/convertLinks.php',
'DeleteArchivedFilesImplementation' => 'maintenance/deleteArchivedFiles.inc',
'DeleteArchivedRevisionsImplementation' => 'maintenance/deleteArchivedRevisions.inc',
'DeleteDefaultMessages' => 'maintenance/deleteDefaultMessages.php',
'DumpDBZip2Output' => 'maintenance/backup.inc',
'ExportProgressFilter' => 'maintenance/backup.inc',
'FakeMaintenance' => 'maintenance/Maintenance.php',
'FixExtLinksProtocolRelative' => 'maintenance/fixExtLinksProtocolRelative.php',
'LoggedUpdateMaintenance' => 'maintenance/Maintenance.php',
2011-06-03 04:05:04 +00:00
'Maintenance' => 'maintenance/Maintenance.php',
'PopulateCategory' => 'maintenance/populateCategory.php',
'PopulateImageSha1' => 'maintenance/populateImageSha1.php',
'PopulateFilearchiveSha1' => 'maintenance/populateFilearchiveSha1.php',
'PopulateLogSearch' => 'maintenance/populateLogSearch.php',
'PopulateLogUsertext' => 'maintenance/populateLogUsertext.php',
'PopulateParentId' => 'maintenance/populateParentId.php',
'PopulateRevisionLength' => 'maintenance/populateRevisionLength.php',
'PopulateRevisionSha1' => 'maintenance/populateRevisionSha1.php',
'RefreshLinks' => 'maintenance/refreshLinks.php',
'SevenZipStream' => 'maintenance/7zip.inc',
'Sqlite' => 'maintenance/sqlite.inc',
'UpdateCollation' => 'maintenance/updateCollation.php',
'UpdateRestrictions' => 'maintenance/updateRestrictions.php',
'UserDupes' => 'maintenance/userDupes.inc',
# maintenance/language
'CsvStatsOutput' => 'maintenance/language/StatOutputs.php',
'ExtensionLanguages' => 'maintenance/language/languages.inc',
'Languages' => 'maintenance/language/languages.inc',
'StatsOutput' => 'maintenance/language/StatOutputs.php',
'TextStatsOutput' => 'maintenance/language/StatOutputs.php',
'WikiStatsOutput' => 'maintenance/language/StatOutputs.php',
# maintenance/term
'AnsiTermColorer' => 'maintenance/term/MWTerm.php',
'DummyTermColorer' => 'maintenance/term/MWTerm.php',
# mw-config
'InstallerOverrides' => 'mw-config/overrides.php',
'MyLocalSettingsGenerator' => 'mw-config/overrides.php',
);
2008-07-24 12:51:26 +00:00
class AutoLoader {
static protected $autoloadLocalClassesLower = null;
/**
* autoload - take a class name and attempt to load it
*
* @param string $className name of class we're looking for.
*/
static function autoload( $className ) {
global $wgAutoloadClasses, $wgAutoloadLocalClasses,
$wgAutoloadAttemptLowercase;
// Workaround for PHP bug <https://bugs.php.net/bug.php?id=49143> (5.3.2. is broken, it's
// fixed in 5.3.6). Strip leading backslashes from class names. When namespaces are used,
// leading backslashes are used to indicate the top-level namespace, e.g. \foo\Bar. When
// used like this in the code, the leading backslash isn't passed to the auto-loader
// ($className would be 'foo\Bar'). However, if a class is accessed using a string instead
// of a class literal (e.g. $class = '\foo\Bar'; new $class()), then some versions of PHP
// do not strip the leading backlash in this case, causing autoloading to fail.
$className = ltrim( $className, '\\' );
$filename = false;
if ( isset( $wgAutoloadLocalClasses[$className] ) ) {
$filename = $wgAutoloadLocalClasses[$className];
} elseif ( isset( $wgAutoloadClasses[$className] ) ) {
$filename = $wgAutoloadClasses[$className];
} elseif ( $wgAutoloadAttemptLowercase ) {
/*
* Try a different capitalisation.
*
* PHP 4 objects are always serialized with the classname coerced to lowercase,
* and we are plagued with several legacy uses created by MediaWiki < 1.5, see
* https://wikitech.wikimedia.org/wiki/Text_storage_data
*/
$lowerClass = strtolower( $className );
if ( self::$autoloadLocalClassesLower === null ) {
self::$autoloadLocalClassesLower = array_change_key_case( $wgAutoloadLocalClasses, CASE_LOWER );
}
if ( isset( self::$autoloadLocalClassesLower[$lowerClass] ) ) {
if ( function_exists( 'wfDebugLog' ) ) {
wfDebugLog( 'autoloader', "Class {$className} was loaded using incorrect case" );
}
$filename = self::$autoloadLocalClassesLower[$lowerClass];
}
}
if ( !$filename ) {
// Class not found; let the next autoloader try to find it
return;
}
// Make an absolute path, this improves performance by avoiding some stat calls
if ( substr( $filename, 0, 1 ) != '/' && substr( $filename, 1, 1 ) != ':' ) {
global $IP;
$filename = "$IP/$filename";
}
require $filename;
}
/**
* Force a class to be run through the autoloader, helpful for things like
* Sanitizer that have define()s outside of their class definition. Of course
* this wouldn't be necessary if everything in MediaWiki was class-based. Sigh.
*
* @param string $class
* @return bool Return the results of class_exists() so we know if we were successful
*/
static function loadClass( $class ) {
return class_exists( $class );
}
/**
* Method to clear the protected class property $autoloadLocalClassesLower.
* Used in tests.
*/
static function resetAutoloadLocalClassesLower() {
self::$autoloadLocalClassesLower = null;
}
}
spl_autoload_register( array( 'AutoLoader', 'autoload' ) );