summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2006-10-11 18:12:39 +0000
committerPierre Schmitz <pierre@archlinux.de>2006-10-11 18:12:39 +0000
commit183851b06bd6c52f3cae5375f433da720d410447 (patch)
treea477257decbf3360127f6739c2f9d0ec57a03d39
MediaWiki 1.7.1 wiederhergestellt
-rw-r--r--.htaccess1
-rw-r--r--AdminSettings.sample31
-rw-r--r--COPYING340
-rw-r--r--FAQ1
-rw-r--r--FunnyDotImage.php17
-rw-r--r--HISTORY2472
-rw-r--r--INSTALL106
-rw-r--r--README103
-rw-r--r--RELEASE-NOTES761
-rw-r--r--UPGRADE303
-rw-r--r--bin/.htaccess1
-rw-r--r--bin/ulimit.sh7
-rw-r--r--config/index.php1665
-rw-r--r--docs/.htaccess1
-rw-r--r--docs/README17
-rw-r--r--docs/database.txt174
-rw-r--r--docs/deferred.txt19
-rw-r--r--docs/design.txt128
-rw-r--r--docs/export-0.1.xsd76
-rw-r--r--docs/export-0.2.xsd100
-rw-r--r--docs/export-0.3.xsd154
-rw-r--r--docs/export-demo.xml115
-rw-r--r--docs/globals.txt74
-rw-r--r--docs/hooks.txt502
-rw-r--r--docs/html/README4
-rw-r--r--docs/language.txt24
-rw-r--r--docs/linkcache.txt18
-rw-r--r--docs/magicword.txt44
-rw-r--r--docs/memcached.txt132
-rw-r--r--docs/php-memcached/ChangeLog45
-rw-r--r--docs/php-memcached/Documentation258
-rw-r--r--docs/schema.txt6
-rw-r--r--docs/skin.txt48
-rw-r--r--docs/title.txt72
-rw-r--r--docs/user.txt63
-rw-r--r--extensions/.htaccess1
-rw-r--r--extensions/FunnyDot.php43
-rw-r--r--extensions/LLAuthPlugin.php264
-rw-r--r--extensions/README3
-rw-r--r--favicon.icobin0 -> 1150 bytes
-rw-r--r--images/README5
-rw-r--r--img_auth.php61
-rw-r--r--includes/.htaccess1
-rw-r--r--includes/AjaxDispatcher.php83
-rw-r--r--includes/AjaxFunctions.php157
-rw-r--r--includes/Article.php2575
-rw-r--r--includes/AuthPlugin.php232
-rw-r--r--includes/AutoLoader.php272
-rw-r--r--includes/BagOStuff.php538
-rw-r--r--includes/Block.php440
-rw-r--r--includes/CacheManager.php159
-rw-r--r--includes/CategoryPage.php315
-rw-r--r--includes/Categoryfinder.php191
-rw-r--r--includes/ChangesList.php653
-rw-r--r--includes/CoreParserFunctions.php150
-rw-r--r--includes/Credits.php187
-rw-r--r--includes/Database.php2020
-rw-r--r--includes/DatabaseFunctions.php414
-rw-r--r--includes/DatabaseMysql.php6
-rw-r--r--includes/DatabaseOracle.php692
-rw-r--r--includes/DatabasePostgres.php609
-rw-r--r--includes/DateFormatter.php288
-rw-r--r--includes/DefaultSettings.php2189
-rw-r--r--includes/Defines.php183
-rw-r--r--includes/DifferenceEngine.php1751
-rw-r--r--includes/DjVuImage.php214
-rw-r--r--includes/EditPage.php1864
-rw-r--r--includes/Exception.php193
-rw-r--r--includes/Exif.php1124
-rw-r--r--includes/Export.php736
-rw-r--r--includes/ExternalEdit.php77
-rw-r--r--includes/ExternalStore.php70
-rw-r--r--includes/ExternalStoreDB.php150
-rw-r--r--includes/ExternalStoreHttp.php23
-rw-r--r--includes/FakeTitle.php88
-rw-r--r--includes/Feed.php310
-rw-r--r--includes/FileStore.php377
-rw-r--r--includes/GlobalFunctions.php2005
-rw-r--r--includes/HTMLCacheUpdate.php230
-rw-r--r--includes/HTMLForm.php177
-rw-r--r--includes/HistoryBlob.php308
-rw-r--r--includes/Hooks.php131
-rw-r--r--includes/HttpFunctions.php91
-rw-r--r--includes/Image.php2265
-rw-r--r--includes/ImageFunctions.php223
-rw-r--r--includes/ImageGallery.php211
-rw-r--r--includes/ImagePage.php726
-rw-r--r--includes/JobQueue.php267
-rw-r--r--includes/Licenses.php171
-rw-r--r--includes/LinkBatch.php184
-rw-r--r--includes/LinkCache.php178
-rw-r--r--includes/LinkFilter.php92
-rw-r--r--includes/Linker.php1101
-rw-r--r--includes/LinksUpdate.php601
-rw-r--r--includes/LoadBalancer.php666
-rw-r--r--includes/LogPage.php246
-rw-r--r--includes/MacBinary.php272
-rw-r--r--includes/MagicWord.php448
-rw-r--r--includes/Math.php269
-rw-r--r--includes/MemcachedSessions.php74
-rw-r--r--includes/MessageCache.php581
-rw-r--r--includes/Metadata.php362
-rw-r--r--includes/MimeMagic.php695
-rw-r--r--includes/Namespace.php129
-rw-r--r--includes/ObjectCache.php125
-rw-r--r--includes/OutputPage.php1078
-rw-r--r--includes/PageHistory.php685
-rw-r--r--includes/Parser.php4727
-rw-r--r--includes/ParserCache.php127
-rw-r--r--includes/ParserXML.php643
-rw-r--r--includes/ProfilerSimple.php108
-rw-r--r--includes/ProfilerSimpleUDP.php34
-rw-r--r--includes/ProfilerStub.php26
-rw-r--r--includes/Profiling.php353
-rw-r--r--includes/ProtectionForm.php244
-rw-r--r--includes/ProxyTools.php233
-rw-r--r--includes/QueryPage.php483
-rw-r--r--includes/RawPage.php203
-rw-r--r--includes/RecentChange.php509
-rw-r--r--includes/Revision.php799
-rw-r--r--includes/Sanitizer.php1184
-rw-r--r--includes/SearchEngine.php345
-rw-r--r--includes/SearchMySQL.php206
-rw-r--r--includes/SearchMySQL4.php73
-rw-r--r--includes/SearchPostgres.php156
-rw-r--r--includes/SearchTsearch2.php123
-rw-r--r--includes/SearchUpdate.php115
-rw-r--r--includes/Setup.php330
-rw-r--r--includes/SiteConfiguration.php121
-rw-r--r--includes/SiteStatsUpdate.php82
-rw-r--r--includes/Skin.php1499
-rw-r--r--includes/SkinTemplate.php1109
-rw-r--r--includes/SpecialAllmessages.php212
-rw-r--r--includes/SpecialAllpages.php322
-rw-r--r--includes/SpecialAncientpages.php65
-rw-r--r--includes/SpecialBlockip.php239
-rw-r--r--includes/SpecialBlockme.php40
-rw-r--r--includes/SpecialBooksources.php109
-rw-r--r--includes/SpecialBrokenRedirects.php88
-rw-r--r--includes/SpecialCategories.php68
-rw-r--r--includes/SpecialConfirmemail.php97
-rw-r--r--includes/SpecialContributions.php444
-rw-r--r--includes/SpecialDeadendpages.php63
-rw-r--r--includes/SpecialDisambiguations.php81
-rw-r--r--includes/SpecialDoubleRedirects.php107
-rw-r--r--includes/SpecialEmailuser.php160
-rw-r--r--includes/SpecialExport.php106
-rw-r--r--includes/SpecialImagelist.php121
-rw-r--r--includes/SpecialImport.php848
-rw-r--r--includes/SpecialIpblocklist.php255
-rw-r--r--includes/SpecialListredirects.php69
-rw-r--r--includes/SpecialListusers.php235
-rw-r--r--includes/SpecialLockdb.php118
-rw-r--r--includes/SpecialLog.php427
-rw-r--r--includes/SpecialLonelypages.php58
-rw-r--r--includes/SpecialLongpages.php41
-rw-r--r--includes/SpecialMIMEsearch.php155
-rw-r--r--includes/SpecialMostcategories.php68
-rw-r--r--includes/SpecialMostimages.php64
-rw-r--r--includes/SpecialMostlinked.php98
-rw-r--r--includes/SpecialMostlinkedcategories.php81
-rw-r--r--includes/SpecialMostrevisions.php68
-rw-r--r--includes/SpecialMovepage.php283
-rw-r--r--includes/SpecialNewimages.php204
-rw-r--r--includes/SpecialNewpages.php198
-rw-r--r--includes/SpecialPage.php575
-rw-r--r--includes/SpecialPopularpages.php59
-rw-r--r--includes/SpecialPreferences.php937
-rw-r--r--includes/SpecialPrefixindex.php149
-rw-r--r--includes/SpecialRandompage.php58
-rw-r--r--includes/SpecialRandomredirect.php54
-rw-r--r--includes/SpecialRecentchanges.php709
-rw-r--r--includes/SpecialRecentchangeslinked.php173
-rw-r--r--includes/SpecialRevisiondelete.php258
-rw-r--r--includes/SpecialSearch.php413
-rw-r--r--includes/SpecialShortpages.php91
-rw-r--r--includes/SpecialSpecialpages.php73
-rw-r--r--includes/SpecialStatistics.php86
-rw-r--r--includes/SpecialUncategorizedcategories.php39
-rw-r--r--includes/SpecialUncategorizedimages.php55
-rw-r--r--includes/SpecialUncategorizedpages.php59
-rw-r--r--includes/SpecialUndelete.php737
-rw-r--r--includes/SpecialUnlockdb.php105
-rw-r--r--includes/SpecialUnusedcategories.php48
-rw-r--r--includes/SpecialUnusedimages.php86
-rw-r--r--includes/SpecialUnusedtemplates.php59
-rw-r--r--includes/SpecialUnwatchedpages.php71
-rw-r--r--includes/SpecialUpload.php1109
-rw-r--r--includes/SpecialUploadMogile.php135
-rw-r--r--includes/SpecialUserlogin.php671
-rw-r--r--includes/SpecialUserlogout.php27
-rw-r--r--includes/SpecialUserrights.php183
-rw-r--r--includes/SpecialVersion.php270
-rw-r--r--includes/SpecialWantedcategories.php85
-rw-r--r--includes/SpecialWantedpages.php133
-rw-r--r--includes/SpecialWatchlist.php513
-rw-r--r--includes/SpecialWhatlinkshere.php277
-rw-r--r--includes/SquidUpdate.php279
-rw-r--r--includes/StreamFile.php72
-rw-r--r--includes/Title.php2307
-rw-r--r--includes/User.php1986
-rw-r--r--includes/UserMailer.php414
-rw-r--r--includes/Utf8Case.php1506
-rw-r--r--includes/WatchedItem.php190
-rw-r--r--includes/WebRequest.php491
-rw-r--r--includes/Wiki.php410
-rw-r--r--includes/WikiError.php125
-rw-r--r--includes/Xml.php279
-rw-r--r--includes/XmlFunctions.php65
-rw-r--r--includes/ZhClient.php149
-rw-r--r--includes/ZhConversion.php8457
-rw-r--r--includes/cbt/CBTCompiler.php369
-rw-r--r--includes/cbt/CBTProcessor.php540
-rw-r--r--includes/cbt/README108
-rw-r--r--includes/memcached-client.php1060
-rw-r--r--includes/mime.info76
-rw-r--r--includes/mime.types117
-rw-r--r--includes/normal/CleanUpTest.php423
-rw-r--r--includes/normal/Makefile72
-rw-r--r--includes/normal/README55
-rw-r--r--includes/normal/RandomTest.php107
-rw-r--r--includes/normal/Utf8Test.php151
-rw-r--r--includes/normal/UtfNormal.php792
-rw-r--r--includes/normal/UtfNormalBench.php107
-rw-r--r--includes/normal/UtfNormalData.inc13
-rw-r--r--includes/normal/UtfNormalDataK.inc10
-rw-r--r--includes/normal/UtfNormalGenerate.php235
-rw-r--r--includes/normal/UtfNormalTest.php249
-rw-r--r--includes/normal/UtfNormalUtil.php142
-rw-r--r--includes/proxy_check.php55
-rw-r--r--includes/templates/Userlogin.php215
-rw-r--r--includes/zhtable/Makefile268
-rw-r--r--includes/zhtable/README16
-rw-r--r--includes/zhtable/printutf8.c99
-rw-r--r--includes/zhtable/simp2trad.manual178
-rw-r--r--includes/zhtable/toCN.manual331
-rw-r--r--includes/zhtable/toHK.manual211
-rw-r--r--includes/zhtable/toSG.manual15
-rw-r--r--includes/zhtable/toTW.manual309
-rw-r--r--includes/zhtable/trad2simp.manual15
-rw-r--r--includes/zhtable/tradphrases.manual149
-rw-r--r--index.php130
-rw-r--r--install-utils.inc146
-rw-r--r--languages/.htaccess1
-rw-r--r--languages/Language.php1226
-rw-r--r--languages/LanguageAb.deps.php9
-rw-r--r--languages/LanguageAb.php30
-rw-r--r--languages/LanguageAf.php90
-rw-r--r--languages/LanguageAn.php49
-rw-r--r--languages/LanguageAr.php165
-rw-r--r--languages/LanguageArc.php22
-rw-r--r--languages/LanguageAs.php27
-rw-r--r--languages/LanguageAst.php49
-rw-r--r--languages/LanguageAv.deps.php9
-rw-r--r--languages/LanguageAv.php30
-rw-r--r--languages/LanguageAy.deps.php9
-rw-r--r--languages/LanguageAy.php28
-rw-r--r--languages/LanguageAz.php87
-rw-r--r--languages/LanguageBa.deps.php9
-rw-r--r--languages/LanguageBa.php30
-rw-r--r--languages/LanguageBat_smg.deps.php10
-rw-r--r--languages/LanguageBat_smg.php26
-rw-r--r--languages/LanguageBe.php277
-rw-r--r--languages/LanguageBg.php193
-rw-r--r--languages/LanguageBm.deps.php9
-rw-r--r--languages/LanguageBm.php24
-rw-r--r--languages/LanguageBn.php75
-rw-r--r--languages/LanguageBo.php35
-rw-r--r--languages/LanguageBr.php126
-rw-r--r--languages/LanguageBs.php294
-rw-r--r--languages/LanguageCa.php103
-rw-r--r--languages/LanguageCe.deps.php9
-rw-r--r--languages/LanguageCe.php36
-rw-r--r--languages/LanguageConverter.php660
-rw-r--r--languages/LanguageCs.php265
-rw-r--r--languages/LanguageCsb.php48
-rw-r--r--languages/LanguageCv.deps.php9
-rw-r--r--languages/LanguageCv.php99
-rw-r--r--languages/LanguageCy.php137
-rw-r--r--languages/LanguageDa.php111
-rw-r--r--languages/LanguageDe.php115
-rw-r--r--languages/LanguageDv.php18
-rw-r--r--languages/LanguageDz.php30
-rw-r--r--languages/LanguageEl.php95
-rw-r--r--languages/LanguageEn.php16
-rw-r--r--languages/LanguageEo.php177
-rw-r--r--languages/LanguageEs.php100
-rw-r--r--languages/LanguageEt.php253
-rw-r--r--languages/LanguageEu.php83
-rw-r--r--languages/LanguageFa.php113
-rw-r--r--languages/LanguageFi.php327
-rw-r--r--languages/LanguageFo.php109
-rw-r--r--languages/LanguageFr.php119
-rw-r--r--languages/LanguageFur.php105
-rw-r--r--languages/LanguageFy.php121
-rw-r--r--languages/LanguageGa.php219
-rw-r--r--languages/LanguageGn.deps.php9
-rw-r--r--languages/LanguageGn.php28
-rw-r--r--languages/LanguageGsw.deps.php9
-rw-r--r--languages/LanguageGsw.php115
-rw-r--r--languages/LanguageGu.php27
-rw-r--r--languages/LanguageHe.php309
-rw-r--r--languages/LanguageHi.php80
-rw-r--r--languages/LanguageHr.php132
-rw-r--r--languages/LanguageHu.php132
-rw-r--r--languages/LanguageIa.php82
-rw-r--r--languages/LanguageId.php118
-rw-r--r--languages/LanguageIi.deps.php9
-rw-r--r--languages/LanguageIi.php27
-rw-r--r--languages/LanguageIs.php176
-rw-r--r--languages/LanguageIt.php84
-rw-r--r--languages/LanguageJa.php172
-rw-r--r--languages/LanguageJv.php115
-rw-r--r--languages/LanguageKa.php46
-rw-r--r--languages/LanguageKm.php30
-rw-r--r--languages/LanguageKn.php90
-rw-r--r--languages/LanguageKo.php182
-rw-r--r--languages/LanguageKs.php18
-rw-r--r--languages/LanguageKu.php65
-rw-r--r--languages/LanguageKv.deps.php9
-rw-r--r--languages/LanguageKv.php29
-rw-r--r--languages/LanguageLa.php120
-rw-r--r--languages/LanguageLi.php93
-rw-r--r--languages/LanguageLo.php30
-rw-r--r--languages/LanguageLt.php108
-rw-r--r--languages/LanguageLv.php118
-rw-r--r--languages/LanguageMk.php156
-rw-r--r--languages/LanguageMl.php30
-rw-r--r--languages/LanguageMs.php80
-rw-r--r--languages/LanguageNah.deps.php9
-rw-r--r--languages/LanguageNah.php52
-rw-r--r--languages/LanguageNap.deps.php9
-rw-r--r--languages/LanguageNap.php22
-rw-r--r--languages/LanguageNds.php155
-rw-r--r--languages/LanguageNds_nl.php76
-rw-r--r--languages/LanguageNl.php101
-rw-r--r--languages/LanguageNn.php233
-rw-r--r--languages/LanguageNo.php114
-rw-r--r--languages/LanguageNon.deps.php9
-rw-r--r--languages/LanguageNon.php24
-rw-r--r--languages/LanguageNv.php88
-rw-r--r--languages/LanguageOc.php101
-rw-r--r--languages/LanguageOr.php30
-rw-r--r--languages/LanguageOs.deps.php9
-rw-r--r--languages/LanguageOs.php102
-rw-r--r--languages/LanguagePa.php97
-rw-r--r--languages/LanguagePl.php133
-rw-r--r--languages/LanguagePms.deps.php9
-rw-r--r--languages/LanguagePms.php75
-rw-r--r--languages/LanguagePs.php26
-rw-r--r--languages/LanguagePt.php202
-rw-r--r--languages/LanguagePt_br.deps.php9
-rw-r--r--languages/LanguagePt_br.php80
-rw-r--r--languages/LanguageQu.deps.php9
-rw-r--r--languages/LanguageQu.php28
-rw-r--r--languages/LanguageRmy.deps.php9
-rw-r--r--languages/LanguageRmy.php52
-rw-r--r--languages/LanguageRo.php130
-rw-r--r--languages/LanguageRu.php245
-rw-r--r--languages/LanguageSc.php55
-rw-r--r--languages/LanguageSd.php18
-rw-r--r--languages/LanguageSk.php263
-rw-r--r--languages/LanguageSl.php223
-rw-r--r--languages/LanguageSq.php112
-rw-r--r--languages/LanguageSr.deps.php10
-rw-r--r--languages/LanguageSr.php224
-rw-r--r--languages/LanguageSr_ec.php281
-rw-r--r--languages/LanguageSr_el.deps.php9
-rw-r--r--languages/LanguageSr_el.php281
-rw-r--r--languages/LanguageSr_jc.deps.php9
-rw-r--r--languages/LanguageSr_jc.php11
-rw-r--r--languages/LanguageSr_jl.deps.php9
-rw-r--r--languages/LanguageSr_jl.php11
-rw-r--r--languages/LanguageSu.php53
-rw-r--r--languages/LanguageSv.php114
-rw-r--r--languages/LanguageTa.php105
-rw-r--r--languages/LanguageTe.php83
-rw-r--r--languages/LanguageTh.php75
-rw-r--r--languages/LanguageTlh.php38
-rw-r--r--languages/LanguageTr.php87
-rw-r--r--languages/LanguageTt.php131
-rw-r--r--languages/LanguageTy.deps.php9
-rw-r--r--languages/LanguageTy.php28
-rw-r--r--languages/LanguageTyv.php312
-rw-r--r--languages/LanguageUdm.deps.php9
-rw-r--r--languages/LanguageUdm.php81
-rw-r--r--languages/LanguageUg.php22
-rw-r--r--languages/LanguageUk.php98
-rw-r--r--languages/LanguageUr.php45
-rw-r--r--languages/LanguageUtf8.php199
-rw-r--r--languages/LanguageVec.deps.php9
-rw-r--r--languages/LanguageVec.php77
-rw-r--r--languages/LanguageVi.php216
-rw-r--r--languages/LanguageWa.php165
-rw-r--r--languages/LanguageXal.php51
-rw-r--r--languages/LanguageYi.php106
-rw-r--r--languages/LanguageZa.deps.php9
-rw-r--r--languages/LanguageZa.php28
-rw-r--r--languages/LanguageZh.deps.php10
-rw-r--r--languages/LanguageZh.php103
-rw-r--r--languages/LanguageZh_cn.php141
-rw-r--r--languages/LanguageZh_hk.deps.php10
-rw-r--r--languages/LanguageZh_hk.php11
-rw-r--r--languages/LanguageZh_sg.deps.php9
-rw-r--r--languages/LanguageZh_sg.php11
-rw-r--r--languages/LanguageZh_tw.deps.php9
-rw-r--r--languages/LanguageZh_tw.php101
-rw-r--r--languages/Messages.php2060
-rw-r--r--languages/MessagesAf.php688
-rw-r--r--languages/MessagesAr.php505
-rw-r--r--languages/MessagesAz.php659
-rw-r--r--languages/MessagesBe.php581
-rw-r--r--languages/MessagesBg.php1401
-rw-r--r--languages/MessagesBn.php107
-rw-r--r--languages/MessagesBr.php1085
-rw-r--r--languages/MessagesBs.php1059
-rw-r--r--languages/MessagesCa.php1205
-rw-r--r--languages/MessagesCs.php1839
-rw-r--r--languages/MessagesCsb.php311
-rw-r--r--languages/MessagesCv.php218
-rw-r--r--languages/MessagesCy.php798
-rw-r--r--languages/MessagesDa.php1398
-rw-r--r--languages/MessagesDe.php1810
-rw-r--r--languages/MessagesEl.php1859
-rw-r--r--languages/MessagesEo.php1223
-rw-r--r--languages/MessagesEs.php1879
-rw-r--r--languages/MessagesEt.php831
-rw-r--r--languages/MessagesEu.php171
-rw-r--r--languages/MessagesFa.php896
-rw-r--r--languages/MessagesFi.php1736
-rw-r--r--languages/MessagesFo.php69
-rw-r--r--languages/MessagesFr.php1496
-rw-r--r--languages/MessagesFur.php718
-rw-r--r--languages/MessagesFy.php837
-rw-r--r--languages/MessagesGa.php1792
-rw-r--r--languages/MessagesGsw.php799
-rw-r--r--languages/MessagesHe.php1873
-rw-r--r--languages/MessagesHi.php102
-rw-r--r--languages/MessagesHr.php1518
-rw-r--r--languages/MessagesHu.php765
-rw-r--r--languages/MessagesIa.php802
-rw-r--r--languages/MessagesId.php1805
-rw-r--r--languages/MessagesIs.php637
-rw-r--r--languages/MessagesIt.php1814
-rw-r--r--languages/MessagesJa.php1545
-rw-r--r--languages/MessagesJv.php6
-rw-r--r--languages/MessagesKn.php339
-rw-r--r--languages/MessagesKo.php867
-rw-r--r--languages/MessagesKu.php751
-rw-r--r--languages/MessagesLa.php667
-rw-r--r--languages/MessagesLi.php902
-rw-r--r--languages/MessagesLt.php949
-rw-r--r--languages/MessagesLv.php951
-rw-r--r--languages/MessagesMk.php1542
-rw-r--r--languages/MessagesMs.php800
-rw-r--r--languages/MessagesNah.php37
-rw-r--r--languages/MessagesNds.php1116
-rw-r--r--languages/MessagesNl.php1563
-rw-r--r--languages/MessagesNn.php1537
-rw-r--r--languages/MessagesNo.php1318
-rw-r--r--languages/MessagesOc.php780
-rw-r--r--languages/MessagesOs.php180
-rw-r--r--languages/MessagesPa.php372
-rw-r--r--languages/MessagesPl.php1585
-rw-r--r--languages/MessagesPms.php1684
-rw-r--r--languages/MessagesPt.php1765
-rw-r--r--languages/MessagesPt_br.php791
-rw-r--r--languages/MessagesRmy.php302
-rw-r--r--languages/MessagesRo.php1570
-rw-r--r--languages/MessagesRu.php1955
-rw-r--r--languages/MessagesSc.php652
-rw-r--r--languages/MessagesSk.php1660
-rw-r--r--languages/MessagesSl.php1539
-rw-r--r--languages/MessagesSq.php1368
-rw-r--r--languages/MessagesSr_ec.php1506
-rw-r--r--languages/MessagesSr_el.php1506
-rw-r--r--languages/MessagesSu.php1060
-rw-r--r--languages/MessagesSv.php1405
-rw-r--r--languages/MessagesTa.php716
-rw-r--r--languages/MessagesTe.php801
-rw-r--r--languages/MessagesTh.php190
-rw-r--r--languages/MessagesTr.php1091
-rw-r--r--languages/MessagesTt.php42
-rw-r--r--languages/MessagesTyv.php262
-rw-r--r--languages/MessagesUdm.php19
-rw-r--r--languages/MessagesUk.php816
-rw-r--r--languages/MessagesVec.php1157
-rw-r--r--languages/MessagesVi.php1308
-rw-r--r--languages/MessagesWa.php2030
-rw-r--r--languages/MessagesXal.php30
-rw-r--r--languages/MessagesYi.php423
-rw-r--r--languages/MessagesZh_cn.php834
-rw-r--r--languages/MessagesZh_tw.php829
-rw-r--r--languages/Names.php255
-rw-r--r--locale/README1
-rw-r--r--maintenance/.htaccess1
-rw-r--r--maintenance/Doxyfile279
-rw-r--r--maintenance/FiveUpgrade.inc1214
-rw-r--r--maintenance/InitialiseMessages.inc240
-rw-r--r--maintenance/Makefile20
-rw-r--r--maintenance/README85
-rw-r--r--maintenance/addwiki.php210
-rw-r--r--maintenance/alltrans.php11
-rw-r--r--maintenance/apache-ampersand.diff53
-rw-r--r--maintenance/archives/.htaccess1
-rw-r--r--maintenance/archives/patch-archive-rev_id.sql6
-rw-r--r--maintenance/archives/patch-archive-text_id.sql14
-rw-r--r--maintenance/archives/patch-bot.sql11
-rw-r--r--maintenance/archives/patch-cache.sql41
-rw-r--r--maintenance/archives/patch-categorylinks.sql39
-rw-r--r--maintenance/archives/patch-drop-user_newtalk.sql3
-rw-r--r--maintenance/archives/patch-drop_img_type.sql3
-rw-r--r--maintenance/archives/patch-email-authentication.sql3
-rw-r--r--maintenance/archives/patch-email-notification.sql11
-rw-r--r--maintenance/archives/patch-externallinks.sql13
-rw-r--r--maintenance/archives/patch-filearchive.sql51
-rw-r--r--maintenance/archives/patch-hitcounter.sql9
-rw-r--r--maintenance/archives/patch-image_name_primary.sql6
-rw-r--r--maintenance/archives/patch-image_name_unique.sql6
-rw-r--r--maintenance/archives/patch-img_exif.sql3
-rw-r--r--maintenance/archives/patch-img_media_type.sql17
-rw-r--r--maintenance/archives/patch-img_metadata.sql6
-rw-r--r--maintenance/archives/patch-img_width.sql18
-rw-r--r--maintenance/archives/patch-indexes.sql24
-rw-r--r--maintenance/archives/patch-interwiki-trans.sql2
-rw-r--r--maintenance/archives/patch-interwiki.sql20
-rw-r--r--maintenance/archives/patch-inverse_timestamp.sql15
-rw-r--r--maintenance/archives/patch-ipb_expiry.sql8
-rw-r--r--maintenance/archives/patch-ipb_range_start.sql25
-rw-r--r--maintenance/archives/patch-ipblocks.sql6
-rw-r--r--maintenance/archives/patch-job.sql20
-rw-r--r--maintenance/archives/patch-langlinks.sql14
-rw-r--r--maintenance/archives/patch-linkscc-1.3.sql6
-rw-r--r--maintenance/archives/patch-linkscc.sql12
-rw-r--r--maintenance/archives/patch-linktables.sql70
-rw-r--r--maintenance/archives/patch-list.txt182
-rw-r--r--maintenance/archives/patch-log_params.sql1
-rw-r--r--maintenance/archives/patch-logging-times-index.sql9
-rw-r--r--maintenance/archives/patch-logging-title.sql6
-rw-r--r--maintenance/archives/patch-logging.sql37
-rw-r--r--maintenance/archives/patch-math.sql28
-rw-r--r--maintenance/archives/patch-mimesearch-indexes.sql22
-rw-r--r--maintenance/archives/patch-objectcache.sql9
-rw-r--r--maintenance/archives/patch-oldestindex.sql5
-rw-r--r--maintenance/archives/patch-page_len.sql16
-rw-r--r--maintenance/archives/patch-pagelinks.sql56
-rw-r--r--maintenance/archives/patch-parsercache.sql15
-rw-r--r--maintenance/archives/patch-profiling.sql10
-rw-r--r--maintenance/archives/patch-querycache.sql16
-rw-r--r--maintenance/archives/patch-querycacheinfo.sql12
-rw-r--r--maintenance/archives/patch-random-dateindex.sql54
-rw-r--r--maintenance/archives/patch-rc-newindex.sql9
-rw-r--r--maintenance/archives/patch-rc-patrol.sql9
-rw-r--r--maintenance/archives/patch-rc_id.sql7
-rw-r--r--maintenance/archives/patch-rc_ip.sql7
-rw-r--r--maintenance/archives/patch-rc_type.sql9
-rw-r--r--maintenance/archives/patch-rename-group.sql10
-rw-r--r--maintenance/archives/patch-rename-user_groups-and_rights.sql9
-rw-r--r--maintenance/archives/patch-restructure.sql147
-rw-r--r--maintenance/archives/patch-rev_deleted.sql11
-rw-r--r--maintenance/archives/patch-rev_text_id.sql17
-rw-r--r--maintenance/archives/patch-searchindex.sql40
-rw-r--r--maintenance/archives/patch-ss_images.sql5
-rw-r--r--maintenance/archives/patch-ss_total_articles.sql6
-rw-r--r--maintenance/archives/patch-templatelinks.sql19
-rw-r--r--maintenance/archives/patch-trackbacks.sql10
-rw-r--r--maintenance/archives/patch-transcache.sql7
-rw-r--r--maintenance/archives/patch-user-realname.sql5
-rw-r--r--maintenance/archives/patch-user_email_token.sql12
-rw-r--r--maintenance/archives/patch-user_groups.sql25
-rw-r--r--maintenance/archives/patch-user_nameindex.sql13
-rw-r--r--maintenance/archives/patch-user_registration.sql9
-rw-r--r--maintenance/archives/patch-user_rights.sql21
-rw-r--r--maintenance/archives/patch-user_token.sql15
-rw-r--r--maintenance/archives/patch-userindex.sql1
-rw-r--r--maintenance/archives/patch-userlevels-defaultgroups.sql30
-rw-r--r--maintenance/archives/patch-userlevels-rights.sql5
-rw-r--r--maintenance/archives/patch-userlevels.sql22
-rw-r--r--maintenance/archives/patch-usernewtalk.sql20
-rw-r--r--maintenance/archives/patch-usernewtalk2.sql6
-rw-r--r--maintenance/archives/patch-val_ip.sql4
-rw-r--r--maintenance/archives/patch-validate.sql13
-rw-r--r--maintenance/archives/patch-watchlist-null.sql9
-rw-r--r--maintenance/archives/patch-watchlist.sql30
-rw-r--r--maintenance/archives/rebuildRecentchanges.inc122
-rw-r--r--maintenance/archives/upgradeWatchlist.php67
-rw-r--r--maintenance/attachLatest.php73
-rw-r--r--maintenance/attribute.php105
-rw-r--r--maintenance/backup.inc296
-rw-r--r--maintenance/backupPrefetch.inc203
-rw-r--r--maintenance/benchmarkPurge.php65
-rw-r--r--maintenance/build-intl-wiki.sql31
-rw-r--r--maintenance/changePassword.php53
-rw-r--r--maintenance/changeuser.sql12
-rw-r--r--maintenance/checkUsernames.php37
-rw-r--r--maintenance/checktrans.php30
-rw-r--r--maintenance/cleanupCaps.php158
-rw-r--r--maintenance/cleanupDupes.inc131
-rw-r--r--maintenance/cleanupDupes.php37
-rw-r--r--maintenance/cleanupSpam.php112
-rw-r--r--maintenance/cleanupTitles.php210
-rw-r--r--maintenance/cleanupWatchlist.php141
-rw-r--r--maintenance/clear_interwiki_cache.php26
-rw-r--r--maintenance/clear_stats.php31
-rw-r--r--maintenance/commandLine.inc232
-rw-r--r--maintenance/convertLinks.inc220
-rw-r--r--maintenance/convertLinks.php16
-rw-r--r--maintenance/counter.php5
-rw-r--r--maintenance/createAndPromote.php48
-rw-r--r--maintenance/database.sql7
-rw-r--r--maintenance/delete-idle-wiki-users.pl138
-rw-r--r--maintenance/deleteBatch.php85
-rw-r--r--maintenance/deleteImageMemcached.php60
-rw-r--r--maintenance/deleteOldRevisions.inc60
-rw-r--r--maintenance/deleteOldRevisions.php30
-rw-r--r--maintenance/deleteOrphanedRevisions.inc.php33
-rw-r--r--maintenance/deleteOrphanedRevisions.php55
-rw-r--r--maintenance/deleteRevision.php40
-rw-r--r--maintenance/diffLanguage.php159
-rw-r--r--maintenance/dtrace/counts.d23
-rw-r--r--maintenance/dtrace/tree.d26
-rw-r--r--maintenance/dumpBackup.php99
-rw-r--r--maintenance/dumpHTML.inc650
-rw-r--r--maintenance/dumpHTML.php131
-rw-r--r--maintenance/dumpInterwiki.inc219
-rw-r--r--maintenance/dumpInterwiki.php25
-rw-r--r--maintenance/dumpLinks.php63
-rw-r--r--maintenance/dumpMessages.php19
-rw-r--r--maintenance/dumpReplayLog.php118
-rw-r--r--maintenance/dumpTextPass.php347
-rw-r--r--maintenance/duplicatetrans.php29
-rw-r--r--maintenance/entities2literals.pl276
-rw-r--r--maintenance/eval.php63
-rw-r--r--maintenance/fetchInterwiki.pl102
-rw-r--r--maintenance/findhooks.php93
-rw-r--r--maintenance/fixSlaveDesync.php100
-rw-r--r--maintenance/fixTimestamps.php104
-rw-r--r--maintenance/fixUserRegistration.php31
-rw-r--r--maintenance/generateSitemap.php463
-rw-r--r--maintenance/importDump.php141
-rw-r--r--maintenance/importImages.inc.php67
-rw-r--r--maintenance/importImages.php101
-rw-r--r--maintenance/importLogs.inc144
-rw-r--r--maintenance/importLogs.php27
-rw-r--r--maintenance/importPhase2.php370
-rw-r--r--maintenance/importTextFile.inc75
-rw-r--r--maintenance/importTextFile.php111
-rw-r--r--maintenance/importUseModWiki.php365
-rw-r--r--maintenance/initStats.php78
-rw-r--r--maintenance/interwiki.sql179
-rw-r--r--maintenance/lang2po.php154
-rw-r--r--maintenance/langmemusage.php30
-rw-r--r--maintenance/languages.inc48
-rw-r--r--maintenance/mcc.php173
-rw-r--r--maintenance/mctest.php59
-rw-r--r--maintenance/moveBatch.php85
-rw-r--r--maintenance/mwdocgen.php205
-rw-r--r--maintenance/mwdoxygen.cfg1136
-rw-r--r--maintenance/mysql5/tables.sql1009
-rw-r--r--maintenance/namespace2sql.php14
-rw-r--r--maintenance/namespaceDupes.php194
-rw-r--r--maintenance/nukePage.inc80
-rw-r--r--maintenance/nukePage.php30
-rw-r--r--maintenance/oracle/archives/patch-trackbacks.sql10
-rw-r--r--maintenance/oracle/archives/patch-transcache.sql5
-rw-r--r--maintenance/oracle/interwiki.sql178
-rw-r--r--maintenance/oracle/tables.sql333
-rw-r--r--maintenance/orphans.php207
-rw-r--r--maintenance/ourusers.php121
-rw-r--r--maintenance/parserTests.inc791
-rw-r--r--maintenance/parserTests.php64
-rw-r--r--maintenance/parserTests.txt5475
-rw-r--r--maintenance/parserTestsParserHook.php34
-rw-r--r--maintenance/parserTestsParserTime.php26
-rw-r--r--maintenance/parserTestsStaticParserHook.php44
-rw-r--r--maintenance/postgres/tables.sql420
-rw-r--r--maintenance/purgeOldText.inc63
-rw-r--r--maintenance/purgeOldText.php30
-rw-r--r--maintenance/reassignEdits.inc.php144
-rw-r--r--maintenance/reassignEdits.php57
-rw-r--r--maintenance/rebuildImages.php275
-rw-r--r--maintenance/rebuildInterwiki.inc260
-rw-r--r--maintenance/rebuildInterwiki.php31
-rw-r--r--maintenance/rebuildMessages.php66
-rw-r--r--maintenance/rebuildall.php39
-rw-r--r--maintenance/rebuildrecentchanges.inc97
-rw-r--r--maintenance/rebuildrecentchanges.php25
-rw-r--r--maintenance/rebuildtextindex.inc68
-rw-r--r--maintenance/rebuildtextindex.php25
-rw-r--r--maintenance/recount.sql8
-rw-r--r--maintenance/redundanttrans.php28
-rw-r--r--maintenance/refreshImageCount.php25
-rw-r--r--maintenance/refreshLinks.inc131
-rw-r--r--maintenance/refreshLinks.php32
-rw-r--r--maintenance/removeUnusedAccounts.inc47
-rw-r--r--maintenance/removeUnusedAccounts.php58
-rw-r--r--maintenance/renderDump.php103
-rw-r--r--maintenance/runJobs.php20
-rw-r--r--maintenance/showJobs.php19
-rw-r--r--maintenance/splitLanguageFiles.inc1168
-rw-r--r--maintenance/splitLanguageFiles.php13
-rw-r--r--maintenance/stats.php45
-rw-r--r--maintenance/storage/blobs.sql8
-rw-r--r--maintenance/storage/checkStorage.php468
-rw-r--r--maintenance/storage/compressOld.inc300
-rw-r--r--maintenance/storage/compressOld.php82
-rw-r--r--maintenance/storage/dumpRev.php14
-rwxr-xr-xmaintenance/storage/make-blobs11
-rw-r--r--maintenance/storage/moveToExternal.php97
-rw-r--r--maintenance/storage/resolveStubs.php100
-rw-r--r--maintenance/tables.sql998
-rw-r--r--maintenance/transstat.php203
-rw-r--r--maintenance/trivialCmdLine.php21
-rw-r--r--maintenance/update.php71
-rw-r--r--maintenance/updateArticleCount.inc.php68
-rw-r--r--maintenance/updateArticleCount.php42
-rw-r--r--maintenance/updateSearchIndex.inc115
-rw-r--r--maintenance/updateSearchIndex.php57
-rw-r--r--maintenance/updateSpecialPages.php96
-rw-r--r--maintenance/updaters.inc835
-rw-r--r--maintenance/upgrade1_5.php24
-rw-r--r--maintenance/userDupes.inc328
-rw-r--r--maintenance/userDupes.php41
-rw-r--r--maintenance/users.sql12
-rw-r--r--maintenance/wiki-mangleme.php553
-rw-r--r--maintenance/wikipedia-interwiki.sql220
-rw-r--r--maintenance/wiktionary-interwiki.sql160
-rw-r--r--math/.htaccess1
-rw-r--r--math/.svnignore7
-rw-r--r--math/Makefile64
-rw-r--r--math/README107
-rw-r--r--math/TODO3
-rw-r--r--math/html.ml119
-rw-r--r--math/html.mli5
-rw-r--r--math/lexer.mll93
-rw-r--r--math/mathml.ml20
-rw-r--r--math/mathml.mli1
-rw-r--r--math/parser.mly103
-rw-r--r--math/render.ml33
-rw-r--r--math/render_info.mli20
-rw-r--r--math/tex.mli19
-rw-r--r--math/texutil.ml482
-rw-r--r--math/texutil.mli11
-rw-r--r--math/texvc.ml34
-rw-r--r--math/texvc_cgi.ml62
-rw-r--r--math/texvc_test.ml25
-rw-r--r--math/texvc_tex.ml3
-rw-r--r--math/util.ml17
-rw-r--r--profileinfo.php249
-rw-r--r--redirect.php23
-rw-r--r--redirect.phtml4
-rw-r--r--skins/ArchLinux.deps.php9
-rw-r--r--skins/ArchLinux.php283
-rw-r--r--skins/Chick.deps.php10
-rw-r--r--skins/Chick.php30
-rw-r--r--skins/CologneBlue.php315
-rw-r--r--skins/MonoBook.deps.php9
-rw-r--r--skins/MonoBook.php275
-rw-r--r--skins/MySkin.deps.php10
-rw-r--r--skins/MySkin.php30
-rw-r--r--skins/Nostalgia.php93
-rw-r--r--skins/Simple.deps.php10
-rw-r--r--skins/Simple.php70
-rw-r--r--skins/Skin.sample19
-rw-r--r--skins/SkinPHPTal.sample28
-rw-r--r--skins/Standard.php294
-rw-r--r--skins/archlinux/IE50Fixes.css67
-rw-r--r--skins/archlinux/IE55Fixes.css85
-rw-r--r--skins/archlinux/IE60Fixes.css84
-rw-r--r--skins/archlinux/IE70Fixes.css75
-rw-r--r--skins/archlinux/IEMacFixes.css44
-rw-r--r--skins/archlinux/KHTMLFixes.css3
-rw-r--r--skins/archlinux/Opera6Fixes.css14
-rw-r--r--skins/archlinux/Opera7Fixes.css11
-rw-r--r--skins/archlinux/archlinux.css45
-rw-r--r--skins/archlinux/bullet.gifbin0 -> 50 bytes
-rw-r--r--skins/archlinux/discussionitem_icon.gifbin0 -> 949 bytes
-rw-r--r--skins/archlinux/external.pngbin0 -> 165 bytes
-rw-r--r--skins/archlinux/file_icon.gifbin0 -> 921 bytes
-rw-r--r--skins/archlinux/headbg.jpgbin0 -> 7881 bytes
-rw-r--r--skins/archlinux/link_icon.gifbin0 -> 942 bytes
-rw-r--r--skins/archlinux/lock_icon.gifbin0 -> 918 bytes
-rw-r--r--skins/archlinux/logo.pngbin0 -> 15730 bytes
-rw-r--r--skins/archlinux/magnify-clip.pngbin0 -> 237 bytes
-rw-r--r--skins/archlinux/mail_icon.gifbin0 -> 918 bytes
-rw-r--r--skins/archlinux/main.css1450
-rw-r--r--skins/archlinux/news_icon.pngbin0 -> 297 bytes
-rw-r--r--skins/archlinux/required.gifbin0 -> 47 bytes
-rw-r--r--skins/archlinux/rtl.css212
-rw-r--r--skins/archlinux/tab.pngbin0 -> 107 bytes
-rw-r--r--skins/archlinux/title.pngbin0 -> 7124 bytes
-rw-r--r--skins/archlinux/title_back.pngbin0 -> 168 bytes
-rw-r--r--skins/archlinux/user.gifbin0 -> 932 bytes
-rw-r--r--skins/archlinux/wiki-indexed.pngbin0 -> 8205 bytes
-rw-r--r--skins/archlinux/wiki.pngbin0 -> 23064 bytes
-rw-r--r--skins/chick/IE50Fixes.css67
-rw-r--r--skins/chick/IE55Fixes.css81
-rw-r--r--skins/chick/IE60Fixes.css79
-rw-r--r--skins/chick/main.css481
-rw-r--r--skins/common/IEFixes.js127
-rw-r--r--skins/common/ajax.js177
-rw-r--r--skins/common/cologneblue.css96
-rw-r--r--skins/common/common.css386
-rw-r--r--skins/common/commonPrint.css288
-rw-r--r--skins/common/common_rtl.css15
-rw-r--r--skins/common/feed.css95
-rw-r--r--skins/common/images/Arr_.pngbin0 -> 918 bytes
-rw-r--r--skins/common/images/Arr_d.pngbin0 -> 215 bytes
-rw-r--r--skins/common/images/Arr_l.pngbin0 -> 263 bytes
-rw-r--r--skins/common/images/Arr_r.pngbin0 -> 210 bytes
-rw-r--r--skins/common/images/Arr_r.xcfbin0 -> 1437 bytes
-rw-r--r--skins/common/images/Zoom_sans.gifbin0 -> 901 bytes
-rw-r--r--skins/common/images/bullet.gifbin0 -> 50 bytes
-rw-r--r--skins/common/images/button_bold.pngbin0 -> 978 bytes
-rw-r--r--skins/common/images/button_extlink.pngbin0 -> 1093 bytes
-rw-r--r--skins/common/images/button_headline.pngbin0 -> 497 bytes
-rw-r--r--skins/common/images/button_hr.pngbin0 -> 372 bytes
-rw-r--r--skins/common/images/button_image.pngbin0 -> 1110 bytes
-rw-r--r--skins/common/images/button_italic.pngbin0 -> 975 bytes
-rw-r--r--skins/common/images/button_link.pngbin0 -> 434 bytes
-rw-r--r--skins/common/images/button_math.pngbin0 -> 730 bytes
-rw-r--r--skins/common/images/button_media.pngbin0 -> 1155 bytes
-rw-r--r--skins/common/images/button_nowiki.pngbin0 -> 375 bytes
-rw-r--r--skins/common/images/button_sig.pngbin0 -> 1217 bytes
-rw-r--r--skins/common/images/button_template.pngbin0 -> 362 bytes
-rw-r--r--skins/common/images/fileicon.xcfbin0 -> 26160 bytes
-rw-r--r--skins/common/images/gnu-fdl.pngbin0 -> 1748 bytes
-rw-r--r--skins/common/images/gnu-fdl.xcfbin0 -> 5578 bytes
-rw-r--r--skins/common/images/icons/COPYING43
-rw-r--r--skins/common/images/icons/fileicon-c.pngbin0 -> 2995 bytes
-rw-r--r--skins/common/images/icons/fileicon-cpp.pngbin0 -> 2250 bytes
-rw-r--r--skins/common/images/icons/fileicon-deb.pngbin0 -> 5528 bytes
-rw-r--r--skins/common/images/icons/fileicon-djvu.pngbin0 -> 11137 bytes
-rw-r--r--skins/common/images/icons/fileicon-djvu.xcfbin0 -> 83394 bytes
-rw-r--r--skins/common/images/icons/fileicon-dvi.pngbin0 -> 13042 bytes
-rw-r--r--skins/common/images/icons/fileicon-exe.pngbin0 -> 5864 bytes
-rw-r--r--skins/common/images/icons/fileicon-h.pngbin0 -> 1195 bytes
-rw-r--r--skins/common/images/icons/fileicon-html.pngbin0 -> 7601 bytes
-rw-r--r--skins/common/images/icons/fileicon-iso.pngbin0 -> 6673 bytes
-rw-r--r--skins/common/images/icons/fileicon-java.pngbin0 -> 6825 bytes
-rw-r--r--skins/common/images/icons/fileicon-mid.pngbin0 -> 7191 bytes
-rw-r--r--skins/common/images/icons/fileicon-mov.pngbin0 -> 7946 bytes
-rw-r--r--skins/common/images/icons/fileicon-o.pngbin0 -> 2893 bytes
-rw-r--r--skins/common/images/icons/fileicon-ogg.pngbin0 -> 6143 bytes
-rw-r--r--skins/common/images/icons/fileicon-ogg.xcfbin0 -> 40236 bytes
-rw-r--r--skins/common/images/icons/fileicon-pdf.pngbin0 -> 5138 bytes
-rw-r--r--skins/common/images/icons/fileicon-ps.pngbin0 -> 3293 bytes
-rw-r--r--skins/common/images/icons/fileicon-rm.pngbin0 -> 4977 bytes
-rw-r--r--skins/common/images/icons/fileicon-rpm.pngbin0 -> 4753 bytes
-rw-r--r--skins/common/images/icons/fileicon-svg.pngbin0 -> 5193 bytes
-rw-r--r--skins/common/images/icons/fileicon-tar.pngbin0 -> 6544 bytes
-rw-r--r--skins/common/images/icons/fileicon-tex.pngbin0 -> 4203 bytes
-rw-r--r--skins/common/images/icons/fileicon-ttf.pngbin0 -> 3625 bytes
-rw-r--r--skins/common/images/icons/fileicon-txt.pngbin0 -> 6801 bytes
-rw-r--r--skins/common/images/icons/fileicon.pngbin0 -> 1121 bytes
-rw-r--r--skins/common/images/link_icon.gifbin0 -> 942 bytes
-rw-r--r--skins/common/images/magnify-clip.pngbin0 -> 267 bytes
-rw-r--r--skins/common/images/mediawiki-small.xcfbin0 -> 36011 bytes
-rw-r--r--skins/common/images/mediawiki.pngbin0 -> 23064 bytes
-rw-r--r--skins/common/images/poweredby_mediawiki_88x31.pngbin0 -> 1933 bytes
-rw-r--r--skins/common/images/redirectltr.pngbin0 -> 1024 bytes
-rw-r--r--skins/common/images/redirectrtl.pngbin0 -> 1017 bytes
-rw-r--r--skins/common/images/wiki.pngbin0 -> 24954 bytes
-rw-r--r--skins/common/metadata.js49
-rw-r--r--skins/common/nostalgia.css18
-rw-r--r--skins/common/preview.js53
-rw-r--r--skins/common/protect.js126
-rw-r--r--skins/common/quickbar-right.css1
-rw-r--r--skins/common/quickbar.css1
-rw-r--r--skins/common/sticky.js124
-rw-r--r--skins/common/upload.js23
-rw-r--r--skins/common/wikibits.js748
-rw-r--r--skins/common/wikiprintable.css46
-rw-r--r--skins/common/wikistandard.css44
-rw-r--r--skins/disabled/HTMLDump.php228
-rw-r--r--skins/disabled/MonoBook.tpl200
-rw-r--r--skins/disabled/MonoBookCBT.php1390
-rw-r--r--skins/htmldump/lookup.js91
-rw-r--r--skins/htmldump/main.css9
-rw-r--r--skins/htmldump/md5.js256
-rw-r--r--skins/htmldump/utf8.js72
-rw-r--r--skins/monobook/IE50Fixes.css67
-rw-r--r--skins/monobook/IE55Fixes.css85
-rw-r--r--skins/monobook/IE60Fixes.css84
-rw-r--r--skins/monobook/IE70Fixes.css75
-rw-r--r--skins/monobook/IEMacFixes.css44
-rw-r--r--skins/monobook/KHTMLFixes.css3
-rw-r--r--skins/monobook/Opera6Fixes.css14
-rw-r--r--skins/monobook/Opera7Fixes.css11
-rw-r--r--skins/monobook/bullet.gifbin0 -> 50 bytes
-rw-r--r--skins/monobook/discussionitem_icon.gifbin0 -> 949 bytes
-rw-r--r--skins/monobook/external.pngbin0 -> 165 bytes
-rw-r--r--skins/monobook/file_icon.gifbin0 -> 921 bytes
-rw-r--r--skins/monobook/headbg.jpgbin0 -> 7881 bytes
-rw-r--r--skins/monobook/link_icon.gifbin0 -> 942 bytes
-rw-r--r--skins/monobook/lock_icon.gifbin0 -> 918 bytes
-rw-r--r--skins/monobook/magnify-clip.pngbin0 -> 237 bytes
-rw-r--r--skins/monobook/mail_icon.gifbin0 -> 918 bytes
-rw-r--r--skins/monobook/main.css1448
-rw-r--r--skins/monobook/news_icon.pngbin0 -> 297 bytes
-rw-r--r--skins/monobook/required.gifbin0 -> 47 bytes
-rw-r--r--skins/monobook/rtl.css212
-rw-r--r--skins/monobook/user.gifbin0 -> 932 bytes
-rw-r--r--skins/monobook/wiki-indexed.pngbin0 -> 8205 bytes
-rw-r--r--skins/monobook/wiki.pngbin0 -> 23064 bytes
-rw-r--r--skins/myskin/main.css1
-rw-r--r--skins/simple/discussionitem_icon.gifbin0 -> 949 bytes
-rw-r--r--skins/simple/external.pngbin0 -> 165 bytes
-rw-r--r--skins/simple/file_icon.gifbin0 -> 921 bytes
-rw-r--r--skins/simple/link_icon.gifbin0 -> 942 bytes
-rw-r--r--skins/simple/lock_icon.gifbin0 -> 918 bytes
-rw-r--r--skins/simple/mail_icon.gifbin0 -> 918 bytes
-rw-r--r--skins/simple/main.css404
-rw-r--r--tests/.htaccess1
-rw-r--r--tests/.svnignore6
-rw-r--r--tests/ArticleTest.php150
-rw-r--r--tests/DatabaseTest.php93
-rw-r--r--tests/GlobalTest.php211
-rw-r--r--tests/ImageTest.php66
-rw-r--r--tests/LocalTestSettings.sample29
-rw-r--r--tests/Makefile15
-rw-r--r--tests/README8
-rw-r--r--tests/RunTests.php100
-rw-r--r--tests/SanitizerTest.php65
-rw-r--r--tests/SearchEngineTest.php136
-rw-r--r--tests/SearchMySQL4Test.php34
-rw-r--r--tests/test-prefetch-current.xml75
-rw-r--r--tests/test-prefetch-previous.xml57
-rw-r--r--tests/test-prefetch-stub.xml75
-rw-r--r--thumb.php85
-rw-r--r--trackback.php80
-rw-r--r--wiki.phtml4
932 files changed, 240029 insertions, 0 deletions
diff --git a/.htaccess b/.htaccess
new file mode 100644
index 00000000..2f6aa62a
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1 @@
+DirectoryIndex index.php \ No newline at end of file
diff --git a/AdminSettings.sample b/AdminSettings.sample
new file mode 100644
index 00000000..1670cf5e
--- /dev/null
+++ b/AdminSettings.sample
@@ -0,0 +1,31 @@
+<?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
+ *
+ * @package MediaWiki
+ */
+
+/*
+ * 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.
+ */
+$wgDBadminuser = 'wikiadmin';
+$wgDBadminpassword = 'adminpass';
+
+/*
+ * Whether to enable the profileinfo.php script.
+ */
+$wgEnableProfileInfo = false;
+
+?>
diff --git a/COPYING b/COPYING
new file mode 100644
index 00000000..d7c31ed3
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/FAQ b/FAQ
new file mode 100644
index 00000000..e4e94edb
--- /dev/null
+++ b/FAQ
@@ -0,0 +1 @@
+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/Help:FAQ. \ No newline at end of file
diff --git a/FunnyDotImage.php b/FunnyDotImage.php
new file mode 100644
index 00000000..d89fdcf7
--- /dev/null
+++ b/FunnyDotImage.php
@@ -0,0 +1,17 @@
+<?php
+define( 'MEDIAWIKI', true );
+require ('LocalSettings.php');
+
+$time = time();
+
+setCookie('AntiSpamTime', $time);
+setCookie('AntiSpamHash', sha1($time.$wgAntiSpamHash));
+
+header("Cache-Control: no-cache, must-revalidate");
+header('Content-type: image/png');
+$im = imagecreatetruecolor(1, 1);
+imagepng($im);
+imagedestroy($im);
+exit();
+
+?> \ No newline at end of file
diff --git a/HISTORY b/HISTORY
new file mode 100644
index 00000000..88bf58dc
--- /dev/null
+++ b/HISTORY
@@ -0,0 +1,2472 @@
+Change notes from older releases. For current info see RELEASE-NOTES.
+
+= 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.
+
+== Changes since 1.5 ==
+
+* (bug 2885) More PHP 5.1 fixes: skin, search, log, undelete
+
+Code quality:
+* Use strval() to make sure we don't accidentally get null on bad revision
+ text loads or other fields mucking up XML export output
+* Clean up duplicate code for selection of changeslist style
+* Correct blob caching to reduce redundant blob loads on backups
+* (bug 3182) Clear link cache during import to prevent memory leak
+* Fixed possible infinite loop in formatComment
+* Wrap message page insertions in a transaction to speed up installation
+* Avoid notice warning on edit with no User-Agent header
+* (bug 3649) Remove obsolete, broken moveCustomMessages script
+* Avoid numerous redundant latest-revision lookups in history
+* Require PHP 4.3.2 or higher strictly now.
+* Tweak infinite-template-handling loop for PHP 5.1.1 string handling change
+* Remove unused OutputPage::addCookie()
+* Fix for short_open_tag off again; please don't break this, guys
+* (bug 4507) Adjust FULLPAGENAMEE escaping to standard form
+* (bug 5302) Merge the two #p-search .pBody statements in monobook css.
+
+Database:
+* Finally dropped MySQL 3.23.x support
+* Oracle support
+* (bug 3056) MySQL 3 compatibility fix: USE INDEX instead of FORCE INDEX
+* Update all stats fields on recount.sql
+* (bug 3227) Fix SQL injection introduced in experimental code
+* Fix table prefix usage in Block::enumBlocks
+* (bug 3448) Set page_len on undelete
+* (bug 3506) Avoid MySQL error when Listusers returns no results
+* Skip update of disused 'rc_cur_time' field (todo: discard the field)
+* (bug 3735) Fix to run under MySQL 5's strict mode
+* (bug 3786) Experimental support for MySQL 4.1/5.0 utf8 charset mode
+ NOTE: Enabling this may break existing wikis, and still doesn't
+ work for all Unicode characters due to MySQL limitations.
+* MySQL 5.0 strict mode fix for moving unwatched pages
+* Ability to set the table name for external storage servers
+* Update ipblocks table in MySQL 5 table defs
+* Removed FulltextStoplist.php, no longer used (was for MySQL 3.x workaround)
+* Added templatelinks table, to track template inclusions. User-visible effects
+ will be:
+ * (inclusion) tag for inclusions in Special:Whatlinkshere
+ * More accurate list of used templates on the edit page
+ * More reliable cache invalidation when templates outside the template
+ namespace are changed
+* Respect database prefix in dumpHTML.inc
+* Removed read-only check from Database::query()
+* Added externallinks table, to track links to arbitrary URLs
+* Added job table, for deferred processing of jobs. The immediate application is
+ to complete the link table refresh operation when templates are changed.
+* Don't change the password of the MySQL root user.
+
+Documentation:
+* (bug 3306) Document $wgLocalTZoffset
+
+Hooks:
+(list not complete)
+* Move ArticleSave hook execution into Article insert/update functions,
+ so they get called on non-EditPage actions that use these functions
+ to create or update pages.
+* Added EditFilter hook, and output callback on EditPage::showEditForm()
+ for a place to add in captcha-type extensions in the edit flow
+* (bug 3684) Fix typo in fatal error backtraces in Hooks.php
+* Fix for hook callbacks on objects containing no fields
+* Add a hook for additional user creation throttle / limiter extensions
+* Use $wgOut->parse() in wfGetSiteNotice() instead of creating a new parser
+ instance. This allows use of extension hooks if required.
+* Added AutoAuthenticate hook for external User object suppliers
+* Added 'PageRenderingHash' hook for changing the parser cache hash key
+ from an extension that changes rendering based on nonstandard options.
+* Add 'GetInternalURL' hook to match the GetFullURL and GetLocalURL ones
+* (bug 4456) Add hook for marking article patrolled
+* Add UserRights hook, fires after a user's group memberships are changed
+
+Images:
+* Support SVG rendering with rsvg
+* Cap arbitrary SVG renders to given image size or $wgSVGMaxSize pixels wide
+* (bug 3127) Render large SVGs at image page size correctly
+* Fix scaling of non-integer SVG unit sizes
+* (bug 2800) Don't scale up small images on |thumb| without explicit size
+* Use the real file link instead of the default-size rasterized version for
+ large SVG images on image description page
+* Include the file name/type/size line for non-resized images
+* (bug 3489) PHP 5.1 compat problem with captioned images
+* (bug 3643) Fix image page display of large images with resizing disabled
+* Added a limit to the size of image files which can be thumbnailed
+* (bug 3806) Gracefully fall back to client-side scaling on |thumb| image
+ that passes $wgMaxImageArea
+* (bug 153) Adjust thumbnail size calculations to match consistently;
+ patch by David Benbennick
+* (bug 4162) Add $wgThumbnailEpoch timestamp to force old thumbs to
+ be rerendered on demand, sitewide
+* (bug 1850) Additional fixes so existing local and remote images
+ get a blue link even if there's no local description page
+* Avoid FATAL ERROR when creating thumbnail of non-existing image
+* (bug 4207) Wrong image size when using 100x200px syntax to scale image up
+ patch by David Benbennick
+* Don't delete thumbnails when refreshing exif metadata. This caused thumbs
+ to vanish mysteriously from time to time for files that didn't have metadata.
+* (bug 4426) Add link to user_talk page on image pages
+* Support a custom convert command for thumbnailing. See DefaultSettings.php
+ and the comments for $wgCustomConvertCommand, for more information.
+* UserCan hook now allows advisory return values, rather than mandatory ones.
+
+Installer:
+* (bug 3782) Throw fatal installation warning if mbstring.func_overload on.
+ Why do people invent these crazy options that change language semantics?
+* Fixed installer bugs 921 and 3914 (issues with using root and so forth)
+* (bug 4258) Use ugly urls for ISAPI by default
+ patch by Rob Church
+* Improve installer
+ * Use a superuser account (such as root), if specifed, to create tables
+ * Don't overwrite conservative permissions on the mySQL user with ALL
+ permissions, if said user exists
+ * Changes to some of the wording of explanations for fields
+* (bug 1734) granting db permissions failed with db usernames containg '-'
+* Add basic check for session support in PHP and die if not present
+
+Maintenance:
+* Fix problem reported on mailing list where re-initialising stats didn't work (can't insert
+ duplicate rows with the same id field)
+* Added --conf option to command line scripts, allowing the user to specify a
+ different LocalSettings.php.
+* Maintenance script to delete unused text records
+* Maintenance script to delete non-current revisions
+* Maintenance script to wipe a page and all revisions from the database
+* Maintenance script to reassign edits from one user to another
+* Maintenance script to find and remove links to a given domain (cleanupSpam.php)
+* Fix --report interval option for dumpTextPass
+
+i18n / Languages:
+* Partial support for Basque language (from wikipedia and meta)
+* (bug 3141) Partial support for Breton language (thanks Fulup).
+* Support for venitian language
+* (bug 1334) LanguageGa.php update
+* Finnish date format was hardcoded, now implemented properly
+* (bug 3190) Added some date format choices for language sr
+* (bug 2753) Some namespaces were not translated in LanguageTa.php (Tamil)
+* (bug 3204) Fix typo breaking special pages in fy localization
+* (bug 3177) Estonian date formats not implemented in LanguageEt.php
+* (bug 1020) Changing user interface language does not work immediately
+* (bug 3271) Updated LanguageNn.php for HEAD
+* Experimental feature to allow translation of block expiry times
+ Implementation only for Finnish currently
+* (bug 3304) Language file for Croatian (LanguageHr.php)
+* (bug 2143) Update Vietnamese interface
+* (bug 3063) Remove some hardcodings from Hebrew localisation
+* (bug 3408) Bulgarian formatNum corrected
+* (bug 1512) Disable x-code interp on Esperanto URLs for now, it does more
+ harm than good under current system by breaking incoming URLs with "ux".
+ (Editing is not affected, just URLs.)
+* (bug 1423) LanguageJa.php update
+* Fix language name for dv
+* (bug 3503) Update LanguageSq.php from sq.wikipedia.org messages
+* (bug 3629) Fix date & time format for Frisian
+* (bug 3334) Namespace changes for Polish
+* (bug 3580) Change default Dutch language file to more neutral
+* (bug 3656) LanguageHr.php - added convertPlural
+* (bug 3414) LanguageBe.php - added convertPlural
+* (bug 3163) Full translation of LanguageBr
+* (bug 3617) Update for portuguese language (pt)
+* Namespaces hacks on LanguagePl
+* (bug 3682) LanguageSr.php - added convertPlural
+* (bug 3694) LanguageTr.php update
+* (bug 3711) Removed invisible unicode characters from LanguageHu
+* (bug 2981) Linktrail for Tamil (ta)
+* (bug 3722) Update of Arabic language (ar) Namespace changes
+* Removed hardcoded Norwegian (no) project namespaces
+* (bug 2324) image for redirects should be without text and oriented according to content language
+* (bug 3666) Don't spew PHP warnings in prefs on unrecognized site language
+* (bug 3817) Use localized date formats in preferences; 'no preference' option
+ localizable as 'datedefault' message. Tweaked lots of languages files...
+* (bug 2721) Regression: Use European number separators for vi: wikis
+* (bug 3961) minor languageDe changes
+* (bug 1984) LanguageKo.php (Korean) update
+* (bug 3804) update of LanguageWa.php file
+* (bug 3886) Update for Portuguese language (pt)
+* (bug 4020) Update namespaces for ms
+* (bug 3922) bidi embedding overrides on category links
+* (bug 4061) Update of Slovene namespace names (LanguageSl.php)
+* (bug 4064) LanguageDe comma changes
+* (bug 3922) Further tweaks to bidi overrides in category list for old
+ versions of Safari and Konqueror
+* Fix custom namespaces on wikis set for Portuguese
+* (bug 4153) Fix block length localizations in Greek
+* (bug 3844) ab: av: ba: ce: & kv: now inherit from LanguageRu.php
+ ii: & za: now inherit from LanguageZn_cn.php
+* (bug 4165) Correct validation for user language selection (data taint)
+* (bug 4192) Remove silly 'The Free Encyclopedia' default sitesubtitle
+* Use content-lang for sitenotice
+* (bug 4233) Update LanguageJa.php
+* (bug 4279) Small correction to LanguageDa.php
+* (bug 4108, 4336) Remove trailing whitespace from various messages, which
+ mucks up message updating to create dupe entries
+* (bug 4389) Fix math options on zh-hk and zh-tw (but not localized)
+* (bug 4392) Update of LanguageSr.php
+* (bug 4382) Frisian numeric format
+* (bug 4424) Update for Spanish language (es) 100% messages translated
+* (bug 4425) Typos in Polish translation
+* (bug 4436) Update for Turkish language (tr)
+* (bug 4413) Update of Farsi language file (LanguageFa.php)
+* Update for LanguageSr (Serbian): magic words
+* (bug 137) MediaWiki:Copyrightwarning hardcoding
+* (bug 4457) Update for Portuguese language (pt)
+* convertPlural breakage fixed a little
+* (bug 4144) Support for Sudanese language (Basa Sunda)
+* Big cleanup:
+ - Removed obsolote, badly or untranslated messages
+ - Removed references to wikipedia/wikimedia etc in messages
+ - Other cleanup, like removing html and javascript and extension calls
+ - Removed hardcoded namespaces: Tt, Ms, Ia, Ga, Fo, Bn, Csb, He, Nv, Oc, Tlh
+ - Removed some useless backwards compatibility hacks
+ - Fixed formatnum on many languages
+* wgAmericanDates check produced incorrect results in languages that don't have
+ a such distinction
+* (bug 4548) Update for Portuguese language (pt): time format
+* (bug 4530) Use consistent name for Kurdish
+* Tweak default "upload disabled" text
+* (bug 4504) Use site language for namespace name resolution
+* (bug 4510) Correct Barnes & Noble bookstore URLs
+* (bug 3991) Allow the operation of wikicode on Protect move only text
+* (bug 4267) Switch dv sd ug ks arc languages to RTL
+* Default main page content improved per bug 4690
+* (bug 4615) Update for Portuguese language (pt)
+* Separated MessagesSl.php as the other languages.
+* (bug 4960) Add additional namespaces variants to Yiddish for compatibility
+* (bug 4805) Removed more wikipedia-references from MessagesUk.php
+* (bug 5015) Update magic words translation in LanguageBe.php
+* (bug 4859) Update for Portuguese messages (pt)
+* (bug 4788) One string for MessagesPl
+* Restriction types now use restriction-* messages instead of ui messages
+* (bug 4685) Slovenian LanguageSl.php hardcodes project namespace
+* (bug 5097) Fix Hungarian language (hu): thousands separator
+* (bug 5098) Update for Portuguese messages (pt)
+* (bug 5113) Spelling error in French language file
+* (bug 5105) Magic words for LanguageAr.php
+* (bug 3993) Variants for Serbian language
+* Typo in English messages file
+* (bug 4114) Spacing in watchlist rows (in editing mode)
+* Update default "exporttext" to reflect that Special:Import exists
+* (bug 4960) Add additional namespaces variants to Yi projects: Yiddish Wikinews fix
+* (bug 5357) Add the icon near the user name also in RTL interfaces
+* (bug 5156) Update for Hebrew language (he)
+* (bug 4497,4704,5010) Added some new language codes.
+* (bug 5362) Piedmontese added
+* (bug 5349) Update for Portuguese messages (pt)
+* (bug 3573) Finished full Greek translation: namespaces
+* (bug 5288) Initial localisation for Az
+* (bug 4361) Fix "allmessagesnotsupportedui" so it doesn't refer to nonexisting
+ page
+* Tweak wording of "allmessagesnotsupporteddb"
+
+Parser:
+* (bug 2522) {{CURRENTDAY2}} now shows the current day number with two digits
+* (bug 3210) Fix Media: links with remote image URL path
+* (bug 3405) Don't use raw letters as aliases of MSGNW: and SUBST:
+* (bug 3412) Clean up date format handling so ~~~~-sigs work with default
+ format as designed. Documentation comments updated.
+* Fix Parser::unstrip on PHP 5.1.0RC4
+* (bug 3797) Don't expand variables and sigs in comments
+* Allow parser cache on redirect targets
+* Run wikitext-escaping on plaintext sigs (no wiki markup, just name)
+* Check for unbalanced HTML tags on raw sigs (markup allowed, but show
+ a warning in prefs and use default sig if not balanced)
+* Respect <noinclude> and <includeonly> during {{subst:}} expansion as well as
+ ordinary templates.
+* Support <includeonly> in templates loaded through preload= parameter
+* (bug 3979) Save correct {{REVISIONID}} into parser cache on edit
+* Substitute {{REVISIONID}} correctly in diff display
+* (bug 1850) Allow red-links on image pages linked with [[:image:foo]]
+* Fix XML validity checks in parser tests on PHP 5.1
+* (bug 4377) "[" is not valid in URLs
+* (bug 4453) fix for __TOC__ dollar-number breakage
+* Convert unnecessary URL escape codes in external links to their equivalent
+ character before doing anything with them. This prevents certain kinds of
+ spam filter evasion.
+* (bug 4783) : Fix for "{{ns:0}} does not render"
+* Improved support for interwiki transclusion
+* (bug 1850) Image link to nonexistent file fixed.
+* (bug 5167) Add {{SUBPAGENAME}} and {{SUBPAGENAMEE}} variables
+* (bug 4949) Missing : in "addedwatchtext" for English and Spanish
+* Allow user-defined functions, which work in a similar way to {{GRAMMAR:}}
+ etc. Registered via an interface similar to tag hooks.
+
+Upload:
+* (bug 2527) Always set destination filename when new file is selected
+* (bug 3076) Support MacBinary-encoded uploads from IE/Mac
+* (bug 2554) Tell users they are uploading too large file
+* Support for a license selection box on Special:Upload, configurable from MediaWiki:Licenses
+* Add 'reupload' and 'reupload-shared' permission keys to restrict new uploads
+ overwriting existing files; default is the old behavior (allowed).
+
+Security:
+* (bug 3244) Fix remote image loading hack, JavaScript injection on MSIE
+* (bug 3280) Respect 'move' group permission on page moves
+* (bug 2613) Clear saved passwords from the form
+* IP privacy fix for blocklist search on autoblocks
+* Security fix for <math>
+* Security fix for tables
+* Security fix for Special:Upload license selection list
+* Add UploadVerification hook for custom file upload validation/security checks
+* Blacklist additional MSIE CSS safety tricks
+* Fix meta robots tag on Special:Version again to avoid listing vulnerable
+ versions for convenient harvesting by automated worms
+* Sanitizer CSS comment processing order fix
+* Forbid usernames that can be interpreted as titles with namespaces, as that
+ leads to hard-to-manage names.
+* (bug 4071) Generate passwords long enough for $wgMinimalPasswordLength
+* Add createpage and createtalk permission keys, allowing a quick
+ switch to disable page creation for anonymous users.
+* (bug 675) Add page protection level for unregistered/new accounts
+* User::isNewbie now uses the registration date and $wgAutoconfirmAge
+* Add 'deletedhistory' permission key for ability to view deleted history
+ list via Special:Undelete. Default is off, replicating the 1.5 behavior,
+ but it can be turned back on for random users to replicate the previous
+ 1.6 dev behavior.
+* Set cookies to secure mode based on use of HTTPS or $wgCookieSecure
+* (bug 4371) Disallow tilde character in signatures
+* Removed broken wgAllowAnonymousMinor and added new group right minoredit
+* Added detection for WMF files (application/x-msmetafile), added this
+ MIME type to the default blacklist. Prevented inline display of images
+ which are not of known image types. This is in response to
+ http://en.wikipedia.org/wiki/Windows_Metafile_vulnerability
+* Blocked users can no longer roll back, change the protection of, or delete/undelete pages
+* Protect against spoofing of X-Forwarded-For header
+* XSS issue : now sanitize search query input (fixed in 1.5rc3)
+* Remove deprecated $wgOnlySysopsCanPatrol references; use User::isAllowed( 'patrol' )
+ per bug 5282. Patch by Alan Harder.
+* Prevent registration/login with the username "MediaWiki default"
+
+Special Pages:
+* Rearranged Special:Movepage form to reduce confusion between destination
+ title and reason input boxes
+* (bug 1956) Hide bot uploads from Special:Newimages
+* (bug 3220) Fix escaping of block URLs in Recentchanges
+* (bug 3284) Ipblocklist paging, substring search
+* Allow filtering of robot edits in Special:Watchlist by stting
+ $wgFilterRobotsWL = true.
+* Fix interlanguage links on special pages when extra namespaces configured
+* (bug 3475) anon contrib links on Special:Newpages
+* Special:Import/importDump fixes: report XML parse errors, accept <minor/>
+* (bug 2369) Add separate message for input box on Special:Prefixindex
+* (bug 3798) DoubleRedirects no longer has hard coded arrows
+* (bug 3803) Fix links on Special:Wantedcategories with miser mode off
+* Fix Special:BrokenRedirects on MySQL 5.0
+* (bug 3807) Fix 'all' in namespaces drop-down on contribs, rc
+* Fail gracefully on invalid namespace in Special:Newpages
+* (bug 3762) Define missing Special:Import UI messages
+* (bug 3761) Avoid deprecation warnings in Special:Import
+* (bug 2894) Enhanced Recent Changes link fixes
+* (bug 4059) fix 'hide minor edits' on Recentchangeslinked
+* (bug 146) List number of category members in Special:Categories
+ (patch by Joel Nothman)
+* (bug 4090) Fix diff links in Special:Recentchangeslinked
+* (bug 4093) '&bot=1' in Special:Contributions now propagate to other links
+* Fix display of old recentchanges records for page moves
+* (bug 360) Let Whatlinkshere track [[:image:foo]] links
+* (bug 3073) Keep search parameter on paging in Special:Newimages
+* Removed Special:Validate, it's been superseded by the Review extension
+* (bug 4359) red [[user:#id]] links generated in [[special:Log]]
+* (bug 1996) Special page to list redirects
+* (bug 4334) Add "watch" links to Special:Unwatchedpages
+* Generate target user page links in Special:Ipblocklist where appropriate
+ (i.e. not an autoblock)
+* Generate link to talk page of the blocker in Special:Ipblocklist, move
+ contribs. link of the target next to their name
+* (bug 2714) Backlink from special:whatlinkshere was hard set as 'existing'
+* Move parentheses out of <a> link in Special:Contributions
+* (bug 3192): properly check 'limit' parameter on Special:Contributions
+* (bug 3187) watchlist text refer to unexistent "Stop watching" action
+* Add block, block log and general log links to Special:Contributions
+* Add contributions link to block log items
+* Added optional "hide own edits" feature to Special:Recentchanges
+* (bug 5018) Anchors for each message in Special:Allmessages
+* Introduce $wgWantedPagesThreshold per bug 5011; Special:Wantedpages will not
+ list pages with less than this number of links. Defaults to 1.
+* (bug 4319) Don't show a "create account" link on the login form when
+ account creation is disabled.
+* JavaScript filter for Special:Allmessages
+* (bug 3047) Don't mention talk pages on Special:Movepage when there isn't one
+* Show links to user page, talk page and contributions page on Special:Newpages
+* Special:Export can now export a list of all contributors to an article (off by default)
+* (bug 5372) Add number of files to Special:Statistics
+* (bug 2871) Links to talk pages in watchlist editing view
+* (bug 5385) Allow hiding anonymous edits on Special:Recentchanges
+* (bug 2544) Illogical error reporting order in Special:Userlogin
+* (bug 5409) Hide "show/hide patrolled edits" in Special:Recentchanges if patrolling
+ is disabled
+* (bug 5447) Convert first letter of username to uppercase before searching in Special:Listusers
+* (bug 759) Wrap redirects on the watchlist editing page in a span, class "watchlistredir"
+* (bug 1862) Namespace filtering in watchlists
+
+Misc.:
+* PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect
+ if running prior to 4.2.0 as it causes the call to fail
+* (bug 3117) Fix display of upload size and type with tidy on
+* (bug 2323) Remove "last" tabindex from history page
+* (bug 3116) Division by zero on [[Image:Foo.png|123x123px|]]
+* Fix display of read-only lockfile message
+* Include software-visible client IP address in Special:Version comment
+ as a proxy debugging aid
+* (bug 3170) Page Title failed to obey MediaWiki:Pagetitle.
+ wikititlesuffix was removed
+* Add ability to break off certain debug topics into additional log files;
+ use $wgDebugLogGroups to configure and wfDebugLog() to log.
+* Edit conflict on recreation of deleted page
+* (bug 3216) Don't show empty warning page when no warnings.
+* (bug 3218) Use proper quoting on history Compare Revisions button
+* Fix upgrade from 1.4 due to version number check breakage [for rc future]
+* Fix upgrade from 1.4 with no old revisions
+* Remove "info" editing toolbar that was shown in browsers which do not
+fully support the editing toolbar, but was found to be too confusing.
+* Don't override edit conflict suppression on section edits; section merging
+ should provide the expected transparency here and fits usage patterns better.
+* (bug 3292) Fix move-over-redirect test when current entries are not plaintext
+* (bug 2078) Don't hide watch tab on preview
+* Fix regressions in ChangesList traditional layout
+* Fix edit on double-click for move-protected pages in Classic skin
+* (bug 3485) Fix bogus warning about filename capitalization when off
+* (bug 2570) Add 'watch this page' checkbox on uploads, watch uploads
+ by default when 'watchdefault' option is on
+* Add options to dumpBackup.php for making split/partial dumps by page id
+* Added filter options, compression piping, and multiple output streams for
+ dumpBackup.php
+* (bug 3595) Warn and abort if importDump.php called in read-only mode.
+* (bug 3598) Update message cache on message page deletion, patch by Tietew
+* Added separate noarticletext and newarticletext messages for logged in and anon users.
+* (bug 3332) Installation now uses Monobook, validates, plus usability improvements.
+* (bug 3660) Update diff3 detection to work with Windows/Cygwin
+* (bug 2330) Don't do funny thinks with "links" in MediaWiki:Undeletedtext
+* Two-pass data dump for friendliness to the DB (--stub, then dumpTextPass.php)
+* Data dump 'prefetch' mode to read normalized text from a prior dump
+ (requires PHP 5, XMLReader extension)
+* (bug 2773) Print style sheet no longer overrides RTL text direction
+* (bug 2938) Update MediaWiki:Exporttext to be more general
+* Various fixes
+* Fix wfMsg*() replacements; args containing literal $[2-9] were wiped
+* Added @import for [[MediaWiki:Common.css]] to all skins
+* Edit box now remembers scrollbar position on preview
+* (bug 3816) Throw edit conflict instead of fatal error when a page is
+ moved or deleted during section edit
+* (bug 3771) Handle internal functions in backtrace in wfAbruptExit()
+* (bug 3291) 'last' diff link for last history line when not at end
+* (bug 3667) Add missing global in page move code
+* (bug 2885) Remove unnecessary reference parameter which broke classic skin
+ talk notification on PHP 5.0.5
+* (bug 3852) "Redirected from" link no longer obscured on double-redirects
+* changed directory hierarchy in images/math/. System upgrades from old to
+ new hierarchy on the fly.
+* (bug 3487) Fix category edit preview with preview-on-bottom
+* (bug 918) Search index incorrectly joined words at == headings ==
+* (bug 3877) Render math images into temp directory, then move to hashed
+ subdir so you can render new math images and have them work
+* (bug 2392) Fix Atom items content type, upgrade to Atom 1.0
+* Allow $wgFeedCacheTimeout of 0 to disable feed caching
+* Fix WebRequest::getRequestURL() to strip off the host bits squid prepends
+* Require POST for action=purge, to stop bots from purging the cache
+* Added local message cache feature ($wgLocalMessageCache), to reduce bandwidth
+ requirements to the memcached server.
+* (bug 3562) for go search, try Caps-Variants-Broken-At-Non-Whitespace
+* (bug 2569) Use PATH_SEPARATOR instead of trying to guess based on
+ DIRECTORY_SEPARATOR (was wrong on NetWare)
+* (bug 2740) Accept image deletions on 'enter' submit from MSIE
+* (bug 3939) Don't try to load text for interwiki redirect target
+* (bug 3948) Avoid notice warning in debug statement in bad search
+* Recognize Special:Search consistently so read whitelist works
+* (bug 3999) Change atom 1.0 feed id; had been unnecessarily complex due to
+ unclear language in the spec. Now using the URL, same as the permalink,
+ which someone else will probably whine about because it's not 'perma'
+ enough or something.
+* (bug 4014) Fix include mode for Allpages on small page sets
+* (bug 3996) Fix text for new entries in RC RSS/Atom feed
+* (bug 3065) Update both watched namespaces when renaming pages
+* Changed mail form to have a bigger message entry box (like for editing
+ a page
+* Fix ulimit parameters for wfShellExec when memory_limit is specified in 'm'
+* (bug 2111) Collapsable exif metadata table, clean up display
+* Reduce fractions in display of exif exposure time
+* (bug 4048) Optional footer link to site privacy policy
+* Don't die() when update.php reaches the end of the warning count
+* (bug 1915) Fix edit links when 'direction' used with 'oldid';
+ using revision ID reported via OutputPage; Skin::editUrlOptions()
+* Remove obsolete 'redirect=no' on some edit links
+* Include oldid for the second revision on edit link on diff view
+* (bug 4035) Fix prev/next revision links on edit page
+* (bug 4100, 3049) Add 'edittools' message to hold edit tools, put it
+ on Special:Upload as well as edit, rearrange edit page pieces a bit.
+ Copyright warning now above the buttons to ensure it's visible,
+ template list at the bottom so it can grow.
+* Optional summary parameter to action=rollback, for user javascript
+* (bug 4167) Fix regression caused by patch for bug 153
+* (bug 4169) Use $wgLegalTitleChars in pipe trick conversions
+* (bug 4170) Decode HTML character escapes in sort key
+* (bug 4201) Fix user-talk mode for Enotif, and general code cleanup
+* (bug 4214) Skip redundant action text inserts into the HTML <title>
+* (bug 4212) Skip redundant meta-robots tag for default settings
+* Fix regression: old version missing from edit links in Nostalgia skin
+* (bug 1600) Trigger edit conflict on duplicate section=new submissions
+* (bug 4001) Use local variables properly in wikibits.js akeytt()
+* Fix regression: old version missing from edit links on CSS/JS pages
+* (bug 3211) Include Date, To mail headers when using PEAR::Mail
+* (bug 3407) Fix encoding of subject and from/to headers on notification
+ mails; userMailer() now takes a MailAddress wrapper object instead of
+ a raw string to abstract things a level.
+* Fixed --server override on dumpTextPass.php
+* Added plugin interface for dumpBackup, so additional filters and output
+ sink types can be registered at runtime from an extension
+* (bug 349) Fix for some numeric differences not being highlighted
+ patch by Andrius Ramanauskas
+* (bug 4298) Include rc_id on enhanced RC singleton diff links for patrolling
+* Did some refactoring on ChangesList.php merging dupe code
+* (bug 1586) Fix interwiki generator for wikimedia obscure domains
+* (bug 3493) Mark edits patrolled when they are reverted
+ patch by Leon Planken
+* Removed experimental Amethyst skin from default set
+* Upgrade old skin preferences properly at Special:Preferences
+ (used to spontaneously switch to Classic skin for old numeric pref records)
+* (bug 3424) Update page_touched for category members on category page creation
+* Log views show message when no matches
+* Fix raw sitenotice display on database error
+* Fix autoconfirm check for old accounts
+* (bug 4368) Don't show useless empty preview on new section creation
+* Don't show useless empty preview on new page creation
+* (bug 4411) Fix messages diff link for classic skin
+* (bug 4385) Separate parser cache entries for non-editing users, so section
+ edit links don't vanish / appear unwanted on protected pages
+* (bug 2726, 3397) Fix [[Special:]] and [[:Image]] links in action=render
+* (bug 4419) Remove obsolete magnify.png.old
+* Removed $wgUseCategoryMagic option, categories are now enabled unconditionally
+* (bug 3318) UI workarounds for disabled items in license selector
+ MSIE/Win: items now grayed out, JS will revert to 'non selected' if clicked
+ Safari: JS will revert to 'non selected' if clicked (but not gray)
+ MSIE/Mac: indented items now visible (JS hack)
+* (bug 714) "plainlinks" class issues in IE, Opera
+* (bug 4317) Inconsistent "broken redirects" messages
+* Default interface text for "selflinks" tweaked
+* (bug 3194) default implementation of translateBlockExpiry
+ which uses ipboptions
+* (bug 4446) $wgExportAllowHistory option to explicitly disable history in
+ Special:Export form, 'exportnohistory' message to translate live hack.
+* Maintenance script to delete unused user accounts
+* (bug 912) Search box easier to reach in text browsers (lynx, links)
+* $wgParserCacheExpireTime added
+* Skip loading of RecentChange.php except where needed
+* Enforce $wgSVGMaxSize when rendering, even for SVGs with a very large source
+ size. This is necessary to limit server memory usage.
+* Cleanup and error checking on Special:Listredirects
+* Clear up some instances of old OutputPage::sysopRequired() function usage
+* Improve "upload disabled" notice
+* Move parts of index.php to include/Wiki.php in an attempt to both cleanup index.php
+ and create a MediaWiki-class mediaWiki base object
+* (bug 4104) Added OutputPageBeforeHTML hook for tweaking primary wiki output
+ HTML on final output (cached or not)
+* Avoid PHP notice on command-line scripts if empty argument is passed ('')
+* (bug 4571) Partial fix hack for {{fulllurl:}} in action=render
+* (bug 3502) Bowtie symbol for TeX
+* (bug 4000) Support for \textstyle et al. in <math>
+* (bug 1663) support color in TeX formulas
+* (bug 2026) missing glue around \not= (TeX)
+* (bug 4576) Missing '>' broke license selector's first option in IE, Opera
+* Override $wgLocaltimezone in parser tests for us outside Iceland and UK
+* Fix extra whitespace at end of Wiki.php, DESTROYS XML OUTPUT
+* Remove redundant 'echo' statements from MonoBook.php
+* (bug 1103) Fix up redirect handling for images, categories
+ Redirects are now followed from the top-level, outside of the Article
+ content loading and viewing, for clarity and consistency.
+* (bug 4104) 'OutputPageBeforeHTML' hook to postprocess article HTML on
+ page view (comes after parser cache, if used). Patch by ThomasV.
+* Linker::formatComment corrupted the passed title object on PHP 5
+ if the comment included a section link. Use clone() to make a safe copy.
+* Add wfClone() wrapper since we're still using PHP 4 on some servers.
+* Remove obsolete killthread.php
+* Added wfDie() wrapper, and some manual die(-1), to force the return code
+ to the shell to return nonzero when we crap out with an error.
+* Allow input of the stub from a compressed file instead of stdin
+ for dumpTextPass.php; easier to get errors back on the shell
+* Added an attractive space on the namespace selector on contribs
+* Move PHP 5-friendly XHTML doctype hack to Sanitizer, use for sig checks.
+ Fixes use of named entities in sigs on PHP 5
+* (bug 4482) Include move comment on the null edit as well as the redirect
+* (bug 3990) Use existing session name if session.auto_start is on
+ Fixes checks for open sessions, such as the cookie warning on login.
+ Patch by Zbigniew Braniecki.
+* Add cache-safe alternate sitenotice for anonymous users. (MediaWiki:Anonnotice)
+ This is displayed instead of the regular sitenotice, if it exists. If not, the
+ regular sitenotice shows. If that doesn't exist, the value of $wgSiteNotice is used,
+ and if that's null, then nothing is shown.
+* Spit the generated LocalSettings code out during the installer as an aid
+ to debugging issues. (Keep this?)
+* Use __FILE__ to form path in new LocalSettings.php, so it stays accurate
+ when the directory is relocated for typical usage.
+* Auto-update $wgCacheEpoch when LocalSettings.php changes on new installs.
+ For typical usage this will be a light burden and should reduce confusion
+ when the configuration is edited.
+* Fix $wgCacheEpoch's effect on client-side caching.
+* (bug 1122) gray out 'older revision' when viewing first article revision.
+* Clearer message in DefaultSettings.php: edit LocalSettings.php instead
+* MonoBook skin top link id changed from "contentTop" to "top" (shared with
+ name attribute)
+* (bug 3350) Missing label for move talk page checkbox.
+* (bug 2108) Sort entries when using category browser
+* (bug 2393) Fix MIME type for Atom feeds ( application/rss+atom )
+* Add ".deps.php" include-file preloaders for some dynamically-loaded
+ language and skin classes. Should help with the broken base-class
+ problem under PHP 5 with APC as opcode cache. See details:
+ http://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html
+* Small changes to tabs in Monobook skin c/o Chris Ware
+* (bug 4679) Work around buggy basename() function in PHP5, which breaks
+ uploads of files starting with multibyte characters on Linux.
+ wfBaseName() doesn't suffer this bug, and understands backslash on
+ both Unix and Windows.
+* (bug 3603) headscripts variable not hooked up to MonoBook skin
+* Allow local cdb-based interwiki cache
+* Use the "block", not the "protect" permission, when determining whether to
+ show a "block user" link in the toolbox
+* Fix backup dump text prefetch for XMLReader constant changes in PHP 5.1
+* Suppress useless percentage indicator on output from 7za during dumps
+* (bug 4633) Add (previous 200) (next 200) also above catlinks
+* (bug 4686) Fix regression where ?diff=0&oldid=0 caused fatal error on
+ pages with only one revision. Fixes message diff link on first edit.
+* Fix dependence on hardcoded UNIQ_PREFIX in LanguageConverter.php
+* Do not check lag on external storage servers
+* Do not tidy interface messages (unless full tidy is set)
+* Do not trust equality propagation and give more hints to MySQL
+ optimizer for revision fetches (avoids index scans)
+* Use revision rate for ETA in dump generation; it tends to be more stable
+ than the per-page count for full-history dumps.
+* Include timestamp in wfDebugLog breakouts
+* (bug 4469) Namespace-specific notice to be displayed below site-notice
+ Edit messages like "MediaWiki:Namespacenotice-" plus namespace name
+ which is blank for main namespace, or like e.g. "User_talk"
+* Adjust user login/creation form hooks to work with a captcha plugin
+* (bug 1284) Inline styles for diffs in Recent Changes RSS/Atom feeds
+* (bug 4824) IE7 beta 2 broke compatibility with PNG logo workarounds,
+ and seems to work ok with other bits. No longer including the IE
+ workarounds JavaScript for IE 7 and above.
+* Fix extra namespace for Bulgarian
+* (bug 4303) Add $wgFavicon to change the shorticon icon link from
+ the default /favicon.ico or disable it (if set to false)
+* (bug 3347) strip linebreaks in math error source
+* (bug 4841) Warning for non-logged-in edits
+* (bug 4867) Leave invalid EXIF date fields unformatted instead of
+ showing a bogus current timestamp
+* Reset $wgActionPaths during parser test; corrects some false failures
+ in the automated test report.
+* (bug 4875) Define a div containing the shared image description
+* (bug 4860) Expose Title->userCan() as Hooks
+* (bug 4828) Fix genitive month-name variable for cs, pl, uk
+* (bug 4842) Fix 'show number of watching users' with enhanced RC
+* (bug 4889) Fix image talk namespace for Tamil
+* (bug 4147) Added cleanupWatchlist.php to clear out bogus watchlist entries
+* (partial bug 3456) Disable auto redirect to Main Page after account creation
+* (bug 4824) Separate out IE7 CSS compat hacks, fix for RTL pages
+* Added support for wikidiff2 and similar external diff engines.
+* Allow cookies to be shared between multiple wikis with a shared user database
+* Blocking some Unicode whitespace characters in usernames. Should check
+ if some or all should be blocked from all page titles.
+* Unknown log types no longer throw notices everywhere in RecentChanges
+* (bug 4502, 5017) Don't render potentially hostile deleted page contents
+ on Special:Undelete by default; show source, with an optional preview.
+ The revisions list no longer shows the latest text by default, so it can
+ still be operated if the text is hostile.
+* (bug 5013) Check for existence on "return to" links
+* Removed trailing whitespace on a bunch more messages.
+* Fix missing bad title check in Special:Booksources
+* Remove empty booksources string in fy
+* Avoid corrupting <gallery> inside <!-- comment -->
+* Remove legacy PHPTal code, hasn't been maintained in ages.
+* Tweak Userlogin include order for APC issue
+* Don't try to link to current page on protection tab
+* More exact checking in Title::equals() to fox moves of numerically similar
+ page titles. (Odd hex title bug on 64-bit.)
+* Fix explicit s-maxage=0 on raw pages; should help with proxy issues in
+ generated stylesheets... hopefully...
+* (bug 4685) More fixes for Slovenian project namespace
+* Fixed and enhanced a little the Live Preview, which had been broken for some time
+* Added article size limit, $wgMaxArticleSize
+* (bug 4974) Don't follow redirected talk page on "new messages" link
+* (bug 4970) Make category paging limits configurable
+* (bug 4535) Warn user when editing CSS or JS subpage of a skin that doesn't exist
+* Make Live Preview an user preference, still controllable by the global variable
+* Rename the stub LanguageAls / LanguageGem_alsation to LanguageGsw to follow
+ updated language code assignments
+* (bug 5081) Remove bogus fix for invalid characters in links which simply
+ broke use of legitimate multiple whitespace characters in bracketed link.
+* (bug 4838) Add relative oldids (prev, next, cur) for raw pages
+ Patch by Lupin
+* (bug 5086) Force image resize dimensions on ImageMagick, as for instance
+ "-resize 100x35!"; some thumbs were off due to differences in rounding and
+ would be generated smaller than expected.
+* (bug 5062) Width sometimes one pixel short when using maximum heights
+* Purge thumbnails and metadata cache for action=purge on an image page
+* (bug 4273) Bounce back with a message when attempting to submit a new comment
+ with an empty main textbox (user probably hit Enter in subject field)
+* (bug 5141) Gracefully handle the new account link when createaccount off
+* (bug 5150 and related) Fix missing ID attribute in HTML namespace selector
+* (bug 5152) Proper HTML escaping on subpage breadcrumbs
+* (bug 4855) Section edit links now have the section name in the title attribute.
+* (bug 2115) Support shift-selecting multiple checkboxes with JavaScript.
+* (bug 5161) Don't try to load template list for nonexistent pages
+* (bug 5228) Workaround for broken LanguageConverter title overrides; avoid
+ unnecessary hidden UI work when watch/unwatch is performed on edit
+* Fixed bogus master fallback in external storage
+* (bug 5246) Add speak:none to "hiddenStructure" class in main.css
+* Further work on rev_deleted; changed to a bitfield with several data-hiding
+ options. Not yet ready for production use; Special:Revisiondelete is
+ incomplete, and the flags are not preserved across page deletion/undeletion.
+ To try it; add the 'deleterevision' permission to a privileged group.
+* (bug 5270) Fix broken linktrail for br, cv, fr, hr, nn, oc, ta, wa
+* Add a clickable contribs link in user tool links (rc, watchlist, diff view)
+ to see how people like it. (There was one in the old hacked-up diff view.)
+* (bug 5236) Load wikibits.js before site-customized javascript
+* (bug 4119) Workaround for <nowiki> following link in Walloon; remove capitals
+ from linktrail, as they're not used anywhere else.
+* (bug 4781) Output links with the percent-encoding they're supplied with;
+ save the normalization for internal link storage. The normalization is a bit
+ buggy and can make incorrect foldings in the query string and such, so isn't
+ reliable beyond the hostname where it's used for the spam bulk checker.
+* Don't URL-decode in the title attribute for URL links; it can produce false
+ results that don't code back to their original values.
+* (bug 4611) Add user preference (default on) to add new pages to creators's watchlist
+* (bug 5286) Fix regression in display of missing/bad revision IDs
+* (bug 4729) Add user preference that marks a user's edits as patrolled if user is able to
+* (bug 4630) Add user preference to prompt users when entering blank edit summaries
+* Added optional suggest feature for the search box. Set wgUseAjax to true to
+ enable it.
+* (bug 5277) Use audio/midi rather that audio/mid
+* (bug 5410) Use namespace name when a custom namespace's nstab-NS message is nonexistent
+* (bug 5432) Fix inconsistencies in cookie names when using table prefixes
+* Additional protections against HTML breakage in table parsing
+* (bug 5355) Include skin name and style JS settings in page source;
+ fixes regression where Opera 6/7 and KHTML CSS fixes weren't applied
+ when wikibits.js was moved up before user JS inclusion.
+* Added $wgColorErrors: if set, database error messages will be highlighted
+ when running command-line scripts in a Unix terminal.
+* (bug 5195) rebuildrecentchanges.php works again; Database::insertSelect now
+ has a parameter for select options.
+* Fix updateSearchIndex.php for new schema
+* Fix bogus "filename too short" error when uploading files with a period in the base
+ name, e.g. "Mr. Zee.png"
+* (bug 2139) Show page title in subtitle when viewing "read only" page
+* (bug 5452) Update language name for Cree
+
+
+
+----
+
+== MediaWiki 1.5.8 ==
+
+March 26, 2006
+
+MediaWiki 1.5.8 is a security and bugfix maintenance release.
+
+A bug in decoding of certain encoded links could allow injection of raw
+HTML into page output; this could potentially lead to XSS attacks.
+
+Some minor UI fixes were also made, see the change log at the bottom of
+this file.
+
+
+== MediaWiki 1.5.7 ==
+
+March 2, 2006
+
+MediaWiki 1.5.7 is a bugfix maintenance release.
+
+Most importantly, a security issue in the installer has been fixed. The bug
+affects new installations of 1.5.6 only. If the user specified the MySQL root
+password, to allow the installer to create an unprivileged account, the
+installer would not only create the new account but also change the root
+password to be equal to the password of the new account.
+
+Anyone affected by this bug will need to change the root password back
+manually. For information about how to change passwords in MySQL please see:
+http://dev.mysql.com/doc/refman/5.1/en/passwords.html
+
+This version includes fixes for compatibility with Internet Explorer 7
+beta 2, and various other bugs; see the full changelog at the end of
+the release notes.
+
+
+== MediaWiki 1.5.6 ==
+
+January 19, 2006
+
+MediaWiki 1.5.6 is a security and bugfix maintenance release.
+
+A bug in edit comment formatting could send PHP into an infinite loop
+if certain malformed links were included. In most installations, this
+would cause the script to fail after PHP's 30-second failsafe timeout.
+
+Some improvements have been made to the installer which should make
+installation possible on a system with a broken MySQL "root" account.
+
+For several other minor fixes, see the complete changelog at the end
+of this file.
+
+
+== MediaWiki 1.5.5 ==
+
+January 5, 2006
+
+MediaWiki 1.5.5 is a security and bugfix maintenance release.
+
+Detection for uploads of Windows Metafile (.wmf) images has been added
+to help protect against a client-side vulnerability in unpatched Microsoft
+Windows operating systems.
+
+Sites which have enabled uploads and added non-standard file types
+(such as .ogg, .doc, or .pdf) should upgrade to this release to ensure
+that malicious .wmf files can't be uploaded with a fake extension;
+such files could put visitors to the site at risk.
+
+For more details on this, see:
+http://en.wikipedia.org/wiki/Windows_Metafile_vulnerability
+
+Additionally, a maintenance script removeUnusedAccounts.php has been added;
+this replaces an older Perl script which had not been updated for the new
+schema in 1.5.
+
+
+== MediaWiki 1.5.4 ==
+
+December 21, 2005
+
+MediaWiki 1.5.4 is a security and bugfix maintenance release.
+
+A hardcoded internal placeholder string has been replaced with a random
+one. This closes a hole where security checks in inline style attributes
+could be bypassed, injecting JavaScript code that could execute in
+Microsoft Internet Explorer.
+
+Other browsers would not be vulnerable.
+
+Several minor fixes are included in this release, most notably a fix
+to clear the "you have new messages" flag properly for usernames
+containing spaces when e-mail notification is enabled.
+
+See the changelog at the end of the release notes for a full list of
+fixes.
+
+
+== MediaWiki 1.5.3 ==
+
+December 4, 2005
+
+MediaWiki 1.5.3 is a security and bugfix maintenance release.
+
+Validation of the user language option was broken by a code change in
+May 2005, opening the possibility of remote code execution as this
+parameter is used in forming a class name dynamically created with
+eval().
+
+The validation has been corrected in this version. All prior 1.5 release
+and prelease versions are affected; 1.4 and earlier and not affected.
+
+Additionally several bugs have been fixed; see the changelog later in
+this file for a complete list.
+
+
+== MediaWiki 1.5.2 ==
+
+November 2, 2005
+
+MediaWiki 1.5.2 is a bugfix maintenance release.
+
+A change in PHP 4.4.1 and PHP 5.1.0RC broke handling of extension and
+<pre> sections, causing garbage data to be inserted in output and saved
+edits. This version works around the change.
+
+Several other glitches with MySQL 5.0 and PHP 5.0.5 were also fixed;
+see the change log below for a complete list.
+
+
+== MediaWiki 1.5.1 ==
+
+October 26, 2005
+
+MediaWiki 1.5.1 is a bugfix and security maintenance release, and is a
+recommended upgrade for all installations.
+
+This release includes further corrections to the inline CSS style sanitation
+which works around a JavaScript "feature" on Microsoft Internet Explorer.
+Users of Microsoft Internet Explorer for Windows may be vulnerable to
+XSS injections on prior versions; users of standards-compliant browsers
+are not vulnerable.
+
+Major fixes include:
+* Image pages work again with resizing disabled
+* Works in MySQL 5.0 strict mode
+
+There is experimental support in this release for explicitly declaring
+the UTF-8 charset in the database; this has been tested with MySQL 5.0.15
+but should work on 4.1 as well.
+
+IMPORTANT: Changing this setting on an existing wiki may produce interesting
+data corruption, depending on server configuration. Page contents should,
+usually, be unaffected, but page titles and other items may be. Limitations
+in MySQL's Unicode support mean that characters outside the BMP cannot be used
+in page titles or various other fields when using this mode.
+
+Table definitions are in maintenance/mysql5/tables.sql, and the runtime
+option to send 'SET NAMES utf8' is set by $wgDBmysql5 = true.
+
+(MySQL 3.23.x and 4.0.x do not support character set declarations; on these
+versions MediaWiki simply works with UTF-8 data and MySQL is blissfully
+unaware of it.)
+
+
+
+== MediaWiki 1.5.0 final ==
+
+October 5, 2005
+
+MediaWiki 1.5.0 is the new stable release branch of MediaWiki, and is
+recommended for all new installations.
+
+Any wikis running a 1.5 beta or release candidate are strongly recommended
+to upgrade to the final release, which includes a number of bug fixes and
+a security fix for CSS bugs in Microsoft Internet Explorer.
+
+IMPORTANT: Running a 1.3 or 1.4 wiki and don't want to jump to 1.5 yet?
+Be sure to upgrade to 1.3.17 or 1.4.11, also released today. Versions
+prior to 1.3.16 and 1.4.10 have a serious data corruption bug which is
+triggered by a spambot known to operate in the wild.
+
+
+=== What's new in 1.5? ===
+
+Schema:
+ The core table schema has changed significantly. This should make better
+ use of the database's cache and disk I/O, and make significantly speed up
+ rename and delete operations on pages with very long edit histories.
+
+ Unfortunately this does mean upgrading a wiki of size from 1.4 will require
+ some downtime for the schema restructuring, but future storage backend
+ changes should be able to integrate into the new system more easily.
+
+Permalinks:
+ The current revision of a page now has a permanent 'oldid' number assigned
+ immediately, and the id numbers are now preserved across deletion/undeletion.
+ A permanent reference to the current revision of a page is now just a matter
+ of going to the 'history' tab and copying the first link in the list.
+
+Page move log:
+ Renames of pages are now recorded in Special:Log and the page history.
+ A handy revert link is available from the log for sysops.
+
+Editing diff:
+ Ever lost track of what you'd done so far during an edit? A 'Show diff'
+ button on the edit page now makes it easy to remember.
+
+Uploads:
+ It's now possible to specify the final filename of an upload distinct
+ from the original filename on your disk.
+
+ An image link for a missing file will now take you straight to the upload page.
+
+ More metadata is pre-extracted from uploaded images, which will ease pressure
+ on disk or NFS volumes used to store images. EXIF metadata is displayed on
+ the image description page if PHP is configured with the necessary module.
+
+ If .svg files are added to the upload whitelist, you can choose to render
+ them to rasterized .png images for inline display using one of several
+ external helper programs. See DefaultSettings.php for SVG options.
+
+User accounts:
+ There are some changes to the user permissions system, with assignable
+ 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
+
+E-mail:
+ User-to-user e-mail can now be restricted to require a mail-back confirmation
+ first to reduce potential for abuse with false addresses.
+
+ Updates to user talk pages and watchlist entries can optionally send e-mail
+ notifications.
+
+External hooks:
+ A somewhat experimental interface for hooking in an external editor
+ application is included.
+
+And...
+ A bunch of stuff we forgot to mention.
+
+
+=== What's gone? ===
+
+Latin-1:
+ Wikis must now be encoded in Unicode UTF-8; this has been the default for
+ some time, but some languages could optionally be installed in Latin-1 mode.
+ This is no longer supported.
+
+ You can check if your current wiki is in Latin-1 mode by using your browser's
+ "view source"; look for a line like this:
+
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ If it says charset=utf-8, you're ready. If it says charset=iso8859-1,
+ you may need to convert your data. (English-language wikis avoiding
+ any accented characters may be able to get away without conversion.)
+
+MySQL 3.x:
+ Some optimization hacks for MySQL 3.x have been removed as part of the schema
+ clean-up (specifically, the inverse_timestamp fields).
+
+ MediaWiki 1.5 may still run on 3.x, but wikis of non-trivial size should
+ very seriously consider upgrading to a more modern release. MySQL 3.x support
+ will probably be entirely dropped in the next major release.
+
+Special:Maintenance
+ These tools were, ironically enough, not really maintained. This special
+ page has been removed; insofar as some of its pieces were useful and haven't
+ already been supplanted by other special pages they should be rewritten in
+ an efficient and safe manner in the future.
+
+
+=== Caveats ===
+
+Upgrade:
+ Wikis in Latin-1 encoding are no longer supported; only Unicode UTF-8.
+ A new option $wgLegacyEncoding is provided to allow on-the-fly recoding of
+ old page text entries, but other metadata fields (titles, comments etc) need
+ to be pre-converted. The standard upgrade process does not yet fully automate
+ this, but you can try the alternate partial-upgrader in upgrade1_5.php.
+
+ The upgrade from 1.4 to 1.5 schema has not been tested for all cases, so
+ it's possible you may experience problems in some combinations.
+
+Backups:
+ The text entries of deleted pages are no longer removed from the main
+ text table on deletion. If you provide public backup dumps of your databases,
+ you will probably want to use the new XML-format dump generator, available
+ as maintenance/dumpBackup.php.
+
+ For more information on how we run our own public data dumps at Wikimedia,
+ see http://meta.wikimedia.org/wiki/Data_dumps
+
+PostgreSQL:
+ The table definitions for PostgreSQL install are out of date. PostgreSQL
+ support may return in later releases, pending appropriate patches.
+
+MySQL 4.1+:
+ Some users may encounter installation problems with MySQL 4.1 or higher
+ due to strange charset encoding / collation configurations. Try setting
+ to 'latin1' or 'utf8' if you encounter problems.
+
+
+
+== MediaWiki 1.5 release candidate 4 ==
+
+August 29, 2005
+
+MediaWiki 1.5rc4 is a preview release of the new 1.5 release series.
+It fixes compatibility with PHP 5.1, and corrects two cross-site scripting
+security bugs:
+
+* <math> tags were handled incorrectly when TeX rendering support is off,
+ as in the default configuration.
+* Extension or <nowiki> sections in Wiki table syntax could bypass HTML
+ style attribute restrictions for cross-site scripting attacks against
+ Microsoft Internet Explorer
+
+Wikis where the optional math support has been *enabled* are not vulnerable
+to the first, but are vulnerable to the second.
+
+
+
+== MediaWiki 1.5 release candidate 3 ==
+
+August 24, 2005
+
+MediaWiki 1.5rc3 is a preview release of the new 1.5 release series.
+It fixes several major problems in 1.5rc2:
+
+* Fixed a cross-site scripting injection in the search form
+ (broken since 1.5beta1)
+
+* Fixed upgrades from 1.4 database schema
+ (broken since 1.5rc2)
+
+1.3 and 1.4 releases are not vulnerable to the XSS bug, but anyone
+running an earlier 1.5 beta or release candidate should upgrade
+immediately.
+
+
+== MediaWiki 1.5 release candidate 2 ==
+
+August 23, 2005
+
+MediaWiki 1.5rc2 is a preview release of the new 1.5 release series.
+Numerous bug fixes since last beta, plus a security fix; see change
+log below for full details.
+
+A flaw in the interaction between extensions and HTML attribute
+sanitization was discovered which could allow unauthorized use
+of offsite resources in style sheets, and possible exploitation
+of a JavaScript injection feature on Microsoft Internet Explorer.
+
+This version expands the returned text and properly checks it
+before output.
+
+A 1.5rc1 release was mistakenly made from the incorrect source code
+branch; 1.5rc2 is identical to the actual 1.5rc1 in revision control
+except for version number.
+
+
+== MediaWiki 1.5 beta 4 ==
+
+July 30, 2005
+
+MediaWiki 1.5 beta 4 is a preview release of the new 1.5 release series.
+A number of bugs have been fixed since beta 3; see the full changelist below.
+
+
+== MediaWiki 1.5 beta 3 ==
+
+July 7, 2005
+
+MediaWiki 1.5 beta 3 is a preview release of the new 1.5 release
+series, with a security update over beta 2.
+
+Incorrect escaping of a parameter in the page move template could
+be used to inject JavaScript code by getting a victim to visit a
+maliciously constructed URL. Users of vulnerable releases are
+recommended to upgrade to this release.
+
+Vulnerable versions:
+* 1.5 preview series: n <= 1.5beta2 vulnerable, fixed in 1.5beta3
+* 1.4 stable series: 1.4beta6 <= n <= 1.4.5 vulnerable, fixed in 1.4.6
+* 1.3 legacy series: not vulnerable
+
+This release also includes several bug fixes and localization updates.
+See the changelog at the end of this file for a detailed list.
+
+
+
+== MediaWiki 1.5 beta 2 ==
+
+July 5, 2005
+
+MediaWiki 1.5 beta 2 is a preview release of the new 1.5 release series.
+While most exciting new bugs should have been ironed out at this point,
+third-party wiki operators should probably not run this beta release
+on a public site without closely following additional development.
+
+Anyone who _has_ been running beta 1 is very very strongly advised to
+upgrade to beta 2, as it fixes many bugs from the previous beta including
+a couple of HTML and SQL injections.
+
+This release should be followed by one or two release candidates and
+a 1.5.0 final within the next few weeks.
+
+Beta upgraders, note there are some minor database changes. For upgrades
+from 1.4, see the file UPGRADE for details on significant database and
+configuration file changes.
+
+Beta 2 includes a preliminary command-line XML wiki dump importer tool,
+maintenance/importDump.php, paired with maintenance/dumpBackup.php.
+These use the same format as Special:Export and Special:Import, able
+to package a wiki's entire page set independent of the backend database
+and compression format.
+
+
+== MediaWiki 1.5 beta 1 ==
+
+June 26, 2005
+
+MediaWiki 1.5 beta 1 is a preview release, pretty much feature complete,
+of the new 1.5 release series. There are several known and likely a number
+of unknown bugs; it is not recommended to use this release in a production
+environment but would be recommended for testing in mind of an upcoming
+deployment.
+
+A number of significant changes have been made since the alpha releases,
+including database changes and a reworking of the user permissions settings.
+See the file UPGRADE for details of upgrading and changing your prior
+configuration settings for the new system.
+
+
+
+== MediaWiki 1.5 alpha 2 ==
+
+June 3, 2005
+
+MediaWiki 1.5 alpha 2 includes a lot of bug fixes, feature merges,
+and a security update.
+
+Incorrect handling of page template inclusions made it possible to
+inject JavaScript code into HTML attributes, which could lead to
+cross-site scripting attacks on a publicly editable wiki.
+
+Vulnerable releases and fix:
+* 1.5 prerelease: fixed in 1.5alpha2
+* 1.4 stable series: fixed in 1.4.5
+* 1.3 legacy series: fixed in 1.3.13
+* 1.2 series no longer supported; upgrade to 1.4.5 strongly recommended
+
+
+== MediaWiki 1.5 alpha 1 ==
+
+May 3, 2005
+
+This is a testing preview release, being put out mainly to aid testers in
+finding installation bugs and other major problems. It is strongly recommended
+NOT to run a live production web site on this alpha release.
+
+** WARNING: USE OF THIS ALPHA RELEASE MAY INFEST YOUR HOUSE WITH **
+** TERMITES, ROT YOUR TEETH, GROW HAIR ON YOUR PALMS, AND PASTE **
+** INNUENDO INTO YOUR C.V. RIGHT BEFORE A JOB INTERVIEW! **
+** DON'T SAY WE DIDN'T WARN YOU, MAN. WE TOTALLY DID RIGHT HERE. **
+
+
+=== Smaller changes since 1.4 ===
+
+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
+* (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.
+* (bug 1015) support for the full wikisyntax in <gallery> captions.
+* (bug 1105) A "Destination filename" (save as) added to Special:Upload Upload.
+* (bug 1352) Images on description pages now get thumbnailed regardless of whether the thumbnail is larger than the original.
+* (bug 1662) A new magicword, {{CURRENTMONTHABBREV}} returns the abbreviation of the current month
+* (bug 1668) 'Date format' supported for other languages than English, see:
+ http://mail.wikipedia.org/pipermail/wikitech-l/2005-March/028364.html
+* (bug 1739) A new magicword, {{REVISIONID}} give you the article or diff database
+ revision id, useful for proper citation.
+* (bug 1998) Updated the Russian translation.
+* (bug 2064) Configurable JavaScript mimetype with $wgJsMimeType
+* (bug 2084) Fixed a regular expression in includes/Title.php that was accepting invalid syntax like #REDIRECT [[foo] in redirects
+* It's now possible to invert the namespace selection at Special:Allpages and Special:Contributions
+* No longer using sorbs.net to check for open proxies by default.
+* What was $wgDisableUploads is now $wgEnableUploads, and should be set to true if one wishes to enable uploads.
+* Supplying a reason for a block is no longer mandatory
+* Language conversion support for category pages
+* $wgStyleSheetDirectory is no longer an alias for $wgStyleDirectory;
+* Special:Movepage can now take paramaters like Special:Movepage/Page_to_move
+ (used to just be able to take paramaters via a GET request like index.php?title=Special:Movepage&target=Page_to_move)
+* (bug 2151) The delete summary now includes editor name, if only one has edited the article.
+* (bug 2105) Fixed from argument to the PHP mail() function. A missing space could prevent sending mail with some versions of sendmail.
+* (bug 2228) Updated the Slovak translation
+* ...and more!
+
+
+=== Changes since 1.5alpha1 ===
+
+* (bug 73) Category sort key is set to file name when adding category to
+ file description from upload page (previously it would be set to
+ "Special:Upload", causing problems with category paging)
+* (bug 419) The contents of the navigation toolbar are now editable through
+ the MediaWiki namespace on the MediaWiki:navbar page.
+* (bug 498) The Views heading in MonoBook.php is now localizable
+* (bug 898) The wiki can now do advanced sanity check on uploaded files
+ including virus checks using external programs.
+* (bug 1692) Fix margin on unwatch tab
+* (bug 1906) Generalize project namespace for Latin localization, update namespaces
+* (bug 1975) The name for Limburgish (li) changed from "Lèmburgs" to "Limburgs
+* (bug 2019) Wrapped the output of Special:Version in <div dir='ltr'> in order
+ to preserve the correct flow of text on RTL wikis.
+* (bug 2067) Fixed crash on empty quoted HTML attribute
+* (bug 2075) Corrected namespace definitions in Tamil localization
+* (bug 2079) Removed links to Special:Maintenance from movepagetext message
+* (bug 2094) Multiple use of a template produced wrong results in some cases
+* (bug 2095) Triple-closing-bracket thing partly fixed
+* (bug 2110) "noarticletext" should not display on Image page for "sharedupload" media
+* (bug 2150) Fix tab indexes on edit form
+* (bug 2152) Add missing bgcolor to attribute whitelist for <td> and <th>
+* (bug 2176) Section edit 'show changes' button works correctly now
+* (bug 2178) Use temp dir from environment in parser tests
+* (bug 2217) Negative ISO years were incorrectly converted to BC notation
+* (bug 2234) allow special chars in database passwords during install
+* Deprecated the {{msg:template}} syntax for referring to templates, {{msg: is
+ now the wikisyntax representation of wfMsgForContent()
+* Fix for reading incorrectly re-gzipped HistoryBlob entries
+* HistoryBlobStub: the last-used HistoryBlob is kept open to speed up
+ multiple-revision pulls
+* Add $wgLegacySchemaConversion update-time option to reduce amount of
+ copying during the schema upgrade: creates HistoryBlobCurStub reference
+ records in text instead of copying all the cur_text fields. Requires
+ that the cur table be left in place until/unless such fields are migrated
+ into the main text store.
+* Special:Export now includes page, revision, and user id numbers by
+ default (previously this was disabled for no particular reason)
+* dumpBackup.php can dump the full database to Export XML, with current
+ revisions only or complete histories.
+* The group table was renamed to groups because "group" is a reserved word in
+ SQL which caused some inconveniances.
+* New fileicons for c, cpp, deb, dvi, exe, h, html, iso, java, mid, mov, o,
+ ogg, pdf, ps, rm, rpm, tar, tex, ttf and txt files based on the KDE
+ crystalsvg theme.
+* Fixed a bug in Special:Newimages that made it impossible to search for '0'
+* Added language variant support for Icelandic, now supports "Íslenzka"
+* The #p-nav id in MonoBook is now #p-navigation
+* Putting $4 in msg:userstatstext will now give the percentage of
+ admnistrators out of normal users.
+* links and brokenlinks tables merged to pagelinks; this will reduce pain
+ dealing with moves and deletes of widely-linked pages.
+* Add validate table and val_ip column through the updater.
+* Simple rate limiter for edits and page moves; set $wgRateLimits
+ (somewhat experimental; currently needs memcached)
+* (bug 2262) Hide math preferences when TeX is not enabled
+* (bug 2267) Don't generate thumbnail at the same size as the source image.
+* Fix rebuildtextindex.inc for new schema
+* Remove linkscc table code, no longer used.
+* (bug 2271) Use faster text-only link replacement in image alt text
+ instead of rerunning expensive link lookup and HTML generation.
+* Only build the HTML attribute whitelist tree once.
+* Replace wfMungeToUtf8 and do_html_entity_decode with a single function
+ that does both numeric and named chars: Sanitizer::decodeCharReferences
+* Removed some obsolete UTF-8 converter functions
+* Fix function comment in debug dump of SQL statements
+* (bug 2275) Update search index more or less right on page move
+* (bug 2053) Move comment whitespace trimming from edit page to save;
+ leaves the whitespace from the section comment there on preview.
+* (bug 2274) Respect stub threshold in category page list
+* (bug 2173) Fatal error when removing an article with an empty title from the watchlist
+* Removed -f parameter from mail() usage, likely to cause failures and bounces.
+* (bug 2130) Fixed interwiki links with fragments
+* (bug 684) Accept an attribute parameter array on parser hook tags
+* (bug 814) Integrate AuthPlugin changes to support Ryan Lane's external
+ LDAP authentication plugin
+* (bug 2034) Armor HTML attributes against template inclusion and links munging
+
+=== Changes since 1.5alpha2 ===
+
+* (bug 2319) Fix parse hook tag matching
+* (bug 2329) Fix title formatting in several special pages
+* (bug 2223) Add unique index on user_name field to prevent duplicate accounts
+* (bug 1976) fix shared user database with a table prefix set
+* (bug 2334) Accept null for attribs in wfElement without PHP warning
+* (bug 2309) Allow templates and template parameters in HTML attribute zone,
+ with proper validation checks. (regression from fix for 2304)
+* Disallow close tags and enforce empty tags for <hr> and <br>
+* Changed user_groups format quite a bit.
+* (bug 2368) Avoid fatally breaking PHP 4.1.2 in a debug line
+* (bug 2367) Insert correct redirect link record on page move
+* (bug 2372) Fix rendering of empty-title inline interwiki links
+* (bug 2384) Fix typo in regex for IP address checking
+* (bug 650) Prominently link MySQL 4.1 help page in installer if a possible
+ version conflict is detected
+* (bug 2394) Undo incompatible breakage to {{msg:}} compatiblity includes
+* (bug 1322) Use a shorter cl_sortkey field to avoid breaking on MySQL 4.1
+ when the default charset is set to utf8
+* (bug 2400) don't send confirmation mail on account creation if
+ $wgEmailAuthentication is false.
+* (bug 2172) Fix problem with nowiki beeing replaced by marker strings
+ when a template with a gallery was used.
+* Guard Special:Userrights against form submission forgery
+* (bug 2408) page_is_new was inverted (whoops!)
+* Added wfMsgHtml() function for escaping messages and leaving params intact
+* Fix ordering of Special:Listusers; fix groups list so it shows all groups
+ when searching for a specific group and can't be split across pages
+* (bug 1702) Display a handy upload link instead of a useless blank link
+ for [[media:]] links to nonexistent files.
+* (bug 873) Fix usage of createaccount permission; replaces $wgWhitelistAccount
+* (bug 1805) Initialise $wgContLang before $wgUser
+* (bug 2277) Added Friulian language file
+* (bug 2457) The "Special page" href now links to the current special page
+ rather than to "".
+* (bug 1120) Updated the Czech translation
+* A new magic word, {{SCRIPTPATH}}, returns $wgScriptPath
+* A new magic word, {{SERVERNAME}}, returns $wgServerName
+* A new magic word, {{NUMBEROFFILES}}, returns the number of rows in the image table
+* Special:Imagelist displays titles with " " instead of "_"
+* Less gratuitous munging of content sample in delete summary
+* badaccess/badaccesstext to supercede sysop*, developer* messages
+* Changed $wgGroupPermissions to more cut-n-paste-friendly format
+* 'developer' group deprecated by default
+* Special:Upload now uses 'upload' permission instead of hardcoding login check
+* Add 'importupload' permission to disable direct uploads to Special:Import
+* (bug 2459) Correct escaping in Special:Log prev/next links
+* (bug 2462 etc) Taking out the experimental dash conversion; it broke too many
+ things for the current parser to handle cleanly
+* (bug 2467) Added a Turkish language file
+* Fixed a bug in Special:Contributions that caused the namespace selection to
+ be forgotten between submits
+* Special:Watchlist/edit now has namespace subheadings
+* (bug 1714) the "Save page" button now has right margin to seperate it from
+ "Show preview" and "Show changes"
+* Special:Statistics now supports action=raw, useful for bots designed to
+ harwest e.g. article counts from multiple wikis.
+* The copyright confirmation box at Special:Upload is now turned off by default
+ and can be turned back on by setting $wgCopyrightAffirmation to a true value.
+* Restored prior text for password reminder button and e-mail, replacing
+ the factually inaccurate text that was there.
+* (bug 2178) Fix temp dir check again
+* (bug 2488) Format 'deletedtext' message as wikitext
+* (bug 750) Keep line endings consistent in LocalSettings.php
+* (bug 1577) Add 'printable version' tab in MonoBook for people who don't
+ realize you can just hit print to get a nicely formatted printable page.
+* Trim whitespace from option values to weather line-ending corruption problems
+* Fixed a typo in the Romanian language file (NS_MESIA => NS_MEDIA)
+* (bug 2504) Updated the Finnish translation
+* (bug 2506, 2512) Updated the Nynorsk translation
+* (bug 996) Replace $wgWhitelistEdit with 'edit' permission; fixup UPGRADE
+ documentation about edit and read whitelists.
+* (bug 2515) Fix incremental link table update
+* Removed some wikipedia-specifica from LanguageXx.php's
+* (bug 2496) Allow MediaWiki:edithelppage to point to external page
+* Added a versionRequired() function to OutputPage, useful for extension
+ writers that want to control what version of MediaWiki their extension
+ can be used with.
+* Serialized user objects now checked for versioning
+* Fix for interwiki link regression
+* Printable link shorter in monobook
+* Experimental Latin-1-and-replication-friendly upgrader script
+* (bug 2520) Don't show enotif options when disabled
+
+== Changes since 1.5beta1 ==
+
+* (bug 2531) Changed the interwiki name for sh (Serbocroatian) to
+ Srpskohrvatski/Српскохрватски (was Српскохрватски (Srbskohrvatski))
+* Nonzero return code for command-line scripts on wfDebugDieBacktrace()
+* Conversion fix for empty old table in upgrade1_5.php
+* Try reading revisions from master if no result on slave
+* (bug 2538) Suppress notice on user serialized checks
+* Fix paging on Special:Contributions
+* (bug 2541) Fix unprotect tab
+* (bug 1242) category list now show on edit page
+* Skip sidebar entries where link text is '-'
+* Convert non-UTF-8 URL parameters even if referer is local
+* (bug 2460) <img> width & height properly filled when resizing image
+* (bug 2273) deletion log comment used user interface langage
+* Try reading revision _text_ from master if no result on slave
+* Use content-language message cache for raw view of message pages
+* (bug 2530) Not displaying talk pages on Special:Watchlist/edit
+* Fixed a bug that would occour if $wgCapitalLinks was set to false, a user
+ agent could create a username that began with a lower case letter that was
+ not in the ASCII character set ( now user $wgContLang->ucfirst() instead of
+ PHP ucfirst() )
+* Moved the user name / password validity checking from
+ LoginForm::addNewAccountInternal() to two new functions,
+ User::isValidUserName() and User::isValidPassword(), extensions can now do
+ these checks without rewriting code.
+* Fix $wgSiteNotice when MediaWiki:Sitenotice is set to default '-'
+* Fixed a bug where the watchlist count without talk pages would be off by a
+ factor of two.
+* upgrade1_5.php uses insert ignore, allows to skip image info initialization
+* Fix namespaces in category list.
+* Add rebuildImages.php to update image metadata fields
+* Special:Ancientpages is expensive in new schema for now
+* (bug 2568) Fixed a logic error in the Special:Statistics code which caused
+ the displayed percentage of admins to be totally off.
+* (bug 2560) Don't show blank width/height attributes for missing size
+* Don't show bogus messages about watchlist notifications when disabled
+* Don't show old debug messages in watchlist
+* (bug 2576) Fix recording of transclusion links
+* (bug 2577) Allow sysops to enter non-standard block times
+* Fixed a bug where Special:Contributions wouldn't remember the 'invert'
+ status between next/previous buttons.
+* Move MonoBook printable link from tab to sidebar
+* (bug 2567) Fix HTML escaping on category titles in list
+* (bug 2562) Show rollback link for current revisions on diff pages
+* (bug 2583) Add --missinig option on rebuildImages.php to add db entries
+ for uploaded files that don't have them
+* (bug 2572) Fix edit conflict handling
+* (bug 2595) Show "Earlier" and "Latest" links on history go to the first/last
+ page in the article history pager.
+* Don't show empty-page text in 'Show changes' on new page
+* (bug 2591) Check for end, fix limits on Whatlinkshere
+* (bug 2584) Fix output of subcategory list
+* (bug 2597) Don't crash when undeleting an image description page
+* (bug 2564) Don't show "editingold" warning for recent revision
+* Various code cleanup and HTML escaping fixlets
+* Copy IRC-over-UDP update option from REL1_4
+* (bug 2548) Keep summary on 'show changes' of section edit
+* Move center on toc to title part to avoid breaking .toc style usage
+* HTML sanitizer: correct multiple attributes by keeping last, not first
+* (bug 2614) Fix section edit links on diff-to-current with oldid set
+ Also fix navigation links on current-with-oldid view.
+* (bug 2620) Return to prior behavior for some more things (such as
+ subpage parent links) on current-diff view.
+* (bug 2618) Fix regression from another fix; show initial preview for
+ categories only if the page does not exist.
+* (bug 2625) Keep group & user settings when paging in Listusers
+* (bug 2627) Fix regression: diff radio button initial selection
+* Copy fix for old search URLs with Lucene search plugin from REL1_4
+* (bug 619) Don't use incompatible diff3 executable on non-Linux systems.
+* (bug 2631) Fix Hebrew namespaces.
+* (bug 2630) Indicate no-longer-valid cached entries in BrokenRedirects list
+* (bug 2644, 2645) "cur" diff links in page history, watchlist and
+ recentchanges should specify current ID explicitly.
+* (bug 2609) Fix text justification preferenced with MonoBook skin.
+* (bug 2594) Display article tab as red for non-existent articles.
+* (bug 2656) Fix regression: prevent blocked users from reverting images
+* (bug 2629) Automatically capitalize usernames again instead of
+ rejecting lowercase with a useless error message
+* (bug 2661) Fix link generation in contribs
+* Add support for &preload=Page_name (load text of an existing page into
+edit area) and &editintro=Page_name (load text of an existing page instead
+of MediaWiki:Newpagetext) to &action=edit, if page is new.
+* (bugs 2633, 2672, 2685, 2695) Fix Estonian, Portuguese, Italian, Finnish and
+ Spanish numeric formatting
+* Fixed Swedish numeric formatting
+* (bug 2658) Fix signature time, localtime to match timezone offset again
+* Files from shared repositories (e.g. commons) now display with their
+ image description pages when viewed on local wikis.
+* Restore compatibility namespace aliases for French Wikipedia
+* Fix diff order on Enhanced RC 'changes' link
+* (bug 2650) Fix national date type display on wikis that don't support
+ dynamic date conversion.
+* FiveUpgrade: large table hacks, install iw_trans update before links
+* (bug 2648) Rename namespaces in Afrikaanse
+* Special:Booksources checks if custom list page exists before using it
+* (bug 1170) Fixed linktrail for da: and ru:
+* (bug 2683) Really fix apostrophe escaping for toolbox tips
+* (bug 923) Fix title and subtitle for rclinked special page
+* (bug 2642) watchdetails message in several languages used <a></a> instead of [ ]
+* (bug 2181) basic CSB language localisation by Tomasz G. Sienicki (thanks for the patch)
+* Fix correct use of escaping in edit toolbar bits
+* Removed language conversion support from Icelandic
+* (bug 2616) Fix proportional image scaling, giving correct height
+* (bug 2640) Include width and height attributes on unscaled images
+* Workaround for mysterious problem with bogus epoch If-Last-Modified reqs
+* (bug 1109) Suppress compressed output on 304 responses
+* (bug 2674) Include some site configuration info in export data:
+ namespaces definitions, case-sensitivity, site name, version.
+* Use xml:space="preserve" hint on export <text> elements
+* Make language variant selection work again for zh
+
+== Changes since 1.5beta2 ==
+
+* Escaped & correctly in Special:Contributions
+* (bug 2534) Hide edit sections with CSS to make right click to edit section work
+* (bug 2708) Avoid undefined notice on cookieless login attempt
+* (bug 2188) Correct template namespace for Greek localization
+* Fixed number formatting for Dutch
+* (bug 1355) add class noprint to commonPrint.css
+* (bug 2350) Massive update for Limburgish (li) language using Wikipédia
+* Massive update for Arab (ar) language using Wikipédia
+* (bug 1560) Massive update for Kurdish (ku) language using Wikipédia
+* (bug 2709) Some messages were not read from database
+* (bug 2416) Don't allow search engine robots to index or follow nonexisting articles
+* Fix escaping in page move template.
+* (bug 153) Discrepancy between thumbnail size and <img> height attribute
+
+== Changes since 1.5beta3 ==
+
+* Fix talk page move handling
+* (bug 2721) New language file for Vietnamese with the Vietnamese number notation
+* (bug 2749) &nbsp; would appear as a literal in image galleries for Cs, Fr, Fur, Pl and Sv
+* (bug 787) external links being rendered when they only have one slash
+* Fixed a missing typecast in Language::dateFormat() that would cause some
+ interesting errors with signitures.
+* (bug 2764) Number format for Nds
+* (bug 1553) Stop forcing lowercase in Monobook skin for German language.
+* (bug 1064) Implements Special:Unusedcategories
+* (bug 2311) New language file for Macedonian
+* Fix nohistory message on empty page history
+* Fix fatal error in history when validation on
+* Cleaned up email notification message formatting
+* Finally fixed Special:Disambiguations that was broke since SCHEMA_WORK
+* (bug 2761) fix capitalization of "i" in Turkish
+* (bug 2789) memcached image metadata now cleared after deletion
+* Add serialized version number to image metadata cache records
+* (bug 2780) Fix thumbnail generation with GD for new image schema
+* (bug 2791) Slovene numeric format
+* (bug 655) Provide empty search form when searching for nothing
+* Nynorsk numeric format fix
+* (bug 2825) Fix regression in newtalk notifications for anons w/ enotif off
+* (bug 2833) Fix bug in previous fix
+* With $wgCapitalLinks off, accept off-by-first-letter-case in 'go' match
+* Optional parameters for [[Special:Listusers]]
+* (bug 2832) [[Special:Listadmins]] redirects to [[Special:Listusers/sysop]]
+* (bug 785) Parser did not get out of <pre> with list elements
+* Some shared upload fixes
+* (bug 2768) section=new on nonexistent talk page does not add heading
+* support preload= parameter for section=new
+* show comment subject in preview when using section=new
+* use comment form when creating a new talk page
+* (bug 460) Properly handle <center> tags as a block.
+* Undo inconsistent editing behavior change
+* (bug 2835) Back out fix for bug 2802, caused regressions in category sort
+* PHP 4.1.2 compatibility fix: define floatval() equivalent if missing
+* (bug 2901) Number format for Catalan
+* Special:Allpages performance hacks: index memcached caching, removed
+ inverse checkbox, use friendlier relative offsets in index build
+* Bring back "Chick" skin for mobile devices. It needs testing.
+* Fix spelling of $wgForwardSearchUrl in DefaultSettings.php
+* Specify USE INDEX on Allpages chunk queries, sometimes gets lost
+ due to bogus optimization
+* (bug 275) Section duplication fix
+* Remove unused use of undefined variable in UserMailer
+* Fix notice on search index update due to non-array
+* (bug 2885) Fix fatal errors and notices in PHP 5.1.0beta3
+* (bug 2931) Fix additional notices on reference use in PHP 4.4.0
+* (bug 2774) Add three new $wgHooks to LogPage which enable extensions to add
+ their own logtypes, see extensions/Renameuser/SpecialRenameuser.php for an
+ example of this.
+* (bug 740) Messages from extensions now appear in Special:Allmessages
+* (bug 2857) fixed parsing of lists in <pre> sections
+* (bug 796) Trackback support
+* Fix 1.5 regression: weird, backwards diff links on new pages in enhanced RC
+ are now suppressed as before.
+* New skin: Simple
+* "uselang" and "useskin" URL parameters can now be used in the URL when
+ viewing a page, to change the language and skin of a page respectively.
+* Skins can now be previewed in preferences
+* (bug 2943) AuthPlugin::getCanonicalName() name canonicalization hook,
+ patch from robla
+* Wrap revision insert & page update in a transaction, rollback on late
+ edit conflict.
+* (bug 2953) 'other' didn't work in Special:Blockip when localized
+* (bug 2958) Rollback and delete auto-summary should be in the project's
+ content language
+* Removed useless protectreason message
+* Spelling fix: $wgUrlProtcols -> $wgUrlProtocols
+* Switch Moldovan local name to cyrillic
+* Fix typo in undefined array index access prevention
+* (bug 2947) Update namespaces for sr localization
+* (bug 2952) Added Asturian language file with translated namespaces
+* (bug 2676) Apply a protective transformation on editing input/output
+ for browsers that hit the Unicode blacklist. Patch by plugwash.
+* (bug 2999) Fix encoding conversion of pl_title in upgrade1_5.php
+* compressOld.php disabled, as it's known to be broken.
+
+
+=== Changes since 1.5beta4 ===
+
+* Fix Special:Allmessages under PHP 5
+* (bug 2911) Special:Watchlist allowed only one type of limit at a time
+* (bug 693) Special:Allmessages is excessively wide and redundant
+* (bug 3001) Updated and applied live hack for recentchanges-based watchlist
+* (bug 145) Finish 'exclude redirect' implementation in search form
+* Rearranged Special:Movepage form to reduce confusion between destination
+ title and reason input boxes
+* (bug 2527) Always set destination filename when new file is selected
+* (bug 3056) MySQL 3 compatibility fix: USE INDEX instead of FORCE INDEX
+* PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect
+ if running prior to 4.2.0 as it causes the call to fail
+* (bug 3117) Fix display of upload size and type with tidy on
+* (bug 1487) invalid html on empty list in banlist
+* (bug 3017) Hotkey conflict for delete and show changes
+* made pixel unit translateable and blocklistline now eats infiniteblock
+ and expiringblock
+* (bug 3092) Wrong numerical separator for big numbers in Serbian.
+* (bug 2855) Credit for a uniq author showed its realname even with
+ $wgAllowRealName=false.
+* New special page: SpecialMostlinked
+* (bug 2393) Fix MIME type for Atom feeds ( application/rss+atom )
+* Fix display of read-only lockfile message
+* Added a new hook, 'AddNewAccount', which is run after account creation
+* Update all stats fields on recount.sql
+* Include software-visible client IP address in Special:Version comment
+ as a proxy debugging aid
+* (bug 3162) Fix 'undefined property page_is_new' error on watchlist
+* (bug 1734) granting db permissions failed with db usernames containg '-'
+* (bug 3170) wikititlesuffix was removed, use pagetitle instead
+* (bug 3187) watchlist text refer to unexistent "Stop watching" action
+* (bug 3190) Added some date format choices for language sr
+* (bug 1334) LanguageGa.php update
+* (bug 1020) Changing user interface language does not work immediately
+* (bug 2753) Some namespaces were not translated in LanguageTa.php (Tamil)
+* (bug 3204) Fix typo breaking special pages in fy localization
+* (bug 3210) Fix Media: links with remote image URL path
+* (bug 3220) Fix escaping of block URLs in Recentchanges
+* (bug 3238): Updated LanguageNn.php for 1_5 branch
+* (bug 3192): properly check 'limit' parameter on Special:Contributions
+* (bug 3244) Fix remote image loading hack, JavaScript injection on MSIE
+* Fix URL sanitization in HTML attributes, which broke in this branch
+* (bug 3475) anon contrib links on Special:Newpages
+
+
+=== Changes since 1.5rc2 ===
+
+* Fix upgrade from 1.4 due to version number check breakage
+* Fix upgrade from 1.4 with no old revisions
+* (bug 2108) Sort entries when using category browser
+* XSS issue : now sanitize search query input
+
+
+=== Changes since 1.5rc3 ===
+
+* (bug 3280) Respect 'move' group permission on page moves
+* (bug 2885) More PHP 5.1 fixes: skin, search, log, undelete
+* Security fix for <math>
+* Security fix for tables
+
+
+=== Changes since 1.5rc4 ===
+
+* (bug 3292) Fix move-over-redirect test when current entries are not plaintext
+* (bug 2078) Don't hide watch tab on preview
+* (bug 3306) Document $wgLocalTZoffset
+* Support SVG rendering with rsvg
+* Cap arbitrary SVG renders to given image size or $wgSVGMaxSize pixels wide
+* (bug 3127) Render large SVGs at image page size correctly
+* (bug 3448) Set page_len on undelete
+* (bug 2800) Don't scale up small iamges on |thumb| without explicit size
+* Use the real file link instead of the default-size rasterized version for
+ large SVG images on image description page
+* Include the file name/type/size line for non-resized images
+* (bug 3412) Clean up date format handling so ~~~~-sigs work with default
+ format as designed. Documentation comments updated.
+* (bug 1423) LanguageJa.php update
+* (bug 3405) Don't use raw letters as aliases of MSGNW: and SUBST:
+* (bug 3485) Fix bogus warning about filename capitalization when off
+* (bug 2792) Update rebuildrecentchanges.inc for new schema
+* Special:Import/importDump fixes: report XML parse errors, accept <minor/>
+* (bug 3489) PHP 5.1 compat problem with captioned images
+* (bug 3350) Missing label for move talk page checkbox.
+* (bug 2570) Add 'watch this page' checkbox on uploads, watch uploads
+ by default when 'watchdefault' option is on
+* (bug 3182) Clear link cache during import to prevent memory leak
+* (bug 3573) Full Greek Translation
+* (bug 3595) Warn and abort if importDump.php called in read-only mode.
+* (bug 3598) Update message cache on message page deletion, patch by Tietew
+* Blacklist additional MSIE CSS safety tricks
+
+
+=== Changes since 1.5.0 ===
+
+* (bug 3629) Fix date & time format for Frisian
+* (bug 3641) Fix handling of unrecognized file uploads with known extensions
+* (bug 3643) Fix image page display of large images with resizing disabled
+* Fix meta robots tag on Special:Version again to avoid listing vulnerable
+ versions for convenient harvesting by automated worms
+* (bug 3684) Fix typo in fatal error backtraces in Hooks.php
+* Backport fix for reference usage notice in Special:Search on PHP 4.4.0
+* Backport database connect error display fix from HEAD
+* (bug 2773) Print style sheet no longer overrides RTL text direction
+* MonoBook skin top link id changed from "contentTop" to "top" (shared with
+ name attribute)
+* Wrap message page insertions in a transaction to speed up installation
+* Fix Special:MovePage invalid HTML attribute for reason textarea
+* Avoid notice warning on edit with no User-Agent header
+* (bug 3734) Swapped out obsolete recount.sql with initStats.php
+* (bug 3735) Fix to run under MySQL 5's strict mode
+* (bug 3786) Experimental support for MySQL 4.1/5.0 utf8 charset mode
+ NOTE: Enabling this may break existing wikis, and still doesn't
+ work for all Unicode characters due to MySQL limitations.
+* Sanitizer CSS comment processing order fix
+
+
+=== Changes since 1.5.1 ===
+
+* Fix Special:BrokenRedirects on MySQL 5.0
+* (bug 3809) Backport fix for detecting diff3 failure
+* MySQL 5.0 strict mode fix for moving unwatched pages
+* (bug 3782) Throw fatal installation warning if mbstring.func_overload on.
+ Why do people invent these crazy options that change language semantics?
+* (bug 3762) Define missing Special:Import UI messages
+* (bug 3771) Handle internal functions in backtrace in wfAbruptExit()
+* (bug 3649) Remove obsolete, broken moveCustomMessages script
+* (bug 3667) Add missing global in page move code
+* (bug 3761) Avoid deprecation warnings in Special:Import
+* (bug 2885) Remove unnecessary reference parameter which broke classic skin
+ talk notification on PHP 5.0.5
+* (bug 3845) Update attribute.php for 1.5 schema
+* Fix Parser::unstrip on PHP 4.4.1 and PHP 5.1.0RC4
+
+
+=== Changes since 1.5.2 ===
+
+* (bug 3612) Remove old broken version of maintenance/compressOld.php
+ The working version is in maintenance/storage/compressOld.php
+* (bug 2740) Accept image deletions on 'enter' submit from MSIE
+* (bug 3933) specify XML namespace for Atom 0.3 feeds
+* (bug 3939) Don't try to load text for interwiki redirect target
+* (bug 3948) Avoid notice warning in debug statement in bad search
+* Recognize Special:Search consistently so read whitelist works
+* (bug 4013) typo in fr
+* (bug 3996) Fix text for new entries in RC RSS/Atom feed
+* (bug 2894) Enhanced Recent Changes link fixes
+* (bug 3065) Update both watched namespaces when renaming pages
+* Move parentheses out of <a> link in Special:Contributions
+* (bug 4071) Generate passwords long enough for $wgMinimalPasswordLength
+* (bug 4035) Fix prev/next revision links on edit page
+* (bug 4165) Correct validation for user language selection (data taint)
+* Clearer message in DefaultSettings.php: edit LocalSettings.php instead
+
+
+=== Changes since 1.5.3 ===
+
+* (bug 3805) Clear 'new messages' flag properly in enotif mode
+ for usernames containing spaces
+* (bug 2714) Backlink from special:whatlinkshere was hard set as 'existing'
+* (bug 4249) Typo in entities2literals.pl
+* (bug 4233) Update for japanese language
+* (bug 4279) Small correction to LanguageDa.php
+* (bug 4267) Switch dv sd ug ks arc languages to RTL
+* (bug 3991) Allow the operation of wikicode on Protect move only text
+* Added AutoAuthenticate hook for external User object suppliers
+* Parser internal placeholder string now fully randomized for safety
+
+=== Changes since 1.5.4 ===
+
+* Maintenance script to delete unused user accounts
+* Added detection for WMF files (application/x-msmetafile), added this
+ MIME type to the default blacklist. Prevented inline display of images
+ which are not of known image types. This is in response to
+ http://en.wikipedia.org/wiki/Windows_Metafile_vulnerability
+
+=== Changes since 1.5.5 ===
+
+* (bug 4258) When installing under IIS, $wgArticlePath = "$wgScript?title=$1"
+ should be set
+* (bug 4510) Correct Barnes & Noble bookstore URLs
+* (bug 4504) Use site language for namespace name resolution
+* Installer fixes from HEAD backported; now uses a more sensible method of
+ establishing which mySQL user to use, which clears up bug 921 et al. Minor
+ changes to installer.
+* Fix problem reported on mailing list where re-initialising stats didn't work
+ (can't insert duplicate rows with the same id field)
+* (bug 1122) gray out 'older revision' when viewing first article revision.
+* Respect database prefix in dumpHTML.inc
+* Minor improvements to removeUnusedAccounts.php maintenance script
+* Fix for single-digit week numbers from {{CURRENTWEEK}}, broken by PHP 4.4.1
+* Removed read-only check from Database::query()
+* Added --conf option to command line scripts, allowing the user to specify a
+ different LocalSettings.php.
+
+=== Changes since 1.5.6 ===
+
+* Default main page content improved per bug 4690
+* Fix dependence on hardcoded UNIQ_PREFIX in LanguageConverter.php
+* Fixed Special:Unlockdb
+* Maintenance script to delete unused text records
+* Maintenance script to delete non-current revisions
+* Maintenance script to wipe a page and all revisions from the database
+* (bug 4768) Wrong Russian translation (typo)
+* Performance bugfix: propagate equality manually for Revision fetches
+* (bug 4773) PHP fatal error when invalid title passed to Special:Export
+* Added missing table defs. for transcache to installer schemas
+* (bug 4824) IE7 beta 2 broke compatibility with PNG logo workarounds,
+ and seems to work ok with other bits. No longer including the IE
+ workarounds JavaScript for IE 7 and above.
+* (bug 2532) Image directory structure migration bug
+* (bug 4881) Correction to the fix for 1487; Ipblocklist showed 'no blocks'
+ message at the end of the list even if there were blocks.
+* (bug 4805) Removed more wikipedia-references from LanguageUk.php
+* Introduce $wgWantedPagesThreshold per bug 5011; Special:Wantedpages will not
+ list pages with less than this number of links. Defaults to 1.
+* Allow customisation of paging limits for items in categories using the
+ $wgCategoryPagingLimit global, per bug 4970.
+* Improve "nogomatch" text to make it more obvious that a page can be created.
+* (bug 5113) Spelling error in French language file
+* Don't change the password of the MySQL root user.
+
+=== Changes since 1.5.7 ===
+
+* (bug 5180) User login page shows inappropriate email blurb
+* Add the "AbortNewAccount" hook on account creation; see hooks.txt for more info.
+* Update default "exporttext" to reflect that Special:Import exists
+* Add links to useful material to the default main page content
+* Fix fragment HTML injection
+
+=== Changes since 1.5.8 ===
+
+* Fixed obvious mistakes in Finnish (fi) translation
+* Fixed obvious mistakes in Kurdish (ku) translation
+* Merge two #p-search .pBody statements i monobook/main.css
+* (bug 5156) Update for Hebrew language (he) translation
+* Add the "UserRights" hook on user group changes; see hooks.txt for more info.
+* Translated "listingcontinuesabbrev" for German
+
+=== Caveats ===
+
+Some output, particularly involving user-supplied inline HTML, may not
+produce 100% valid or well-formed XHTML output. Testers are welcome to
+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.)
+
+----
+
+== MediaWiki 1.4.3 ==
+
+(released 2005-04-28)
+
+MediaWiki 1.4.3 is a bugfix release for the 1.4 stable release series.
+
+Chiefly, this fixes a compatibility problem with PHP 5 and a minor link
+table corruption bug on initial page save.
+
+
+== MediaWiki 1.4.2 ==
+
+(released 2005-04-20)
+
+MediaWiki 1.4.2 is a security and bug fix release for the 1.4 stable release
+series.
+
+A cross-site scripting injection vulnerability was discovered, which
+affects only MSIE clients and is only open if MediaWiki has been
+manually configured to run output through HTML Tidy ($wgUseTidy).
+
+Several other bugs are fixed in this release, see the changelog below.
+
+All new installations are highly recommended to use 1.4.2 instead of
+1.3.x; 1.3.x users should consider upgrading for bug fixes and new
+features. Ealier 1.4.x release and beta users should upgrade to this
+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
+
+
+=== READ THIS FIRST: Upgrading ===
+
+If upgrading from an older release, see the notes in the file UPGRADE.
+There are a couple of minor database changes from the beta releases,
+and somewhat larger changes from 1.3.x.
+
+Upgrading from a previous 1.4.x stable release installation should
+generally only require copying the new files over the old ones.
+
+
+==== READ THIS FIRST, TOO: MySQL 4.1 AND 5.0 ====
+
+MySQL 5.0 is a beta release, not yet ready for production use. If you
+are using it, the notes below about 4.1 apply to you too.
+
+If you have the choice of MySQL 4.0 or MySQL 4.1 and don't need 4.1 for
+some other application, you should consider sticking with 4.0 for the
+moment. 4.1 may require you to do extra fiddling to get things to work
+due to changes that aren't fully backwards-compatible.
+
+MySQL 4.1 has changed the authentication protocol in an incompatible
+way; many PHP installations still use the older client libraries and
+CANNOT CONNECT TO THE SERVER WITH A PASSWORD without some changes.
+
+See: http://dev.mysql.com/doc/mysql/en/Old_client.html
+
+If MySQL is set with utf-8 as the default character set, installation
+may fail with "key too long" errors. Set the default charset to 'latin1'
+for installation and it should work.
+
+The mysqldump backup generator now applies an automatic conversion to
+UTF-8, which may irretrivably corrupt your data. Pass the -charset option
+with the original default charset (eg 'latin1') to skip the conversion.
+
+
+==== READ THIS FIRST IF RUNNING ON A WINDOWS SERVER ====
+
+MediaWiki is tested and deployed primarily under the Apache web server
+on Linux Unix systems. There are known to be problems running on
+Microsoft's IIS which are not fully resolved. If you have a choice,
+try running under Apache on Windows, or on a Unix/Linux box instead.
+
+If you're having trouble with blank pages on IIS and can't switch,
+try the workaround suggested in this bug report:
+http://bugzilla.wikimedia.org/show_bug.cgi?id=1763
+
+
+=== New features ===
+
+* 'Recentchanges Patrol' to mark new edits that haven't yet been viewed.
+* New, searchable deletion/upload/protection logs
+* Image gallery generation (Special:Newimages and <gallery> tag)
+* SVG rasterization support (requires external support tools)
+* Users can select from the available localizations to override the
+ default user interface language.
+* Traditional/Simplified Chinese conversion support
+* rel="nofollow" support to combat linkspam
+
+The current implementation adds this attribute to _all_ external URL
+links in wiki text (but not internal [[wiki links]] or interwiki links).
+To disable the attribute for _all_ external links, add this line to your
+LocalSettings.php:
+
+ $wgNoFollowLinks = false
+
+For background information on nofollow see:
+
+ http://www.google.com/googleblog/2005/01/preventing-comment-spam.html
+
+
+=== Installation and compatibility ===
+
+* The default MonoBook theme now works with PHP 5.0
+* Installation on systems with PHP's safe mode or other oddities
+ should work more reliably, as MonoBook no longer needs to
+ create a compiled template file for the wiki to run.
+* A table prefix may be specified, to avoid conflicts with other
+ web applications forced to share a database.
+* More thorough UTF-8 input validation; fixes non-ASCII uploaded
+ filenames from Safari.
+* Command-line database upgrade script.
+
+
+=== Customizability ===
+
+* Default user options can now be overridden in LocalSettings.
+* Skins system more modular: templates and CSS are now in /skins/
+ New skins can be dropped into this directory and used immediately.
+* More extension hooks have been added.
+* Authentication plugin hook.
+* More internal code documentation, generated with phpdoc:
+ http://www.mediawiki.org/docs/html/
+
+
+=== Optimization ===
+
+* For many operations, MediaWiki 1.4 should run faster and use
+ less memory than MediaWiki 1.3. Page rendering is up to twice
+ as fast. (Use a PHP accelerator such as Turck MMCache for best
+ results with any PHP application, though!)
+* The parser cache no longer requires memcached, and is enabled
+ by default. This avoids a lot of re-rendering of pages that
+ have been shown recently, greatly speeding longer page views.
+* Support for compiled PHP modules to speed up page diff and
+ Unicode validation/normalization. (Requires ability to compile
+ and load PHP extensions).
+
+
+=== What isn't ready yet ===
+
+* A new user/groups permissions scheme has been held back to 1.5.
+* An experimental SOAP interface will be made available as an extension
+* PostgreSQL support is largely working, minus search and the installer.
+ You can perform a manual installation.
+* E-mail notification of watched page changes and verification of
+ user-submitted e-mail addresses is not yet included.
+* Log pages are not automatically imported into the new log table
+ at upgrade time. A script to import old text log entries is
+ incomplete, but may be available in later point releases.
+* Some localizations are still incomplete.
+
+
+
+== Changelog ==
+
+=== Important security updates ===
+
+A security audit found and fixed a number of problems. Users of MediaWiki
+1.3.10 and earlier should upgrade to 1.3.11; users of 1.4 beta releases
+prior to 1.4rc1 should upgrade immediately.
+
+==== Cross-site scripting vulnerability ====
+
+XSS injection points can be used to hijack session and authentication
+cookies as well as more serious attacks.
+
+* Media: links output raw text into an attribute value, potentially
+ abusable for JavaScript injection. This has been corrected.
+* Additional checks added to file upload to protect against MSIE and
+ Safari MIME-type autodetection bugs.
+
+As of 1.3.10/1.4beta6, per-user customized CSS and JavaScript is disabled
+by default as a general precaution. Sites which want this ability may set
+$wgAllowUserCss and $wgAllowUserJs in LocalSettings.php.
+
+
+==== Cross-site request forgery ====
+
+An attacker could use JavaScript-submitted forms to perform various
+restricted actions by tricking an authenticated user into visiting
+a malicious web page. A fix for page editing in 1.3.10/1.4beta6 has
+been expanded in this release to other forms and functions.
+
+Authors of bot tools may need to update their code to include the
+additional fields.
+
+
+==== Directory traversal ====
+
+An unchecked parameter in image deletion could allow an authenticated
+administrator to delete arbitary files in directories writable by the
+web server, and confirm existence of files not deletable.
+
+
+==== Older issues ====
+
+Note that 1.4 beta releases prior to beta 5 include an input validation
+error which could lead to execution of arbitrary PHP code on the server.
+Users of older betas should upgrade immediately to the current version.
+
+
+Beta 6 also introduces the use of rel="nofollow" attributes on external
+links in wiki pages to reduce the effectiveness of wiki spam. This will
+cause participating search engines to ignore external URL links from wiki
+pages for purposes of page relevancy ranking.
+
+
+=== Misc bugs fixed in beta 1 ===
+
+* (bug 95) Templates no longer limited to 5 inclusions per page
+* New user preference for limiting the image size for images on image description
+ pages
+* (bug 530) Allow user to preview article on first edit
+* (bug 479) [[RFC 1234]] will now make an internal link
+* (bug 511) PhpTal skins shown bogus 'What links here' etc on special pages
+* (bug 770) Adding filter and username exact search match for Special:Listusers
+* (bug 733) Installer die if it can not write LocalSettings.php
+* (bug 705) Various special pages no more show the rss/atom feed links
+* (bug 114) use category backlinks in Special:Recentchangeslinked
+
+=== Beta 2 fixes ===
+
+* (bug 987) Reverted bogus fix for bug 502
+* (bug 992) Fix enhanced recent changes in PHP5
+* (bug 1009) Fix Special:Makesysop when using table prefixes
+* (bug 1010) fix broken Commons image link on Classic & Cologne Blue
+* (bug 985) Fix auto-summary for section edits
+* (bug 995) Close <a> tag
+* (bug 1004) renamed norsk language links (twice)
+* Login works again when using an old-style default skin
+* Fix for load balancing mode, notify if using old settings format
+* (bug 1014) Missing image size option on old accounts handled gracefully
+* (bug 1027) Fix page moves with table prefix
+* (bug 1018) Some pages fail with stub threshold enabled
+* (bug 1024) Fix link to high-res image version on Image: pages
+* (bug 1016) Fix handling of lines omitting Image: in a <gallery> tag
+* security fix for image galleries
+* (bug 1039) Avoid error message in certain message cache failure modes
+* Fix string escaping with PostgreSQL
+* (bug 1015) [partial] -- use comment formatter on image gallery text
+* Allow customization of all UI languages
+* use $wgForceUIMsgAsContentMsg to make regular UI messages act as content
+* new user option for zh users to disable language conversion
+* Defer message cache initialization, shaving a few ms off file cache hits
+* Fixed Special:Allmessages when using table prefixes
+* (bug 996) Fix $wgWhitelistRead to work again
+* (bug 1028) fix page move over redirect to not fail on the unique index
+
+=== Beta 3 fixes ===
+
+* Hide RC patrol markers when patrol is disabled or not allowed to patrol.
+* Fix language selection for upgraded accounts
+* (bug 1076) navigation links in QueryPage should be translated by wgContLang.
+* (bug 922) bogus DOS line endings in LanguageEl.php
+* Fix index usage in contribs
+* Caching and load limiting options for Recentchanges RSS/Atom feed
+* (bug 1074) Add stock icons for non-image files in gallery/Newimages
+* Add width and height attributes on thumbs in gallery/Newimages
+* Enhance upload extension blacklist to protect against vulnerable
+ Apache configurations
+
+=== Beta 4 fixes ===
+
+* (bug 1090) Fix sitesupport links in CB/classic skins
+* Gracefully ignore non-legal titles in a <gallery>
+* Fix message page caching behavior when $wgCapitalLinks is turned off
+ after installation and the wiki is subsequently upgraded
+* Database error messages include the database server name/address
+* Paging support for large categories
+* Fix image page scaling when thumbnail generation is disabled
+* Select the content language in prefs when bogus interface language is set
+* Fix interwiki links in edit comments
+* Fix crash on banned user visit
+* Avoid PHP warning messages when thumbnail not generated
+* (bug 1157) List unblocks correctly in Special:Log
+* Fix fatal errors in LanguageLi.php
+* Undo overly bright, difficult to read colors in Cologne Blue
+* (bug 1162) fix five-tilde date inserter
+* Add raw signatures option for those who simply must have cute sigs
+* (bug 1164) Let wikitext be used in Loginprompt and Loginend messages
+* Add the dreaded <span> to the HTML whitelist
+* (bug 1170) Fix Russian linktrail
+* (bug 1168) Missing text on the bureaucrat log
+* (bug 1180) Fix Makesysop on shared-user-table sites
+* (bug 1178) Fix previous diff link when using 'oldid=0'
+* (bug 1173) Stop blocked accounts from reverting/deleting images
+* Keep generated stylesheets cache-separated for each user
+* (bug 1175) Fix "preview on first edit" mode
+* Fix revert bug caused by bug 1175 fix
+* Fix CSS classes on minor, new, unpatrolled markers in enhanced RC
+* Set MySQL 4 boolean search back to 'and' mode by default
+* (bug 1193) Fix move-only page protection mode
+* Fix zhtable Makefile to include the traditional manual table
+* Add memcache timeout for the zh conversion tables
+* Allow user customization of the zh conversion tables through
+ Mediawiki:zhconversiontable
+* Add zh-min-man (back) to language names list
+* Ported $wgCopyrightIcon setting from REL1_3A
+* (bug 1218) Show the original image on image pages if the thumbnail would be
+ bigger than the original image
+* (bug 1213) i18n of Special:Log labels
+* (bug 1013) Fix jbo, minnan in language names list
+* Added magic word MAG_NOTITLECONVERT to indicate that the title of the page
+ do not need to be converted. Useful in zh:
+* (bug 1224) Use proper date messages for date reformatter
+* (bug 1241) Don't show 'cont.' for first entry of the category list
+* (bug 1240) Special:Preferences was broken in Slovenian locale when
+ $wgUseDynamicDates is enabled
+* Added magic word MAG_NOCONTENTCONVERT to supress the conversion of the
+ content of an article. Useful in zh:
+* write-lock for updating the zh conversion tables in memcache
+* recursively parse subpages of MediaWiki:Zhconversiontable
+* (bug 1144) Fix export for fy language
+* make removal of an entry from zhconversiontable work
+* (bug 752) Don't insert newline in link title for url with %0a
+* Fix missing search box contents in MonoBook skin
+* Add option to forward search directly to an external URL (eg google)
+* Correctly highlight the fallback language variant when the selected
+ variant is disabled. Used in zh: only for now.
+
+=== Beta 5 fixes ===
+
+* (bug 1124) Fix ImageGallery XHTML compliance
+* (bug 1186) news: in the middle of a word
+* (bug 1283) Use underlining and borders to highlight additions/deletions
+ in diff-view
+* Use user's local timezone in Special:Log display
+* Show filename for images in gallery by default (restore beta 3 behaviour)
+* (bug 1201) Double-escaping in brokenlinks, imagelinks, categorylinks, searchindex
+* When using squid reverse proxy, cache the redirect to the Main_Page
+* (bug 1302) Fix Norwegian language file
+* (bug 1205) Fix broken article saving in PHP 5.1
+* (bug 1206) Implement CURRENTWEEK and CURRENTDOW magic keyword (will give
+ number of the week and number of the day).
+* (bug 1204) Blocks do not expire automatically
+* (bug 1184) expiry time of indefinite blocks shown as the current time
+* (bug 1317) Fix external links in image captions
+* (bug 1084) Fix logo not rendering centrally in IE
+* (bug 288) Fix tabs wrapping in IE6
+* (bug 119) Fix full-width tabs with RTL text in IE
+* (bug 1323) Fix logo rendering off-screen in IE with RTL language
+* Show "block" link in Special:Recentchanges for logged in users, too, if
+ wgUserSysopBans is true.
+* (bug 1326) Use content language for '1movedto2' in edit history
+* zh: Fix warning when HTTP_ACCEPT_LANGUAGE is not set
+* zh: Fix double conversion for zh-sg and zh-hk
+* (bug 1132) Fix concatenation of link lists in refreshLinks
+* (bug 1101) Fix memory leak in refreshLinks
+* (bug 1339) Fix order of @imports in Cologne Blue CSS
+* Don't try to create links without namespaces ([[Category:]] link bug)
+* Memcached data compression fixes
+* Several valid XHTML fixes
+* (bug 624) Fix IE freezing rendering whilst waiting for CSS with MonoBook
+* (bug 211) Fix tabbed preferences with XHTML MIME type
+* Fix for script execution vulnerability.
+
+=== Beta 6 fixes ===
+
+* (bug 1335) implement 'tooltip-watch' in Language.php
+* Fix linktrail for nn: language
+* (bug 1214) Fix prev/next links in Special:Log
+* (bug 1354) Fix linktrail for fo: language
+* (bug 512) Reload generated CSS on preference change
+* (bug 63) Fix displaying as if logged in after logout
+* Set default MediaWiki:Sitenotice to '-', avoiding extra database hits
+* Skip message cache initialization on raw page view (quick hack)
+* Fix notice errors in wfDebugDieBacktrace() in XML callbacks
+* Suppress notice error on bogus timestamp input (returns epoch as before)
+* Remove unnecessary initialization and double-caching of parser variables
+* Call-tree output mode for profiling
+* (bug 730) configurable $wgRCMaxAge; don't try to update purged RC entries
+* Add $wgNoFollowLinks option to add rel="nofollow" on external links
+ (on by default)
+* (bug 1130) Show actual title when moving page instead of encoded one.
+* (bug 925) Fix headings containing <math>
+* (bug 1131) Fix headings containing interwiki links
+* (bug 1380) Update Nynorsk language file
+* (bug 1232) Fix sorting of cached Special:Wantedpages in miser mode
+* (bug 1217) Image within an image caption broke rendering
+* (bug 1384) Make patrol signs have the same width for page moves as for edits
+* (bug 1364) fix "clean up whitespace" in Title:SecureAndSplit
+* (bug 1389) i18n for proxyblocker message
+* Add fur/Furlan/Friulian to language names list
+* Add TitleMoveComplete hook on page renames
+* Allow simple comments for each translation rules in MW:Zhconversiontable
+* (bug 1402) Make link color of tab subject page link on talk page indicate whether article exists
+* (bug 1368) Fix SQL error on stopword/short word search w/ MySQL 3.x
+* Translated Hebrew namespace names
+* (bug 1429) Stop double-escaping of block comments; fix formatting
+* (bug 829) Fix URL-escaping on block success
+* (bug 1228) Fix double-escaping on &amp; sequences in [enclosed] URLs
+* (bug 1435) Fixed many CSS errors
+* (bug 1457) Fix XHTML validation on category column list
+* (bug 1458) Don't save if edit form submission is incomplete
+* Logged-in edits and preview of user CSS/JS are now locked to a session token.
+* Per-user CSS and JavaScript subpage customizations now disabled by default.
+ They can be re-enabled via $wgAllowUserJs and $wgAllowUserCss.
+* Removed .ogg from the default uploads whitelist as an extra precaution.
+ If your web server is configured to serve Ogg files with the correct
+ Content-Type header, you can re-add it in LocalSettings.php:
+ $wgFileExtensions[] = 'ogg';
+
+=== RC1 fixes ===
+
+* Fix notice error on nonexistent template in wikitext system message
+* (bug 1469) add missing <ul> tags on Special:Log
+* (bug 1470) remove extra <ul> tags from Danish log messages
+* Fix notice on purge w/ squid mode off
+* (bug 1477) hide details of SQL error messages by default
+ Set $wgShowSQLErrors = true for debugging.
+* (bug 1430) Don't check for template data when editing page that doesn't exist
+* Recentchanges table purging fixed when using table prefix
+* (bug 1431) Avoid redundant objectcache garbage collection
+* (bug 1474) Switch to better-cached index for statistics page count
+* Run Unicode normalization on all input fields
+* Fix translation for allpagesformtext2 in LanguageZh_cn and LanguageZh_tw
+* Block image revert without valid login
+* (bug 1446) stub Bambara (bm) language file using French messages
+* (bug 1432) Update Estonian localization
+* (bug 1471) unclosed <p> tag in Danish messages
+* convertLinks script fixes
+* Corrections to template loop detection
+* XHTML encoding fix for usernames containing & in Special:Emailuser
+* (for zh) Search for variant links even when conversion is turned off,
+ to help prevent duplicate articles.
+* Disallow ISO 8859-1 C1 characters and "no-break space" in user names
+ on Latin-1 wikis.
+* Correct the name of the main page it LanguageIt
+* Allow Special:Makesysop to work for usernames containing SQL special
+ characters.
+* Fix annoying blue line in Safari on scaled-down images on description page
+* Increase upload sanity checks
+* Fix XSS bug in Media: links
+* Add cross-site form submission protection to various actions
+* Fix fatal error on some dubious page titles
+* Stub threshold displays correctly again
+
+
+=== 1.4.0 final fixes ===
+
+* (bug 65) Fix broken interwiki link encoding on Latin-1 wikis; force to UTF-8
+* (bug 563) Fix UTF-8 interwiki URL redirects via Latin-1 wikis
+* (bug 1536) Fix page info
+* Support os (Ossetic) as language code, using Russian localization base
+* (bug 1610) Support non (Old Norse) as language code, using Icelandic localization base
+* (bug 1618) Properly list custom namespaces in Special:Allpages
+* (bug 1622) Remove trailing' >' when using category browser
+* (bug 1570) Fix php 4.2.x error on conflict merging
+* (bug 1585) Fix page title on post-login redirection page
+* Run UTF-8 validation on old text in Recentchanges RSS diffs
+* (bug 1642) fix a mime type typo in img_auth.php
+* Automated interwiki redirects only for local interwikis
+* Respect read-only mode on block removals
+* Trim old illegal characters from syndication feeds
+* Reduce message cache outage recovery delay from 1 day to 5 minutes
+* (bug 1403) Update Finnish localization
+* (bug 1478) Punjabi localization
+* (bug 1667) Update script 5 second countdown.
+* (bug 1057) Fix logging table encoding (error on MySQL 4.1)
+* (bug 1680) Fix linktrail for fo
+* (bug 1653) Removing hardcoded messages in Special:Allmessages
+* (bug 1594) Render a hyphen in a formula as &minus; in HTML
+* (bug 1495) Fall back to default language MediaWiki: for custom messages
+* (bug 1617) Show different error messages for "user does not
+ exist" and "wrong password" when using AuthPlugin
+* (bug 1532), (bug 1544) Changed language names for
+ 'bn', 'bo', 'dv', 'dz', 'ht', 'ii', 'li', 'lo', 'ng', 'or', 'pa', 'si',
+ 'ti', 've'
+* Fix editing on non-Esperanto wiki with user language pref set to Esperanto
+* Make conversion table for zh-sg default to zh-cn, and zh-hk default to zh-tw
+* Fix PHP notice in MonoBook when counters disabled
+* (bug 1696) Update namespaces, dates in uk localization
+* (bug 551) Installer warns about magic_quotes_runtime and magic_quotes_sybase
+ instead of trying to install with corrupt table files
+* Installer no longer tries to move non-default MediaWiki: pages into Template:
+* User-to-user email disabled by default ($wgEnableUserEmail)
+
+
+=== 1.4.1 fixes ===
+
+* (bug 1720) fix genitive month names for uk
+* (bug 1704) fixed untranslateable string in Special:Log
+* (bug 1638) Added Belrusian language file
+* (bug 1736) typo in SpecialValidate.php
+* (bug 73) Upload doesn't run edit updates on description page (links,
+ search index and categories)
+* (bug 646) <math> fails to recognize \ll and \gg
+* (bug 926) \div element from TeX not supported in <math> element
+* (bug 1147) add \checkmark to whitelist in texutil.ml
+* (bug 937) \limits function from LaTeX not supported in <math> element
+* Support for manually converting article title to different Chinese
+ variants (for zh)
+* (bug 1488, bug 1744) Fix encoding for preferences, dates in Latin-1 mode
+* (bug 1042) Fix UTF-8 case conversion for PHP <4.3 with mbstring extension
+* Fix code typo that broke article credits display
+* Installation fixes for running under IIS
+* (bug 1556) login page tab order. "remember" checkbox now come after password.
+* SQL debug log fixlets
+* (bug 1815) Fix namespace in old revision display with mismatched title
+* (bug 1788) Fix link duplication when edit/upload comment includes newlines
+* Change default on $wgSysopUserBans and $wgSysopRangeBans to true
+* Fix link conversion for URL request
+* (bug 1851) Updated download URL for the SCIM packages used by zhtable
+* (bug 1853) Try stripping quotes from term for 'go' title match
+* Fix missing function in Latin1 mode
+* (bug 1860) Anchors of interwiki links did not get normalized
+* (bug 1847) accept lowercase x in ISBN, do not accept invalid A-W,Y,Z
+* Fix link conversion for URL request, hopefully without breaking the wiki
+* (bug 1849) New option allows to consider categorized images as used on
+ Special:Unusedimages
+* Localized category namespace for ka (Georgian)
+* (bug 1107) Work around includes problem in installer when parent dir is not
+ readable by the web server
+* (bug 1927) Incorrect escaping on wikitext message in Blockip
+
+
+=== 1.4.2 fixes ===
+
+* Fix math options in Finnish localization
+* Use in-process Tidy extension if available when $wgUseTidy is on
+* (bug 1933) Fix PATH_INFO usage under IIS with PHP ISAPI module
+* (bug 1188) <nowiki> in {{subst:}} includes fixed
+* (bug 1936) <!-- comments --> in {{subst:}} includes fixed
+* Fix a potential MSIE JavaScript injection vector in Tidy mode
+
+
+=== 1.4.3 fixes ===
+
+* (bug 1636) Refs like &#0355; were misinterpreted as octal in some places
+* (bug 1163) Special:Undelete showed oldest revision instead of newest
+* (bug 1938) Fix escaping of illegal character references in link text
+* (bug 1997) Fix for error on display of renamed items in Recentchanges on PHP5
+* (bug 1949) Profiling typo in rare error case
+* (bug 1963) Fix deletion log link when $wgCapitalLinks is off
+* (bug 1970) Don't show move tab for immobile pages
+* (bug 1770) Page creation recorded links from the 'newarticletext' message
+* Optional change to the site_stats table. When applied, this removes the need
+ for expensive queries in Special:Statistics.
+
+
+=== 1.4.4 fixes ===
+
+* (bug 725) Let dir="ltr" attribute work again in MonoBook on RTL languages
+* (bug 2024) Skip JavaScript error for custom skins where .js message not set
+* (bug 2025) Updated Indonesian localization
+* (bug 2039) Updated Lithuanian localization
+
+
+=== Caveats ===
+
+Some output, particularly involving user-supplied inline HTML, may not
+produce 100% valid or well-formed XHTML output. Testers are welcome to
+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.3.x and older releases, see HISTORY.
+
+
+=== Online documentation ===
+
+Documentation for both end-users and site administrators is currently being
+built up on Meta-Wikipedia, and is covered under the GNU Free Documentation
+License:
+
+ http://meta.wikipedia.org/wiki/Help:Contents
+
+
+=== Mailing list ===
+
+A MediaWiki-l mailing list has been set up distinct from the Wikipedia
+wikitech-l list:
+
+ http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
+
+A low-traffic announcements-only list is also available:
+ http://mail.wikipedia.org/mailman/listinfo/mediawiki-announce
+
+It's highly recommended that you sign up for one of these lists if you're
+going to run a public MediaWiki, so you can be notified of security fixes.
+
+
+=== IRC help ===
+
+There's usually someone online in #mediawiki on irc.freenode.net
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 00000000..7240e417
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,106 @@
+---
+Installing MediaWiki
+---
+
+Starting with MediaWiki 1.2.0, it's possible to install
+and configure the wiki "in-place", as long as you have
+the necessary prerequesites available.
+
+Required software:
+* Web server with PHP 5.x or higher.
+* A MySQL server, 4.0.14 or higher.
+
+MediaWiki is developed and tested mainly on Unix/Linux
+platforms, but should work on Windows as well.
+
+If your PHP is configured as a CGI plug-in rather than
+an Apache module you may experience problems, as this
+configuration is not well tested. safe_mode is also not
+tested and unlikely to work.
+
+If you want math support see the instructions in math/README
+
+Don't forget to check the RELEASE-NOTES file...
+
+
+Additional documentation is available online, which may include more
+detailed notes on particular operating systems and workarounds for
+difficult hosting environments:
+
+http://meta.wikimedia.org/wiki/Help:Installation
+
+
+********************** WARNING **************************
+
+REMEMBER: ALWAYS BACK UP YOUR DATABASE BEFORE ATTEMPTING
+TO INSTALL OR UPGRADE!!!
+
+********************** WARNING **************************
+
+----
+In-place web install
+----
+
+Decompress the MediaWiki installation archive either on
+your server, or on your local machine and upload the
+directory tree. Rename it from "mediawiki-1.x.x" to
+something nice, like "wiki", since it'll be in your URL.
+
+ +-----------------------------------------------------------+
+ | Hint: If you plan to use a fancy URL-rewriting scheme |
+ | to prettify your URLs, you should put the files in a |
+ | *different* directory from the virtual path where page |
+ | names will appear. |
+ | |
+ | See: http://meta.wikimedia.org/wiki/Rewrite_rules |
+ +-----------------------------------------------------------+
+
+To run the install script, you'll need to temporarily make
+the 'config' subdirectory writable by the web server. The
+simplest way to do this on a Unix/Linux system is to make
+it world-writable:
+
+ chmod a+w config
+
+Hop into your browser and surf into the wiki directory.
+It'll direct you into the config script. Fill out the form...
+remember you're probably not on an encrypted connection.
+Gaaah! :)
+
+If all goes well, you should soon be told that it's set up
+your wiki database and written a configuration file. There
+should now be a 'LocalSettings.php' in the config directory;
+move it back up to the main wiki directory, and the wiki
+should now be working.
+
+ +------------------------------------------------------------+
+ | Security hint: if you have limited access on your server |
+ | and cannot change ownership of files, you might want to |
+ | *copy* instead of *move* LocalSettings.php. |
+ | |
+ | This will make the file owned by your user account |
+ | instead of by the web server, which is safer in case |
+ | another user's account is compromised. |
+ +------------------------------------------------------------+
+
+Once the wiki is set up, you should remove the config
+directory, or at least make it not world-writable (though
+it will refuse to config again if the wiki is set up).
+
+
+----
+
+Don't forget that this is free software under development!
+Chances are good there's a crucial step that hasn't made it
+into the documentation. You should probably sign up for the
+MediaWiki developers' mailing list; you can ask for help (please
+provide enough information to work with, and preferably be aware
+of what you're doing!) and keep track of major changes to the
+software, including performance improvements and security patches.
+
+http://mail.wikimedia.org/mailman/listinfo/mediawiki-announce (low traffic)
+
+http://mail.wikimedia.org/mailman/listinfo/mediawiki-l (site admin support)
+
+http://mail.wikimedia.org/mailman/listinfo/wikitech-l (development)
+
diff --git a/README b/README
new file mode 100644
index 00000000..427b5479
--- /dev/null
+++ b/README
@@ -0,0 +1,103 @@
+2006-04-05
+
+For system requirements, installation and upgrade details, see the files RELEASE-NOTES,
+INSTALL, and UPGRADE.
+
+== MediaWiki ==
+
+MediaWiki is the software used for Wikipedia [http://www.wikipedia.org/] and the
+other Wikimedia Foundation websites. Compared to other wikis, it has an
+excellent range of features and support for high-traffic websites using
+multiple servers (Wikimedia sites peak in the 5000+ requests per second range
+as of November 2005).
+
+While quite usable on smaller sites, you may find you have to "roll your own"
+local documentation, and some aspects of configuration may seem overcomplicated
+because MediaWiki is primarily targeted as an in-house tool.
+
+The MediaWiki software was written by:
+* Lee Daniel Crocker
+* Magnus Manske
+* Jan Hidders
+* Brion Vibber
+* Axel Boldt
+* Geoffrey T. Dairiki
+* Tomasz Wegrzanowski
+* Erik Moeller
+* Tim Starling
+* Gabriel Wicke
+* Ashar Voultoiz
+* Evan Prodromou
+* Ævar Arnfjörð Bjarmason
+* Niklas Laxström
+* Domas Mituzas
+* Rob Church
+* Jens Frank
+* Several others
+
+The contributors hold the copyright to this work, and it is licensed
+under the terms of the GNU General Public License, version 2 or later[1]
+(see http://www.fsf.org/licenses/gpl.html). Derivative works and later
+versions of the code must be free software licensed under the same
+terms. This includes "extensions" that use MediaWiki functions or
+variables; see http://www.gnu.org/licenses/gpl-faq.html#GPLAndPlugins
+for details.
+
+The Wikimedia Foundation currently has no legal rights to the software.
+
+[1] Sections of code written exclusively by Lee Crocker or Erik Moeller are
+also released into the public domain, which does not impair the obligations of
+users under the GPL for use of the whole code or other sections thereof.
+
+[2] MediaWiki makes use of the Sajax Toolkit by modernmethod,
+ http://www.modernmethod.com/sajax/
+ which has the following license:
+
+ 'This work is licensed under the Creative Commons Attribution
+ License. To view a copy of this license, visit
+ http://creativecommons.org/licenses/by/2.0/ or send a letter
+ to Creative Commons, 559 Nathan Abbott Way,
+ Stanford, California 94305, USA.'
+
+Many thanks to the Wikimedia regulars for testing and suggestions.
+
+The official website for mediawiki is located at:
+
+ http://www.mediawiki.org/
+
+The code is currently maintained in a Subversion repository
+at svn.wikimedia.org. See http://www.mediawiki.org/wiki/Subversion
+for details.
+
+Please report bugs and make feature requests in our Bugzilla system:
+
+ http://bugzilla.wikimedia.org/
+
+Documentation and discussion on new features may be found at:
+
+ http://www.mediawiki.org/wiki/Help:FAQ
+ http://www.mediawiki.org/wiki/Documentation
+ http://www.mediawiki.org/wiki/Development
+
+Extensions are listed at:
+
+ http://meta.wikimedia.org/wiki/Category:MediaWiki_extensions
+
+If you are setting up your own wiki based on this software, it is highly
+recommended that you subscribe to mediawiki-announce:
+
+ http://mail.wikimedia.org/mailman/listinfo/mediawiki-announce
+
+The mailing list is very low volume, and is intended primarily for
+announcements of new versions, bug fixes, and security issues.
+
+A higher volume support mailing list can be found at:
+
+ http://mail.wikimedia.org/mailman/listinfo/mediawiki-l
+
+Developer discussion takes place at:
+
+ http://mail.wikimedia.org/mailman/listinfo/wikitech-l
+
+There is also a development and support channel #mediawiki on
+irc.freenode.net, and an unoffical support forum at www.mwusers.com.
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
new file mode 100644
index 00000000..7378b5df
--- /dev/null
+++ b/RELEASE-NOTES
@@ -0,0 +1,761 @@
+= 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.7.1 ==
+
+July 8, 2006
+
+MediaWiki 1.7.1 is a security and bugfix maintenance release of the
+Summer 2006 snapshot:
+
+A potential HTML/JavaScript-injection vulnerability in a debugging script
+has been fixed. Only versions and configurations of PHP vulnerable to the
+$GLOBALS overwrite vulnerability are affected.
+
+As a workaround for existing installs, profileinfo.php may simply be deleted
+if it's not being used.
+
+* Fix for 'emailconfirmed' implicit user group
+* Fix for upgrades on some versions of MySQL 4.0.x
+* Fixed potential XSS in profileinfo.php
+* Installer now shows clear error message about old PHP versions
+ rather than a confusing parse error
+
+
+== MediaWiki 1.7.0 ==
+
+July 6, 2006
+
+This is the quarterly release snapshot for Summer 2006. While the code
+has been running on Wikipedia for some time, installation and upgrade
+bits may be less well tested. Bug fix releases may follow in the coming
+days or weeks.
+
+
+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.
+
+Release branches will continue to receive security updates for about a year
+from first release, but nonessential bugfixes and feature development happen
+will be made on the development trunk and appear in the next quarterly release.
+
+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
+
+
+== Compatibility ==
+
+MediaWiki 1.7 requires PHP 5 (5.1 recommended). PHP 4 is no longer supported.
+
+If you are unable to run PHP 5, you may have to stick with 1.6 for now.
+
+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.
+
+Experimental Oracle support has been dropped as it is unmaintained.
+
+
+== Upgrading ==
+
+Several changes to the database have been made from 1.6:
+
+* A new "langlinks" table tracks interlanguage links
+* A new "filearchive" table stores information on deleted files
+* A new "querycache_info" table stores information on query page updates
+
+To ensure that these tables are filled with data, run refreshLinks.php after
+the upgrade.
+
+If you are upgrading from MediaWiki 1.4.x or earlier, some major database
+changes are made, and there is a slightly higher chance that things could
+break. Don't forget to always back up your database before upgrading!
+
+See the file UPGRADE for more detailed upgrade instructions.
+
+
+== Configuration changes ==
+
+Some configuration options have changed:
+* $wgAllowExternalImages now defaults to off for increased security.
+* $wgLocalTZoffset was in hours, it is now using minutes.
+* Extensions may register special pages via the $wgSpecialPages array
+ without forcing an early load of the SpecialPage.php class file.
+
+
+== Major new features ==
+
+* Deleted files can now be archived and undeleted, if you set up
+ an appropriate non-web-accessible directory.
+ Set $wgSaveDeletedFiles on and an appropriate directory path in
+ $wgFileStore['deleted']['directory']
+* Experimental PostgreSQL support has been updated. It may or may
+ not be in usable shape; those interested in PostgreSQL are encouraged
+ to follow 1.8 development.
+
+
+
+== Changes since 1.6 ==
+
+* (bug 5458) Fix double-URL encoding in block log link in contribs and contribs
+ link in block log
+* (bug 5462) Bogus missing patch warning in updater
+* (bug 5461) Use of deprecated "showhideminor" in Special:Recentchangeslinked
+* PHP warning when allow_call_time_pass_reference is off
+* Update to Finnish localization
+* (bug 5467) Link to page histories in watchlist edit mode
+* Further additions to Hebrew localisation
+* (bug 5476) Invalid xhtml in German localization
+* (bug 5479) Id translation for preferences tabs caption
+* (bug 5493) Id translation for special pages
+* Added skinname and style path parameters to CBT version of MonoBook
+* Include subversion revision number in Special:Version if available
+* (bug 5344) Fix regression that broke slashes in extension tag parameters
+* Improve Special:Log performance on big log sets
+* (bug 5507) Changed mediawiki:logouttext from plain to wikitext
+* (bug 4760) Prevent creation of entries in protection log when protection
+ levels haven't changed
+* (bug 861) Show page protection/unprotection events in histories
+* (bug 5499) Don't clear the tag strip state when asked not to clear state.
+ Fixes regression with use of <ref> in a template breaking <nowiki> etc.
+* Minor improvements to English language files
+* Display the anon talk page info message on anon talk pages again
+ (moved outside the parser cache)
+* Optional {{DISPLAYTITLE|title with markup}} magic word
+ Deactivated by default, set "$wgAllowDisplayTitle = true" in LocalSettings.php
+ to activate
+* Cleaned SpecialContributions a bit
+* Added a table to track interlanguage links
+* (bug 5544) Fix redirect arrow in Special:Listredirects for right-to-left
+ languages
+* Replace "doubleredirectsarrow" with a content language check that picks the
+ appropriate arrow
+* (bug 5537) Add stub language file for Samogitian (bat-smg); inherits
+ Lithuanian (lt)
+* Don't force edit summaries when a user is editing their own user/talk page
+* (bug 5510) Warning produced when using {{SUBPAGENAME}} in some namespaces
+* (bug 385) Installer support for PostgreSQL, fixes for PG compatibility
+* PersistentObject removed; it doesn't do anything and was broken besides.
+ All extensions using it have been corrected.
+* Propagate ISBN number for Booksources in LanguageNo.php
+* (bug 5548) Improvements to Indonesian localisation [patch: Ivan Lanin]
+* Add TALKSPACE, SUBJECTSPACE, TALKPAGENAME, SUBJECTPAGENAME (and encoded forms
+ for all) magic words
+* (bug 5403) Fix Special:Newpages RSS/Atom feeds
+* Reject malformed addresses in X-Forwarded-For entries
+* (bug 3359) Add hooks on completion of file upload
+* (bug 5559) Improve detection of ImageMagick [patch: Greg Turnquist]
+* (bug 5475) New pages feeds ignore "limit" argument
+* (bug 5184) CSS misapplied to elements in Special:Allmessages due to
+ conflicting anchor identifiers
+* (bug 5519) Allow sidebar cache to be disabled; disable it by default.
+* Maintenance script to import the contents of a text file into a wiki page
+* Add $wgReservedUsernames configuration directive to block account creation/use
+* (bug 5576) Remove debugging hack in session check
+* (bug 5426) Lowercase treatment of titles in rights log leads to broken links
+ on Special:Log
+* Minor improvements to French localisation files
+* (bug 5181) Update "nogomatch" for Slovak
+* (bug 5594) Id translation up to # Login and logout pages section
+* (bug 5536) Use content language for editing help link
+* Improvements to German localisation files
+* (bug 5570) Problems using <special page>/parameter link form for long titles
+* (bug 3884) Add $user parameter to AddNewUser hook, call it for by-email
+ registrations as well as self-registrations.
+* (bug 4327) Report age of cached data sets in query pages
+* (bug 4662) Fix Safari check in wikibits.js
+* (bug 4663) Edit toolbar enabled in compatible versions of Safari
+* (bug 5572) Edit toolbar enabled in compatible versions of Konqueror (3.5+)
+* (bug 5235) Edit toolbar tooltips no longer show JavaScript junk in Opera
+* Edit toolbar now works in pure XHTML mode (application/xhtml+xml)
+* Add watchlist clear function to allow quick purging of all items
+* (bug 5625) Additional namespace translations for Welsh
+* Add meta tag and JavaScript variables to cached special pages which provides
+ the timestamp of the last update, in YYYYMMDDHHMMSS format.
+* (bug 5628) More translations for MessagesHr.php
+* (bug 5595) Localisation for Bosnian language (bs)
+* (bug 2910) Default view preferences for watchlists
+* Add "hide bot edits from the watchlist" user preference
+* (bug 5250) Introduce Special:Unusedtemplates
+* Add user preference setting for an extended watchlist, showing all recent
+ edits up to a certain edit, and not just the latest edit..
+* Made MessageRo.php more general
+* (bug 5640) Indonesian localisation improvements
+* (bug 5592) Actions are logged with the default language for the
+ wiki, not the language of the user performing the operation.
+* (bug 5644) Error in LanguageBs.php file
+* (bug 5646) Compare for identical types in wfElement()
+* (bug 5472) Language::userAdjust()->minDiff not initialized on else condition
+* (bug 5386) LanguageMk.php: updated namespaces translations
+* (bug 5422) Stub for Romani (rmy) language which extends ro
+* Fix linktrail for LanguageSr
+* (bug 5664) Fix Bosnian linktrail
+* (bug 3825) Namespace filtering on Special:Newpages
+* (bug 1922) When Special:Wantedpages is cached, mark links to pages
+ which have since been created
+* (bug 5659) Change grammar hacks for Bosnian Wikimedia namespaces.
+ This sort of special casing should be removed and fixed properly.
+* Remove useless whitespace from Special:Brokenredirects header
+* Treat "allmessagesnotsupporteddb" as wikitext when echoing; change default
+ text
+* (bug 5497) Regression in HTML normalization in 1.6 (unclosed <li>,<dd>,<dt>)
+* (bug 5709) Allow customisation of separator for categories
+* (bug 5684) Introduce Special:Randomredirect
+* (bug 5611) Add a name attribute to the text box containing source text in
+ read-only pages
+* Indicate when a protected page is an interface message ("protectedinterface")
+* (bug 4259) Indicate when a protected page being edited is an interface message
+ ("editinginterface")
+* (bug 4834) Fix XHTML output when using $wgMaxTocLevel
+* Pass login link to "whitelistedittext" containing 'returnto' parameter
+* (bug 5728): mVersion missing from User::__sleep() leading to constant cache
+ miss
+* Updated maintenance/transstat.php so it can show duplicate messages
+* Improvements to update scripts; print out the version, check for superuser
+ credentials before attempting a connection, and produce a friendlier error if
+ the connection fails
+* (bug 5005) Fix XHTML <gallery> output.
+* (bug 5315) "Expires: -1" HTTP header made strictly valid (using 1970 date).
+* (bug 4825) note in DefaultSettings.php about 'profiling' table creation
+* Remove unneeded extra whitespace at top of Special:Categories
+* (bug 5679) time units are now using local numerals
+* (bug 5751) Updates to Portuguese localisation files
+* (bug 5741) Introduce {{NUMBEROFUSERS}} magic word
+* (bug 93) <nowiki> tags and tildes in templates
+* The returnto parameter is now actually used by SpecialUserlogin.php
+* Parser can now know that it is parsing an interface message
+* (bug 4737) MediaWiki:Viewcount supports {{PLURAL}} now
+* Fix bug in wfMsgExt under PHP 5.1.2
+* (bug 5761) Project talk namespace broken in Xal, Os, Udm and Cv
+* Rewrite reassignEdits script to be more efficient; support optional updates to
+ recent changes table; add reporting and silent modes
+* Cleaned up formatNum usage in langfiles
+* (bug 5716) Warn when a user tries to upload a file which was previously
+ deleted
+* (bug 5565) Add a class attribute to the table on Special:Allpages
+* "lang=xx" option for parser test cases to set content language
+* (bug 5764) Friulian translation updated
+* (bug 5757) Fix premature cutoff in LanguageConverter with extra end markers
+* (bug 5516) Show appropriate "return to" link on blocked page
+* (bug 5377) Do not auto-login when creating an account as another user
+* (bug 5284) Special redirect pages should remember parameters
+* Suppress 7za output on dumpBackup
+* (bug 5338) Reject extra initial colons in title
+* (bug 5487) Escape self-closed HTML pair tags
+* Add "raw suffix" magic word for some magic words, e.g. {{NUMBEROFUSERS|R}}
+ will produce a count minus formatting
+* Fix Parser::cleanSig() to use Parser::startExternalParse() and choose an
+ appropriate output format given the scope of the clean
+* (bug 5593) Change "bureaucrat log" to "rights log"
+* Show a boilerplate "(none)" in place of a blank within the log action text for
+ user rights
+* (bug 137) Commented out translations for copyrightwarning which mention GNU FDL
+* (bug 5723) Don't count pages linked to from the MediaWiki namespace as "wanted"
+* (bug 5696) Add a third parameter, $3, to "rcnote", passing the current time
+ formatted according to the current user's settings
+* (bug 5780) Thousands and decimal separators for Norwegian
+* Updated initStats maintenance script
+* (bug 5767) Fix date formats in Vietnamese locale
+* (bug 361) URL in URL, they were almost fixed. Now they are.
+* (bug 4876) Add __NEWSECTIONLINK__ magic word to force the "new section" link/tab to
+ show up on specific pages on demand
+* Bidi-aid on list pages
+* (bug 5782) Allow entries in the bad image list to use canonical namespace names
+* (bug 5789) Treat "loginreqpagetext" as wikitext
+* Sanitizer: now handles nested <li> in <ul> or <ol>
+* (bug 5796) We require MySQL >=4.0.14
+* Add 'EmailConfirmed' hook
+* New findhooks.php script to find undocumented hooks.
+* Silently ignore errors on profiling table update.
+* (bug 5801) Correct handling of underscores in Special:Listusers
+* Clean up Special:Listusers; add an "(all)" label to the group selection box
+* (bug 5812) Use appropriate link colour in Special:Mostlinked
+* (bug 5802) {{CURRENTMONTHNAME}} variable broken in Vietnamese locale
+* (bug 5817) Appropriate handling for Special:Recentchangeslinked where the target
+ page doesn't exist
+* Special:Randompage now additionally accepts English namespace name as parameter
+* (bug 2981) Really fixed linktrail for Tamil (ta)
+* Disallow substituting Special pages when included into a page
+* (bug 5587) Clean up the languages from references to the Groups special page
+* Added new group-X and group-X-member messages
+* Rewritten removeUnusedAccounts to be more efficient, print names of inactive
+ accounts
+* Redirect Special:Userlist to Special:Listusers
+* Introduce $wgAllowTitlesInSVG, which allows the <title> attribute in uploaded files
+ bearing the image/svg MIME type. Disabled by default due to the vast majority of
+ web servers being hideously misconfigured. See DefaultSettings.php for more details.
+* Changed default LocalSettings.php to append the previous include path when setting it
+* (bug 5837) Use "members" for the value descriptor in Special:Categories,
+ Special:Wantedcategories and Special:Mostlinkedcategories.
+* (bug 3309) Allow comments when undeleting pages
+* Clean up Special:Undelete a bit
+* (bug 5805) messages nbytes, ncategories can now use {{plural:}}
+* Clean up Special:Imagelist a bit
+* (bug 5838) Namespace names for Nds-NL
+* (bug 5749) Added Tyvan language files
+* (bug 5791) Fix SQL syntax in Special:BrokenRedirects, was causing incorrect data to show
+* (bug 5839) Prevent access to Special:Confirmemail for logged-out users
+* (bug 5853) Update for Portuguese messages (pt)
+* (bug 5851) Use Cyrillic for Kirghiz language name
+* (bug 5841) Allow the 'EditFilter' hook to return a non-fatal error message
+* (bug 5846) Link to individual group description pages in Special:Listusers
+* (bug 5857) Update for German localisation (de)
+* (bug 5858) Update for Russian language (ru)
+* (bug 5860) Update for Indonesian language (id)
+* (bug 1120) Update for Czech language (Cs)
+* Added many missing formatNum calls
+* Added grammar function to Belarusian (be)
+* (bug 5819) Add 'PersonalUrls' hook
+* (bug 5862) Update of Belarusian language (be)
+* (bug 5886) Update for Portuguese messages (pt)
+* (bug 5586) <gallery> treated text as links
+* (bug 5878) Update for Indonesian language (id)
+* (bug 5697) Update for Malay language (ms)
+* (bug 5890) Update for German language (de)
+* (bug 5889) Name for Sindhi language should appear as سنڌي
+* --force-normal parameter on dump scripts to force check for ICU extension
+* (bug 5895) Update for Dutch language (nl)
+* (bug 5891) Linktrail for Polish language (pl)
+* User::isBureaucrat , User::isDeveloper , User::isSysop deprecated in
+ v1.6 now die with a backtrace. They will be removed in v1.8
+* dumpTextPass now skips goes to database for entries that were blank in the
+ previous dump, as this may indicate a broken dump.
+* dumpTextPass progress includes percentage of items prefetched
+* dumpTextPass can now use 7zip files for prefetch
+* (bug 5915) Update to Indonesian localisation (id)
+* (bug 5913) Update for German localisation (de)
+* (bug 5905) Plural support for Bosnian localisation (bs)
+* Groups which won't hit the rate limiter now configurable with
+ $wgRateLimitsExcludedGroups
+* (bug 5806) {{plural:}} support instead of "twin" MediaWiki messages
+* (bug 5931) Update for Polish language (pl)
+* Ignore the user and user talk namespaces on Special:Wantedpages
+* Introduce NUMBEROFPAGES magic word
+* (bug 5833) Introduce CURRENTVERSION magic word
+* (bug 5370) Allow throttling of password reminder requests with the rate limiter
+* (bug 5683) Respect parser output marked as uncacheable when saving
+* (bug 5918) Links autonumbering now work for all defined protocols
+* (bug 5935) Improvement to German localisation (de)
+* (bug 5937) Register links from gallery captions with the parent parser output
+ object so that link tables receive those updates too
+* (bug 5845) Introduce BASEPAGENAME and BASEPAGENAMEE magic words
+* (bug 5941) Use content language when getting the administrator page title for
+ Special:Statistics
+* (bug 5949) Update to Indonesian localisation (id)
+* (bug 5862) Update of Belarusian translation (be)
+* (bug 5950) Improvements to French localisation
+* (bug 5805) {{plural:}} support for counters in some special pages
+* (bug 5952) Improvement to German localisation (de)
+* Rename conflicting metadata help message to "metadata_help" (was "metadata")
+ and treat it as wiki text
+* Improve preferences input filtering
+* Maintenance script to import multiple files into the wiki
+* (bug 5957) Update for Hebrew language (he)
+* (bug 5962) Update for Italian language (it)
+* (bug 5961) Update for Portuguese localisation (pt)
+* (bug 5849) Remove some hard-coded references to "Wikipedia" in messages
+* (bug 5967) Improvement to German localisation (de)
+* (bug 5962) Update for Italian language (it)
+* Suppress images in galleries which appear on the bad image list (when rendering
+ for a wiki page; galleries in special pages and categories are unaffected)
+* Maintenance script to remove orphaned revisions from the database
+* (bug 5991) Update for Russian language (ru)
+* (bug 6001) PAGENAMEE and FULLPAGENAMEE don't work in FULLURL and LOCALURL magic
+ words
+* (bug 5958) Switch Uzbek language name to use latin script
+* (bug 839) Add URLENCODE magic word
+* (bug 6004) Update for Polish language (pl)
+* (bug 5971) Improvement to German localisation (de)
+* (bug 4873) Don't overwrite the subtitle navigation when viewing a redirect page
+ that isn't current
+* (bug 2203) Namespace updates for Thai
+* Fix breakage in parser test suite which caused incorrect reporting of the failure of
+ {{NUMBEROFFILES}}. Now initialises the site_stats table with some dumb data. Updated
+ the expected output for {{NUMBEROFARTICLES}} to reflect this.
+* (bug 6009) Use {{ns:project}} in messages where appropriate
+* (bug 6012) Update to Indonesian localisation (id)
+* (bug 6017) Update list of bookstores in German localisation files
+* (bug 5187) Allow programmatically bypassing username validation, for scripts
+* (bug 6025) SpecialImport: wrong message when no file selected
+* (bug 6015) EditPage: add spacing in the boxes "edit is minor" and "watch this"
+* (bug 6018) Userrights: new message when no user specified ('nouserspecified')
+* (bug 2015) Add "\sim" to ~ conversion for HTML rendering
+* (bug 6029) Improvement to German localisation (de)
+* (bug 5015) Update be: magic words
+* (bug 3974) Add parameter for site URL to "passwordremindertext"
+* (bug 6039) Update for Portuguese localisation (pt)
+* (bug 764) Add CREATE TEMPORARY TABLES to default database permissions
+* Big update to Swedish localisation (sv)
+* Use appropriate HTML functions to create the tool links on image pages, so they don't
+ look garbled when tidy isn't on
+* (bug 5511) Fix URL-encoding of usernames in links on Special:Ipblocklist
+* (bug 6046) Update to Indonesian localisation (id) #15
+* (bug 5523) $wgNoFollowNsExceptions to allow disabling rel="nofollow" in
+ specially-selected namespaces.
+* (bug 6055) Fix for HTML/JS injection bug in variable handler (found by Nick Jenkins)
+* Reordered wiki table handling and __TOC__ extraction in the parser to better
+ handle some overlapping tag cases.
+* Only the first __TOC__ is now turned into a TOC
+* (bug 4610) Indicate patrolled status on watchlists and allow users to mark
+ changes as patrolled using the diff links there
+* Add 'DiffViewHeader' hook called before diff page output
+* (bug 6051) Improvement to German localisation (de)
+* (bug 6054) Update to Indonesian localisation (id) #16
+* Add {{CURRENTTIMESTAMP}} magic word
+* (bug 6061) Improper escaping in some html forms
+* (bug 6065) Remove underscore when using NAMESPACE and TALKSPACE magics.
+* (bug 6074) Correct squid purging of offsite upload URLs
+* To simplify the lives of extension developers, the logging type arrays
+ can now be appended to directly by an extension setup function. It is
+ no longer necessary to write four separate functions just to add a
+ custom log type.
+* (bug 6057) Count "licenses" as a message (and show it in Special:Allmessages)
+* Added $wgGrammarForms global
+* Fixed hardcoded 'done.' when removing watchlist entries.
+* (bug 5962) Update for Italian language (it)
+* (bug 6086) Remove vestigial attempt to call Article::validate()
+* wfHostname() function for consistent server hostname use in debug messages
+* Send thumbnailing error messages to 'thumbnail' log group
+* wfShellexec() now accepts an optional parameter to receive the exit code
+* Failed, but not zero-length, thumbnail renderings are now removed.
+ Should help clean up when rsvg fails in weird ways.
+* (bug 6081) Change description for Turkmen language
+* Increase robustness of parser placeholders; fixes some glitches when
+ adjacent to identifier-ish constructs such as URLs.
+* Shut up the parser test whining about files in a temp directory.
+* (bug 6098) Add Aragonese language support (an)
+* (bug 6101) Update for Russian language (ru)
+* Add $wgIgnoreImageErrors to suppress error messages for thumbnail rendering
+ problems. If errors are transitory, this should reduce annoying messages
+ making it into cached display.
+* (bug 6103) Wrap self-links in a CSS class ("selflink")
+* (bug 6102) For consistency with other markup, normalize all HTML-encoded
+ character entities in URLs, not just ampersands. This allows use of eg
+ &#61; when making URLs for template parameters.
+* Markup anality: escape </ as <\/ in toolbar javascript for pure correctness
+ under HTML-compatible browsers.
+* (bug 5077) Added hook 'BeforePageDisplay' to SkinTemplate::outputPage
+* Replace fatally changed 'uploadnewversion' with 'uploadnewversion-linktext'
+* (bug 472) Syndication feeds for the last few edits of page history
+* Format edit comments in Recent Changes feed
+* Switch incorrectly ordered column headers on Recent Changes feed diffs
+* (bug 6117) Use message for history feed description, add German localization
+* (bug 1017) fixed thumbnails of animated gifs.
+* Add APC as object caching option
+* Update to Albanian localization (sq)
+* (bug 6099) Introduce {{DIRECTIONMARK}} magic word (with {{DIRMARK}} as an alias)
+* Use optimized php5-only microtime()
+* Add possibility to store local message cache as PHP executable script
+* Fix profiling table definition
+* (bug 6040) Run pre-save transform before calculating the diff. when doing a
+ "show changes" operation in the editor
+* (bug 4033) Respect $wgStyleDirectory when checking available skins
+* Remove hideous backslashes from MessagesBr.php
+* Fix APC object cache issues, add functionality to installer
+* (bug 6133) Update strip state as we work. This mostly fixes extensions
+ used in Cite.php <ref> tags when Tidy is on.
+* (bug 6139) Workaround for transclusion oddities in Vietnamese upload text
+* (bug 6136) Update to Catalan language (ca)
+* Update to Japanese localization (ja)
+* Add /usr/local/bin to the diff3 search paths in the installer
+* (bug 6106) Update to Indonesian localisation (id) #17
+* (bug 6125) Add links to edit old versions to diff views
+* (bug 5127) Auto edit summary when creating/editing redirect page
+* (bug 3926) Introduce {{#language:}} magic word
+* Fix section links from edit comments for [[:Image:Bla.jpg]] in section titles
+* (bug 6126) Allow fallback to customized primary language when user language
+ message contains '-'; fixes licenses selector on Commons configuration after
+ recent addition of the message to Messages.php
+* (bug 5527) Batch up job queue insertions for, hopefully, better survivability
+ of lock contention etc. Duplicates are now removed at pop time instead of
+ at insert time.
+* When showing the "blah has been undeleted" page, make sure it's a blue link
+* parserTests.php accepts a --file parameter to run an alternate test sutie
+* parser tests can now test extensions using !!hooks sections
+* Fix oddity with open tag parameters getting stuck on </li>
+* (bug 5384) Fix <!-- comments --> in <ref> extension
+* Nesting of different tag extensions and comments should now work more
+ consistently and more safely. A cleaner, one-pass tag strip lets the
+ 'outer' tag either take source (<nowiki>-style) or pass it down to
+ further parsing (<ref>-style). There should no longer be surprise
+ expansion of foreign extensions inside HTML output, or differences
+ in behavior based on the order tags are loaded.
+* (bug 885) Pre-save transform no longer silently appends close tags
+* Pre-save transform no longer changes the case of close tags
+* (bug 6164) Fix regression with <gallery> resetting <ref> state
+* Hackaround for IE 7 wrapping bug in MonoBook footer
+* New message sp-newimages-showfrom replaces rclistfrom on special:newimages
+* Improve handling of ;: definition list construct with overlapping or
+ nested HTML tags
+* (bug 6171) Fix sanitizing of HTML-elements with an optional closing
+ tag. The sanitizer still needs to learn how to make well-formed XML
+ in this case.
+* Fix fatal error when specifying illegal name for manual thumbnail
+* (bug 6184) Use shinier Linker::userLink() to make user links in
+ Special:Undelete
+* (bug 6170) Update for Kashubian translation (csb)
+* (bug 6191) Update to Indonesian translation (id) #18
+* (bug 6114) Update to Walloon localization (wa)
+* Added $wgNamespaceRobotPolicies to allow customisation of robot policies on a
+ per-namespace basis.
+* Add <ol> to the list of block elements for doBlockLevels; avoids <p>s being
+ interspersed into your ordered lists.
+* (bug 5021) Transcluding the same special page twice now works
+* Add 'SiteNoticeBefore' and 'SiteNoticeAfter' hooks
+* (bug 6182) Date passed in "sp-newimages-showfrom" not adjusted to user time
+ preferences
+* (bug 2587) Fix for section editing with comment prefix
+* (bug 2607) Fix for section editing with mix of wiki and HTML headings
+* (bug 3342) Fix for section editing with headings wrapped in <noinclude>
+* (bug 3476) Fix for section editing with faux headings in extensions
+* (bug 5272) Fix for section editing with HTML-heading subsections
+* Fix for bogus wiki headings improperly detected with following text
+* Fix for HTML headings improperly not detected with preceding/following text
+* Section extraction and replacement functions merged into one implementation
+ on the Parser object, so they can't get out of sync with each other.
+* Edit security precautions in raw HTML mode, etc
+* (bug 6197) Update to Indonesian translation (id) #19
+* (bug 6175) Improvement to German translation (de)
+* Redirect Special:Logs to Special:Log
+* (bug 6206) Linktrail for Swedish localization (se)
+* (bug 3202) Attributes now allowed on <pre> tags
+* Sanitizer::validateTagAttributes now available to discard illegal/unsafe
+ attribute values from an array.
+* (bug 3837) Leave <center> as is instead of doing an unsafe text replacement
+ to <div class="center">. <center> is perfectly valid in the target doctype
+ (XHTML 1.0 Transitional), while the replacement didn't catch all cases and
+ could even result in invalid output from valid input.
+* (bug 4280) Use 'noindex,nofollow' instead of 'noindex,follow' for default
+ meta robots tag on diff view and special pages. Should reduce impact of
+ robots on scrolling special pages, diffs etc on sites where robots.txt
+ doesn't forbid access.
+* Regression fix: suppress warning about session failure when clicking to
+ edit with 'preview on first edit' enabled.
+* (bug 6230) Regression fix: <nowiki> in [URL link text]
+* Added AutoLoader.php, which loads classes without need of require_once()
+* (bug 5981) Add plural function Slovenian (sl)
+* (bug 5945) Introduce {{CONTENTLANGUAGE}} magic word
+* {{PLURAL}} can now take up to five forms
+* (bug 6243) Fix email for usernames containing dots when using PEAR::Mail
+* Remove a number of needless {{ns:project}}-type transforms from messages files. These
+ usages already have separate label text. Such transforms are wasteful on each page view.
+* Update to Yiddish localization (yi)
+* (bug 6254) Update to Indonesian translation (id) #20
+* (bug 6255) Fix transclusions starting with "#" or "*" in HTML attributes
+* Whitespace now normalized more or less properly in HTML attributes
+* Fix regression(?) in behavior of initial-whitespace-pre in <center>
+* (bug 6260) Update to Interlingua localization (ia)
+* Update to Vlax Romany localization (rmy)
+* Update to Latin translation (la)
+* Update to Dutch translation (nl)
+* Avoid some notices in page history with bad input
+* Use double quoted consistently on attributes in linker output; preparing
+ for new normalization code when tidy not in use
+* Replace "nogomatch" with "noexactmatch" and place the magic colon in the messages
+ themselves. Some minor tweaks to the actual message content.
+* Introduce $wgContentNamespaces which allows for articles to exist in namespaces other
+ than the main namespace, and still be counted as valid content in the site statistics.
+* (bug 5932) Introduce {{PAGESINNAMESPACE}} magic word
+* Disable $wgAllowExternalImages by default.
+* (bug 2700) Nice things like link completion and signatures now work in <gallery> tags.
+* Cancel output buffering in StreamFile; when used inside gzip buffering this
+ could cause funny timeout behavior as the Content-Length was wrong.
+* Return correct content-type header with 304 responses for StreamFile;
+ it confuses Safari if you let it return "text/html".
+* (bug 6280) Correct GRAMMAR for Slovenian localisation (sl)
+* (bug 6162) Change date format for Dutch Low Saxon (nds-nl)
+* (bug 6296) Update to Indonesian localisation (id) #21
+* Introduce EditFormPreloadText hook, see docs/hooks.txt for more information
+* (bug 4054) Add "boteditletter" to recent changes flags
+* Update to Catalan localization (ca)
+* (bug 2099) Deleted image files can now be archived and undeleted.
+ Set $wgSaveDeletedFiles on and an appropriate directory path in
+ $wgFileStore['deleted']['directory']
+* (bug 6324) Fix regression in enhanced RC alignment
+* Introduce {{NUMBEROFADMINS}} magic word
+* Update to Slovak translation (sk)
+* Update to Alemannic localization (gsw)
+* (bug 6300) Bug fixes for sr: variants
+* namespaceDupes.php can now accept an arbitrary prefix, for checking rogue
+ interwikis and such. Not yet fully automated.
+* (bug 6344) Add Special:Uncategorizedimages page
+* (bug 6357) Update to Russian translation (ru)
+* Workaround possible bug in Firefox nightlies by properly removing the
+ Content-Encoding header instead of sending explicit 'identity' value
+ in StreamFile
+* (bug 6304) Show timestamp for current revision in diff pages
+* Vertically align current version with old version header in diff display
+* (bug 6174) Remove redundant "emailforlost" message
+* (bug 6189) Show an error to an unprivilleged user trying to create account
+* (bug 6365) Show user information in the "old revision" navigation links
+* Introduce 'FetchChangesList' hook; see docs/hooks.txt for more information
+* (bug 6345) Update to Indonesian localisation (id) #22
+* (bug 6279) Add genitive month names to Slovenian localisation
+* (bug 6351) Update to German translation (de)
+* Respect language directionality when displaying arrow in Special:Brokenredirects
+* Remove unused "validation" table definitions from the schema files
+* (bug 6398) Work around apparent PCRE bug breaking section editing when
+ massively-indented preformatted text immediately followed a header
+* (bug 6392) Fix misbehaving <br /> in preferences form
+* Add translated magic words to Hebrew localization
+* (bug 6396) Change name for Chuvash language
+* Introduce optional (off by default) language selector bar for user login
+ and registration. Customisable via the "loginlanguagelinks" message, the
+ links will preserve "returnto" values. If the user creates an account while
+ using such a link, then the language in use will be saved as their language
+ preference.
+* Make sure '~~~' '~~~~' '~~~~~' are removed in Nickname preference.
+* Rename "ipusuccess" to "unblocked", change the format (now wiki text)
+* (bug 2316) Add "caption" attribute to <gallery> tag
+* Allow setting the skin object that ImageGallery will use; needed during parse
+ operations (the skin must come from the ParserOptions, not $wgUser)
+* Fix notice in MacBinary detection debug data for files of certain lengths
+* (bug 6131) Add type detection for DjVu files, allowing them to be uploaded
+ with validity checking and size detection. No inline thumbnailing yet,
+ but could be added in the future.
+* (bug 6423) Don't update newtalk flag if page content didn't change (null edits
+ were causing the newtalk flag to trigger inappropriately)
+* Parser functions are now set using magic words.
+* (bug 6428) Incorrect form action URL on Special:Newimages with hidebots = 0 set
+* (bug 4990) Show page source to blocked users on edits, or their modified version
+ if blocked during an edit
+* (bug 5903) When requesting the raw source of a non-existent message page,
+ return blank content (as opposed to the message key)
+* Improve default blank content of MediaWiki:Common.css and MediaWiki:Monobook.css
+* (bug 6434) Allow customisation of submit button text on Special:Export
+* (bug 6314) Add user tool links on page histories
+* Fix display of file-type icons in galleries when $wgIgnoreImageErrors is off
+* (bug 6438) Update to Indonesian translation (id) #23
+* Adding the language code parameter to the hook "LanguageGetMagic", to allow
+ localizble extensions magic words.
+* Update to Romanian translation (ro)
+* Update to Esperanto translation (eo)
+* Check for preg_match() existence when installing and die out whining about PCRE
+ if it's not there, instead of throwing a fatal error
+* (bug 672) Add MathAfterTexvc hook
+* Update to Piedmontese localization (pms)
+* dumpBackup can optionally compress via dbzip2
+* (bug 2483) Run link updates on change via XML import
+* (bug 2481) List imported pages during Special:Import
+* (bug 2482) Log and RC entries for Special:Import events
+* Allow fetching all revisions from transwiki Special:Import
+* Allow fetching all revisions from Special:Export GET request
+* Disable output buffering on Special:Export; should help with streaming
+ large numbers of history items.
+* Allow setting a maximum number of revisions for history Special:Export;
+ pages with more than $wgExportMaxHistory revisions are excluded from
+ export when history is requested.
+* Fix transwiki import of pages with space in name
+* Save null edit when importing pages through Special:Import
+* Update to Korean translation (ko)
+* Show a more specific message when an anonymous user tries to access Special:Watchlist
+* (bug 3278) Paging links in Special:Prefixindex
+* Added Latvian localization (lv)
+* (bug 6472) Fix regression in Special:Export with multiple pages
+* Update to Macedonian translation (mk)
+* Allow page moves over historyless self-redirects. Such are usually created
+ as part of namespace rearrangements, and it's easier to clean them up if
+ we can move over them.
+* Show some error results in moveBatch.php
+* (bug 6479) Allow specification of the skin to use during HTML dumps
+* (bug 6461) Link to page histories in Special:Newpages
+* (bug 6484) Don't do message transformations when preloading messages for editing
+* (bug 6201) Treat spaces as underscores in parameters to {{ns:}}
+* (bug 6006) Allow hiding the password change fields using an authentication plugin
+* (bug 6489) Use appropriate link colour on Special:Shortpages
+* Added formatnum magic word
+* Added Javanese localization (jv)
+* (bug 6491) Apply bad image list in category galleries
+* (bug 6488) Show relevant log fragment in Special:Movepage
+* Fix potential PHP notice in Special:Blockme when $wgBlockOpenProxies is true
+* Use mysql_real_escape_string instead of addslashes for string escaping in
+ the MySQL Database class. This may fix some rare breakage with binary fields.
+ Note that MediaWiki does not support the multibyte character sets where a
+ "dumb" byte replacement can be actively dangerous; UTF-8 is always safe
+ in this regard due to the bit patterns which make head and tail bytes
+ distinct.
+* (bug 6497) Use $wgMetaNamespaceTalk for Esperanto if set
+* (bug 6498) Use localized forms for image size in Special:Undelete
+* (bug 6485) Update to Indonesian translation (id) #24
+* Extension messages translation is now possible.
+* Add target namespace override selector for transwiki imports.
+ $wgImportTargetNamespace specifies the default, to be used for
+ Wiktionary's 'Transwiki:' namespace etc.
+* (bug 6506) Update to German localisation (de)
+* (bug 502) Avoid silly tabs on bad title by using virtual special page
+* (bug 6511) Add diff links to old revision navigation bar
+* (bug 6511) Replace 'oldrevisionnavigation' message with 'old-revision-navigation'
+* Fix regression in Polish genitive month forms
+* (bug 4037) Make input handling in Special:Allpages and Special:Prefixindex
+ more consistent: Accept just a namespace prefix and a colon, reject input
+ with interwiki prefixes, otherwise do what Title::makeTitleSafe() does.
+* (bug 6516) Update to Russian translation
+* New 'allpagesbadtitle' message for Special:Allpages, based on 'badtitletext'.
+* Rename "searchquery" to "searchsubtitle" and support wiki text in it
+* Introduce updateArticleCount maintenance script which uses a better check that
+ reflects what Article::isCountable() tests for
+* Introduce 'BadImage' hook; see docs/hooks.txt for more information
+* Add "searchsubtitleinvalid" message for searches that are not valid titles.
+* (bug 5962) Update to Italian localisation
+* (bug 6530) Update to Indonesian localisation (id) #25
+* (bug 6523) Fix SVG issue in rebuildImages.php
+* (bug 6512) Link to page-specific logs on page histories
+* (bug 6504) Allow configuring session name with $wgSessionName
+* (bug 6185) Add standard user tool links to log page views
+* Update to Venetian translation (vec)
+* Update to Slovenian translation (sl)
+* Add standard user tool links to deleted revision list
+* Separate out EditPage's getContent bits from regular Article getContent.
+ Cleans up read-only-mode warning on empty pages and neats up some code.
+* (bug 6565) Strict JavaScript writing
+* (bug 6570) Update to Indonesian localisation (id) #26
+* Added Telugu translation (te)
+* Update to Catalan translation (ca)
+* (bug 6560) Avoid PHP notice when trimming ISBN whitespace
+* Added namespace translation to Kannada (ka)
+* (bug 6566) Improve input validation on timestamp conversion
+* Implicit group "emailconfirmed" for all users whose email addresses are confirmed
+* (bug 6577) Avoid multiline parser breakage on <pre> with newline in attribute
+
+
+=== Caveats ===
+
+Some output, particularly involving user-supplied inline HTML, may not
+produce 100% valid or well-formed XHTML output. Testers are welcome to
+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.5.x and older releases, see HISTORY.
+
+
+=== Online documentation ===
+
+Documentation for both end-users and site administrators is currently being
+built up on Meta-Wikipedia, and is covered under the GNU Free Documentation
+License:
+
+ http://www.mediawiki.org/wiki/Documentation
+
+
+=== Mailing list ===
+
+A MediaWiki-l mailing list has been set up distinct from the Wikipedia
+wikitech-l list:
+
+ http://mail.wikimedia.org/mailman/listinfo/mediawiki-l
+
+A low-traffic announcements-only list is also available:
+
+ http://mail.wikimedia.org/mailman/listinfo/mediawiki-announce
+
+It's highly recommended that you sign up for one of these lists if you're
+going to run a public MediaWiki, so you can be notified of security fixes.
+
+
+=== IRC help ===
+
+There's usually someone online in #mediawiki on irc.freenode.net
diff --git a/UPGRADE b/UPGRADE
new file mode 100644
index 00000000..70ccbadf
--- /dev/null
+++ b/UPGRADE
@@ -0,0 +1,303 @@
+This file provides an overview of the MediaWiki upgrade process. For help with
+specific problems, check
+
+* the documentation at http://meta.wikimedia.org
+* the documentation at http://www.mediawiki.org
+* the mediawiki-l mailing list archive at
+ http://mail.wikipedia.org/pipermail/mediawiki-l
+* the bug tracker at http://bugzilla.wikimedia.org
+
+for information and workarounds to common issues.
+
+== Overview ==
+
+Documentation on upgrading to 1.7 can also be found at
+http://www.mediawiki.org/wiki/Manual:Upgrading_to_1.7.
+
+=== Consult the release notes ===
+
+Before doing anything, stop and consult the release notes supplied with the new
+version of the software. This detail bug fixes, new features and functionality,
+and any particular points that may need to be noted during the upgrade
+procedure.
+
+=== Backup first ===
+
+It is imperative that, prior to attempting an upgrade of the database schema,
+you take a complete backup of your wiki database and files and verify it. While
+the upgrade scripts are somewhat robust, there is no guarantee that things will
+not fail, leaving the database in an inconsistent state.
+
+Refer to the MySQL documentation for information on backing up a database. For
+information on making copies of files, consult the documentation for your
+operating system.
+
+=== Perform the file upgrade ===
+
+Having downloaded the desired new version of the software, either as a package
+from SourceForge, or via an export from Subversion, decompress the files as
+needed, and replace the existing MediaWiki files with the new.
+
+You should preserve:
+
+* The LocalSettings.php file
+* The AdminSettings.php file, where it exists
+* The extensions directory
+* The images directory
+
+If using an alternative uploads directory, preserve this; and if using custom
+skins, preserve these too. The core code is now updated.
+
+=== 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.
+
+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
+tables, update existing tables, and move data around as needed. In most cases,
+this is successful and nothing further needs to be done.
+
+=== Check configuration settings ===
+
+The names of configuration variables, and their default values and purposes,
+can change between release branches, e.g. $wgDisableUploads in 1.4 is replaced
+with $wgEnableUploads in later versions. When upgrading, consult the release
+notes to check for configuration changes which would alter the expected
+behaviour of MediaWiki.
+
+=== Test ===
+
+It makes sense to test your wiki immediately following any kind of maintenance
+procedure, and especially after upgrading; check that page views and edits work
+normally and that special pages continue to function, etc. and correct errors
+and quirks which reveal themselves.
+
+== Upgrading from 1.6 wikis ==
+
+$wgLocalTZoffset was in hours, it is now using minutes.
+Link autonumbering got fixed (#5918) for protocols other than http.
+ - 'irc://irc.server.tld/' render as a link with a chat icon
+ - '[irc://irc.server.tld]' render as an autonumbered link: [1]
+
+== Upgrading from pre-1.5 wikis ==
+
+Major changes have been made to the schema from 1.4.x. The updater
+has not been fully tested for all conditions, and might well break.
+
+On a large site, the schema update might take a long time. It might
+explode, or leave your database half-done or otherwise badly hurting.
+
+Among other changes, note that Latin-1 encoding (ISO-8859-1) is
+no longer supported. Latin-1 wikis will need to be upgraded to
+UTF-8; an experimental command-line upgrade helper script,
+'upgrade1_5.php', can do this -- run it prior to 'update.php' or
+the web upgrader.
+
+If you absolutely cannot make the UTF-8 upgrade work, you can try
+doing it by hand: dump your old database, convert the dump file
+using iconv as described here:
+http://portal.suse.com/sdb/en/2004/05/jbartsh_utf-8.html
+and then reimport it. You can also convert filenames using convmv,
+but note that the old directory hashes will no longer be valid,
+so you will also have to move them to new destinations.
+
+Message changes:
+* A number of additional UI messages have been chagned from HTML to
+ wikitext, and will need to be manually fixed if customized.
+
+=== Configuration changes from 1.4.x: ===
+
+$wgDisableUploads has been replaced with $wgEnableUploads.
+
+$wgWhitelistAccount has been replaced by the 'createaccount' permission
+key in $wgGroupPermissions. To emulate the old effect of setting:
+ $wgWhitelistAccount['user'] = 0;
+set:
+ $wgGroupPermissions['*']['createaccount'] = false;
+
+$wgWhitelistEdit has been replaced by the 'edit' permission key.
+To emulate the old effect of setting:
+ $wgWhitelistEdit = true;
+set:
+ $wgGroupPermissions['*']['edit'] = false;
+
+If $wgWhitelistRead is set, you must also disable the 'read' permission
+for it to take affect on anonymous users:
+ $wgWhitelistRead = array( "Main Page", "Special:Userlogin" );
+ $wgGroupPermissions['*']['read'] = false;
+
+Note that you can disable/enable several other permissions by modifying
+this configuration array in your LocalSettings.php; see DefaultSettings.php
+for the complete default permission set.
+
+If using Memcached, you must enabled it differently now:
+ $wgUseMemCached = true;
+should be replaced with:
+ $wgMainCacheType = CACHE_MEMCACHED;
+
+
+=== 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.
+
+You may change some settings during the install, but be very careful!
+Changing the encoding in particular will generally leave you with a
+lot of corrupt pages, particularly if your wiki is not in English.
+
+=== Command-line upgrade ===
+
+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.
+
+Once the new files are in place, go into the maintenance subdirectory and
+run the script:
+
+ php update.php
+
+See caveats below on upgrading from 1.3.x or earlier.
+
+
+== Backups! ==
+
+To upgrade an existing MediaWiki installation, first BACK UP YOUR WIKI!
+If something goes wrong, you want to be able to start again.
+
+Your image files, configuration, etc can simply be copied or archived as
+you would any other files. (Make sure that the contents of your
+LocalSettings.php are not accidentally made public, as this contains
+a database password.)
+
+To back up the database, use the tools provided by your service provider
+(if applicable) or the standard mysqldump program.
+
+For general help on mysqldump:
+http://dev.mysql.com/doc/mysql/en/mysqldump.html
+
+WARNING: If using MySQL 4.1.x, mysqldump's charset conversion may in
+some cases damage data in your wiki. If necessary, set the charset
+option to 'latin1' to avoid the conversion. Fore more info see:
+http://mail.wikipedia.org/pipermail/wikitech-l/2004-November/026359.html
+
+
+== Caveats ==
+
+
+=== Upgrading from 1.4.2 or earlier ===
+
+1.4.3 has added new fields to the sitestats table. These fields are
+optional and help to speed Special:Statistics on large sites. If you
+choose not to run the database upgrades, everything will continue to
+work in 1.4.3.
+
+You can apply the update by running maintenance/update.php, or
+manually run the SQL commands from this file:
+ maintenance/archives/patch-ss_total_articles.sql
+
+
+=== Upgrading from 1.4rc1 or earlier betas ===
+
+The logging table has been altered from 1.4beta4 to 1.4beta5
+and again in 1.4.0 final. Copy in the new files and use the web
+installer to upgrade, or the command-line maintenance/update.php.
+
+If you cannot use the automated installers/updaters, you may
+update the table by manually running the SQL commands in these
+files:
+ maintenance/archives/patch-log_params.sql
+ maintenance/archives/patch-logging-title.sql
+
+
+=== Upgrading from 1.3.x ===
+
+This should generally go smoothly.
+
+If you keep your LocalSettings.php, you may need to change the style paths
+to match the newly rearranged skin modules. Change these lines:
+ $wgStylePath = "$wgScriptPath/stylesheets";
+ $wgStyleDirectory = "$IP/stylesheets";
+ $wgLogo = "$wgStylePath/images/wiki.png";
+
+to this:
+ $wgStylePath = "$wgScriptPath/skins";
+ $wgStyleDirectory = "$IP/skins";
+ $wgLogo = "$wgStylePath/common/images/wiki.png";
+
+As well as new messages, the processing of some messages has changed.
+If you have customized them, please compare the new format using
+Special:Allmessages or the relevant LanguageXX.php files:
+ copyrightwarning
+ dberrortext
+ editingcomment (was named commentedit)
+ editingsection (was named sectionedit)
+ numauthors
+ numedits
+ numtalkauthors
+ numtalkedits
+ numwatchers
+ protectedarticle
+ searchresulttext
+ showhideminor
+ unprotectedarticle
+
+Note that the 1.3 beta releases included a potential vulnerability if PHP
+is configured with register_globals on and the includes directory is
+served to the web. For general safety, turn register_globals *off* if you
+don't _really_ need it for another package.
+
+If your hosting provider turns it on and you can't turn it off yourself,
+send them a kind note explaining that it can expose their servers and their
+customers to attacks.
+
+
+=== Upgrading from 1.2.x ===
+
+If you've been using the MediaWiki: namespace for custom page templates,
+note that things are a little different. The Template: namespace has been
+added which is more powerful -- templates can include parameters for
+instance.
+
+If you were using custom MediaWiki: entries for text inclusions, they
+will *not* automatically be moved to Template: entries at upgrade time.
+Be sure to go through and check that everything is working properly;
+you can move them manually or you can try using moveCustomMessages.php
+in maintenance/archives to do it automatically, but this might break things.
+
+Also, be sure to pick the correct character encoding -- some languages were
+only available in Latin-1 on 1.2.x and are now available for Unicode as well.
+If you want to upgrade an existing wiki from Latin-1 to Unicode you'll have
+to dump the database to SQL, run it through iconv or another conversion tool,
+and restore it. Sorry.
+
+
+=== Upgrading from 1.1.x or earlier ===
+
+This is less thoroughly tested, but should work.
+
+You need to specify the *admin* database username and password to the
+installer in order for it to successfully upgrade the database structure.
+You may wish to manually change the GRANTs later.
+
+If you have a very old database (earlier than organized MediaWiki releases
+in late August 2003) you may need to manually run some of the update SQL
+scripts in maintenance/archives before the installer is able to pick up
+with remaining updates.
+
+
+=== Upgrading from UseModWiki or old "phase 2" Wikipedia code ===
+
+There is a semi-maintained UseModWiki to MediaWiki conversion script at
+maintenance/importUseModWiki.php; it may require tweaking and customization
+to work for you.
+
+Install a new MediaWiki first, then use the conversion script which will
+output SQL statements; direct these to a file and then run that into your
+database.
+
+You will have to rebuild the links tables etc after importing.
diff --git a/bin/.htaccess b/bin/.htaccess
new file mode 100644
index 00000000..b63d4018
--- /dev/null
+++ b/bin/.htaccess
@@ -0,0 +1 @@
+Deny from All
diff --git a/bin/ulimit.sh b/bin/ulimit.sh
new file mode 100644
index 00000000..7a1925cc
--- /dev/null
+++ b/bin/ulimit.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+ulimit -t $1
+ulimit -v $2
+shift 2
+"$@"
+
diff --git a/config/index.php b/config/index.php
new file mode 100644
index 00000000..8fc91f8e
--- /dev/null
+++ b/config/index.php
@@ -0,0 +1,1665 @@
+<?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
+
+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 );
+$sep = PATH_SEPARATOR;
+if( !ini_set( "include_path", ".$sep$IP$sep$IP/includes$sep$IP/languages" ) ) {
+ set_include_path( ".$sep$IP$sep$IP/includes$sep$IP/languages" );
+}
+
+# Define an entry point and include some files
+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( "install-utils.inc" );
+install_version_checks();
+
+require_once( "includes/Defines.php" );
+require_once( "includes/DefaultSettings.php" );
+require_once( "includes/MagicWord.php" );
+require_once( "includes/Namespace.php" );
+
+## Databases we support:
+
+$ourdb = array();
+$ourdb['mysql']['fullname'] = 'MySQL';
+$ourdb['mysql']['havedriver'] = 0;
+$ourdb['mysql']['compile'] = 'mysql';
+$ourdb['mysql']['bgcolor'] = '#ffe5a7';
+
+$ourdb['postgres']['fullname'] = 'PostgreSQL';
+$ourdb['postgres']['havedriver'] = 0;
+$ourdb['postgres']['compile'] = 'pgsql';
+$ourdb['postgres']['bgcolor'] = '#aaccff';
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>MediaWiki <?php echo( $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;
+ }
+
+ </style>
+ <script type="text/javascript">
+ <!--
+ function hideall() {
+ <?php foreach (array_keys($ourdb) as $db) {
+ echo "document.getElementById('$db').style.display='none';\n";
+ }
+ ?>
+ }
+ function togglearea(id) {
+ hideall();
+ var dbarea = document.getElementById(id).style;
+ dbarea.display = dbarea.display = 'none' ? 'block' : 'none';
+ }
+ // -->
+ </script>
+</head>
+
+<body>
+<div id="globalWrapper">
+<div id="column-content">
+<div id="content">
+<div id="bodyContent">
+
+<h1>MediaWiki <?php print $wgVersion ?> Installation</h1>
+
+<?php
+
+/* Check for existing configurations and bug out! */
+
+if( file_exists( "../LocalSettings.php" ) ) {
+ dieout( " <p><strong>Setup has completed, <a href='../index.php'>your wiki</a> is configured.</strong></p>
+
+ <p>Please delete the /config directory for extra security.</p></div></div></div></div>" );
+}
+
+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>" );
+}
+
+
+require_once( "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 ); }
+}
+
+?>
+
+<ul>
+ <li>
+ <b>Don't forget security updates!</b> Keep an eye on the
+ <a href="http://mail.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
+$endl = "
+";
+$wgNoOutputBuffer = true;
+$conf = new ConfigData;
+
+install_version_checks();
+
+print "<li>PHP " . phpversion() . " installed</li>\n";
+
+## Temporarily turn off all errors as we try to discover installed databases
+$olderrnum = error_reporting(0);
+
+$phpdatabases = array();
+foreach (array_keys($ourdb) as $db) {
+ $compname = $ourdb[$db]['compile'];
+ if (extension_loaded($compname) or dl($compname . '.' . PHP_SHLIB_SUFFIX)) {
+ array_push($phpdatabases, $db);
+ $ourdb[$db]['havedriver'] = 1;
+ }
+}
+
+error_reporting($olderrornum);
+
+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";
+ }
+ dieout( "</ul></ul>" );
+}
+
+print "<li>Found database drivers for:";
+foreach (array_keys($ourdb) AS $db) {
+ if ($ourdb[$db]['havedriver']) {
+ $DefaultDBtype = $db;
+ print " ".$ourdb[$db]['fullname'];
+ }
+}
+print "</li>\n";
+if (count($phpdatabases) != 1)
+ $DefaultDBtype = '';
+
+if( ini_get( "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( ini_get( "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.
+ <?php
+}
+
+if( ini_get( "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.
+ <?php
+}
+
+if( ini_get( "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.
+ <?php
+}
+
+if( $fatal ) {
+ dieout( "</ul><p>Cannot install MediaWiki.</p>" );
+}
+
+if( ini_get( "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 = php_sapi_name();
+$conf->prettyURLs = true;
+print "<li>PHP server API is $sapi; ";
+switch( $sapi ) {
+case "apache":
+case "apache2handler":
+ print "ok, using pretty URLs (<tt>index.php/Page_Title</tt>)";
+ break;
+default:
+ print "unknown; ";
+case "cgi":
+case "cgi-fcgi":
+case "apache2filter":
+case "isapi":
+ print "using ugly URLs (<tt>index.php?title=Page_Title</tt>)";
+ $conf->prettyURLs = false;
+ break;
+}
+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." );
+}
+
+# Crude check for session support
+if( !function_exists( 'session_name' ) )
+ dieout( "PHP's session module is missing. MediaWiki requires session support in order to function." );
+
+# Likewise for PCRE
+if( !function_exists( 'preg_match' ) )
+ dieout( "The PCRE regular expression functions are missing. MediaWiki requires these in order to function." );
+
+$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 ) . ". <strong>If this is too low, installation may fail!</strong> ";
+ $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.";
+ } else {
+ $conf->raiseMemory = true;
+ print "ok.";
+ }
+ }
+ print "</li>\n";
+}
+
+$conf->zlib = function_exists( "gzencode" );
+if( $conf->zlib ) {
+ print "<li>Have zlib support; enabling output compression.</li>\n";
+} else {
+ print "<li>No zlib support.</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->apc = function_exists('apc_fetch');
+if ($conf->apc ) {
+ print "<li><a href=\"http://www.php.net/apc\">APC</a> installed</li>";
+}
+
+$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";
+}
+if (!$conf->turck && !$conf->eaccel && !$conf->apc) {
+ print "<li>Neither <a href=\"http://turck-mmcache.sourceforge.net/\">Turck MMCache</a> nor ".
+ "<a href=\"http://eaccelerator.sourceforge.net/\">eAccelerator</a> nor ".
+ "<a href=\"http://www.php.net/apc\">APC</a> are installed, " .
+ "can't use object caching functions</li>\n";
+}
+
+$conf->diff3 = false;
+$diff3locations = array("/usr/bin", "/usr/local/bin", "/opt/csw/bin", "/usr/gnu/bin", "/usr/sfw/bin") + explode($sep, 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->UseImageResize = $conf->HaveGD || $conf->ImageMagick;
+
+$conf->IP = dirname( dirname( __FILE__ ) );
+print "<li>Installation directory: <tt>" . htmlspecialchars( $conf->IP ) . "</tt></li>\n";
+
+$conf->ScriptPath = preg_replace( '{^(.*)/config.*$}', '$1', $_SERVER["PHP_SELF"] ); # was SCRIPT_NAME
+print "<li>Script URI path: <tt>" . htmlspecialchars( $conf->ScriptPath ) . "</tt></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 );
+?>
+
+<?php
+ $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" );
+
+ ## MySQL specific:
+ $conf->DBprefix = importPost( "DBprefix" );
+ $conf->DBmysql5 = (importPost( "DBmysql5" ) == "true") ? "true" : "false";
+ $conf->RootUser = importPost( "RootUser", "root" );
+ $conf->RootPW = importPost( "RootPW", "-" );
+ $conf->LanguageCode = importPost( "LanguageCode", "en" );
+
+ ## Postgres specific:
+ $conf->DBport = importPost( "DBport", "5432" );
+ $conf->DBmwschema = importPost( "DBmwschema", "mediawiki" );
+ $conf->DBts2schema = importPost( "DBts2schema", "public" );
+
+/* Check for validity */
+$errs = array();
+
+if( $conf->Sitename == "" || $conf->Sitename == "MediaWiki" || $conf->Sitename == "Mediawiki" ) {
+ $errs["Sitename"] = "Must not be blank or \"MediaWiki\"";
+}
+if( $conf->DBuser == "" ) {
+ $errs["DBuser"] = "Must not be blank";
+}
+if( $conf->DBpassword == "" ) {
+ $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";
+}
+
+if( $conf->SysopPass == "" ) {
+ $errs["SysopPass"] = "Must not be blank";
+}
+if( $conf->SysopPass != $conf->SysopPass2 ) {
+ $errs["SysopPass2"] = "Passwords don't match!";
+}
+
+$conf->License = importRequest( "License", "none" );
+if( $conf->License == "gfdl" ) {
+ $conf->RightsUrl = "http://www.gnu.org/copyleft/fdl.html";
+ $conf->RightsText = "GNU Free Documentation License 1.2";
+ $conf->RightsCode = "gfdl";
+ $conf->RightsIcon = '${wgStylePath}/common/images/gnu-fdl.png';
+} elseif( $conf->License == "none" ) {
+ $conf->RightsUrl = $conf->RightsText = $conf->RightsCode = $conf->RightsIcon = "";
+} 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 = array_map( '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 "<p><b>Generating configuration file...</b></p>\n";
+ // for debugging: // echo "<pre>" . htmlspecialchars( $local ) . "</pre>\n";
+
+ $wgCommandLineMode = false;
+ chdir( ".." );
+ eval($local);
+ $conf->DBtypename = '';
+ foreach (array_keys($ourdb) as $db) {
+ if ($conf->DBtype === $db)
+ $conf->DBtypename = $ourdb[$db]['fullname'];
+ }
+ if (! $conf->DBtypename) {
+ $errs["DBtype"] = "Unknown database type '$conf->DBtype'";
+ continue;
+ }
+ print "<li>Database type: {$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;
+
+ $wgCommandLineMode = true;
+ $wgUseDatabaseMessages = false; /* FIXME: For database failure */
+ require_once( "includes/Setup.php" );
+ chdir( "config" );
+
+ require_once( "maintenance/InitialiseMessages.inc" );
+
+ $wgTitle = Title::newFromText( "Installation script" );
+error_reporting( E_ALL );
+ print "<li>Loading class: $dbclass";
+ $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
+ if( $conf->RootPW == '-' ) {
+ # Regular user
+ $conf->Root = false;
+ $db_user = $wgDBuser;
+ $db_pass = $wgDBpassword;
+ } else {
+ # Superuser
+ $conf->Root = true;
+ $db_user = $conf->RootUser;
+ $db_pass = $conf->RootPW;
+ }
+
+ # Attempt to connect
+ echo( "<li>Attempting to connect to database server as $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( "failed with error [$errno] $errtx.</li>\n" );
+ $errs["DBserver"] = "Connection failed";
+ break;
+ } # switch
+ } #conn. att.
+
+ if( !$ok ) { continue; }
+
+ } else /* not mysql */ {
+ echo( "<li>Attempting to connect to database server as $wgDBuser..." );
+ $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1);
+ if (!$wgDatabase->isOpen()) {
+ print " error: " . $wgDatabase->lastError() . "</li>\n";
+ } else {
+ $wgDatabase->ignoreErrors(true);
+ $myver = $wgDatabase->getServerVersion();
+ }
+ }
+
+ if ( !$wgDatabase->isOpen() ) {
+ $errs["DBserver"] = "Couldn't connect to database";
+ continue;
+ }
+
+ print "<li>Connected to $myver";
+ if ($conf->DBtype == 'mysql') {
+ if( version_compare( $myver, "4.0.14" ) < 0 ) {
+ die( " -- 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();
+ if ( $err != 1049 ) {
+ print "<ul><li>Error selecting database $wgDBname: $err " .
+ htmlspecialchars( mysql_error() ) . "</li></ul>";
+ continue;
+ }
+ $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 );
+ }
+
+ if( $wgDatabase->tableExists( "cur" ) || $wgDatabase->tableExists( "revision" ) ) {
+ print "<li>There are already MediaWiki tables in this database. Checking if updates are needed...</li>\n";
+
+ # Create user if required (todo: other databases)
+ if ( $conf->Root && $conf->DBtype == 'mysql') {
+ $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 );
+ }
+ }
+ if ( $conf->DBtype == 'mysql') {
+ print "<pre>\n";
+ chdir( ".." );
+ flush();
+ do_all_updates();
+ chdir( "config" );
+ print "</pre>\n";
+ }
+ print "<li>Finished update checks.</li>\n";
+ } else {
+ # FIXME: Check for errors
+ print "<li>Creating tables...";
+ if ($conf->DBtype == 'mysql') {
+ if( $wgDBmysql5 ) {
+ print " using MySQL 5 table defs...";
+ dbsource( "../maintenance/mysql5/tables.sql", $wgDatabase );
+ } else {
+ print " using MySQL 4 table defs...";
+ dbsource( "../maintenance/tables.sql", $wgDatabase );
+ }
+ dbsource( "../maintenance/interwiki.sql", $wgDatabase );
+ } else if ($conf->DBtype == 'postgres') {
+ dbsource( "../maintenance/postgres/tables.sql", $wgDatabase );
+ $wgDatabase->update_interwiki();
+ } else if ($conf->DBtype == 'oracle') {
+ dbsource( "../maintenance/oracle/tables.sql", $wgDatabase );
+ dbsource( "../maintenance/oracle/interwiki.sql", $wgDatabase );
+ }
+ else {
+ $errs["DBtype"] = "Do not know how to handle database type '$conf->DBtype'";
+ continue;
+ }
+
+ print " done.</li>\n";
+
+ print "<li>Initializing data...";
+ $wgDatabase->insert( 'site_stats',
+ array( 'ss_row_id' => 1,
+ 'ss_total_views' => 0,
+ 'ss_total_edits' => 0,
+ 'ss_good_articles' => 0 ) );
+
+ # Set up the "regular user" account *if we can, and if we need to*
+ if( $conf->Root ) {
+ # 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 $wgDBuser exists. Skipping grants.</li>" );
+ } else {
+ # Yes, so run the grants
+ echo( "<li>Granting user permissions to $wgDBuser on $wgDBname..." );
+ dbsource( "../maintenance/users.sql", $wgDatabase );
+ echo( "success.</li>" );
+ }
+ }
+
+ if( $conf->SysopName ) {
+ $u = User::newFromName( $conf->getSysopName() );
+ 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" . wfMsg( 'mainpagedocfooter' ),
+ 'comment' => '',
+ 'user' => 0,
+ 'user_text' => 'MediaWiki default',
+ ) );
+ $revid = $revision->insertOn( $wgDatabase );
+ $article->updateRevisionOn( $wgDatabase, $revision );
+
+ print "<li><pre>";
+ initialiseMessages();
+ print "</pre></li>\n";
+ }
+
+ /* Write out the config file now that all is well */
+ print "<p>Creating LocalSettings.php...</p>\n\n";
+ $localSettings = "<" . "?php$endl$local$endl?" . ">";
+ // Fix up a common line-ending problem (due to CVS on Windows)
+ $localSettings = str_replace( "\r\n", "\n", $localSettings );
+
+ if( version_compare( phpversion(), "4.3.2" ) >= 0 ) {
+ $xt = "xt"; # Refuse to overwrite an existing file
+ } else {
+ $xt = "wt"; # 'x' is not available prior to PHP 4.3.2. We did check above, but race conditions blah blah
+ }
+ $f = fopen( "LocalSettings.php", $xt );
+
+ if( $f == false ) {
+ 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 );
+ writeSuccessMessage();
+ } else {
+ fclose( $f );
+ die("<p class='error'>An error occured while writing the config/LocalSettings.php file. Check user rights and disk space then try again.</p>\n");
+
+ }
+
+ } while( false );
+}
+?>
+</ul>
+
+
+<?php
+
+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="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"' : '';
+ echo "\t\t<option value=\"$code\" $sel>$name</option>\n";
+ }
+ ?>
+ </select>
+ </div>
+ <p class="config-desc">
+ Select the language for your wiki's interface. Some localizations aren't fully complete. Unicode (UTF-8) 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", "GNU Free Documentation License 1.2 (Wikipedia-compatible)", "radio", "gfdl" ); ?></li>
+ <li><?php
+ aField( $conf, "License", "A Creative Commons license - ", "radio", "cc" );
+ $partner = "MediaWiki";
+ $exit = urlencode( "$wgServer{$conf->ScriptPath}/config/index.php?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>";
+ ?>
+ <?php if( $conf->License == "cc" ) { ?>
+ <ul>
+ <li><?php aField( $conf, "RightsIcon", "<img src=\"" . htmlspecialchars( $conf->RightsIcon ) . "\" alt='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 other maintenance tasks.<br />
+ A new account will be added only when creating a new wiki database.
+ </p>
+
+ <div class="config-input">
+ <label class='column'>Shared memory 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>";
+ }
+ if ( $conf->apc ) {
+ echo "<li>";
+ aField( $conf, "Shm", "APC", "radio", "apc" );
+ echo "</li>";
+ }
+ if ( $conf->eaccel ) {
+ echo "<li>";
+ aField( $conf, "Shm", "eAccelerator", "radio", "eaccel" );
+ 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">
+ Using a shared memory system such as Turck MMCache, APC, eAccelerator, or Memcached
+ will speed up MediaWiki significantly. Memcached is the best solution but needs to be
+ installed. Specify the server addresses and ports in a comma-separted list. Only
+ use Turck shared memory if the wiki will be running on a single Apache server.
+ </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>
+ <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.
+ </p>
+ <p>
+ 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>
+
+ <?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
+ 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">Database charset</label>
+ <div>Select one:</div>
+ <ul class="plain">
+ <li><?php aField( $conf, "DBmysql5", "Backwards-compatible UTF-8", "radio", "false" ); ?></li>
+ <li><?php aField( $conf, "DBmysql5", "Experimental MySQL 4.1/5.0 UTF-8", "radio", "true" ); ?></li>
+ </ul>
+ </div>
+ <p class="config-desc">
+ <b>EXPERIMENTAL:</b> You can enable explicit Unicode charset support
+ for MySQL 4.1 and 5.0 servers. This is not well tested and may
+ cause things to break. <b>If upgrading an older installation, leave
+ in backwards-compatible mode.</b>
+ </p>
+ </div>
+
+ <?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 will have it's search path set to the above schemas,
+ so it is recommended that you create a new user.</p>
+ </div>
+ </div>
+
+ <div class="config-input">
+ <?php
+ aField( $conf, "RootUser", "Superuser account:", "superuser" );
+ ?>
+ </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 provide details of a superuser account,
+ such as <strong>root</strong>, which does. Leave the password set to <strong>-</strong> if this is not needed.
+ </p>
+
+ <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>
+
+<script type="text/javascript">
+window.onload = togglearea('<?php echo $conf->DBtype; ?>');
+</script>
+
+</form>
+
+<?php
+}
+
+/* -------------------------------------------------------------------------------------- */
+function writeSuccessMessage() {
+ if ( ini_get( 'safe_mode' ) && !ini_get( 'open_basedir' ) ) {
+ echo <<<EOT
+<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='../index.php'>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>
+EOT;
+ } else {
+ echo "<p>Installation successful! Move the config/LocalSettings.php file into the parent directory, then follow
+ <a href='../index.php'>this link</a> to your wiki.</p>\n";
+ }
+}
+
+
+function escapePhpString( $string ) {
+ return strtr( $string,
+ array(
+ "\n" => "\\n",
+ "\r" => "\\r",
+ "\t" => "\\t",
+ "\\" => "\\\\",
+ "\$" => "\\\$",
+ "\"" => "\\\""
+ ));
+}
+
+function writeLocalSettings( $conf ) {
+ $conf->UseImageResize = $conf->UseImageResize ? 'true' : 'false';
+ $conf->PasswordSender = $conf->EmergencyContact;
+ $zlib = ($conf->zlib ? "" : "# ");
+ $magic = ($conf->ImageMagick ? "" : "# ");
+ $convert = ($conf->ImageMagick ? $conf->ImageMagick : "/usr/bin/convert" );
+ $pretty = ($conf->prettyURLs ? "" : "# ");
+ $ugly = ($conf->prettyURLs ? "# " : "");
+ $rights = ($conf->RightsUrl) ? "" : "# ";
+ $hashedUploads = $conf->safeMode ? '' : '# ';
+
+ switch ( $conf->Shm ) {
+ case 'memcached':
+ $cacheType = 'CACHE_MEMCACHED';
+ $mcservers = var_export( $conf->MCServerArray, true );
+ break;
+ case 'turck':
+ case 'apc':
+ case 'eaccel':
+ $cacheType = 'CACHE_ACCEL';
+ $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 = array_map( "escapePhpString", get_object_vars( $conf ) );
+ if( $conf->License == 'gfdl' ) {
+ # Needs literal string interpolation for the current style path
+ $slconf['RightsIcon'] = $conf->RightsIcon;
+ }
+
+ $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.
+
+# 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( \"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\" );
+ }
+} elseif ( empty( \$wgNoOutputBuffer ) ) {
+ ## Compress output if the browser supports it
+ {$zlib}if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );
+}
+
+\$wgSitename = \"{$slconf['Sitename']}\";
+
+\$wgScriptPath = \"{$slconf['ScriptPath']}\";
+\$wgScript = \"\$wgScriptPath/index.php\";
+\$wgRedirectScript = \"\$wgScriptPath/redirect.php\";
+
+## For more information on customizing the URLs please see:
+## http://meta.wikimedia.org/wiki/Eliminating_index.php_from_the_url
+## If using PHP as a CGI module, the ?title= style usually must be used.
+{$pretty}\$wgArticlePath = \"\$wgScript/\$1\";
+{$ugly}\$wgArticlePath = \"\$wgScript?title=\$1\";
+
+\$wgStylePath = \"\$wgScriptPath/skins\";
+\$wgStyleDirectory = \"\$IP/skins\";
+\$wgLogo = \"\$wgStylePath/common/images/wiki.png\";
+
+\$wgUploadPath = \"\$wgScriptPath/images\";
+\$wgUploadDirectory = \"\$IP/images\";
+
+\$wgEnableEmail = $enableemail;
+\$wgEnableUserEmail = $enableuseremail;
+
+\$wgEmergencyContact = \"{$slconf['EmergencyContact']}\";
+\$wgPasswordSender = \"{$slconf['PasswordSender']}\";
+
+## For a detailed description of the following switches see
+## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent
+## There are many more options for fine tuning available see
+## /includes/DefaultSettings.php
+## UPO means: this is also a user preference option
+\$wgEnotifUserTalk = $enotifusertalk; # UPO
+\$wgEnotifWatchlist = $enotifwatchlist; # UPO
+\$wgEmailAuthentication = $eauthent;
+
+\$wgDBserver = \"{$slconf['DBserver']}\";
+\$wgDBname = \"{$slconf['DBname']}\";
+\$wgDBuser = \"{$slconf['DBuser']}\";
+\$wgDBpassword = \"{$slconf['DBpassword']}\";
+\$wgDBprefix = \"{$slconf['DBprefix']}\";
+\$wgDBtype = \"{$slconf['DBtype']}\";
+\$wgDBport = \"{$slconf['DBport']}\";
+
+# Experimental charset support for MySQL 4.1/5.0.
+\$wgDBmysql5 = {$conf->DBmysql5};
+
+## 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;
+\$wgUseImageResize = {$conf->UseImageResize};
+{$magic}\$wgUseImageMagick = true;
+{$magic}\$wgImageMagickConvertCommand = \"{$convert}\";
+
+## 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;
+\$wgMathPath = \"{\$wgUploadPath}/math\";
+\$wgMathDirectory = \"{\$wgUploadDirectory}/math\";
+\$wgTmpDirectory = \"{\$wgUploadDirectory}/tmp\";
+
+\$wgLocalInterwiki = \$wgSitename;
+
+\$wgLanguageCode = \"{$slconf['LanguageCode']}\";
+
+\$wgProxyKey = \"$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.
+\$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
+\$wgCacheEpoch = max( \$wgCacheEpoch, \$configdate );
+";
+ // 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 ) {
+ die( $text . "\n\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;
+ }
+ return $retval;
+}
+
+function importPost( $name, $default = "" ) {
+ return importVar( $_POST, $name, $default );
+}
+
+function importRequest( $name, $default = "" ) {
+ return importVar( $_REQUEST, $name, $default );
+}
+
+$radioCount = 0;
+
+function aField( &$conf, $field, $text, $type = "text", $value = "", $onclick = '' ) {
+ global $radioCount;
+ if( $type != "" ) {
+ $xtype = "type=\"$type\"";
+ } else {
+ $xtype = "";
+ }
+
+ $id = $field;
+ $nolabel = ($type == "radio") || ($type == "hidden");
+
+ if ($type == 'radio')
+ $id .= $radioCount++;
+
+ if( $nolabel ) {
+ echo "\t\t<label>";
+ } else {
+ echo "\t\t<label class='column' for=\"$id\">$text</label>\n";
+ }
+
+ if( $type == "radio" && $value == $conf->$field ) {
+ $checked = "checked='checked'";
+ } else {
+ $checked = "";
+ }
+ echo "\t\t<input $xtype name=\"$field\" id=\"$id\" class=\"iput-$type\" $checked ";
+ if ($onclick) {
+ echo " onclick='togglearea(\"$value\")' " ;
+ }
+ echo "value=\"";
+ if( $type == "radio" ) {
+ echo htmlspecialchars( $value );
+ } else {
+ echo htmlspecialchars( $conf->$field );
+ }
+
+
+ echo "\" />\n";
+ if( $nolabel ) {
+ echo " $text</label>\n";
+ }
+
+ global $errs;
+ if(isset($errs[$field])) echo "<span class='error'>" . $errs[$field] . "</span>\n";
+}
+
+function getLanguageList() {
+ global $wgLanguageNames;
+ if( !isset( $wgLanguageNames ) ) {
+ require_once( "languages/Names.php" );
+ }
+
+ $codes = array();
+
+ $d = opendir( "../languages" );
+ /* In case we are called from the root directory */
+ if (!$d)
+ $d = opendir( "languages");
+ while( false !== ($f = readdir( $d ) ) ) {
+ $m = array();
+ if( preg_match( '/Language([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';
+ var_dump( $hostport );
+ }
+ 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 $host:$port successfully";
+ }
+ return $errstr;
+}
+
+function database_picker($conf) {
+ global $ourdb;
+ print "\n";
+ foreach(array_keys($ourdb) as $db) {
+ if ($ourdb[$db]['havedriver']) {
+ print "<li>";
+ aField( $conf, "DBtype", $ourdb[$db]['fullname'], 'radio', $db, 'onclick');
+ print "</li>\n";
+ }
+ }
+ print "\n";
+}
+
+function database_switcher($db) {
+ global $ourdb;
+ $color = $ourdb[$db]['bgcolor'];
+ $full = $ourdb[$db]['fullname'];
+ print "<div id='$db' style='display:none; background: $color'>\n";
+ print "<h3>$full specific options:</h3>\n";
+}
+
+?>
+
+ <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="http://www.mediawiki.org/"
+ title="Main Page"></a>
+ </div>
+ <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
+ <div class='portlet'><div class='pBody'>
+ <ul>
+ <li><strong><a href="http://www.mediawiki.org/">MediaWiki home</a></strong></li>
+ <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://meta.wikipedia.org/wiki/MediaWiki_User's_Guide">User's Guide</a></li>
+ <li><a href="http://meta.wikimedia.org/wiki/MediaWiki_FAQ">FAQ</a></li>
+ </ul>
+ <p style="font-size:90%;margin-top:1em">MediaWiki is Copyright &copy; 2001-2006 by Magnus Manske, Brion Vibber, Lee Daniel Crocker, Tim Starling, Erik M&ouml;ller, Gabriel Wicke and others.</p>
+ </div></div>
+</div>
+
+</div>
+
+</body>
+</html>
diff --git a/docs/.htaccess b/docs/.htaccess
new file mode 100644
index 00000000..b63d4018
--- /dev/null
+++ b/docs/.htaccess
@@ -0,0 +1 @@
+Deny from All
diff --git a/docs/README b/docs/README
new file mode 100644
index 00000000..43ac8ef5
--- /dev/null
+++ b/docs/README
@@ -0,0 +1,17 @@
+[July 5th 2005]
+
+The 'docs' directory contain various text files that should help you
+understand the most importants classes in MediaWiki.
+
+API documentation is sometime generated and uploaded at:
+ http://svn.wikimedia.org/doc/
+
+You can get a fresh version using 'make doc' or mwdocgen.php
+in the ../maintenance/ directory.
+
+
+
+For end user / administrators, most of the documentation
+is located online at:
+ http://meta.wikimedia.org/wiki/Help:Help
+
diff --git a/docs/database.txt b/docs/database.txt
new file mode 100644
index 00000000..679492a1
--- /dev/null
+++ b/docs/database.txt
@@ -0,0 +1,174 @@
+Some information about database access in MediaWiki.
+By Tim Starling, January 2006.
+
+------------------------------------------------------------------------
+ API
+------------------------------------------------------------------------
+
+For a database API reference, please see the auto-generated
+documentation:
+
+http://wikipedia.sourceforge.net/doc/MediaWiki/Database.html
+
+To make a read query, something like this usually suffices:
+
+$dbr =& wfGetDB( DB_SLAVE );
+$res = $dbr->select( /* ...see docs... */ );
+while ( $row = $dbr->fetchObject( $res ) ) {
+ ...
+}
+$dbr->freeResult( $res );
+
+Note the assignment operator in the while condition.
+
+For a write query, use something like:
+
+$dbw =& wfGetDB( DB_MASTER );
+$dbw->insert( /* ...see docs... */ );
+
+We use the convention $dbr for read and $dbw for write to help you keep
+track of whether the database object is a slave (read-only) or a master
+(read/write). If you write to a slave, the world will explode. Or to be
+precise, a subsequent write query which succeeded on the master may fail
+when replicated to the slave due to a unique key collision. Replication
+on the slave will stop and it may take hours to repair the database and
+get it back online. Setting read_only in my.cnf on the slave will avoid
+this scenario, but given the dire consequences, we prefer to have as
+many checks as possible.
+
+We provide a query() function for raw SQL, but the wrapper functions
+like select() and insert() are usually more convenient. They take care
+of things like table prefixes and escaping for you. If you really need
+to make your own SQL, please read the documentation for tableName() and
+addQuotes(). You will need both of them.
+
+
+------------------------------------------------------------------------
+ Basic query optimisation
+------------------------------------------------------------------------
+
+MediaWiki developers who need to write DB queries should have some
+understanding of databases and the performance issues associated with
+them. Patches containing unacceptably slow features will not be
+accepted. Unindexed queries are generally not welcome in MediaWiki,
+except in special pages derived from QueryPage. It's a common pitfall
+for new developers to submit code containing SQL queries which examine
+huge numbers of rows. Remember that COUNT(*) is O(N), counting rows in a
+table is like counting beans in a bucket.
+
+
+------------------------------------------------------------------------
+ Replication
+------------------------------------------------------------------------
+
+The largest installation of MediaWiki, Wikimedia, uses a large set of
+slave MySQL servers replicating writes made to a master MySQL server. It
+is important to understand the issues associated with this setup if you
+want to write code destined for Wikipedia.
+
+It's often the case that the best algorithm to use for a given task
+depends on whether or not replication is in use. Due to our unabashed
+Wikipedia-centrism, we often just use the replication-friendly version,
+but if you like, you can use $wgLoadBalancer->getServerCount() > 1 to
+check to see if replication is in use.
+
+=== Lag ===
+
+Lag primarily occurs when large write queries are sent to the master.
+Writes on the master are executed in parallel, but they are executed in
+serial when they are replicated to the slaves. The master writes the
+query to the binlog when the transaction is committed. The slaves poll
+the binlog and start executing the query as soon as it appears. They can
+service reads while they are performing a write query, but will not read
+anything more from the binlog and thus will perform no more writes. This
+means that if the write query runs for a long time, the slaves will lag
+behind the master for the time it takes for the write query to complete.
+
+Lag can be exacerbated by high read load. MediaWiki's load balancer will
+stop sending reads to a slave when it is lagged by more than 30 seconds.
+If the load ratios are set incorrectly, or if there is too much load
+generally, this may lead to a slave permanently hovering around 30
+seconds lag.
+
+If all slaves are lagged by more than 30 seconds, MediaWiki will stop
+writing to the database. All edits and other write operations will be
+refused, with an error returned to the user. This gives the slaves a
+chance to catch up. Before we had this mechanism, the slaves would
+regularly lag by several minutes, making review of recent edits
+difficult.
+
+In addition to this, MediaWiki attempts to ensure that the user sees
+events occuring on the wiki in chronological order. A few seconds of lag
+can be tolerated, as long as the user sees a consistent picture from
+subsequent requests. This is done by saving the master binlog position
+in the session, and then at the start of each request, waiting for the
+slave to catch up to that position before doing any reads from it. If
+this wait times out, reads are allowed anyway, but the request is
+considered to be in "lagged slave mode". Lagged slave mode can be
+checked by calling $wgLoadBalancer->getLaggedSlaveMode(). The only
+practical consequence at present is a warning displayed in the page
+footer.
+
+=== Lag avoidance ===
+
+To avoid excessive lag, queries which write large numbers of rows should
+be split up, generally to write one row at a time. Multi-row INSERT ...
+SELECT queries are the worst offenders should be avoided altogether.
+Instead do the select first and then the insert.
+
+=== Working with lag ===
+
+Despite our best efforts, it's not practical to guarantee a low-lag
+environment. Lag will usually be less than one second, but may
+occasionally be up to 30 seconds. For scalability, it's very important
+to keep load on the master low, so simply sending all your queries to
+the master is not the answer. So when you have a genuine need for
+up-to-date data, the following approach is advised:
+
+1) Do a quick query to the master for a sequence number or timestamp 2)
+Run the full query on the slave and check if it matches the data you got
+from the master 3) If it doesn't, run the full query on the master
+
+To avoid swamping the master every time the slaves lag, use of this
+approach should be kept to a minimum. In most cases you should just read
+from the slave and let the user deal with the delay.
+
+
+------------------------------------------------------------------------
+ Lock contention
+------------------------------------------------------------------------
+
+Due to the high write rate on Wikipedia (and some other wikis),
+MediaWiki developers need to be very careful to structure their writes
+to avoid long-lasting locks. By default, MediaWiki opens a transaction
+at the first query, and commits it before the output is sent. Locks will
+be held from the time when the query is done until the commit. So you
+can reduce lock time by doing as much processing as possible before you
+do your write queries. Update operations which do not require database
+access can be delayed until after the commit by adding an object to
+$wgPostCommitUpdateList.
+
+Often this approach is not good enough, and it becomes necessary to
+enclose small groups of queries in their own transaction. Use the
+following syntax:
+
+$dbw =& wfGetDB( DB_MASTER );
+$dbw->immediateBegin();
+/* Do queries */
+$dbw->immediateCommit();
+
+There are functions called begin() and commit() but they don't do what
+you would expect. Don't use them.
+
+Use of locking reads (e.g. the FOR UPDATE clause) is not advised. They
+are poorly implemented in InnoDB and will cause regular deadlock errors.
+It's also surprisingly easy to cripple the wiki with lock contention. If
+you must use them, define a new flag for $wgAntiLockFlags which allows
+them to be turned off, because we'll almost certainly need to do so on
+the Wikimedia cluster.
+
+Instead of locking reads, combine your existence checks into your write
+queries, by using an appropriate condition in the WHERE clause of an
+UPDATE, or by using unique indexes in combination with INSERT IGNORE.
+Then use the affected row count to see if the query succeeded.
+
diff --git a/docs/deferred.txt b/docs/deferred.txt
new file mode 100644
index 00000000..445eb0e4
--- /dev/null
+++ b/docs/deferred.txt
@@ -0,0 +1,19 @@
+
+deferred.txt
+
+A few of the database updates required by various functions here
+can be deferred until after the result page is displayed to the
+user. For example, updating the view counts, updating the
+linked-to tables after a save, etc. PHP does not yet have any
+way to tell the server to actually return and disconnect while
+still running these updates (as a Java servelet could), but it
+might have such a feature in the future.
+
+We handle these by creating a deferred-update object (in a real
+O-O language these would be classes that implement an interface)
+and putting those objects on a global list, then executing the
+whole list after the page is displayed. We don't do anything
+smart like collating updates to the same table or such because
+the list is almost always going to have just one item on it, if
+that, so it's not worth the trouble.
+
diff --git a/docs/design.txt b/docs/design.txt
new file mode 100644
index 00000000..5fff9fd0
--- /dev/null
+++ b/docs/design.txt
@@ -0,0 +1,128 @@
+This is a brief overview of the new design.
+
+Primary source files/objects:
+
+ index.php
+ Main script. It creates the necessary global objects and parses
+ the URL to determine what to do, which it then generally passes
+ off to somebody else (depending on the action to be taken).
+
+ All of the functions to which it might delegate generally do
+ their job by sending content to the $wgOut object. After returning,
+ the script flushes that out by calling $wgOut->output(). If there
+ are any changes that need to be made to the database that can be
+ deferred until after page display, those happen at the end.
+
+ Note that the order in the includes is touchy; Language uses
+ some global functions, etc. Likewise with the creation of the
+ global variables. Don't move them around without some forethought.
+
+ User
+ Encapsulates the state of the user viewing/using the site.
+ Can be queried for things like the user's settings, name, etc.
+ Handles the details of getting and saving to the "user" table
+ of the database, and dealing with sessions and cookies.
+ More details in USER.TXT.
+
+ OutputPage
+ Encapsulates the entire HTML page that will be sent in
+ response to any server request. It is used by calling its
+ functions to add text, headers, etc., in any order, and then
+ calling output() to send it all. It could be easily changed
+ to send incrementally if that becomes useful, but I prefer
+ the flexibility. This should also do the output encoding.
+ The system allocates a global one in $wgOut. This class
+ also handles converting wikitext format to HTML.
+
+ Title
+ Represents the title of an article, and does all the work
+ of translating among various forms such as plain text, URL,
+ database key, etc. For convenience, and for historical
+ reasons, it also represents a few features of articles that
+ don't involve their text, such as access rights.
+
+ Article
+ Encapsulates access to the "cur" table of the database. The
+ object represents a an article, and maintains state such as
+ text (in Wikitext format), flags, etc.
+
+ Skin
+ Encapsulates a "look and feel" for the wiki. All of the
+ functions that render HTML, and make choices about how to
+ render it, are here, and are called from various other
+ places when needed (most notably, OutputPage::addWikiText()).
+ The StandardSkin object is a complete implementation, and is
+ meant to be subclassed with other skins that may override
+ some of its functions. The User object contains a reference
+ to a skin (according to that user's preference), and so
+ rather than having a global skin object we just rely on the
+ global User and get the skin with $wgUser->getSkin().
+
+ Language
+ Represents the language used for incidental text, and also
+ has some character encoding functions and other locale stuff.
+ A global one is allocated in $wgLang.
+
+ LinkCache
+ Keeps information on existence of articles. See LINKCACHE.TXT.
+
+Naming/coding conventions:
+
+ These are meant to be descriptive, not dictatorial; I won't
+ presume to tell you how to program, I'm just describing the
+ methods I chose to use for myself. If you do choose to
+ follow these guidelines, it will probably be easier for you
+ to collaborate with others on the project, but if you want
+ to contribute without bothering, by all means do so (and don't
+ be surprised if I reformat your code).
+
+ - I have the code indented with tabs to save file size and
+ so that users can set their tab stops to any depth they like.
+ I use 4-space tab stops, which work well. I also use K&R brace
+ matching style. I know that's a religious issue for some,
+ so if you want to use a style that puts opening braces on the
+ next line, that's OK too, but please don't use a style where
+ closing braces don't align with either the opening brace on
+ its own line or the statement that opened the block--that's
+ confusing as hell.
+
+ - PHP doesn't have "private" member variables of functions,
+ so I've used the comment "/* private */" in some places to
+ indicate my intent. Don't access things marked that way
+ from outside the class def--use the accessor functions (or
+ make your own if you need them). Yes, even some globals
+ are marked private, because PHP is broken and doesn't
+ allow static class variables.
+
+ - Member variables are generally "mXxx" to distinguish them.
+ This should make it easier to spot errors of forgetting the
+ required "$this->", which PHP will happily accept by creating
+ a new local variable rather than complaining.
+
+ - Globals are particularly evil in PHP; it sets a lot of them
+ automatically from cookies, query strings, and such, leading to
+ namespace conflicts; when a variable name is used in a function,
+ it is silently declared as a new local masking the global, so
+ you'll get weird error because you forgot the global declaration;
+ lack of static class member variables means you have to use
+ globals for them, etc. Evil, evil.
+
+ I think I've managed to pare down the number of globals we use
+ to a scant few dozen or so, and I've prefixed them all with "wg"
+ so you can spot errors better (odds are, if you see a "wg"
+ variable being used in a function that doesn't declare it global,
+ that's probably an error).
+
+ Other conventions: Top-level functions are wfFuncname(), names
+ of session variables are wsName, cookies wcName, and form field
+ values wpName ("p" for "POST").
+
+ - Be kind to your release manager and don't use CVS keywords (Id,
+ Revision, etc.) to mark file versions. They make merging code
+ between different branches a pain for CVS, and are kind of sketchy
+ for versions after that. (Yes, you can use the '-kk' flag so that
+ merges ignore keywords, but that messes up binary files. See
+ https://www.cvshome.org/docs/manual/cvs-1.11.18/cvs_5.html#SEC64).
+
+
+
diff --git a/docs/export-0.1.xsd b/docs/export-0.1.xsd
new file mode 100644
index 00000000..0b3eb179
--- /dev/null
+++ b/docs/export-0.1.xsd
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ This is an XML Schema description of the format
+ output by MediaWiki's Special:Export system.
+
+ The canonical URL to the schema document is:
+ http://www.mediawiki.org/xml/export-0.1.xsd
+
+ Use the namespace:
+ http://www.mediawiki.org/xml/export-0.1/
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:mw="http://www.mediawiki.org/xml/export-0.1/"
+ targetNamespace="http://www.mediawiki.org/xml/export-0.1/"
+ elementFormDefault="qualified">
+
+ <annotation>
+ <documentation xml:lang="en">
+ MediaWiki's page export format
+ </documentation>
+ </annotation>
+
+ <!-- Need this to reference xml:lang -->
+ <import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <!-- Our root element -->
+ <element name="mediawiki" type="mw:MediaWikiType"/>
+
+ <complexType name="MediaWikiType">
+ <sequence>
+ <element name="page" type="mw:PageType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="version" type="string" use="required"/>
+ <attribute ref="xml:lang" use="required"/>
+ </complexType>
+
+ <complexType name="PageType">
+ <sequence>
+ <!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
+ <element name="title" type="string"/>
+
+ <!-- optional page ID number -->
+ <element name="id" type="positiveInteger" minOccurs="0"/>
+
+ <!-- comma-separated list of string tokens, if present -->
+ <element name="restrictions" type="string" minOccurs="0"/>
+
+ <!-- Zero or more sets of revision data -->
+ <element name="revision" type="mw:RevisionType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="RevisionType">
+ <sequence>
+ <element name="id" type="positiveInteger" minOccurs="0"/>
+ <element name="timestamp" type="dateTime"/>
+ <element name="contributor" type="mw:ContributorType"/>
+ <element name="minor" minOccurs="0" />
+ <element name="comment" type="string" minOccurs="0"/>
+ <element name="text" type="string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ContributorType">
+ <sequence>
+ <element name="username" type="string" minOccurs="0"/>
+ <element name="id" type="positiveInteger" minOccurs="0" />
+
+ <element name="ip" type="string" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+</schema>
diff --git a/docs/export-0.2.xsd b/docs/export-0.2.xsd
new file mode 100644
index 00000000..8acbf543
--- /dev/null
+++ b/docs/export-0.2.xsd
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ This is an XML Schema description of the format
+ output by MediaWiki's Special:Export system.
+
+ Version 0.2 adds optional basic file upload info support,
+ which is used by our OAI export/import submodule.
+
+ The canonical URL to the schema document is:
+ http://www.mediawiki.org/xml/export-0.2.xsd
+
+ Use the namespace:
+ http://www.mediawiki.org/xml/export-0.2/
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:mw="http://www.mediawiki.org/xml/export-0.2/"
+ targetNamespace="http://www.mediawiki.org/xml/export-0.2/"
+ elementFormDefault="qualified">
+
+ <annotation>
+ <documentation xml:lang="en">
+ MediaWiki's page export format
+ </documentation>
+ </annotation>
+
+ <!-- Need this to reference xml:lang -->
+ <import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <!-- Our root element -->
+ <element name="mediawiki" type="mw:MediaWikiType"/>
+
+ <complexType name="MediaWikiType">
+ <sequence>
+ <element name="page" type="mw:PageType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="version" type="string" use="required"/>
+ <attribute ref="xml:lang" use="required"/>
+ </complexType>
+
+ <complexType name="PageType">
+ <sequence>
+ <!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
+ <element name="title" type="string"/>
+
+ <!-- optional page ID number -->
+ <element name="id" type="positiveInteger" minOccurs="0"/>
+
+ <!-- comma-separated list of string tokens, if present -->
+ <element name="restrictions" type="string" minOccurs="0"/>
+
+ <!-- Zero or more sets of revision or upload data -->
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="revision" type="mw:RevisionType" />
+ <element name="upload" type="mw:UploadType" />
+ </choice>
+ </sequence>
+ </complexType>
+
+ <complexType name="RevisionType">
+ <sequence>
+ <element name="id" type="positiveInteger" minOccurs="0"/>
+ <element name="timestamp" type="dateTime"/>
+ <element name="contributor" type="mw:ContributorType"/>
+ <element name="minor" minOccurs="0" />
+ <element name="comment" type="string" minOccurs="0"/>
+ <element name="text" type="string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ContributorType">
+ <sequence>
+ <element name="username" type="string" minOccurs="0"/>
+ <element name="id" type="positiveInteger" minOccurs="0" />
+
+ <element name="ip" type="string" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="UploadType">
+ <sequence>
+ <!-- Revision-style data... -->
+ <element name="timestamp" type="dateTime"/>
+ <element name="contributor" type="mw:ContributorType"/>
+ <element name="comment" type="string" minOccurs="0"/>
+
+ <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
+ <element name="filename" type="string"/>
+
+ <!-- URI at which this resource can be obtained -->
+ <element name="src" type="anyURI"/>
+
+ <element name="size" type="positiveInteger" />
+
+ <!-- TODO: add other metadata fields -->
+ </sequence>
+ </complexType>
+
+</schema>
diff --git a/docs/export-0.3.xsd b/docs/export-0.3.xsd
new file mode 100644
index 00000000..1e0b7c88
--- /dev/null
+++ b/docs/export-0.3.xsd
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ This is an XML Schema description of the format
+ output by MediaWiki's Special:Export system.
+
+ Version 0.2 adds optional basic file upload info support,
+ which is used by our OAI export/import submodule.
+
+ Version 0.3 adds some site configuration information such
+ as a list of defined namespaces.
+
+ The canonical URL to the schema document is:
+ http://www.mediawiki.org/xml/export-0.3.xsd
+
+ Use the namespace:
+ http://www.mediawiki.org/xml/export-0.3/
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:mw="http://www.mediawiki.org/xml/export-0.3/"
+ targetNamespace="http://www.mediawiki.org/xml/export-0.3/"
+ elementFormDefault="qualified">
+
+ <annotation>
+ <documentation xml:lang="en">
+ MediaWiki's page export format
+ </documentation>
+ </annotation>
+
+ <!-- Need this to reference xml:lang -->
+ <import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <!-- Our root element -->
+ <element name="mediawiki" type="mw:MediaWikiType"/>
+
+ <complexType name="MediaWikiType">
+ <sequence>
+ <element name="siteinfo" type="mw:SiteInfoType"
+ minOccurs="0" maxOccurs="1"/>
+ <element name="page" type="mw:PageType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="version" type="string" use="required"/>
+ <attribute ref="xml:lang" use="required"/>
+ </complexType>
+
+ <complexType name="SiteInfoType">
+ <sequence>
+ <element name="sitename" type="string" minOccurs="0" />
+ <element name="base" type="anyURI" minOccurs="0" />
+ <element name="generator" type="string" minOccurs="0" />
+ <element name="case" type="mw:CaseType" minOccurs="0" />
+ <element name="namespaces" type="mw:NamespacesType" minOccurs="0" />
+ </sequence>
+ </complexType>
+
+ <simpleType name="CaseType">
+ <restriction base="NMTOKEN">
+ <!-- Cannot have two titles differing only by case of first letter. -->
+ <!-- Default behavior through 1.5, $wgCapitalLinks = true -->
+ <enumeration value="first-letter" />
+
+ <!-- Complete title is case-sensitive -->
+ <!-- Behavior when $wgCapitalLinks = false -->
+ <enumeration value="case-sensitive" />
+
+ <!-- Cannot have two titles differing only by case. -->
+ <!-- Not yet implemented as of MediaWiki 1.5 -->
+ <enumeration value="case-insensitive" />
+ </restriction>
+ </simpleType>
+
+ <complexType name="NamespacesType">
+ <sequence>
+ <element name="namespace" type="mw:NamespaceType"
+ minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ </complexType>
+
+ <complexType name="NamespaceType">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="key" type="integer" />
+ </extension>
+ </simpleContent>
+ </complexType>
+
+ <complexType name="PageType">
+ <sequence>
+ <!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
+ <element name="title" type="string"/>
+
+ <!-- optional page ID number -->
+ <element name="id" type="positiveInteger" minOccurs="0"/>
+
+ <!-- comma-separated list of string tokens, if present -->
+ <element name="restrictions" type="string" minOccurs="0"/>
+
+ <!-- Zero or more sets of revision or upload data -->
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="revision" type="mw:RevisionType" />
+ <element name="upload" type="mw:UploadType" />
+ </choice>
+ </sequence>
+ </complexType>
+
+ <complexType name="RevisionType">
+ <sequence>
+ <element name="id" type="positiveInteger" minOccurs="0"/>
+ <element name="timestamp" type="dateTime"/>
+ <element name="contributor" type="mw:ContributorType"/>
+ <element name="minor" minOccurs="0" />
+ <element name="comment" type="string" minOccurs="0"/>
+ <element name="text" type="mw:TextType" />
+ </sequence>
+ </complexType>
+
+ <complexType name="TextType">
+ <simpleContent>
+ <extension base="string">
+ <attribute ref="xml:space" use="optional" default="preserve" />
+ </extension>
+ </simpleContent>
+ </complexType>
+
+ <complexType name="ContributorType">
+ <sequence>
+ <element name="username" type="string" minOccurs="0"/>
+ <element name="id" type="positiveInteger" minOccurs="0" />
+
+ <element name="ip" type="string" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="UploadType">
+ <sequence>
+ <!-- Revision-style data... -->
+ <element name="timestamp" type="dateTime"/>
+ <element name="contributor" type="mw:ContributorType"/>
+ <element name="comment" type="string" minOccurs="0"/>
+
+ <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
+ <element name="filename" type="string"/>
+
+ <!-- URI at which this resource can be obtained -->
+ <element name="src" type="anyURI"/>
+
+ <element name="size" type="positiveInteger" />
+
+ <!-- TODO: add other metadata fields -->
+ </sequence>
+ </complexType>
+
+</schema>
diff --git a/docs/export-demo.xml b/docs/export-demo.xml
new file mode 100644
index 00000000..1b4bd7cf
--- /dev/null
+++ b/docs/export-demo.xml
@@ -0,0 +1,115 @@
+<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.3/ http://www.mediawiki.org/xml/export-0.3.xsd" version="0.3" xml:lang="en">
+
+<!-- Optional global configuration info -->
+<siteinfo>
+ <!-- Site name, as set in $wgSitename -->
+ <sitename>DemoWiki</sitename>
+
+ <!-- Forgot where you got this set? -->
+ <base>http://example.com/wiki/Main_Page</base>
+
+ <!-- Source software version -->
+ <generator>MediaWiki 1.5.0</generator>
+
+ <!-- Title case sensitivity options of the wiki this data came from -->
+ <!-- May be 'first-letter', 'case-sensitive', or 'case-insensitive' -->
+ <case>first-letter</case>
+
+ <!-- Defined namespace keys on the source wiki. -->
+ <!-- Titles can be substring-split to obtain the symbolic numeric key -->
+ <namespaces>
+ <namespace key="-2">Media</namespace>
+ <namespace key="-1">Special</namespace>
+ <namespace key="0"></namespace>
+ <namespace key="1">Talk</namespace>
+ <namespace key="2">User</namespace>
+ <namespace key="3">User talk</namespace>
+ <namespace key="4">DemoWiki</namespace>
+ <namespace key="5">DemoWIki talk</namespace>
+ <namespace key="6">Image</namespace>
+ <namespace key="7">Image talk</namespace>
+ <namespace key="8">MediaWiki</namespace>
+ <namespace key="9">MediaWiki talk</namespace>
+ <namespace key="10">Template</namespace>
+ <namespace key="11">Template talk</namespace>
+ <namespace key="12">Help</namespace>
+ <namespace key="13">Help talk</namespace>
+ <namespace key="14">Category</namespace>
+ <namespace key="15">Category talk</namespace>
+ </namespaces>
+</siteinfo>
+
+<!-- The rest of the data will be a series of page records -->
+<page>
+ <!-- Titles are listed here in text form, with namespace prefix -->
+ <!-- if any, and spaces rather than the underscores used in URLs. -->
+ <title>Page title</title>
+
+ <!-- The page's immutable page_id number in the source database. -->
+ <!-- Page ID numbers are kept across page moves, but may change -->
+ <!-- if a page is deleted and recreated. -->
+ <id>1</id>
+
+ <!-- If restricted, the ACL is listed here raw. -->
+ <restrictions>edit=sysop:move=sysop</restrictions>
+
+ <!-- With a series of revision records... -->
+
+ <!-- Remember this is XML; if you must use a regex-based extractor -->
+ <!-- in place of a standard XML parser, be very careful. -->
+ <!-- * Don't forget to decode character entities! -->
+ <!-- * If using a 'loose' XML parser, ensure that whitespace is -->
+ <!-- preserved in the <text> elements. -->
+ <revision>
+ <!-- Unique revision ID number (rev_id) in the source database. -->
+ <!-- This number uniquely identifies the revision on that wiki. -->
+ <id>100</id>
+
+ <timestamp>2001-01-15T13:15:00Z</timestamp>
+ <contributor><username>Foobar</username><id>42</id></contributor>
+ <minor />
+ <comment>I have just one thing to say!</comment>
+ <text xml:space="preserve">A bunch of [[text]] here.</text>
+ </revision>
+
+ <revision>
+ <timestamp>2001-01-15T13:10:27Z</timestamp>
+ <contributor><ip>10.0.0.2</ip></contributor>
+ <comment>new!</comment>
+ <text xml:space="preserve">An earlier [[revision]].</text>
+ </revision>
+</page>
+
+<page>
+ <title>Talk:Page title</title>
+ <id>2</id>
+ <revision>
+ <id>101</id>
+ <timestamp>2001-01-15T14:03:00Z</timestamp>
+ <contributor><ip>10.0.0.2</ip></contributor>
+ <comment>hey</comment>
+ <text xml:space="preserve">WHYD YOU LOCK PAGE??!!! i was editing that jerk</text>
+ </revision>
+</page>
+
+<page>
+ <title>Image:Some image.jpg</title>
+ <id>3</id>
+ <revision>
+ <id>102</id>
+ <timestamp>2001-01-15T20:34:12Z</timestamp>
+ <contributor><username>Foobar</username><id>42</id></contributor>
+ <comment>My awesomeest image!</comment>
+ <text xml:space="preserve">This is an awesome little imgae. I lurves it. {{PD}}</text>
+ </revision>
+ <upload>
+ <timestamp>2001-01-15T20:34:12Z</timestamp>
+ <contributor><username>Foobar</username><id>42</id></contributor>
+ <comment>My awesomeest image!</comment>
+ <filename>Some_image.jpg</filename>
+ <src>http://upload.wikimedia.org/commons/2/22/Some_image.jpg</src>
+ <size>12345</size>
+ </upload>
+</page>
+
+</mediawiki>
diff --git a/docs/globals.txt b/docs/globals.txt
new file mode 100644
index 00000000..ecc5ab33
--- /dev/null
+++ b/docs/globals.txt
@@ -0,0 +1,74 @@
+globals.txt
+
+Globals are evil. The original MediaWiki code relied on
+globals for processing context far too often. MediaWiki
+development since then has been a story of slowly moving
+context out of global variables and into objects. Storing
+processing context in object member variables allows those
+objects to be reused in a much more flexible way. Consider
+the elegance of:
+
+ # Generate the article HTML as if viewed by a web request
+ $article = new Article( Title::newFromText( $t ) );
+ $article->view();
+
+versus
+
+ # Save current globals
+ $oldTitle = $wgTitle;
+ $oldArticle = $wgArticle;
+
+ # Generate the HTML
+ $wgTitle = Title::newFromText( $t );
+ $wgArticle = new Article;
+ $wgArticle->view();
+
+ # Restore globals
+ $wgTitle = $oldTitle
+ $wgArticle = $oldArticle
+
+Some of the current MediaWiki developers have an idle
+fantasy that some day, globals will be eliminated from
+MediaWiki entirely, replaced by an application object which
+would be passed to constructors. Whether that would be an
+efficient, convenient solution remains to be seen, but
+certainly PHP 5 makes such object-oriented programming
+models easier than they were in previous versions.
+
+For the time being though, MediaWiki programmers will have
+to work in an environment with some global context. At the
+time of writing, 418 globals were initialised on startup by
+MediaWiki. 304 of these were configuration settings, which
+are documented in DefaultSettings.php. There is no
+comprehensive documentation for the remaining 114 globals,
+however some of the most important ones are listed below.
+They are typically initialised either in index.php or in
+Setup.php.
+
+
+$wgOut
+ OutputPage object for HTTP response.
+
+$wgUser
+ User object for the user associated with the current
+ request.
+
+$wgTitle
+ Title object created from the request URL.
+
+$wgLang
+ Language object selected by user preferences
+
+$wgContLang
+ Language object associated with the wiki being
+ viewed.
+
+$wgArticle
+ Article object corresponding to $wgTitle.
+
+$wgParser
+ Parser object. Parser extensions register their
+ hooks here.
+
+$wgLoadBalancer
+ A LoadBalancer object, manages database connections.
diff --git a/docs/hooks.txt b/docs/hooks.txt
new file mode 100644
index 00000000..4dd68f5f
--- /dev/null
+++ b/docs/hooks.txt
@@ -0,0 +1,502 @@
+hooks.txt
+
+This document describes how event hooks work in MediaWiki; how to add
+hooks for an event; and how to run hooks for an event.
+
+==Glossary==
+
+event
+ Something that happens with the wiki. For example: a user logs
+ in. A wiki page is saved. A wiki page is deleted. Often there are
+ two events associated with a single action: one before the code
+ is run to make the event happen, and one after. Each event has a
+ name, preferably in CamelCase. For example, 'UserLogin',
+ 'ArticleSave', 'ArticleSaveComplete', 'ArticleDelete'.
+
+hook
+ A clump of code and data that should be run when an event
+ happens. This can be either a function and a chunk of data, or an
+ object and a method.
+
+hook function
+ The function part of a hook.
+
+==Rationale==
+
+Hooks allow us to decouple optionally-run code from code that is run
+for everyone. It allows MediaWiki hackers, third-party developers and
+local administrators to define code that will be run at certain points
+in the mainline code, and to modify the data run by that mainline
+code. Hooks can keep mainline code simple, and make it easier to
+write extensions. Hooks are a principled alternative to local patches.
+
+Consider, for example, two options in MediaWiki. One reverses the
+order of a title before displaying the article; the other converts the
+title to all uppercase letters. Currently, in MediaWiki code, we
+would handle this as follows (note: not real code, here):
+
+ function showAnArticle($article) {
+ global $wgReverseTitle, $wgCapitalizeTitle;
+
+ if ($wgReverseTitle) {
+ wfReverseTitle($article);
+ }
+
+ if ($wgCapitalizeTitle) {
+ wfCapitalizeTitle($article);
+ }
+
+ # code to actually show the article goes here
+ }
+
+An extension writer, or a local admin, will often add custom code to
+the function -- with or without a global variable. For example,
+someone wanting email notification when an article is shown may add:
+
+ function showAnArticle($article) {
+ global $wgReverseTitle, $wgCapitalizeTitle;
+
+ if ($wgReverseTitle) {
+ wfReverseTitle($article);
+ }
+
+ if ($wgCapitalizeTitle) {
+ wfCapitalizeTitle($article);
+ }
+
+ # code to actually show the article goes here
+
+ if ($wgNotifyArticle) {
+ wfNotifyArticleShow($article));
+ }
+ }
+
+Using a hook-running strategy, we can avoid having all this
+option-specific stuff in our mainline code. Using hooks, the function
+becomes:
+
+ function showAnArticle($article) {
+
+ if (wfRunHooks('ArticleShow', array(&$article))) {
+
+ # code to actually show the article goes here
+
+ wfRunHooks('ArticleShowComplete', array(&$article));
+ }
+ }
+
+We've cleaned up the code here by removing clumps of weird,
+infrequently used code and moving them off somewhere else. It's much
+easier for someone working with this code to see what's _really_ going
+on, and make changes or fix bugs.
+
+In addition, we can take all the code that deals with the little-used
+title-reversing options (say) and put it in one place. Instead of
+having little title-reversing if-blocks spread all over the codebase
+in showAnArticle, deleteAnArticle, exportArticle, etc., we can
+concentrate it all in an extension file:
+
+ function reverseArticleTitle($article) {
+ # ...
+ }
+
+ function reverseForExport($article) {
+ # ...
+ }
+
+The setup function for the extension just has to add its hook
+functions to the appropriate events:
+
+ setupTitleReversingExtension() {
+ global $wgHooks;
+
+ $wgHooks['ArticleShow'][] = 'reverseArticleTitle';
+ $wgHooks['ArticleDelete'][] = 'reverseArticleTitle';
+ $wgHooks['ArticleExport'][] = 'reverseForExport';
+ }
+
+Having all this code related to the title-reversion option in one
+place means that it's easier to read and understand; you don't have to
+do a grep-find to see where the $wgReverseTitle variable is used, say.
+
+If the code is well enough isolated, it can even be excluded when not
+used -- making for some slight savings in memory and load-up
+performance at runtime. Admins who want to have all the reversed
+titles can add:
+
+ require_once('extensions/ReverseTitle.php');
+
+...to their LocalSettings.php file; those of us who don't want or need
+it can just leave it out.
+
+The extensions don't even have to be shipped with MediaWiki; they
+could be provided by a third-party developer or written by the admin
+him/herself.
+
+==Writing hooks==
+
+A hook is a chunk of code run at some particular event. It consists of:
+
+ * a function with some optional accompanying data, or
+ * an object with a method and some optional accompanying data.
+
+Hooks are registered by adding them to the global $wgHooks array for a
+given event. All the following are valid ways to define hooks:
+
+ $wgHooks['EventName'][] = 'someFunction'; # function, no data
+ $wgHooks['EventName'][] = array('someFunction', $someData);
+ $wgHooks['EventName'][] = array('someFunction'); # weird, but OK
+
+ $wgHooks['EventName'][] = $object; # object only
+ $wgHooks['EventName'][] = array($object, 'someMethod');
+ $wgHooks['EventName'][] = array($object, 'someMethod', $someData);
+ $wgHooks['EventName'][] = array($object); # weird but OK
+
+When an event occurs, the function (or object method) will be called
+with the optional data provided as well as event-specific parameters.
+The above examples would result in the following code being executed
+when 'EventName' happened:
+
+ # function, no data
+ someFunction($param1, $param2)
+ # function with data
+ someFunction($someData, $param1, $param2)
+
+ # object only
+ $object->onEventName($param1, $param2)
+ # object with method
+ $object->someMethod($param1, $param2)
+ # object with method and data
+ $object->someMethod($someData, $param1, $param2)
+
+Note that when an object is the hook, and there's no specified method,
+the default method called is 'onEventName'. For different events this
+would be different: 'onArticleSave', 'onUserLogin', etc.
+
+The extra data is useful if we want to use the same function or object
+for different purposes. For example:
+
+ $wgHooks['ArticleSaveComplete'][] = array('ircNotify', 'TimStarling');
+ $wgHooks['ArticleSaveComplete'][] = array('ircNotify', 'brion');
+
+This code would result in ircNotify being run twice when an article is
+saved: once for 'TimStarling', and once for 'brion'.
+
+Hooks can return three possible values:
+
+ * true: the hook has operated successfully
+ * "some string": an error occurred; processing should
+ stop and the error should be shown to the user
+ * false: the hook has successfully done the work
+ necessary and the calling function should skip
+
+The last result would be for cases where the hook function replaces
+the main functionality. For example, if you wanted to authenticate
+users to a custom system (LDAP, another PHP program, whatever), you
+could do:
+
+ $wgHooks['UserLogin'][] = array('ldapLogin', $ldapServer);
+
+ function ldapLogin($username, $password) {
+ # log user into LDAP
+ return false;
+ }
+
+Returning false makes less sense for events where the action is
+complete, and will normally be ignored.
+
+==Using hooks==
+
+A calling function or method uses the wfRunHooks() function to run
+the hooks related to a particular event, like so:
+
+ class Article {
+ # ...
+ function protect() {
+ global $wgUser;
+ if (wfRunHooks('ArticleProtect', array(&$this, &$wgUser))) {
+ # protect the article
+ wfRunHooks('ArticleProtectComplete', array(&$this, &$wgUser));
+ }
+ }
+
+wfRunHooks() returns true if the calling function should continue
+processing (the hooks ran OK, or there are no hooks to run), or false
+if it shouldn't (an error occurred, or one of the hooks handled the
+action already). Checking the return value matters more for "before"
+hooks than for "complete" hooks.
+
+Note that hook parameters are passed in an array; this is a necessary
+inconvenience to make it possible to pass reference values (that can
+be changed) into the hook code. Also note that earlier versions of
+wfRunHooks took a variable number of arguments; the array() calling
+protocol came about after MediaWiki 1.4rc1.
+
+==Events and parameters==
+
+This is a list of known events and parameters; please add to it if
+you're going to add events to the MediaWiki code.
+
+'AbortNewAccount': Return false to cancel account creation.
+$user: the User object about to be created (read-only, incomplete)
+$message: out parameter: error message to display on abort
+
+'AddNewAccount': after a user account is created
+$user: the User object that was created. (Parameter added in 1.7)
+
+'ArticleDelete': before an article is deleted
+$article: the article (object) being deleted
+$user: the user (object) deleting the article
+$reason: the reason (string) the article is being deleted
+
+'ArticleDeleteComplete': after an article is deleted
+$article: the article that was deleted
+$user: the user that deleted the article
+$reason: the reason the article was deleted
+
+'ArticleProtect': before an article is protected
+$article: the article being protected
+$user: the user doing the protection
+$protect: boolean whether this is a protect or an unprotect
+$reason: Reason for protect
+$moveonly: boolean whether this is for move only or not
+
+'ArticleProtectComplete': after an article is protected
+$article: the article that was protected
+$user: the user who did the protection
+$protect: boolean whether it was a protect or an unprotect
+$reason: Reason for protect
+$moveonly: boolean whether it was for move only or not
+
+'ArticleSave': before an article is saved
+$article: the article (object) being saved
+$user: the user (object) saving the article
+$text: the new article text
+$summary: the article summary (comment)
+$isminor: minor flag
+$iswatch: watch flag
+$section: section #
+
+'ArticleSaveComplete': after an article is saved
+$article: the article (object) saved
+$user: the user (object) who saved the article
+$text: the new article text
+$summary: the article summary (comment)
+$isminor: minor flag
+$iswatch: watch flag
+$section: section #
+
+'AutoAuthenticate': called to authenticate users on external/environmental means
+$user: writes user object to this parameter
+
+'BadImage': When checking against the bad image list
+$name: Image name being checked
+&$bad: Whether or not the image is "bad"
+
+Change $bad and return false to override. If an image is "bad", it is not
+rendered inline in wiki pages or galleries in category pages.
+
+'BlockIp': before an IP address or user is blocked
+$block: the Block object about to be saved
+$user: the user _doing_ the block (not the one being blocked)
+
+'BlockIpComplete': after an IP address or user is blocked
+$block: the Block object that was saved
+$user: the user who did the block (not the one being blocked)
+
+'DiffViewHeader': called before diff display
+$diff: DifferenceEngine object that's calling
+$oldRev: Revision object of the "old" revision (may be null/invalid)
+$newRev: Revision object of the "new" revision
+
+'EditFormPreloadText': Allows population of the edit form when creating new pages
+&$text: Text to preload with
+&$title: Title object representing the page being created
+
+'EditFilter': Perform checks on an edit
+$editor: Edit form (see includes/EditPage.php)
+$text: Contents of the edit box
+$section: Section being edited
+&$error: Error message to return
+
+Return false to halt editing; you'll need to handle error messages, etc. yourself.
+Alternatively, modifying $error and returning true will cause the contents of $error
+to be echoed at the top of the edit form as wikitext. Return true without altering
+$error to allow the edit to proceed.
+
+'EmailConfirmed': When checking that the user's email address is "confirmed"
+$user: User being checked
+$confirmed: Whether or not the email address is confirmed
+This runs before the other checks, such as anonymity and the real check; return
+true to allow those checks to occur, and false if checking is done.
+
+'EmailUser': before sending email from one user to another
+$to: address of receiving user
+$from: address of sending user
+$subject: subject of the mail
+$text: text of the mail
+
+'EmailUserComplete': after sending email from one user to another
+$to: address of receiving user
+$from: address of sending user
+$subject: subject of the mail
+$text: text of the mail
+
+'FetchChangesList': When fetching the ChangesList derivative for a particular user
+&$user: User the list is being fetched for
+&$skin: Skin object to be used with the list
+&$list: List object (defaults to NULL, change it to an object instance and return
+false override the list derivative used)
+
+'GetInternalURL': modify fully-qualified URLs used for squid cache purging
+$title: Title object of page
+$url: string value as output (out parameter, can modify)
+$query: query options passed to Title::getInternalURL()
+
+'GetLocalURL': modify local URLs as output into page links
+$title: Title object of page
+$url: string value as output (out parameter, can modify)
+$query: query options passed to Title::getLocalURL()
+
+'GetFullURL': modify fully-qualified URLs used in redirects/export/offsite data
+$title: Title object of page
+$url: string value as output (out parameter, can modify)
+$query: query options passed to Title::getFullURL()
+
+'LogPageValidTypes': action being logged. DEPRECATED: Use $wgLogTypes
+&$type: array of strings
+
+'LogPageLogName': name of the logging page(s). DEPRECATED: Use $wgLogNames
+&$typeText: array of strings
+
+'LogPageLogHeader': strings used by wfMsg as a header. DEPRECATED: Use $wgLogHeaders
+&$headerText: array of strings
+
+'LogPageActionText': strings used by wfMsg as a header. DEPRECATED: Use $wgLogActions
+&$actionText: array of strings
+
+'MarkPatrolled': before an edit is marked patrolled
+$rcid: ID of the revision to be marked patrolled
+$user: the user (object) marking the revision as patrolled
+$wcOnlySysopsCanPatrol: config setting indicating whether the user
+ needs to be a sysop in order to mark an edit patrolled
+
+'MarkPatrolledComplete': after an edit is marked patrolled
+$rcid: ID of the revision marked as patrolled
+$user: user (object) who marked the edit patrolled
+$wcOnlySysopsCanPatrol: config setting indicating whether the user
+ must be a sysop to patrol the edit
+
+'MathAfterTexvc': after texvc is executed when rendering mathematics
+$mathRenderer: instance of MathRenderer
+$errmsg: error message, in HTML (string). Nonempty indicates failure
+ of rendering the formula
+
+'OutputPageBeforeHTML': a page has been processed by the parser and
+the resulting HTML is about to be displayed.
+$parserOutput: the parserOutput (object) that corresponds to the page
+$text: the text that will be displayed, in HTML (string)
+
+'PageRenderingHash': alter the parser cache option hash key
+ A parser extension which depends on user options should install
+ this hook and append its values to the key.
+$hash: reference to a hash key string which can be modified
+
+'PersonalUrls': Alter the user-specific navigation links (e.g. "my page,
+my talk page, my contributions" etc).
+
+&$personal_urls: Array of link specifiers (see SkinTemplate.php)
+&$title: Title object representing the current page
+
+'SiteNoticeBefore': Before the sitenotice/anonnotice is composed
+&$siteNotice: HTML returned as the sitenotice
+Return true to allow the normal method of notice selection/rendering to work,
+or change the value of $siteNotice and return false to alter it.
+
+'SiteNoticeAfter': After the sitenotice/anonnotice is composed
+&$siteNotice: HTML sitenotice
+Alter the contents of $siteNotice to add to/alter the sitenotice/anonnotice.
+
+'TitleMoveComplete': after moving an article (title)
+$old: old title
+$nt: new title
+$user: user who did the move
+$pageid: database ID of the page that's been moved
+$redirid: database ID of the created redirect
+
+'UnknownAction': An unknown "action" has occured (useful for defining
+ your own actions)
+$action: action name
+$article: article "acted on"
+
+'UnwatchArticle': before a watch is removed from an article
+$user: user watching
+$article: article object to be removed
+
+'UnwatchArticle': after a watch is removed from an article
+$user: user that was watching
+$article: article object removed
+
+'UploadVerification': additional chances to reject an uploaded file
+string $saveName: destination file name
+string $tempName: filesystem path to the temporary file for checks
+string &$error: output: HTML error to show if upload canceled by returning false
+
+'UploadComplete': Upon completion of a file upload
+$image: Image object representing the file that was uploaded
+
+'UserCan': To interrupt/advise the "user can do X to Y article" check
+$title: Title object being checked against
+$user : Current user object
+$action: Action being checked
+$result: Pointer to result returned if hook returns false. If null is returned,
+ UserCan checks are continued by internal code
+
+'UserCreateForm': change to manipulate the login form
+$template: SimpleTemplate instance for the form
+
+'UserLoginComplete': after a user has logged in
+$user: the user object that was created on login
+
+'UserLoginForm': change to manipulate the login form
+$template: SimpleTemplate instance for the form
+
+'UserLogout': before a user logs out
+$user: the user object that is about to be logged out
+
+'UserLogoutComplete': after a user has logged out
+$user: the user object _after_ logout (won't have name, ID, etc.)
+
+'UserRights': After a user's group memberships are changed
+$user : User object that was changed
+$add : Array of strings corresponding to groups added
+$remove: Array of strings corresponding to groups removed
+
+'WatchArticle': before a watch is added to an article
+$user: user that will watch
+$article: article object to be watched
+
+'WatchArticleComplete': after a watch is added to an article
+$user: user that watched
+$article: article object watched
+
+'UnwatchArticleComplete': after a watch is removed from an article
+$user: user that watched
+$article: article object that was watched
+
+'CategoryPageView': before viewing a categorypage in CategoryPage::view
+$catpage: CategoryPage instance
+
+'SkinTemplateContentActions': after building the $content_action array right
+ before returning it, see content_action.php in
+ the extension module for a demonstration of how
+ to use this hook.
+$content_actions: The array of content actions
+
+'BeforePageDisplay': Called just before outputting a page (all kinds of,
+ articles, special, history, preview, diff, edit, ...)
+ Can be used to set custom CSS/JS
+$out: OutputPage object
+
+More hooks might be available but undocumented, you can execute
+./maintenance/findhooks.php to find hidden one.
diff --git a/docs/html/README b/docs/html/README
new file mode 100644
index 00000000..d25b803d
--- /dev/null
+++ b/docs/html/README
@@ -0,0 +1,4 @@
+This directory is for the auto-generated phpdoc documentation.
+Run 'php mwdocgen.php' in the maintenance subdirectory to build the docs.
+
+Get phpDocumentor from http://phpdoc.org/
diff --git a/docs/language.txt b/docs/language.txt
new file mode 100644
index 00000000..9d6a0db3
--- /dev/null
+++ b/docs/language.txt
@@ -0,0 +1,24 @@
+language.txt
+
+The Language object handles all readable text produced by the
+software. The most used function is getMessage(), usually
+called with the wrapper function wfMsg() which calls that method
+on the global language object. It just returns a piece of text
+given a text key. It is recommended that you use each key only
+once--bits of text in different contexts that happen to be
+identical in English may not be in other languages, so it's
+better to add new keys than to reuse them a lot. Likewise,
+if there is text that gets combined with things like names and
+titles, it is better to put markers like "$1" inside a piece
+of text and use str_replace() than to compose such messages in
+code, because their order may change in other languages too.
+
+While the system is running, there will be one global language
+object, which will be a subtype of Language. The methods in
+these objects will return the native text requested if available,
+otherwise they fall back to sending English text (which is why
+the LanguageEn object has no code at all--it just inherits the
+English defaults of the Language base class).
+
+The names of the namespaces are also contained in the language
+object, though the numbers are fixed.
diff --git a/docs/linkcache.txt b/docs/linkcache.txt
new file mode 100644
index 00000000..3e9799c3
--- /dev/null
+++ b/docs/linkcache.txt
@@ -0,0 +1,18 @@
+linkcache.txt
+
+The LinkCache class maintains a list of article titles and
+the information about whether or not the article exists in
+the database. This is used to mark up links when displaying
+a page. If the same link appears more than once on any page,
+then it only has to be looked up once. In most cases, link
+lookups are done in batches with the LinkBatch class, or the
+equivalent in Parser::replaceLinkHolders(), so the link
+cache is mostly useful for short snippets of parsed text
+(such as the site notice), and for links in the navigation
+areas of the skin.
+
+The link cache was formerly used to track links used in a
+document for the purposes of updating the link tables. This
+application is now deprecated.
+
+
diff --git a/docs/magicword.txt b/docs/magicword.txt
new file mode 100644
index 00000000..74e49cff
--- /dev/null
+++ b/docs/magicword.txt
@@ -0,0 +1,44 @@
+magicword.txt
+
+Magic Words are some phrases used in the wikitext. They are defined in several arrays:
+* $magicWords (includes/MagicWord.php) includes their internal names ('MAG_XXX').
+* $wgVariableIDs (includes/MagicWord.php) includes their IDs (MAG_XXX, which are constants),
+ after their internal names are used for "define()".
+* Localized arrays (languages/LanguageXX.php) include their different names to be used by the users.
+
+The localized arrays keys are the internal IDs, and the values are an array, whose include their
+case-sensitivity and their alias forms. The first form defined is used by the program, for example,
+when moving a page and its old name should include #REDIRECT.
+
+Adding magic words should be done using several hooks:
+* "MagicWordMagicWords" should be used to add the internal name ('MAG_XXX') to $magicWords.
+* "MagicWordwgVariableIDs" should be used to add the ID (MAG_XXX constant) to $wgVariableIDs.
+* "LanguageGetMagic" should be used to add the different names of the magic word. Use both
+ the localized name and the English name. Get the language code by the parameter $langCode;
+
+For example:
+
+$wgHooks['MagicWordMagicWords'][] = 'wfAddCustomMagicWord';
+$wgHooks['MagicWordwgVariableIDs'][] = 'wfAddCustomMagicWordID';
+$wgHooks['LanguageGetMagic'][] = 'wfAddCustomMagicWordLang';
+
+function wfAddCustomMagicWord( &$magicWords ) {
+ $magicWords[] = 'MAG_CUSTOM';
+ return true;
+}
+
+function wfAddCustomMagicWordID( &$magicWords ) {
+ $magicWords[] = MAG_CUSTOM;
+ return true;
+}
+
+function wfAddCustomMagicWordLang( &$magicWords, $langCode ) {
+ switch ( $langCode ) {
+ case 'es':
+ $magicWords[MAG_CUSTOM] = array( 0, "#aduanero", "#custom" );
+ break;
+ default:
+ $magicWords[MAG_CUSTOM] = array( 0, "#custom" );
+ }
+ return true;
+}
diff --git a/docs/memcached.txt b/docs/memcached.txt
new file mode 100644
index 00000000..6752e9c8
--- /dev/null
+++ b/docs/memcached.txt
@@ -0,0 +1,132 @@
+memcached support for MediaWiki:
+
+From ca August 2003, MediaWiki has optional support for memcached, a
+"high-performance, distributed memory object caching system".
+For general information on it, see: http://www.danga.com/memcached/
+
+Memcached is likely more trouble than a small site will need, but
+for a larger site with heavy load, like Wikipedia, it should help
+lighten the load on the database servers by caching data and objects
+in memory.
+
+== Requirements ==
+
+* PHP must be compiled with --enable-sockets
+
+* libevent: http://www.monkey.org/~provos/libevent/
+ (as of 2003-08-11, 0.7a is current)
+
+* optionally, epoll-rt patch for Linux kernel:
+ http://www.xmailserver.org/linux-patches/nio-improve.html
+
+* memcached: http://www.danga.com/memcached/download.bml
+ (as of this writing, 1.1.9 is current)
+
+Memcached and libevent are under BSD-style licenses.
+
+The server should run on Linux and other Unix-like systems... you
+can run multiple servers on one machine or on multiple machines on
+a network; storage can be distributed across multiple servers, and
+multiple web servers can use the same cache cluster.
+
+
+********************* W A R N I N G ! ! ! ! ! ***********************
+Memcached has no security or authentication. Please ensure that your
+server is appropriately firewalled, and that the port(s) used for
+memcached servers are not publicly accessible. Otherwise, anyone on
+the internet can put data into and read data from your cache.
+
+An attacker familiar with MediaWiki internals could use this to give
+themselves developer access and delete all data from the wiki's
+database, as well as getting all users' password hashes and e-mail
+addresses.
+********************* W A R N I N G ! ! ! ! ! ***********************
+
+== Setup ==
+
+If you want to start small, just run one memcached on your web
+server:
+
+ memcached -d -l 127.0.0.1 -p 11000 -m 64
+
+(to run in daemon mode, accessible only via loopback interface,
+on port 11000, using up to 64MB of memory)
+
+In your LocalSettings.php file, set:
+
+ $wgUseMemCached = true;
+ $wgMemCachedServers = array( "127.0.0.1:11000" );
+
+The wiki should then use memcached to cache various data. To use
+multiple servers (physically separate boxes or multiple caches
+on one machine on a large-memory x86 box), just add more items
+to the array. To increase the weight of a server (say, because
+it has twice the memory of the others and you want to spread
+usage evenly), make its entry a subarray:
+
+ $wgMemCachedServers = array(
+ "127.0.0.1:11000", # one gig on this box
+ array("192.168.0.1:11000", 2) # two gigs on the other box
+ );
+
+
+== PHP client for memcached ==
+
+As of this writing, MediaWiki includes version 1.0.10 of the PHP
+memcached client by Ryan Gilfether <hotrodder@rocketmail.com>.
+You'll find some documentation for it in the 'php-memcached'
+subdirectory under the present one.
+
+We intend to track updates, but if you want to check for the lastest
+released version, see http://www.danga.com/memcached/apis.bml
+
+If you don't set $wgUseMemCached, we still create a MemCacheClient,
+but requests to it are no-ops and we always fall through to the
+database. If the cache daemon can't be contacted, it should also
+disable itself fairly smoothly.
+
+== Keys used ==
+
+User:
+ key: $wgDBname:user:id:$sId
+ ex: wikidb:user:id:51
+ stores: instance of class User
+ set in: User::loadFromSession()
+ cleared by: User::saveSettings(), UserTalkUpdate::doUpdate()
+
+Newtalk:
+ key: $wgDBname:newtalk:ip:$ip
+ ex: wikidb:newtalk:ip:123.45.67.89
+ stores: integer, 0 or 1
+ set in: User::loadFromDatabase()
+ cleared by: User::saveSettings() # ?
+ expiry set to 30 minutes
+
+LinkCache:
+ key: $wgDBname:lc:title:$title
+ ex: wikidb:lc:title:Wikipedia:Welcome,_Newcomers!
+ stores: cur_id of page, or 0 if page does not exist
+ set in: LinkCache::addLink()
+ cleared by: LinkCache::clearBadLink()
+ should be cleared on page deletion and rename
+MediaWiki namespace:
+ key: $wgDBname:messages
+ ex: wikidb:messages
+ stores: an array where the keys are DB keys and the values are messages
+ set in: wfMsg(), Article::editUpdates() both call wfLoadAllMessages()
+ cleared by: nothing
+
+Watchlist:
+ key: $wgDBname:watchlist:id:$userID
+ ex: wikidb:watchlist:id:4635
+ stores: HTML string
+ cleared by: nothing, expiry time $wgWLCacheTimeout (1 hour)
+ note: emergency optimisation only
+
+IP blocks:
+ key: $wgDBname:ipblocks
+ ex: wikidb:ipblocks
+ stores: array of arrays, for the BlockCache class
+ cleared by: BlockCache:clear()
+
+... more to come ...
diff --git a/docs/php-memcached/ChangeLog b/docs/php-memcached/ChangeLog
new file mode 100644
index 00000000..86792f60
--- /dev/null
+++ b/docs/php-memcached/ChangeLog
@@ -0,0 +1,45 @@
+Release 1.0.10
+--------------
+* bug fix: changes hashing function to crc32, sprintf %u
+* feature: optional compression
+
+Release 1.0.9
+-------------
+* protocol parsing bug
+
+Release 1.0.8
+-------------
+* whitespace/punctuation/wording cleanups
+
+Release 1.0.7
+-------------
+* added 3 functions which handle error reporting
+ error() - returns error number of last error generated, else returns 0
+ error_string() - returns a string description of error number retuned
+ error_clear() - clears the last error number and error string
+* removed call to preg_match() in _loaditems()
+* only non-scalar values are serialize() before being
+ sent to the server
+* added the optional timestamp argument for delete()
+ read Documentation file for details
+* PHPDocs/PEAR style comments added
+* abstract debugging (Brion Vibber <brion@pobox.com>)
+
+Release 1.0.6
+-------------
+* removed all array_push() calls
+* applied patch provided by Stuart Herbert<stuart@gentoo.org>
+ corrects possible endless loop. Available at
+ http://bugs.gentoo.org/show_bug.cgi?id=25385
+* fixed problem with storing large binary files
+* added more error checking, specifically on all socket functions
+* added support for the INCR and DECR commands
+ which increment or decrement a value stored in MemCached
+* Documentation removed from source and is now available
+ in the file Documentation
+
+Release 1.0.4
+-------------
+* initial release, version numbers kept
+ in sync with MemCached version
+* capable of storing any datatype in MemCached
diff --git a/docs/php-memcached/Documentation b/docs/php-memcached/Documentation
new file mode 100644
index 00000000..4782807b
--- /dev/null
+++ b/docs/php-memcached/Documentation
@@ -0,0 +1,258 @@
+Ryan Gilfether <hotrodder@rocketmail.com>
+http://www.gilfether.com
+This module is Copyright (c) 2003 Ryan Gilfether.
+All rights reserved.
+
+You may distribute under the terms of the GNU General Public License
+This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.
+
+See the memcached website: http://www.danga.com/memcached/
+
+
+// Takes one parameter, a array of options. The most important key is
+// options["servers"], but that can also be set later with the set_servers()
+// method. The servers must be an array of hosts, each of which is
+// either a scalar of the form <10.0.0.10:11211> or an array of the
+// former and an integer weight value. (the default weight if
+// unspecified is 1.) It's recommended that weight values be kept as low
+// as possible, as this module currently allocates memory for bucket
+// distribution proportional to the total host weights.
+// $options["debug"] turns the debugging on if set to true
+MemCachedClient::MemCachedClient($options);
+
+// sets up the list of servers and the ports to connect to
+// takes an array of servers in the same format as in the constructor
+MemCachedClient::set_servers($servers);
+
+// Retrieves a key from the memcache. Returns the value (automatically
+// unserialized, if necessary) or FALSE if it fails.
+// The $key can optionally be an array, with the first element being the
+// hash value, if you want to avoid making this module calculate a hash
+// value. You may prefer, for example, to keep all of a given user's
+// objects on the same memcache server, so you could use the user's
+// unique id as the hash value.
+// Possible errors set are:
+// MC_ERR_GET
+MemCachedClient::get($key);
+
+// just like get(), but takes an array of keys, returns FALSE on error
+// Possible errors set are:
+// MC_ERR_NOT_ACTIVE
+MemCachedClient::get_multi($keys)
+
+// Unconditionally sets a key to a given value in the memcache. Returns true
+// if it was stored successfully.
+// The $key can optionally be an arrayref, with the first element being the
+// hash value, as described above.
+// returns TRUE on success else FALSE
+// Possible errors set are:
+// MC_ERR_NOT_ACTIVE
+// MC_ERR_GET_SOCK
+// MC_ERR_SOCKET_WRITE
+// MC_ERR_SOCKET_READ
+// MC_ERR_SET
+MemCachedClient::set($key, $value, $exptime);
+
+// Like set(), but only stores in memcache if the key doesn't already exist.
+// returns TRUE on success else FALSE
+// Possible errors set are:
+// MC_ERR_NOT_ACTIVE
+// MC_ERR_GET_SOCK
+// MC_ERR_SOCKET_WRITE
+// MC_ERR_SOCKET_READ
+// MC_ERR_SET
+MemCachedClient::add($key, $value, $exptime);
+
+// Like set(), but only stores in memcache if the key already exists.
+// returns TRUE on success else FALSE
+// Possible errors set are:
+// MC_ERR_NOT_ACTIVE
+// MC_ERR_GET_SOCK
+// MC_ERR_SOCKET_WRITE
+// MC_ERR_SOCKET_READ
+// MC_ERR_SET
+MemCachedClient::replace($key, $value, $exptime);
+
+// removes the key from the MemCache
+// $time is the amount of time in seconds (or Unix time) until which
+// the client wishes the server to refuse "add" and "replace" commands
+// with this key. For this amount of item, the item is put into a
+// delete queue, which means that it won't possible to retrieve it by
+// the "get" command, but "add" and "replace" command with this key
+// will also fail (the "set" command will succeed, however). After the
+// time passes, the item is finally deleted from server memory.
+// The parameter $time is optional, and, if absent, defaults to 0
+// (which means that the item will be deleted immediately and further
+// storage commands with this key will succeed).
+// returns TRUE on success else returns FALSE
+// Possible errors set are:
+// MC_ERR_NOT_ACTIVE
+// MC_ERR_GET_SOCK
+// MC_ERR_SOCKET_WRITE
+// MC_ERR_SOCKET_READ
+// MC_ERR_DELETE
+MemCachedClient::delete($key, $time = 0);
+
+// Sends a command to the server to atomically increment the value for
+// $key by $value, or by 1 if $value is undefined. Returns FALSE if $key
+// doesn't exist on server, otherwise it returns the new value after
+// incrementing. Value should be zero or greater. Overflow on server
+// is not checked. Be aware of values approaching 2**32. See decr.
+// Possible errors set are:
+// MC_ERR_NOT_ACTIVE
+// MC_ERR_GET_SOCK
+// MC_ERR_SOCKET_WRITE
+// MC_ERR_SOCKET_READ
+// returns new value on success, else returns FALSE
+// ONLY WORKS WITH NUMERIC VALUES
+MemCachedClient::incr($key[, $value]);
+
+// Like incr, but decrements. Unlike incr, underflow is checked and new
+// values are capped at 0. If server value is 1, a decrement of 2
+// returns 0, not -1.
+// Possible errors set are:
+// MC_ERR_NOT_ACTIVE
+// MC_ERR_GET_SOCK
+// MC_ERR_SOCKET_WRITE
+// MC_ERR_SOCKET_READ
+// returns new value on success, else returns FALSE
+// ONLY WORKS WITH NUMERIC VALUES
+MemCachedClient::decr($key[, $value]);
+
+// disconnects from all servers
+MemCachedClient::disconnect_all();
+
+// if $do_debug is set to true, will print out
+// debugging info, else debug is turned off
+MemCachedClient::set_debug($do_debug);
+
+// remove all cached hosts that are no longer good
+MemCachedClient::forget_dead_hosts();
+
+// When a function returns FALSE, an error code is set.
+// This funtion will return the error code.
+// See error_string()
+// returns last error code set
+MemCachedClient::error()
+
+// Returns a string describing the error set in error()
+// See error()
+// returns a string describing the error code given
+MemCachedClient::error_string()
+
+// Resets the error number and error string
+MemCachedClient::error_clear()
+
+Error codes are as follows:
+MC_ERR_NOT_ACTIVE // no active servers
+MC_ERR_SOCKET_WRITE // socket_write() failed
+MC_ERR_SOCKET_READ // socket_read() failed
+MC_ERR_SOCKET_CONNECT // failed to connect to host
+MC_ERR_DELETE // delete() did not recieve DELETED command
+MC_ERR_HOST_FORMAT // sock_to_host() invalid host format
+MC_ERR_HOST_DEAD // sock_to_host() host is dead
+MC_ERR_GET_SOCK // get_sock() failed to find a valid socket
+MC_ERR_SET // _set() failed to receive the STORED response
+MC_ERR_LOADITEM_HEADER // _load_items failed to receive valid data header
+MC_ERR_LOADITEM_END // _load_items failed to receive END response
+MC_ERR_LOADITEM_BYTES // _load_items bytes read larger than bytes available
+MC_ERR_GET // failed to get value associated with key
+
+// Turns compression on or off; 0=off, 1=on
+MemCacheClient::set_compression($setting)
+
+EXAMPLE:
+<?php
+require("MemCachedClient.inc.php");
+
+// set the servers, with the last one having an interger weight value of 3
+$options["servers"] = array("10.0.0.15:11000","10.0.0.16:11001",array("10.0.0.17:11002", 3));
+$options["debug"] = false;
+
+$memc = new MemCachedClient($options);
+
+
+/***********************
+ * STORE AN ARRAY
+ ***********************/
+$myarr = array("one","two", 3);
+$memc->set("key_one", $myarr);
+$val = $memc->get("key_one");
+print $val[0]."\n"; // prints 'one'
+print $val[1]."\n"; // prints 'two'
+print $val[2]."\n"; // prints 3
+
+
+print "\n";
+
+
+/***********************
+ * STORE A CLASS
+ ***********************/
+class tester
+{
+ var $one;
+ var $two;
+ var $three;
+}
+
+$t = new tester;
+$t->one = "one";
+$t->two = "two";
+$t->three = 3;
+$memc->set("key_two", $t);
+$val = $memc->get("key_two");
+print $val->one."\n";
+print $val->two."\n";
+print $val->three."\n";
+
+
+print "\n";
+
+
+/***********************
+ * STORE A STRING
+ ***********************/
+$memc->set("key_three", "my string");
+$val = $memc->get("key_three");
+print $val; // prints 'my string'
+
+$memc->delete("key_one");
+$memc->delete("key_two");
+$memc->delete("key_three");
+
+$memc->disconnect_all();
+
+
+
+print "\n";
+
+
+/***********************
+ * STORE A BINARY FILE
+ ***********************/
+
+ // first read the file and save it in memcache
+$fp = fopen( "./image.jpg", "rb" ) ;
+if ( !$fp )
+{
+ print "Could not open ./file.dat!\n" ;
+ exit ;
+}
+$data = fread( $fp, filesize( "./image.jpg" ) ) ;
+fclose( $fp ) ;
+print "Data length is " . strlen( $data ) . "\n" ;
+$memc->set( "key", $data ) ;
+
+// now open a file for writing and write the data
+// retrieved from memcache
+$fp = fopen("./test.jpg","wb");
+$data = $memc->get( "key" ) ;
+print "Data length is " . strlen( $data ) . "\n" ;
+fwrite($fp,$data,strlen( $data ));
+fclose($fp);
+
+
+?>
+
+
diff --git a/docs/schema.txt b/docs/schema.txt
new file mode 100644
index 00000000..f7348462
--- /dev/null
+++ b/docs/schema.txt
@@ -0,0 +1,6 @@
+The most up-to-date schema for the tables in the database
+will always be "tables.sql" in the maintenance directory,
+which is called from the installation script.
+
+That file has been commented with details of the usage for
+each table and field.
diff --git a/docs/skin.txt b/docs/skin.txt
new file mode 100644
index 00000000..82a5b72e
--- /dev/null
+++ b/docs/skin.txt
@@ -0,0 +1,48 @@
+
+skin.txt
+
+This document describes the overall architecture of MediaWiki's HTML rendering
+code as well as some history about the skin system. It is placed here rather
+than in comments in the code itself to help reduce the code size.
+
+== Version 1.4 ==
+
+MediaWiki still use the PHPTal skin system introduced in version 1.3 but some
+changes have been made to the file organisation.
+
+PHP class and PHPTal templates have been moved to /skins/ (respectivly from
+/includes/ and /templates/). This way skin designer and end user just stick to
+one directory.
+
+Two samples are provided to start with, one for PHPTal use (SkinPHPTal.sample)
+and one without (Skin.sample).
+
+
+== Version 1.3 ==
+
+The following might help a bit though.
+
+Firstly, there's Skin.php; this file will check various settings, and it
+contains a base class from which new skins can be derived.
+
+Before version 1.3, each skin had its own PHP file (with a sub-class to Skin)
+to generate the output. The files are:
+ * SkinCologneBlue.php
+ * SkinNostalgia.php
+ * SkinStandard.php
+ * SkinWikimediaWiki.php
+If you want to change those skins, you have to edit these PHP files.
+
+Since 1.3 a new special skin file is available: SkinPHPTal.php. It makes use of
+the PHPTal template engine and allows you to separate code and layout of the
+pages. The default 1.3 skin is MonoBook and it uses the SkinPHPTAL class.
+
+To change the layout, just edit the PHPTal template (templates/xhtml_slim.pt)
+as well as the stylesheets (stylesheets/monobook/*).
+
+
+== pre 1.3 version ==
+
+Unfortunately there isn't any documentation, and the code's in a bit of a mess
+right now during the transition from the old skin code to the new template-based
+skin code in 1.3.
diff --git a/docs/title.txt b/docs/title.txt
new file mode 100644
index 00000000..b404bd3c
--- /dev/null
+++ b/docs/title.txt
@@ -0,0 +1,72 @@
+title.txt
+
+The MediaWiki software's "Title" class represents article
+titles, which are used for many purposes: as the human-readable
+text title of the article, in the URL used to access the article,
+the wikitext link to the article, the key into the article
+database, and so on. The class in instantiated from one of
+these forms and can be queried for the others, and for other
+attributes of the title. This is intended to be an
+immutable "value" class, so there are no mutator functions.
+
+To get a new instance, call one of the static factory
+methods WikiTitle::newFromURL(), WikiTitle::newFromDBKey(),
+or WikiTitle::newFromText(). Once instantiated, the
+other non-static accessor methods can be used, such as
+getText(), getDBKey(), getNamespace(), etc.
+
+The prefix rules: a title consists of an optional Interwiki
+prefix (such as "m:" for meta or "de:" for German), followed
+by an optional namespace, followed by the remainder of the
+title. Both Interwiki prefixes and namespace prefixes have
+the same rules: they contain only letters, digits, space, and
+underscore, must start with a letter, are case insensitive,
+and spaces and underscores are interchangeable. Prefixes end
+with a ":". A prefix is only recognized if it is one of those
+specifically allowed by the software. For example, "de:name"
+is a link to the article "name" in the German Wikipedia, because
+"de" is recognized as one of the allowable interwikis. The
+title "talk:name" is a link to the article "name" in the "talk"
+namespace of the current wiki, because "talk" is a recognized
+namespace. Both may be present, and if so, the interwiki must
+come first, for example, "m:talk:name". If a title begins with
+a colon as its first character, no prefixes are scanned for,
+and the colon is just removed. Note that because of these
+rules, it is possible to have articles with colons in their
+names. "E. Coli 0157:H7" is a valid title, as is "2001: A Space
+Odyssey", because "E. Coli 0157" and "2001" are not valid
+interwikis or namespaces. Likewise, ":de:name" is a link to
+the article "de:name"--even though "de" is a valid interwiki,
+the initial colon stops all prefix matching.
+
+Character mapping rules: Once prefixes have been stripped, the
+rest of the title processed this way: spaces and underscores are
+treated as equivalent and each is converted to the other in the
+appropriate context (underscore in URL and database keys, spaces
+in plain text). "Extended" characters in the 0x80..0xFF range
+are allowed in all places, and are valid characters. They are
+encoded in URLs. Other characters may be ASCII letters, digits,
+hyphen, comma, period, apostrophe, parentheses, and colon. No
+other ASCII characters are allowed, and will be deleted if found
+(they will probably cause a browser to misinterpret the URL).
+Extended characters are _not_ urlencoded when used as text or
+database keys.
+
+Character encoding rules: TODO
+
+Canonical forms: the canonical form of a title will always be
+returned by the object. In this form, the first (and only the
+first) character of the namespace and title will be uppercased;
+the rest of the namespace will be lowercased, while the title
+will be left as is. The text form will use spaces, the URL and
+DBkey forms will use underscores. Interwiki prefixes are all
+lowercase. The namespace will use underscores when returned
+alone; it will use spaces only when attached to the text title.
+
+getArticleID() needs some explanation: for "internal" articles,
+it should return the "cur_id" field if the article exists, else
+it returns 0. For all external articles it returns 0. All of
+the IDs for all instances of Title created during a request are
+cached, so they can be looked up wuickly while rendering wiki
+text with lots of internal links.
+
diff --git a/docs/user.txt b/docs/user.txt
new file mode 100644
index 00000000..3f1c8202
--- /dev/null
+++ b/docs/user.txt
@@ -0,0 +1,63 @@
+
+user.txt
+
+Documenting the MediaWiki User object.
+
+(DISCLAIMER: The documentation is not guaranteed to be in sync with
+the code at all times. If in doubt, check the table definitions
+and User.php.)
+
+Database fields:
+
+ user_id
+ Unique integer identifier; primary key. Sent to user in
+ cookie "{$wgDBname}UserID".
+
+ user_name
+ Text of full user name; title of "user:" page. Displayed
+ on change lists, etc. Sent to user as cookie "{$wgDBname}UserName".
+ Note that user names can contain spaces, while these are
+ converted to underscores in page titles.
+
+ user_rights
+ Comma-separated list of rights. Right now, only "sysop",
+ "developer", "bureaucrat", and "bot" have meaning.
+
+ user_password
+ Salted md5 hash of md5-hashed user login password. If user option to
+ remember password is set, an md5 password hash is stored in cookie
+ "{$wgDBname}UserPassword". The original password and the hashed password
+ can be compared to the salted-hashed-hashed password.
+
+ user_newpassword
+ Hash for randomly generated password sent on 'send me a new password'.
+ If a match is made on login, the new password will replace the old one.
+
+ user_email
+ User's e-mail address. (Optional, used for user-to-user
+ e-mail and password recovery.)
+
+ user_options
+ A urlencoded string of name=value pairs to set various
+ user options.
+
+ user_touched
+ Timestamp updated when the user logs in, changes preferences, alters
+ watchlist, or when someone edits their user talk page or they clear
+ the new-talk field by viewing it. Used to invalidate old cached pages
+ from the user's browser cache.
+
+ user_real_name
+ "Real name" optionally used in some metadata lists.
+
+The user object encapsulates all of the settings, and clients
+classes use the getXXX() functions to access them. These functions
+do all the work of determining whether the user is logged in,
+whether the requested option can be satisfied from cookies or
+whether a database query is needed. Most of the settings needed
+for rendering normal pages are set in the cookie to minimize use
+of the database.
+
+Options
+ The user_options field is a list of name-value pairs. The
+ following option names are used at various points in the system:
diff --git a/extensions/.htaccess b/extensions/.htaccess
new file mode 100644
index 00000000..b63d4018
--- /dev/null
+++ b/extensions/.htaccess
@@ -0,0 +1 @@
+Deny from All
diff --git a/extensions/FunnyDot.php b/extensions/FunnyDot.php
new file mode 100644
index 00000000..81636bb4
--- /dev/null
+++ b/extensions/FunnyDot.php
@@ -0,0 +1,43 @@
+<?php
+
+if ( defined( 'MEDIAWIKI' ) ) {
+
+global $wgHooks;
+$wgHooks['ArticleSave'][] = 'checkAntiSpamHash';
+
+
+function checkAntiSpamHash()
+ {
+ global $wgAntiSpamHash, $wgAntiSpamTimeout, $wgAntiSpamWait;
+
+ $now = time();
+
+ if (!empty($_COOKIE['AntiSpamTime']) && !empty($_COOKIE['AntiSpamHash']))
+ {
+ $time = intval($_COOKIE['AntiSpamTime']);
+ $hash = $_COOKIE['AntiSpamHash'];
+
+ if ($hash != sha1($time.$wgAntiSpamHash))
+ {
+ return false;
+ }
+
+ if ($now - $time > $wgAntiSpamTimeout)
+ {
+ return false;
+ }
+ elseif ($now - $time < $wgAntiSpamWait)
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+} # End invocation guard
+?> \ No newline at end of file
diff --git a/extensions/LLAuthPlugin.php b/extensions/LLAuthPlugin.php
new file mode 100644
index 00000000..2a5d8bd3
--- /dev/null
+++ b/extensions/LLAuthPlugin.php
@@ -0,0 +1,264 @@
+<?php
+/**
+ * @package MediaWiki
+ */
+# Copyright (C) 2004 Brion Vibber <brion@pobox.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
+
+/**
+ * Authentication plugin interface. Instantiate a subclass of AuthPlugin
+ * and set $wgAuth to it to authenticate against some external tool.
+ *
+ * The default behavior is not to do anything, and use the local user
+ * database for all authentication. A subclass can require that all
+ * accounts authenticate externally, or use it only as a fallback; also
+ * you can transparently create internal wiki accounts the first time
+ * someone logs in who can be authenticated externally.
+ *
+ * This interface is new, and might change a bit before 1.4.0 final is
+ * done...
+ *
+ * @package MediaWiki
+ */
+class AuthPlugin {
+
+ private $dbLink = null;
+
+ function __construct()
+ {
+ global $wgDBuser, $wgDBpassword;
+ $this->dbLink = mysqli_connect('localhost', $wgDBuser, $wgDBpassword, 'current');
+ }
+
+ function __destruct()
+ {
+ mysqli_close($this->dbLink);
+ }
+
+ function getUserData($username)
+ {
+ $result = mysqli_query($this->dbLink, 'SELECT id, email, realname FROM users WHERE name = \''.mysqli_escape_string($this->dbLink, $username).'\'');
+ $data = mysqli_fetch_assoc($result);
+ mysqli_free_result($result);
+
+ return $data;
+ }
+ /**
+ * Check whether there exists a user account with the given name.
+ * The name will be normalized to MediaWiki's requirements, so
+ * you might need to munge it (for instance, for lowercase initial
+ * letters).
+ *
+ * @param $username String: username.
+ * @return bool
+ * @public
+ */
+ function userExists( $username ) {
+ $result = mysqli_query($this->dbLink, 'SELECT id FROM users WHERE name = \''.mysqli_escape_string($this->dbLink, $username).'\'');
+ $exists = mysqli_num_rows($result) > 0;
+ mysqli_free_result($result);
+
+ return $exists;
+ }
+
+ /**
+ * Check if a username+password pair is a valid login.
+ * The name will be normalized to MediaWiki's requirements, so
+ * you might need to munge it (for instance, for lowercase initial
+ * letters).
+ *
+ * @param $username String: username.
+ * @param $password String: user password.
+ * @return bool
+ * @public
+ */
+ function authenticate( $username, $password ) {
+ $result = mysqli_query($this->dbLink, 'SELECT id FROM users WHERE name = \''.mysqli_escape_string($this->dbLink, $username).'\' AND password = \''.mysqli_escape_string($this->dbLink, sha1($password)).'\' ');
+ $authenticated = mysqli_num_rows($result) > 0;
+ mysqli_free_result($result);
+
+ return $authenticated;
+ }
+
+ /**
+ * Modify options in the login template.
+ *
+ * @param $template UserLoginTemplate object.
+ * @public
+ */
+ function modifyUITemplate( &$template ) {
+ # Override this!
+ $template->set( 'usedomain', false );
+ $template->set('link', 'Um Dich hier anzumelden, nutze Deine Konto-Daten aus dem <a href="http://www.laber-land.de/?page=Forums;id=20">archlinux.de-Forum</a>.');
+ }
+
+ /**
+ * Set the domain this plugin is supposed to use when authenticating.
+ *
+ * @param $domain String: authentication domain.
+ * @public
+ */
+ function setDomain( $domain ) {
+ $this->domain = $domain;
+ }
+
+ /**
+ * Check to see if the specific domain is a valid domain.
+ *
+ * @param $domain String: authentication domain.
+ * @return bool
+ * @public
+ */
+ function validDomain( $domain ) {
+ # Override this!
+ return true;
+ }
+
+ /**
+ * When a user logs in, optionally fill in preferences and such.
+ * For instance, you might pull the email address or real name from the
+ * external user database.
+ *
+ * The User object is passed by reference so it can be modified; don't
+ * forget the & on your function declaration.
+ *
+ * @param User $user
+ * @public
+ */
+ function updateUser( &$user ) {
+ return $this->initUser($user);
+ }
+
+
+ /**
+ * Return true if the wiki should create a new local account automatically
+ * when asked to login a user who doesn't exist locally but does in the
+ * external auth database.
+ *
+ * If you don't automatically create accounts, you must still create
+ * accounts in some way. It's not possible to authenticate without
+ * a local account.
+ *
+ * This is just a question, and shouldn't perform any actions.
+ *
+ * @return bool
+ * @public
+ */
+ function autoCreate() {
+ return true;
+ }
+
+ /**
+ * Can users change their passwords?
+ *
+ * @return bool
+ */
+ function allowPasswordChange() {
+ return false;
+ }
+
+ /**
+ * Set the given password in the authentication database.
+ * Return true if successful.
+ *
+ * @param $password String: password.
+ * @return bool
+ * @public
+ */
+ function setPassword( $password ) {
+ return false;
+ }
+
+ /**
+ * Update user information in the external authentication database.
+ * Return true if successful.
+ *
+ * @param $user User object.
+ * @return bool
+ * @public
+ */
+ function updateExternalDB( $user ) {
+ return false;
+ }
+
+ /**
+ * Check to see if external accounts can be created.
+ * Return true if external accounts can be created.
+ * @return bool
+ * @public
+ */
+ function canCreateAccounts() {
+ return false;
+ }
+
+ /**
+ * Add a user to the external authentication database.
+ * Return true if successful.
+ *
+ * @param User $user
+ * @param string $password
+ * @return bool
+ * @public
+ */
+ function addUser( $user, $password ) {
+ return false;
+ }
+
+
+ /**
+ * Return true to prevent logins that don't authenticate here from being
+ * checked against the local database's password fields.
+ *
+ * This is just a question, and shouldn't perform any actions.
+ *
+ * @return bool
+ * @public
+ */
+ function strict() {
+ return true;
+ }
+
+ /**
+ * When creating a user account, optionally fill in preferences and such.
+ * For instance, you might pull the email address or real name from the
+ * external user database.
+ *
+ * The User object is passed by reference so it can be modified; don't
+ * forget the & on your function declaration.
+ *
+ * @param $user User object.
+ * @public
+ */
+ function initUser( &$user ) {
+ $data = $this->getUserData($user->getName());
+ $user->setEmail($data['email']);
+ $user->confirmEmail();
+ $user->setRealName($data['realname']);
+ return true;
+ }
+
+ /**
+ * If you want to munge the case of an account name before the final
+ * check, now is your chance.
+ */
+ function getCanonicalName( $username ) {
+ return $username;
+ }
+}
+
+?>
diff --git a/extensions/README b/extensions/README
new file mode 100644
index 00000000..cc931160
--- /dev/null
+++ b/extensions/README
@@ -0,0 +1,3 @@
+Some extensions (such as the hieroglyphic module WikiHiero) are
+distributed separately. Drop them into this extensions directory
+and enable as per the extension's directions.
diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 00000000..aff2d1a0
--- /dev/null
+++ b/favicon.ico
Binary files differ
diff --git a/images/README b/images/README
new file mode 100644
index 00000000..ca30bbcb
--- /dev/null
+++ b/images/README
@@ -0,0 +1,5 @@
+If uploads are enabled in the wiki, files will be put in subdirectories
+under here.
+
+Note to upgraders: as of MediaWiki 1.5, the images used in the user
+interface have been moved to skins/common/images.
diff --git a/img_auth.php b/img_auth.php
new file mode 100644
index 00000000..fb58ba28
--- /dev/null
+++ b/img_auth.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * Image download authorisation script
+ *
+ * To use, in LocalSettings.php set $wgUploadDirectory to point to a non-public
+ * directory, and $wgUploadPath to point to this file. Also set $wgWhitelistRead
+ * to an array of pages you want everyone to be able to access. Your server must
+ * support PATH_INFO, CGI-based configurations generally don't.
+ */
+# Valid web server entry point, enable includes
+define( 'MEDIAWIKI', true );
+
+if ( isset( $_REQUEST['GLOBALS'] ) ) {
+ echo '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>';
+ die( -1 );
+}
+
+require_once( 'includes/Defines.php' );
+require_once( './LocalSettings.php' );
+require_once( 'includes/Setup.php' );
+require_once( 'includes/StreamFile.php' );
+
+if( !isset( $_SERVER['PATH_INFO'] ) ) {
+ wfForbidden();
+}
+
+# Get filenames/directories
+$filename = realpath( $wgUploadDirectory . $_SERVER['PATH_INFO'] );
+$realUploadDirectory = realpath( $wgUploadDirectory );
+$imageName = $wgLang->getNsText( NS_IMAGE ) . ":" . basename( $_SERVER['PATH_INFO'] );
+
+# Check if the filename is in the correct directory
+if ( substr( $filename, 0, strlen( $realUploadDirectory ) ) != $realUploadDirectory ) {
+ wfForbidden();
+}
+
+if ( is_array( $wgWhitelistRead ) && !in_array( $imageName, $wgWhitelistRead ) && !$wgUser->getID() ) {
+ wfForbidden();
+}
+
+if( !file_exists( $filename ) ) {
+ wfForbidden();
+}
+if( is_dir( $filename ) ) {
+ wfForbidden();
+}
+
+# Write file
+wfStreamFile( $filename );
+
+function wfForbidden() {
+ header( 'HTTP/1.0 403 Forbidden' );
+ print
+"<html><body>
+<h1>Access denied</h1>
+<p>You need to log in to access files on this server</p>
+</body></html>";
+ exit;
+}
+
+?>
diff --git a/includes/.htaccess b/includes/.htaccess
new file mode 100644
index 00000000..3a428827
--- /dev/null
+++ b/includes/.htaccess
@@ -0,0 +1 @@
+Deny from all
diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php
new file mode 100644
index 00000000..2084c366
--- /dev/null
+++ b/includes/AjaxDispatcher.php
@@ -0,0 +1,83 @@
+<?php
+
+//$wgRequestTime = microtime();
+
+// unset( $IP );
+// @ini_set( 'allow_url_fopen', 0 ); # For security...
+
+# Valid web server entry point, enable includes.
+# Please don't move this line to includes/Defines.php. This line essentially defines
+# a valid entry point. If you put it in includes/Defines.php, then any script that includes
+# it becomes an entry point, thereby defeating its purpose.
+// define( 'MEDIAWIKI', true );
+// require_once( './includes/Defines.php' );
+// require_once( './LocalSettings.php' );
+// require_once( 'includes/Setup.php' );
+require_once( 'AjaxFunctions.php' );
+
+if ( ! $wgUseAjax ) {
+ die( 1 );
+}
+
+class AjaxDispatcher {
+ var $mode;
+ var $func_name;
+ var $args;
+
+ function AjaxDispatcher() {
+ global $wgAjaxCachePolicy;
+
+ wfProfileIn( 'AjaxDispatcher::AjaxDispatcher' );
+
+ $wgAjaxCachePolicy = new AjaxCachePolicy();
+
+ $this->mode = "";
+
+ if (! empty($_GET["rs"])) {
+ $this->mode = "get";
+ }
+
+ if (!empty($_POST["rs"])) {
+ $this->mode = "post";
+ }
+
+ if ($this->mode == "get") {
+ $this->func_name = $_GET["rs"];
+ if (! empty($_GET["rsargs"])) {
+ $this->args = $_GET["rsargs"];
+ } else {
+ $this->args = array();
+ }
+ } else {
+ $this->func_name = $_POST["rs"];
+ if (! empty($_POST["rsargs"])) {
+ $this->args = $_POST["rsargs"];
+ } else {
+ $this->args = array();
+ }
+ }
+ wfProfileOut( 'AjaxDispatcher::AjaxDispatcher' );
+ }
+
+ function performAction() {
+ global $wgAjaxCachePolicy, $wgAjaxExportList;
+ if ( empty( $this->mode ) ) {
+ return;
+ }
+ wfProfileIn( 'AjaxDispatcher::performAction' );
+
+ if (! in_array( $this->func_name, $wgAjaxExportList ) ) {
+ echo "-:{$this->func_name} not callable";
+ } else {
+ echo "+:";
+ $result = call_user_func_array($this->func_name, $this->args);
+ header( 'Content-Type: text/html; charset=utf-8', true );
+ $wgAjaxCachePolicy->writeHeader();
+ echo $result;
+ }
+ wfProfileOut( 'AjaxDispatcher::performAction' );
+ exit;
+ }
+}
+
+?>
diff --git a/includes/AjaxFunctions.php b/includes/AjaxFunctions.php
new file mode 100644
index 00000000..4387a607
--- /dev/null
+++ b/includes/AjaxFunctions.php
@@ -0,0 +1,157 @@
+<?php
+
+if( !defined( 'MEDIAWIKI' ) )
+ die( 1 );
+
+require_once('WebRequest.php');
+
+/**
+ * Function converts an Javascript escaped string back into a string with
+ * specified charset (default is UTF-8).
+ * Modified function from http://pure-essence.net/stuff/code/utf8RawUrlDecode.phps
+ *
+ * @param $source String escaped with Javascript's escape() function
+ * @param $iconv_to String destination character set will be used as second paramether in the iconv function. Default is UTF-8.
+ * @return string
+ */
+function js_unescape($source, $iconv_to = 'UTF-8') {
+ $decodedStr = '';
+ $pos = 0;
+ $len = strlen ($source);
+ while ($pos < $len) {
+ $charAt = substr ($source, $pos, 1);
+ if ($charAt == '%') {
+ $pos++;
+ $charAt = substr ($source, $pos, 1);
+ if ($charAt == 'u') {
+ // we got a unicode character
+ $pos++;
+ $unicodeHexVal = substr ($source, $pos, 4);
+ $unicode = hexdec ($unicodeHexVal);
+ $decodedStr .= code2utf($unicode);
+ $pos += 4;
+ }
+ else {
+ // we have an escaped ascii character
+ $hexVal = substr ($source, $pos, 2);
+ $decodedStr .= chr (hexdec ($hexVal));
+ $pos += 2;
+ }
+ }
+ else {
+ $decodedStr .= $charAt;
+ $pos++;
+ }
+ }
+
+ if ($iconv_to != "UTF-8") {
+ $decodedStr = iconv("UTF-8", $iconv_to, $decodedStr);
+ }
+
+ return $decodedStr;
+}
+
+/**
+ * Function coverts number of utf char into that character.
+ * Function taken from: http://sk2.php.net/manual/en/function.utf8-encode.php#49336
+ *
+ * @param $num Integer
+ * @return utf8char
+ */
+function code2utf($num){
+ if ( $num<128 )
+ return chr($num);
+ if ( $num<2048 )
+ return chr(($num>>6)+192).chr(($num&63)+128);
+ if ( $num<65536 )
+ return chr(($num>>12)+224).chr((($num>>6)&63)+128).chr(($num&63)+128);
+ if ( $num<2097152 )
+ return chr(($num>>18)+240).chr((($num>>12)&63)+128).chr((($num>>6)&63)+128) .chr(($num&63)+128);
+ return '';
+}
+
+class AjaxCachePolicy {
+ var $policy;
+
+ function AjaxCachePolicy( $policy = null ) {
+ $this->policy = $policy;
+ }
+
+ function setPolicy( $policy ) {
+ $this->policy = $policy;
+ }
+
+ function writeHeader() {
+ header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ if ( is_null( $this->policy ) ) {
+ // Bust cache in the head
+ header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
+ // always modified
+ header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+ header ("Pragma: no-cache"); // HTTP/1.0
+ } else {
+ header ("Expires: " . gmdate( "D, d M Y H:i:s", time() + $this->policy ) . " GMT");
+ header ("Cache-Control: s-max-age={$this->policy},public,max-age={$this->policy}");
+ }
+ }
+}
+
+
+function wfSajaxSearch( $term ) {
+ global $wgContLang, $wgAjaxCachePolicy, $wgOut;
+ $limit = 16;
+
+ $l = new Linker;
+
+ $term = str_replace( ' ', '_', $wgContLang->ucfirst(
+ $wgContLang->checkTitleEncoding( $wgContLang->recodeInput( js_unescape( $term ) ) )
+ ) );
+
+ if ( strlen( str_replace( '_', '', $term ) )<3 )
+ return;
+
+ $wgAjaxCachePolicy->setPolicy( 30*60 );
+
+ $db =& wfGetDB( DB_SLAVE );
+ $res = $db->select( 'page', 'page_title',
+ array( 'page_namespace' => 0,
+ "page_title LIKE '". $db->strencode( $term) ."%'" ),
+ "wfSajaxSearch",
+ array( 'LIMIT' => $limit+1 )
+ );
+
+ $r = "";
+
+ $i=0;
+ while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) {
+ $nt = Title::newFromDBkey( $row->page_title );
+ $r .= '<li>' . $l->makeKnownLinkObj( $nt ) . "</li>\n";
+ }
+ if ( $i > $limit ) {
+ $more = '<i>' . $l->makeKnownLink( $wgContLang->specialPage( "Allpages" ),
+ wfMsg('moredotdotdot'),
+ "namespace=0&from=" . wfUrlEncode ( $term ) ) .
+ '</i>';
+ } else {
+ $more = '';
+ }
+
+ $subtitlemsg = ( Title::newFromText($term) ? 'searchsubtitle' : 'searchsubtitleinvalid' );
+ $subtitle = $wgOut->parse( wfMsg( $subtitlemsg, wfEscapeWikiText($term) ) );
+
+ $term = htmlspecialchars( $term );
+ return '<div style="float:right; border:solid 1px black;background:gainsboro;padding:2px;"><a onclick="Searching_Hide_Results();">'
+ . wfMsg( 'hideresults' ) . '</a></div>'
+ . '<h1 class="firstHeading">'.wfMsg('search')
+ . '</h1><div id="contentSub">'. $subtitle . '</div><ul><li>'
+ . $l->makeKnownLink( $wgContLang->specialPage( 'Search' ),
+ wfMsg( 'searchcontaining', $term ),
+ "search=$term&fulltext=Search" )
+ . '</li><li>' . $l->makeKnownLink( $wgContLang->specialPage( 'Search' ),
+ wfMsg( 'searchnamed', $term ) ,
+ "search=$term&go=Go" )
+ . "</li></ul><h2>" . wfMsg( 'articletitles', $term ) . "</h2>"
+ . '<ul>' .$r .'</ul>'.$more;
+}
+
+?>
diff --git a/includes/Article.php b/includes/Article.php
new file mode 100644
index 00000000..b1e1f620
--- /dev/null
+++ b/includes/Article.php
@@ -0,0 +1,2575 @@
+<?php
+/**
+ * File for articles
+ * @package MediaWiki
+ */
+
+/**
+ * Need the CacheManager to be loaded
+ */
+require_once( 'CacheManager.php' );
+
+/**
+ * Class representing a MediaWiki article and history.
+ *
+ * See design.txt for an overview.
+ * Note: edit user interface and cache support functions have been
+ * moved to separate EditPage and CacheManager classes.
+ *
+ * @package MediaWiki
+ */
+class Article {
+ /**@{{
+ * @private
+ */
+ var $mComment; //!<
+ var $mContent; //!<
+ var $mContentLoaded; //!<
+ var $mCounter; //!<
+ var $mForUpdate; //!<
+ var $mGoodAdjustment; //!<
+ var $mLatest; //!<
+ var $mMinorEdit; //!<
+ var $mOldId; //!<
+ var $mRedirectedFrom; //!<
+ var $mRedirectUrl; //!<
+ var $mRevIdFetched; //!<
+ var $mRevision; //!<
+ var $mTimestamp; //!<
+ var $mTitle; //!<
+ var $mTotalAdjustment; //!<
+ var $mTouched; //!<
+ var $mUser; //!<
+ var $mUserText; //!<
+ /**@}}*/
+
+ /**
+ * Constructor and clear the article
+ * @param $title Reference to a Title object.
+ * @param $oldId Integer revision ID, null to fetch from request, zero for current
+ */
+ function Article( &$title, $oldId = null ) {
+ $this->mTitle =& $title;
+ $this->mOldId = $oldId;
+ $this->clear();
+ }
+
+ /**
+ * Tell the page view functions that this view was redirected
+ * from another page on the wiki.
+ * @param $from Title object.
+ */
+ function setRedirectedFrom( $from ) {
+ $this->mRedirectedFrom = $from;
+ }
+
+ /**
+ * @return mixed false, Title of in-wiki target, or string with URL
+ */
+ function followRedirect() {
+ $text = $this->getContent();
+ $rt = Title::newFromRedirect( $text );
+
+ # process if title object is valid and not special:userlogout
+ if( $rt ) {
+ if( $rt->getInterwiki() != '' ) {
+ if( $rt->isLocal() ) {
+ // Offsite wikis need an HTTP redirect.
+ //
+ // This can be hard to reverse and may produce loops,
+ // so they may be disabled in the site configuration.
+
+ $source = $this->mTitle->getFullURL( 'redirect=no' );
+ return $rt->getFullURL( 'rdfrom=' . urlencode( $source ) );
+ }
+ } else {
+ if( $rt->getNamespace() == NS_SPECIAL ) {
+ // Gotta hand redirects to special pages differently:
+ // Fill the HTTP response "Location" header and ignore
+ // the rest of the page we're on.
+ //
+ // This can be hard to reverse, so they may be disabled.
+
+ if( $rt->getNamespace() == NS_SPECIAL && $rt->getText() == 'Userlogout' ) {
+ // rolleyes
+ } else {
+ return $rt->getFullURL();
+ }
+ }
+ return $rt;
+ }
+ }
+
+ // No or invalid redirect
+ return false;
+ }
+
+ /**
+ * get the title object of the article
+ */
+ function getTitle() {
+ return $this->mTitle;
+ }
+
+ /**
+ * Clear the object
+ * @private
+ */
+ function clear() {
+ $this->mDataLoaded = false;
+ $this->mContentLoaded = false;
+
+ $this->mCurID = $this->mUser = $this->mCounter = -1; # Not loaded
+ $this->mRedirectedFrom = null; # Title object if set
+ $this->mUserText =
+ $this->mTimestamp = $this->mComment = '';
+ $this->mGoodAdjustment = $this->mTotalAdjustment = 0;
+ $this->mTouched = '19700101000000';
+ $this->mForUpdate = false;
+ $this->mIsRedirect = false;
+ $this->mRevIdFetched = 0;
+ $this->mRedirectUrl = false;
+ $this->mLatest = false;
+ }
+
+ /**
+ * Note that getContent/loadContent do not follow redirects anymore.
+ * If you need to fetch redirectable content easily, try
+ * the shortcut in Article::followContent()
+ * FIXME
+ * @todo There are still side-effects in this!
+ * In general, you should use the Revision class, not Article,
+ * to fetch text for purposes other than page views.
+ *
+ * @return Return the text of this revision
+ */
+ function getContent() {
+ global $wgRequest, $wgUser, $wgOut;
+
+ wfProfileIn( __METHOD__ );
+
+ if ( 0 == $this->getID() ) {
+ wfProfileOut( __METHOD__ );
+ $wgOut->setRobotpolicy( 'noindex,nofollow' );
+
+ if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
+ $ret = wfMsgWeirdKey ( $this->mTitle->getText() ) ;
+ } else {
+ $ret = wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' );
+ }
+
+ return "<div class='noarticletext'>$ret</div>";
+ } else {
+ $this->loadContent();
+ wfProfileOut( __METHOD__ );
+ return $this->mContent;
+ }
+ }
+
+ /**
+ * This function returns the text of a section, specified by a number ($section).
+ * A section is text under a heading like == Heading == or \<h1\>Heading\</h1\>, or
+ * the first section before any such heading (section 0).
+ *
+ * If a section contains subsections, these are also returned.
+ *
+ * @param $text String: text to look in
+ * @param $section Integer: section number
+ * @return string text of the requested section
+ * @deprecated
+ */
+ function getSection($text,$section) {
+ global $wgParser;
+ return $wgParser->getSection( $text, $section );
+ }
+
+ /**
+ * @return int The oldid of the article that is to be shown, 0 for the
+ * current revision
+ */
+ function getOldID() {
+ if ( is_null( $this->mOldId ) ) {
+ $this->mOldId = $this->getOldIDFromRequest();
+ }
+ return $this->mOldId;
+ }
+
+ /**
+ * Sets $this->mRedirectUrl to a correct URL if the query parameters are incorrect
+ *
+ * @return int The old id for the request
+ */
+ function getOldIDFromRequest() {
+ global $wgRequest;
+ $this->mRedirectUrl = false;
+ $oldid = $wgRequest->getVal( 'oldid' );
+ if ( isset( $oldid ) ) {
+ $oldid = intval( $oldid );
+ if ( $wgRequest->getVal( 'direction' ) == 'next' ) {
+ $nextid = $this->mTitle->getNextRevisionID( $oldid );
+ if ( $nextid ) {
+ $oldid = $nextid;
+ } else {
+ $this->mRedirectUrl = $this->mTitle->getFullURL( 'redirect=no' );
+ }
+ } elseif ( $wgRequest->getVal( 'direction' ) == 'prev' ) {
+ $previd = $this->mTitle->getPreviousRevisionID( $oldid );
+ if ( $previd ) {
+ $oldid = $previd;
+ } else {
+ # TODO
+ }
+ }
+ # unused:
+ # $lastid = $oldid;
+ }
+
+ if ( !$oldid ) {
+ $oldid = 0;
+ }
+ return $oldid;
+ }
+
+ /**
+ * Load the revision (including text) into this object
+ */
+ function loadContent() {
+ if ( $this->mContentLoaded ) return;
+
+ # Query variables :P
+ $oldid = $this->getOldID();
+
+ # Pre-fill content with error message so that if something
+ # fails we'll have something telling us what we intended.
+
+ $t = $this->mTitle->getPrefixedText();
+
+ $this->mOldId = $oldid;
+ $this->fetchContent( $oldid );
+ }
+
+
+ /**
+ * Fetch a page record with the given conditions
+ * @param Database $dbr
+ * @param array $conditions
+ * @private
+ */
+ function pageData( &$dbr, $conditions ) {
+ $fields = array(
+ 'page_id',
+ 'page_namespace',
+ 'page_title',
+ 'page_restrictions',
+ 'page_counter',
+ 'page_is_redirect',
+ 'page_is_new',
+ 'page_random',
+ 'page_touched',
+ 'page_latest',
+ 'page_len' ) ;
+ wfRunHooks( 'ArticlePageDataBefore', array( &$this , &$fields ) ) ;
+ $row = $dbr->selectRow( 'page',
+ $fields,
+ $conditions,
+ 'Article::pageData' );
+ wfRunHooks( 'ArticlePageDataAfter', array( &$this , &$row ) ) ;
+ return $row ;
+ }
+
+ /**
+ * @param Database $dbr
+ * @param Title $title
+ */
+ function pageDataFromTitle( &$dbr, $title ) {
+ return $this->pageData( $dbr, array(
+ 'page_namespace' => $title->getNamespace(),
+ 'page_title' => $title->getDBkey() ) );
+ }
+
+ /**
+ * @param Database $dbr
+ * @param int $id
+ */
+ function pageDataFromId( &$dbr, $id ) {
+ return $this->pageData( $dbr, array( 'page_id' => $id ) );
+ }
+
+ /**
+ * Set the general counter, title etc data loaded from
+ * some source.
+ *
+ * @param object $data
+ * @private
+ */
+ function loadPageData( $data = 'fromdb' ) {
+ if ( $data === 'fromdb' ) {
+ $dbr =& $this->getDB();
+ $data = $this->pageDataFromId( $dbr, $this->getId() );
+ }
+
+ $lc =& LinkCache::singleton();
+ if ( $data ) {
+ $lc->addGoodLinkObj( $data->page_id, $this->mTitle );
+
+ $this->mTitle->mArticleID = $data->page_id;
+ $this->mTitle->loadRestrictions( $data->page_restrictions );
+ $this->mTitle->mRestrictionsLoaded = true;
+
+ $this->mCounter = $data->page_counter;
+ $this->mTouched = wfTimestamp( TS_MW, $data->page_touched );
+ $this->mIsRedirect = $data->page_is_redirect;
+ $this->mLatest = $data->page_latest;
+ } else {
+ if ( is_object( $this->mTitle ) ) {
+ $lc->addBadLinkObj( $this->mTitle );
+ }
+ $this->mTitle->mArticleID = 0;
+ }
+
+ $this->mDataLoaded = true;
+ }
+
+ /**
+ * Get text of an article from database
+ * Does *NOT* follow redirects.
+ * @param int $oldid 0 for whatever the latest revision is
+ * @return string
+ */
+ function fetchContent( $oldid = 0 ) {
+ if ( $this->mContentLoaded ) {
+ return $this->mContent;
+ }
+
+ $dbr =& $this->getDB();
+
+ # Pre-fill content with error message so that if something
+ # fails we'll have something telling us what we intended.
+ $t = $this->mTitle->getPrefixedText();
+ if( $oldid ) {
+ $t .= ',oldid='.$oldid;
+ }
+ $this->mContent = wfMsg( 'missingarticle', $t ) ;
+
+ if( $oldid ) {
+ $revision = Revision::newFromId( $oldid );
+ if( is_null( $revision ) ) {
+ wfDebug( __METHOD__." failed to retrieve specified revision, id $oldid\n" );
+ return false;
+ }
+ $data = $this->pageDataFromId( $dbr, $revision->getPage() );
+ if( !$data ) {
+ wfDebug( __METHOD__." failed to get page data linked to revision id $oldid\n" );
+ return false;
+ }
+ $this->mTitle = Title::makeTitle( $data->page_namespace, $data->page_title );
+ $this->loadPageData( $data );
+ } else {
+ if( !$this->mDataLoaded ) {
+ $data = $this->pageDataFromTitle( $dbr, $this->mTitle );
+ if( !$data ) {
+ wfDebug( __METHOD__." failed to find page data for title " . $this->mTitle->getPrefixedText() . "\n" );
+ return false;
+ }
+ $this->loadPageData( $data );
+ }
+ $revision = Revision::newFromId( $this->mLatest );
+ if( is_null( $revision ) ) {
+ wfDebug( __METHOD__." failed to retrieve current page, rev_id {$data->page_latest}\n" );
+ return false;
+ }
+ }
+
+ // FIXME: Horrible, horrible! This content-loading interface just plain sucks.
+ // We should instead work with the Revision object when we need it...
+ $this->mContent = $revision->userCan( Revision::DELETED_TEXT ) ? $revision->getRawText() : "";
+ //$this->mContent = $revision->getText();
+
+ $this->mUser = $revision->getUser();
+ $this->mUserText = $revision->getUserText();
+ $this->mComment = $revision->getComment();
+ $this->mTimestamp = wfTimestamp( TS_MW, $revision->getTimestamp() );
+
+ $this->mRevIdFetched = $revision->getID();
+ $this->mContentLoaded = true;
+ $this->mRevision =& $revision;
+
+ wfRunHooks( 'ArticleAfterFetchContent', array( &$this, &$this->mContent ) ) ;
+
+ return $this->mContent;
+ }
+
+ /**
+ * Read/write accessor to select FOR UPDATE
+ *
+ * @param $x Mixed: FIXME
+ */
+ function forUpdate( $x = NULL ) {
+ return wfSetVar( $this->mForUpdate, $x );
+ }
+
+ /**
+ * Get the database which should be used for reads
+ *
+ * @return Database
+ */
+ function &getDB() {
+ $ret =& wfGetDB( DB_MASTER );
+ return $ret;
+ }
+
+ /**
+ * Get options for all SELECT statements
+ *
+ * @param $options Array: an optional options array which'll be appended to
+ * the default
+ * @return Array: options
+ */
+ function getSelectOptions( $options = '' ) {
+ if ( $this->mForUpdate ) {
+ if ( is_array( $options ) ) {
+ $options[] = 'FOR UPDATE';
+ } else {
+ $options = 'FOR UPDATE';
+ }
+ }
+ return $options;
+ }
+
+ /**
+ * @return int Page ID
+ */
+ function getID() {
+ if( $this->mTitle ) {
+ return $this->mTitle->getArticleID();
+ } else {
+ return 0;
+ }
+ }
+
+ /**
+ * @return bool Whether or not the page exists in the database
+ */
+ function exists() {
+ return $this->getId() != 0;
+ }
+
+ /**
+ * @return int The view count for the page
+ */
+ function getCount() {
+ if ( -1 == $this->mCounter ) {
+ $id = $this->getID();
+ if ( $id == 0 ) {
+ $this->mCounter = 0;
+ } else {
+ $dbr =& wfGetDB( DB_SLAVE );
+ $this->mCounter = $dbr->selectField( 'page', 'page_counter', array( 'page_id' => $id ),
+ 'Article::getCount', $this->getSelectOptions() );
+ }
+ }
+ return $this->mCounter;
+ }
+
+ /**
+ * Determine whether a page would be suitable for being counted as an
+ * article in the site_stats table based on the title & its content
+ *
+ * @param $text String: text to analyze
+ * @return bool
+ */
+ function isCountable( $text ) {
+ global $wgUseCommaCount, $wgContentNamespaces;
+
+ $token = $wgUseCommaCount ? ',' : '[[';
+ return
+ array_search( $this->mTitle->getNamespace(), $wgContentNamespaces ) !== false
+ && ! $this->isRedirect( $text )
+ && in_string( $token, $text );
+ }
+
+ /**
+ * Tests if the article text represents a redirect
+ *
+ * @param $text String: FIXME
+ * @return bool
+ */
+ function isRedirect( $text = false ) {
+ if ( $text === false ) {
+ $this->loadContent();
+ $titleObj = Title::newFromRedirect( $this->fetchContent() );
+ } else {
+ $titleObj = Title::newFromRedirect( $text );
+ }
+ return $titleObj !== NULL;
+ }
+
+ /**
+ * Returns true if the currently-referenced revision is the current edit
+ * to this page (and it exists).
+ * @return bool
+ */
+ function isCurrent() {
+ return $this->exists() &&
+ isset( $this->mRevision ) &&
+ $this->mRevision->isCurrent();
+ }
+
+ /**
+ * Loads everything except the text
+ * This isn't necessary for all uses, so it's only done if needed.
+ * @private
+ */
+ function loadLastEdit() {
+ if ( -1 != $this->mUser )
+ return;
+
+ # New or non-existent articles have no user information
+ $id = $this->getID();
+ if ( 0 == $id ) return;
+
+ $this->mLastRevision = Revision::loadFromPageId( $this->getDB(), $id );
+ if( !is_null( $this->mLastRevision ) ) {
+ $this->mUser = $this->mLastRevision->getUser();
+ $this->mUserText = $this->mLastRevision->getUserText();
+ $this->mTimestamp = $this->mLastRevision->getTimestamp();
+ $this->mComment = $this->mLastRevision->getComment();
+ $this->mMinorEdit = $this->mLastRevision->isMinor();
+ $this->mRevIdFetched = $this->mLastRevision->getID();
+ }
+ }
+
+ function getTimestamp() {
+ // Check if the field has been filled by ParserCache::get()
+ if ( !$this->mTimestamp ) {
+ $this->loadLastEdit();
+ }
+ return wfTimestamp(TS_MW, $this->mTimestamp);
+ }
+
+ function getUser() {
+ $this->loadLastEdit();
+ return $this->mUser;
+ }
+
+ function getUserText() {
+ $this->loadLastEdit();
+ return $this->mUserText;
+ }
+
+ function getComment() {
+ $this->loadLastEdit();
+ return $this->mComment;
+ }
+
+ function getMinorEdit() {
+ $this->loadLastEdit();
+ return $this->mMinorEdit;
+ }
+
+ function getRevIdFetched() {
+ $this->loadLastEdit();
+ return $this->mRevIdFetched;
+ }
+
+ /**
+ * @todo Document, fixme $offset never used.
+ * @param $limit Integer: default 0.
+ * @param $offset Integer: default 0.
+ */
+ function getContributors($limit = 0, $offset = 0) {
+ # XXX: this is expensive; cache this info somewhere.
+
+ $title = $this->mTitle;
+ $contribs = array();
+ $dbr =& wfGetDB( DB_SLAVE );
+ $revTable = $dbr->tableName( 'revision' );
+ $userTable = $dbr->tableName( 'user' );
+ $encDBkey = $dbr->addQuotes( $title->getDBkey() );
+ $ns = $title->getNamespace();
+ $user = $this->getUser();
+ $pageId = $this->getId();
+
+ $sql = "SELECT rev_user, rev_user_text, user_real_name, MAX(rev_timestamp) as timestamp
+ FROM $revTable LEFT JOIN $userTable ON rev_user = user_id
+ WHERE rev_page = $pageId
+ AND rev_user != $user
+ GROUP BY rev_user, rev_user_text, user_real_name
+ ORDER BY timestamp DESC";
+
+ if ($limit > 0) { $sql .= ' LIMIT '.$limit; }
+ $sql .= ' '. $this->getSelectOptions();
+
+ $res = $dbr->query($sql, __METHOD__);
+
+ while ( $line = $dbr->fetchObject( $res ) ) {
+ $contribs[] = array($line->rev_user, $line->rev_user_text, $line->user_real_name);
+ }
+
+ $dbr->freeResult($res);
+ return $contribs;
+ }
+
+ /**
+ * This is the default action of the script: just view the page of
+ * the given title.
+ */
+ function view() {
+ global $wgUser, $wgOut, $wgRequest, $wgContLang;
+ global $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol, $wgParser;
+ global $wgUseTrackbacks, $wgNamespaceRobotPolicies;
+ $sk = $wgUser->getSkin();
+
+ wfProfileIn( __METHOD__ );
+
+ $parserCache =& ParserCache::singleton();
+ $ns = $this->mTitle->getNamespace(); # shortcut
+
+ # Get variables from query string
+ $oldid = $this->getOldID();
+
+ # getOldID may want us to redirect somewhere else
+ if ( $this->mRedirectUrl ) {
+ $wgOut->redirect( $this->mRedirectUrl );
+ wfProfileOut( __METHOD__ );
+ return;
+ }
+
+ $diff = $wgRequest->getVal( 'diff' );
+ $rcid = $wgRequest->getVal( 'rcid' );
+ $rdfrom = $wgRequest->getVal( 'rdfrom' );
+
+ $wgOut->setArticleFlag( true );
+ if ( isset( $wgNamespaceRobotPolicies[$ns] ) ) {
+ $policy = $wgNamespaceRobotPolicies[$ns];
+ } else {
+ $policy = 'index,follow';
+ }
+ $wgOut->setRobotpolicy( $policy );
+
+ # If we got diff and oldid in the query, we want to see a
+ # diff page instead of the article.
+
+ if ( !is_null( $diff ) ) {
+ require_once( 'DifferenceEngine.php' );
+ $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
+
+ $de = new DifferenceEngine( $this->mTitle, $oldid, $diff, $rcid );
+ // DifferenceEngine directly fetched the revision:
+ $this->mRevIdFetched = $de->mNewid;
+ $de->showDiffPage();
+
+ if( $diff == 0 ) {
+ # Run view updates for current revision only
+ $this->viewUpdates();
+ }
+ wfProfileOut( __METHOD__ );
+ return;
+ }
+
+ if ( empty( $oldid ) && $this->checkTouched() ) {
+ $wgOut->setETag($parserCache->getETag($this, $wgUser));
+
+ if( $wgOut->checkLastModified( $this->mTouched ) ){
+ wfProfileOut( __METHOD__ );
+ return;
+ } else if ( $this->tryFileCache() ) {
+ # tell wgOut that output is taken care of
+ $wgOut->disable();
+ $this->viewUpdates();
+ wfProfileOut( __METHOD__ );
+ return;
+ }
+ }
+
+ # Should the parser cache be used?
+ $pcache = $wgEnableParserCache &&
+ intval( $wgUser->getOption( 'stubthreshold' ) ) == 0 &&
+ $this->exists() &&
+ empty( $oldid );
+ wfDebug( 'Article::view using parser cache: ' . ($pcache ? 'yes' : 'no' ) . "\n" );
+ if ( $wgUser->getOption( 'stubthreshold' ) ) {
+ wfIncrStats( 'pcache_miss_stub' );
+ }
+
+ $wasRedirected = false;
+ if ( isset( $this->mRedirectedFrom ) ) {
+ // This is an internally redirected page view.
+ // We'll need a backlink to the source page for navigation.
+ if ( wfRunHooks( 'ArticleViewRedirect', array( &$this ) ) ) {
+ $sk = $wgUser->getSkin();
+ $redir = $sk->makeKnownLinkObj( $this->mRedirectedFrom, '', 'redirect=no' );
+ $s = wfMsg( 'redirectedfrom', $redir );
+ $wgOut->setSubtitle( $s );
+ $wasRedirected = true;
+ }
+ } elseif ( !empty( $rdfrom ) ) {
+ // This is an externally redirected view, from some other wiki.
+ // If it was reported from a trusted site, supply a backlink.
+ global $wgRedirectSources;
+ if( $wgRedirectSources && preg_match( $wgRedirectSources, $rdfrom ) ) {
+ $sk = $wgUser->getSkin();
+ $redir = $sk->makeExternalLink( $rdfrom, $rdfrom );
+ $s = wfMsg( 'redirectedfrom', $redir );
+ $wgOut->setSubtitle( $s );
+ $wasRedirected = true;
+ }
+ }
+
+ $outputDone = false;
+ if ( $pcache ) {
+ if ( $wgOut->tryParserCache( $this, $wgUser ) ) {
+ $outputDone = true;
+ }
+ }
+ if ( !$outputDone ) {
+ $text = $this->getContent();
+ if ( $text === false ) {
+ # Failed to load, replace text with error message
+ $t = $this->mTitle->getPrefixedText();
+ if( $oldid ) {
+ $t .= ',oldid='.$oldid;
+ $text = wfMsg( 'missingarticle', $t );
+ } else {
+ $text = wfMsg( 'noarticletext', $t );
+ }
+ }
+
+ # Another whitelist check in case oldid is altering the title
+ if ( !$this->mTitle->userCanRead() ) {
+ $wgOut->loginToUse();
+ $wgOut->output();
+ exit;
+ }
+
+ # We're looking at an old revision
+
+ if ( !empty( $oldid ) ) {
+ $wgOut->setRobotpolicy( 'noindex,nofollow' );
+ if( is_null( $this->mRevision ) ) {
+ // FIXME: This would be a nice place to load the 'no such page' text.
+ } else {
+ $this->setOldSubtitle( isset($this->mOldId) ? $this->mOldId : $oldid );
+ if( $this->mRevision->isDeleted( Revision::DELETED_TEXT ) ) {
+ if( !$this->mRevision->userCan( Revision::DELETED_TEXT ) ) {
+ $wgOut->addWikiText( wfMsg( 'rev-deleted-text-permission' ) );
+ $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
+ return;
+ } else {
+ $wgOut->addWikiText( wfMsg( 'rev-deleted-text-view' ) );
+ // and we are allowed to see...
+ }
+ }
+ }
+
+ }
+ }
+ if( !$outputDone ) {
+ /**
+ * @fixme: this hook doesn't work most of the time, as it doesn't
+ * trigger when the parser cache is used.
+ */
+ wfRunHooks( 'ArticleViewHeader', array( &$this ) ) ;
+ $wgOut->setRevisionId( $this->getRevIdFetched() );
+ # wrap user css and user js in pre and don't parse
+ # XXX: use $this->mTitle->usCssJsSubpage() when php is fixed/ a workaround is found
+ if (
+ $ns == NS_USER &&
+ preg_match('/\\/[\\w]+\\.(css|js)$/', $this->mTitle->getDBkey())
+ ) {
+ $wgOut->addWikiText( wfMsg('clearyourcache'));
+ $wgOut->addHTML( '<pre>'.htmlspecialchars($this->mContent)."\n</pre>" );
+ } else if ( $rt = Title::newFromRedirect( $text ) ) {
+ # Display redirect
+ $imageDir = $wgContLang->isRTL() ? 'rtl' : 'ltr';
+ $imageUrl = $wgStylePath.'/common/images/redirect' . $imageDir . '.png';
+ # Don't overwrite the subtitle if this was an old revision
+ if( !$wasRedirected && $this->isCurrent() ) {
+ $wgOut->setSubtitle( wfMsgHtml( 'redirectpagesub' ) );
+ }
+ $targetUrl = $rt->escapeLocalURL();
+ # fixme unused $titleText :
+ $titleText = htmlspecialchars( $rt->getPrefixedText() );
+ $link = $sk->makeLinkObj( $rt );
+
+ $wgOut->addHTML( '<img src="'.$imageUrl.'" alt="#REDIRECT" />' .
+ '<span class="redirectText">'.$link.'</span>' );
+
+ $parseout = $wgParser->parse($text, $this->mTitle, ParserOptions::newFromUser($wgUser));
+ $wgOut->addParserOutputNoText( $parseout );
+ } else if ( $pcache ) {
+ # Display content and save to parser cache
+ $wgOut->addPrimaryWikiText( $text, $this );
+ } else {
+ # Display content, don't attempt to save to parser cache
+ # Don't show section-edit links on old revisions... this way lies madness.
+ if( !$this->isCurrent() ) {
+ $oldEditSectionSetting = $wgOut->mParserOptions->setEditSection( false );
+ }
+ # Display content and don't save to parser cache
+ $wgOut->addPrimaryWikiText( $text, $this, false );
+
+ if( !$this->isCurrent() ) {
+ $wgOut->mParserOptions->setEditSection( $oldEditSectionSetting );
+ }
+ }
+ }
+ /* title may have been set from the cache */
+ $t = $wgOut->getPageTitle();
+ if( empty( $t ) ) {
+ $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
+ }
+
+ # check if we're displaying a [[User talk:x.x.x.x]] anonymous talk page
+ if( $ns == NS_USER_TALK &&
+ User::isIP( $this->mTitle->getText() ) ) {
+ $wgOut->addWikiText( wfMsg('anontalkpagetext') );
+ }
+
+ # If we have been passed an &rcid= parameter, we want to give the user a
+ # chance to mark this new article as patrolled.
+ if ( $wgUseRCPatrol && !is_null( $rcid ) && $rcid != 0 && $wgUser->isAllowed( 'patrol' ) ) {
+ $wgOut->addHTML(
+ "<div class='patrollink'>" .
+ wfMsg ( 'markaspatrolledlink',
+ $sk->makeKnownLinkObj( $this->mTitle, wfMsg('markaspatrolledtext'), "action=markpatrolled&rcid=$rcid" )
+ ) .
+ '</div>'
+ );
+ }
+
+ # Trackbacks
+ if ($wgUseTrackbacks)
+ $this->addTrackbacks();
+
+ $this->viewUpdates();
+ wfProfileOut( __METHOD__ );
+ }
+
+ function addTrackbacks() {
+ global $wgOut, $wgUser;
+
+ $dbr =& wfGetDB(DB_SLAVE);
+ $tbs = $dbr->select(
+ /* FROM */ 'trackbacks',
+ /* SELECT */ array('tb_id', 'tb_title', 'tb_url', 'tb_ex', 'tb_name'),
+ /* WHERE */ array('tb_page' => $this->getID())
+ );
+
+ if (!$dbr->numrows($tbs))
+ return;
+
+ $tbtext = "";
+ while ($o = $dbr->fetchObject($tbs)) {
+ $rmvtxt = "";
+ if ($wgUser->isAllowed( 'trackback' )) {
+ $delurl = $this->mTitle->getFullURL("action=deletetrackback&tbid="
+ . $o->tb_id . "&token=" . $wgUser->editToken());
+ $rmvtxt = wfMsg('trackbackremove', $delurl);
+ }
+ $tbtext .= wfMsg(strlen($o->tb_ex) ? 'trackbackexcerpt' : 'trackback',
+ $o->tb_title,
+ $o->tb_url,
+ $o->tb_ex,
+ $o->tb_name,
+ $rmvtxt);
+ }
+ $wgOut->addWikitext(wfMsg('trackbackbox', $tbtext));
+ }
+
+ function deletetrackback() {
+ global $wgUser, $wgRequest, $wgOut, $wgTitle;
+
+ if (!$wgUser->matchEditToken($wgRequest->getVal('token'))) {
+ $wgOut->addWikitext(wfMsg('sessionfailure'));
+ return;
+ }
+
+ if ((!$wgUser->isAllowed('delete'))) {
+ $wgOut->sysopRequired();
+ return;
+ }
+
+ if (wfReadOnly()) {
+ $wgOut->readOnlyPage();
+ return;
+ }
+
+ $db =& wfGetDB(DB_MASTER);
+ $db->delete('trackbacks', array('tb_id' => $wgRequest->getInt('tbid')));
+ $wgTitle->invalidateCache();
+ $wgOut->addWikiText(wfMsg('trackbackdeleteok'));
+ }
+
+ function render() {
+ global $wgOut;
+
+ $wgOut->setArticleBodyOnly(true);
+ $this->view();
+ }
+
+ /**
+ * Handle action=purge
+ */
+ function purge() {
+ global $wgUser, $wgRequest, $wgOut;
+
+ if ( $wgUser->isLoggedIn() || $wgRequest->wasPosted() ) {
+ if( wfRunHooks( 'ArticlePurge', array( &$this ) ) ) {
+ $this->doPurge();
+ }
+ } else {
+ $msg = $wgOut->parse( wfMsg( 'confirm_purge' ) );
+ $action = $this->mTitle->escapeLocalURL( 'action=purge' );
+ $button = htmlspecialchars( wfMsg( 'confirm_purge_button' ) );
+ $msg = str_replace( '$1',
+ "<form method=\"post\" action=\"$action\">\n" .
+ "<input type=\"submit\" name=\"submit\" value=\"$button\" />\n" .
+ "</form>\n", $msg );
+
+ $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
+ $wgOut->setRobotpolicy( 'noindex,nofollow' );
+ $wgOut->addHTML( $msg );
+ }
+ }
+
+ /**
+ * Perform the actions of a page purging
+ */
+ function doPurge() {
+ global $wgUseSquid;
+ // Invalidate the cache
+ $this->mTitle->invalidateCache();
+
+ if ( $wgUseSquid ) {
+ // Commit the transaction before the purge is sent
+ $dbw = wfGetDB( DB_MASTER );
+ $dbw->immediateCommit();
+
+ // Send purge
+ $update = SquidUpdate::newSimplePurge( $this->mTitle );
+ $update->doUpdate();
+ }
+ $this->view();
+ }
+
+ /**
+ * Insert a new empty page record for this article.
+ * This *must* be followed up by creating a revision
+ * and running $this->updateToLatest( $rev_id );
+ * or else the record will be left in a funky state.
+ * Best if all done inside a transaction.
+ *
+ * @param Database $dbw
+ * @param string $restrictions
+ * @return int The newly created page_id key
+ * @private
+ */
+ function insertOn( &$dbw, $restrictions = '' ) {
+ wfProfileIn( __METHOD__ );
+
+ $page_id = $dbw->nextSequenceValue( 'page_page_id_seq' );
+ $dbw->insert( 'page', array(
+ 'page_id' => $page_id,
+ 'page_namespace' => $this->mTitle->getNamespace(),
+ 'page_title' => $this->mTitle->getDBkey(),
+ 'page_counter' => 0,
+ 'page_restrictions' => $restrictions,
+ 'page_is_redirect' => 0, # Will set this shortly...
+ 'page_is_new' => 1,
+ 'page_random' => wfRandom(),
+ 'page_touched' => $dbw->timestamp(),
+ 'page_latest' => 0, # Fill this in shortly...
+ 'page_len' => 0, # Fill this in shortly...
+ ), __METHOD__ );
+ $newid = $dbw->insertId();
+
+ $this->mTitle->resetArticleId( $newid );
+
+ wfProfileOut( __METHOD__ );
+ return $newid;
+ }
+
+ /**
+ * Update the page record to point to a newly saved revision.
+ *
+ * @param Database $dbw
+ * @param Revision $revision For ID number, and text used to set
+ length and redirect status fields
+ * @param int $lastRevision If given, will not overwrite the page field
+ * when different from the currently set value.
+ * Giving 0 indicates the new page flag should
+ * be set on.
+ * @return bool true on success, false on failure
+ * @private
+ */
+ function updateRevisionOn( &$dbw, $revision, $lastRevision = null ) {
+ wfProfileIn( __METHOD__ );
+
+ $conditions = array( 'page_id' => $this->getId() );
+ if( !is_null( $lastRevision ) ) {
+ # An extra check against threads stepping on each other
+ $conditions['page_latest'] = $lastRevision;
+ }
+
+ $text = $revision->getText();
+ $dbw->update( 'page',
+ array( /* SET */
+ 'page_latest' => $revision->getId(),
+ 'page_touched' => $dbw->timestamp(),
+ 'page_is_new' => ($lastRevision === 0) ? 1 : 0,
+ 'page_is_redirect' => Article::isRedirect( $text ) ? 1 : 0,
+ 'page_len' => strlen( $text ),
+ ),
+ $conditions,
+ __METHOD__ );
+
+ wfProfileOut( __METHOD__ );
+ return ( $dbw->affectedRows() != 0 );
+ }
+
+ /**
+ * If the given revision is newer than the currently set page_latest,
+ * update the page record. Otherwise, do nothing.
+ *
+ * @param Database $dbw
+ * @param Revision $revision
+ */
+ function updateIfNewerOn( &$dbw, $revision ) {
+ wfProfileIn( __METHOD__ );
+
+ $row = $dbw->selectRow(
+ array( 'revision', 'page' ),
+ array( 'rev_id', 'rev_timestamp' ),
+ array(
+ 'page_id' => $this->getId(),
+ 'page_latest=rev_id' ),
+ __METHOD__ );
+ if( $row ) {
+ if( wfTimestamp(TS_MW, $row->rev_timestamp) >= $revision->getTimestamp() ) {
+ wfProfileOut( __METHOD__ );
+ return false;
+ }
+ $prev = $row->rev_id;
+ } else {
+ # No or missing previous revision; mark the page as new
+ $prev = 0;
+ }
+
+ $ret = $this->updateRevisionOn( $dbw, $revision, $prev );
+ wfProfileOut( __METHOD__ );
+ return $ret;
+ }
+
+ /**
+ * @return string Complete article text, or null if error
+ */
+ function replaceSection($section, $text, $summary = '', $edittime = NULL) {
+ wfProfileIn( __METHOD__ );
+
+ if( $section == '' ) {
+ // Whole-page edit; let the text through unmolested.
+ } else {
+ if( is_null( $edittime ) ) {
+ $rev = Revision::newFromTitle( $this->mTitle );
+ } else {
+ $dbw =& wfGetDB( DB_MASTER );
+ $rev = Revision::loadFromTimestamp( $dbw, $this->mTitle, $edittime );
+ }
+ if( is_null( $rev ) ) {
+ wfDebug( "Article::replaceSection asked for bogus section (page: " .
+ $this->getId() . "; section: $section; edittime: $edittime)\n" );
+ return null;
+ }
+ $oldtext = $rev->getText();
+
+ if($section=='new') {
+ if($summary) $subject="== {$summary} ==\n\n";
+ $text=$oldtext."\n\n".$subject.$text;
+ } else {
+ global $wgParser;
+ $text = $wgParser->replaceSection( $oldtext, $section, $text );
+ }
+ }
+
+ wfProfileOut( __METHOD__ );
+ return $text;
+ }
+
+ /**
+ * @deprecated use Article::doEdit()
+ */
+ function insertNewArticle( $text, $summary, $isminor, $watchthis, $suppressRC=false, $comment=false ) {
+ $flags = EDIT_NEW | EDIT_DEFER_UPDATES |
+ ( $isminor ? EDIT_MINOR : 0 ) |
+ ( $suppressRC ? EDIT_SUPPRESS_RC : 0 );
+
+ # If this is a comment, add the summary as headline
+ if ( $comment && $summary != "" ) {
+ $text = "== {$summary} ==\n\n".$text;
+ }
+
+ $this->doEdit( $text, $summary, $flags );
+
+ $dbw =& wfGetDB( DB_MASTER );
+ if ($watchthis) {
+ if (!$this->mTitle->userIsWatching()) {
+ $dbw->begin();
+ $this->doWatch();
+ $dbw->commit();
+ }
+ } else {
+ if ( $this->mTitle->userIsWatching() ) {
+ $dbw->begin();
+ $this->doUnwatch();
+ $dbw->commit();
+ }
+ }
+ $this->doRedirect( $this->isRedirect( $text ) );
+ }
+
+ /**
+ * @deprecated use Article::doEdit()
+ */
+ function updateArticle( $text, $summary, $minor, $watchthis, $forceBot = false, $sectionanchor = '' ) {
+ $flags = EDIT_UPDATE | EDIT_DEFER_UPDATES |
+ ( $minor ? EDIT_MINOR : 0 ) |
+ ( $forceBot ? EDIT_FORCE_BOT : 0 );
+
+ $good = $this->doEdit( $text, $summary, $flags );
+ if ( $good ) {
+ $dbw =& wfGetDB( DB_MASTER );
+ if ($watchthis) {
+ if (!$this->mTitle->userIsWatching()) {
+ $dbw->begin();
+ $this->doWatch();
+ $dbw->commit();
+ }
+ } else {
+ if ( $this->mTitle->userIsWatching() ) {
+ $dbw->begin();
+ $this->doUnwatch();
+ $dbw->commit();
+ }
+ }
+
+ $this->doRedirect( $this->isRedirect( $text ), $sectionanchor );
+ }
+ return $good;
+ }
+
+ /**
+ * Article::doEdit()
+ *
+ * Change an existing article or create a new article. Updates RC and all necessary caches,
+ * optionally via the deferred update array.
+ *
+ * $wgUser must be set before calling this function.
+ *
+ * @param string $text New text
+ * @param string $summary Edit summary
+ * @param integer $flags bitfield:
+ * EDIT_NEW
+ * Article is known or assumed to be non-existent, create a new one
+ * EDIT_UPDATE
+ * Article is known or assumed to be pre-existing, update it
+ * EDIT_MINOR
+ * Mark this edit minor, if the user is allowed to do so
+ * EDIT_SUPPRESS_RC
+ * Do not log the change in recentchanges
+ * EDIT_FORCE_BOT
+ * Mark the edit a "bot" edit regardless of user rights
+ * EDIT_DEFER_UPDATES
+ * Defer some of the updates until the end of index.php
+ *
+ * If neither EDIT_NEW nor EDIT_UPDATE is specified, the status of the article will be detected.
+ * If EDIT_UPDATE is specified and the article doesn't exist, the function will return false. If
+ * EDIT_NEW is specified and the article does exist, a duplicate key error will cause an exception
+ * to be thrown from the Database. These two conditions are also possible with auto-detection due
+ * to MediaWiki's performance-optimised locking strategy.
+ *
+ * @return bool success
+ */
+ function doEdit( $text, $summary, $flags = 0 ) {
+ global $wgUser, $wgDBtransactions;
+
+ wfProfileIn( __METHOD__ );
+ $good = true;
+
+ if ( !($flags & EDIT_NEW) && !($flags & EDIT_UPDATE) ) {
+ $aid = $this->mTitle->getArticleID( GAID_FOR_UPDATE );
+ if ( $aid ) {
+ $flags |= EDIT_UPDATE;
+ } else {
+ $flags |= EDIT_NEW;
+ }
+ }
+
+ if( !wfRunHooks( 'ArticleSave', array( &$this, &$wgUser, &$text,
+ &$summary, $flags & EDIT_MINOR,
+ null, null, &$flags ) ) )
+ {
+ wfDebug( __METHOD__ . ": ArticleSave hook aborted save!\n" );
+ wfProfileOut( __METHOD__ );
+ return false;
+ }
+
+ # Silently ignore EDIT_MINOR if not allowed
+ $isminor = ( $flags & EDIT_MINOR ) && $wgUser->isAllowed('minoredit');
+ $bot = $wgUser->isBot() || ( $flags & EDIT_FORCE_BOT );
+
+ $text = $this->preSaveTransform( $text );
+
+ $dbw =& wfGetDB( DB_MASTER );
+ $now = wfTimestampNow();
+
+ if ( $flags & EDIT_UPDATE ) {
+ # Update article, but only if changed.
+
+ # Make sure the revision is either completely inserted or not inserted at all
+ if( !$wgDBtransactions ) {
+ $userAbort = ignore_user_abort( true );
+ }
+
+ $oldtext = $this->getContent();
+ $oldsize = strlen( $oldtext );
+ $newsize = strlen( $text );
+ $lastRevision = 0;
+ $revisionId = 0;
+
+ if ( 0 != strcmp( $text, $oldtext ) ) {
+ $this->mGoodAdjustment = (int)$this->isCountable( $text )
+ - (int)$this->isCountable( $oldtext );
+ $this->mTotalAdjustment = 0;
+
+ $lastRevision = $dbw->selectField(
+ 'page', 'page_latest', array( 'page_id' => $this->getId() ) );
+
+ if ( !$lastRevision ) {
+ # Article gone missing
+ wfDebug( __METHOD__.": EDIT_UPDATE specified but article doesn't exist\n" );
+ wfProfileOut( __METHOD__ );
+ return false;
+ }
+
+ $revision = new Revision( array(
+ 'page' => $this->getId(),
+ 'comment' => $summary,
+ 'minor_edit' => $isminor,
+ 'text' => $text
+ ) );
+
+ $dbw->begin();
+ $revisionId = $revision->insertOn( $dbw );
+
+ # Update page
+ $ok = $this->updateRevisionOn( $dbw, $revision, $lastRevision );
+
+ if( !$ok ) {
+ /* Belated edit conflict! Run away!! */
+ $good = false;
+ $dbw->rollback();
+ } else {
+ # Update recentchanges
+ if( !( $flags & EDIT_SUPPRESS_RC ) ) {
+ $rcid = RecentChange::notifyEdit( $now, $this->mTitle, $isminor, $wgUser, $summary,
+ $lastRevision, $this->getTimestamp(), $bot, '', $oldsize, $newsize,
+ $revisionId );
+
+ # Mark as patrolled if the user can do so and has it set in their options
+ if( $wgUser->isAllowed( 'patrol' ) && $wgUser->getOption( 'autopatrol' ) ) {
+ RecentChange::markPatrolled( $rcid );
+ }
+ }
+ $dbw->commit();
+ }
+ } else {
+ // Keep the same revision ID, but do some updates on it
+ $revisionId = $this->getRevIdFetched();
+ // Update page_touched, this is usually implicit in the page update
+ // Other cache updates are done in onArticleEdit()
+ $this->mTitle->invalidateCache();
+ }
+
+ if( !$wgDBtransactions ) {
+ ignore_user_abort( $userAbort );
+ }
+
+ if ( $good ) {
+ # Invalidate cache of this article and all pages using this article
+ # as a template. Partly deferred.
+ Article::onArticleEdit( $this->mTitle );
+
+ # Update links tables, site stats, etc.
+ $changed = ( strcmp( $oldtext, $text ) != 0 );
+ $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, $changed );
+ }
+ } else {
+ # Create new article
+
+ # Set statistics members
+ # We work out if it's countable after PST to avoid counter drift
+ # when articles are created with {{subst:}}
+ $this->mGoodAdjustment = (int)$this->isCountable( $text );
+ $this->mTotalAdjustment = 1;
+
+ $dbw->begin();
+
+ # Add the page record; stake our claim on this title!
+ # This will fail with a database query exception if the article already exists
+ $newid = $this->insertOn( $dbw );
+
+ # Save the revision text...
+ $revision = new Revision( array(
+ 'page' => $newid,
+ 'comment' => $summary,
+ 'minor_edit' => $isminor,
+ 'text' => $text
+ ) );
+ $revisionId = $revision->insertOn( $dbw );
+
+ $this->mTitle->resetArticleID( $newid );
+
+ # Update the page record with revision data
+ $this->updateRevisionOn( $dbw, $revision, 0 );
+
+ if( !( $flags & EDIT_SUPPRESS_RC ) ) {
+ $rcid = RecentChange::notifyNew( $now, $this->mTitle, $isminor, $wgUser, $summary, $bot,
+ '', strlen( $text ), $revisionId );
+ # Mark as patrolled if the user can and has the option set
+ if( $wgUser->isAllowed( 'patrol' ) && $wgUser->getOption( 'autopatrol' ) ) {
+ RecentChange::markPatrolled( $rcid );
+ }
+ }
+ $dbw->commit();
+
+ # Update links, etc.
+ $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, true );
+
+ # Clear caches
+ Article::onArticleCreate( $this->mTitle );
+
+ wfRunHooks( 'ArticleInsertComplete', array( &$this, &$wgUser, $text,
+ $summary, $flags & EDIT_MINOR,
+ null, null, &$flags ) );
+ }
+
+ if ( $good && !( $flags & EDIT_DEFER_UPDATES ) ) {
+ wfDoUpdates();
+ }
+
+ wfRunHooks( 'ArticleSaveComplete',
+ array( &$this, &$wgUser, $text,
+ $summary, $flags & EDIT_MINOR,
+ null, null, &$flags ) );
+
+ wfProfileOut( __METHOD__ );
+ return $good;
+ }
+
+ /**
+ * @deprecated wrapper for doRedirect
+ */
+ function showArticle( $text, $subtitle , $sectionanchor = '', $me2, $now, $summary, $oldid ) {
+ $this->doRedirect( $this->isRedirect( $text ), $sectionanchor );
+ }
+
+ /**
+ * Output a redirect back to the article.
+ * This is typically used after an edit.
+ *
+ * @param boolean $noRedir Add redirect=no
+ * @param string $sectionAnchor section to redirect to, including "#"
+ */
+ function doRedirect( $noRedir = false, $sectionAnchor = '' ) {
+ global $wgOut;
+ if ( $noRedir ) {
+ $query = 'redirect=no';
+ } else {
+ $query = '';
+ }
+ $wgOut->redirect( $this->mTitle->getFullURL( $query ) . $sectionAnchor );
+ }
+
+ /**
+ * Mark this particular edit as patrolled
+ */
+ function markpatrolled() {
+ global $wgOut, $wgRequest, $wgUseRCPatrol, $wgUser;
+ $wgOut->setRobotpolicy( 'noindex,nofollow' );
+
+ # Check RC patrol config. option
+ if( !$wgUseRCPatrol ) {
+ $wgOut->errorPage( 'rcpatroldisabled', 'rcpatroldisabledtext' );
+ return;
+ }
+
+ # Check permissions
+ if( !$wgUser->isAllowed( 'patrol' ) ) {
+ $wgOut->permissionRequired( 'patrol' );
+ return;
+ }
+
+ $rcid = $wgRequest->getVal( 'rcid' );
+ if ( !is_null ( $rcid ) ) {
+ if( wfRunHooks( 'MarkPatrolled', array( &$rcid, &$wgUser, false ) ) ) {
+ RecentChange::markPatrolled( $rcid );
+ wfRunHooks( 'MarkPatrolledComplete', array( &$rcid, &$wgUser, false ) );
+ $wgOut->setPagetitle( wfMsg( 'markedaspatrolled' ) );
+ $wgOut->addWikiText( wfMsg( 'markedaspatrolledtext' ) );
+ }
+ $rcTitle = Title::makeTitle( NS_SPECIAL, 'Recentchanges' );
+ $wgOut->returnToMain( false, $rcTitle->getPrefixedText() );
+ }
+ else {
+ $wgOut->showErrorPage( 'markedaspatrollederror', 'markedaspatrollederrortext' );
+ }
+ }
+
+ /**
+ * User-interface handler for the "watch" action
+ */
+
+ function watch() {
+
+ global $wgUser, $wgOut;
+
+ if ( $wgUser->isAnon() ) {
+ $wgOut->showErrorPage( 'watchnologin', 'watchnologintext' );
+ return;
+ }
+ if ( wfReadOnly() ) {
+ $wgOut->readOnlyPage();
+ return;
+ }
+
+ if( $this->doWatch() ) {
+ $wgOut->setPagetitle( wfMsg( 'addedwatch' ) );
+ $wgOut->setRobotpolicy( 'noindex,nofollow' );
+
+ $link = $this->mTitle->getPrefixedText();
+ $text = wfMsg( 'addedwatchtext', $link );
+ $wgOut->addWikiText( $text );
+ }
+
+ $wgOut->returnToMain( true, $this->mTitle->getPrefixedText() );
+ }
+
+ /**
+ * Add this page to $wgUser's watchlist
+ * @return bool true on successful watch operation
+ */
+ function doWatch() {
+ global $wgUser;
+ if( $wgUser->isAnon() ) {
+ return false;
+ }
+
+ if (wfRunHooks('WatchArticle', array(&$wgUser, &$this))) {
+ $wgUser->addWatch( $this->mTitle );
+ $wgUser->saveSettings();
+
+ return wfRunHooks('WatchArticleComplete', array(&$wgUser, &$this));
+ }
+
+ return false;
+ }
+
+ /**
+ * User interface handler for the "unwatch" action.
+ */
+ function unwatch() {
+
+ global $wgUser, $wgOut;
+
+ if ( $wgUser->isAnon() ) {
+ $wgOut->showErrorPage( 'watchnologin', 'watchnologintext' );
+ return;
+ }
+ if ( wfReadOnly() ) {
+ $wgOut->readOnlyPage();
+ return;
+ }
+
+ if( $this->doUnwatch() ) {
+ $wgOut->setPagetitle( wfMsg( 'removedwatch' ) );
+ $wgOut->setRobotpolicy( 'noindex,nofollow' );
+
+ $link = $this->mTitle->getPrefixedText();
+ $text = wfMsg( 'removedwatchtext', $link );
+ $wgOut->addWikiText( $text );
+ }
+
+ $wgOut->returnToMain( true, $this->mTitle->getPrefixedText() );
+ }
+
+ /**
+ * Stop watching a page
+ * @return bool true on successful unwatch
+ */
+ function doUnwatch() {
+ global $wgUser;
+ if( $wgUser->isAnon() ) {
+ return false;
+ }
+
+ if (wfRunHooks('UnwatchArticle', array(&$wgUser, &$this))) {
+ $wgUser->removeWatch( $this->mTitle );
+ $wgUser->saveSettings();
+
+ return wfRunHooks('UnwatchArticleComplete', array(&$wgUser, &$this));
+ }
+
+ return false;
+ }
+
+ /**
+ * action=protect handler
+ */
+ function protect() {
+ require_once 'ProtectionForm.php';
+ $form = new ProtectionForm( $this );
+ $form->show();
+ }
+
+ /**
+ * action=unprotect handler (alias)
+ */
+ function unprotect() {
+ $this->protect();
+ }
+
+ /**
+ * Update the article's restriction field, and leave a log entry.
+ *
+ * @param array $limit set of restriction keys
+ * @param string $reason
+ * @return bool true on success
+ */
+ function updateRestrictions( $limit = array(), $reason = '' ) {
+ global $wgUser, $wgRestrictionTypes, $wgContLang;
+
+ $id = $this->mTitle->getArticleID();
+ if( !$wgUser->isAllowed( 'protect' ) || wfReadOnly() || $id == 0 ) {
+ return false;
+ }
+
+ # FIXME: Same limitations as described in ProtectionForm.php (line 37);
+ # we expect a single selection, but the schema allows otherwise.
+ $current = array();
+ foreach( $wgRestrictionTypes as $action )
+ $current[$action] = implode( '', $this->mTitle->getRestrictions( $action ) );
+
+ $current = Article::flattenRestrictions( $current );
+ $updated = Article::flattenRestrictions( $limit );
+
+ $changed = ( $current != $updated );
+ $protect = ( $updated != '' );
+
+ # If nothing's changed, do nothing
+ if( $changed ) {
+ if( wfRunHooks( 'ArticleProtect', array( &$this, &$wgUser, $limit, $reason ) ) ) {
+
+ $dbw =& wfGetDB( DB_MASTER );
+
+ # Prepare a null revision to be added to the history
+ $comment = $wgContLang->ucfirst( wfMsgForContent( $protect ? 'protectedarticle' : 'unprotectedarticle', $this->mTitle->getPrefixedText() ) );
+ if( $reason )
+ $comment .= ": $reason";
+ if( $protect )
+ $comment .= " [$updated]";
+ $nullRevision = Revision::newNullRevision( $dbw, $id, $comment, true );
+ $nullRevId = $nullRevision->insertOn( $dbw );
+
+ # Update page record
+ $dbw->update( 'page',
+ array( /* SET */
+ 'page_touched' => $dbw->timestamp(),
+ 'page_restrictions' => $updated,
+ 'page_latest' => $nullRevId
+ ), array( /* WHERE */
+ 'page_id' => $id
+ ), 'Article::protect'
+ );
+ wfRunHooks( 'ArticleProtectComplete', array( &$this, &$wgUser, $limit, $reason ) );
+
+ # Update the protection log
+ $log = new LogPage( 'protect' );
+ if( $protect ) {
+ $log->addEntry( 'protect', $this->mTitle, trim( $reason . " [$updated]" ) );
+ } else {
+ $log->addEntry( 'unprotect', $this->mTitle, $reason );
+ }
+
+ } # End hook
+ } # End "changed" check
+
+ return true;
+ }
+
+ /**
+ * Take an array of page restrictions and flatten it to a string
+ * suitable for insertion into the page_restrictions field.
+ * @param array $limit
+ * @return string
+ * @private
+ */
+ function flattenRestrictions( $limit ) {
+ if( !is_array( $limit ) ) {
+ throw new MWException( 'Article::flattenRestrictions given non-array restriction set' );
+ }
+ $bits = array();
+ ksort( $limit );
+ foreach( $limit as $action => $restrictions ) {
+ if( $restrictions != '' ) {
+ $bits[] = "$action=$restrictions";
+ }
+ }
+ return implode( ':', $bits );
+ }
+
+ /*
+ * UI entry point for page deletion
+ */
+ function delete() {
+ global $wgUser, $wgOut, $wgRequest;
+ $confirm = $wgRequest->wasPosted() &&
+ $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
+ $reason = $wgRequest->getText( 'wpReason' );
+
+ # This code desperately needs to be totally rewritten
+
+ # Check permissions
+ if( $wgUser->isAllowed( 'delete' ) ) {
+ if( $wgUser->isBlocked() ) {
+ $wgOut->blockedPage();
+ return;
+ }
+ } else {
+ $wgOut->permissionRequired