r14594 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14593‎ | r14594 | r14595 >
Date:09:50, 6 June 2006
Author:midom
Status:old
Tags:
Comment:
Welcome back AutoLoader, this time in small batches :-)
Modified paths:
  • /trunk/phase3/includes/AutoLoader.php (added) (history)
  • /trunk/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Setup.php
@@ -45,6 +45,7 @@
4646 wfProfileIn( $fname );
4747 wfProfileIn( $fname.'-includes' );
4848
 49+require_once( 'AutoLoader.php' );
4950 require_once( 'GlobalFunctions.php' );
5051 require_once( 'Hooks.php' );
5152 require_once( 'Namespace.php' );
Index: trunk/phase3/includes/AutoLoader.php
@@ -0,0 +1,223 @@
 2+<?php
 3+
 4+/* This defines autoloading handler for whole MediaWiki framework */
 5+function __autoload($class_name) {
 6+ $classes = array(
 7+ 'AjaxDispatcher' => 'AjaxDispatcher.php',
 8+ 'AjaxCachePolicy' => 'AjaxFunctions.php',
 9+ 'Article' => 'Article.php',
 10+ 'AuthPlugin' => 'AuthPlugin.php',
 11+ 'BagOStuff' => 'BagOStuff.php',
 12+ 'HashBagOStuff' => 'BagOStuff.php',
 13+ 'SqlBagOStuff' => 'BagOStuff.php',
 14+ 'MediaWikiBagOStuff' => 'BagOStuff.php',
 15+ 'TurckBagOStuff' => 'BagOStuff.php',
 16+ 'APCBagOStuff' => 'BagOStuff.php',
 17+ 'eAccelBagOStuff' => 'BagOStuff.php',
 18+ 'Block' => 'Block.php',
 19+ 'CacheManager' => 'CacheManager.php',
 20+ 'CategoryPage' => 'CategoryPage.php',
 21+ 'Categoryfinder' => 'Categoryfinder.php',
 22+ 'RCCacheEntry' => 'ChangesList.php',
 23+ 'ChangesList' => 'ChangesList.php',
 24+ 'OldChangesList' => 'ChangesList.php',
 25+ 'EnhancedChangesList' => 'ChangesList.php',
 26+ 'DBObject' => 'Database.php',
 27+ 'Database' => 'Database.php',
 28+ 'DatabaseMysql' => 'Database.php',
 29+ 'ResultWrapper' => 'Database.php',
 30+ 'OracleBlob' => 'DatabaseOracle.php',
 31+ 'DatabaseOracle' => 'DatabaseOracle.php',
 32+ 'DatabasePgsql' => 'DatabasePostgreSQL.php',
 33+ 'DatabasePostgreSQL' => 'DatabasePostgreSQL.php',
 34+ 'DateFormatter' => 'DateFormatter.php',
 35+ 'DifferenceEngine' => 'DifferenceEngine.php',
 36+ '_DiffOp' => 'DifferenceEngine.php',
 37+ '_DiffOp_Copy' => 'DifferenceEngine.php',
 38+ '_DiffOp_Delete' => 'DifferenceEngine.php',
 39+ '_DiffOp_Add' => 'DifferenceEngine.php',
 40+ '_DiffOp_Change' => 'DifferenceEngine.php',
 41+ '_DiffEngine' => 'DifferenceEngine.php',
 42+ 'Diff' => 'DifferenceEngine.php',
 43+ 'MappedDiff' => 'DifferenceEngine.php',
 44+ 'DiffFormatter' => 'DifferenceEngine.php',
 45+ '_HWLDF_WordAccumulator' => 'DifferenceEngine.php',
 46+ 'WordLevelDiff' => 'DifferenceEngine.php',
 47+ 'TableDiffFormatter' => 'DifferenceEngine.php',
 48+ 'EditPage' => 'EditPage.php',
 49+ 'Exif' => 'Exif.php',
 50+ 'FormatExif' => 'Exif.php',
 51+ 'WikiExporter' => 'Export.php',
 52+ 'XmlDumpWriter' => 'Export.php',
 53+ 'DumpOutput' => 'Export.php',
 54+ 'DumpFileOutput' => 'Export.php',
 55+ 'DumpPipeOutput' => 'Export.php',
 56+ 'DumpGZipOutput' => 'Export.php',
 57+ 'DumpBZip2Output' => 'Export.php',
 58+ 'Dump7ZipOutput' => 'Export.php',
 59+ 'DumpFilter' => 'Export.php',
 60+ 'DumpNotalkFilter' => 'Export.php',
 61+ 'DumpNamespaceFilter' => 'Export.php',
 62+ 'DumpLatestFilter' => 'Export.php',
 63+ 'DumpMultiWriter' => 'Export.php',
 64+ 'ExternalEdit' => 'ExternalEdit.php',
 65+ 'ExternalStore' => 'ExternalStore.php',
 66+ 'ExternalStoreDB' => 'ExternalStoreDB.php',
 67+ 'ExternalStoreHttp' => 'ExternalStoreHttp.php',
 68+ 'FakeTitle' => 'FakeTitle.php',
 69+ 'FeedItem' => 'Feed.php',
 70+ 'ChannelFeed' => 'Feed.php',
 71+ 'RSSFeed' => 'Feed.php',
 72+ 'AtomFeed' => 'Feed.php',
 73+ 'ReplacerCallback' => 'GlobalFunctions.php',
 74+ 'Group' => 'Group.php',
 75+ 'HTMLForm' => 'HTMLForm.php',
 76+ 'HistoryBlob' => 'HistoryBlob.php',
 77+ 'ConcatenatedGzipHistoryBlob' => 'HistoryBlob.php',
 78+ 'HistoryBlobStub' => 'HistoryBlob.php',
 79+ 'HistoryBlobCurStub' => 'HistoryBlob.php',
 80+ 'Image' => 'Image.php',
 81+ 'ThumbnailImage' => 'Image.php',
 82+ 'ImageGallery' => 'ImageGallery.php',
 83+ 'ImagePage' => 'ImagePage.php',
 84+ 'ImageHistoryList' => 'ImagePage.php',
 85+ 'ImageRemote' => 'ImageRemote.php',
 86+ 'Job' => 'JobQueue.php',
 87+ 'Licenses' => 'Licenses.php',
 88+ 'License' => 'Licenses.php',
 89+ 'LinkBatch' => 'LinkBatch.php',
 90+ 'LinkCache' => 'LinkCache.php',
 91+ 'LinkFilter' => 'LinkFilter.php',
 92+ 'Linker' => 'Linker.php',
 93+ 'LinksUpdate' => 'LinksUpdate.php',
 94+ 'LoadBalancer' => 'LoadBalancer.php',
 95+ 'LogPage' => 'LogPage.php',
 96+ 'MacBinary' => 'MacBinary.php',
 97+ 'MagicWord' => 'MagicWord.php',
 98+ 'MathRenderer' => 'Math.php',
 99+ 'MessageCache' => 'MessageCache.php',
 100+ 'MimeMagic' => 'MimeMagic.php',
 101+ 'Namespace' => 'Namespace.php',
 102+ 'FakeMemCachedClient' => 'ObjectCache.php',
 103+ 'ObjectCacheManager' => 'ObjectCache.php',
 104+ 'MemCachedClientforWiki' => 'ObjectCache.php',
 105+ 'OutputPage' => 'OutputPage.php',
 106+ 'PageHistory' => 'PageHistory.php',
 107+ 'Parser' => 'Parser.php',
 108+ 'ParserOutput' => 'Parser.php',
 109+ 'ParserOptions' => 'Parser.php',
 110+ 'ParserCache' => 'ParserCache.php',
 111+ 'element' => 'ParserXML.php',
 112+ 'xml2php' => 'ParserXML.php',
 113+ 'ParserXML' => 'ParserXML.php',
 114+ 'ProfilerSimple' => 'ProfilerSimple.php',
 115+ 'ProfilerSimpleUDP' => 'ProfilerSimpleUDP.php',
 116+ 'Profiler' => 'Profiling.php',
 117+ 'ProxyTools' => 'ProxyTools.php',
 118+ 'ProtectionForm' => 'ProtectionForm.php',
 119+ 'QueryPage' => 'QueryPage.php',
 120+ 'PageQueryPage' => 'QueryPage.php',
 121+ 'RawPage' => 'RawPage.php',
 122+ 'RecentChange' => 'RecentChange.php',
 123+ 'Revision' => 'Revision.php',
 124+ 'Sanitizer' => 'Sanitizer.php',
 125+ 'SearchEngine' => 'SearchEngine.php',
 126+ 'SearchResultSet' => 'SearchEngine.php',
 127+ 'SearchResult' => 'SearchEngine.php',
 128+ 'SearchEngineDummy' => 'SearchEngine.php',
 129+ 'SearchMySQL' => 'SearchMySQL.php',
 130+ 'MySQLSearchResultSet' => 'SearchMySQL.php',
 131+ 'SearchMySQL4' => 'SearchMySQL4.php',
 132+ 'SearchTsearch2' => 'SearchTsearch2.php',
 133+ 'SearchUpdate' => 'SearchUpdate.php',
 134+ 'SearchUpdateMyISAM' => 'SearchUpdate.php',
 135+ 'SiteConfiguration' => 'SiteConfiguration.php',
 136+ 'SiteStatsUpdate' => 'SiteStatsUpdate.php',
 137+ 'Skin' => 'Skin.php',
 138+ 'MediaWiki_I18N' => 'SkinTemplate.php',
 139+ 'SkinTemplate' => 'SkinTemplate.php',
 140+ 'QuickTemplate' => 'SkinTemplate.php',
 141+ 'SpecialAllpages' => 'SpecialAllpages.php',
 142+ 'AncientPagesPage' => 'SpecialAncientpages.php',
 143+ 'IPBlockForm' => 'SpecialBlockip.php',
 144+ 'BookSourceList' => 'SpecialBooksources.php',
 145+ 'BrokenRedirectsPage' => 'SpecialBrokenRedirects.php',
 146+ 'CategoriesPage' => 'SpecialCategories.php',
 147+ 'EmailConfirmation' => 'SpecialConfirmemail.php',
 148+ 'contribs_finder' => 'SpecialContributions.php',
 149+ 'DeadendPagesPage' => 'SpecialDeadendpages.php',
 150+ 'DisambiguationsPage' => 'SpecialDisambiguations.php',
 151+ 'DoubleRedirectsPage' => 'SpecialDoubleRedirects.php',
 152+ 'EmailUserForm' => 'SpecialEmailuser.php',
 153+ 'GroupsForm' => 'SpecialGroups.php',
 154+ 'WikiRevision' => 'SpecialImport.php',
 155+ 'WikiImporter' => 'SpecialImport.php',
 156+ 'ImportStringSource' => 'SpecialImport.php',
 157+ 'ImportStreamSource' => 'SpecialImport.php',
 158+ 'IPUnblockForm' => 'SpecialIpblocklist.php',
 159+ 'ListredirectsPage' => 'SpecialListredirects.php',
 160+ 'ListUsersPage' => 'SpecialListusers.php',
 161+ 'DBLockForm' => 'SpecialLockdb.php',
 162+ 'LogReader' => 'SpecialLog.php',
 163+ 'LogViewer' => 'SpecialLog.php',
 164+ 'LonelyPagesPage' => 'SpecialLonelypages.php',
 165+ 'LongPagesPage' => 'SpecialLongpages.php',
 166+ 'MIMEsearchPage' => 'SpecialMIMEsearch.php',
 167+ 'MostcategoriesPage' => 'SpecialMostcategories.php',
 168+ 'MostimagesPage' => 'SpecialMostimages.php',
 169+ 'MostlinkedPage' => 'SpecialMostlinked.php',
 170+ 'MostlinkedCategoriesPage' => 'SpecialMostlinkedcategories.php',
 171+ 'MostrevisionsPage' => 'SpecialMostrevisions.php',
 172+ 'MovePageForm' => 'SpecialMovepage.php',
 173+ 'NewPagesPage' => 'SpecialNewpages.php',
 174+ 'SpecialPage' => 'SpecialPage.php',
 175+ 'UnlistedSpecialPage' => 'SpecialPage.php',
 176+ 'IncludableSpecialPage' => 'SpecialPage.php',
 177+ 'PopularPagesPage' => 'SpecialPopularpages.php',
 178+ 'PreferencesForm' => 'SpecialPreferences.php',
 179+ 'SpecialPrefixindex' => 'SpecialPrefixindex.php',
 180+ 'RevisionDeleteForm' => 'SpecialRevisiondelete.php',
 181+ 'RevisionDeleter' => 'SpecialRevisiondelete.php',
 182+ 'SpecialSearch' => 'SpecialSearch.php',
 183+ 'ShortPagesPage' => 'SpecialShortpages.php',
 184+ 'UncategorizedCategoriesPage' => 'SpecialUncategorizedcategories.php',
 185+ 'UncategorizedPagesPage' => 'SpecialUncategorizedpages.php',
 186+ 'PageArchive' => 'SpecialUndelete.php',
 187+ 'UndeleteForm' => 'SpecialUndelete.php',
 188+ 'DBUnlockForm' => 'SpecialUnlockdb.php',
 189+ 'UnusedCategoriesPage' => 'SpecialUnusedcategories.php',
 190+ 'UnusedimagesPage' => 'SpecialUnusedimages.php',
 191+ 'UnusedtemplatesPage' => 'SpecialUnusedtemplates.php',
 192+ 'UnwatchedpagesPage' => 'SpecialUnwatchedpages.php',
 193+ 'UploadForm' => 'SpecialUpload.php',
 194+ 'UploadFormMogile' => 'SpecialUploadMogile.php',
 195+ 'LoginForm' => 'SpecialUserlogin.php',
 196+ 'UserrightsForm' => 'SpecialUserrights.php',
 197+ 'SpecialVersion' => 'SpecialVersion.php',
 198+ 'WantedCategoriesPage' => 'SpecialWantedcategories.php',
 199+ 'WantedPagesPage' => 'SpecialWantedpages.php',
 200+ 'WhatLinksHerePage' => 'SpecialWhatlinkshere.php',
 201+ 'SquidUpdate' => 'SquidUpdate.php',
 202+ 'Title' => 'Title.php',
 203+ 'User' => 'User.php',
 204+ 'MailAddress' => 'UserMailer.php',
 205+ 'EmailNotification' => 'UserMailer.php',
 206+ 'WatchedItem' => 'WatchedItem.php',
 207+ 'WebRequest' => 'WebRequest.php',
 208+ 'FauxRequest' => 'WebRequest.php',
 209+ 'MediaWiki' => 'Wiki.php',
 210+ 'WikiError' => 'WikiError.php',
 211+ 'WikiErrorMsg' => 'WikiError.php',
 212+ 'WikiXmlError' => 'WikiError.php',
 213+ 'ZhClient' => 'ZhClient.php',
 214+ 'memcached' => 'memcached-client.php',
 215+ 'UtfNormal' => 'normal/UtfNormal.php'
 216+ );
 217+ if (array_key_exists($class_name, $classes)) {
 218+ require($classes[$class_name]);
 219+ } else {
 220+ return false;
 221+ }
 222+}
 223+
 224+?>
\ No newline at end of file

Status & tagging log