From c6b902f180a39b12c2f53125a73c79e70b8968e9 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 16 Jun 2008 20:21:26 +0000 Subject: [PATCH] * Reorganised the includes directory, creating subdirectories db, parser and specials * Wrote a tool to check the integrity of the autoloader class list, fixed some issues that came up. * Start the autoloader before LocalSettings.php, so that when an extension writer thinks an inefficient one-file special page extension is the way to go, they don't have to use explicit includes to make the class inheritance work. Should continue to work with $IP set in LocalSettings.php as long as $IP is set before extensions are included. --- includes/AutoLoader.php | 452 ++++++++++-------- includes/Setup.php | 5 +- includes/SpecialPage.php | 2 +- includes/WebStart.php | 25 +- includes/{ => db}/Database.php | 0 includes/{ => db}/DatabaseMssql.php | 0 includes/{ => db}/DatabaseOracle.php | 0 includes/{ => db}/DatabasePostgres.php | 0 includes/{ => db}/DatabaseSqlite.php | 0 includes/{ => db}/LBFactory.php | 0 includes/{ => db}/LBFactory_Multi.php | 0 includes/{ => db}/LoadBalancer.php | 0 includes/{ => parser}/CoreParserFunctions.php | 0 includes/{ => parser}/DateFormatter.php | 0 includes/{ => parser}/Parser.php | 0 includes/{ => parser}/ParserCache.php | 0 includes/{ => parser}/ParserOptions.php | 0 includes/{ => parser}/ParserOutput.php | 0 includes/{ => parser}/Parser_DiffTest.php | 0 includes/{ => parser}/Parser_OldPP.php | 0 includes/{ => parser}/Preprocessor.php | 0 includes/{ => parser}/Preprocessor_DOM.php | 0 includes/{ => parser}/Preprocessor_Hash.php | 0 .../Allmessages.php} | 0 .../Allpages.php} | 0 .../Ancientpages.php} | 0 .../Blockip.php} | 0 .../Blockme.php} | 0 .../Booksources.php} | 0 .../BrokenRedirects.php} | 0 .../Categories.php} | 0 .../Confirmemail.php} | 0 .../Contributions.php} | 0 .../Deadendpages.php} | 0 .../Disambiguations.php} | 0 .../DoubleRedirects.php} | 0 .../Emailuser.php} | 0 .../Export.php} | 0 .../Fewestrevisions.php} | 0 .../FileDuplicateSearch.php} | 0 .../Filepath.php} | 0 .../Imagelist.php} | 0 .../Import.php} | 0 .../Ipblocklist.php} | 0 .../Listgrouprights.php} | 0 .../Listredirects.php} | 0 .../Listusers.php} | 0 .../Lockdb.php} | 0 includes/{SpecialLog.php => specials/Log.php} | 0 .../Lonelypages.php} | 0 .../Longpages.php} | 0 .../MIMEsearch.php} | 0 .../MergeHistory.php} | 0 .../MissingFiles.php} | 0 .../Mostcategories.php} | 0 .../Mostimages.php} | 0 .../Mostlinked.php} | 0 .../Mostlinkedcategories.php} | 0 .../Mostlinkedtemplates.php} | 0 .../Mostrevisions.php} | 0 .../Movepage.php} | 0 .../Newimages.php} | 0 .../Newpages.php} | 0 .../Popularpages.php} | 0 .../Preferences.php} | 0 .../Prefixindex.php} | 0 .../Protectedpages.php} | 0 .../Protectedtitles.php} | 0 .../Randompage.php} | 0 .../Randomredirect.php} | 0 .../Recentchanges.php} | 0 .../Recentchangeslinked.php} | 0 .../Resetpass.php} | 0 .../Revisiondelete.php} | 0 .../Search.php} | 0 .../Shortpages.php} | 0 .../Specialpages.php} | 0 .../Statistics.php} | 0 .../Uncategorizedcategories.php} | 5 - .../Uncategorizedimages.php} | 0 .../Uncategorizedpages.php} | 0 .../Uncategorizedtemplates.php} | 0 .../Undelete.php} | 0 .../Unlockdb.php} | 0 .../Unusedcategories.php} | 0 .../Unusedimages.php} | 0 .../Unusedtemplates.php} | 0 .../Unwatchedpages.php} | 0 .../Upload.php} | 0 .../UploadMogile.php} | 0 .../Userlogin.php} | 0 .../Userlogout.php} | 0 .../Userrights.php} | 0 .../Version.php} | 0 .../Wantedcategories.php} | 0 .../Wantedpages.php} | 0 .../Watchlist.php} | 0 .../Whatlinkshere.php} | 0 .../Withoutinterwiki.php} | 0 includes/templates/Userlogin.php | 3 - maintenance/checkAutoLoader.php | 22 + maintenance/commandLine.inc | 2 + 102 files changed, 301 insertions(+), 215 deletions(-) rename includes/{ => db}/Database.php (100%) rename includes/{ => db}/DatabaseMssql.php (100%) rename includes/{ => db}/DatabaseOracle.php (100%) rename includes/{ => db}/DatabasePostgres.php (100%) rename includes/{ => db}/DatabaseSqlite.php (100%) rename includes/{ => db}/LBFactory.php (100%) rename includes/{ => db}/LBFactory_Multi.php (100%) rename includes/{ => db}/LoadBalancer.php (100%) rename includes/{ => parser}/CoreParserFunctions.php (100%) rename includes/{ => parser}/DateFormatter.php (100%) rename includes/{ => parser}/Parser.php (100%) rename includes/{ => parser}/ParserCache.php (100%) rename includes/{ => parser}/ParserOptions.php (100%) rename includes/{ => parser}/ParserOutput.php (100%) rename includes/{ => parser}/Parser_DiffTest.php (100%) rename includes/{ => parser}/Parser_OldPP.php (100%) rename includes/{ => parser}/Preprocessor.php (100%) rename includes/{ => parser}/Preprocessor_DOM.php (100%) rename includes/{ => parser}/Preprocessor_Hash.php (100%) rename includes/{SpecialAllmessages.php => specials/Allmessages.php} (100%) rename includes/{SpecialAllpages.php => specials/Allpages.php} (100%) rename includes/{SpecialAncientpages.php => specials/Ancientpages.php} (100%) rename includes/{SpecialBlockip.php => specials/Blockip.php} (100%) rename includes/{SpecialBlockme.php => specials/Blockme.php} (100%) rename includes/{SpecialBooksources.php => specials/Booksources.php} (100%) rename includes/{SpecialBrokenRedirects.php => specials/BrokenRedirects.php} (100%) rename includes/{SpecialCategories.php => specials/Categories.php} (100%) rename includes/{SpecialConfirmemail.php => specials/Confirmemail.php} (100%) rename includes/{SpecialContributions.php => specials/Contributions.php} (100%) rename includes/{SpecialDeadendpages.php => specials/Deadendpages.php} (100%) rename includes/{SpecialDisambiguations.php => specials/Disambiguations.php} (100%) rename includes/{SpecialDoubleRedirects.php => specials/DoubleRedirects.php} (100%) rename includes/{SpecialEmailuser.php => specials/Emailuser.php} (100%) rename includes/{SpecialExport.php => specials/Export.php} (100%) rename includes/{SpecialFewestrevisions.php => specials/Fewestrevisions.php} (100%) rename includes/{SpecialFileDuplicateSearch.php => specials/FileDuplicateSearch.php} (100%) rename includes/{SpecialFilepath.php => specials/Filepath.php} (100%) rename includes/{SpecialImagelist.php => specials/Imagelist.php} (100%) rename includes/{SpecialImport.php => specials/Import.php} (100%) rename includes/{SpecialIpblocklist.php => specials/Ipblocklist.php} (100%) rename includes/{SpecialListgrouprights.php => specials/Listgrouprights.php} (100%) rename includes/{SpecialListredirects.php => specials/Listredirects.php} (100%) rename includes/{SpecialListusers.php => specials/Listusers.php} (100%) rename includes/{SpecialLockdb.php => specials/Lockdb.php} (100%) rename includes/{SpecialLog.php => specials/Log.php} (100%) rename includes/{SpecialLonelypages.php => specials/Lonelypages.php} (100%) rename includes/{SpecialLongpages.php => specials/Longpages.php} (100%) rename includes/{SpecialMIMEsearch.php => specials/MIMEsearch.php} (100%) rename includes/{SpecialMergeHistory.php => specials/MergeHistory.php} (100%) rename includes/{SpecialMissingFiles.php => specials/MissingFiles.php} (100%) rename includes/{SpecialMostcategories.php => specials/Mostcategories.php} (100%) rename includes/{SpecialMostimages.php => specials/Mostimages.php} (100%) rename includes/{SpecialMostlinked.php => specials/Mostlinked.php} (100%) rename includes/{SpecialMostlinkedcategories.php => specials/Mostlinkedcategories.php} (100%) rename includes/{SpecialMostlinkedtemplates.php => specials/Mostlinkedtemplates.php} (100%) rename includes/{SpecialMostrevisions.php => specials/Mostrevisions.php} (100%) rename includes/{SpecialMovepage.php => specials/Movepage.php} (100%) rename includes/{SpecialNewimages.php => specials/Newimages.php} (100%) rename includes/{SpecialNewpages.php => specials/Newpages.php} (100%) rename includes/{SpecialPopularpages.php => specials/Popularpages.php} (100%) rename includes/{SpecialPreferences.php => specials/Preferences.php} (100%) rename includes/{SpecialPrefixindex.php => specials/Prefixindex.php} (100%) rename includes/{SpecialProtectedpages.php => specials/Protectedpages.php} (100%) rename includes/{SpecialProtectedtitles.php => specials/Protectedtitles.php} (100%) rename includes/{SpecialRandompage.php => specials/Randompage.php} (100%) rename includes/{SpecialRandomredirect.php => specials/Randomredirect.php} (100%) rename includes/{SpecialRecentchanges.php => specials/Recentchanges.php} (100%) rename includes/{SpecialRecentchangeslinked.php => specials/Recentchangeslinked.php} (100%) rename includes/{SpecialResetpass.php => specials/Resetpass.php} (100%) rename includes/{SpecialRevisiondelete.php => specials/Revisiondelete.php} (100%) rename includes/{SpecialSearch.php => specials/Search.php} (100%) rename includes/{SpecialShortpages.php => specials/Shortpages.php} (100%) rename includes/{SpecialSpecialpages.php => specials/Specialpages.php} (100%) rename includes/{SpecialStatistics.php => specials/Statistics.php} (100%) rename includes/{SpecialUncategorizedcategories.php => specials/Uncategorizedcategories.php} (89%) rename includes/{SpecialUncategorizedimages.php => specials/Uncategorizedimages.php} (100%) rename includes/{SpecialUncategorizedpages.php => specials/Uncategorizedpages.php} (100%) rename includes/{SpecialUncategorizedtemplates.php => specials/Uncategorizedtemplates.php} (100%) rename includes/{SpecialUndelete.php => specials/Undelete.php} (100%) rename includes/{SpecialUnlockdb.php => specials/Unlockdb.php} (100%) rename includes/{SpecialUnusedcategories.php => specials/Unusedcategories.php} (100%) rename includes/{SpecialUnusedimages.php => specials/Unusedimages.php} (100%) rename includes/{SpecialUnusedtemplates.php => specials/Unusedtemplates.php} (100%) rename includes/{SpecialUnwatchedpages.php => specials/Unwatchedpages.php} (100%) rename includes/{SpecialUpload.php => specials/Upload.php} (100%) rename includes/{SpecialUploadMogile.php => specials/UploadMogile.php} (100%) rename includes/{SpecialUserlogin.php => specials/Userlogin.php} (100%) rename includes/{SpecialUserlogout.php => specials/Userlogout.php} (100%) rename includes/{SpecialUserrights.php => specials/Userrights.php} (100%) rename includes/{SpecialVersion.php => specials/Version.php} (100%) rename includes/{SpecialWantedcategories.php => specials/Wantedcategories.php} (100%) rename includes/{SpecialWantedpages.php => specials/Wantedpages.php} (100%) rename includes/{SpecialWatchlist.php => specials/Watchlist.php} (100%) rename includes/{SpecialWhatlinkshere.php => specials/Whatlinkshere.php} (100%) rename includes/{SpecialWithoutinterwiki.php => specials/Withoutinterwiki.php} (100%) create mode 100644 maintenance/checkAutoLoader.php diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 1e0fd3779c..a823057d14 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -4,18 +4,14 @@ ini_set('unserialize_callback_func', '__autoload' ); -function __autoload($className) { - global $wgAutoloadClasses; - +class AutoLoader { # Locations of core classes # Extension classes are specified with $wgAutoloadClasses static $localClasses = array( # Includes - 'AjaxCachePolicy' => 'includes/AjaxFunctions.php', 'AjaxDispatcher' => 'includes/AjaxDispatcher.php', 'AjaxResponse' => 'includes/AjaxResponse.php', 'AlphabeticPager' => 'includes/Pager.php', - 'AncientPagesPage' => 'includes/SpecialAncientpages.php', 'APCBagOStuff' => 'includes/BagOStuff.php', 'ArrayDiffFormatter' => 'includes/DifferenceEngine.php', 'Article' => 'includes/Article.php', @@ -24,29 +20,16 @@ function __autoload($className) { 'Autopromote' => 'includes/Autopromote.php', 'BagOStuff' => 'includes/BagOStuff.php', 'Block' => 'includes/Block.php', - 'BrokenRedirectsPage' => 'includes/SpecialBrokenRedirects.php', + 'CacheDependency' => 'includes/CacheDependency.php', 'Category' => 'includes/Category.php', 'Categoryfinder' => 'includes/Categoryfinder.php', 'CategoryPage' => 'includes/CategoryPage.php', 'CategoryViewer' => 'includes/CategoryPage.php', 'ChangesList' => 'includes/ChangesList.php', 'ChannelFeed' => 'includes/Feed.php', - 'ChronologyProtector' => 'includes/LBFactory.php', 'ConcatenatedGzipHistoryBlob' => 'includes/HistoryBlob.php', - 'ContributionsPage' => 'includes/SpecialContributions.php', - 'CoreParserFunctions' => 'includes/CoreParserFunctions.php', - 'Database' => 'includes/Database.php', - 'DatabaseMysql' => 'includes/Database.php', - 'DatabaseOracle' => 'includes/DatabaseOracle.php', - 'DatabasePostgres' => 'includes/DatabasePostgres.php', - 'DatabaseSqlite' => 'includes/DatabaseSqlite.php', - 'DatabaseMssql' => 'includes/DatabaseMssql.php', - 'DateFormatter' => 'includes/DateFormatter.php', + 'ConstantDependency' => 'includes/CacheDependency.php', 'DBABagOStuff' => 'includes/BagOStuff.php', - 'DBLockForm' => 'includes/SpecialLockdb.php', - 'DBObject' => 'includes/Database.php', - 'DBUnlockForm' => 'includes/SpecialUnlockdb.php', - 'DeadendPagesPage' => 'includes/SpecialDeadendpages.php', 'DependencyWrapper' => 'includes/CacheDependency.php', '_DiffEngine' => 'includes/DifferenceEngine.php', 'DifferenceEngine' => 'includes/DifferenceEngine.php', @@ -57,9 +40,7 @@ function __autoload($className) { '_DiffOp_Copy' => 'includes/DifferenceEngine.php', '_DiffOp_Delete' => 'includes/DifferenceEngine.php', '_DiffOp' => 'includes/DifferenceEngine.php', - 'DisambiguationsPage' => 'includes/SpecialDisambiguations.php', 'DjVuImage' => 'includes/DjVuImage.php', - 'DoubleRedirectsPage' => 'includes/SpecialDoubleRedirects.php', 'DoubleReplacer' => 'includes/StringUtils.php', 'Dump7ZipOutput' => 'includes/Export.php', 'DumpBZip2Output' => 'includes/Export.php', @@ -74,33 +55,29 @@ function __autoload($className) { 'DumpPipeOutput' => 'includes/Export.php', 'eAccelBagOStuff' => 'includes/BagOStuff.php', 'EditPage' => 'includes/EditPage.php', - 'EmailConfirmation' => 'includes/SpecialConfirmemail.php', - 'EmailInvalidation' => 'includes/SpecialConfirmemail.php', 'EmaillingJob' => 'includes/EmaillingJob.php', - 'EmaillingJob' => 'includes/JobQueue.php', 'EmailNotification' => 'includes/UserMailer.php', - 'EmailUserForm' => 'includes/SpecialEmailuser.php', 'EnhancedChangesList' => 'includes/ChangesList.php', 'EnotifNotifyJob' => 'includes/EnotifNotifyJob.php', + 'ErrorPageError' => 'includes/Exception.php', 'Exif' => 'includes/Exif.php', 'ExternalEdit' => 'includes/ExternalEdit.php', 'ExternalStoreDB' => 'includes/ExternalStoreDB.php', 'ExternalStoreHttp' => 'includes/ExternalStoreHttp.php', 'ExternalStore' => 'includes/ExternalStore.php', - 'FakeMemCachedClient' => 'includes/ObjectCache.php', + 'FatalError' => 'includes/Exception.php', 'FakeTitle' => 'includes/FakeTitle.php', 'FauxRequest' => 'includes/WebRequest.php', 'FeedItem' => 'includes/Feed.php', - 'FewestrevisionsPage' => 'includes/SpecialFewestrevisions.php', 'FileDeleteForm' => 'includes/FileDeleteForm.php', 'FileDependency' => 'includes/CacheDependency.php', - 'FileDuplicateSearch' => 'includes/SpecialFileDuplicateSearch.php', 'FileRevertForm' => 'includes/FileRevertForm.php', 'FileStore' => 'includes/FileStore.php', 'FormatExif' => 'includes/Exif.php', 'FormOptions' => 'includes/FormOptions.php', 'FSException' => 'includes/FileStore.php', 'FSTransaction' => 'includes/FileStore.php', + 'GlobalDependency' => 'includes/CacheDependency.php', 'HashBagOStuff' => 'includes/BagOStuff.php', 'HashtableReplacer' => 'includes/StringUtils.php', 'HistoryBlobCurStub' => 'includes/HistoryBlob.php', @@ -115,17 +92,10 @@ function __autoload($className) { 'ImageHistoryList' => 'includes/ImagePage.php', 'ImagePage' => 'includes/ImagePage.php', 'ImageQueryPage' => 'includes/ImageQueryPage.php', - 'ImportStreamSource' => 'includes/SpecialImport.php', - 'ImportStringSource' => 'includes/SpecialImport.php', 'IncludableSpecialPage' => 'includes/SpecialPage.php', 'IndexPager' => 'includes/Pager.php', - 'IPBlockForm' => 'includes/SpecialBlockip.php', 'IP' => 'includes/IP.php', - 'IPUnblockForm' => 'includes/SpecialIpblocklist.php', 'Job' => 'includes/JobQueue.php', - 'LBFactory' => 'includes/LBFactory.php', - 'LBFactory_Multi' => 'includes/LBFactory_Multi.php', - 'LBFactory_Simple' => 'includes/LBFactory.php', 'License' => 'includes/Licenses.php', 'Licenses' => 'includes/Licenses.php', 'LinkBatch' => 'includes/LinkBatch.php', @@ -133,15 +103,11 @@ function __autoload($className) { 'Linker' => 'includes/Linker.php', 'LinkFilter' => 'includes/LinkFilter.php', 'LinksUpdate' => 'includes/LinksUpdate.php', - 'ListredirectsPage' => 'includes/SpecialListredirects.php', - 'LoadBalancer' => 'includes/LoadBalancer.php', - 'LoginForm' => 'includes/SpecialUserlogin.php', 'LogPage' => 'includes/LogPage.php', + 'LogPager' => 'includes/LogEventsList.php', 'LogEventsList' => 'includes/LogEventsList.php', 'LogReader' => 'includes/LogEventsList.php', 'LogViewer' => 'includes/LogEventsList.php', - 'LonelyPagesPage' => 'includes/SpecialLonelypages.php', - 'LongPagesPage' => 'includes/SpecialLongpages.php', 'MacBinary' => 'includes/MacBinary.php', 'MagicWordArray' => 'includes/MagicWord.php', 'MagicWord' => 'includes/MagicWord.php', @@ -156,55 +122,29 @@ function __autoload($className) { 'memcached' => 'includes/memcached-client.php', 'MessageCache' => 'includes/MessageCache.php', 'MimeMagic' => 'includes/MimeMagic.php', - 'MIMEsearchPage' => 'includes/SpecialMIMEsearch.php', - 'MostcategoriesPage' => 'includes/SpecialMostcategories.php', - 'MostimagesPage' => 'includes/SpecialMostimages.php', - 'MostlinkedCategoriesPage' => 'includes/SpecialMostlinkedcategories.php', - 'MostlinkedPage' => 'includes/SpecialMostlinked.php', - 'MostrevisionsPage' => 'includes/SpecialMostrevisions.php', - 'MovePageForm' => 'includes/SpecialMovepage.php', 'MWException' => 'includes/Exception.php', 'MWNamespace' => 'includes/Namespace.php', 'MySQLSearchResultSet' => 'includes/SearchMySQL.php', - 'MySQLMasterPos' => 'includes/Database.php', 'Namespace' => 'includes/NamespaceCompat.php', // Compat - 'NewbieContributionsPage' => 'includes/SpecialNewbieContributions.php', - 'NewPagesPage' => 'includes/SpecialNewpages.php', 'OldChangesList' => 'includes/ChangesList.php', + 'OracleSearchResultSet' => 'includes/SearchOracle.php', 'OutputPage' => 'includes/OutputPage.php', - 'PageArchive' => 'includes/SpecialUndelete.php', 'PageHistory' => 'includes/PageHistory.php', + 'PageHistoryPager' => 'includes/PageHistory.php', 'PageQueryPage' => 'includes/PageQueryPage.php', - 'ParserCache' => 'includes/ParserCache.php', - 'Parser_DiffTest' => 'includes/Parser_DiffTest.php', - 'Parser' => 'includes/Parser.php', - 'Parser_OldPP' => 'includes/Parser_OldPP.php', - 'ParserOptions' => 'includes/ParserOptions.php', - 'ParserOutput' => 'includes/ParserOutput.php', - 'PasswordResetForm' => 'includes/SpecialResetpass.php', + 'Pager' => 'includes/Pager.php', + 'PasswordError' => 'includes/User.php', 'PatrolLog' => 'includes/PatrolLog.php', - 'PopularPagesPage' => 'includes/SpecialPopularpages.php', - 'PPDStackElement' => 'includes/Preprocessor_DOM.php', - 'PPDStack' => 'includes/Preprocessor_DOM.php', - 'PPFrame_DOM' => 'includes/Preprocessor_DOM.php', - 'PPFrame' => 'includes/Preprocessor.php', - 'PPNode_DOM' => 'includes/Preprocessor_DOM.php', - 'PPNode' => 'includes/Preprocessor.php', - 'PPTemplateFrame_DOM' => 'includes/Preprocessor_DOM.php', - 'PreferencesForm' => 'includes/SpecialPreferences.php', + 'PostgresSearchResult' => 'includes/SearchPostgres.php', + 'PostgresSearchResultSet' => 'includes/SearchPostgres.php', 'PrefixSearch' => 'includes/PrefixSearch.php', - 'Preprocessor_DOM' => 'includes/Preprocessor_DOM.php', - 'Preprocessor_Hash' => 'includes/Preprocessor_Hash.php', - 'Preprocessor' => 'includes/Preprocessor.php', 'Profiler' => 'includes/Profiler.php', 'ProfilerSimple' => 'includes/ProfilerSimple.php', 'ProfilerSimpleText' => 'includes/ProfilerSimpleText.php', 'ProfilerSimpleUDP' => 'includes/ProfilerSimpleUDP.php', 'ProtectionForm' => 'includes/ProtectionForm.php', - 'ProxyTools' => 'includes/ProxyTools.php', 'QueryPage' => 'includes/QueryPage.php', 'QuickTemplate' => 'includes/SkinTemplate.php', - 'RandomPage' => 'includes/SpecialRandompage.php', 'RawPage' => 'includes/RawPage.php', 'RCCacheEntry' => 'includes/ChangesList.php', 'RecentChange' => 'includes/RecentChange.php', @@ -212,38 +152,32 @@ function __autoload($className) { 'RegexlikeReplacer' => 'includes/StringUtils.php', 'ReplacementArray' => 'includes/StringUtils.php', 'Replacer' => 'includes/StringUtils.php', - 'ResultWrapper' => 'includes/Database.php', 'ReverseChronologicalPager' => 'includes/Pager.php', - 'RevisionDeleteForm' => 'includes/SpecialRevisiondelete.php', - 'RevisionDeleter' => 'includes/SpecialRevisiondelete.php', 'Revision' => 'includes/Revision.php', 'RSSFeed' => 'includes/Feed.php', 'Sanitizer' => 'includes/Sanitizer.php', 'SearchEngineDummy' => 'includes/SearchEngine.php', 'SearchEngine' => 'includes/SearchEngine.php', + 'SearchHighlighter' => 'includes/SearchEngine.php', 'SearchMySQL4' => 'includes/SearchMySQL4.php', 'SearchMySQL' => 'includes/SearchMySQL.php', 'SearchOracle' => 'includes/SearchOracle.php', 'SearchPostgres' => 'includes/SearchPostgres.php', 'SearchResult' => 'includes/SearchEngine.php', 'SearchResultSet' => 'includes/SearchEngine.php', + 'SearchResultTooMany' => 'includes/SearchEngine.php', 'SearchUpdate' => 'includes/SearchUpdate.php', 'SearchUpdateMyISAM' => 'includes/SearchUpdate.php', - 'ShortPagesPage' => 'includes/SpecialShortpages.php', 'SiteConfiguration' => 'includes/SiteConfiguration.php', 'SiteStats' => 'includes/SiteStats.php', 'SiteStatsUpdate' => 'includes/SiteStats.php', 'Skin' => 'includes/Skin.php', 'SkinTemplate' => 'includes/SkinTemplate.php', - 'SpecialAllpages' => 'includes/SpecialAllpages.php', - 'SpecialBookSources' => 'includes/SpecialBooksources.php', - 'SpecialListGroupRights' => 'includes/SpecialListgrouprights.php', - 'SpecialMostlinkedtemplates' => 'includes/SpecialMostlinkedtemplates.php', + 'SpecialMycontributions' => 'includes/SpecialPage.php', + 'SpecialMypage' => 'includes/SpecialPage.php', + 'SpecialMytalk' => 'includes/SpecialPage.php', 'SpecialPage' => 'includes/SpecialPage.php', - 'SpecialPrefixindex' => 'includes/SpecialPrefixindex.php', - 'SpecialRandomredirect' => 'includes/SpecialRandomredirect.php', - 'SpecialSearch' => 'includes/SpecialSearch.php', - 'SpecialVersion' => 'includes/SpecialVersion.php', + 'SpecialRedirectToSpecial' => 'includes/SpecialPage.php', 'SqlBagOStuff' => 'includes/BagOStuff.php', 'SquidUpdate' => 'includes/SquidUpdate.php', 'Status' => 'includes/Status.php', @@ -256,38 +190,21 @@ function __autoload($className) { 'TitleListDependency' => 'includes/CacheDependency.php', 'TransformParameterError' => 'includes/MediaTransformOutput.php', 'TurckBagOStuff' => 'includes/BagOStuff.php', - 'UncategorizedCategoriesPage' => 'includes/SpecialUncategorizedcategories.php', - 'UncategorizedPagesPage' => 'includes/SpecialUncategorizedpages.php', - 'UncategorizedTemplatesPage' => 'includes/SpecialUncategorizedtemplates.php', - 'UndeleteForm' => 'includes/SpecialUndelete.php', 'UnifiedDiffFormatter' => 'includes/DifferenceEngine.php', 'UnlistedSpecialPage' => 'includes/SpecialPage.php', - 'UnusedCategoriesPage' => 'includes/SpecialUnusedcategories.php', - 'UnusedimagesPage' => 'includes/SpecialUnusedimages.php', - 'UnusedtemplatesPage' => 'includes/SpecialUnusedtemplates.php', - 'UnwatchedpagesPage' => 'includes/SpecialUnwatchedpages.php', - 'UploadForm' => 'includes/SpecialUpload.php', - 'UploadFormMogile' => 'includes/SpecialUploadMogile.php', 'User' => 'includes/User.php', 'UserArray' => 'includes/UserArray.php', 'UserArrayFromResult' => 'includes/UserArray.php', 'UserMailer' => 'includes/UserMailer.php', - 'UserrightsPage' => 'includes/SpecialUserrights.php', 'UserRightsProxy' => 'includes/UserRightsProxy.php', - 'WantedCategoriesPage' => 'includes/SpecialWantedcategories.php', - 'WantedPagesPage' => 'includes/SpecialWantedpages.php', 'WatchedItem' => 'includes/WatchedItem.php', 'WatchlistEditor' => 'includes/WatchlistEditor.php', 'WebRequest' => 'includes/WebRequest.php', 'WebResponse' => 'includes/WebResponse.php', - 'WhatLinksHerePage' => 'includes/SpecialWhatlinkshere.php', 'WikiError' => 'includes/WikiError.php', 'WikiErrorMsg' => 'includes/WikiError.php', 'WikiExporter' => 'includes/Export.php', - 'WikiImporter' => 'includes/SpecialImport.php', - 'WikiRevision' => 'includes/SpecialImport.php', 'WikiXmlError' => 'includes/WikiError.php', - 'WithoutInterwikiPage' => 'includes/SpecialWithoutinterwiki.php', 'WordLevelDiff' => 'includes/DifferenceEngine.php', 'XCacheBagOStuff' => 'includes/BagOStuff.php', 'XmlDumpWriter' => 'includes/Export.php', @@ -296,46 +213,11 @@ function __autoload($className) { 'XmlTypeCheck' => 'includes/XmlTypeCheck.php', 'ZhClient' => 'includes/ZhClient.php', - # filerepo - 'ArchivedFile' => 'includes/filerepo/ArchivedFile.php', - 'File' => 'includes/filerepo/File.php', - 'FileRepo' => 'includes/filerepo/FileRepo.php', - 'FileRepoStatus' => 'includes/filerepo/FileRepoStatus.php', - 'ForeignAPIFile' => 'includes/filerepo/ForeignAPIFile.php', - 'ForeignAPIRepo' => 'includes/filerepo/ForeignAPIRepo.php', - 'ForeignDBFile' => 'includes/filerepo/ForeignDBFile.php', - 'ForeignDBRepo' => 'includes/filerepo/ForeignDBRepo.php', - 'ForeignDBViaLBRepo' => 'includes/filerepo/ForeignDBViaLBRepo.php', - 'FSRepo' => 'includes/filerepo/FSRepo.php', - 'Image' => 'includes/filerepo/Image.php', - 'LocalFileDeleteBatch' => 'includes/filerepo/LocalFile.php', - 'LocalFile' => 'includes/filerepo/LocalFile.php', - 'LocalFileRestoreBatch' => 'includes/filerepo/LocalFile.php', - 'LocalRepo' => 'includes/filerepo/LocalRepo.php', - 'OldLocalFile' => 'includes/filerepo/OldLocalFile.php', - 'RepoGroup' => 'includes/filerepo/RepoGroup.php', - 'UnregisteredLocalFile' => 'includes/filerepo/UnregisteredLocalFile.php', - - # Media - 'BitmapHandler' => 'includes/media/Bitmap.php', - 'BmpHandler' => 'includes/media/BMP.php', - 'DjVuHandler' => 'includes/media/DjVu.php', - 'ImageHandler' => 'includes/media/Generic.php', - 'MediaHandler' => 'includes/media/Generic.php', - 'SvgHandler' => 'includes/media/SVG.php', - - # Normal - 'UtfNormal' => 'includes/normal/UtfNormal.php', - - # Templates - 'UsercreateTemplate' => 'includes/templates/Userlogin.php', - 'UserloginTemplate' => 'includes/templates/Userlogin.php', - - # Languages - 'Language' => 'languages/Language.php', - - # API + # includes/api 'ApiBase' => 'includes/api/ApiBase.php', + 'ApiBlock' => 'includes/api/ApiBlock.php', + 'ApiDelete' => 'includes/api/ApiDelete.php', + 'ApiEditPage' => 'includes/api/ApiEditPage.php', 'ApiEmailUser' => 'includes/api/ApiEmailUser.php', 'ApiExpandTemplates' => 'includes/api/ApiExpandTemplates.php', 'ApiFeedWatchlist' => 'includes/api/ApiFeedWatchlist.php', @@ -352,28 +234,32 @@ function __autoload($className) { 'ApiLogin' => 'includes/api/ApiLogin.php', 'ApiLogout' => 'includes/api/ApiLogout.php', 'ApiMain' => 'includes/api/ApiMain.php', + 'ApiMove' => 'includes/api/ApiMove.php', 'ApiOpenSearch' => 'includes/api/ApiOpenSearch.php', 'ApiPageSet' => 'includes/api/ApiPageSet.php', 'ApiParamInfo' => 'includes/api/ApiParamInfo.php', 'ApiParse' => 'includes/api/ApiParse.php', - 'ApiQueryAllImages' => 'includes/api/ApiQueryAllimages.php', + 'ApiProtect' => 'includes/api/ApiProtect.php', + 'ApiQuery' => 'includes/api/ApiQuery.php', 'ApiQueryAllCategories' => 'includes/api/ApiQueryAllCategories.php', + 'ApiQueryAllimages' => 'includes/api/ApiQueryAllimages.php', 'ApiQueryAllLinks' => 'includes/api/ApiQueryAllLinks.php', + 'ApiQueryAllUsers' => 'includes/api/ApiQueryAllUsers.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', - 'ApiQueryCategoryMembers' => 'includes/api/ApiQueryCategoryMembers.php', 'ApiQueryCategoryInfo' => 'includes/api/ApiQueryCategoryInfo.php', + 'ApiQueryCategoryMembers' => 'includes/api/ApiQueryCategoryMembers.php', 'ApiQueryContributions' => 'includes/api/ApiQueryUserContributions.php', - 'ApiQueryExternalLinks' => 'includes/api/ApiQueryExternalLinks.php', + 'ApiQueryDeletedrevs' => 'includes/api/ApiQueryDeletedrevs.php', 'ApiQueryExtLinksUsage' => 'includes/api/ApiQueryExtLinksUsage.php', + 'ApiQueryExternalLinks' => 'includes/api/ApiQueryExternalLinks.php', 'ApiQueryGeneratorBase' => 'includes/api/ApiQueryBase.php', 'ApiQueryImageInfo' => 'includes/api/ApiQueryImageInfo.php', 'ApiQueryImages' => 'includes/api/ApiQueryImages.php', - 'ApiQuery' => 'includes/api/ApiQuery.php', 'ApiQueryInfo' => 'includes/api/ApiQueryInfo.php', 'ApiQueryLangLinks' => 'includes/api/ApiQueryLangLinks.php', 'ApiQueryLinks' => 'includes/api/ApiQueryLinks.php', @@ -387,67 +273,247 @@ function __autoload($className) { 'ApiQueryUsers' => 'includes/api/ApiQueryUsers.php', 'ApiQueryWatchlist' => 'includes/api/ApiQueryWatchlist.php', 'ApiResult' => 'includes/api/ApiResult.php', - 'Services_JSON' => 'includes/api/ApiFormatJson_json.php', - 'Spyc' => 'includes/api/ApiFormatYaml_spyc.php', - - # apiedit branch - 'ApiBlock' => 'includes/api/ApiBlock.php', - 'ApiDelete' => 'includes/api/ApiDelete.php', - 'ApiEditPage' => 'includes/api/ApiEditPage.php', - 'ApiMove' => 'includes/api/ApiMove.php', - 'ApiProtect' => 'includes/api/ApiProtect.php', - 'ApiQueryBlocks' => 'includes/api/ApiQueryBlocks.php', - 'ApiQueryDeletedrevs' => 'includes/api/ApiQueryDeletedrevs.php', 'ApiRollback' => 'includes/api/ApiRollback.php', 'ApiUnblock' => 'includes/api/ApiUnblock.php', 'ApiUndelete' => 'includes/api/ApiUndelete.php', + 'Services_JSON' => 'includes/api/ApiFormatJson_json.php', + 'Services_JSON_Error' => 'includes/api/ApiFormatJson_json.php', + 'Spyc' => 'includes/api/ApiFormatYaml_spyc.php', + 'UsageException' => 'includes/api/ApiMain.php', + 'YAMLNode' => 'includes/api/ApiFormatYaml_spyc.php', + + # includes/db + 'Blob' => 'includes/db/Database.php', + 'ChronologyProtector' => 'includes/db/LBFactory.php', + 'Database' => 'includes/db/Database.php', + 'DatabaseMssql' => 'includes/db/DatabaseMssql.php', + 'DatabaseMysql' => 'includes/db/Database.php', + 'DatabaseOracle' => 'includes/db/DatabaseOracle.php', + 'DatabasePostgres' => 'includes/db/DatabasePostgres.php', + 'DatabaseSqlite' => 'includes/db/DatabaseSqlite.php', + 'DBConnectionError' => 'includes/db/Database.php', + 'DBError' => 'includes/db/Database.php', + 'DBObject' => 'includes/db/Database.php', + 'DBQueryError' => 'includes/db/Database.php', + 'DBUnexpectedError' => 'includes/db/Database.php', + 'LBFactory' => 'includes/db/LBFactory.php', + 'LBFactory_Multi' => 'includes/db/LBFactory_Multi.php', + 'LBFactory_Simple' => 'includes/db/LBFactory.php', + 'LoadBalancer' => 'includes/db/LoadBalancer.php', + 'MSSQLField' => 'includes/db/DatabaseMssql.php', + 'MySQLField' => 'includes/db/Database.php', + 'MySQLMasterPos' => 'includes/db/Database.php', + 'ORABlob' => 'includes/db/DatabaseOracle.php', + 'ORAResult' => 'includes/db/DatabaseOracle.php', + 'PostgresField' => 'includes/db/DatabasePostgres.php', + 'ResultWrapper' => 'includes/db/Database.php', + 'SQLiteField' => 'includes/db/DatabaseSqlite.php', + + # includes/filerepo + 'ArchivedFile' => 'includes/filerepo/ArchivedFile.php', + 'File' => 'includes/filerepo/File.php', + 'FileRepo' => 'includes/filerepo/FileRepo.php', + 'FileRepoStatus' => 'includes/filerepo/FileRepoStatus.php', + 'ForeignAPIFile' => 'includes/filerepo/ForeignAPIFile.php', + 'ForeignAPIRepo' => 'includes/filerepo/ForeignAPIRepo.php', + 'ForeignDBFile' => 'includes/filerepo/ForeignDBFile.php', + 'ForeignDBRepo' => 'includes/filerepo/ForeignDBRepo.php', + 'ForeignDBViaLBRepo' => 'includes/filerepo/ForeignDBViaLBRepo.php', + 'FSRepo' => 'includes/filerepo/FSRepo.php', + 'Image' => 'includes/filerepo/Image.php', + 'LocalFile' => 'includes/filerepo/LocalFile.php', + 'LocalFileDeleteBatch' => 'includes/filerepo/LocalFile.php', + 'LocalFileMoveBatch' => 'includes/filerepo/LocalFile.php', + 'LocalFileRestoreBatch' => 'includes/filerepo/LocalFile.php', + 'LocalRepo' => 'includes/filerepo/LocalRepo.php', + 'OldLocalFile' => 'includes/filerepo/OldLocalFile.php', + 'RepoGroup' => 'includes/filerepo/RepoGroup.php', + 'UnregisteredLocalFile' => 'includes/filerepo/UnregisteredLocalFile.php', + + # includes/media + 'BitmapHandler' => 'includes/media/Bitmap.php', + 'BmpHandler' => 'includes/media/BMP.php', + 'DjVuHandler' => 'includes/media/DjVu.php', + 'ImageHandler' => 'includes/media/Generic.php', + 'MediaHandler' => 'includes/media/Generic.php', + 'SvgHandler' => 'includes/media/SVG.php', + + # includes/normal + 'UtfNormal' => 'includes/normal/UtfNormal.php', + + # includes/parser + 'CoreParserFunctions' => 'includes/parser/CoreParserFunctions.php', + 'DateFormatter' => 'includes/parser/DateFormatter.php', + 'OnlyIncludeReplacer' => 'includes/parser/Parser.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', + 'Parser_OldPP' => 'includes/parser/Parser_OldPP.php', + 'Preprocessor' => 'includes/parser/Preprocessor.php', + 'Preprocessor_DOM' => 'includes/parser/Preprocessor_DOM.php', + 'Preprocessor_Hash' => 'includes/parser/Preprocessor_Hash.php', + 'StripState' => 'includes/parser/Parser.php', + + # includes/specials + 'AncientPagesPage' => 'includes/specials/Ancientpages.php', + 'BrokenRedirectsPage' => 'includes/specials/BrokenRedirects.php', + 'ContribsPager' => 'includes/specials/Contributions.php', + 'DBLockForm' => 'includes/specials/Lockdb.php', + 'DBUnlockForm' => 'includes/specials/Unlockdb.php', + 'DeadendPagesPage' => 'includes/specials/Deadendpages.php', + 'DisambiguationsPage' => 'includes/specials/Disambiguations.php', + 'DoubleRedirectsPage' => 'includes/specials/DoubleRedirects.php', + 'EmailConfirmation' => 'includes/specials/Confirmemail.php', + 'EmailInvalidation' => 'includes/specials/Confirmemail.php', + 'EmailUserForm' => 'includes/specials/Emailuser.php', + 'FewestrevisionsPage' => 'includes/specials/Fewestrevisions.php', + 'FileDuplicateSearchPage' => 'includes/specials/FileDuplicateSearch.php', + 'IPBlockForm' => 'includes/specials/Blockip.php', + 'IPBlocklistPager' => 'includes/specials/Ipblocklist.php', + 'IPUnblockForm' => 'includes/specials/Ipblocklist.php', + 'ImportReporter' => 'includes/specials/Import.php', + 'ImportStreamSource' => 'includes/specials/Import.php', + 'ImportStringSource' => 'includes/specials/Import.php', + 'ListredirectsPage' => 'includes/specials/Listredirects.php', + 'LoginForm' => 'includes/specials/Userlogin.php', + 'LonelyPagesPage' => 'includes/specials/Lonelypages.php', + 'LongPagesPage' => 'includes/specials/Longpages.php', + 'MIMEsearchPage' => 'includes/specials/MIMEsearch.php', + 'MostcategoriesPage' => 'includes/specials/Mostcategories.php', + 'MostimagesPage' => 'includes/specials/Mostimages.php', + 'MostlinkedCategoriesPage' => 'includes/specials/Mostlinkedcategories.php', + 'MostlinkedPage' => 'includes/specials/Mostlinked.php', + 'MostrevisionsPage' => 'includes/specials/Mostrevisions.php', + 'MovePageForm' => 'includes/specials/Movepage.php', + 'NewPagesForm' => 'includes/specials/Newpages.php', + 'NewPagesPager' => 'includes/specials/Newpages.php', + 'PageArchive' => 'includes/specials/Undelete.php', + 'PasswordResetForm' => 'includes/specials/Resetpass.php', + 'PopularPagesPage' => 'includes/specials/Popularpages.php', + 'PreferencesForm' => 'includes/specials/Preferences.php', + 'RandomPage' => 'includes/specials/Randompage.php', + 'RevisionDeleteForm' => 'includes/specials/Revisiondelete.php', + 'RevisionDeleter' => 'includes/specials/Revisiondelete.php', + 'ShortPagesPage' => 'includes/specials/Shortpages.php', + 'SpecialAllpages' => 'includes/specials/Allpages.php', + 'SpecialBookSources' => 'includes/specials/Booksources.php', + 'SpecialListGroupRights' => 'includes/specials/Listgrouprights.php', + 'SpecialMostlinkedtemplates' => 'includes/specials/Mostlinkedtemplates.php', + 'SpecialPrefixindex' => 'includes/specials/Prefixindex.php', + 'SpecialRandomredirect' => 'includes/specials/Randomredirect.php', + 'SpecialSearch' => 'includes/specials/Search.php', + 'SpecialVersion' => 'includes/specials/Version.php', + 'UncategorizedCategoriesPage' => 'includes/specials/Uncategorizedcategories.php', + 'UncategorizedPagesPage' => 'includes/specials/Uncategorizedpages.php', + 'UncategorizedTemplatesPage' => 'includes/specials/Uncategorizedtemplates.php', + 'UndeleteForm' => 'includes/specials/Undelete.php', + 'UnusedCategoriesPage' => 'includes/specials/Unusedcategories.php', + 'UnusedimagesPage' => 'includes/specials/Unusedimages.php', + 'UnusedtemplatesPage' => 'includes/specials/Unusedtemplates.php', + 'UnwatchedpagesPage' => 'includes/specials/Unwatchedpages.php', + 'UploadForm' => 'includes/specials/Upload.php', + 'UploadFormMogile' => 'includes/specials/UploadMogile.php', + 'UserrightsPage' => 'includes/specials/Userrights.php', + 'UsersPager' => 'includes/specials/Listusers.php', + 'WantedCategoriesPage' => 'includes/specials/Wantedcategories.php', + 'WantedPagesPage' => 'includes/specials/Wantedpages.php', + 'WhatLinksHerePage' => 'includes/specials/Whatlinkshere.php', + 'WikiImporter' => 'includes/specials/Import.php', + 'WikiRevision' => 'includes/specials/Import.php', + 'WithoutInterwikiPage' => 'includes/specials/Withoutinterwiki.php', + + # includes/templates + 'UsercreateTemplate' => 'includes/templates/Userlogin.php', + 'UserloginTemplate' => 'includes/templates/Userlogin.php', + + # languages + 'Language' => 'languages/Language.php', + 'FakeConverter' => 'languages/Language.php', + ); - wfProfileIn( __METHOD__ ); - if ( isset( $localClasses[$className] ) ) { - $filename = $localClasses[$className]; - } elseif ( isset( $wgAutoloadClasses[$className] ) ) { - $filename = $wgAutoloadClasses[$className]; - } else { - # Try a different capitalisation - # The case can sometimes be wrong when unserializing PHP 4 objects - $filename = false; - $lowerClass = strtolower( $className ); - foreach ( $localClasses as $class2 => $file2 ) { - if ( strtolower( $class2 ) == $lowerClass ) { - $filename = $file2; + static function autoload( $className ) { + global $wgAutoloadClasses; + + wfProfileIn( __METHOD__ ); + if ( isset( self::$localClasses[$className] ) ) { + $filename = self::$localClasses[$className]; + } elseif ( isset( $wgAutoloadClasses[$className] ) ) { + $filename = $wgAutoloadClasses[$className]; + } else { + # Try a different capitalisation + # The case can sometimes be wrong when unserializing PHP 4 objects + $filename = false; + $lowerClass = strtolower( $className ); + foreach ( self::$localClasses as $class2 => $file2 ) { + if ( strtolower( $class2 ) == $lowerClass ) { + $filename = $file2; + } + } + if ( !$filename ) { + # Give up + wfProfileOut( __METHOD__ ); + return; } } - if ( !$filename ) { - # Give up - wfProfileOut( __METHOD__ ); - 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 ); + wfProfileOut( __METHOD__ ); } - # 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"; + static function loadAllExtensions() { + global $wgAutoloadClasses; + + # It is crucial that SpecialPage.php is included before any special page + # extensions are loaded. Otherwise the parent class will not be available + # when APC loads the early-bound extension class. Normally this is + # guaranteed by entering special pages via SpecialPage members such as + # executePath(), but here we have to take a more explicit measure. + + require_once( dirname(__FILE__) . '/SpecialPage.php' ); + + foreach( $wgAutoloadClasses as $class => $file ) { + if( !( class_exists( $class ) || interface_exists( $class ) ) ) { + require( $file ); + } + } } - require( $filename ); - wfProfileOut( __METHOD__ ); } function wfLoadAllExtensions() { - global $wgAutoloadClasses; - - # It is crucial that SpecialPage.php is included before any special page - # extensions are loaded. Otherwise the parent class will not be available - # when APC loads the early-bound extension class. Normally this is - # guaranteed by entering special pages via SpecialPage members such as - # executePath(), but here we have to take a more explicit measure. - - require_once( dirname(__FILE__) . '/SpecialPage.php' ); + AutoLoader::loadAllExtensions(); +} - foreach( $wgAutoloadClasses as $class => $file ) { - if( !( class_exists( $class ) || interface_exists( $class ) ) ) { - require( $file ); - } +if ( function_exists( 'spl_autoload_register' ) ) { + spl_autoload_register( array( 'AutoLoader', 'autoload' ) ); +} else { + function __autoload( $class ) { + AutoLoader::autoload( $class ); } } + diff --git a/includes/Setup.php b/includes/Setup.php index 2ed4a41190..c5d3f1b345 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -58,7 +58,6 @@ if ( empty( $wgFileStore['deleted']['directory'] ) ) { $wgFileStore['deleted']['directory'] = "{$wgUploadDirectory}/deleted"; } - /** * Initialise $wgLocalFileRepo from backwards-compatible settings */ @@ -115,7 +114,9 @@ if ( $wgUseSharedUploads ) { } } -require_once( "$IP/includes/AutoLoader.php" ); +if ( !class_exists( 'AutoLoader' ) ) { + require_once( "$IP/includes/AutoLoader.php" ); +} wfProfileIn( $fname.'-exception' ); require_once( "$IP/includes/Exception.php" ); diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index fe41c421c7..7b8748ee11 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -642,7 +642,7 @@ class SpecialPage $this->mFunction = $function; } if ( $file === 'default' ) { - $this->mFile = dirname(__FILE__) . "/Special{$name}.php"; + $this->mFile = dirname(__FILE__) . "/specials/$name.php"; } else { $this->mFile = $file; } diff --git a/includes/WebStart.php b/includes/WebStart.php index 2154eba07c..411c211c68 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -69,29 +69,32 @@ define( 'MEDIAWIKI', true ); # Makes it possible to for example to have effective exclude path in apc. # Also doesn't break installations using symlinked includes, like # dirname( __FILE__ ) would do. -$preIP = realpath( '.' ); +$IP = getenv( 'MW_INSTALL_PATH' ); +if ( $IP === false ) { + $IP = realpath( '.' ); +} # Start profiler -require_once( "$preIP/StartProfiler.php" ); +require_once( "$IP/StartProfiler.php" ); wfProfileIn( 'WebStart.php-conf' ); # Load up some global defines. -require_once( "$preIP/includes/Defines.php" ); +require_once( "$IP/includes/Defines.php" ); # LocalSettings.php is the per site customization file. If it does not exit # the wiki installer need to be launched or the generated file moved from # ./config/ to ./ -if( !file_exists( "$preIP/LocalSettings.php" ) ) { - # DefaultSettings assumes $IP is defined, like it usually is when included - # in LocalSettings. But in this case we need to provide the default one. - $IP = $preIP; - require_once( "$preIP/includes/DefaultSettings.php" ); # used for printing the version - require_once( "$preIP/includes/templates/NoLocalSettings.php" ); +if( !file_exists( "$IP/LocalSettings.php" ) ) { + require_once( "$IP/includes/DefaultSettings.php" ); # used for printing the version + require_once( "$IP/includes/templates/NoLocalSettings.php" ); die(); } -# Include site settings. Most importantly, $IP should be available after this. -require_once( "$preIP/LocalSettings.php" ); +# Start the autoloader, so that extensions can derive classes from core files +require_once( "$IP/includes/AutoLoader.php" ); + +# Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked) +require_once( "$IP/LocalSettings.php" ); wfProfileOut( 'WebStart.php-conf' ); wfProfileIn( 'WebStart.php-ob_start' ); diff --git a/includes/Database.php b/includes/db/Database.php similarity index 100% rename from includes/Database.php rename to includes/db/Database.php diff --git a/includes/DatabaseMssql.php b/includes/db/DatabaseMssql.php similarity index 100% rename from includes/DatabaseMssql.php rename to includes/db/DatabaseMssql.php diff --git a/includes/DatabaseOracle.php b/includes/db/DatabaseOracle.php similarity index 100% rename from includes/DatabaseOracle.php rename to includes/db/DatabaseOracle.php diff --git a/includes/DatabasePostgres.php b/includes/db/DatabasePostgres.php similarity index 100% rename from includes/DatabasePostgres.php rename to includes/db/DatabasePostgres.php diff --git a/includes/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php similarity index 100% rename from includes/DatabaseSqlite.php rename to includes/db/DatabaseSqlite.php diff --git a/includes/LBFactory.php b/includes/db/LBFactory.php similarity index 100% rename from includes/LBFactory.php rename to includes/db/LBFactory.php diff --git a/includes/LBFactory_Multi.php b/includes/db/LBFactory_Multi.php similarity index 100% rename from includes/LBFactory_Multi.php rename to includes/db/LBFactory_Multi.php diff --git a/includes/LoadBalancer.php b/includes/db/LoadBalancer.php similarity index 100% rename from includes/LoadBalancer.php rename to includes/db/LoadBalancer.php diff --git a/includes/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php similarity index 100% rename from includes/CoreParserFunctions.php rename to includes/parser/CoreParserFunctions.php diff --git a/includes/DateFormatter.php b/includes/parser/DateFormatter.php similarity index 100% rename from includes/DateFormatter.php rename to includes/parser/DateFormatter.php diff --git a/includes/Parser.php b/includes/parser/Parser.php similarity index 100% rename from includes/Parser.php rename to includes/parser/Parser.php diff --git a/includes/ParserCache.php b/includes/parser/ParserCache.php similarity index 100% rename from includes/ParserCache.php rename to includes/parser/ParserCache.php diff --git a/includes/ParserOptions.php b/includes/parser/ParserOptions.php similarity index 100% rename from includes/ParserOptions.php rename to includes/parser/ParserOptions.php diff --git a/includes/ParserOutput.php b/includes/parser/ParserOutput.php similarity index 100% rename from includes/ParserOutput.php rename to includes/parser/ParserOutput.php diff --git a/includes/Parser_DiffTest.php b/includes/parser/Parser_DiffTest.php similarity index 100% rename from includes/Parser_DiffTest.php rename to includes/parser/Parser_DiffTest.php diff --git a/includes/Parser_OldPP.php b/includes/parser/Parser_OldPP.php similarity index 100% rename from includes/Parser_OldPP.php rename to includes/parser/Parser_OldPP.php diff --git a/includes/Preprocessor.php b/includes/parser/Preprocessor.php similarity index 100% rename from includes/Preprocessor.php rename to includes/parser/Preprocessor.php diff --git a/includes/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php similarity index 100% rename from includes/Preprocessor_DOM.php rename to includes/parser/Preprocessor_DOM.php diff --git a/includes/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php similarity index 100% rename from includes/Preprocessor_Hash.php rename to includes/parser/Preprocessor_Hash.php diff --git a/includes/SpecialAllmessages.php b/includes/specials/Allmessages.php similarity index 100% rename from includes/SpecialAllmessages.php rename to includes/specials/Allmessages.php diff --git a/includes/SpecialAllpages.php b/includes/specials/Allpages.php similarity index 100% rename from includes/SpecialAllpages.php rename to includes/specials/Allpages.php diff --git a/includes/SpecialAncientpages.php b/includes/specials/Ancientpages.php similarity index 100% rename from includes/SpecialAncientpages.php rename to includes/specials/Ancientpages.php diff --git a/includes/SpecialBlockip.php b/includes/specials/Blockip.php similarity index 100% rename from includes/SpecialBlockip.php rename to includes/specials/Blockip.php diff --git a/includes/SpecialBlockme.php b/includes/specials/Blockme.php similarity index 100% rename from includes/SpecialBlockme.php rename to includes/specials/Blockme.php diff --git a/includes/SpecialBooksources.php b/includes/specials/Booksources.php similarity index 100% rename from includes/SpecialBooksources.php rename to includes/specials/Booksources.php diff --git a/includes/SpecialBrokenRedirects.php b/includes/specials/BrokenRedirects.php similarity index 100% rename from includes/SpecialBrokenRedirects.php rename to includes/specials/BrokenRedirects.php diff --git a/includes/SpecialCategories.php b/includes/specials/Categories.php similarity index 100% rename from includes/SpecialCategories.php rename to includes/specials/Categories.php diff --git a/includes/SpecialConfirmemail.php b/includes/specials/Confirmemail.php similarity index 100% rename from includes/SpecialConfirmemail.php rename to includes/specials/Confirmemail.php diff --git a/includes/SpecialContributions.php b/includes/specials/Contributions.php similarity index 100% rename from includes/SpecialContributions.php rename to includes/specials/Contributions.php diff --git a/includes/SpecialDeadendpages.php b/includes/specials/Deadendpages.php similarity index 100% rename from includes/SpecialDeadendpages.php rename to includes/specials/Deadendpages.php diff --git a/includes/SpecialDisambiguations.php b/includes/specials/Disambiguations.php similarity index 100% rename from includes/SpecialDisambiguations.php rename to includes/specials/Disambiguations.php diff --git a/includes/SpecialDoubleRedirects.php b/includes/specials/DoubleRedirects.php similarity index 100% rename from includes/SpecialDoubleRedirects.php rename to includes/specials/DoubleRedirects.php diff --git a/includes/SpecialEmailuser.php b/includes/specials/Emailuser.php similarity index 100% rename from includes/SpecialEmailuser.php rename to includes/specials/Emailuser.php diff --git a/includes/SpecialExport.php b/includes/specials/Export.php similarity index 100% rename from includes/SpecialExport.php rename to includes/specials/Export.php diff --git a/includes/SpecialFewestrevisions.php b/includes/specials/Fewestrevisions.php similarity index 100% rename from includes/SpecialFewestrevisions.php rename to includes/specials/Fewestrevisions.php diff --git a/includes/SpecialFileDuplicateSearch.php b/includes/specials/FileDuplicateSearch.php similarity index 100% rename from includes/SpecialFileDuplicateSearch.php rename to includes/specials/FileDuplicateSearch.php diff --git a/includes/SpecialFilepath.php b/includes/specials/Filepath.php similarity index 100% rename from includes/SpecialFilepath.php rename to includes/specials/Filepath.php diff --git a/includes/SpecialImagelist.php b/includes/specials/Imagelist.php similarity index 100% rename from includes/SpecialImagelist.php rename to includes/specials/Imagelist.php diff --git a/includes/SpecialImport.php b/includes/specials/Import.php similarity index 100% rename from includes/SpecialImport.php rename to includes/specials/Import.php diff --git a/includes/SpecialIpblocklist.php b/includes/specials/Ipblocklist.php similarity index 100% rename from includes/SpecialIpblocklist.php rename to includes/specials/Ipblocklist.php diff --git a/includes/SpecialListgrouprights.php b/includes/specials/Listgrouprights.php similarity index 100% rename from includes/SpecialListgrouprights.php rename to includes/specials/Listgrouprights.php diff --git a/includes/SpecialListredirects.php b/includes/specials/Listredirects.php similarity index 100% rename from includes/SpecialListredirects.php rename to includes/specials/Listredirects.php diff --git a/includes/SpecialListusers.php b/includes/specials/Listusers.php similarity index 100% rename from includes/SpecialListusers.php rename to includes/specials/Listusers.php diff --git a/includes/SpecialLockdb.php b/includes/specials/Lockdb.php similarity index 100% rename from includes/SpecialLockdb.php rename to includes/specials/Lockdb.php diff --git a/includes/SpecialLog.php b/includes/specials/Log.php similarity index 100% rename from includes/SpecialLog.php rename to includes/specials/Log.php diff --git a/includes/SpecialLonelypages.php b/includes/specials/Lonelypages.php similarity index 100% rename from includes/SpecialLonelypages.php rename to includes/specials/Lonelypages.php diff --git a/includes/SpecialLongpages.php b/includes/specials/Longpages.php similarity index 100% rename from includes/SpecialLongpages.php rename to includes/specials/Longpages.php diff --git a/includes/SpecialMIMEsearch.php b/includes/specials/MIMEsearch.php similarity index 100% rename from includes/SpecialMIMEsearch.php rename to includes/specials/MIMEsearch.php diff --git a/includes/SpecialMergeHistory.php b/includes/specials/MergeHistory.php similarity index 100% rename from includes/SpecialMergeHistory.php rename to includes/specials/MergeHistory.php diff --git a/includes/SpecialMissingFiles.php b/includes/specials/MissingFiles.php similarity index 100% rename from includes/SpecialMissingFiles.php rename to includes/specials/MissingFiles.php diff --git a/includes/SpecialMostcategories.php b/includes/specials/Mostcategories.php similarity index 100% rename from includes/SpecialMostcategories.php rename to includes/specials/Mostcategories.php diff --git a/includes/SpecialMostimages.php b/includes/specials/Mostimages.php similarity index 100% rename from includes/SpecialMostimages.php rename to includes/specials/Mostimages.php diff --git a/includes/SpecialMostlinked.php b/includes/specials/Mostlinked.php similarity index 100% rename from includes/SpecialMostlinked.php rename to includes/specials/Mostlinked.php diff --git a/includes/SpecialMostlinkedcategories.php b/includes/specials/Mostlinkedcategories.php similarity index 100% rename from includes/SpecialMostlinkedcategories.php rename to includes/specials/Mostlinkedcategories.php diff --git a/includes/SpecialMostlinkedtemplates.php b/includes/specials/Mostlinkedtemplates.php similarity index 100% rename from includes/SpecialMostlinkedtemplates.php rename to includes/specials/Mostlinkedtemplates.php diff --git a/includes/SpecialMostrevisions.php b/includes/specials/Mostrevisions.php similarity index 100% rename from includes/SpecialMostrevisions.php rename to includes/specials/Mostrevisions.php diff --git a/includes/SpecialMovepage.php b/includes/specials/Movepage.php similarity index 100% rename from includes/SpecialMovepage.php rename to includes/specials/Movepage.php diff --git a/includes/SpecialNewimages.php b/includes/specials/Newimages.php similarity index 100% rename from includes/SpecialNewimages.php rename to includes/specials/Newimages.php diff --git a/includes/SpecialNewpages.php b/includes/specials/Newpages.php similarity index 100% rename from includes/SpecialNewpages.php rename to includes/specials/Newpages.php diff --git a/includes/SpecialPopularpages.php b/includes/specials/Popularpages.php similarity index 100% rename from includes/SpecialPopularpages.php rename to includes/specials/Popularpages.php diff --git a/includes/SpecialPreferences.php b/includes/specials/Preferences.php similarity index 100% rename from includes/SpecialPreferences.php rename to includes/specials/Preferences.php diff --git a/includes/SpecialPrefixindex.php b/includes/specials/Prefixindex.php similarity index 100% rename from includes/SpecialPrefixindex.php rename to includes/specials/Prefixindex.php diff --git a/includes/SpecialProtectedpages.php b/includes/specials/Protectedpages.php similarity index 100% rename from includes/SpecialProtectedpages.php rename to includes/specials/Protectedpages.php diff --git a/includes/SpecialProtectedtitles.php b/includes/specials/Protectedtitles.php similarity index 100% rename from includes/SpecialProtectedtitles.php rename to includes/specials/Protectedtitles.php diff --git a/includes/SpecialRandompage.php b/includes/specials/Randompage.php similarity index 100% rename from includes/SpecialRandompage.php rename to includes/specials/Randompage.php diff --git a/includes/SpecialRandomredirect.php b/includes/specials/Randomredirect.php similarity index 100% rename from includes/SpecialRandomredirect.php rename to includes/specials/Randomredirect.php diff --git a/includes/SpecialRecentchanges.php b/includes/specials/Recentchanges.php similarity index 100% rename from includes/SpecialRecentchanges.php rename to includes/specials/Recentchanges.php diff --git a/includes/SpecialRecentchangeslinked.php b/includes/specials/Recentchangeslinked.php similarity index 100% rename from includes/SpecialRecentchangeslinked.php rename to includes/specials/Recentchangeslinked.php diff --git a/includes/SpecialResetpass.php b/includes/specials/Resetpass.php similarity index 100% rename from includes/SpecialResetpass.php rename to includes/specials/Resetpass.php diff --git a/includes/SpecialRevisiondelete.php b/includes/specials/Revisiondelete.php similarity index 100% rename from includes/SpecialRevisiondelete.php rename to includes/specials/Revisiondelete.php diff --git a/includes/SpecialSearch.php b/includes/specials/Search.php similarity index 100% rename from includes/SpecialSearch.php rename to includes/specials/Search.php diff --git a/includes/SpecialShortpages.php b/includes/specials/Shortpages.php similarity index 100% rename from includes/SpecialShortpages.php rename to includes/specials/Shortpages.php diff --git a/includes/SpecialSpecialpages.php b/includes/specials/Specialpages.php similarity index 100% rename from includes/SpecialSpecialpages.php rename to includes/specials/Specialpages.php diff --git a/includes/SpecialStatistics.php b/includes/specials/Statistics.php similarity index 100% rename from includes/SpecialStatistics.php rename to includes/specials/Statistics.php diff --git a/includes/SpecialUncategorizedcategories.php b/includes/specials/Uncategorizedcategories.php similarity index 89% rename from includes/SpecialUncategorizedcategories.php rename to includes/specials/Uncategorizedcategories.php index a1787123fa..f23e89ce8b 100644 --- a/includes/SpecialUncategorizedcategories.php +++ b/includes/specials/Uncategorizedcategories.php @@ -4,11 +4,6 @@ * @ingroup SpecialPage */ -/** - * - */ -require_once( "SpecialUncategorizedpages.php" ); - /** * implements Special:Uncategorizedcategories * @ingroup SpecialPage diff --git a/includes/SpecialUncategorizedimages.php b/includes/specials/Uncategorizedimages.php similarity index 100% rename from includes/SpecialUncategorizedimages.php rename to includes/specials/Uncategorizedimages.php diff --git a/includes/SpecialUncategorizedpages.php b/includes/specials/Uncategorizedpages.php similarity index 100% rename from includes/SpecialUncategorizedpages.php rename to includes/specials/Uncategorizedpages.php diff --git a/includes/SpecialUncategorizedtemplates.php b/includes/specials/Uncategorizedtemplates.php similarity index 100% rename from includes/SpecialUncategorizedtemplates.php rename to includes/specials/Uncategorizedtemplates.php diff --git a/includes/SpecialUndelete.php b/includes/specials/Undelete.php similarity index 100% rename from includes/SpecialUndelete.php rename to includes/specials/Undelete.php diff --git a/includes/SpecialUnlockdb.php b/includes/specials/Unlockdb.php similarity index 100% rename from includes/SpecialUnlockdb.php rename to includes/specials/Unlockdb.php diff --git a/includes/SpecialUnusedcategories.php b/includes/specials/Unusedcategories.php similarity index 100% rename from includes/SpecialUnusedcategories.php rename to includes/specials/Unusedcategories.php diff --git a/includes/SpecialUnusedimages.php b/includes/specials/Unusedimages.php similarity index 100% rename from includes/SpecialUnusedimages.php rename to includes/specials/Unusedimages.php diff --git a/includes/SpecialUnusedtemplates.php b/includes/specials/Unusedtemplates.php similarity index 100% rename from includes/SpecialUnusedtemplates.php rename to includes/specials/Unusedtemplates.php diff --git a/includes/SpecialUnwatchedpages.php b/includes/specials/Unwatchedpages.php similarity index 100% rename from includes/SpecialUnwatchedpages.php rename to includes/specials/Unwatchedpages.php diff --git a/includes/SpecialUpload.php b/includes/specials/Upload.php similarity index 100% rename from includes/SpecialUpload.php rename to includes/specials/Upload.php diff --git a/includes/SpecialUploadMogile.php b/includes/specials/UploadMogile.php similarity index 100% rename from includes/SpecialUploadMogile.php rename to includes/specials/UploadMogile.php diff --git a/includes/SpecialUserlogin.php b/includes/specials/Userlogin.php similarity index 100% rename from includes/SpecialUserlogin.php rename to includes/specials/Userlogin.php diff --git a/includes/SpecialUserlogout.php b/includes/specials/Userlogout.php similarity index 100% rename from includes/SpecialUserlogout.php rename to includes/specials/Userlogout.php diff --git a/includes/SpecialUserrights.php b/includes/specials/Userrights.php similarity index 100% rename from includes/SpecialUserrights.php rename to includes/specials/Userrights.php diff --git a/includes/SpecialVersion.php b/includes/specials/Version.php similarity index 100% rename from includes/SpecialVersion.php rename to includes/specials/Version.php diff --git a/includes/SpecialWantedcategories.php b/includes/specials/Wantedcategories.php similarity index 100% rename from includes/SpecialWantedcategories.php rename to includes/specials/Wantedcategories.php diff --git a/includes/SpecialWantedpages.php b/includes/specials/Wantedpages.php similarity index 100% rename from includes/SpecialWantedpages.php rename to includes/specials/Wantedpages.php diff --git a/includes/SpecialWatchlist.php b/includes/specials/Watchlist.php similarity index 100% rename from includes/SpecialWatchlist.php rename to includes/specials/Watchlist.php diff --git a/includes/SpecialWhatlinkshere.php b/includes/specials/Whatlinkshere.php similarity index 100% rename from includes/SpecialWhatlinkshere.php rename to includes/specials/Whatlinkshere.php diff --git a/includes/SpecialWithoutinterwiki.php b/includes/specials/Withoutinterwiki.php similarity index 100% rename from includes/SpecialWithoutinterwiki.php rename to includes/specials/Withoutinterwiki.php diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 4c7606d7d3..4a2078c67d 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -6,9 +6,6 @@ */ if( !defined( 'MEDIAWIKI' ) ) die( -1 ); -/** */ -require_once( 'includes/SkinTemplate.php' ); - /** * HTML template for Special:Userlogin form * @ingroup Templates diff --git a/maintenance/checkAutoLoader.php b/maintenance/checkAutoLoader.php new file mode 100644 index 0000000000..c2909ef7e3 --- /dev/null +++ b/maintenance/checkAutoLoader.php @@ -0,0 +1,22 @@ + '$file',\n"; + } elseif ( AutoLoader::$localClasses[$class] !== $file ) { + echo "$class: Wrong file: found in $file, listed in " . AutoLoader::$localClasses[$class] . "\n"; + } + } + +} + + diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index bc75f9ac91..a23bb6eb50 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -116,6 +116,7 @@ if ( file_exists( '/home/wikipedia/common/langlist' ) ) { $wgWikiFarm = true; #$cluster = trim( file_get_contents( '/etc/cluster' ) ); $cluster = 'pmtpa'; + require_once( "$IP/includes/AutoLoader.php" ); require_once( "$IP/includes/SiteConfiguration.php" ); # Get $wgConf @@ -199,6 +200,7 @@ if ( file_exists( '/home/wikipedia/common/langlist' ) ) { } $wgCommandLineMode = true; $DP = $IP; + require_once( "$IP/includes/AutoLoader.php" ); #require_once( $IP.'/includes/ProfilerStub.php' ); require_once( $IP.'/includes/Defines.php' ); require_once( $settingsFile ); -- 2.20.1