wiki.techinc.nl/includes/AutoLoader.php

1261 lines
65 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',
'Article' => 'includes/Article.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',
'CategoryPage' => 'includes/CategoryPage.php',
2011-10-15 17:37:05 +00:00
'CategoryViewer' => 'includes/CategoryViewer.php',
'ChangesFeed' => 'includes/ChangesFeed.php',
'ChangesListSpecialPage' => 'includes/specialpage/ChangesListSpecialPage.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',
'FakeTitle' => 'includes/FakeTitle.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',
'FormSpecialPage' => 'includes/specialpage/FormSpecialPage.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',
'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',
'ImageHistoryList' => 'includes/ImagePage.php',
'ImageHistoryPseudoPager' => 'includes/ImagePage.php',
'ImagePage' => 'includes/ImagePage.php',
'ImageQueryPage' => 'includes/ImageQueryPage.php',
'ImportStreamSource' => 'includes/Import.php',
'ImportStringSource' => 'includes/Import.php',
'IncludableSpecialPage' => 'includes/specialpage/IncludableSpecialPage.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',
'MediaWiki_I18N' => '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',
'Page' => 'includes/WikiPage.php',
'PageQueryPage' => 'includes/PageQueryPage.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.php',
'PoolCounter_Stub' => 'includes/PoolCounter.php',
Make a bunch of incompatible changes to the PoolCounter. It wasn't finished, so it's not a big deal. * Use the term workers instead of threads, which fits better for a multiserver setup. * The API is now more accurate for our goals (I hope). * Add support for using the parse from another worker. * Use child classes instead of array callbacks. * The daemon is written in C using libevent instead of python using twistd. * The hash function used is that of Bob Jenkins, with files hash.c and hash.h directly copied from memcached 1.4.5 * Although similar in a few aspects to memcached assoc.c hash table, this is a different hash table implementation. Most important: ** The usage of a double linked list in the hash table. ** Growing is not performed using a maintenance thread. Since the entries are shortlived, it just waits for the old hash table to disappear. * Note: valgrind 3.5.0 (2009-8-19) does not support accept4 (added in r10955, 2009-11-25). In the meantime you need to use HAVE_ACCEPT4=0 for running with valgrind (as you would need for a non-linux system). * Sending SIGUSR1 to the daemon gracefully restarts it. The maximum limits will be doubled until the old instance finishes (ie. all its client connections expire). * Do not try to test it with instances calling an ?action=purge They will serialize on the "UPDATE `page` SET page_touched" query instead of being serialized by the PoolCounter. * The workers parameter is not stored by the poolcounter. It is expected that all requests with the same key will also have the same value. A reduction in new entries will not take effect if that number is working (not even when they end, if there are waiting entries). But an increase will increase throughput even for old queued requests.
2010-08-27 20:57:32 +00:00
'PoolCounterWork' => 'includes/PoolCounter.php',
'PoolCounterWorkViaCallback' => 'includes/PoolCounter.php',
'PoolWorkArticleView' => 'includes/WikiPage.php',
'Preferences' => 'includes/Preferences.php',
'PreferencesForm' => 'includes/Preferences.php',
'PrefixSearch' => 'includes/PrefixSearch.php',
'ProtectionForm' => 'includes/ProtectionForm.php',
'QueryPage' => 'includes/QueryPage.php',
'QuickTemplate' => 'includes/SkinTemplate.php',
'RawMessage' => 'includes/Message.php',
'RedirectSpecialArticle' => 'includes/specialpage/RedirectSpecialPage.php',
'RedirectSpecialPage' => 'includes/specialpage/RedirectSpecialPage.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',
'SpecialCreateAccount' => 'includes/specials/SpecialCreateAccount.php',
'SpecialListAdmins' => 'includes/specials/SpecialListusers.php',
'SpecialListBots' => 'includes/specials/SpecialListusers.php',
'SpecialMycontributions' => 'includes/specials/SpecialMyRedirectPages.php',
'SpecialMypage' => 'includes/specials/SpecialMyRedirectPages.php',
'SpecialMytalk' => 'includes/specials/SpecialMyRedirectPages.php',
'SpecialMyuploads' => 'includes/specials/SpecialMyRedirectPages.php',
'SpecialAllMyUploads' => 'includes/specials/SpecialMyRedirectPages.php',
'SpecialPage' => 'includes/specialpage/SpecialPage.php',
'SpecialPageFactory' => 'includes/specialpage/SpecialPageFactory.php',
'SpecialRedirectToSpecial' => 'includes/specialpage/RedirectSpecialPage.php',
'SquidPurgeClient' => 'includes/SquidPurgeClient.php',
'SquidPurgeClientPool' => 'includes/SquidPurgeClient.php',
'StatCounter' => 'includes/StatCounter.php',
'Status' => 'includes/Status.php',
'StreamFile' => 'includes/StreamFile.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',
'UnlistedSpecialPage' => 'includes/specialpage/UnlistedSpecialPage.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',
'WantedQueryPage' => 'includes/QueryPage.php',
'WatchedItem' => 'includes/WatchedItem.php',
'WebRequest' => 'includes/WebRequest.php',
'WebRequestUpload' => 'includes/WebRequest.php',
'WebResponse' => 'includes/WebResponse.php',
2011-06-30 17:14:27 +00:00
'WikiCategoryPage' => 'includes/WikiCategoryPage.php',
'WikiExporter' => 'includes/Export.php',
'WikiFilePage' => 'includes/WikiFilePage.php',
'WikiImporter' => 'includes/Import.php',
'WikiPage' => 'includes/WikiPage.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',
'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',
'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',
'ApiRunJobs' => 'includes/api/ApiRunJobs.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',
'ProcessCacheLRU' => 'includes/cache/ProcessCacheLRU.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',
'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',
'GlobalConfig' => 'includes/config/GlobalConfig.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',
The beginnings of HipHop compiled mode support. It works now for parser cache hits. * Work around HipHop issue 314 (volatile broken) and issue 308 (no compilation detection) by adding some large and ugly compilation detection code to WebStart.php and doMaintenance.php. * Provide an MW_COMPILED constant which can be used to detect compiled mode throughout the codebase. * Introduced wfIsHipHop(), which detects either compiled or interpreted mode. Used this to work around unusual eval() return value in eval.php. * Work around lack of ini_get() in Maintenance.php, by duplicating wfIsHipHop(). * In Maintenance::shouldExecute(), accept "include" as an inclusion function name, since all kinds of inclusion give this string in HipHop. * Introduced new class MWInit, which provides some static functions in the pre-autoloader environment. * Introduced MWInit::compiledPath(), which provides a relative path for invoking a compiled file, and MWInit::interpretedPath(), which provides an absolute path for interpreting a PHP file. Used these new functions in the appropriate places. * When we are running compiled code, don't include files which would generate duplicate class, function or constant definitions. Documented the new requirements on the contents of Defines.php and UtfNormalDefines.php. * In HipHop compiled mode, it's not possible to have executable code in the same file as a class definition. ** Moved MimeMagic initialisation to the constructor. ** Moved Namespace.php global variable initialisation to Setup.php. ** Moved MemcachedSessions.php initialisation to the caller in GlobalFunctions.php. ** Moved Sanitizer.php constants and global variables to static class members. Introduced an accessor function for the attribs regex, as a new place to put code formerly at file level. ** Moved Language.php initialisation of $wgLanguageNames to Language::getLanguageNames(). Removed the global variable, marked "private" since forever. * In two places: don't use error_log() with type=3 to append to a file, HipHop doesn't support it. Use file_put_contents() with FILE_APPEND instead. * Work around the terrible breakage of class_exists() by using MWInit::classExists() instead in various places. In WebInstaller::getPageByName(), the class_exists() was marked with a fixme comment already, so I replaced it with an autoloader solution.
2011-04-04 12:59:55 +00:00
'WebInstaller_Complete' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_Copying' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_DBConnect' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_DBSettings' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_Document' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_ExistingWiki' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_Install' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_Language' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_Name' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_Options' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_Readme' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_ReleaseNotes' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_Restart' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_Upgrade' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_UpgradeDoc' => 'includes/installer/WebInstallerPage.php',
'WebInstaller_Welcome' => '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/job/JobSpecification.php',
'Job' => 'includes/job/Job.php',
'JobQueue' => 'includes/job/JobQueue.php',
'JobQueueAggregator' => 'includes/job/aggregator/JobQueueAggregator.php',
'JobQueueAggregatorMemc' => 'includes/job/aggregator/JobQueueAggregatorMemc.php',
'JobQueueAggregatorRedis' => 'includes/job/aggregator/JobQueueAggregatorRedis.php',
'JobQueueDB' => 'includes/job/JobQueueDB.php',
'JobQueueConnectionError' => 'includes/job/JobQueue.php',
'JobQueueError' => 'includes/job/JobQueue.php',
'JobQueueGroup' => 'includes/job/JobQueueGroup.php',
'JobQueueFederated' => 'includes/job/JobQueueFederated.php',
'JobQueueRedis' => 'includes/job/JobQueueRedis.php',
'JobSpecification' => 'includes/job/JobSpecification.php',
# includes/job/jobs
'DoubleRedirectJob' => 'includes/job/jobs/DoubleRedirectJob.php',
'DuplicateJob' => 'includes/job/jobs/DuplicateJob.php',
'EmaillingJob' => 'includes/job/jobs/EmaillingJob.php',
'EnotifNotifyJob' => 'includes/job/jobs/EnotifNotifyJob.php',
'HTMLCacheUpdateJob' => 'includes/job/jobs/HTMLCacheUpdateJob.php',
'NullJob' => 'includes/job/jobs/NullJob.php',
'RefreshLinksJob' => 'includes/job/jobs/RefreshLinksJob.php',
'RefreshLinksJob2' => 'includes/job/jobs/RefreshLinksJob2.php',
'UploadFromUrlJob' => 'includes/job/jobs/UploadFromUrlJob.php',
'AssembleUploadChunksJob' => 'includes/job/jobs/AssembleUploadChunksJob.php',
'PublishStashedFileJob' => 'includes/job/jobs/PublishStashedFileJob.php',
2010-06-17 22:28:06 +00:00
# includes/job/utils
'BacklinkJobUtils' => 'includes/job/utils/BacklinkJobUtils.php',
# includes/json
'FormatJson' => 'includes/json/FormatJson.php',
# includes/libs
'CSSJanus' => 'includes/libs/CSSJanus.php',
'CSSJanus_Tokenizer' => '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',
'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',
'RunningStat' => 'includes/libs/RunningStat.php',
'ScopedCallback' => 'includes/libs/ScopedCallback.php',
'ScopedPHPTimeout' => 'includes/libs/ScopedPHPTimeout.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',
'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/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',
'Parser_DiffTest' => 'includes/parser/Parser_DiffTest.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',
2011-04-16 11:09:20 +00:00
'ProfilerSimple' => 'includes/profiler/ProfilerSimple.php',
'ProfilerSimpleText' => 'includes/profiler/ProfilerSimpleText.php',
'ProfilerSimpleTrace' => 'includes/profiler/ProfilerSimpleTrace.php',
2011-04-16 11:09:20 +00:00
'ProfilerSimpleUDP' => 'includes/profiler/ProfilerSimpleUDP.php',
'ProfilerStub' => 'includes/profiler/ProfilerStub.php',
'ProfileSection' => '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',
'ResourceLoaderWikiModule' => 'includes/resourceloader/ResourceLoaderWikiModule.php',
# includes/revisiondelete
'RevDel_ArchivedFileItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDel_ArchivedFileList' => 'includes/revisiondelete/RevisionDelete.php',
'RevDel_ArchivedRevisionItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDel_ArchiveItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDel_ArchiveList' => 'includes/revisiondelete/RevisionDelete.php',
'RevDel_FileItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDel_FileList' => 'includes/revisiondelete/RevisionDelete.php',
'RevDel_Item' => 'includes/revisiondelete/RevisionDeleteAbstracts.php',
'RevDel_List' => 'includes/revisiondelete/RevisionDeleteAbstracts.php',
'RevDel_LogItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDel_LogList' => 'includes/revisiondelete/RevisionDelete.php',
'RevDel_RevisionItem' => 'includes/revisiondelete/RevisionDelete.php',
'RevDel_RevisionList' => 'includes/revisiondelete/RevisionDelete.php',
'RevisionDeleter' => 'includes/revisiondelete/RevisionDeleter.php',
'RevisionDeleteUser' => 'includes/revisiondelete/RevisionDeleteUser.php',
# includes/search
'MssqlSearchResultSet' => 'includes/search/SearchMssql.php',
'MySQLSearchResultSet' => 'includes/search/SearchMySQL.php',
'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/SearchEngine.php',
'SearchMssql' => 'includes/search/SearchMssql.php',
'SearchMySQL' => 'includes/search/SearchMySQL.php',
'SearchNearMatchResultSet' => 'includes/search/SearchEngine.php',
'SearchOracle' => 'includes/search/SearchOracle.php',
'SearchPostgres' => 'includes/search/SearchPostgres.php',
'SearchResult' => 'includes/search/SearchEngine.php',
'SearchResultSet' => 'includes/search/SearchEngine.php',
'SearchResultTooMany' => 'includes/search/SearchEngine.php',
'SearchSqlite' => 'includes/search/SearchSqlite.php',
'SqliteSearchResultSet' => 'includes/search/SearchSqlite.php',
'SqlSearchResultSet' => 'includes/search/SearchEngine.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/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',
'IPBlockForm' => 'includes/specials/SpecialBlock.php',
'LinkSearchPage' => 'includes/specials/SpecialLinkSearch.php',
'ListredirectsPage' => 'includes/specials/SpecialListredirects.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',
'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',
'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',
'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',
'SpecialNewFiles' => 'includes/specials/SpecialNewimages.php',
'SpecialNewpages' => 'includes/specials/SpecialNewpages.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',
'SpecialSearch' => 'includes/specials/SpecialSearch.php',
'SpecialSpecialpages' => 'includes/specials/SpecialSpecialpages.php',
'SpecialStatistics' => 'includes/specials/SpecialStatistics.php',
'SpecialTags' => 'includes/specials/SpecialTags.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',
'WatchlistEditor' => 'includes/specials/SpecialEditWatchlist.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',
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',
'ConfEditor' => 'includes/utils/ConfEditor.php',
'ConfEditorParseError' => 'includes/utils/ConfEditor.php',
'ConfEditorToken' => 'includes/utils/ConfEditor.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',
'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/LanguageConverter.php',
'FakeConverter' => 'languages/Language.php',
'Language' => 'languages/Language.php',
2010-01-04 05:55:33 +00:00
'LanguageConverter' => 'languages/LanguageConverter.php',
'CLDRPluralRuleConverter' => 'languages/utils/CLDRPluralRuleEvaluator.php',
'CLDRPluralRuleConverter_Expression' => 'languages/utils/CLDRPluralRuleEvaluator.php',
'CLDRPluralRuleConverter_Fragment' => 'languages/utils/CLDRPluralRuleEvaluator.php',
'CLDRPluralRuleConverter_Operator' => 'languages/utils/CLDRPluralRuleEvaluator.php',
'CLDRPluralRuleEvaluator' => 'languages/utils/CLDRPluralRuleEvaluator.php',
'CLDRPluralRuleEvaluator_Range' => 'languages/utils/CLDRPluralRuleEvaluator.php',
'CLDRPluralRuleError' => 'languages/utils/CLDRPluralRuleEvaluator.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',
'MessageWriter' => 'maintenance/language/writeMessagesArray.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',
# skins
'CologneBlueTemplate' => 'skins/CologneBlue.php',
'ModernTemplate' => 'skins/Modern.php',
'MonoBookTemplate' => 'skins/MonoBook.php',
'SkinCologneBlue' => 'skins/CologneBlue.php',
'SkinModern' => 'skins/Modern.php',
'SkinMonoBook' => 'skins/MonoBook.php',
'SkinVector' => 'skins/Vector.php',
'VectorTemplate' => 'skins/Vector.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( 'wfDebug' ) ) {
wfDebug( "Class {$className} was loaded using incorrect case.\n" );
}
$filename = self::$autoloadLocalClassesLower[$lowerClass];
}
}
if ( !$filename ) {
if ( function_exists( 'wfDebug' ) ) {
# FIXME: This is not very polite. Assume we do not manage the class.
wfDebug( "Class {$className} not found; skipped loading\n" );
}
# Give up
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 $class string
* @return Boolean 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' ) );