2006-06-06 09:50:01 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/* This defines autoloading handler for whole MediaWiki framework */
|
2006-07-02 15:57:59 +00:00
|
|
|
|
|
|
|
|
ini_set('unserialize_callback_func', '__autoload' );
|
|
|
|
|
|
2006-06-25 08:38:17 +00:00
|
|
|
function __autoload($className) {
|
|
|
|
|
global $wgAutoloadClasses;
|
|
|
|
|
|
2007-11-20 10:55:08 +00:00
|
|
|
# Locations of core classes
|
|
|
|
|
# Extension classes are specified with $wgAutoloadClasses
|
2006-06-25 08:38:17 +00:00
|
|
|
static $localClasses = array(
|
2007-04-20 12:31:36 +00:00
|
|
|
# Includes
|
2006-07-01 07:22:59 +00:00
|
|
|
'AjaxDispatcher' => 'includes/AjaxDispatcher.php',
|
|
|
|
|
'AjaxCachePolicy' => 'includes/AjaxFunctions.php',
|
2006-10-05 21:15:03 +00:00
|
|
|
'AjaxResponse' => 'includes/AjaxResponse.php',
|
2007-02-04 15:35:52 +00:00
|
|
|
'AlphabeticPager' => 'includes/Pager.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'Article' => 'includes/Article.php',
|
|
|
|
|
'AuthPlugin' => 'includes/AuthPlugin.php',
|
|
|
|
|
'BagOStuff' => 'includes/BagOStuff.php',
|
|
|
|
|
'HashBagOStuff' => 'includes/BagOStuff.php',
|
|
|
|
|
'SqlBagOStuff' => 'includes/BagOStuff.php',
|
|
|
|
|
'MediaWikiBagOStuff' => 'includes/BagOStuff.php',
|
|
|
|
|
'TurckBagOStuff' => 'includes/BagOStuff.php',
|
|
|
|
|
'APCBagOStuff' => 'includes/BagOStuff.php',
|
|
|
|
|
'eAccelBagOStuff' => 'includes/BagOStuff.php',
|
2007-06-08 15:56:32 +00:00
|
|
|
'XCacheBagOStuff' => 'includes/BagOStuff.php',
|
2006-10-03 13:00:52 +00:00
|
|
|
'DBABagOStuff' => 'includes/BagOStuff.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'Block' => 'includes/Block.php',
|
2006-10-11 08:25:26 +00:00
|
|
|
'HTMLFileCache' => 'includes/HTMLFileCache.php',
|
2006-10-14 10:27:41 +00:00
|
|
|
'DependencyWrapper' => 'includes/CacheDependency.php',
|
|
|
|
|
'FileDependency' => 'includes/CacheDependency.php',
|
|
|
|
|
'TitleDependency' => 'includes/CacheDependency.php',
|
|
|
|
|
'TitleListDependency' => 'includes/CacheDependency.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'CategoryPage' => 'includes/CategoryPage.php',
|
2006-08-25 07:33:55 +00:00
|
|
|
'CategoryViewer' => 'includes/CategoryPage.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'Categoryfinder' => 'includes/Categoryfinder.php',
|
|
|
|
|
'RCCacheEntry' => 'includes/ChangesList.php',
|
|
|
|
|
'ChangesList' => 'includes/ChangesList.php',
|
|
|
|
|
'OldChangesList' => 'includes/ChangesList.php',
|
|
|
|
|
'EnhancedChangesList' => 'includes/ChangesList.php',
|
2006-07-03 11:07:00 +00:00
|
|
|
'CoreParserFunctions' => 'includes/CoreParserFunctions.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'DBObject' => 'includes/Database.php',
|
|
|
|
|
'Database' => 'includes/Database.php',
|
|
|
|
|
'DatabaseMysql' => 'includes/Database.php',
|
|
|
|
|
'ResultWrapper' => 'includes/Database.php',
|
|
|
|
|
'DatabasePostgres' => 'includes/DatabasePostgres.php',
|
2007-03-11 03:59:37 +00:00
|
|
|
'DatabaseOracle' => 'includes/DatabaseOracle.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'DateFormatter' => 'includes/DateFormatter.php',
|
|
|
|
|
'DifferenceEngine' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'_DiffOp' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'_DiffOp_Copy' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'_DiffOp_Delete' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'_DiffOp_Add' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'_DiffOp_Change' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'_DiffEngine' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'Diff' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'MappedDiff' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'DiffFormatter' => 'includes/DifferenceEngine.php',
|
2007-11-27 21:36:43 +00:00
|
|
|
'UnifiedDiffFormatter' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'ArrayDiffFormatter' => 'includes/DifferenceEngine.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'DjVuImage' => 'includes/DjVuImage.php',
|
|
|
|
|
'_HWLDF_WordAccumulator' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'WordLevelDiff' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'TableDiffFormatter' => 'includes/DifferenceEngine.php',
|
|
|
|
|
'EditPage' => 'includes/EditPage.php',
|
|
|
|
|
'MWException' => 'includes/Exception.php',
|
|
|
|
|
'Exif' => 'includes/Exif.php',
|
|
|
|
|
'FormatExif' => 'includes/Exif.php',
|
|
|
|
|
'WikiExporter' => 'includes/Export.php',
|
|
|
|
|
'XmlDumpWriter' => 'includes/Export.php',
|
|
|
|
|
'DumpOutput' => 'includes/Export.php',
|
|
|
|
|
'DumpFileOutput' => 'includes/Export.php',
|
|
|
|
|
'DumpPipeOutput' => 'includes/Export.php',
|
|
|
|
|
'DumpGZipOutput' => 'includes/Export.php',
|
|
|
|
|
'DumpBZip2Output' => 'includes/Export.php',
|
|
|
|
|
'Dump7ZipOutput' => 'includes/Export.php',
|
|
|
|
|
'DumpFilter' => 'includes/Export.php',
|
|
|
|
|
'DumpNotalkFilter' => 'includes/Export.php',
|
|
|
|
|
'DumpNamespaceFilter' => 'includes/Export.php',
|
|
|
|
|
'DumpLatestFilter' => 'includes/Export.php',
|
|
|
|
|
'DumpMultiWriter' => 'includes/Export.php',
|
|
|
|
|
'ExternalEdit' => 'includes/ExternalEdit.php',
|
|
|
|
|
'ExternalStore' => 'includes/ExternalStore.php',
|
|
|
|
|
'ExternalStoreDB' => 'includes/ExternalStoreDB.php',
|
|
|
|
|
'ExternalStoreHttp' => 'includes/ExternalStoreHttp.php',
|
|
|
|
|
'FakeTitle' => 'includes/FakeTitle.php',
|
|
|
|
|
'FeedItem' => 'includes/Feed.php',
|
|
|
|
|
'ChannelFeed' => 'includes/Feed.php',
|
|
|
|
|
'RSSFeed' => 'includes/Feed.php',
|
|
|
|
|
'AtomFeed' => 'includes/Feed.php',
|
|
|
|
|
'FileStore' => 'includes/FileStore.php',
|
|
|
|
|
'FSException' => 'includes/FileStore.php',
|
|
|
|
|
'FSTransaction' => 'includes/FileStore.php',
|
|
|
|
|
'HTMLForm' => 'includes/HTMLForm.php',
|
|
|
|
|
'HistoryBlob' => 'includes/HistoryBlob.php',
|
|
|
|
|
'ConcatenatedGzipHistoryBlob' => 'includes/HistoryBlob.php',
|
|
|
|
|
'HistoryBlobStub' => 'includes/HistoryBlob.php',
|
|
|
|
|
'HistoryBlobCurStub' => 'includes/HistoryBlob.php',
|
|
|
|
|
'HTMLCacheUpdate' => 'includes/HTMLCacheUpdate.php',
|
2006-07-02 15:57:59 +00:00
|
|
|
'Http' => 'includes/HttpFunctions.php',
|
2006-07-12 18:33:21 +00:00
|
|
|
'IP' => 'includes/IP.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'ImageGallery' => 'includes/ImageGallery.php',
|
|
|
|
|
'ImagePage' => 'includes/ImagePage.php',
|
|
|
|
|
'ImageHistoryList' => 'includes/ImagePage.php',
|
2007-08-17 20:53:17 +00:00
|
|
|
'FileDeleteForm' => 'includes/FileDeleteForm.php',
|
2007-07-29 22:00:46 +00:00
|
|
|
'FileRevertForm' => 'includes/FileRevertForm.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'Job' => 'includes/JobQueue.php',
|
2007-06-21 19:11:24 +00:00
|
|
|
'EmaillingJob' => 'includes/EmaillingJob.php',
|
|
|
|
|
'EnotifNotifyJob' => 'includes/EnotifNotifyJob.php',
|
|
|
|
|
'HTMLCacheUpdateJob' => 'includes/HTMLCacheUpdate.php',
|
|
|
|
|
'RefreshLinksJob' => 'includes/RefreshLinksJob.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'Licenses' => 'includes/Licenses.php',
|
|
|
|
|
'License' => 'includes/Licenses.php',
|
|
|
|
|
'LinkBatch' => 'includes/LinkBatch.php',
|
|
|
|
|
'LinkCache' => 'includes/LinkCache.php',
|
|
|
|
|
'LinkFilter' => 'includes/LinkFilter.php',
|
|
|
|
|
'Linker' => 'includes/Linker.php',
|
|
|
|
|
'LinksUpdate' => 'includes/LinksUpdate.php',
|
|
|
|
|
'LoadBalancer' => 'includes/LoadBalancer.php',
|
|
|
|
|
'LogPage' => 'includes/LogPage.php',
|
|
|
|
|
'MacBinary' => 'includes/MacBinary.php',
|
|
|
|
|
'MagicWord' => 'includes/MagicWord.php',
|
Basic integrated audio/video support, with Ogg implementation.
* JavaScript video player based loosely on Greg Maxwell's player
* Image page text snippet customisation
* Abstraction of transform parameters in the parser. Introduced Linker::makeImageLink2().
* Made canRender(), mustRender() depend on file, not just on handler. Moved width=0, height=0 checking to ImageHandler::canRender(), since audio streams have width=height=0 but should be rendered.
Also:
* Automatic upgrade for oldimage rows on image page view, allows media handler selection based on oi_*_mime
* oi_*_mime unconditionally referenced, REQUIRES SCHEMA UPGRADE
* Don't destroy file info for missing files on upgrade
* Simple, centralised extension message file handling
* Made MessageCache::loadAllMessages non-static, optimised for repeated-call case due to abuse in User.php
* Support for lightweight parser output hooks, with callback whitelist for security
* Moved Linker::formatSize() to Language, to join the new formatTimePeriod() and formatBitrate()
* Introduced MagicWordArray, regex capture trick requires that magic word IDs DO NOT CONTAIN HYPHENS.
2007-08-15 10:50:09 +00:00
|
|
|
'MagicWordArray' => 'includes/MagicWord.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'MathRenderer' => 'includes/Math.php',
|
2007-04-20 12:31:36 +00:00
|
|
|
'MediaTransformOutput' => 'includes/MediaTransformOutput.php',
|
|
|
|
|
'ThumbnailImage' => 'includes/MediaTransformOutput.php',
|
|
|
|
|
'MediaTransformError' => 'includes/MediaTransformOutput.php',
|
|
|
|
|
'TransformParameterError' => 'includes/MediaTransformOutput.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'MessageCache' => 'includes/MessageCache.php',
|
|
|
|
|
'MimeMagic' => 'includes/MimeMagic.php',
|
|
|
|
|
'Namespace' => 'includes/Namespace.php',
|
|
|
|
|
'FakeMemCachedClient' => 'includes/ObjectCache.php',
|
|
|
|
|
'OutputPage' => 'includes/OutputPage.php',
|
|
|
|
|
'PageHistory' => 'includes/PageHistory.php',
|
2006-07-07 03:28:48 +00:00
|
|
|
'IndexPager' => 'includes/Pager.php',
|
|
|
|
|
'ReverseChronologicalPager' => 'includes/Pager.php',
|
2006-08-13 00:49:32 +00:00
|
|
|
'TablePager' => 'includes/Pager.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'Parser' => 'includes/Parser.php',
|
2007-11-20 10:55:08 +00:00
|
|
|
'Parser_OldPP' => 'includes/Parser_OldPP.php',
|
|
|
|
|
'Parser_DiffTest' => 'includes/Parser_DiffTest.php',
|
|
|
|
|
'ParserCache' => 'includes/ParserCache.php',
|
2007-01-20 12:50:56 +00:00
|
|
|
'ParserOutput' => 'includes/ParserOutput.php',
|
|
|
|
|
'ParserOptions' => 'includes/ParserOptions.php',
|
2007-04-20 12:31:36 +00:00
|
|
|
'PatrolLog' => 'includes/PatrolLog.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'ProfilerSimple' => 'includes/ProfilerSimple.php',
|
|
|
|
|
'ProfilerSimpleUDP' => 'includes/ProfilerSimpleUDP.php',
|
2006-07-14 05:35:31 +00:00
|
|
|
'Profiler' => 'includes/Profiler.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'ProxyTools' => 'includes/ProxyTools.php',
|
|
|
|
|
'ProtectionForm' => 'includes/ProtectionForm.php',
|
|
|
|
|
'QueryPage' => 'includes/QueryPage.php',
|
2007-03-31 23:36:58 +00:00
|
|
|
'PageQueryPage' => 'includes/PageQueryPage.php',
|
2007-03-28 21:01:58 +00:00
|
|
|
'ImageQueryPage' => 'includes/ImageQueryPage.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'RawPage' => 'includes/RawPage.php',
|
|
|
|
|
'RecentChange' => 'includes/RecentChange.php',
|
|
|
|
|
'Revision' => 'includes/Revision.php',
|
|
|
|
|
'Sanitizer' => 'includes/Sanitizer.php',
|
|
|
|
|
'SearchEngine' => 'includes/SearchEngine.php',
|
|
|
|
|
'SearchResultSet' => 'includes/SearchEngine.php',
|
|
|
|
|
'SearchResult' => 'includes/SearchEngine.php',
|
|
|
|
|
'SearchEngineDummy' => 'includes/SearchEngine.php',
|
|
|
|
|
'SearchMySQL' => 'includes/SearchMySQL.php',
|
|
|
|
|
'MySQLSearchResultSet' => 'includes/SearchMySQL.php',
|
|
|
|
|
'SearchMySQL4' => 'includes/SearchMySQL4.php',
|
2006-07-05 03:54:01 +00:00
|
|
|
'SearchPostgres' => 'includes/SearchPostgres.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'SearchUpdate' => 'includes/SearchUpdate.php',
|
|
|
|
|
'SearchUpdateMyISAM' => 'includes/SearchUpdate.php',
|
2007-03-11 04:41:02 +00:00
|
|
|
'SearchOracle' => 'includes/SearchOracle.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'SiteConfiguration' => 'includes/SiteConfiguration.php',
|
2006-11-21 09:53:45 +00:00
|
|
|
'SiteStats' => 'includes/SiteStats.php',
|
|
|
|
|
'SiteStatsUpdate' => 'includes/SiteStats.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'Skin' => 'includes/Skin.php',
|
|
|
|
|
'MediaWiki_I18N' => 'includes/SkinTemplate.php',
|
|
|
|
|
'SkinTemplate' => 'includes/SkinTemplate.php',
|
|
|
|
|
'QuickTemplate' => 'includes/SkinTemplate.php',
|
|
|
|
|
'SpecialAllpages' => 'includes/SpecialAllpages.php',
|
|
|
|
|
'AncientPagesPage' => 'includes/SpecialAncientpages.php',
|
|
|
|
|
'IPBlockForm' => 'includes/SpecialBlockip.php',
|
2006-12-16 19:20:44 +00:00
|
|
|
'SpecialBookSources' => 'includes/SpecialBooksources.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'BrokenRedirectsPage' => 'includes/SpecialBrokenRedirects.php',
|
|
|
|
|
'EmailConfirmation' => 'includes/SpecialConfirmemail.php',
|
2006-12-03 00:05:45 +00:00
|
|
|
'ContributionsPage' => 'includes/SpecialContributions.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'DeadendPagesPage' => 'includes/SpecialDeadendpages.php',
|
|
|
|
|
'DisambiguationsPage' => 'includes/SpecialDisambiguations.php',
|
|
|
|
|
'DoubleRedirectsPage' => 'includes/SpecialDoubleRedirects.php',
|
|
|
|
|
'EmailUserForm' => 'includes/SpecialEmailuser.php',
|
|
|
|
|
'WikiRevision' => 'includes/SpecialImport.php',
|
|
|
|
|
'WikiImporter' => 'includes/SpecialImport.php',
|
|
|
|
|
'ImportStringSource' => 'includes/SpecialImport.php',
|
|
|
|
|
'ImportStreamSource' => 'includes/SpecialImport.php',
|
|
|
|
|
'IPUnblockForm' => 'includes/SpecialIpblocklist.php',
|
|
|
|
|
'ListredirectsPage' => 'includes/SpecialListredirects.php',
|
|
|
|
|
'DBLockForm' => 'includes/SpecialLockdb.php',
|
|
|
|
|
'LogReader' => 'includes/SpecialLog.php',
|
|
|
|
|
'LogViewer' => 'includes/SpecialLog.php',
|
|
|
|
|
'LonelyPagesPage' => 'includes/SpecialLonelypages.php',
|
|
|
|
|
'LongPagesPage' => 'includes/SpecialLongpages.php',
|
|
|
|
|
'MIMEsearchPage' => 'includes/SpecialMIMEsearch.php',
|
|
|
|
|
'MostcategoriesPage' => 'includes/SpecialMostcategories.php',
|
|
|
|
|
'MostimagesPage' => 'includes/SpecialMostimages.php',
|
|
|
|
|
'MostlinkedPage' => 'includes/SpecialMostlinked.php',
|
|
|
|
|
'MostlinkedCategoriesPage' => 'includes/SpecialMostlinkedcategories.php',
|
2007-06-04 21:39:12 +00:00
|
|
|
'SpecialMostlinkedtemplates' => 'includes/SpecialMostlinkedtemplates.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'MostrevisionsPage' => 'includes/SpecialMostrevisions.php',
|
2007-04-08 07:23:15 +00:00
|
|
|
'FewestrevisionsPage' => 'includes/SpecialFewestrevisions.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'MovePageForm' => 'includes/SpecialMovepage.php',
|
2006-12-03 01:59:57 +00:00
|
|
|
'NewbieContributionsPage' => 'includes/SpecialNewbieContributions.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'NewPagesPage' => 'includes/SpecialNewpages.php',
|
|
|
|
|
'SpecialPage' => 'includes/SpecialPage.php',
|
|
|
|
|
'UnlistedSpecialPage' => 'includes/SpecialPage.php',
|
|
|
|
|
'IncludableSpecialPage' => 'includes/SpecialPage.php',
|
|
|
|
|
'PopularPagesPage' => 'includes/SpecialPopularpages.php',
|
|
|
|
|
'PreferencesForm' => 'includes/SpecialPreferences.php',
|
|
|
|
|
'SpecialPrefixindex' => 'includes/SpecialPrefixindex.php',
|
2007-11-11 12:27:40 +00:00
|
|
|
'RandomPage' => 'includes/SpecialRandompage.php',
|
2007-04-20 12:31:36 +00:00
|
|
|
'PasswordResetForm' => 'includes/SpecialResetpass.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'RevisionDeleteForm' => 'includes/SpecialRevisiondelete.php',
|
|
|
|
|
'RevisionDeleter' => 'includes/SpecialRevisiondelete.php',
|
|
|
|
|
'SpecialSearch' => 'includes/SpecialSearch.php',
|
|
|
|
|
'ShortPagesPage' => 'includes/SpecialShortpages.php',
|
|
|
|
|
'UncategorizedCategoriesPage' => 'includes/SpecialUncategorizedcategories.php',
|
|
|
|
|
'UncategorizedPagesPage' => 'includes/SpecialUncategorizedpages.php',
|
2007-06-11 07:04:25 +00:00
|
|
|
'UncategorizedTemplatesPage' => 'includes/SpecialUncategorizedtemplates.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'PageArchive' => 'includes/SpecialUndelete.php',
|
|
|
|
|
'UndeleteForm' => 'includes/SpecialUndelete.php',
|
|
|
|
|
'DBUnlockForm' => 'includes/SpecialUnlockdb.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',
|
|
|
|
|
'LoginForm' => 'includes/SpecialUserlogin.php',
|
|
|
|
|
'UserrightsForm' => 'includes/SpecialUserrights.php',
|
|
|
|
|
'SpecialVersion' => 'includes/SpecialVersion.php',
|
|
|
|
|
'WantedCategoriesPage' => 'includes/SpecialWantedcategories.php',
|
|
|
|
|
'WantedPagesPage' => 'includes/SpecialWantedpages.php',
|
|
|
|
|
'WhatLinksHerePage' => 'includes/SpecialWhatlinkshere.php',
|
2007-03-31 22:54:30 +00:00
|
|
|
'WithoutInterwikiPage' => 'includes/SpecialWithoutinterwiki.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'SquidUpdate' => 'includes/SquidUpdate.php',
|
2006-11-21 09:53:45 +00:00
|
|
|
'ReplacementArray' => 'includes/StringUtils.php',
|
|
|
|
|
'Replacer' => 'includes/StringUtils.php',
|
|
|
|
|
'RegexlikeReplacer' => 'includes/StringUtils.php',
|
|
|
|
|
'DoubleReplacer' => 'includes/StringUtils.php',
|
|
|
|
|
'HashtableReplacer' => 'includes/StringUtils.php',
|
|
|
|
|
'StringUtils' => 'includes/StringUtils.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'Title' => 'includes/Title.php',
|
|
|
|
|
'User' => 'includes/User.php',
|
|
|
|
|
'MailAddress' => 'includes/UserMailer.php',
|
|
|
|
|
'EmailNotification' => 'includes/UserMailer.php',
|
2007-10-03 08:46:17 +00:00
|
|
|
'UserMailer' => 'includes/UserMailer.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'WatchedItem' => 'includes/WatchedItem.php',
|
|
|
|
|
'WebRequest' => 'includes/WebRequest.php',
|
2006-08-12 23:03:53 +00:00
|
|
|
'WebResponse' => 'includes/WebResponse.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'FauxRequest' => 'includes/WebRequest.php',
|
|
|
|
|
'MediaWiki' => 'includes/Wiki.php',
|
|
|
|
|
'WikiError' => 'includes/WikiError.php',
|
|
|
|
|
'WikiErrorMsg' => 'includes/WikiError.php',
|
|
|
|
|
'WikiXmlError' => 'includes/WikiError.php',
|
2006-07-02 15:57:59 +00:00
|
|
|
'Xml' => 'includes/Xml.php',
|
2006-07-01 07:22:59 +00:00
|
|
|
'ZhClient' => 'includes/ZhClient.php',
|
|
|
|
|
'memcached' => 'includes/memcached-client.php',
|
2007-05-05 12:44:55 +00:00
|
|
|
'EmaillingJob' => 'includes/JobQueue.php',
|
2007-07-04 01:52:16 +00:00
|
|
|
'WatchlistEditor' => 'includes/WatchlistEditor.php',
|
2007-04-20 12:31:36 +00:00
|
|
|
|
2007-05-30 21:02:32 +00:00
|
|
|
# filerepo
|
|
|
|
|
'ArchivedFile' => 'includes/filerepo/ArchivedFile.php',
|
|
|
|
|
'File' => 'includes/filerepo/File.php',
|
2007-06-16 02:55:25 +00:00
|
|
|
'FileRepo' => 'includes/filerepo/FileRepo.php',
|
2007-07-22 14:45:12 +00:00
|
|
|
'FileRepoStatus' => 'includes/filerepo/FileRepoStatus.php',
|
2007-05-30 21:02:32 +00:00
|
|
|
'ForeignDBFile' => 'includes/filerepo/ForeignDBFile.php',
|
|
|
|
|
'ForeignDBRepo' => 'includes/filerepo/ForeignDBRepo.php',
|
|
|
|
|
'FSRepo' => 'includes/filerepo/FSRepo.php',
|
|
|
|
|
'Image' => 'includes/filerepo/LocalFile.php',
|
|
|
|
|
'LocalFile' => 'includes/filerepo/LocalFile.php',
|
2007-07-22 14:45:12 +00:00
|
|
|
'LocalFileDeleteBatch' => 'includes/filerepo/LocalFile.php',
|
|
|
|
|
'LocalFileRestoreBatch' => 'includes/filerepo/LocalFile.php',
|
2007-05-30 21:02:32 +00:00
|
|
|
'LocalRepo' => 'includes/filerepo/LocalRepo.php',
|
|
|
|
|
'OldLocalFile' => 'includes/filerepo/OldLocalFile.php',
|
|
|
|
|
'RepoGroup' => 'includes/filerepo/RepoGroup.php',
|
|
|
|
|
'UnregisteredLocalFile' => 'includes/filerepo/UnregisteredLocalFile.php',
|
|
|
|
|
|
2007-04-20 12:31:36 +00:00
|
|
|
# Media
|
|
|
|
|
'BitmapHandler' => 'includes/media/Bitmap.php',
|
2007-04-22 17:34:09 +00:00
|
|
|
'BmpHandler' => 'includes/media/BMP.php',
|
2007-04-20 12:31:36 +00:00
|
|
|
'DjVuHandler' => 'includes/media/DjVu.php',
|
|
|
|
|
'MediaHandler' => 'includes/media/Generic.php',
|
|
|
|
|
'ImageHandler' => 'includes/media/Generic.php',
|
|
|
|
|
'SvgHandler' => 'includes/media/SVG.php',
|
|
|
|
|
|
|
|
|
|
# Normal
|
2006-07-26 07:15:39 +00:00
|
|
|
'UtfNormal' => 'includes/normal/UtfNormal.php',
|
2007-04-20 12:31:36 +00:00
|
|
|
|
|
|
|
|
# Templates
|
2006-08-02 17:33:18 +00:00
|
|
|
'UsercreateTemplate' => 'includes/templates/Userlogin.php',
|
|
|
|
|
'UserloginTemplate' => 'includes/templates/Userlogin.php',
|
2007-04-20 12:31:36 +00:00
|
|
|
|
|
|
|
|
# Languages
|
2006-07-26 07:15:39 +00:00
|
|
|
'Language' => 'languages/Language.php',
|
2006-10-14 07:18:08 +00:00
|
|
|
|
2007-04-20 12:31:36 +00:00
|
|
|
# API
|
2006-10-14 07:18:08 +00:00
|
|
|
'ApiBase' => 'includes/api/ApiBase.php',
|
2007-11-03 15:50:11 +00:00
|
|
|
'ApiExpandTemplates' => 'includes/api/ApiExpandTemplates.php',
|
2006-10-16 00:08:03 +00:00
|
|
|
'ApiFormatFeedWrapper' => 'includes/api/ApiFormatBase.php',
|
|
|
|
|
'ApiFeedWatchlist' => 'includes/api/ApiFeedWatchlist.php',
|
2006-10-14 07:18:08 +00:00
|
|
|
'ApiFormatBase' => 'includes/api/ApiFormatBase.php',
|
|
|
|
|
'Services_JSON' => 'includes/api/ApiFormatJson_json.php',
|
|
|
|
|
'ApiFormatJson' => 'includes/api/ApiFormatJson.php',
|
2006-10-22 23:45:20 +00:00
|
|
|
'ApiFormatPhp' => 'includes/api/ApiFormatPhp.php',
|
|
|
|
|
'ApiFormatWddx' => 'includes/api/ApiFormatWddx.php',
|
2006-10-14 07:18:08 +00:00
|
|
|
'ApiFormatXml' => 'includes/api/ApiFormatXml.php',
|
|
|
|
|
'Spyc' => 'includes/api/ApiFormatYaml_spyc.php',
|
|
|
|
|
'ApiFormatYaml' => 'includes/api/ApiFormatYaml.php',
|
|
|
|
|
'ApiHelp' => 'includes/api/ApiHelp.php',
|
|
|
|
|
'ApiLogin' => 'includes/api/ApiLogin.php',
|
|
|
|
|
'ApiMain' => 'includes/api/ApiMain.php',
|
|
|
|
|
'ApiOpenSearch' => 'includes/api/ApiOpenSearch.php',
|
|
|
|
|
'ApiPageSet' => 'includes/api/ApiPageSet.php',
|
2007-12-01 13:37:02 +00:00
|
|
|
'ApiParse' => 'includes/api/ApiParse.php',
|
2007-10-08 14:24:54 +00:00
|
|
|
'ApiRender' => 'includes/api/ApiRender.php',
|
2006-10-14 07:18:08 +00:00
|
|
|
'ApiResult' => 'includes/api/ApiResult.php',
|
2007-12-02 14:24:07 +00:00
|
|
|
|
2007-12-06 18:22:15 +00:00
|
|
|
# Query API
|
|
|
|
|
'ApiQuery' => 'includes/api/query/ApiQuery.php',
|
|
|
|
|
'ApiQueryAllpages' => 'includes/api/query/ApiQueryAllpages.php',
|
|
|
|
|
'ApiQueryAllLinks' => 'includes/api/query/ApiQueryAllLinks.php',
|
|
|
|
|
'ApiQueryAllUsers' => 'includes/api/query/ApiQueryAllUsers.php',
|
|
|
|
|
'ApiQueryBase' => 'includes/api/query/ApiQueryBase.php',
|
|
|
|
|
'ApiQueryGeneratorBase' => 'includes/api/query/ApiQueryBase.php',
|
|
|
|
|
'ApiQueryBlocks' => 'includes/api/query/ApiQueryBlocks.php',
|
|
|
|
|
'ApiQueryBacklinks' => 'includes/api/query/ApiQueryBacklinks.php',
|
|
|
|
|
'ApiQueryCategories' => 'includes/api/query/ApiQueryCategories.php',
|
|
|
|
|
'ApiQueryCategoryMembers' => 'includes/api/query/ApiQueryCategoryMembers.php',
|
|
|
|
|
'ApiQueryContributions' => 'includes/api/query/ApiQueryUserContributions.php',
|
|
|
|
|
'ApiQueryDeletedrevs' => 'includes/api/query/ApiQueryDeletedrevs.php',
|
|
|
|
|
'ApiQueryExternalLinks' => 'includes/api/query/ApiQueryExternalLinks.php',
|
|
|
|
|
'ApiQueryExtLinksUsage' => 'includes/api/query/ApiQueryExtLinksUsage.php',
|
|
|
|
|
'ApiQueryImages' => 'includes/api/query/ApiQueryImages.php',
|
|
|
|
|
'ApiQueryImageInfo' => 'includes/api/query/ApiQueryImageInfo.php',
|
|
|
|
|
'ApiQueryInfo' => 'includes/api/query/ApiQueryInfo.php',
|
|
|
|
|
'ApiQueryLangLinks' => 'includes/api/query/ApiQueryLangLinks.php',
|
|
|
|
|
'ApiQueryLinks' => 'includes/api/query/ApiQueryLinks.php',
|
|
|
|
|
'ApiQueryLogEvents' => 'includes/api/query/ApiQueryLogEvents.php',
|
|
|
|
|
'ApiQueryRecentChanges'=> 'includes/api/query/ApiQueryRecentChanges.php',
|
|
|
|
|
'ApiQueryRevisions' => 'includes/api/query/ApiQueryRevisions.php',
|
|
|
|
|
'ApiQuerySearch' => 'includes/api/query/ApiQuerySearch.php',
|
|
|
|
|
'ApiQueryAllmessages' => 'includes/api/query/ApiQueryAllmessages.php',
|
|
|
|
|
'ApiQuerySiteinfo' => 'includes/api/query/ApiQuerySiteinfo.php',
|
|
|
|
|
'ApiQueryUserInfo' => 'includes/api/query/ApiQueryUserInfo.php',
|
|
|
|
|
'ApiQueryWatchlist' => 'includes/api/query/ApiQueryWatchlist.php',
|
|
|
|
|
|
|
|
|
|
# API edit functions
|
|
|
|
|
'ApiBlock' => 'includes/api/edit/ApiBlock.php',
|
|
|
|
|
'ApiChangeRights' => 'includes/api/edit/ApiChangeRights.php',
|
|
|
|
|
'ApiDelete' => 'includes/api/edit/ApiDelete.php',
|
|
|
|
|
'ApiMove' => 'includes/api/edit/ApiMove.php',
|
|
|
|
|
'ApiProtect' => 'includes/api/edit/ApiProtect.php',
|
|
|
|
|
'ApiRollback' => 'includes/api/edit/ApiRollback.php',
|
|
|
|
|
'ApiUnblock' => 'includes/api/edit/ApiUnblock.php',
|
|
|
|
|
'ApiUndelete' => 'includes/api/edit/ApiUndelete.php'
|
2006-06-06 09:50:01 +00:00
|
|
|
);
|
2006-10-14 07:18:08 +00:00
|
|
|
|
2007-01-17 00:54:54 +00:00
|
|
|
wfProfileIn( __METHOD__ );
|
2006-06-25 08:38:17 +00:00
|
|
|
if ( isset( $localClasses[$className] ) ) {
|
2006-07-01 07:22:59 +00:00
|
|
|
$filename = $localClasses[$className];
|
2006-06-25 08:38:17 +00:00
|
|
|
} elseif ( isset( $wgAutoloadClasses[$className] ) ) {
|
2006-07-01 07:22:59 +00:00
|
|
|
$filename = $wgAutoloadClasses[$className];
|
2006-06-06 09:50:01 +00:00
|
|
|
} else {
|
2006-07-02 15:57:59 +00:00
|
|
|
# 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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( !$filename ) {
|
|
|
|
|
# Give up
|
2007-01-17 00:54:54 +00:00
|
|
|
wfProfileOut( __METHOD__ );
|
2006-07-02 15:57:59 +00:00
|
|
|
return;
|
|
|
|
|
}
|
2006-06-06 09:50:01 +00:00
|
|
|
}
|
2006-07-01 07:22:59 +00:00
|
|
|
|
|
|
|
|
# Make an absolute path, this improves performance by avoiding some stat calls
|
2006-07-02 12:00:31 +00:00
|
|
|
if ( substr( $filename, 0, 1 ) != '/' && substr( $filename, 1, 1 ) != ':' ) {
|
|
|
|
|
global $IP;
|
2006-07-01 07:22:59 +00:00
|
|
|
$filename = "$IP/$filename";
|
|
|
|
|
}
|
|
|
|
|
require( $filename );
|
2007-01-17 00:54:54 +00:00
|
|
|
wfProfileOut( __METHOD__ );
|
2006-06-06 09:50:01 +00:00
|
|
|
}
|
|
|
|
|
|
2006-06-25 08:38:17 +00:00
|
|
|
function wfLoadAllExtensions() {
|
|
|
|
|
global $wgAutoloadClasses;
|
2006-06-29 08:26:30 +00:00
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
|
Prevent some unnecessary lstat system calls, generated by include or require directives.
This can be done either by:
* Using explicit full paths, using the $IP global for the installation directory full path, and then working down the tree from there.
* Using explicit full paths, using the "dirname(__FILE__)" directive to get a full directory path for the includer file.
* Occasionally removing the line altogether, and then for some files the inclusion is handled by the autoloader.
For example, if the "extensions/wikihiero/wh_main.php" file does an include or require on "wh_list.php", then PHP does the following:
* tries to open "wiki/wh_list.php", and fails.
* tries to open "wiki/includes/wh_list.php", and fails.
* tries to open "wiki/languages/wh_list.php", and fails.
* tries to open "wiki/extensions/wikihiero/wh_list.php", and succeeds.
So in this example, the first 3 calls can be prevented if PHP is told where the file is.
Testing Method: On a Linux box, run these commands to attach strace to all the apache2 processes, and log their system calls to a temporary file, then generate some activity, and then stop the strace:
-----------------------------------
rm /tmp/strace-log.txt
strace -tt -o /tmp/strace-log.txt -p `pidof apache2 | sed 's/ / -p /g'` &
php maintenance/fuzz-tester.php --keep-passed-tests --include-binary --max-runtime=3 > /tmp/strace-tests.txt
killall -9 strace
grep "No such file or directory" /tmp/strace-log.txt | sort -u
-----------------------------------
Any failed file stats will be marked with: "-1 ENOENT (No such file or directory)".
Also:
* Strict Standards: Undefined offset: 230 in includes/normal/UtfNormal.php on line 637
* Strict Standards: iconv() [<a href='function.iconv'>function.iconv</a>]: Detected an illegal character in input string in languages/Language.php on line 776
[Note: Partial only - despite adding "//IGNORE", it still seems to be possible with some
messed- up binary input to cause PHP 5.1.2's iconv() function to squeal like a stuck pig].
* Update one $fname variable (method belongs to HistoryBlobStub class).
2007-02-09 05:36:56 +00:00
|
|
|
require_once( dirname(__FILE__) . '/SpecialPage.php' );
|
2006-06-29 08:26:30 +00:00
|
|
|
|
2006-06-25 08:38:17 +00:00
|
|
|
foreach( $wgAutoloadClasses as $class => $file ) {
|
2007-01-20 19:24:37 +00:00
|
|
|
if( !( class_exists( $class ) || interface_exists( $class ) ) ) {
|
2006-06-25 08:38:17 +00:00
|
|
|
require( $file );
|
|
|
|
|
}
|
|
|
|
|
}
|
2007-10-03 08:46:17 +00:00
|
|
|
}
|