summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--AdminSettings.sample32
-rw-r--r--CREDITS41
-rw-r--r--FAQ7
-rw-r--r--HISTORY410
-rw-r--r--Makefile28
-rw-r--r--RELEASE-NOTES1376
-rw-r--r--StartProfiler.sample (renamed from StartProfiler.php)3
-rw-r--r--UPGRADE23
-rw-r--r--api.php87
-rw-r--r--cache/.htaccess (renamed from t/.htaccess)0
-rw-r--r--config/Installer.php2350
-rw-r--r--config/index.php2191
-rw-r--r--config/index.php52
-rw-r--r--docs/design.txt2
-rw-r--r--docs/distributors.txt192
-rw-r--r--docs/export-0.4.xsd212
-rw-r--r--docs/export-demo.xml21
-rw-r--r--docs/hooks.txt755
-rw-r--r--docs/maintenance.txt57
-rw-r--r--docs/memcached.txt15
-rw-r--r--docs/php-memcached/ChangeLog65
-rw-r--r--docs/php-memcached/README1
-rw-r--r--docs/scripts.txt7
-rw-r--r--docs/skin.txt2
-rw-r--r--docs/upload.txt42
-rw-r--r--extensions/FluxBBAuthPlugin.php15
-rw-r--r--img_auth.php128
-rw-r--r--includes/AjaxDispatcher.php35
-rw-r--r--includes/AjaxFunctions.php96
-rw-r--r--includes/AjaxResponse.php44
-rw-r--r--includes/Article.php2217
-rw-r--r--includes/AuthPlugin.php47
-rw-r--r--includes/AutoLoader.php217
-rw-r--r--includes/Autopromote.php7
-rw-r--r--includes/BacklinkCache.php73
-rw-r--r--includes/BagOStuff.php660
-rw-r--r--includes/Block.php185
-rw-r--r--includes/CacheDependency.php43
-rw-r--r--includes/Category.php80
-rw-r--r--includes/CategoryPage.php233
-rw-r--r--includes/Categoryfinder.php142
-rw-r--r--includes/Cdb.php149
-rw-r--r--includes/Cdb_PHP.php374
-rw-r--r--includes/ChangeTags.php98
-rw-r--r--includes/ChangesFeed.php68
-rw-r--r--includes/ChangesList.php519
-rw-r--r--includes/ConfEditor.php1058
-rw-r--r--includes/Credits.php70
-rw-r--r--includes/DatabaseFunctions.php2
-rw-r--r--includes/DefaultSettings.php850
-rw-r--r--includes/Defines.php5
-rw-r--r--includes/DjVuImage.php26
-rw-r--r--includes/DoubleRedirectJob.php12
-rw-r--r--includes/EditPage.php1575
-rw-r--r--includes/Exception.php18
-rw-r--r--includes/Exif.php18
-rw-r--r--includes/Export.php73
-rw-r--r--includes/ExternalStore.php48
-rw-r--r--includes/ExternalStoreDB.php49
-rw-r--r--includes/ExternalStoreHttp.php18
-rw-r--r--includes/ExternalUser.php304
-rw-r--r--includes/FakeTitle.php83
-rw-r--r--includes/Feed.php111
-rw-r--r--includes/FeedUtils.php76
-rw-r--r--includes/FileDeleteForm.php60
-rw-r--r--includes/FileRevertForm.php13
-rw-r--r--includes/FileStore.php360
-rw-r--r--includes/ForkController.php24
-rw-r--r--includes/GlobalFunctions.php847
-rw-r--r--includes/HTMLCacheUpdate.php143
-rw-r--r--includes/HTMLFileCache.php21
-rw-r--r--includes/HTMLForm.php1391
-rw-r--r--includes/HistoryPage.php730
-rw-r--r--includes/Hooks.php80
-rw-r--r--includes/Html.php539
-rw-r--r--includes/HttpFunctions.php929
-rw-r--r--includes/IP.php160
-rw-r--r--includes/ImageFunctions.php6
-rw-r--r--includes/ImageGallery.php37
-rw-r--r--includes/ImagePage.php361
-rw-r--r--includes/ImageQueryPage.php18
-rw-r--r--includes/Import.php63
-rw-r--r--includes/Interwiki.php133
-rw-r--r--includes/JSMin.php290
-rw-r--r--includes/JobQueue.php42
-rw-r--r--includes/Licenses.php79
-rw-r--r--includes/LinkCache.php22
-rw-r--r--includes/LinkFilter.php84
-rw-r--r--includes/Linker.php1135
-rw-r--r--includes/LinksUpdate.php7
-rw-r--r--includes/LocalisationCache.php999
-rw-r--r--includes/LogEventsList.php628
-rw-r--r--includes/LogPage.php115
-rw-r--r--includes/MagicWord.php91
-rw-r--r--includes/Math.php39
-rw-r--r--includes/MediaTransformOutput.php30
-rw-r--r--includes/MessageCache.php295
-rw-r--r--includes/MimeMagic.php40
-rw-r--r--includes/Namespace.php47
-rw-r--r--includes/ObjectCache.php13
-rw-r--r--includes/OutputHandler.php22
-rw-r--r--includes/OutputPage.php1738
-rw-r--r--includes/PageHistory.php630
-rw-r--r--includes/Pager.php213
-rw-r--r--includes/PatrolLog.php36
-rw-r--r--includes/PoolCounter.php64
-rw-r--r--includes/Preferences.php1389
-rw-r--r--includes/PrefixSearch.php53
-rw-r--r--includes/Profiler.php15
-rw-r--r--includes/ProfilerSimpleText.php4
-rw-r--r--includes/ProtectionForm.php104
-rw-r--r--includes/ProxyTools.php29
-rw-r--r--includes/QueryPage.php174
-rw-r--r--includes/RawPage.php35
-rw-r--r--includes/RecentChange.php273
-rw-r--r--includes/RefreshLinksJob.php3
-rw-r--r--includes/Revision.php356
-rw-r--r--includes/Sanitizer.php392
-rw-r--r--includes/SearchMySQL.php270
-rw-r--r--includes/Setup.php100
-rw-r--r--includes/SiteConfiguration.php17
-rw-r--r--includes/SiteStats.php168
-rw-r--r--includes/Skin.php1064
-rw-r--r--includes/SkinTemplate.php593
-rw-r--r--includes/SpecialPage.php104
-rw-r--r--includes/SquidPurgeClient.php380
-rw-r--r--includes/SquidUpdate.php137
-rw-r--r--includes/Status.php16
-rw-r--r--includes/StreamFile.php7
-rw-r--r--includes/StubObject.php16
-rw-r--r--includes/Title.php740
-rw-r--r--includes/User.php829
-rw-r--r--includes/UserMailer.php19
-rw-r--r--includes/UserRightsProxy.php73
-rw-r--r--includes/WatchedItem.php4
-rw-r--r--includes/WatchlistEditor.php37
-rw-r--r--includes/WebRequest.php190
-rw-r--r--includes/WebResponse.php30
-rw-r--r--includes/WebStart.php7
-rw-r--r--includes/Wiki.php96
-rw-r--r--includes/WikiMap.php161
-rw-r--r--includes/Xml.php75
-rw-r--r--includes/ZhConversion.php1781
-rw-r--r--includes/api/ApiBase.php955
-rw-r--r--includes/api/ApiBlock.php105
-rw-r--r--includes/api/ApiDelete.php203
-rw-r--r--includes/api/ApiDisabled.php23
-rw-r--r--includes/api/ApiEditPage.php385
-rw-r--r--includes/api/ApiEmailUser.php34
-rw-r--r--includes/api/ApiExpandTemplates.php17
-rw-r--r--includes/api/ApiFeedWatchlist.php80
-rw-r--r--includes/api/ApiFormatBase.php115
-rw-r--r--includes/api/ApiFormatDbg.php18
-rw-r--r--includes/api/ApiFormatJson.php44
-rw-r--r--includes/api/ApiFormatPhp.php12
-rw-r--r--includes/api/ApiFormatRaw.php28
-rw-r--r--includes/api/ApiFormatTxt.php18
-rw-r--r--includes/api/ApiFormatWddx.php77
-rw-r--r--includes/api/ApiFormatXml.php117
-rw-r--r--includes/api/ApiFormatYaml.php12
-rw-r--r--includes/api/ApiFormatYaml_spyc.php98
-rw-r--r--includes/api/ApiHelp.php12
-rw-r--r--includes/api/ApiImport.php98
-rw-r--r--includes/api/ApiLogin.php99
-rw-r--r--includes/api/ApiLogout.php12
-rw-r--r--includes/api/ApiMain.php347
-rw-r--r--includes/api/ApiMove.php159
-rw-r--r--includes/api/ApiOpenSearch.php38
-rw-r--r--includes/api/ApiPageSet.php257
-rw-r--r--includes/api/ApiParamInfo.php134
-rw-r--r--includes/api/ApiParse.php194
-rw-r--r--includes/api/ApiPatrol.php50
-rw-r--r--includes/api/ApiProtect.php146
-rw-r--r--includes/api/ApiPurge.php41
-rw-r--r--includes/api/ApiQuery.php243
-rw-r--r--includes/api/ApiQueryAllCategories.php92
-rw-r--r--includes/api/ApiQueryAllLinks.php135
-rw-r--r--includes/api/ApiQueryAllUsers.php148
-rw-r--r--includes/api/ApiQueryAllimages.php121
-rw-r--r--includes/api/ApiQueryAllmessages.php118
-rw-r--r--includes/api/ApiQueryAllpages.php162
-rw-r--r--includes/api/ApiQueryBacklinks.php338
-rw-r--r--includes/api/ApiQueryBase.php196
-rw-r--r--includes/api/ApiQueryBlocks.php205
-rw-r--r--includes/api/ApiQueryCategories.php179
-rw-r--r--includes/api/ApiQueryCategoryInfo.php66
-rw-r--r--includes/api/ApiQueryCategoryMembers.php186
-rw-r--r--includes/api/ApiQueryDeletedrevs.php257
-rw-r--r--includes/api/ApiQueryDisabled.php12
-rw-r--r--includes/api/ApiQueryDuplicateFiles.php97
-rw-r--r--includes/api/ApiQueryExtLinksUsage.php125
-rw-r--r--includes/api/ApiQueryExternalLinks.php50
-rw-r--r--includes/api/ApiQueryImageInfo.php229
-rw-r--r--includes/api/ApiQueryImages.php101
-rw-r--r--includes/api/ApiQueryInfo.php447
-rw-r--r--includes/api/ApiQueryLangLinks.php75
-rw-r--r--includes/api/ApiQueryLinks.php120
-rw-r--r--includes/api/ApiQueryLogEvents.php274
-rw-r--r--includes/api/ApiQueryProtectedTitles.php112
-rw-r--r--includes/api/ApiQueryRandom.php82
-rw-r--r--includes/api/ApiQueryRecentChanges.php383
-rw-r--r--includes/api/ApiQueryRevisions.php435
-rw-r--r--includes/api/ApiQuerySearch.php129
-rw-r--r--includes/api/ApiQuerySiteinfo.php198
-rw-r--r--includes/api/ApiQueryTags.php181
-rw-r--r--includes/api/ApiQueryUserContributions.php305
-rw-r--r--includes/api/ApiQueryUserInfo.php99
-rw-r--r--includes/api/ApiQueryUsers.php202
-rw-r--r--includes/api/ApiQueryWatchlist.php316
-rw-r--r--includes/api/ApiQueryWatchlistRaw.php118
-rw-r--r--includes/api/ApiResult.php168
-rw-r--r--includes/api/ApiRollback.php76
-rw-r--r--includes/api/ApiUnblock.php59
-rw-r--r--includes/api/ApiUndelete.php87
-rw-r--r--includes/api/ApiUpload.php325
-rw-r--r--includes/api/ApiUserrights.php128
-rw-r--r--includes/api/ApiWatch.php46
-rw-r--r--includes/cbt/CBTCompiler.php366
-rw-r--r--includes/cbt/CBTProcessor.php539
-rw-r--r--includes/cbt/README108
-rw-r--r--includes/db/Database.php812
-rw-r--r--includes/db/DatabaseIbm_db2.php908
-rw-r--r--includes/db/DatabaseMssql.php86
-rw-r--r--includes/db/DatabaseMysql.php453
-rw-r--r--includes/db/DatabaseOracle.php1049
-rw-r--r--includes/db/DatabasePostgres.php184
-rw-r--r--includes/db/DatabaseSqlite.php432
-rw-r--r--includes/db/LBFactory.php14
-rw-r--r--includes/db/LoadBalancer.php21
-rw-r--r--includes/diff/DifferenceEngine.php933
-rw-r--r--includes/diff/DifferenceInterface.php1021
-rw-r--r--includes/diff/HTMLDiff.php1009
-rw-r--r--includes/diff/Nodes.php439
-rw-r--r--includes/extauth/Hardcoded.php79
-rw-r--r--includes/extauth/MediaWiki.php141
-rw-r--r--includes/extauth/vB.php140
-rw-r--r--includes/filerepo/ArchivedFile.php68
-rw-r--r--includes/filerepo/FSRepo.php103
-rw-r--r--includes/filerepo/File.php76
-rw-r--r--includes/filerepo/FileCache.php156
-rw-r--r--includes/filerepo/FileRepo.php175
-rw-r--r--includes/filerepo/ForeignAPIFile.php11
-rw-r--r--includes/filerepo/ForeignAPIRepo.php114
-rw-r--r--includes/filerepo/ForeignDBFile.php10
-rw-r--r--includes/filerepo/ForeignDBRepo.php15
-rw-r--r--includes/filerepo/ForeignDBViaLBRepo.php15
-rw-r--r--includes/filerepo/Image.php4
-rw-r--r--includes/filerepo/LocalFile.php224
-rw-r--r--includes/filerepo/LocalRepo.php97
-rw-r--r--includes/filerepo/NullRepo.php8
-rw-r--r--includes/filerepo/OldLocalFile.php24
-rw-r--r--includes/filerepo/RepoGroup.php124
-rw-r--r--includes/json/FormatJson.php32
-rw-r--r--includes/json/Services_JSON.php (renamed from includes/api/ApiFormatJson_json.php)20
-rw-r--r--includes/media/Bitmap.php121
-rw-r--r--includes/media/DjVu.php48
-rw-r--r--includes/media/GIF.php72
-rw-r--r--includes/media/GIFMetadataExtractor.php175
-rw-r--r--includes/media/Generic.php44
-rw-r--r--includes/media/SVG.php2
-rw-r--r--includes/memcached-client.php1990
-rw-r--r--includes/mime.types6
-rw-r--r--includes/normal/RandomTest.php2
-rw-r--r--includes/normal/Utf8CaseGenerate.php2
-rw-r--r--includes/normal/Utf8Test.php2
-rw-r--r--includes/normal/UtfNormal.php8
-rw-r--r--includes/normal/UtfNormalData.inc10
-rw-r--r--includes/normal/UtfNormalDataK.inc4
-rw-r--r--includes/normal/UtfNormalGenerate.php8
-rw-r--r--includes/parser/CoreParserFunctions.php148
-rw-r--r--includes/parser/CoreTagHooks.php49
-rw-r--r--includes/parser/DateFormatter.php10
-rw-r--r--includes/parser/LinkHolderArray.php3
-rw-r--r--includes/parser/Parser.php1121
-rw-r--r--includes/parser/ParserCache.php75
-rw-r--r--includes/parser/ParserOptions.php27
-rw-r--r--includes/parser/ParserOutput.php31
-rw-r--r--includes/parser/Preprocessor.php15
-rw-r--r--includes/parser/Preprocessor_DOM.php31
-rw-r--r--includes/parser/Preprocessor_Hash.php18
-rw-r--r--includes/search/SearchEngine.php (renamed from includes/SearchEngine.php)325
-rw-r--r--includes/search/SearchIBM_DB2.php (renamed from includes/SearchIBM_DB2.php)89
-rw-r--r--includes/search/SearchMySQL.php412
-rw-r--r--includes/search/SearchMySQL4.php (renamed from includes/SearchMySQL4.php)0
-rw-r--r--includes/search/SearchOracle.php (renamed from includes/SearchOracle.php)136
-rw-r--r--includes/search/SearchPostgres.php (renamed from includes/SearchPostgres.php)21
-rw-r--r--includes/search/SearchSqlite.php344
-rw-r--r--includes/search/SearchUpdate.php (renamed from includes/SearchUpdate.php)6
-rw-r--r--includes/specials/SpecialActiveusers.php195
-rw-r--r--includes/specials/SpecialAllmessages.php581
-rw-r--r--includes/specials/SpecialAllpages.php180
-rw-r--r--includes/specials/SpecialAncientpages.php28
-rw-r--r--includes/specials/SpecialBlankpage.php19
-rw-r--r--includes/specials/SpecialBlockip.php433
-rw-r--r--includes/specials/SpecialBooksources.php4
-rw-r--r--includes/specials/SpecialBrokenRedirects.php42
-rw-r--r--includes/specials/SpecialCategories.php13
-rw-r--r--includes/specials/SpecialConfirmemail.php14
-rw-r--r--includes/specials/SpecialContributions.php318
-rw-r--r--includes/specials/SpecialDeletedContributions.php243
-rw-r--r--includes/specials/SpecialDisambiguations.php2
-rw-r--r--includes/specials/SpecialDoubleRedirects.php28
-rw-r--r--includes/specials/SpecialEmailuser.php23
-rw-r--r--includes/specials/SpecialExport.php69
-rw-r--r--includes/specials/SpecialFewestrevisions.php21
-rw-r--r--includes/specials/SpecialFileDuplicateSearch.php23
-rw-r--r--includes/specials/SpecialFilepath.php4
-rw-r--r--includes/specials/SpecialImport.php15
-rw-r--r--includes/specials/SpecialIpblocklist.php64
-rw-r--r--includes/specials/SpecialLinkSearch.php18
-rw-r--r--includes/specials/SpecialListUserRestrictions.php162
-rw-r--r--includes/specials/SpecialListfiles.php22
-rw-r--r--includes/specials/SpecialListgrouprights.php74
-rw-r--r--includes/specials/SpecialListredirects.php9
-rw-r--r--includes/specials/SpecialListusers.php34
-rw-r--r--includes/specials/SpecialLockdb.php6
-rw-r--r--includes/specials/SpecialLog.php12
-rw-r--r--includes/specials/SpecialMIMEsearch.php20
-rw-r--r--includes/specials/SpecialMergeHistory.php38
-rw-r--r--includes/specials/SpecialMostlinked.php37
-rw-r--r--includes/specials/SpecialMostlinkedcategories.php2
-rw-r--r--includes/specials/SpecialMostlinkedtemplates.php33
-rw-r--r--includes/specials/SpecialMostrevisions.php9
-rw-r--r--includes/specials/SpecialMovepage.php138
-rw-r--r--includes/specials/SpecialNewimages.php81
-rw-r--r--includes/specials/SpecialNewpages.php38
-rw-r--r--includes/specials/SpecialPopularpages.php12
-rw-r--r--includes/specials/SpecialPreferences.php1315
-rw-r--r--includes/specials/SpecialPrefixindex.php28
-rw-r--r--includes/specials/SpecialProtectedpages.php47
-rw-r--r--includes/specials/SpecialProtectedtitles.php6
-rw-r--r--includes/specials/SpecialRandompage.php61
-rw-r--r--includes/specials/SpecialRandomredirect.php5
-rw-r--r--includes/specials/SpecialRecentchanges.php112
-rw-r--r--includes/specials/SpecialRecentchangeslinked.php72
-rw-r--r--includes/specials/SpecialRemoveRestrictions.php10
-rw-r--r--includes/specials/SpecialResetpass.php76
-rw-r--r--includes/specials/SpecialRestrictUser.php190
-rw-r--r--includes/specials/SpecialRevisiondelete.php2801
-rw-r--r--includes/specials/SpecialSearch.php1417
-rw-r--r--includes/specials/SpecialShortpages.php11
-rw-r--r--includes/specials/SpecialSpecialpages.php6
-rw-r--r--includes/specials/SpecialStatistics.php70
-rw-r--r--includes/specials/SpecialTags.php12
-rw-r--r--includes/specials/SpecialUncategorizedtemplates.php2
-rw-r--r--includes/specials/SpecialUndelete.php366
-rw-r--r--includes/specials/SpecialUnlockdb.php6
-rw-r--r--includes/specials/SpecialUnusedcategories.php2
-rw-r--r--includes/specials/SpecialUnusedimages.php16
-rw-r--r--includes/specials/SpecialUnusedtemplates.php13
-rw-r--r--includes/specials/SpecialUnwatchedpages.php12
-rw-r--r--includes/specials/SpecialUpload.php2374
-rw-r--r--includes/specials/SpecialUploadMogile.php135
-rw-r--r--includes/specials/SpecialUserlogin.php215
-rw-r--r--includes/specials/SpecialUserlogout.php10
-rw-r--r--includes/specials/SpecialUserrights.php390
-rw-r--r--includes/specials/SpecialVersion.php312
-rw-r--r--includes/specials/SpecialWantedcategories.php39
-rw-r--r--includes/specials/SpecialWantedfiles.php59
-rw-r--r--includes/specials/SpecialWantedpages.php93
-rw-r--r--includes/specials/SpecialWantedtemplates.php59
-rw-r--r--includes/specials/SpecialWatchlist.php120
-rw-r--r--includes/specials/SpecialWhatlinkshere.php84
-rw-r--r--includes/specials/SpecialWithoutinterwiki.php11
-rw-r--r--includes/templates/NoLocalSettings.php4
-rw-r--r--includes/templates/PHP4.php4
-rw-r--r--includes/templates/Userlogin.php111
-rw-r--r--includes/upload/UploadBase.php1091
-rw-r--r--includes/upload/UploadFromFile.php32
-rw-r--r--includes/upload/UploadFromStash.php84
-rw-r--r--includes/upload/UploadFromUrl.php137
-rw-r--r--includes/zhtable/Makefile2
-rw-r--r--includes/zhtable/Makefile.py83
-rw-r--r--includes/zhtable/simp2trad.manual459
-rw-r--r--includes/zhtable/simpphrases.manual122
-rw-r--r--includes/zhtable/simpphrases_exclude.manual4
-rw-r--r--includes/zhtable/toCN.manual12
-rw-r--r--includes/zhtable/toHK.manual206
-rw-r--r--includes/zhtable/toSimp.manual25
-rw-r--r--includes/zhtable/toTW.manual59
-rw-r--r--includes/zhtable/toTrad.manual77
-rw-r--r--includes/zhtable/trad2simp.manual265
-rw-r--r--includes/zhtable/tradphrases.manual972
-rw-r--r--includes/zhtable/tradphrases_exclude.manual53
-rw-r--r--index.php7
-rw-r--r--languages/Language.php1075
-rw-r--r--languages/LanguageConverter.php1533
-rw-r--r--languages/Names.php84
-rw-r--r--languages/classes/LanguageAm.php16
-rw-r--r--languages/classes/LanguageAr.php31
-rw-r--r--languages/classes/LanguageBe.php3
-rw-r--r--languages/classes/LanguageBe_tarask.php3
-rw-r--r--languages/classes/LanguageBh.php16
-rw-r--r--languages/classes/LanguageBs.php2
-rw-r--r--languages/classes/LanguageCy.php3
-rw-r--r--languages/classes/LanguageEo.php3
-rw-r--r--languages/classes/LanguageGa.php16
-rw-r--r--languages/classes/LanguageGan.php30
-rw-r--r--languages/classes/LanguageGd.php35
-rw-r--r--languages/classes/LanguageHi.php16
-rw-r--r--languages/classes/LanguageHr.php2
-rw-r--r--languages/classes/LanguageJa.php27
-rw-r--r--languages/classes/LanguageKk.php13
-rw-r--r--languages/classes/LanguageKu.php10
-rw-r--r--languages/classes/LanguageLn.php18
-rw-r--r--languages/classes/LanguageLv.php3
-rw-r--r--languages/classes/LanguageMg.php16
-rw-r--r--languages/classes/LanguageMk.php21
-rw-r--r--languages/classes/LanguageMl.php22
-rw-r--r--languages/classes/LanguageMo.php23
-rw-r--r--languages/classes/LanguageNso.php16
-rw-r--r--languages/classes/LanguagePl.php8
-rw-r--r--languages/classes/LanguageRo.php23
-rw-r--r--languages/classes/LanguageRu.php2
-rw-r--r--languages/classes/LanguageSe.php22
-rw-r--r--languages/classes/LanguageSh.php29
-rw-r--r--languages/classes/LanguageSma.php22
-rw-r--r--languages/classes/LanguageSr.php36
-rw-r--r--languages/classes/LanguageTi.php16
-rw-r--r--languages/classes/LanguageTl.php16
-rw-r--r--languages/classes/LanguageTr.php2
-rw-r--r--languages/classes/LanguageUk.php2
-rw-r--r--languages/classes/LanguageWa.php12
-rw-r--r--languages/classes/LanguageYue.php31
-rw-r--r--languages/classes/LanguageZh.php39
-rw-r--r--languages/classes/LanguageZh_hans.php43
-rw-r--r--languages/messages/MessagesAb.php45
-rw-r--r--languages/messages/MessagesAce.php107
-rw-r--r--languages/messages/MessagesAf.php1034
-rw-r--r--languages/messages/MessagesAk.php2
-rw-r--r--languages/messages/MessagesAln.php457
-rw-r--r--languages/messages/MessagesAls.php3
-rw-r--r--languages/messages/MessagesAm.php268
-rw-r--r--languages/messages/MessagesAn.php987
-rw-r--r--languages/messages/MessagesAng.php260
-rw-r--r--languages/messages/MessagesAr.php1175
-rw-r--r--languages/messages/MessagesArc.php437
-rw-r--r--languages/messages/MessagesArn.php89
-rw-r--r--languages/messages/MessagesArz.php1290
-rw-r--r--languages/messages/MessagesAs.php394
-rw-r--r--languages/messages/MessagesAst.php376
-rw-r--r--languages/messages/MessagesAv.php17
-rw-r--r--languages/messages/MessagesAvk.php217
-rw-r--r--languages/messages/MessagesAy.php22
-rw-r--r--languages/messages/MessagesAz.php533
-rw-r--r--languages/messages/MessagesBa.php608
-rw-r--r--languages/messages/MessagesBar.php110
-rw-r--r--languages/messages/MessagesBat_smg.php232
-rw-r--r--languages/messages/MessagesBcc.php713
-rw-r--r--languages/messages/MessagesBcl.php423
-rw-r--r--languages/messages/MessagesBe.php509
-rw-r--r--languages/messages/MessagesBe_tarask.php964
-rw-r--r--languages/messages/MessagesBe_x_old.php3
-rw-r--r--languages/messages/MessagesBg.php923
-rw-r--r--languages/messages/MessagesBh.php119
-rw-r--r--languages/messages/MessagesBi.php10
-rw-r--r--languages/messages/MessagesBm.php15
-rw-r--r--languages/messages/MessagesBn.php612
-rw-r--r--languages/messages/MessagesBo.php24
-rw-r--r--languages/messages/MessagesBpy.php359
-rw-r--r--languages/messages/MessagesBqi.php104
-rw-r--r--languages/messages/MessagesBr.php971
-rw-r--r--languages/messages/MessagesBs.php1054
-rw-r--r--languages/messages/MessagesBug.php72
-rw-r--r--languages/messages/MessagesCa.php958
-rw-r--r--languages/messages/MessagesCbk_zam.php9
-rw-r--r--languages/messages/MessagesCdo.php213
-rw-r--r--languages/messages/MessagesCe.php200
-rw-r--r--languages/messages/MessagesCeb.php485
-rw-r--r--languages/messages/MessagesCh.php197
-rw-r--r--languages/messages/MessagesChr.php14
-rw-r--r--languages/messages/MessagesCkb.php12
-rw-r--r--languages/messages/MessagesCkb_arab.php2997
-rw-r--r--languages/messages/MessagesCkb_latn.php12
-rw-r--r--languages/messages/MessagesCo.php55
-rw-r--r--languages/messages/MessagesCps.php946
-rw-r--r--languages/messages/MessagesCrh.php3
-rw-r--r--languages/messages/MessagesCrh_cyrl.php555
-rw-r--r--languages/messages/MessagesCrh_latn.php556
-rw-r--r--languages/messages/MessagesCs.php1116
-rw-r--r--languages/messages/MessagesCsb.php117
-rw-r--r--languages/messages/MessagesCu.php125
-rw-r--r--languages/messages/MessagesCv.php224
-rw-r--r--languages/messages/MessagesCy.php1039
-rw-r--r--languages/messages/MessagesDa.php968
-rw-r--r--languages/messages/MessagesDe.php1084
-rw-r--r--languages/messages/MessagesDe_ch.php5
-rw-r--r--languages/messages/MessagesDe_formal.php125
-rw-r--r--languages/messages/MessagesDiq.php933
-rw-r--r--languages/messages/MessagesDk.php3
-rw-r--r--languages/messages/MessagesDsb.php963
-rw-r--r--languages/messages/MessagesDv.php50
-rw-r--r--languages/messages/MessagesDz.php95
-rw-r--r--languages/messages/MessagesEe.php134
-rw-r--r--languages/messages/MessagesEl.php974
-rw-r--r--languages/messages/MessagesEml.php12
-rw-r--r--languages/messages/MessagesEn.php1192
-rw-r--r--languages/messages/MessagesEnRTL.php3
-rw-r--r--languages/messages/MessagesEn_gb.php2
-rw-r--r--languages/messages/MessagesEo.php964
-rw-r--r--languages/messages/MessagesEs.php1112
-rw-r--r--languages/messages/MessagesEt.php1134
-rw-r--r--languages/messages/MessagesEu.php922
-rw-r--r--languages/messages/MessagesExt.php327
-rw-r--r--languages/messages/MessagesFa.php984
-rw-r--r--languages/messages/MessagesFf.php2
-rw-r--r--languages/messages/MessagesFi.php956
-rw-r--r--languages/messages/MessagesFiu_vro.php3
-rw-r--r--languages/messages/MessagesFj.php18
-rw-r--r--languages/messages/MessagesFo.php151
-rw-r--r--languages/messages/MessagesFr.php1186
-rw-r--r--languages/messages/MessagesFrc.php245
-rw-r--r--languages/messages/MessagesFrp.php1235
-rw-r--r--languages/messages/MessagesFrr.php1213
-rw-r--r--languages/messages/MessagesFur.php603
-rw-r--r--languages/messages/MessagesFy.php496
-rw-r--r--languages/messages/MessagesGa.php438
-rw-r--r--languages/messages/MessagesGag.php184
-rw-r--r--languages/messages/MessagesGan.php2179
-rw-r--r--languages/messages/MessagesGan_hans.php347
-rw-r--r--languages/messages/MessagesGan_hant.php372
-rw-r--r--languages/messages/MessagesGd.php151
-rw-r--r--languages/messages/MessagesGl.php1090
-rw-r--r--languages/messages/MessagesGlk.php8
-rw-r--r--languages/messages/MessagesGn.php43
-rw-r--r--languages/messages/MessagesGot.php44
-rw-r--r--languages/messages/MessagesGrc.php746
-rw-r--r--languages/messages/MessagesGsw.php966
-rw-r--r--languages/messages/MessagesGu.php420
-rw-r--r--languages/messages/MessagesGv.php175
-rw-r--r--languages/messages/MessagesHa.php721
-rw-r--r--languages/messages/MessagesHak.php272
-rw-r--r--languages/messages/MessagesHaw.php287
-rw-r--r--languages/messages/MessagesHe.php1321
-rw-r--r--languages/messages/MessagesHi.php758
-rw-r--r--languages/messages/MessagesHif.php3
-rw-r--r--languages/messages/MessagesHif_latn.php949
-rw-r--r--languages/messages/MessagesHil.php52
-rw-r--r--languages/messages/MessagesHr.php967
-rw-r--r--languages/messages/MessagesHsb.php951
-rw-r--r--languages/messages/MessagesHt.php178
-rw-r--r--languages/messages/MessagesHu.php1022
-rw-r--r--languages/messages/MessagesHy.php699
-rw-r--r--languages/messages/MessagesIa.php960
-rw-r--r--languages/messages/MessagesId.php1366
-rw-r--r--languages/messages/MessagesIe.php36
-rw-r--r--languages/messages/MessagesIg.php274
-rw-r--r--languages/messages/MessagesIke_cans.php57
-rw-r--r--languages/messages/MessagesIke_latn.php53
-rw-r--r--languages/messages/MessagesIlo.php225
-rw-r--r--languages/messages/MessagesInh.php28
-rw-r--r--languages/messages/MessagesIo.php496
-rw-r--r--languages/messages/MessagesIs.php501
-rw-r--r--languages/messages/MessagesIt.php1006
-rw-r--r--languages/messages/MessagesIu.php3
-rw-r--r--languages/messages/MessagesJa.php1096
-rw-r--r--languages/messages/MessagesJbo.php25
-rw-r--r--languages/messages/MessagesJut.php130
-rw-r--r--languages/messages/MessagesJv.php733
-rw-r--r--languages/messages/MessagesKa.php958
-rw-r--r--languages/messages/MessagesKaa.php248
-rw-r--r--languages/messages/MessagesKab.php238
-rw-r--r--languages/messages/MessagesKg.php12
-rw-r--r--languages/messages/MessagesKiu.php1411
-rw-r--r--languages/messages/MessagesKk_arab.php564
-rw-r--r--languages/messages/MessagesKk_cn.php3
-rw-r--r--languages/messages/MessagesKk_cyrl.php595
-rw-r--r--languages/messages/MessagesKk_kz.php3
-rw-r--r--languages/messages/MessagesKk_latn.php562
-rw-r--r--languages/messages/MessagesKk_tr.php3
-rw-r--r--languages/messages/MessagesKl.php197
-rw-r--r--languages/messages/MessagesKm.php943
-rw-r--r--languages/messages/MessagesKn.php389
-rw-r--r--languages/messages/MessagesKo.php1029
-rw-r--r--languages/messages/MessagesKo_kp.php33
-rw-r--r--languages/messages/MessagesKoi.php630
-rw-r--r--languages/messages/MessagesKrc.php3219
-rw-r--r--languages/messages/MessagesKri.php41
-rw-r--r--languages/messages/MessagesKrj.php33
-rw-r--r--languages/messages/MessagesKs.php3
-rw-r--r--languages/messages/MessagesKsh.php975
-rw-r--r--languages/messages/MessagesKu.php3
-rw-r--r--languages/messages/MessagesKu_arab.php1065
-rw-r--r--languages/messages/MessagesKu_latn.php239
-rw-r--r--languages/messages/MessagesKv.php4
-rw-r--r--languages/messages/MessagesKw.php355
-rw-r--r--languages/messages/MessagesKy.php78
-rw-r--r--languages/messages/MessagesLa.php510
-rw-r--r--languages/messages/MessagesLad.php112
-rw-r--r--languages/messages/MessagesLb.php1015
-rw-r--r--languages/messages/MessagesLbe.php13
-rw-r--r--languages/messages/MessagesLez.php15
-rw-r--r--languages/messages/MessagesLfn.php148
-rw-r--r--languages/messages/MessagesLg.php76
-rw-r--r--languages/messages/MessagesLi.php745
-rw-r--r--languages/messages/MessagesLij.php192
-rw-r--r--languages/messages/MessagesLld.php9
-rw-r--r--languages/messages/MessagesLmo.php425
-rw-r--r--languages/messages/MessagesLn.php88
-rw-r--r--languages/messages/MessagesLo.php97
-rw-r--r--languages/messages/MessagesLoz.php304
-rw-r--r--languages/messages/MessagesLt.php989
-rw-r--r--languages/messages/MessagesLtg.php746
-rw-r--r--languages/messages/MessagesLv.php472
-rw-r--r--languages/messages/MessagesLzh.php891
-rw-r--r--languages/messages/MessagesLzz.php78
-rw-r--r--languages/messages/MessagesMai.php11
-rw-r--r--languages/messages/MessagesMap_bms.php4
-rw-r--r--languages/messages/MessagesMdf.php387
-rw-r--r--languages/messages/MessagesMg.php876
-rw-r--r--languages/messages/MessagesMhr.php260
-rw-r--r--languages/messages/MessagesMi.php12
-rw-r--r--languages/messages/MessagesMk.php974
-rw-r--r--languages/messages/MessagesMl.php1336
-rw-r--r--languages/messages/MessagesMn.php556
-rw-r--r--languages/messages/MessagesMo.php13
-rw-r--r--languages/messages/MessagesMr.php419
-rw-r--r--languages/messages/MessagesMrj.php716
-rw-r--r--languages/messages/MessagesMs.php762
-rw-r--r--languages/messages/MessagesMt.php718
-rw-r--r--languages/messages/MessagesMwl.php184
-rw-r--r--languages/messages/MessagesMy.php43
-rw-r--r--languages/messages/MessagesMyv.php533
-rw-r--r--languages/messages/MessagesMzn.php301
-rw-r--r--languages/messages/MessagesNa.php14
-rw-r--r--languages/messages/MessagesNah.php324
-rw-r--r--languages/messages/MessagesNan.php154
-rw-r--r--languages/messages/MessagesNap.php54
-rw-r--r--languages/messages/MessagesNb.php3
-rw-r--r--languages/messages/MessagesNds.php691
-rw-r--r--languages/messages/MessagesNds_nl.php1076
-rw-r--r--languages/messages/MessagesNe.php630
-rw-r--r--languages/messages/MessagesNew.php47
-rw-r--r--languages/messages/MessagesNiu.php24
-rw-r--r--languages/messages/MessagesNl.php1032
-rw-r--r--languages/messages/MessagesNn.php931
-rw-r--r--languages/messages/MessagesNo.php985
-rw-r--r--languages/messages/MessagesNov.php54
-rw-r--r--languages/messages/MessagesNso.php221
-rw-r--r--languages/messages/MessagesNv.php41
-rw-r--r--languages/messages/MessagesOc.php1074
-rw-r--r--languages/messages/MessagesOr.php4
-rw-r--r--languages/messages/MessagesOs.php289
-rw-r--r--languages/messages/MessagesPa.php218
-rw-r--r--languages/messages/MessagesPag.php66
-rw-r--r--languages/messages/MessagesPam.php309
-rw-r--r--languages/messages/MessagesPap.php43
-rw-r--r--languages/messages/MessagesPcd.php856
-rw-r--r--languages/messages/MessagesPdc.php254
-rw-r--r--languages/messages/MessagesPdt.php80
-rw-r--r--languages/messages/MessagesPfl.php41
-rw-r--r--languages/messages/MessagesPih.php4
-rw-r--r--languages/messages/MessagesPl.php975
-rw-r--r--languages/messages/MessagesPms.php1006
-rw-r--r--languages/messages/MessagesPnb.php269
-rw-r--r--languages/messages/MessagesPnt.php286
-rw-r--r--languages/messages/MessagesPrg.php2846
-rw-r--r--languages/messages/MessagesPs.php472
-rw-r--r--languages/messages/MessagesPt.php1262
-rw-r--r--languages/messages/MessagesPt_br.php1123
-rw-r--r--languages/messages/MessagesQqq.php1096
-rw-r--r--languages/messages/MessagesQu.php1116
-rw-r--r--languages/messages/MessagesRgn.php683
-rw-r--r--languages/messages/MessagesRif.php114
-rw-r--r--languages/messages/MessagesRm.php358
-rw-r--r--languages/messages/MessagesRmy.php136
-rw-r--r--languages/messages/MessagesRo.php1111
-rw-r--r--languages/messages/MessagesRoa_rup.php22
-rw-r--r--languages/messages/MessagesRoa_tara.php940
-rw-r--r--languages/messages/MessagesRu.php1052
-rw-r--r--languages/messages/MessagesRue.php2069
-rw-r--r--languages/messages/MessagesRuq.php3
-rw-r--r--languages/messages/MessagesRuq_cyrl.php10
-rw-r--r--languages/messages/MessagesRuq_grek.php9
-rw-r--r--languages/messages/MessagesRuq_latn.php10
-rw-r--r--languages/messages/MessagesSa.php115
-rw-r--r--languages/messages/MessagesSah.php977
-rw-r--r--languages/messages/MessagesSc.php352
-rw-r--r--languages/messages/MessagesScn.php743
-rw-r--r--languages/messages/MessagesSco.php228
-rw-r--r--languages/messages/MessagesSd.php157
-rw-r--r--languages/messages/MessagesSdc.php323
-rw-r--r--languages/messages/MessagesSe.php195
-rw-r--r--languages/messages/MessagesSei.php197
-rw-r--r--languages/messages/MessagesSg.php6
-rw-r--r--languages/messages/MessagesSh.php584
-rw-r--r--languages/messages/MessagesShi.php177
-rw-r--r--languages/messages/MessagesSi.php941
-rw-r--r--languages/messages/MessagesSimple.php3
-rw-r--r--languages/messages/MessagesSk.php1034
-rw-r--r--languages/messages/MessagesSl.php1125
-rw-r--r--languages/messages/MessagesSli.php2856
-rw-r--r--languages/messages/MessagesSm.php6
-rw-r--r--languages/messages/MessagesSma.php115
-rw-r--r--languages/messages/MessagesSn.php16
-rw-r--r--languages/messages/MessagesSo.php86
-rw-r--r--languages/messages/MessagesSq.php552
-rw-r--r--languages/messages/MessagesSr_ec.php1020
-rw-r--r--languages/messages/MessagesSr_el.php1014
-rw-r--r--languages/messages/MessagesSrn.php359
-rw-r--r--languages/messages/MessagesSs.php60
-rw-r--r--languages/messages/MessagesSt.php4
-rw-r--r--languages/messages/MessagesStq.php954
-rw-r--r--languages/messages/MessagesSu.php608
-rw-r--r--languages/messages/MessagesSv.php993
-rw-r--r--languages/messages/MessagesSw.php792
-rw-r--r--languages/messages/MessagesSzl.php286
-rw-r--r--languages/messages/MessagesTa.php278
-rw-r--r--languages/messages/MessagesTcy.php85
-rw-r--r--languages/messages/MessagesTe.php1059
-rw-r--r--languages/messages/MessagesTet.php158
-rw-r--r--languages/messages/MessagesTg.php3
-rw-r--r--languages/messages/MessagesTg_cyrl.php416
-rw-r--r--languages/messages/MessagesTg_latn.php2417
-rw-r--r--languages/messages/MessagesTh.php910
-rw-r--r--languages/messages/MessagesTi.php21
-rw-r--r--languages/messages/MessagesTk.php972
-rw-r--r--languages/messages/MessagesTl.php999
-rw-r--r--languages/messages/MessagesTlh.php28
-rw-r--r--languages/messages/MessagesTn.php8
-rw-r--r--languages/messages/MessagesTo.php113
-rw-r--r--languages/messages/MessagesTokipona.php11
-rw-r--r--languages/messages/MessagesTp.php3
-rw-r--r--languages/messages/MessagesTpi.php16
-rw-r--r--languages/messages/MessagesTr.php1137
-rw-r--r--languages/messages/MessagesTs.php40
-rw-r--r--languages/messages/MessagesTt.php5
-rw-r--r--languages/messages/MessagesTt_cyrl.php500
-rw-r--r--languages/messages/MessagesTt_latn.php222
-rw-r--r--languages/messages/MessagesTy.php23
-rw-r--r--languages/messages/MessagesTyv.php177
-rw-r--r--languages/messages/MessagesUdm.php17
-rw-r--r--languages/messages/MessagesUg.php3
-rw-r--r--languages/messages/MessagesUg_arab.php3212
-rw-r--r--languages/messages/MessagesUg_latn.php27
-rw-r--r--languages/messages/MessagesUk.php1074
-rw-r--r--languages/messages/MessagesUr.php522
-rw-r--r--languages/messages/MessagesUz.php96
-rw-r--r--languages/messages/MessagesVe.php2
-rw-r--r--languages/messages/MessagesVec.php983
-rw-r--r--languages/messages/MessagesVep.php913
-rw-r--r--languages/messages/MessagesVi.php1002
-rw-r--r--languages/messages/MessagesVls.php34
-rw-r--r--languages/messages/MessagesVmf.php985
-rw-r--r--languages/messages/MessagesVo.php480
-rw-r--r--languages/messages/MessagesVot.php642
-rw-r--r--languages/messages/MessagesVro.php315
-rw-r--r--languages/messages/MessagesWa.php381
-rw-r--r--languages/messages/MessagesWar.php105
-rw-r--r--languages/messages/MessagesWo.php555
-rw-r--r--languages/messages/MessagesWuu.php458
-rw-r--r--languages/messages/MessagesXal.php363
-rw-r--r--languages/messages/MessagesXh.php15
-rw-r--r--languages/messages/MessagesXmf.php61
-rw-r--r--languages/messages/MessagesYdd.php10
-rw-r--r--languages/messages/MessagesYi.php880
-rw-r--r--languages/messages/MessagesYo.php623
-rw-r--r--languages/messages/MessagesYue.php982
-rw-r--r--languages/messages/MessagesZa.php33
-rw-r--r--languages/messages/MessagesZea.php384
-rw-r--r--languages/messages/MessagesZh.php16
-rw-r--r--languages/messages/MessagesZh_classical.php3
-rw-r--r--languages/messages/MessagesZh_cn.php4
-rw-r--r--languages/messages/MessagesZh_hans.php1011
-rw-r--r--languages/messages/MessagesZh_hant.php1068
-rw-r--r--languages/messages/MessagesZh_hk.php111
-rw-r--r--languages/messages/MessagesZh_min_nan.php3
-rw-r--r--languages/messages/MessagesZh_mo.php3
-rw-r--r--languages/messages/MessagesZh_my.php3
-rw-r--r--languages/messages/MessagesZh_sg.php3
-rw-r--r--languages/messages/MessagesZh_tw.php1748
-rw-r--r--languages/messages/MessagesZh_yue.php3
-rw-r--r--languages/messages/MessagesZu.php33
-rw-r--r--maintenance/7zip.inc69
-rw-r--r--maintenance/Doxyfile2
-rw-r--r--maintenance/FiveUpgrade.inc2
-rw-r--r--maintenance/Maintenance.php860
-rw-r--r--maintenance/README6
-rw-r--r--maintenance/addwiki.php412
-rw-r--r--maintenance/apache-ampersand.diff53
-rw-r--r--maintenance/archives/patch-change_tag-indexes.sql21
-rw-r--r--maintenance/archives/patch-eu_local_id.sql3
-rw-r--r--maintenance/archives/patch-external_user.sql9
-rw-r--r--maintenance/archives/patch-filearchive-user-index.sql (renamed from maintenance/archives/patch-filearhive-user-index.sql)0
-rw-r--r--maintenance/archives/patch-job.sql18
-rw-r--r--maintenance/archives/patch-l10n_cache.sql8
-rw-r--r--maintenance/archives/patch-log_search-rename-index.sql7
-rw-r--r--maintenance/archives/patch-log_search.sql10
-rw-r--r--maintenance/archives/patch-log_user_text.sql5
-rw-r--r--maintenance/archives/patch-mime_minor_length.sql10
-rw-r--r--maintenance/archives/patch-rd_interwiki.sql6
-rw-r--r--maintenance/archives/patch-tc-timestamp.sql4
-rw-r--r--maintenance/archives/patch-transcache.sql2
-rw-r--r--maintenance/archives/patch-user_properties.sql22
-rw-r--r--maintenance/archives/populateSha1.php59
-rw-r--r--maintenance/archives/rebuildRecentchanges.inc123
-rw-r--r--maintenance/archives/upgradeWatchlist.php67
-rw-r--r--maintenance/attachLatest.php96
-rw-r--r--maintenance/attribute.php106
-rw-r--r--maintenance/backup.inc18
-rw-r--r--maintenance/benchmarkPurge.php157
-rw-r--r--maintenance/changePassword.php78
-rw-r--r--maintenance/checkAutoLoader.php70
-rw-r--r--maintenance/checkBadRedirects.php75
-rw-r--r--maintenance/checkImages.php121
-rw-r--r--maintenance/checkSyntax.php296
-rw-r--r--maintenance/checkUsernames.php44
-rw-r--r--maintenance/cleanupCaps.php57
-rw-r--r--maintenance/cleanupImages.php88
-rw-r--r--maintenance/cleanupSpam.php211
-rw-r--r--maintenance/cleanupTable.inc161
-rw-r--r--maintenance/cleanupTitles.php67
-rw-r--r--maintenance/cleanupWatchlist.php60
-rw-r--r--maintenance/clear_interwiki_cache.php56
-rw-r--r--maintenance/clear_stats.php71
-rw-r--r--maintenance/commandLine.inc269
-rw-r--r--maintenance/convertLinks.inc6
-rw-r--r--maintenance/convertLinks.php239
-rw-r--r--maintenance/convertUserOptions.php72
-rw-r--r--maintenance/counter.php12
-rw-r--r--maintenance/createAndPromote.php111
-rw-r--r--maintenance/deleteArchivedFiles.inc56
-rw-r--r--maintenance/deleteArchivedFiles.php85
-rw-r--r--maintenance/deleteArchivedRevisions.inc34
-rw-r--r--maintenance/deleteArchivedRevisions.php71
-rw-r--r--maintenance/deleteBatch.php172
-rw-r--r--maintenance/deleteDefaultMessages.php90
-rw-r--r--maintenance/deleteImageMemcached.php73
-rw-r--r--maintenance/deleteOldRevisions.inc68
-rw-r--r--maintenance/deleteOldRevisions.php102
-rw-r--r--maintenance/deleteOrphanedRevisions.inc.php32
-rw-r--r--maintenance/deleteOrphanedRevisions.php118
-rw-r--r--maintenance/deleteRevision.php104
-rw-r--r--maintenance/deleteSelfExternals.php54
-rw-r--r--maintenance/doMaintenance.php102
-rw-r--r--maintenance/dumpBackup.php20
-rw-r--r--maintenance/dumpInterwiki.inc3
-rw-r--r--maintenance/dumpInterwiki.php7
-rw-r--r--maintenance/dumpLinks.php60
-rw-r--r--maintenance/dumpSisterSites.php47
-rw-r--r--maintenance/dumpTextPass.php80
-rw-r--r--maintenance/dumpUploads.php87
-rw-r--r--maintenance/edit.php144
-rw-r--r--maintenance/fetchInterwiki.pl102
-rw-r--r--maintenance/fetchText.php82
-rw-r--r--maintenance/findhooks.php285
-rw-r--r--maintenance/fixSlaveDesync.php335
-rw-r--r--maintenance/fixTimestamps.php200
-rw-r--r--maintenance/fixUserRegistration.php61
-rw-r--r--maintenance/fuzz-tester.php8
-rw-r--r--maintenance/gearman/gearman.inc2
-rw-r--r--maintenance/gearman/gearmanWorker.php2
-rw-r--r--maintenance/generateSitemap.php158
-rw-r--r--maintenance/getLagTimes.php59
-rw-r--r--maintenance/getSlaveServer.php60
-rw-r--r--maintenance/getText.php58
-rw-r--r--maintenance/httpSessionDownload.php57
-rw-r--r--maintenance/ibm_db2/README40
-rw-r--r--maintenance/ibm_db2/tables.sql551
-rw-r--r--maintenance/importDump.php13
-rw-r--r--maintenance/importImages.inc (renamed from maintenance/importImages.inc.php)30
-rw-r--r--maintenance/importImages.php168
-rw-r--r--maintenance/importLogs.inc144
-rw-r--r--maintenance/importLogs.php27
-rw-r--r--maintenance/importTextFile.php4
-rw-r--r--maintenance/importUseModWiki.php16
-rw-r--r--maintenance/initEditCount.php161
-rw-r--r--maintenance/initStats.inc57
-rw-r--r--maintenance/initStats.php87
-rw-r--r--maintenance/install-utils.inc (renamed from install-utils.inc)124
-rw-r--r--maintenance/installExtension.php2
-rw-r--r--maintenance/interwiki.sql18
-rw-r--r--maintenance/lag.php51
-rw-r--r--maintenance/language/StatOutputs.php14
-rw-r--r--maintenance/language/alltrans.php40
-rw-r--r--maintenance/language/checkDupeMessages.php118
-rw-r--r--maintenance/language/checkExtensions.php4
-rw-r--r--maintenance/language/checkLanguage.inc39
-rw-r--r--maintenance/language/countMessages.php87
-rw-r--r--maintenance/language/date-formats.php102
-rw-r--r--maintenance/language/diffLanguage.php6
-rw-r--r--maintenance/language/digit2html.php68
-rw-r--r--maintenance/language/dumpMessages.php48
-rw-r--r--maintenance/language/generateNormalizerData.php137
-rw-r--r--maintenance/language/lang2po.php225
-rw-r--r--maintenance/language/langmemusage.php58
-rw-r--r--maintenance/language/languages.inc18
-rw-r--r--maintenance/language/makeMessageDB.php45
-rw-r--r--maintenance/language/messageTypes.inc25
-rw-r--r--maintenance/language/messages.inc520
-rw-r--r--maintenance/language/rebuildLanguage.php55
-rw-r--r--maintenance/language/transstat.php71
-rw-r--r--maintenance/language/writeMessagesArray.inc25
-rw-r--r--maintenance/mcc.php84
-rw-r--r--maintenance/mctest.php112
-rw-r--r--maintenance/mergeMessageFileList.php72
-rw-r--r--maintenance/migrateUserGroup.php70
-rw-r--r--maintenance/minify.php111
-rw-r--r--maintenance/moveBatch.php157
-rw-r--r--maintenance/mwdocgen.php15
-rw-r--r--maintenance/namespace2sql.php18
-rw-r--r--maintenance/namespaceDupes.php244
-rw-r--r--maintenance/nextJobDB.php127
-rw-r--r--maintenance/nukeNS.php158
-rw-r--r--maintenance/nukePage.inc91
-rw-r--r--maintenance/nukePage.php114
-rw-r--r--maintenance/ora/patch_seq_names_pre1.16.sql8
-rw-r--r--maintenance/ora/tables.sql1129
-rw-r--r--maintenance/ora/user.sql16
-rw-r--r--maintenance/orphans.php371
-rw-r--r--maintenance/ourusers.php1
-rw-r--r--maintenance/parserTests.inc731
-rw-r--r--maintenance/parserTests.php15
-rw-r--r--maintenance/parserTests.txt972
-rw-r--r--maintenance/patchSql.php69
-rw-r--r--maintenance/populateCategory.php128
-rw-r--r--maintenance/populateLogSearch.inc80
-rw-r--r--maintenance/populateLogSearch.php153
-rw-r--r--maintenance/populateLogUsertext.php82
-rw-r--r--maintenance/populateParentId.php119
-rw-r--r--maintenance/populateSha1.php101
-rw-r--r--maintenance/postgres/archives/patch-l10n_cache.sql8
-rw-r--r--maintenance/postgres/archives/patch-log_search.sql9
-rw-r--r--maintenance/postgres/archives/patch-update_sequences.sql20
-rw-r--r--maintenance/postgres/archives/patch-user_properties.sql8
-rw-r--r--maintenance/postgres/compare_schemas.pl15
-rw-r--r--maintenance/postgres/mediawiki_mysql2postgres.pl6
-rw-r--r--maintenance/postgres/tables.sql71
-rw-r--r--maintenance/preprocessorFuzzTest.php5
-rw-r--r--maintenance/protect.php68
-rw-r--r--maintenance/purgeList.php74
-rw-r--r--maintenance/purgeOldText.inc4
-rw-r--r--maintenance/purgeOldText.php46
-rw-r--r--maintenance/reassignEdits.inc.php143
-rw-r--r--maintenance/reassignEdits.php197
-rw-r--r--maintenance/rebuildFileCache.php179
-rw-r--r--maintenance/rebuildImages.php8
-rw-r--r--maintenance/rebuildInterwiki.inc1
-rw-r--r--maintenance/rebuildInterwiki.php3
-rw-r--r--maintenance/rebuildLocalisationCache.php133
-rw-r--r--maintenance/rebuildall.php78
-rw-r--r--maintenance/rebuildmessages.php56
-rw-r--r--maintenance/rebuildrecentchanges.inc246
-rw-r--r--maintenance/rebuildrecentchanges.php292
-rw-r--r--maintenance/rebuildtextindex.inc66
-rw-r--r--maintenance/rebuildtextindex.php132
-rw-r--r--maintenance/refreshImageCount.php65
-rw-r--r--maintenance/refreshLinks.inc202
-rw-r--r--maintenance/refreshLinks.php313
-rw-r--r--maintenance/removeUnusedAccounts.inc46
-rw-r--r--maintenance/removeUnusedAccounts.php150
-rw-r--r--maintenance/renameDbPrefix.php129
-rw-r--r--maintenance/renamewiki.php115
-rw-r--r--maintenance/renderDump.php75
-rw-r--r--maintenance/rollbackEdits.php97
-rw-r--r--maintenance/runBatchedQuery.php60
-rw-r--r--maintenance/runJobs.php141
-rw-r--r--maintenance/showJobs.php49
-rw-r--r--maintenance/showStats.php78
-rw-r--r--maintenance/sql.php108
-rw-r--r--maintenance/sqlite.php113
-rw-r--r--maintenance/sqlite/archives/initial-indexes.sql39
-rw-r--r--maintenance/sqlite/archives/patch-log_user_text.sql5
-rw-r--r--maintenance/sqlite/archives/patch-rd_interwiki.sql5
-rw-r--r--maintenance/sqlite/archives/patch-tc-timestamp.sql3
-rw-r--r--maintenance/sqlite/archives/searchindex-fts3.sql18
-rw-r--r--maintenance/sqlite/archives/searchindex-no-fts.sql25
-rw-r--r--maintenance/stats.php127
-rw-r--r--maintenance/storage/compressOld.inc6
-rw-r--r--maintenance/storage/compressOld.php2
-rw-r--r--maintenance/storage/dumpRev.php111
-rw-r--r--maintenance/storage/fixBug20757.php314
-rwxr-xr-xmaintenance/storage/make-blobs11
-rw-r--r--maintenance/storage/moveToExternal.php2
-rw-r--r--maintenance/storage/orphanStats.php43
-rw-r--r--maintenance/storage/recompressTracked.php57
-rw-r--r--maintenance/storage/resolveStubs.php10
-rw-r--r--maintenance/storage/storageTypeStats.php98
-rw-r--r--maintenance/storage/trackBlobs.php28
-rw-r--r--maintenance/tables.sql99
-rw-r--r--maintenance/testRunner.ora.sql37
-rw-r--r--maintenance/tests/.svnignore (renamed from tests/.svnignore)0
-rw-r--r--maintenance/tests/ApiSetup.php39
-rw-r--r--maintenance/tests/ApiTest.php164
-rw-r--r--maintenance/tests/CdbTest.php79
-rw-r--r--maintenance/tests/DatabaseSqliteTest.php57
-rw-r--r--maintenance/tests/DatabaseTest.php (renamed from tests/DatabaseTest.php)32
-rw-r--r--maintenance/tests/GlobalTest.php (renamed from tests/GlobalTest.php)0
-rw-r--r--maintenance/tests/HttpTest.php567
-rw-r--r--maintenance/tests/IPTest.php52
-rw-r--r--maintenance/tests/ImageFunctionsTest.php (renamed from tests/ImageFunctionsTest.php)0
-rw-r--r--maintenance/tests/LanguageConverterTest.php148
-rw-r--r--maintenance/tests/LicensesTest.php17
-rw-r--r--maintenance/tests/LocalFileTest.php (renamed from tests/LocalFileTest.php)15
-rw-r--r--maintenance/tests/Makefile23
-rw-r--r--maintenance/tests/MediaWikiParserTest.php283
-rw-r--r--maintenance/tests/MediaWiki_Setup.php28
-rw-r--r--maintenance/tests/README24
-rw-r--r--maintenance/tests/RevisionTest.php (renamed from tests/ArticleTest.php)6
-rw-r--r--maintenance/tests/SanitizerTest.php73
-rw-r--r--maintenance/tests/SearchEngineTest.php (renamed from tests/SearchEngineTest.php)98
-rw-r--r--maintenance/tests/SearchMySQLTest.php (renamed from tests/SearchMySQL4Test.php)13
-rw-r--r--maintenance/tests/SearchUpdateTest.php103
-rw-r--r--maintenance/tests/SiteConfigurationTest.php311
-rw-r--r--maintenance/tests/TimeAdjustTest.php40
-rw-r--r--maintenance/tests/TitleTest.php17
-rw-r--r--maintenance/tests/XmlTest.php115
-rw-r--r--maintenance/tests/bootstrap.php15
-rw-r--r--maintenance/tests/phpunit.xml17
-rw-r--r--maintenance/tests/test-prefetch-current.xml (renamed from tests/test-prefetch-current.xml)0
-rw-r--r--maintenance/tests/test-prefetch-previous.xml (renamed from tests/test-prefetch-previous.xml)0
-rw-r--r--maintenance/tests/test-prefetch-stub.xml (renamed from tests/test-prefetch-stub.xml)0
-rw-r--r--maintenance/undelete.php51
-rw-r--r--maintenance/update.php56
-rw-r--r--maintenance/updateArticleCount.inc.php61
-rw-r--r--maintenance/updateArticleCount.php113
-rw-r--r--maintenance/updateRestrictions.php160
-rw-r--r--maintenance/updateSearchIndex.inc115
-rw-r--r--maintenance/updateSearchIndex.php186
-rw-r--r--maintenance/updateSpecialPages.php215
-rw-r--r--maintenance/updaters.inc532
-rw-r--r--maintenance/upgrade1_5.php2
-rw-r--r--maintenance/userOptions.inc10
-rw-r--r--maintenance/users.sql6
-rw-r--r--maintenance/waitForSlave.php35
-rw-r--r--maintenance/wikipedia-interwiki.sql7
-rw-r--r--math/README4
-rw-r--r--math/render.ml6
-rw-r--r--math/texutil.ml4
-rw-r--r--math/texvc.ml6
-rw-r--r--php5.php52
-rw-r--r--profileinfo.php132
-rw-r--r--redirect.phtml1
-rw-r--r--serialized/Makefile16
-rw-r--r--serialized/README37
-rw-r--r--serialized/normalize-ar.ser1
-rw-r--r--serialized/normalize-ml.ser1
-rw-r--r--serialized/serialize-localisation.php35
-rw-r--r--skins/ArchLinux.php199
-rw-r--r--skins/Chick.php16
-rw-r--r--skins/CologneBlue.php274
-rw-r--r--skins/Modern.php107
-rw-r--r--skins/MonoBook.php154
-rw-r--r--skins/MySkin.php14
-rw-r--r--skins/Nostalgia.php29
-rw-r--r--skins/Simple.php31
-rw-r--r--skins/Skin.sample19
-rw-r--r--skins/Standard.php182
-rw-r--r--skins/Vector.deps.php11
-rw-r--r--skins/Vector.php767
-rw-r--r--skins/archlinux/IEMacFixes.css44
-rw-r--r--skins/archlinux/discussionitem_icon.gifbin949 -> 549 bytes
-rw-r--r--skins/archlinux/file_icon.gifbin921 -> 323 bytes
-rw-r--r--skins/archlinux/link_icon.gifbin942 -> 342 bytes
-rw-r--r--skins/archlinux/lock_icon.gifbin918 -> 918 bytes
-rw-r--r--skins/archlinux/magnify-clip.pngbin237 -> 170 bytes
-rw-r--r--skins/archlinux/mail_icon.gifbin918 -> 321 bytes
-rw-r--r--skins/archlinux/main.css318
-rw-r--r--skins/archlinux/rtl.css18
-rw-r--r--skins/archlinux/user.gifbin923 -> 325 bytes
-rw-r--r--skins/archlinux/video.pngbin215 -> 169 bytes
-rw-r--r--skins/archlinux/wiki.pngbin23064 -> 22987 bytes
-rw-r--r--skins/chick/main.css390
-rw-r--r--skins/common/IE80Fixes.css15
-rw-r--r--skins/common/IEFixes.js205
-rw-r--r--skins/common/Makefile2
-rw-r--r--skins/common/ajaxwatch.js53
-rw-r--r--skins/common/allmessages.js83
-rw-r--r--skins/common/block.js37
-rw-r--r--skins/common/commonPrint.css36
-rw-r--r--skins/common/common_rtl.css7
-rw-r--r--skins/common/edit.js209
-rw-r--r--skins/common/history.js11
-rw-r--r--skins/common/htmlform.js40
-rw-r--r--skins/common/images/Arr_.pngbin918 -> 246 bytes
-rw-r--r--skins/common/images/Arr_r.xcfbin1437 -> 0 bytes
-rw-r--r--skins/common/images/Arr_u.pngbin1044 -> 425 bytes
-rw-r--r--skins/common/images/Zoom_sans.gifbin901 -> 901 bytes
-rw-r--r--skins/common/images/add.pngbin0 -> 3329 bytes
-rw-r--r--skins/common/images/ajax-loader.gifbin0 -> 3208 bytes
-rw-r--r--skins/common/images/arrow_first.svg85
-rw-r--r--skins/common/images/arrow_left.svg78
-rw-r--r--skins/common/images/be-tarask/button_bold.pngbin575 -> 554 bytes
-rw-r--r--skins/common/images/be-tarask/button_italic.pngbin638 -> 592 bytes
-rw-r--r--skins/common/images/be-tarask/button_link.pngbin550 -> 466 bytes
-rw-r--r--skins/common/images/button_bold.pngbin978 -> 288 bytes
-rw-r--r--skins/common/images/button_extlink.pngbin1093 -> 494 bytes
-rw-r--r--skins/common/images/button_headline.pngbin497 -> 465 bytes
-rw-r--r--skins/common/images/button_hr.pngbin372 -> 251 bytes
-rw-r--r--skins/common/images/button_image.pngbin1110 -> 584 bytes
-rw-r--r--skins/common/images/button_italic.pngbin975 -> 292 bytes
-rw-r--r--skins/common/images/button_link.pngbin434 -> 337 bytes
-rw-r--r--skins/common/images/button_math.pngbin730 -> 617 bytes
-rw-r--r--skins/common/images/button_media.pngbin1155 -> 780 bytes
-rw-r--r--skins/common/images/button_nowiki.pngbin375 -> 352 bytes
-rw-r--r--skins/common/images/button_sig.pngbin1217 -> 953 bytes
-rw-r--r--skins/common/images/button_template.pngbin362 -> 233 bytes
-rw-r--r--skins/common/images/cyrl/button_italic.pngbin461 -> 460 bytes
-rw-r--r--skins/common/images/cyrl/button_link.pngbin353 -> 347 bytes
-rw-r--r--skins/common/images/de/button_bold.pngbin1013 -> 328 bytes
-rw-r--r--skins/common/images/de/button_italic.pngbin1021 -> 351 bytes
-rw-r--r--skins/common/images/fa/button_bold.pngbin504 -> 500 bytes
-rw-r--r--skins/common/images/fa/button_headline.pngbin438 -> 434 bytes
-rw-r--r--skins/common/images/fa/button_italic.pngbin577 -> 573 bytes
-rw-r--r--skins/common/images/fa/button_link.pngbin538 -> 535 bytes
-rw-r--r--skins/common/images/fileicon.xcfbin26160 -> 0 bytes
-rw-r--r--skins/common/images/gnu-fdl.pngbin1748 -> 1730 bytes
-rw-r--r--skins/common/images/gnu-fdl.xcfbin5578 -> 0 bytes
-rw-r--r--skins/common/images/icons/fileicon-c.pngbin2995 -> 2211 bytes
-rw-r--r--skins/common/images/icons/fileicon-cpp.pngbin2250 -> 1882 bytes
-rw-r--r--skins/common/images/icons/fileicon-deb.pngbin5528 -> 4801 bytes
-rw-r--r--skins/common/images/icons/fileicon-djvu.pngbin11137 -> 10752 bytes
-rw-r--r--skins/common/images/icons/fileicon-dvi.pngbin13042 -> 12778 bytes
-rw-r--r--skins/common/images/icons/fileicon-exe.pngbin5864 -> 5680 bytes
-rw-r--r--skins/common/images/icons/fileicon-h.pngbin1195 -> 1191 bytes
-rw-r--r--skins/common/images/icons/fileicon-html.pngbin7601 -> 7422 bytes
-rw-r--r--skins/common/images/icons/fileicon-iso.pngbin6673 -> 6450 bytes
-rw-r--r--skins/common/images/icons/fileicon-java.pngbin6825 -> 5989 bytes
-rw-r--r--skins/common/images/icons/fileicon-mid.pngbin7191 -> 6657 bytes
-rw-r--r--skins/common/images/icons/fileicon-mov.pngbin7946 -> 7716 bytes
-rw-r--r--skins/common/images/icons/fileicon-o.pngbin2893 -> 2204 bytes
-rw-r--r--skins/common/images/icons/fileicon-ogg.pngbin6143 -> 3750 bytes
-rw-r--r--skins/common/images/icons/fileicon-pdf.pngbin5138 -> 4976 bytes
-rw-r--r--skins/common/images/icons/fileicon-ps.pngbin3293 -> 3012 bytes
-rw-r--r--skins/common/images/icons/fileicon-rm.pngbin4977 -> 2851 bytes
-rw-r--r--skins/common/images/icons/fileicon-rpm.pngbin4753 -> 4103 bytes
-rw-r--r--skins/common/images/icons/fileicon-svg.pngbin5193 -> 5094 bytes
-rw-r--r--skins/common/images/icons/fileicon-tar.pngbin6544 -> 6347 bytes
-rw-r--r--skins/common/images/icons/fileicon-tex.pngbin4203 -> 3997 bytes
-rw-r--r--skins/common/images/icons/fileicon-ttf.pngbin3625 -> 3469 bytes
-rw-r--r--skins/common/images/icons/fileicon-txt.pngbin6801 -> 3638 bytes
-rw-r--r--skins/common/images/ksh/button_S_italic.pngbin3812 -> 3206 bytes
-rw-r--r--skins/common/images/link_icon.gifbin942 -> 342 bytes
-rw-r--r--skins/common/images/magnify-clip.pngbin267 -> 204 bytes
-rw-r--r--skins/common/images/mediawiki-small.xcfbin36011 -> 0 bytes
-rw-r--r--skins/common/images/mediawiki.pngbin23064 -> 22987 bytes
-rw-r--r--skins/common/images/poweredby_mediawiki_88x31.pngbin1933 -> 1927 bytes
-rw-r--r--skins/common/images/public-domain.pngbin2892 -> 2251 bytes
-rw-r--r--skins/common/images/redirectltr.pngbin1024 -> 381 bytes
-rw-r--r--skins/common/images/redirectrtl.pngbin1017 -> 381 bytes
-rw-r--r--skins/common/images/remove.pngbin0 -> 3346 bytes
-rw-r--r--skins/common/images/sort_down.gifbin879 -> 464 bytes
-rw-r--r--skins/common/images/sort_none.gifbin877 -> 462 bytes
-rw-r--r--skins/common/images/sort_up.gifbin881 -> 466 bytes
-rw-r--r--skins/common/images/spinner.gifbin586 -> 4648 bytes
-rw-r--r--skins/common/images/wiki.pngbin24954 -> 24801 bytes
-rw-r--r--skins/common/jquery.js4384
-rw-r--r--skins/common/jquery.min.js433
-rw-r--r--skins/common/metadata.js36
-rw-r--r--skins/common/mwsuggest.js1312
-rw-r--r--skins/common/oldshared.css61
-rw-r--r--skins/common/prefs.js205
-rw-r--r--skins/common/preview.js208
-rw-r--r--skins/common/protect.js2
-rw-r--r--skins/common/search.js50
-rw-r--r--skins/common/shared.css587
-rw-r--r--skins/common/sticky.js124
-rw-r--r--skins/common/upload.js203
-rw-r--r--skins/common/wikibits.js782
-rw-r--r--skins/disabled/MonoBook.tpl200
-rw-r--r--skins/disabled/MonoBookCBT.php1389
-rw-r--r--skins/modern/discussionitem_icon.gifbin949 -> 549 bytes
-rw-r--r--skins/modern/file_icon.gifbin921 -> 323 bytes
-rw-r--r--skins/modern/link_icon.gifbin942 -> 342 bytes
-rw-r--r--skins/modern/lock_icon.gifbin918 -> 321 bytes
-rw-r--r--skins/modern/mail_icon.gifbin918 -> 321 bytes
-rw-r--r--skins/modern/main.css193
-rw-r--r--skins/modern/rtl.css6
-rw-r--r--skins/monobook/IEMacFixes.css44
-rw-r--r--skins/monobook/discussionitem_icon.gifbin949 -> 549 bytes
-rw-r--r--skins/monobook/file_icon.gifbin921 -> 323 bytes
-rw-r--r--skins/monobook/link_icon.gifbin942 -> 342 bytes
-rw-r--r--skins/monobook/lock_icon.gifbin918 -> 918 bytes
-rw-r--r--skins/monobook/magnify-clip.pngbin237 -> 170 bytes
-rw-r--r--skins/monobook/mail_icon.gifbin918 -> 321 bytes
-rw-r--r--skins/monobook/main.css318
-rw-r--r--skins/monobook/rtl.css18
-rw-r--r--skins/monobook/user.gifbin923 -> 325 bytes
-rw-r--r--skins/monobook/video.pngbin215 -> 169 bytes
-rw-r--r--skins/monobook/wiki.pngbin23064 -> 22987 bytes
-rw-r--r--skins/simple/discussionitem_icon.gifbin949 -> 549 bytes
-rw-r--r--skins/simple/file_icon.gifbin921 -> 323 bytes
-rw-r--r--skins/simple/link_icon.gifbin942 -> 342 bytes
-rw-r--r--skins/simple/lock_icon.gifbin918 -> 321 bytes
-rw-r--r--skins/simple/mail_icon.gifbin918 -> 321 bytes
-rw-r--r--skins/simple/main.css11
-rw-r--r--skins/simple/rtl.css6
-rw-r--r--skins/vector/Makefile18
-rw-r--r--skins/vector/csshover.htc262
-rw-r--r--skins/vector/cssjanus/COPYING13
-rw-r--r--skins/vector/cssjanus/LICENSE202
-rw-r--r--skins/vector/cssjanus/README91
-rw-r--r--skins/vector/cssjanus/cssjanus.py574
-rw-r--r--skins/vector/cssjanus/csslex.py114
-rw-r--r--skins/vector/experiments/babaco-colors-a.css109
-rw-r--r--skins/vector/experiments/babaco-colors-b.css67
-rw-r--r--skins/vector/experiments/babaco-colors-c.css91
-rw-r--r--skins/vector/experiments/images/new-border.pngbin0 -> 124 bytes
-rw-r--r--skins/vector/experiments/images/new-portal-break-ltr.pngbin0 -> 891 bytes
-rw-r--r--skins/vector/experiments/images/new-portal-break-rtl.pngbin0 -> 891 bytes
-rw-r--r--skins/vector/experiments/images/page-base-fade.pngbin0 -> 306 bytes
-rw-r--r--skins/vector/experiments/images/page-base-updated.pngbin0 -> 124 bytes
-rw-r--r--skins/vector/experiments/images/tab-active-first.pngbin0 -> 981 bytes
-rw-r--r--skins/vector/experiments/images/tab-active-last.pngbin0 -> 980 bytes
-rw-r--r--skins/vector/experiments/images/tab-fade.pngbin0 -> 226 bytes
-rw-r--r--skins/vector/experiments/images/tab-first.pngbin0 -> 1057 bytes
-rw-r--r--skins/vector/experiments/images/tab-last.pngbin0 -> 1057 bytes
-rw-r--r--skins/vector/experiments/images/tab-new-fade.pngbin0 -> 216 bytes
-rw-r--r--skins/vector/experiments/new-tabs.css322
-rw-r--r--skins/vector/images/arrow-down-icon.pngbin0 -> 181 bytes
-rw-r--r--skins/vector/images/audio-icon.pngbin0 -> 345 bytes
-rw-r--r--skins/vector/images/border.pngbin0 -> 119 bytes
-rw-r--r--skins/vector/images/bullet-icon.pngbin0 -> 152 bytes
-rw-r--r--skins/vector/images/document-icon.pngbin0 -> 345 bytes
-rw-r--r--skins/vector/images/edit-icon.pngbin0 -> 358 bytes
-rw-r--r--skins/vector/images/external-link-ltr-icon.pngbin0 -> 279 bytes
-rw-r--r--skins/vector/images/external-link-rtl-icon.pngbin0 -> 277 bytes
-rw-r--r--skins/vector/images/file-icon.pngbin0 -> 402 bytes
-rw-r--r--skins/vector/images/link-icon.pngbin0 -> 429 bytes
-rw-r--r--skins/vector/images/lock-icon.pngbin0 -> 370 bytes
-rw-r--r--skins/vector/images/magnify-clip.pngbin0 -> 204 bytes
-rw-r--r--skins/vector/images/mail-icon.pngbin0 -> 375 bytes
-rw-r--r--skins/vector/images/news-icon.pngbin0 -> 359 bytes
-rw-r--r--skins/vector/images/page-base.pngbin0 -> 119 bytes
-rw-r--r--skins/vector/images/page-fade.pngbin0 -> 253 bytes
-rw-r--r--skins/vector/images/portal-break-ltr.pngbin0 -> 287 bytes
-rw-r--r--skins/vector/images/portal-break-rtl.pngbin0 -> 280 bytes
-rw-r--r--skins/vector/images/portal-break.pngbin0 -> 242 bytes
-rw-r--r--skins/vector/images/preferences-base.pngbin0 -> 119 bytes
-rw-r--r--skins/vector/images/preferences-break.pngbin0 -> 286 bytes
-rw-r--r--skins/vector/images/preferences-edge.pngbin0 -> 119 bytes
-rw-r--r--skins/vector/images/preferences-fade.pngbin0 -> 248 bytes
-rw-r--r--skins/vector/images/search-fade.pngbin0 -> 185 bytes
-rw-r--r--skins/vector/images/search-ltr.pngbin0 -> 214 bytes
-rw-r--r--skins/vector/images/search-rtl.pngbin0 -> 214 bytes
-rw-r--r--skins/vector/images/tab-break.pngbin0 -> 263 bytes
-rw-r--r--skins/vector/images/tab-current-fade.pngbin0 -> 121 bytes
-rw-r--r--skins/vector/images/tab-normal-fade.pngbin0 -> 254 bytes
-rw-r--r--skins/vector/images/talk-icon.pngbin0 -> 377 bytes
-rw-r--r--skins/vector/images/user-icon.pngbin0 -> 345 bytes
-rw-r--r--skins/vector/images/video-icon.pngbin0 -> 395 bytes
-rw-r--r--skins/vector/images/watch-icon-loading.gifbin0 -> 840 bytes
-rw-r--r--skins/vector/images/watch-icons.pngbin0 -> 1745 bytes
-rw-r--r--skins/vector/main-ltr.css1128
-rw-r--r--skins/vector/main-rtl.css1128
-rw-r--r--skins/vector/wiki-indexed.pngbin0 -> 8205 bytes
-rw-r--r--skins/vector/wiki.pngbin0 -> 22987 bytes
-rw-r--r--t/00-test.t10
-rw-r--r--t/README52
-rw-r--r--t/Search.inc161
-rw-r--r--t/Test.php496
-rw-r--r--t/inc/Database.t53
-rw-r--r--t/inc/Global.t154
-rw-r--r--t/inc/IP.t60
-rw-r--r--t/inc/ImageFunctions.t56
-rw-r--r--t/inc/Language.t58
-rw-r--r--t/inc/Licenses.t26
-rw-r--r--t/inc/LocalFile.t77
-rw-r--r--t/inc/Parser.t39
-rw-r--r--t/inc/Revision.t79
-rw-r--r--t/inc/Sanitizer.t64
-rw-r--r--t/inc/Search.t14
-rw-r--r--t/inc/Title.t32
-rw-r--r--t/inc/Xml.t56
-rw-r--r--t/maint/bom.t38
-rw-r--r--t/maint/eol-style.t35
-rw-r--r--t/maint/php-lint.t33
-rw-r--r--t/maint/php-tag.t29
-rw-r--r--t/maint/unix-newlines.t33
-rw-r--r--tests/.htaccess1
-rw-r--r--tests/Makefile19
-rw-r--r--tests/MediaWiki_TestCase.php51
-rw-r--r--tests/README9
-rw-r--r--tests/run-test.php7
-rw-r--r--wiki.phtml1
1276 files changed, 191230 insertions, 107703 deletions
diff --git a/.gitignore b/.gitignore
index 9e90d89e..a94ae0af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/images/
+/cache/
*~
/LocalSettings.php
/AdminSettings.php
diff --git a/AdminSettings.sample b/AdminSettings.sample
deleted file mode 100644
index 8b6fe993..00000000
--- a/AdminSettings.sample
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/**
- * This file should be copied to AdminSettings.php, and modified
- * to reflect local settings. It is required for the maintenance
- * scripts which run on the command line, as an extra security
- * measure to allow using a separate user account with higher
- * privileges to do maintenance work.
- *
- * Developers: Do not check AdminSettings.php into Subversion
- */
-
-/*
- * This data is used by all database maintenance scripts
- * (see directory maintenance/). The SQL user MUST BE
- * MANUALLY CREATED or set to an existing user with
- * necessary permissions.
- *
- * This is not to be confused with sysop accounts for the
- * wiki.
- *
- * NOTE: for PostgreSQL this should be set to the same user and
- * password as the web user, that is, the same as $wgDBuser and
- * $wgDBpassword in LocalSettings.php. This is necessary to
- * ensure that the owner for new tables is set correctly.
- */
-$wgDBadminuser = 'wikiadmin';
-$wgDBadminpassword = 'adminpass';
-
-/*
- * Whether to enable the profileinfo.php script.
- */
-$wgEnableProfileInfo = false;
diff --git a/CREDITS b/CREDITS
index 5d407aad..2205032b 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1,4 +1,4 @@
-MediaWiki 1.15 is a collaborative project released under the
+MediaWiki 1.16 is a collaborative project released under the
GNU General Public License v2. We would like to recognize the
following names for their contribution to the product.
@@ -14,24 +14,30 @@ following names for their contribution to the product.
* Bryan Tong Minh
* Chad Horohoe
* Charles Melbye
+* church of emacs
* Daniel Friesen
* Daniel Kinzler
* Danny B.
* David McCabe
* Derk-Jan Hartman
* Domas Mituzas
+* Emufarmers
* Fran Rogers
* Greg Sabino Mullane
* Guy Van den Broeck
+* Happy-melon
* Hojjat
* Ilmari Karonen
* Jack D. Pond
* Jack Phoenix
* Jason Richey
* Jon Harald Søby
+* Juliano F. Ravasi
* Leon Weber
* Marco Schuster
+* Matěj Grabovský
* Matt Johnston
+* Max Semenik
* Meno25
* MinuteElectron
* Mohamed Magdy
@@ -41,55 +47,76 @@ following names for their contribution to the product.
* Platonides
* Purodha Blissenbach
* Raimond Spekking
+* Remember the dot
* Roan Kattouw
* Robert Stojnić
* Rotem Liss
* Ryan Lane
* Ryan Schmidt
+* Sam Reed
* Shinjiman
* Siebrand Mazeland
* SQL
* Soxred93
* Thomas Bleher
* Tim Starling
+* Tom Gries
* Victor Vasiliev
== Patch Contributors ==
* Agbad
+* Ahmad Sherif
+* Antonio Ospite
+* Azliq7
+* Borislav Manolov
* Brad Jorsch
* Brent G
* Brianna Laugher
* Carlin
-* church of emacs
+* Conrad Irwin
+* Dan Nessett
* Daniel Arnold
-* Danny B.
+* Denny Vrandecic
+* Derk-Jan Hartman
* FunPika
-* Happy-melon
+* Ireas
* Jeremy Baron
* Jidanni
-* Juliano F. Ravasi
+* Jimmy Xu
+* Karun Dambietz
+* Kim Hyun-Joon
+* liangent
* Lucas Garczewski
* Louperivois
* Luigi Corsaro
* Manuel Menal
* Marcin Cieślak
+* Marcus Buck
* Marooned
-* Max Semenik
+* Matthew Britton
+* mati
+* Max Sikström
* Michael De La Rue
* Michael Walsh
* Mike Horvath
* Mormegil
+* MrPete
* Nakon
* Nathan Larson
+* nephele
* Nikolaos S. Karastathis
* Olaf Lenz
* Paul Copperman
-* RememberTheDot
+* PieRRoMaN
* René Kijewski
+* Robert Treat
+* RockMFR
* ST47
+* Scott Colcord
* Simon Walker
* Stefano Codari
* Str4nd
+* svip
== Translators ==
* Anders Wegge Jakobsen
diff --git a/FAQ b/FAQ
index ea1d6243..0aedb7e3 100644
--- a/FAQ
+++ b/FAQ
@@ -1,5 +1,2 @@
-The original MediaWiki FAQ can be found at
-http://meta.wikimedia.org/wiki/MediaWiki_FAQ.
-
-A newer version is available at
-http://www.mediawiki.org/wiki/Manual:FAQ.
+The MediaWiki FAQ can be found at:
+http://www.mediawiki.org/wiki/Manual:FAQ
diff --git a/HISTORY b/HISTORY
index 6851fcf5..05ad1b29 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,14 +1,404 @@
Change notes from older releases. For current info see RELEASE-NOTES.
-== MediaWiki 1.14 ==
-
-=== Changes since 1.14.0rc1 ===
-
-* Fixed the performance of the backlinks API module
+== MediaWiki 1.15 ==
+
+=== Changes since 1.15.1 ===
+
+* The installer now includes a check for a data corruption issue with certain
+ versions of libxml2 2.7 and PHP earlier than 5.2.9, and also for a PHP bug
+ present in the official release of PHP 5.3.1.
+* (bug 20239) MediaWiki:Imagemaxsize does not contain anymore a <br /> tag which
+ was displayed to the user
+* (bug 21150) SQLite no longer raise an error when deleting files
+* (bug 20880) Fixed updater failure on SQLite backend
+* upgrade1_5.php now requires to be run --update option to prevent confusion
+* Fixed a CSS validation issue which allowed external images to be included
+ into wikis where that is disallowed by configuration.
+* Fixed a data leakage vulnerability for private wikis using img_auth.php or
+ similar image access authentication schemes. Check user permissions before
+ streaming out scaled images from thumb.php.
+
+=== Changes since 1.15.0 ===
+
+* Fixed fatal errors for unusual file repository configurations, such as
+ ForeignAPIRepo.
+* Fixed the "change password" link on Special:Preferences to have the correct
+ returnto parameter.
+* (bug 19693) Fixed cross-site scripting vulnerability in Special:Block
+
+=== Changes since 1.15.0rc1 ===
+
+* Removed category redirect feature, implementation was incomplete.
+* (bug 18846) Remove update_password_format(), unnecessary, destroys all
+ passwords if a wiki with $wgPasswordSalt=false is upgraded with the web
+ installer.
+* (bug 19127) Documentation warning for PostgreSQL users who run update.php:
+ use the same user in AdminSettings.php as in LocalSettings.php.
+* Fixed possible web invocation of some maintenance scripts, due to the use of
+ include() instead of require(). A full exploit would require a very strange
+ web server configuration.
+* Localisation updates.
+
+=== Configuration changes in 1.15 ===
+
+* Added $wgNewPasswordExpiry, to specify an expiry time (in seconds) to
+ temporary passwords
+* Added $wgUseTwoButtonsSearchForm to choose the Search form behavior/look
+* Added $wgNoFollowDomainExceptions to allow exempting particular domain names
+ from rel="nofollow" on external links
+* (bug 12970) Brought back $wgUseImageResize.
+* Added $wgRedirectOnLogin to allow specifying a specifc page to redirect users
+ to upon logging in (ex: "Main Page")
+* Add $wgExportFromNamespaces for enabling/disabling the "export all from
+ namespace" option (disabled by default)
+
+=== New features in 1.15 ===
+
+* (bug 2242) Add an expiry time to temporary passwords
+* (bug 9947) Add PROTECTIONLEVEL parser function to return the protection level
+ for the current page for a given action
+* (bug 17002) Add &minor= and &summary= as parameters in the url when editing,
+ to automatically add a summary or a minor edit.
+* (bug 16852) padleft and padright now accept multiletter pad characters
+* When using 'UserCreateForm' hook to add new checkboxes into
+ Special:UserLogin/signup, the messages can now contain HTML to allow
+ hyperlinking to the site's Terms of Service page, for example
+* Add new hook 'UserLoadFromDatabase' that is called while loading a user
+ from the database.
+* (bug 17045) Options on the block form are prefilled with the options of the
+ existing block when modifying an existing block.
+* (bug 17055) "(show/hide)" links to Special:RevisionDelete now use a CSS class
+ rather than hardcoded HTML tags
+* Added new hook 'WantedPages::getSQL' into SpecialWantedpages.php to allow
+ extensions to alter the SQL query which is used to get the list of wanted
+ pages
+* (bugs 16957/16969) Add show/hide to preferences for RC patrol options on
+ specialpages
+* (bug 11443) Auto-noindex user/user talk pages for blocked user
+* (bug 11644) Add $wgMaxRedirects variable to control how many redirects are
+ recursed through until the "destination" page is reached.
+* Add $wgInvalidRedirectTargets variable to prevent redirects to certain
+ special pages.
+* Use HTML5 rel attributes for some links, where appropriate
+* Added optional alternative Search form look - Go button & Advanced search
+ link instead of Go button & Search button
+* (bug 2314) Add links to user custom CSS and JS to Special:Preferences
+* More helpful error message on raw page access if PHP_SELF isn't set
+* (bug 13040) Gender switch in user preferences
+* (bug 13040) {{GENDER:}} magic word for interface messages
+* (bug 3301) Optionally sort user list according to account creation time
+* Remote description pages for foreign file repos are now fetched in the
+ content language.
+* (bug 17180) If $wgUseFileCache is enabled, $wgShowIPinHeader is automatically
+ set to false.
+* (bug 16604) Mark non-patrolled edits in feeds with "!"
+* (bug 16604) Show title/rev in IRC for patrol log
+* (bug 16854) Whether a page is being parsed as a preview or section preview
+ can now be determined and set with ParserOptions.
+* Wrap message 'confirmemail_pending' into a div with CSS classes "error" and
+ "mw-confirmemail-pending"
+* (bug 8249) The magic words for namespaces and pagenames can now be used as
+ parser functions to return the desired namespace or normalized title/title
+ part for a given title.
+* (bug 17110) Styled #mw-data-after-content in cologneblue.css to match the
+ rest of the font
+* (bug 7556) Time zone names in signatures lack i18n
+* (bug 3311) Automatic category redirects
+* (bug 17236) Suppress 'watch user page link' for IP range blocks
+* Wrap message 'searchresulttext' (Special:Search) into a div with
+ class "mw-searchresult"
+* (bug 15283) Interwiki imports can now fetch included templates
+* Treat svn:// URLs as external links by default
+* New function to convert namespace text for display (only applies on wiki with
+ LanguageConverter class)
+* (bug 17379) Contributions-title is now parsed for magic words.
+* Preprocessor output now cached in memcached.
+* (bug 14468) Lines in classic RecentChanges and Watchlist have classes
+ "mw-line-odd" and "mw-line-even" to make styling using css possible.
+* (bug 17311) Add a note beside the gender selection menu to tell users that
+ this information will be public
+* Localize time zone regions in Special:Preferences
+* Add NUMBEROFACTIVEUSERS magic word, which is like NUMBEROFUSERS, but uses
+ the active users data from site_stats.
+* Add a <link rel="canonical"> tag on redirected page views
+* Replace hardcoded '...' as indication of a truncation with the
+ 'ellipsis' message
+* Wrap warning message 'editinginterface' into a div with class
+ 'mw-editinginterface'
+* (bug 17497) Oasis opendocument added to mime.types
+* Remove the link to Special:FileDuplicateSearch from the "file history" section
+ of image description pages as the list of duplicated files is shown in the
+ next section anyway.
+* Added $wgRateLimitsExcludedIPs, to allow specific IPs to be whitelisted from
+ rate limits.
+* (bug 14981) Shared repositories can now have display names, located at
+ Mediawiki:Shared-repo-name-REPONAME, where REPONAME is the name in
+ $wgForeignFileRepos
+* Special:ListUsers: Sort list of usergroups by alphabet
+* (bug 16762) Special:Movepage now shows a list of subpages when possible
+* (bug 17585) Hide legend on Special:Specialpages from non-privileged users
+* Added $wgUseTagFilter to control enabling of filter-by-change-tag
+* (bug 17291) MediaWiki:Nocontribs now has an optional $1 parameter for the
+ username
+* Wrap special page summary message '$specialPageName-summary' into a div
+ with class 'mw-specialpage-summary'
+* $wgSummarySpamRegex added to handle edit summary spam. This is used *instead*
+ of $wgSpamRegex for edit summary checks. Text checks still use $wgSpamRegex.
+* New function to convert content text to specified language (only applies on wiki with
+ LanguageConverter class)
+* (bug 17844) Redirect users to a specific page when they log in, see
+ $wgRedirectOnLogin
+* Added a link to Special:UserRights on Special:Contributions for privileged users
+* (bug 10336) Added new magic word {{REVISIONUSER}}, which displays the editor
+ of the displayed revision's author user name
+* LinkerMakeExternalLink now has an $attribs parameter for link attributes and
+ a $linkType parameter for the type of external link being made
+* (bug 17785) Dynamic dates surrounded with a <span> tag, fixing sortable tables with
+ dynamic dates.
+* (bug 4582) Provide preference-based autoformatting of unlinked dates with the dateformat
+ parser function.
+* (bug 17886) Special:Export now allows you to export a whole namespace (limited to 5000 pages)
+* (bug 17714) Limited TIFF upload support now built in if 'tif' extension is
+ enabled. Image width and height are now recognized, and when using ImageMagick,
+ optional flattening to PNG or JPEG for inline display can be enabled by setting
+ $wgTiffThumbnailType
+* Renamed two input IDs on Special:Log from 'page' and 'user' to 'mw-log-page' and
+ 'mw-log-user', respectively
+* Added $wgInvalidUsernameCharacters to disallow certain characters in
+ usernames during registration (such as "@")
+* Added $wgUserrightsInterwikiDelimiter to allow changing the delimiter
+ used in Special:UserRights to denote the user should be searched for
+ on a different database
+* Add a class if 'missingsummary' is triggered to allow styling of the summary
+ line
+* Title attributes are now always blank on framed and thumbnailed images, and default to blank
+ on inline images instead of defaulting to the image's filename. Additionally, the alt
+ attribute now defaults to the filename on framed and thumbnailed images if no caption or alt
+ attribute is specified.
+
+=== Bug fixes in 1.15 ===
+* (bug 16968) Special:Upload no longer throws useless warnings.
+* (bug 17000) Special:RevisionDelete now checks if the database is locked
+ before trying to delete the edit.
+* (bug 16852) padleft and padright now handle multibyte characters correctly
+* (bug 17010) maintenance/namespaceDupes.php now add the suffix recursively if
+ the destination page exists
+* (bug 17035) Special:Upload now fails gracefully if PHP's file_uploads has
+ been disabled
+* Fixing the caching issue by using -{T|xxx}- syntax (only applies on wiki with
+ LanguageConverter class)
+* Improving the efficiency by using -{A|xxx}- syntax (only applies on wiki with
+ LanguageConverter class)
+* (bug 17054) Added more descriptive errors in Special:RevisionDelete
+* (bug 11527) Diff on page with one revision shows "Next" link to same diff
+* (bug 8065) Fix summary forcing for new pages
+* (bug 10569) redirects to Special:Mypage and Special:Mytalk are no longer
+ allowed by default. Change $wgInvalidRedirectTargets to re-enable.
+* (bug 3043) Feed links of given page are now preceded by standard feed icon
+* (bug 17150) escapeLike now escapes literal \ properly
+* Inconsistent use of sysop, admin, administrator in system messages changed
+ to 'administrator'
+* (bug 14423) Check block flag validity for block logging
+* DB transaction and slave-lag avoidance tweaks for Email Notifications
+* (bug 17104) Removed [Mark as patrolled] link for already patrolled revisions
+* (bug 17106) Added 'redirect=no' and 'mw-redirect' class to redirects at
+ "user contributions"
+* Rollback links on new pages removed from "user contributions"
+* (bug 15811) Re-upload form tweaks: license fields removed, destination locked,
+ comment label uses better message
+* Whole HTML validation ($wgValidateAllHtml) now works with external tidy
+* Parser tests no longer fail when $wgExternalLinkTarget is set in
+ LocalSettings
+* (bug 15391) catch DBQueryErrors on external storage insertion. This avoids
+ error messages on save were the edit in fact is saved.
+* (bug 17184) Remove duplicate "z" accesskey in MonoBook
+* Parser tests no longer fail when $wgAlwaysUseTidy is set in LocalSettings.php
+* Removed redundant dupe warnings on reupload for the same title. Dupe warnings
+ for identical files at different titles are still given.
+* Add 'change tagging' facility, where changes can be tagged internally with
+ certain designations, which are displayed on various summaries of changes,
+ and the entries can be styled with CSS.
+* (bug 17207) Fix regression breaking category page display on PHP 5.1
+* Categoryfinder utility class no longer fails on invalid input or gives wrong
+ results for category names that include pseudo-namespaces
+* (bug 17252) Galician numbering format
+* (bug 17146) Fix for UTF-8 and short word search for some possible MySQL
+ configs
+* (bug 7480) Internationalize database error message
+* (bug 16555) Number of links to mediawiki.org scaled back on post-installation
+* (bug 14938) Removing a section no longer leaves excess whitespace
+* (bug 17304) Fixed fatal error when thumbnails couldn't be generated for file
+ history
+* (bug 17283) Remove double URL escaping in show/hide links for log entries
+ and RevisionDeleteForm::__construct
+* (bug 17105) Numeric table sorting broken
+* (bug 17231) Transcluding special pages on wikis using language conversion no
+ longer affects the page title
+* (bug 6702) Default system messages updated/improved
+* (bug 17190) User ID on preference page no longer has delimeters
+* (bug 17341) "Powered by MediaWiki" should be on the left on RTL wikis
+* (bug 17404) "userrights-interwiki" right was missing in User::$mCoreRights
+* (bug 7509) Separation strings should be configurable
* (bug 17420) Send the correct content type from action=raw when the HTML file
cache is enabled.
+* (bug 12746) Do not allow new password e-mails when wiki is in read-only mode
+* (bug 17478) Fixed a PHP Strict standards error in
+ maintenance/cleanupWatchlist.php
+* (bug 17488) RSS/Atom links in left toolbar are now localized in classic skin
+* (bug 17472) use print <<<EOF in maintenance/importTextFile.php
+* Special:PrefixIndex: Move table styling to shared.css, add CSS IDs to tables
+ use correct message 'allpagesprefix' for input form label, replace _ with ' '
+ in next page link
+* (bug 17506) Exceptions within exceptions now respect $wgShowExceptionDetails
+* Fixed excessive job queue utilisation
+* File dupe messages for remote repos are now shown only once.
+* (bug 14980) Messages 'shareduploadwiki' and 'shareduploadwiki-desc' are now
+ used as a parameter in 'sharedupload' for easier styling and customization.
+* (bug 17482) Formatting error in Special:Preferences#Misc (Opera)
+* (bug 17556) <link> parameters in Special:Contributions feeds (RSS and Atom)
+ now point to the actual contributors' feed.
+* ForeignApiRepos now fetch MIME types, rather than trying to figure it locally
+* Special:Import: Do not show input field for import depth if
+ $wgExportMaxLinkDepth == 0
+* (bug 17570) $wgMaxRedirects is now correctly respected when following
+ redirects (was previously one more than $wgMaxRedirects)
+* (bug 16335) __NONEWSECTIONLINK__ magic word to suppress new section link.
+* (bug 17581) Wrong index name in PostgreSQL's updater: was rc_timestamp_nobot,
+ changed to rc_timestamp_bot
* (bug 17437) Fixed incorrect link to web-based installer
-* (bug 17527) Fixed missing MySQL-specific options in installer
+* (bug 17538) Use shorter URLs in <link> elements
+* (bug 13778) Hidden input added to the search form so that using the Enter key
+ on IE will do a fulltext search like clicking the button does
+* (bug 1061) CSS-added icons next to links display through the text and makes
+ it unreadable in RTL
+* Special:Wantedtemplates now works on PostgreSQL
+* (bug 14414) maintenance/updateSpecialPages.php no longer throws error with
+ PostgreSQL
+* (bug 17546) Correct Tongan language native name is "lea faka-Tonga"
+* (bug 17621) Special:WantedFiles has no link to Special:Whatlinkshere
+* (bug 17460) Client ecoding is now correctly set for PostgreSQL
+* (bug 17648) Prevent floats from intruding into edit area in previews if no
+ toolbar present
+* (bug 17692) Added (list of members) link to 'user' in Special:Listgrouprights
+* (bug 17707) Show file destination as plain text if &wpForReUpload=1
+* (bug 10172) Moved setting of "changed since last visit" flags out of the job
+ queue
+* (bug 17761) "show/hide" link in page history in now works for the first
+ displayed revision if it's not the current one
+* (bug 17722) Fix regression where users are unable to change temporary passwords
+* (bug 17799) Special:Random no longer throws a database error when a non-
+ namespace is given, silently falls back to NS_MAIN
+* (bug 17751) The message for bad titles in WantedPages is now localized
+* (bug 17860) Moving a page in the "MediaWiki" namespace using SuppressRedirect
+ no longer corrupts the message cache
+* (bug 17900) Fixed User Groups interface log display after saving groups.
+* (bug 17897) Fixed string offset error in <pre> tags
+* (bug 17778) MediaWiki:Catseparator can now have HTML entities
+* (bug 17676) Error on Special:ListFiles when using Postgres
+* Special:Export doesn't use raw SQL queries anymore
+* (bug 14771) Thumbnail links to individual DjVu pages have two no longer have
+ two "page" parameters
+* (bug 17972) Special:FileDuplicateSearch form now works correctly on wikis that
+ don't use PathInfo or short urls
+* (bug 17990) trackback.php now has a trackback.php5 alias and works with
+ $wgScriptExtension
+* (bug 14990) Parser tests works again with PostgreSQL
+* (bug 11487) Special:Protectedpages doesn't list protections with pr_expiry
+ IS NULL
+* (bug 18018) Deleting a file redirect leaves behind a malfunctioning redirect
+* (bug 17537) Disable bad zlib.output_compression output on HTTP 304 responses
+* (bug 11213) [edit] section links in printable version no longer appear when you cut-and-paste article text
+* (bug 17405) "Did you mean" to mirror Go/Search behavior of original request
+* (bug 18116) 'edittools' is now output identically on edit and upload pages
+* (bug 17241) The diffonly URI parameter should cascade to "Next edit" and "Previous edit" diff links
+* (bug 16823) 'Sidebar search form should not use Special:Search view URL as target'
+* (bug 16343) Non-existing, but in use, category pages can be "go" match hits
+* Fixed a CSS validation issue which allowed external images to be included
+ into wikis where that is disallowed by configuration.
+* Fixed a data leakage vulnerability for private wikis using img_auth.php or
+ similar image access authentication schemes. Check user permissions before
+ streaming out scaled images from thumb.php.
+
+== API changes in 1.15 ==
+* (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
+ and listing all deleted pages possible
+* (bug 16844) Added clcategories parameter to prop=categories
+* (bug 17025) Add "fileextension" parameter to meta=siteinfo&siprop=
+* (bug 17048) Show the 'new' flag in list=usercontribs for the revision that
+ created the page, even if it's not the top revision
+* (bug 17069) Added ucshow=patrolled|!patrolled to list=usercontribs
+* action=delete respects $wgDeleteRevisionsLimit and the bigdelete user right
+* (bug 15949) Add undo functionality to action=edit
+* (bug 16483) Kill filesort in ApiQueryBacklinks caused by missing parentheses.
+ Building query properly now using makeList()
+* (bug 17182) Fix pretty printer so URLs with parentheses in them are
+ autolinked correctly
+* (bug 17224) Added siprop=rightsinfo to meta=siteinfo
+* (bug 17239) Added prop=displaytitle to action=parse
+* (bug 17317) Added watch parameter to action=protect
+* (bug 17007) Added export and exportnowrap parameters to action=query
+* (bug 17326) BREAKING CHANGE: Changed output format for iiprop=metadata
+* (bug 17355) Added auwitheditsonly parameter to list=allusers
+* (bug 17007) Added action=import
+* BREAKING CHANGE: Removed rctitles parameter from list=recentchanges because
+ of performance concerns
+* Listing (semi-)deleted revisions and log entries as well in prop=revisions
+ and list=logevents
+* (bug 11430) BREAKING CHANGE: Modules may return fewer results than the
+ limit and still set a query-continue in some cases
+* (bug 17357) Added movesubpages parameter to action=move
+* (bug 17433) Added bot flag to list=watchlist&wlprop=flags output
+* (bug 16740) Added list=protectedtitles
+* Added mainmodule and pagesetmodule parameters to action=paraminfo
+* (bug 17502) meta=siteinfo&siprop=namespacealiases no longer lists namespace
+ aliases already listed in siprop=namespaces
+* (bug 17529) rvend ignored when rvstartid is specified
+* (bug 17626) Added uiprop=email to list=userinfo
+* (bug 13209) Added rvdiffto parameter to prop=revisions
+* Manual language conversion improve: Now we can include both ";" and ":" in
+ conversion rules
+* (bug 17795) Don't report views count on meta=siteinfo if $wgDisableCounters
+ is set
+* (bug 17774) Don't hide read-restricted modules like action=query from users
+ without read rights, but throw an error when they try to use them.
+* Don't hide write modules when $wgEnableWriteAPI is false, but throw an error
+ when someone tries to use them
+* BREAKING CHANGE: action=purge requires write rights and, for anonymous users,
+ a POST request
+* (bug 18099) Using appendtext to edit a non-existent page causes an interface
+ message to be included in the page text
+* Fixed the circular template inclusion check, was broken when the loop
+ involved redirects. Without this, infinite recursion within the parser is
+ possible.
+* (bug 18601) generator=backlinks returns invalid continue parameter
+* (bug 18597) Internal error with empty generator= parameter
+* (bug 18617) Add xml:space="preserve" attribute to relevant tags in XML output
+* (bug 17611) Provide a sensible error message on install when the SQLite data
+ directory is wrong.
+
+=== Languages updated in 1.15 ===
+
+MediaWiki supports over 300 languages. Many localisations are updated
+regularly. Below only new and removed languages are listed, as well as
+changes to languages because of MediaZilla reports.
+
+* Austrian German (de-at) (new)
+* Swiss Standard German (de-ch) (new)
+* Simplified Gan Chinese (gan-hans) (new)
+* Traditional Gan Chinese (gan-hant) (new)
+* Literary Chinese (lzh) (new)
+* Uyghur (Latin script) (ug-latn) (renamed from 'ug')
+* Veps (vep) (new)
+* Võro (vro) (renamed from fiu-vro)
+* (bug 17151) Add magic word alias for #redirect for Vietnamese
+* (bug 17288) Messages improved for default language (English)
+* (bug 12937) Update native name for Afar
+* (bug 16909) 'histlegend' now reuses messages instead of copying them
+* (bug 17832) action=delete returns 'unknownerror' instead of 'permissiondenied' when
+ the user is blocked
+* Traditional/Simplified Gan Chinese conversion support
+
+== MediaWiki 1.14 ==
=== Configuration changes in 1.14 ===
@@ -5408,7 +5798,7 @@ User accounts:
groups. Note that this does *not* allow you to make pages which are only
accessible to certain groups.
- For details see: http://meta.wikimedia.org/wiki/Help:User_rights
+ For details see: http://www.mediawiki.org/wiki/Manual:User_rights
E-mail:
User-to-user e-mail can now be restricted to require a mail-back confirmation
@@ -5658,8 +6048,8 @@ Various bugfixes, small features, and a few experimental things:
* 'live preview' reduces preview reload burden on supported browsers
* support for external editors for files and wiki pages:
- http://meta.wikimedia.org/wiki/Help:External_editors
-* Schema reworking: http://meta.wikimedia.org/wiki/Proposed_Database_Schema_Changes/October_2004
+ http://www.mediawiki.org/wiki/Manual:External_editors
+* Schema reworking: http://www.mediawiki.org/wiki/Proposed_Database_Schema_Changes/October_2004
* (bug 15) Allow editors to view diff of their change before actually submitting an edit
* (bug 190) Hide your own edits on the watchlist
* (bug 510): Special:Randompage now works for other namespaces than NS_MAIN.
@@ -6342,7 +6732,7 @@ release for relevant bug fixes; see the changelog later in this file.
If you have trouble, remember to read this whole file and the online FAQ page
before asking for help:
-http://meta.wikimedia.org/wiki/MediaWiki_FAQ
+http://www.mediawiki.org/wiki/Manual:FAQ
=== READ THIS FIRST: Upgrading ===
diff --git a/Makefile b/Makefile
deleted file mode 100644
index b414ffa3..00000000
--- a/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# This Makefile is used to test some MediaWiki functions. If you
-# want to install MediaWiki, point your browser to ./config/
-#
-
-# Configuration:
-PROVE_BIN="prove"
-
-# Describe our tests:
-BASE_TEST=$(wildcard t/*.t)
-INCLUDES_TESTS=$(wildcard t/inc/*t)
-MAINTENANCE_TESTS=$(wildcard t/maint/*t)
-
-# Build groups:
-FAST_TESTS=$(BASE_TEST) $(INCLUDES_TESTS)
-ALL_TESTS=$(BASE_TEST) $(INCLUDES_TESTS) $(MAINTENANCE_TESTS)
-
-test: t/Test.php
- $(PROVE_BIN) $(ALL_TESTS)
-
-fast: t/Test.php
- $(PROVE_BIN) $(FAST_TESTS)
-
-maint:
- $(PROVE_BIN) $(MAINTENANCE_TESTS)
-
-verbose: t/Test.php
- $(PROVE_BIN) -v $(ALL_TESTS) | egrep -v '^ok'
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 4e5effb2..d3983380 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,461 +1,995 @@
= MediaWiki release notes =
-Security reminder: MediaWiki does not require PHP's register_globals
-setting since version 1.2.0. If you have it on, turn it *off* if you can.
-
-== MediaWiki 1.15.5 ==
+== MediaWiki 1.16.0 ==
2010-07-28
-This is a security and maintenance release.
+This is a stable release of the MediaWiki 1.16 branch.
+
+=== Summary of selected changes in 1.16 ===
+
+Selected changes since MediaWiki 1.15 that may be of interest:
+
+* Watchlists now have RSS/Atom feeds. RSS feeds generally are now hidden,
+ since Atom is a better protocol and is supported by virtually all clients.
+
+* It's now possible to block users from sending email via Special:Emailuser.
+
+* The maintenance script system was overhauled. Most maintenance scripts now
+ have a useful help page when you run them with --help.
-MediaWiki is now using a "continuous integration" development model with
-quarterly snapshot releases. The latest development code is always kept
-"ready to run", and in fact runs our own sites on Wikipedia.
+* AdminSettings.php is no longer required in order to run maintenance scripts.
+ You can just set $wgDBadminuser and $wgDBadminpassword in your
+ LocalSettings.php instead.
-Release branches will continue to receive security updates for about a year
-from first release, but nonessential bugfixes and feature developments
-will be made on the development trunk and appear in the next quarterly release.
+* The preferences system was overhauled. Preferences are stored in a more
+ compact format. Changes to site default preferences will automatically
+ affect all users who have not chosen a different preference.
-Those wishing to use the latest code instead of a branch release can obtain
-it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
+* Support for SQLite was improved. Some broken features were fixed, and it
+ now has an efficient full-text search.
-== Changes since 1.15.4 ==
+* The user groups ACL system was improved by allowing rights to be revoked,
+ instead of just granted.
+* A new localisation caching system was introduced, which will make MediaWiki
+ faster for almost everyone, especially when lots of extensions are enabled.
+
+By default, this new system makes a lot of database queries. If your database
+is particularly slow, or if your system administrator limits your query count,
+or if you want to squeeze as much performance as possible out of Mediawiki,
+set $wgCacheDirectory to a writable path on the local filesystem. Make sure
+you have the DBA extension for PHP installed, this will improve performance
+further.
+
+== Changes since 1.16 beta 3 ==
+
+* (bug 23769) Disabled HTML 5 client-side form validation. Was introduced in
+ 1.16 beta 1, but is currently poorly supported by browsers.
+* (bug 23175) Re-added window.ta variable for backwards compatibility.
+* (bug 23264) Fixed breakage of various command line scripts due to extra line
+ endings being inserted by Maintenance::output().
+* Fixed HTTP client functionality with safe_mode=On.
+* Fixed parser tests broken in 1.16 beta 3.
+* For Oracle DB backend: fixed parser tests and table prefix feature.
+* (bug 23767) Fixed PHP warning when REQUEST_URI is blank (IIS issue).
+* Fixed plural function for Northern Sami (se)
+* (bug 23597) Fixed conflicts between ID attributes in the Vector skin and
+ parser-generated heading IDs. Renamed head, panel, head-base and page-base.
+* Disabled $wgHitcounterUpdateFreq>1 feature on SQLite, does not work yet.
+* (bug 23465) Don't ignore the predefined destination filename on
+ Special:Upload after following a red link to a file.
+* In SQLite full-text search feature: fixed "move page" feature, was non-
+ functional.
* (bug 24565) Fixed Cache-Control headers sent from API modules, to protect
user privacy in the case where an attacker can access the wiki through the
same HTTP proxy as a logged-in user.
-* Fixed a minor cookie header parsing issue causing incorrect Cache-Control
- headers to be sent.
* Fixed an XSS vulnerability in profileinfo.php for installations with
$wgEnableProfileInfo = true (false by default)
-* For backwards compatibility with extensions from 1.14.x or before, restored
- the original function ApiMain::requestWriteMode().
-* In API login "need token" responses, added the cookieprefix and sessionid
- fields, as in MediaWiki 1.16.x. This is an improvement to the CSRF fix
- introduced in 1.15.3.
+* Fixed a case where an X-Vary-Options header was sent despite $wgUseXVO being
+ false. Fixed a minor header parsing issue when $wgUseXVO = true.
+* Fixed a register_globals arbitrary inclusion vulnerability in
+ MediaWikiParserTest.php, introduced in 1.16 beta 1.
-== Changes since 1.15.3 ==
+== Changes since 1.16 beta 2 ==
+* Fixed bugs in the [[Special:Userlogin]] and [[Special:Emailuser]] handling of
+ invalid usernames.
+* Fixed sorting in [[Special:Allmessages]]
+* (bug 23113) Fixed title in the show/hide links on diff pages
+* (bug 23117) Fixed API rollback, was returning "badtoken" for valid requests
+* (bug 23127) Re-added missing $1 parameter to the uploadtext message
+* Fixed a bug in the Vector skin where personal tools display behind the logo
+* (bug 23139) Fixed a bug in edit conflict resolution, where both textboxes
+ showed the same text.
+* (bug 23115, bug 23124) Fixed various problems with <title> and <h1> elements
+ in page views and previews when the language converter is enabled.
+* (bug 23148) Fixed a local path disclosure vulnerability in ImageMagick image
+ scaling, which was introduced in 1.16 beta 1.
+* Improved error checking on installer.
+* (bug 22970) Fixed a JavaScript error in the upload destination conflict
+ check.
+* (bug 23167) Check the watch checkbox by default if the watchcreations
+ preference is set.
+* (bug 23171) Improve IE6 version check to avoid false positives.
+* (bug 23176) Fixed upload warning override feature "upload new version",
+ broken in 1.16 beta 1.
+* Fixed regression in unwatch links sent out in notification emails. When the
+ mailing job was deferred via the job queue, the title was incorrect.
* (bug 23534) Fixed SQL query error in API list=allusers.
+* Fixed a bug in uploads for non-JavaScript clients. An empty string was used
+ as the default destination filename, instead of the source filename as
+ expected.
* (bug 23371) Fixed CSRF vulnerability in "e-mail me my password", "create
account" and "create by e-mail" features of [[Special:Userlogin]]
* (bug 23687) Fixed XSS vulnerability affecting IE clients only, due to a CSS
validation issue.
+* Fixed a DoS vulnerability in ImageMagick image scaling. ImageMagick
+ expanded wildcard characters "?" and "*" in image filenames, potentially
+ causing large numbers of images to be scaled in response to a single request.
+ The fix for this involves breaking the scaling of such image filenames until
+ ImageMagick 6.6.1-5 or later is deployed, see bug 23361 for more details.
+* (bug 23608) Fixed invalid HTML in diff pages.
-=== Changes since 1.15.2 ===
+=== Changes since 1.16 beta 1 ===
-* (bug 22828) Fixed deletion on SQLite.
+* Fixed errors in maintenance/patchSql.php
+* (bug 19627) Fix regression from r57867 where HTMLForm would output
+ <element classes="foo bar"> rather than <element class="foo bar">
+* Fixed broken "-r" option to maintenance/lag.php
* (bug 23076) Fixed login CSRF vulnerability. Logins now require a token to
be submitted along with the user name and password.
-=== Changes since 1.15.1 ===
+=== Configuration changes in 1.16 ===
-* The installer now includes a check for a data corruption issue with certain
- versions of libxml2 2.7 and PHP earlier than 5.2.9, and also for a PHP bug
- present in the official release of PHP 5.3.1.
-* (bug 20239) MediaWiki:Imagemaxsize does not contain anymore a <br /> tag which
- was displayed to the user
-* (bug 21150) SQLite no longer raise an error when deleting files
-* (bug 20880) Fixed updater failure on SQLite backend
-* upgrade1_5.php now requires to be run --update option to prevent confusion
-* Fixed a CSS validation issue which allowed external images to be included
- into wikis where that is disallowed by configuration.
-* Fixed a data leakage vulnerability for private wikis using img_auth.php or
- similar image access authentication schemes. Check user permissions before
- streaming out scaled images from thumb.php.
-
-=== Changes since 1.15.0 ===
-
-* Fixed fatal errors for unusual file repository configurations, such as
- ForeignAPIRepo.
-* Fixed the "change password" link on Special:Preferences to have the correct
- returnto parameter.
-* (bug 19693) Fixed cross-site scripting vulnerability in Special:Block
-
-=== Changes since 1.15.0rc1 ===
-
-* Removed category redirect feature, implementation was incomplete.
-* (bug 18846) Remove update_password_format(), unnecessary, destroys all
- passwords if a wiki with $wgPasswordSalt=false is upgraded with the web
- installer.
-* (bug 19127) Documentation warning for PostgreSQL users who run update.php:
- use the same user in AdminSettings.php as in LocalSettings.php.
-* Fixed possible web invocation of some maintenance scripts, due to the use of
- include() instead of require(). A full exploit would require a very strange
- web server configuration.
-* Localisation updates.
-
-=== Configuration changes in 1.15 ===
-
-* Added $wgNewPasswordExpiry, to specify an expiry time (in seconds) to
- temporary passwords
-* Added $wgUseTwoButtonsSearchForm to choose the Search form behavior/look
-* Added $wgNoFollowDomainExceptions to allow exempting particular domain names
- from rel="nofollow" on external links
-* (bug 12970) Brought back $wgUseImageResize.
-* Added $wgRedirectOnLogin to allow specifying a specifc page to redirect users
- to upon logging in (ex: "Main Page")
-* Add $wgExportFromNamespaces for enabling/disabling the "export all from
- namespace" option (disabled by default)
-
-=== New features in 1.15 ===
-
-* (bug 2242) Add an expiry time to temporary passwords
-* (bug 9947) Add PROTECTIONLEVEL parser function to return the protection level
- for the current page for a given action
-* (bug 17002) Add &minor= and &summary= as parameters in the url when editing,
- to automatically add a summary or a minor edit.
-* (bug 16852) padleft and padright now accept multiletter pad characters
-* When using 'UserCreateForm' hook to add new checkboxes into
- Special:UserLogin/signup, the messages can now contain HTML to allow
- hyperlinking to the site's Terms of Service page, for example
-* Add new hook 'UserLoadFromDatabase' that is called while loading a user
- from the database.
-* (bug 17045) Options on the block form are prefilled with the options of the
- existing block when modifying an existing block.
-* (bug 17055) "(show/hide)" links to Special:RevisionDelete now use a CSS class
- rather than hardcoded HTML tags
-* Added new hook 'WantedPages::getSQL' into SpecialWantedpages.php to allow
- extensions to alter the SQL query which is used to get the list of wanted
- pages
-* (bugs 16957/16969) Add show/hide to preferences for RC patrol options on
- specialpages
-* (bug 11443) Auto-noindex user/user talk pages for blocked user
-* (bug 11644) Add $wgMaxRedirects variable to control how many redirects are
- recursed through until the "destination" page is reached.
-* Add $wgInvalidRedirectTargets variable to prevent redirects to certain
- special pages.
-* Use HTML5 rel attributes for some links, where appropriate
-* Added optional alternative Search form look - Go button & Advanced search
- link instead of Go button & Search button
-* (bug 2314) Add links to user custom CSS and JS to Special:Preferences
-* More helpful error message on raw page access if PHP_SELF isn't set
-* (bug 13040) Gender switch in user preferences
-* (bug 13040) {{GENDER:}} magic word for interface messages
-* (bug 3301) Optionally sort user list according to account creation time
-* Remote description pages for foreign file repos are now fetched in the
- content language.
-* (bug 17180) If $wgUseFileCache is enabled, $wgShowIPinHeader is automatically
- set to false.
-* (bug 16604) Mark non-patrolled edits in feeds with "!"
-* (bug 16604) Show title/rev in IRC for patrol log
-* (bug 16854) Whether a page is being parsed as a preview or section preview
- can now be determined and set with ParserOptions.
-* Wrap message 'confirmemail_pending' into a div with CSS classes "error" and
- "mw-confirmemail-pending"
-* (bug 8249) The magic words for namespaces and pagenames can now be used as
- parser functions to return the desired namespace or normalized title/title
- part for a given title.
-* (bug 17110) Styled #mw-data-after-content in cologneblue.css to match the
- rest of the font
-* (bug 7556) Time zone names in signatures lack i18n
-* (bug 3311) Automatic category redirects
-* (bug 17236) Suppress 'watch user page link' for IP range blocks
-* Wrap message 'searchresulttext' (Special:Search) into a div with
- class "mw-searchresult"
-* (bug 15283) Interwiki imports can now fetch included templates
-* Treat svn:// URLs as external links by default
-* New function to convert namespace text for display (only applies on wiki with
- LanguageConverter class)
-* (bug 17379) Contributions-title is now parsed for magic words.
-* Preprocessor output now cached in memcached.
-* (bug 14468) Lines in classic RecentChanges and Watchlist have classes
- "mw-line-odd" and "mw-line-even" to make styling using css possible.
-* (bug 17311) Add a note beside the gender selection menu to tell users that
- this information will be public
-* Localize time zone regions in Special:Preferences
-* Add NUMBEROFACTIVEUSERS magic word, which is like NUMBEROFUSERS, but uses
- the active users data from site_stats.
-* Add a <link rel="canonical"> tag on redirected page views
-* Replace hardcoded '...' as indication of a truncation with the
- 'ellipsis' message
-* Wrap warning message 'editinginterface' into a div with class
- 'mw-editinginterface'
-* (bug 17497) Oasis opendocument added to mime.types
-* Remove the link to Special:FileDuplicateSearch from the "file history" section
- of image description pages as the list of duplicated files is shown in the
- next section anyway.
+* (bug 18222) $wgMinimalPasswordLength default is now 1
+* $wgSessionHandler can be used to configure session.save_handler
+* $wgLocalFileRepo/$wgForeignFileRepos now have a 'fileMode' parameter to
+ be used when uploading/moving files
+* (bug 18761) $wgHiddenPrefs is a new array for specifying preferences not
+ to be shown to users
+* $wgAllowRealName and $wgAllowUserSkin were deprecated in favor of
+ $wgHiddenPrefs[] = 'realname', but the former are still retained
+ for backwards-compatibility
+* (bug 9257) $wgRCMaxAge now defaults to three months
+* $wgDevelopmentWarnings can be set to true to show warnings about deprecated
+ functions and other potential errors when developing.
+* Subpages are now enabled in the MediaWiki namespace by default. This is
+ mainly a cosmetic change, and does not in any way affect the MessageCache,
+ which was already effectively treating the namespace as if it had subpages.
+* Oracle: maintenance/ora/user.sql script for creating DB user on oracle with
+ appropriate privileges. Creating this user with web-install page requires
+ oci8.privileged_connect set to On in php.ini.
+* Removed UserrightsChangeableGroups hook introduced in 1.14
+* Added $wgCacheDirectory, to replace $wgFileCacheDirectory,
+ $wgLocalMessageCache, and any other local caches which need a place to put
+ files.
+* $wgFileCacheDirectory is no longer set to anything by default, and so either
+ needs to be set explicitly, or $wgCacheDirectory needs to be set instead.
+* $wgLocalMessageCache has been removed. Instead, set $wgUseLocalMessageCache
+ to true
+* Removed $wgEnableSerializedMessages and $wgCheckSerialized. Similar
+ functionality is now available via $wgLocalisationCacheConf.
+* $wgMessageCache->addMessages() is deprecated. Messages added via this
+ interface will not appear in Special:AllMessages.
+* $wgRegisterInternalExternals can be used to record external links pointing
+ to same server
+* (bug 19907) $wgCrossSiteAJAXdomains and $wgCrossSiteAJAXdomainExceptions added
+ to control which external domains may access the API via cross-site AJAX.
+* $wgMaintenanceScripts for extensions to add their scripts to the default list
+* $wgMemoryLimit has been added, default value '50M'
+* $wgExtraRandompageSQL is deprecated, the SpecialRandomGetRandomTitle hook
+ should be used instead
+* (bug 20489) $wgIllegalFileChars added to override the default list of illegal
+ characters in file names.
+* (bug 19646) $wgImgAuthDetails added to display reason access to uploaded file
+ was denied to users(img_auth only)
+* (bug 19646) $wgImgAuthPublicTest added to test to see if img_auth set up
+ correctly (img_auth only)
+* $wgUploadMaintenance added to disable file deletions and restorations during
+ maintenance
+* $wgCapitalLinkOverrides added to configure per-namespace capitalization
+* (bug 21172) $wgSorbsUrl can now be an array with multiple DNSBL and renamed
+ to $wgDnsBlacklistUrls (backward compatibility kept)
+* $wgEnableHtmlDiff has been removed
+* (bug 3340) $wgBlockCIDRLimit added (default: 16) to configure the low end of
+ CIDR ranges for blocking
+* $wgUseInstantCommons added for quick and easy enabling of Commons as a remote
+ file repository
+* $wgDBAhandler added to choose a DBA handler when using CACHE_DBA
+* $wgPreviewOnOpenNamespaces for extensions that create namespaces that behave
+ similarly to the category namespace.
+* $wgEnableSorbs renamed to $wgDnsBlacklistUrls ($wgEnableSorbs kept for
+ backward compatibility)
+* $wgUploadNavigationUrl now also affects images inline images that do not
+ exist. In that case the URL will get (?|&)wpDestFile=<filename> appended to
+ it as appropriate.
+* If $wgLocaltimezone is null, use the server's timezone as the default for
+ signatures. This was always the behaviour documented in DefaultSettings.php
+ but has not been the actual behaviour for some time: instead, UTC was used
+ by default.
+* Added $wgExtensionAssetsPath, to decouple assets serving from $wgScriptPath.
+ If not specified it will default to $wgScriptPath/extensions
+* Added $wgCountTotalSearchHits to make search UI display total number of hits
+ with some search engines.
+* Added $wgAdvertisedFeedTypes to decide what feed types (RSS, Atom, both, or
+ neither) MediaWiki advertises. Default is array( 'atom' ), so RSS is no
+ longer advertised by default (but it still works).
+* Added $wgMemCachedTimeout, controls how long to wait for data from the
+ memcached servers.
+* New configuration variables $wgDebugTimestamps and $wgDebugPrintHttpHeaders
+ for controlling debug output.
+* New $wgBlockDisablesLogin when set to true disallows blocked users from
+ logging in.
+* (bug 8790) Metadata edition ($wgUseMetadataEdit) has been moved to a separate
+ extension "MetadataEdit".
+
+=== New features in 1.16 ===
+
+* Add CSS defintion of the 'wikitable' class to shared.css
+* (bug 17163) Added MediaWiki:Talkpageheader which will be displayed when
+ viewing talk pages
+* Superfluous border="0" removed from images
+* Added new hook 'MessageCacheReplace' into MessageCache.php. For instance
+ to allow extensions to update caches in similar way as MediaWiki invalidates
+ a cached MonoBook sidebar
+* Special:AllPages: Move hardcoded styles from code to CSS
+* (bug 18529) New hook: SoftwareInfo for adding information about the software
+ to Special:Version
+* Added $wgExtPGAlteredFields to allow extensions to easily alter the data
+ type of columns when using the Postgres backend.
+* (bug 16950) Show move log when viewing/creating a deleted page
+* (bug 18242) Show the Subversion revision number per extensions in
+ Special:Version
+* (bug 18420) Missing file revisions are handled gracefully now
+* (bug 9219) Auth plugins can control editing RealName/Email/Nick preferences
+* (bug 18466) Add note or warning when overruling a move (semi-)protection
+* (bug 18342) insertTags works in edit summary box
+* (bug 18411) The upload form also checks post_max_size
+* Watchlist now has a specialized <div> tag that contains a unique class for
+ each page
+* Added Minguo calendar support for the Taiwan Chinese language
+* Database: unionQueries function to be used for UNION sql construction, so
+ it can be overloaded on DB abstraction level for DB specific functionality
+* (bug 18849) Implement Japanese and North Korean calendars
+* (bug 5755) Introduce {{CURRENTMONTH1}} and {{LOCALMONTH1}} to display the
+ month number without the leading zero
+* (bug 13456) categoriespagetext supports PLURAL
+* (bug 18860) Blocks of IPs affecting registered users can now block email
+* (bug 17093) Date and time are separate parameters in Special:BlockList
+* (bug 11484) Added ISO speed rating to default collapsed EXIF metadata view
+* (bug 14866) Messages 'recentchangeslinked-toolbox' and
+ 'recentchangeslinked-toolbox' were added to allow more fine grained
+ customisation of the user interface
+* DISPLAYTITLE now accepts a limited amount of wiki markup (the single-quote
+ items)
+* Special:Search now could search terms in all variant-forms. ONLY apply on
+ wikis enabled LanguageConverter.
+* Add autopromote condition APCOND_BLOCKED to autopromote blocked users to
+ various user groups.
+* Add $wgRevokePermissions as a means of restricting a group's rights. The
+ syntax is identical to $wgGroupPermissions, but users in these groups will
+ have these rights stripped from them.
+* Added a PHP port of CDB (constant database), for improved local caching when
+ the DBA extension is not available.
+* Introduced a new system for localisation caching. The system is based around
+ fast fetches of individual messages, minimising memory overhead and startup
+ time in the typical case. The database backend will be used by default, but
+ set $wgCacheDirectory to get a faster CDB-based implementation.
+* Expanded the number of variables which can be set in the extension messages
+ files.
+* Added a feature to allow per-article process pool size control for the parsing
+ task, to limit resource usage when the cache for a heavily-viewed article is
+ invalidated. Requires an external daemon.
+* (bug 19576) Moved the id attribues from the anchors accompanying section
+ headers to the <span class="mw-headline"> elements within the section headers,
+ removing the redundant anchor elements.
+* Parser::setFunctionTagHook now can be used to add a new tag which is parsed at
+ preprocesor level.
+* Added $wgShowArchiveThumbnails, allowing sysadmins to disable thumbnail
+ display for old versions of images.
+* In watchlists and Special:RecentChanges, the difference in page size now
+ appears in dark green if bytes were added and dark red if bytes were removed.
+* Added FSRepo configuration properties thumbUrl and thumbDir, to allow the
+ thumbnails to be stored in a separate location to the source images.
+* If config/ directory is not executable, the command to make it executable
+ now asks the user to cd to the correct directory
+* Add experimental new external authentication framework, ExternalAuth
+* (bug 18768) Remove AdminSettings requirements. Maintenance environment
+ will still load it if it exists, but it's not required for anything
+* (bug 19900) The "listgrouprights-key" message is now wrapped in a div with
+ class "mw-listgrouprights-key"
+* (bug 471) Allow RSS feeds for watchlist, using an opt-in security token
+* (bug 10812) Interwiki links can have names and descriptions, fetched from
+ message 'interwiki-desc-PREFIX', not really used anywhere yet though
+* (bug 9691) Add type (signup or login) parameter to
+ AuthPlugin::ModifyUITemplate()
+* (bug 14454) "Member of group(s)" in Special:Preferences causes language
+ difficulties
+* (bug 16697) Unicode combining characters are difficult to edit in some
+ browsers
+* Parser test supports uploading results to remote CodeReview instance
+* (bug 20013) Added CSS class "mw-version-ext-version" is wrapped on the
+ extension version in Special:Version
+* (bug 20014) Added CSS class "mw-listgrouprights-right-name" is wrapped on the
+ right name in Special:ListGroupRights
+* (bug 12920) New CoreParserFunction {{nse:...}} as an url-friendly equivalent
+ to {{ns:...}}
+* (bug 16322) Allow maintenance scripts to accept DB user/pass over input or
+ params
+* (bug 18566) Maintenance script to un/protect pages
+* (bug 671) The HTML <abbr> tag is now permitted.
+* RecentChanges now has a legend to explain what the Nmb! flags mean, and the
+ flags have tooltips.
+* (bug 15209) New hook BeforeInitialize called after everything has been setup
+ but before Mediawiki::performRequestForTitle()
+* wgMainPageTitle variable now available to JavaScript code to identify the main
+ page link, so it doesn't have to be extracted from the link URLs.
+* (bug 16836) Display preview of signature in user preferences and describe its
+ use
+* The default output format is now HTML 5 instead of XHTML 1.0 Transitional.
+ This can be disabled by setting $wgHtml5 = false;. Specific features enabled
+ if HTML 5 is used:
+** Some extra inputs will be autofocused, in supporting browsers.
+** The summary attribute has been removed from tables of contents. summary is
+ obsolete in HTML 5 and wasn't useful here anyway.
+** Unnecessary type="" attribute removed for CSS and JS.
+** If $wgWellFormedXml is set to false, some bytes will be shaved off of HTML
+ output by omitting some things like quotation marks where HTML 5 allows.
+** (bug 16921) maxlength enabled for page move comments
+* The description message in $wgExtensionCredits can be an array with parameters
+* New hook SpecialRandomGetRandomTitle allows extensions to modify the selection
+ criteria used by Special:Random and subclasses, or substitute a custom result,
+ deprecating the $wgExtraRandompageSQL config variable
+* (bug 20318) Distinct CSS classes for ISBN/RFC/PMID special links added
+* (bug 20404) Custom fields in the user creation form template can now have
+ detail labels in prefsectiontip divs.
+* MakeSysop and MakeBot are now aliases for Special:UserRights
+* IndexPager->mLimitsShown can now be an associative array of limit => text-to-
+ display-in-limit-form.
+* (bug 18880) LogEventsList::showLogExtract() can now take a string-by-reference
+ and add its HTML to it, rather than having to go straight to $wgOut.
+* Added $wgShowDBErrorBacktrace, to allow users to easily gather backtraces for
+ database connection and query errors.
+* Show change block / unblock link on Special:Contributions if user is blocked
+* Display note on Special:Contributions if the user is blocked, and provide an
+ excerpt from the block log.
+* (bug 19646) New hook: ImgAuthBeforeStream for tests and functionality before
+ file is streamed to user, but only when using img_auth
+* Note on non-existing user and user talk pages if user does not exist
+* New hook ShowMissingArticle so extensions can modify the output for
+ non-existent pages.
+* Admins could disable some variants using $wgDisabledVariants now. ONLY apply
+ on wikis enabled LanguageConverter.
+* (bug 16310) Credits page now lists IP addresses rather than saying the number
+ of anonymous users that edited the page
+* New permission 'sendemail' added. Default right for all registered users. Can
+ for example be used to prevent new accounts from sending spam.
+* (bug 16979) Tracking categories for __INDEX__ and __NOINDEX__
+* Two new hooks, ConfirmEmailComplete and InvalidateEmailComplete, which are
+ called after a user's email has been successfully confirmed or invalidated.
+* (bug 19741) Moved the XCF files out of the main MediaWiki distribution, for
+ a smaller subversion checkout.
+* (bug 13750) First letter capitalization can now be a per-namespace setting
+* (bug 21073) "User does not exist" message no longer displayed on sub-sub-pages
+ of existing users
+* (bug 21095) Tracking categories produced by the parser (expensive parser
+ function limit exceeded, __NOINDEX__ tracking, etc) can now be disabled by
+ setting the system message ([[MediaWiki:expensive-parserfunction-category]]
+ etc) to "-".
+* Added maintenance script sqlite.php for SQLite-specific maintenance tasks.
+* Rewrote Special:Upload to allow easier extension.
+* Upload errors that can be solved by changing the filename now do not require
+ reuploading.
* Added $wgRateLimitsExcludedIPs, to allow specific IPs to be whitelisted from
rate limits.
-* (bug 14981) Shared repositories can now have display names, located at
- Mediawiki:Shared-repo-name-REPONAME, where REPONAME is the name in
- $wgForeignFileRepos
-* Special:ListUsers: Sort list of usergroups by alphabet
-* (bug 16762) Special:Movepage now shows a list of subpages when possible
-* (bug 17585) Hide legend on Special:Specialpages from non-privileged users
-* Added $wgUseTagFilter to control enabling of filter-by-change-tag
-* (bug 17291) MediaWiki:Nocontribs now has an optional $1 parameter for the
- username
-* Wrap special page summary message '$specialPageName-summary' into a div
- with class 'mw-specialpage-summary'
-* $wgSummarySpamRegex added to handle edit summary spam. This is used *instead*
- of $wgSpamRegex for edit summary checks. Text checks still use $wgSpamRegex.
-* New function to convert content text to specified language (only applies on wiki with
- LanguageConverter class)
-* (bug 17844) Redirect users to a specific page when they log in, see
- $wgRedirectOnLogin
-* Added a link to Special:UserRights on Special:Contributions for privileged users
-* (bug 10336) Added new magic word {{REVISIONUSER}}, which displays the editor
- of the displayed revision's author user name
-* LinkerMakeExternalLink now has an $attribs parameter for link attributes and
- a $linkType parameter for the type of external link being made
-* (bug 17785) Dynamic dates surrounded with a <span> tag, fixing sortable tables
- with dynamic dates.
-* (bug 4582) Provide preference-based autoformatting of unlinked dates with the
- dateformat parser function.
-* (bug 17886) Special:Export now allows you to export a whole namespace (limited
- to 5000 pages)
-* (bug 17714) Limited TIFF upload support now built in if 'tif' extension is
- enabled. Image width and height are now recognized, and when using ImageMagick,
- optional flattening to PNG or JPEG for inline display can be enabled by setting
- $wgTiffThumbnailType
-* Renamed two input IDs on Special:Log from 'page' and 'user' to 'mw-log-page' and
- 'mw-log-user', respectively
-* Added $wgInvalidUsernameCharacters to disallow certain characters in
- usernames during registration (such as "@")
-* Added $wgUserrightsInterwikiDelimiter to allow changing the delimiter
- used in Special:UserRights to denote the user should be searched for
- on a different database
-* Add a class if 'missingsummary' is triggered to allow styling of the summary
- line
-
-=== Bug fixes in 1.15 ===
-
-* (bug 16968) Special:Upload no longer throws useless warnings.
-* (bug 17000) Special:RevisionDelete now checks if the database is locked
- before trying to delete the edit.
-* (bug 16852) padleft and padright now handle multibyte characters correctly
-* (bug 17010) maintenance/namespaceDupes.php now add the suffix recursively if
- the destination page exists
-* (bug 17035) Special:Upload now fails gracefully if PHP's file_uploads has
- been disabled
-* Fixing the caching issue by using -{T|xxx}- syntax (only applies on wiki with
- LanguageConverter class)
-* Improving the efficiency by using -{A|xxx}- syntax (only applies on wiki with
- LanguageConverter class)
-* (bug 17054) Added more descriptive errors in Special:RevisionDelete
-* (bug 11527) Diff on page with one revision shows "Next" link to same diff
-* (bug 8065) Fix summary forcing for new pages
-* (bug 10569) redirects to Special:Mypage and Special:Mytalk are no longer
- allowed by default. Change $wgInvalidRedirectTargets to re-enable.
-* (bug 3043) Feed links of given page are now preceded by standard feed icon
-* (bug 17150) escapeLike now escapes literal \ properly
-* Inconsistent use of sysop, admin, administrator in system messages changed
- to 'administrator'
-* (bug 14423) Check block flag validity for block logging
-* DB transaction and slave-lag avoidance tweaks for Email Notifications
-* (bug 17104) Removed [Mark as patrolled] link for already patrolled revisions
-* (bug 17106) Added 'redirect=no' and 'mw-redirect' class to redirects at
- "user contributions"
-* Rollback links on new pages removed from "user contributions"
-* (bug 15811) Re-upload form tweaks: license fields removed, destination locked,
- comment label uses better message
-* Whole HTML validation ($wgValidateAllHtml) now works with external tidy
-* Parser tests no longer fail when $wgExternalLinkTarget is set in
- LocalSettings
-* (bug 15391) catch DBQueryErrors on external storage insertion. This avoids
- error messages on save were the edit in fact is saved.
-* (bug 17184) Remove duplicate "z" accesskey in MonoBook
-* Parser tests no longer fail when $wgAlwaysUseTidy is set in LocalSettings.php
-* Removed redundant dupe warnings on reupload for the same title. Dupe warnings
- for identical files at different titles are still given.
-* Add 'change tagging' facility, where changes can be tagged internally with
- certain designations, which are displayed on various summaries of changes,
- and the entries can be styled with CSS.
-* (bug 17207) Fix regression breaking category page display on PHP 5.1
-* Categoryfinder utility class no longer fails on invalid input or gives wrong
- results for category names that include pseudo-namespaces
-* (bug 17252) Galician numbering format
-* (bug 17146) Fix for UTF-8 and short word search for some possible MySQL
- configs
-* (bug 7480) Internationalize database error message
-* (bug 16555) Number of links to mediawiki.org scaled back on post-installation
-* (bug 14938) Removing a section no longer leaves excess whitespace
-* (bug 17304) Fixed fatal error when thumbnails couldn't be generated for file
- history
-* (bug 17283) Remove double URL escaping in show/hide links for log entries
- and RevisionDeleteForm::__construct
-* (bug 17105) Numeric table sorting broken
-* (bug 17231) Transcluding special pages on wikis using language conversion no
- longer affects the page title
-* (bug 6702) Default system messages updated/improved
-* (bug 17190) User ID on preference page no longer has delimeters
-* (bug 17341) "Powered by MediaWiki" should be on the left on RTL wikis
-* (bug 17404) "userrights-interwiki" right was missing in User::$mCoreRights
-* (bug 7509) Separation strings should be configurable
-* (bug 17420) Send the correct content type from action=raw when the HTML file
- cache is enabled.
-* (bug 12746) Do not allow new password e-mails when wiki is in read-only mode
-* (bug 17478) Fixed a PHP Strict standards error in
- maintenance/cleanupWatchlist.php
-* (bug 17488) RSS/Atom links in left toolbar are now localized in classic skin
-* (bug 17472) use print <<<EOF in maintenance/importTextFile.php
-* Special:PrefixIndex: Move table styling to shared.css, add CSS IDs to tables
- use correct message 'allpagesprefix' for input form label, replace _ with ' '
- in next page link
-* (bug 17506) Exceptions within exceptions now respect $wgShowExceptionDetails
-* Fixed excessive job queue utilisation
-* File dupe messages for remote repos are now shown only once.
-* (bug 14980) Messages 'shareduploadwiki' and 'shareduploadwiki-desc' are now
- used as a parameter in 'sharedupload' for easier styling and customization.
-* (bug 17482) Formatting error in Special:Preferences#Misc (Opera)
-* (bug 17556) <link> parameters in Special:Contributions feeds (RSS and Atom)
- now point to the actual contributors' feed.
-* ForeignApiRepos now fetch MIME types, rather than trying to figure it locally
-* Special:Import: Do not show input field for import depth if
- $wgExportMaxLinkDepth == 0
-* (bug 17570) $wgMaxRedirects is now correctly respected when following
- redirects (was previously one more than $wgMaxRedirects)
-* (bug 16335) __NONEWSECTIONLINK__ magic word to suppress new section link.
-* (bug 17581) Wrong index name in PostgreSQL's updater: was rc_timestamp_nobot,
- changed to rc_timestamp_bot
-* (bug 17437) Fixed incorrect link to web-based installer
-* (bug 17538) Use shorter URLs in <link> elements
-* (bug 13778) Hidden input added to the search form so that using the Enter key
- on IE will do a fulltext search like clicking the button does
-* (bug 1061) CSS-added icons next to links display through the text and makes
- it unreadable in RTL
-* Special:Wantedtemplates now works on PostgreSQL
-* (bug 14414) maintenance/updateSpecialPages.php no longer throws error with
- PostgreSQL
-* (bug 17546) Correct Tongan language native name is "lea faka-Tonga"
-* (bug 17621) Special:WantedFiles has no link to Special:Whatlinkshere
-* (bug 17460) Client ecoding is now correctly set for PostgreSQL
-* (bug 17648) Prevent floats from intruding into edit area in previews if no
- toolbar present
-* (bug 17692) Added (list of members) link to 'user' in Special:Listgrouprights
-* (bug 17707) Show file destination as plain text if &wpForReUpload=1
-* (bug 10172) Moved setting of "changed since last visit" flags out of the job
- queue
-* (bug 17761) "show/hide" link in page history in now works for the first
- displayed revision if it's not the current one
-* (bug 17722) Fix regression where users are unable to change temporary passwords
-* (bug 17799) Special:Random no longer throws a database error when a non-
- namespace is given, silently falls back to NS_MAIN
-* (bug 17751) The message for bad titles in WantedPages is now localized
-* (bug 17860) Moving a page in the "MediaWiki" namespace using SuppressRedirect
- no longer corrupts the message cache
-* (bug 17900) Fixed User Groups interface log display after saving groups.
-* (bug 17897) Fixed string offset error in <pre> tags
-* (bug 17778) MediaWiki:Catseparator can now have HTML entities
-* (bug 17676) Error on Special:ListFiles when using Postgres
-* Special:Export doesn't use raw SQL queries anymore
-* (bug 14771) Thumbnail links to individual DjVu pages have two no longer have
- two "page" parameters
-* (bug 17972) Special:FileDuplicateSearch form now works correctly on wikis that
- don't use PathInfo or short urls
-* (bug 17990) trackback.php now has a trackback.php5 alias and works with
- $wgScriptExtension
-* (bug 14990) Parser tests works again with PostgreSQL
-* (bug 11487) Special:Protectedpages doesn't list protections with pr_expiry
- IS NULL
-* (bug 18018) Deleting a file redirect leaves behind a malfunctioning redirect
-* (bug 17537) Disable bad zlib.output_compression output on HTTP 304 responses
-* (bug 11213) [edit] section links in printable version no longer appear when
- you cut-and-paste article text
-* (bug 17405) "Did you mean" to mirror Go/Search behavior of original request
-* (bug 18116) 'edittools' is now output identically on edit and upload pages
-* (bug 17241) The diffonly URI parameter should cascade to "Next edit" and
- "Previous edit" diff links
-* (bug 16823) 'Sidebar search form should not use Special:Search view URL as
- target'
-* (bug 16343) Non-existing, but in use, category pages can be "go" match hits
-* Fixed the circular template inclusion check, was broken when the loop
- involved redirects. Without this, infinite recursion within the parser is
- possible.
-* (bug 17611) Provide a sensible error message on install when the SQLite data
- directory is wrong.
-* (bug 16937) Fixed PostgreSQL installation on Windows, workaround for upstream
- pg_version() bug.
-* (bug 11451) Fix upgrade from MediaWiki 1.2 or earlier (imagelinks schema).
-* Fixed SQLite indexes, installation and upgrade. Reintroduced it as an option
- to the installer.
+* (bug 21222) When $wgUseTeX is not enabled, <math> is no longer registered with
+ the parser so extensions are free to implement their own <math> tag
+* (bug 21047) Wrap 'cannotdelete' into a div with the generic 'error' class and
+ an own 'mw-error-cannotdelete' class
+* New hook AbortNewAccountAuto, called before account creation from AuthPlugin-
+ or ExtUser-driven requests.
+* (bug 3480) The warning saying that the page has a history when deleting it now
+ contains the number of revisions in the history
+* $wgStylePath and $wgLogo are now set in the default LocalSettings.php file.
+* (bug 20186) Allow filtering history for revision deletion.
+* New hook OtherBlockLogLink, called in Special:IPBlockList and Special:Block
+ to show links to block logs of other blocking extensions, i.e. GlobalBlocking
+* Added search capabilities to SQLite backend
+* rebuildtextindex.php maintenance script now supports databases other than
+ MySQL
+* upgrade1_5.php now requires to be run --update option to prevent confusion
+* (bug 17662) Customizable default preload/editintro for new sections in the
+ respective addsection-preload and addsection-editintro messages
+* Added maintenance script checkSyntax.php that checks for PHP syntax errors
+ and common coding mistakes
+* Updated Unicode normalization tables
+* (bug 21604) Spellcheck attribute for editsummary
+* New wgCategories JavaScript global variable for userscripts.
+* (bug 20717) Added checkboxes to hide users with bot and/or sysop group
+ membership in SpecialActiveusers
+* Allow \pagecolor and \definecolor in texvc
+* $wgTexvcBackgroundColor contains background color for texvc call
+* (bug 21574) Redirects can now have "303 See Other" HTTP status
+* EditPage refactored to allow extensions to derive new edit modes much easier.
+* (bug 21826) Subsections of Special:Version now also have anchors
+* (bug 19791) Add URL of file source as comment to thumbs (for ImageMagick)
+* (bug 21946) Sorted wikitables do not properly handle minus signs
+* (bug 18885) Red links for media files do not support shared repositories
+* Added $wgFixArabicUnicode, to convert deprecated presentation forms in
+ Arabic text to their modern equivalents, and $wgFixMalayalamUnicode, to
+ convert ZWJ-based chillu sequences in Malayalam text to their Unicode 5.1
+ equivalents.
+* (bug 22051) Returing false in SpecialContributionsBeforeMainOutput hook now
+ stops normal output
+* Send new password e-mail in users preference language
+* LanguageConverter now support nested using of manual convert syntax like
+ "-{-{}-}-"
+* Upload license preview now uses the API instead of action=ajax
+* (bug 7346) Add <guid> to RSS to avoid duplicates
+* (bug 19996) Added new hooks for Special:Search, which allow to further
+ restrict/expand it.
+* (bug 21936) When a revision has been patrolled, there's now a link back to the
+ article
+* (bug 22315) SpecialRecentChangesQuery hook now pass $query_options and checks
+ the return value
+* Separate unit test suites under t/ and tests/ were merged and moved to
+ maintenance/tests/.
+* importImages.php maintenance script can now use the original uploader and
+comment from another wiki.
+* Support for Turck MMCache was removed
+* (bug 14592) Warn users when they try to move their user page that their
+ account will not be renamed
+* Show block log on non-existing user (talk) pages of currently blocked users
+
+=== Bug fixes in 1.16 ===
+
+* (bug 18031) Make namespace selector on Special:Export remember the previous
+ selection
+* The svn-version version numbers on Special:Version have been removed
+* (bug 17374) Special:Export no longer exports two copies of the same page
+* (bug 18190) Proper parsing in MediaWiki:Sharedupload message
+* (bug 17617) HTML cleanup for ImagePage
+* (bug 17964) namespaceDupes.php no longer fails on an empty interwiki table
+* Improved error handling for image moving
+* (bug 17974) On Special:SpecialPages, restricted special pages are now marked
+ with <strong> tags, helps with text-based browsers
+* (bug 18259) Special:DeletedContributions now also uses
+ MediaWiki:Sp-contributions-logs for the link to Special:Log
+* Don't add empty title="" attributes to links to anchors on the current page
+* (bug 18291) rebuildrecentchanges.php failed to add deletion log entries
+* (bug 18304) rebuildrecentchanges.php got size changes wrong
* (bug 18170) Fixed a PHP warning in Parser::preSaveTransform() in PHP 5.3
+* (bug 18289) Database connection error page now returns correct HTML
+* "successbox", "errorbox" and related CSS classes are now available in all
+ skins
+* (bug 18316) Removed superfluous name="fulltext" from Special:Search
+* (bug 18331) MediaWiki:Undelete-revision can now have wikitext
+* The "noautoblock" flag is no longer displayed in the block log when blocking
+ an IP address
+* (bug 18009) $wgHooks and $wgExtensionFunctions now support closures
+* (bug 17948) Maintenance scripts now exit(0) or exit(1) as appropriate
+* (bug 18377) Time in Enhanced ChangesList lacking localisation
+* (bug 12998) Allow <sup>, <sub>, etc. in DISPLAYTITLE
+* (bug 1553) Lowercase navigation headings in German
+* (bug 7830) Pending transactions failed to commit on loginToUse() error
+* (bug 11613) session.save_handler being over-ridden
+* (bug 11381) session.save_handler being set twice (causes error)
+* (bug 17835) ForeignAPIRepo throwing error on first page load for file
+* (bug 18115) ForeignAPIRepo cache isn't working
+* Fixed a bug caused by LanguageConverter.php, which brings an abnormal '}-'
+ after some parsed math syntax.
+* (bug 18441) rebuildrecentchanges.inc no longer ignores $wgLogRestrictions
+* (bug 18317) Bolded selections in 1 | 3 | etc days on RecentChanges now use
+ <strong> instead of hardcoded styles
+* (bug 18449) Fixed items number per column on category pages when the total is
+ divisible by 3
+* (bug 18121) maintenance/deleteArchivedRevisions.php no longer deletes
+ revisions when --delete is not passed
+* (bug 13172) GPS coordinates in image Exif data are now actually displayed
+* Overhaul of preferences system, includes the following bug fixes:
+** (bug 5363) Changes to default preferences now impact registered users.
+** (bug 14806) Hook to enable putting preferences in existing tabs.
+** (bug 17191) Registration date now listed on preferences page.
+** The user_properties table (now used for storing preferences) has been added
+ to $wgSharedTables.
+** Note that this change will break some extensions which have not been adapted
+ for it.
+* (bug 17020) Adding fallback encodings for Traditional and Simplified Chinese
+ languages while the the text is typed as URLs.
+* (bug 17614) Prev / Next links are not shown if all results are shown
+* (bug 18207) Strange spacing before [[irc:...]] links
+* Removed float from the user login form in RTL interface - caused display
+ problems in FF2
+* (bug 15008) Redirect images are now subject to Bad image list rules
+* (bug 6802) profileinfo.php now also work on other database servers than MySQL
+* (bug 16925) Diffs no longer fail when $wgExternalDiffEngine is set to
+ 'wikidiff' or 'wikidiff2' but extension is not installed
+* (bug 18326) Chmod errors in file repos have been hidden
+* (bug 18718) Comma after a } create a error in IE
+* (bug 18716) Removed redundant class in Modern skin CSS for category links and
+ tweaked spacing.
+* (bug 18656) Use proper directory separators in wfMkdirParents()
+* (bug 18549) Make Special:Blockip respect $wgEnableUserEmail and
+ $wgSysopEmailBans
+* (bug 16912) Tooltips on images with link= disappear
+* (bug 18389) Localise numbers in EXIF data
+* (bug 18522) Wrap MediaWiki:Protect-cascadeon in a div for identification
+* (bug 18438) Tweak HTML for preview bar for consistency and accessibility
+* (bug 18432) Updated documentation for dumpBackup.php
+* Fix array logic in Sanitizer::removeHTMLtags so that it doesn't strip good
+ tags that were redundantly defined.
+* (bug 14118) SpecialPage::getTitleFor does not return a localised name
+* (bug 18698) Renaming non entry point maintenance scripts from .inc.php to
+ .inc
+* Deprecated methods Title::getInterwikiLink, Title::userCanCreate(),
+ Title::userCanEdit() and Title::userCanMove() have been removed
+* Only show upload links on file description if $wgEnableUploads = true
+ and user can upload
+* Don't say "You need to log in to upload/move", because it's possible that
+ uploading/moving is disabled for registered users as well (e.g. only sysops)
+* (bug 18943) Handle invalid titles gracefully at Special:Mostlinked
* (bug 8873) Enable variant conversion in text on 'alt' and 'title' attributes
+* (bug 10837) Introducing the StubUserVariant class to determine the variant
+ variable instead of using this to overrules the user language preference.
+* (bug 19014) If user had deletedhistory right, but not undeleted right, then
+ show "view" instead of "view/restore" on logs.
+* (bug 19017) TOC level calculation error in an odd case
+* (bug 18999) CSS update for RTL interwiki links
+* (bug 18925) history.js removes class names of list elements on initialization
+* Multiple whitespace in TOC anchors is now stripped, for consistency with the
+ link from the edit comment
+* (bug 19112) Preferences now respects $wgUseExternalEditor
+* (bug 18173) MediaWiki now fails when unable to determine a client IP
+* (bug 19170) Special:Version should follow the content language direction
+* (bug 19160) maintenance/purgeOldText.inc is now compatible with PostgreSQL
+* Fixed performance regression in "bad image list" feature
+* Show user preference 'Use live preview' if $wgLivePreview is enabled only
+* (bug 17014) Blocked users can no longer use Special:UserRights unless they
+ can add/remove *all* groups (have 'userrights' permission).
+* (bug 19294) Always show Sp-contributions-footer(-anon)
+* Attempts to restrict reading of pages while anonymous viewing is allowed
+ via extensions not using the userCan hook and via $wgRevokePermissions now
+ work.
+* (bug 8445) Multiple-character search terms are now handled properly for
+ Chinese
+* (bug 19450) Use formatNum for "Number of edits" in Special:Preferences
+* (bug 11242) Check for MySQL storage engines during installation now checks
+ whether the engines are actually available
+* (bug 19390) Omit the "printable version" link on the printable version
+* (bug 18394) img_auth.php now respects userCan
+* (bug 19509) Uploading to a file named '0' previously treated it as null input
+ and attempted to upload with the source name. Now warns about not having an
+ extension (since 0.ext is perfectly valid)
+* (bug 19468) Enotif preferences are now only displayed when they are turned on
+* (bug 19442) Show/hide options on watchlist only work once
+* (bug 19602) PubMed Magic links now use updated NIH url
+* (bug 19637) externallinks have links to self
+* Don't load Opera 9.5 RTL fixes for Opera 9.6
+* Remove five-year-old KHTMLFixes.css, which is unlikely to be relevant anymore
+ and was causing problems.
+* Removed repetition of URIs in the title attributes of external links.
+* (bug 19693) User name is now escaped in "Contributions for ..." link on
+ Special:BlockIP
+* (bug 19571) Override buildConcat for SQLite.
+* Log in and log out links no longer return to page view when clicked from
+ history view, edit page, or something similar
+* (bug 19513) RTL fixes for new Search UI
+* (bug 16497) Special:Allmessages is paginated
+* (bug 18708) CSS plainlinks class now available to all skins
+* (bug 19590) Database error messages no longer have "MySQL" hardcoded as the
+ database type
+* (bug 19759) successbox on Special:Preferences now correctly aligned on
+ standard, nostalgia and cologneblue skin
+* (bug 19814) interwiki links from file links ([[File:Foo.jpg|link=de:Test]])
+ are no longer recorded in the pagelinks table
+* (bug 19784) date option "ISO 8601" produced illegal id
+* (bug 19761) Removed autogenerated <meta keywords> tag with link data.
+ Keyword set was not useful, and is ignored by modern search engines anway.
+* (bug 19827) Special:SpecialPages title is "Upload file
+* (bug 19355) Added .xhtml, .xht to upload file extension blacklist
+* (bug 19287) Workaround for lag on history page in Firefox 3.5
+* (bug 19564) Updated docs/hooks.txt
+* (bug 18751) Fix for buggage in profiling setup for some extensions on PHP 5.1
+* (bug 17139) ts_resortTable inconsistent trimming makes date sorting fragile
+* (bug 19445) Change oldimage table to use ON UPDATE CASCADE for FK to image
+ table.
+* (bug 14080) Short notation links to subpages didn't work in edit summaries
+* (bug 17374) Special:Export no longer exports multiple copies of pages
+* (bug 19818) Edits to user CSS/JS subpages can now be marked as patrolled by
+ users who can't edit them
+* (bug 19839) Comments in log items are no more double escaped
+* (bug 18161) Fix inconsistent separators in watchlist link toolbars with
+ "enhanced recent changes"
+* (bug 16877) Moving a page over a redirect no longer leaves an orphan entry in
+ the recentchanges table
+* (bug 16009) Limit selection forms based on Pager now links to the correct page
+ when using long urls
+* The display of the language list on the preferences is more comply with the
+ BCP 47 standards.
+* (bug 19849) Custom X-Vary-Options header now disabled unless $wgUseXVO is set
+* (bug 19301) Duplicates entries in $wgAddGroups, $wgRemoveGroups,
+ $wgGroupsAddToSelf and $wgGroupsRemoveFromSelf are no more displayed on
+ Special:ListGroupRights
+* (bug 18799) Special:Userlogin now handles correctly the returnto parameter
+ to not link back to Special:Userlogout when user's language isn't the same as
+ content's language
+* (bug 19479) Show proper error message when unable to connect to PostgreSQL
+ database with username/password in MediaWiki's setup
+* (bugs 18407, 18409) Special:Upload is now listed on Special:Specialpages only
+ if uploads are enabled and the user can access it
+* (bug 17988) Spaces before [[Category:]] links are no longer ignored
+* (bug 19957) All known-failing tests now marked disabled; added --run-disabled
+ option to parser test suite to run disabled tests if desired.
+* (bug 16311) Make recent change flags (n/m/b) <abbr>s instead of <span>s
+* (bug 15680) Split the edit tip message of user CSS/JS subpage into
+ "usercssyoucanpreview" and "userjsyoucanpreview" respectively.
+* (bug 12110) Split the rights for editing users' CSS/JS subpage from
+ "editusercssjs" into "editusercss" and edituserjs" respectively.
+* (bug 19394) RecentChanges feed URLs for log items with no revisions
+ (eg Newuser, Userrights) are no longer broken
+* (bug 17395) Remote file descriptions use user language ($wgLang), not wiki
+ language ($wgContLang)
+* (bug 11867) Lock error on redirect table when running orphans.php
+* (bug 18930) initStats.php now refreshes active users count
+* (bug 18699) Using the nosummary URL option no longer triggers the "You have
+ not provided a summary" warning for those who activated it in their
+ preferences
+* (bug 18855) commandLine.inc and Maintenance.php are now properly included
+ using the full path
+* (bug 18497) Fixed broken style sheets in Opera fullscreen mode
+* (bug 16084) Default memory limit has be increased to 50M, see $wgMemoryLimit
+* (bug 17864/19519) Added proper input normalization in Special:UserRights
+* (bug 20086) Add Hook to add extra statistics at the end of Special:Statistics
+* (bug 19289) importDump.php can now handle bzip2 and 7zip
+* (bug 20131) Fixed a PHP notice for users having the "rollback" right on
+ Special:RecentChangesLinked
+* Do not transform EXIF fields with pure text to avoid results like
+ foo,bar@example,com
+* (bug 20176) Fix login/logout links in skin CologneBlue
+* (bug 20203) "Powered by Mediawiki" now has height/width on image tag
+* (bug 20273) Fix broken output when no pages are found in the content
+ namespaces
+* (bug 20265) Make AncientPages and UnusedFiles work on SQLite
+* Fixed XSS vulnerability for Internet Explorer clients (only pre-release
+ versions of MediaWiki were affected).
+* (bug 14817) Moving a page to a subpage of itself moves it twice
+* (bug 20289) $wgMaximumMovedPages should only count pages actually moved
+* (bug 15248) Non-breaking spaces and certain other Unicode space characters
+ are now normalized to ordinary spaces in titles; if your wiki has existing
+ titles with such characters, run cleanupTitles.php and/or cleanupImages.php
+* (bug 11143) Links containing invalid UTF-8 percent-code sequences are now
+ cleanly disabled instead of breaking parsing entirely on PHP 5.2.
+* (bug 20296) Fixed an PHP warning in Language::getMagic() in PHP 5.3
+* (bug 20358) Unprotect tab was missing accesskey; now same as protect tab.
+* (bug 20317) Cleaned up default main page link accesskey settings
+* (bug 20362) Special:Statistics now produces valid HTML when view counters are
+ enabled
+* (bug 19857) maintenance/deleteRevision.php on last revision no longer breaks
+ target page
+* (bug 20365) Page name with with c/g/h/j/s/u + x are now correctly handled in
+ Special:MovePage with Esperanto as content language
+* (bug 20364) Fixed regression in GIF metadata loading
+* (bug 20299) MediaWiki:Move-subpages and MediaWiki:Move-talk-subpages can now
+ use wikitext
+* (bug 15475) DatabaseBase::setFlag(), DatabaseBase::clearFlag() and
+ DatabaseBase::getFlag() now have documentation
+* (bug 19966) MediaWiki:License-header is now used for the licensing header in
+ the file description page instead of MediaWiki:License
+* (bug 20380) Links to history/deleted edits at the top of
+ Special:RevisionDelete are no more displayed when when doing log suppression
+* (bug 8143) Localised parser function names are now correctly case insensitive
+ if they contain non-ASCII characters
+* (bug 19055) maintenance/rebuildrecentchanges.php now purges
+ Special:Recentchanges's RSS and Atom feed cache
+* The installer will now try to bypass PHP's max_execution_time
+* (bug 20260) SQLite no longer tries to automatically create the database at
+ execution time, this now happens only at install time; if it is not available
+ at script execution, it now throws an exception
+* Fixed EditFilterMerged hook so the hookError parameter serves a purpose
+ (analogous to EditFilter hook)
+* (bug 2257) Tag extensions can expand template parameters provided to the tag,
+ by using a new parameter added to the recursiveTagParse function
+* (bug 14900) __INDEX__ and __NOINDEX__ no longer override site config set in
+ $wgArticleRobotPolicies.
+* (bug 20466) Hidden categories are no more displayed when printing
+* (bug 20446) When changing user rights with User@remotewiki and remotewiki is
+ the local wiki, the user is now treated as the local user
+* (bug 20494) OutputPage::getArticleBodyOnly() no longer requires an useless
+ argument
+* (bug 20136) Protection form JavaScript now synchronizes the expiry boxes on
+ any change, in addition to onkeyup.
+* Don't link to "edit this page" on MediaWiki:Noarticletext if user is not
+ allowed to create page. Done via new message
+ MediaWiki:Noarticletext-nopermission
+* Improved compatibility between the Vector skin and addPortletLink() from
+ wikibits.js: empty portlets are now present but hidden, adding an element to a
+ portlet unhides it
+* (bug 19531) addPortletLink() now wraps inserted labels in a <span> element to
+ be compatible with the CSS for the Vector skin
+* (bug 20578) Wrong localized image metadata - duplicated string?
+* (bug 20556) Stub threshold's "other" <input> in Special:Preferences now has a
+ correct type="text" parameter
+* (bug 482) Don't include TOC in the printable version if it has been hidden
+* Adjust the time according to the user configuration on Special:Revisiondelete
+* (bug 20624) Installation no longer allows "qqq" as the chosen language
+* (bug 20634) The installer-created database user will now have all rights on
+ the database so that upgrades will go more smoothly.
+* (bug 18180) Special:Export ignores limit, dir, offset parameters
+* User::getBlockedStatus() works for all kinds of user objects and doesn't
+ assume the user object is equal to the current-user object ($wgUser)
+* (bug 20517) Cancel link from edit page now returns to the old version when
+ editing an old version
+* (bug 16902) Installer no longer shows warnings when exec() has been disabled
+ by disable_functions
+* (bug 20726) Title::getLatestRevID's documentation now says that the function
+ returns false if the page doesn't exist
+* (bug 20751) ForeignApiRepo now urldecodes filenames when saving to local cache
+* (bug 20730) Fix to Special:Version ViewVC link for branch checkouts
+* (bug 20353) wfShellExec() was adding extra quotes on Windows Vista, causing
+ command line scripts to fail
+* (bug 20702) Parser functions can now be used correctly in
+ MediaWiki:Missing-article
+* (bug 14117) "redirected from" is now also shown on foreign file redirects
+* (bug 17747) Only display thumbnail column in file history if the image can
+ be rendered.
+* (bug 3421) Live preview no longer breaks user CSS/JS previews
+* (bug 11264) The file logo on a file description page for documents (PDF, ...)
+ now links to the file rather than the file description page
+* Password fields built with HTMLForm now still have the type="password"
+ attribute if $wgHtml5=false.
+* (bug 20836) Preload now works for MediaWiki namespace
+* (bug 20885) Search box no longer suggests unavailable special pages
+* (bug 20948) "Create this page" on Special:Search is no longer displayed when
+ searching for special pages
+* (bug 20524) Hideuser: Show nice error when trying to block hidden user without
+ hideuser right
+* (bug 21026) Fixed file redirects on shared repos on non-English client wikis
+* (bug 21030) Fixed schema choices from being overwritten by defining unique
+ field names per driver.
+* (bug 21115) wgCanonicalSpecialPageName javascript variable is now always
+ false on non-special pages
+* (bug 21113) "Other statistics" header on Special:Statistics is no more
+ displayed when there isn't any entry in it
+* (bug 21114) Special:Contributions no longer shows diff links for new
+ revisions
+* (bug 21116) MediaWiki:Templatesused, MediaWiki:Templatesusedpreview and
+ MediaWiki:Templatesusedsection now support plural
+* (bug 21079) There is no more line wrapping between label and field in
+ Special:Log
+* (bug 20256) Fixed SQL errors on Special:Recentchanges and
+ Special:Recentchangeslinked on SQLite backend
+* (bug 20880) Fixed updater failure on SQLite backend
+* (bug 21182) Fixed invalid HTML in Special:Listgrouprights
+* (bug 20242) Installer no longer promts for user credentials for SQLite
+ databases
+* (bug 20911) Installer failed to create a SQLite database
+* (bug 20847) Deprecated deprecated akeytt() removed in wikibits.js leaving
+ dummy
+* (bug 21161) Changing $wgCacheEpoch now always invalidates file cache
+* (bug 20268) Fixed row count estimation on SQLite backend
+* (bug 20275) Fixed LIKE queries on SQLite backend
+* (bug 21234) Moving subpages of titles containing \\ now works properly
+* (bug 21006) maintenance/updateArticleCount.php now works again on PostgreSQL
+* (bug 19319) Add activeusers-intro message at top of SpecialActiveUsers page
+* (bug 21255) Fixed hostname construction for DNSBL checking
+* (bug 18019) Users are now warned when moving a file to a name in use on a
+ shared repository and only users with the 'reupload-shared' permission can
+ complete the move.
+* (bug 18909) Add missing Postgres INSERT SELECT wrapper
+* User::isValidPassword now only returns boolean results,
+ User::getPasswordValidity can be used to get an error message string
+* The error message shown in Special:ChangePassword now parses wiki markup
+* (bug 19859) Removed experimental HTMLDiff feature
+* Removed section edit links in edit conflict form
+* Allow SpecialActiveusers to work on non-MySQL databases
+* (bug 6579) Fixed protecting images from uploading only
+* (bug 18609) Search index was empty for some pages
+* (bug 13453) rebuildrecentchanges maintenance script works on PG again
+* (bug 16583) Reduce false positives when checking for PHP (on upload, etc.)
+* (bug 20112) Bitrotted tests in the t/ directory were failing.
+* (bug 21470) MediaWiki:Sp-contributions-explain is now wrapped in a <p> with
+ id "mw-sp-contributions-explain"
+* (bug 19159) Fixed \overleftrightarrow in texvc
+* (bug 19391) Fix caching for Recent ChangesFeed.
+* (bug 21455) Fixed "Watch this page" checkbox appearing on some special pages
+ even to non-logged in users
+* (bug 21551) Rewrote the Squid purge HTTP client to provide a more robust and
+ general implementation of HTTP, allowing it to purge non-Squid caches such as
+ Varnish.
+* Fixed corruption of long UDP debug log messages by using socket_sendto()
+ instead of fsockopen() with fwrite().
+* (bug 16884) Fixed feed links in sidebar not complying with URL parameters
+ of the displayed page
+* (bug 21403) memcached class renamed to MWMemecached to avoid conflict with
+ PHP's memcached extension
+* (bug 21650) Both calls to SkinTemplateTabs hook are now compatible
+* (bug 21672) Add missing Accept-Language to both Vary and XVO headers
+* (bug 21679) "Edit block reasons" link at the bottom of Special:Blockip is now
+ only displayed to the users that have "editinterface" right
+* (bug 21740) Attempting to protect a page that doesn't exist (salting) returns
+ "unknown error"
+* (bug 18762) both redirects and links get fixed one after another if
+ redirects-only switch is not present
+* (bug 20159) thumbnails rerendered if older that $wgThumbnailEpoch
+* Fixed a bug which in some situations causes the job queue to grow forever,
+ due to an infinite loop of job requeues.
+* (bug 21523) File that can have multiple pages (djvu, pdf, ...) no longer have
+ the page selector when they have only one page
+* (bug 21559) "logempty" message is now wrapped in a div with class
+ "mw-warning-logempty" when used in log extract
+* (bug 20549) Parser tests were broken on SQLite backend
+* (bug 21776) Interwiki urls like http://en.wikibooks.org/wiki/cs: should give
+ a redirect instead of a baderror.
+* (bug 21803) Special:MyContributions now keeps the query string parameters
+* Redirecting special pages now keep query string paramters set to "0" (e.g.
+ for namespace)
+* (bug 20765) Special:ListGroupRights no longer misses addables and removables
+ groups if there are duplicate entries
+* (bug 21814) Message shown when rolling back an edit with a deleted username
+ now shows '(username deleted)' instead of broken user tool links
+* (bug 21536) Fixed JavaScript error on Special:Search caused by an incorrect ID
+* (bug 21535) RecentChanges RSS feed now always recognises the namespace filter,
+ previously it sometimes didn't due to caching.
+* (bug 20388) ProfilerSimpleText no longer outputs comment on action=raw
+* refreshLinks.php now purges orphaned redirect table rows
+* (bug 2971) Swap links of hist & diff location on Special:Contributions for
+ consistency with RC/WL
+* (bug 21986) Special page names were are now capitalized by content language
+* If two log type have the same description, they're now both displayed in the
+ type selector on Special:Log
+* (bug 20115) Special:Userlogin title says "Log in / create account" even if the
+ user can't create an account
+* (bug 2658) Don't attempt to set the TZ environment variable.
+* (bug 9794) User rights log entries for foreign user now links to the foreign
+ user's page if possible
+* (bug 14717) Don't load nonexistent CSS fix files for non-Monobook skins
+* (bug 22034) Use wfClientAcceptsGzip() in wfGzipHandler instead of
+ reimplementing it.
+* (bug 19226) First line renders differently on many UI messages.
+* (bug 21303) Comments are no longer stripped from MediaWiki:Common.js and
+ skin-specific JS pages
+* (bug 5061) Use the more precise thumbcaption thumbimage and thumbinner classes
+ for image divs.
+* Fixed bug involving unclosed "-{" markup in the language converter
+* (bug 21870) No longer include Google logo from an external server on wiki error.
+* (bug 22181) Do not truncate if the ellipsis actually make the string longer
+* (bug 16039) Text disappearing after a bad image
+* (bug 18784) Internal links like [[File:Foo|caption]] should read 'caption',
+ not 'File:Foo' when Foo is not an image
+* (bug 21518) Special:UserRights no longer displays the user name box for users
+ that can only change their rights
+* (bug 21593) Special:UserRights now lists automatic groups membership
+* (bug 22364) Setting $wgUseExternalEditor to false no longer hides the reupload
+ link from file pages
+* Fix bug introduced in MediaWiki 1.12: The author field in
+ $wgExtensionCredits is no longer sorted with sort() but rather used
+ as it appears in extensions as was the case before r30117 where it
+ was unintentionally sorted along with other fields.
+* (bug 19334) Textarea no longer jumps when editing longer articles in IE8
+* Truncate summary of page moves in revision comment field to avoid broken
+ multibyte characters
+* (bug 22540) ForeignApiRepos no longer try to store thumbnails that don't exist
+* (bug 22551) Special:Resetpass now has a "Cancel" button that sends the user to
+ the page set in the &returnto parameter.
+* (bug 19194) Search box in Modern skin doesn't focus with Safari/Chrome
+* (bug 17790) Users instantly logged off on HughesNet
+
+== API changes in 1.16 ==
-== API changes in 1.15 ==
-
-* (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
- and listing all deleted pages possible
-* (bug 16844) Added clcategories parameter to prop=categories
-* (bug 17025) Add "fileextension" parameter to meta=siteinfo&siprop=
-* (bug 17048) Show the 'new' flag in list=usercontribs for the revision that
- created the page, even if it's not the top revision
-* (bug 17069) Added ucshow=patrolled|!patrolled to list=usercontribs
-* action=delete respects $wgDeleteRevisionsLimit and the bigdelete user right
-* (bug 15949) Add undo functionality to action=edit
-* (bug 16483) Kill filesort in ApiQueryBacklinks caused by missing parentheses.
- Building query properly now using makeList()
-* (bug 17182) Fix pretty printer so URLs with parentheses in them are
- autolinked correctly
-* (bug 17224) Added siprop=rightsinfo to meta=siteinfo
-* (bug 17239) Added prop=displaytitle to action=parse
-* (bug 17317) Added watch parameter to action=protect
-* (bug 17007) Added export and exportnowrap parameters to action=query
-* (bug 17326) BREAKING CHANGE: Changed output format for iiprop=metadata
-* (bug 17355) Added auwitheditsonly parameter to list=allusers
-* (bug 17007) Added action=import
-* BREAKING CHANGE: Removed rctitles parameter from list=recentchanges because
- of performance concerns
-* Listing (semi-)deleted revisions and log entries as well in prop=revisions
- and list=logevents
-* (bug 11430) BREAKING CHANGE: Modules may return fewer results than the
- limit and still set a query-continue in some cases
-* (bug 17357) Added movesubpages parameter to action=move
-* (bug 17433) Added bot flag to list=watchlist&wlprop=flags output
-* (bug 16740) Added list=protectedtitles
-* Added mainmodule and pagesetmodule parameters to action=paraminfo
-* (bug 17502) meta=siteinfo&siprop=namespacealiases no longer lists namespace
- aliases already listed in siprop=namespaces
-* (bug 17529) rvend ignored when rvstartid is specified
-* (bug 17626) Added uiprop=email to list=userinfo
-* (bug 13209) Added rvdiffto parameter to prop=revisions
-* Manual language conversion improve: Now we can include both ";" and ":" in
- conversion rules
-* (bug 17795) Don't report views count on meta=siteinfo if $wgDisableCounters
- is set
-* (bug 17774) Don't hide read-restricted modules like action=query from users
- without read rights, but throw an error when they try to use them.
-* Don't hide write modules when $wgEnableWriteAPI is false, but throw an error
- when someone tries to use them
-* BREAKING CHANGE: action=purge requires write rights and, for anonymous users,
- a POST request
-* (bug 18099) Using appendtext to edit a non-existent page causes an interface
- message to be included in the page text
-* (bug 18601) generator=backlinks returns invalid continue parameter
-* (bug 18597) Internal error with empty generator= parameter
-* (bug 18617) Add xml:space="preserve" attribute to relevant tags in XML output
-
-=== Languages updated in 1.15 ===
-
-MediaWiki supports over 300 languages. Many localisations are updated
+* Added uiprop=changeablegroups to meta=userinfo
+* Added usprop=gender to list=users
+* (bug 18311) action=purge now works for images too
+* Add parentid to prop=revisions output
+* (bug 17832) action=delete returns 'unknownerror' instead of 'permissiondenied'
+ when the user is blocked
+* (bug 18546) Added timestamp of new revision to action=edit output
+* (bug 18554) Also list hidden revisions in list=usercontribs for privileged
+ users
+* (bug 13049) "API must be accessed from the primary script entry point" error
+* (bug 16422) Don't display help for format=jsonfm unless specifically requested
+* Added PHP and database version to meta=siteinfo output
+* (bug 18533) Add readonly message to meta=siteinfo output
+* (bug 18518) Add clprop=hidden to prop=categories
+* (bug 18710) Fixed internal error with empty parameter in action=paraminfo
+* (bug 18709) Missing descriptions for some parameters in action=paraminfo
+ output
+* (bug 18731) Show correct SVN links for extension modules in api.php?version
+* (bug 18730) Add version information to action=paraminfo output
+* (bug 18743) Add ucprop=size to list=usercontribs
+* (bug 18749) Add generator flag to action=paraminfo output
+* Make action=block respect $wgEnableUserEmail and $wgSysopEmailBans
+* Made deleting file description pages without files possible
+* (bug 18773) Add content flag to siprop=namespaces output
+* (bug 18785) Add siprop=languages to meta=siteinfo
+* (bug 14200) Added user and excludeuser parameters to list=watchlist and
+ list=recentchanges
+* Added index, fromtitle and byteoffset fields to action=parse&prop=sections
+ output
+* (bug 19313) action=rollback returns wrong revid on master/slave setups
+* (bug 19323) action=parse doesn't return section tree on pages with Cite
+ warnings
+* (bug 18720) Add anchor field to action=parse&prop=sections output
+* (bug 19423) The initial file description page used caption in user lang
+ rather than UI lang
+* (bug 17809) Add number of users in user groups to meta=siteinfo
+* (bug 18533) Add readonly reason to readonly exception
+* (bug 19528) Added XSLT parameter to API queries in format=xml
+* (bug 19040) Fix prependtext and appendtext in combination with section
+ parameter in action=edit
+* (bug 19090) Added watchlist parameter, deprecated watch and unwatch
+ parameter in action=edit
+* Added fields to list=search output: size, wordcount, timestamp, snippet
+* Where supported by backend, list=search adds a 'searchinfo' element with
+ optional info: 'totalhits' count and 'suggestion' alternate query term
+* (bug 19907) $wgCrossSiteAJAXdomains added to allow specified (or all)
+ external domains to access api.php via AJAX, if the browser supports the
+ Access-Control-Allow-Origin HTTP header
+* (bug 19999) Made metadata and properties of search results optional. Added
+ srprop and srinfo.
+* (bug 20700) Add amprop=default to meta=allmessages to list default value for
+ customized messages
+* Don't parse magic words in meta=allmessages, output messages unparsed
+* (bug 21105) list=usercontribs can now list contribs for User:0
+* (bug 21085) list=deletedrevs no longer returns only one revision when
+ drcontinue param is passed
+* (bug 21106) Deprecated parameters now tagged in action=paraminfo
+* (bug 19004) Added support for tags
+* (bug 21083) list=allusers no longer returns current timestamp for users
+ without registration date
+* (bug 20967) action=edit allows creation of invalid titles
+* (bug 19523) Add inprop=watched to prop=info
+* (bug 21589) API: Separate summary and initial page text for uploads
+* (bug 21817) list=usercontribs returns empty result for empty ucuser
+* (bug 21441) meta=userinfo&uiprop=options no longer returns default options
+ for logged-in users under certain circumstances
+* (bug 21945) Add chomp control in YAML
+* Expand the thumburl to an absolute url to make it consistent with url and
+ descriptionurl
+* (bug 20233) ApiLogin::execute() doesn't handle LoginForm :: RESET_PASS
+* (bug 22061) API: add prop=headitems to action=parse
+* (bug 22240) API: include time in siteinfo
+* (bug 22241) Quick edit is still using the deprecated watch parameter (API: Setting default for watch/unwatch wrongly set)
+* (bug 22245) blfilterredirect=nonredirects in blredirect mode wrongly filtering
+* (bug 22248) Output extension URLs in meta=siteinfo&siprop=extensions
+* Support key-params arrays in 'descriptionmsg' in meta=siteinfo&siprop=extensions
+* (bug 21922) YAML output should quote asterisk when used as key
+* (bug 22297) safesubst: to allow substitution without breaking transclusion
+* (bug 18758) API read of watchlist's wl_notificationtimestamp
+* (bug 20809) Expose EditFormPreloadText via the API
+* (bug 18427) Comment (edit summary) parser option for API
+* (bug 18608) API should provide list of CSS styles to apply to rendered output
+* (bug 18771) List possible errors in action=paraminfo
+
+=== Languages updated in 1.16 ===
+
+MediaWiki supports over 330 languages. Many localisations are updated
regularly. Below only new and removed languages are listed, as well as
changes to languages because of MediaZilla reports.
-* Austrian German (de-at) (new)
-* Swiss Standard German (de-ch) (new)
-* Simplified Gan Chinese (gan-hans) (new)
-* Traditional Gan Chinese (gan-hant) (new)
-* Literary Chinese (lzh) (new)
-* Uyghur (Latin script) (ug-latn) (renamed from 'ug')
-* Veps (vep) (new)
-* Võro (vro) (renamed from fiu-vro)
-* (bug 17151) Add magic word alias for #redirect for Vietnamese
-* (bug 17288) Messages improved for default language (English)
-* (bug 12937) Update native name for Afar
-* (bug 16909) 'histlegend' now reuses messages instead of copying them
-* (bug 17832) action=delete returns 'unknownerror' instead of 'permissiondenied'
- when the user is blocked
-* Traditional/Simplified Gan Chinese conversion support
+* Capiznon (cps) (new)
+* North Frisian (frr) (new)
+* Kirmanjki (kiu) (new)
+* Komi-Permyak (koi) (new)
+* Karachay-Balkar (krc) (new)
+* Latgalian (ltg) (new)
+* Hill Mari (mrj) (new)
+* Prussian (prg) (new)
+* Romagnol (rgn) (new)
+* Rusyn (rue) (new)
+* Lower Silesian (sli) (new)
+* Picard (pcd) (new)
+* Uyghur (Arabic script) (ug-arab) (new)
+* Upper Franconian (vmf) (new)
+* Votic (vot) (new)
+* Eastern Yiddish (ydd) (removed)
+* Iriga Bicolano (bto) (removed)
+* Ladin (lld) (removed)
+* Palembang (plm) (removed)
+* Megleno-Romanian (Greek script) (ruq-grek) (removed)
+* Tamazight (tzm) (removed)
-== Compatibility ==
+* (bug 18474) Sorani (ckb - Central Kurdish) (renamed from ku-arab)
+* Add PLURAL function for Scots Gaelic (gd)
+* Add Estonian letters äöõšüž to linktrail (et)
+* (bug 18776) Native name of Burmese language (my)
+* (bug 18806) Use correct unicode characters in spelling of native Chuvash
+ (Чӑвашла)
+* (bug 18864) Updated autonym for Zhuang language
+* (bug 18308) Updated date formatting in Occitan (oc)
+* (bug 19080) Added ăâîşţșțĂÂÎŞŢȘȚ to Romanion (ro) linktrail
+* (bug 19286) Correct commafying function in Polish (pl)
+* (bug 19441) Updated date formatting for Lithuanian
+* (bug 19630) Added ÄäÇçĞğŇňÖöŞşÜüÝýŽž to Turkmen (tk) linktrail
+* (bug 19949) New linktrail for Greek (el)
+* (bug 19809) Korean (North Korea) (ko-kp) (new)
+* (bug 19968) Fixed "Project talk" namespace name for Maltese (mt)
+* (bug 21168) Added áâãàéêçíóôõúü to Portuguese (pt) linktrail
+* (bug 21596) Change interwiki link for Kurdish (ku)
-MediaWiki 1.15 requires PHP 5 (5.2 recommended). PHP 4 is no longer supported.
+== Compatibility ==
-PHP 5.0.x fails on 64-bit systems due to serious bugs with array processing:
-http://bugs.php.net/bug.php?id=34879
-Upgrade affected systems to PHP 5.1 or higher.
+MediaWiki 1.16 requires PHP 5.1 (5.2 recommended). PHP 4 is no longer supported.
MySQL 3.23.x is no longer supported; some older hosts may need to upgrade.
At this time we still recommend 4.0, but 4.1/5.0 will work fine in most cases.
@@ -463,7 +997,7 @@ At this time we still recommend 4.0, but 4.1/5.0 will work fine in most cases.
== Upgrading ==
-1.15 has several database changes since 1.14, and will not work without schema
+1.16 has several database changes since 1.15, and will not work without schema
updates.
If upgrading from before 1.11, and you are using a wiki as a commons reposito-
@@ -488,7 +1022,7 @@ set $wgMimeType = "application/xhtml+xml"; to test for remaining problem
cases, but this is not recommended on live sites. (This must be set for
MathML to display properly in Mozilla.)
-For notes on 1.14.x and older releases, see HISTORY.
+For notes on 1.15.x and older releases, see HISTORY.
=== Online documentation ===
diff --git a/StartProfiler.php b/StartProfiler.sample
index 3fcf69e6..f91aeb92 100644
--- a/StartProfiler.php
+++ b/StartProfiler.sample
@@ -3,7 +3,8 @@
require_once( dirname(__FILE__).'/includes/ProfilerStub.php' );
/**
- * To use a profiler, delete the line above and add something like this:
+ * To use a profiler, copy this file to StartProfiler.php,
+ * delete the PHP line above, and add something like this:
*
* require_once( dirname(__FILE__).'/includes/Profiler.php' );
* $wgProfiler = new Profiler;
diff --git a/UPGRADE b/UPGRADE
index 9d0e0521..7cd302e9 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -42,8 +42,7 @@ You can also obtain the new files directly from our Subversion source code
repository, via a checkout or export operation.
Replace the existing MediaWiki files with the new. You should preserve the
-LocalSettings.php file, AdminSettings.php file (if present), and the
-"extensions" and "images" directories.
+LocalSettings.php file and the "extensions" and "images" directories.
Depending upon your configuration, you may also need to preserve additional
directories, including a custom upload directory ($wgUploadDirectory),
@@ -51,8 +50,8 @@ deleted file archives, and any custom skins.
=== Perform the database upgrade ===
-You will need an AdminSettings.php file set up in the correct format; see
-AdminSettings.sample in the wiki root for more information and examples.
+You will need to have $wgDBadminuser and $wgDBadminpassword set in your
+LocalSettings.php, see there for more info.
From the command line, browse to the "maintenance" directory and run the
update.php script to check and update the schema. This will insert missing
@@ -69,8 +68,8 @@ behaviour of MediaWiki.
=== Check installed extensions ===
In MediaWiki 1.14 some extensions are migrated into the core. Please see the
-RELEASE-NOTES section "Migrated extensions" and disable these extensions in your
-localSettings.php
+HISTORY section "Migrated extensions" and disable these extensions in your
+LocalSettings.php
=== Test ===
@@ -172,10 +171,10 @@ should be replaced with:
=== Web installer ===
You can use the web-based installer wizard if you first remove the
-LocalSettings.php (and AdminSettings.php, if any) files; be sure to
-give the installer the same information as you did on the original
-install (language/encoding, database name, password, etc). This will
-also generate a fresh LocalSettings.php, which you may need to customize.
+LocalSettings.php file; be sure to give the installer the same
+information as you did on the original install (language/encoding,
+database name, password, etc). This will also generate a fresh
+LocalSettings.php, which you may need to customize.
You may change some settings during the install, but be very careful!
Changing the encoding in particular will generally leave you with a
@@ -185,8 +184,8 @@ lot of corrupt pages, particularly if your wiki is not in English.
Additionally, as of 1.4.0 you can run an in-place upgrade script from
the command line, keeping your existing LocalSettings.php. This requires
-that you create an AdminSettings.php giving an appropriate database user
-and password with privileges to modify the database structure.
+that you set $wgDBadminuser and $wgDBadminpassword with an appropriate
+database user and password with privileges to modify the database structure.
Once the new files are in place, go into the maintenance subdirectory and
run the script:
diff --git a/api.php b/api.php
index 58e06d88..10baa13e 100644
--- a/api.php
+++ b/api.php
@@ -23,8 +23,8 @@
* @file
*/
-/**
- * This file is the entry point for all API queries. It begins by checking
+/**
+ * This file is the entry point for all API queries. It begins by checking
* whether the API is enabled on this wiki; if not, it informs the user that
* s/he should set $wgEnableAPI to true and exits. Otherwise, it constructs
* a new ApiMain using the parameter passed to it as an argument in the URL
@@ -35,9 +35,10 @@
*/
// Initialise common code
-require (dirname(__FILE__) . '/includes/WebStart.php');
+require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
-wfProfileIn('api.php');
+wfProfileIn( 'api.php' );
+$starttime = microtime( true );
// URL safety checks
//
@@ -49,38 +50,67 @@ wfProfileIn('api.php');
// which will end up triggering HTML detection and execution, hence
// XSS injection and all that entails.
//
-// Ensure that all access is through the canonical entry point...
-//
-if( isset( $_SERVER['SCRIPT_URL'] ) ) {
- $url = $_SERVER['SCRIPT_URL'];
-} else {
- $url = $_SERVER['PHP_SELF'];
-}
-if( strcmp( "$wgScriptPath/api$wgScriptExtension", $url ) ) {
+if ( $wgRequest->isPathInfoBad() ) {
wfHttpError( 403, 'Forbidden',
- 'API must be accessed through the primary script entry point.' );
+ 'Invalid file extension found in PATH_INFO. ' .
+ 'The API must be accessed through the primary script entry point.' );
return;
}
// Verify that the API has not been disabled
-if (!$wgEnableAPI) {
+if ( !$wgEnableAPI ) {
echo 'MediaWiki API is not enabled for this site. Add the following line to your LocalSettings.php';
echo '<pre><b>$wgEnableAPI=true;</b></pre>';
- die(1);
+ die( 1 );
+}
+
+// Selectively allow cross-site AJAX
+
+/*
+ * Helper function to convert wildcard string into a regex
+ * '*' => '.*?'
+ * '?' => '.'
+ * @ return string
+ */
+function convertWildcard( $search ) {
+ $search = preg_quote( $search, '/' );
+ $search = str_replace(
+ array( '\*', '\?' ),
+ array( '.*?', '.' ),
+ $search
+ );
+ return "/$search/";
+}
+
+if ( $wgCrossSiteAJAXdomains && isset( $_SERVER['HTTP_ORIGIN'] ) ) {
+ $exceptions = array_map( 'convertWildcard', $wgCrossSiteAJAXdomainExceptions );
+ $regexes = array_map( 'convertWildcard', $wgCrossSiteAJAXdomains );
+ foreach ( $regexes as $regex ) {
+ if ( preg_match( $regex, $_SERVER['HTTP_ORIGIN'] ) ) {
+ foreach ( $exceptions as $exc ) { // Check against exceptions
+ if ( preg_match( $exc, $_SERVER['HTTP_ORIGIN'] ) ) {
+ break 2;
+ }
+ }
+ header( "Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}" );
+ header( 'Access-Control-Allow-Credentials: true' );
+ break;
+ }
+ }
}
// So extensions can check whether they're running in API mode
-define('MW_API', true);
+define( 'MW_API', true );
// Set a dummy $wgTitle, because $wgTitle == null breaks various things
// In a perfect world this wouldn't be necessary
-$wgTitle = Title::newFromText('API');
+$wgTitle = Title::makeTitle( NS_MAIN, 'API' );
/* Construct an ApiMain with the arguments passed via the URL. What we get back
* is some form of an ApiMain, possibly even one that produces an error message,
* but we don't care here, as that is handled by the ctor.
*/
-$processor = new ApiMain($wgRequest, $wgEnableWriteAPI);
+$processor = new ApiMain( $wgRequest, $wgEnableWriteAPI );
// Process data & print results
$processor->execute();
@@ -89,9 +119,28 @@ $processor->execute();
wfDoUpdates();
// Log what the user did, for book-keeping purposes.
-wfProfileOut('api.php');
+$endtime = microtime( true );
+wfProfileOut( 'api.php' );
wfLogProfilingData();
+// Log the request
+if ( $wgAPIRequestLog ) {
+ $items = array(
+ wfTimestamp( TS_MW ),
+ $endtime - $starttime,
+ wfGetIP(),
+ $_SERVER['HTTP_USER_AGENT']
+ );
+ $items[] = $wgRequest->wasPosted() ? 'POST' : 'GET';
+ if ( $processor->getModule()->mustBePosted() ) {
+ $items[] = "action=" . $wgRequest->getVal( 'action' );
+ } else {
+ $items[] = wfArrayToCGI( $wgRequest->getValues() );
+ }
+ wfErrorLog( implode( ',', $items ) . "\n", $wgAPIRequestLog );
+ wfDebug( "Logged API request to $wgAPIRequestLog\n" );
+}
+
// Shut down the database
wfGetLBFactory()->shutdown();
diff --git a/t/.htaccess b/cache/.htaccess
index 3a428827..3a428827 100644
--- a/t/.htaccess
+++ b/cache/.htaccess
diff --git a/config/Installer.php b/config/Installer.php
new file mode 100644
index 00000000..293a1a6c
--- /dev/null
+++ b/config/Installer.php
@@ -0,0 +1,2350 @@
+<?php
+
+# MediaWiki web-based config/installation
+# Copyright (C) 2004 Brion Vibber <brion@pobox.com>, 2006 Rob Church <robchur@gmail.com>
+# http://www.mediawiki.org/
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# http://www.gnu.org/copyleft/gpl.html
+
+if( !defined( 'MEDIAWIKI_INSTALL' ) ) {
+ die( 'Not an entry point.' );
+}
+
+error_reporting( E_ALL | E_STRICT );
+header( "Content-type: text/html; charset=utf-8" );
+@ini_set( "display_errors", true );
+
+# In case of errors, let output be clean.
+$wgRequestTime = microtime( true );
+
+// Run version checks before including other files
+// so people don't see a scary parse error.
+require_once( "$IP/maintenance/install-utils.inc" );
+install_version_checks();
+
+require_once( "$IP/includes/Defines.php" );
+require_once( "$IP/includes/DefaultSettings.php" );
+require_once( "$IP/includes/AutoLoader.php" );
+require_once( "$IP/includes/MagicWord.php" );
+require_once( "$IP/includes/Namespace.php" );
+require_once( "$IP/includes/ProfilerStub.php" );
+require_once( "$IP/includes/GlobalFunctions.php" );
+require_once( "$IP/includes/Hooks.php" );
+require_once( "$IP/includes/Exception.php" );
+require_once( "$IP/includes/json/Services_JSON.php" );
+require_once( "$IP/includes/json/FormatJson.php" );
+
+# If we get an exception, the user needs to know
+# all the details
+$wgShowExceptionDetails = true;
+$wgShowSQLErrors = true;
+wfInstallExceptionHandler();
+## Databases we support:
+
+$ourdb = array();
+
+$ourdb['mysql'] = array(
+ 'fullname' => 'MySQL',
+ 'havedriver' => 0,
+ 'compile' => 'mysql',
+ 'bgcolor' => '#ffe5a7',
+ 'rootuser' => 'root',
+ 'serverless' => false
+);
+
+$ourdb['postgres'] = array(
+ 'fullname' => 'PostgreSQL',
+ 'havedriver' => 0,
+ 'compile' => 'pgsql',
+ 'bgcolor' => '#aaccff',
+ 'rootuser' => 'postgres',
+ 'serverless' => false
+);
+
+$ourdb['sqlite'] = array(
+ 'fullname' => 'SQLite',
+ 'havedriver' => 0,
+ 'compile' => 'pdo_sqlite',
+ 'bgcolor' => '#b1ebb1',
+ 'rootuser' => '',
+ 'serverless' => true
+);
+
+$ourdb['mssql'] = array(
+ 'fullname' => 'MSSQL',
+ 'havedriver' => 0,
+ 'compile' => 'mssql_not_ready', # Change to 'mssql' after includes/DatabaseMssql.php added;
+ 'bgcolor' => '#ffc0cb',
+ 'rootuser' => 'administrator',
+ 'serverless' => false
+);
+
+$ourdb['ibm_db2'] = array(
+ 'fullname' => 'DB2',
+ 'havedriver' => 0,
+ 'compile' => 'ibm_db2',
+ 'bgcolor' => '#ffeba1',
+ 'rootuser' => 'db2admin',
+ 'serverless' => false
+);
+
+$ourdb['oracle'] = array(
+ 'fullname' => 'Oracle',
+ 'havedriver' => 0,
+ 'compile' => 'oci8',
+ 'bgcolor' => '#ffeba1',
+ 'rootuser' => 'sys',
+ 'serverless' => false
+);
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr">
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <meta name="robots" content="noindex,nofollow"/>
+ <title>MediaWiki <?php echo htmlspecialchars( $wgVersion ); ?> Installation</title>
+ <style type="text/css">
+
+ @import "../skins/monobook/main.css";
+
+ .env-check {
+ font-size: 90%;
+ margin: 1em 0 1em 2.5em;
+ }
+
+ .config-section {
+ margin-top: 2em;
+ }
+
+ .config-section label.column {
+ clear: left;
+ font-weight: bold;
+ width: 13em;
+ float: left;
+ text-align: right;
+ padding-right: 1em;
+ padding-top: .2em;
+ }
+
+ .config-input {
+ clear: left;
+ zoom: 100%; /* IE hack */
+ }
+
+ .config-section .config-desc {
+ clear: left;
+ margin: 0 0 2em 18em;
+ padding-top: 1em;
+ font-size: 85%;
+ }
+
+ .iput-text, .iput-password {
+ width: 14em;
+ margin-right: 1em;
+ }
+
+ .error {
+ color: red;
+ background-color: #fff;
+ font-weight: bold;
+ left: 1em;
+ font-size: 100%;
+ }
+
+ .error-top {
+ color: red;
+ background-color: #FFF0F0;
+ border: 2px solid red;
+ font-size: 130%;
+ font-weight: bold;
+ padding: 1em 1.5em;
+ margin: 2em 0 1em;
+ }
+
+ ul.plain {
+ list-style-type: none;
+ list-style-image: none;
+ float: left;
+ margin: 0;
+ padding: 0;
+ }
+
+ .btn-install {
+ font-weight: bold;
+ font-size: 110%;
+ padding: .2em .3em;
+ }
+
+ .license {
+ font-size: 85%;
+ padding-top: 3em;
+ }
+
+ span.success-message {
+ font-weight: bold;
+ font-size: 110%;
+ color: green;
+ }
+
+ .success-box {
+ font-size: 130%;
+ }
+
+ </style>
+ <script type="text/javascript">
+ <!--
+ <?php echo 'var databases = ' . FormatJson::encode( $ourdb ) . ';'; ?>
+
+ function show(id, showOrHide) {
+ var i = document.getElementById(id);
+ if (i) i.style.display = showOrHide ? 'block' : 'none';
+ }
+ function hideall() {
+ for (db in databases) {
+ show(db, false);
+ }
+ }
+ function toggleDBarea(id, defaultroot) {
+ hideall();
+ var dbarea = document.getElementById(id);
+ if (dbarea) dbarea.style.display = (dbarea.style.display == 'none') ? 'block' : 'none';
+ var db = document.getElementById('RootUser');
+ db.value = databases[id].rootuser;
+ show('db-server-settings1', !databases[id].serverless);
+ show('db-server-settings2', !databases[id].serverless);
+ }
+ // -->
+ </script>
+</head>
+
+<body>
+<div id="globalWrapper">
+<div id="column-content">
+<div id="content">
+<div id="bodyContent">
+
+<h1>MediaWiki <?php print htmlspecialchars( $wgVersion ) ?> Installation</h1>
+
+<?php
+$mainListOpened = false; # Is the main list (environement checking) opend ? Used by dieout
+
+/* Check for existing configurations and bug out! */
+
+if( file_exists( "../LocalSettings.php" ) ) {
+ $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
+ dieout( "<p><strong>Setup has completed, <a href='../$script'>your wiki</a> is configured.</strong></p>
+ <p>Please delete the /config directory for extra security.</p>" );
+}
+
+if( file_exists( "./LocalSettings.php" ) ) {
+ writeSuccessMessage();
+ dieout( '' );
+}
+
+if( !is_writable( "." ) ) {
+ dieout( "<h2>Can't write config file, aborting</h2>
+
+ <p>In order to configure the wiki you have to make the <tt>config</tt> subdirectory
+ writable by the web server. Once configuration is done you'll move the created
+ <tt>LocalSettings.php</tt> to the parent directory, and for added safety you can
+ then remove the <tt>config</tt> subdirectory entirely.</p>
+
+ <p>To make the directory writable on a Unix/Linux system:</p>
+
+ <pre>
+ cd <i>" . htmlspecialchars( dirname( dirname( __FILE__ ) ) ) . "</i>
+ chmod a+w config
+ </pre>
+
+ <p>Afterwards retry to start the <a href=\"\">setup</a>.</p>" );
+}
+
+
+require_once( "$IP/maintenance/updaters.inc" );
+
+class ConfigData {
+ function getEncoded( $data ) {
+ # removing latin1 support, no need...
+ return $data;
+ }
+ function getSitename() { return $this->getEncoded( $this->Sitename ); }
+ function getSysopName() { return $this->getEncoded( $this->SysopName ); }
+ function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
+
+ function setSchema( $schema, $engine ) {
+ $this->DBschema = $schema;
+ if ( !preg_match( '/^\w*$/', $engine ) ){
+ $engine = 'InnoDB';
+ }
+ switch ( $this->DBschema ) {
+ case 'mysql5':
+ $this->DBTableOptions = "ENGINE=$engine, DEFAULT CHARSET=utf8";
+ $this->DBmysql5 = 'true';
+ break;
+ case 'mysql5-binary':
+ $this->DBTableOptions = "ENGINE=$engine, DEFAULT CHARSET=binary";
+ $this->DBmysql5 = 'true';
+ break;
+ default:
+ $this->DBTableOptions = "TYPE=$engine";
+ $this->DBmysql5 = 'false';
+ }
+ $this->DBengine = $engine;
+
+ # Set the global for use during install
+ global $wgDBTableOptions;
+ $wgDBTableOptions = $this->DBTableOptions;
+ }
+}
+
+?>
+
+<ul>
+ <li>
+ <b>Don't forget security updates!</b> Keep an eye on the
+ <a href="http://lists.wikimedia.org/mailman/listinfo/mediawiki-announce">low-traffic
+ release announcements mailing list</a>.
+ </li>
+</ul>
+
+
+<h2>Checking environment...</h2>
+<p><em>Please include all of the lines below when reporting installation problems.</em></p>
+<ul class="env-check">
+<?php
+$mainListOpened = true;
+
+$endl = "
+";
+define( 'MW_NO_OUTPUT_BUFFER', 1 );
+$conf = new ConfigData;
+
+install_version_checks();
+$self = 'Installer'; # Maintenance script name, to please Setup.php
+
+print "<li>PHP " . htmlspecialchars( phpversion() ) . " installed</li>\n";
+
+error_reporting( 0 );
+$phpdatabases = array();
+foreach (array_keys($ourdb) as $db) {
+ $compname = $ourdb[$db]['compile'];
+ if( extension_loaded( $compname ) || ( mw_have_dl() && dl( "{$compname}." . PHP_SHLIB_SUFFIX ) ) ) {
+ array_push($phpdatabases, $db);
+ $ourdb[$db]['havedriver'] = 1;
+ }
+}
+error_reporting( E_ALL | E_STRICT );
+
+if (!$phpdatabases) {
+ print "Could not find a suitable database driver!<ul>";
+ foreach (array_keys($ourdb) AS $db) {
+ $comp = $ourdb[$db]['compile'];
+ $full = $ourdb[$db]['fullname'];
+ print "<li>For <b>$full</b>, compile PHP using <b>--with-$comp</b>, "
+ ."or install the $comp.so module</li>\n";
+ }
+ echo '</ul>';
+ dieout( '' );
+}
+
+print "<li>Found database drivers for:";
+$DefaultDBtype = '';
+foreach (array_keys($ourdb) AS $db) {
+ if ($ourdb[$db]['havedriver']) {
+ if ( $DefaultDBtype == '' ) {
+ $DefaultDBtype = $db;
+ }
+ print " ".$ourdb[$db]['fullname'];
+ }
+}
+print "</li>\n";
+
+if( wfIniGetBool( "register_globals" ) ) {
+ ?>
+ <li>
+ <div style="font-size:110%">
+ <strong class="error">Warning:</strong>
+ <strong>PHP's <tt><a href="http://php.net/register_globals">register_globals</a></tt> option is enabled. Disable it if you can.</strong>
+ </div>
+ MediaWiki will work, but your server is more exposed to PHP-based security vulnerabilities.
+ </li>
+ <?php
+}
+
+$fatal = false;
+
+if( wfIniGetBool( "magic_quotes_runtime" ) ) {
+ $fatal = true;
+ ?><li class='error'><strong>Fatal: <a href='http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime'>magic_quotes_runtime</a> is active!</strong>
+ This option corrupts data input unpredictably; you cannot install or use
+ MediaWiki unless this option is disabled.</li>
+ <?php
+}
+
+if( wfIniGetBool( "magic_quotes_sybase" ) ) {
+ $fatal = true;
+ ?><li class='error'><strong>Fatal: <a href='http://www.php.net/manual/en/ref.sybase.php#ini.magic-quotes-sybase'>magic_quotes_sybase</a> is active!</strong>
+ This option corrupts data input unpredictably; you cannot install or use
+ MediaWiki unless this option is disabled.</li>
+ <?php
+}
+
+if( wfIniGetBool( "mbstring.func_overload" ) ) {
+ $fatal = true;
+ ?><li class='error'><strong>Fatal: <a href='http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload'>mbstring.func_overload</a> is active!</strong>
+ This option causes errors and may corrupt data unpredictably;
+ you cannot install or use MediaWiki unless this option is disabled.</li>
+ <?php
+}
+
+if( wfIniGetBool( "zend.ze1_compatibility_mode" ) ) {
+ $fatal = true;
+ ?><li class="error"><strong>Fatal: <a href="http://www.php.net/manual/en/ini.core.php">zend.ze1_compatibility_mode</a> is active!</strong>
+ This option causes horrible bugs with MediaWiki; you cannot install or use
+ MediaWiki unless this option is disabled.</li>
+ <?php
+}
+
+if( $fatal ) {
+ dieout( "Cannot install MediaWiki." );
+}
+
+if( wfIniGetBool( "safe_mode" ) ) {
+ $conf->safeMode = true;
+ ?>
+ <li><b class='error'>Warning:</b> <strong>PHP's
+ <a href='http://www.php.net/features.safe-mode'>safe mode</a> is active.</strong>
+ You may have problems caused by this, particularly if using image uploads.
+ </li>
+ <?php
+} else {
+ $conf->safeMode = false;
+}
+
+$sapi = htmlspecialchars( php_sapi_name() );
+print "<li>PHP server API is $sapi; ";
+$script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
+if( $wgUsePathInfo ) {
+ print "ok, using pretty URLs (<tt>$script/Page_Title</tt>)";
+} else {
+ print "using ugly URLs (<tt>$script?title=Page_Title</tt>)";
+}
+print "</li>\n";
+
+$conf->xml = function_exists( "utf8_encode" );
+if( $conf->xml ) {
+ print "<li>Have XML / Latin1-UTF-8 conversion support.</li>\n";
+} else {
+ dieout( "PHP's XML module is missing; the wiki requires functions in
+ this module and won't work in this configuration.
+ If you're running Mandrake, install the php-xml package." );
+}
+
+# Check for session support
+if( !function_exists( 'session_name' ) )
+ dieout( "PHP's session module is missing. MediaWiki requires session support in order to function." );
+
+# session.save_path doesn't *have* to be set, but if it is, and it's
+# not valid/writable/etc. then it can cause problems
+$sessionSavePath = mw_get_session_save_path();
+$ssp = htmlspecialchars( $sessionSavePath );
+# Warn the user if it's not set, but let them proceed
+if( !$sessionSavePath ) {
+ print "<li><strong>Warning:</strong> A value for <tt>session.save_path</tt>
+ has not been set in PHP.ini. If the default value causes problems with
+ saving session data, set it to a valid path which is read/write/execute
+ for the user your web server is running under.</li>";
+} elseif ( is_dir( $sessionSavePath ) && is_writable( $sessionSavePath ) ) {
+ # All good? Let the user know
+ print "<li>Session save path (<tt>{$ssp}</tt>) appears to be valid.</li>";
+} else {
+ # Something not right? Warn the user, but let them proceed
+ print "<li><strong>Warning:</strong> Your <tt>session.save_path</tt> value (<tt>{$ssp}</tt>)
+ appears to be invalid or is not writable. PHP needs to be able to save data to
+ this location for correct session operation.</li>";
+}
+
+# Check for PCRE support
+if( !function_exists( 'preg_match' ) )
+ dieout( "The PCRE support module appears to be missing. MediaWiki requires the
+ Perl-compatible regular expression functions." );
+
+# The installer can take a while, and we really don't want it to time out
+wfSuppressWarnings();
+set_time_limit( 0 );
+wfRestoreWarnings();
+
+$memlimit = ini_get( "memory_limit" );
+if( $memlimit == -1 ) {
+ print "<li>PHP is configured with no <tt>memory_limit</tt>.</li>\n";
+} else {
+ print "<li>PHP's <tt>memory_limit</tt> is " . htmlspecialchars( $memlimit ). " bytes. ";
+ $newlimit = wfMemoryLimit();
+ $memlimit = wfShorthandToInteger( $memlimit );
+ if( $newlimit < $memlimit ) {
+ print "<b>Failed raising limit, installation may fail.</b>";
+ } elseif ( $newlimit > $memlimit ) {
+ print "Raised <tt>memory_limit</tt> to " . htmlspecialchars( $newlimit ) . " bytes. ";
+ }
+ print "</li>\n";
+}
+
+$conf->xcache = function_exists( 'xcache_get' );
+if( $conf->xcache )
+ print "<li><a href=\"http://trac.lighttpd.net/xcache/\">XCache</a> installed</li>\n";
+
+$conf->apc = function_exists('apc_fetch');
+if ($conf->apc ) {
+ print "<li><a href=\"http://www.php.net/apc\">APC</a> installed</li>\n";
+}
+
+$conf->eaccel = function_exists( 'eaccelerator_get' );
+if ( $conf->eaccel ) {
+ print "<li><a href=\"http://eaccelerator.sourceforge.net/\">eAccelerator</a> installed</li>\n";
+}
+
+$conf->dba = function_exists( 'dba_open' );
+
+if( !( $conf->eaccel || $conf->apc || $conf->xcache ) ) {
+ echo( '<li>Couldn\'t find <a href="http://eaccelerator.sourceforge.net">eAccelerator</a>,
+ <a href="http://www.php.net/apc">APC</a> or <a href="http://trac.lighttpd.net/xcache/">XCache</a>;
+ cannot use these for object caching.</li>' );
+}
+
+$conf->diff3 = false;
+$diff3locations = array_merge(
+ array(
+ "/usr/bin",
+ "/usr/local/bin",
+ "/opt/csw/bin",
+ "/usr/gnu/bin",
+ "/usr/sfw/bin" ),
+ explode( PATH_SEPARATOR, getenv( "PATH" ) ) );
+$diff3names = array( "gdiff3", "diff3", "diff3.exe" );
+
+$diff3versioninfo = array( '$1 --version 2>&1', 'diff3 (GNU diffutils)' );
+foreach ($diff3locations as $loc) {
+ $exe = locate_executable($loc, $diff3names, $diff3versioninfo);
+ if ($exe !== false) {
+ $conf->diff3 = $exe;
+ break;
+ }
+}
+
+if ($conf->diff3)
+ print "<li>Found GNU diff3: <tt>$conf->diff3</tt>.</li>";
+else
+ print "<li>GNU diff3 not found.</li>";
+
+$conf->ImageMagick = false;
+$imcheck = array( "/usr/bin", "/opt/csw/bin", "/usr/local/bin", "/sw/bin", "/opt/local/bin" );
+foreach( $imcheck as $dir ) {
+ $im = "$dir/convert";
+ if( @file_exists( $im ) ) {
+ print "<li>Found ImageMagick: <tt>$im</tt>; image thumbnailing will be enabled if you enable uploads.</li>\n";
+ $conf->ImageMagick = $im;
+ break;
+ }
+}
+
+$conf->HaveGD = function_exists( "imagejpeg" );
+if( $conf->HaveGD ) {
+ print "<li>Found GD graphics library built-in";
+ if( !$conf->ImageMagick ) {
+ print ", image thumbnailing will be enabled if you enable uploads";
+ }
+ print ".</li>\n";
+} else {
+ if( !$conf->ImageMagick ) {
+ print "<li>Couldn't find GD library or ImageMagick; image thumbnailing disabled.</li>\n";
+ }
+}
+
+$conf->IP = dirname( dirname( __FILE__ ) );
+print "<li>Installation directory: <tt>" . htmlspecialchars( $conf->IP ) . "</tt></li>\n";
+
+
+// PHP_SELF isn't available sometimes, such as when PHP is CGI but
+// cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME
+// to get the path to the current script... hopefully it's reliable. SIGH
+$path = ($_SERVER["PHP_SELF"] === '')
+ ? $_SERVER["SCRIPT_NAME"]
+ : $_SERVER["PHP_SELF"];
+
+$conf->ScriptPath = preg_replace( '{^(.*)/config.*$}', '$1', $path );
+print "<li>Script URI path: <tt>" . htmlspecialchars( $conf->ScriptPath ) . "</tt></li>\n";
+
+
+
+// We may be installing from *.php5 extension file, if so, print message
+$conf->ScriptExtension = '.php';
+if (defined('MW_INSTALL_PHP5_EXT')) {
+ $conf->ScriptExtension = '.php5';
+ print "<li>Installing MediaWiki with <tt>php5</tt> file extensions</li>\n";
+} else {
+ print "<li>Installing MediaWiki with <tt>php</tt> file extensions</li>\n";
+}
+
+
+print "<li style='font-weight:bold;color:green;font-size:110%'>Environment checked. You can install MediaWiki.</li>\n";
+ $conf->posted = ($_SERVER["REQUEST_METHOD"] == "POST");
+
+ $conf->Sitename = ucfirst( importPost( "Sitename", "" ) );
+ $defaultEmail = empty( $_SERVER["SERVER_ADMIN"] )
+ ? 'root@localhost'
+ : $_SERVER["SERVER_ADMIN"];
+ $conf->EmergencyContact = importPost( "EmergencyContact", $defaultEmail );
+ $conf->DBtype = importPost( "DBtype", $DefaultDBtype );
+ if ( !isset( $ourdb[$conf->DBtype] ) ) {
+ $conf->DBtype = $DefaultDBtype;
+ }
+
+ $conf->DBserver = importPost( "DBserver", "localhost" );
+ $conf->DBname = importPost( "DBname", "wikidb" );
+ $conf->DBuser = importPost( "DBuser", "wikiuser" );
+ $conf->DBpassword = importPost( "DBpassword" );
+ $conf->DBpassword2 = importPost( "DBpassword2" );
+ $conf->SysopName = importPost( "SysopName", "WikiSysop" );
+ $conf->SysopPass = importPost( "SysopPass" );
+ $conf->SysopPass2 = importPost( "SysopPass2" );
+ $conf->RootUser = importPost( "RootUser" );
+ $conf->RootPW = importPost( "RootPW", "" );
+ $useRoot = importCheck( 'useroot', false );
+ $conf->LanguageCode = importPost( "LanguageCode", "en" );
+ ## MySQL specific:
+ $conf->DBprefix = importPost( "DBprefix" );
+ $conf->setSchema(
+ importPost( "DBschema", "mysql5-binary" ),
+ importPost( "DBengine", "InnoDB" ) );
+
+ ## Postgres specific:
+ $conf->DBport = importPost( "DBport", "5432" );
+ $conf->DBts2schema = importPost( "DBts2schema", "public" );
+ $conf->DBpgschema = importPost( "DBpgschema", "mediawiki" );
+
+ ## SQLite specific
+ $conf->SQLiteDataDir = importPost( "SQLiteDataDir", "$IP/../data" );
+
+ ## MSSQL specific
+ // We need a second field so it doesn't overwrite the MySQL one
+ $conf->DBprefix2 = importPost( "DBprefix2" );
+
+ ## DB2 specific:
+ // New variable in order to have a different default port number
+ $conf->DBport_db2 = importPost( "DBport_db2", "50000" );
+ $conf->DBcataloged = importPost( "DBcataloged", "cataloged" );
+ $conf->DBdb2schema = importPost( "DBdb2schema", "mediawiki" );
+
+ // Oracle specific
+ $conf->DBprefix_ora = importPost( "DBprefix_ora" );
+ $conf->DBdefTS_ora = importPost( "DBdefTS_ora", "USERS" );
+ $conf->DBtempTS_ora = importPost( "DBtempTS_ora", "TEMP" );
+
+ $conf->ShellLocale = getShellLocale( $conf->LanguageCode );
+
+/* Check for validity */
+$errs = array();
+
+if( preg_match( '/^$|^mediawiki$|#/i', $conf->Sitename ) ) {
+ $errs["Sitename"] = "Must not be blank or \"MediaWiki\" and may not contain \"#\"";
+}
+if( !$ourdb[$conf->DBtype]['serverless'] ) {
+ if( $conf->DBuser == "" ) {
+ $errs["DBuser"] = "Must not be blank";
+ }
+ if( ($conf->DBtype == 'mysql') && (strlen($conf->DBuser) > 16) ) {
+ $errs["DBuser"] = "Username too long";
+ }
+ if( $conf->DBpassword == "" && $conf->DBtype != "postgres" ) {
+ $errs["DBpassword"] = "Must not be blank";
+ }
+ if( $conf->DBpassword != $conf->DBpassword2 ) {
+ $errs["DBpassword2"] = "Passwords don't match!";
+ }
+}
+if( !preg_match( '/^[A-Za-z_0-9]*$/', $conf->DBprefix ) ) {
+ $errs["DBprefix"] = "Invalid table prefix";
+} else {
+ untaint( $conf->DBprefix, TC_MYSQL );
+}
+if( !preg_match( '/^[A-Za-z_0-9]*$/', $conf->DBprefix_ora ) ) {
+ $errs["DBprefix_ora"] = "Invalid table prefix";
+}
+
+error_reporting( E_ALL | E_STRICT );
+
+/**
+ * Initialise $wgLang and $wgContLang to something so we can
+ * call case-folding methods. Per Brion, this is English for
+ * now, although we could be clever and initialise to the
+ * user-selected language.
+ */
+$wgContLang = Language::factory( 'en' );
+$wgLang = $wgContLang;
+
+/**
+ * We're messing about with users, so we need a stub
+ * authentication plugin...
+ */
+$wgAuth = new AuthPlugin();
+
+/**
+ * Validate the initial administrator account; username,
+ * password checks, etc.
+ */
+if( $conf->SysopName ) {
+ # Check that the user can be created
+ $u = User::newFromName( $conf->SysopName );
+ if( $u instanceof User ) {
+ # Various password checks
+ if( $conf->SysopPass != '' ) {
+ if( $conf->SysopPass == $conf->SysopPass2 ) {
+ if( !$u->isValidPassword( $conf->SysopPass ) ) {
+ $errs['SysopPass'] = "Bad password";
+ }
+ } else {
+ $errs['SysopPass2'] = "Passwords don't match";
+ }
+ } else {
+ $errs['SysopPass'] = "Cannot be blank";
+ }
+ unset( $u );
+ } else {
+ $errs['SysopName'] = "Bad username";
+ }
+}
+
+$conf->License = importRequest( "License", "none" );
+if( $conf->License == "gfdl1_2" ) {
+ $conf->RightsUrl = "http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt";
+ $conf->RightsText = "GNU Free Documentation License 1.2";
+ $conf->RightsCode = "gfdl1_2";
+ $conf->RightsIcon = '${wgScriptPath}/skins/common/images/gnu-fdl.png';
+} elseif( $conf->License == "gfdl1_3" ) {
+ $conf->RightsUrl = "http://www.gnu.org/copyleft/fdl.html";
+ $conf->RightsText = "GNU Free Documentation License 1.3";
+ $conf->RightsCode = "gfdl1_3";
+ $conf->RightsIcon = '${wgScriptPath}/skins/common/images/gnu-fdl.png';
+} elseif( $conf->License == "none" ) {
+ $conf->RightsUrl = $conf->RightsText = $conf->RightsCode = $conf->RightsIcon = "";
+} elseif( $conf->License == "pd" ) {
+ $conf->RightsUrl = "http://creativecommons.org/licenses/publicdomain/";
+ $conf->RightsText = "Public Domain";
+ $conf->RightsCode = "pd";
+ $conf->RightsIcon = '${wgScriptPath}/skins/common/images/public-domain.png';
+} else {
+ $conf->RightsUrl = importRequest( "RightsUrl", "" );
+ $conf->RightsText = importRequest( "RightsText", "" );
+ $conf->RightsCode = importRequest( "RightsCode", "" );
+ $conf->RightsIcon = importRequest( "RightsIcon", "" );
+}
+
+$conf->Shm = importRequest( "Shm", "none" );
+$conf->MCServers = importRequest( "MCServers" );
+
+/* Test memcached servers */
+
+if ( $conf->Shm == 'memcached' && $conf->MCServers ) {
+ $conf->MCServerArray = wfArrayMap( 'trim', explode( ',', $conf->MCServers ) );
+ foreach ( $conf->MCServerArray as $server ) {
+ $error = testMemcachedServer( $server );
+ if ( $error ) {
+ $errs["MCServers"] = $error;
+ break;
+ }
+ }
+} else if ( $conf->Shm == 'memcached' ) {
+ $errs["MCServers"] = "Please specify at least one server if you wish to use memcached";
+}
+
+/* default values for installation */
+$conf->Email = importRequest("Email", "email_enabled");
+$conf->Emailuser = importRequest("Emailuser", "emailuser_enabled");
+$conf->Enotif = importRequest("Enotif", "enotif_allpages");
+$conf->Eauthent = importRequest("Eauthent", "eauthent_enabled");
+
+if( $conf->posted && ( 0 == count( $errs ) ) ) {
+ do { /* So we can 'continue' to end prematurely */
+ $conf->Root = ($conf->RootPW != "");
+
+ /* Load up the settings and get installin' */
+ $local = writeLocalSettings( $conf );
+ echo "<li style=\"list-style: none\">\n";
+ echo "<p><b>Generating configuration file...</b></p>\n";
+ echo "</li>\n";
+
+ $wgCommandLineMode = false;
+ chdir( ".." );
+ $ok = eval( $local );
+ if( $ok === false ) {
+ dieout( "<p>Errors in generated configuration; " .
+ "most likely due to a bug in the installer... " .
+ "Config file was: </p>" .
+ "<pre>" .
+ htmlspecialchars( $local ) .
+ "</pre>" );
+ }
+ $conf->DBtypename = '';
+ foreach (array_keys($ourdb) as $db) {
+ if ($conf->DBtype === $db)
+ $conf->DBtypename = $ourdb[$db]['fullname'];
+ }
+ if ( ! strlen($conf->DBtype)) {
+ $errs["DBpicktype"] = "Please choose a database type";
+ continue;
+ }
+
+ if (! $conf->DBtypename) {
+ $errs["DBtype"] = "Unknown database type '$conf->DBtype'";
+ continue;
+ }
+ print "<li>Database type: " . htmlspecialchars( $conf->DBtypename ) . "</li>\n";
+ $dbclass = 'Database'.ucfirst($conf->DBtype);
+ $wgDBtype = $conf->DBtype;
+ $wgDBadminuser = "root";
+ $wgDBadminpassword = $conf->RootPW;
+
+ ## Mysql specific:
+ $wgDBprefix = $conf->DBprefix;
+
+ ## Postgres specific:
+ $wgDBport = $conf->DBport;
+ $wgDBts2schema = $conf->DBts2schema;
+
+ if( $wgDBtype == 'postgres' ) {
+ $wgDBmwschema = $conf->DBpgschema;
+ } elseif ( $wgDBtype == 'ibm_db2' ) {
+ $wgDBmwschema = $conf->DBdb2schema;
+ }
+
+ if( $conf->DBprefix2 != '' ) {
+ // For MSSQL
+ $wgDBprefix = $conf->DBprefix2;
+ } elseif( $conf->DBprefix_ora != '' ) {
+ // For Oracle
+ $wgDBprefix = $conf->DBprefix_ora;
+ }
+
+ ## DB2 specific:
+ $wgDBcataloged = $conf->DBcataloged;
+
+ $wgCommandLineMode = true;
+ if (! defined ( 'STDERR' ) )
+ define( 'STDERR', fopen("php://stderr", "wb"));
+ $wgUseDatabaseMessages = false; /* FIXME: For database failure */
+ require_once( "$IP/includes/Setup.php" );
+ Language::getLocalisationCache()->disableBackend();
+
+ chdir( "config" );
+
+ $wgTitle = Title::newFromText( "Installation script" );
+ error_reporting( E_ALL | E_STRICT );
+ print "<li>Loading class: " . htmlspecialchars( $dbclass ) . "</li>\n";
+ if ( $conf->DBtype != 'sqlite' ) {
+ $dbc = new $dbclass;
+ }
+
+ if( $conf->DBtype == 'mysql' ) {
+ $mysqlOldClient = version_compare( mysql_get_client_info(), "4.1.0", "lt" );
+ if( $mysqlOldClient ) {
+ print "<li><b>PHP is linked with old MySQL client libraries. If you are
+ using a MySQL 4.1 server and have problems connecting to the database,
+ see <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
+ >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b></li>\n";
+ }
+ $ok = true; # Let's be optimistic
+
+ # Decide if we're going to use the superuser or the regular database user
+ $conf->Root = $useRoot;
+ if( $conf->Root ) {
+ $db_user = $conf->RootUser;
+ $db_pass = $conf->RootPW;
+ } else {
+ $db_user = $wgDBuser;
+ $db_pass = $wgDBpassword;
+ }
+
+ # Attempt to connect
+ echo( "<li>Attempting to connect to database server as " . htmlspecialchars( $db_user ) . "..." );
+ $wgDatabase = Database::newFromParams( $wgDBserver, $db_user, $db_pass, '', 1 );
+
+ # Check the connection and respond to errors
+ if( $wgDatabase->isOpen() ) {
+ # Seems OK
+ $ok = true;
+ $wgDBadminuser = $db_user;
+ $wgDBadminpassword = $db_pass;
+ echo( "success.</li>\n" );
+ $wgDatabase->ignoreErrors( true );
+ $myver = $wgDatabase->getServerVersion();
+ } else {
+ # There were errors, report them and back out
+ $ok = false;
+ $errno = mysql_errno();
+ $errtx = htmlspecialchars( mysql_error() );
+ switch( $errno ) {
+ case 1045:
+ case 2000:
+ echo( "failed due to authentication errors. Check passwords.</li>" );
+ if( $conf->Root ) {
+ # The superuser details are wrong
+ $errs["RootUser"] = "Check username";
+ $errs["RootPW"] = "and password";
+ } else {
+ # The regular user details are wrong
+ $errs["DBuser"] = "Check username";
+ $errs["DBpassword"] = "and password";
+ }
+ break;
+ case 2002:
+ case 2003:
+ default:
+ # General connection problem
+ echo( htmlspecialchars( "failed with error [$errno] $errtx." ) . "</li>\n" );
+ $errs["DBserver"] = "Connection failed";
+ break;
+ } # switch
+ } #conn. att.
+
+ if( !$ok ) { continue; }
+ }
+ else if( $conf->DBtype == 'ibm_db2' ) {
+ if( $useRoot ) {
+ $db_user = $conf->RootUser;
+ $db_pass = $conf->RootPW;
+ } else {
+ $db_user = $wgDBuser;
+ $db_pass = $wgDBpassword;
+ }
+
+ echo( "<li>Attempting to connect to database \"" . htmlspecialchars( $wgDBname ) .
+ "\" as \"" . htmlspecialchars( $db_user ) . "\"..." );
+ $wgDatabase = $dbc->newFromParams($wgDBserver, $db_user, $db_pass, $wgDBname, 1);
+ // enable extra debug messages
+ $dbc->setMode(DatabaseIbm_db2::INSTALL_MODE);
+ $wgDatabase->setMode(DatabaseIbm_db2::INSTALL_MODE);
+
+ if (!$wgDatabase->isOpen()) {
+ print " error: " . htmlspecialchars( $wgDatabase->lastError() ) . "</li>\n";
+ } else {
+ $myver = $wgDatabase->getServerVersion();
+ }
+ if (is_callable(array($wgDatabase, 'initial_setup'))) $wgDatabase->initial_setup('', $wgDBname);
+
+ } elseif ( $conf->DBtype == 'sqlite' ) {
+ $wgSQLiteDataDir = $conf->SQLiteDataDir;
+ echo '<li>Attempting to connect to SQLite database at "' .
+ htmlspecialchars( $wgSQLiteDataDir ) . '": ';
+ if ( !is_dir( $wgSQLiteDataDir ) ) {
+ if ( is_writable( dirname( $wgSQLiteDataDir ) ) ) {
+ $ok = wfMkdirParents( $wgSQLiteDataDir, $wgSQLiteDataDirMode );
+ } else {
+ $ok = false;
+ }
+ if ( !$ok ) {
+ echo "cannot create data directory</li>";
+ $errs['SQLiteDataDir'] = 'Enter a valid data directory';
+ continue;
+ }
+ }
+ if ( !is_writable( $wgSQLiteDataDir ) ) {
+ echo "data directory not writable</li>";
+ $errs['SQLiteDataDir'] = 'Enter a writable data directory';
+ continue;
+ }
+ $dataFile = DatabaseSqlite::generateFileName( $wgSQLiteDataDir, $wgDBname );
+ if ( file_exists( $dataFile ) ) {
+ if ( !is_writable( $dataFile ) ) {
+ echo "data file not writable</li>";
+ $errs['SQLiteDataDir'] = basename( $dataFile ) . " is not writable";
+ continue;
+ }
+ } else {
+ if ( file_put_contents( $dataFile, '' ) === false ) {
+ echo 'could not create database file "' . htmlspecialchars( basename( $dataFile ) ) . "\"</li>\n";
+ $errs['SQLiteDataDir'] = "couldn't create " . basename( $dataFile );
+ continue;
+ }
+ }
+ try {
+ $wgDatabase = new DatabaseSqlite( false, false, false, $wgDBname, 1 );
+ }
+ catch( MWException $ex ) {
+ echo 'error: ' . htmlspecialchars( $ex->getMessage() ) . "</li>\n";
+ continue;
+ }
+
+ if (!$wgDatabase->isOpen()) {
+ print "error: " . htmlspecialchars( $wgDatabase->lastError() ) . "</li>\n";
+ $errs['SQLiteDataDir'] = 'Could not connect to database';
+ continue;
+ } else {
+ $myver = $wgDatabase->getServerVersion();
+ }
+ if ( is_callable( array( $wgDatabase, 'initial_setup' ) ) ) {
+ $wgDatabase->initial_setup('', $wgDBname);
+ }
+ echo "ok</li>\n";
+ } elseif ( $conf->DBtype == 'oracle' ) {
+ echo "<li>Attempting to connect to database \"" . htmlspecialchars( $wgDBname ) ."\"</li>";
+ $old_error_level = error_reporting();
+ wfSuppressWarnings();
+ $wgDatabase = $dbc->newFromParams('DUMMY', $wgDBuser, $wgDBpassword, $wgDBname, 1);
+ wfRestoreWarnings();
+ if (!$wgDatabase->isOpen()) {
+ $ok = true;
+ echo "<li>Connect failed.</li>";
+ if ($useRoot) {
+ if (ini_get('oci8.privileged_connect') === false) {
+ echo "<li>Privileged connect disabled, please set oci8.privileged_connect or run maintenance/ora/user.sql script manually prior to continuing.</li>";
+ $ok = false;
+ } else {
+ $wgDBadminuser = $conf->RootUser;
+ $wgDBadminpassword = $conf->RootPW;
+ echo "<li>Attempting to create DB user.</li>";
+ $wgDatabase = $dbc->newFromParams('DUMMY', $wgDBadminuser, $wgDBadminpassword, $wgDBname, 1, 64);
+ if ($wgDatabase->isOpen()) {
+ $wgDBOracleDefTS = $conf->DBdefTS_ora;
+ $wgDBOracleTempTS = $conf->DBtempTS_ora;
+ $res = $wgDatabase->sourceFile( "../maintenance/ora/user.sql" );
+ if ($res !== true) dieout($res);
+ } else {
+ echo "<li>Invalid database superuser, please supply a valid superuser account.</li>";
+ echo "<li>ERR: ".print_r(oci_error(), true)."</li>";
+ $ok = false;
+ }
+ }
+ } else {
+ echo "<li>Database superuser missing, please supply a valid superuser account.</li>";
+ $ok = false;
+ }
+ if (!$ok) {
+ $errs["RootUser"] = "Check username";
+ $errs["RootPW"] = "and password";
+ } else {
+ echo "<li>Attempting to connect to database with new user \"" . htmlspecialchars( $wgDBname ) ."\"</li>";
+ $wgDatabase = $dbc->newFromParams('DUMMY', $wgDBuser, $wgDBpassword, $wgDBname, 1);
+ }
+ }
+ if ($ok) {
+ $myver = $wgDatabase->getServerVersion();
+ }
+ } else { # not mysql
+ error_reporting( E_ALL | E_STRICT );
+ $wgSuperUser = '';
+ ## Possible connect as a superuser
+ // Changed !mysql to postgres check since it seems to only apply to postgres
+ if( $useRoot && $conf->DBtype == 'postgres' ) {
+ $wgDBsuperuser = $conf->RootUser;
+ echo( "<li>Attempting to connect to database \"postgres\" as superuser \"" .
+ htmlspecialchars( $wgDBsuperuser ) . "\"..." );
+ $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBsuperuser, $conf->RootPW, "postgres", 1);
+ if (!$wgDatabase->isOpen()) {
+ print " error: " . htmlspecialchars( $wgDatabase->lastError() ) . "</li>\n";
+ $errs["DBserver"] = "Could not connect to database as superuser";
+ $errs["RootUser"] = "Check username";
+ $errs["RootPW"] = "and password";
+ continue;
+ }
+ $wgDatabase->initial_setup($conf->RootPW, 'postgres');
+ }
+ echo( "<li>Attempting to connect to database \"" . htmlspecialchars( $wgDBname ) .
+ "\" as \"" . htmlspecialchars( $wgDBuser ) . "\"..." );
+ $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1);
+ if (!$wgDatabase->isOpen()) {
+ print " error: " . htmlspecialchars( $wgDatabase->lastError() ) . "</li>\n";
+ $errs["DBserver"] = "Could not connect to database as user";
+ $errs["DBuser"] = "Check username";
+ $errs["DBpassword"] = "and password";
+ continue;
+ } else {
+ $myver = $wgDatabase->getServerVersion();
+ }
+ if (is_callable(array($wgDatabase, 'initial_setup'))) $wgDatabase->initial_setup('', $wgDBname);
+ }
+
+ if ( !$wgDatabase->isOpen() ) {
+ $errs["DBserver"] = "Couldn't connect to database";
+ continue;
+ }
+
+ print "<li>Connected to " . htmlspecialchars( "{$conf->DBtype} $myver" );
+ if ($conf->DBtype == 'mysql') {
+ if( version_compare( $myver, "4.0.14" ) < 0 ) {
+ print "</li>\n";
+ dieout( "-- mysql 4.0.14 or later required. Aborting." );
+ }
+ $mysqlNewAuth = version_compare( $myver, "4.1.0", "ge" );
+ if( $mysqlNewAuth && $mysqlOldClient ) {
+ print "; <b class='error'>You are using MySQL 4.1 server, but PHP is linked
+ to old client libraries; if you have trouble with authentication, see
+ <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
+ >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b>";
+ }
+ if( $wgDBmysql5 ) {
+ if( $mysqlNewAuth ) {
+ print "; enabling MySQL 4.1/5.0 charset mode";
+ } else {
+ print "; <b class='error'>MySQL 4.1/5.0 charset mode enabled,
+ but older version detected; will likely fail.</b>";
+ }
+ }
+ print "</li>\n";
+
+ @$sel = $wgDatabase->selectDB( $wgDBname );
+ if( $sel ) {
+ print "<li>Database <tt>" . htmlspecialchars( $wgDBname ) . "</tt> exists</li>\n";
+ } else {
+ $err = mysql_errno();
+ $databaseSafe = htmlspecialchars( $wgDBname );
+ if( $err == 1102 /* Invalid database name */ ) {
+ print "<ul><li><strong>{$databaseSafe}</strong> is not a valid database name.</li></ul>";
+ continue;
+ } elseif( $err != 1049 /* Database doesn't exist */ ) {
+ print "<ul><li>Error selecting database <strong>{$databaseSafe}</strong>: {$err} ";
+ print htmlspecialchars( mysql_error() ) . "</li></ul>";
+ continue;
+ }
+ print "<li>Attempting to create database...</li>";
+ $res = $wgDatabase->query( "CREATE DATABASE `$wgDBname`" );
+ if( !$res ) {
+ print "<li>Couldn't create database <tt>" .
+ htmlspecialchars( $wgDBname ) .
+ "</tt>; try with root access or check your username/pass.</li>\n";
+ $errs["RootPW"] = "<- Enter";
+ continue;
+ }
+ print "<li>Created database <tt>" . htmlspecialchars( $wgDBname ) . "</tt></li>\n";
+ }
+ $wgDatabase->selectDB( $wgDBname );
+ }
+ else if ($conf->DBtype == 'postgres') {
+ if( version_compare( $myver, "8.0" ) < 0 ) {
+ dieout( "<b>Postgres 8.0 or later is required</b>. Aborting." );
+ }
+ }
+
+ if( $wgDatabase->tableExists( "cur" ) || $wgDatabase->tableExists( "revision" ) ) {
+ print "<li>There are already MediaWiki tables in this database. Checking if updates are needed...</li>\n";
+
+ if ( $conf->DBtype == 'mysql') {
+ # Determine existing default character set
+ if ( $wgDatabase->tableExists( "revision" ) ) {
+ $revision = $wgDatabase->escapeLike( $conf->DBprefix . 'revision' );
+ $res = $wgDatabase->query( "SHOW TABLE STATUS LIKE '$revision'" );
+ $row = $wgDatabase->fetchObject( $res );
+ if ( !$row ) {
+ echo "<li>SHOW TABLE STATUS query failed!</li>\n";
+ $existingSchema = false;
+ $existingEngine = false;
+ } else {
+ if ( preg_match( '/^latin1/', $row->Collation ) ) {
+ $existingSchema = 'mysql4';
+ } elseif ( preg_match( '/^utf8/', $row->Collation ) ) {
+ $existingSchema = 'mysql5';
+ } elseif ( preg_match( '/^binary/', $row->Collation ) ) {
+ $existingSchema = 'mysql5-binary';
+ } else {
+ $existingSchema = false;
+ echo "<li><strong>Warning:</strong> Unrecognised existing collation</li>\n";
+ }
+ if ( isset( $row->Engine ) ) {
+ $existingEngine = $row->Engine;
+ } else {
+ $existingEngine = $row->Type;
+ }
+ }
+ if ( $existingSchema && $existingSchema != $conf->DBschema ) {
+ $encExisting = htmlspecialchars( $existingSchema );
+ $encRequested = htmlspecialchars( $conf->DBschema );
+ print "<li><strong>Warning:</strong> you requested the $encRequested schema, " .
+ "but the existing database has the $encExisting schema. This upgrade script ".
+ "can't convert it, so it will remain $encExisting.</li>\n";
+ $conf->setSchema( $existingSchema, $conf->DBengine );
+ }
+ if ( $existingEngine && $existingEngine != $conf->DBengine ) {
+ $encExisting = htmlspecialchars( $existingEngine );
+ $encRequested = htmlspecialchars( $conf->DBengine );
+ print "<li><strong>Warning:</strong> you requested the $encRequested storage " .
+ "engine, but the existing database uses the $encExisting engine. This upgrade " .
+ "script can't convert it, so it will remain $encExisting.</li>\n";
+ $conf->setSchema( $conf->DBschema, $existingEngine );
+ }
+ }
+
+ # Create user if required
+ if ( $conf->Root ) {
+ $conn = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 );
+ if ( $conn->isOpen() ) {
+ print "<li>DB user account ok</li>\n";
+ $conn->close();
+ } else {
+ print "<li>Granting user permissions...";
+ if( $mysqlOldClient && $mysqlNewAuth ) {
+ print " <b class='error'>If the next step fails, see <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'>http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b>";
+ }
+ print "</li>\n";
+ $res = $wgDatabase->sourceFile( "../maintenance/users.sql" );
+ if ($res !== true) dieout($res);
+ }
+ }
+ }
+ print "</ul><pre>\n";
+ chdir( ".." );
+ flush();
+ do_all_updates();
+ chdir( "config" );
+ print "</pre>\n";
+ print "<ul><li>Finished update checks.</li>\n";
+ // if tables don't yet exist
+ } else {
+ # Determine available storage engines if possible
+ if ( $conf->DBtype == 'mysql' && version_compare( $myver, "4.1.2", "ge" ) ) {
+ $res = $wgDatabase->query( 'SHOW ENGINES' );
+ $found = false;
+ while ( $row = $wgDatabase->fetchObject( $res ) ) {
+ if ( $row->Engine == $conf->DBengine && ( $row->Support == 'YES' || $row->Support == 'DEFAULT' ) ) {
+ $found = true;
+ break;
+ }
+ }
+ $wgDatabase->freeResult( $res );
+ if ( !$found && $conf->DBengine != 'MyISAM' ) {
+ echo "<li><strong>Warning:</strong> " . htmlspecialchars( $conf->DBengine ) .
+ " storage engine not available, " .
+ "using MyISAM instead</li>\n";
+ $conf->setSchema( $conf->DBschema, 'MyISAM' );
+ }
+ }
+
+ # FIXME: Check for errors
+ print "<li>Creating tables...";
+ if ($conf->DBtype == 'mysql') {
+ $res = $wgDatabase->sourceFile( "../maintenance/tables.sql" );
+ if ($res === true) {
+ print " done.</li>\n<li>Populating interwiki table... \n";
+ $res = $wgDatabase->sourceFile( "../maintenance/interwiki.sql" );
+ }
+ if ($res === true) {
+ print " done.</li>\n";
+ } else {
+ print " <b>FAILED</b></li>\n";
+ dieout( htmlspecialchars( $res ) );
+ }
+ } elseif (is_callable(array($wgDatabase, 'setup_database'))) {
+ $wgDatabase->setup_database();
+ }
+ else {
+ $errs["DBtype"] = "Do not know how to handle database type '$conf->DBtype'";
+ continue;
+ }
+
+
+ if ( $conf->DBtype == 'ibm_db2' ) {
+ // Now that table creation is done, make sure everything is committed
+ // Do this before doing inserts through API
+ if ($wgDatabase->lastError()) {
+ print "<li>Errors encountered during table creation -- rolled back</li>\n";
+ $wgDatabase->rollback();
+ }
+ else {
+ print "<li>MediaWiki tables successfully created</li>\n";
+ $wgDatabase->commit();
+ }
+ } elseif ( $conf->DBtype == 'sqlite' ) {
+ // Ensure proper searchindex format. We have to do that separately because
+ // if SQLite is compiled without the FTS3 module, table creation syntax will be invalid.
+ sqlite_setup_searchindex();
+ }
+
+ print "<li>Initializing statistics...</li>\n";
+ $wgDatabase->insert( 'site_stats',
+ array ( 'ss_row_id' => 1,
+ 'ss_total_views' => 0,
+ 'ss_total_edits' => 1, # Main page first edit
+ 'ss_good_articles' => 0, # Main page is not a good article - no internal link
+ 'ss_total_pages' => 1, # Main page
+ 'ss_users' => $conf->SysopName ? 1 : 0, # Sysop account, if created
+ 'ss_admins' => $conf->SysopName ? 1 : 0, # Sysop account, if created
+ 'ss_images' => 0 ) );
+
+ # Set up the "regular user" account *if we can, and if we need to*
+ if( $conf->Root and $conf->DBtype == 'mysql') {
+ # See if we need to
+ $wgDatabase2 = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 );
+ if( $wgDatabase2->isOpen() ) {
+ # Nope, just close the test connection and continue
+ $wgDatabase2->close();
+ echo( "<li>User " . htmlspecialchars( $wgDBuser ) . " exists. Skipping grants.</li>\n" );
+ } else {
+ # Yes, so run the grants
+ echo( "<li>" . htmlspecialchars( "Granting user permissions to $wgDBuser on $wgDBname..." ) );
+ $res = $wgDatabase->sourceFile( "../maintenance/users.sql" );
+ if ( $res === true ) {
+ echo( " success.</li>\n" );
+ } else {
+ echo( " <b>FAILED</b>.</li>\n" );
+ dieout( $res );
+ }
+ }
+ }
+
+ if( $conf->SysopName ) {
+ $u = User::newFromName( $conf->getSysopName() );
+ if ( !$u ) {
+ print "<li><strong class=\"error\">Warning:</strong> Skipped sysop account creation - invalid username!</li>\n";
+ }
+ else if ( 0 == $u->idForName() ) {
+ $u->addToDatabase();
+ $u->setPassword( $conf->getSysopPass() );
+ $u->saveSettings();
+
+ $u->addGroup( "sysop" );
+ $u->addGroup( "bureaucrat" );
+
+ print "<li>Created sysop account <tt>" .
+ htmlspecialchars( $conf->SysopName ) . "</tt>.</li>\n";
+ } else {
+ print "<li>Could not create user - already exists!</li>\n";
+ }
+ } else {
+ print "<li>Skipped sysop account creation, no name given.</li>\n";
+ }
+
+ $titleobj = Title::newFromText( wfMsgNoDB( "mainpage" ) );
+ $article = new Article( $titleobj );
+ $newid = $article->insertOn( $wgDatabase );
+ $revision = new Revision( array(
+ 'page' => $newid,
+ 'text' => wfMsg( 'mainpagetext' ) . "\n\n" . wfMsgNoTrans( 'mainpagedocfooter' ),
+ 'comment' => '',
+ 'user' => 0,
+ 'user_text' => 'MediaWiki default',
+ ) );
+ $revid = $revision->insertOn( $wgDatabase );
+ $article->updateRevisionOn( $wgDatabase, $revision );
+ }
+
+ /* Write out the config file now that all is well */
+ print "<li style=\"list-style: none\">\n";
+ print "<p>Creating LocalSettings.php...</p>\n\n";
+ $localSettings = "<" . "?php$endl$local";
+ // Fix up a common line-ending problem (due to CVS on Windows)
+ $localSettings = str_replace( "\r\n", "\n", $localSettings );
+ $f = fopen( "LocalSettings.php", 'xt' );
+
+ if( $f == false ) {
+ print( "</li>\n" );
+ dieout( "<p>Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a file of that name here...</p>\n" .
+ "<p>Here's the file that would have been written, try to paste it into place manually:</p>\n" .
+ "<pre>\n" . htmlspecialchars( $localSettings ) . "</pre>\n" );
+ }
+ if(fwrite( $f, $localSettings ) ) {
+ fclose( $f );
+ print "<hr/>\n";
+ writeSuccessMessage();
+ print "</li>\n";
+ } else {
+ fclose( $f );
+ dieout( "<p class='error'>An error occured while writing the config/LocalSettings.php file. Check user rights and disk space then try again.</p></li>\n" );
+ }
+
+ } while( false );
+}
+
+print "</ul>\n";
+$mainListOpened = false;
+
+if( count( $errs ) ) {
+ /* Display options form */
+
+ if( $conf->posted ) {
+ echo "<p class='error-top'>Something's not quite right yet; make sure everything below is filled out correctly.</p>\n";
+ }
+?>
+
+<form action="<?php echo defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; ?>" name="config" method="post">
+
+<h2>Site config</h2>
+
+<div class="config-section">
+ <div class="config-input">
+ <?php aField( $conf, "Sitename", "Wiki name:" ); ?>
+ </div>
+ <p class="config-desc">
+ Preferably a short word without punctuation, i.e. "Wikipedia".<br />
+ Will appear as the namespace name for "meta" pages, and throughout the interface.
+ </p>
+ <div class="config-input"><?php aField( $conf, "EmergencyContact", "Contact e-mail:" ); ?></div>
+ <p class="config-desc">
+ Displayed to users in some error messages, used as the return address for password reminders, and used as the default sender address of e-mail notifications.
+ </p>
+
+ <div class="config-input">
+ <label class='column' for="LanguageCode">Language:</label>
+ <select id="LanguageCode" name="LanguageCode"><?php
+ $list = getLanguageList();
+ foreach( $list as $code => $name ) {
+ $sel = ($code == $conf->LanguageCode) ? 'selected="selected"' : '';
+ $encCode = htmlspecialchars( $code );
+ $encName = htmlspecialchars( $name );
+ echo "\n\t\t<option value=\"$encCode\" $sel>$encName</option>";
+ }
+ echo "\n";
+ ?>
+ </select>
+ </div>
+ <p class="config-desc">
+ Select the language for your wiki's interface. Some localizations aren't fully complete. Unicode (UTF-8) is used for all localizations.
+ </p>
+
+ <div class="config-input">
+ <label class='column'>Copyright/license:</label>
+
+ <ul class="plain">
+ <li><?php aField( $conf, "License", "No license metadata", "radio", "none" ); ?></li>
+ <li><?php aField( $conf, "License", "Public Domain", "radio", "pd" ); ?></li>
+ <li><?php aField( $conf, "License", "GNU Free Documentation License 1.2", "radio", "gfdl1_2" ); ?></li>
+ <li><?php aField( $conf, "License", "GNU Free Documentation License 1.3", "radio", "gfdl1_3" ); ?></li>
+ <li><?php
+ aField( $conf, "License", "A Creative Commons license - ", "radio", "cc" );
+ $partner = "MediaWiki";
+ $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
+ $exit = urlencode( "$wgServer{$conf->ScriptPath}/config/$script?License=cc&RightsUrl=[license_url]&RightsText=[license_name]&RightsCode=[license_code]&RightsIcon=[license_button]" );
+ $icon = urlencode( "$wgServer$wgUploadPath/wiki.png" );
+ $ccApp = htmlspecialchars( "http://creativecommons.org/license/?partner=$partner&exit_url=$exit&partner_icon_url=$icon" );
+ print "<a href=\"$ccApp\" target='_blank'>choose</a>";
+ if( $conf->License == "cc" ) { ?>
+ <ul>
+ <li><?php aField( $conf, "RightsIcon", "<img src=\"" . htmlspecialchars( $conf->RightsIcon ) . "\" alt='(Creative Commons icon)' />", "hidden" ); ?></li>
+ <li><?php aField( $conf, "RightsText", htmlspecialchars( $conf->RightsText ), "hidden" ); ?></li>
+ <li><?php aField( $conf, "RightsCode", "code: " . htmlspecialchars( $conf->RightsCode ), "hidden" ); ?></li>
+ <li><?php aField( $conf, "RightsUrl", "<a href=\"" . htmlspecialchars( $conf->RightsUrl ) . "\">" . htmlspecialchars( $conf->RightsUrl ) . "</a>", "hidden" ); ?></li>
+ </ul>
+ <?php } ?>
+ </li>
+ </ul>
+ </div>
+ <p class="config-desc">
+ A notice, icon, and machine-readable copyright metadata will be displayed for the license you pick.
+ </p>
+
+
+ <div class="config-input">
+ <?php aField( $conf, "SysopName", "Admin username:" ) ?>
+ </div>
+ <div class="config-input">
+ <?php aField( $conf, "SysopPass", "Password:", "password" ) ?>
+ </div>
+ <div class="config-input">
+ <?php aField( $conf, "SysopPass2", "Password confirm:", "password" ) ?>
+ </div>
+ <p class="config-desc">
+ An admin can lock/delete pages, block users from editing, and do other maintenance tasks.<br />
+ A new account will be added only when creating a new wiki database.
+ <br /><br />
+ The password cannot be the same as the username.
+ </p>
+
+ <div class="config-input">
+ <label class='column'>Object caching:</label>
+
+ <ul class="plain">
+ <li><?php aField( $conf, "Shm", "No caching", "radio", "none" ); ?></li>
+ <?php
+ if( $conf->xcache ) {
+ echo "<li>";
+ aField( $conf, 'Shm', 'XCache', 'radio', 'xcache' );
+ echo "</li>\n";
+ }
+ if ( $conf->apc ) {
+ echo "<li>";
+ aField( $conf, "Shm", "APC", "radio", "apc" );
+ echo "</li>\n";
+ }
+ if ( $conf->eaccel ) {
+ echo "<li>";
+ aField( $conf, "Shm", "eAccelerator", "radio", "eaccel" );
+ echo "</li>\n";
+ }
+ if ( $conf->dba ) {
+ echo "<li>";
+ aField( $conf, "Shm", "DBA (not recommended)", "radio", "dba" );
+ echo "</li>";
+ }
+ ?>
+ <li><?php aField( $conf, "Shm", "Memcached", "radio", "memcached" ); ?></li>
+ </ul>
+ <div style="clear:left"><?php aField( $conf, "MCServers", "Memcached servers:", "text" ) ?></div>
+ </div>
+ <p class="config-desc">
+ An object caching system such as memcached will provide a significant performance boost,
+ but needs to be installed. Provide the server addresses and ports in a comma-separated list.
+ <br /><br />
+ MediaWiki can also detect and support eAccelerator, APC, and XCache, but
+ these should not be used if the wiki will be running on multiple application servers.
+ <br /><br />
+ DBA (Berkeley-style DB) is generally slower than using no cache at all, and is only
+ recommended for testing.
+ </p>
+</div>
+
+<h2>E-mail, e-mail notification and authentication setup</h2>
+
+<div class="config-section">
+ <div class="config-input">
+ <label class='column'>E-mail features (global):</label>
+ <ul class="plain">
+ <li><?php aField( $conf, "Email", "Enabled", "radio", "email_enabled" ); ?></li>
+ <li><?php aField( $conf, "Email", "Disabled", "radio", "email_disabled" ); ?></li>
+ </ul>
+ </div>
+ <p class="config-desc">
+ Use this to disable all e-mail functions (password reminders, user-to-user e-mail, and e-mail notifications)
+ if sending mail doesn't work on your server.
+ </p>
+
+ <div class="config-input">
+ <label class='column'>User-to-user e-mail:</label>
+ <ul class="plain">
+ <li><?php aField( $conf, "Emailuser", "Enabled", "radio", "emailuser_enabled" ); ?></li>
+ <li><?php aField( $conf, "Emailuser", "Disabled", "radio", "emailuser_disabled" ); ?></li>
+ </ul>
+ </div>
+ <p class="config-desc">
+ The user-to-user e-mail feature (Special:Emailuser) lets the wiki act as a relay to allow users to exchange e-mail without publicly advertising their e-mail address.
+ </p>
+ <div class="config-input">
+ <label class='column'>E-mail notification about changes:</label>
+ <ul class="plain">
+ <li><?php aField( $conf, "Enotif", "Disabled", "radio", "enotif_disabled" ); ?></li>
+ <li><?php aField( $conf, "Enotif", "Enabled for changes to user discussion pages only", "radio", "enotif_usertalk" ); ?></li>
+ <li><?php aField( $conf, "Enotif", "Enabled for changes to user discussion pages, and to pages on watchlists (not recommended for large wikis)", "radio", "enotif_allpages" ); ?></li>
+ </ul>
+ </div>
+ <div class="config-desc">
+ <p>
+ For this feature to work, an e-mail address must be present for the user account, and the notification
+ options in the user's preferences must be enabled. Also note the
+ authentication option below. When testing the feature, keep in mind that your own changes will never trigger notifications to be sent to yourself.</p>
+
+ <p>There are additional options for fine tuning in /includes/DefaultSettings.php; copy these to your LocalSettings.php and edit them there to change them.</p>
+ </div>
+
+ <div class="config-input">
+ <label class='column'>E-mail address authentication:</label>
+ <ul class="plain">
+ <li><?php aField( $conf, "Eauthent", "Disabled", "radio", "eauthent_disabled" ); ?></li>
+ <li><?php aField( $conf, "Eauthent", "Enabled", "radio", "eauthent_enabled" ); ?></li>
+ </ul>
+ </div>
+ <div class="config-desc">
+ <p>If this option is enabled, users have to confirm their e-mail address using a magic link sent to them whenever they set or change it, and only authenticated e-mail addresses can receive mails from other users and/or
+ change notification mails. Setting this option is <b>recommended</b> for public wikis because of potential abuse of the e-mail features above.</p>
+ </div>
+
+</div>
+
+<h2>Database config</h2>
+
+<div class="config-section">
+<div class="config-input">
+ <label class='column'>Database type:</label>
+<?php
+ if (isset($errs['DBpicktype'])) {
+ print "\t<span class='error'>" . htmlspecialchars( $errs['DBpicktype'] ) . "</span>\n";
+ }
+?>
+ <ul class='plain'><?php
+ database_picker($conf);
+ ?></ul>
+ </div>
+
+ <div id="db-server-settings1">
+ <div class="config-input" style="clear:left">
+ <?php aField( $conf, "DBserver", "Database host:" ); ?>
+ </div>
+ <p class="config-desc">
+ If your database server isn't on your web server, enter the name or IP address here.
+ </p>
+ </div>
+
+ <div class="config-input"><?php aField( $conf, "DBname", "Database name:" ); ?></div>
+ <div id="db-server-settings2">
+ <div class="config-input"><?php aField( $conf, "DBuser", "DB username:" ); ?></div>
+ <div class="config-input"><?php aField( $conf, "DBpassword", "DB password:", "password" ); ?></div>
+ <div class="config-input"><?php aField( $conf, "DBpassword2", "DB password confirm:", "password" ); ?></div>
+ <p class="config-desc">
+ If you only have a single user account and database available,
+ enter those here. If you have database root access (see below)
+ you can specify new accounts/databases to be created. This account
+ will not be created if it pre-exists. If this is the case, ensure that it
+ has SELECT, INSERT, UPDATE, and DELETE permissions on the MediaWiki database.
+ </p>
+
+ <div class="config-input">
+ <label class="column">Superuser account:</label>
+ <input type="checkbox" name="useroot" id="useroot" <?php if( $useRoot ) { ?>checked="checked" <?php } ?> />
+ &nbsp;<label for="useroot">Use superuser account</label>
+ </div>
+ <div class="config-input"><?php aField( $conf, "RootUser", "Superuser name:", "text" ); ?></div>
+ <div class="config-input"><?php aField( $conf, "RootPW", "Superuser password:", "password" ); ?></div>
+
+ <p class="config-desc">
+ If the database user specified above does not exist, or does not have access to create
+ the database (if needed) or tables within it, please check the box and provide details
+ of a superuser account, such as <strong>root</strong>, which does.
+ </p>
+ </div>
+
+ <?php database_switcher('mysql'); ?>
+ <div class="config-input"><?php aField( $conf, "DBprefix", "Database table prefix:" ); ?></div>
+ <div class="config-desc">
+ <p>If you need to share one database between multiple wikis, or
+ between MediaWiki and another web application, you may choose to
+ add a prefix to all the table names to avoid conflicts.</p>
+
+ <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
+ </div>
+
+ <div class="config-input"><label class="column">Storage Engine</label>
+ <div>Select one:</div>
+ <ul class="plain">
+ <li><?php aField( $conf, "DBengine", "InnoDB", "radio", "InnoDB" ); ?></li>
+ <li><?php aField( $conf, "DBengine", "MyISAM", "radio", "MyISAM" ); ?></li>
+ </ul>
+ </div>
+ <p class="config-desc">
+ InnoDB is best for public web installations, since it has good concurrency
+ support. MyISAM may be faster in single-user installations. MyISAM databases
+ tend to get corrupted more often than InnoDB databases.
+ </p>
+ <div class="config-input"><label class="column">Database character set</label>
+ <div>Select one:</div>
+ <ul class="plain">
+ <li><?php aField( $conf, "DBschema", "MySQL 4.1/5.0 binary", "radio", "mysql5-binary" ); ?></li>
+ <li><?php aField( $conf, "DBschema", "MySQL 4.1/5.0 UTF-8", "radio", "mysql5" ); ?></li>
+ <li><?php aField( $conf, "DBschema", "MySQL 4.0 backwards-compatible UTF-8", "radio", "mysql4" ); ?></li>
+ </ul>
+ </div>
+ <p class="config-desc">
+ This option is ignored on upgrade, the same character set will be kept.
+ <br /><br />
+ <b>WARNING:</b> If you use <b>backwards-compatible UTF-8</b> on MySQL 4.1+, and subsequently back up the database with <tt>mysqldump</tt>, it may destroy all non-ASCII characters, irreversibly corrupting your backups!.
+ <br /><br />
+ In <b>binary mode</b>, MediaWiki stores UTF-8 text to the database in binary fields. This is more efficient than MySQL's UTF-8 mode, and allows you to use the full range of Unicode characters. In <b>UTF-8 mode</b>, MySQL will know what character set your data is in, and can present and convert it appropriately, but it won't let you store characters above the <a target="_blank" href="http://en.wikipedia.org/wiki/Mapping_of_Unicode_character_planes">Basic Multilingual Plane</a>.
+ </p>
+ </fieldset>
+
+ <?php database_switcher('postgres'); ?>
+ <div class="config-input"><?php aField( $conf, "DBport", "Database port:" ); ?></div>
+ <div class="config-input"><?php aField( $conf, "DBpgschema", "Schema for mediawiki:" ); ?></div>
+ <div class="config-input"><?php aField( $conf, "DBts2schema", "Schema for tsearch2:" ); ?></div>
+ <div class="config-desc">
+ <p>The username specified above (at "DB username") will have its search path set to the above schemas,
+ so it is recommended that you create a new user. The above schemas are generally correct:
+ only change them if you are sure you need to.</p>
+ </div>
+ </fieldset>
+
+ <?php database_switcher('sqlite'); ?>
+ <div class="config-input"><?php
+ aField( $conf, "SQLiteDataDir", "SQLite data directory:" );
+ ?></div>
+ <div class="config-desc">
+ <p>SQLite stores table data into files in the
+ filesystem.</p>
+
+ <p>This directory must exist and be writable by the web server.</p>
+ </div>
+ </fieldset>
+
+ <?php database_switcher('mssql'); ?>
+ <div class="config-input"><?php
+ aField( $conf, "DBprefix2", "Database table prefix:" );
+ ?></div>
+ <div class="config-desc">
+ <p>If you need to share one database between multiple wikis, or
+ between MediaWiki and another web application, you may choose to
+ add a prefix to all the table names to avoid conflicts.</p>
+
+ <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
+ </div>
+ </fieldset>
+
+ <?php database_switcher('ibm_db2'); ?>
+ <div class="config-input"><?php
+ aField( $conf, "DBport_db2", "Database port:" );
+ ?></div>
+ <div class="config-input"><?php
+ aField( $conf, "DBdb2schema", "Schema for mediawiki:" );
+ ?></div>
+ <div>Select one:</div>
+ <ul class="plain">
+ <li><?php aField( $conf, "DBcataloged", "Cataloged (DB2 installed locally)", "radio", "cataloged" ); ?></li>
+ <li><?php aField( $conf, "DBcataloged", "Uncataloged (remote DB2 through ODBC)", "radio", "uncataloged" ); ?></li>
+ </ul>
+ <div class="config-desc">
+ <p>If you need to share one database between multiple wikis, or
+ between MediaWiki and another web application, you may specify
+ a different schema to avoid conflicts.</p>
+ </div>
+ </fieldset>
+
+ <?php database_switcher('oracle'); ?>
+ <div class="config-input"><?php aField( $conf, "DBprefix_ora", "Database table prefix:" ); ?></div>
+ <div class="config-desc">
+ <p>If you need to share one database between multiple wikis, or
+ between MediaWiki and another web application, you may choose to
+ add a prefix to all the table names to avoid conflicts.</p>
+
+ <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
+ </div>
+ <div class="config-input"><?php aField( $conf, "DBdefTS_ora", "Default tablespace:" ); ?></div>
+ <div class="config-input"><?php aField( $conf, "DBtempTS_ora", "Temporary tablespace:" ); ?></div>
+ </fieldset>
+
+ <div class="config-input" style="padding:2em 0 3em">
+ <label class='column'>&nbsp;</label>
+ <input type="submit" value="Install MediaWiki!" class="btn-install" />
+ </div>
+</div>
+</form>
+<script type="text/javascript">
+window.onload = toggleDBarea( <?php echo Xml::encodeJsVar( $conf->DBtype ); ?>,
+<?php
+ ## If they passed in a root user name, don't populate it on page load
+ echo strlen(importPost('RootUser', '')) ? 0 : 1;
+?>);
+</script>
+<?php
+}
+
+/* -------------------------------------------------------------------------------------- */
+function writeSuccessMessage() {
+ $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
+ if ( wfIniGetBool( 'safe_mode' ) && !ini_get( 'open_basedir' ) ) {
+ echo <<<HTML
+<div class="success-box">
+<p>Installation successful!</p>
+<p>To complete the installation, please do the following:
+<ol>
+ <li>Download config/LocalSettings.php with your FTP client or file manager</li>
+ <li>Upload it to the parent directory</li>
+ <li>Delete config/LocalSettings.php</li>
+ <li>Start using <a href='../$script'>your wiki</a>!
+</ol>
+<p>If you are in a shared hosting environment, do <strong>not</strong> just move LocalSettings.php
+remotely. LocalSettings.php is currently owned by the user your webserver is running under,
+which means that anyone on the same server can read your database password! Downloading
+it and uploading it again will hopefully change the ownership to a user ID specific to you.</p>
+</div>
+HTML;
+ } else {
+ echo <<<HTML
+<div class="success-box">
+<p>
+<span class="success-message">Installation successful!</span>
+Move the <tt>config/LocalSettings.php</tt> file to the parent directory, then follow
+<a href="../$script"> this link</a> to your wiki.</p>
+<p>You should change file permissions for <tt>LocalSettings.php</tt> as required to
+prevent other users on the server reading passwords and altering configuration data.</p>
+</div>
+HTML;
+ }
+}
+
+
+function escapePhpString( $string ) {
+ if ( is_array( $string ) || is_object( $string ) ) {
+ return false;
+ }
+ return strtr( $string,
+ array(
+ "\n" => "\\n",
+ "\r" => "\\r",
+ "\t" => "\\t",
+ "\\" => "\\\\",
+ "\$" => "\\\$",
+ "\"" => "\\\""
+ ));
+}
+
+function writeLocalSettings( $conf ) {
+ $conf->PasswordSender = $conf->EmergencyContact;
+ $magic = ($conf->ImageMagick ? "" : "# ");
+ $convert = ($conf->ImageMagick ? $conf->ImageMagick : "/usr/bin/convert" );
+ $rights = ($conf->RightsUrl) ? "" : "# ";
+ $hashedUploads = $conf->safeMode ? '' : '# ';
+ $dir = realpath( $conf->SQLiteDataDir );
+ if ( !$dir ) {
+ $dir = $conf->SQLiteDataDir; // dumb realpath sometimes fails
+ }
+ $sqliteDataDir = escapePhpString( $dir );
+
+ if ( $conf->ShellLocale ) {
+ $locale = '';
+ } else {
+ $locale = '# ';
+ $conf->ShellLocale = 'en_US.UTF-8';
+ }
+
+ switch ( $conf->Shm ) {
+ case 'memcached':
+ $cacheType = 'CACHE_MEMCACHED';
+ $mcservers = var_export( $conf->MCServerArray, true );
+ break;
+ case 'xcache':
+ case 'apc':
+ case 'eaccel':
+ $cacheType = 'CACHE_ACCEL';
+ $mcservers = 'array()';
+ break;
+ case 'dba':
+ $cacheType = 'CACHE_DBA';
+ $mcservers = 'array()';
+ break;
+ default:
+ $cacheType = 'CACHE_NONE';
+ $mcservers = 'array()';
+ }
+
+ if ( $conf->Email == 'email_enabled' ) {
+ $enableemail = 'true';
+ $enableuseremail = ( $conf->Emailuser == 'emailuser_enabled' ) ? 'true' : 'false' ;
+ $eauthent = ( $conf->Eauthent == 'eauthent_enabled' ) ? 'true' : 'false' ;
+ switch ( $conf->Enotif ) {
+ case 'enotif_usertalk':
+ $enotifusertalk = 'true';
+ $enotifwatchlist = 'false';
+ break;
+ case 'enotif_allpages':
+ $enotifusertalk = 'true';
+ $enotifwatchlist = 'true';
+ break;
+ default:
+ $enotifusertalk = 'false';
+ $enotifwatchlist = 'false';
+ }
+ } else {
+ $enableuseremail = 'false';
+ $enableemail = 'false';
+ $eauthent = 'false';
+ $enotifusertalk = 'false';
+ $enotifwatchlist = 'false';
+ }
+
+ $file = @fopen( "/dev/urandom", "r" );
+ if ( $file ) {
+ $secretKey = bin2hex( fread( $file, 32 ) );
+ fclose( $file );
+ } else {
+ $secretKey = "";
+ for ( $i=0; $i<8; $i++ ) {
+ $secretKey .= dechex(mt_rand(0, 0x7fffffff));
+ }
+ print "<li>Warning: \$wgSecretKey key is insecure, generated with mt_rand(). Consider changing it manually.</li>\n";
+ }
+
+ # Add slashes to strings for double quoting
+ $slconf = wfArrayMap( "escapePhpString", get_object_vars( $conf ) );
+ if( $conf->License == 'gfdl1_2' || $conf->License == 'pd' || $conf->License == 'gfdl1_3' ) {
+ # Needs literal string interpolation for the current style path
+ $slconf['RightsIcon'] = $conf->RightsIcon;
+ }
+
+ if( $conf->DBtype == 'mysql' ) {
+ $dbsettings =
+"# MySQL specific settings
+\$wgDBprefix = \"{$slconf['DBprefix']}\";
+
+# MySQL table options to use during installation or update
+\$wgDBTableOptions = \"{$slconf['DBTableOptions']}\";
+
+# Experimental charset support for MySQL 4.1/5.0.
+\$wgDBmysql5 = {$conf->DBmysql5};";
+ } elseif( $conf->DBtype == 'postgres' ) {
+ $dbsettings =
+"# Postgres specific settings
+\$wgDBport = \"{$slconf['DBport']}\";
+\$wgDBmwschema = \"{$slconf['DBpgschema']}\";
+\$wgDBts2schema = \"{$slconf['DBts2schema']}\";";
+ } elseif( $conf->DBtype == 'sqlite' ) {
+ $dbsettings =
+"# SQLite-specific settings
+\$wgSQLiteDataDir = \"{$sqliteDataDir}\";";
+ } elseif( $conf->DBtype == 'mssql' ) {
+ $dbsettings =
+"# MSSQL specific settings
+\$wgDBprefix = \"{$slconf['DBprefix2']}\";";
+ } elseif( $conf->DBtype == 'ibm_db2' ) {
+ $dbsettings =
+"# DB2 specific settings
+\$wgDBport_db2 = \"{$slconf['DBport_db2']}\";
+\$wgDBmwschema = \"{$slconf['DBdb2schema']}\";
+\$wgDBcataloged = \"{$slconf['DBcataloged']}\";";
+ } elseif( $conf->DBtype == 'oracle' ) {
+ $dbsettings =
+"# Oracle specific settings
+\$wgDBprefix = \"{$slconf['DBprefix_ora']}\";";
+ } else {
+ // ummm... :D
+ $dbsettings = '';
+ }
+
+
+ $localsettings = "
+# This file was automatically generated by the MediaWiki installer.
+# If you make manual changes, please keep track in case you need to
+# recreate them later.
+#
+# See includes/DefaultSettings.php for all configurable settings
+# and their default values, but don't forget to make changes in _this_
+# file, not there.
+#
+# Further documentation for configuration settings may be found at:
+# http://www.mediawiki.org/wiki/Manual:Configuration_settings
+
+# If you customize your file layout, set \$IP to the directory that contains
+# the other MediaWiki files. It will be used as a base to locate files.
+if( defined( 'MW_INSTALL_PATH' ) ) {
+ \$IP = MW_INSTALL_PATH;
+} else {
+ \$IP = dirname( __FILE__ );
+}
+
+\$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" );
+set_include_path( implode( PATH_SEPARATOR, \$path ) . PATH_SEPARATOR . get_include_path() );
+
+require_once( \"\$IP/includes/DefaultSettings.php\" );
+
+if ( \$wgCommandLineMode ) {
+ if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) {
+ die( \"This script must be run from the command line\\n\" );
+ }
+}
+## Uncomment this to disable output compression
+# \$wgDisableOutputCompression = true;
+
+\$wgSitename = \"{$slconf['Sitename']}\";
+
+## The URL base path to the directory containing the wiki;
+## defaults for all runtime URL paths are based off of this.
+## For more information on customizing the URLs please see:
+## http://www.mediawiki.org/wiki/Manual:Short_URL
+\$wgScriptPath = \"{$slconf['ScriptPath']}\";
+\$wgScriptExtension = \"{$slconf['ScriptExtension']}\";
+
+## The relative URL path to the skins directory
+\$wgStylePath = \"\$wgScriptPath/skins\";
+
+## The relative URL path to the logo. Make sure you change this from the default,
+## or else you'll overwrite your logo when you upgrade!
+\$wgLogo = \"\$wgStylePath/common/images/wiki.png\";
+
+## UPO means: this is also a user preference option
+
+\$wgEnableEmail = $enableemail;
+\$wgEnableUserEmail = $enableuseremail; # UPO
+
+\$wgEmergencyContact = \"{$slconf['EmergencyContact']}\";
+\$wgPasswordSender = \"{$slconf['PasswordSender']}\";
+
+\$wgEnotifUserTalk = $enotifusertalk; # UPO
+\$wgEnotifWatchlist = $enotifwatchlist; # UPO
+\$wgEmailAuthentication = $eauthent;
+
+## Database settings
+\$wgDBtype = \"{$slconf['DBtype']}\";
+\$wgDBserver = \"{$slconf['DBserver']}\";
+\$wgDBname = \"{$slconf['DBname']}\";
+\$wgDBuser = \"{$slconf['DBuser']}\";
+\$wgDBpassword = \"{$slconf['DBpassword']}\";
+
+{$dbsettings}
+
+## Shared memory settings
+\$wgMainCacheType = $cacheType;
+\$wgMemCachedServers = $mcservers;
+
+## To enable image uploads, make sure the 'images' directory
+## is writable, then set this to true:
+\$wgEnableUploads = false;
+{$magic}\$wgUseImageMagick = true;
+{$magic}\$wgImageMagickConvertCommand = \"{$convert}\";
+
+## If you use ImageMagick (or any other shell command) on a
+## Linux server, this will need to be set to the name of an
+## available UTF-8 locale
+{$locale}\$wgShellLocale = \"{$slconf['ShellLocale']}\";
+
+## If you want to use image uploads under safe mode,
+## create the directories images/archive, images/thumb and
+## images/temp, and make them all writable. Then uncomment
+## this, if it's not already uncommented:
+{$hashedUploads}\$wgHashedUploadDirectory = false;
+
+## If you have the appropriate support software installed
+## you can enable inline LaTeX equations:
+\$wgUseTeX = false;
+
+## Set \$wgCacheDirectory to a writable directory on the web server
+## to make your wiki go slightly faster. The directory should not
+## be publically accessible from the web.
+#\$wgCacheDirectory = \"\$IP/cache\";
+
+\$wgLocalInterwiki = strtolower( \$wgSitename );
+
+\$wgLanguageCode = \"{$slconf['LanguageCode']}\";
+
+\$wgSecretKey = \"$secretKey\";
+
+## Default skin: you can change the default skin. Use the internal symbolic
+## names, ie 'vector', 'monobook':
+\$wgDefaultSkin = 'monobook';
+
+## For attaching licensing metadata to pages, and displaying an
+## appropriate copyright notice / icon. GNU Free Documentation
+## License and Creative Commons licenses are supported so far.
+{$rights}\$wgEnableCreativeCommonsRdf = true;
+\$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright
+\$wgRightsUrl = \"{$slconf['RightsUrl']}\";
+\$wgRightsText = \"{$slconf['RightsText']}\";
+\$wgRightsIcon = \"{$slconf['RightsIcon']}\";
+# \$wgRightsCode = \"{$slconf['RightsCode']}\"; # Not yet used
+
+\$wgDiff3 = \"{$slconf['diff3']}\";
+
+# When you make changes to this configuration file, this will make
+# sure that cached pages are cleared.
+\$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
+"; ## End of setting the $localsettings string
+
+ // Keep things in Unix line endings internally;
+ // the system will write out as local text type.
+ return str_replace( "\r\n", "\n", $localsettings );
+}
+
+function dieout( $text ) {
+ global $mainListOpened;
+ if( $mainListOpened ) echo( "</ul>" );
+ if( $text != '' && substr( $text, 0, 2 ) != '<p' && substr( $text, 0, 2 ) != '<h' ){
+ echo "<p>$text</p>\n";
+ } else {
+ echo $text;
+ }
+ die( "\n\n</div>\n</div>\n</div>\n</div>\n</body>\n</html>" );
+}
+
+function importVar( &$var, $name, $default = "" ) {
+ if( isset( $var[$name] ) ) {
+ $retval = $var[$name];
+ if ( get_magic_quotes_gpc() ) {
+ $retval = stripslashes( $retval );
+ }
+ } else {
+ $retval = $default;
+ }
+ taint( $retval );
+ return $retval;
+}
+
+function importPost( $name, $default = "" ) {
+ return importVar( $_POST, $name, $default );
+}
+
+function importCheck( $name ) {
+ return isset( $_POST[$name] );
+}
+
+function importRequest( $name, $default = "" ) {
+ return importVar( $_REQUEST, $name, $default );
+}
+
+function aField( &$conf, $field, $text, $type = "text", $value = "", $onclick = '' ) {
+ static $radioCount = 0;
+ if( $type != "" ) {
+ $xtype = "type=\"$type\"";
+ } else {
+ $xtype = "";
+ }
+
+ $id = $field;
+ $nolabel = ($type == "radio") || ($type == "hidden");
+
+ if ($type == 'radio')
+ $id .= $radioCount++;
+
+ if( !$nolabel ) {
+ echo "<label class='column' for=\"$id\">$text</label>";
+ }
+
+ if( $type == "radio" && $value == $conf->$field ) {
+ $checked = "checked='checked'";
+ } else {
+ $checked = "";
+ }
+ echo "<input $xtype name=\"$field\" id=\"$id\" class=\"iput-$type\" $checked ";
+ if ($onclick) {
+ echo " onclick='toggleDBarea(\"$value\",1)' " ;
+ }
+ echo "value=\"";
+ if( $type == "radio" ) {
+ echo htmlspecialchars( $value );
+ } else {
+ echo htmlspecialchars( $conf->$field );
+ }
+
+
+ echo "\" />";
+ if( $nolabel ) {
+ echo "<label for=\"$id\">$text</label>";
+ }
+
+ global $errs;
+ if(isset($errs[$field])) {
+ echo "<span class='error'>" . htmlspecialchars( $errs[$field] ) . "</span>\n";
+ }
+}
+
+function getLanguageList() {
+ global $wgDummyLanguageCodes;
+
+ $codes = array();
+ foreach ( Language::getLanguageNames() as $code => $name ) {
+ if( in_array( $code, $wgDummyLanguageCodes ) ) continue;
+ $codes[$code] = $code . ' - ' . $name;
+ }
+ ksort( $codes );
+ return $codes;
+}
+
+#Check for location of an executable
+# @param string $loc single location to check
+# @param array $names filenames to check for.
+# @param mixed $versioninfo array of details to use when checking version, use false for no version checking
+function locate_executable($loc, $names, $versioninfo = false) {
+ if (!is_array($names))
+ $names = array($names);
+
+ foreach ($names as $name) {
+ $command = "$loc".DIRECTORY_SEPARATOR."$name";
+ if (@file_exists($command)) {
+ if (!$versioninfo)
+ return $command;
+
+ $file = str_replace('$1', $command, $versioninfo[0]);
+ if (strstr(`$file`, $versioninfo[1]) !== false)
+ return $command;
+ }
+ }
+ return false;
+}
+
+# Test a memcached server
+function testMemcachedServer( $server ) {
+ $hostport = explode(":", $server);
+ $errstr = false;
+ $fp = false;
+ if ( !function_exists( 'fsockopen' ) ) {
+ $errstr = "Can't connect to memcached, fsockopen() not present";
+ }
+ if ( !$errstr && count( $hostport ) != 2 ) {
+ $errstr = 'Please specify host and port';
+ }
+ if ( !$errstr ) {
+ list( $host, $port ) = $hostport;
+ $errno = 0;
+ $fsockerr = '';
+
+ $fp = @fsockopen( $host, $port, $errno, $fsockerr, 1.0 );
+ if ( $fp === false ) {
+ $errstr = "Cannot connect to memcached on $host:$port : $fsockerr";
+ }
+ }
+ if ( !$errstr ) {
+ $command = "version\r\n";
+ $bytes = fwrite( $fp, $command );
+ if ( $bytes != strlen( $command ) ) {
+ $errstr = "Cannot write to memcached socket on $host:$port";
+ }
+ }
+ if ( !$errstr ) {
+ $expected = "VERSION ";
+ $response = fread( $fp, strlen( $expected ) );
+ if ( $response != $expected ) {
+ $errstr = "Didn't get correct memcached response from $host:$port";
+ }
+ }
+ if ( $fp ) {
+ fclose( $fp );
+ }
+ if ( !$errstr ) {
+ echo "<li>Connected to memcached on " . htmlspecialchars( "$host:$port" ) ." successfully</li>";
+ }
+ return $errstr;
+}
+
+function database_picker($conf) {
+ global $ourdb;
+ print "\n";
+ foreach(array_keys($ourdb) as $db) {
+ if ($ourdb[$db]['havedriver']) {
+ print "\t<li>";
+ aField( $conf, "DBtype", $ourdb[$db]['fullname'], 'radio', $db, 'onclick');
+ print "</li>\n";
+ }
+ }
+ print "\n\t";
+}
+
+function database_switcher($db) {
+ global $ourdb;
+ $color = $ourdb[$db]['bgcolor'];
+ $full = $ourdb[$db]['fullname'];
+ print "<fieldset id='$db' style='clear:both'><legend>$full-specific options</legend>\n";
+}
+
+function printListItem( $item ) {
+ print "<li>$item</li>";
+}
+
+# Determine a suitable value for $wgShellLocale
+function getShellLocale( $wikiLang ) {
+ # Give up now if we're in safe mode or open_basedir
+ # It's theoretically possible but tricky to work with
+ if ( wfIniGetBool( "safe_mode" ) || ini_get( 'open_basedir' ) || !function_exists('exec') ) {
+ return false;
+ }
+
+ $os = php_uname( 's' );
+ $supported = array( 'Linux', 'SunOS', 'HP-UX' ); # Tested these
+ if ( !in_array( $os, $supported ) ) {
+ return false;
+ }
+
+ # Get a list of available locales
+ $lines = $ret = false;
+ exec( '/usr/bin/locale -a', $lines, $ret );
+ if ( $ret ) {
+ return false;
+ }
+
+ $lines = wfArrayMap( 'trim', $lines );
+ $candidatesByLocale = array();
+ $candidatesByLang = array();
+ foreach ( $lines as $line ) {
+ if ( $line === '' ) {
+ continue;
+ }
+ if ( !preg_match( '/^([a-zA-Z]+)(_[a-zA-Z]+|)\.(utf8|UTF-8)(@[a-zA-Z_]*|)$/i', $line, $m ) ) {
+ continue;
+ }
+ list( $all, $lang, $territory, $charset, $modifier ) = $m;
+ $candidatesByLocale[$m[0]] = $m;
+ $candidatesByLang[$lang][] = $m;
+ }
+
+ # Try the current value of LANG
+ if ( isset( $candidatesByLocale[ getenv( 'LANG' ) ] ) ) {
+ return getenv( 'LANG' );
+ }
+
+ # Try the most common ones
+ $commonLocales = array( 'en_US.UTF-8', 'en_US.utf8', 'de_DE.UTF-8', 'de_DE.utf8' );
+ foreach ( $commonLocales as $commonLocale ) {
+ if ( isset( $candidatesByLocale[$commonLocale] ) ) {
+ return $commonLocale;
+ }
+ }
+
+ # Is there an available locale in the Wiki's language?
+ if ( isset( $candidatesByLang[$wikiLang] ) ) {
+ $m = reset( $candidatesByLang[$wikiLang] );
+ return $m[0];
+ }
+
+ # Are there any at all?
+ if ( count( $candidatesByLocale ) ) {
+ $m = reset( $candidatesByLocale );
+ return $m[0];
+ }
+
+ # Give up
+ return false;
+}
+
+function wfArrayMap( $function, $input ) {
+ $ret = array_map( $function, $input );
+ foreach ( $ret as $key => $value ) {
+ $taint = istainted( $input[$key] );
+ if ( $taint ) {
+ taint( $ret[$key], $taint );
+ }
+ }
+ return $ret;
+}
+
+?>
+
+ <div class="license">
+ <hr/>
+ <p>This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.</p>
+
+ <p>This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.</p>
+
+ <p>You should have received <a href="../COPYING">a copy of the GNU General Public License</a>
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ or <a href="http://www.gnu.org/copyleft/gpl.html">read it online</a></p>
+ </div>
+
+</div></div></div>
+
+
+<div id="column-one">
+ <div class="portlet" id="p-logo">
+ <a style="background-image: url(../skins/common/images/mediawiki.png);"
+ href="../"
+ title="Main Page"></a>
+ </div>
+ <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
+ <div class='portlet'><div class='pBody'>
+ <ul>
+ <li><a href="../README">Readme</a></li>
+ <li><a href="../RELEASE-NOTES">Release notes</a></li>
+ <li><a href="../docs/">Documentation</a></li>
+ <li><a href="http://www.mediawiki.org/wiki/Help:Contents">User's Guide</a></li>
+ <li><a href="http://www.mediawiki.org/wiki/Manual:Contents">Administrator's Guide</a></li>
+ <li><a href="http://www.mediawiki.org/wiki/Manual:FAQ">FAQ</a></li>
+ </ul>
+ <p style="font-size:90%;margin-top:1em">MediaWiki is Copyright © 2001-2009 by Magnus Manske, Brion Vibber,
+ Lee Daniel Crocker, Tim Starling, Erik Möller, Gabriel Wicke, Ævar Arnfjörð Bjarmason, Niklas Laxström,
+ Domas Mituzas, Rob Church, Yuri Astrakhan, Aryeh Gregor, Aaron Schulz and others.</p>
+ </div></div>
+</div>
+
+</div>
+
+</body>
+</html>
diff --git a/config/index.php b/config/index.php
index 85fdb86f..d913bbb1 100644
--- a/config/index.php
+++ b/config/index.php
@@ -19,13 +19,6 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# http://www.gnu.org/copyleft/gpl.html
-error_reporting( E_ALL );
-header( "Content-type: text/html; charset=utf-8" );
-@ini_set( "display_errors", true );
-
-# In case of errors, let output be clean.
-$wgRequestTime = microtime( true );
-
# Attempt to set up the include path, to fix problems with relative includes
$IP = dirname( dirname( __FILE__ ) );
define( 'MW_INSTALL_PATH', $IP );
@@ -34,2177 +27,17 @@ define( 'MW_INSTALL_PATH', $IP );
define( "MEDIAWIKI", true );
define( "MEDIAWIKI_INSTALL", true );
-// Run version checks before including other files
-// so people don't see a scary parse error.
-require_once( "$IP/install-utils.inc" );
-install_version_checks();
-
-require_once( "$IP/includes/Defines.php" );
-require_once( "$IP/includes/DefaultSettings.php" );
-require_once( "$IP/includes/AutoLoader.php" );
-require_once( "$IP/includes/MagicWord.php" );
-require_once( "$IP/includes/Namespace.php" );
-require_once( "$IP/includes/ProfilerStub.php" );
-require_once( "$IP/includes/GlobalFunctions.php" );
-require_once( "$IP/includes/Hooks.php" );
-require_once( "$IP/includes/Exception.php" );
-
-# If we get an exception, the user needs to know
-# all the details
-$wgShowExceptionDetails = true;
-$wgShowSQLErrors = true;
-wfInstallExceptionHandler();
-## Databases we support:
-
-$ourdb = array();
-$ourdb['mysql']['fullname'] = 'MySQL';
-$ourdb['mysql']['havedriver'] = 0;
-$ourdb['mysql']['compile'] = 'mysql';
-$ourdb['mysql']['bgcolor'] = '#ffe5a7';
-$ourdb['mysql']['rootuser'] = 'root';
-
-$ourdb['postgres']['fullname'] = 'PostgreSQL';
-$ourdb['postgres']['havedriver'] = 0;
-$ourdb['postgres']['compile'] = 'pgsql';
-$ourdb['postgres']['bgcolor'] = '#aaccff';
-$ourdb['postgres']['rootuser'] = 'postgres';
-
-$ourdb['sqlite']['fullname'] = 'SQLite';
-$ourdb['sqlite']['havedriver'] = 0;
-$ourdb['sqlite']['compile'] = 'pdo_sqlite';
-$ourdb['sqlite']['bgcolor'] = '#b1ebb1';
-$ourdb['sqlite']['rootuser'] = '';
-
-$ourdb['mssql']['fullname'] = 'MSSQL';
-$ourdb['mssql']['havedriver'] = 0;
-$ourdb['mssql']['compile'] = 'mssql not ready'; # Change to 'mssql' after includes/DatabaseMssql.php added;
-$ourdb['mssql']['bgcolor'] = '#ffc0cb';
-$ourdb['mssql']['rootuser'] = 'administrator';
-
-$ourdb['ibm_db2']['fullname'] = 'DB2';
-$ourdb['ibm_db2']['havedriver'] = 0;
-$ourdb['ibm_db2']['compile'] = 'ibm_db2';
-$ourdb['ibm_db2']['bgcolor'] = '#ffeba1';
-$ourdb['ibm_db2']['rootuser'] = 'db2admin';
-
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
-<head>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- <meta name="robots" content="noindex,nofollow"/>
- <title>MediaWiki <?php echo htmlspecialchars( $wgVersion ); ?> Installation</title>
- <style type="text/css">
-
- @import "../skins/monobook/main.css";
-
- .env-check {
- font-size: 90%;
- margin: 1em 0 1em 2.5em;
- }
-
- .config-section {
- margin-top: 2em;
- }
-
- .config-section label.column {
- clear: left;
- font-weight: bold;
- width: 13em;
- float: left;
- text-align: right;
- padding-right: 1em;
- padding-top: .2em;
- }
-
- .config-input {
- clear: left;
- zoom: 100%; /* IE hack */
- }
-
- .config-section .config-desc {
- clear: left;
- margin: 0 0 2em 18em;
- padding-top: 1em;
- font-size: 85%;
- }
-
- .iput-text, .iput-password {
- width: 14em;
- margin-right: 1em;
- }
-
- .error {
- color: red;
- background-color: #fff;
- font-weight: bold;
- left: 1em;
- font-size: 100%;
- }
-
- .error-top {
- color: red;
- background-color: #FFF0F0;
- border: 2px solid red;
- font-size: 130%;
- font-weight: bold;
- padding: 1em 1.5em;
- margin: 2em 0 1em;
- }
-
- ul.plain {
- list-style-type: none;
- list-style-image: none;
- float: left;
- margin: 0;
- padding: 0;
- }
-
- .btn-install {
- font-weight: bold;
- font-size: 110%;
- padding: .2em .3em;
- }
-
- .license {
- font-size: 85%;
- padding-top: 3em;
- }
-
- span.success-message {
- font-weight: bold;
- font-size: 110%;
- color: green;
- }
- .success-box {
- font-size: 130%;
- }
-
- </style>
- <script type="text/javascript">
- <!--
- function hideall() {
- <?php foreach (array_keys($ourdb) as $db) {
- echo "\n var i = document.getElementById('$db'); if (i) i.style.display='none';";
- }
- ?>
-
- }
- function toggleDBarea(id,defaultroot) {
- hideall();
- var dbarea = document.getElementById(id);
- if (dbarea) dbarea.style.display = (dbarea.style.display == 'none') ? 'block' : 'none';
- var db = document.getElementById('RootUser');
- if (defaultroot) {
-<?php foreach (array_keys($ourdb) as $db) {
- echo " if (id == '$db') { db.value = '".$ourdb[$db]['rootuser']."';}\n";
-}?>
- }
- }
- // -->
- </script>
-</head>
-
-<body>
-<div id="globalWrapper">
-<div id="column-content">
-<div id="content">
-<div id="bodyContent">
-
-<h1>MediaWiki <?php print htmlspecialchars( $wgVersion ) ?> Installation</h1>
-
-<?php
-$mainListOpened = false; # Is the main list (environement checking) opend ? Used by dieout
-
-/* Check for existing configurations and bug out! */
-
-if( file_exists( "../LocalSettings.php" ) ) {
- $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
- dieout( "<p><strong>Setup has completed, <a href='../$script'>your wiki</a> is configured.</strong></p>
- <p>Please delete the /config directory for extra security.</p>" );
-}
-
-if( file_exists( "./LocalSettings.php" ) ) {
- writeSuccessMessage();
- dieout( '' );
-}
-
-if( !is_writable( "." ) ) {
- dieout( "<h2>Can't write config file, aborting</h2>
-
- <p>In order to configure the wiki you have to make the <tt>config</tt> subdirectory
- writable by the web server. Once configuration is done you'll move the created
- <tt>LocalSettings.php</tt> to the parent directory, and for added safety you can
- then remove the <tt>config</tt> subdirectory entirely.</p>
-
- <p>To make the directory writable on a Unix/Linux system:</p>
-
- <pre>
- cd <i>/path/to/wiki</i>
- chmod a+w config
- </pre>
-
- <p>Afterwards retry to start the <a href=\"\">setup</a>.</p>" );
-}
-
-
-require_once( "$IP/install-utils.inc" );
-require_once( "$IP/maintenance/updaters.inc" );
-
-class ConfigData {
- function getEncoded( $data ) {
- # removing latin1 support, no need...
- return $data;
- }
- function getSitename() { return $this->getEncoded( $this->Sitename ); }
- function getSysopName() { return $this->getEncoded( $this->SysopName ); }
- function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
-
- function setSchema( $schema, $engine ) {
- $this->DBschema = $schema;
- if ( !preg_match( '/^\w*$/', $engine ) ){
- $engine = 'InnoDB';
- }
- switch ( $this->DBschema ) {
- case 'mysql5':
- $this->DBTableOptions = "ENGINE=$engine, DEFAULT CHARSET=utf8";
- $this->DBmysql5 = 'true';
- break;
- case 'mysql5-binary':
- $this->DBTableOptions = "ENGINE=$engine, DEFAULT CHARSET=binary";
- $this->DBmysql5 = 'true';
- break;
- default:
- $this->DBTableOptions = "TYPE=$engine";
- $this->DBmysql5 = 'false';
- }
- $this->DBengine = $engine;
-
- # Set the global for use during install
- global $wgDBTableOptions;
- $wgDBTableOptions = $this->DBTableOptions;
- }
-}
-
-?>
-
-<ul>
- <li>
- <b>Don't forget security updates!</b> Keep an eye on the
- <a href="http://lists.wikimedia.org/mailman/listinfo/mediawiki-announce">low-traffic
- release announcements mailing list</a>.
- </li>
-</ul>
-
-
-<h2>Checking environment...</h2>
-<p><em>Please include all of the lines below when reporting installation problems.</em></p>
-<ul class="env-check">
-<?php
-$mainListOpened = true;
-
-$endl = "
-";
-define( 'MW_NO_OUTPUT_BUFFER', 1 );
-$conf = new ConfigData;
-
-install_version_checks();
-$self = 'Installer'; # Maintenance script name, to please Setup.php
-
-print "<li>PHP " . htmlspecialchars( phpversion() ) . " installed</li>\n";
-
-error_reporting( 0 );
-$phpdatabases = array();
-foreach (array_keys($ourdb) as $db) {
- $compname = $ourdb[$db]['compile'];
- if( extension_loaded( $compname ) || ( mw_have_dl() && dl( "{$compname}." . PHP_SHLIB_SUFFIX ) ) ) {
- array_push($phpdatabases, $db);
- $ourdb[$db]['havedriver'] = 1;
- }
-}
-error_reporting( E_ALL );
-
-if (!$phpdatabases) {
- print "Could not find a suitable database driver!<ul>";
- foreach (array_keys($ourdb) AS $db) {
- $comp = $ourdb[$db]['compile'];
- $full = $ourdb[$db]['fullname'];
- print "<li>For <b>$full</b>, compile PHP using <b>--with-$comp</b>, "
- ."or install the $comp.so module</li>\n";
- }
- echo '</ul>';
- dieout( '' );
-}
-
-print "<li>Found database drivers for:";
-$DefaultDBtype = '';
-foreach (array_keys($ourdb) AS $db) {
- if ($ourdb[$db]['havedriver']) {
- if ( $DefaultDBtype == '' ) {
- $DefaultDBtype = $db;
- }
- print " ".$ourdb[$db]['fullname'];
- }
-}
-print "</li>\n";
-
-if( wfIniGetBool( "register_globals" ) ) {
- ?>
- <li>
- <div style="font-size:110%">
- <strong class="error">Warning:</strong>
- <strong>PHP's <tt><a href="http://php.net/register_globals">register_globals</a></tt> option is enabled. Disable it if you can.</strong>
- </div>
- MediaWiki will work, but your server is more exposed to PHP-based security vulnerabilities.
- </li>
- <?php
-}
-
-$fatal = false;
-
-if( wfIniGetBool( "magic_quotes_runtime" ) ) {
- $fatal = true;
- ?><li class='error'><strong>Fatal: <a href='http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime'>magic_quotes_runtime</a> is active!</strong>
- This option corrupts data input unpredictably; you cannot install or use
- MediaWiki unless this option is disabled.</li>
- <?php
-}
-
-if( wfIniGetBool( "magic_quotes_sybase" ) ) {
- $fatal = true;
- ?><li class='error'><strong>Fatal: <a href='http://www.php.net/manual/en/ref.sybase.php#ini.magic-quotes-sybase'>magic_quotes_sybase</a> is active!</strong>
- This option corrupts data input unpredictably; you cannot install or use
- MediaWiki unless this option is disabled.</li>
- <?php
-}
-
-if( wfIniGetBool( "mbstring.func_overload" ) ) {
- $fatal = true;
- ?><li class='error'><strong>Fatal: <a href='http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload'>mbstring.func_overload</a> is active!</strong>
- This option causes errors and may corrupt data unpredictably;
- you cannot install or use MediaWiki unless this option is disabled.</li>
- <?php
-}
-
-if( wfIniGetBool( "zend.ze1_compatibility_mode" ) ) {
- $fatal = true;
- ?><li class="error"><strong>Fatal: <a href="http://www.php.net/manual/en/ini.core.php">zend.ze1_compatibility_mode</a> is active!</strong>
- This option causes horrible bugs with MediaWiki; you cannot install or use
- MediaWiki unless this option is disabled.</li>
- <?php
-}
-
-
-if( $fatal ) {
- dieout( "Cannot install MediaWiki." );
-}
-
-if( wfIniGetBool( "safe_mode" ) ) {
- $conf->safeMode = true;
- ?>
- <li><b class='error'>Warning:</b> <strong>PHP's
- <a href='http://www.php.net/features.safe-mode'>safe mode</a> is active.</strong>
- You may have problems caused by this, particularly if using image uploads.
- </li>
- <?php
-} else {
- $conf->safeMode = false;
-}
-
-$sapi = htmlspecialchars( php_sapi_name() );
-print "<li>PHP server API is $sapi; ";
-$script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
-if( $wgUsePathInfo ) {
- print "ok, using pretty URLs (<tt>$script/Page_Title</tt>)";
-} else {
- print "using ugly URLs (<tt>$script?title=Page_Title</tt>)";
-}
-print "</li>\n";
-
-$conf->xml = function_exists( "utf8_encode" );
-if( $conf->xml ) {
- print "<li>Have XML / Latin1-UTF-8 conversion support.</li>\n";
-} else {
- dieout( "PHP's XML module is missing; the wiki requires functions in
- this module and won't work in this configuration.
- If you're running Mandrake, install the php-xml package." );
+# Check for PHP 5
+if ( !function_exists( 'version_compare' )
+ || version_compare( phpversion(), '5.0.0' ) < 0
+) {
+ define( 'MW_PHP4', '1' );
+ require( "$IP/includes/DefaultSettings.php" );
+ require( "$IP/includes/templates/PHP4.php" );
+ exit;
}
-# Check for session support
-if( !function_exists( 'session_name' ) )
- dieout( "PHP's session module is missing. MediaWiki requires session support in order to function." );
-
-# session.save_path doesn't *have* to be set, but if it is, and it's
-# not valid/writable/etc. then it can cause problems
-$sessionSavePath = mw_get_session_save_path();
-$ssp = htmlspecialchars( $sessionSavePath );
-# Warn the user if it's not set, but let them proceed
-if( !$sessionSavePath ) {
- print "<li><strong>Warning:</strong> A value for <tt>session.save_path</tt>
- has not been set in PHP.ini. If the default value causes problems with
- saving session data, set it to a valid path which is read/write/execute
- for the user your web server is running under.</li>";
-} elseif ( is_dir( $sessionSavePath ) && is_writable( $sessionSavePath ) ) {
- # All good? Let the user know
- print "<li>Session save path (<tt>{$ssp}</tt>) appears to be valid.</li>";
-} else {
- # Something not right? Warn the user, but let them proceed
- print "<li><strong>Warning:</strong> Your <tt>session.save_path</tt> value (<tt>{$ssp}</tt>)
- appears to be invalid or is not writable. PHP needs to be able to save data to
- this location for correct session operation.</li>";
-}
-
-# Check for PCRE support
-if( !function_exists( 'preg_match' ) )
- dieout( "The PCRE support module appears to be missing. MediaWiki requires the
- Perl-compatible regular expression functions." );
-
-$memlimit = ini_get( "memory_limit" );
-$conf->raiseMemory = false;
-if( empty( $memlimit ) || $memlimit == -1 ) {
- print "<li>PHP is configured with no <tt>memory_limit</tt>.</li>\n";
-} else {
- print "<li>PHP's <tt>memory_limit</tt> is " . htmlspecialchars( $memlimit ) . ". ";
- $n = intval( $memlimit );
- if( preg_match( '/^([0-9]+)[Mm]$/', trim( $memlimit ), $m ) ) {
- $n = intval( $m[1] * (1024*1024) );
- }
- if( $n < 20*1024*1024 ) {
- print "Attempting to raise limit to 20M... ";
- if( false === ini_set( "memory_limit", "20M" ) ) {
- print "failed.<br /><b>" . htmlspecialchars( $memlimit ) . " seems too low, installation may fail!</b>";
- } else {
- $conf->raiseMemory = true;
- print "ok.";
- }
- }
- print "</li>\n";
-}
-
-$conf->turck = function_exists( 'mmcache_get' );
-if ( $conf->turck ) {
- print "<li><a href=\"http://turck-mmcache.sourceforge.net/\">Turck MMCache</a> installed</li>\n";
-}
-
-$conf->xcache = function_exists( 'xcache_get' );
-if( $conf->xcache )
- print "<li><a href=\"http://trac.lighttpd.net/xcache/\">XCache</a> installed</li>\n";
-
-$conf->apc = function_exists('apc_fetch');
-if ($conf->apc ) {
- print "<li><a href=\"http://www.php.net/apc\">APC</a> installed</li>\n";
-}
-
-$conf->eaccel = function_exists( 'eaccelerator_get' );
-if ( $conf->eaccel ) {
- $conf->turck = 'eaccelerator';
- print "<li><a href=\"http://eaccelerator.sourceforge.net/\">eAccelerator</a> installed</li>\n";
-}
-
-$conf->dba = function_exists( 'dba_open' );
-
-if( !( $conf->turck || $conf->eaccel || $conf->apc || $conf->xcache ) ) {
- echo( '<li>Couldn\'t find <a href="http://turck-mmcache.sourceforge.net">Turck MMCache</a>,
- <a href="http://eaccelerator.sourceforge.net">eAccelerator</a>,
- <a href="http://www.php.net/apc">APC</a> or <a href="http://trac.lighttpd.net/xcache/">XCache</a>;
- cannot use these for object caching.</li>' );
-}
-
-$conf->diff3 = false;
-$diff3locations = array_merge(
- array(
- "/usr/bin",
- "/usr/local/bin",
- "/opt/csw/bin",
- "/usr/gnu/bin",
- "/usr/sfw/bin" ),
- explode( PATH_SEPARATOR, getenv( "PATH" ) ) );
-$diff3names = array( "gdiff3", "diff3", "diff3.exe" );
-
-$diff3versioninfo = array( '$1 --version 2>&1', 'diff3 (GNU diffutils)' );
-foreach ($diff3locations as $loc) {
- $exe = locate_executable($loc, $diff3names, $diff3versioninfo);
- if ($exe !== false) {
- $conf->diff3 = $exe;
- break;
- }
-}
-
-if ($conf->diff3)
- print "<li>Found GNU diff3: <tt>$conf->diff3</tt>.</li>";
-else
- print "<li>GNU diff3 not found.</li>";
-
-$conf->ImageMagick = false;
-$imcheck = array( "/usr/bin", "/opt/csw/bin", "/usr/local/bin", "/sw/bin", "/opt/local/bin" );
-foreach( $imcheck as $dir ) {
- $im = "$dir/convert";
- if( @file_exists( $im ) ) {
- print "<li>Found ImageMagick: <tt>$im</tt>; image thumbnailing will be enabled if you enable uploads.</li>\n";
- $conf->ImageMagick = $im;
- break;
- }
-}
-
-$conf->HaveGD = function_exists( "imagejpeg" );
-if( $conf->HaveGD ) {
- print "<li>Found GD graphics library built-in";
- if( !$conf->ImageMagick ) {
- print ", image thumbnailing will be enabled if you enable uploads";
- }
- print ".</li>\n";
-} else {
- if( !$conf->ImageMagick ) {
- print "<li>Couldn't find GD library or ImageMagick; image thumbnailing disabled.</li>\n";
- }
-}
-
-$conf->IP = dirname( dirname( __FILE__ ) );
-print "<li>Installation directory: <tt>" . htmlspecialchars( $conf->IP ) . "</tt></li>\n";
-
-
-// PHP_SELF isn't available sometimes, such as when PHP is CGI but
-// cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME
-// to get the path to the current script... hopefully it's reliable. SIGH
-$path = ($_SERVER["PHP_SELF"] === '')
- ? $_SERVER["SCRIPT_NAME"]
- : $_SERVER["PHP_SELF"];
-
-$conf->ScriptPath = preg_replace( '{^(.*)/config.*$}', '$1', $path );
-print "<li>Script URI path: <tt>" . htmlspecialchars( $conf->ScriptPath ) . "</tt></li>\n";
-
-
-
-// We may be installing from *.php5 extension file, if so, print message
-$conf->ScriptExtension = '.php';
-if (defined('MW_INSTALL_PHP5_EXT')) {
- $conf->ScriptExtension = '.php5';
- print "<li>Installing MediaWiki with <tt>php5</tt> file extensions</li>\n";
-} else {
- print "<li>Installing MediaWiki with <tt>php</tt> file extensions</li>\n";
-}
-
-
-print "<li style='font-weight:bold;color:green;font-size:110%'>Environment checked. You can install MediaWiki.</li>\n";
- $conf->posted = ($_SERVER["REQUEST_METHOD"] == "POST");
-
- $conf->Sitename = ucfirst( importPost( "Sitename", "" ) );
- $defaultEmail = empty( $_SERVER["SERVER_ADMIN"] )
- ? 'root@localhost'
- : $_SERVER["SERVER_ADMIN"];
- $conf->EmergencyContact = importPost( "EmergencyContact", $defaultEmail );
- $conf->DBtype = importPost( "DBtype", $DefaultDBtype );
- if ( !isset( $ourdb[$conf->DBtype] ) ) {
- $conf->DBtype = $DefaultDBtype;
- }
-
- $conf->DBserver = importPost( "DBserver", "localhost" );
- $conf->DBname = importPost( "DBname", "wikidb" );
- $conf->DBuser = importPost( "DBuser", "wikiuser" );
- $conf->DBpassword = importPost( "DBpassword" );
- $conf->DBpassword2 = importPost( "DBpassword2" );
- $conf->SysopName = importPost( "SysopName", "WikiSysop" );
- $conf->SysopPass = importPost( "SysopPass" );
- $conf->SysopPass2 = importPost( "SysopPass2" );
- $conf->RootUser = importPost( "RootUser", "root" );
- $conf->RootPW = importPost( "RootPW", "" );
- $useRoot = importCheck( 'useroot', false );
- $conf->LanguageCode = importPost( "LanguageCode", "en" );
- ## MySQL specific:
- $conf->DBprefix = importPost( "DBprefix" );
- $conf->setSchema(
- importPost( "DBschema", "mysql5-binary" ),
- importPost( "DBengine", "InnoDB" ) );
-
- ## Postgres specific:
- $conf->DBport = importPost( "DBport", "5432" );
- $conf->DBmwschema = importPost( "DBmwschema", "mediawiki" );
- $conf->DBts2schema = importPost( "DBts2schema", "public" );
-
- ## SQLite specific
- $conf->SQLiteDataDir = importPost( "SQLiteDataDir", "" );
-
- ## MSSQL specific
- // We need a second field so it doesn't overwrite the MySQL one
- $conf->DBprefix2 = importPost( "DBprefix2" );
-
- ## DB2 specific:
- // New variable in order to have a different default port number
- $conf->DBport_db2 = importPost( "DBport_db2", "50000" );
- $conf->DBmwschema = importPost( "DBmwschema", "mediawiki" );
- $conf->DBcataloged = importPost( "DBcataloged", "cataloged" );
-
- $conf->ShellLocale = getShellLocale( $conf->LanguageCode );
-
-/* Check for validity */
-$errs = array();
-
-if( preg_match( '/^$|^mediawiki$|#/i', $conf->Sitename ) ) {
- $errs["Sitename"] = "Must not be blank or \"MediaWiki\" and may not contain \"#\"";
-}
-if( $conf->DBuser == "" ) {
- $errs["DBuser"] = "Must not be blank";
-}
-if( ($conf->DBtype == 'mysql') && (strlen($conf->DBuser) > 16) ) {
- $errs["DBuser"] = "Username too long";
-}
-if( $conf->DBpassword == "" && $conf->DBtype != "postgres" ) {
- $errs["DBpassword"] = "Must not be blank";
-}
-if( $conf->DBpassword != $conf->DBpassword2 ) {
- $errs["DBpassword2"] = "Passwords don't match!";
-}
-if( !preg_match( '/^[A-Za-z_0-9]*$/', $conf->DBprefix ) ) {
- $errs["DBprefix"] = "Invalid table prefix";
-} else {
- untaint( $conf->DBprefix, TC_MYSQL );
-}
-
-error_reporting( E_ALL );
-
-/**
- * Initialise $wgLang and $wgContLang to something so we can
- * call case-folding methods. Per Brion, this is English for
- * now, although we could be clever and initialise to the
- * user-selected language.
- */
-$wgContLang = Language::factory( 'en' );
-$wgLang = $wgContLang;
-
-/**
- * We're messing about with users, so we need a stub
- * authentication plugin...
- */
-$wgAuth = new AuthPlugin();
-
-/**
- * Validate the initial administrator account; username,
- * password checks, etc.
- */
-if( $conf->SysopName ) {
- # Check that the user can be created
- $u = User::newFromName( $conf->SysopName );
- if( is_a($u, 'User') ) { // please do not use instanceof, it breaks PHP4
- # Various password checks
- if( $conf->SysopPass != '' ) {
- if( $conf->SysopPass == $conf->SysopPass2 ) {
- if( !$u->isValidPassword( $conf->SysopPass ) ) {
- $errs['SysopPass'] = "Bad password";
- }
- } else {
- $errs['SysopPass2'] = "Passwords don't match";
- }
- } else {
- $errs['SysopPass'] = "Cannot be blank";
- }
- unset( $u );
- } else {
- $errs['SysopName'] = "Bad username";
- }
-}
-
-$conf->License = importRequest( "License", "none" );
-if( $conf->License == "gfdl1_2" ) {
- $conf->RightsUrl = "http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt";
- $conf->RightsText = "GNU Free Documentation License 1.2";
- $conf->RightsCode = "gfdl1_2";
- $conf->RightsIcon = '${wgScriptPath}/skins/common/images/gnu-fdl.png';
-} elseif( $conf->License == "gfdl1_3" ) {
- $conf->RightsUrl = "http://www.gnu.org/copyleft/fdl.html";
- $conf->RightsText = "GNU Free Documentation License 1.3";
- $conf->RightsCode = "gfdl1_3";
- $conf->RightsIcon = '${wgScriptPath}/skins/common/images/gnu-fdl.png';
-} elseif( $conf->License == "none" ) {
- $conf->RightsUrl = $conf->RightsText = $conf->RightsCode = $conf->RightsIcon = "";
-} elseif( $conf->License == "pd" ) {
- $conf->RightsUrl = "http://creativecommons.org/licenses/publicdomain/";
- $conf->RightsText = "Public Domain";
- $conf->RightsCode = "pd";
- $conf->RightsIcon = '${wgScriptPath}/skins/common/images/public-domain.png';
-} else {
- $conf->RightsUrl = importRequest( "RightsUrl", "" );
- $conf->RightsText = importRequest( "RightsText", "" );
- $conf->RightsCode = importRequest( "RightsCode", "" );
- $conf->RightsIcon = importRequest( "RightsIcon", "" );
-}
-
-$conf->Shm = importRequest( "Shm", "none" );
-$conf->MCServers = importRequest( "MCServers" );
-
-/* Test memcached servers */
-
-if ( $conf->Shm == 'memcached' && $conf->MCServers ) {
- $conf->MCServerArray = wfArrayMap( 'trim', explode( ',', $conf->MCServers ) );
- foreach ( $conf->MCServerArray as $server ) {
- $error = testMemcachedServer( $server );
- if ( $error ) {
- $errs["MCServers"] = $error;
- break;
- }
- }
-} else if ( $conf->Shm == 'memcached' ) {
- $errs["MCServers"] = "Please specify at least one server if you wish to use memcached";
-}
-
-/* default values for installation */
-$conf->Email = importRequest("Email", "email_enabled");
-$conf->Emailuser = importRequest("Emailuser", "emailuser_enabled");
-$conf->Enotif = importRequest("Enotif", "enotif_allpages");
-$conf->Eauthent = importRequest("Eauthent", "eauthent_enabled");
-
-if( $conf->posted && ( 0 == count( $errs ) ) ) {
- do { /* So we can 'continue' to end prematurely */
- $conf->Root = ($conf->RootPW != "");
-
- /* Load up the settings and get installin' */
- $local = writeLocalSettings( $conf );
- echo "<li style=\"list-style: none\">\n";
- echo "<p><b>Generating configuration file...</b></p>\n";
- echo "</li>\n";
-
- $wgCommandLineMode = false;
- chdir( ".." );
- $ok = eval( $local );
- if( $ok === false ) {
- dieout( "<p>Errors in generated configuration; " .
- "most likely due to a bug in the installer... " .
- "Config file was: </p>" .
- "<pre>" .
- htmlspecialchars( $local ) .
- "</pre>" );
- }
- $conf->DBtypename = '';
- foreach (array_keys($ourdb) as $db) {
- if ($conf->DBtype === $db)
- $conf->DBtypename = $ourdb[$db]['fullname'];
- }
- if ( ! strlen($conf->DBtype)) {
- $errs["DBpicktype"] = "Please choose a database type";
- continue;
- }
-
- if (! $conf->DBtypename) {
- $errs["DBtype"] = "Unknown database type '$conf->DBtype'";
- continue;
- }
- print "<li>Database type: " . htmlspecialchars( $conf->DBtypename ) . "</li>\n";
- $dbclass = 'Database'.ucfirst($conf->DBtype);
- $wgDBtype = $conf->DBtype;
- $wgDBadminuser = "root";
- $wgDBadminpassword = $conf->RootPW;
-
- ## Mysql specific:
- $wgDBprefix = $conf->DBprefix;
-
- ## Postgres specific:
- $wgDBport = $conf->DBport;
- $wgDBmwschema = $conf->DBmwschema;
- $wgDBts2schema = $conf->DBts2schema;
-
- if( $conf->DBprefix2 != '' ) {
- // For MSSQL
- $wgDBprefix = $conf->DBprefix2;
- }
-
- ## DB2 specific:
- $wgDBcataloged = $conf->DBcataloged;
-
- $wgCommandLineMode = true;
- if (! defined ( 'STDERR' ) )
- define( 'STDERR', fopen("php://stderr", "wb"));
- $wgUseDatabaseMessages = false; /* FIXME: For database failure */
- require_once( "$IP/includes/Setup.php" );
- chdir( "config" );
-
- $wgTitle = Title::newFromText( "Installation script" );
- error_reporting( E_ALL );
- print "<li>Loading class: " . htmlspecialchars( $dbclass ) . "</li>\n";
- if ( $conf->DBtype != 'sqlite' ) {
- $dbc = new $dbclass;
- }
-
- if( $conf->DBtype == 'mysql' ) {
- $mysqlOldClient = version_compare( mysql_get_client_info(), "4.1.0", "lt" );
- if( $mysqlOldClient ) {
- print "<li><b>PHP is linked with old MySQL client libraries. If you are
- using a MySQL 4.1 server and have problems connecting to the database,
- see <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
- >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b></li>\n";
- }
- $ok = true; # Let's be optimistic
-
- # Decide if we're going to use the superuser or the regular database user
- $conf->Root = $useRoot;
- if( $conf->Root ) {
- $db_user = $conf->RootUser;
- $db_pass = $conf->RootPW;
- } else {
- $db_user = $wgDBuser;
- $db_pass = $wgDBpassword;
- }
-
- # Attempt to connect
- echo( "<li>Attempting to connect to database server as " . htmlspecialchars( $db_user ) . "..." );
- $wgDatabase = Database::newFromParams( $wgDBserver, $db_user, $db_pass, '', 1 );
-
- # Check the connection and respond to errors
- if( $wgDatabase->isOpen() ) {
- # Seems OK
- $ok = true;
- $wgDBadminuser = $db_user;
- $wgDBadminpassword = $db_pass;
- echo( "success.</li>\n" );
- $wgDatabase->ignoreErrors( true );
- $myver = $wgDatabase->getServerVersion();
- } else {
- # There were errors, report them and back out
- $ok = false;
- $errno = mysql_errno();
- $errtx = htmlspecialchars( mysql_error() );
- switch( $errno ) {
- case 1045:
- case 2000:
- echo( "failed due to authentication errors. Check passwords.</li>" );
- if( $conf->Root ) {
- # The superuser details are wrong
- $errs["RootUser"] = "Check username";
- $errs["RootPW"] = "and password";
- } else {
- # The regular user details are wrong
- $errs["DBuser"] = "Check username";
- $errs["DBpassword"] = "and password";
- }
- break;
- case 2002:
- case 2003:
- default:
- # General connection problem
- echo( htmlspecialchars( "failed with error [$errno] $errtx." ) . "</li>\n" );
- $errs["DBserver"] = "Connection failed";
- break;
- } # switch
- } #conn. att.
-
- if( !$ok ) { continue; }
- }
- else if( $conf->DBtype == 'ibm_db2' ) {
- if( $useRoot ) {
- $db_user = $conf->RootUser;
- $db_pass = $conf->RootPW;
- } else {
- $db_user = $wgDBuser;
- $db_pass = $wgDBpassword;
- }
-
- echo( "<li>Attempting to connect to database \"" . htmlspecialchars( $wgDBname ) .
- "\" as \"" . htmlspecialchars( $db_user ) . "\"..." );
- $wgDatabase = $dbc->newFromParams($wgDBserver, $db_user, $db_pass, $wgDBname, 1);
- if (!$wgDatabase->isOpen()) {
- print " error: " . htmlspecialchars( $wgDatabase->lastError() ) . "</li>\n";
- } else {
- $myver = $wgDatabase->getServerVersion();
- }
- if (is_callable(array($wgDatabase, 'initial_setup'))) $wgDatabase->initial_setup('', $wgDBname);
-
- } elseif ( $conf->DBtype == 'sqlite' ) {
- if ("$wgSQLiteDataDir" == '') {
- $wgSQLiteDataDir = dirname($_SERVER['DOCUMENT_ROOT']).'/data';
- }
- echo "<li>Attempting to connect to SQLite database at \"" .
- htmlspecialchars( $wgSQLiteDataDir ) . "\"";
- if ( !is_dir( $wgSQLiteDataDir ) ) {
- if ( is_writable( dirname( $wgSQLiteDataDir ) ) ) {
- $ok = wfMkdirParents( $wgSQLiteDataDir, $wgSQLiteDataDirMode );
- } else {
- $ok = false;
- }
- if ( !$ok ) {
- echo ": cannot create data directory</li>";
- $errs['SQLiteDataDir'] = 'Enter a valid data directory';
- continue;
- }
- }
- if ( !is_writable( $wgSQLiteDataDir ) ) {
- echo ": data directory not writable</li>";
- $errs['SQLiteDataDir'] = 'Enter a writable data directory';
- continue;
- }
- $dataFile = "$wgSQLiteDataDir/$wgDBname.sqlite";
- if ( file_exists( $dataFile ) && !is_writable( $dataFile ) ) {
- echo ": data file not writable</li>";
- $errs['SQLiteDataDir'] = "$wgDBname.sqlite is not writable";
- continue;
- }
- $wgDatabase = new DatabaseSqlite( false, false, false, $wgDBname, 1 );
- if (!$wgDatabase->isOpen()) {
- print ": error: " . htmlspecialchars( $wgDatabase->lastError() ) . "</li>\n";
- $errs['SQLiteDataDir'] = 'Could not connect to database';
- continue;
- } else {
- $myver = $wgDatabase->getServerVersion();
- }
- if (is_callable(array($wgDatabase, 'initial_setup'))) $wgDatabase->initial_setup('', $wgDBname);
- echo "ok</li>\n";
- } else { # not mysql
- error_reporting( E_ALL );
- $wgSuperUser = '';
- ## Possible connect as a superuser
- // Changed !mysql to postgres check since it seems to only apply to postgres
- if( $useRoot && $conf->DBtype == 'postgres' ) {
- $wgDBsuperuser = $conf->RootUser;
- echo( "<li>Attempting to connect to database \"postgres\" as superuser \"" .
- htmlspecialchars( $wgDBsuperuser ) . "\"..." );
- $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBsuperuser, $conf->RootPW, "postgres", 1);
- if (!$wgDatabase->isOpen()) {
- print " error: " . htmlspecialchars( $wgDatabase->lastError() ) . "</li>\n";
- $errs["DBserver"] = "Could not connect to database as superuser";
- $errs["RootUser"] = "Check username";
- $errs["RootPW"] = "and password";
- continue;
- }
- $wgDatabase->initial_setup($conf->RootPW, 'postgres');
- }
- echo( "<li>Attempting to connect to database \"" . htmlspecialchars( $wgDBname ) .
- "\" as \"" . htmlspecialchars( $wgDBuser ) . "\"..." );
- $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1);
- if (!$wgDatabase->isOpen()) {
- print " error: " . htmlspecialchars( $wgDatabase->lastError() ) . "</li>\n";
- } else {
- $myver = $wgDatabase->getServerVersion();
- }
- if (is_callable(array($wgDatabase, 'initial_setup'))) $wgDatabase->initial_setup('', $wgDBname);
- }
-
- if ( !$wgDatabase->isOpen() ) {
- $errs["DBserver"] = "Couldn't connect to database";
- continue;
- }
-
- print "<li>Connected to " . htmlspecialchars( "{$conf->DBtype} $myver" );
- if ($conf->DBtype == 'mysql') {
- if( version_compare( $myver, "4.0.14" ) < 0 ) {
- print "</li>\n";
- dieout( "-- mysql 4.0.14 or later required. Aborting." );
- }
- $mysqlNewAuth = version_compare( $myver, "4.1.0", "ge" );
- if( $mysqlNewAuth && $mysqlOldClient ) {
- print "; <b class='error'>You are using MySQL 4.1 server, but PHP is linked
- to old client libraries; if you have trouble with authentication, see
- <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
- >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b>";
- }
- if( $wgDBmysql5 ) {
- if( $mysqlNewAuth ) {
- print "; enabling MySQL 4.1/5.0 charset mode";
- } else {
- print "; <b class='error'>MySQL 4.1/5.0 charset mode enabled,
- but older version detected; will likely fail.</b>";
- }
- }
- print "</li>\n";
-
- @$sel = $wgDatabase->selectDB( $wgDBname );
- if( $sel ) {
- print "<li>Database <tt>" . htmlspecialchars( $wgDBname ) . "</tt> exists</li>\n";
- } else {
- $err = mysql_errno();
- $databaseSafe = htmlspecialchars( $wgDBname );
- if( $err == 1102 /* Invalid database name */ ) {
- print "<ul><li><strong>{$databaseSafe}</strong> is not a valid database name.</li></ul>";
- continue;
- } elseif( $err != 1049 /* Database doesn't exist */ ) {
- print "<ul><li>Error selecting database <strong>{$databaseSafe}</strong>: {$err} ";
- print htmlspecialchars( mysql_error() ) . "</li></ul>";
- continue;
- }
- print "<li>Attempting to create database...</li>";
- $res = $wgDatabase->query( "CREATE DATABASE `$wgDBname`" );
- if( !$res ) {
- print "<li>Couldn't create database <tt>" .
- htmlspecialchars( $wgDBname ) .
- "</tt>; try with root access or check your username/pass.</li>\n";
- $errs["RootPW"] = "&lt;- Enter";
- continue;
- }
- print "<li>Created database <tt>" . htmlspecialchars( $wgDBname ) . "</tt></li>\n";
- }
- $wgDatabase->selectDB( $wgDBname );
- }
- else if ($conf->DBtype == 'postgres') {
- if( version_compare( $myver, "8.0" ) < 0 ) {
- dieout( "<b>Postgres 8.0 or later is required</b>. Aborting." );
- }
- }
-
- if( $wgDatabase->tableExists( "cur" ) || $wgDatabase->tableExists( "revision" ) ) {
- print "<li>There are already MediaWiki tables in this database. Checking if updates are needed...</li>\n";
-
- if ( $conf->DBtype == 'mysql') {
- # Determine existing default character set
- if ( $wgDatabase->tableExists( "revision" ) ) {
- $revision = $wgDatabase->escapeLike( $conf->DBprefix . 'revision' );
- $res = $wgDatabase->query( "SHOW TABLE STATUS LIKE '$revision'" );
- $row = $wgDatabase->fetchObject( $res );
- if ( !$row ) {
- echo "<li>SHOW TABLE STATUS query failed!</li>\n";
- $existingSchema = false;
- $existingEngine = false;
- } else {
- if ( preg_match( '/^latin1/', $row->Collation ) ) {
- $existingSchema = 'mysql4';
- } elseif ( preg_match( '/^utf8/', $row->Collation ) ) {
- $existingSchema = 'mysql5';
- } elseif ( preg_match( '/^binary/', $row->Collation ) ) {
- $existingSchema = 'mysql5-binary';
- } else {
- $existingSchema = false;
- echo "<li><strong>Warning:</strong> Unrecognised existing collation</li>\n";
- }
- if ( isset( $row->Engine ) ) {
- $existingEngine = $row->Engine;
- } else {
- $existingEngine = $row->Type;
- }
- }
- if ( $existingSchema && $existingSchema != $conf->DBschema ) {
- $encExisting = htmlspecialchars( $existingSchema );
- $encRequested = htmlspecialchars( $conf->DBschema );
- print "<li><strong>Warning:</strong> you requested the $encRequested schema, " .
- "but the existing database has the $encExisting schema. This upgrade script ".
- "can't convert it, so it will remain $encExisting.</li>\n";
- $conf->setSchema( $existingSchema, $conf->DBengine );
- }
- if ( $existingEngine && $existingEngine != $conf->DBengine ) {
- $encExisting = htmlspecialchars( $existingEngine );
- $encRequested = htmlspecialchars( $conf->DBengine );
- print "<li><strong>Warning:</strong> you requested the $encRequested storage " .
- "engine, but the existing database uses the $encExisting engine. This upgrade " .
- "script can't convert it, so it will remain $encExisting.</li>\n";
- $conf->setSchema( $conf->DBschema, $existingEngine );
- }
- }
-
- # Create user if required
- if ( $conf->Root ) {
- $conn = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 );
- if ( $conn->isOpen() ) {
- print "<li>DB user account ok</li>\n";
- $conn->close();
- } else {
- print "<li>Granting user permissions...";
- if( $mysqlOldClient && $mysqlNewAuth ) {
- print " <b class='error'>If the next step fails, see <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'>http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b>";
- }
- print "</li>\n";
- dbsource( "../maintenance/users.sql", $wgDatabase );
- }
- }
- }
- print "</ul><pre>\n";
- chdir( ".." );
- flush();
- do_all_updates();
- chdir( "config" );
- print "</pre>\n";
- print "<ul><li>Finished update checks.</li>\n";
- } else {
- # Determine available storage engines if possible
- if ( $conf->DBtype == 'mysql' && version_compare( $myver, "4.1.2", "ge" ) ) {
- $res = $wgDatabase->query( 'SHOW ENGINES' );
- $found = false;
- while ( $row = $wgDatabase->fetchObject( $res ) ) {
- if ( $row->Engine == $conf->DBengine ) {
- $found = true;
- break;
- }
- }
- $wgDatabase->freeResult( $res );
- if ( !$found && $conf->DBengine != 'MyISAM' ) {
- echo "<li><strong>Warning:</strong> " . htmlspecialchars( $conf->DBengine ) .
- " storage engine not available, " .
- "using MyISAM instead</li>\n";
- $conf->setSchema( $conf->DBschema, 'MyISAM' );
- }
- }
-
- # FIXME: Check for errors
- print "<li>Creating tables...";
- if ($conf->DBtype == 'mysql') {
- dbsource( "../maintenance/tables.sql", $wgDatabase );
- dbsource( "../maintenance/interwiki.sql", $wgDatabase );
- } elseif (is_callable(array($wgDatabase, 'setup_database'))) {
- $wgDatabase->setup_database();
- }
- else {
- $errs["DBtype"] = "Do not know how to handle database type '$conf->DBtype'";
- continue;
- }
-
- print " done.</li>\n";
-
- print "<li>Initializing statistics...</li>\n";
- $wgDatabase->insert( 'site_stats',
- array ( 'ss_row_id' => 1,
- 'ss_total_views' => 0,
- 'ss_total_edits' => 1, # Main page first edit
- 'ss_good_articles' => 0, # Main page is not a good article - no internal link
- 'ss_total_pages' => 1, # Main page
- 'ss_users' => $conf->SysopName ? 1 : 0, # Sysop account, if created
- 'ss_admins' => $conf->SysopName ? 1 : 0, # Sysop account, if created
- 'ss_images' => 0 ) );
-
- # Set up the "regular user" account *if we can, and if we need to*
- if( $conf->Root and $conf->DBtype == 'mysql') {
- # See if we need to
- $wgDatabase2 = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 );
- if( $wgDatabase2->isOpen() ) {
- # Nope, just close the test connection and continue
- $wgDatabase2->close();
- echo( "<li>User " . htmlspecialchars( $wgDBuser ) . " exists. Skipping grants.</li>\n" );
- } else {
- # Yes, so run the grants
- echo( "<li>" . htmlspecialchars( "Granting user permissions to $wgDBuser on $wgDBname..." ) );
- dbsource( "../maintenance/users.sql", $wgDatabase );
- echo( "success.</li>\n" );
- }
- }
-
- if( $conf->SysopName ) {
- $u = User::newFromName( $conf->getSysopName() );
- if ( !$u ) {
- print "<li><strong class=\"error\">Warning:</strong> Skipped sysop account creation - invalid username!</li>\n";
- }
- else if ( 0 == $u->idForName() ) {
- $u->addToDatabase();
- $u->setPassword( $conf->getSysopPass() );
- $u->saveSettings();
-
- $u->addGroup( "sysop" );
- $u->addGroup( "bureaucrat" );
-
- print "<li>Created sysop account <tt>" .
- htmlspecialchars( $conf->SysopName ) . "</tt>.</li>\n";
- } else {
- print "<li>Could not create user - already exists!</li>\n";
- }
- } else {
- print "<li>Skipped sysop account creation, no name given.</li>\n";
- }
-
- $titleobj = Title::newFromText( wfMsgNoDB( "mainpage" ) );
- $article = new Article( $titleobj );
- $newid = $article->insertOn( $wgDatabase );
- $revision = new Revision( array(
- 'page' => $newid,
- 'text' => wfMsg( 'mainpagetext' ) . "\n\n" . wfMsgNoTrans( 'mainpagedocfooter' ),
- 'comment' => '',
- 'user' => 0,
- 'user_text' => 'MediaWiki default',
- ) );
- $revid = $revision->insertOn( $wgDatabase );
- $article->updateRevisionOn( $wgDatabase, $revision );
- }
- // Now that all database work is done, make sure everything is committed
- $wgDatabase->commit();
-
- /* Write out the config file now that all is well */
- print "<li style=\"list-style: none\">\n";
- print "<p>Creating LocalSettings.php...</p>\n\n";
- $localSettings = "<" . "?php$endl$local";
- // Fix up a common line-ending problem (due to CVS on Windows)
- $localSettings = str_replace( "\r\n", "\n", $localSettings );
- $f = fopen( "LocalSettings.php", 'xt' );
-
- if( $f == false ) {
- print( "</li>\n" );
- dieout( "<p>Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a file of that name here...</p>\n" .
- "<p>Here's the file that would have been written, try to paste it into place manually:</p>\n" .
- "<pre>\n" . htmlspecialchars( $localSettings ) . "</pre>\n" );
- }
- if(fwrite( $f, $localSettings ) ) {
- fclose( $f );
- print "<hr/>\n";
- writeSuccessMessage();
- print "</li>\n";
- } else {
- fclose( $f );
- dieout( "<p class='error'>An error occured while writing the config/LocalSettings.php file. Check user rights and disk space then try again.</p></li>\n" );
- }
-
- } while( false );
-}
-
-print "</ul>\n";
-$mainListOpened = false;
-
-if( count( $errs ) ) {
- /* Display options form */
-
- if( $conf->posted ) {
- echo "<p class='error-top'>Something's not quite right yet; make sure everything below is filled out correctly.</p>\n";
- }
-?>
-
-<form action="<?php echo defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; ?>" name="config" method="post">
-
-<h2>Site config</h2>
-
-<div class="config-section">
- <div class="config-input">
- <?php aField( $conf, "Sitename", "Wiki name:" ); ?>
- </div>
- <p class="config-desc">
- Preferably a short word without punctuation, i.e. "Wikipedia".<br />
- Will appear as the namespace name for "meta" pages, and throughout the interface.
- </p>
- <div class="config-input"><?php aField( $conf, "EmergencyContact", "Contact e-mail:" ); ?></div>
- <p class="config-desc">
- Displayed to users in some error messages, used as the return address for password reminders, and used as the default sender address of e-mail notifications.
- </p>
-
- <div class="config-input">
- <label class='column' for="LanguageCode">Language:</label>
- <select id="LanguageCode" name="LanguageCode"><?php
- $list = getLanguageList();
- foreach( $list as $code => $name ) {
- $sel = ($code == $conf->LanguageCode) ? 'selected="selected"' : '';
- $encCode = htmlspecialchars( $code );
- $encName = htmlspecialchars( $name );
- echo "\n\t\t<option value=\"$encCode\" $sel>$encName</option>";
- }
- echo "\n";
- ?>
- </select>
- </div>
- <p class="config-desc">
- Select the language for your wiki's interface. Some localizations aren't fully complete. Unicode (UTF-8) is used for all localizations.
- </p>
-
- <div class="config-input">
- <label class='column'>Copyright/license:</label>
-
- <ul class="plain">
- <li><?php aField( $conf, "License", "No license metadata", "radio", "none" ); ?></li>
- <li><?php aField( $conf, "License", "Public Domain", "radio", "pd" ); ?></li>
- <li><?php aField( $conf, "License", "GNU Free Documentation License 1.2 (Wikipedia-compatible)", "radio", "gfdl1_2" ); ?></li>
- <li><?php aField( $conf, "License", "GNU Free Documentation License 1.3", "radio", "gfdl1_3" ); ?></li>
- <li><?php
- aField( $conf, "License", "A Creative Commons license - ", "radio", "cc" );
- $partner = "MediaWiki";
- $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
- $exit = urlencode( "$wgServer{$conf->ScriptPath}/config/$script?License=cc&RightsUrl=[license_url]&RightsText=[license_name]&RightsCode=[license_code]&RightsIcon=[license_button]" );
- $icon = urlencode( "$wgServer$wgUploadPath/wiki.png" );
- $ccApp = htmlspecialchars( "http://creativecommons.org/license/?partner=$partner&exit_url=$exit&partner_icon_url=$icon" );
- print "<a href=\"$ccApp\" target='_blank'>choose</a>";
- if( $conf->License == "cc" ) { ?>
- <ul>
- <li><?php aField( $conf, "RightsIcon", "<img src=\"" . htmlspecialchars( $conf->RightsIcon ) . "\" alt='(Creative Commons icon)' />", "hidden" ); ?></li>
- <li><?php aField( $conf, "RightsText", htmlspecialchars( $conf->RightsText ), "hidden" ); ?></li>
- <li><?php aField( $conf, "RightsCode", "code: " . htmlspecialchars( $conf->RightsCode ), "hidden" ); ?></li>
- <li><?php aField( $conf, "RightsUrl", "<a href=\"" . htmlspecialchars( $conf->RightsUrl ) . "\">" . htmlspecialchars( $conf->RightsUrl ) . "</a>", "hidden" ); ?></li>
- </ul>
- <?php } ?>
- </li>
- </ul>
- </div>
- <p class="config-desc">
- A notice, icon, and machine-readable copyright metadata will be displayed for the license you pick.
- </p>
-
-
- <div class="config-input">
- <?php aField( $conf, "SysopName", "Admin username:" ) ?>
- </div>
- <div class="config-input">
- <?php aField( $conf, "SysopPass", "Password:", "password" ) ?>
- </div>
- <div class="config-input">
- <?php aField( $conf, "SysopPass2", "Password confirm:", "password" ) ?>
- </div>
- <p class="config-desc">
- An admin can lock/delete pages, block users from editing, and do other maintenance tasks.<br />
- A new account will be added only when creating a new wiki database.
- <br /><br />
- The password cannot be the same as the username.
- </p>
-
- <div class="config-input">
- <label class='column'>Object caching:</label>
-
- <ul class="plain">
- <li><?php aField( $conf, "Shm", "No caching", "radio", "none" ); ?></li>
- <?php
- if ( $conf->turck ) {
- echo "<li>";
- aField( $conf, "Shm", "Turck MMCache", "radio", "turck" );
- echo "</li>\n";
- }
- if( $conf->xcache ) {
- echo "<li>";
- aField( $conf, 'Shm', 'XCache', 'radio', 'xcache' );
- echo "</li>\n";
- }
- if ( $conf->apc ) {
- echo "<li>";
- aField( $conf, "Shm", "APC", "radio", "apc" );
- echo "</li>\n";
- }
- if ( $conf->eaccel ) {
- echo "<li>";
- aField( $conf, "Shm", "eAccelerator", "radio", "eaccel" );
- echo "</li>\n";
- }
- if ( $conf->dba ) {
- echo "<li>";
- aField( $conf, "Shm", "DBA (not recommended)", "radio", "dba" );
- echo "</li>";
- }
- ?>
- <li><?php aField( $conf, "Shm", "Memcached", "radio", "memcached" ); ?></li>
- </ul>
- <div style="clear:left"><?php aField( $conf, "MCServers", "Memcached servers:", "text" ) ?></div>
- </div>
- <p class="config-desc">
- An object caching system such as memcached will provide a significant performance boost,
- but needs to be installed. Provide the server addresses and ports in a comma-separated list.
- <br /><br />
- MediaWiki can also detect and support eAccelerator, Turck MMCache, APC, and XCache, but
- these should not be used if the wiki will be running on multiple application servers.
- <br/><br/>
- DBA (Berkeley-style DB) is generally slower than using no cache at all, and is only
- recommended for testing.
- </p>
-</div>
-
-<h2>E-mail, e-mail notification and authentication setup</h2>
-
-<div class="config-section">
- <div class="config-input">
- <label class='column'>E-mail features (global):</label>
- <ul class="plain">
- <li><?php aField( $conf, "Email", "Enabled", "radio", "email_enabled" ); ?></li>
- <li><?php aField( $conf, "Email", "Disabled", "radio", "email_disabled" ); ?></li>
- </ul>
- </div>
- <p class="config-desc">
- Use this to disable all e-mail functions (password reminders, user-to-user e-mail, and e-mail notifications)
- if sending mail doesn't work on your server.
- </p>
-
- <div class="config-input">
- <label class='column'>User-to-user e-mail:</label>
- <ul class="plain">
- <li><?php aField( $conf, "Emailuser", "Enabled", "radio", "emailuser_enabled" ); ?></li>
- <li><?php aField( $conf, "Emailuser", "Disabled", "radio", "emailuser_disabled" ); ?></li>
- </ul>
- </div>
- <p class="config-desc">
- The user-to-user e-mail feature (Special:Emailuser) lets the wiki act as a relay to allow users to exchange e-mail without publicly advertising their e-mail address.
- </p>
- <div class="config-input">
- <label class='column'>E-mail notification about changes:</label>
- <ul class="plain">
- <li><?php aField( $conf, "Enotif", "Disabled", "radio", "enotif_disabled" ); ?></li>
- <li><?php aField( $conf, "Enotif", "Enabled for changes to user discussion pages only", "radio", "enotif_usertalk" ); ?></li>
- <li><?php aField( $conf, "Enotif", "Enabled for changes to user discussion pages, and to pages on watchlists (not recommended for large wikis)", "radio", "enotif_allpages" ); ?></li>
- </ul>
- </div>
- <div class="config-desc">
- <p>
- For this feature to work, an e-mail address must be present for the user account, and the notification
- options in the user's preferences must be enabled. Also note the
- authentication option below. When testing the feature, keep in mind that your own changes will never trigger notifications to be sent to yourself.</p>
-
- <p>There are additional options for fine tuning in /includes/DefaultSettings.php; copy these to your LocalSettings.php and edit them there to change them.</p>
- </div>
-
- <div class="config-input">
- <label class='column'>E-mail address authentication:</label>
- <ul class="plain">
- <li><?php aField( $conf, "Eauthent", "Disabled", "radio", "eauthent_disabled" ); ?></li>
- <li><?php aField( $conf, "Eauthent", "Enabled", "radio", "eauthent_enabled" ); ?></li>
- </ul>
- </div>
- <div class="config-desc">
- <p>If this option is enabled, users have to confirm their e-mail address using a magic link sent to them whenever they set or change it, and only authenticated e-mail addresses can receive mails from other users and/or
- change notification mails. Setting this option is <b>recommended</b> for public wikis because of potential abuse of the e-mail features above.</p>
- </div>
-
-</div>
-
-<h2>Database config</h2>
-
-<div class="config-section">
-<div class="config-input">
- <label class='column'>Database type:</label>
-<?php
- if (isset($errs['DBpicktype'])) {
- print "\t<span class='error'>" . htmlspecialchars( $errs['DBpicktype'] ) . "</span>\n";
- }
-?>
- <ul class='plain'><?php
- database_picker($conf);
- ?></ul>
- </div>
-
- <div class="config-input" style="clear:left">
- <?php aField( $conf, "DBserver", "Database host:" ); ?>
- </div>
- <p class="config-desc">
- If your database server isn't on your web server, enter the name or IP address here.
- </p>
-
- <div class="config-input"><?php aField( $conf, "DBname", "Database name:" ); ?></div>
- <div class="config-input"><?php aField( $conf, "DBuser", "DB username:" ); ?></div>
- <div class="config-input"><?php aField( $conf, "DBpassword", "DB password:", "password" ); ?></div>
- <div class="config-input"><?php aField( $conf, "DBpassword2", "DB password confirm:", "password" ); ?></div>
- <p class="config-desc">
- If you only have a single user account and database available,
- enter those here. If you have database root access (see below)
- you can specify new accounts/databases to be created. This account
- will not be created if it pre-exists. If this is the case, ensure that it
- has SELECT, INSERT, UPDATE, and DELETE permissions on the MediaWiki database.
- </p>
-
- <div class="config-input">
- <label class="column">Superuser account:</label>
- <input type="checkbox" name="useroot" id="useroot" <?php if( $useRoot ) { ?>checked="checked" <?php } ?> />
- &nbsp;<label for="useroot">Use superuser account</label>
- </div>
- <div class="config-input"><?php aField( $conf, "RootUser", "Superuser name:", "text" ); ?></div>
- <div class="config-input"><?php aField( $conf, "RootPW", "Superuser password:", "password" ); ?></div>
-
- <p class="config-desc">
- If the database user specified above does not exist, or does not have access to create
- the database (if needed) or tables within it, please check the box and provide details
- of a superuser account, such as <strong>root</strong>, which does.
- </p>
-
- <?php database_switcher('mysql'); ?>
- <div class="config-input"><?php aField( $conf, "DBprefix", "Database table prefix:" ); ?></div>
- <div class="config-desc">
- <p>If you need to share one database between multiple wikis, or
- between MediaWiki and another web application, you may choose to
- add a prefix to all the table names to avoid conflicts.</p>
-
- <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
- </div>
-
- <div class="config-input"><label class="column">Storage Engine</label>
- <div>Select one:</div>
- <ul class="plain">
- <li><?php aField( $conf, "DBengine", "InnoDB", "radio", "InnoDB" ); ?></li>
- <li><?php aField( $conf, "DBengine", "MyISAM", "radio", "MyISAM" ); ?></li>
- </ul>
- </div>
- <p class="config-desc">
- InnoDB is best for public web installations, since it has good concurrency
- support. MyISAM may be faster in single-user installations. MyISAM databases
- tend to get corrupted more often than InnoDB databases.
- </p>
- <div class="config-input"><label class="column">Database character set</label>
- <div>Select one:</div>
- <ul class="plain">
- <li><?php aField( $conf, "DBschema", "MySQL 4.1/5.0 binary", "radio", "mysql5-binary" ); ?></li>
- <li><?php aField( $conf, "DBschema", "MySQL 4.1/5.0 UTF-8", "radio", "mysql5" ); ?></li>
- <li><?php aField( $conf, "DBschema", "MySQL 4.0 backwards-compatible UTF-8", "radio", "mysql4" ); ?></li>
- </ul>
- </div>
- <p class="config-desc">
- This option is ignored on upgrade, the same character set will be kept.
- <br/><br/>
- <b>WARNING:</b> If you use <b>backwards-compatible UTF-8</b> on MySQL 4.1+, and subsequently back up the database with <tt>mysqldump</tt>, it may destroy all non-ASCII characters, irreversibly corrupting your backups!.
- <br/><br/>
- In <b>binary mode</b>, MediaWiki stores UTF-8 text to the database in binary fields. This is more efficient than MySQL's UTF-8 mode, and allows you to use the full range of Unicode characters. In <b>UTF-8 mode</b>, MySQL will know what character set your data is in, and can present and convert it appropriately, but it won't let you store characters above the <a target="_blank" href="http://en.wikipedia.org/wiki/Mapping_of_Unicode_character_planes">Basic Multilingual Plane</a>.
- </p>
- </fieldset>
-
- <?php database_switcher('postgres'); ?>
- <div class="config-input"><?php aField( $conf, "DBport", "Database port:" ); ?></div>
- <div class="config-input"><?php aField( $conf, "DBmwschema", "Schema for mediawiki:" ); ?></div>
- <div class="config-input"><?php aField( $conf, "DBts2schema", "Schema for tsearch2:" ); ?></div>
- <div class="config-desc">
- <p>The username specified above (at "DB username") will have its search path set to the above schemas,
- so it is recommended that you create a new user. The above schemas are generally correct:
- only change them if you are sure you need to.</p>
- </div>
- </fieldset>
-
- <?php database_switcher('sqlite'); ?>
- <div class="config-desc">
- <b>NOTE:</b> SQLite only uses the <i>Database name</i> setting above, the user, password and root settings are ignored.
- </div>
- <div class="config-input"><?php
- aField( $conf, "SQLiteDataDir", "SQLite data directory:" );
- ?></div>
- <div class="config-desc">
- <p>SQLite stores table data into files in the filesystem.
- If you do not provide an explicit path, a "data" directory in
- the parent of your document root will be used.</p>
-
- <p>This directory must exist and be writable by the web server.</p>
- </div>
- </fieldset>
-
- <?php database_switcher('mssql'); ?>
- <div class="config-input"><?php
- aField( $conf, "DBprefix2", "Database table prefix:" );
- ?></div>
- <div class="config-desc">
- <p>If you need to share one database between multiple wikis, or
- between MediaWiki and another web application, you may choose to
- add a prefix to all the table names to avoid conflicts.</p>
-
- <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
- </div>
- </fieldset>
-
- <?php database_switcher('ibm_db2'); ?>
- <div class="config-input"><?php
- aField( $conf, "DBport_db2", "Database port:" );
- ?></div>
- <div class="config-input"><?php
- aField( $conf, "DBmwschema", "Schema for mediawiki:" );
- ?></div>
- <div>Select one:</div>
- <ul class="plain">
- <li><?php aField( $conf, "DBcataloged", "Cataloged (DB2 installed locally)", "radio", "cataloged" ); ?></li>
- <li><?php aField( $conf, "DBcataloged", "Uncataloged (remote DB2 through ODBC)", "radio", "uncataloged" ); ?></li>
- </ul>
- <div class="config-desc">
- <p>If you need to share one database between multiple wikis, or
- between MediaWiki and another web application, you may specify
- a different schema to avoid conflicts.</p>
- </div>
- </fieldset>
-
- <div class="config-input" style="padding:2em 0 3em">
- <label class='column'>&nbsp;</label>
- <input type="submit" value="Install MediaWiki!" class="btn-install" />
- </div>
-</div>
-</form>
-<script type="text/javascript">
-window.onload = toggleDBarea( <?php echo Xml::encodeJsVar( $conf->DBtype ); ?>,
-<?php
- ## If they passed in a root user name, don't populate it on page load
- echo strlen(importPost('RootUser', '')) ? 0 : 1;
-?>);
-</script>
-<?php
-}
-
-/* -------------------------------------------------------------------------------------- */
-function writeSuccessMessage() {
- $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
- if ( wfIniGetBool( 'safe_mode' ) && !ini_get( 'open_basedir' ) ) {
- echo <<<EOT
-<div class="success-box">
-<p>Installation successful!</p>
-<p>To complete the installation, please do the following:
-<ol>
- <li>Download config/LocalSettings.php with your FTP client or file manager</li>
- <li>Upload it to the parent directory</li>
- <li>Delete config/LocalSettings.php</li>
- <li>Start using <a href='../$script'>your wiki</a>!
-</ol>
-<p>If you are in a shared hosting environment, do <strong>not</strong> just move LocalSettings.php
-remotely. LocalSettings.php is currently owned by the user your webserver is running under,
-which means that anyone on the same server can read your database password! Downloading
-it and uploading it again will hopefully change the ownership to a user ID specific to you.</p>
-</div>
-EOT;
- } else {
- echo <<<EOT
-<div class="success-box">
-<p>
-<span class="success-message">Installation successful!</span>
-Move the <tt>config/LocalSettings.php</tt> file to the parent directory, then follow
-<a href="../$script"> this link</a> to your wiki.</p>
-<p>You should change file permissions for <tt>LocalSettings.php</tt> as required to
-prevent other users on the server reading passwords and altering configuration data.</p>
-</div>
-EOT;
- }
-}
-
-
-function escapePhpString( $string ) {
- if ( is_array( $string ) || is_object( $string ) ) {
- return false;
- }
- return strtr( $string,
- array(
- "\n" => "\\n",
- "\r" => "\\r",
- "\t" => "\\t",
- "\\" => "\\\\",
- "\$" => "\\\$",
- "\"" => "\\\""
- ));
-}
-
-function writeLocalSettings( $conf ) {
- $conf->PasswordSender = $conf->EmergencyContact;
- $magic = ($conf->ImageMagick ? "" : "# ");
- $convert = ($conf->ImageMagick ? $conf->ImageMagick : "/usr/bin/convert" );
- $rights = ($conf->RightsUrl) ? "" : "# ";
- $hashedUploads = $conf->safeMode ? '' : '# ';
-
- if ( $conf->ShellLocale ) {
- $locale = '';
- } else {
- $locale = '# ';
- $conf->ShellLocale = 'en_US.UTF-8';
- }
-
- switch ( $conf->Shm ) {
- case 'memcached':
- $cacheType = 'CACHE_MEMCACHED';
- $mcservers = var_export( $conf->MCServerArray, true );
- break;
- case 'turck':
- case 'xcache':
- case 'apc':
- case 'eaccel':
- $cacheType = 'CACHE_ACCEL';
- $mcservers = 'array()';
- break;
- case 'dba':
- $cacheType = 'CACHE_DBA';
- $mcservers = 'array()';
- break;
- default:
- $cacheType = 'CACHE_NONE';
- $mcservers = 'array()';
- }
-
- if ( $conf->Email == 'email_enabled' ) {
- $enableemail = 'true';
- $enableuseremail = ( $conf->Emailuser == 'emailuser_enabled' ) ? 'true' : 'false' ;
- $eauthent = ( $conf->Eauthent == 'eauthent_enabled' ) ? 'true' : 'false' ;
- switch ( $conf->Enotif ) {
- case 'enotif_usertalk':
- $enotifusertalk = 'true';
- $enotifwatchlist = 'false';
- break;
- case 'enotif_allpages':
- $enotifusertalk = 'true';
- $enotifwatchlist = 'true';
- break;
- default:
- $enotifusertalk = 'false';
- $enotifwatchlist = 'false';
- }
- } else {
- $enableuseremail = 'false';
- $enableemail = 'false';
- $eauthent = 'false';
- $enotifusertalk = 'false';
- $enotifwatchlist = 'false';
- }
-
- $file = @fopen( "/dev/urandom", "r" );
- if ( $file ) {
- $secretKey = bin2hex( fread( $file, 32 ) );
- fclose( $file );
- } else {
- $secretKey = "";
- for ( $i=0; $i<8; $i++ ) {
- $secretKey .= dechex(mt_rand(0, 0x7fffffff));
- }
- print "<li>Warning: \$wgSecretKey key is insecure, generated with mt_rand(). Consider changing it manually.</li>\n";
- }
-
- # Add slashes to strings for double quoting
- $slconf = wfArrayMap( "escapePhpString", get_object_vars( $conf ) );
- if( $conf->License == 'gfdl1_2' || $conf->License == 'pd' || $conf->License == 'gfdl1_3' ) {
- # Needs literal string interpolation for the current style path
- $slconf['RightsIcon'] = $conf->RightsIcon;
- }
-
- if( $conf->DBtype == 'mysql' ) {
- $dbsettings =
-"# MySQL specific settings
-\$wgDBprefix = \"{$slconf['DBprefix']}\";
-
-# MySQL table options to use during installation or update
-\$wgDBTableOptions = \"{$slconf['DBTableOptions']}\";
-
-# Experimental charset support for MySQL 4.1/5.0.
-\$wgDBmysql5 = {$conf->DBmysql5};";
- } elseif( $conf->DBtype == 'postgres' ) {
- $dbsettings =
-"# Postgres specific settings
-\$wgDBport = \"{$slconf['DBport']}\";
-\$wgDBmwschema = \"{$slconf['DBmwschema']}\";
-\$wgDBts2schema = \"{$slconf['DBts2schema']}\";";
- } elseif( $conf->DBtype == 'sqlite' ) {
- $dbsettings =
-"# SQLite-specific settings
-\$wgSQLiteDataDir = \"{$slconf['SQLiteDataDir']}\";";
- } elseif( $conf->DBtype == 'mssql' ) {
- $dbsettings =
-"# MSSQL specific settings
-\$wgDBprefix = \"{$slconf['DBprefix2']}\";";
- } elseif( $conf->DBtype == 'ibm_db2' ) {
- $dbsettings =
-"# DB2 specific settings
-\$wgDBport_db2 = \"{$slconf['DBport_db2']}\";
-\$wgDBmwschema = \"{$slconf['DBmwschema']}\";
-\$wgDBcataloged = \"{$slconf['DBcataloged']}\";";
- } else {
- // ummm... :D
- $dbsettings = '';
- }
-
-
- $localsettings = "
-# This file was automatically generated by the MediaWiki installer.
-# If you make manual changes, please keep track in case you need to
-# recreate them later.
-#
-# See includes/DefaultSettings.php for all configurable settings
-# and their default values, but don't forget to make changes in _this_
-# file, not there.
-#
-# Further documentation for configuration settings may be found at:
-# http://www.mediawiki.org/wiki/Manual:Configuration_settings
-
-# If you customize your file layout, set \$IP to the directory that contains
-# the other MediaWiki files. It will be used as a base to locate files.
-if( defined( 'MW_INSTALL_PATH' ) ) {
- \$IP = MW_INSTALL_PATH;
-} else {
- \$IP = dirname( __FILE__ );
-}
-
-\$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" );
-set_include_path( implode( PATH_SEPARATOR, \$path ) . PATH_SEPARATOR . get_include_path() );
-
-require_once( \"\$IP/includes/DefaultSettings.php\" );
-
-# If PHP's memory limit is very low, some operations may fail.
-" . ($conf->raiseMemory ? '' : '# ' ) . "ini_set( 'memory_limit', '20M' );" . "
-
-if ( \$wgCommandLineMode ) {
- if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) {
- die( \"This script must be run from the command line\\n\" );
- }
-}
-## Uncomment this to disable output compression
-# \$wgDisableOutputCompression = true;
-
-\$wgSitename = \"{$slconf['Sitename']}\";
-
-## The URL base path to the directory containing the wiki;
-## defaults for all runtime URL paths are based off of this.
-## For more information on customizing the URLs please see:
-## http://www.mediawiki.org/wiki/Manual:Short_URL
-\$wgScriptPath = \"{$slconf['ScriptPath']}\";
-\$wgScriptExtension = \"{$slconf['ScriptExtension']}\";
-
-## UPO means: this is also a user preference option
-
-\$wgEnableEmail = $enableemail;
-\$wgEnableUserEmail = $enableuseremail; # UPO
-
-\$wgEmergencyContact = \"{$slconf['EmergencyContact']}\";
-\$wgPasswordSender = \"{$slconf['PasswordSender']}\";
-
-\$wgEnotifUserTalk = $enotifusertalk; # UPO
-\$wgEnotifWatchlist = $enotifwatchlist; # UPO
-\$wgEmailAuthentication = $eauthent;
-
-## Database settings
-\$wgDBtype = \"{$slconf['DBtype']}\";
-\$wgDBserver = \"{$slconf['DBserver']}\";
-\$wgDBname = \"{$slconf['DBname']}\";
-\$wgDBuser = \"{$slconf['DBuser']}\";
-\$wgDBpassword = \"{$slconf['DBpassword']}\";
-
-{$dbsettings}
-
-## Shared memory settings
-\$wgMainCacheType = $cacheType;
-\$wgMemCachedServers = $mcservers;
-
-## To enable image uploads, make sure the 'images' directory
-## is writable, then set this to true:
-\$wgEnableUploads = false;
-{$magic}\$wgUseImageMagick = true;
-{$magic}\$wgImageMagickConvertCommand = \"{$convert}\";
-
-## If you use ImageMagick (or any other shell command) on a
-## Linux server, this will need to be set to the name of an
-## available UTF-8 locale
-{$locale}\$wgShellLocale = \"{$slconf['ShellLocale']}\";
-
-## If you want to use image uploads under safe mode,
-## create the directories images/archive, images/thumb and
-## images/temp, and make them all writable. Then uncomment
-## this, if it's not already uncommented:
-{$hashedUploads}\$wgHashedUploadDirectory = false;
-
-## If you have the appropriate support software installed
-## you can enable inline LaTeX equations:
-\$wgUseTeX = false;
-
-\$wgLocalInterwiki = strtolower( \$wgSitename );
-
-\$wgLanguageCode = \"{$slconf['LanguageCode']}\";
-
-\$wgSecretKey = \"$secretKey\";
-
-## Default skin: you can change the default skin. Use the internal symbolic
-## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
-\$wgDefaultSkin = 'monobook';
-
-## For attaching licensing metadata to pages, and displaying an
-## appropriate copyright notice / icon. GNU Free Documentation
-## License and Creative Commons licenses are supported so far.
-{$rights}\$wgEnableCreativeCommonsRdf = true;
-\$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright
-\$wgRightsUrl = \"{$slconf['RightsUrl']}\";
-\$wgRightsText = \"{$slconf['RightsText']}\";
-\$wgRightsIcon = \"{$slconf['RightsIcon']}\";
-# \$wgRightsCode = \"{$slconf['RightsCode']}\"; # Not yet used
-
-\$wgDiff3 = \"{$slconf['diff3']}\";
-
-# When you make changes to this configuration file, this will make
-# sure that cached pages are cleared.
-\$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
-"; ## End of setting the $localsettings string
-
- // Keep things in Unix line endings internally;
- // the system will write out as local text type.
- return str_replace( "\r\n", "\n", $localsettings );
-}
-
-function dieout( $text ) {
- global $mainListOpened;
- if( $mainListOpened ) echo( "</ul>" );
- if( $text != '' && substr( $text, 0, 2 ) != '<p' && substr( $text, 0, 2 ) != '<h' ){
- echo "<p>$text</p>\n";
- } else {
- echo $text;
- }
- die( "\n\n</div>\n</div>\n</div>\n</div>\n</body>\n</html>" );
-}
-
-function importVar( &$var, $name, $default = "" ) {
- if( isset( $var[$name] ) ) {
- $retval = $var[$name];
- if ( get_magic_quotes_gpc() ) {
- $retval = stripslashes( $retval );
- }
- } else {
- $retval = $default;
- }
- taint( $retval );
- return $retval;
-}
-
-function importPost( $name, $default = "" ) {
- return importVar( $_POST, $name, $default );
-}
-
-function importCheck( $name ) {
- return isset( $_POST[$name] );
-}
-
-function importRequest( $name, $default = "" ) {
- return importVar( $_REQUEST, $name, $default );
-}
-
-function aField( &$conf, $field, $text, $type = "text", $value = "", $onclick = '' ) {
- static $radioCount = 0;
- if( $type != "" ) {
- $xtype = "type=\"$type\"";
- } else {
- $xtype = "";
- }
-
- $id = $field;
- $nolabel = ($type == "radio") || ($type == "hidden");
-
- if ($type == 'radio')
- $id .= $radioCount++;
-
- if( !$nolabel ) {
- echo "<label class='column' for=\"$id\">$text</label>";
- }
-
- if( $type == "radio" && $value == $conf->$field ) {
- $checked = "checked='checked'";
- } else {
- $checked = "";
- }
- echo "<input $xtype name=\"$field\" id=\"$id\" class=\"iput-$type\" $checked ";
- if ($onclick) {
- echo " onclick='toggleDBarea(\"$value\",1)' " ;
- }
- echo "value=\"";
- if( $type == "radio" ) {
- echo htmlspecialchars( $value );
- } else {
- echo htmlspecialchars( $conf->$field );
- }
-
-
- echo "\" />";
- if( $nolabel ) {
- echo "<label for=\"$id\">$text</label>";
- }
-
- global $errs;
- if(isset($errs[$field])) {
- echo "<span class='error'>" . htmlspecialchars( $errs[$field] ) . "</span>\n";
- }
-}
-
-function getLanguageList() {
- global $wgLanguageNames, $IP;
- if( !isset( $wgLanguageNames ) ) {
- require_once( "$IP/languages/Names.php" );
- }
-
- $codes = array();
-
- $d = opendir( "../languages/messages" );
- /* In case we are called from the root directory */
- if (!$d)
- $d = opendir( "languages/messages");
- while( false !== ($f = readdir( $d ) ) ) {
- $m = array();
- if( preg_match( '/Messages([A-Z][a-z_]+)\.php$/', $f, $m ) ) {
- $code = str_replace( '_', '-', strtolower( $m[1] ) );
- if( isset( $wgLanguageNames[$code] ) ) {
- $name = $code . ' - ' . $wgLanguageNames[$code];
- } else {
- $name = $code;
- }
- $codes[$code] = $name;
- }
- }
- closedir( $d );
- ksort( $codes );
- return $codes;
-}
-
-#Check for location of an executable
-# @param string $loc single location to check
-# @param array $names filenames to check for.
-# @param mixed $versioninfo array of details to use when checking version, use false for no version checking
-function locate_executable($loc, $names, $versioninfo = false) {
- if (!is_array($names))
- $names = array($names);
-
- foreach ($names as $name) {
- $command = "$loc".DIRECTORY_SEPARATOR."$name";
- if (@file_exists($command)) {
- if (!$versioninfo)
- return $command;
-
- $file = str_replace('$1', $command, $versioninfo[0]);
- if (strstr(`$file`, $versioninfo[1]) !== false)
- return $command;
- }
- }
- return false;
-}
-
-# Test a memcached server
-function testMemcachedServer( $server ) {
- $hostport = explode(":", $server);
- $errstr = false;
- $fp = false;
- if ( !function_exists( 'fsockopen' ) ) {
- $errstr = "Can't connect to memcached, fsockopen() not present";
- }
- if ( !$errstr && count( $hostport ) != 2 ) {
- $errstr = 'Please specify host and port';
- }
- if ( !$errstr ) {
- list( $host, $port ) = $hostport;
- $errno = 0;
- $fsockerr = '';
-
- $fp = @fsockopen( $host, $port, $errno, $fsockerr, 1.0 );
- if ( $fp === false ) {
- $errstr = "Cannot connect to memcached on $host:$port : $fsockerr";
- }
- }
- if ( !$errstr ) {
- $command = "version\r\n";
- $bytes = fwrite( $fp, $command );
- if ( $bytes != strlen( $command ) ) {
- $errstr = "Cannot write to memcached socket on $host:$port";
- }
- }
- if ( !$errstr ) {
- $expected = "VERSION ";
- $response = fread( $fp, strlen( $expected ) );
- if ( $response != $expected ) {
- $errstr = "Didn't get correct memcached response from $host:$port";
- }
- }
- if ( $fp ) {
- fclose( $fp );
- }
- if ( !$errstr ) {
- echo "<li>Connected to memcached on " . htmlspecialchars( "$host:$port" ) ." successfully</li>";
- }
- return $errstr;
-}
-
-function database_picker($conf) {
- global $ourdb;
- print "\n";
- foreach(array_keys($ourdb) as $db) {
- if ($ourdb[$db]['havedriver']) {
- print "\t<li>";
- aField( $conf, "DBtype", $ourdb[$db]['fullname'], 'radio', $db, 'onclick');
- print "</li>\n";
- }
- }
- print "\n\t";
-}
-
-function database_switcher($db) {
- global $ourdb;
- $color = $ourdb[$db]['bgcolor'];
- $full = $ourdb[$db]['fullname'];
- print "<fieldset id='$db'><legend>$full specific options</legend>\n";
-}
-
-function printListItem( $item ) {
- print "<li>$item</li>";
-}
-
-# Determine a suitable value for $wgShellLocale
-function getShellLocale( $wikiLang ) {
- # Give up now if we're in safe mode or open_basedir
- # It's theoretically possible but tricky to work with
- if ( wfIniGetBool( "safe_mode" ) || ini_get( 'open_basedir' ) ) {
- return false;
- }
-
- $os = php_uname( 's' );
- $supported = array( 'Linux', 'SunOS', 'HP-UX' ); # Tested these
- if ( !in_array( $os, $supported ) ) {
- return false;
- }
-
- # Get a list of available locales
- $lines = $ret = false;
- exec( '/usr/bin/locale -a', $lines, $ret );
- if ( $ret ) {
- return false;
- }
-
- $lines = wfArrayMap( 'trim', $lines );
- $candidatesByLocale = array();
- $candidatesByLang = array();
- foreach ( $lines as $line ) {
- if ( $line === '' ) {
- continue;
- }
- if ( !preg_match( '/^([a-zA-Z]+)(_[a-zA-Z]+|)\.(utf8|UTF-8)(@[a-zA-Z_]*|)$/i', $line, $m ) ) {
- continue;
- }
- list( $all, $