Merge "Documentation improvements in includes/actions"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 12 Mar 2013 15:11:12 +0000 (15:11 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 12 Mar 2013 15:11:12 +0000 (15:11 +0000)
551 files changed:
HISTORY
RELEASE-NOTES-1.21
UPGRADE
api.php
api.php5
docs/hooks.txt
docs/maintenance.txt
docs/memcached.txt
img_auth.php5
includes/Action.php
includes/ArrayUtils.php
includes/Article.php
includes/AuthPlugin.php
includes/AutoLoader.php
includes/Autopromote.php
includes/Block.php
includes/Category.php
includes/CategoryPage.php
includes/CategoryViewer.php
includes/Categoryfinder.php
includes/Cdb.php
includes/ChangeTags.php
includes/ChangesFeed.php
includes/ChangesList.php
includes/Collation.php
includes/ConfEditor.php
includes/Cookie.php
includes/CryptRand.php
includes/DataUpdate.php
includes/DefaultSettings.php
includes/DeferredUpdates.php
includes/Defines.php
includes/EditPage.php
includes/Exception.php
includes/Export.php
includes/ExternalEdit.php
includes/ExternalUser.php
includes/Fallback.php
includes/Feed.php
includes/FeedUtils.php
includes/FileDeleteForm.php
includes/FormOptions.php
includes/GitInfo.php
includes/GlobalFunctions.php
includes/HTMLForm.php
includes/HistoryBlob.php
includes/Hooks.php
includes/Html.php
includes/HttpFunctions.php
includes/IP.php
includes/ImageGallery.php
includes/ImagePage.php
includes/Import.php
includes/Init.php
includes/Licenses.php
includes/LinkFilter.php
includes/Linker.php
includes/LinksUpdate.php
includes/MagicWord.php
includes/MappedIterator.php [new file with mode: 0644]
includes/Message.php
includes/MessageBlobStore.php
includes/MimeMagic.php
includes/Namespace.php
includes/OutputPage.php
includes/PHPVersionError.php
includes/Pager.php
includes/PathRouter.php
includes/PoolCounter.php
includes/Preferences.php
includes/PrefixSearch.php
includes/ProtectionForm.php
includes/QueryPage.php
includes/RecentChange.php
includes/Revision.php
includes/Sanitizer.php
includes/Setup.php
includes/SiteConfiguration.php
includes/SiteStats.php
includes/Skin.php
includes/SkinLegacy.php
includes/SkinTemplate.php
includes/SpecialPage.php
includes/SpecialPageFactory.php
includes/Status.php
includes/StreamFile.php
includes/StringUtils.php
includes/StubObject.php
includes/Timestamp.php
includes/Title.php
includes/UIDGenerator.php
includes/User.php
includes/UserMailer.php
includes/UserRightsProxy.php
includes/WatchedItem.php
includes/WebRequest.php
includes/WebResponse.php
includes/Wiki.php
includes/WikiError.php
includes/WikiMap.php
includes/WikiPage.php
includes/Xml.php
includes/XmlTypeCheck.php
includes/ZhClient.php
includes/ZipDirectoryReader.php
includes/actions/CreditsAction.php
includes/actions/HistoryAction.php
includes/actions/InfoAction.php
includes/api/ApiBase.php
includes/api/ApiBlock.php
includes/api/ApiCreateAccount.php
includes/api/ApiDelete.php
includes/api/ApiEditPage.php
includes/api/ApiFeedWatchlist.php
includes/api/ApiFormatBase.php
includes/api/ApiFormatJson.php
includes/api/ApiImageRotate.php [new file with mode: 0644]
includes/api/ApiLogin.php
includes/api/ApiMain.php
includes/api/ApiModuleManager.php
includes/api/ApiOptions.php
includes/api/ApiPageSet.php
includes/api/ApiParamInfo.php
includes/api/ApiParse.php
includes/api/ApiProtect.php
includes/api/ApiPurge.php
includes/api/ApiQuery.php
includes/api/ApiQueryAllImages.php
includes/api/ApiQueryAllMessages.php
includes/api/ApiQueryAllPages.php
includes/api/ApiQueryAllUsers.php
includes/api/ApiQueryBacklinks.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryCategories.php
includes/api/ApiQueryCategoryInfo.php
includes/api/ApiQueryCategoryMembers.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryDuplicateFiles.php
includes/api/ApiQueryExtLinksUsage.php
includes/api/ApiQueryFilearchive.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryImages.php
includes/api/ApiQueryInfo.php
includes/api/ApiQueryLangLinks.php
includes/api/ApiQueryLinks.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryQueryPage.php
includes/api/ApiQueryRandom.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiQueryUserContributions.php
includes/api/ApiQueryUserInfo.php
includes/api/ApiQueryUsers.php
includes/api/ApiQueryWatchlist.php
includes/api/ApiResult.php
includes/api/ApiSetNotificationTimestamp.php
includes/api/ApiUpload.php
includes/api/ApiWatch.php
includes/cache/BacklinkCache.php
includes/cache/CacheDependency.php
includes/cache/FileCacheBase.php
includes/cache/GenderCache.php
includes/cache/LinkBatch.php
includes/cache/LinkCache.php
includes/cache/LocalisationCache.php
includes/cache/MessageCache.php
includes/cache/SquidUpdate.php
includes/cache/UserCache.php
includes/clientpool/RedisConnectionPool.php
includes/content/AbstractContent.php
includes/content/Content.php
includes/content/ContentHandler.php
includes/content/CssContent.php
includes/content/JavaScriptContent.php
includes/content/TextContent.php
includes/content/WikitextContent.php
includes/content/WikitextContentHandler.php
includes/dao/DBAccessBase.php
includes/dao/IDBAccessObject.php
includes/db/CloneDatabase.php
includes/db/Database.php
includes/db/DatabaseError.php
includes/db/DatabaseMssql.php
includes/db/DatabaseMysql.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/db/DatabaseSqlite.php
includes/db/DatabaseUtility.php
includes/db/IORMRow.php
includes/db/IORMTable.php
includes/db/LBFactory.php
includes/db/LBFactory_Multi.php
includes/db/LBFactory_Single.php
includes/db/LoadBalancer.php
includes/db/LoadMonitor.php
includes/db/ORMRow.php
includes/db/ORMTable.php
includes/debug/Debug.php
includes/diff/DairikiDiff.php
includes/diff/DifferenceEngine.php
includes/diff/WikiDiff3.php
includes/externalstore/ExternalStore.php
includes/externalstore/ExternalStoreDB.php
includes/externalstore/ExternalStoreMedium.php
includes/filebackend/FSFile.php
includes/filebackend/FSFileBackend.php
includes/filebackend/FileBackend.php
includes/filebackend/FileBackendGroup.php
includes/filebackend/FileBackendMultiWrite.php
includes/filebackend/FileBackendStore.php
includes/filebackend/FileOp.php
includes/filebackend/FileOpBatch.php
includes/filebackend/SwiftFileBackend.php
includes/filebackend/filejournal/FileJournal.php
includes/filebackend/lockmanager/DBLockManager.php
includes/filebackend/lockmanager/FSLockManager.php
includes/filebackend/lockmanager/LSLockManager.php
includes/filebackend/lockmanager/LockManager.php
includes/filebackend/lockmanager/LockManagerGroup.php
includes/filebackend/lockmanager/MemcLockManager.php
includes/filebackend/lockmanager/QuorumLockManager.php
includes/filebackend/lockmanager/ScopedLock.php
includes/filerepo/FileRepo.php
includes/filerepo/ForeignAPIRepo.php
includes/filerepo/LocalRepo.php
includes/filerepo/README
includes/filerepo/RepoGroup.php
includes/filerepo/file/File.php
includes/filerepo/file/ForeignAPIFile.php
includes/filerepo/file/ForeignDBFile.php
includes/filerepo/file/LocalFile.php
includes/filerepo/file/OldLocalFile.php
includes/filerepo/file/UnregisteredLocalFile.php
includes/installer/CliInstaller.php
includes/installer/DatabaseInstaller.php
includes/installer/DatabaseUpdater.php
includes/installer/Installer.i18n.php
includes/installer/Installer.php
includes/installer/LocalSettingsGenerator.php
includes/installer/MysqlInstaller.php
includes/installer/MysqlUpdater.php
includes/installer/OracleInstaller.php
includes/installer/PostgresInstaller.php
includes/installer/SqliteInstaller.php
includes/installer/SqliteUpdater.php
includes/installer/WebInstaller.php
includes/installer/WebInstallerOutput.php
includes/installer/WebInstallerPage.php
includes/job/Job.php
includes/job/JobQueue.php
includes/job/JobQueueDB.php
includes/job/JobQueueGroup.php
includes/job/JobQueueRedis.php
includes/job/README
includes/job/jobs/DoubleRedirectJob.php
includes/job/jobs/DuplicateJob.php
includes/job/jobs/HTMLCacheUpdateJob.php
includes/job/jobs/NullJob.php
includes/job/jobs/RefreshLinksJob.php
includes/job/jobs/UploadFromUrlJob.php
includes/json/FormatJson.php
includes/json/Services_JSON.php
includes/libs/CSSJanus.php
includes/libs/CSSMin.php
includes/libs/GenericArrayObject.php
includes/libs/IEContentAnalyzer.php
includes/libs/IEUrlExtension.php
includes/libs/JavaScriptMinifier.php
includes/limit.sh
includes/logging/LogEntry.php
includes/logging/LogEventsList.php
includes/logging/LogFormatter.php
includes/logging/LogPage.php
includes/logging/LogPager.php
includes/media/Bitmap.php
includes/media/BitmapMetadataHandler.php
includes/media/DjVuImage.php
includes/media/Exif.php
includes/media/FormatMetadata.php
includes/media/GIFMetadataExtractor.php
includes/media/IPTC.php
includes/media/ImageHandler.php
includes/media/Jpeg.php
includes/media/JpegMetadataExtractor.php
includes/media/MediaHandler.php
includes/media/MediaTransformOutput.php
includes/media/SVGMetadataExtractor.php
includes/media/XCF.php
includes/media/XMP.php
includes/media/XMPInfo.php
includes/media/XMPValidate.php
includes/normal/UtfNormal.php
includes/normal/UtfNormalUtil.php
includes/objectcache/APCBagOStuff.php
includes/objectcache/BagOStuff.php
includes/objectcache/DBABagOStuff.php
includes/objectcache/EmptyBagOStuff.php
includes/objectcache/MemcachedBagOStuff.php
includes/objectcache/MemcachedClient.php
includes/objectcache/MemcachedPeclBagOStuff.php
includes/objectcache/MultiWriteBagOStuff.php
includes/objectcache/ObjectCacheSessionHandler.php
includes/objectcache/RedisBagOStuff.php
includes/objectcache/SqlBagOStuff.php
includes/objectcache/WinCacheBagOStuff.php
includes/objectcache/XCacheBagOStuff.php
includes/parser/CacheTime.php
includes/parser/CoreParserFunctions.php
includes/parser/DateFormatter.php
includes/parser/LinkHolderArray.php
includes/parser/Parser.php
includes/parser/ParserOptions.php
includes/parser/ParserOutput.php
includes/parser/Preprocessor.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/parser/Tidy.php
includes/profiler/Profiler.php
includes/profiler/ProfilerSimple.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderContext.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderWikiModule.php
includes/revisiondelete/RevisionDelete.php
includes/revisiondelete/RevisionDeleteAbstracts.php
includes/revisiondelete/RevisionDeleter.php
includes/search/SearchEngine.php
includes/search/SearchMssql.php
includes/search/SearchMySQL.php
includes/search/SearchOracle.php
includes/search/SearchPostgres.php
includes/search/SearchSqlite.php
includes/site/MediaWikiSite.php
includes/site/Site.php
includes/specials/SpecialActiveusers.php
includes/specials/SpecialAllmessages.php
includes/specials/SpecialAllpages.php
includes/specials/SpecialAncientpages.php
includes/specials/SpecialBlock.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialBlockme.php
includes/specials/SpecialBooksources.php
includes/specials/SpecialBrokenRedirects.php
includes/specials/SpecialCategories.php
includes/specials/SpecialChangeEmail.php
includes/specials/SpecialChangePassword.php
includes/specials/SpecialComparePages.php
includes/specials/SpecialConfirmemail.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDeadendpages.php
includes/specials/SpecialDeletedContributions.php
includes/specials/SpecialDisambiguations.php
includes/specials/SpecialDoubleRedirects.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialEmailuser.php
includes/specials/SpecialExport.php
includes/specials/SpecialFewestrevisions.php
includes/specials/SpecialFileDuplicateSearch.php
includes/specials/SpecialFilepath.php
includes/specials/SpecialImport.php
includes/specials/SpecialJavaScriptTest.php
includes/specials/SpecialLinkSearch.php
includes/specials/SpecialListfiles.php
includes/specials/SpecialListgrouprights.php
includes/specials/SpecialListredirects.php
includes/specials/SpecialListusers.php
includes/specials/SpecialLockdb.php
includes/specials/SpecialLog.php
includes/specials/SpecialLonelypages.php
includes/specials/SpecialLongpages.php
includes/specials/SpecialMIMEsearch.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialMostcategories.php
includes/specials/SpecialMostimages.php
includes/specials/SpecialMostinterwikis.php
includes/specials/SpecialMostlinked.php
includes/specials/SpecialMostlinkedcategories.php
includes/specials/SpecialMostlinkedtemplates.php
includes/specials/SpecialMostrevisions.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialNewimages.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialPagesWithProp.php
includes/specials/SpecialPasswordReset.php
includes/specials/SpecialPopularpages.php
includes/specials/SpecialPreferences.php
includes/specials/SpecialPrefixindex.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialProtectedtitles.php
includes/specials/SpecialRandompage.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialRevisiondelete.php
includes/specials/SpecialSearch.php
includes/specials/SpecialShortpages.php
includes/specials/SpecialSpecialpages.php
includes/specials/SpecialStatistics.php
includes/specials/SpecialTags.php
includes/specials/SpecialUnblock.php
includes/specials/SpecialUncategorizedimages.php
includes/specials/SpecialUncategorizedpages.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUnlockdb.php
includes/specials/SpecialUnusedcategories.php
includes/specials/SpecialUnusedimages.php
includes/specials/SpecialUnusedtemplates.php
includes/specials/SpecialUnwatchedpages.php
includes/specials/SpecialUpload.php
includes/specials/SpecialUploadStash.php
includes/specials/SpecialUserlogin.php
includes/specials/SpecialUserlogout.php
includes/specials/SpecialUserrights.php
includes/specials/SpecialVersion.php
includes/specials/SpecialWantedcategories.php
includes/specials/SpecialWantedfiles.php
includes/specials/SpecialWantedpages.php
includes/specials/SpecialWantedtemplates.php
includes/specials/SpecialWatchlist.php
includes/specials/SpecialWhatlinkshere.php
includes/specials/SpecialWithoutinterwiki.php
includes/upload/UploadBase.php
includes/upload/UploadFromChunks.php
includes/upload/UploadStash.php
index.php5
languages/Language.php
languages/messages/MessagesAf.php
languages/messages/MessagesAr.php
languages/messages/MessagesArc.php
languages/messages/MessagesAst.php
languages/messages/MessagesBa.php
languages/messages/MessagesBe.php
languages/messages/MessagesBe_tarask.php
languages/messages/MessagesBg.php
languages/messages/MessagesBho.php
languages/messages/MessagesBr.php
languages/messages/MessagesCa.php
languages/messages/MessagesCkb.php
languages/messages/MessagesCs.php
languages/messages/MessagesCy.php
languages/messages/MessagesDa.php
languages/messages/MessagesDe.php
languages/messages/MessagesDiq.php
languages/messages/MessagesDsb.php
languages/messages/MessagesEn.php
languages/messages/MessagesEs.php
languages/messages/MessagesEt.php
languages/messages/MessagesEu.php
languages/messages/MessagesFa.php
languages/messages/MessagesFi.php
languages/messages/MessagesFr.php
languages/messages/MessagesFrp.php
languages/messages/MessagesFrr.php
languages/messages/MessagesGl.php
languages/messages/MessagesGv.php
languages/messages/MessagesHe.php
languages/messages/MessagesHr.php
languages/messages/MessagesHsb.php
languages/messages/MessagesHu.php
languages/messages/MessagesHy.php
languages/messages/MessagesIa.php
languages/messages/MessagesId.php
languages/messages/MessagesIlo.php
languages/messages/MessagesIt.php
languages/messages/MessagesJa.php
languages/messages/MessagesKa.php
languages/messages/MessagesKiu.php
languages/messages/MessagesKo.php
languages/messages/MessagesLad.php
languages/messages/MessagesLb.php
languages/messages/MessagesLzh.php
languages/messages/MessagesMin.php
languages/messages/MessagesMk.php
languages/messages/MessagesMr.php
languages/messages/MessagesNl.php
languages/messages/MessagesNn.php
languages/messages/MessagesOr.php
languages/messages/MessagesPa.php
languages/messages/MessagesPl.php
languages/messages/MessagesPt_br.php
languages/messages/MessagesQqq.php
languages/messages/MessagesRo.php
languages/messages/MessagesRoa_tara.php
languages/messages/MessagesRu.php
languages/messages/MessagesSl.php
languages/messages/MessagesSv.php
languages/messages/MessagesTg_cyrl.php
languages/messages/MessagesTh.php
languages/messages/MessagesTr.php
languages/messages/MessagesTt_cyrl.php
languages/messages/MessagesUk.php
languages/messages/MessagesUz.php
languages/messages/MessagesVi.php
languages/messages/MessagesWar.php
languages/messages/MessagesYi.php
languages/messages/MessagesZh_hans.php
languages/messages/MessagesZh_hant.php
load.php5
maintenance/README
maintenance/clearCacheStats.php [new file with mode: 0644]
maintenance/clearInterwikiCache.php [new file with mode: 0644]
maintenance/clear_interwiki_cache.php [deleted file]
maintenance/clear_stats.php [deleted file]
maintenance/initSiteStats.php [new file with mode: 0644]
maintenance/initStats.php [deleted file]
maintenance/language/messages.inc
maintenance/nextJobDB.php
maintenance/proxyCheck.php [new file with mode: 0644]
maintenance/proxy_check.php [deleted file]
maintenance/purgeParserCache.php
maintenance/runJobs.php
maintenance/showCacheStats.php [new file with mode: 0644]
maintenance/showSiteStats.php [new file with mode: 0644]
maintenance/showStats.php [deleted file]
maintenance/stats.php [deleted file]
maintenance/storage/recompressTracked.php
maintenance/syncFileBackend.php
maintenance/tables.sql
mw-config/index.php5
opensearch_desc.php5
redirect.php5
resources/Resources.php
resources/jquery/jquery.makeCollapsible.js
resources/mediawiki.api/mediawiki.api.titleblacklist.js [deleted file]
resources/mediawiki/mediawiki.jqueryMsg.js
resources/mediawiki/mediawiki.js
resources/mediawiki/mediawiki.util.js
skins/Vector.php
skins/common/commonElements.css
skins/common/shared.css
tests/RunSeleniumTests.php
tests/parser/parserTests.txt
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/EditPageTest.php
tests/phpunit/includes/HtmlTest.php
tests/phpunit/includes/LinkerTest.php
tests/phpunit/includes/LinksUpdateTest.php
tests/phpunit/includes/SanitizerTest.php
tests/phpunit/includes/StringUtilsTest.php
tests/phpunit/includes/api/ApiEditPageTest.php
tests/phpunit/includes/cache/MessageCacheTest.php [new file with mode: 0644]
tests/phpunit/includes/db/TestORMRowTest.php
tests/phpunit/includes/filebackend/FileBackendTest.php
tests/phpunit/includes/objectcache/BagOStuffTest.php
tests/phpunit/maintenance/MaintenanceTest.php
tests/qunit/suites/resources/jquery/jquery.colorUtil.test.js
tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.test.js
thumb.php5
thumb_handler.php5

diff --git a/HISTORY b/HISTORY
index 3a25b97..02ba8d8 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -132,7 +132,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
 * (bug 39273) Added AJAX support for "Show changes" (diff) in LivePreview.
 * Added ResourceLoader module "jquery.badge".
 * mw.util.$content now points to the overall content area in the skin rather than just
-  page text content area. If you need the old behaviour please use $( '#mw-content-text').
+  page text content area. If you need the old behavior please use $( '#mw-content-text').
 * jsMessage has been replaced with a floating bubble notification system complete
   with auto-hide, multi-message support, and message replacement tags.
 * jquery.messageBox which appears to be unused by both core and extensions has
@@ -1135,7 +1135,7 @@ Selected changes since MediaWiki 1.17 that may be of interest:
 * New maintenance script to refresh image metadata (maintenance/refreshImageMetadata.php).
 * (bug 16428) Include permalink in printable version.
 * (bug 30722) Add an identity collation that sorts things based on what the
-  unicode code point is (aka pre-1.17 behaviour).
+  unicode code point is (aka pre-1.17 behavior).
 * (bug 30940) Add a hook in User:getDefaultOptions.
   To give extensions a better and more flexible way of providing default
   values for preferences a hook has been introdiced in User:getDefaultOptions().
@@ -2125,7 +2125,7 @@ Selected changes since MediaWiki 1.16 that may be of interest:
   make wfTempDir() return a sane value for Windows on worst-case.
 * (bug 24824) Support ImageMagick 6.5.6-2+ JPEG decoder size hint, to reduce
   memory usage when such an ImageMagick is used for scaling.
-* Disable multithreaded behaviour in recent ImageMagick, to avoid a deadlock
+* Disable multithreaded behavior in recent ImageMagick, to avoid a deadlock
   when a resource limit such as $wgMaxShellMemory is hit.
 * (bug 24981) Allow extensions to access SpecialUpload variables again.
 * (bug 20744) Wiki forgets about an uploaded file.
@@ -2518,8 +2518,8 @@ Other significant changes to MediaWiki's language support:
   exist. In that case the URL will get (?|&)wpDestFile=<filename> appended to
   it as appropriate.
 * If $wgLocaltimezone is null, use the server's timezone as the default for
-  signatures. This was always the behaviour documented in DefaultSettings.php
-  but has not been the actual behaviour for some time: instead, UTC was used
+  signatures. This was always the behavior documented in DefaultSettings.php
+  but has not been the actual behavior for some time: instead, UTC was used
   by default.
 * Added $wgExtensionAssetsPath, to decouple assets serving from $wgScriptPath.
   If not specified it will default to $wgScriptPath/extensions
@@ -4716,7 +4716,7 @@ Other changes in this release:
 * (bug 12644) Template list on edit page now sorted on preview
 * (bug 14058) Support pipe trick for namespaces and interwikis with "-"
 * Message name filter on Special:Allmessages now case-insensitive
-* (bug 13943) Fix image redirect behaviour on image pages
+* (bug 13943) Fix image redirect behavior on image pages
 * (bug 14093) Do 'sysop' => 'protect' magic in Title::isValidMoveOperation
 * (bug 14063) Power search form missing <label> for redirects check
 * (bug 14111) Similar filename warning links now lead to correct page
@@ -4939,7 +4939,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   to not check and assume they are always up to date)
 * The rollback permission can now be rate-limited using the normal mechanism.
 * New configuration variable $wgExtraLanguageNames
-* Behaviour of $wgAddGroups and $wgRemoveGroups changed. New behaviour:
+* Behavior of $wgAddGroups and $wgRemoveGroups changed. New behavior:
 * * Granting the userrights privilege allows arbitrary changing of rights.
 * * Without the userrights privilege, a user will be able to add and/or
      remove the groups specified in $wgAddGroups and $wgRemoveGroups for
@@ -5351,7 +5351,7 @@ the removal of this double-parse. Please see the wiki page for examples.
 
 Message transformation mode has been removed, and replaced with "preprocess"
 mode. This means that some MediaWiki namespace messages may need to be updated,
-especially ones which took advantage of the terribly counterintuitive behaviour
+especially ones which took advantage of the terribly counterintuitive behavior
 of the former message mode.
 
 The header identification routines for section edit and for numbering section
@@ -5361,7 +5361,7 @@ template expansion will still be rendered into a heading tag, and will get an
 entry in the TOC, but will not have a section edit link. HTML-style headings
 will also not have a section edit link. Valid wikitext headings present in the
 template source text will get a template section edit link. This is a major
-break from previous behaviour, but I believe the effects are almost entirely
+break from previous behavior, but I believe the effects are almost entirely
 beneficial.
 
 The main motivation for making these changes was performance. The new two-pass
@@ -5568,7 +5568,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   enabled by default.
 * Added option to install to MyISAM
 * (bug 9250) Remove hardcoded minimum image name length of three characters
-* Fixed DISPLAYTITLE behaviour to reject titles which don't normalise to the
+* Fixed DISPLAYTITLE behavior to reject titles which don't normalise to the
   same title as the current page, and enabled per default
 * Wrap site CSS and JavaScript in a <pre> tag, like user JS/CSS
 * (bug 10196) Add classes and dir="ltr" to the <pre>s on CSS and JS pages (new
@@ -5850,7 +5850,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Fix upload form display in right-to-left languages
 * Fixed regression in blocking of username '0'
 * (bug 9437) Don't overwrite edit form submission handler when setting up
-  edit box scroll position preserve/restore behaviour
+  edit box scroll position preserve/restore behavior
 * (bug 10805) Fix "undo" link when viewing the diff of the most recent
   change to a page using "diff=0"
 * (bug 10765) img_auth.php will now refuse logged-out requests where
@@ -6396,7 +6396,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   to image/svg+xml after loading from the database.
 * Workaround for djvutoxml bug #1704049 (poor performance). Use djvudump
   instead.
-* Fixed odd behaviour in ImagePage on DjVu thumbnailing errors
+* Fixed odd behavior in ImagePage on DjVu thumbnailing errors
 * (bug 5439) "Go" title search will now jump to shared/foreign Image: and
   MediaWiki: pages that have not been locally edited.
 * (bug 9630) Limits links in Whatlinkshere forgot about namespace filter
@@ -7002,7 +7002,7 @@ setting since version 1.2.0. If you have it on, turn it *off* if you can.
 * New maintenance script to show the cached statistics : showStats.php.
 * Count deleted edits when regenerating total edits in maintenance/initStats.php
 * (bug 3706) Allow users to be exempted from IP blocks. The ipblock-exempt permission
-  key has been added to enable this behaviour, by default assigned to sysops.
+  key has been added to enable this behavior, by default assigned to sysops.
 * (bug 7948) importDump.php now warn that Recentchanges need to be rebuild.
 * (bug 7667) allow XHTML namespaces customization
 * (bug 8531) Correct local name of Lingála (patch by Raymond)
@@ -7281,7 +7281,7 @@ they will be run along with the main tests by maintenance/parserTests.php
 * (bug 6642) Don't offer to unlock the database when it isn't locked
 * cleanupTitles.php changed from --dry-run option to --fix, so default
   behavior is now a non-invasive check as with namespaceDupes.php
-* (bug 6660) Fix behaviour of EditPage::blockedPage() when the article does
+* (bug 6660) Fix behavior of EditPage::blockedPage() when the article does
   not exist; now doesn't show the source box if the user hasn't provided it
   (blocked mid-edit) and the page doesn't exist
 * Improve default value of "blockedtext"
@@ -7442,7 +7442,7 @@ they will be run along with the main tests by maintenance/parserTests.php
 * (bug 6023) Fixed mismatch of 0/NULL for wl_notificationtimestamp; now notification
   mails are working after 'Mark all pages visited' button on Special:Watchlist is clicked
 * Made {{INT:}} a core parser function instead of a special case. The syntax
-  and behaviour is largely unchanged.
+  and behavior is largely unchanged.
 * (bug 7448) Fixing the native name for Ewe (ee)
 * (bug 6864) Replace message 'editing' with new message 'editinguser' in Special:Userrights
   to allow better localisation
@@ -10320,7 +10320,7 @@ pages for purposes of page relevancy ranking.
 * (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)
+* Show filename for images in gallery by default (restore beta 3 behavior)
 * (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
index 3471dbe..514b969 100644 (file)
@@ -20,12 +20,12 @@ production.
   disabled.
 
 === New features in 1.21 ===
-* (bug 38110) Schema changes (adding or dropping tables, indicies and
+* (bug 38110) Schema changes (adding or dropping tables, indices and
   fields) can be now be done separately from from other changes that
   update.php makes.  This is useful in environments that use database
   permissions to restrict schema changes but allow the DB user that
   MediaWiki normally runs as to perform other changes that update.php
-  makes.  Schema changes can be run seperately.  See the file UPGRADE
+  makes.  Schema changes can be run separately.  See the file UPGRADE
   for more information.
 * (bug 34876) jquery.makeCollapsible has been improved in performance.
 * Added ContentHandler facility to allow extensions to support other content
@@ -96,6 +96,8 @@ production.
 * (bug 5346) Categories that are redirects will be displayed italic in
   the category links section at the bottom of a page.
 * (bug 43915) New maintenance script deleteEqualMessages.php.
+* You can now create checkbox option matrices through the HTMLCheckMatrix
+  subclass in HTMLForm.
 * WikiText now permits the use of WAI-ARIA's role="presentation" inside of
   html elements and tables. This allows presentational markup, especially
   tables. To be marked up as such.
@@ -111,6 +113,9 @@ production.
   gl, hr, hsb, hu, is, it, kk, kl, ku, ky, la, lb, lt, lv, mk, mo, mt, nl, no,
   oc, pl, pt, rm, ro, ru, rup, sco, sk, sl, smn, sq, sr, sv, tk, tl, tr, tt, uk,
   uz, vi.
+* Added 'CategoryAfterPageAdded' and 'CategoryAfterPageRemoved' hooks.
+* (bug 33186) Add image rotation api "imagerotate"
+* (bug 34040) Add "User rights management" link on user page toolbox.
 
 === Bug fixes in 1.21 ===
 * (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
@@ -187,6 +192,10 @@ production.
   "password mismatch" error.
 * (bug 44599) On Special:Version, HEADs for submodule checkouts (e.g. for
   extensions) performed using Git 1.7.8+ should now appear.
+* (bug 42184) $wgUploadSizeWarning missing second variable
+* (bug 40326) Check if files exist with a different extension during uploading
+* (bug 34798) Updated CSS for Atom/RSS recent changes feeds to match on-wiki diffs.
+* (bug 42430) Calling numRows on MySQL no longer propagates unrelated errors.
 
 === API changes in 1.21 ===
 * prop=revisions can now report the contentmodel and contentformat.
@@ -223,7 +232,7 @@ production.
 * (bug 43849) ApiQueryImageInfo no longer throws exceptions with ForeignDBRepo
   redirects.
 * On error, any warnings generated before that error will be shown in the result.
-* action=help suports generalized submodules (modules=query+value), querymodules obsolete
+* action=help supports generalized submodules (modules=query+value), querymodules obsolete
 * ApiQueryImageInfo continuation is more reliable. The only major change is
   that the imagerepository property will no longer be set on page objects not
   processed in the current query (i.e. non-images or those skipped due to
@@ -234,7 +243,7 @@ production.
 * ApiQueryImageInfo will now limit the number of calls to File::transform made
   in any one query. If there are too many, iicontinue will be returned.
 * action=query&meta=siteinfo&siprop=general will now return the regexes used for
-  link trails and link prefices. Added for Parsoid support.
+  link trails and link prefixes. Added for Parsoid support.
 * Added an API query module list=pageswithprop, which lists pages using a
   particular page property.
 * Added an API query module list=pagepropnames, which lists all page prop names
@@ -249,6 +258,9 @@ production.
   an error during parameter validation if the parameter is given but not
   recognized as an uploaded file.
 * (bug 44244) prop=info may now return the number of people watching each page.
+* (bug 33304) list=allpages will no longer return duplicate entries when
+  querying protection.
+* (bug 33304) list=allpages will now find really old indefinite protections.
 
 === API internal changes in 1.21 ===
 * For debugging only, a new global $wgDebugAPI removes many API restrictions when true.
@@ -287,6 +299,21 @@ changes to languages because of Bugzilla reports.
   Vector extension (and possibly disable its features using config settings if
   you don't want them).
 * Experimental IBM DB2 support was removed due to lack of interest and maintainership
+* BREAKING CHANGE: Filenames of maintenance scripts were standardized into
+  lowerCamelCase format, and made more explicit:
+  - clear_stats.php -> clearCacheStats.php
+  - clear_interwiki_cache.php -> clearInterwikiCache.php
+  - initStats.php -> initSiteStats.php
+  - proxy_check.php -> proxyCheck.php
+  - stats.php -> showCacheStats.php
+  - showStats.php -> showSiteStats.php.
+  Class names were renamed accordingly:
+  - clear_stats -> ClearCacheStats
+  - InitStats -> InitSiteStats
+  - CacheStats -> ShowCacheStats
+  - ShowStats -> ShowSiteStats.
+* BREAKING CHANGE: (bug 38244) Removed the mediawiki.api.titleblacklist module
+  and moved it to the TitleBlacklist extension.
 
 == Compatibility ==
 
diff --git a/UPGRADE b/UPGRADE
index 2c6df98..7987b22 100644 (file)
--- a/UPGRADE
+++ b/UPGRADE
@@ -81,7 +81,7 @@ 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.
+behavior of MediaWiki.
 
 === Check installed extensions ===
 
diff --git a/api.php b/api.php
index abf601f..bc90229 100644 (file)
--- a/api.php
+++ b/api.php
@@ -8,7 +8,7 @@
  * as an argument in the URL ('?action=') and with write-enabled set to the
  * value of $wgEnableWriteAPI as specified in LocalSettings.php.
  * It then invokes "execute()" on the ApiMain object instance, which
- * produces output in the format sepecified in the URL.
+ * produces output in the format specified in the URL.
  *
  * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
  *
index bb515c5..1828b7b 100644 (file)
--- a/api.php5
+++ b/api.php5
@@ -1,7 +1,7 @@
 <?php
 /**
  * Version of api.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 egine.
+ * to execute scripts with PHP5 engine.
  *
  * 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
index 28eedf4..cd1af96 100644 (file)
@@ -745,6 +745,14 @@ $output: OutputPage object in use
 the defaults.
 &$namespaces: Array of namespace numbers with corresponding canonical names
 
+'CategoryAfterPageAdded': After a page is added to a category.
+$category: Category that page was added to
+$wikiPage: WikiPage that was added
+
+'CategoryAfterPageRemoved': After a page is removed from a category.
+$category: Category that page was removed from
+$wikiPage: WikiPage that was removed
+
 'CategoryPageView': Before viewing a categorypage in CategoryPage::view.
 $catpage: CategoryPage instance
 
@@ -2285,7 +2293,7 @@ $result: Boolean; whether MediaWiki currently thinks this is a CSS/JS page.
   Title::isCssOrJsPage().
 
 'TitleIsAlwaysKnown': Called when determining if a page exists. Allows
-overriding default behaviour for determining if a page exists. If $isKnown is
+overriding default behavior for determining if a page exists. If $isKnown is
 kept as null, regular checks happen. If it's a boolean, this value is returned
 by the isKnown method.
 $title: Title object that is being checked
index 988ff28..27619c8 100644 (file)
@@ -15,7 +15,7 @@ subdirectories, all of which have unique purposes.
 level /maintenance directory.
 
 Example:
-  php clear_stats.php
+  php clearCacheStats.php
   
 The following parameters are available to all maintenance scripts
 --help   : Print a help message
index 971a611..f54a4e7 100644 (file)
@@ -237,9 +237,9 @@ Statistics:
        controlled by: $wgStatsMethod
        key: $wgDBname:stats:$key
        ex: wikibd:stats:request_with_session
-       stores: counter for statistics (see maintenance/stats.php script)
+       stores: counter for statistics (see maintenance/showCacheStats.php script)
        expiry: none (?)
-       cleared by: maintenance/clear_stats.php script
+       cleared by: maintenance/clearCacheStats.php script
 
 User:
        key: $wgDBname:user:id:$sId
index b3eb450..a86d7c0 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Version of img_auth.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 egine.
+ * to execute scripts with PHP5 engine.
  *
  * 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
index 40ce478..7c3a3ba 100644 (file)
@@ -147,7 +147,7 @@ abstract class Action {
        /**
         * Check if a given action is recognised, even if it's disabled
         *
-        * @param $name String: name of an action
+        * @param string $name name of an action
         * @return Bool
         */
        final public static function exists( $name ) {
@@ -388,7 +388,7 @@ abstract class FormAction extends Action {
        protected function alterForm( HTMLForm $form ) {}
 
        /**
-        * Get the HTMLForm to control behaviour
+        * Get the HTMLForm to control behavior
         * @return HTMLForm|null
         */
        protected function getForm() {
@@ -439,7 +439,7 @@ abstract class FormAction extends Action {
         * some stuff underneath (history etc); to do some processing on submission of that
         * form (delete, protect, etc) and to do something exciting on 'success', be that
         * display something new or redirect to somewhere.  Some actions have more exotic
-        * behaviour, but that's what subclassing is for :D
+        * behavior, but that's what subclassing is for :D
         */
        public function show() {
                $this->setHeaders();
@@ -545,8 +545,8 @@ abstract class FormlessAction extends Action {
        /**
         * Execute the action silently, not giving any output.  Since these actions don't have
         * forms, they probably won't have any data, but some (eg rollback) may do
-        * @param $data Array values that would normally be in the GET request
-        * @param $captureErrors Bool whether to catch exceptions and just return false
+        * @param array $data values that would normally be in the GET request
+        * @param bool $captureErrors whether to catch exceptions and just return false
         * @throws ErrorPageError|Exception
         * @return Bool whether execution was successful
         */
index d1b72a0..0b74f06 100644 (file)
@@ -21,7 +21,7 @@ class ArrayUtils {
         *     various consistent hash implementations that existed before this
         *     function was introduced.
         */
-       static function consistentHashSort( &$array, $key, $separator = "\000" ) {
+       public static function consistentHashSort( &$array, $key, $separator = "\000" ) {
                $hashes = array();
                foreach ( $array as $elt ) {
                        $hashes[$elt] = md5( $elt . $separator . $key );
@@ -30,4 +30,40 @@ class ArrayUtils {
                        return strcmp( $hashes[$a], $hashes[$b] );
                } );
        }
+
+       /**
+        * Given an array of non-normalised probabilities, this function will select
+        * an element and return the appropriate key
+        *
+        * @param $weights array
+        *
+        * @return bool|int|string
+        */
+       public static function pickRandom( $weights ){
+               if ( !is_array( $weights ) || count( $weights ) == 0 ) {
+                       return false;
+               }
+
+               $sum = array_sum( $weights );
+               if ( $sum == 0 ) {
+                       # No loads on any of them
+                       # In previous versions, this triggered an unweighted random selection,
+                       # but this feature has been removed as of April 2006 to allow for strict
+                       # separation of query groups.
+                       return false;
+               }
+               $max = mt_getrandmax();
+               $rand = mt_rand( 0, $max ) / $max * $sum;
+
+               $sum = 0;
+               foreach ( $weights as $i => $w ) {
+                       $sum += $w;
+                       # Do not return keys if they have 0 weight.
+                       # Note that the "all 0 weight" case is handed above
+                       if ( $w > 0 && $sum >= $rand ) {
+                               break;
+                       }
+               }
+               return $i;
+       }
 }
index 812bbae..e5919cf 100644 (file)
@@ -134,7 +134,7 @@ class Article implements Page {
 
        /**
         * Constructor from a page id
-        * @param $id Int article ID to load
+        * @param int $id article ID to load
         * @return Article|null
         */
        public static function newFromID( $id ) {
@@ -393,7 +393,6 @@ class Article implements Page {
                return $this->mContent;
        }
 
-
        /**
         * Get text content object
         * Does *NOT* follow redirects.
@@ -854,7 +853,7 @@ class Article implements Page {
 
        /**
         * Get the robot policy to be used for the current view
-        * @param $action String the action= GET parameter
+        * @param string $action the action= GET parameter
         * @param $pOutput ParserOutput
         * @return Array the policy that should be set
         * TODO: actions other than 'view'
@@ -1212,7 +1211,7 @@ class Article implements Page {
         *   Revision as of \<date\>; view current revision
         *   \<- Previous version | Next Version -\>
         *
-        * @param $oldid int: revision ID of this article revision
+        * @param int $oldid revision ID of this article revision
         */
        public function setOldSubtitle( $oldid = 0 ) {
                if ( !wfRunHooks( 'DisplayOldSubtitle', array( &$this, &$oldid ) ) ) {
@@ -1520,7 +1519,7 @@ class Article implements Page {
        /**
         * Output deletion confirmation dialog
         * @todo FIXME: Move to another file?
-        * @param $reason String: prefilled reason
+        * @param string $reason prefilled reason
         */
        public function confirmDelete( $reason ) {
                wfDebug( "Article::confirmDelete\n" );
@@ -1888,8 +1887,8 @@ class Article implements Page {
         *
         * @deprecated in 1.18; call OutputPage::redirect() directly
         * @param $noRedir Boolean: add redirect=no
-        * @param $sectionAnchor String: section to redirect to, including "#"
-        * @param $extraQuery String: extra query params
+        * @param string $sectionAnchor section to redirect to, including "#"
+        * @param string $extraQuery extra query params
         */
        public function doRedirect( $noRedir = false, $sectionAnchor = '', $extraQuery = '' ) {
                wfDeprecated( __METHOD__, '1.18' );
@@ -1909,7 +1908,7 @@ class Article implements Page {
         * Use PHP's magic __get handler to handle accessing of
         * raw WikiPage fields for backwards compatibility.
         *
-        * @param $fname String Field name
+        * @param string $fname Field name
         */
        public function __get( $fname ) {
                if ( property_exists( $this->mPage, $fname ) ) {
@@ -1923,7 +1922,7 @@ class Article implements Page {
         * Use PHP's magic __set handler to handle setting of
         * raw WikiPage fields for backwards compatibility.
         *
-        * @param $fname String Field name
+        * @param string $fname Field name
         * @param $fvalue mixed New value
         */
        public function __set( $fname, $fvalue ) {
@@ -1942,8 +1941,8 @@ class Article implements Page {
         * Use PHP's magic __call handler to transform instance calls to
         * WikiPage functions for backwards compatibility.
         *
-        * @param $fname String Name of called method
-        * @param $args Array Arguments to the method
+        * @param string $fname Name of called method
+        * @param array $args Arguments to the method
         * @return mixed
         */
        public function __call( $fname, $args ) {
index 2e42439..a465817 100644 (file)
@@ -46,7 +46,7 @@ class AuthPlugin {
         * you might need to munge it (for instance, for lowercase initial
         * letters).
         *
-        * @param $username String: username.
+        * @param string $username username.
         * @return bool
         */
        public function userExists( $username ) {
@@ -60,8 +60,8 @@ class AuthPlugin {
         * you might need to munge it (for instance, for lowercase initial
         * letters).
         *
-        * @param $username String: username.
-        * @param $password String: user password.
+        * @param string $username username.
+        * @param string $password user password.
         * @return bool
         */
        public function authenticate( $username, $password ) {
@@ -73,7 +73,7 @@ class AuthPlugin {
         * Modify options in the login template.
         *
         * @param $template UserLoginTemplate object.
-        * @param $type String 'signup' or 'login'. Added in 1.16.
+        * @param string $type 'signup' or 'login'. Added in 1.16.
         */
        public function modifyUITemplate( &$template, &$type ) {
                # Override this!
@@ -83,7 +83,7 @@ class AuthPlugin {
        /**
         * Set the domain this plugin is supposed to use when authenticating.
         *
-        * @param $domain String: authentication domain.
+        * @param string $domain authentication domain.
         */
        public function setDomain( $domain ) {
                $this->domain = $domain;
@@ -105,7 +105,7 @@ class AuthPlugin {
        /**
         * Check to see if the specific domain is a valid domain.
         *
-        * @param $domain String: authentication domain.
+        * @param string $domain authentication domain.
         * @return bool
         */
        public function validDomain( $domain ) {
@@ -194,7 +194,7 @@ class AuthPlugin {
         * Return true if successful.
         *
         * @param $user User object.
-        * @param $password String: password.
+        * @param string $password password.
         * @return bool
         */
        public function setPassword( $user, $password ) {
@@ -251,7 +251,7 @@ class AuthPlugin {
         * Check if a user should authenticate locally if the global authentication fails.
         * If either this or strict() returns true, local authentication is not used.
         *
-        * @param $username String: username.
+        * @param string $username username.
         * @return Boolean
         */
        public function strictUserAuth( $username ) {
index ace1348..7136232 100644 (file)
@@ -119,6 +119,7 @@ $wgAutoloadLocalClasses = array(
        'Html' => 'includes/Html.php',
        'HTMLApiField' => 'includes/HTMLForm.php',
        'HTMLCheckField' => 'includes/HTMLForm.php',
+       'HTMLCheckMatrix' => 'includes/HTMLForm.php',
        'HTMLEditTools' => 'includes/HTMLForm.php',
        'HTMLFloatField' => 'includes/HTMLForm.php',
        'HTMLForm' => 'includes/HTMLForm.php',
@@ -167,6 +168,7 @@ $wgAutoloadLocalClasses = array(
        'MagicWord' => 'includes/MagicWord.php',
        'MagicWordArray' => 'includes/MagicWord.php',
        'MailAddress' => 'includes/UserMailer.php',
+       'MappedIterator' => 'includes/MappedIterator.php',
        'MediaWiki' => 'includes/Wiki.php',
        'MediaWiki_I18N' => 'includes/SkinTemplate.php',
        'Message' => 'includes/Message.php',
@@ -181,7 +183,7 @@ $wgAutoloadLocalClasses = array(
        'MWNamespace' => 'includes/Namespace.php',
        'OldChangesList' => 'includes/ChangesList.php',
        'OutputPage' => 'includes/OutputPage.php',
-       'Page' =>  'includes/WikiPage.php',
+       'Page' => 'includes/WikiPage.php',
        'PageQueryPage' => 'includes/PageQueryPage.php',
        'Pager' => 'includes/Pager.php',
        'PasswordError' => 'includes/User.php',
@@ -275,9 +277,9 @@ $wgAutoloadLocalClasses = array(
        'WikiError' => 'includes/WikiError.php',
        'WikiErrorMsg' => 'includes/WikiError.php',
        'WikiExporter' => 'includes/Export.php',
-       'WikiFilePage' =>  'includes/WikiFilePage.php',
+       'WikiFilePage' => 'includes/WikiFilePage.php',
        'WikiImporter' => 'includes/Import.php',
-       'WikiPage' =>  'includes/WikiPage.php',
+       'WikiPage' => 'includes/WikiPage.php',
        'WikiRevision' => 'includes/Import.php',
        'WikiMap' => 'includes/WikiMap.php',
        'WikiReference' => 'includes/WikiMap.php',
@@ -359,6 +361,7 @@ $wgAutoloadLocalClasses = array(
        'ApiFormatXmlRsd' => 'includes/api/ApiRsd.php',
        'ApiFormatYaml' => 'includes/api/ApiFormatYaml.php',
        'ApiHelp' => 'includes/api/ApiHelp.php',
+       'ApiImageRotate' => 'includes/api/ApiImageRotate.php',
        'ApiImport' => 'includes/api/ApiImport.php',
        'ApiImportReporter' => 'includes/api/ApiImport.php',
        'ApiLogin' => 'includes/api/ApiLogin.php',
@@ -577,8 +580,8 @@ $wgAutoloadLocalClasses = array(
        'LSLockManager' => 'includes/filebackend/lockmanager/LSLockManager.php',
        'MemcLockManager' => 'includes/filebackend/lockmanager/MemcLockManager.php',
        'QuorumLockManager' => 'includes/filebackend/lockmanager/QuorumLockManager.php',
-       'MySqlLockManager'=> 'includes/filebackend/lockmanager/DBLockManager.php',
-       'PostgreSqlLockManager'=> 'includes/filebackend/lockmanager/DBLockManager.php',
+       'MySqlLockManager' => 'includes/filebackend/lockmanager/DBLockManager.php',
+       'PostgreSqlLockManager' => 'includes/filebackend/lockmanager/DBLockManager.php',
        'NullLockManager' => 'includes/filebackend/lockmanager/LockManager.php',
        'FileOp' => 'includes/filebackend/FileOp.php',
        'FileOpBatch' => 'includes/filebackend/FileOpBatch.php',
@@ -1106,7 +1109,7 @@ class AutoLoader {
        /**
         * autoload - take a class name and attempt to load it
         *
-        * @param $className String: name of class we're looking for.
+        * @param string $className name of class we're looking for.
         * @return bool Returning false is important on failure as
         * it allows Zend to try and look in other registered autoloaders
         * as well.
index d7ed2f9..781f4fc 100644 (file)
@@ -54,7 +54,7 @@ class Autopromote {
         * Does not return groups the user already belongs to or has once belonged.
         *
         * @param $user User The user to get the groups for
-        * @param $event String key in $wgAutopromoteOnce (each one has groups/criteria)
+        * @param string $event key in $wgAutopromoteOnce (each one has groups/criteria)
         *
         * @return array Groups the user should be promoted to.
         *
@@ -155,7 +155,7 @@ class Autopromote {
         * APCOND_AGE.  Other types will throw an exception if no extension evalu-
         * ates them.
         *
-        * @param $cond Array: A condition, which must not contain other conditions
+        * @param array $cond A condition, which must not contain other conditions
         * @param $user User The user to check the condition against
         * @throws MWException
         * @return bool Whether the condition is true for the user
index 1d1e2c0..3843631 100644 (file)
@@ -106,7 +106,7 @@ class Block {
         * user ID. Tries the user ID first, and if that doesn't work, tries
         * the address.
         *
-        * @param $address String: IP address of user/anon
+        * @param string $address IP address of user/anon
         * @param $user Integer: user id of user
         * @return Block Object
         * @deprecated since 1.18
@@ -199,8 +199,8 @@ class Block {
        /**
         * Get a block from the DB, with either the given address or the given username
         *
-        * @param $address string The IP address of the user, or blank to skip IP blocks
-        * @param $user int The user ID, or zero for anonymous users
+        * @param string $address The IP address of the user, or blank to skip IP blocks
+        * @param int $user The user ID, or zero for anonymous users
         * @return Boolean: the user is blocked from editing
         * @deprecated since 1.18
         */
@@ -307,7 +307,7 @@ class Block {
 
                                # This has the nice property that a /32 block is ranked equally with a
                                # single-IP block, which is exactly what it is...
-                               $score = self::TYPE_RANGE  - 1 + ( $size / 128 );
+                               $score = self::TYPE_RANGE - 1 + ( $size / 128 );
 
                        } else {
                                $score = $block->getType();
@@ -331,8 +331,8 @@ class Block {
 
        /**
         * Get a set of SQL conditions which will select rangeblocks encompasing a given range
-        * @param $start String Hexadecimal IP representation
-        * @param $end String Hexadecimal IP represenation, or null to use $start = $end
+        * @param string $start Hexadecimal IP representation
+        * @param string $end Hexadecimal IP represenation, or null to use $start = $end
         * @return String
         */
        public static function getRangeCond( $start, $end = null ) {
@@ -572,7 +572,7 @@ class Block {
         * blocked by this Block. This will use the recentchanges table.
         *
         * @param Block $block
-        * @param Array &$blockIds
+        * @param array &$blockIds
         * @return Array: block IDs of retroactive autoblocks made
         */
        protected static function defaultRetroactiveAutoblock( Block $block, array &$blockIds ) {
@@ -611,7 +611,7 @@ class Block {
         * Checks whether a given IP is on the autoblock whitelist.
         * TODO: this probably belongs somewhere else, but not sure where...
         *
-        * @param $ip String: The IP to check
+        * @param string $ip The IP to check
         * @return Boolean
         */
        public static function isWhitelistedFromAutoblocks( $ip ) {
@@ -654,7 +654,7 @@ class Block {
        /**
         * Autoblocks the given IP, referring to this Block.
         *
-        * @param $autoblockIP String: the IP to autoblock.
+        * @param string $autoblockIP the IP to autoblock.
         * @return mixed: block ID if an autoblock was inserted, false if not.
         */
        public function doAutoblock( $autoblockIP ) {
@@ -945,7 +945,7 @@ class Block {
        /**
         * Encode expiry for DB
         *
-        * @param $expiry String: timestamp for expiry, or
+        * @param string $expiry timestamp for expiry, or
         * @param $db DatabaseBase object
         * @return String
         * @deprecated since 1.18; use $dbw->encodeExpiry() instead
@@ -958,8 +958,8 @@ class Block {
        /**
         * Decode expiry which has come from the DB
         *
-        * @param $expiry String: Database expiry format
-        * @param $timestampType Int Requested timestamp format
+        * @param string $expiry Database expiry format
+        * @param int $timestampType Requested timestamp format
         * @return String
         * @deprecated since 1.18; use $wgLang->formatExpiry() instead
         */
@@ -984,7 +984,7 @@ class Block {
        /**
         * Gets rid of uneeded numbers in quad-dotted/octet IP strings
         * For example, 127.111.113.151/24 -> 127.111.113.0/24
-        * @param $range String: IP address to normalize
+        * @param string $range IP address to normalize
         * @return string
         * @deprecated since 1.18, call IP::sanitizeRange() directly
         */
@@ -1018,7 +1018,7 @@ class Block {
        /**
         * Convert a submitted expiry time, which may be relative ("2 weeks", etc) or absolute
         * ("24 May 2034"), into an absolute timestamp we can put into the database.
-        * @param $expiry String: whatever was typed into the form
+        * @param string $expiry whatever was typed into the form
         * @return String: timestamp or "infinity" string for th DB implementation
         * @deprecated since 1.18 moved to SpecialBlock::parseExpiryInput()
         */
@@ -1042,7 +1042,7 @@ class Block {
         * @param $vagueTarget String|User|Int as above, but we will search for *any* block which
         *     affects that target (so for an IP address, get ranges containing that IP; and also
         *     get any relevant autoblocks). Leave empty or blank to skip IP-based lookups.
-        * @param $fromMaster Bool whether to use the DB_MASTER database
+        * @param bool $fromMaster whether to use the DB_MASTER database
         * @return Block|null (null if no relevant block could be found).  The target and type
         *     of the returned Block will refer to the actual block which was found, which might
         *     not be the same as the target you gave if you used $vagueTarget!
index 53e44d7..c8397f7 100644 (file)
@@ -106,7 +106,7 @@ class Category {
        /**
         * Factory function.
         *
-        * @param $name Array: A category name (no "Category:" prefix).  It need
+        * @param array $name A category name (no "Category:" prefix).  It need
         *   not be normalized, with spaces replaced by underscores.
         * @return mixed Category, or false on a totally invalid name
         */
index 3e69dd4..43ab4db 100644 (file)
@@ -40,7 +40,7 @@ class CategoryPage extends Article {
 
        /**
         * Constructor from a page id
-        * @param $id Int article ID to load
+        * @param int $id article ID to load
         * @return CategoryPage|null
         */
        public static function newFromID( $id ) {
index 7678ffe..f9020b7 100644 (file)
@@ -71,9 +71,9 @@ class CategoryViewer extends ContextSource {
         * @since 1.19 $context is a second, required parameter
         * @param $title Title
         * @param $context IContextSource
-        * @param $from Array An array with keys page, subcat,
+        * @param array $from An array with keys page, subcat,
         *        and file for offset of results of each section (since 1.17)
-        * @param $until Array An array with 3 keys for until of each section (since 1.17)
+        * @param array $until An array with 3 keys for until of each section (since 1.17)
         * @param $query Array
         */
        function __construct( $title, IContextSource $context, $from = array(), $until = array(), $query = array() ) {
@@ -288,10 +288,10 @@ class CategoryViewer extends ContextSource {
                        # the collation in the database differs from the one
                        # set in $wgCategoryCollation, pagination might go totally haywire.
                        $extraConds = array( 'cl_type' => $type );
-                       if ( $this->from[$type] !== null ) {
+                       if ( isset( $this->from[$type] ) && $this->from[$type] !== null ) {
                                $extraConds[] = 'cl_sortkey >= '
                                        . $dbr->addQuotes( $this->collation->getSortKey( $this->from[$type] ) );
-                       } elseif ( $this->until[$type] !== null ) {
+                       } elseif ( isset( $this->until[$type] ) && $this->until[$type] !== null ) {
                                $extraConds[] = 'cl_sortkey < '
                                        . $dbr->addQuotes( $this->collation->getSortKey( $this->until[$type] ) );
                                $this->flip[$type] = true;
@@ -441,13 +441,13 @@ class CategoryViewer extends ContextSource {
         * Get the paging links for a section (subcats/pages/files), to go at the top and bottom
         * of the output.
         *
-        * @param $type String: 'page', 'subcat', or 'file'
+        * @param string $type 'page', 'subcat', or 'file'
         * @return String: HTML output, possibly empty if there are no other pages
         */
        private function getSectionPagingLinks( $type ) {
-               if ( $this->until[$type] !== null ) {
+               if ( isset( $this->until[$type] ) && $this->until[$type] !== null ) {
                        return $this->pagingLinks( $this->nextPage[$type], $this->until[$type], $type );
-               } elseif ( $this->nextPage[$type] !== null || $this->from[$type] !== null ) {
+               } elseif ( $this->nextPage[$type] !== null || ( isset( $this->from[$type] ) && $this->from[$type] !== null ) ) {
                        return $this->pagingLinks( $this->from[$type], $this->nextPage[$type], $type );
                } else {
                        return '';
@@ -573,9 +573,9 @@ class CategoryViewer extends ContextSource {
        /**
         * Create paging links, as a helper method to getSectionPagingLinks().
         *
-        * @param $first String The 'until' parameter for the generated URL
-        * @param $last String The 'from' parameter for the genererated URL
-        * @param $type String A prefix for parameters, 'page' or 'subcat' or
+        * @param string $first The 'until' parameter for the generated URL
+        * @param string $last The 'from' parameter for the genererated URL
+        * @param string $type A prefix for parameters, 'page' or 'subcat' or
         *     'file'
         * @return String HTML
         */
@@ -616,7 +616,7 @@ class CategoryViewer extends ContextSource {
         * corresponds to the correct segment of the category.
         *
         * @param Title $title: The title (usually $this->title)
-        * @param String $section: Which section
+        * @param string $section: Which section
         * @throws MWException
         * @return Title
         */
@@ -650,9 +650,9 @@ class CategoryViewer extends ContextSource {
         * category-subcat-count-limited, category-file-count,
         * category-file-count-limited.
         *
-        * @param $rescnt Int: The number of items returned by our database query.
-        * @param $dbcnt Int: The number of items according to the category table.
-        * @param $type String: 'subcat', 'article', or 'file'
+        * @param int $rescnt The number of items returned by our database query.
+        * @param int $dbcnt The number of items according to the category table.
+        * @param string $type 'subcat', 'article', or 'file'
         * @return String: A message giving the number of items, to output to HTML.
         */
        private function getCountMessage( $rescnt, $dbcnt, $type ) {
@@ -677,7 +677,9 @@ class CategoryViewer extends ContextSource {
                }
 
                $fromOrUntil = false;
-               if ( $this->from[$pagingType] !== null || $this->until[$pagingType] !== null ) {
+               if ( ( isset( $this->from[$pagingType] ) && $this->from[$pagingType] !== null ) ||
+                       ( isset( $this->until[$pagingType] ) && $this->until[$pagingType] !== null )
+               ) {
                        $fromOrUntil = true;
                }
 
index cb67aa8..59e6593 100644 (file)
@@ -66,7 +66,7 @@ class Categoryfinder {
         * Initializes the instance. Do this prior to calling run().
         * @param $article_ids Array of article IDs
         * @param $categories FIXME
-        * @param $mode String: FIXME, default 'AND'.
+        * @param string $mode FIXME, default 'AND'.
         * @todo FIXME: $categories/$mode
         */
        function seed( $article_ids, $categories, $mode = 'AND' ) {
@@ -111,9 +111,9 @@ class Categoryfinder {
 
        /**
         * This functions recurses through the parent representation, trying to match the conditions
-        * @param $id int The article/category to check
-        * @param $conds array The array of categories to match
-        * @param $path array used to check for recursion loops
+        * @param int $id The article/category to check
+        * @param array $conds The array of categories to match
+        * @param array $path used to check for recursion loops
         * @return bool Does this match the conditions?
         */
        function check( $id, &$conds, $path = array() ) {
index 1c4587a..a142c7c 100644 (file)
@@ -144,7 +144,6 @@ class CdbReader_DBA {
        }
 }
 
-
 /**
  * Writer class which uses the DBA extension
  */
index 1dd9b59..88f7d44 100644 (file)
@@ -25,8 +25,8 @@ class ChangeTags {
        /**
         * Creates HTML for the given tags
         *
-        * @param $tags String: Comma-separated list of tags
-        * @param $page String: A label for the type of action which is being displayed,
+        * @param string $tags Comma-separated list of tags
+        * @param string $page A label for the type of action which is being displayed,
         *                     for example: 'history', 'contributions' or 'newpages'
         *
         * @return Array with two items: (html, classes)
@@ -62,7 +62,7 @@ class ChangeTags {
        /**
         * Get a short description for a tag
         *
-        * @param $tag String: tag
+        * @param string $tag tag
         *
         * @return String: Short description of the tag from "mediawiki:tag-$tag" if this message exists,
         *                 html-escaped version of $tag otherwise
@@ -75,11 +75,11 @@ class ChangeTags {
        /**
         * Add tags to a change given its rc_id, rev_id and/or log_id
         *
-        * @param $tags String|Array: Tags to add to the change
+        * @param string|array $tags Tags to add to the change
         * @param $rc_id int: rc_id of the change to add the tags to
         * @param $rev_id int: rev_id of the change to add the tags to
         * @param $log_id int: log_id of the change to add the tags to
-        * @param $params String: params to put in the ct_params field of tabel 'change_tag'
+        * @param string $params params to put in the ct_params field of tabel 'change_tag'
         *
         * @throws MWException
         * @return bool: false if no changes are made, otherwise true
@@ -160,11 +160,11 @@ class ChangeTags {
         * Handles selecting tags, and filtering.
         * Needs $tables to be set up properly, so we can figure out which join conditions to use.
         *
-        * @param $tables String|Array: Tabel names, see DatabaseBase::select
-        * @param $fields String|Array: Fields used in query, see DatabaseBase::select
-        * @param $conds String|Array: conditions used in query, see DatabaseBase::select
+        * @param string|array $tables Tabel names, see DatabaseBase::select
+        * @param string|array $fields Fields used in query, see DatabaseBase::select
+        * @param string|array $conds conditions used in query, see DatabaseBase::select
         * @param $join_conds Array: join conditions, see DatabaseBase::select
-        * @param $options Array: options, see Database::select
+        * @param array $options options, see Database::select
         * @param bool|string $filter_tag Tag to select on
         *
         * @throws MWException When unable to determine appropriate JOIN condition for tagging
@@ -211,7 +211,7 @@ class ChangeTags {
        /**
         * Build a text box to select a change tag
         *
-        * @param $selected String: tag to select by default
+        * @param string $selected tag to select by default
         * @param $fullForm Boolean:
         *        - if false, then it returns an array of (label, form).
         *        - if true, it returns an entire form around the selector.
index ae30272..476de5b 100644 (file)
@@ -31,8 +31,8 @@ class ChangesFeed {
        /**
         * Constructor
         *
-        * @param $format String: feed's format (either 'rss' or 'atom')
-        * @param $type String: type of feed (for cache keys)
+        * @param string $format feed's format (either 'rss' or 'atom')
+        * @param string $type type of feed (for cache keys)
         */
        public function __construct( $format, $type ) {
                $this->format = $format;
@@ -42,9 +42,9 @@ class ChangesFeed {
        /**
         * Get a ChannelFeed subclass object to use
         *
-        * @param $title String: feed's title
-        * @param $description String: feed's description
-        * @param $url String: url of origin page
+        * @param string $title feed's title
+        * @param string $description feed's description
+        * @param string $url url of origin page
         * @return ChannelFeed subclass or false on failure
         */
        public function getFeedObject( $title, $description, $url ) {
@@ -110,9 +110,9 @@ class ChangesFeed {
        /**
         * Save to feed result to $messageMemc
         *
-        * @param $feed String: feed's content
-        * @param $timekey String: memcached key of the last modification
-        * @param $key String: memcached key of the content
+        * @param string $feed feed's content
+        * @param string $timekey memcached key of the last modification
+        * @param string $key memcached key of the content
         */
        public function saveToCache( $feed, $timekey, $key ) {
                global $messageMemc;
@@ -125,8 +125,8 @@ class ChangesFeed {
         * Try to load the feed result from $messageMemc
         *
         * @param $lastmod Integer: timestamp of the last item in the recentchanges table
-        * @param $timekey String: memcached key of the last modification
-        * @param $key String: memcached key of the content
+        * @param string $timekey memcached key of the last modification
+        * @param string $key memcached key of the content
         * @return string|bool feed's content on cache hit or false on cache miss
         */
        public function loadFromCache( $lastmod, $timekey, $key ) {
index a9b9c31..451f2da 100644 (file)
@@ -80,7 +80,7 @@ class ChangesList extends ContextSource {
         * This first argument used to be an User object.
         *
         * @deprecated in 1.18; use newFromContext() instead
-        * @param $unused string|User Unused
+        * @param string|User $unused Unused
         * @return ChangesList|EnhancedChangesList|OldChangesList derivative
         */
        public static function newFromUser( $unused ) {
@@ -130,8 +130,8 @@ class ChangesList extends ContextSource {
 
        /**
         * Returns the appropriate flags for new page, minor change and patrolling
-        * @param $flags Array Associative array of 'flag' => Bool
-        * @param $nothing String to use for empty space
+        * @param array $flags Associative array of 'flag' => Bool
+        * @param string $nothing to use for empty space
         * @return String
         */
        protected function recentChangesFlags( $flags, $nothing = '&#160;' ) {
@@ -150,7 +150,7 @@ class ChangesList extends ContextSource {
         * unpatrolled edit.  By default in English it will contain "N", "m", "b",
         * "!" respectively, plus it will have an appropriate title and class.
         *
-        * @param $flag String: 'newpage', 'unpatrolled', 'minor', or 'bot'
+        * @param string $flag 'newpage', 'unpatrolled', 'minor', or 'bot'
         * @return String: Raw HTML
         */
        public static function flag( $flag ) {
@@ -287,7 +287,7 @@ class ChangesList extends ContextSource {
        }
 
        /**
-        * @param $s string HTML to update
+        * @param string $s HTML to update
         * @param $rc_timestamp mixed
         */
        public function insertDateHeader( &$s, $rc_timestamp ) {
@@ -304,7 +304,7 @@ class ChangesList extends ContextSource {
        }
 
        /**
-        * @param $s string HTML to update
+        * @param string $s HTML to update
         * @param $title Title
         * @param $logtype string
         */
@@ -315,7 +315,7 @@ class ChangesList extends ContextSource {
        }
 
        /**
-        * @param $s string HTML to update
+        * @param string $s HTML to update
         * @param $rc RecentChange
         * @param $unpatrolled
         */
@@ -358,7 +358,7 @@ class ChangesList extends ContextSource {
        }
 
        /**
-        * @param $s string HTML to update
+        * @param string $s HTML to update
         * @param $rc RecentChange
         * @param $unpatrolled
         * @param $watched
@@ -407,7 +407,7 @@ class ChangesList extends ContextSource {
        /**
         * Insert time timestamp string from $rc into $s
         *
-        * @param $s string HTML to update
+        * @param string $s HTML to update
         * @param $rc RecentChange
         */
        public function insertTimestamp( &$s, $rc ) {
@@ -579,7 +579,6 @@ class ChangesList extends ContextSource {
        }
 }
 
-
 /**
  * Generate a list of changes using the good old system (no javascript)
  */
@@ -588,8 +587,8 @@ class OldChangesList extends ChangesList {
         * Format a line using the old system (aka without any javascript).
         *
         * @param $rc RecentChange, passed by reference
-        * @param $watched Bool (default false)
-        * @param $linenumber Int (default null)
+        * @param bool $watched (default false)
+        * @param int $linenumber (default null)
         *
         * @return string|bool
         */
@@ -692,7 +691,6 @@ class OldChangesList extends ChangesList {
        }
 }
 
-
 /**
  * Generate a list of changes using an Enhanced system (uses javascript).
  */
@@ -1139,9 +1137,9 @@ class EnhancedChangesList extends ChangesList {
 
        /**
         * Generate HTML for an arrow or placeholder graphic
-        * @param $dir String: one of '', 'd', 'l', 'r'
-        * @param $alt String: text
-        * @param $title String: text
+        * @param string $dir one of '', 'd', 'l', 'r'
+        * @param string $alt text
+        * @param string $title text
         * @return String: HTML "<img>" tag
         */
        protected function arrow( $dir, $alt = '', $title = '' ) {
index 87afc10..2734871 100644 (file)
@@ -148,7 +148,6 @@ class IdentityCollation extends Collation {
        }
 }
 
-
 class IcuCollation extends Collation {
        var $primaryCollator, $mainCollator, $locale;
        var $firstLetterData;
@@ -181,35 +180,53 @@ class IcuCollation extends Collation {
        );
 
        /**
-        * Additional characters (or character groups) to be considered first-letters
+        * Additional characters (or character groups) to be considered separate
+        * letters for given languages, or to be removed from the list of such
+        * letters (denoted by keys starting with '-').
+        *
+        * These are additions to (or subtractions from) the data stored in the
+        * first-letters-root.ser file (which among others includes full basic latin,
+        * cyrillic and greek alphabets).
+        *
+        * "Separate letter" is a letter that would have a separate heading/section
+        * for it in a dictionary or a phone book in this language. This data isn't
+        * used for sorting (the ICU library handles that), only for deciding which
+        * characters (or character groups) to use as headings.
         *
-        * Generated based on the primary level of Unicode collation tailorings
-        * available at http://developer.mimer.com/charts/tailorings.htm .
+        * Initially generated based on the primary level of Unicode collation
+        * tailorings available at http://developer.mimer.com/charts/tailorings.htm ,
+        * later modified.
         *
         * Empty arrays are intended; this signifies that the data for the language is
         * available and that there are, in fact, no additional letters to consider.
         */
        static $tailoringFirstLetters = array(
                // Verified by native speakers
-               'pl' => array( "Ą", "Ć", "Ę", "Ł", "Ń", "Ó", "Ś", "Ź", "Ż" ),
+               'be' => array( "Ё" ),
+               'be-tarask' => array( "Ё" ),
+               'en' => array(),
                'fi' => array( "Å", "Ä", "Ö" ),
+               'hu' => array( "Cs", "Dz", "Dzs", "Gy", "Ly", "Ny", "Ö", "Sz", "Ty", "Ü", "Zs" ),
+               'it' => array(),
+               'pl' => array( "Ą", "Ć", "Ę", "Ł", "Ń", "Ó", "Ś", "Ź", "Ż" ),
+               'pt' => array(),
+               'ru' => array(),
+               'uk' => array( "Ґ", "Ь" ),
                // Not verified, but likely correct
                'af' => array(),
-               'ast' => array( "CH", "LL", "Ñ" ),
+               'ast' => array( "Ch", "Ll", "Ñ" ),
                'az' => array( "Ç", "Ə", "Ğ", "İ", "Ö", "Ş", "Ü" ),
-               'be' => array( "Ё" ),
                'bg' => array(),
-               'br' => array( "CH", "C'H" ),
-               'bs' => array( "Ä\8c", "Ä\86", "DŽ", "Ä\90", "LJ", "NJ", "Š", "Ž" ),
+               'br' => array( "Ch", "C'h" ),
+               'bs' => array( "Ä\8c", "Ä\86", "Dž", "Ä\90", "Lj", "Nj", "Š", "Ž" ),
                'ca' => array(),
                'co' => array(),
-               'cs' => array( "Č", "CH", "Ř", "Š", "Ž" ),
-               'cy' => array( "CH", "DD", "FF", "NG", "LL", "PH", "RH", "TH" ),
+               'cs' => array( "Č", "Ch", "Ř", "Š", "Ž" ),
+               'cy' => array( "Ch", "Dd", "Ff", "Ng", "Ll", "Ph", "Rh", "Th" ),
                'da' => array( "Æ", "Ø", "Å" ),
                'de' => array(),
-               'dsb' => array( "Ä\8c", "Ä\86", "DŹ", "Ä\9a", "CH", "Ł", "Ń", "Ŕ", "Š", "Ś", "Ž", "Ź" ),
+               'dsb' => array( "Ä\8c", "Ä\86", "Dź", "Ä\9a", "Ch", "Ł", "Ń", "Ŕ", "Š", "Ś", "Ž", "Ź" ),
                'el' => array(),
-               'en' => array(),
                'eo' => array( "Ĉ", "Ĝ", "Ĥ", "Ĵ", "Ŝ", "Ŭ" ),
                'es' => array( "Ñ" ),
                'et' => array( "Š", "Ž", "Õ", "Ä", "Ö", "Ü" ),
@@ -220,12 +237,10 @@ class IcuCollation extends Collation {
                'fy' => array(),
                'ga' => array(),
                'gd' => array(),
-               'gl' => array( "CH", "LL", "Ñ" ),
-               'hr' => array( "Č", "Ć", "DŽ", "Đ", "LJ", "NJ", "Š", "Ž" ),
-               'hsb' => array( "Č", "DŹ", "Ě", "CH", "Ł", "Ń", "Ř", "Š", "Ć", "Ž" ),
-               'hu' => array( "CS", "DZ", "DZS", "GY", "LY", "NY", "Ö", "SZ", "TY", "Ü", "ZS" ),
+               'gl' => array( "Ch", "Ll", "Ñ" ),
+               'hr' => array( "Č", "Ć", "Dž", "Đ", "Lj", "Nj", "Š", "Ž" ),
+               'hsb' => array( "Č", "Dź", "Ě", "Ch", "Ł", "Ń", "Ř", "Š", "Ć", "Ž" ),
                'is' => array( "Á", "Ð", "É", "Í", "Ó", "Ú", "Ý", "Þ", "Æ", "Ö", "Å" ),
-               'it' => array(),
                'kk' => array( "Ү", "І" ),
                'kl' => array( "Æ", "Ø", "Å" ),
                'ku' => array( "Ç", "Ê", "Î", "Ş", "Û" ),
@@ -236,28 +251,26 @@ class IcuCollation extends Collation {
                'lv' => array( "Č", "Ģ", "Ķ", "Ļ", "Ņ", "Š", "Ž" ),
                'mk' => array(),
                'mo' => array( "Ă", "Â", "Î", "Ş", "Ţ" ),
-               'mt' => array( "Ä\8a", "Ä ", "GĦ", "Ħ", "Ż" ),
+               'mt' => array( "Ä\8a", "Ä ", "Għ", "Ħ", "Ż" ),
                'nl' => array(),
                'no' => array( "Æ", "Ø", "Å" ),
                'oc' => array(),
-               'pt' => array(),
                'rm' => array(),
                'ro' => array( "Ă", "Â", "Î", "Ş", "Ţ" ),
-               'ru' => array(),
                'rup' => array( "Ă", "Â", "Î", "Ľ", "Ń", "Ş", "Ţ" ),
                'sco' => array(),
-               'sk' => array( "Ä", "Č", "CH", "Ô", "Š", "Ž" ),
+               'sk' => array( "Ä", "Č", "Ch", "Ô", "Š", "Ž" ),
                'sl' => array( "Č", "Š", "Ž" ),
                'smn' => array( "Á", "Č", "Đ", "Ŋ", "Š", "Ŧ", "Ž", "Æ", "Ø", "Å", "Ä", "Ö" ),
-               'sq' => array( "Ç", "DH", "Ë", "GJ", "LL", "NJ", "RR", "SH", "TH", "XH", "ZH" ),
+               'sq' => array( "Ç", "Dh", "Ë", "Gj", "Ll", "Nj", "Rr", "Sh", "Th", "Xh", "Zh" ),
                'sr' => array(),
                'sv' => array( "Å", "Ä", "Ö" ),
+               '-sv' => array( "Þ" ), // sorted as "th" in Swedish, causing unexpected output - bug 45446
                'tk' => array( "Ç", "Ä", "Ž", "Ň", "Ö", "Ş", "Ü", "Ý" ),
-               'tl' => array( "Ñ", "NG" ), /* 'fil' in the data source */
+               'tl' => array( "Ñ", "Ng" ),
                'tr' => array( "Ç", "Ğ", "İ", "Ö", "Ş", "Ü" ),
                'tt' => array( "Ә", "Ө", "Ү", "Җ", "Ң", "Һ" ),
-               'uk' => array( "Ґ", "Ь" ),
-               'uz' => array( "CH", "G'", "NG", "O'", "SH" ),
+               'uz' => array( "Ch", "G'", "Ng", "O'", "Sh" ),
                'vi' => array( "Ă", "Â", "Đ", "Ê", "Ô", "Ơ", "Ư" ),
        );
 
@@ -343,7 +356,12 @@ class IcuCollation extends Collation {
 
                if ( isset ( self::$tailoringFirstLetters[$this->locale] ) ) {
                        $letters = wfGetPrecompiledData( "first-letters-root.ser" );
+                       // Append additional characters
                        $letters = array_merge( $letters, self::$tailoringFirstLetters[$this->locale] );
+                       // Remove unnecessary ones, if any
+                       if ( isset( self::$tailoringFirstLetters[ '-' . $this->locale ] ) ) {
+                               $letters = array_diff( $letters, self::$tailoringFirstLetters[ '-' . $this->locale ] );
+                       }
                } else {
                        $letters = wfGetPrecompiledData( "first-letters-{$this->locale}.ser" );
                        if ( $letters === false ) {
@@ -413,13 +431,13 @@ class IcuCollation extends Collation {
         * Do a binary search, and return the index of the largest item that sorts
         * less than or equal to the target value.
         *
-        * @param $valueCallback array A function to call to get the value with
+        * @param array $valueCallback A function to call to get the value with
         *     a given array index.
-        * @param $valueCount int The number of items accessible via $valueCallback,
+        * @param int $valueCount The number of items accessible via $valueCallback,
         *     indexed from 0 to $valueCount - 1
-        * @param $comparisonCallback array A callback to compare two values, returning
+        * @param array $comparisonCallback A callback to compare two values, returning
         *     -1, 0 or 1 in the style of strcmp().
-        * @param $target string The target value to find.
+        * @param string $target The target value to find.
         *
         * @return int|bool The item index of the lower bound, or false if the target value
         *     sorts before all items.
index 699e83a..1d9ca92 100644 (file)
@@ -66,7 +66,6 @@ class ConfEditor {
         */
        var $stateStack;
 
-
        /**
         * The path stack is a stack of associative arrays with the following elements:
         *    name              The name of top level of the path
@@ -128,7 +127,7 @@ class ConfEditor {
 
        /**
         * Edit the text. Returns the edited text.
-        * @param $ops Array of operations.
+        * @param array $ops of operations.
         *
         * Operations are given as an associative array, with members:
         *    type:     One of delete, set, append or insert (required)
@@ -307,7 +306,7 @@ class ConfEditor {
         * setVar( $arr, 'foo/bar', 'baz', 3 ); will set
         * $arr['foo']['bar']['baz'] = 3;
         * @param $array array
-        * @param $path string slash-delimited path
+        * @param string $path slash-delimited path
         * @param $key mixed Key
         * @param $value mixed Value
         */
index a6eb79a..27a8507 100644 (file)
@@ -43,8 +43,8 @@ class Cookie {
         * cookies. Used internally after a request to parse the
         * Set-Cookie headers.
         *
-        * @param $value String: the value of the cookie
-        * @param $attr Array: possible key/values:
+        * @param string $value the value of the cookie
+        * @param array $attr possible key/values:
         *        expires A date string
         *        path    The path this cookie is used on
         *        domain  Domain this cookie is used on
@@ -84,8 +84,8 @@ class Cookie {
         * @todo fixme fails to detect 3-letter top-level domains
         * @todo fixme fails to detect 2-letter top-level domains for single-domain use (probably not a big problem in practice, but there are test cases)
         *
-        * @param $domain String: the domain to validate
-        * @param $originDomain String: (optional) the domain the cookie originates from
+        * @param string $domain the domain to validate
+        * @param string $originDomain (optional) the domain the cookie originates from
         * @return Boolean
         */
        public static function validateCookieDomain( $domain, $originDomain = null ) {
@@ -142,8 +142,8 @@ class Cookie {
        /**
         * Serialize the cookie jar into a format useful for HTTP Request headers.
         *
-        * @param $path String: the path that will be used. Required.
-        * @param $domain String: the domain that will be used. Required.
+        * @param string $path the path that will be used. Required.
+        * @param string $domain the domain that will be used. Required.
         * @return String
         */
        public function serializeToHttpRequest( $path, $domain ) {
@@ -232,7 +232,7 @@ class CookieJar {
         * Parse the content of an Set-Cookie HTTP Response header.
         *
         * @param $cookie String
-        * @param $domain String: cookie's domain
+        * @param string $domain cookie's domain
         * @return null
         */
        public function parseCookieResponseHeader ( $cookie, $domain ) {
index 4255d56..01bbc44 100644 (file)
@@ -148,7 +148,7 @@ class MWCryptRand {
        /**
         * Randomly hash data while mixing in clock drift data for randomness
         *
-        * @param $data string The data to randomly hash.
+        * @param string $data The data to randomly hash.
         * @return String The hashed bytes
         * @author Tim Starling
         */
@@ -468,8 +468,8 @@ class MWCryptRand {
         * You can use MWCryptRand::wasStrong() if you wish to know if the source used
         * was cryptographically strong.
         *
-        * @param $bytes int the number of bytes of random data to generate
-        * @param $forceStrong bool Pass true if you want generate to prefer cryptographically
+        * @param int $bytes the number of bytes of random data to generate
+        * @param bool $forceStrong Pass true if you want generate to prefer cryptographically
         *                          strong sources of entropy even if reading from them may steal
         *                          more entropy from the system than optimal.
         * @return String Raw binary random data
@@ -484,8 +484,8 @@ class MWCryptRand {
         * You can use MWCryptRand::wasStrong() if you wish to know if the source used
         * was cryptographically strong.
         *
-        * @param $chars int the number of hex chars of random data to generate
-        * @param $forceStrong bool Pass true if you want generate to prefer cryptographically
+        * @param int $chars the number of hex chars of random data to generate
+        * @param bool $forceStrong Pass true if you want generate to prefer cryptographically
         *                          strong sources of entropy even if reading from them may steal
         *                          more entropy from the system than optimal.
         * @return String Hexadecimal random data
index 04029db..419d7e5 100644 (file)
@@ -74,7 +74,7 @@ abstract class DataUpdate implements DeferrableUpdate {
         * This allows for limited transactional logic across multiple backends for storing
         * secondary data.
         *
-        * @param $updates array a list of DataUpdate instances
+        * @param array $updates a list of DataUpdate instances
         * @throws Exception|null
         */
        public static function runUpdates( $updates ) {
index 73c097e..a03214b 100644 (file)
@@ -135,7 +135,6 @@ $wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
  */
 $wgScriptExtension = '.php';
 
-
 /**@}*/
 
 /************************************************************************//**
@@ -359,7 +358,7 @@ $wgImgAuthPublicTest = true;
  *                      FSRepo is also supported for backwards compatibility.
  *
  *   - name             A unique name for the repository (but $wgLocalFileRepo should be 'local').
- *                      The name should consist of alpha-numberic characters.
+ *                      The name should consist of alpha-numeric characters.
  *   - backend          A file backend name (see $wgFileBackends).
  *
  * For most core repos:
@@ -413,7 +412,7 @@ $wgImgAuthPublicTest = true;
  *
  * ForeignDBRepo:
  *   - dbType, dbServer, dbUser, dbPassword, dbName, dbFlags
- *                      equivalent to the corresponding member of $wgDBservers
+ *                       equivalent to the corresponding member of $wgDBservers
  *   - tablePrefix       Table prefix, the foreign wiki's $wgDBprefix
  *   - hasSharedCache    True if the wiki's shared cache is accessible via the local $wgMemc
  *
@@ -424,7 +423,7 @@ $wgImgAuthPublicTest = true;
  * If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values.
  * Otherwise, set $wgLocalFileRepo to a repository structure as described above.
  * If you set $wgUseInstantCommons to true, it will add an entry for Commons.
- * If you set $wgForeignFileRepos to an array of repostory structures, those will
+ * If you set $wgForeignFileRepos to an array of repository structures, those will
  * be searched after the local file repo.
  * Otherwise, you will only have access to local media files.
  *
@@ -833,6 +832,13 @@ $wgImageMagickTempDir = false;
  */
 $wgCustomConvertCommand = false;
 
+/** used for lossless jpeg rotation
+ *
+ * @since 1.21
+ * **/
+$wgJpegTran = '/usr/bin/jpegtran';
+
+
 /**
  * Some tests and extensions use exiv2 to manipulate the EXIF metadata in some
  * image formats.
@@ -985,7 +991,7 @@ $wgAntivirus = null;
  * "command" is the full command to call the virus scanner - %f will be
  * replaced with the name of the file to scan. If not present, the filename
  * will be appended to the command. Note that this must be overwritten if the
- * scanner is not in the system path; in that case, plase set
+ * scanner is not in the system path; in that case, please set
  * $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full
  * path.
  *
@@ -995,8 +1001,8 @@ $wgAntivirus = null;
  *     the scan to be failed. This will pass the file if $wgAntivirusRequired
  *     is not set.
  *   - An exit code mapped to AV_SCAN_ABORTED causes the function to consider
- *     the file to have an usupported format, which is probably imune to
- *     virusses. This causes the file to pass.
+ *     the file to have an unsupported format, which is probably immune to
+ *     viruses. This causes the file to pass.
  *   - An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning
  *     no virus was found.
  *   - All other codes (like AV_VIRUS_FOUND) will cause the function to report
@@ -1015,14 +1021,13 @@ $wgAntivirusSetup = array(
                'codemap' => array(
                        "0" => AV_NO_VIRUS, # no virus
                        "1" => AV_VIRUS_FOUND, # virus found
-                       "52" => AV_SCAN_ABORTED, # unsupported file format (probably imune)
+                       "52" => AV_SCAN_ABORTED, # unsupported file format (probably immune)
                        "*" => AV_SCAN_FAILED, # else scan failed
                ),
                'messagepattern' => '/.*?:(.*)/sim',
        ),
 );
 
-
 /** Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected. */
 $wgAntivirusRequired = true;
 
@@ -1245,7 +1250,7 @@ $wgEnableUserEmail = true;
  * instead of From. ($wgEmergencyContact will be used as From.)
  *
  * Some mailers (eg sSMTP) set the SMTP envelope sender to the From value,
- * which can cause problems with SPF validation and leak recipient addressses
+ * which can cause problems with SPF validation and leak recipient addresses
  * when bounces are sent to the sender.
  */
 $wgUserEmailUseReplyTo = false;
@@ -1444,7 +1449,7 @@ $wgAllDBsAreLocalhost = false;
  * preferences shared (preferences were stored in the user table prior to 1.16)
  *
  * $wgSharedTables may be customized with a list of tables to share in the shared
- * datbase. However it is advised to limit what tables you do share as many of
+ * database. However it is advised to limit what tables you do share as many of
  * MediaWiki's tables may have side effects if you try to share them.
  *
  * $wgSharedPrefix is the table prefix for the shared database. It defaults to
@@ -1532,7 +1537,7 @@ $wgDBerrorLog = false;
  * Timezone to use in the error log.
  * Defaults to the wiki timezone ($wgLocaltimezone).
  *
- * A list of useable timezones can found at:
+ * A list of usable timezones can found at:
  * http://php.net/manual/en/timezones.php
  *
  * @par Examples:
@@ -1599,7 +1604,6 @@ $wgOldChangeTagsIndex = false;
 
 /**@}*/ # End of DB settings }
 
-
 /************************************************************************//**
  * @name   Text storage
  * @{
@@ -1837,7 +1841,7 @@ $wgSessionsInMemcached = false;
 
 /**
  * Store sessions in an object cache, configured by $wgSessionCacheType. This
- * can be useful to improve performance, or to avoid the locking behaviour of
+ * can be useful to improve performance, or to avoid the locking behavior of
  * PHP's default session handler, which tends to prevent multiple requests for
  * the same user from acting concurrently.
  */
@@ -2207,14 +2211,14 @@ $wgUsePrivateIPs = false;
  * change it in their preferences.
  *
  * This also defines the language of pages in the wiki. The content is wrapped
- * in a html element with lang=XX attribute. This behaviour can be overriden
+ * in a html element with lang=XX attribute. This behavior can be overridden
  * via hooks, see Title::getPageLanguage.
  */
 $wgLanguageCode = 'en';
 
 /**
  * Language cache size, or really how many languages can we handle
- * simultanously without degrading to crawl speed.
+ * simultaneously without degrading to crawl speed.
  */
 $wgLangObjCacheSize = 10;
 
@@ -2240,7 +2244,7 @@ $wgExtraLanguageNames = array();
 
 /**
  * List of language codes that don't correspond to an actual language.
- * These codes are mostly leftoffs from renames, or other legacy things.
+ * These codes are mostly left-offs from renames, or other legacy things.
  * This array makes them not appear as a selectable language on the installer,
  * and excludes them when running the transstat.php script.
  */
@@ -2480,7 +2484,7 @@ $wgForceUIMsgAsContentMsg = array();
  * Timezones can be translated by editing MediaWiki messages of type
  * timezone-nameinlowercase like timezone-utc.
  *
- * A list of useable timezones can found at:
+ * A list of usable timezones can found at:
  * http://php.net/manual/en/timezones.php
  *
  * @par Examples:
@@ -2499,7 +2503,7 @@ $wgLocaltimezone = null;
  * for anonymous users and new user accounts.
  *
  * This setting is used for most date/time displays in the software, and is
- * overrideable in user preferences. It is *not* used for signature timestamps.
+ * overridable in user preferences. It is *not* used for signature timestamps.
  *
  * By default, this will be set to match $wgLocaltimezone.
  */
@@ -2598,7 +2602,7 @@ $wgWellFormedXml = true;
  * @par Example:
  * @code
  * $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
- * @endCode
+ * @endcode
  * Normally we wouldn't have to define this in the root "<html>"
  * element, but IE needs it there in some circumstances.
  *
@@ -2783,7 +2787,7 @@ $wgExperimentalHtmlIds = false;
  * for the icon, the following keys are used:
  *  - src: An absolute url to the image to use for the icon, this is recommended
  *        but not required, however some skins will ignore icons without an image
- * - url: The url to use in the a element arround the text or icon, if not set an a element will not be outputted
+ * - url: The url to use in the a element around the text or icon, if not set an a element will not be outputted
  * - alt: This is the text form of the icon, it will be displayed without an image in
  *        skins like Modern or if src is not set, and will otherwise be used as
  *        the alt="" for the image. This key is required.
@@ -2853,10 +2857,9 @@ $wgBetterDirectionality = true;
  */
 $wgSend404Code = true;
 
-
 /**
  * The $wgShowRollbackEditCount variable is used to show how many edits will be
- * rollback. The numeric value of the varible are the limit up to are counted.
+ * rollback. The numeric value of the variable are the limit up to are counted.
  * If the value is false or 0, the edits are not counted. Disabling this will
  * furthermore prevent MediaWiki from hiding some useless rollback links.
  *
@@ -3058,7 +3061,6 @@ $wgResourceLoaderExperimentalAsyncLoading = false;
 
 /** @} */ # End of resource loader settings }
 
-
 /*************************************************************************//**
  * @name   Page title and interwiki link settings
  * @{
@@ -3205,7 +3207,7 @@ $wgInterwikiFallbackSite = 'wiki';
 /** @} */ # end of Interwiki caching settings.
 
 /**
- * If local interwikis are set up which allow redirects,
+ * If local interwikies are set up which allow redirects,
  * set this regexp to restrict URLs which will be displayed
  * as 'redirected from' links.
  *
@@ -3305,7 +3307,7 @@ $wgInvalidRedirectTargets = array( 'Filepath', 'Mypage', 'Mytalk' );
  *  class             The class name
  *
  *  preprocessorClass The preprocessor class. Two classes are currently available:
- *                    Preprocessor_Hash, which uses plain PHP arrays for tempoarary
+ *                    Preprocessor_Hash, which uses plain PHP arrays for temporary
  *                    storage, and Preprocessor_DOM, which uses the DOM module for
  *                    temporary storage. Preprocessor_DOM generally uses less memory;
  *                    the speed of the two is roughly the same.
@@ -3345,7 +3347,6 @@ $wgMaxPPNodeCount = 1000000;
  */
 $wgMaxGeneratedPPNodeCount = 1000000;
 
-
 /**
  * Maximum recursion depth for templates within templates.
  * The current parser adds two levels to the PHP call stack for each template,
@@ -3927,7 +3928,7 @@ $wgGroupPermissions['*']['edit'] = true;
 $wgGroupPermissions['*']['createpage'] = true;
 $wgGroupPermissions['*']['createtalk'] = true;
 $wgGroupPermissions['*']['writeapi'] = true;
-//$wgGroupPermissions['*']['patrolmarks']      = false; // let anons see what was patrolled
+#$wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled
 
 // Implicit group for all logged-in accounts
 $wgGroupPermissions['user']['move'] = true;
@@ -3958,7 +3959,7 @@ $wgGroupPermissions['bot']['autopatrol'] = true;
 $wgGroupPermissions['bot']['suppressredirect'] = true;
 $wgGroupPermissions['bot']['apihighlimits'] = true;
 $wgGroupPermissions['bot']['writeapi'] = true;
-#$wgGroupPermissions['bot']['editprotected']    = true; // can edit all protected pages without cascade protection enabled
+#$wgGroupPermissions['bot']['editprotected'] = true; // can edit all protected pages without cascade protection enabled
 
 // Most extra permission abilities go to this group
 $wgGroupPermissions['sysop']['block'] = true;
@@ -3995,8 +3996,8 @@ $wgGroupPermissions['sysop']['noratelimit'] = true;
 $wgGroupPermissions['sysop']['movefile'] = true;
 $wgGroupPermissions['sysop']['unblockself'] = true;
 $wgGroupPermissions['sysop']['suppressredirect'] = true;
-#$wgGroupPermissions['sysop']['upload_by_url']    = true;
-#$wgGroupPermissions['sysop']['mergehistory']     = true;
+#$wgGroupPermissions['sysop']['upload_by_url'] = true;
+#$wgGroupPermissions['sysop']['mergehistory'] = true;
 
 // Permission to change users' group assignments
 $wgGroupPermissions['bureaucrat']['userrights'] = true;
@@ -4006,8 +4007,8 @@ $wgGroupPermissions['bureaucrat']['noratelimit'] = true;
 // Permission to export pages including linked pages regardless of $wgExportMaxLinkDepth
 #$wgGroupPermissions['bureaucrat']['override-export-depth'] = true;
 
-#$wgGroupPermissions['sysop']['deletelogentry']  = true;
-#$wgGroupPermissions['sysop']['deleterevision']  = true;
+#$wgGroupPermissions['sysop']['deletelogentry'] = true;
+#$wgGroupPermissions['sysop']['deleterevision'] = true;
 // To hide usernames from users and Sysops
 #$wgGroupPermissions['suppress']['hideuser'] = true;
 // To hide revisions/log items from users and Sysops
@@ -4105,7 +4106,7 @@ $wgNamespaceProtection = array();
  * namespaces constants (NS_USER, NS_MAIN...).
  *
  * Among other things, this may be useful to enforce read-restrictions
- * which may otherwise be bypassed by using the template machanism.
+ * which may otherwise be bypassed by using the template mechanism.
  */
 $wgNonincludableNamespaces = array();
 
@@ -4406,7 +4407,7 @@ $wgBlockOpenProxies = false;
 /** Port we want to scan for a proxy */
 $wgProxyPorts = array( 80, 81, 1080, 3128, 6588, 8000, 8080, 8888, 65506 );
 /** Script used to scan */
-$wgProxyScriptPath = "$IP/maintenance/proxy_check.php";
+$wgProxyScriptPath = "$IP/maintenance/proxyCheck.php";
 /** */
 $wgProxyMemcExpiry = 86400;
 /** This should always be customised in LocalSettings.php */
@@ -4446,7 +4447,6 @@ $wgCookieExpiration = 180 * 86400;
  */
 $wgCookieDomain = '';
 
-
 /**
  * Set this variable if you want to restrict cookies to a certain path within
  * the domain specified by $wgCookieDomain.
@@ -4787,7 +4787,6 @@ $wgJavaScriptTestConfig = array(
        ),
 );
 
-
 /**
  * Overwrite the caching key prefix with custom value.
  * @since 1.19
@@ -4816,7 +4815,7 @@ $wgDebugToolbar = false;
 $wgDisableTextSearch = false;
 
 /**
- * Set to true to have nicer highligted text in search results,
+ * Set to true to have nicer highlighted text in search results,
  * by default off due to execution overhead
  */
 $wgAdvancedSearchHighlighting = false;
@@ -4842,7 +4841,7 @@ $wgCountTotalSearchHits = false;
 /**
  * Template for OpenSearch suggestions, defaults to API action=opensearch
  *
- * Sites with heavy load would tipically have these point to a custom
+ * Sites with heavy load would typically have these point to a custom
  * PHP wrapper to avoid firing up mediawiki for every keystroke
  *
  * Placeholders: {searchTerms}
@@ -4934,14 +4933,14 @@ $wgUseTwoButtonsSearchForm = true;
 
 /**
  * Array of namespaces to generate a Google sitemap for when the
- * maintenance/generateSitemap.php script is run, or false if one is to be ge-
- * nerated for all namespaces.
+ * maintenance/generateSitemap.php script is run, or false if one is to be
+ * generated for all namespaces.
  */
 $wgSitemapNamespaces = false;
 
 /**
  * Custom namespace priorities for sitemaps. Setting this will allow you to
- * set custom priorities to namsepaces when sitemaps are generated using the
+ * set custom priorities to namespaces when sitemaps are generated using the
  * maintenance/generateSitemap.php script.
  *
  * This should be a map of namespace IDs to priority
@@ -4971,7 +4970,7 @@ $wgEnableSearchContributorsByIP = true;
 
 /**
  * Path to the GNU diff3 utility. If the file doesn't exist, edit conflicts will
- * fall back to the old behaviour (no merging).
+ * fall back to the old behavior (no merging).
  */
 $wgDiff3 = '/usr/bin/diff3';
 
@@ -4982,7 +4981,7 @@ $wgDiff = '/usr/bin/diff';
 
 /**
  * Which namespaces have special treatment where they should be preview-on-open
- * Internaly only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki)
+ * Internally only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki)
  * can specify namespaces of pages they have special treatment for
  */
 $wgPreviewOnOpenNamespaces = array(
@@ -5462,7 +5461,7 @@ $wgAutoloadClasses = array();
  *     'version' => 1.9,
  *     'path' => __FILE__,
  *     'author' => 'Foo Barstein',
- *     'url' => 'http://wwww.example.com/Example%20Extension/',
+ *     'url' => 'http://www.example.com/Example%20Extension/',
  *     'description' => 'An example extension',
  *     'descriptionmsg' => 'exampleextension-desc',
  * );
@@ -5546,6 +5545,8 @@ $wgJobTypesExcludedFromDefaultQueue = array( 'AssembleUploadChunks', 'PublishSta
 
 /**
  * Map of job types to configuration arrays.
+ * This determines which queue class and storage system is used for each job type.
+ * Job types that do not have explicit configuration will use the 'default' config.
  * These settings should be global to all wikis.
  */
 $wgJobTypeConf = array(
@@ -5819,111 +5820,10 @@ $wgDisableQueryPageUpdate = false;
 /**
  * List of special pages, followed by what subtitle they should go under
  * at Special:SpecialPages
+ *
+ * @deprecated 1.21 Override SpecialPage::getGroupName instead
  */
-$wgSpecialPageGroups = array(
-       'DoubleRedirects' => 'maintenance',
-       'BrokenRedirects' => 'maintenance',
-       'Lonelypages' => 'maintenance',
-       'Uncategorizedpages' => 'maintenance',
-       'Uncategorizedcategories' => 'maintenance',
-       'Uncategorizedimages' => 'maintenance',
-       'Uncategorizedtemplates' => 'maintenance',
-       'Unusedcategories' => 'maintenance',
-       'Unusedimages' => 'maintenance',
-       'Protectedpages' => 'maintenance',
-       'Protectedtitles' => 'maintenance',
-       'Unusedtemplates' => 'maintenance',
-       'Withoutinterwiki' => 'maintenance',
-       'Longpages' => 'maintenance',
-       'Shortpages' => 'maintenance',
-       'Ancientpages' => 'maintenance',
-       'Deadendpages' => 'maintenance',
-       'Wantedpages' => 'maintenance',
-       'Wantedcategories' => 'maintenance',
-       'Wantedfiles' => 'maintenance',
-       'Wantedtemplates' => 'maintenance',
-       'Unwatchedpages' => 'maintenance',
-       'Fewestrevisions' => 'maintenance',
-
-       'Userlogin' => 'login',
-       'Userlogout' => 'login',
-       'CreateAccount' => 'login',
-
-       'Recentchanges' => 'changes',
-       'Recentchangeslinked' => 'changes',
-       'Watchlist' => 'changes',
-       'Newimages' => 'changes',
-       'Newpages' => 'changes',
-       'Log' => 'changes',
-       'Tags' => 'changes',
-
-       'Upload' => 'media',
-       'Listfiles' => 'media',
-       'MIMEsearch' => 'media',
-       'FileDuplicateSearch' => 'media',
-       'Filepath' => 'media',
-
-       'Listusers' => 'users',
-       'Activeusers' => 'users',
-       'Listgrouprights' => 'users',
-       'BlockList' => 'users',
-       'Contributions' => 'users',
-       'Emailuser' => 'users',
-       'Listadmins' => 'users',
-       'Listbots' => 'users',
-       'Userrights' => 'users',
-       'Block' => 'users',
-       'Unblock' => 'users',
-       'Preferences' => 'users',
-       'ChangeEmail' => 'users',
-       'ChangePassword' => 'users',
-       'DeletedContributions' => 'users',
-       'PasswordReset' => 'users',
-
-       'Mostlinked' => 'highuse',
-       'Mostlinkedcategories' => 'highuse',
-       'Mostlinkedtemplates' => 'highuse',
-       'Mostcategories' => 'highuse',
-       'Mostimages' => 'highuse',
-       'Mostinterwikis' => 'highuse',
-       'Mostrevisions' => 'highuse',
-
-       'Allpages' => 'pages',
-       'Prefixindex' => 'pages',
-       'Listredirects' => 'pages',
-       'Categories' => 'pages',
-       'Disambiguations' => 'pages',
-       'PagesWithProp' => 'pages',
-
-       'Randompage' => 'redirects',
-       'Randomredirect' => 'redirects',
-       'Mypage' => 'redirects',
-       'Mytalk' => 'redirects',
-       'Mycontributions' => 'redirects',
-       'Search' => 'redirects',
-       'LinkSearch' => 'redirects',
-
-       'ComparePages' => 'pagetools',
-       'Movepage' => 'pagetools',
-       'MergeHistory' => 'pagetools',
-       'Revisiondelete' => 'pagetools',
-       'Undelete' => 'pagetools',
-       'Export' => 'pagetools',
-       'Import' => 'pagetools',
-       'Whatlinkshere' => 'pagetools',
-
-       'Statistics' => 'wiki',
-       'Version' => 'wiki',
-       'Lockdb' => 'wiki',
-       'Unlockdb' => 'wiki',
-       'Allmessages' => 'wiki',
-       'Popularpages' => 'wiki',
-
-       'Specialpages' => 'other',
-       'Blockme' => 'other',
-       'Booksources' => 'other',
-       'JavaScriptTest' => 'other',
-);
+$wgSpecialPageGroups = array();
 
 /** Whether or not to sort special pages in Special:Specialpages */
 
@@ -6018,8 +5918,8 @@ $wgNamespaceRobotPolicies = array();
 
 /**
  * Robot policies per article. These override the per-namespace robot policies.
- * Must be in the form of an array where the key part is a properly canonical-
- * ised text form title and the value is a robot policy.
+ * Must be in the form of an array where the key part is a properly canonicalised
+ * text form title and the value is a robot policy.
  *
  * @par Example:
  * @code
index 716e65c..2ca646b 100644 (file)
@@ -66,7 +66,7 @@ class DeferredUpdates {
        /**
         * Do any deferred updates and clear the list
         *
-        * @param $commit String: set to 'commit' to commit after every update to
+        * @param string $commit set to 'commit' to commit after every update to
         *                prevent lock contention
         */
        public static function doUpdates( $commit = '' ) {
index c4b0b47..3123548 100644 (file)
@@ -61,7 +61,6 @@ define( 'DB_READ', -1 );
 define( 'DB_WRITE', -2 );
 define( 'DB_LAST', -3 ); # deprecated since 2008, usage throws exception
 
-
 /**@{
  * Virtual namespaces; don't appear in the page database
  */
index d42edd7..a0b6c93 100644 (file)
@@ -40,90 +40,90 @@ class EditPage {
        /**
         * Status: Article successfully updated
         */
-       const AS_SUCCESS_UPDATE            = 200;
+       const AS_SUCCESS_UPDATE = 200;
 
        /**
         * Status: Article successfully created
         */
-       const AS_SUCCESS_NEW_ARTICLE       = 201;
+       const AS_SUCCESS_NEW_ARTICLE = 201;
 
        /**
         * Status: Article update aborted by a hook function
         */
-       const AS_HOOK_ERROR                = 210;
+       const AS_HOOK_ERROR = 210;
 
        /**
         * Status: A hook function returned an error
         */
-       const AS_HOOK_ERROR_EXPECTED       = 212;
+       const AS_HOOK_ERROR_EXPECTED = 212;
 
        /**
         * Status: User is blocked from editting this page
         */
-       const AS_BLOCKED_PAGE_FOR_USER     = 215;
+       const AS_BLOCKED_PAGE_FOR_USER = 215;
 
        /**
         * Status: Content too big (> $wgMaxArticleSize)
         */
-       const AS_CONTENT_TOO_BIG           = 216;
+       const AS_CONTENT_TOO_BIG = 216;
 
        /**
         * Status: User cannot edit? (not used)
         */
-       const AS_USER_CANNOT_EDIT          = 217;
+       const AS_USER_CANNOT_EDIT = 217;
 
        /**
         * Status: this anonymous user is not allowed to edit this page
         */
-       const AS_READ_ONLY_PAGE_ANON       = 218;
+       const AS_READ_ONLY_PAGE_ANON = 218;
 
        /**
         * Status: this logged in user is not allowed to edit this page
         */
-       const AS_READ_ONLY_PAGE_LOGGED     = 219;
+       const AS_READ_ONLY_PAGE_LOGGED = 219;
 
        /**
         * Status: wiki is in readonly mode (wfReadOnly() == true)
         */
-       const AS_READ_ONLY_PAGE            = 220;
+       const AS_READ_ONLY_PAGE = 220;
 
        /**
         * Status: rate limiter for action 'edit' was tripped
         */
-       const AS_RATE_LIMITED              = 221;
+       const AS_RATE_LIMITED = 221;
 
        /**
         * Status: article was deleted while editting and param wpRecreate == false or form
         * was not posted
         */
-       const AS_ARTICLE_WAS_DELETED       = 222;
+       const AS_ARTICLE_WAS_DELETED = 222;
 
        /**
         * Status: user tried to create this page, but is not allowed to do that
         * ( Title->usercan('create') == false )
         */
-       const AS_NO_CREATE_PERMISSION      = 223;
+       const AS_NO_CREATE_PERMISSION = 223;
 
        /**
         * Status: user tried to create a blank page
         */
-       const AS_BLANK_ARTICLE             = 224;
+       const AS_BLANK_ARTICLE = 224;
 
        /**
         * Status: (non-resolvable) edit conflict
         */
-       const AS_CONFLICT_DETECTED         = 225;
+       const AS_CONFLICT_DETECTED = 225;
 
        /**
         * Status: no edit summary given and the user has forceeditsummary set and the user is not
         * editting in his own userspace or talkspace and wpIgnoreBlankSummary == false
         */
-       const AS_SUMMARY_NEEDED            = 226;
+       const AS_SUMMARY_NEEDED = 226;
 
        /**
         * Status: user tried to create a new section without content
         */
-       const AS_TEXTBOX_EMPTY             = 228;
+       const AS_TEXTBOX_EMPTY = 228;
 
        /**
         * Status: article is too big (> $wgMaxArticleSize), after merging in the new section
@@ -133,37 +133,37 @@ class EditPage {
        /**
         * not used
         */
-       const AS_OK                        = 230;
+       const AS_OK = 230;
 
        /**
         * Status: WikiPage::doEdit() was unsuccessfull
         */
-       const AS_END                       = 231;
+       const AS_END = 231;
 
        /**
         * Status: summary contained spam according to one of the regexes in $wgSummarySpamRegex
         */
-       const AS_SPAM_ERROR                = 232;
+       const AS_SPAM_ERROR = 232;
 
        /**
         * Status: anonymous user is not allowed to upload (User::isAllowed('upload') == false)
         */
-       const AS_IMAGE_REDIRECT_ANON       = 233;
+       const AS_IMAGE_REDIRECT_ANON = 233;
 
        /**
         * Status: logged in user is not allowed to upload (User::isAllowed('upload') == false)
         */
-       const AS_IMAGE_REDIRECT_LOGGED     = 234;
+       const AS_IMAGE_REDIRECT_LOGGED = 234;
 
        /**
         * Status: can't parse content
         */
-       const AS_PARSE_ERROR                = 240;
+       const AS_PARSE_ERROR = 240;
 
        /**
         * HTML id and name for the beginning of the edit form.
         */
-       const EDITFORM_ID                  = 'editform';
+       const EDITFORM_ID = 'editform';
 
        /**
         * Prefix of key for cookie used to pass post-edit state.
@@ -397,9 +397,9 @@ class EditPage {
 
                $this->isConflict = false;
                // css / js subpages of user pages get a special treatment
-               $this->isCssJsSubpage       = $this->mTitle->isCssJsSubpage();
-               $this->isCssSubpage         = $this->mTitle->isCssSubpage();
-               $this->isJsSubpage          = $this->mTitle->isJsSubpage();
+               $this->isCssJsSubpage = $this->mTitle->isCssJsSubpage();
+               $this->isCssSubpage = $this->mTitle->isCssSubpage();
+               $this->isJsSubpage = $this->mTitle->isJsSubpage();
                $this->isWrongCaseCssJsPage = $this->isWrongCaseCssJsPage();
 
                # Show applicable editing introductions
@@ -476,7 +476,7 @@ class EditPage {
         *   "View source for ..." page displaying the source code after the error message.
         *
         * @since 1.19
-        * @param $permErrors Array of permissions errors, as returned by
+        * @param array $permErrors of permissions errors, as returned by
         *                    Title::getUserPermissionsErrors().
         * @throws PermissionsError
         */
@@ -563,7 +563,7 @@ class EditPage {
                        // Nothing *to* preview for new sections
                        return false;
                } elseif ( ( $wgRequest->getVal( 'preload' ) !== null || $this->mTitle->exists() ) && $wgUser->getOption( 'previewonfirst' ) ) {
-                       // Standard preference behaviour
+                       // Standard preference behavior
                        return true;
                } elseif ( !$this->mTitle->exists() &&
                        isset( $wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] ) &&
@@ -714,7 +714,7 @@ class EditPage {
                                $this->starttime = null;
                        }
 
-                       $this->recreate  = $request->getCheck( 'wpRecreate' );
+                       $this->recreate = $request->getCheck( 'wpRecreate' );
 
                        $this->minoredit = $request->getCheck( 'wpMinoredit' );
                        $this->watchthis = $request->getCheck( 'wpWatchthis' );
@@ -732,18 +732,18 @@ class EditPage {
                } else {
                        # Not a posted form? Start with nothing.
                        wfDebug( __METHOD__ . ": Not a posted form.\n" );
-                       $this->textbox1     = '';
-                       $this->summary      = '';
+                       $this->textbox1 = '';
+                       $this->summary = '';
                        $this->sectiontitle = '';
-                       $this->edittime     = '';
-                       $this->starttime    = wfTimestampNow();
-                       $this->edit         = false;
-                       $this->preview      = false;
-                       $this->save         = false;
-                       $this->diff         = false;
-                       $this->minoredit    = false;
-                       $this->watchthis    = $request->getBool( 'watchthis', false ); // Watch may be overriden by request parameters
-                       $this->recreate     = false;
+                       $this->edittime = '';
+                       $this->starttime = wfTimestampNow();
+                       $this->edit = false;
+                       $this->preview = false;
+                       $this->save = false;
+                       $this->diff = false;
+                       $this->minoredit = false;
+                       $this->watchthis = $request->getBool( 'watchthis', false ); // Watch may be overriden by request parameters
+                       $this->recreate = false;
 
                        // When creating a new section, we can preload a section title by passing it as the
                        // preloadtitle parameter in the URL (Bug 13100)
@@ -1006,7 +1006,7 @@ class EditPage {
                $rev = $this->mArticle->getRevision();
                $content = $rev ? $rev->getContent( Revision::RAW ) : null;
 
-               if ( $content  === false || $content === null ) {
+               if ( $content === false || $content === null ) {
                        if ( !$this->contentModel ) $this->contentModel = $this->getTitle()->getContentModel();
                        $handler = ContentHandler::getForModelID( $this->contentModel );
 
@@ -1020,7 +1020,6 @@ class EditPage {
                }
        }
 
-
        /**
         * Use this method before edit() to preload some text into the edit box
         *
@@ -1050,7 +1049,7 @@ class EditPage {
         * Get the contents to be preloaded into the box, either set by
         * an earlier setPreloadText() or by loading the given page.
         *
-        * @param $preload String: representing the title to preload from.
+        * @param string $preload representing the title to preload from.
         *
         * @return String
         *
@@ -1069,7 +1068,7 @@ class EditPage {
         * Get the contents to be preloaded into the box, either set by
         * an earlier setPreloadText() or by loading the given page.
         *
-        * @param $preload String: representing the title to preload from.
+        * @param string $preload representing the title to preload from.
         *
         * @return Content
         *
@@ -1189,7 +1188,9 @@ class EditPage {
                // FIXME: once the interface for internalAttemptSave() is made nicer, this should use the message in $status
                if ( $status->value == self::AS_SUCCESS_UPDATE || $status->value == self::AS_SUCCESS_NEW_ARTICLE ) {
                        $this->didSave = true;
-                       $this->setPostEditCookie();
+                       if ( !$resultDetails['nullEdit'] ) {
+                               $this->setPostEditCookie();
+                       }
                }
 
                switch ( $status->value ) {
@@ -1324,8 +1325,12 @@ class EditPage {
        /**
         * Attempt submission (no UI)
         *
-        * @param $result
-        * @param $bot bool
+        * @param array $result array to add statuses to, currently with the possible keys:
+        *  spam - string - Spam string from content if any spam is detected by matchSpamRegex
+        *  sectionanchor - string - Section anchor for a section save
+        *  nullEdit - boolean - Set if doEditContent is OK.  True if null edit, false otherwise.
+        *  redirect - boolean -  Set if doEditContent is OK.  True if resulting revision is a redirect
+        * @param bool $bot True if edit is being made under the bot right.
         *
         * @return Status object, possibly with a message, but always with one of the AS_* constants in $status->value,
         *
@@ -1718,6 +1723,7 @@ class EditPage {
                        return $doEditStatus;
                }
 
+               $result['nullEdit'] = $doEditStatus->hasMessage( 'edit-no-change' );
                $result['redirect'] = $content->isRedirect();
                $this->updateWatchlist();
                wfProfileOut( __METHOD__ );
@@ -2049,7 +2055,7 @@ class EditPage {
         * an exception will be raised. Set $this->allowNonTextContent to true to allow editing of non-textual
         * content.
         *
-        * @param String|null|bool $text Text to unserialize
+        * @param string|null|bool $text Text to unserialize
         * @return Content The content object created from $text. If $text was false or null, false resp. null will be
         *                 returned instead.
         *
@@ -2420,7 +2426,6 @@ class EditPage {
                $this->showHeaderCopyrightWarning();
        }
 
-
        /**
         * Standard summary input and label (wgSummary), abstracted so EditPage
         * subclasses may reorganize the form.
@@ -2428,10 +2433,10 @@ class EditPage {
         * inferred by the id given to the input. You can remove them both by
         * passing array( 'id' => false ) to $userInputAttrs.
         *
-        * @param $summary string The value of the summary input
-        * @param $labelText string The html to place inside the label
-        * @param $inputAttrs array of attrs to use on the input
-        * @param $spanLabelAttrs array of attrs to use on the span inside the label
+        * @param string $summary The value of the summary input
+        * @param string $labelText The html to place inside the label
+        * @param array $inputAttrs of attrs to use on the input
+        * @param array $spanLabelAttrs of attrs to use on the span inside the label
         *
         * @return array An array in the format array( $label, $input )
         */
@@ -2465,7 +2470,7 @@ class EditPage {
         * @param $isSubjectPreview Boolean: true if this is the section subject/title
         *                          up top, or false if this is the comment summary
         *                          down below the textarea
-        * @param $summary String: The text of the summary to display
+        * @param string $summary The text of the summary to display
         * @return String
         */
        protected function showSummaryInput( $isSubjectPreview, $summary = "" ) {
@@ -2491,7 +2496,7 @@ class EditPage {
         * @param $isSubjectPreview Boolean: true if this is the section subject/title
         *                          up top, or false if this is the comment summary
         *                          down below the textarea
-        * @param $summary String: the text of the summary to display
+        * @param string $summary the text of the summary to display
         * @return String
         */
        protected function getSummaryPreview( $isSubjectPreview, $summary = "" ) {
@@ -2564,8 +2569,8 @@ HTML
         * The $textoverride method can be used by subclasses overriding showContentForm
         * to pass back to this method.
         *
-        * @param $customAttribs array of html attributes to use in the textarea
-        * @param $textoverride String: optional text to override $this->textarea1 with
+        * @param array $customAttribs of html attributes to use in the textarea
+        * @param string $textoverride optional text to override $this->textarea1 with
         */
        protected function showTextbox1( $customAttribs = null, $textoverride = null ) {
                if ( $this->wasDeletedSinceLastEdit() && $this->formtype == 'save' ) {
@@ -2669,7 +2674,7 @@ HTML
         * Append preview output to $wgOut.
         * Includes category rendering if this is a category page.
         *
-        * @param $text String: the HTML to be output for the preview.
+        * @param string $text the HTML to be output for the preview.
         */
        protected function showPreview( $text ) {
                global $wgOut;
@@ -3292,8 +3297,8 @@ HTML
         * Returns an array of html code of the following checkboxes:
         * minor and watch
         *
-        * @param $tabindex int Current tabindex
-        * @param $checked Array of checkbox => bool, where bool indicates the checked
+        * @param int $tabindex Current tabindex
+        * @param array $checked of checkbox => bool, where bool indicates the checked
         *                 status of the checkbox
         *
         * @return array
@@ -3343,7 +3348,7 @@ HTML
         * Returns an array of html code of the following buttons:
         * save, diff, preview and live
         *
-        * @param $tabindex int Current tabindex
+        * @param int $tabindex Current tabindex
         *
         * @return array
         */
@@ -3472,7 +3477,7 @@ HTML
        /**
         * Produce the stock "your edit contains spam" page
         *
-        * @param $match string|bool Text which triggered one or more filters
+        * @param string|bool $match Text which triggered one or more filters
         * @deprecated since 1.17 Use method spamPageWithContent() instead
         */
        static function spamPage( $match = false ) {
index 81d1a9b..530afd0 100644 (file)
@@ -64,8 +64,8 @@ class MWException extends Exception {
        /**
         * Run hook to allow extensions to modify the text of the exception
         *
-        * @param $name string: class name of the exception
-        * @param $args array: arguments to pass to the callback functions
+        * @param string $name class name of the exception
+        * @param array $args arguments to pass to the callback functions
         * @return string|null string to output or null if any hook has been called
         */
        function runHooks( $name, $args = array() ) {
@@ -83,7 +83,7 @@ class MWException extends Exception {
                $callargs = array_merge( array( $this ), $args );
 
                foreach ( $hooks as $hook ) {
-                       if ( is_string( $hook ) || ( is_array( $hook ) && count( $hook ) >= 2 && is_string( $hook[0] ) ) ) {    // 'function' or array( 'class', hook' )
+                       if ( is_string( $hook ) || ( is_array( $hook ) && count( $hook ) >= 2 && is_string( $hook[0] ) ) ) { // 'function' or array( 'class', hook' )
                                $result = call_user_func_array( $hook, $callargs );
                        } else {
                                $result = null;
@@ -99,8 +99,8 @@ class MWException extends Exception {
        /**
         * Get a message from i18n
         *
-        * @param $key string: message name
-        * @param $fallback string: default message if the message cache can't be
+        * @param string $key message name
+        * @param string $fallback default message if the message cache can't be
         *                  called by the exception
         * The function also has other parameters that are arguments for the message
         * @return string message with arguments replaced
@@ -320,9 +320,9 @@ class ErrorPageError extends MWException {
        /**
         * Note: these arguments are keys into wfMessage(), not text!
         *
-        * @param $title string|Message Message key (string) for page title, or a Message object
-        * @param $msg string|Message Message key (string) for error text, or a Message object
-        * @param $params array with parameters to wfMessage()
+        * @param string|Message $title Message key (string) for page title, or a Message object
+        * @param string|Message $msg Message key (string) for error text, or a Message object
+        * @param array $params with parameters to wfMessage()
         */
        function __construct( $title, $msg, $params = null ) {
                $this->title = $title;
@@ -354,8 +354,8 @@ class ErrorPageError extends MWException {
  */
 class BadTitleError extends ErrorPageError {
        /**
-        * @param $msg string|Message A message key (default: 'badtitletext')
-        * @param $params Array parameter to wfMessage()
+        * @param string|Message $msg A message key (default: 'badtitletext')
+        * @param array $params parameter to wfMessage()
         */
        function __construct( $msg = 'badtitletext', $params = null ) {
                parent::__construct( 'badtitle', $msg, $params );
@@ -557,8 +557,8 @@ class HttpError extends MWException {
         * Constructor
         *
         * @param $httpCode Integer: HTTP status code to send to the client
-        * @param $content String|Message: content of the message
-        * @param $header String|Message: content of the header (\<title\> and \<h1\>)
+        * @param string|Message $content content of the message
+        * @param string|Message $header content of the header (\<title\> and \<h1\>)
         */
        public function __construct( $httpCode, $content, $header = null ) {
                parent::__construct( $content );
@@ -684,7 +684,7 @@ class MWExceptionHandler {
         * Print a message, if possible to STDERR.
         * Use this in command line mode only (see isCommandLine)
         *
-        * @param $message string Failure text
+        * @param string $message Failure text
         */
        public static function printError( $message ) {
                # NOTE: STDERR may not be available, especially if php-cgi is used from the command line (bug #15602).
index 9248575..bfd561e 100644 (file)
@@ -80,8 +80,8 @@ class WikiExporter {
         *                   offset: non-inclusive offset at which to start the query
         *                   limit: maximum number of rows to return
         *                   dir: "asc" or "desc" timestamp order
-        * @param $buffer Int: one of WikiExporter::BUFFER or WikiExporter::STREAM
-        * @param $text Int: one of WikiExporter::TEXT or WikiExporter::STUB
+        * @param int $buffer one of WikiExporter::BUFFER or WikiExporter::STREAM
+        * @param int $text one of WikiExporter::TEXT or WikiExporter::STUB
         */
        function __construct( $db, $history = WikiExporter::CURRENT,
                        $buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) {
@@ -126,7 +126,7 @@ class WikiExporter {
        /**
         * Dumps a series of page and revision records for those pages
         * in the database falling within the page_id range given.
-        * @param $start Int: inclusive lower limit (this id is included)
+        * @param int $start inclusive lower limit (this id is included)
         * @param $end   Int: Exclusive upper limit (this id is not included)
         *                   If 0, no upper limit.
         */
@@ -141,7 +141,7 @@ class WikiExporter {
        /**
         * Dumps a series of page and revision records for those pages
         * in the database with revisions falling within the rev_id range given.
-        * @param $start Int: inclusive lower limit (this id is included)
+        * @param int $start inclusive lower limit (this id is included)
         * @param $end   Int: Exclusive upper limit (this id is not included)
         *                   If 0, no upper limit.
         */
@@ -429,7 +429,7 @@ class WikiExporter {
                foreach ( $resultset as $row ) {
                        if ( $last === null ||
                                $last->page_namespace != $row->page_namespace ||
-                               $last->page_title     != $row->page_title ) {
+                               $last->page_title != $row->page_title ) {
                                if ( $last !== null ) {
                                        $output = '';
                                        if ( $this->dumpUploads ) {
@@ -649,7 +649,7 @@ class XmlDumpWriter {
                }
 
                if ( isset( $row->rev_minor_edit ) && $row->rev_minor_edit ) {
-                       $out .=  "      <minor/>\n";
+                       $out .= "      <minor/>\n";
                }
                if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_COMMENT ) ) {
                        $out .= "      " . Xml::element( 'comment', array( 'deleted' => 'deleted' ) ) . "\n";
@@ -758,7 +758,7 @@ class XmlDumpWriter {
 
        /**
         * @param $timestamp string
-        * @param $indent string Default to six spaces
+        * @param string $indent Default to six spaces
         * @return string
         */
        function writeTimestamp( $timestamp, $indent = "      " ) {
@@ -769,7 +769,7 @@ class XmlDumpWriter {
        /**
         * @param $id
         * @param $text string
-        * @param $indent string Default to six spaces
+        * @param string $indent Default to six spaces
         * @return string
         */
        function writeContributor( $id, $text, $indent = "      " ) {
@@ -871,7 +871,6 @@ class XmlDumpWriter {
        }
 }
 
-
 /**
  * Base class for output stream; prints to stdout or buffer or whereever.
  * @ingroup Dump
@@ -947,7 +946,7 @@ class DumpOutput {
         * Use this for the last piece of a file written out
         * at specified checkpoints (e.g. every n hours).
         * @param $newname mixed File name. May be a string or an array with one element
-        * @param $open bool If true, a new file with the old filename will be opened again for writing (default: false)
+        * @param bool $open If true, a new file with the old filename will be opened again for writing (default: false)
         */
        function closeAndRename( $newname, $open = false ) {
        }
@@ -1399,7 +1398,6 @@ class DumpNamespaceFilter extends DumpFilter {
        }
 }
 
-
 /**
  * Dump output filter to include only the last revision in each page sequence.
  * @ingroup Dump
index 3f73376..11e9423 100644 (file)
@@ -40,7 +40,7 @@ class ExternalEdit extends ContextSource {
         * Check whether external edit or diff should be used.
         *
         * @param $context IContextSource context to use
-        * @param $type String can be either 'edit' or 'diff'
+        * @param string $type can be either 'edit' or 'diff'
         * @return Bool
         */
        public static function useExternalEngine( IContextSource $context, $type ) {
index 8cf9c84..580b989 100644 (file)
@@ -278,7 +278,7 @@ abstract class ExternalUser {
         * This is part of the core code and is not overridable by specific
         * plugins.  It's in this class only for convenience.
         *
-        * @param $id int user_id
+        * @param int $id user_id
         */
        final public function linkToLocal( $id ) {
                $dbw = wfGetDB( DB_MASTER );
index b517656..2e19a09 100644 (file)
@@ -149,13 +149,12 @@ class Fallback {
                return $total;
        }
 
-
        /**
         * Fallback implementation of mb_strpos, hardcoded to UTF-8.
         * @param $haystack String
         * @param $needle String
-        * @param $offset String: optional start position
-        * @param $encoding String: optional encoding; ignored
+        * @param string $offset optional start position
+        * @param string $encoding optional encoding; ignored
         * @return int
         */
        public static function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
@@ -175,8 +174,8 @@ class Fallback {
         * Fallback implementation of mb_strrpos, hardcoded to UTF-8.
         * @param $haystack String
         * @param $needle String
-        * @param $offset String: optional start position
-        * @param $encoding String: optional encoding; ignored
+        * @param string $offset optional start position
+        * @param string $encoding optional encoding; ignored
         * @return int
         */
        public static function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
index 8e000ae..a30ba5c 100644 (file)
@@ -52,11 +52,11 @@ class FeedItem {
        /**
         * Constructor
         *
-        * @param $title String|Title Item's title
+        * @param string|Title $title Item's title
         * @param $description String
-        * @param $url String: URL uniquely designating the item.
-        * @param $date String: Item's date
-        * @param $author String: Author's user name
+        * @param string $url URL uniquely designating the item.
+        * @param string $date Item's date
+        * @param string $author Author's user name
         * @param $comments String
         */
        function __construct( $title, $description, $url, $date = '', $author = '', $comments = '' ) {
@@ -72,7 +72,7 @@ class FeedItem {
        /**
         * Encode $string so that it can be safely embedded in a XML document
         *
-        * @param $string String: string to encode
+        * @param string $string string to encode
         * @return String
         */
        public function xmlEncode( $string ) {
@@ -95,7 +95,7 @@ class FeedItem {
        /**
         * set the unique id of an item
         *
-        * @param $uniqueId String: unique id for the item
+        * @param string $uniqueId unique id for the item
         * @param $rssIsPermalink Boolean: set to true if the guid (unique id) is a permalink (RSS feeds only)
         */
        public function setUniqueId( $uniqueId, $rssIsPermalink = false ) {
@@ -170,7 +170,7 @@ class FeedItem {
        /**
         * Quickie hack... strip out wikilinks to more legible form from the comment.
         *
-        * @param $text String: wikitext
+        * @param string $text wikitext
         * @return String
         */
        public static function stripComment( $text ) {
index 67011d2..5e4b24e 100644 (file)
@@ -33,8 +33,8 @@ class FeedUtils {
         * If the feed should be purged; $timekey and $key will be removed from
         * $messageMemc
         *
-        * @param $timekey String: cache key of the timestamp of the last item
-        * @param $key String: cache key of feed's content
+        * @param string $timekey cache key of the timestamp of the last item
+        * @param string $key cache key of feed's content
         */
        public static function checkPurge( $timekey, $key ) {
                global $wgRequest, $wgUser, $messageMemc;
@@ -48,7 +48,7 @@ class FeedUtils {
        /**
         * Check whether feeds can be used and that $type is a valid feed type
         *
-        * @param $type String: feed type, as requested by the user
+        * @param string $type feed type, as requested by the user
         * @return Boolean
         */
        public static function checkFeedOutput( $type ) {
@@ -98,8 +98,8 @@ class FeedUtils {
         * @param $oldid Integer: old revision's id
         * @param $newid Integer: new revision's id
         * @param $timestamp Integer: new revision's timestamp
-        * @param $comment String: new revision's comment
-        * @param $actiontext String: text of the action; in case of log event
+        * @param string $comment new revision's comment
+        * @param string $actiontext text of the action; in case of log event
         * @return String
         */
        public static function formatDiffRow( $title, $oldid, $newid, $timestamp, $comment, $actiontext = '' ) {
@@ -236,18 +236,18 @@ class FeedUtils {
         * Might be 'cleaner' to use DOM or XSLT or something,
         * but *gack* it's a pain in the ass.
         *
-        * @param $text String: diff's HTML output
+        * @param string $text diff's HTML output
         * @return String: modified HTML
         */
        public static function applyDiffStyle( $text ) {
                $styles = array(
                        'diff'             => 'background-color: white; color:black;',
-                       'diff-otitle'      => 'background-color: white; color:black;',
-                       'diff-ntitle'      => 'background-color: white; color:black;',
-                       'diff-addedline'   => 'background: #cfc; color:black; font-size: smaller;',
-                       'diff-deletedline' => 'background: #ffa; color:black; font-size: smaller;',
-                       'diff-context'     => 'background: #eee; color:black; font-size: smaller;',
-                       'diffchange'       => 'color: red; font-weight: bold; text-decoration: none;',
+                       'diff-otitle'      => 'background-color: white; color:black; text-align: center;',
+                       'diff-ntitle'      => 'background-color: white; color:black; text-align: center;',
+                       'diff-addedline'   => 'color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;',
+                       'diff-deletedline' => 'color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;',
+                       'diff-context'     => 'background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;',
+                       'diffchange'       => 'font-weight: bold; text-decoration: none;',
                );
 
                foreach( $styles as $class => $style ) {
index 48073f7..28403cc 100644 (file)
@@ -140,8 +140,8 @@ class FileDeleteForm {
         *
         * @param $title Title object
         * @param File $file: file object
-        * @param $oldimage String: archive name
-        * @param $reason String: reason of the deletion
+        * @param string $oldimage archive name
+        * @param string $reason reason of the deletion
         * @param $suppress Boolean: whether to mark all deleted versions as restricted
         * @param $user User object performing the request
         * @throws MWException
@@ -309,7 +309,7 @@ class FileDeleteForm {
         * showing an appropriate message depending upon whether
         * it's a current file or an old version
         *
-        * @param $message String: message base
+        * @param string $message message base
         * @return String
         */
        private function prepareMessage( $message ) {
index 598be05..8477ed9 100644 (file)
@@ -104,7 +104,7 @@ class FormOptions implements ArrayAccess {
        /**
         * Verify the given option name exist.
         *
-        * @param $name String: option name
+        * @param string $name option name
         * @param $strict Boolean: throw an exception when the option does not exist (default false)
         * @throws MWException
         * @return Boolean: true if option exist, false otherwise
@@ -123,7 +123,7 @@ class FormOptions implements ArrayAccess {
        /**
         * Use to set the value of an option.
         *
-        * @param $name String: option name
+        * @param string $name option name
         * @param $value Mixed: value for the option
         * @param $force Boolean: whether to set the value when it is equivalent to the default value for this option (default false).
         * @return null
@@ -143,7 +143,7 @@ class FormOptions implements ArrayAccess {
         * Get the value for the given option name.
         * Internally use getValueReal()
         *
-        * @param $name String: option name
+        * @param string $name option name
         * @return Mixed
         */
        public function getValue( $name ) {
@@ -154,7 +154,7 @@ class FormOptions implements ArrayAccess {
 
        /**
         * @todo Document
-        * @param $option Array: array structure describing the option
+        * @param array $option array structure describing the option
         * @return Mixed. Value or the default value if it is null
         */
        protected function getValueReal( $option ) {
@@ -168,7 +168,7 @@ class FormOptions implements ArrayAccess {
        /**
         * Delete the option value.
         * This will make future calls to getValue()  return the default value.
-        * @param $name String: option name
+        * @param string $name option name
         * @return null
         */
        public function reset( $name ) {
@@ -191,7 +191,7 @@ class FormOptions implements ArrayAccess {
 
        /**
         * @todo Document
-        * @param $names Array: array of option names
+        * @param array $names array of option names
         * @return null
         */
        public function consumeValues( /*Array*/ $names ) {
@@ -210,9 +210,9 @@ class FormOptions implements ArrayAccess {
         * Validate and set an option integer value
         * The value will be altered to fit in the range.
         *
-        * @param $name String: option name
-        * @param $min Int: minimum value
-        * @param $max Int: maximum value
+        * @param string $name option name
+        * @param int $min minimum value
+        * @param int $max maximum value
         * @throws MWException
         * @exception MWException Option is not of type int
         * @return null
index 0867cd9..6f7f802 100644 (file)
@@ -41,7 +41,7 @@ class GitInfo {
        private static $viewers = false;
 
        /**
-        * @param $dir string The root directory of the repo where the .git dir can be found
+        * @param string $dir The root directory of the repo where the .git dir can be found
         */
        public function __construct( $dir ) {
                $this->basedir = "{$dir}/.git";
@@ -70,7 +70,7 @@ class GitInfo {
        /**
         * Check if a string looks like a hex encoded SHA1 hash
         *
-        * @param $str string The string to check
+        * @param string $str The string to check
         * @return bool Whether or not the string looks like a SHA1
         */
        public static function isSHA1( $str ) {
index 79a4920..54e546e 100644 (file)
@@ -94,7 +94,6 @@ if( !function_exists( 'mb_strrpos' ) ) {
        }
 }
 
-
 // Support for Wietse Venema's taint feature
 if ( !function_exists( 'istainted' ) ) {
        /**
@@ -168,7 +167,7 @@ function wfArrayLookup( $a, $b ) {
  * @param $key String|Int
  * @param $value Mixed
  * @param $default Mixed
- * @param $changed Array to alter
+ * @param array $changed to alter
  * @throws MWException
  */
 function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) {
@@ -233,8 +232,8 @@ function wfMergeErrorArrays( /*...*/ ) {
 /**
  * Insert array into another array after the specified *KEY*
  *
- * @param $array Array: The array.
- * @param $insert Array: The array to insert.
+ * @param array $array The array.
+ * @param array $insert The array to insert.
  * @param $after Mixed: The key to insert after
  * @return Array
  */
@@ -317,7 +316,7 @@ function wfRandom() {
  * @note This is not secure, if you are trying to generate some sort
  *       of token please use MWCryptRand instead.
  *
- * @param $length int The length of the string to generate
+ * @param int $length The length of the string to generate
  * @return String
  * @since 1.20
  */
@@ -329,40 +328,6 @@ function wfRandomString( $length = 32 ) {
        return substr( $str, 0, $length );
 }
 
-/**
- * Given an array of non-normalised probabilities, this function will select
- * an element and return the appropriate key
- *
- * @param $weights array
- *
- * @return bool|int|string
- */
-function wfPickRandom( $weights ){
-       if ( !is_array( $weights ) || count( $weights ) == 0 ) {
-               return false;
-       }
-
-       $sum = array_sum( $weights );
-       if ( $sum == 0 ) {
-               # No loads on any of them
-               # In previous versions, this triggered an unweighted random selection,
-               # but this feature has been removed as of April 2006 to allow for strict
-               # separation of query groups.
-               return false;
-       }
-       $max = mt_getrandmax();
-       $rand = mt_rand( 0, $max ) / $max * $sum;
-
-       $sum = 0;
-       foreach ( $weights as $i => $w ) {
-               $sum += $w;
-               if ( $sum >= $rand ) {
-                       break;
-               }
-       }
-       return $i;
-}
-
 /**
  * We want some things to be included as literal characters in our title URLs
  * for prettiness, which urlencode encodes by default.  According to RFC 1738,
@@ -384,7 +349,7 @@ function wfPickRandom( $weights ){
  *
  * @param $s String:
  * @return string
-*/
+ */
 function wfUrlencode( $s ) {
        static $needle;
        if ( is_null( $s ) ) {
@@ -414,8 +379,8 @@ function wfUrlencode( $s ) {
  * "days=7&limit=100". Options in the first array override options in the second.
  * Options set to null or false will not be output.
  *
- * @param $array1 Array ( String|Array )
- * @param $array2 Array ( String|Array )
+ * @param array $array1 ( String|Array )
+ * @param array $array2 ( String|Array )
  * @param $prefix String
  * @return String
  */
@@ -461,7 +426,7 @@ function wfArrayToCgi( $array1, $array2 = null, $prefix = '' ) {
  * tibility with legacy functions that accept raw query strings instead of nice
  * arrays.  Of course, keys and values are urldecode()d.
  *
- * @param $query String: query string
+ * @param string $query query string
  * @return array Array version of input
  */
 function wfCgiToArray( $query ) {
@@ -541,7 +506,7 @@ function wfAppendQuery( $url, $query ) {
  * @todo this won't work with current-path-relative URLs
  * like "subdir/foo.html", etc.
  *
- * @param $url String: either fully-qualified or a local path + query
+ * @param string $url either fully-qualified or a local path + query
  * @param $defaultProto Mixed: one of the PROTO_* constants. Determines the
  *                             protocol to use if $url or $wgServer is
  *                             protocol-relative
@@ -611,7 +576,7 @@ function wfExpandUrl( $url, $defaultProto = PROTO_CURRENT ) {
  * @todo Need to integrate this into wfExpandUrl (bug 32168)
  *
  * @since 1.19
- * @param $urlParts Array URL parts, as output from wfParseUrl
+ * @param array $urlParts URL parts, as output from wfParseUrl
  * @return string URL assembled from its component parts
  */
 function wfAssembleUrl( $urlParts ) {
@@ -663,7 +628,7 @@ function wfAssembleUrl( $urlParts ) {
  *
  * @todo Need to integrate this into wfExpandUrl (bug 32168)
  *
- * @param $urlPath String URL path, potentially containing dot-segments
+ * @param string $urlPath URL path, potentially containing dot-segments
  * @return string URL path with all dot-segments removed
  */
 function wfRemoveDotSegments( $urlPath ) {
@@ -740,7 +705,7 @@ function wfRemoveDotSegments( $urlPath ) {
 /**
  * Returns a regular expression of url protocols
  *
- * @param $includeProtocolRelative bool If false, remove '//' from the returned protocol list.
+ * @param bool $includeProtocolRelative If false, remove '//' from the returned protocol list.
  *        DO NOT USE this directly, use wfUrlProtocolsWithoutProtRel() instead
  * @return String
  */
@@ -800,7 +765,7 @@ function wfUrlProtocolsWithoutProtRel() {
  * 2) Handles protocols that don't use :// (e.g., mailto: and news: , as well as protocol-relative URLs) correctly
  * 3) Adds a "delimiter" element to the array, either '://', ':' or '//' (see (2))
  *
- * @param $url String: a URL to parse
+ * @param string $url a URL to parse
  * @return Array: bits of the URL in an associative array, per PHP docs
  */
 function wfParseUrl( $url ) {
@@ -885,8 +850,6 @@ function wfExpandIRI_callback( $matches ) {
        return urldecode( $matches[1] );
 }
 
-
-
 /**
  * Make URL indexes, appropriate for the el_index field of externallinks.
  *
@@ -943,8 +906,8 @@ function wfMakeUrlIndexes( $url ) {
 
 /**
  * Check whether a given URL has a domain that occurs in a given set of domains
- * @param $url string URL
- * @param $domains array Array of domains (strings)
+ * @param string $url URL
+ * @param array $domains Array of domains (strings)
  * @return bool True if the host part of $url ends in one of the strings in $domains
  */
 function wfMatchesDomainList( $url, $domains ) {
@@ -972,7 +935,7 @@ function wfMatchesDomainList( $url, $domains ) {
  * $wgDebugComments - if on, some debug items may appear in comments in the HTML output.
  *
  * @param $text String
- * @param $logonly Bool: set true to avoid appearing in HTML when $wgDebugComments is set
+ * @param bool $logonly set true to avoid appearing in HTML when $wgDebugComments is set
  */
 function wfDebug( $text, $logonly = false ) {
        global $wgDebugLogFile, $wgProfileOnly, $wgDebugRawPage, $wgDebugLogPrefix;
@@ -1044,7 +1007,7 @@ function wfDebugTimer() {
 /**
  * Send a line giving PHP memory usage.
  *
- * @param $exact Bool: print exact values instead of kilobytes (default: false)
+ * @param bool $exact print exact values instead of kilobytes (default: false)
  */
 function wfDebugMem( $exact = false ) {
        $mem = memory_get_usage();
@@ -1062,7 +1025,7 @@ function wfDebugMem( $exact = false ) {
  *
  * @param $logGroup String
  * @param $text String
- * @param $public Bool: whether to log the event in the public log if no private
+ * @param bool $public whether to log the event in the public log if no private
  *                     log file is specified, (default true)
  */
 function wfDebugLog( $logGroup, $text, $public = true ) {
@@ -1083,7 +1046,7 @@ function wfDebugLog( $logGroup, $text, $public = true ) {
 /**
  * Log for database errors
  *
- * @param $text String: database error message.
+ * @param string $text database error message.
  */
 function wfLogDBError( $text ) {
        global $wgDBerrorLog, $wgDBerrorLogTZ;
@@ -1116,8 +1079,8 @@ function wfLogDBError( $text ) {
  * Throws a warning that $function is deprecated
  *
  * @param $function String
- * @param $version String|bool: Version of MediaWiki that the function was deprecated in (Added in 1.19).
- * @param $component String|bool: Added in 1.19.
+ * @param string|bool $version Version of MediaWiki that the function was deprecated in (Added in 1.19).
+ * @param string|bool $component Added in 1.19.
  * @param $callerOffset integer: How far up the callstack is the original
  *    caller. 2 = function that called the function that called
  *    wfDeprecated (Added in 1.20)
@@ -1132,7 +1095,7 @@ function wfDeprecated( $function, $version = false, $component = false, $callerO
  * Send a warning either to the debug log or in a PHP error depending on
  * $wgDevelopmentWarnings
  *
- * @param $msg String: message to send
+ * @param string $msg message to send
  * @param $callerOffset Integer: number of items to go back in the backtrace to
  *        find the correct caller (1 = function calling wfWarn, ...)
  * @param $level Integer: PHP error level; only used when $wgDevelopmentWarnings
@@ -1149,7 +1112,7 @@ function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) {
  * send lines to the specified port, prefixed by the specified prefix and a space.
  *
  * @param $text String
- * @param $file String filename
+ * @param string $file filename
  * @throws MWException
  */
 function wfErrorLog( $text, $file ) {
@@ -1462,7 +1425,7 @@ function wfMessageFallback( /*...*/ ) {
  *
  * @deprecated since 1.18
  *
- * @param $key String: lookup key for the message, usually
+ * @param string $key lookup key for the message, usually
  *    defined in languages/Language.php
  *
  * Parameters to the message, which can be used to insert variable text into
@@ -1518,7 +1481,7 @@ function wfMsgNoTrans( $key ) {
  *
  * @deprecated since 1.18
  *
- * @param $key String: lookup key for the message, usually
+ * @param string $key lookup key for the message, usually
  *     defined in languages/Language.php
  * @return String
  */
@@ -1565,7 +1528,7 @@ function wfMsgForContentNoTrans( $key ) {
  *
  * @deprecated since 1.18
  *
- * @param $key String: key to get.
+ * @param string $key key to get.
  * @param $args
  * @param $useDB Boolean
  * @param $forContent Mixed: Language code, or false for user lang, true for content lang.
@@ -1589,7 +1552,7 @@ function wfMsgReal( $key, $args, $useDB = true, $forContent = false, $transform
  *
  * @param $key String
  * @param $useDB Bool
- * @param $langCode String: Code of the language to get the message for, or
+ * @param string $langCode Code of the language to get the message for, or
  *                  behaves as a content language switch if it is a boolean.
  * @param $transform Boolean: whether to parse magic words, etc.
  * @return string
@@ -1687,8 +1650,8 @@ function wfMsgWikiHtml( $key ) {
  *
  * @deprecated since 1.18
  *
- * @param $key String: key of the message
- * @param $options Array: processing rules. Can take the following options:
+ * @param string $key key of the message
+ * @param array $options processing rules. Can take the following options:
  *   <i>parse</i>: parses wikitext to HTML
  *   <i>parseinline</i>: parses wikitext to HTML and removes the surrounding
  *       p's added by parser or tidy
@@ -1796,7 +1759,7 @@ function wfEmptyMsg( $key ) {
  * Throw a debugging exception. This function previously once exited the process,
  * but now throws an exception instead, with similar results.
  *
- * @param $msg String: message shown when dying.
+ * @param string $msg message shown when dying.
  * @throws MWException
  */
 function wfDebugDieBacktrace( $msg = '' ) {
@@ -1868,7 +1831,7 @@ function wfReportTime() {
  * debug_backtrace is disabled, otherwise the output from
  * debug_backtrace() (trimmed).
  *
- * @param $limit int This parameter can be used to limit the number of stack frames returned
+ * @param int $limit This parameter can be used to limit the number of stack frames returned
  *
  * @return array of backtrace information
  */
@@ -1974,7 +1937,7 @@ function wfGetCaller( $level = 2 ) {
  * Return a string consisting of callers in the stack. Useful sometimes
  * for profiling specific points.
  *
- * @param $limit int The maximum depth of the stack frame to return, or false for
+ * @param int $limit The maximum depth of the stack frame to return, or false for
  *               the entire stack.
  * @return String
  */
@@ -1999,10 +1962,8 @@ function wfFormatStackFrame( $frame ) {
                $frame['function'];
 }
 
-
 /* Some generic result counters, pulled out of SearchEngine */
 
-
 /**
  * @todo document
  *
@@ -2020,8 +1981,8 @@ function wfShowingResults( $offset, $limit ) {
  * @param $offset String
  * @param $limit Integer
  * @param $link String
- * @param $query String: optional URL query parameter string
- * @param $atend Bool: optional param for specified if this is the last page
+ * @param string $query optional URL query parameter string
+ * @param bool $atend optional param for specified if this is the last page
  * @return String
  * @deprecated in 1.19; use Language::viewPrevNext() instead
  */
@@ -2047,8 +2008,8 @@ function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) {
 /**
  * Make a list item, used by various special pages
  *
- * @param $page String Page link
- * @param $details String Text between brackets
+ * @param string $page Page link
+ * @param string $details Text between brackets
  * @param $oppositedm Boolean  Add the direction mark opposite to your
  *                                                             language, to display text properly
  * @return String
@@ -2097,8 +2058,8 @@ function wfClientAcceptsGzip( $force = false ) {
  * Obtain the offset and limit values from the request string;
  * used in special pages
  *
- * @param $deflimit Int default limit if none supplied
- * @param $optionname String Name of a user preference to check against
+ * @param int $deflimit default limit if none supplied
+ * @param string $optionname Name of a user preference to check against
  * @return array
  *
  */
@@ -2113,7 +2074,7 @@ function wfCheckLimits( $deflimit = 50, $optionname = 'rclimit' ) {
  * is achieved by substituting certain characters with HTML entities.
  * As required by the callers, "<nowiki>" is not used.
  *
- * @param $text String: text to be escaped
+ * @param string $text text to be escaped
  * @return String
  */
 function wfEscapeWikiText( $text ) {
@@ -2286,7 +2247,7 @@ function wfClearOutputBuffers() {
  * factors
  *
  * @param $accept String
- * @param $def String default
+ * @param string $def default
  * @return Array
  */
 function wfAcceptToPrefs( $accept, $def = '*/*' ) {
@@ -2346,8 +2307,8 @@ function mimeTypeMatch( $type, $avail ) {
  * array of type to preference (preference is a float between 0.0 and 1.0).
  * Wildcards in the types are acceptable.
  *
- * @param $cprefs Array: client's acceptable type list
- * @param $sprefs Array: server's offered types
+ * @param array $cprefs client's acceptable type list
+ * @param array $sprefs server's offered types
  * @return string
  *
  * @todo FIXME: Doesn't handle params like 'text/plain; charset=UTF-8'
@@ -2583,9 +2544,9 @@ function wfTempDir() {
 /**
  * Make directory, and make all parent directories if they don't exist
  *
- * @param $dir String: full path to directory to create
+ * @param string $dir full path to directory to create
  * @param $mode Integer: chmod value to use, default is $wgDirectoryMode
- * @param $caller String: optional caller param for debugging.
+ * @param string $caller optional caller param for debugging.
  * @throws MWException
  * @return bool
  */
@@ -2710,9 +2671,9 @@ function wfIniGetBool( $setting ) {
  * Wrapper function for PHP's dl(). This doesn't work in most situations from
  * PHP 5.3 onward, and is usually disabled in shared environments anyway.
  *
- * @param $extension String A PHP extension. The file suffix (.so or .dll)
+ * @param string $extension A PHP extension. The file suffix (.so or .dll)
  *                          should be omitted
- * @param $fileName String Name of the library, if not $extension.suffix
+ * @param string $fileName Name of the library, if not $extension.suffix
  * @return Bool - Whether or not the extension is loaded
  */
 function wfDl( $extension, $fileName = null ) {
@@ -2805,12 +2766,12 @@ function wfEscapeShellArg( ) {
 /**
  * Execute a shell command, with time and memory limits mirrored from the PHP
  * configuration if supported.
- * @param $cmd String Command line, properly escaped for shell.
+ * @param string $cmd Command line, properly escaped for shell.
  * @param &$retval null|Mixed optional, will receive the program's exit code.
  *                 (non-zero is usually failure)
- * @param $environ Array optional environment variables which should be
+ * @param array $environ optional environment variables which should be
  *                 added to the executed command environment.
- * @param $limits Array optional array with limits(filesize, memory, time, walltime)
+ * @param array $limits optional array with limits(filesize, memory, time, walltime)
  *                 this overwrites the global wgShellMax* limits.
  * @return string collected stdout as a string (trailing newlines stripped)
  */
@@ -2929,9 +2890,9 @@ function wfShellMaintenanceCmd( $script, array $parameters = array(), array $opt
  * Generate a shell-escaped command line string to run a MediaWiki cli script.
  * Note that $parameters should be a flat array and an option with an argument
  * should consist of two consecutive items in the array (do not use "--option value").
- * @param $script string MediaWiki cli script path
- * @param $parameters Array Arguments and options to the script
- * @param $options Array Associative array of options:
+ * @param string $script MediaWiki cli script path
+ * @param array $parameters Arguments and options to the script
+ * @param array $options Associative array of options:
  *             'php': The path to the php executable
  *             'wrapper': Path to a PHP wrapper to handle the maintenance script
  * @return Array
@@ -3033,9 +2994,9 @@ function wfMerge( $old, $mine, $yours, &$result ) {
  * Returns unified plain-text diff of two texts.
  * Useful for machine processing of diffs.
  *
- * @param $before String: the text before the changes.
- * @param $after String: the text after the changes.
- * @param $params String: command-line options for the diff command.
+ * @param string $before the text before the changes.
+ * @param string $after the text after the changes.
+ * @param string $params command-line options for the diff command.
  * @return String: unified diff of $before and $after
  */
 function wfDiff( $before, $after, $params = '-u' ) {
@@ -3156,7 +3117,7 @@ function wfUseMW( $req_ver ) {
  * We'll consider it so always, as we don't want '\s' in our Unix paths either.
  *
  * @param $path String
- * @param $suffix String: to remove if present
+ * @param string $suffix to remove if present
  * @return String
  */
 function wfBaseName( $path, $suffix = '' ) {
@@ -3176,8 +3137,8 @@ function wfBaseName( $path, $suffix = '' ) {
  * May explode on non-matching case-insensitive paths,
  * funky symlinks, etc.
  *
- * @param $path String: absolute destination path including target filename
- * @param $from String: Absolute source path, directory only
+ * @param string $path absolute destination path including target filename
+ * @param string $from Absolute source path, directory only
  * @return String
  */
 function wfRelativePath( $path, $from ) {
@@ -3333,7 +3294,7 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = t
  * Create an object with a given name and an array of construct parameters
  *
  * @param $name String
- * @param $p Array: parameters
+ * @param array $p parameters
  * @return object
  * @deprecated since 1.18, warnings in 1.18, removal in 1.20
  */
@@ -3523,7 +3484,7 @@ function wfSplitWikiID( $wiki ) {
  *                belongs to. May contain a single string if the query is only
  *                in one group.
  *
- * @param $wiki String: the wiki ID, or false for the current wiki
+ * @param string $wiki the wiki ID, or false for the current wiki
  *
  * Note: multiple calls to wfGetDB(DB_SLAVE) during the course of one request
  * will always return the same object, unless the underlying connection or load
@@ -3541,7 +3502,7 @@ function &wfGetDB( $db, $groups = array(), $wiki = false ) {
 /**
  * Get a load balancer object.
  *
- * @param $wiki String: wiki ID, or false for the current wiki
+ * @param string $wiki wiki ID, or false for the current wiki
  * @return LoadBalancer
  */
 function wfGetLB( $wiki = false ) {
@@ -3561,8 +3522,8 @@ function &wfGetLBFactory() {
  * Find a file.
  * Shortcut for RepoGroup::singleton()->findFile()
  *
- * @param $title String or Title object
- * @param $options array Associative array of options:
+ * @param string $title or Title object
+ * @param array $options Associative array of options:
  *     time:           requested time for an archived image, or false for the
  *                     current version. An image object will be returned which was
  *                     created at the specified time.
@@ -3620,7 +3581,7 @@ function wfQueriesMustScale() {
  * extensions; this is a wrapper around $wgScriptExtension etc.
  * except for 'index' and 'load' which use $wgScript/$wgLoadScript
  *
- * @param $script String: script filename, sans extension
+ * @param string $script script filename, sans extension
  * @return String
  */
 function wfScript( $script = 'index' ) {
@@ -3831,7 +3792,7 @@ function wfShorthandToInteger( $string = '' ) {
  * Get the normalised IETF language tag
  * See unit test for examples.
  *
- * @param $code String: The language code.
+ * @param string $code The language code.
  * @return String: The language code which complying with BCP 47 standards.
  */
 function wfBCP47( $code ) {
@@ -3914,8 +3875,8 @@ function wfGetLangConverterCacheStorage() {
 /**
  * Call hook functions defined in $wgHooks
  *
- * @param $event String: event name
- * @param $args Array: parameters passed to hook functions
+ * @param string $event event name
+ * @param array $args parameters passed to hook functions
  * @return Boolean True if no handler aborted the hook
  */
 function wfRunHooks( $event, $args = array() ) {
@@ -3925,7 +3886,7 @@ function wfRunHooks( $event, $args = array() ) {
 /**
  * Wrapper around php's unpack.
  *
- * @param $format String: The format string (See php's docs)
+ * @param string $format The format string (See php's docs)
  * @param $data: A binary string of binary data
  * @param $length integer or false: The minimun length of $data. This is to
  *     prevent reading beyond the end of $data. false to disable the check.
@@ -3967,9 +3928,9 @@ function wfUnpack( $format, $data, $length=false ) {
  *    * Any subsequent links on the same line are considered to be exceptions,
  *      i.e. articles where the image may occur inline.
  *
- * @param $name string the image name to check
+ * @param string $name the image name to check
  * @param $contextTitle Title|bool the page on which the image occurs, if known
- * @param $blacklist string wikitext of a file blacklist
+ * @param string $blacklist wikitext of a file blacklist
  * @return bool
  */
 function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) {
index 86eb38d..23c5ca7 100644 (file)
@@ -112,6 +112,7 @@ class HTMLForm extends ContextSource {
                'submit' => 'HTMLSubmitField',
                'hidden' => 'HTMLHiddenField',
                'edittools' => 'HTMLEditTools',
+               'checkmatrix' => 'HTMLCheckMatrix',
 
                // HTMLTextField will output the correct type="" attribute automagically.
                // There are about four zillion other HTML5 input types, like url, but
@@ -189,10 +190,10 @@ class HTMLForm extends ContextSource {
 
        /**
         * Build a new HTMLForm from an array of field attributes
-        * @param $descriptor Array of Field constructs, as described above
+        * @param array $descriptor of Field constructs, as described above
         * @param $context IContextSource available since 1.18, will become compulsory in 1.18.
         *     Obviates the need to call $form->setTitle()
-        * @param $messagePrefix String a prefix to go in front of default messages
+        * @param string $messagePrefix a prefix to go in front of default messages
         */
        public function __construct( $descriptor, /*IContextSource*/ $context = null, $messagePrefix = '' ) {
                if ( $context instanceof IContextSource ) {
@@ -247,7 +248,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Set format in which to display the form
-        * @param $format String the name of the format to use, must be one of
+        * @param string $format the name of the format to use, must be one of
         *        $this->availableDisplayFormats
         * @throws MWException
         * @since 1.20
@@ -280,7 +281,7 @@ class HTMLForm extends ContextSource {
        /**
         * Initialise a new Object for the field
         * @param $fieldname string
-        * @param $descriptor string input Descriptor, as described above
+        * @param string $descriptor input Descriptor, as described above
         * @throws MWException
         * @return HTMLFormField subclass
         */
@@ -416,7 +417,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set a callback to a function to do something with the form
         * once it's been successfully validated.
-        * @param $cb String function name.  The function will be passed
+        * @param string $cb function name.  The function will be passed
         *       the output from HTMLForm::filterDataForSubmit, and must
         *       return Bool true on success, Bool false if no submission
         *       was attempted, or String HTML output to display on error.
@@ -440,7 +441,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Set the introductory message, overwriting any existing message.
-        * @param $msg String complete text of message to display
+        * @param string $msg complete text of message to display
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        function setIntro( $msg ) {
@@ -451,7 +452,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set the introductory message, overwriting any existing message.
         * @since 1.19
-        * @param $msg String complete text of message to display
+        * @param string $msg complete text of message to display
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        function setPreText( $msg ) {
@@ -461,7 +462,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Add introductory text.
-        * @param $msg String complete text of message to display
+        * @param string $msg complete text of message to display
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        function addPreText( $msg ) {
@@ -471,8 +472,8 @@ class HTMLForm extends ContextSource {
 
        /**
         * Add header text, inside the form.
-        * @param $msg String complete text of message to display
-        * @param $section string The section to add the header to
+        * @param string $msg complete text of message to display
+        * @param string $section The section to add the header to
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        function addHeaderText( $msg, $section = null ) {
@@ -490,7 +491,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set header text, inside the form.
         * @since 1.19
-        * @param $msg String complete text of message to display
+        * @param string $msg complete text of message to display
         * @param $section The section to add the header to
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -505,8 +506,8 @@ class HTMLForm extends ContextSource {
 
        /**
         * Add footer text, inside the form.
-        * @param $msg String complete text of message to display
-        * @param $section string The section to add the footer text to
+        * @param string $msg complete text of message to display
+        * @param string $section The section to add the footer text to
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        function addFooterText( $msg, $section = null ) {
@@ -524,8 +525,8 @@ class HTMLForm extends ContextSource {
        /**
         * Set footer text, inside the form.
         * @since 1.19
-        * @param $msg String complete text of message to display
-        * @param $section string The section to add the footer text to
+        * @param string $msg complete text of message to display
+        * @param string $section The section to add the footer text to
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        function setFooterText( $msg, $section = null ) {
@@ -539,7 +540,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Add text to the end of the display.
-        * @param $msg String complete text of message to display
+        * @param string $msg complete text of message to display
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        function addPostText( $msg ) {
@@ -549,7 +550,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Set text at the end of the display.
-        * @param $msg String complete text of message to display
+        * @param string $msg complete text of message to display
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        function setPostText( $msg ) {
@@ -559,8 +560,8 @@ class HTMLForm extends ContextSource {
 
        /**
         * Add a hidden field to the output
-        * @param $name String field name.  This will be used exactly as entered
-        * @param $value String field value
+        * @param string $name field name.  This will be used exactly as entered
+        * @param string $value field value
         * @param $attribs Array
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -572,9 +573,9 @@ class HTMLForm extends ContextSource {
 
        /**
         * Add a button to the form
-        * @param $name String field name.
-        * @param $value String field value
-        * @param $id String DOM id for the button (default: null)
+        * @param string $name field name.
+        * @param string $value field value
+        * @param string $id DOM id for the button (default: null)
         * @param $attribs Array
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -624,7 +625,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Wrap the form innards in an actual "<form>" element
-        * @param $html String HTML contents to wrap.
+        * @param string $html HTML contents to wrap.
         * @return String wrapped HTML.
         */
        function wrapForm( $html ) {
@@ -764,7 +765,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Format a stack of error messages into a single HTML string
-        * @param $errors Array of message keys/values
+        * @param array $errors of message keys/values
         * @return String HTML, a "<ul>" list of errors
         */
        public static function formatErrors( $errors ) {
@@ -792,7 +793,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Set the text for the submit button
-        * @param $t String plaintext.
+        * @param string $t plaintext.
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        function setSubmitText( $t ) {
@@ -803,7 +804,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set the text for the submit button to a message
         * @since 1.19
-        * @param $msg String message key
+        * @param string $msg message key
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        public function setSubmitTextMsg( $msg ) {
@@ -822,7 +823,7 @@ class HTMLForm extends ContextSource {
        }
 
        /**
-        * @param $name String Submit button name
+        * @param string $name Submit button name
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        public function setSubmitName( $name ) {
@@ -831,7 +832,7 @@ class HTMLForm extends ContextSource {
        }
 
        /**
-        * @param $name String Tooltip for the submit button
+        * @param string $name Tooltip for the submit button
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        public function setSubmitTooltip( $name ) {
@@ -851,7 +852,7 @@ class HTMLForm extends ContextSource {
        }
 
        /**
-        * @param $id String DOM id for the form
+        * @param string $id DOM id for the form
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        public function setId( $id ) {
@@ -861,7 +862,7 @@ class HTMLForm extends ContextSource {
        /**
         * Prompt the whole form to be wrapped in a "<fieldset>", with
         * this text as its "<legend>" element.
-        * @param $legend String HTML to go inside the "<legend>" element.
+        * @param string $legend HTML to go inside the "<legend>" element.
         *       Will be escaped
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -874,7 +875,7 @@ class HTMLForm extends ContextSource {
         * Prompt the whole form to be wrapped in a "<fieldset>", with
         * this message as its "<legend>" element.
         * @since 1.19
-        * @param $msg String message key
+        * @param string $msg message key
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        public function setWrapperLegendMsg( $msg ) {
@@ -931,8 +932,8 @@ class HTMLForm extends ContextSource {
        /**
         * @todo Document
         * @param $fields array[]|HTMLFormField[] array of fields (either arrays or objects)
-        * @param $sectionName string ID attribute of the "<table>" tag for this section, ignored if empty
-        * @param $fieldsetIDPrefix string ID prefix for the "<fieldset>" tag of each subsection, ignored if empty
+        * @param string $sectionName ID attribute of the "<table>" tag for this section, ignored if empty
+        * @param string $fieldsetIDPrefix ID prefix for the "<fieldset>" tag of each subsection, ignored if empty
         * @return String
         */
        public function displaySection( $fields, $sectionName = '', $fieldsetIDPrefix = '' ) {
@@ -956,7 +957,7 @@ class HTMLForm extends ContextSource {
                                        $hasLabel = true;
                                }
                        } elseif ( is_array( $value ) ) {
-                               $section = $this->displaySection( $value, $key );
+                               $section = $this->displaySection( $value, $key, "$fieldsetIDPrefix$key-" );
                                $legend = $this->getLegend( $key );
                                if ( isset( $this->mSectionHeaders[$key] ) ) {
                                        $section = $this->mSectionHeaders[$key] . $section;
@@ -1029,7 +1030,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Stop a reset button being shown for this form
-        * @param $suppressReset Bool set to false to re-enable the
+        * @param bool $suppressReset set to false to re-enable the
         *       button again
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1099,7 +1100,7 @@ abstract class HTMLFormField {
         * This function must be implemented to return the HTML to generate
         * the input object itself.  It should not implement the surrounding
         * table cells/rows, or labels/help messages.
-        * @param $value String the value to set the input to; eg a default
+        * @param string $value the value to set the input to; eg a default
         *       text for a text input.
         * @return String valid HTML.
         */
@@ -1131,8 +1132,8 @@ abstract class HTMLFormField {
         * Override this function to add specific validation checks on the
         * field input.  Don't forget to call parent::validate() to ensure
         * that the user-defined callback mValidationCallback is still run
-        * @param $value String the value the field was submitted with
-        * @param $alldata Array the data collected from the form
+        * @param string $value the value the field was submitted with
+        * @param array $alldata the data collected from the form
         * @return Mixed Bool true on success, or String error to display.
         */
        function validate( $value, $alldata ) {
@@ -1181,7 +1182,7 @@ abstract class HTMLFormField {
 
        /**
         * Initialise the object
-        * @param $params array Associative Array. See HTMLForm doc for syntax.
+        * @param array $params Associative Array. See HTMLForm doc for syntax.
         * @throws MWException
         */
        function __construct( $params ) {
@@ -1250,7 +1251,7 @@ abstract class HTMLFormField {
        /**
         * Get the complete table row for the input, including help text,
         * labels, and whatever.
-        * @param $value String the value to set the input to.
+        * @param string $value the value to set the input to.
         * @return String complete HTML table row.
         */
        function getTableRow( $value ) {
@@ -1294,7 +1295,7 @@ abstract class HTMLFormField {
         * Get the complete div for the input, including help text,
         * labels, and whatever.
         * @since 1.20
-        * @param $value String the value to set the input to.
+        * @param string $value the value to set the input to.
         * @return String complete HTML table row.
         */
        public function getDiv( $value ) {
@@ -1321,11 +1322,11 @@ abstract class HTMLFormField {
         * Get the complete raw fields for the input, including help text,
         * labels, and whatever.
         * @since 1.20
-        * @param $value String the value to set the input to.
+        * @param string $value the value to set the input to.
         * @return String complete HTML table row.
         */
        public function getRaw( $value ) {
-               list( $errors, $errorClass ) = $this->getErrorsAndErrorClass( $value );
+               list( $errors, ) = $this->getErrorsAndErrorClass( $value );
                $inputHtml = $this->getInputHTML( $value );
                $helptext = $this->getHelpTextHtmlRaw( $this->getHelpText() );
                $cellAttributes = array();
@@ -1419,7 +1420,7 @@ abstract class HTMLFormField {
        /**
         * Determine form errors to display and their classes
         * @since 1.20
-        * @param $value String the value of the input
+        * @param string $value the value of the input
         * @return Array
         */
        public function getErrorsAndErrorClass( $value ) {
@@ -1487,7 +1488,7 @@ abstract class HTMLFormField {
        /**
         * flatten an array of options to a single array, for instance,
         * a set of "<options>" inside "<optgroups>".
-        * @param $options array Associative Array with values either Strings
+        * @param array $options Associative Array with values either Strings
         *       or Arrays
         * @return Array flattened input
         */
@@ -1781,6 +1782,170 @@ class HTMLCheckField extends HTMLFormField {
        }
 }
 
+/**
+ * A checkbox matrix
+ * Operates similarly to HTMLMultiSelectField, but instead of using an array of
+ * options, uses an array of rows and an array of columns to dynamically
+ * construct a matrix of options.
+ */
+class HTMLCheckMatrix extends HTMLFormField {
+
+       function validate( $value, $alldata ) {
+               $rows = $this->mParams['rows'];
+               $columns = $this->mParams['columns'];
+
+               // Make sure user-defined validation callback is run
+               $p = parent::validate( $value, $alldata );
+               if ( $p !== true ) {
+                       return $p;
+               }
+
+               // Make sure submitted value is an array
+               if ( !is_array( $value ) ) {
+                       return false;
+               }
+
+               // If all options are valid, array_intersect of the valid options
+               // and the provided options will return the provided options.
+               $validOptions = array();
+               foreach ( $rows as $rowTag ) {
+                       foreach ( $columns as $columnTag ) {
+                               $validOptions[] = $columnTag . '-' . $rowTag;
+                       }
+               }
+               $validValues = array_intersect( $value, $validOptions );
+               if ( count( $validValues ) == count( $value ) ) {
+                       return true;
+               } else {
+                       return $this->msg( 'htmlform-select-badoption' )->parse();
+               }
+       }
+
+       /**
+        * Build a table containing a matrix of checkbox options.
+        * The value of each option is a combination of the row tag and column tag.
+        * mParams['rows'] is an array with row labels as keys and row tags as values.
+        * mParams['columns'] is an array with column labels as keys and column tags as values.
+        * @param array $value of the options that should be checked
+        * @return String
+        */
+       function getInputHTML( $value ) {
+               $html = '';
+               $tableContents = '';
+               $attribs = array();
+               $rows = $this->mParams['rows'];
+               $columns = $this->mParams['columns'];
+
+               // If the disabled param is set, disable all the options
+               if ( !empty( $this->mParams['disabled'] ) ) {
+                       $attribs['disabled'] = 'disabled';
+               }
+
+               // Build the column headers
+               $headerContents = Html::rawElement( 'td', array(), '&#160;' );
+               foreach ( $columns as $columnLabel => $columnTag ) {
+                       $headerContents .= Html::rawElement( 'td', array(), $columnLabel );
+               }
+               $tableContents .= Html::rawElement( 'tr', array(), "\n$headerContents\n" );
+
+               // Build the options matrix
+               foreach ( $rows as $rowLabel => $rowTag ) {
+                       $rowContents = Html::rawElement( 'td', array(), $rowLabel );
+                       foreach ( $columns as $columnTag ) {
+                               // Knock out any options that are not wanted
+                               if ( isset( $this->mParams['remove-options'] )
+                                       && in_array( "$columnTag-$rowTag", $this->mParams['remove-options'] ) )
+                               {
+                                       $rowContents .= Html::rawElement( 'td', array(), '&#160;' );
+                               } else {
+                                       // Construct the checkbox
+                                       $thisAttribs = array(
+                                               'id' => "{$this->mID}-$columnTag-$rowTag",
+                                               'value' => $columnTag . '-' . $rowTag
+                                       );
+                                       $checkbox = Xml::check(
+                                               $this->mName . '[]',
+                                               in_array( $columnTag . '-' . $rowTag, (array)$value, true ),
+                                               $attribs + $thisAttribs );
+                                       $rowContents .= Html::rawElement( 'td', array(), $checkbox );
+                               }
+                       }
+                       $tableContents .= Html::rawElement( 'tr', array(), "\n$rowContents\n" );
+               }
+
+               // Put it all in a table
+               $html .= Html::rawElement( 'table', array( 'class' => 'mw-htmlform-matrix' ),
+                       Html::rawElement( 'tbody', array(), "\n$tableContents\n" ) ) . "\n";
+
+               return $html;
+       }
+
+       /**
+        * Get the complete table row for the input, including help text,
+        * labels, and whatever.
+        * We override this function since the label should always be on a separate
+        * line above the options in the case of a checkbox matrix, i.e. it's always
+        * a "vertical-label".
+        * @param string $value the value to set the input to
+        * @return String complete HTML table row
+        */
+       function getTableRow( $value ) {
+               list( $errors, $errorClass ) = $this->getErrorsAndErrorClass( $value );
+               $inputHtml = $this->getInputHTML( $value );
+               $fieldType = get_class( $this );
+               $helptext = $this->getHelpTextHtmlTable( $this->getHelpText() );
+               $cellAttributes = array( 'colspan' => 2 );
+
+               $label = $this->getLabelHtml( $cellAttributes );
+
+               $field = Html::rawElement(
+                       'td',
+                       array( 'class' => 'mw-input' ) + $cellAttributes,
+                       $inputHtml . "\n$errors"
+               );
+
+               $html = Html::rawElement( 'tr',
+                       array( 'class' => 'mw-htmlform-vertical-label' ), $label );
+               $html .= Html::rawElement( 'tr',
+                       array( 'class' => "mw-htmlform-field-$fieldType {$this->mClass} $errorClass" ),
+                       $field );
+
+               return $html . $helptext;
+       }
+
+       /**
+        * @param $request WebRequest
+        * @return Array
+        */
+       function loadDataFromRequest( $request ) {
+               if ( $this->mParent->getMethod() == 'post' ) {
+                       if ( $request->wasPosted() ) {
+                               // Checkboxes are not added to the request arrays if they're not checked,
+                               // so it's perfectly possible for there not to be an entry at all
+                               return $request->getArray( $this->mName, array() );
+                       } else {
+                               // That's ok, the user has not yet submitted the form, so show the defaults
+                               return $this->getDefault();
+                       }
+               } else {
+                       // This is the impossible case: if we look at $_GET and see no data for our
+                       // field, is it because the user has not yet submitted the form, or that they
+                       // have submitted it with all the options unchecked. We will have to assume the
+                       // latter, which basically means that you can't specify 'positive' defaults
+                       // for GET forms.
+                       return $request->getArray( $this->mName, array() );
+               }
+       }
+
+       function getDefault() {
+               if ( isset( $this->mDefault ) ) {
+                       return $this->mDefault;
+               } else {
+                       return array();
+               }
+       }
+}
+
 /**
  * A select dropdown field.  Basically a wrapper for Xmlselect class
  */
@@ -2057,8 +2222,8 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
 
        /**
         * Build a drop-down box from a textual list.
-        * @param $string String message text
-        * @param $otherName String name of "other reason" option
+        * @param string $string message text
+        * @param string $otherName name of "other reason" option
         * @return Array
         * TODO: this is copied from Xml::listDropDown(), deprecate/avoid duplication?
         */
@@ -2192,7 +2357,6 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
  */
 class HTMLRadioField extends HTMLFormField {
 
-
        function validate( $value, $alldata ) {
                $p = parent::validate( $value, $alldata );
 
index 5974173..1af733a 100644 (file)
@@ -183,7 +183,6 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob
        }
 }
 
-
 /**
  * Pointer object for an item within a CGZ blob stored in the text table.
  */
@@ -199,7 +198,7 @@ class HistoryBlobStub {
        var $mOldId, $mHash, $mRef;
 
        /**
-        * @param $hash string the content hash of the text
+        * @param string $hash the content hash of the text
         * @param $oldid Integer the old_id for the CGZ object
         */
        function __construct( $hash = '', $oldid = 0 ) {
@@ -285,7 +284,6 @@ class HistoryBlobStub {
        }
 }
 
-
 /**
  * To speed up conversion from 1.4 to 1.5 schema, text rows can refer to the
  * leftover cur table as the backend. This avoids expensively copying hundreds
index a29e5fe..8cc7ace 100644 (file)
@@ -45,7 +45,7 @@ class Hooks {
         *
         * @since 1.21
         *
-        * @param $name String: the name of the hook to clear.
+        * @param string $name the name of the hook to clear.
         *
         * @throws MWException if not in testing mode.
         */
@@ -57,13 +57,12 @@ class Hooks {
                unset( self::$handlers[$name] );
        }
 
-
        /**
         * Attach an event handler to a given hook
         *
         * @since 1.18
         *
-        * @param $name String: name of hook
+        * @param string $name name of hook
         * @param $callback Mixed: callback function to attach
         */
        public static function register( $name, $callback ) {
@@ -80,7 +79,7 @@ class Hooks {
         *
         * @since 1.18
         *
-        * @param $name String: name of hook
+        * @param string $name name of hook
         * @return Boolean: true if the hook has a function registered to it
         */
        public static function isRegistered( $name ) {
@@ -96,7 +95,7 @@ class Hooks {
         *
         * @throws MWException
         * @throws FatalError
-        * @param $name String: name of the hook
+        * @param string $name name of the hook
         *
         * @return array
         */
@@ -135,7 +134,7 @@ class Hooks {
        /**
         * Call hook functions defined in Hooks::register
         *
-        * @param $event String: event name
+        * @param string $event event name
         * @param $args  Array: parameters passed to hook functions
         *
         * @throws MWException
@@ -303,8 +302,8 @@ class Hooks {
         *
         * @since 1.18
         *
-        * @param $errno int Unused
-        * @param $errstr String: error message
+        * @param int $errno Unused
+        * @param string $errstr error message
         * @throws MWHookException
         * @return Boolean: false
         */
index 60be863..2757997 100644 (file)
@@ -126,11 +126,11 @@ class Html {
         * content model.  If $wgWellFormedXml is false, then a few bytes will be
         * shaved off the HTML output as well.
         *
-        * @param $element string The element's name, e.g., 'a'
-        * @param $attribs array  Associative array of attributes, e.g., array(
+        * @param string $element The element's name, e.g., 'a'
+        * @param array $attribs  Associative array of attributes, e.g., array(
         *   'href' => 'http://www.mediawiki.org/' ). See expandAttributes() for
         *   further documentation.
-        * @param $contents string The raw HTML contents of the element: *not*
+        * @param string $contents The raw HTML contents of the element: *not*
         *   escaped!
         * @return string Raw HTML
         */
@@ -250,7 +250,7 @@ class Html {
         * it returns the empty string when that's guaranteed to be safe.
         *
         * @since 1.17
-        * @param $element string Name of the element, e.g., 'a'
+        * @param string $element Name of the element, e.g., 'a'
         * @return string A closing tag, if required
         */
        public static function closeElement( $element ) {
@@ -287,8 +287,8 @@ class Html {
         * only guarantees that the output array should be functionally identical
         * to the input array (currently per the HTML 5 draft as of 2009-09-06).
         *
-        * @param $element string Name of the element, e.g., 'a'
-        * @param $attribs array  Associative array of attributes, e.g., array(
+        * @param string $element Name of the element, e.g., 'a'
+        * @param array $attribs  Associative array of attributes, e.g., array(
         *   'href' => 'http://www.mediawiki.org/' ).  See expandAttributes() for
         *   further documentation.
         * @return array An array of attributes functionally identical to $attribs
@@ -435,7 +435,7 @@ class Html {
         *     // gives '<em class="bar quux"></em>'
         * @endcode
         *
-        * @param $attribs array Associative array of attributes, e.g., array(
+        * @param array $attribs Associative array of attributes, e.g., array(
         *   'href' => 'http://www.mediawiki.org/' ).  Values will be HTML-escaped.
         *   A value of false means to omit the attribute.  For boolean attributes,
         *   you can omit the key, e.g., array( 'checked' ) instead of
@@ -598,7 +598,7 @@ class Html {
         * @todo do some useful escaping as well, like if $contents contains
         * literal "</script>" or (for XML) literal "]]>".
         *
-        * @param $contents string JavaScript
+        * @param string $contents JavaScript
         * @return string Raw HTML
         */
        public static function inlineScript( $contents ) {
@@ -641,7 +641,7 @@ class Html {
         * (if any).  TODO: do some useful escaping as well, like if $contents
         * contains literal "</style>" (admittedly unlikely).
         *
-        * @param $contents string CSS
+        * @param string $contents CSS
         * @param $media mixed A media type string, like 'screen'
         * @return string Raw HTML
         */
@@ -683,7 +683,7 @@ class Html {
         * @param $name    string name attribute
         * @param $value   mixed  value attribute
         * @param $type    string type attribute
-        * @param $attribs array  Associative array of miscellaneous extra
+        * @param array $attribs  Associative array of miscellaneous extra
         *   attributes, passed to Html::element()
         * @return string Raw HTML
         */
@@ -700,7 +700,7 @@ class Html {
         *
         * @param $name    string name attribute
         * @param $value   string value attribute
-        * @param $attribs array  Associative array of miscellaneous extra
+        * @param array $attribs  Associative array of miscellaneous extra
         *   attributes, passed to Html::element()
         * @return string Raw HTML
         */
@@ -718,7 +718,7 @@ class Html {
         *
         * @param $name    string name attribute
         * @param $value   string value attribute
-        * @param $attribs array  Associative array of miscellaneous extra
+        * @param array $attribs  Associative array of miscellaneous extra
         *   attributes, passed to Html::element()
         * @return string Raw HTML
         */
@@ -757,7 +757,7 @@ class Html {
         * - label: text for label to add before the field
         * - exclude: [optional] Array of namespace ids to exclude
         * - disable: [optional] Array of namespace ids for which the option should be disabled in the selector
-        * @param $selectAttribs array HTML attributes for the generated select element.
+        * @param array $selectAttribs HTML attributes for the generated select element.
         * - id:   [optional], default: 'namespace'
         * - name: [optional], default: 'namespace'
         * @return string HTML code to select a namespace.
@@ -852,7 +852,7 @@ class Html {
         * Constructs the opening html-tag with necessary doctypes depending on
         * global variables.
         *
-        * @param $attribs array  Associative array of miscellaneous extra
+        * @param array $attribs  Associative array of miscellaneous extra
         *   attributes, passed to Html::element() of html tag.
         * @return string  Raw HTML
         */
@@ -914,10 +914,10 @@ class Html {
        /**
         * Get HTML for an info box with an icon.
         *
-        * @param $text String: wikitext, get this with wfMessage()->plain()
-        * @param $icon String: icon name, file in skins/common/images
-        * @param $alt String: alternate text for the icon
-        * @param $class String: additional class name to add to the wrapper div
+        * @param string $text wikitext, get this with wfMessage()->plain()
+        * @param string $icon icon name, file in skins/common/images
+        * @param string $alt alternate text for the icon
+        * @param string $class additional class name to add to the wrapper div
         * @param $useStylePath
         *
         * @return string
index 892e0ed..27b1749 100644 (file)
@@ -35,9 +35,9 @@ class Http {
        /**
         * Perform an HTTP request
         *
-        * @param $method String: HTTP method. Usually GET/POST
-        * @param $url String: full URL to act on. If protocol-relative, will be expanded to an http:// URL
-        * @param $options Array: options to pass to MWHttpRequest object.
+        * @param string $method HTTP method. Usually GET/POST
+        * @param string $url full URL to act on. If protocol-relative, will be expanded to an http:// URL
+        * @param array $options options to pass to MWHttpRequest object.
         *      Possible keys for the array:
         *    - timeout             Timeout length in seconds
         *    - postData            An array of key-value pairs or a url-encoded form data
@@ -103,7 +103,7 @@ class Http {
        /**
         * Check if the URL can be served by localhost
         *
-        * @param $url String: full url to check
+        * @param string $url full url to check
         * @return Boolean
         */
        public static function isLocalURL( $url ) {
@@ -209,8 +209,8 @@ class MWHttpRequest {
        public $status;
 
        /**
-        * @param $url String: url to use. If protocol-relative, will be expanded to an http:// URL
-        * @param $options Array: (optional) extra params to pass (see Http::request())
+        * @param string $url url to use. If protocol-relative, will be expanded to an http:// URL
+        * @param array $options (optional) extra params to pass (see Http::request())
         */
        protected function __construct( $url, $options = array() ) {
                global $wgHTTPTimeout;
@@ -263,8 +263,8 @@ class MWHttpRequest {
 
        /**
         * Generate a new request object
-        * @param $url String: url to use
-        * @param $options Array: (optional) extra params to pass (see Http::request())
+        * @param string $url url to use
+        * @param array $options (optional) extra params to pass (see Http::request())
         * @throws MWException
         * @return CurlHttpRequest|PhpHttpRequest
         * @see MWHttpRequest::__construct
@@ -506,7 +506,6 @@ class MWHttpRequest {
                return (int)$this->respStatus;
        }
 
-
        /**
         * Returns true if the last status code was a redirect.
         *
@@ -643,7 +642,7 @@ class MWHttpRequest {
 
                                if ( isset( $url['host'] ) ) {
                                        $domain = $url[ 'scheme' ] . '://' . $url[ 'host' ];
-                                       break;  //found correct URI (with host)
+                                       break; //found correct URI (with host)
                                } else {
                                        $foundRelativeURI = true;
                                }
index 5c50c22..955ee8b 100644 (file)
@@ -77,7 +77,7 @@ class IP {
         * SIIT IPv4-translated addresses are rejected.
         * Note: canonicalize() tries to convert translated addresses to IPv4.
         *
-        * @param $ip String: possible IP address
+        * @param string $ip possible IP address
         * @return Boolean
         */
        public static function isIPAddress( $ip ) {
@@ -88,7 +88,7 @@ class IP {
         * Given a string, determine if it as valid IP in IPv6 only.
         * Note: Unlike isValid(), this looks for networks too.
         *
-        * @param $ip String: possible IP address
+        * @param string $ip possible IP address
         * @return Boolean
         */
        public static function isIPv6( $ip ) {
@@ -99,7 +99,7 @@ class IP {
         * Given a string, determine if it as valid IP in IPv4 only.
         * Note: Unlike isValid(), this looks for networks too.
         *
-        * @param $ip String: possible IP address
+        * @param string $ip possible IP address
         * @return Boolean
         */
        public static function isIPv4( $ip ) {
@@ -137,7 +137,7 @@ class IP {
         * IPv6 addresses in octet notation are expanded to 8 words.
         * IPv4 addresses are just trimmed.
         *
-        * @param $ip String: IP address in quad or octet form (CIDR or not).
+        * @param string $ip IP address in quad or octet form (CIDR or not).
         * @return String
         */
        public static function sanitizeIP( $ip ) {
@@ -241,7 +241,7 @@ class IP {
         *
         * A bare IPv6 address is accepted despite the lack of square brackets.
         *
-        * @param $both string The string with the host and port
+        * @param string $both The string with the host and port
         * @return array
         */
        public static function splitHostAndPort( $both ) {
@@ -316,7 +316,7 @@ class IP {
        /**
         * Convert an IPv4 or IPv6 hexadecimal representation back to readable format
         *
-        * @param $hex String: number, with "v6-" prefix if it is IPv6
+        * @param string $hex number, with "v6-" prefix if it is IPv6
         * @return String: quad-dotted (IPv4) or octet notation (IPv6)
         */
        public static function formatHex( $hex ) {
@@ -444,7 +444,7 @@ class IP {
         * function for an IPv6 address will be prefixed with "v6-", a non-
         * hexadecimal string which sorts after the IPv4 addresses.
         *
-        * @param $ip String: quad dotted/octet IP address.
+        * @param string $ip quad dotted/octet IP address.
         * @return String
         */
        public static function toHex( $ip ) {
@@ -462,7 +462,7 @@ class IP {
        /**
         * Given an IPv6 address in octet notation, returns a pure hex string.
         *
-        * @param $ip String: octet ipv6 IP address.
+        * @param string $ip octet ipv6 IP address.
         * @return String: pure hex (uppercase)
         */
        private static function IPv6ToRawHex( $ip ) {
@@ -482,7 +482,7 @@ class IP {
         * Like ip2long() except that it actually works and has a consistent error return value.
         * Comes from ProxyTools.php
         *
-        * @param $ip String: quad dotted IP address.
+        * @param string $ip quad dotted IP address.
         * @return Mixed: string/int/false
         */
        public static function toUnsigned( $ip ) {
@@ -509,7 +509,7 @@ class IP {
         * Convert a network specification in CIDR notation
         * to an integer network and a number of bits
         *
-        * @param $range String: IP with CIDR prefix
+        * @param string $range IP with CIDR prefix
         * @return array(int or string, int)
         */
        public static function parseCIDR( $range ) {
@@ -551,7 +551,7 @@ class IP {
         *     2001:0db8:85a3::7344/96                                   CIDR
         *     2001:0db8:85a3::7344 - 2001:0db8:85a3::7344   Explicit range
         *     2001:0db8:85a3::7344                                      Single IP
-        * @param $range String: IP range
+        * @param string $range IP range
         * @return array(string, string)
         */
        public static function parseRange( $range ) {
@@ -692,8 +692,8 @@ class IP {
        /**
         * Determine if a given IPv4/IPv6 address is in a given CIDR network
         *
-        * @param $addr String: the address to check against the given range.
-        * @param $range String: the range to check the given address against.
+        * @param string $addr the address to check against the given range.
+        * @param string $range the range to check the given address against.
         * @return Boolean: whether or not the given address is in the given range.
         */
        public static function isInRange( $addr, $range ) {
@@ -710,7 +710,7 @@ class IP {
         * This currently only checks a few IPV4-to-IPv6 related cases.  More
         * unusual representations may be added later.
         *
-        * @param $addr String: something that might be an IP address
+        * @param string $addr something that might be an IP address
         * @return String: valid dotted quad IPv4 address or null
         */
        public static function canonicalize( $addr ) {
@@ -742,13 +742,13 @@ class IP {
                        return long2ip( ( hexdec( $m[1] ) << 16 ) + hexdec( $m[2] ) );
                }
 
-               return null;  // give up
+               return null; // give up
        }
 
        /**
         * Gets rid of uneeded numbers in quad-dotted/octet IP strings
         * For example, 127.111.113.151/24 -> 127.111.113.0/24
-        * @param $range String: IP address to normalize
+        * @param string $range IP address to normalize
         * @return string
         */
        public static function sanitizeRange( $range ) {
index 037093a..9660c07 100644 (file)
@@ -93,7 +93,7 @@ class ImageGallery {
        /**
         * Set the caption (as plain text)
         *
-        * @param $caption string Caption
+        * @param string $caption Caption
         */
        function setCaption( $caption ) {
                $this->mCaption = htmlspecialchars( $caption );
@@ -102,7 +102,7 @@ class ImageGallery {
        /**
         * Set the caption (as HTML)
         *
-        * @param $caption String: Caption
+        * @param string $caption Caption
         */
        public function setCaptionHtml( $caption ) {
                $this->mCaption = $caption;
@@ -220,7 +220,7 @@ class ImageGallery {
         * Note -- if taking from user input, you should probably run through
         * Sanitizer::validateAttributes() first.
         *
-        * @param $attribs Array of HTML attribute pairs
+        * @param array $attribs of HTML attribute pairs
         */
        function setAttributes( $attribs ) {
                $this->mAttribs = $attribs;
@@ -238,8 +238,6 @@ class ImageGallery {
         * @return string
         */
        function toHTML() {
-               global $wgLang;
-
                if ( $this->mPerRow > 0 ) {
                        $maxwidth = $this->mPerRow * ( $this->mWidths + self::THUMB_PADDING + self::GB_PADDING + self::GB_BORDERS );
                        $oldStyle = isset( $this->mAttribs['style'] ) ? $this->mAttribs['style'] : '';
@@ -255,6 +253,7 @@ class ImageGallery {
                        $output .= "\n\t<li class='gallerycaption'>{$this->mCaption}</li>";
                }
 
+               $lang = $this->getLang();
                $params = array(
                        'width' => $this->mWidths,
                        'height' => $this->mHeights
@@ -337,7 +336,7 @@ class ImageGallery {
 
                        if( $this->mShowBytes ) {
                                if( $img ) {
-                                       $fileSize = htmlspecialchars( $wgLang->formatSize( $img->getSize() ) );
+                                       $fileSize = htmlspecialchars( $lang->formatSize( $img->getSize() ) );
                                } else {
                                        $fileSize = wfMessage( 'filemissing' )->escaped();
                                }
@@ -349,7 +348,7 @@ class ImageGallery {
                        $textlink = $this->mShowFilename ?
                                Linker::link(
                                        $nt,
-                                       htmlspecialchars( $wgLang->truncate( $nt->getText(), $this->mCaptionLength ) ),
+                                       htmlspecialchars( $lang->truncate( $nt->getText(), $this->mCaptionLength ) ),
                                        array(),
                                        array(),
                                        array( 'known', 'noclasses' )
@@ -403,4 +402,15 @@ class ImageGallery {
                        : false;
        }
 
+       /**
+        * Determines the correct language to be used for this image gallery
+        * @return Language object
+        */
+       private function getLang() {
+               global $wgLang;
+               return $this->mParser
+                       ? $this->mParser->getTargetLanguage()
+                       : $wgLang;
+       }
+
 } //class
index 998d607..11e876f 100644 (file)
@@ -50,7 +50,7 @@ class ImagePage extends Article {
 
        /**
         * Constructor from a page id
-        * @param $id Int article ID to load
+        * @param int $id article ID to load
         * @return ImagePage|null
         */
        public static function newFromID( $id ) {
@@ -108,7 +108,7 @@ class ImagePage extends Article {
                $diff = $request->getVal( 'diff' );
                $diffOnly = $request->getBool( 'diffonly', $this->getContext()->getUser()->getOption( 'diffonly' ) );
 
-               if ( $this->getTitle()->getNamespace() != NS_FILE || ( isset( $diff ) && $diffOnly ) ) {
+               if ( $this->getTitle()->getNamespace() != NS_FILE || ( $diff !== null && $diffOnly ) ) {
                        parent::view();
                        return;
                }
@@ -116,7 +116,7 @@ class ImagePage extends Article {
                $this->loadFile();
 
                if ( $this->getTitle()->getNamespace() == NS_FILE && $this->mPage->getFile()->getRedirected() ) {
-                       if ( $this->getTitle()->getDBkey() == $this->mPage->getFile()->getName() || isset( $diff ) ) {
+                       if ( $this->getTitle()->getDBkey() == $this->mPage->getFile()->getName() || $diff !== null ) {
                                // mTitle is the same as the redirect target so ask Article
                                // to perform the redirect for us.
                                $request->setVal( 'diffonly', 'true' );
@@ -250,7 +250,7 @@ class ImagePage extends Article {
         *
         * @todo FIXME: Bad interface, see note on MediaHandler::formatMetadata().
         *
-        * @param $metadata Array: the array containing the EXIF data
+        * @param array $metadata the array containing the EXIF data
         * @return String The metadata table. This is treated as Wikitext (!)
         */
        protected function makeMetadataTable( $metadata ) {
@@ -565,7 +565,7 @@ EOT
 
        /**
         * Creates an thumbnail of specified size and returns an HTML link to it
-        * @param $params array Scaler parameters
+        * @param array $params Scaler parameters
         * @param $width int
         * @param $height int
         * @return string
@@ -909,7 +909,7 @@ EOT
         * Returns the corrosponding $wgImageLimits entry for the selected user option
         *
         * @param $user User
-        * @param $optionName string Name of a option to check, typically imagesize or thumbsize
+        * @param string $optionName Name of a option to check, typically imagesize or thumbsize
         * @return array
         * @since 1.21
         */
index 15e6620..67af3d7 100644 (file)
@@ -330,8 +330,8 @@ class WikiImporter {
         * @param $title Title
         * @param $origTitle Title
         * @param $revCount Integer
-        * @param $sucCount Int: number of revisions for which callback returned true
-        * @param $pageInfo Array: associative array of page information
+        * @param int $sucCount number of revisions for which callback returned true
+        * @param array $pageInfo associative array of page information
         */
        private function pageOutCallback( $title, $origTitle, $revCount, $sucCount, $pageInfo ) {
                if( isset( $this->mPageOutCallback ) ) {
@@ -1646,7 +1646,7 @@ class ImportStreamSource {
        static function newFromUpload( $fieldname = "xmlimport" ) {
                $upload =& $_FILES[$fieldname];
 
-               if( !isset( $upload ) || !$upload['name'] ) {
+               if( $upload === null || !$upload['name'] ) {
                        return Status::newFatal( 'importnofile' );
                }
                if( !empty( $upload['error'] ) ) {
index a8540f2..ae21011 100644 (file)
@@ -120,7 +120,7 @@ class MWInit {
         *
         *    require( MWInit::extSetupPath( 'ParserFunctions/ParserFunctions.php' ) );
         *
-        * @param $extRel string The path relative to the extensions directory, as defined by
+        * @param string $extRel The path relative to the extensions directory, as defined by
         *   $wgExtensionsDirectory.
         *
         * @return string
index 4d2229f..e8aee0b 100644 (file)
@@ -211,7 +211,7 @@ class License {
        /**
         * Constructor
         *
-        * @param $str String: license name??
+        * @param string $str license name??
         */
        function __construct( $str ) {
                list( $text, $template ) = explode( '|', strrev( $str ), 2 );
index 28379c7..26928bf 100644 (file)
@@ -20,7 +20,6 @@
  * @file
  */
 
-
 /**
  * Some functions to help implement an external link filter for spam control.
  *
@@ -37,7 +36,7 @@ class LinkFilter {
         * Check whether $content contains a link to $filterEntry
         *
         * @param $content Content: content to check
-        * @param $filterEntry String: domainparts, see makeRegex() for more details
+        * @param string $filterEntry domainparts, see makeRegex() for more details
         * @return Integer: 0 if no match or 1 if there's at least one match
         */
        static function matchEntry( Content $content, $filterEntry ) {
@@ -57,7 +56,7 @@ class LinkFilter {
        /**
         * Builds a regex pattern for $filterEntry.
         *
-        * @param $filterEntry String: URL, if it begins with "*.", it'll be
+        * @param string $filterEntry URL, if it begins with "*.", it'll be
         *        replaced to match any subdomain
         * @return String: regex pattern, for preg_match()
         */
@@ -85,7 +84,7 @@ class LinkFilter {
         *
         * Asterisks in any other location are considered invalid.
         *
-        * @param $filterEntry String: domainparts
+        * @param string $filterEntry domainparts
         * @param $prot        String: protocol
         * @return Array to be passed to DatabaseBase::buildLike() or false on error
         */
@@ -149,7 +148,7 @@ class LinkFilter {
        /**
         * Filters an array returned by makeLikeArray(), removing everything past first pattern placeholder.
         *
-        * @param $arr array: array to filter
+        * @param array $arr array to filter
         * @return array filtered array
         */
        public static function keepOneWildcard( $arr ) {
index a96bc5f..8003ca3 100644 (file)
@@ -39,7 +39,7 @@ class Linker {
         * Get the appropriate HTML attributes to add to the "a" element of an ex-
         * ternal link, as created by [wikisyntax].
         *
-        * @param $class String: the contents of the class attribute; if an empty
+        * @param string $class the contents of the class attribute; if an empty
         *   string is passed, which is the default value, defaults to 'external'.
         * @return string
         * @deprecated since 1.18 Just pass the external class directly to something using Html::expandAttributes
@@ -53,10 +53,10 @@ class Linker {
         * Get the appropriate HTML attributes to add to the "a" element of an in-
         * terwiki link.
         *
-        * @param $title String: the title text for the link, URL-encoded (???) but
+        * @param string $title the title text for the link, URL-encoded (???) but
         *   not HTML-escaped
-        * @param $unused String: unused
-        * @param $class String: the contents of the class attribute; if an empty
+        * @param string $unused unused
+        * @param string $class the contents of the class attribute; if an empty
         *   string is passed, which is the default value, defaults to 'external'.
         * @return string
         */
@@ -76,10 +76,10 @@ class Linker {
         * Get the appropriate HTML attributes to add to the "a" element of an in-
         * ternal link.
         *
-        * @param $title String: the title text for the link, URL-encoded (???) but
+        * @param string $title the title text for the link, URL-encoded (???) but
         *   not HTML-escaped
-        * @param $unused String: unused
-        * @param $class String: the contents of the class attribute, default none
+        * @param string $unused unused
+        * @param string $class the contents of the class attribute, default none
         * @return string
         */
        static function getInternalLinkAttributes( $title, $unused = null, $class = '' ) {
@@ -93,8 +93,8 @@ class Linker {
         * ternal link, given the Title object for the page we want to link to.
         *
         * @param $nt Title
-        * @param $unused String: unused
-        * @param $class String: the contents of the class attribute, default none
+        * @param string $unused unused
+        * @param string $class the contents of the class attribute, default none
         * @param $title Mixed: optional (unescaped) string to use in the title
         *   attribute; if false, default to the name of the page we're linking to
         * @return string
@@ -171,7 +171,7 @@ class Linker {
         *   the link text.  This is raw HTML and will not be escaped.  If null,
         *   defaults to the prefixed text of the Title; or if the Title is just a
         *   fragment, the contents of the fragment.
-        * @param $customAttribs array  A key => value array of extra HTML attri-
+        * @param array $customAttribs  A key => value array of extra HTML attri-
         *   butes, such as title and class.  (href is ignored.)  Classes will be
         *   merged with the default classes, while other attributes will replace
         *   default attributes.  All passed attribute values will be HTML-escaped.
@@ -179,7 +179,7 @@ class Linker {
         * @param $query         array  The query string to append to the URL
         *   you're linking to, in key => value array form.  Query keys and values
         *   will be URL-encoded.
-        * @param $options string|array  String or array of strings:
+        * @param string|array $options  String or array of strings:
         *     'known': Page is known to exist, so don't check if it does.
         *     'broken': Page is known not to exist, so don't check if it does.
         *     'noclasses': Don't add any classes automatically (includes "new",
@@ -275,7 +275,7 @@ class Linker {
         * Returns the Url used to link to a Title
         *
         * @param $target Title
-        * @param $query Array: query parameters
+        * @param array $query query parameters
         * @param $options Array
         * @return String
         */
@@ -424,10 +424,10 @@ class Linker {
         * despite $query not being used.
         *
         * @param $nt Title
-        * @param $html String [optional]
-        * @param $query String [optional]
-        * @param $trail String [optional]
-        * @param $prefix String [optional]
+        * @param string $html [optional]
+        * @param string $query [optional]
+        * @param string $trail [optional]
+        * @param string $prefix [optional]
         *
         *
         * @return string
@@ -446,8 +446,8 @@ class Linker {
         * a value indicating that the title object is invalid.
         *
         * @param $context IContextSource context to use to get the messages
-        * @param $namespace int Namespace number
-        * @param $title string Text of the title, without the namespace part
+        * @param int $namespace Namespace number
+        * @param string $title Text of the title, without the namespace part
         * @return string
         */
        public static function getInvalidTitleDescription( IContextSource $context, $namespace, $title ) {
@@ -534,7 +534,7 @@ class Linker {
         * @param $parser Parser object
         * @param $title Title object of the file (not the currently viewed page)
         * @param $file File object, or false if it doesn't exist
-        * @param $frameParams Array: associative array of parameters external to the media handler.
+        * @param array $frameParams associative array of parameters external to the media handler.
         *     Boolean parameters are indicated by presence or absence, the value is arbitrary and
         *     will often be false.
         *          thumbnail       If present, downscale and frame
@@ -555,10 +555,10 @@ class Linker {
         *          link-target     Value for the target attribue, only with link-url
         *          no-link         Boolean, suppress description link
         *
-        * @param $handlerParams Array: associative array of media handler parameters, to be passed
+        * @param array $handlerParams associative array of media handler parameters, to be passed
         *       to transform(). Typical keys are "width" and "page".
-        * @param $time String: timestamp of the file, set as false for current
-        * @param $query String: query params for desc url
+        * @param string $time timestamp of the file, set as false for current
+        * @param string $query query params for desc url
         * @param $widthOption: Used by the parser to remember the user preference thumbnailsize
         * @since 1.20
         * @return String: HTML for an image, with links, wrappers, etc.
@@ -616,7 +616,7 @@ class Linker {
 
                        if ( isset( $fp['thumbnail'] ) || isset( $fp['framed'] ) || isset( $fp['frameless'] ) || !$hp['width'] ) {
                                global $wgThumbLimits, $wgThumbUpright;
-                               if ( !isset( $widthOption ) || !isset( $wgThumbLimits[$widthOption] ) ) {
+                               if ( $widthOption === null || !isset( $wgThumbLimits[$widthOption] ) ) {
                                        $widthOption = User::getDefaultOption( 'thumbsize' );
                                }
 
@@ -660,7 +660,7 @@ class Linker {
                if ( $file && isset( $fp['frameless'] ) ) {
                        $srcWidth = $file->getWidth( $page );
                        # For "frameless" option: do not present an image bigger than the source (for bitmap-style images)
-                       # This is the same behaviour as the "thumb" option does it already.
+                       # This is the same behavior as the "thumb" option does it already.
                        if ( $srcWidth && !$file->mustRender() && $hp['width'] > $srcWidth ) {
                                $hp['width'] = $srcWidth;
                        }
@@ -709,8 +709,8 @@ class Linker {
        /**
         * Get the link parameters for MediaTransformOutput::toHtml() from given
         * frame parameters supplied by the Parser.
-        * @param $frameParams array The frame parameters
-        * @param $query string An optional query string to add to description page links
+        * @param array $frameParams The frame parameters
+        * @param string $query An optional query string to add to description page links
         * @return array
         */
        private static function getImageLinkMTOParams( $frameParams, $query = '', $parser = null ) {
@@ -819,7 +819,7 @@ class Linker {
                                $noscale = true;
                        } else {
                                # Do not present an image bigger than the source, for bitmap-style images
-                               # This is a hack to maintain compatibility with arbitrary pre-1.10 behaviour
+                               # This is a hack to maintain compatibility with arbitrary pre-1.10 behavior
                                $srcWidth = $file->getWidth( $page );
                                if ( $srcWidth && !$file->mustRender() && $hp['width'] > $srcWidth ) {
                                        $hp['width'] = $srcWidth;
@@ -914,8 +914,8 @@ class Linker {
         * Make a "broken" link to an image
         *
         * @param $title Title object
-        * @param $label String: link label (plain text)
-        * @param $query String: query string
+        * @param string $label link label (plain text)
+        * @param string $query query string
         * @param $unused1 Unused parameter kept for b/c
         * @param $unused2 Unused parameter kept for b/c
         * @param $time Boolean: a file of a certain timestamp was requested
@@ -957,7 +957,7 @@ class Linker {
         * Get the URL to upload a certain file
         *
         * @param $destFile Title object of the file to upload
-        * @param $query String: urlencoded query string to prepend
+        * @param string $query urlencoded query string to prepend
         * @return String: urlencoded URL
         */
        protected static function getUploadUrl( $destFile, $query = '' ) {
@@ -980,8 +980,8 @@ class Linker {
         * Create a direct link to a given uploaded file.
         *
         * @param $title Title object.
-        * @param $html String: pre-sanitized HTML
-        * @param $time string: MW timestamp of file creation time
+        * @param string $html pre-sanitized HTML
+        * @param string $time MW timestamp of file creation time
         * @return String: HTML
         */
        public static function makeMediaLinkObj( $title, $html = '', $time = false ) {
@@ -995,7 +995,7 @@ class Linker {
         *
         * @param $title Title object.
         * @param $file File|bool mixed File object or false
-        * @param $html String: pre-sanitized HTML
+        * @param string $html pre-sanitized HTML
         * @return String: HTML
         *
         * @todo Handle invalid or missing images better.
@@ -1033,11 +1033,11 @@ class Linker {
 
        /**
         * Make an external link
-        * @param $url String: URL to link to
-        * @param $text String: text of link
+        * @param string $url URL to link to
+        * @param string $text text of link
         * @param $escape Boolean: do we escape the link text?
-        * @param $linktype String: type of external link. Gets added to the classes
-        * @param $attribs Array of extra attributes to <a>
+        * @param string $linktype type of external link. Gets added to the classes
+        * @param array $attribs of extra attributes to <a>
         * @param $title Title|null Title object used for title specific link attributes
         * @return string
         */
@@ -1074,8 +1074,8 @@ class Linker {
        /**
         * Make user link (or user contributions for unregistered users)
         * @param $userId   Integer: user id in database.
-        * @param $userName String: user name in database.
-        * @param $altUserName String: text to display instead of the user name (optional)
+        * @param string $userName user name in database.
+        * @param string $altUserName text to display instead of the user name (optional)
         * @return String: HTML fragment
         * @since 1.19 Method exists for a long time. $altUserName was added in 1.19.
         */
@@ -1100,7 +1100,7 @@ class Linker {
         * Generate standard user tool links (talk, contributions, block link, etc.)
         *
         * @param $userId Integer: user identifier
-        * @param $userText String: user name or IP address
+        * @param string $userText user name or IP address
         * @param $redContribsWhenNoEdits Boolean: should the contributions link be
         *        red if the user has no edits?
         * @param $flags Integer: customisation flags (e.g. Linker::TOOL_LINKS_NOBLOCK and Linker::TOOL_LINKS_EMAIL)
@@ -1158,7 +1158,7 @@ class Linker {
        /**
         * Alias for userToolLinks( $userId, $userText, true );
         * @param $userId Integer: user identifier
-        * @param $userText String: user name or IP address
+        * @param string $userText user name or IP address
         * @param $edits Integer: user edit count (optional, for performance)
         * @return String
         */
@@ -1166,10 +1166,9 @@ class Linker {
                return self::userToolLinks( $userId, $userText, true, 0, $edits );
        }
 
-
        /**
         * @param $userId Integer: user id in database.
-        * @param $userText String: user name in database.
+        * @param string $userText user name in database.
         * @return String: HTML fragment with user talk link
         */
        public static function userTalkLink( $userId, $userText ) {
@@ -1180,7 +1179,7 @@ class Linker {
 
        /**
         * @param $userId Integer: userid
-        * @param $userText String: user name in database.
+        * @param string $userText user name in database.
         * @return String: HTML fragment with block link
         */
        public static function blockLink( $userId, $userText ) {
@@ -1191,7 +1190,7 @@ class Linker {
 
        /**
         * @param $userId Integer: userid
-        * @param $userText String: user name in database.
+        * @param string $userText user name in database.
         * @return String: HTML fragment with e-mail user link
         */
        public static function emailLink( $userId, $userText ) {
@@ -1292,7 +1291,7 @@ class Linker {
         * add a separator where needed and format the comment itself with CSS
         * Called by Linker::formatComment.
         *
-        * @param $comment String: comment text
+        * @param string $comment comment text
         * @param $title Title|null An optional title object used to links to sections
         * @param $local Boolean: whether section links should refer to local page
         * @return String: formatted comment
@@ -1376,7 +1375,7 @@ class Linker {
         * is ignored
         *
         * @todo FIXME: Doesn't handle sub-links as in image thumb texts like the main parser
-        * @param $comment String: text to format links in
+        * @param string $comment text to format links in
         * @param $title Title|null An optional title object used to links to sections
         * @param $local Boolean: whether section links should refer to local page
         * @return String
@@ -1664,7 +1663,7 @@ class Linker {
        /**
         * Wraps the TOC in a table and provides the hide/collapse javascript.
         *
-        * @param $toc String: html of the Table Of Contents
+        * @param string $toc html of the Table Of Contents
         * @param $lang String|Language|false: Language for the toc title, defaults to user language
         * @return String: full html of the TOC
         */
@@ -1682,7 +1681,7 @@ class Linker {
         * Generate a table of contents from a section tree
         * Currently unused.
         *
-        * @param $tree array Return value of ParserOutput::getSections()
+        * @param array $tree Return value of ParserOutput::getSections()
         * @return String: HTML fragment
         */
        public static function generateTOC( $tree ) {
@@ -1710,12 +1709,12 @@ class Linker {
         * Create a headline for content
         *
         * @param $level Integer: the level of the headline (1-6)
-        * @param $attribs String: any attributes for the headline, starting with
+        * @param string $attribs any attributes for the headline, starting with
         *                 a space and ending with '>'
         *                 This *must* be at least '>' for no attribs
-        * @param $anchor String: the anchor to give the headline (the bit after the #)
-        * @param $html String: html for the text of the header
-        * @param $link String: HTML to add for the section edit link
+        * @param string $anchor the anchor to give the headline (the bit after the #)
+        * @param string $html html for the text of the header
+        * @param string $link HTML to add for the section edit link
         * @param $legacyAnchor Mixed: a second, optional anchor to give for
         *   backward compatibility (false to omit)
         *
@@ -1809,7 +1808,7 @@ class Linker {
         * is set and the user is the only contributor of the page.
         *
         * @param $rev Revision object
-        * @param $verify Bool Try to verfiy that this revision can really be rolled back
+        * @param bool $verify Try to verfiy that this revision can really be rolled back
         * @return integer|bool|null
         */
        public static function getRollbackEditCount( $rev, $verify ) {
@@ -2015,7 +2014,7 @@ class Linker {
        /**
         * Returns HTML for the "hidden categories on this page" list.
         *
-        * @param $hiddencats Array of hidden categories from Article::getHiddenCategories
+        * @param array $hiddencats of hidden categories from Article::getHiddenCategories
         * or similar
         * @return String: HTML output
         */
@@ -2042,7 +2041,7 @@ class Linker {
         * Format a size in bytes for output, using an appropriate
         * unit (B, KB, MB or GB) according to the magnitude in question
         *
-        * @param $size int Size to format
+        * @param int $size Size to format
         * @return String
         */
        public static function formatSize( $size ) {
@@ -2056,7 +2055,7 @@ class Linker {
         * isn't always, because sometimes the accesskey needs to go on a different
         * element than the id, for reverse-compatibility, etc.)
         *
-        * @param $name String: id of the element, minus prefixes.
+        * @param string $name id of the element, minus prefixes.
         * @param $options Mixed: null or the string 'withaccess' to add an access-
         *   key hint
         * @return String: contents of the title attribute (which you must HTML-
@@ -2102,7 +2101,7 @@ class Linker {
         * the id but isn't always, because sometimes the accesskey needs to go on
         * a different element than the id, for reverse-compatibility, etc.)
         *
-        * @param $name String: id of the element, minus prefixes.
+        * @param string $name id of the element, minus prefixes.
         * @return String: contents of the accesskey attribute (which you must HTML-
         *   escape), or false for no accesskey attribute
         */
@@ -2177,7 +2176,7 @@ class Linker {
        /**
         * Creates a (show/hide) link for deleting revisions/log entries
         *
-        * @param $query Array: query parameters to be passed to link()
+        * @param array $query query parameters to be passed to link()
         * @param $restricted Boolean: set to true to use a "<strong>" instead of a "<span>"
         * @param $delete Boolean: set to true to use (show/hide) rather than (show)
         *
@@ -2216,10 +2215,10 @@ class Linker {
         * This function is a shortcut to makeBrokenLinkObj(Title::newFromText($title),...). Do not call
         * it if you already have a title object handy. See makeBrokenLinkObj for further documentation.
         *
-        * @param $title String: The text of the title
-        * @param $text String: Link text
-        * @param $query String: Optional query part
-        * @param $trail String: Optional trail. Alphabetic characters at the start of this string will
+        * @param string $title The text of the title
+        * @param string $text Link text
+        * @param string $query Optional query part
+        * @param string $trail Optional trail. Alphabetic characters at the start of this string will
         *               be included in the link text. Other characters will be appended after
         *               the end of the link.
         * @return string
@@ -2246,11 +2245,11 @@ class Linker {
         * @param $nt     Title: the title object to make the link from, e.g. from
         *                      Title::newFromText.
         * @param $text  String: link text
-        * @param $query String: optional query part
-        * @param $trail String: optional trail. Alphabetic characters at the start of this string will
+        * @param string $query optional query part
+        * @param string $trail optional trail. Alphabetic characters at the start of this string will
         *                      be included in the link text. Other characters will be appended after
         *                      the end of the link.
-        * @param $prefix String: optional prefix. As trail, only before instead of after.
+        * @param string $prefix optional prefix. As trail, only before instead of after.
         * @return string
         */
        static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
@@ -2280,8 +2279,8 @@ class Linker {
         * @param $text   String: text to replace the title
         * @param $query  String: link target
         * @param $trail  String: text after link
-        * @param $prefix String: text before link text
-        * @param $aprops String: extra attributes to the a-element
+        * @param string $prefix text before link text
+        * @param string $aprops extra attributes to the a-element
         * @param $style  String: style to apply - if empty, use getInternalLinkAttributesObj instead
         * @return string the a-element
         */
@@ -2316,11 +2315,11 @@ class Linker {
         *
         * @param $title Title object of the target page
         * @param $text  String: Link text
-        * @param $query String: Optional query part
-        * @param $trail String: Optional trail. Alphabetic characters at the start of this string will
+        * @param string $query Optional query part
+        * @param string $trail Optional trail. Alphabetic characters at the start of this string will
         *                      be included in the link text. Other characters will be appended after
         *                      the end of the link.
-        * @param $prefix String: Optional prefix
+        * @param string $prefix Optional prefix
         * @return string
         */
        static function makeBrokenLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '' ) {
@@ -2352,7 +2351,7 @@ class Linker {
         * @param $trail  String:  optional trail. Alphabetic characters at the start of this string will
         *                      be included in the link text. Other characters will be appended after
         *                      the end of the link.
-        * @param $prefix String: Optional prefix
+        * @param string $prefix Optional prefix
         * @return string
         */
        static function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) {
@@ -2414,8 +2413,8 @@ class DummyLinker {
         * Use PHP's magic __call handler to transform instance calls to a dummy instance
         * into static calls to the new Linker for backwards compatibility.
         *
-        * @param $fname String Name of called method
-        * @param $args Array Arguments to the method
+        * @param string $fname Name of called method
+        * @param array $args Arguments to the method
         * @return mixed
         */
        public function __call( $fname, $args ) {
index 83883b5..d99ae22 100644 (file)
@@ -265,8 +265,8 @@ class LinksUpdate extends SqlDataUpdate {
 
        /**
         * Update all the appropriate counts in the category table.
-        * @param $added array associative array of category name => sort key
-        * @param $deleted array associative array of category name => sort key
+        * @param array $added associative array of category name => sort key
+        * @param array $deleted associative array of category name => sort key
         */
        function updateCategoryCounts( $added, $deleted ) {
                $a = WikiPage::factory( $this->mTitle );
@@ -430,7 +430,7 @@ class LinksUpdate extends SqlDataUpdate {
        /**
         * Get an array of category insertions
         *
-        * @param $existing array mapping existing category names to sort keys. If both
+        * @param array $existing mapping existing category names to sort keys. If both
         * match a link in $this, the link will be omitted from the output
         *
         * @return array
@@ -474,7 +474,7 @@ class LinksUpdate extends SqlDataUpdate {
        /**
         * Get an array of interlanguage link insertions
         *
-        * @param $existing Array mapping existing language codes to titles
+        * @param array $existing mapping existing language codes to titles
         *
         * @return array
         */
@@ -884,8 +884,8 @@ class LinksDeletionUpdate extends SqlDataUpdate {
 
        /**
         * Update all the appropriate counts in the category table.
-        * @param $added array associative array of category name => sort key
-        * @param $deleted array associative array of category name => sort key
+        * @param array $added associative array of category name => sort key
+        * @param array $deleted associative array of category name => sort key
         */
        function updateCategoryCounts( $added, $deleted ) {
                $a = WikiPage::factory( $this->mTitle );
index 257a46d..7b66924 100644 (file)
@@ -464,7 +464,6 @@ class MagicWord {
                }
        }
 
-
        /**
         * Returns true if the text matches the word, and alters the
         * input string, removing all instances of the word
diff --git a/includes/MappedIterator.php b/includes/MappedIterator.php
new file mode 100644 (file)
index 0000000..b4376f4
--- /dev/null
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Convenience class for generating iterators from iterators.
+ *
+ * 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
+ *
+ * @file
+ * @author Aaron Schulz
+ */
+
+/**
+ * Convenience class for generating iterators from iterators.
+ *
+ * @since 1.21
+ */
+class MappedIterator implements Iterator {
+       /** @var Iterator */
+       protected $baseIterator;
+       /** @var Closure */
+       protected $vCallback;
+
+       /**
+        * Build an new iterator from a base iterator by having the former wrap the
+        * later, returning the result of "value" callback for each current() invocation.
+        * The callback takes the result of current() on the base iterator as an argument.
+        * The keys of the base iterator are reused verbatim.
+        *
+        * @param Iterator|Array $iter
+        * @param Closure $vCallback
+        * @throws MWException
+        */
+    public function __construct( $iter, Closure $vCallback ) {
+               if ( is_array( $iter ) ) {
+                       $this->baseIterator = new ArrayIterator( $iter );
+               } elseif ( $iter instanceof Iterator ) {
+                       $this->baseIterator = $iter;
+               } else {
+                       throw new MWException( "Invalid base iterator provided." );
+               }
+               $this->vCallback = $vCallback;
+    }
+
+       /**
+        * @return void
+        */
+       public function rewind() {
+               $this->baseIterator->rewind();
+       }
+
+       /**
+        * @return Mixed|null Returns null if out of range
+        */
+       public function current() {
+               if ( !$this->baseIterator->valid() ) {
+                       return null; // out of range
+               }
+               return call_user_func_array( $this->vCallback, array( $this->baseIterator->current() ) );
+       }
+
+       /**
+        * @return Mixed|null Returns null if out of range
+        */
+       public function key() {
+               if ( !$this->baseIterator->valid() ) {
+                       return null; // out of range
+               }
+               return $this->baseIterator->key();
+       }
+
+       /**
+        * @return void
+        */
+       public function next() {
+               $this->baseIterator->next();
+       }
+
+       /**
+        * @return bool
+        */
+       public function valid() {
+               return $this->baseIterator->valid();
+       }
+}
index 6e533a3..3bfaf4c 100644 (file)
@@ -216,7 +216,7 @@ class Message {
         * Constructor.
         * @since 1.17
         * @param $key: message key, or array of message keys to try and use the first non-empty message for
-        * @param $params Array message parameters
+        * @param array $params message parameters
         * @return Message: $this
         */
        public function __construct( $key, $params = array() ) {
@@ -264,7 +264,7 @@ class Message {
         * intented to be used instead of the real constructor, because it allows
         * chaining method calls, while new objects don't.
         * @since 1.17
-        * @param $key String: message key
+        * @param string $key message key
         * @param Varargs: parameters as Strings
         * @return Message: $this
         */
@@ -635,8 +635,8 @@ class Message {
        /**
         * Substitutes any paramaters into the message text.
         * @since 1.17
-        * @param $message String: the message text
-        * @param $type String: either before or after
+        * @param string $message the message text
+        * @param string $type either before or after
         * @return String
         */
        protected function replaceParameters( $message, $type = 'before' ) {
@@ -654,7 +654,7 @@ class Message {
        /**
         * Extracts the parameter type and preprocessed the value if needed.
         * @since 1.18
-        * @param $param String|Array: Parameter as defined in this class.
+        * @param string|array $param Parameter as defined in this class.
         * @return Tuple(type, value)
         */
        protected function extractParam( $param ) {
@@ -678,7 +678,7 @@ class Message {
        /**
         * Wrapper for what ever method we use to parse wikitext.
         * @since 1.17
-        * @param $string String: Wikitext message contents
+        * @param string $string Wikitext message contents
         * @return string Wikitext parsed into HTML
         */
        protected function parseText( $string ) {
@@ -689,7 +689,7 @@ class Message {
        /**
         * Wrapper for what ever method we use to {{-transform wikitext.
         * @since 1.17
-        * @param $string String: Wikitext message contents
+        * @param string $string Wikitext message contents
         * @return string Wikitext with {{-constructs replaced with their values.
         */
        protected function transformText( $string ) {
@@ -743,8 +743,8 @@ class RawMessage extends Message {
         * Call the parent constructor, then store the key as
         * the message.
         *
-        * @param $key Message to use
-        * @param $params Parameters for the message
+        * @param string $key Message to use
+        * @param array $params Parameters for the message
         * @see Message::__construct
         */
        public function __construct( $key, $params = array() ) {
index 6322be7..bcccf1d 100644 (file)
@@ -37,8 +37,8 @@ class MessageBlobStore {
         * Get the message blobs for a set of modules
         *
         * @param $resourceLoader ResourceLoader object
-        * @param $modules array Array of module objects keyed by module name
-        * @param $lang string Language code
+        * @param array $modules Array of module objects keyed by module name
+        * @param string $lang Language code
         * @return array An array mapping module names to message blobs
         */
        public static function get( ResourceLoader $resourceLoader, $modules, $lang ) {
@@ -68,9 +68,9 @@ class MessageBlobStore {
         * present, it is not regenerated; instead, the preexisting blob
         * is fetched and returned.
         *
-        * @param $name String: module name
+        * @param string $name module name
         * @param $module ResourceLoaderModule object
-        * @param $lang String: language code
+        * @param string $lang language code
         * @return mixed Message blob or false if the module has no messages
         */
        public static function insertMessageBlob( $name, ResourceLoaderModule $module, $lang ) {
@@ -125,9 +125,9 @@ class MessageBlobStore {
        /**
         * Update the message blob for a given module in a given language
         *
-        * @param $name String: module name
+        * @param string $name module name
         * @param $module ResourceLoaderModule object
-        * @param $lang String: language code
+        * @param string $lang language code
         * @return String Regenerated message blob, or null if there was no blob for the given module/language pair
         */
        public static function updateModule( $name, ResourceLoaderModule $module, $lang ) {
@@ -195,7 +195,7 @@ class MessageBlobStore {
        /**
         * Update a single message in all message blobs it occurs in.
         *
-        * @param $key String: message key
+        * @param string $key message key
         */
        public static function updateMessage( $key ) {
                try {
@@ -255,8 +255,8 @@ class MessageBlobStore {
        /**
         * Create an update queue for updateMessage()
         *
-        * @param $key String: message key
-        * @param $prevUpdates Array: updates queue to refresh or null to build a fresh update queue
+        * @param string $key message key
+        * @param array $prevUpdates updates queue to refresh or null to build a fresh update queue
         * @return Array: updates queue
         */
        private static function getUpdatesForMessage( $key, $prevUpdates = null ) {
@@ -306,9 +306,9 @@ class MessageBlobStore {
        /**
         * Reencode a message blob with the updated value for a message
         *
-        * @param $blob String: message blob (JSON object)
-        * @param $key String: message key
-        * @param $lang String: language code
+        * @param string $blob message blob (JSON object)
+        * @param string $key message key
+        * @param string $lang language code
         * @return Message blob with $key replaced with its new value
         */
        private static function reencodeBlob( $blob, $key, $lang ) {
@@ -323,8 +323,8 @@ class MessageBlobStore {
         * Modules whose blobs are not in the database are silently dropped.
         *
         * @param $resourceLoader ResourceLoader object
-        * @param $modules Array of module names
-        * @param $lang String: language code
+        * @param array $modules of module names
+        * @param string $lang language code
         * @throws MWException
         * @return array Array mapping module names to blobs
         */
@@ -361,7 +361,7 @@ class MessageBlobStore {
         * Generate the message blob for a given module in a given language.
         *
         * @param $module ResourceLoaderModule object
-        * @param $lang String: language code
+        * @param string $lang language code
         * @return String: JSON object
         */
        private static function generateMessageBlob( ResourceLoaderModule $module, $lang ) {
index e787fbd..68b6f6a 100644 (file)
@@ -144,21 +144,21 @@ END_STRING
 class MimeMagic {
 
        /**
-       * Mapping of media types to arrays of mime types.
-       * This is used by findMediaType and getMediaType, respectively
-       */
+        * Mapping of media types to arrays of mime types.
+        * This is used by findMediaType and getMediaType, respectively
+        */
        var $mMediaTypes = null;
 
        /** Map of mime type aliases
-       */
+        */
        var $mMimeTypeAliases = null;
 
        /** map of mime types to file extensions (as a space seprarated list)
-       */
+        */
        var $mMimeToExt = null;
 
        /** map of file extensions types to mime types (as a space seprarated list)
-       */
+        */
        var $mExtToMime = null;
 
        /** IEContentAnalyzer instance
@@ -179,8 +179,8 @@ class MimeMagic {
         */
        function __construct() {
                /**
-               *   --- load mime.types ---
-               */
+                *   --- load mime.types ---
+                */
 
                global $wgMimeTypeFile, $IP, $wgLoadFileinfoExtension;
 
@@ -346,7 +346,7 @@ class MimeMagic {
         * @return MimeMagic
         */
        public static function &singleton() {
-               if ( !isset( self::$instance ) ) {
+               if ( self::$instance === null ) {
                        self::$instance = new MimeMagic;
                }
                return self::$instance;
@@ -413,7 +413,6 @@ class MimeMagic {
                return $m;
        }
 
-
        /**
         * Tests if the extension matches the given mime type. Returns true if a
         * match was found, null if the mime type is unknown, and false if the
@@ -427,7 +426,7 @@ class MimeMagic {
                $ext = $this->getExtensionsForType( $mime );
 
                if ( !$ext ) {
-                       return null;  // Unknown mime type
+                       return null; // Unknown mime type
                }
 
                $ext = explode( ' ', $ext );
@@ -503,8 +502,8 @@ class MimeMagic {
         * If $mime is "application/x-opc+zip" and isMatchingExtension( $ext, $mime )
         * gives true, return the result of guessTypesForExtension($ext).
         *
-        * @param $mime String: the mime type, typically guessed from a file's content.
-        * @param $ext String: the file extension, as taken from the file name
+        * @param string $mime the mime type, typically guessed from a file's content.
+        * @param string $ext the file extension, as taken from the file name
         *
         * @return string the mime type
         */
@@ -546,7 +545,7 @@ class MimeMagic {
         * detection (namely XML based formats like XHTML or SVG, as well as ZIP
         * based formats like OPC/ODF files).
         *
-        * @param $file String: the file to check
+        * @param string $file the file to check
         * @param $ext Mixed: the file extension, or true (default) to extract it from the filename.
         *             Set it to false to ignore the extension. DEPRECATED! Set to false, use
         *             improveTypeFromExtension($mime, $ext) later to improve mime type.
@@ -755,7 +754,7 @@ class MimeMagic {
         * header data.  Currently works for OpenDocument and OpenXML types...
         * If can't tell, returns 'application/zip'.
         *
-        * @param $header String: some reasonably-sized chunk of file header
+        * @param string $header some reasonably-sized chunk of file header
         * @param $tail   String: the tail of the file
         * @param $ext Mixed: the file extension, or true to extract it from the filename.
         *             Set it to false (default) to ignore the extension. DEPRECATED! Set to false,
@@ -802,12 +801,13 @@ class MimeMagic {
                        # TODO: remove the block below, as soon as improveTypeFromExtension is used everywhere
                        if ( $ext !== true && $ext !== false ) {
                                /** This is the mode used by getPropsFromPath
-                               * These mime's are stored in the database, where we don't really want
-                               * x-opc+zip, because we use it only for internal purposes
-                               */
+                                * These mime's are stored in the database, where we don't really want
+                                * x-opc+zip, because we use it only for internal purposes
+                                */
                                if ( $this->isMatchingExtension( $ext, $mime) ) {
                                        /* A known file extension for an OPC file,
-                                       * find the proper mime type for that file extension */
+                                        * find the proper mime type for that file extension
+                                        */
                                        $mime = $this->guessTypesForExtension( $ext );
                                } else {
                                        $mime = "application/zip";
@@ -860,7 +860,7 @@ class MimeMagic {
         * mime type if the file is an image. If no mime type can be determined,
         * this function returns 'unknown/unknown'.
         *
-        * @param $file String: the file to check
+        * @param string $file the file to check
         * @param $ext Mixed: the file extension, or true (default) to extract it from the filename.
         *             Set it to false to ignore the extension. DEPRECATED! Set to false, use
         *             improveTypeFromExtension($mime, $ext) later to improve mime type.
@@ -961,9 +961,9 @@ class MimeMagic {
         * @todo analyse file if need be
         * @todo look at multiple extension, separately and together.
         *
-        * @param $path String: full path to the image file, in case we have to look at the contents
+        * @param string $path full path to the image file, in case we have to look at the contents
         *        (if null, only the mime type is used to determine the media type code).
-        * @param $mime String: mime type. If null it will be guessed using guessMimeType.
+        * @param string $mime mime type. If null it will be guessed using guessMimeType.
         *
         * @return (int?string?) a value to be used with the MEDIATYPE_xxx constants.
         */
@@ -1078,9 +1078,9 @@ class MimeMagic {
         * Get the MIME types that various versions of Internet Explorer would
         * detect from a chunk of the content.
         *
-        * @param $fileName String: the file name (unused at present)
-        * @param $chunk String: the first 256 bytes of the file
-        * @param $proposed String: the MIME type proposed by the server
+        * @param string $fileName the file name (unused at present)
+        * @param string $chunk the first 256 bytes of the file
+        * @param string $proposed the MIME type proposed by the server
         * @return Array
         */
        public function getIEMimeTypes( $fileName, $chunk, $proposed ) {
index e35bf07..71d737e 100644 (file)
@@ -61,7 +61,7 @@ class MWNamespace {
        /**
         * Can pages in the given namespace be moved?
         *
-        * @param $index Int: namespace index
+        * @param int $index namespace index
         * @return bool
         */
        public static function isMovable( $index ) {
@@ -80,7 +80,7 @@ class MWNamespace {
        /**
         * Is the given namespace is a subject (non-talk) namespace?
         *
-        * @param $index Int: namespace index
+        * @param int $index namespace index
         * @return bool
         * @since 1.19
         */
@@ -101,7 +101,7 @@ class MWNamespace {
        /**
         * Is the given namespace a talk namespace?
         *
-        * @param $index Int: namespace index
+        * @param int $index namespace index
         * @return bool
         */
        public static function isTalk( $index ) {
@@ -112,7 +112,7 @@ class MWNamespace {
        /**
         * Get the talk namespace index for a given namespace
         *
-        * @param $index Int: namespace index
+        * @param int $index namespace index
         * @return int
         */
        public static function getTalk( $index ) {
@@ -126,7 +126,7 @@ class MWNamespace {
         * Get the subject namespace index for a given namespace
         * Special namespaces (NS_MEDIA, NS_SPECIAL) are always the subject.
         *
-        * @param $index Int: Namespace index
+        * @param int $index Namespace index
         * @return int
         */
        public static function getSubject( $index ) {
@@ -145,7 +145,7 @@ class MWNamespace {
         * For talk namespaces, returns the subject (non-talk) namespace
         * For subject (non-talk) namespaces, returns the talk namespace
         *
-        * @param $index Int: namespace index
+        * @param int $index namespace index
         * @return int or null if no associated namespace could be found
         */
        public static function getAssociated( $index ) {
@@ -181,8 +181,8 @@ class MWNamespace {
         * of this function rather than directly doing comparison will make
         * sure that code will not potentially break.
         *
-        * @param $ns1 int The first namespace index
-        * @param $ns2 int The second namespae index
+        * @param int $ns1 The first namespace index
+        * @param int $ns2 The second namespae index
         *
         * @return bool
         * @since 1.19
@@ -196,8 +196,8 @@ class MWNamespace {
         * eg: NS_USER and NS_USER wil return true, as well
         *     NS_USER and NS_USER_TALK will return true.
         *
-        * @param $ns1 int The first namespace index
-        * @param $ns2 int The second namespae index
+        * @param int $ns1 The first namespace index
+        * @param int $ns2 The second namespae index
         *
         * @return bool
         * @since 1.19
@@ -231,7 +231,7 @@ class MWNamespace {
        /**
         * Returns the canonical (English) name for a given index
         *
-        * @param $index Int: namespace index
+        * @param int $index namespace index
         * @return string or false if no canonical definition.
         */
        public static function getCanonicalName( $index ) {
@@ -247,7 +247,7 @@ class MWNamespace {
         * Returns the index for a given canonical name, or NULL
         * The input *must* be converted to lower case first
         *
-        * @param $name String: namespace name
+        * @param string $name namespace name
         * @return int
         */
        public static function getCanonicalIndex( $name ) {
@@ -287,7 +287,7 @@ class MWNamespace {
        /**
         * Can this namespace ever have a talk namespace?
         *
-        * @param $index Int: namespace index
+        * @param int $index namespace index
         * @return bool
         */
        public static function canTalk( $index ) {
@@ -298,7 +298,7 @@ class MWNamespace {
         * Does this namespace contain content, for the purposes of calculating
         * statistics, etc?
         *
-        * @param $index Int: index to check
+        * @param int $index index to check
         * @return bool
         */
        public static function isContent( $index ) {
@@ -319,7 +319,7 @@ class MWNamespace {
        /**
         * Does the namespace allow subpages?
         *
-        * @param $index int Index to check
+        * @param int $index Index to check
         * @return bool
         */
        public static function hasSubpages( $index ) {
@@ -372,7 +372,7 @@ class MWNamespace {
        /**
         * Is the namespace first-letter capitalized?
         *
-        * @param $index int Index to check
+        * @param int $index Index to check
         * @return bool
         */
        public static function isCapitalized( $index ) {
@@ -400,7 +400,7 @@ class MWNamespace {
         * genders. Not all languages make a distinction here.
         *
         * @since 1.18
-        * @param $index int Index to check
+        * @param int $index Index to check
         * @return bool
         */
        public static function hasGenderDistinction( $index ) {
@@ -411,7 +411,7 @@ class MWNamespace {
         * It is not possible to use pages from this namespace as template?
         *
         * @since 1.20
-        * @param $index int Index to check
+        * @param int $index Index to check
         * @return bool
         */
        public static function isNonincludable( $index ) {
@@ -424,7 +424,7 @@ class MWNamespace {
         * This does not mean that all pages in that namespace have the model
         *
         * @since 1.21
-        * @param $index int Index to check
+        * @param int $index Index to check
         * @return null|string default model name for the given namespace, if set
         */
        public static function getNamespaceContentModel( $index ) {
index 6309ecb..39b1dba 100644 (file)
@@ -270,8 +270,8 @@ class OutputPage extends ContextSource {
        /**
         * Redirect to $url rather than displaying the normal page
         *
-        * @param $url String: URL
-        * @param $responsecode String: HTTP status code
+        * @param string $url URL
+        * @param string $responsecode HTTP status code
         */
        public function redirect( $url, $responsecode = '302' ) {
                # Strip newlines as a paranoia check for header injection in PHP<5.1.2
@@ -301,8 +301,8 @@ class OutputPage extends ContextSource {
         * Add a new "<meta>" tag
         * To add an http-equiv meta tag, precede the name with "http:"
         *
-        * @param $name String tag name
-        * @param $val String tag value
+        * @param string $name tag name
+        * @param string $val tag value
         */
        function addMeta( $name, $val ) {
                array_push( $this->mMetatags, array( $name, $val ) );
@@ -311,7 +311,7 @@ class OutputPage extends ContextSource {
        /**
         * Add a keyword or a list of keywords in the page header
         *
-        * @param $text String or array of strings
+        * @param string $text or array of strings
         */
        function addKeyword( $text ) {
                if( is_array( $text ) ) {
@@ -326,7 +326,7 @@ class OutputPage extends ContextSource {
         *
         * Note: use setCanonicalUrl() for rel=canonical.
         *
-        * @param $linkarr Array: associative array of attributes.
+        * @param array $linkarr associative array of attributes.
         */
        function addLink( $linkarr ) {
                array_push( $this->mLinktags, $linkarr );
@@ -335,7 +335,7 @@ class OutputPage extends ContextSource {
        /**
         * Add a new \<link\> with "rel" attribute set to "meta"
         *
-        * @param $linkarr Array: associative array mapping attribute names to their
+        * @param array $linkarr associative array mapping attribute names to their
         *                 values, both keys and values will be escaped, and the
         *                 "rel" attribute will be automatically added
         */
@@ -371,7 +371,7 @@ class OutputPage extends ContextSource {
        /**
         * Add raw HTML to the list of scripts (including \<script\> tag, etc.)
         *
-        * @param $script String: raw HTML
+        * @param string $script raw HTML
         */
        function addScript( $script ) {
                $this->mScripts .= $script . "\n";
@@ -380,7 +380,7 @@ class OutputPage extends ContextSource {
        /**
         * Register and add a stylesheet from an extension directory.
         *
-        * @param $url String path to sheet.  Provide either a full url (beginning
+        * @param string $url path to sheet.  Provide either a full url (beginning
         *             with 'http', etc) or a relative path from the document root
         *             (beginning with '/').  Otherwise it behaves identically to
         *             addStyle() and draws from the /skins folder.
@@ -401,9 +401,9 @@ class OutputPage extends ContextSource {
        /**
         * Add a JavaScript file out of skins/common, or a given relative path.
         *
-        * @param $file String: filename in skins/common or complete on-server path
+        * @param string $file filename in skins/common or complete on-server path
         *              (/foo/bar.js)
-        * @param $version String: style version of the file. Defaults to $wgStyleVersion
+        * @param string $version style version of the file. Defaults to $wgStyleVersion
         */
        public function addScriptFile( $file, $version = null ) {
                global $wgStylePath, $wgStyleVersion;
@@ -421,7 +421,7 @@ class OutputPage extends ContextSource {
        /**
         * Add a self-contained script tag with the given contents
         *
-        * @param $script String: JavaScript text, no "<script>" tags
+        * @param string $script JavaScript text, no "<script>" tags
         */
        public function addInlineScript( $script ) {
                $this->mScripts .= Html::inlineScript( "\n$script\n" ) . "\n";
@@ -440,7 +440,7 @@ class OutputPage extends ContextSource {
         * Filter an array of modules to remove insufficiently trustworthy members, and modules
         * which are no longer registered (eg a page is cached before an extension is disabled)
         * @param $modules Array
-        * @param $position String if not null, only return modules with this position
+        * @param string $position if not null, only return modules with this position
         * @param $type string
         * @return Array
         */
@@ -462,8 +462,8 @@ class OutputPage extends ContextSource {
        /**
         * Get the list of modules to include on this page
         *
-        * @param $filter Bool whether to filter out insufficiently trustworthy modules
-        * @param $position String if not null, only return modules with this position
+        * @param bool $filter whether to filter out insufficiently trustworthy modules
+        * @param string $position if not null, only return modules with this position
         * @param $param string
         * @return Array of module names
         */
@@ -581,8 +581,8 @@ class OutputPage extends ContextSource {
        /**
         * Add or replace an header item to the output
         *
-        * @param $name String: item name
-        * @param $value String: raw HTML
+        * @param string $name item name
+        * @param string $value raw HTML
         */
        public function addHeadItem( $name, $value ) {
                $this->mHeadItems[$name] = $value;
@@ -591,7 +591,7 @@ class OutputPage extends ContextSource {
        /**
         * Check if the header item $name is already set
         *
-        * @param $name String: item name
+        * @param string $name item name
         * @return Boolean
         */
        public function hasHeadItem( $name ) {
@@ -601,7 +601,7 @@ class OutputPage extends ContextSource {
        /**
         * Set the value of the ETag HTTP header, only used if $wgUseETag is true
         *
-        * @param $tag String: value of "ETag" header
+        * @param string $tag value of "ETag" header
         */
        function setETag( $tag ) {
                $this->mETag = $tag;
@@ -748,7 +748,7 @@ class OutputPage extends ContextSource {
        /**
         * Override the last modified timestamp
         *
-        * @param $timestamp String: new timestamp, in a format readable by
+        * @param string $timestamp new timestamp, in a format readable by
         *        wfTimestamp()
         */
        public function setLastModified( $timestamp ) {
@@ -758,7 +758,7 @@ class OutputPage extends ContextSource {
        /**
         * Set the robot policy for the page: <http://www.robotstxt.org/meta.html>
         *
-        * @param $policy String: the literal string to output as the contents of
+        * @param string $policy the literal string to output as the contents of
         *   the meta tag.  Will be parsed according to the spec and output in
         *   standardized form.
         * @return null
@@ -778,7 +778,7 @@ class OutputPage extends ContextSource {
         * Set the index policy for the page, but leave the follow policy un-
         * touched.
         *
-        * @param $policy string Either 'index' or 'noindex'.
+        * @param string $policy Either 'index' or 'noindex'.
         * @return null
         */
        public function setIndexPolicy( $policy ) {
@@ -792,7 +792,7 @@ class OutputPage extends ContextSource {
         * Set the follow policy for the page, but leave the index policy un-
         * touched.
         *
-        * @param $policy String: either 'follow' or 'nofollow'.
+        * @param string $policy either 'follow' or 'nofollow'.
         * @return null
         */
        public function setFollowPolicy( $policy ) {
@@ -806,7 +806,7 @@ class OutputPage extends ContextSource {
         * Set the new value of the "action text", this will be added to the
         * "HTML title", separated from it with " - ".
         *
-        * @param $text String: new value of the "action text"
+        * @param string $text new value of the "action text"
         */
        public function setPageTitleActionText( $text ) {
                $this->mPageTitleActionText = $text;
@@ -899,7 +899,7 @@ class OutputPage extends ContextSource {
        /**
         * Replace the subtile with $str
         *
-        * @param $str String|Message: new value of the subtitle. String should be safe HTML.
+        * @param string|Message $str new value of the subtitle. String should be safe HTML.
         */
        public function setSubtitle( $str ) {
                $this->clearSubtitle();
@@ -910,7 +910,7 @@ class OutputPage extends ContextSource {
         * Add $str to the subtitle
         *
         * @deprecated in 1.19; use addSubtitle() instead
-        * @param $str String|Message to add to the subtitle
+        * @param string|Message $str to add to the subtitle
         */
        public function appendSubtitle( $str ) {
                $this->addSubtitle( $str );
@@ -919,7 +919,7 @@ class OutputPage extends ContextSource {
        /**
         * Add $str to the subtitle
         *
-        * @param $str String|Message to add to the subtitle. String should be safe HTML.
+        * @param string|Message $str to add to the subtitle. String should be safe HTML.
         */
        public function addSubtitle( $str ) {
                if ( $str instanceof Message ) {
@@ -1031,7 +1031,7 @@ class OutputPage extends ContextSource {
         * for the new version
         * @see addFeedLink()
         *
-        * @param $val String: query to append to feed links or false to output
+        * @param string $val query to append to feed links or false to output
         *        default links
         */
        public function setFeedAppendQuery( $val ) {
@@ -1051,8 +1051,8 @@ class OutputPage extends ContextSource {
        /**
         * Add a feed link to the page header
         *
-        * @param $format String: feed type, should be a key of $wgFeedClasses
-        * @param $href String: URL
+        * @param string $format feed type, should be a key of $wgFeedClasses
+        * @param string $href URL
         */
        public function addFeedLink( $format, $href ) {
                global $wgAdvertisedFeedTypes;
@@ -1136,7 +1136,7 @@ class OutputPage extends ContextSource {
        /**
         * Add new language links
         *
-        * @param $newLinkArray array Associative array mapping language code to the page
+        * @param array $newLinkArray Associative array mapping language code to the page
         *                      name
         */
        public function addLanguageLinks( $newLinkArray ) {
@@ -1146,7 +1146,7 @@ class OutputPage extends ContextSource {
        /**
         * Reset the language links and add new language links
         *
-        * @param $newLinkArray array Associative array mapping language code to the page
+        * @param array $newLinkArray Associative array mapping language code to the page
         *                      name
         */
        public function setLanguageLinks( $newLinkArray ) {
@@ -1165,7 +1165,7 @@ class OutputPage extends ContextSource {
        /**
         * Add an array of categories, with names in the keys
         *
-        * @param $categories Array mapping category name => sort key
+        * @param array $categories mapping category name => sort key
         */
        public function addCategoryLinks( $categories ) {
                global $wgContLang;
@@ -1226,7 +1226,7 @@ class OutputPage extends ContextSource {
        /**
         * Reset the category links (but not the category list) and add $categories
         *
-        * @param $categories Array mapping category name => sort key
+        * @param array $categories mapping category name => sort key
         */
        public function setCategoryLinks( $categories ) {
                $this->mCategoryLinks = array();
@@ -1280,7 +1280,7 @@ class OutputPage extends ContextSource {
        /**
         * Show what level of JavaScript / CSS untrustworthiness is allowed on this page
         * @see ResourceLoaderModule::$origin
-        * @param $type String ResourceLoaderModule TYPE_ constant
+        * @param string $type ResourceLoaderModule TYPE_ constant
         * @return Int ResourceLoaderModule ORIGIN_ class constant
         */
        public function getAllowedModules( $type ) {
@@ -1314,7 +1314,7 @@ class OutputPage extends ContextSource {
        /**
         * Prepend $text to the body HTML
         *
-        * @param $text String: HTML
+        * @param string $text HTML
         */
        public function prependHTML( $text ) {
                $this->mBodytext = $text . $this->mBodytext;
@@ -1323,7 +1323,7 @@ class OutputPage extends ContextSource {
        /**
         * Append $text to the body HTML
         *
-        * @param $text String: HTML
+        * @param string $text HTML
         */
        public function addHTML( $text ) {
                $this->mBodytext .= $text;
@@ -1477,7 +1477,7 @@ class OutputPage extends ContextSource {
        /**
         * Add wikitext with a custom Title object
         *
-        * @param $text String: wikitext
+        * @param string $text wikitext
         * @param $title Title object
         * @param $linestart Boolean: is this the start of a line?
         */
@@ -1488,7 +1488,7 @@ class OutputPage extends ContextSource {
        /**
         * Add wikitext with a custom Title object and tidy enabled.
         *
-        * @param $text String: wikitext
+        * @param string $text wikitext
         * @param $title Title object
         * @param $linestart Boolean: is this the start of a line?
         */
@@ -1499,7 +1499,7 @@ class OutputPage extends ContextSource {
        /**
         * Add wikitext with tidy enabled
         *
-        * @param $text String: wikitext
+        * @param string $text wikitext
         * @param $linestart Boolean: is this the start of a line?
         */
        public function addWikiTextTidy( $text, $linestart = true ) {
@@ -1510,7 +1510,7 @@ class OutputPage extends ContextSource {
        /**
         * Add wikitext with a custom Title object
         *
-        * @param $text String: wikitext
+        * @param string $text wikitext
         * @param $title Title object
         * @param $linestart Boolean: is this the start of a line?
         * @param $tidy Boolean: whether to use tidy
@@ -1597,7 +1597,6 @@ class OutputPage extends ContextSource {
                $this->addHTML( $text );
        }
 
-
        /**
         * Add the output of a QuickTemplate to the output buffer
         *
@@ -1743,7 +1742,7 @@ class OutputPage extends ContextSource {
        /**
         * Add an HTTP header that will influence on the cache
         *
-        * @param $header String: header name
+        * @param string $header header name
         * @param $option Array|null
         * @todo FIXME: Document the $option parameter; it appears to be for
         *        X-Vary-Options but what format is acceptable?
@@ -2049,7 +2048,7 @@ class OutputPage extends ContextSource {
        /**
         * Actually output something with print().
         *
-        * @param $ins String: the string to output
+        * @param string $ins the string to output
         */
        public function out( $ins ) {
                print $ins;
@@ -2068,8 +2067,8 @@ class OutputPage extends ContextSource {
         * indexing, clear the current text and redirect, set the page's title
         * and optionally an custom HTML title (content of the "<title>" tag).
         *
-        * @param $pageTitle String|Message will be passed directly to setPageTitle()
-        * @param $htmlTitle String|Message will be passed directly to setHTMLTitle();
+        * @param string|Message $pageTitle will be passed directly to setPageTitle()
+        * @param string|Message $htmlTitle will be passed directly to setHTMLTitle();
         *                   optional, if not passed the "<title>" attribute will be
         *                   based on $pageTitle
         */
@@ -2095,7 +2094,7 @@ class OutputPage extends ContextSource {
         *
         * @param $title Mixed: message key (string) for page title, or a Message object
         * @param $msg Mixed: message key (string) for page text, or a Message object
-        * @param $params Array: message parameters; ignored if $msg is a Message object
+        * @param array $params message parameters; ignored if $msg is a Message object
         */
        public function showErrorPage( $title, $msg, $params = array() ) {
                if( !$title instanceof Message ) {
@@ -2116,8 +2115,8 @@ class OutputPage extends ContextSource {
        /**
         * Output a standard permission error page
         *
-        * @param $errors Array: error message keys
-        * @param $action String: action that was denied or null if unknown
+        * @param array $errors error message keys
+        * @param string $action action that was denied or null if unknown
         */
        public function showPermissionsErrorPage( $errors, $action = null ) {
                // For some action (read, edit, create and upload), display a "login to do this action"
@@ -2201,7 +2200,7 @@ class OutputPage extends ContextSource {
        /**
         * Display an error page noting that a given permission bit is required.
         * @deprecated since 1.18, just throw the exception directly
-        * @param $permission String: key required
+        * @param string $permission key required
         * @throws PermissionsError
         */
        public function permissionRequired( $permission ) {
@@ -2220,8 +2219,8 @@ class OutputPage extends ContextSource {
        /**
         * Format a list of error messages
         *
-        * @param $errors Array of arrays returned by Title::getUserPermissionsErrors
-        * @param $action String: action that was denied or null if unknown
+        * @param array $errors of arrays returned by Title::getUserPermissionsErrors
+        * @param string $action action that was denied or null if unknown
         * @return String: the wikitext error-messages, formatted into a list.
         */
        public function formatPermissionsErrorMessage( $errors, $action = null ) {
@@ -2389,8 +2388,8 @@ $templates
         * Add a "return to" link pointing to a specified title
         *
         * @param $title Title to link
-        * @param $query Array query string parameters
-        * @param $text String text of the link (input is not escaped)
+        * @param array $query query string parameters
+        * @param string $text text of the link (input is not escaped)
         * @param $options Options array to pass to Linker
         */
        public function addReturnTo( $title, $query = array(), $text = null, $options = array() ) {
@@ -2414,7 +2413,7 @@ $templates
         *
         * @param $unused
         * @param $returnto Title or String to return to
-        * @param $returntoquery String: query string for the return to link
+        * @param string $returntoquery query string for the return to link
         */
        public function returnToMain( $unused = null, $returnto = null, $returntoquery = null ) {
                if ( $returnto == null ) {
@@ -2571,9 +2570,9 @@ $templates
        /**
         * TODO: Document
         * @param $modules Array/string with the module name(s)
-        * @param $only String ResourceLoaderModule TYPE_ class constant
+        * @param string $only ResourceLoaderModule TYPE_ class constant
         * @param $useESI boolean
-        * @param $extraQuery Array with extra query parameters to add to each request. array( param => value )
+        * @param array $extraQuery with extra query parameters to add to each request. array( param => value )
         * @param $loadCall boolean If true, output an (asynchronous) mw.loader.load() call rather than a "<script src='...'>" tag
         * @return string html "<script>" and "<style>" tags
         */
@@ -2952,7 +2951,6 @@ $templates
                $this->mJsConfigVars[$keys] = $value;
        }
 
-
        /**
         * Get an array containing the variables to be set in mw.config in JavaScript.
         *
@@ -3082,7 +3080,7 @@ $templates
        }
 
        /**
-        * @param $addContentType bool: Whether "<meta>" specifying content type should be returned
+        * @param bool $addContentType Whether "<meta>" specifying content type should be returned
         *
         * @return array in format "link name or number => 'link html'".
         */
@@ -3223,7 +3221,6 @@ $templates
                        ) );
                }
 
-
                # Language variants
                if ( !$wgDisableLangConversion && $wgCanonicalLanguageLinks ) {
                        $lang = $this->getTitle()->getPageLanguage();
@@ -3333,7 +3330,7 @@ $templates
 
        /**
         * @param $unused
-        * @param $addContentType bool: Whether "<meta>" specifying content type should be returned
+        * @param bool $addContentType Whether "<meta>" specifying content type should be returned
         *
         * @return string HTML tag links to be put in the header.
         */
@@ -3344,9 +3341,9 @@ $templates
        /**
         * Generate a "<link rel/>" for a feed.
         *
-        * @param $type String: feed type
-        * @param $url String: URL to the feed
-        * @param $text String: value of the "title" attribute
+        * @param string $type feed type
+        * @param string $url URL to the feed
+        * @param string $text value of the "title" attribute
         * @return String: HTML fragment
         */
        private function feedLink( $type, $url, $text ) {
@@ -3362,10 +3359,10 @@ $templates
         * Add a local or specified stylesheet, with the given media options.
         * Meant primarily for internal use...
         *
-        * @param $style String: URL to the file
-        * @param $media String: to specify a media type, 'screen', 'printable', 'handheld' or any.
-        * @param $condition String: for IE conditional comments, specifying an IE version
-        * @param $dir String: set to 'rtl' or 'ltr' for direction-specific sheets
+        * @param string $style URL to the file
+        * @param string $media to specify a media type, 'screen', 'printable', 'handheld' or any.
+        * @param string $condition for IE conditional comments, specifying an IE version
+        * @param string $dir set to 'rtl' or 'ltr' for direction-specific sheets
         */
        public function addStyle( $style, $media = '', $condition = '', $dir = '' ) {
                $options = array();
@@ -3386,7 +3383,7 @@ $templates
        /**
         * Adds inline CSS styles
         * @param $style_css Mixed: inline CSS
-        * @param $flip String: Set to 'flip' to flip the CSS if needed
+        * @param string $flip Set to 'flip' to flip the CSS if needed
         */
        public function addInlineStyle( $style_css, $flip = 'noflip' ) {
                if( $flip === 'flip' && $this->getLanguage()->isRTL() ) {
@@ -3403,8 +3400,7 @@ $templates
         * @return string
         */
        public function buildCssLinks() {
-               global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs,
-                       $wgLang, $wgContLang;
+               global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs, $wgContLang;
 
                $this->getSkin()->setupSkinUserCss( $this );
 
@@ -3438,7 +3434,7 @@ $templates
                                // If needed, Janus it first. This is user-supplied CSS, so it's
                                // assumed to be right for the content language directionality.
                                $previewedCSS = $this->getRequest()->getText( 'wpTextbox1' );
-                               if ( $wgLang->getDir() !== $wgContLang->getDir() ) {
+                               if ( $this->getLanguage()->getDir() !== $wgContLang->getDir() ) {
                                        $previewedCSS = CSSJanus::transform( $previewedCSS, true, false );
                                }
                                $otherTags .= Html::inlineStyle( $previewedCSS );
@@ -3513,8 +3509,8 @@ $templates
        /**
         * Generate \<link\> tags for stylesheets
         *
-        * @param $style String: URL to the file
-        * @param $options Array: option, can contain 'condition', 'dir', 'media'
+        * @param string $style URL to the file
+        * @param array $options option, can contain 'condition', 'dir', 'media'
         *                 keys
         * @return String: HTML fragment
         */
@@ -3555,7 +3551,7 @@ $templates
        /**
         * Transform "media" attribute based on request parameters
         *
-        * @param $media String: current value of the "media" attribute
+        * @param string $media current value of the "media" attribute
         * @return String: modified value of the "media" attribute, or null to skip
         * this stylesheet
         */
@@ -3683,7 +3679,7 @@ $templates
         * Include jQuery core. Use this to avoid loading it multiple times
         * before we get a usable script loader.
         *
-        * @param $modules Array: list of jQuery modules which should be loaded
+        * @param array $modules list of jQuery modules which should be loaded
         * @return Array: the list of modules which were not loaded.
         * @since 1.16
         * @deprecated since 1.17
index c60c107..cba77ee 100644 (file)
@@ -28,7 +28,7 @@
  *
  * Calling this function kills execution immediately.
  *
- * @param $type String Which entry point we are protecting. One of:
+ * @param string $type Which entry point we are protecting. One of:
  *   - index.php
  *   - load.php
  *   - api.php
index 746b02e..29ff894 100644 (file)
@@ -269,7 +269,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         * Extract some useful data from the result object for use by
         * the navigation bar, put it into $this
         *
-        * @param $offset String: index offset, inclusive
+        * @param string $offset index offset, inclusive
         * @param $limit Integer: exact query limit
         * @param $res ResultWrapper
         */
@@ -335,7 +335,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         * Do a query with specified parameters, rather than using the object
         * context
         *
-        * @param $offset String: index offset, inclusive
+        * @param string $offset index offset, inclusive
         * @param $limit Integer: exact query limit
         * @param $descending Boolean: query direction, false for ascending, true for descending
         * @return ResultWrapper
@@ -348,7 +348,7 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Build variables to use by the database wrapper.
         *
-        * @param $offset String: index offset, inclusive
+        * @param string $offset index offset, inclusive
         * @param $limit Integer: exact query limit
         * @param $descending Boolean: query direction, false for ascending, true for descending
         * @return array
@@ -431,9 +431,9 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Make a self-link
         *
-        * @param $text String: text displayed on the link
-        * @param $query Array: associative array of paramter to be in the query string
-        * @param $type String: value of the "rel" attribute
+        * @param string $text text displayed on the link
+        * @param array $query associative array of paramter to be in the query string
+        * @param string $type value of the "rel" attribute
         *
         * @return String: HTML fragment
         */
@@ -709,7 +709,6 @@ abstract class IndexPager extends ContextSource implements Pager {
        protected function getDefaultDirections() { return false; }
 }
 
-
 /**
  * IndexPager with an alphabetic list and a formatted navigation bar
  * @ingroup Pager
@@ -1048,8 +1047,8 @@ abstract class TablePager extends IndexPager {
         *
         * @protected
         *
-        * @param $field String The column
-        * @param $value String The cell contents
+        * @param string $field The column
+        * @param string $value The cell contents
         * @return Array of attr => value
         */
        function getCellAttrs( $field, $value ) {
@@ -1178,7 +1177,7 @@ abstract class TablePager extends IndexPager {
         * Resubmits all defined elements of the query string, except for a
         * blacklist, passed in the $blacklist parameter.
         *
-        * @param $blacklist Array parameters from the request query which should not be resubmitted
+        * @param array $blacklist parameters from the request query which should not be resubmitted
         * @return String: HTML fragment
         */
        function getHiddenFields( $blacklist = array() ) {
@@ -1244,8 +1243,8 @@ abstract class TablePager extends IndexPager {
         *
         * @protected
         *
-        * @param $name String: the database field name
-        * @param $value String: the value retrieved from the database
+        * @param string $name the database field name
+        * @param string $value the value retrieved from the database
         */
        abstract function formatValue( $name, $value );
 
index 3be504a..fc891bb 100644 (file)
@@ -153,9 +153,9 @@ class PathRouter {
        /**
         * Add a new path pattern to the path router
         *
-        * @param $path string|array The path pattern to add
-        * @param $params array The params for this path pattern
-        * @param $options array The options for this path pattern
+        * @param string|array $path The path pattern to add
+        * @param array $params The params for this path pattern
+        * @param array $options The options for this path pattern
         */
        public function add( $path, $params = array(), $options = array() ) {
                if ( is_array( $path ) ) {
@@ -232,7 +232,7 @@ class PathRouter {
        /**
         * Parse a path and return the query matches for the path
         *
-        * @param $path string The path to parse
+        * @param string $path The path to parse
         * @return Array The array of matches for the path
         */
        public function parse( $path ) {
index 452dbc5..2ebef04 100644 (file)
 abstract class PoolCounter {
 
        /* Return codes */
-       const LOCKED   = 1; /* Lock acquired */
+       const LOCKED = 1; /* Lock acquired */
        const RELEASED = 2; /* Lock released */
-       const DONE     = 3; /* Another worker did the work for you */
+       const DONE = 3; /* Another worker did the work for you */
 
-       const ERROR      = -1; /* Indeterminate error */
+       const ERROR = -1; /* Indeterminate error */
        const NOT_LOCKED = -2; /* Called release() with no lock held */
        const QUEUE_FULL = -3; /* There are already maxqueue workers on this lock */
-       const TIMEOUT    = -4; /* Timeout exceeded */
-       const LOCK_HELD  = -5; /* Cannot acquire another lock while you have one lock held */
+       const TIMEOUT = -4; /* Timeout exceeded */
+       const LOCK_HELD = -5; /* Cannot acquire another lock while you have one lock held */
 
        /**
         * I want to do this task and I need to do it myself.
@@ -107,9 +107,9 @@ abstract class PoolCounter {
 
        protected function __construct( $conf, $type, $key ) {
                $this->key = $key;
-               $this->workers  = $conf['workers'];
+               $this->workers = $conf['workers'];
                $this->maxqueue = $conf['maxqueue'];
-               $this->timeout  = $conf['timeout'];
+               $this->timeout = $conf['timeout'];
        }
 }
 
index 76e1760..c3b5bec 100644 (file)
@@ -129,7 +129,7 @@ class Preferences {
        static function getOptionFromUser( $name, $info, $user ) {
                $val = $user->getOption( $name );
 
-               // Handling for array-type preferences
+               // Handling for multiselect preferences
                if ( ( isset( $info['type'] ) && $info['type'] == 'multiselect' ) ||
                                ( isset( $info['class'] ) && $info['class'] == 'HTMLMultiSelectField' ) ) {
                        $options = HTMLFormField::flattenOptions( $info['options'] );
@@ -143,6 +143,23 @@ class Preferences {
                        }
                }
 
+               // Handling for checkmatrix preferences
+               if ( ( isset( $info['type'] ) && $info['type'] == 'checkmatrix' ) ||
+                               ( isset( $info['class'] ) && $info['class'] == 'HTMLCheckMatrix' ) ) {
+                       $columns = HTMLFormField::flattenOptions( $info['columns'] );
+                       $rows = HTMLFormField::flattenOptions( $info['rows'] );
+                       $prefix = isset( $info['prefix'] ) ? $info['prefix'] : $name;
+                       $val = array();
+
+                       foreach ( $columns as $column ) {
+                               foreach ( $rows as $row ) {
+                                       if ( $user->getOption( "$prefix-$column-$row" ) ) {
+                                               $val[] = "$column-$row";
+                                       }
+                               }
+                       }
+               }
+
                return $val;
        }
 
@@ -185,7 +202,7 @@ class Preferences {
                                // Skip the default * group, seems useless here
                                continue;
                        }
-                       $groupName  = User::getGroupName( $ueg );
+                       $groupName = User::getGroupName( $ueg );
                        $userGroups[] = User::makeGroupLinkHTML( $ueg, $groupName );
 
                        $memberName = User::getGroupMember( $ueg, $userName );
@@ -380,7 +397,6 @@ class Preferences {
                                );
                        }
 
-
                        $defaultPreferences['emailaddress'] = array(
                                'type' => 'info',
                                'raw' => true,
@@ -809,7 +825,6 @@ class Preferences {
                        'label-message' => 'tog-forceeditsummary',
                );
 
-
                $defaultPreferences['uselivepreview'] = array(
                        'type' => 'toggle',
                        'section' => 'editing/advancedediting',
@@ -992,7 +1007,6 @@ class Preferences {
                        'min' => 0,
                );
 
-
                if ( $wgVectorUseSimpleSearch ) {
                        $defaultPreferences['vector-simplesearch'] = array(
                                'type' => 'toggle',
@@ -1230,7 +1244,7 @@ class Preferences {
         * @param $user User
         * @param $context IContextSource
         * @param $formClass string
-        * @param $remove Array: array of items to remove
+        * @param array $remove array of items to remove
         * @return HtmlForm
         */
        static function getFormObject( $user, IContextSource $context, $formClass = 'PreferencesForm', array $remove = array() ) {
@@ -1459,7 +1473,7 @@ class Preferences {
         *
         * @deprecated in 1.20; use User::setEmailWithConfirmation() instead.
         * @param $user User
-        * @param $newaddr string New email address
+        * @param string $newaddr New email address
         * @return Array (true on success or Status on failure, info string)
         */
        public static function trySetUserEmail( User $user, $newaddr ) {
@@ -1560,10 +1574,11 @@ class PreferencesForm extends HTMLForm {
         * @return array
         */
        function filterDataForSubmit( $data ) {
-               // Support for separating MultiSelect preferences into multiple preferences
+               // Support for separating multi-option preferences into multiple preferences
                // Due to lack of array support.
                foreach ( $this->mFlatFields as $fieldname => $field ) {
                        $info = $field->mParams;
+
                        if ( $field instanceof HTMLMultiSelectField ) {
                                $options = HTMLFormField::flattenOptions( $info['options'] );
                                $prefix = isset( $info['prefix'] ) ? $info['prefix'] : $fieldname;
@@ -1572,6 +1587,23 @@ class PreferencesForm extends HTMLForm {
                                        $data["$prefix$opt"] = in_array( $opt, $data[$fieldname] );
                                }
 
+                               unset( $data[$fieldname] );
+
+                       } elseif ( $field instanceof HTMLCheckMatrix ) {
+                               $columns = HTMLFormField::flattenOptions( $info['columns'] );
+                               $rows = HTMLFormField::flattenOptions( $info['rows'] );
+                               $prefix = isset( $info['prefix'] ) ? $info['prefix'] : $fieldname;
+                               foreach ( $columns as $column ) {
+                                       foreach ( $rows as $row ) {
+                                               // Make sure option hasn't been removed
+                                               if ( !isset( $info['remove-options'] )
+                                                       || !in_array( "$column-$row", $info['remove-options'] ) )
+                                               {
+                                                       $data["$prefix-$column-$row"] = in_array( "$column-$row", $data[$fieldname] );
+                                               }
+                                       }
+                               }
+
                                unset( $data[$fieldname] );
                        }
                }
index 7df6a50..8fa0163 100644 (file)
@@ -32,7 +32,7 @@ class PrefixSearch {
         *
         * @param $search String
         * @param $limit Integer
-        * @param $namespaces Array: used if query is not explicitely prefixed
+        * @param array $namespaces used if query is not explicitely prefixed
         * @return Array of strings
         */
        public static function titleSearch( $search, $limit, $namespaces = array() ) {
@@ -91,7 +91,7 @@ class PrefixSearch {
        /**
         * Prefix search special-case for Special: namespace.
         *
-        * @param $search String: term
+        * @param string $search term
         * @param $limit Integer: max number of items to return
         * @return Array
         */
@@ -147,8 +147,8 @@ class PrefixSearch {
         * be automatically capitalized by Title::secureAndSpit()
         * later on depending on $wgCapitalLinks)
         *
-        * @param $namespaces Array: namespaces to search in
-        * @param $search String: term
+        * @param array $namespaces namespaces to search in
+        * @param string $search term
         * @param $limit Integer: max number of items to return
         * @return Array of title strings
         */
index 17e4372..d7b8840 100644 (file)
@@ -201,7 +201,7 @@ class ProtectionForm {
        /**
         * Show the input form with optional error message
         *
-        * @param $err String: error message or null if there's no error
+        * @param string $err error message or null if there's no error
         */
        function show( $err = null ) {
                global $wgOut;
@@ -482,7 +482,7 @@ class ProtectionForm {
 
                # Add manual and custom reason field/selects as well as submit
                if( !$this->disabled ) {
-                       $out .=  Xml::openElement( 'table', array( 'id' => 'mw-protect-table3' ) ) .
+                       $out .= Xml::openElement( 'table', array( 'id' => 'mw-protect-table3' ) ) .
                                Xml::openElement( 'tbody' );
                        $out .= "
                                <tr>
@@ -554,8 +554,8 @@ class ProtectionForm {
        /**
         * Build protection level selector
         *
-        * @param $action String: action to protect
-        * @param $selected String: current protection level
+        * @param string $action action to protect
+        * @param string $selected current protection level
         * @return String: HTML fragment
         */
        function buildSelector( $action, $selected ) {
@@ -594,7 +594,7 @@ class ProtectionForm {
        /**
         * Prepare the label for a protection selector option
         *
-        * @param $permission String: permission required
+        * @param string $permission permission required
         * @return String
         */
        private function getOptionLabel( $permission ) {
index a01ac68..e41285b 100644 (file)
@@ -72,7 +72,6 @@ global $wgDisableCounters;
 if ( !$wgDisableCounters )
        $wgQueryPages[] = array( 'PopularPagesPage', 'Popularpages' );
 
-
 /**
  * This is a class for doing query pages; since they're almost all the same,
  * we factor out some of the functionality into a superclass, and let
index 6af7597..fcad0c9 100644 (file)
@@ -110,7 +110,7 @@ class RecentChange {
        /**
         * Obtain the recent change with a given rc_id value
         *
-        * @param $rcid Int rc_id value to retrieve
+        * @param int $rcid rc_id value to retrieve
         * @return RecentChange
         */
        public static function newFromId( $rcid ) {
@@ -120,7 +120,7 @@ class RecentChange {
        /**
         * Find the first recent change matching some specific conditions
         *
-        * @param $conds Array of conditions
+        * @param array $conds of conditions
         * @param $fname Mixed: override the method name in profiling/logs
         * @return RecentChange
         */
@@ -292,10 +292,10 @@ class RecentChange {
        /**
         * Send some text to UDP.
         * @see RecentChange::cleanupForIRC
-        * @param $line String: text to send
-        * @param $address String: defaults to $wgRC2UDPAddress.
-        * @param $prefix String: defaults to $wgRC2UDPPrefix.
-        * @param $port Int: defaults to $wgRC2UDPPort. (Since 1.17)
+        * @param string $line text to send
+        * @param string $address defaults to $wgRC2UDPAddress.
+        * @param string $prefix defaults to $wgRC2UDPPrefix.
+        * @param int $port defaults to $wgRC2UDPPort. (Since 1.17)
         * @return Boolean: success
         */
        public static function sendToUDP( $line, $address = '', $prefix = '', $port = '' ) {
@@ -459,7 +459,7 @@ class RecentChange {
                        'rc_params'     => ''
                );
 
-               $rc->mExtra =  array(
+               $rc->mExtra = array(
                        'prefixedDBkey' => $title->getPrefixedDBkey(),
                        'lastTimestamp' => $lastTimestamp,
                        'oldSize'       => $oldSize,
@@ -518,7 +518,7 @@ class RecentChange {
                        'rc_params'         => ''
                );
 
-               $rc->mExtra =  array(
+               $rc->mExtra = array(
                        'prefixedDBkey' => $title->getPrefixedDBkey(),
                        'lastTimestamp' => 0,
                        'oldSize' => 0,
@@ -627,7 +627,7 @@ class RecentChange {
                        'rc_params'     => $params
                );
 
-               $rc->mExtra =  array(
+               $rc->mExtra = array(
                        'prefixedDBkey' => $title->getPrefixedDBkey(),
                        'lastTimestamp' => 0,
                        'actionComment' => $actionComment, // the comment appended to the action, passed from LogPage
@@ -685,7 +685,7 @@ class RecentChange {
        /**
         * Get an attribute value
         *
-        * @param $name String Attribute name
+        * @param string $name Attribute name
         * @return mixed
         */
        public function getAttribute( $name ) {
index df1e43e..d3f8958 100644 (file)
@@ -558,7 +558,6 @@ class Revision implements IDBAccessObject {
                        // Build a new revision to be saved...
                        global $wgUser; // ugh
 
-
                        # if we have a content object, use it to set the model and type
                        if ( !empty( $row['content'] ) ) {
                                //@todo: when is that set? test with external store setup! check out insertOn() [dk]
@@ -889,7 +888,7 @@ class Revision implements IDBAccessObject {
        }
 
        /**
-        * @param $field int one of DELETED_* bitfield constants
+        * @param int $field one of DELETED_* bitfield constants
         *
         * @return Boolean
         */
@@ -1095,7 +1094,7 @@ class Revision implements IDBAccessObject {
        /**
         * Get previous revision for this title
         *
-        * @return Revision or null
+        * @return Revision|null
         */
        public function getPrevious() {
                if( $this->getTitle() ) {
@@ -1153,8 +1152,8 @@ class Revision implements IDBAccessObject {
          * field must be included
          *
          * @param $row Object: the text data
-         * @param $prefix String: table prefix (default 'old_')
-         * @param $wiki String|false: the name of the wiki to load the revision text from
+         * @param string $prefix table prefix (default 'old_')
+         * @param string|false $wiki the name of the wiki to load the revision text from
          *         (same as the the wiki $row was loaded from) or false to indicate the local
          *         wiki (this is the default). Otherwise, it must be a symbolic wiki database
          *         identifier as understood by the LoadBalancer class.
@@ -1327,7 +1326,7 @@ class Revision implements IDBAccessObject {
 
                if ( $wgContentHandlerUseDB ) {
                        //NOTE: Store null for the default model and format, to save space.
-                       //XXX: Makes the DB sensitive to changed defaults. Make this behaviour optional? Only in miser mode?
+                       //XXX: Makes the DB sensitive to changed defaults. Make this behavior optional? Only in miser mode?
 
                        $model = $this->getContentModel();
                        $format = $this->getContentFormat();
@@ -1480,7 +1479,7 @@ class Revision implements IDBAccessObject {
         *
         * @param $dbw DatabaseBase
         * @param $pageId Integer: ID number of the page to read from
-        * @param $summary String: revision's summary
+        * @param string $summary revision's summary
         * @param $minor Boolean: whether the revision should be considered as minor
         * @return Revision|null on error
         */
index ff79c59..4a3aaf8 100644 (file)
@@ -358,9 +358,9 @@ class Sanitizer {
         * @private
         * @param $text String
         * @param $processCallback Callback to do any variable or parameter replacements in HTML attribute values
-        * @param $args Array for the processing callback
-        * @param $extratags Array for any extra tags to include
-        * @param $removetags Array for any tags (default or extra) to exclude
+        * @param array $args for the processing callback
+        * @param array $extratags for any extra tags to include
+        * @param array $removetags for any tags (default or extra) to exclude
         * @return string
         */
        static function removeHTMLtags( $text, $processCallback = null, $args = array(), $extratags = array(), $removetags = array() ) {
@@ -699,7 +699,7 @@ class Sanitizer {
         * - Invalid id attributes are reencoded
         *
         * @param $attribs Array
-        * @param $whitelist Array: list of allowed attribute names
+        * @param array $whitelist list of allowed attribute names
         * @return Array
         *
         * @todo Check for legal values where the DTD limits things.
@@ -1013,7 +1013,7 @@ class Sanitizer {
         * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute
         *   HTML5 definition of id attribute
         *
-        * @param $id String: id to escape
+        * @param string $id id to escape
         * @param $options Mixed: string or array of strings (default is array()):
         *   'noninitial': This is a non-initial fragment of an id, not a full id,
         *       so don't pay attention if the first character isn't valid at the
@@ -1080,7 +1080,7 @@ class Sanitizer {
         * Given HTML input, escape with htmlspecialchars but un-escape entites.
         * This allows (generally harmless) entities like &#160; to survive.
         *
-        * @param $html String to escape
+        * @param string $html to escape
         * @return String: escaped input
         */
        static function escapeHtmlAllowEntities( $html ) {
@@ -1332,7 +1332,7 @@ class Sanitizer {
         * This is useful for page titles, not for text to be displayed,
         * MediaWiki allows HTML entities to escape normalization as a feature.
         *
-        * @param $text String (already normalized, containing entities)
+        * @param string $text (already normalized, containing entities)
         * @return String (still normalized, without entities)
         */
        public static function decodeCharReferencesAndNormalize( $text ) {
@@ -1634,7 +1634,7 @@ class Sanitizer {
         * Warning: this return value must be further escaped for literal
         * inclusion in HTML output as of 1.10!
         *
-        * @param $text String: HTML fragment
+        * @param string $text HTML fragment
         * @return String
         */
        static function stripAllTags( $text ) {
@@ -1746,7 +1746,7 @@ class Sanitizer {
         *
         * @since 1.18
         *
-        * @param $addr String E-mail address
+        * @param string $addr E-mail address
         * @return Bool
         */
        public static function validateEmail( $addr ) {
@@ -1758,7 +1758,7 @@ class Sanitizer {
                // Please note strings below are enclosed in brackets [], this make the
                // hyphen "-" a range indicator. Hence it is double backslashed below.
                // See bug 26948
-               $rfc5322_atext   = "a-z0-9!#$%&'*+\\-\/=?^_`{|}~";
+               $rfc5322_atext = "a-z0-9!#$%&'*+\\-\/=?^_`{|}~";
                $rfc1034_ldh_str = "a-z0-9\\-";
 
                $HTML5_email_regexp = "/
index 0853df1..e87b200 100644 (file)
@@ -70,7 +70,7 @@ if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) {
 
 if ( $wgStylePath === false ) $wgStylePath = "$wgScriptPath/skins";
 if ( $wgLocalStylePath === false ) $wgLocalStylePath = "$wgScriptPath/skins";
-if ( $wgStyleDirectory === false ) $wgStyleDirectory   = "$IP/skins";
+if ( $wgStyleDirectory === false ) $wgStyleDirectory = "$IP/skins";
 if ( $wgExtensionAssetsPath === false ) $wgExtensionAssetsPath = "$wgScriptPath/extensions";
 
 if ( $wgLogo === false ) $wgLogo = "$wgStylePath/common/images/wiki.png";
index 11d7fd6..bbc14a1 100644 (file)
@@ -169,11 +169,11 @@ class SiteConfiguration {
 
        /**
         * Retrieves a configuration setting for a given wiki.
-        * @param $settingName String ID of the setting name to retrieve
-        * @param $wiki String Wiki ID of the wiki in question.
-        * @param $suffix String The suffix of the wiki in question.
-        * @param $params Array List of parameters. $.'key' is replaced by $value in all returned data.
-        * @param $wikiTags Array The tags assigned to the wiki.
+        * @param string $settingName ID of the setting name to retrieve
+        * @param string $wiki Wiki ID of the wiki in question.
+        * @param string $suffix The suffix of the wiki in question.
+        * @param array $params List of parameters. $.'key' is replaced by $value in all returned data.
+        * @param array $wikiTags The tags assigned to the wiki.
         * @return Mixed the value of the setting requested.
         */
        public function get( $settingName, $wiki, $suffix = null, $params = array(), $wikiTags = array() ) {
@@ -184,9 +184,9 @@ class SiteConfiguration {
        /**
         * Really retrieves a configuration setting for a given wiki.
         *
-        * @param $settingName String ID of the setting name to retrieve.
-        * @param $wiki String Wiki ID of the wiki in question.
-        * @param $params Array: array of parameters.
+        * @param string $settingName ID of the setting name to retrieve.
+        * @param string $wiki Wiki ID of the wiki in question.
+        * @param array $params array of parameters.
         * @return Mixed the value of the setting requested.
         */
        protected function getSetting( $settingName, $wiki, /*array*/ $params ) {
@@ -280,10 +280,10 @@ class SiteConfiguration {
 
        /**
         * Gets all settings for a wiki
-        * @param $wiki String Wiki ID of the wiki in question.
-        * @param $suffix String The suffix of the wiki in question.
-        * @param $params Array List of parameters. $.'key' is replaced by $value in all returned data.
-        * @param $wikiTags Array The tags assigned to the wiki.
+        * @param string $wiki Wiki ID of the wiki in question.
+        * @param string $suffix The suffix of the wiki in question.
+        * @param array $params List of parameters. $.'key' is replaced by $value in all returned data.
+        * @param array $wikiTags The tags assigned to the wiki.
         * @return Array Array of settings requested.
         */
        public function getAll( $wiki, $suffix = null, $params = array(), $wikiTags = array() ) {
@@ -310,10 +310,10 @@ class SiteConfiguration {
 
        /**
         * Retrieves a configuration setting for a given wiki, forced to a boolean.
-        * @param $setting String ID of the setting name to retrieve
-        * @param $wiki String Wiki ID of the wiki in question.
-        * @param $suffix String The suffix of the wiki in question.
-        * @param $wikiTags Array The tags assigned to the wiki.
+        * @param string $setting ID of the setting name to retrieve
+        * @param string $wiki Wiki ID of the wiki in question.
+        * @param string $suffix The suffix of the wiki in question.
+        * @param array $wikiTags The tags assigned to the wiki.
         * @return bool The value of the setting requested.
         */
        public function getBool( $setting, $wiki, $suffix = null, $wikiTags = array() ) {
@@ -331,12 +331,12 @@ class SiteConfiguration {
 
        /**
         * Retrieves the value of a given setting, and places it in a variable passed by reference.
-        * @param $setting String ID of the setting name to retrieve
-        * @param $wiki String Wiki ID of the wiki in question.
-        * @param $suffix String The suffix of the wiki in question.
-        * @param $var array Reference The variable to insert the value into.
-        * @param $params Array List of parameters. $.'key' is replaced by $value in all returned data.
-        * @param $wikiTags Array The tags assigned to the wiki.
+        * @param string $setting ID of the setting name to retrieve
+        * @param string $wiki Wiki ID of the wiki in question.
+        * @param string $suffix The suffix of the wiki in question.
+        * @param array $var Reference The variable to insert the value into.
+        * @param array $params List of parameters. $.'key' is replaced by $value in all returned data.
+        * @param array $wikiTags The tags assigned to the wiki.
         */
        public function extractVar( $setting, $wiki, $suffix, &$var, $params = array(), $wikiTags = array() ) {
                $value = $this->get( $setting, $wiki, $suffix, $params, $wikiTags );
@@ -347,11 +347,11 @@ class SiteConfiguration {
 
        /**
         * Retrieves the value of a given setting, and places it in its corresponding global variable.
-        * @param $setting String ID of the setting name to retrieve
-        * @param $wiki String Wiki ID of the wiki in question.
-        * @param $suffix String The suffix of the wiki in question.
-        * @param $params Array List of parameters. $.'key' is replaced by $value in all returned data.
-        * @param $wikiTags Array The tags assigned to the wiki.
+        * @param string $setting ID of the setting name to retrieve
+        * @param string $wiki Wiki ID of the wiki in question.
+        * @param string $suffix The suffix of the wiki in question.
+        * @param array $params List of parameters. $.'key' is replaced by $value in all returned data.
+        * @param array $wikiTags The tags assigned to the wiki.
         */
        public function extractGlobal( $setting, $wiki, $suffix = null, $params = array(), $wikiTags = array() ) {
                $params = $this->mergeParams( $wiki, $suffix, $params, $wikiTags );
@@ -381,10 +381,10 @@ class SiteConfiguration {
 
        /**
         * Retrieves the values of all settings, and places them in their corresponding global variables.
-        * @param $wiki String Wiki ID of the wiki in question.
-        * @param $suffix String The suffix of the wiki in question.
-        * @param $params Array List of parameters. $.'key' is replaced by $value in all returned data.
-        * @param $wikiTags Array The tags assigned to the wiki.
+        * @param string $wiki Wiki ID of the wiki in question.
+        * @param string $suffix The suffix of the wiki in question.
+        * @param array $params List of parameters. $.'key' is replaced by $value in all returned data.
+        * @param array $wikiTags The tags assigned to the wiki.
         */
        public function extractAllGlobals( $wiki, $suffix = null, $params = array(), $wikiTags = array() ) {
                $params = $this->mergeParams( $wiki, $suffix, $params, $wikiTags );
@@ -433,11 +433,11 @@ class SiteConfiguration {
         * by self::$siteParamsCallback for backward compatibility
         * Values returned by self::getWikiParams() have the priority.
         *
-        * @param $wiki String Wiki ID of the wiki in question.
-        * @param $suffix String The suffix of the wiki in question.
-        * @param $params Array List of parameters. $.'key' is replaced by $value in
+        * @param string $wiki Wiki ID of the wiki in question.
+        * @param string $suffix The suffix of the wiki in question.
+        * @param array $params List of parameters. $.'key' is replaced by $value in
         *                all returned data.
-        * @param $wikiTags Array The tags assigned to the wiki.
+        * @param array $wikiTags The tags assigned to the wiki.
         * @return array
         */
        protected function mergeParams( $wiki, $suffix, /*array*/ $params, /*array*/ $wikiTags ) {
index addaddd..b7be29d 100644 (file)
@@ -160,7 +160,7 @@ class SiteStats {
 
        /**
         * Find the number of users in a given user group.
-        * @param $group String: name of group
+        * @param string $group name of group
         * @return Integer
         */
        static function numberingroup( $group ) {
@@ -398,7 +398,7 @@ class SiteStatsUpdate implements DeferrableUpdate {
 
        /**
         * @param $type string
-        * @param $sign string ('+' or '-')
+        * @param string $sign ('+' or '-')
         * @return string
         */
        private function getTypeCacheKey( $type, $sign ) {
@@ -451,7 +451,7 @@ class SiteStatsUpdate implements DeferrableUpdate {
 
        /**
         * Reduce pending delta counters after updates have been applied
-        * @param Array $pd Result of getPendingDeltas(), used for DB update
+        * @param array $pd Result of getPendingDeltas(), used for DB update
         * @return void
         */
        protected function removePendingDeltas( array $pd ) {
@@ -574,7 +574,7 @@ class SiteStatsInit {
         * @param $database DatabaseBase|bool
         * - Boolean: whether to use the master DB
         * - DatabaseBase: database connection to use
-        * @param $options Array of options, may contain the following values
+        * @param array $options of options, may contain the following values
         * - update Boolean: whether to update the current stats (true) or write fresh (false) (default: false)
         * - views Boolean: when true, do not update the number of page views (default: true)
         * - activeUsers Boolean: whether to update the number of active users (default: false)
index 723ede4..9023492 100644 (file)
@@ -107,7 +107,7 @@ abstract class Skin extends ContextSource {
         * Normalize a skin preference value to a form that can be loaded.
         * If a skin can't be found, it will fall back to the configured
         * default (or the old 'Classic' skin if that's broken).
-        * @param $key String: 'monobook', 'standard', etc.
+        * @param string $key 'monobook', 'standard', etc.
         * @return string
         */
        static function normalizeKey( $key ) {
@@ -148,7 +148,7 @@ abstract class Skin extends ContextSource {
 
        /**
         * Factory method for loading a skin of a given type
-        * @param $key String: 'monobook', 'standard', etc.
+        * @param string $key 'monobook', 'standard', etc.
         * @return Skin
         */
        static function &newFromKey( $key ) {
@@ -482,7 +482,7 @@ abstract class Skin extends ContextSource {
 
        /**
         * Render the array as a serie of links.
-        * @param $tree Array: categories tree returned by Title::getParentCategoryTree
+        * @param array $tree categories tree returned by Title::getParentCategoryTree
         * @return String separated by &gt;, terminate with "\n"
         */
        function drawCategoryBrowser( $tree ) {
@@ -613,7 +613,6 @@ abstract class Skin extends ContextSource {
                        ( $this->getTitle()->getArticleID() == 0 || $action == 'history' ) ) {
                        $n = $this->getTitle()->isDeleted();
 
-
                        if ( $n ) {
                                if ( $this->getUser()->isAllowed( 'undelete' ) ) {
                                        $msg = 'thisisdeleted';
@@ -852,8 +851,8 @@ abstract class Skin extends ContextSource {
 
        /**
         * Renders a $wgFooterIcons icon acording to the method's arguments
-        * @param $icon Array: The icon to build the html for, see $wgFooterIcons for the format of this array
-        * @param $withImage Bool|String: Whether to use the icon's image or output a text-only footericon
+        * @param array $icon The icon to build the html for, see $wgFooterIcons for the format of this array
+        * @param bool|String $withImage Whether to use the icon's image or output a text-only footericon
         * @return String HTML
         */
        function makeFooterIcon( $icon, $withImage = 'withImage' ) {
@@ -969,7 +968,7 @@ abstract class Skin extends ContextSource {
         * Return a fully resolved style path url to images or styles stored in the common folder.
         * This method returns a url resolved using the configured skin style path
         * and includes the style version inside of the url.
-        * @param $name String: The name or path of a skin resource file
+        * @param string $name The name or path of a skin resource file
         * @return String The fully resolved style path url including styleversion
         */
        function getCommonStylePath( $name ) {
@@ -981,7 +980,7 @@ abstract class Skin extends ContextSource {
         * Return a fully resolved style path url to images or styles stored in the curent skins's folder.
         * This method returns a url resolved using the configured skin style path
         * and includes the style version inside of the url.
-        * @param $name String: The name or path of a skin resource file
+        * @param string $name The name or path of a skin resource file
         * @return String The fully resolved style path url including styleversion
         */
        function getSkinStylePath( $name ) {
@@ -1008,8 +1007,8 @@ abstract class Skin extends ContextSource {
         * If $proto is set to null, make a local URL. Otherwise, make a full
         * URL with the protocol specified.
         *
-        * @param $name string Name of the Special page
-        * @param $urlaction string Query to append
+        * @param string $name Name of the Special page
+        * @param string $urlaction Query to append
         * @param $proto Protocol to use or null for a local URL
         * @return String
         */
@@ -1102,7 +1101,7 @@ abstract class Skin extends ContextSource {
 
        /**
         * Make URL details where the article exists (or at least it's convenient to think so)
-        * @param $name String Article name
+        * @param string $name Article name
         * @param $urlaction String
         * @return Array
         */
@@ -1382,7 +1381,7 @@ abstract class Skin extends ContextSource {
        /**
         * Get a cached notice
         *
-        * @param $name String: message name, or 'default' for $wgSiteNotice
+        * @param string $name message name, or 'default' for $wgSiteNotice
         * @return String: HTML fragment
         */
        private function getCachedNotice( $name ) {
@@ -1490,9 +1489,9 @@ abstract class Skin extends ContextSource {
         *
         * @param $nt      Title  The title being linked to (may not be the same as
         *   $wgTitle, if the section is included from a template)
-        * @param $section string The designation of the section being pointed to,
+        * @param string $section The designation of the section being pointed to,
         *   to be included in the link, like "&section=$section"
-        * @param $tooltip string The tooltip to use for the link: will be escaped
+        * @param string $tooltip The tooltip to use for the link: will be escaped
         *   and wrapped in the 'editsectionhint' message
         * @param $lang    string Language code
         * @return         string HTML to use for edit link
@@ -1550,8 +1549,8 @@ abstract class Skin extends ContextSource {
         * Use PHP's magic __call handler to intercept legacy calls to the linker
         * for backwards compatibility.
         *
-        * @param $fname String Name of called method
-        * @param $args Array Arguments to the method
+        * @param string $fname Name of called method
+        * @param array $args Arguments to the method
         * @throws MWException
         * @return mixed
         */
index c1c7219..b9766a9 100644 (file)
@@ -786,7 +786,7 @@ class LegacyTemplate extends BaseTemplate {
                        return '';
                }
 
-               # __NEWSECTIONLINK___ changes behaviour here
+               # __NEWSECTIONLINK___ changes behavior here
                # If it is present, the link points to this page, otherwise
                # it points to the talk page
                if ( !$title->isTalkPage() && !$wgOut->showNewSectionLink() ) {
index 86972ee..299df67 100644 (file)
@@ -113,7 +113,7 @@ class SkinTemplate extends Skin {
         * roughly equivalent to PHPTAL 0.7.
         *
         * @param $classname String
-        * @param $repository string: subdirectory where we keep template files
+        * @param string $repository subdirectory where we keep template files
         * @param $cache_dir string
         * @return QuickTemplate
         * @private
@@ -273,7 +273,7 @@ class SkinTemplate extends Skin {
 
                $userLang = $this->getLanguage();
                $userLangCode = $userLang->getHtmlCode();
-               $userLangDir  = $userLang->getDir();
+               $userLangDir = $userLang->getDir();
 
                $tpl->set( 'lang', $userLangCode );
                $tpl->set( 'dir', $userLangDir );
@@ -505,7 +505,7 @@ class SkinTemplate extends Skin {
         * Format language name for use in sidebar interlanguage links list.
         * By default it is capitalized.
         *
-        * @param $name string Language name, e.g. "English" or "español"
+        * @param string $name Language name, e.g. "English" or "español"
         * @return string
         * @private
         */
@@ -1174,6 +1174,7 @@ class SkinTemplate extends Skin {
                $nav_urls['log'] = false;
                $nav_urls['blockip'] = false;
                $nav_urls['emailuser'] = false;
+               $nav_urls['userrights'] = false;
 
                // A print stylesheet is attached to all pages, but nobody ever
                // figures that out. :)  Add a link...
@@ -1241,6 +1242,13 @@ class SkinTemplate extends Skin {
                                        'href' => self::makeSpecialUrlSubpage( 'Emailuser', $rootUser )
                                );
                        }
+
+                       $sur = new UserrightsPage;
+                       if ( $sur->userCanExecute( $this->getUser() ) ) {
+                               $nav_urls['userrights'] = array(
+                                       'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser )
+                               );
+                       }
                }
 
                wfProfileOut( __METHOD__ );
@@ -1389,7 +1397,7 @@ abstract class BaseTemplate extends QuickTemplate {
        /**
         * Get a Message object with its context set
         *
-        * @param $name string message name
+        * @param string $name message name
         * @return Message
         */
        public function getMsg( $name ) {
@@ -1439,7 +1447,7 @@ abstract class BaseTemplate extends QuickTemplate {
                                $toolbox['feeds']['links'][$key]['class'] = 'feedlink';
                        }
                }
-               foreach ( array( 'contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages' ) as $special ) {
+               foreach ( array( 'contributions', 'log', 'blockip', 'emailuser', 'userrights', 'upload', 'specialpages' ) as $special ) {
                        if ( isset( $this->data['nav_urls'][$special] ) && $this->data['nav_urls'][$special] ) {
                                $toolbox[$special] = $this->data['nav_urls'][$special];
                                $toolbox[$special]['id'] = "t-$special";
@@ -1638,9 +1646,9 @@ abstract class BaseTemplate extends QuickTemplate {
         * Makes a link, usually used by makeListItem to generate a link for an item
         * in a list used in navigation lists, portlets, portals, sidebars, etc...
         *
-        * @param $key string usually a key from the list you are generating this
+        * @param string $key usually a key from the list you are generating this
         * link from.
-        * @param $item array contains some of a specific set of keys.
+        * @param array $item contains some of a specific set of keys.
         *
         * The text of the link will be generated either from the contents of the
         * "text" key in the $item array, if a "msg" key is present a message by
@@ -1657,7 +1665,7 @@ abstract class BaseTemplate extends QuickTemplate {
         *
         * If you don't want an accesskey, set $item['tooltiponly'] = true;
         *
-        * @param $options array can be used to affect the output of a link.
+        * @param array $options can be used to affect the output of a link.
         * Possible options are:
         *   - 'text-wrapper' key to specify a list of elements to wrap the text of
         *   a link in. This should be an array of arrays containing a 'tag' and
index 3b3a5ee..5354da6 100644 (file)
@@ -135,7 +135,7 @@ class SpecialPage {
         * preferred method is now to add a SpecialPage_initList hook.
         * @deprecated since 1.18
         *
-        * @param $name String the page to remove
+        * @param string $name the page to remove
         */
        static function removePage( $name ) {
                wfDeprecated( __METHOD__, '1.18' );
@@ -145,7 +145,7 @@ class SpecialPage {
        /**
         * Check if a given name exist as a special page or as a special page alias
         *
-        * @param $name String: name of a special page
+        * @param string $name name of a special page
         * @return Boolean: true if a special page exists with this name
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
@@ -253,8 +253,8 @@ class SpecialPage {
         * Get a localised Title object for a specified special page name
         *
         * @param $name String
-        * @param $subpage String|Bool subpage string, or false to not use a subpage
-        * @param $fragment String the link fragment (after the "#")
+        * @param string|Bool $subpage subpage string, or false to not use a subpage
+        * @param string $fragment the link fragment (after the "#")
         * @throws MWException
         * @return Title object
         */
@@ -271,7 +271,7 @@ class SpecialPage {
         * Get a localised Title object for a page name with a possibly unvalidated subpage
         *
         * @param $name String
-        * @param $subpage String|Bool subpage string, or false to not use a subpage
+        * @param string|Bool $subpage subpage string, or false to not use a subpage
         * @return Title object or null if the page doesn't exist
         */
        public static function getSafeTitleFor( $name, $subpage = false ) {
@@ -302,15 +302,15 @@ class SpecialPage {
         *     be displayed by the default execute() method, without the global function ever
         *     being called.
         *
-        *     If you override execute(), you can recover the default behaviour with userCanExecute()
+        *     If you override execute(), you can recover the default behavior with userCanExecute()
         *     and displayRestrictionError()
         *
-        * @param $name String: name of the special page, as seen in links and URLs
-        * @param $restriction String: user right required, e.g. "block" or "delete"
-        * @param $listed Bool: whether the page is listed in Special:Specialpages
+        * @param string $name name of the special page, as seen in links and URLs
+        * @param string $restriction user right required, e.g. "block" or "delete"
+        * @param bool $listed whether the page is listed in Special:Specialpages
         * @param $function Callback|Bool: function called by execute(). By default it is constructed from $name
-        * @param $file String: file which is included by execute(). It is also constructed from $name by default
-        * @param $includable Bool: whether the page can be included in normal pages
+        * @param string $file file which is included by execute(). It is also constructed from $name by default
+        * @param bool $includable whether the page can be included in normal pages
         */
        public function __construct(
                $name = '', $restriction = '', $listed = true,
@@ -322,12 +322,12 @@ class SpecialPage {
        /**
         * Do the real work for the constructor, mainly so __call() can intercept
         * calls to SpecialPage()
-        * @param $name String: name of the special page, as seen in links and URLs
-        * @param $restriction String: user right required, e.g. "block" or "delete"
-        * @param $listed Bool: whether the page is listed in Special:Specialpages
+        * @param string $name name of the special page, as seen in links and URLs
+        * @param string $restriction user right required, e.g. "block" or "delete"
+        * @param bool $listed whether the page is listed in Special:Specialpages
         * @param $function Callback|Bool: function called by execute(). By default it is constructed from $name
-        * @param $file String: file which is included by execute(). It is also constructed from $name by default
-        * @param $includable Bool: whether the page can be included in normal pages
+        * @param string $file file which is included by execute(). It is also constructed from $name by default
+        * @param bool $includable whether the page can be included in normal pages
         */
        private function init( $name, $restriction, $listed, $function, $file, $includable ) {
                $this->mName = $name;
@@ -350,8 +350,8 @@ class SpecialPage {
         * Use PHP's magic __call handler to get calls to the old PHP4 constructor
         * because PHP E_STRICT yells at you for having __construct() and SpecialPage()
         *
-        * @param $fName String Name of called method
-        * @param $a Array Arguments to the method
+        * @param string $fName Name of called method
+        * @param array $a Arguments to the method
         * @throws MWException
         * @deprecated since 1.17, call parent::__construct()
         */
@@ -673,7 +673,7 @@ class SpecialPage {
         * May be overriden, i.e. by extensions to stick with the naming conventions
         * for message keys: 'extensionname-xxx'
         *
-        * @param $summaryMessageKey String: message key of the summary
+        * @param string $summaryMessageKey message key of the summary
         */
        function outputHeader( $summaryMessageKey = '' ) {
                global $wgContLang;
@@ -695,7 +695,7 @@ class SpecialPage {
         * also the name that will be listed in Special:Specialpages
         *
         * Derived classes can override this, but usually it is easier to keep the
-        * default behaviour. Messages can be added at run-time, see
+        * default behavior. Messages can be added at run-time, see
         * MessageCache.php.
         *
         * @return String
@@ -850,6 +850,57 @@ class SpecialPage {
                        $this->getOutput()->addFeedLink( $format, $url );
                }
        }
+
+       /**
+        * Get the group that the special page belongs in on Special:SpecialPage
+        * Use this method, instead of getGroupName to allow customization
+        * of the group name from the wiki side
+        *
+        * @return string Group of this special page
+        * @since 1.21
+        */
+       public function getFinalGroupName() {
+               global $wgSpecialPageGroups;
+               $name = $this->getName();
+               $group = '-';
+
+               // Allow overridding the group from the wiki side
+               $msg = $this->msg( 'specialpages-specialpagegroup-' . strtolower( $name ) )->inContentLanguage();
+               if ( !$msg->isBlank() ) {
+                       $group = $msg->text();
+               } else {
+                       // Than use the group from this object
+                       $group = $this->getGroupName();
+
+                       // Group '-' is used as default to have the chance to determine,
+                       // if the special pages overriddes this method,
+                       // if not overridden, $wgSpecialPageGroups is checked for b/c
+                       if ( $group === '-' && isset( $wgSpecialPageGroups[$name] ) ) {
+                               $group = $wgSpecialPageGroups[$name];
+                       }
+               }
+
+               // never give '-' back, change to 'other'
+               if ( $group === '-' ) {
+                       $group = 'other';
+               }
+
+               return $group;
+       }
+
+       /**
+        * Under which header this special page is listed in Special:SpecialPages
+        * See messages 'specialpages-group-*' for valid names
+        * This method defaults to group 'other'
+        *
+        * @return string
+        * @since 1.21
+        */
+       protected function getGroupName() {
+               // '-' used here to determine, if this group is overridden or has a hardcoded 'other'
+               // Needed for b/c in getFinalGroupName
+               return '-';
+       }
 }
 
 /**
@@ -889,7 +940,7 @@ abstract class FormSpecialPage extends SpecialPage {
        }
 
        /**
-        * Get the HTMLForm to control behaviour
+        * Get the HTMLForm to control behavior
         * @return HTMLForm|null
         */
        protected function getForm() {
@@ -932,7 +983,7 @@ abstract class FormSpecialPage extends SpecialPage {
        /**
         * Basic SpecialPage workflow: get a form, send it to the user; get some data back,
         *
-        * @param $par String Subpage string if one was specified
+        * @param string $par Subpage string if one was specified
         */
        public function execute( $par ) {
                $this->setParameter( $par );
@@ -1058,7 +1109,7 @@ abstract class RedirectSpecialPage extends UnlistedSpecialPage {
         * If the special page is a redirect, then get the Title object it redirects to.
         * False otherwise.
         *
-        * @param $par String Subpage string
+        * @param string $par Subpage string
         * @return Title|bool
         */
        abstract public function getRedirect( $par );
index c94c358..719763c 100644 (file)
@@ -286,8 +286,11 @@ class SpecialPageFactory {
         *
         * @param $page Mixed: SpecialPage or string
         * @param $group String
+        * @deprecated 1.21 Override SpecialPage::getGroupName
         */
        public static function setGroup( $page, $group ) {
+               wfDeprecated( __METHOD__, '1.21' );
+
                global $wgSpecialPageGroups;
                $name = is_object( $page ) ? $page->getName() : $page;
                $wgSpecialPageGroups[$name] = $group;
@@ -298,34 +301,18 @@ class SpecialPageFactory {
         *
         * @param $page SpecialPage
         * @return String
+        * @deprecated 1.21 Use SpecialPage::getFinalGroupName
         */
        public static function getGroup( &$page ) {
-               $name = $page->getName();
+               wfDeprecated( __METHOD__, '1.21' );
 
-               global $wgSpecialPageGroups;
-               static $specialPageGroupsCache = array();
-               if ( isset( $specialPageGroupsCache[$name] ) ) {
-                       return $specialPageGroupsCache[$name];
-               }
-               $msg = wfMessage( 'specialpages-specialpagegroup-' . strtolower( $name ) );
-               if ( !$msg->isBlank() ) {
-                       $group = $msg->text();
-               } else {
-                       $group = isset( $wgSpecialPageGroups[$name] )
-                               ? $wgSpecialPageGroups[$name]
-                               : '-';
-               }
-               if ( $group == '-' ) {
-                       $group = 'other';
-               }
-               $specialPageGroupsCache[$name] = $group;
-               return $group;
+               return $page->getFinalGroupName();
        }
 
        /**
         * Check if a given name exist as a special page or as a special page alias
         *
-        * @param $name String: name of a special page
+        * @param string $name name of a special page
         * @return Boolean: true if a special page exists with this name
         */
        public static function exists( $name ) {
@@ -336,7 +323,7 @@ class SpecialPageFactory {
        /**
         * Find the object with a given name and return it (or NULL)
         *
-        * @param $name String Special page name, may be localised and/or an alias
+        * @param string $name Special page name, may be localised and/or an alias
         * @return SpecialPage|null SpecialPage object or null if the page doesn't exist
         */
        public static function getPage( $name ) {
index 449b656..5d6236f 100644 (file)
@@ -47,7 +47,7 @@ class Status {
        /**
         * Factory function for fatal errors
         *
-        * @param $message String|Message: message name or object
+        * @param string|Message $message message name or object
         * @return Status
         */
        static function newFatal( $message /*, parameters...*/ ) {
@@ -103,7 +103,7 @@ class Status {
        /**
         * Add a new warning
         *
-        * @param $message String|Message: message name or object
+        * @param string|Message $message message name or object
         */
        function warning( $message /*, parameters... */ ) {
                $params = array_slice( func_get_args(), 1 );
@@ -117,7 +117,7 @@ class Status {
         * Add an error, do not set fatal flag
         * This can be used for non-fatal errors
         *
-        * @param $message String|Message: message name or object
+        * @param string|Message $message message name or object
         */
        function error( $message /*, parameters... */ ) {
                $params = array_slice( func_get_args(), 1 );
@@ -131,7 +131,7 @@ class Status {
         * Add an error and set OK to false, indicating that the operation
         * as a whole was fatal
         *
-        * @param $message String|Message: message name or object
+        * @param string|Message $message message name or object
         */
        function fatal( $message /*, parameters... */ ) {
                $params = array_slice( func_get_args(), 1 );
@@ -167,9 +167,9 @@ class Status {
        /**
         * Get the error list as a wikitext formatted list
         *
-        * @param $shortContext String: a short enclosing context message name, to
+        * @param string $shortContext a short enclosing context message name, to
         *        be used when there is a single error
-        * @param $longContext String: a long enclosing context message name, for a list
+        * @param string $longContext a long enclosing context message name, for a list
         * @return String
         */
        function getWikiText( $shortContext = false, $longContext = false ) {
@@ -330,7 +330,7 @@ class Status {
         * Note, due to the lack of tools for comparing Message objects, this
         * function will not work when using a Message object as a parameter.
         *
-        * @param $msg String: message name
+        * @param string $msg message name
         * @return Boolean
         */
        function hasMessage( $msg ) {
index b0e6c12..f5e4acf 100644 (file)
@@ -32,9 +32,9 @@ class StreamFile {
         * Headers sent include: Content-type, Content-Length, Last-Modified,
         * and Content-Disposition.
         *
-        * @param $fname string Full name and path of the file to stream
-        * @param $headers array Any additional headers to send
-        * @param $sendErrors bool Send error messages if errors occur (like 404)
+        * @param string $fname Full name and path of the file to stream
+        * @param array $headers Any additional headers to send
+        * @param bool $sendErrors Send error messages if errors occur (like 404)
         * @throws MWException
         * @return bool Success
         */
@@ -71,10 +71,10 @@ class StreamFile {
         * (b) cancels any PHP output buffering and automatic gzipping of output
         * (c) sends Content-Length header based on HTTP_IF_MODIFIED_SINCE check
         *
-        * @param $path string Storage path or file system path
-        * @param $info Array|bool File stat info with 'mtime' and 'size' fields
-        * @param $headers Array Additional headers to send
-        * @param $sendErrors bool Send error messages if errors occur (like 404)
+        * @param string $path Storage path or file system path
+        * @param array|bool $info File stat info with 'mtime' and 'size' fields
+        * @param array $headers Additional headers to send
+        * @param bool $sendErrors Send error messages if errors occur (like 404)
         * @return int|bool READY_STREAM, NOT_MODIFIED, or false on failure
         */
        public static function prepareForStream(
@@ -143,8 +143,8 @@ class StreamFile {
        /**
         * Determine the file type of a file based on the path
         *
-        * @param $filename string Storage path or file system path
-        * @param $safe bool Whether to do retroactive upload blacklist checks
+        * @param string $filename Storage path or file system path
+        * @param bool $safe Whether to do retroactive upload blacklist checks
         * @return null|string
         */
        public static function contentTypeFromPath( $filename, $safe = true ) {
index 6647de4..8203b40 100644 (file)
@@ -110,16 +110,16 @@ class StringUtils {
         * memory. The delimiters are literal strings, not regular expressions.
         *
         * If the start delimiter ends with an initial substring of the end delimiter,
-        * e.g. in the case of C-style comments, the behaviour differs from the model
+        * e.g. in the case of C-style comments, the behavior differs from the model
         * regex. In this implementation, the end must share no characters with the
         * start, so e.g. /*\/ is not considered to be both the start and end of a
         * comment. /*\/xy/*\/ is considered to be a single comment with contents /xy/.
         *
-        * @param $startDelim String: start delimiter
-        * @param $endDelim String: end delimiter
+        * @param string $startDelim start delimiter
+        * @param string $endDelim end delimiter
         * @param $callback Callback: function to call on each match
         * @param $subject String
-        * @param $flags String: regular expression flags
+        * @param string $flags regular expression flags
         * @throws MWException
         * @return string
         */
@@ -200,12 +200,12 @@ class StringUtils {
         *
         *   preg_replace( "!$startDelim(.*)$endDelim!$flags", $replace, $subject )
         *
-        * @param $startDelim String: start delimiter regular expression
-        * @param $endDelim String: end delimiter regular expression
-        * @param $replace String: replacement string. May contain $1, which will be
+        * @param string $startDelim start delimiter regular expression
+        * @param string $endDelim end delimiter regular expression
+        * @param string $replace replacement string. May contain $1, which will be
         *                 replaced by the text between the delimiters
-        * @param $subject String to search
-        * @param $flags String: regular expression flags
+        * @param string $subject to search
+        * @param string $flags regular expression flags
         * @return String: The string with the matches replaced
         */
        static function delimiterReplace( $startDelim, $endDelim, $replace, $subject, $flags = '' ) {
index 8a1e758..77c242f 100644 (file)
@@ -41,9 +41,9 @@ class StubObject {
        /**
         * Constructor.
         *
-        * @param $global String: name of the global variable.
-        * @param $class String: name of the class of the real object.
-        * @param $params Array: parameters to pass to contructor of the real
+        * @param string $global name of the global variable.
+        * @param string $class name of the class of the real object.
+        * @param array $params parameters to pass to contructor of the real
         *               object.
         */
        function __construct( $global = null, $class = null, $params = array() ) {
@@ -70,8 +70,8 @@ class StubObject {
         * This function will also call the function with the same name in the real
         * object.
         *
-        * @param $name String: name of the function called
-        * @param $args Array: arguments
+        * @param string $name name of the function called
+        * @param array $args arguments
         * @return mixed
         */
        function _call( $name, $args ) {
@@ -91,8 +91,8 @@ class StubObject {
         * Function called by PHP if no function with that name exists in this
         * object.
         *
-        * @param $name String: name of the function called
-        * @param $args Array: arguments
+        * @param string $name name of the function called
+        * @param array $args arguments
         * @return mixed
         */
        function __call( $name, $args ) {
@@ -105,7 +105,7 @@ class StubObject {
         * This is public, for the convenience of external callers wishing to access
         * properties, e.g. eval.php
         *
-        * @param $name String: name of the method called in this object.
+        * @param string $name name of the method called in this object.
         * @param $level Integer: level to go in the stact trace to get the function
         *               who called this function.
         * @throws MWException
index 3066ca9..1cf99a7 100644 (file)
@@ -72,7 +72,7 @@ class MWTimestamp {
         *
         * @since 1.20
         *
-        * @param $timestamp bool|string Timestamp to set, or false for current time
+        * @param bool|string $timestamp Timestamp to set, or false for current time
         */
        public function __construct( $timestamp = false ) {
                $this->setTimestamp( $timestamp );
@@ -86,7 +86,7 @@ class MWTimestamp {
         *
         * @since 1.20
         *
-        * @param $ts string|bool Timestamp to store, or false for now
+        * @param string|bool $ts Timestamp to store, or false for now
         * @throws TimestampException
         */
        public function setTimestamp( $ts = false ) {
@@ -159,7 +159,7 @@ class MWTimestamp {
         *
         * @since 1.20
         *
-        * @param $style int Constant Output format for timestamp
+        * @param int $style Constant Output format for timestamp
         * @throws TimestampException
         * @return string The formatted timestamp
         */
index b0a6a00..236afbd 100644 (file)
@@ -88,7 +88,6 @@ class Title {
        var $mHasSubpage;                 // /< Whether a page has any subpages
        // @}
 
-
        /**
         * Constructor
         */
@@ -97,7 +96,7 @@ class Title {
        /**
         * Create a new Title from a prefixed DB key
         *
-        * @param $key String the database key, which has underscores
+        * @param string $key the database key, which has underscores
         *      instead of spaces, possibly including namespace and
         *      interwiki prefixes
         * @return Title, or NULL on an error
@@ -116,9 +115,9 @@ class Title {
         * Create a new Title from text, such as what one would find in a link. De-
         * codes any HTML entities in the text.
         *
-        * @param $text String the link text; spaces, prefixes, and an
+        * @param string $text the link text; spaces, prefixes, and an
         *   initial ':' indicating the main namespace are accepted.
-        * @param $defaultNamespace Int the namespace to use if none is speci-
+        * @param int $defaultNamespace the namespace to use if none is speci-
         *   fied by a prefix.  If you want to force a specific namespace even if
         *   $text might begin with a namespace prefix, use makeTitle() or
         *   makeTitleSafe().
@@ -179,7 +178,7 @@ class Title {
         * Create a new Title from URL-encoded text. Ensures that
         * the given title's length does not exceed the maximum.
         *
-        * @param $url String the title, as might be taken from a URL
+        * @param string $url the title, as might be taken from a URL
         * @return Title the new object, or NULL on an error
         */
        public static function newFromURL( $url ) {
@@ -224,8 +223,8 @@ class Title {
        /**
         * Create a new Title from an article ID
         *
-        * @param $id Int the page_id corresponding to the Title to create
-        * @param $flags Int use Title::GAID_FOR_UPDATE to use master
+        * @param int $id the page_id corresponding to the Title to create
+        * @param int $flags use Title::GAID_FOR_UPDATE to use master
         * @return Title the new object, or NULL on an error
         */
        public static function newFromID( $id, $flags = 0 ) {
@@ -247,7 +246,7 @@ class Title {
        /**
         * Make an array of titles from an array of IDs
         *
-        * @param $ids Array of Int Array of IDs
+        * @param array $ids of Int Array of IDs
         * @return Array of Titles
         */
        public static function newFromIDs( $ids ) {
@@ -318,10 +317,10 @@ class Title {
         * For convenience, spaces are converted to underscores so that
         * eg user_text fields can be used directly.
         *
-        * @param $ns Int the namespace of the article
-        * @param $title String the unprefixed database key form
-        * @param $fragment String the link fragment (after the "#")
-        * @param $interwiki String the interwiki prefix
+        * @param int $ns the namespace of the article
+        * @param string $title the unprefixed database key form
+        * @param string $fragment the link fragment (after the "#")
+        * @param string $interwiki the interwiki prefix
         * @return Title the new object
         */
        public static function &makeTitle( $ns, $title, $fragment = '', $interwiki = '' ) {
@@ -342,10 +341,10 @@ class Title {
         * The parameters will be checked for validity, which is a bit slower
         * than makeTitle() but safer for user-provided data.
         *
-        * @param $ns Int the namespace of the article
-        * @param $title String database key form
-        * @param $fragment String the link fragment (after the "#")
-        * @param $interwiki String interwiki prefix
+        * @param int $ns the namespace of the article
+        * @param string $title database key form
+        * @param string $fragment the link fragment (after the "#")
+        * @param string $interwiki interwiki prefix
         * @return Title the new object, or NULL on an error
         */
        public static function makeTitleSafe( $ns, $title, $fragment = '', $interwiki = '' ) {
@@ -382,7 +381,7 @@ class Title {
         * This will only return the very next target, useful for
         * the redirect table and other checks that don't need full recursion
         *
-        * @param $text String: Text with possible redirect
+        * @param string $text Text with possible redirect
         * @return Title: The corresponding Title
         * @deprecated since 1.21, use Content::getRedirectTarget instead.
         */
@@ -399,7 +398,7 @@ class Title {
         * This will recurse down $wgMaxRedirects times or until a non-redirect target is hit
         * in order to provide (hopefully) the Title of the final destination instead of another redirect
         *
-        * @param $text String Text with possible redirect
+        * @param string $text Text with possible redirect
         * @return Title
         * @deprecated since 1.21, use Content::getUltimateRedirectTarget instead.
         */
@@ -416,7 +415,7 @@ class Title {
         * The last element in the array is the final destination after all redirects
         * have been resolved (up to $wgMaxRedirects times)
         *
-        * @param $text String Text with possible redirect
+        * @param string $text Text with possible redirect
         * @return Array of Titles, with the destination last
         * @deprecated since 1.21, use Content::getRedirectChain instead.
         */
@@ -430,7 +429,7 @@ class Title {
        /**
         * Get the prefixed DB key associated with an ID
         *
-        * @param $id Int the page_id of the article
+        * @param int $id the page_id of the article
         * @return Title an object representing the article, or NULL if no such article was found
         */
        public static function nameOf( $id ) {
@@ -491,8 +490,8 @@ class Title {
         * Get a string representation of a title suitable for
         * including in a search index
         *
-        * @param $ns Int a namespace index
-        * @param $title String text-form main part
+        * @param int $ns a namespace index
+        * @param string $title text-form main part
         * @return String a stripped-down title string ready for the search index
         */
        public static function indexTitle( $ns, $title ) {
@@ -518,10 +517,10 @@ class Title {
        /**
         * Make a prefixed DB key from a DB key and a namespace index
         *
-        * @param $ns Int numerical representation of the namespace
-        * @param $title String the DB key form the title
-        * @param $fragment String The link fragment (after the "#")
-        * @param $interwiki String The interwiki prefix
+        * @param int $ns numerical representation of the namespace
+        * @param string $title the DB key form the title
+        * @param string $fragment The link fragment (after the "#")
+        * @param string $interwiki The interwiki prefix
         * @return String the prefixed form of the title
         */
        public static function makeName( $ns, $title, $fragment = '', $interwiki = '' ) {
@@ -541,7 +540,7 @@ class Title {
        /**
         * Escape a text fragment, say from a link, for a URL
         *
-        * @param $fragment string containing a URL or link fragment (after the "#")
+        * @param string $fragment containing a URL or link fragment (after the "#")
         * @return String: escaped string
         */
        static function escapeFragmentForURL( $fragment ) {
@@ -699,7 +698,7 @@ class Title {
        /**
         * Convenience method for checking a title's content model name
         *
-        * @param String $id The content model ID (use the CONTENT_MODEL_XXX constants).
+        * @param string $id The content model ID (use the CONTENT_MODEL_XXX constants).
         * @return Boolean true if $this->getContentModel() == $id
         */
        public function hasContentModel( $id ) {
@@ -795,7 +794,7 @@ class Title {
        /**
         * Returns true if this title resolves to the named special page
         *
-        * @param $name String The special page name
+        * @param string $name The special page name
         * @return boolean
         */
        public function isSpecial( $name ) {
@@ -833,7 +832,7 @@ class Title {
         * Please make use of this instead of comparing to getNamespace()
         * This function is much more resistant to changes we may make
         * to namespaces than code that makes direct comparisons.
-        * @param $ns int The namespace
+        * @param int $ns The namespace
         * @return bool
         * @since 1.19
         */
@@ -1103,7 +1102,7 @@ class Title {
         * Deprecated for public use, use Title::makeTitle() with fragment parameter.
         * Still in active use privately.
         *
-        * @param $fragment String text
+        * @param string $fragment text
         */
        public function setFragment( $fragment ) {
                $this->mFragment = str_replace( '_', ' ', substr( $fragment, 1 ) );
@@ -1113,7 +1112,7 @@ class Title {
         * Prefix some arbitrary text with the namespace or interwiki prefix
         * of this object
         *
-        * @param $name String the text
+        * @param string $name the text
         * @return String the prefixed text
         * @private
         */
@@ -1284,7 +1283,7 @@ class Title {
         * # returns: Title{User:Foo/Bar/Baz/Asdf}
         * @endcode
         *
-        * @param $text String The subpage name to add to the title
+        * @param string $text The subpage name to add to the title
         * @return Title Subpage title
         * @since 1.20
         */
@@ -1400,7 +1399,7 @@ class Title {
         * with action=render, $wgServer is prepended.
         *
 
-        * @param $query string|array an optional query string,
+        * @param string|array $query an optional query string,
         *   not used for interwiki links. Can be specified as an associative array as well,
         *   e.g., array( 'action' => 'edit' ) (keys and values will be URL-escaped).
         *   Some query patterns will trigger various shorturl path replacements.
@@ -1665,7 +1664,7 @@ class Title {
         *
         * May provide false positives, but should never provide a false negative.
         *
-        * @param $action String action that permission needs to be checked for
+        * @param string $action action that permission needs to be checked for
         * @param $user User to check (since 1.19); $wgUser will be used if not
         *              provided.
         * @return Bool
@@ -1677,10 +1676,10 @@ class Title {
        /**
         * Can $user perform $action on this page?
         *
-        * @param $action String action that permission needs to be checked for
+        * @param string $action action that permission needs to be checked for
         * @param $user User to check (since 1.19); $wgUser will be used if not
         *   provided.
-        * @param $doExpensiveQueries Bool Set this to false to avoid doing
+        * @param bool $doExpensiveQueries Set this to false to avoid doing
         *   unnecessary queries.
         * @return Bool
         */
@@ -1697,11 +1696,11 @@ class Title {
         *
         * @todo FIXME: This *does not* check throttles (User::pingLimiter()).
         *
-        * @param $action String action that permission needs to be checked for
+        * @param string $action action that permission needs to be checked for
         * @param $user User to check
-        * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary
+        * @param bool $doExpensiveQueries Set this to false to avoid doing unnecessary
         *   queries by skipping checks for cascading protections and user blocks.
-        * @param $ignoreErrors Array of Strings Set this to a list of message keys
+        * @param array $ignoreErrors of Strings Set this to a list of message keys
         *   whose corresponding errors may be ignored.
         * @return Array of arguments to wfMessage to explain permissions problems.
         */
@@ -1723,9 +1722,9 @@ class Title {
        /**
         * Permissions checks that fail most often, and which are easiest to test.
         *
-        * @param $action String the action to check
+        * @param string $action the action to check
         * @param $user User user to check
-        * @param $errors Array list of current errors
+        * @param array $errors list of current errors
         * @param $doExpensiveQueries Boolean whether or not to perform expensive queries
         * @param $short Boolean short circuit on first error
         *
@@ -1781,7 +1780,7 @@ class Title {
        /**
         * Add the resulting error code to the errors array
         *
-        * @param $errors Array list of current errors
+        * @param array $errors list of current errors
         * @param $result Mixed result of errors
         *
         * @return Array list of errors
@@ -1806,9 +1805,9 @@ class Title {
        /**
         * Check various permission hooks
         *
-        * @param $action String the action to check
+        * @param string $action the action to check
         * @param $user User user to check
-        * @param $errors Array list of current errors
+        * @param array $errors list of current errors
         * @param $doExpensiveQueries Boolean whether or not to perform expensive queries
         * @param $short Boolean short circuit on first error
         *
@@ -1839,9 +1838,9 @@ class Title {
        /**
         * Check permissions on special pages & namespaces
         *
-        * @param $action String the action to check
+        * @param string $action the action to check
         * @param $user User user to check
-        * @param $errors Array list of current errors
+        * @param array $errors list of current errors
         * @param $doExpensiveQueries Boolean whether or not to perform expensive queries
         * @param $short Boolean short circuit on first error
         *
@@ -1868,9 +1867,9 @@ class Title {
        /**
         * Check CSS/JS sub-page permissions
         *
-        * @param $action String the action to check
+        * @param string $action the action to check
         * @param $user User user to check
-        * @param $errors Array list of current errors
+        * @param array $errors list of current errors
         * @param $doExpensiveQueries Boolean whether or not to perform expensive queries
         * @param $short Boolean short circuit on first error
         *
@@ -1897,9 +1896,9 @@ class Title {
         * page. The user must possess all required rights for this
         * action.
         *
-        * @param $action String the action to check
+        * @param string $action the action to check
         * @param $user User user to check
-        * @param $errors Array list of current errors
+        * @param array $errors list of current errors
         * @param $doExpensiveQueries Boolean whether or not to perform expensive queries
         * @param $short Boolean short circuit on first error
         *
@@ -1928,9 +1927,9 @@ class Title {
        /**
         * Check restrictions on cascading pages.
         *
-        * @param $action String the action to check
+        * @param string $action the action to check
         * @param $user User to check
-        * @param $errors Array list of current errors
+        * @param array $errors list of current errors
         * @param $doExpensiveQueries Boolean whether or not to perform expensive queries
         * @param $short Boolean short circuit on first error
         *
@@ -1967,9 +1966,9 @@ class Title {
        /**
         * Check action permissions not already checked in checkQuickPermissions
         *
-        * @param $action String the action to check
+        * @param string $action the action to check
         * @param $user User to check
-        * @param $errors Array list of current errors
+        * @param array $errors list of current errors
         * @param $doExpensiveQueries Boolean whether or not to perform expensive queries
         * @param $short Boolean short circuit on first error
         *
@@ -2023,9 +2022,9 @@ class Title {
        /**
         * Check that the user isn't blocked from editting.
         *
-        * @param $action String the action to check
+        * @param string $action the action to check
         * @param $user User to check
-        * @param $errors Array list of current errors
+        * @param array $errors list of current errors
         * @param $doExpensiveQueries Boolean whether or not to perform expensive queries
         * @param $short Boolean short circuit on first error
         *
@@ -2088,9 +2087,9 @@ class Title {
        /**
         * Check that the user is allowed to read this page.
         *
-        * @param $action String the action to check
+        * @param string $action the action to check
         * @param $user User to check
-        * @param $errors Array list of current errors
+        * @param array $errors list of current errors
         * @param $doExpensiveQueries Boolean whether or not to perform expensive queries
         * @param $short Boolean short circuit on first error
         *
@@ -2191,7 +2190,7 @@ class Title {
         * Get a description array when the user doesn't have the right to perform
         * $action (i.e. when User::isAllowed() returns false)
         *
-        * @param $action String the action to check
+        * @param string $action the action to check
         * @param $short Boolean short circuit on first error
         * @return Array list of errors
         */
@@ -2221,10 +2220,10 @@ class Title {
         * which checks ONLY that previously checked by userCan (i.e. it leaves out
         * checks on wfReadOnly() and blocks)
         *
-        * @param $action String action that permission needs to be checked for
+        * @param string $action action that permission needs to be checked for
         * @param $user User to check
-        * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary queries.
-        * @param $short Bool Set this to true to stop after the first permission error.
+        * @param bool $doExpensiveQueries Set this to false to avoid doing unnecessary queries.
+        * @param bool $short Set this to true to stop after the first permission error.
         * @return Array of arrays of the arguments to wfMessage to explain permissions problems.
         */
        protected function getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries = true, $short = false ) {
@@ -2373,8 +2372,8 @@ class Title {
         *
         * @deprecated in 1.19; will be removed in 1.20. Use WikiPage::doUpdateRestrictions() instead.
         * @param $create_perm String Permission required for creation
-        * @param $reason String Reason for protection
-        * @param $expiry String Expiry timestamp
+        * @param string $reason Reason for protection
+        * @param string $expiry Expiry timestamp
         * @return boolean true
         */
        public function updateTitleProtection( $create_perm, $reason, $expiry ) {
@@ -2409,7 +2408,7 @@ class Title {
        /**
         * Is this page "semi-protected" - the *only* protection is autoconfirm?
         *
-        * @param $action String Action to check (default: edit)
+        * @param string $action Action to check (default: edit)
         * @return Bool
         */
        public function isSemiProtected( $action = 'edit' ) {
@@ -2435,7 +2434,7 @@ class Title {
        /**
         * Does the title correspond to a protected article?
         *
-        * @param $action String the action the page is protected from,
+        * @param string $action the action the page is protected from,
         * by default checks all actions.
         * @return Bool
         */
@@ -2497,7 +2496,7 @@ class Title {
        /**
         * Cascading protection: Get the source of any cascading restrictions on this page.
         *
-        * @param $getPages Bool Whether or not to retrieve the actual pages
+        * @param bool $getPages Whether or not to retrieve the actual pages
         *        that the restrictions have come from.
         * @return Mixed Array of Title objects of the pages from which cascading restrictions
         *     have come, false for none, or true if such restrictions exist, but $getPages
@@ -2597,7 +2596,7 @@ class Title {
        /**
         * Accessor/initialisation for mRestrictions
         *
-        * @param $action String action that permission needs to be checked for
+        * @param string $action action that permission needs to be checked for
         * @return Array of Strings the array of groups allowed to edit this article
         */
        public function getRestrictions( $action ) {
@@ -2640,7 +2639,7 @@ class Title {
         * Loads a string into mRestrictions array
         *
         * @param $res Resource restrictions as an SQL result.
-        * @param $oldFashionedRestrictions String comma-separated list of page
+        * @param string $oldFashionedRestrictions comma-separated list of page
         *        restrictions from page table (pre 1.10)
         */
        private function loadRestrictionsFromResultWrapper( $res, $oldFashionedRestrictions = null ) {
@@ -2658,8 +2657,8 @@ class Title {
         * and page_restrictions table for this existing page.
         * Public for usage by LiquidThreads.
         *
-        * @param $rows array of db result objects
-        * @param $oldFashionedRestrictions string comma-separated list of page
+        * @param array $rows of db result objects
+        * @param string $oldFashionedRestrictions comma-separated list of page
         *        restrictions from page table (pre 1.10)
         */
        public function loadRestrictionsFromRows( $rows, $oldFashionedRestrictions = null ) {
@@ -2741,7 +2740,7 @@ class Title {
        /**
         * Load restrictions from the page_restrictions table
         *
-        * @param $oldFashionedRestrictions String comma-separated list of page
+        * @param string $oldFashionedRestrictions comma-separated list of page
         *        restrictions from page table (pre 1.10)
         */
        public function loadRestrictions( $oldFashionedRestrictions = null ) {
@@ -2841,7 +2840,7 @@ class Title {
        /**
         * Get all subpages of this page.
         *
-        * @param $limit Int maximum number of subpages to fetch; -1 for no limit
+        * @param int $limit maximum number of subpages to fetch; -1 for no limit
         * @return mixed TitleArray, or empty array if this page's namespace
         *  doesn't allow subpages
         */
@@ -2919,7 +2918,7 @@ class Title {
         * Get the article ID for this Title from the link cache,
         * adding it if necessary
         *
-        * @param $flags Int a bit field; may be Title::GAID_FOR_UPDATE to select
+        * @param int $flags a bit field; may be Title::GAID_FOR_UPDATE to select
         *  for update
         * @return Int the ID
         */
@@ -2945,7 +2944,7 @@ class Title {
         * Is this an article that is a redirect page?
         * Uses link cache, adding it if necessary
         *
-        * @param $flags Int a bit field; may be Title::GAID_FOR_UPDATE to select for update
+        * @param int $flags a bit field; may be Title::GAID_FOR_UPDATE to select for update
         * @return Bool
         */
        public function isRedirect( $flags = 0 ) {
@@ -2975,7 +2974,7 @@ class Title {
         * What is the length of this page?
         * Uses link cache, adding it if necessary
         *
-        * @param $flags Int a bit field; may be Title::GAID_FOR_UPDATE to select for update
+        * @param int $flags a bit field; may be Title::GAID_FOR_UPDATE to select for update
         * @return Int
         */
        public function getLength( $flags = 0 ) {
@@ -3004,7 +3003,7 @@ class Title {
        /**
         * What is the page_latest field for this page?
         *
-        * @param $flags Int a bit field; may be Title::GAID_FOR_UPDATE to select for update
+        * @param int $flags a bit field; may be Title::GAID_FOR_UPDATE to select for update
         * @throws MWException
         * @return Int or 0 if the page doesn't exist
         */
@@ -3039,7 +3038,7 @@ class Title {
         * loading of the new page_id. It's also called from
         * WikiPage::doDeleteArticleReal()
         *
-        * @param $newid Int the new Article ID
+        * @param int $newid the new Article ID
         */
        public function resetArticleID( $newid ) {
                $linkCache = LinkCache::singleton();
@@ -3062,8 +3061,8 @@ class Title {
        /**
         * Capitalize a text string for a title if it belongs to a namespace that capitalizes
         *
-        * @param $text String containing title to capitalize
-        * @param $ns int namespace index, defaults to NS_MAIN
+        * @param string $text containing title to capitalize
+        * @param int $ns namespace index, defaults to NS_MAIN
         * @return String containing capitalized title
         */
        public static function capitalize( $text, $ns = NS_MAIN ) {
@@ -3212,10 +3211,10 @@ class Title {
                        strpos( $dbkey, '.' ) !== false &&
                        (
                                $dbkey === '.' || $dbkey === '..' ||
-                               strpos( $dbkey, './' ) === 0  ||
+                               strpos( $dbkey, './' ) === 0 ||
                                strpos( $dbkey, '../' ) === 0 ||
                                strpos( $dbkey, '/./' ) !== false ||
-                               strpos( $dbkey, '/../' ) !== false  ||
+                               strpos( $dbkey, '/../' ) !== false ||
                                substr( $dbkey, -2 ) == '/.' ||
                                substr( $dbkey, -3 ) == '/..'
                        )
@@ -3284,9 +3283,9 @@ class Title {
         * WARNING: do not use this function on arbitrary user-supplied titles!
         * On heavily-used templates it will max out the memory.
         *
-        * @param $options Array: may be FOR UPDATE
-        * @param $table String: table name
-        * @param $prefix String: fields prefix
+        * @param array $options may be FOR UPDATE
+        * @param string $table table name
+        * @param string $prefix fields prefix
         * @return Array of Title objects linking here
         */
        public function getLinksTo( $options = array(), $table = 'pagelinks', $prefix = 'pl' ) {
@@ -3328,7 +3327,7 @@ class Title {
         * WARNING: do not use this function on arbitrary user-supplied titles!
         * On heavily-used templates it will max out the memory.
         *
-        * @param $options Array: may be FOR UPDATE
+        * @param array $options may be FOR UPDATE
         * @return Array of Title the Title objects linking here
         */
        public function getTemplateLinksTo( $options = array() ) {
@@ -3342,9 +3341,9 @@ class Title {
         * WARNING: do not use this function on arbitrary user-supplied titles!
         * On heavily-used templates it will max out the memory.
         *
-        * @param $options Array: may be FOR UPDATE
-        * @param $table String: table name
-        * @param $prefix String: fields prefix
+        * @param array $options may be FOR UPDATE
+        * @param string $table table name
+        * @param string $prefix fields prefix
         * @return Array of Title objects linking here
         */
        public function getLinksFrom( $options = array(), $table = 'pagelinks', $prefix = 'pl' ) {
@@ -3403,7 +3402,7 @@ class Title {
         * WARNING: do not use this function on arbitrary user-supplied titles!
         * On heavily-used templates it will max out the memory.
         *
-        * @param $options Array: may be FOR UPDATE
+        * @param array $options may be FOR UPDATE
         * @return Array of Title the Title objects used here
         */
        public function getTemplateLinksFrom( $options = array() ) {
@@ -3446,7 +3445,6 @@ class Title {
                return $retVal;
        }
 
-
        /**
         * Get a list of URLs to purge from the Squid cache when this
         * page changes
@@ -3497,9 +3495,9 @@ class Title {
         * Returns true if ok, or a getUserPermissionsErrors()-like array otherwise
         *
         * @param $nt Title the new title
-        * @param $auth Bool indicates whether $wgUser's permissions
+        * @param bool $auth indicates whether $wgUser's permissions
         *  should be checked
-        * @param $reason String is the log summary of the move, used for spam checking
+        * @param string $reason is the log summary of the move, used for spam checking
         * @return Mixed True on success, getUserPermissionsErrors()-like array on failure
         */
        public function isValidMoveOperation( &$nt, $auth = true, $reason = '' ) {
@@ -3641,10 +3639,10 @@ class Title {
         * Move a title to a new location
         *
         * @param $nt Title the new title
-        * @param $auth Bool indicates whether $wgUser's permissions
+        * @param bool $auth indicates whether $wgUser's permissions
         *  should be checked
-        * @param $reason String the reason for the move
-        * @param $createRedirect Bool Whether to create a redirect from the old title to the new title.
+        * @param string $reason the reason for the move
+        * @param bool $createRedirect Whether to create a redirect from the old title to the new title.
         *  Ignored if the user doesn't have the suppressredirect right.
         * @return Mixed true on success, getUserPermissionsErrors()-like array on failure
         */
@@ -3759,8 +3757,8 @@ class Title {
         * source page or nonexistent
         *
         * @param $nt Title the page to move to, which should be a redirect or nonexistent
-        * @param $reason String The reason for the move
-        * @param $createRedirect Bool Whether to leave a redirect at the old title. Does not check
+        * @param string $reason The reason for the move
+        * @param bool $createRedirect Whether to leave a redirect at the old title. Does not check
         *   if the user has the suppressredirect right
         * @throws MWException
         */
@@ -3883,9 +3881,9 @@ class Title {
         * Move this page's subpages to be subpages of $nt
         *
         * @param $nt Title Move target
-        * @param $auth bool Whether $wgUser's permissions should be checked
-        * @param $reason string The reason for the move
-        * @param $createRedirect bool Whether to create redirects from the old subpages to
+        * @param bool $auth Whether $wgUser's permissions should be checked
+        * @param string $reason The reason for the move
+        * @param bool $createRedirect Whether to create redirects from the old subpages to
         *     the new ones Ignored if the user doesn't have the 'suppressredirect' right
         * @return mixed array with old page titles as keys, and strings (new page titles) or
         *     arrays (errors) as values, or an error array with numeric indices if no pages
@@ -4082,7 +4080,7 @@ class Title {
        /**
         * Get a tree of parent categories
         *
-        * @param $children Array with the children in the keys, to check for circular refs
+        * @param array $children with the children in the keys, to check for circular refs
         * @return Array Tree of parent categories
         */
        public function getParentCategoryTree( $children = array() ) {
@@ -4124,8 +4122,8 @@ class Title {
        /**
         * Get the revision ID of the previous revision
         *
-        * @param $revId Int Revision ID. Get the revision that was before this one.
-        * @param $flags Int Title::GAID_FOR_UPDATE
+        * @param int $revId Revision ID. Get the revision that was before this one.
+        * @param int $flags Title::GAID_FOR_UPDATE
         * @return Int|Bool Old revision ID, or FALSE if none exists
         */
        public function getPreviousRevisionID( $revId, $flags = 0 ) {
@@ -4149,8 +4147,8 @@ class Title {
        /**
         * Get the revision ID of the next revision
         *
-        * @param $revId Int Revision ID. Get the revision that was after this one.
-        * @param $flags Int Title::GAID_FOR_UPDATE
+        * @param int $revId Revision ID. Get the revision that was after this one.
+        * @param int $flags Title::GAID_FOR_UPDATE
         * @return Int|Bool Next revision ID, or FALSE if none exists
         */
        public function getNextRevisionID( $revId, $flags = 0 ) {
@@ -4174,7 +4172,7 @@ class Title {
        /**
         * Get the first revision of the page
         *
-        * @param $flags Int Title::GAID_FOR_UPDATE
+        * @param int $flags Title::GAID_FOR_UPDATE
         * @return Revision|Null if page doesn't exist
         */
        public function getFirstRevision( $flags = 0 ) {
@@ -4196,7 +4194,7 @@ class Title {
        /**
         * Get the oldest revision timestamp of this page
         *
-        * @param $flags Int Title::GAID_FOR_UPDATE
+        * @param int $flags Title::GAID_FOR_UPDATE
         * @return String: MW timestamp
         */
        public function getEarliestRevTime( $flags = 0 ) {
@@ -4253,8 +4251,8 @@ class Title {
         * Get the number of revisions between the given revision.
         * Used for diffs and other things that really need it.
         *
-        * @param $old int|Revision Old revision or rev ID (first before range)
-        * @param $new int|Revision New revision or rev ID (first after range)
+        * @param int|Revision $old Old revision or rev ID (first before range)
+        * @param int|Revision $new New revision or rev ID (first after range)
         * @return Int Number of revisions between these revisions.
         */
        public function countRevisionsBetween( $old, $new ) {
@@ -4282,10 +4280,10 @@ class Title {
         * Get the number of authors between the given revisions or revision IDs.
         * Used for diffs and other things that really need it.
         *
-        * @param $old int|Revision Old revision or rev ID (first before range by default)
-        * @param $new int|Revision New revision or rev ID (first after range by default)
-        * @param $limit int Maximum number of authors
-        * @param $options string|array (Optional): Single option, or an array of options:
+        * @param int|Revision $old Old revision or rev ID (first before range by default)
+        * @param int|Revision $new New revision or rev ID (first after range by default)
+        * @param int $limit Maximum number of authors
+        * @param string|array $options (Optional): Single option, or an array of options:
         *     'include_old' Include $old in the range; $new is excluded.
         *     'include_new' Include $new in the range; $old is excluded.
         *     'include_both' Include both $old and $new in the range.
@@ -4397,7 +4395,7 @@ class Title {
                $isKnown = null;
 
                /**
-                * Allows overriding default behaviour for determining if a page exists.
+                * Allows overriding default behavior for determining if a page exists.
                 * If $isKnown is kept as null, regular checks happen. If it's
                 * a boolean, this value is returned by the isKnown method.
                 *
@@ -4466,7 +4464,7 @@ class Title {
                        // Use always content language to avoid loading hundreds of languages
                        // to get the link color.
                        global $wgContLang;
-                       list( $name, $lang ) = MessageCache::singleton()->figureMessage( $wgContLang->lcfirst( $this->getText() ) );
+                       list( $name, ) = MessageCache::singleton()->figureMessage( $wgContLang->lcfirst( $this->getText() ) );
                        $message = wfMessage( $name )->inLanguage( $wgContLang )->useDatabase( false );
                        return $message->exists();
                }
@@ -4593,7 +4591,7 @@ class Title {
        /**
         * Generate strings used for xml 'id' names in monobook tabs
         *
-        * @param $prepend string defaults to 'nstab-'
+        * @param string $prepend defaults to 'nstab-'
         * @return String XML 'id' name
         */
        public function getNamespaceKey( $prepend = 'nstab-' ) {
@@ -4624,7 +4622,7 @@ class Title {
        /**
         * Get all extant redirects to this Title
         *
-        * @param $ns Int|Null Single namespace to consider; NULL to consider all namespaces
+        * @param int|Null $ns Single namespace to consider; NULL to consider all namespaces
         * @return Array of Title redirects to this title
         */
        public function getRedirectsHere( $ns = null ) {
@@ -4710,7 +4708,7 @@ class Title {
         * prefix.  This will be fed to Collation::getSortKey() to get a
         * binary sortkey that can be used for actual sorting.
         *
-        * @param $prefix string The prefix to be used, specified using
+        * @param string $prefix The prefix to be used, specified using
         *   {{defaultsort:}} or like [[Category:Foo|prefix]].  Empty for no
         *   prefix.
         * @return string
index 99642b7..816c3b8 100644 (file)
@@ -110,7 +110,7 @@ class UIDGenerator {
        }
 
        /**
-        * @param $time array (UIDGenerator::millitime(), clock sequence)
+        * @param array $time (UIDGenerator::millitime(), clock sequence)
         * @return string 88 bits
         */
        protected function getTimestampedID88( array $info ) {
@@ -152,7 +152,7 @@ class UIDGenerator {
        }
 
        /**
-        * @param $info array (UIDGenerator::milltime(), counter, clock sequence)
+        * @param array $info (UIDGenerator::milltime(), counter, clock sequence)
         * @return string 128 bits
         */
        protected function getTimestampedID128( array $info ) {
@@ -214,7 +214,7 @@ class UIDGenerator {
         * than any previous (time,counter) value for the given clock sequence.
         * This is useful for making UIDs sequential on a per-node bases.
         *
-        * @param $lockFile string Name of a local lock file
+        * @param string $lockFile Name of a local lock file
         * @param $clockSeqSize integer The number of possible clock sequence values
         * @param $counterSize integer The number of possible counter values
         * @return Array (result of UIDGenerator::millitime(), counter, clock sequence)
@@ -295,7 +295,7 @@ class UIDGenerator {
         * Wait till the current timestamp reaches $time and return the current
         * timestamp. This returns false if it would have to wait more than 10ms.
         *
-        * @param $time array Result of UIDGenerator::millitime()
+        * @param array $time Result of UIDGenerator::millitime()
         * @return Array|bool UIDGenerator::millitime() result or false
         */
        protected function timeWaitUntil( array $time ) {
@@ -310,7 +310,7 @@ class UIDGenerator {
        }
 
        /**
-        * @param $time array Result of UIDGenerator::millitime()
+        * @param array $time Result of UIDGenerator::millitime()
         * @return string 46 MSBs of "milliseconds since epoch" in binary (rolls over in 4201)
         */
        protected function millisecondsSinceEpochBinary( array $time ) {
index 2263cae..047ba25 100644 (file)
@@ -369,8 +369,8 @@ class User {
         * This is slightly less efficient than newFromId(), so use newFromId() if
         * you have both an ID and a name handy.
         *
-        * @param $name String Username, validated by Title::newFromText()
-        * @param $validate String|Bool Validate username. Takes the same parameters as
+        * @param string $name Username, validated by Title::newFromText()
+        * @param string|Bool $validate Validate username. Takes the same parameters as
         *    User::getCanonicalName(), except that true is accepted as an alias
         *    for 'valid', for BC.
         *
@@ -399,7 +399,7 @@ class User {
        /**
         * Static factory method for creation from a given user ID.
         *
-        * @param $id Int Valid user ID
+        * @param int $id Valid user ID
         * @return User The corresponding User object
         */
        public static function newFromId( $id ) {
@@ -417,7 +417,7 @@ class User {
         *
         * If the code is invalid or has expired, returns NULL.
         *
-        * @param $code String Confirmation code
+        * @param string $code Confirmation code
         * @return User object, or null
         */
        public static function newFromConfirmationCode( $code ) {
@@ -458,8 +458,8 @@ class User {
         * user_name and user_real_name are not provided because the whole row
         * will be loaded once more from the database when accessing them.
         *
-        * @param $row Array A row from the user table
-        * @param $data Array Further data to load into the object (see User::loadFromRow for valid keys)
+        * @param array $row A row from the user table
+        * @param array $data Further data to load into the object (see User::loadFromRow for valid keys)
         * @return User
         */
        public static function newFromRow( $row, $data = null ) {
@@ -472,7 +472,7 @@ class User {
 
        /**
         * Get the username corresponding to a given user ID
-        * @param $id Int User ID
+        * @param int $id User ID
         * @return String|bool The corresponding username
         */
        public static function whoIs( $id ) {
@@ -482,7 +482,7 @@ class User {
        /**
         * Get the real name of a user given their user ID
         *
-        * @param $id Int User ID
+        * @param int $id User ID
         * @return String|bool The corresponding user's real name
         */
        public static function whoIsReal( $id ) {
@@ -491,7 +491,7 @@ class User {
 
        /**
         * Get database id given a user name
-        * @param $name String Username
+        * @param string $name Username
         * @return Int|Null The corresponding user's ID, or null if user is nonexistent
         */
        public static function idFromName( $name ) {
@@ -543,7 +543,7 @@ class User {
         * addresses like this, if we allowed accounts like this to be created
         * new users could get the old edits of these anonymous users.
         *
-        * @param $name String to match
+        * @param string $name to match
         * @return Bool
         */
        public static function isIP( $name ) {
@@ -558,7 +558,7 @@ class User {
         * is longer than the maximum allowed username size or doesn't begin with
         * a capital letter.
         *
-        * @param $name String to match
+        * @param string $name to match
         * @return Bool
         */
        public static function isValidUserName( $name ) {
@@ -574,7 +574,6 @@ class User {
                        return false;
                }
 
-
                // Ensure that the name can't be misresolved as a different title,
                // such as with extra namespace keys at the start.
                $parsed = Title::newFromText( $name );
@@ -613,7 +612,7 @@ class User {
         * If an account already exists in this form, login will be blocked
         * by a failure to pass this function.
         *
-        * @param $name String to match
+        * @param string $name to match
         * @return Bool
         */
        public static function isUsableName( $name ) {
@@ -650,7 +649,7 @@ class User {
         * Additional blacklisting may be added here rather than in
         * isValidUserName() to avoid disrupting existing accounts.
         *
-        * @param $name String to match
+        * @param string $name to match
         * @return Bool
         */
        public static function isCreatableName( $name ) {
@@ -680,7 +679,7 @@ class User {
        /**
         * Is the input a valid password for this user?
         *
-        * @param $password String Desired password
+        * @param string $password Desired password
         * @return Bool
         */
        public function isValidPassword( $password ) {
@@ -691,7 +690,7 @@ class User {
        /**
         * Given unvalidated password input, return error message on failure.
         *
-        * @param $password String Desired password
+        * @param string $password Desired password
         * @return mixed: true on success, string or array of error message on failure
         */
        public function getPasswordValidity( $password ) {
@@ -751,7 +750,7 @@ class User {
         * to be liberal enough for wide use. Some invalid addresses will still
         * pass validation here.
         *
-        * @param $addr String E-mail address
+        * @param string $addr E-mail address
         * @return Bool
         * @deprecated since 1.18 call Sanitizer::isValidEmail() directly
         */
@@ -763,8 +762,8 @@ class User {
        /**
         * Given unvalidated user input, return a canonical username, or false if
         * the username is invalid.
-        * @param $name String User input
-        * @param $validate String|Bool type of validation to use:
+        * @param string $name User input
+        * @param string|Bool $validate type of validation to use:
         *                - false        No validation
         *                - 'valid'      Valid for batch processes
         *                - 'usable'     Valid for batch processes and login
@@ -823,7 +822,7 @@ class User {
        /**
         * Count the number of edits of a user
         *
-        * @param $uid Int User ID to check
+        * @param int $uid User ID to check
         * @return Int the user's edit count
         *
         * @deprecated since 1.21 in favour of User::getEditCount
@@ -857,7 +856,7 @@ class User {
         * @note This no longer clears uncached lazy-initialised properties;
         *       the constructor does that instead.
         *
-        * @param $name string
+        * @param $name string|bool
         */
        public function loadDefaults( $name = false ) {
                wfProfileIn( __METHOD__ );
@@ -893,11 +892,11 @@ class User {
        /**
         * Return whether an item has been loaded.
         *
-        * @param $item String: item to check. Current possibilities:
+        * @param string $item item to check. Current possibilities:
         *              - id
         *              - name
         *              - realname
-        * @param $all String: 'all' to check if the whole object has been loaded
+        * @param string $all 'all' to check if the whole object has been loaded
         *        or any other string to check if only the item is available (e.g.
         *        for optimisation)
         * @return Boolean
@@ -1043,8 +1042,8 @@ class User {
        /**
         * Initialize this object from a row from the user table.
         *
-        * @param $row Array Row from the user table to load.
-        * @param $data Array Further user data to load into the object
+        * @param array $row Row from the user table to load.
+        * @param array $data Further user data to load into the object
         *
         *      user_groups             Array with groups out of the user_groups table
         *      user_properties         Array with properties out of the user_properties table
@@ -1157,7 +1156,7 @@ class User {
         *   will not be re-added automatically. The user will also not lose the
         *   group if they no longer meet the criteria.
         *
-        * @param $event String key in $wgAutopromoteOnce (each one has groups/criteria)
+        * @param string $event key in $wgAutopromoteOnce (each one has groups/criteria)
         *
         * @return array Array of groups the user has been promoted to.
         *
@@ -1196,7 +1195,7 @@ class User {
         * Clear various cached data stored in this object. The cache of the user table
         * data (i.e. self::$mCacheVars) is not cleared unless $reloadFrom is given.
         *
-        * @param $reloadFrom bool|String Reload user and user_groups table data from a
+        * @param bool|String $reloadFrom Reload user and user_groups table data from a
         *   given source. May be "name", "id", "defaults", "session", or false for
         *   no reload.
         */
@@ -1253,7 +1252,7 @@ class User {
        /**
         * Get a given default option value.
         *
-        * @param $opt String Name of option to retrieve
+        * @param string $opt Name of option to retrieve
         * @return String Default option value
         */
        public static function getDefaultOption( $opt ) {
@@ -1265,10 +1264,9 @@ class User {
                }
        }
 
-
        /**
         * Get blocking information
-        * @param $bFromSlave Bool Whether to check the slave database first. To
+        * @param bool $bFromSlave Whether to check the slave database first. To
         *                    improve performance, non-critical checks are done
         *                    against slaves. Check when actually saving should be
         *                    done against master.
@@ -1342,8 +1340,8 @@ class User {
        /**
         * Whether the given IP is in a DNS blacklist.
         *
-        * @param $ip String IP to check
-        * @param $checkWhitelist Bool: whether to check the whitelist first
+        * @param string $ip IP to check
+        * @param bool $checkWhitelist whether to check the whitelist first
         * @return Bool True if blacklisted.
         */
        public function isDnsBlacklisted( $ip, $checkWhitelist = false ) {
@@ -1363,8 +1361,8 @@ class User {
        /**
         * Whether the given IP is in a given DNS blacklist.
         *
-        * @param $ip String IP to check
-        * @param $bases String|Array of Strings: URL of the DNS blacklist
+        * @param string $ip IP to check
+        * @param string|array $bases of Strings: URL of the DNS blacklist
         * @return Bool True if blacklisted.
         */
        public function inDnsBlacklist( $ip, $bases ) {
@@ -1464,7 +1462,7 @@ class User {
         * @note When using a shared cache like memcached, IP-address
         * last-hit counters will be shared across wikis.
         *
-        * @param $action String Action to enforce; 'edit' if unspecified
+        * @param string $action Action to enforce; 'edit' if unspecified
         * @return Bool True if a rate limiter was tripped
         */
        public function pingLimiter( $action = 'edit' ) {
@@ -1559,7 +1557,7 @@ class User {
        /**
         * Check if user is blocked
         *
-        * @param $bFromSlave Bool Whether to check the slave database instead of the master
+        * @param bool $bFromSlave Whether to check the slave database instead of the master
         * @return Bool True if blocked, false otherwise
         */
        public function isBlocked( $bFromSlave = true ) { // hacked from false due to horrible probs on site
@@ -1569,7 +1567,7 @@ class User {
        /**
         * Get the block affecting the user, or null if the user is not blocked
         *
-        * @param $bFromSlave Bool Whether to check the slave database instead of the master
+        * @param bool $bFromSlave Whether to check the slave database instead of the master
         * @return Block|null
         */
        public function getBlock( $bFromSlave = true ) {
@@ -1581,7 +1579,7 @@ class User {
         * Check if user is blocked from editing a particular article
         *
         * @param $title Title to check
-        * @param $bFromSlave Bool whether to check the slave database instead of the master
+        * @param bool $bFromSlave whether to check the slave database instead of the master
         * @return Bool
         */
        function isBlockedFrom( $title, $bFromSlave = false ) {
@@ -1635,7 +1633,7 @@ class User {
         * Do not use for actual edit permission checks!
         * This is intented for quick UI checks.
         *
-        * @param $ip String IP address, uses current client if none given
+        * @param string $ip IP address, uses current client if none given
         * @return Bool True if blocked, false otherwise
         */
        public function isBlockedGlobally( $ip = '' ) {
@@ -1705,7 +1703,7 @@ class User {
 
        /**
         * Set the user and reload all fields according to a given ID
-        * @param $v Int User ID to reload
+        * @param int $v User ID to reload
         */
        public function setId( $v ) {
                $this->mId = $v;
@@ -1741,7 +1739,7 @@ class User {
         *
         * @note User::newFromName() has rougly the same function, when the named user
         * does not exist.
-        * @param $str String New user name to set
+        * @param string $str New user name to set
         */
        public function setName( $str ) {
                $this->load();
@@ -1821,9 +1819,9 @@ class User {
         * Internal uncached check for new messages
         *
         * @see getNewtalk()
-        * @param $field String 'user_ip' for anonymous users, 'user_id' otherwise
-        * @param $id String|Int User's IP address for anonymous users, User ID otherwise
-        * @param $fromMaster Bool true to fetch from the master, false for a slave
+        * @param string $field 'user_ip' for anonymous users, 'user_id' otherwise
+        * @param string|Int $id User's IP address for anonymous users, User ID otherwise
+        * @param bool $fromMaster true to fetch from the master, false for a slave
         * @return Bool True if the user has new messages
         */
        protected function checkNewtalk( $field, $id, $fromMaster = false ) {
@@ -1839,8 +1837,8 @@ class User {
 
        /**
         * Add or update the new messages flag
-        * @param $field String 'user_ip' for anonymous users, 'user_id' otherwise
-        * @param $id String|Int User's IP address for anonymous users, User ID otherwise
+        * @param string $field 'user_ip' for anonymous users, 'user_id' otherwise
+        * @param string|Int $id User's IP address for anonymous users, User ID otherwise
         * @param $curRev Revision new, as yet unseen revision of the user talk page. Ignored if null.
         * @return Bool True if successful, false otherwise
         */
@@ -1865,8 +1863,8 @@ class User {
 
        /**
         * Clear the new messages flag for the given user
-        * @param $field String 'user_ip' for anonymous users, 'user_id' otherwise
-        * @param $id String|Int User's IP address for anonymous users, User ID otherwise
+        * @param string $field 'user_ip' for anonymous users, 'user_id' otherwise
+        * @param string|Int $id User's IP address for anonymous users, User ID otherwise
         * @return Bool True if successful, false otherwise
         */
        protected function deleteNewtalk( $field, $id ) {
@@ -1885,7 +1883,7 @@ class User {
 
        /**
         * Update the 'You have new messages!' status.
-        * @param $val Bool Whether the user has new messages
+        * @param bool $val Whether the user has new messages
         * @param $curRev Revision new, as yet unseen revision of the user talk page. Ignored if null or !$val.
         */
        public function setNewtalk( $val, $curRev = null ) {
@@ -1981,7 +1979,7 @@ class User {
 
        /**
         * Validate the cache for this account.
-        * @param $timestamp String A timestamp in TS_MW format
+        * @param string $timestamp A timestamp in TS_MW format
         *
         * @return bool
         */
@@ -2010,7 +2008,7 @@ class User {
         * wipes it, so the account cannot be logged in until
         * a new password is set, for instance via e-mail.
         *
-        * @param $str String New password to set
+        * @param string $str New password to set
         * @throws PasswordError on failure
         *
         * @return bool
@@ -2049,7 +2047,7 @@ class User {
        /**
         * Set the password and reset the random token unconditionally.
         *
-        * @param $str string|null New password to set or null to set an invalid
+        * @param string|null $str New password to set or null to set an invalid
         *        password hash meaning that the user will not be able to log in
         *        through the web interface.
         */
@@ -2069,7 +2067,7 @@ class User {
 
        /**
         * Get the user's current token.
-        * @param $forceCreation Force the generation of a new token if the user doesn't have one (default=true for backwards compatibility)
+        * @param bool $forceCreation Force the generation of a new token if the user doesn't have one (default=true for backwards compatibility)
         * @return String Token
         */
        public function getToken( $forceCreation = true ) {
@@ -2084,7 +2082,7 @@ class User {
         * Set the random token (used for persistent authentication)
         * Called from loadDefaults() among other places.
         *
-        * @param $token String|bool If specified, set the token to this value
+        * @param string|bool $token If specified, set the token to this value
         */
        public function setToken( $token = false ) {
                $this->load();
@@ -2098,8 +2096,8 @@ class User {
        /**
         * Set the password for a password reminder or new account email
         *
-        * @param $str String New password to set
-        * @param $throttle Bool If true, reset the throttle timestamp to the present
+        * @param string $str New password to set
+        * @param bool $throttle If true, reset the throttle timestamp to the present
         */
        public function setNewpassword( $str, $throttle = true ) {
                $this->load();
@@ -2146,7 +2144,7 @@ class User {
 
        /**
         * Set the user's e-mail address
-        * @param $str String New e-mail address
+        * @param string $str New e-mail address
         */
        public function setEmail( $str ) {
                $this->load();
@@ -2162,7 +2160,7 @@ class User {
         * Set the user's e-mail address and a confirmation mail if needed.
         *
         * @since 1.20
-        * @param $str String New e-mail address
+        * @param string $str New e-mail address
         * @return Status
         */
        public function setEmailWithConfirmation( $str ) {
@@ -2208,7 +2206,7 @@ class User {
 
        /**
         * Set the user's real name
-        * @param $str String New real name
+        * @param string $str New real name
         */
        public function setRealName( $str ) {
                $this->load();
@@ -2218,9 +2216,9 @@ class User {
        /**
         * Get the user's current setting for a given option.
         *
-        * @param $oname String The option to check
-        * @param $defaultOverride String A default value returned if the option does not exist
-        * @param $ignoreHidden Bool = whether to ignore the effects of $wgHiddenPrefs
+        * @param string $oname The option to check
+        * @param string $defaultOverride A default value returned if the option does not exist
+        * @param bool $ignoreHidden = whether to ignore the effects of $wgHiddenPrefs
         * @return String User's current value for the option
         * @see getBoolOption()
         * @see getIntOption()
@@ -2273,7 +2271,7 @@ class User {
        /**
         * Get the user's current setting for a given option, as a boolean value.
         *
-        * @param $oname String The option to check
+        * @param string $oname The option to check
         * @return Bool User's current value for the option
         * @see getOption()
         */
@@ -2284,8 +2282,8 @@ class User {
        /**
         * Get the user's current setting for a given option, as a boolean value.
         *
-        * @param $oname String The option to check
-        * @param $defaultOverride Int A default value returned if the option does not exist
+        * @param string $oname The option to check
+        * @param int $defaultOverride A default value returned if the option does not exist
         * @return Int User's current value for the option
         * @see getOption()
         */
@@ -2300,7 +2298,7 @@ class User {
        /**
         * Set the given option for a user.
         *
-        * @param $oname String The option to set
+        * @param string $oname The option to set
         * @param $val mixed New value to set
         */
        public function setOption( $oname, $val ) {
@@ -2322,6 +2320,7 @@ class User {
         * - 'registered' - preferences which are registered in core MediaWiki or
         *                  by extensions using the UserGetDefaultOptions hook.
         * - 'registered-multiselect' - as above, using the 'multiselect' type.
+        * - 'registered-checkmatrix' - as above, using the 'checkmatrix' type.
         * - 'userjs' - preferences with names starting with 'userjs-', intended to
         *              be used by user scripts.
         * - 'unused' - preferences about which MediaWiki doesn't know anything.
@@ -2338,6 +2337,7 @@ class User {
                return array(
                        'registered',
                        'registered-multiselect',
+                       'registered-checkmatrix',
                        'userjs',
                        'unused'
                );
@@ -2351,7 +2351,7 @@ class User {
         *
         * @see User::listOptionKinds
         * @param $context IContextSource
-        * @param $options array assoc. array with options keys to check as keys. Defaults to $this->mOptions.
+        * @param array $options assoc. array with options keys to check as keys. Defaults to $this->mOptions.
         * @return array the key => kind mapping data
         */
        public function getOptionKinds( IContextSource $context, $options = null ) {
@@ -2363,8 +2363,8 @@ class User {
                $prefs = Preferences::getPreferences( $this, $context );
                $mapping = array();
 
-               // Multiselect options are stored in the database with one key per
-               // option, each having a boolean value. Extract those keys.
+               // Multiselect and checkmatrix options are stored in the database with
+               // one key per option, each having a boolean value. Extract those keys.
                $multiselectOptions = array();
                foreach ( $prefs as $name => $info ) {
                        if ( ( isset( $info['type'] ) && $info['type'] == 'multiselect' ) ||
@@ -2379,6 +2379,23 @@ class User {
                                unset( $prefs[$name] );
                        }
                }
+               $checkmatrixOptions = array();
+               foreach ( $prefs as $name => $info ) {
+                       if ( ( isset( $info['type'] ) && $info['type'] == 'checkmatrix' ) ||
+                                       ( isset( $info['class'] ) && $info['class'] == 'HTMLCheckMatrix' ) ) {
+                               $columns = HTMLFormField::flattenOptions( $info['columns'] );
+                               $rows = HTMLFormField::flattenOptions( $info['rows'] );
+                               $prefix = isset( $info['prefix'] ) ? $info['prefix'] : $name;
+
+                               foreach ( $columns as $column ) {
+                                       foreach ( $rows as $row ) {
+                                               $checkmatrixOptions["$prefix-$column-$row"] = true;
+                                       }
+                               }
+
+                               unset( $prefs[$name] );
+                       }
+               }
 
                // $value is ignored
                foreach ( $options as $key => $value ) {
@@ -2386,6 +2403,8 @@ class User {
                                $mapping[$key] = 'registered';
                        } elseif( isset( $multiselectOptions[$key] ) ) {
                                $mapping[$key] = 'registered-multiselect';
+                       } elseif( isset( $checkmatrixOptions[$key] ) ) {
+                               $mapping[$key] = 'registered-checkmatrix';
                        } elseif ( substr( $key, 0, 7 ) === 'userjs-' ) {
                                $mapping[$key] = 'userjs';
                        } else {
@@ -2403,15 +2422,15 @@ class User {
         * Supported values are everything that can be reported by getOptionKinds()
         * and 'all', which forces a reset of *all* preferences and overrides everything else.
         *
-        * @param $resetKinds array|string which kinds of preferences to reset. Defaults to
-        *                                 array( 'registered', 'registered-multiselect', 'unused' )
-        *                                 for backwards-compatibility.
+        * @param array|string $resetKinds which kinds of preferences to reset. Defaults to
+        *             array( 'registered', 'registered-multiselect', 'registered-checkmatrix', 'unused' )
+        *             for backwards-compatibility.
         * @param $context IContextSource|null context source used when $resetKinds
-        *                                     does not contain 'all', passed to getOptionKinds().
-        *                                     Defaults to RequestContext::getMain() when null.
+        *             does not contain 'all', passed to getOptionKinds().
+        *             Defaults to RequestContext::getMain() when null.
         */
        public function resetOptions(
-               $resetKinds = array( 'registered', 'registered-multiselect', 'unused' ),
+               $resetKinds = array( 'registered', 'registered-multiselect', 'registered-checkmatrix', 'unused' ),
                IContextSource $context = null
        ) {
                $this->load();
@@ -2512,7 +2531,7 @@ class User {
         * Get the list of implicit group memberships this user has.
         * This includes all explicit groups, plus 'user' if logged in,
         * '*' for all accounts, and autopromoted groups
-        * @param $recache Bool Whether to avoid the cache
+        * @param bool $recache Whether to avoid the cache
         * @return Array of String internal group names
         */
        public function getEffectiveGroups( $recache = false ) {
@@ -2535,7 +2554,7 @@ class User {
         * Get the list of implicit group memberships this user has.
         * This includes 'user' if logged in, '*' for all accounts,
         * and autopromoted groups
-        * @param $recache Bool Whether to avoid the cache
+        * @param bool $recache Whether to avoid the cache
         * @return Array of String internal group names
         */
        public function getAutomaticGroups( $recache = false ) {
@@ -2617,7 +2636,7 @@ class User {
        /**
         * Add the user to the given group.
         * This takes immediate effect.
-        * @param $group String Name of the group to add
+        * @param string $group Name of the group to add
         */
        public function addGroup( $group ) {
                if( wfRunHooks( 'UserAddGroup', array( $this, &$group ) ) ) {
@@ -2642,7 +2661,7 @@ class User {
        /**
         * Remove the user from the given group.
         * This takes immediate effect.
-        * @param $group String Name of the group to remove
+        * @param string $group Name of the group to remove
         */
        public function removeGroup( $group ) {
                $this->load();
@@ -2905,7 +2924,7 @@ class User {
 
        /**
         * Set this user's options from an encoded string
-        * @param $str String Encoded options to import
+        * @param string $str Encoded options to import
         *
         * @deprecated in 1.19 due to removal of user_options from the user table
         */
@@ -2933,9 +2952,9 @@ class User {
        /**
         * Set a cookie on the user's client. Wrapper for
         * WebResponse::setCookie
-        * @param $name String Name of the cookie to set
-        * @param $value String Value to set
-        * @param $exp Int Expiration time, as a UNIX time value;
+        * @param string $name Name of the cookie to set
+        * @param string $value Value to set
+        * @param int $exp Expiration time, as a UNIX time value;
         *                   if 0 or not specified, use the default $wgCookieExpiration
         * @param $secure Bool
         *  true: Force setting the secure attribute when setting the cookie
@@ -2948,7 +2967,7 @@ class User {
 
        /**
         * Clear a cookie on the user's client
-        * @param $name String Name of the cookie to clear
+        * @param string $name Name of the cookie to clear
         */
        protected function clearCookie( $name ) {
                $this->setCookie( $name, '', time() - 86400 );
@@ -2959,7 +2978,7 @@ class User {
         *
         * @param $request WebRequest object to use; $wgRequest will be used if null
         *        is passed.
-        * @param $secure Whether to force secure/insecure cookies or use default
+        * @param bool $secure Whether to force secure/insecure cookies or use default
         */
        public function setCookies( $request = null, $secure = null ) {
                if ( $request === null ) {
@@ -2967,7 +2986,9 @@ class User {
                }
 
                $this->load();
-               if ( 0 == $this->mId ) return;
+               if ( 0 == $this->mId ) {
+                       return;
+               }
                if ( !$this->mToken ) {
                        // When token is empty or NULL generate a new one and then save it to the database
                        // This allows a wiki to re-secure itself after a leak of it's user table or $wgSecretKey
@@ -3101,8 +3122,8 @@ class User {
        /**
         * Add a user to the database, return the user object
         *
-        * @param $name String Username to add
-        * @param $params Array of Strings Non-default parameters to save to the database as user_* fields:
+        * @param string $name Username to add
+        * @param array $params of Strings Non-default parameters to save to the database as user_* fields:
         *   - password             The user's password hash. Password logins will be disabled if this is omitted.
         *   - newpassword          Hash for a temporary password that has been mailed to the user
         *   - email                The user's email address
@@ -3286,7 +3307,7 @@ class User {
                // since it disables the parser cache, its value will always
                // be 0 when this function is called by parsercache.
 
-               $confstr =        $this->getOption( 'math' );
+               $confstr = $this->getOption( 'math' );
                $confstr .= '!' . $this->getStubThreshold();
                $confstr .= '!' . ( $this->getOption( 'numberheadings' ) ? '1' : '' );
                $confstr .= '!' . $wgLang->getCode();
@@ -3378,7 +3399,7 @@ class User {
 
        /**
         * Check to see if the given clear-text password is one of the accepted passwords
-        * @param $password String: user password.
+        * @param string $password user password.
         * @return Boolean: True if the given password is correct, otherwise False.
         */
        public function checkPassword( $password ) {
@@ -3445,7 +3466,7 @@ class User {
         * Alias for getEditToken.
         * @deprecated since 1.19, use getEditToken instead.
         *
-        * @param $salt String|Array of Strings Optional function-specific data for hashing
+        * @param string|array $salt of Strings Optional function-specific data for hashing
         * @param $request WebRequest object to use or null to use $wgRequest
         * @return String The new edit token
         */
@@ -3462,7 +3483,7 @@ class User {
         *
         * @since 1.19
         *
-        * @param $salt String|Array of Strings Optional function-specific data for hashing
+        * @param string|array $salt of Strings Optional function-specific data for hashing
         * @param $request WebRequest object to use or null to use $wgRequest
         * @return String The new edit token
         */
@@ -3489,11 +3510,10 @@ class User {
        /**
         * Generate a looking random token for various uses.
         *
-        * @param $salt String Optional salt value
         * @return String The new random token
         * @deprecated since 1.20; Use MWCryptRand for secure purposes or wfRandomString for pesudo-randomness
         */
-       public static function generateToken( $salt = '' ) {
+       public static function generateToken() {
                return MWCryptRand::generateHex( 32 );
        }
 
@@ -3503,8 +3523,8 @@ class User {
         * user's own login session, not a form submission from a third-party
         * site.
         *
-        * @param $val String Input value to compare
-        * @param $salt String Optional function-specific data for hashing
+        * @param string $val Input value to compare
+        * @param string $salt Optional function-specific data for hashing
         * @param $request WebRequest object to use or null to use $wgRequest
         * @return Boolean: Whether the token matches
         */
@@ -3520,8 +3540,8 @@ class User {
         * Check given value against the token value stored in the session,
         * ignoring the suffix.
         *
-        * @param $val String Input value to compare
-        * @param $salt String Optional function-specific data for hashing
+        * @param string $val Input value to compare
+        * @param string $salt Optional function-specific data for hashing
         * @param $request WebRequest object to use or null to use $wgRequest
         * @return Boolean: Whether the token matches
         */
@@ -3534,7 +3554,7 @@ class User {
         * Generate a new e-mail confirmation token and send a confirmation/invalidation
         * mail to the user's given address.
         *
-        * @param $type String: message to send, either "created", "changed" or "set"
+        * @param string $type message to send, either "created", "changed" or "set"
         * @return Status object
         */
        public function sendConfirmationMail( $type = 'created' ) {
@@ -3568,10 +3588,10 @@ class User {
         * Send an e-mail to this user's account. Does not check for
         * confirmed status or validity.
         *
-        * @param $subject String Message subject
-        * @param $body String Message body
-        * @param $from String Optional From address; if unspecified, default $wgPasswordSender will be used
-        * @param $replyto String Reply-To address
+        * @param string $subject Message subject
+        * @param string $body Message body
+        * @param string $from Optional From address; if unspecified, default $wgPasswordSender will be used
+        * @param string $replyto Reply-To address
         * @return Status
         */
        public function sendMail( $subject, $body, $from = null, $replyto = null ) {
@@ -3610,8 +3630,8 @@ class User {
        }
 
        /**
-       * Return a URL the user can use to confirm their email address.
-        * @param $token String Accepts the email confirmation token
+        * Return a URL the user can use to confirm their email address.
+        * @param string $token Accepts the email confirmation token
         * @return String New token URL
         */
        private function confirmationTokenUrl( $token ) {
@@ -3620,7 +3640,7 @@ class User {
 
        /**
         * Return a URL the user can use to invalidate their email address.
-        * @param $token String Accepts the email confirmation token
+        * @param string $token Accepts the email confirmation token
         * @return String New token URL
         */
        private function invalidationTokenUrl( $token ) {
@@ -3637,8 +3657,8 @@ class User {
         * also sometimes can get corrupted in some browsers/mailers
         * (bug 6957 with Gmail and Internet Explorer).
         *
-        * @param $page String Special page
-        * @param $token String Token
+        * @param string $page Special page
+        * @param string $token Token
         * @return String Formatted URL
         */
        protected function getTokenUrl( $page, $token ) {
@@ -3678,7 +3698,7 @@ class User {
 
        /**
         * Set the e-mail authentication timestamp.
-        * @param $timestamp String TS_MW timestamp
+        * @param string $timestamp TS_MW timestamp
         */
        function setEmailAuthenticationTimestamp( $timestamp ) {
                $this->load();
@@ -3792,7 +3812,7 @@ class User {
        /**
         * Get the permissions associated with a given list of groups
         *
-        * @param $groups Array of Strings List of internal group names
+        * @param array $groups of Strings List of internal group names
         * @return Array of Strings List of permission key names for given groups combined
         */
        public static function getGroupPermissions( $groups ) {
@@ -3819,7 +3839,7 @@ class User {
        /**
         * Get all the groups who have a given permission
         *
-        * @param $role String Role to check
+        * @param string $role Role to check
         * @return Array of Strings List of internal group names with the given permission
         */
        public static function getGroupsWithPermission( $role ) {
@@ -3836,8 +3856,8 @@ class User {
        /**
         * Check, if the given group has the given permission
         *
-        * @param $group String Group to check
-        * @param $role String Role to check
+        * @param string $group Group to check
+        * @param string $role Role to check
         * @return bool
         */
        public static function groupHasPermission( $group, $role ) {
@@ -3849,7 +3869,7 @@ class User {
        /**
         * Get the localized descriptive name for a group, if it exists
         *
-        * @param $group String Internal group name
+        * @param string $group Internal group name
         * @return String Localized descriptive group name
         */
        public static function getGroupName( $group ) {
@@ -3860,8 +3880,8 @@ class User {
        /**
         * Get the localized descriptive name for a member of a group, if it exists
         *
-        * @param $group String Internal group name
-        * @param $username String Username for gender (since 1.19)
+        * @param string $group Internal group name
+        * @param string $username Username for gender (since 1.19)
         * @return String Localized name for group member
         */
        public static function getGroupMember( $group, $username = '#' ) {
@@ -3914,7 +3934,7 @@ class User {
        /**
         * Get the title of a page describing a particular group
         *
-        * @param $group String Internal group name
+        * @param string $group Internal group name
         * @return Title|Bool Title of the page if it exists, false otherwise
         */
        public static function getGroupPage( $group ) {
@@ -3931,8 +3951,8 @@ class User {
         * Create a link to the group in HTML, if available;
         * else return the group name.
         *
-        * @param $group String Internal name of the group
-        * @param $text String The text of the link
+        * @param string $group Internal name of the group
+        * @param string $text The text of the link
         * @return String HTML link to the group
         */
        public static function makeGroupLinkHTML( $group, $text = '' ) {
@@ -3951,8 +3971,8 @@ class User {
         * Create a link to the group in Wikitext, if available;
         * else return the group name.
         *
-        * @param $group String Internal name of the group
-        * @param $text String The text of the link
+        * @param string $group Internal name of the group
+        * @param string $text The text of the link
         * @return String Wikilink to the group
         */
        public static function makeGroupLinkWiki( $group, $text = '' ) {
@@ -3971,7 +3991,7 @@ class User {
        /**
         * Returns an array of the groups that a particular group can add/remove.
         *
-        * @param $group String: the group to check for whether it can add/remove
+        * @param string $group the group to check for whether it can add/remove
         * @return Array array( 'add' => array( addablegroups ),
         *     'remove' => array( removablegroups ),
         *     'add-self' => array( addablegroups to self),
@@ -4144,7 +4164,7 @@ class User {
        /**
         * Get the description of a given right
         *
-        * @param $right String Right to query
+        * @param string $right Right to query
         * @return String Localized description of the right
         */
        public static function getRightDescription( $right ) {
@@ -4156,8 +4176,8 @@ class User {
        /**
         * Make an old-style password hash
         *
-        * @param $password String Plain-text password
-        * @param $userId String User ID
+        * @param string $password Plain-text password
+        * @param string $userId User ID
         * @return String Password hash
         */
        public static function oldCrypt( $password, $userId ) {
@@ -4172,7 +4192,7 @@ class User {
        /**
         * Make a new-style password hash
         *
-        * @param $password String Plain-text password
+        * @param string $password Plain-text password
         * @param bool|string $salt Optional salt, may be random or the user ID.
 
         *                     If unspecified or false, will generate one automatically
@@ -4200,9 +4220,9 @@ class User {
         * Compare a password hash with a plain-text password. Requires the user
         * ID if there's a chance that the hash is an old-style hash.
         *
-        * @param $hash String Password hash
-        * @param $password String Plain-text password to compare
-        * @param $userId String|bool User ID for old-style password salt
+        * @param string $hash Password hash
+        * @param string $password Plain-text password to compare
+        * @param string|bool $userId User ID for old-style password salt
         *
         * @return Boolean
         */
@@ -4231,7 +4251,7 @@ class User {
         * Add a newuser log entry for this user.
         * Before 1.19 the return value was always true.
         *
-        * @param $action string|bool: account creation type.
+        * @param string|bool $action account creation type.
         *   - String, one of the following values:
         *     - 'create' for an anonymous user creating an account for himself.
         *       This will force the action's performer to be the created user itself,
@@ -4243,7 +4263,7 @@ class User {
         *     - false will be converted to 'create' if this object is the same as
         *       $wgUser and to 'create2' otherwise
         *
-        * @param $reason String: user supplied reason
+        * @param string $reason user supplied reason
         *
         * @return int|bool True if not $wgNewUserLog; otherwise ID of log item or 0 on failure
         */
@@ -4301,7 +4321,7 @@ class User {
        /**
         * Load the user options either from cache, the database or an array
         *
-        * @param $data Rows for the current user out of the user_properties table
+        * @param array $data Rows for the current user out of the user_properties table
         */
        protected function loadOptions( $data = null ) {
                global $wgContLang;
index 7d11342..d302e89 100644 (file)
@@ -24,7 +24,6 @@
  * @author Luke Welling lwelling@wikimedia.org
  */
 
-
 /**
  * Stores a single person's name and email address.
  * These are passed in via the constructor, and will be returned in SMTP
@@ -32,9 +31,9 @@
  */
 class MailAddress {
        /**
-        * @param $address string|User string with an email address, or a User object
-        * @param $name String: human-readable name if a string address is given
-        * @param $realName String: human-readable real name if a string address is given
+        * @param string|User $address string with an email address, or a User object
+        * @param string $name human-readable name if a string address is given
+        * @param string $realName human-readable real name if a string address is given
         */
        function __construct( $address, $name = null, $realName = null ) {
                if ( is_object( $address ) && $address instanceof User ) {
@@ -78,7 +77,6 @@ class MailAddress {
        }
 }
 
-
 /**
  * Collection of static functions for sending mail
  */
@@ -110,9 +108,9 @@ class UserMailer {
        /**
         * Creates a single string from an associative array
         *
-        * @param $headers array Associative Array: keys are header field names,
+        * @param array $headers Associative Array: keys are header field names,
         *                 values are ... values.
-        * @param $endl String: The end of line character.  Defaults to "\n"
+        * @param string $endl The end of line character.  Defaults to "\n"
         *
         * Note RFC2822 says newlines must be CRLF (\r\n)
         * but php mail naively "corrects" it and requires \n for the "correction" to work
@@ -153,10 +151,10 @@ class UserMailer {
         *
         * @param $to MailAddress: recipient's email (or an array of them)
         * @param $from MailAddress: sender's email
-        * @param $subject String: email's subject.
-        * @param $body String: email's text or Array of two strings to be the text and html bodies
+        * @param string $subject email's subject.
+        * @param string $body email's text or Array of two strings to be the text and html bodies
         * @param $replyto MailAddress: optional reply-to email (default: null).
-        * @param $contentType String: optional custom Content-Type (default: text/plain; charset=UTF-8)
+        * @param string $contentType optional custom Content-Type (default: text/plain; charset=UTF-8)
         * @throws MWException
         * @return Status object
         */
@@ -270,7 +268,7 @@ class UserMailer {
                                $mime = new Mail_mime( array( 'eol' => $endl ) );
                                $mime->setTXTBody( $body['text'] );
                                $mime->setHTMLBody( $body['html'] );
-                               $body = $mime->get();  // must call get() before headers()
+                               $body = $mime->get(); // must call get() before headers()
                                $headers = $mime->headers( $headers );
                        }
                }
@@ -382,7 +380,7 @@ class UserMailer {
         * Set the mail error message in self::$mErrorString
         *
         * @param $code Integer: error number
-        * @param $string String: error message
+        * @param string $string error message
         */
        static function errorHandler( $code, $string ) {
                self::$mErrorString = preg_replace( '/^mail\(\)(\s*\[.*?\])?: /', '', $string );
@@ -572,11 +570,11 @@ class EmailNotification {
         *
         * @param $editor User object
         * @param $title Title object
-        * @param $timestamp string Edit timestamp
-        * @param $summary string Edit summary
+        * @param string $timestamp Edit timestamp
+        * @param string $summary Edit summary
         * @param $minorEdit bool
-        * @param $oldid int Revision ID
-        * @param $watchers array of user IDs
+        * @param int $oldid Revision ID
+        * @param array $watchers of user IDs
         * @param string $pageStatus
         * @throws MWException
         */
index 26ac3dc..cd5dff8 100644 (file)
@@ -32,8 +32,8 @@ class UserRightsProxy {
         * @see newFromId()
         * @see newFromName()
         * @param $db DatabaseBase: db connection
-        * @param $database String: database name
-        * @param $name String: user name
+        * @param string $database database name
+        * @param string $name user name
         * @param $id Integer: user ID
         */
        private function __construct( $db, $database, $name, $id ) {
@@ -56,7 +56,7 @@ class UserRightsProxy {
        /**
         * Confirm the selected database name is a valid local interwiki database name.
         *
-        * @param $database String: database name
+        * @param string $database database name
         * @return Boolean
         */
        public static function validDatabase( $database ) {
@@ -67,7 +67,7 @@ class UserRightsProxy {
        /**
         * Same as User::whoIs()
         *
-        * @param $database String: database name
+        * @param string $database database name
         * @param $id Integer: user ID
         * @param $ignoreInvalidDB Boolean: if true, don't check if $database is in $wgLocalDatabases
         * @return String: user name or false if the user doesn't exist
@@ -84,7 +84,7 @@ class UserRightsProxy {
        /**
         * Factory function; get a remote user entry by ID number.
         *
-        * @param $database String: database name
+        * @param string $database database name
         * @param $id Integer: user ID
         * @param $ignoreInvalidDB Boolean: if true, don't check if $database is in $wgLocalDatabases
         * @return UserRightsProxy or null if doesn't exist
@@ -96,8 +96,8 @@ class UserRightsProxy {
        /**
         * Factory function; get a remote user entry by name.
         *
-        * @param $database String: database name
-        * @param $name String: user name
+        * @param string $database database name
+        * @param string $name user name
         * @param $ignoreInvalidDB Boolean: if true, don't check if $database is in $wgLocalDatabases
         * @return UserRightsProxy or null if doesn't exist
         */
index 240ebc7..5ac92f7 100644 (file)
@@ -205,7 +205,7 @@ class WatchedItem {
                        $success = true;
                }
 
-               # the following code compensates the new behaviour, introduced by the
+               # the following code compensates the new behavior, introduced by the
                # enotif patch, that every single watched page needs now to be listed
                # in watchlist namespace:page and namespace_talk:page had separate
                # entries: clear them
index 2195fbb..ae465e6 100644 (file)
@@ -70,7 +70,7 @@ class WebRequest {
         * If the REQUEST_URI is not provided we'll fall back on the PATH_INFO
         * provided by the server if any and use that to set a 'title' parameter.
         *
-        * @param $want string: If this is not 'all', then the function
+        * @param string $want If this is not 'all', then the function
         * will return an empty array if it determines that the URL is
         * inside a rewrite path.
         *
@@ -206,7 +206,7 @@ class WebRequest {
         * @return string
         */
        public static function detectProtocol() {
-               list( $proto, $stdPort ) = self::detectProtocolAndStdPort();
+               list( $proto, ) = self::detectProtocolAndStdPort();
                return $proto;
        }
 
@@ -233,9 +233,9 @@ class WebRequest {
         * URL rewriting function; tries to extract page title and,
         * optionally, one other fixed parameter value from a URL path.
         *
-        * @param $path string: the URL path given from the client
-        * @param $bases array: one or more URLs, optionally with $1 at the end
-        * @param $key string: if provided, the matching key in $bases will be
+        * @param string $path the URL path given from the client
+        * @param array $bases one or more URLs, optionally with $1 at the end
+        * @param string $key if provided, the matching key in $bases will be
         *             passed on as the value of this URL parameter
         * @return array of URL variables to interpolate; empty if no match
         */
@@ -262,8 +262,8 @@ class WebRequest {
         * Recursively strips slashes from the given array;
         * used for undoing the evil that is magic_quotes_gpc.
         *
-        * @param $arr array: will be modified
-        * @param $topLevel bool Specifies if the array passed is from the top
+        * @param array $arr will be modified
+        * @param bool $topLevel Specifies if the array passed is from the top
         * level of the source. In PHP5 magic_quotes only escapes the first level
         * of keys that belong to an array.
         * @return array the original array
@@ -359,7 +359,7 @@ class WebRequest {
         * selected by a drop-down menu). For freeform input, see getText().
         *
         * @param $name String
-        * @param $default String: optional default (or NULL)
+        * @param string $default optional default (or NULL)
         * @return String
         */
        public function getVal( $name, $default = null ) {
@@ -377,7 +377,7 @@ class WebRequest {
        /**
         * Set an arbitrary value into our get/post data.
         *
-        * @param $key String: key name to use
+        * @param string $key key name to use
         * @param $value Mixed: value to set
         * @return Mixed: old value if one was present, null otherwise
         */
@@ -390,7 +390,7 @@ class WebRequest {
        /**
         * Unset an arbitrary value from our get/post data.
         *
-        * @param $key String: key name to use
+        * @param string $key key name to use
         * @return Mixed: old value if one was present, null otherwise
         */
        public function unsetVal( $key ) {
@@ -409,7 +409,7 @@ class WebRequest {
         * If no source and no default, returns NULL.
         *
         * @param $name String
-        * @param $default Array: optional default (or NULL)
+        * @param array $default optional default (or NULL)
         * @return Array
         */
        public function getArray( $name, $default = null ) {
@@ -428,7 +428,7 @@ class WebRequest {
         * If an array is returned, contents are guaranteed to be integers.
         *
         * @param $name String
-        * @param $default Array: option default (or NULL)
+        * @param array $default option default (or NULL)
         * @return Array of ints
         */
        public function getIntArray( $name, $default = null ) {
@@ -516,7 +516,7 @@ class WebRequest {
         * be required - e.g.  Esperanto x-coding).
         *
         * @param $name String
-        * @param $default String: optional
+        * @param string $default optional
         * @return String
         */
        public function getText( $name, $default = '' ) {
@@ -609,8 +609,8 @@ class WebRequest {
        /**
         * Get a cookie from the $_COOKIE jar
         *
-        * @param $key String: the name of the cookie
-        * @param $prefix String: a prefix to use for the cookie name, if not $wgCookiePrefix
+        * @param string $key the name of the cookie
+        * @param string $prefix a prefix to use for the cookie name, if not $wgCookiePrefix
         * @param $default Mixed: what to return if the value isn't found
         * @return Mixed: cookie value or $default if the cookie not set
         */
@@ -678,7 +678,7 @@ class WebRequest {
 
        /**
         * Take an arbitrary query and rewrite the present URL to include it
-        * @param $query String: query string fragment; do not include initial '?'
+        * @param string $query query string fragment; do not include initial '?'
         *
         * @return String
         */
@@ -690,7 +690,7 @@ class WebRequest {
         * HTML-safe version of appendQuery().
         * @deprecated: Deprecated in 1.20, warnings in 1.21, remove in 1.22.
         *
-        * @param $query String: query string fragment; do not include initial '?'
+        * @param string $query query string fragment; do not include initial '?'
         * @return String
         */
        public function escapeAppendQuery( $query ) {
@@ -710,8 +710,8 @@ class WebRequest {
        /**
         * Appends or replaces value of query variables.
         *
-        * @param $array Array of values to replace/add to query
-        * @param $onlyquery Bool: whether to only return the query string and not
+        * @param array $array of values to replace/add to query
+        * @param bool $onlyquery whether to only return the query string and not
         *                   the complete URL
         * @return String
         */
@@ -730,7 +730,7 @@ class WebRequest {
         * Offset must be positive but is not capped.
         *
         * @param $deflimit Integer: limit to use if no input and the user hasn't set the option.
-        * @param $optionname String: to specify an option other than rclimit to pull from.
+        * @param string $optionname to specify an option other than rclimit to pull from.
         * @return array first element is limit, second is offset
         */
        public function getLimitOffset( $deflimit = 50, $optionname = 'rclimit' ) {
@@ -870,7 +870,7 @@ class WebRequest {
 
        /**
         * Get a request header, or false if it isn't set
-        * @param $name String: case-insensitive header name
+        * @param string $name case-insensitive header name
         *
         * @return string|bool False on failure
         */
@@ -887,7 +887,7 @@ class WebRequest {
        /**
         * Get data from $_SESSION
         *
-        * @param $key String: name of key in $_SESSION
+        * @param string $key name of key in $_SESSION
         * @return Mixed
         */
        public function getSessionData( $key ) {
@@ -900,7 +900,7 @@ class WebRequest {
        /**
         * Set session data
         *
-        * @param $key String: name of key in $_SESSION
+        * @param string $key name of key in $_SESSION
         * @param $data Mixed
         */
        public function setSessionData( $key, $data ) {
@@ -1162,7 +1162,7 @@ class WebRequestUpload {
         * Constructor. Should only be called by WebRequest
         *
         * @param $request WebRequest The associated request
-        * @param $key string Key in $_FILES array (name of form field)
+        * @param string $key Key in $_FILES array (name of form field)
         */
        public function __construct( $request, $key ) {
                $this->request = $request;
@@ -1274,9 +1274,9 @@ class FauxRequest extends WebRequest {
        private $session = array();
 
        /**
-        * @param $data Array of *non*-urlencoded key => value pairs, the
+        * @param array $data of *non*-urlencoded key => value pairs, the
         *   fake GET/POST values
-        * @param $wasPosted Bool: whether to treat the data as POST
+        * @param bool $wasPosted whether to treat the data as POST
         * @param $session Mixed: session array or null
         * @throws MWException
         */
index 4276fb0..8e15d71 100644 (file)
@@ -30,8 +30,8 @@ class WebResponse {
        /**
         * Output a HTTP header, wrapper for PHP's
         * header()
-        * @param $string String: header to output
-        * @param $replace Bool: replace current similar header
+        * @param string $string header to output
+        * @param bool $replace replace current similar header
         * @param $http_response_code null|int Forces the HTTP response code to the specified value.
         */
        public function header( $string, $replace = true, $http_response_code = null ) {
@@ -40,12 +40,12 @@ class WebResponse {
 
        /**
         * Set the browser cookie
-        * @param $name String: name of cookie
-        * @param $value String: value to give cookie
-        * @param $expire Int: Unix timestamp (in seconds) when the cookie should expire.
+        * @param string $name name of cookie
+        * @param string $value value to give cookie
+        * @param int $expire Unix timestamp (in seconds) when the cookie should expire.
         *        0 (the default) causes it to expire $wgCookieExpiration seconds from now.
-        * @param $prefix String: Prefix to use, if not $wgCookiePrefix (use '' for no prefix)
-        * @param $domain String: Cookie domain to use, if not $wgCookieDomain
+        * @param string $prefix Prefix to use, if not $wgCookiePrefix (use '' for no prefix)
+        * @param string $domain Cookie domain to use, if not $wgCookieDomain
         * @param $forceSecure Bool:
         *   true: force the cookie to be set with the secure attribute
         *   false: force the cookie to be set without the secure attribute
@@ -105,8 +105,8 @@ class FauxResponse extends WebResponse {
 
        /**
         * Stores a HTTP header
-        * @param $string String: header to output
-        * @param $replace Bool: replace current similar header
+        * @param string $string header to output
+        * @param bool $replace replace current similar header
         * @param $http_response_code null|int Forces the HTTP response code to the specified value.
         */
        public function header( $string, $replace = true, $http_response_code = null ) {
@@ -149,9 +149,9 @@ class FauxResponse extends WebResponse {
        /**
         * @todo document. It just ignore optional parameters.
         *
-        * @param $name String: name of cookie
-        * @param $value String: value to give cookie
-        * @param $expire Int: number of seconds til cookie expires (Default: 0)
+        * @param string $name name of cookie
+        * @param string $value value to give cookie
+        * @param int $expire number of seconds til cookie expires (Default: 0)
         * @param $prefix TODO DOCUMENT (Default: null)
         * @param $domain TODO DOCUMENT (Default: null)
         * @param $forceSecure TODO DOCUMENT (Default: null)
index 21a7d9a..6e1795d 100644 (file)
@@ -356,10 +356,10 @@ class MediaWiki {
                // Check for redirects ...
                $action = $request->getVal( 'action', 'view' );
                $file = ( $title->getNamespace() == NS_FILE ) ? $article->getFile() : null;
-               if ( ( $action == 'view' || $action == 'render' )       // ... for actions that show content
-                       && !$request->getVal( 'oldid' ) &&    // ... and are not old revisions
-                       !$request->getVal( 'diff' ) &&    // ... and not when showing diff
-                       $request->getVal( 'redirect' ) != 'no' &&       // ... unless explicitly told not to
+               if ( ( $action == 'view' || $action == 'render' ) // ... for actions that show content
+                       && !$request->getVal( 'oldid' ) && // ... and are not old revisions
+                       !$request->getVal( 'diff' ) && // ... and not when showing diff
+                       $request->getVal( 'redirect' ) != 'no' && // ... unless explicitly told not to
                        // ... and the article is not a non-redirect image page with associated file
                        !( is_object( $file ) && $file->exists() && !$file->getRedirected() ) )
                {
index 45ee20c..6278121 100644 (file)
@@ -82,7 +82,7 @@ class WikiError {
  */
 class WikiErrorMsg extends WikiError {
        /**
-        * @param $message String: wiki message name
+        * @param string $message wiki message name
         * @param ... parameters to pass to wfMsg()
         *
         * @deprecated since 1.17
index 4a5e2bc..b04a784 100644 (file)
@@ -28,7 +28,7 @@ class WikiMap {
        /**
         * Get a WikiReference object for $wikiID
         *
-        * @param $wikiID String: wiki'd id (generally database name)
+        * @param string $wikiID wiki'd id (generally database name)
         * @return WikiReference object or null if the wiki was not found
         */
        public static function getWiki( $wikiID ) {
@@ -53,7 +53,7 @@ class WikiMap {
         * Convenience to get the wiki's display name
         *
         * @todo We can give more info than just the wiki id!
-        * @param $wikiID String: wiki'd id (generally database name)
+        * @param string $wikiID wiki'd id (generally database name)
         * @return string|int Wiki's name or $wiki_id if the wiki was not found
         */
        public static function getWikiName( $wikiID ) {
@@ -68,9 +68,9 @@ class WikiMap {
        /**
         * Convenience to get a link to a user page on a foreign wiki
         *
-        * @param $wikiID String: wiki'd id (generally database name)
-        * @param $user String: user name (must be normalised before calling this function!)
-        * @param $text String: link's text; optional, default to "User:$user"
+        * @param string $wikiID wiki'd id (generally database name)
+        * @param string $user user name (must be normalised before calling this function!)
+        * @param string $text link's text; optional, default to "User:$user"
         * @return String: HTML link or false if the wiki was not found
         */
        public static function foreignUserLink( $wikiID, $user, $text=null ) {
@@ -80,9 +80,9 @@ class WikiMap {
        /**
         * Convenience to get a link to a page on a foreign wiki
         *
-        * @param $wikiID String: wiki'd id (generally database name)
-        * @param $page String: page name (must be normalised before calling this function!)
-        * @param $text String: link's text; optional, default to $page
+        * @param string $wikiID wiki'd id (generally database name)
+        * @param string $page page name (must be normalised before calling this function!)
+        * @param string $text link's text; optional, default to $page
         * @return String: HTML link or false if the wiki was not found
         */
        public static function makeForeignLink( $wikiID, $page, $text=null ) {
@@ -101,8 +101,8 @@ class WikiMap {
        /**
         * Convenience to get a url to a page on a foreign wiki
         *
-        * @param $wikiID String: wiki'd id (generally database name)
-        * @param $page String: page name (must be normalised before calling this function!)
+        * @param string $wikiID wiki'd id (generally database name)
+        * @param string $page page name (must be normalised before calling this function!)
         * @return String: URL or false if the wiki was not found
         */
        public static function getForeignURL( $wikiID, $page ) {
@@ -176,7 +176,7 @@ class WikiReference {
         * Helper function for getUrl()
         *
         * @todo FIXME: This may be generalized...
-        * @param $page String: page name (must be normalised before calling this function!)
+        * @param string $page page name (must be normalised before calling this function!)
         * @return String: Url fragment
         */
        private function getLocalUrl( $page ) {
@@ -186,7 +186,7 @@ class WikiReference {
        /**
         * Get a canonical (i.e. based on $wgCanonicalServer) URL to a page on this foreign wiki
         *
-        * @param $page String: page name (must be normalised before calling this function!)
+        * @param string $page page name (must be normalised before calling this function!)
         * @return String: Url
         */
        public function getCanonicalUrl( $page ) {
@@ -214,7 +214,7 @@ class WikiReference {
         * Get a URL based on $wgServer, like Title::getFullUrl() would produce
         * when called locally on the wiki.
         *
-        * @param $page String: page name (must be normalized before calling this function!)
+        * @param string $page page name (must be normalized before calling this function!)
         * @return String: URL
         */
        public function getFullUrl( $page ) {
index 6048294..893954f 100644 (file)
@@ -50,6 +50,11 @@ class WikiPage implements Page, IDBAccessObject {
        public $mPreparedEdit = false;       // !< Array
        /**@}}*/
 
+       /**
+        * @var int
+        */
+       protected $mId = null;
+
        /**
         * @var int; one of the READ_* constants
         */
@@ -121,8 +126,8 @@ class WikiPage implements Page, IDBAccessObject {
        /**
         * Constructor from a page id
         *
-        * @param $id Int article ID to load
-        * @param $from string|int one of the following values:
+        * @param int $id article ID to load
+        * @param string|int $from one of the following values:
         *        - "fromdb" or WikiPage::READ_NORMAL to select from a slave database
         *        - "fromdbmaster" or WikiPage::READ_LATEST to select from the master database
         *
@@ -144,7 +149,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @since 1.20
         * @param $row object: database row containing at least fields returned
         *        by selectFields().
-        * @param $from string|int: source of $data:
+        * @param string|int $from source of $data:
         *        - "fromdb" or WikiPage::READ_NORMAL: from a slave DB
         *        - "fromdbmaster" or WikiPage::READ_LATEST: from the master DB
         *        - "forupdate" or WikiPage::READ_LOCKING: from the master DB using SELECT FOR UPDATE
@@ -228,6 +233,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @return void
         */
        protected function clearCacheFields() {
+               $this->mId = null;
                $this->mCounter = null;
                $this->mRedirectTarget = null; // Title object if set
                $this->mLastRevision = null; // Latest revision
@@ -363,7 +369,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @since 1.20
         * @param $data object: database row containing at least fields returned
         *        by selectFields()
-        * @param $from string|int One of the following:
+        * @param string|int $from One of the following:
         *        - "fromdb" or WikiPage::READ_NORMAL if the data comes from a slave DB
         *        - "fromdbmaster" or WikiPage::READ_LATEST if the data comes from the master DB
         *        - "forupdate"  or WikiPage::READ_LOCKING if the data comes from from
@@ -371,6 +377,7 @@ class WikiPage implements Page, IDBAccessObject {
         */
        public function loadFromRow( $data, $from ) {
                $lc = LinkCache::singleton();
+               $lc->clearLink( $this->mTitle );
 
                if ( $data ) {
                        $lc->addGoodLinkObjFromRow( $this->mTitle, $data );
@@ -380,10 +387,11 @@ class WikiPage implements Page, IDBAccessObject {
                        // Old-fashioned restrictions
                        $this->mTitle->loadRestrictions( $data->page_restrictions );
 
-                       $this->mCounter     = intval( $data->page_counter );
-                       $this->mTouched     = wfTimestamp( TS_MW, $data->page_touched );
-                       $this->mIsRedirect  = intval( $data->page_is_redirect );
-                       $this->mLatest      = intval( $data->page_latest );
+                       $this->mId = intval( $data->page_id );
+                       $this->mCounter = intval( $data->page_counter );
+                       $this->mTouched = wfTimestamp( TS_MW, $data->page_touched );
+                       $this->mIsRedirect = intval( $data->page_is_redirect );
+                       $this->mLatest = intval( $data->page_latest );
                        // Bug 37225: $latest may no longer match the cached latest Revision object.
                        // Double-check the ID of any cached latest Revision object for consistency.
                        if ( $this->mLastRevision && $this->mLastRevision->getId() != $this->mLatest ) {
@@ -396,6 +404,8 @@ class WikiPage implements Page, IDBAccessObject {
                        $this->mTitle->loadFromRow( false );
 
                        $this->clearCacheFields();
+
+                       $this->mId = 0;
                }
 
                $this->mDataLoaded = true;
@@ -406,14 +416,20 @@ class WikiPage implements Page, IDBAccessObject {
         * @return int Page ID
         */
        public function getId() {
-               return $this->mTitle->getArticleID();
+               if ( !$this->mDataLoaded ) {
+                       $this->loadPageData();
+               }
+               return $this->mId;
        }
 
        /**
         * @return bool Whether or not the page exists in the database
         */
        public function exists() {
-               return $this->mTitle->exists();
+               if ( !$this->mDataLoaded ) {
+                       $this->loadPageData();
+               }
+               return $this->mId > 0;
        }
 
        /**
@@ -425,7 +441,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @return bool
         */
        public function hasViewableContent() {
-               return $this->mTitle->exists() || $this->mTitle->isAlwaysKnown();
+               return $this->exists() || $this->mTitle->isAlwaysKnown();
        }
 
        /**
@@ -666,7 +682,7 @@ class WikiPage implements Page, IDBAccessObject {
 
        /**
         * Set the page timestamp (use only to avoid DB queries)
-        * @param $ts string MW timestamp of last article revision
+        * @param string $ts MW timestamp of last article revision
         * @return void
         */
        public function setTimestamp( $ts ) {
@@ -1006,7 +1022,7 @@ class WikiPage implements Page, IDBAccessObject {
        /**
         * Get the last N authors
         * @param $num Integer: number of revisions to get
-        * @param $revLatest String: the latest rev_id, selected from the master (optional)
+        * @param string $revLatest the latest rev_id, selected from the master (optional)
         * @return array Array of authors, duplicates not removed
         */
        public function getLastNAuthors( $num, $revLatest = 0 ) {
@@ -1067,7 +1083,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                return $wgEnableParserCache
                        && $parserOptions->getStubThreshold() == 0
-                       && $this->mTitle->exists()
+                       && $this->exists()
                        && ( $oldid === null || $oldid === 0 || $oldid === $this->getLatest() )
                        && $this->getContentHandler()->isParserCacheSupported();
        }
@@ -1123,7 +1139,7 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                // Don't update page view counters on views from bot users (bug 14044)
-               if ( !$wgDisableCounters && !$user->isAllowed( 'bot' ) && $this->mTitle->exists() ) {
+               if ( !$wgDisableCounters && !$user->isAllowed( 'bot' ) && $this->exists() ) {
                        DeferredUpdates::addUpdate( new ViewCountUpdate( $this->getId() ) );
                        DeferredUpdates::addUpdate( new SiteStatsUpdate( 1, 0, 0 ) );
                }
@@ -1160,7 +1176,7 @@ class WikiPage implements Page, IDBAccessObject {
                if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
                        // @todo: move this logic to MessageCache
 
-                       if ( $this->mTitle->exists() ) {
+                       if ( $this->exists() ) {
                                // NOTE: use transclusion text for messages.
                                //       This is consistent with  MessageCache::getMsgFromNamespace()
 
@@ -1209,6 +1225,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                if ( $affected ) {
                        $newid = $dbw->insertId();
+                       $this->mId = $newid;
                        $this->mTitle->resetArticleID( $newid );
                }
                wfProfileOut( __METHOD__ );
@@ -1406,9 +1423,9 @@ class WikiPage implements Page, IDBAccessObject {
 
        /**
         * @param $section null|bool|int or a section number (0, 1, 2, T1, T2...)
-        * @param $text String: new text of the section
-        * @param $sectionTitle String: new section's subject, only if $section is 'new'
-        * @param $edittime String: revision timestamp or null to use the current revision
+        * @param string $text new text of the section
+        * @param string $sectionTitle new section's subject, only if $section is 'new'
+        * @param string $edittime revision timestamp or null to use the current revision
         * @throws MWException
         * @return String new complete article text, or null if error
         *
@@ -1449,8 +1466,8 @@ class WikiPage implements Page, IDBAccessObject {
        /**
         * @param $section null|bool|int or a section number (0, 1, 2, T1, T2...)
         * @param $sectionContent Content: new content of the section
-        * @param $sectionTitle String: new section's subject, only if $section is 'new'
-        * @param $edittime String: revision timestamp or null to use the current revision
+        * @param string $sectionTitle new section's subject, only if $section is 'new'
+        * @param string $edittime revision timestamp or null to use the current revision
         *
         * @throws MWException
         * @return Content new complete article content, or null if error
@@ -1506,7 +1523,7 @@ class WikiPage implements Page, IDBAccessObject {
         */
        function checkFlags( $flags ) {
                if ( !( $flags & EDIT_NEW ) && !( $flags & EDIT_UPDATE ) ) {
-                       if ( $this->mTitle->getArticleID() ) {
+                       if ( $this->exists() ) {
                                $flags |= EDIT_UPDATE;
                        } else {
                                $flags |= EDIT_NEW;
@@ -1520,8 +1537,8 @@ class WikiPage implements Page, IDBAccessObject {
         * Change an existing article or create a new article. Updates RC and all necessary caches,
         * optionally via the deferred update array.
         *
-        * @param $text String: new text
-        * @param $summary String: edit summary
+        * @param string $text new text
+        * @param string $summary edit summary
         * @param $flags Integer bitfield:
         *      EDIT_NEW
         *          Article is known or assumed to be non-existent, create a new one
@@ -1578,7 +1595,7 @@ class WikiPage implements Page, IDBAccessObject {
         * optionally via the deferred update array.
         *
         * @param $content Content: new content
-        * @param $summary String: edit summary
+        * @param string $summary edit summary
         * @param $flags Integer bitfield:
         *      EDIT_NEW
         *          Article is known or assumed to be non-existent, create a new one
@@ -1688,7 +1705,7 @@ class WikiPage implements Page, IDBAccessObject {
                $editInfo = $this->prepareContentForEdit( $content, null, $user, $serialisation_format );
                $serialized = $editInfo->pst;
                $content = $editInfo->pstContent;
-               $newsize =  $content->getSize();
+               $newsize = $content->getSize();
 
                $dbw = wfGetDB( DB_MASTER );
                $now = wfTimestampNow();
@@ -2012,7 +2029,7 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @param $revision Revision object
         * @param $user User object that did the revision
-        * @param $options Array of options, following indexes are used:
+        * @param array $options of options, following indexes are used:
         * - changed: boolean, whether the revision changed the content (default true)
         * - created: boolean, whether the revision created the page (default false)
         * - oldcountable: boolean or null (default null):
@@ -2068,7 +2085,7 @@ class WikiPage implements Page, IDBAccessObject {
                        }
                }
 
-               if ( !$this->mTitle->exists() ) {
+               if ( !$this->exists() ) {
                        wfProfileOut( __METHOD__ );
                        return;
                }
@@ -2140,9 +2157,9 @@ class WikiPage implements Page, IDBAccessObject {
         * The article must already exist; link tables etc
         * are not updated, caches are not flushed.
         *
-        * @param $text String: text submitted
+        * @param string $text text submitted
         * @param $user User The relevant user
-        * @param $comment String: comment submitted
+        * @param string $comment comment submitted
         * @param $minor Boolean: whereas it's a minor modification
         *
         * @deprecated since 1.21, use doEditContent() instead.
@@ -2161,7 +2178,7 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @param $content Content: content submitted
         * @param $user User The relevant user
-        * @param $comment String: comment submitted
+        * @param string $comment comment submitted
         * @param $serialisation_format String: format for storing the content in the database
         * @param $minor Boolean: whereas it's a minor modification
         */
@@ -2191,10 +2208,10 @@ class WikiPage implements Page, IDBAccessObject {
         * Update the article's restriction field, and leave a log entry.
         * This works for protection both existing and non-existing pages.
         *
-        * @param $limit Array: set of restriction keys
+        * @param array $limit set of restriction keys
         * @param $reason String
         * @param &$cascade Integer. Set to false if cascading protection isn't allowed.
-        * @param $expiry Array: per restriction type expiration
+        * @param array $expiry per restriction type expiration
         * @param $user User The user updating the restrictions
         * @return Status
         */
@@ -2207,7 +2224,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                $restrictionTypes = $this->mTitle->getRestrictionTypes();
 
-               $id = $this->mTitle->getArticleID();
+               $id = $this->getId();
 
                if ( !$cascade ) {
                        $cascade = false;
@@ -2461,10 +2478,10 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * Deletes the article with database consistency, writes logs, purges caches
         *
-        * @param $reason string delete reason for deletion log
+        * @param string $reason delete reason for deletion log
         * @param $suppress boolean suppress all revisions and log the deletion in
         *        the suppression log instead of the deletion log
-        * @param $id int article ID
+        * @param int $id article ID
         * @param $commit boolean defaults to true, triggers transaction end
         * @param &$error Array of errors to append to
         * @param $user User The deleting user
@@ -2483,10 +2500,10 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @since 1.19
         *
-        * @param $reason string delete reason for deletion log
+        * @param string $reason delete reason for deletion log
         * @param $suppress boolean suppress all revisions and log the deletion in
         *        the suppression log instead of the deletion log
-        * @param $id int article ID
+        * @param int $id article ID
         * @param $commit boolean defaults to true, triggers transaction end
         * @param &$error Array of errors to append to
         * @param $user User The deleting user
@@ -2588,7 +2605,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Now that it's safely backed up, delete it
                $dbw->delete( 'page', array( 'page_id' => $id ), __METHOD__ );
-               $ok = ( $dbw->affectedRows() > 0 ); // getArticleID() uses slave, could be laggy
+               $ok = ( $dbw->affectedRows() > 0 ); // $id could be laggy
 
                if ( !$ok ) {
                        $dbw->rollback( __METHOD__ );
@@ -2620,7 +2637,7 @@ class WikiPage implements Page, IDBAccessObject {
        /**
         * Do some database updates after deletion
         *
-        * @param $id Int: page_id value of the page being deleted (B/C, currently unused)
+        * @param int $id page_id value of the page being deleted (B/C, currently unused)
         * @param $content Content: optional page content to be used when determining the required updates.
         *        This may be needed because $this->getContent() may already return null when the page proper was deleted.
         */
@@ -2635,11 +2652,8 @@ class WikiPage implements Page, IDBAccessObject {
                // Clear caches
                WikiPage::onArticleDelete( $this->mTitle );
 
-               // Reset this object
-               $this->clear();
-
-               // Clear the cached article id so the interface doesn't act like we exist
-               $this->mTitle->resetArticleID( 0 );
+               // Reset this object and the Title object
+               $this->loadFromRow( false, self::READ_LATEST );
        }
 
        /**
@@ -2651,12 +2665,12 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @todo: seperate the business/permission stuff out from backend code
         *
-        * @param $fromP String: Name of the user whose edits to rollback.
-        * @param $summary String: Custom summary. Set to default summary if empty.
-        * @param $token String: Rollback token.
+        * @param string $fromP Name of the user whose edits to rollback.
+        * @param string $summary Custom summary. Set to default summary if empty.
+        * @param string $token Rollback token.
         * @param $bot Boolean: If true, mark all reverted edits as bot.
         *
-        * @param $resultDetails Array: contains result-specific array of additional values
+        * @param array $resultDetails contains result-specific array of additional values
         *    'alreadyrolled' : 'current' (rev)
         *    success        : 'summary' (str), 'current' (rev), 'target' (rev)
         *
@@ -2700,11 +2714,11 @@ class WikiPage implements Page, IDBAccessObject {
         * rollback to the DB. Therefore, you should only call this function direct-
         * ly if you want to use custom permissions checks. If you don't, use
         * doRollback() instead.
-        * @param $fromP String: Name of the user whose edits to rollback.
-        * @param $summary String: Custom summary. Set to default summary if empty.
+        * @param string $fromP Name of the user whose edits to rollback.
+        * @param string $summary Custom summary. Set to default summary if empty.
         * @param $bot Boolean: If true, mark all reverted edits as bot.
         *
-        * @param $resultDetails Array: contains result-specific array of additional values
+        * @param array $resultDetails contains result-specific array of additional values
         * @param $guser User The user performing the rollback
         * @return array
         */
@@ -2943,7 +2957,7 @@ class WikiPage implements Page, IDBAccessObject {
         */
        public function getHiddenCategories() {
                $result = array();
-               $id = $this->mTitle->getArticleID();
+               $id = $this->getId();
 
                if ( $id == 0 ) {
                        return array();
@@ -2966,14 +2980,14 @@ class WikiPage implements Page, IDBAccessObject {
        }
 
        /**
-       * Return an applicable autosummary if one exists for the given edit.
-       * @param $oldtext String|null: the previous text of the page.
-       * @param $newtext String|null: The submitted text of the page.
-       * @param $flags Int bitmask: a bitmask of flags submitted for the edit.
-       * @return string An appropriate autosummary, or an empty string.
-       *
-       * @deprecated since 1.21, use ContentHandler::getAutosummary() instead
-       */
+        * Return an applicable autosummary if one exists for the given edit.
+        * @param string|null $oldtext the previous text of the page.
+        * @param string|null $newtext The submitted text of the page.
+        * @param int $flags bitmask: a bitmask of flags submitted for the edit.
+        * @return string An appropriate autosummary, or an empty string.
+        *
+        * @deprecated since 1.21, use ContentHandler::getAutosummary() instead
+        */
        public static function getAutosummary( $oldtext, $newtext, $flags ) {
                // NOTE: stub for backwards-compatibility. assumes the given text is wikitext. will break horribly if it isn't.
 
@@ -3001,8 +3015,8 @@ class WikiPage implements Page, IDBAccessObject {
         * Update all the appropriate counts in the category table, given that
         * we've added the categories $added and deleted the categories $deleted.
         *
-        * @param $added array   The names of categories that were added
-        * @param $deleted array The names of categories that were deleted
+        * @param array $added   The names of categories that were added
+        * @param array $deleted The names of categories that were deleted
         */
        public function updateCategoryCounts( $added, $deleted ) {
                $ns = $this->mTitle->getNamespace();
@@ -3030,7 +3044,7 @@ class WikiPage implements Page, IDBAccessObject {
                }
                $dbw->insert( 'category', $insertRows, __METHOD__, 'IGNORE' );
 
-               $addFields    = array( 'cat_pages = cat_pages + 1' );
+               $addFields = array( 'cat_pages = cat_pages + 1' );
                $removeFields = array( 'cat_pages = cat_pages - 1' );
 
                if ( $ns == NS_CATEGORY ) {
@@ -3058,6 +3072,15 @@ class WikiPage implements Page, IDBAccessObject {
                                __METHOD__
                        );
                }
+
+               foreach( $added as $catName ) {
+                       $cat = Category::newFromName( $catName );
+                       wfRunHooks( 'CategoryAfterPageAdded', array( $cat, $this ) );
+               }
+               foreach( $deleted as $catName ) {
+                       $cat = Category::newFromName( $catName );
+                       wfRunHooks( 'CategoryAfterPageRemoved', array( $cat, $this ) );
+               }
        }
 
        /**
@@ -3078,7 +3101,7 @@ class WikiPage implements Page, IDBAccessObject {
                // are visible.
 
                // Get templates from templatelinks
-               $id = $this->mTitle->getArticleID();
+               $id = $this->getId();
 
                $tlTemplates = array();
 
@@ -3144,7 +3167,7 @@ class WikiPage implements Page, IDBAccessObject {
         * so we can do things like signatures and links-in-context.
         *
         * @deprecated in 1.19; use Parser::preSaveTransform() instead
-        * @param $text String article contents
+        * @param string $text article contents
         * @param $user User object: user doing the edit
         * @param $popts ParserOptions object: parser options, default options for
         *               the user loaded if null given
@@ -3191,10 +3214,10 @@ class WikiPage implements Page, IDBAccessObject {
         * Update the article's restriction field, and leave a log entry.
         *
         * @deprecated since 1.19
-        * @param $limit Array: set of restriction keys
+        * @param array $limit set of restriction keys
         * @param $reason String
         * @param &$cascade Integer. Set to false if cascading protection isn't allowed.
-        * @param $expiry Array: per restriction type expiration
+        * @param array $expiry per restriction type expiration
         * @param $user User The user updating the restrictions
         * @return bool true on success
         */
index 158a6b5..032493d 100644 (file)
@@ -30,16 +30,16 @@ class Xml {
         * Strings are assumed to not contain XML-illegal characters; special
         * characters (<, >, &) are escaped but illegals are not touched.
         *
-        * @param $element String: element name
-        * @param $attribs Array: Name=>value pairs. Values will be escaped.
-        * @param $contents String: NULL to make an open tag only; '' for a contentless closed tag (default)
-        * @param $allowShortTag Bool: whether '' in $contents will result in a contentless closed tag
+        * @param string $element element name
+        * @param array $attribs Name=>value pairs. Values will be escaped.
+        * @param string $contents NULL to make an open tag only; '' for a contentless closed tag (default)
+        * @param bool $allowShortTag whether '' in $contents will result in a contentless closed tag
         * @return string
         */
        public static function element( $element, $attribs = null, $contents = '', $allowShortTag = true ) {
                $out = '<' . $element;
                if( !is_null( $attribs ) ) {
-                       $out .=  self::expandAttributes( $attribs );
+                       $out .= self::expandAttributes( $attribs );
                }
                if( is_null( $contents ) ) {
                        $out .= '>';
@@ -58,7 +58,7 @@ class Xml {
         * to set the XML attributes : attributename="value".
         * The values are passed to Sanitizer::encodeAttribute.
         * Return null if no attributes given.
-        * @param $attribs Array of attributes for an XML element
+        * @param array $attribs of attributes for an XML element
         * @throws MWException
         * @return null|string
         */
@@ -82,8 +82,8 @@ class Xml {
         * is passed.
         *
         * @param $element String:
-        * @param $attribs Array: Name=>value pairs. Values will be escaped.
-        * @param $contents String: NULL to make an open tag only; '' for a contentless closed tag (default)
+        * @param array $attribs Name=>value pairs. Values will be escaped.
+        * @param string $contents NULL to make an open tag only; '' for a contentless closed tag (default)
         * @return string
         */
        public static function elementClean( $element, $attribs = array(), $contents = '' ) {
@@ -102,8 +102,8 @@ class Xml {
        /**
         * This opens an XML element
         *
-        * @param $element String name of the element
-        * @param $attribs array of attributes, see Xml::expandAttributes()
+        * @param string $element name of the element
+        * @param array $attribs of attributes, see Xml::expandAttributes()
         * @return string
         */
        public static function openElement( $element, $attribs = null ) {
@@ -112,7 +112,7 @@ class Xml {
 
        /**
         * Shortcut to close an XML element
-        * @param $element String element name
+        * @param string $element element name
         * @return string
         */
        public static function closeElement( $element ) { return "</$element>"; }
@@ -121,9 +121,9 @@ class Xml {
         * Same as Xml::element(), but does not escape contents. Handy when the
         * content you have is already valid xml.
         *
-        * @param $element String element name
-        * @param $attribs array of attributes
-        * @param $contents String content of the element
+        * @param string $element element name
+        * @param array $attribs of attributes
+        * @param string $contents content of the element
         * @return string
         */
        public static function tags( $element, $attribs = null, $contents ) {
@@ -136,7 +136,7 @@ class Xml {
         * @param $selected Mixed: Namespace which should be pre-selected
         * @param $all Mixed: Value of an item denoting all namespaces, or null to omit
         * @param $element_name String: value of the "name" attribute of the select tag
-        * @param $label String: optional label to add to the field
+        * @param string $label optional label to add to the field
         * @return string
         * @deprecated since 1.19
         */
@@ -157,8 +157,8 @@ class Xml {
         * Create a date selector
         *
         * @param $selected Mixed: the month which should be selected, default ''
-        * @param $allmonths String: value of a special item denoting all month. Null to not include (default)
-        * @param $id String: Element identifier
+        * @param string $allmonths value of a special item denoting all month. Null to not include (default)
+        * @param string $id Element identifier
         * @return String: Html string containing the month selector
         */
        public static function monthSelector( $selected = '', $allmonths = null, $id = 'month' ) {
@@ -256,9 +256,9 @@ class Xml {
 
        /**
         * Shortcut to make a span element
-        * @param $text String content of the element, will be escaped
-        * @param $class String class name of the span element
-        * @param $attribs array other attributes
+        * @param string $text content of the element, will be escaped
+        * @param string $class class name of the span element
+        * @param array $attribs other attributes
         * @return string
         */
        public static function span( $text, $class, $attribs = array() ) {
@@ -267,10 +267,10 @@ class Xml {
 
        /**
         * Shortcut to make a specific element with a class attribute
-        * @param $text string content of the element, will be escaped
-        * @param $class string class name of the span element
-        * @param $tag string element name
-        * @param $attribs array other attributes
+        * @param string $text content of the element, will be escaped
+        * @param string $class class name of the span element
+        * @param string $tag element name
+        * @param array $attribs other attributes
         * @return string
         */
        public static function wrapClass( $text, $class, $tag = 'span', $attribs = array() ) {
@@ -279,10 +279,10 @@ class Xml {
 
        /**
         * Convenience function to build an HTML text input field
-        * @param $name String value of the name attribute
-        * @param $size int value of the size attribute
+        * @param string $name value of the name attribute
+        * @param int $size value of the size attribute
         * @param $value mixed value of the value attribute
-        * @param $attribs array other attributes
+        * @param array $attribs other attributes
         * @return string HTML
         */
        public static function input( $name, $size = false, $value = false, $attribs = array() ) {
@@ -301,10 +301,10 @@ class Xml {
 
        /**
         * Convenience function to build an HTML password input field
-        * @param $name string value of the name attribute
-        * @param $size int value of the size attribute
+        * @param string $name value of the name attribute
+        * @param int $size value of the size attribute
         * @param $value mixed value of the value attribute
-        * @param $attribs array other attributes
+        * @param array $attribs other attributes
         * @return string HTML
         */
        public static function password( $name, $size = false, $value = false, $attribs = array() ) {
@@ -325,9 +325,9 @@ class Xml {
 
        /**
         * Convenience function to build an HTML checkbox
-        * @param $name String value of the name attribute
-        * @param $checked Bool Whether the checkbox is checked or not
-        * @param $attribs Array other attributes
+        * @param string $name value of the name attribute
+        * @param bool $checked Whether the checkbox is checked or not
+        * @param array $attribs other attributes
         * @return string HTML
         */
        public static function check( $name, $checked = false, $attribs=array() ) {
@@ -342,10 +342,10 @@ class Xml {
 
        /**
         * Convenience function to build an HTML radio button
-        * @param $name String value of the name attribute
-        * @param $value String value of the value attribute
-        * @param $checked Bool Whether the checkbox is checked or not
-        * @param $attribs Array other attributes
+        * @param string $name value of the name attribute
+        * @param string $value value of the value attribute
+        * @param bool $checked Whether the checkbox is checked or not
+        * @param array $attribs other attributes
         * @return string HTML
         */
        public static function radio( $name, $value, $checked = false, $attribs = array() ) {
@@ -357,9 +357,9 @@ class Xml {
 
        /**
         * Convenience function to build an HTML form label
-        * @param $label String text of the label
+        * @param string $label text of the label
         * @param $id
-        * @param $attribs Array an attribute array.  This will usuall be
+        * @param array $attribs an attribute array.  This will usuall be
         *     the same array as is passed to the corresponding input element,
         *     so this function will cherry-pick appropriate attributes to
         *     apply to the label as well; only class and title are applied.
@@ -381,12 +381,12 @@ class Xml {
 
        /**
         * Convenience function to build an HTML text input field with a label
-        * @param $label String text of the label
-        * @param $name String value of the name attribute
-        * @param $id String id of the input
-        * @param $size Int|Bool value of the size attribute
-        * @param $value String|Bool value of the value attribute
-        * @param $attribs array other attributes
+        * @param string $label text of the label
+        * @param string $name value of the name attribute
+        * @param string $id id of the input
+        * @param int|Bool $size value of the size attribute
+        * @param string|Bool $value value of the value attribute
+        * @param array $attribs other attributes
         * @return string HTML
         */
        public static function inputLabel( $label, $name, $id, $size=false, $value=false, $attribs = array() ) {
@@ -450,8 +450,8 @@ class Xml {
 
        /**
         * Convenience function to build an HTML submit button
-        * @param $value String: label text for the button
-        * @param $attribs Array: optional custom attributes
+        * @param string $value label text for the button
+        * @param array $attribs optional custom attributes
         * @return string HTML
         */
        public static function submitButton( $value, $attribs = array() ) {
@@ -460,10 +460,10 @@ class Xml {
 
        /**
         * Convenience function to build an HTML drop-down list item.
-        * @param $text String: text for this item
-        * @param $value String: form submission value; if empty, use text
+        * @param string $text text for this item
+        * @param string $value form submission value; if empty, use text
         * @param $selected boolean: if true, will be the default selected item
-        * @param $attribs array: optional additional HTML attributes
+        * @param array $attribs optional additional HTML attributes
         * @return string HTML
         */
        public static function option( $text, $value=null, $selected = false,
@@ -542,9 +542,9 @@ class Xml {
        /**
         * Shortcut for creating fieldsets.
         *
-        * @param $legend string|bool Legend of the fieldset. If evaluates to false, legend is not added.
-        * @param $content string Pre-escaped content for the fieldset. If false, only open fieldset is returned.
-        * @param $attribs array Any attributes to fieldset-element.
+        * @param string|bool $legend Legend of the fieldset. If evaluates to false, legend is not added.
+        * @param string $content Pre-escaped content for the fieldset. If false, only open fieldset is returned.
+        * @param array $attribs Any attributes to fieldset-element.
         *
         * @return string
         */
@@ -566,11 +566,11 @@ class Xml {
        /**
         * Shortcut for creating textareas.
         *
-        * @param $name string The 'name' for the textarea
-        * @param $content string Content for the textarea
-        * @param $cols int The number of columns for the textarea
-        * @param $rows int The number of rows for the textarea
-        * @param $attribs array Any other attributes for the textarea
+        * @param string $name The 'name' for the textarea
+        * @param string $content Content for the textarea
+        * @param int $cols The number of columns for the textarea
+        * @param int $rows The number of rows for the textarea
+        * @param array $attribs Any other attributes for the textarea
         *
         * @return string
         */
@@ -590,7 +590,7 @@ class Xml {
         * for JavaScript source code.
         * Illegal control characters are assumed not to be present.
         *
-        * @param $string String to escape
+        * @param string $string to escape
         * @return String
         */
        public static function escapeJsString( $string ) {
@@ -673,9 +673,9 @@ class Xml {
         * Create a call to a JavaScript function. The supplied arguments will be
         * encoded using Xml::encodeJsVar().
         *
-        * @param $name String The name of the function to call, or a JavaScript expression
+        * @param string $name The name of the function to call, or a JavaScript expression
         *    which evaluates to a function object which is called.
-        * @param $args Array of arguments to pass to the function.
+        * @param array $args of arguments to pass to the function.
         *
         * @since 1.17
         *
@@ -693,7 +693,7 @@ class Xml {
         * Check if a string is well-formed XML.
         * Must include the surrounding tag.
         *
-        * @param $text String: string to test.
+        * @param string $text string to test.
         * @return bool
         *
         * @todo Error position reporting return
@@ -740,7 +740,7 @@ class Xml {
         * Replace " > and < with their respective HTML entities ( &quot;,
         * &gt;, &lt;)
         *
-        * @param $in String: text that might contain HTML tags.
+        * @param string $in text that might contain HTML tags.
         * @return string Escaped string
         */
        public static function escapeTagsOnly( $in ) {
@@ -751,12 +751,12 @@ class Xml {
        }
 
        /**
-       * Generate a form (without the opening form element).
-       * Output optionally includes a submit button.
-       * @param $fields Array Associative array, key is message corresponding to a description for the field (colon is in the message), value is appropriate input.
-       * @param $submitLabel String A message containing a label for the submit button.
-       * @return string HTML form.
-       */
+        * Generate a form (without the opening form element).
+        * Output optionally includes a submit button.
+        * @param array $fields Associative array, key is message corresponding to a description for the field (colon is in the message), value is appropriate input.
+        * @param string $submitLabel A message containing a label for the submit button.
+        * @return string HTML form.
+        */
        public static function buildForm( $fields, $submitLabel = null ) {
                $form = '';
                $form .= "<table><tbody>";
@@ -783,9 +783,9 @@ class Xml {
 
        /**
         * Build a table of data
-        * @param $rows array An array of arrays of strings, each to be a row in a table
-        * @param $attribs array An array of attributes to apply to the table tag [optional]
-        * @param $headers array An array of strings to use as table headers [optional]
+        * @param array $rows An array of arrays of strings, each to be a row in a table
+        * @param array $attribs An array of attributes to apply to the table tag [optional]
+        * @param array $headers An array of strings to use as table headers [optional]
         * @return string
         */
        public static function buildTable( $rows, $attribs = array(), $headers = null ) {
@@ -823,8 +823,8 @@ class Xml {
 
        /**
         * Build a row for a table
-        * @param $attribs array An array of attributes to apply to the tr tag
-        * @param $cells array An array of strings to put in <td>
+        * @param array $attribs An array of attributes to apply to the tr tag
+        * @param array $cells An array of strings to put in <td>
         * @return string
         */
        public static function buildTableRow( $attribs, $cells ) {
index b95dd6a..2e18460 100644 (file)
@@ -40,7 +40,7 @@ class XmlTypeCheck {
        public $rootElement = '';
 
        /**
-        * @param $file string filename
+        * @param string $file filename
         * @param $filterCallback callable (optional)
         *        Function to call to do additional custom validity checks from the
         *        SAX element handler event. This gives you access to the element
index 4299841..b9c3d6b 100644 (file)
@@ -100,8 +100,8 @@ class ZhClient {
        /**
         * Convert the input to a different language variant
         *
-        * @param $text String: input text
-        * @param $tolang String: language variant
+        * @param string $text input text
+        * @param string $tolang language variant
         * @return string the converted text
         */
        function convert( $text, $tolang ) {
@@ -117,7 +117,7 @@ class ZhClient {
        /**
         * Convert the input to all possible variants
         *
-        * @param $text String: input text
+        * @param string $text input text
         * @return array langcode => converted_string
         */
        function convertToAllVariants( $text ) {
@@ -142,7 +142,7 @@ class ZhClient {
        /**
         * Perform word segmentation
         *
-        * @param $text String: input text
+        * @param string $text input text
         * @return string segmented text
         */
        function segment( $text ) {
index fc36b1f..a24c01b 100644 (file)
@@ -34,10 +34,10 @@ class ZipDirectoryReader {
         *
         * Because this class is aimed at verification, an error is raised on
         * suspicious or ambiguous input, instead of emulating some standard
-        * behaviour.
+        * behavior.
         *
-        * @param $fileName string The archive file name
-        * @param $callback Array The callback function. It will be called for each file
+        * @param string $fileName The archive file name
+        * @param array $callback The callback function. It will be called for each file
         *   with a single associative array each time, with members:
         *
         *      - name: The file name. Directories conventionally have a trailing
@@ -47,7 +47,7 @@ class ZipDirectoryReader {
         *
         *      - size: The uncompressed file size
         *
-        * @param $options Array An associative array of read options, with the option
+        * @param array $options An associative array of read options, with the option
         *    name in the key. This may currently contain:
         *
         *      - zip64: If this is set to true, then we will emulate a
@@ -494,8 +494,8 @@ class ZipDirectoryReader {
         * Get the file contents from a given offset. If there are not enough bytes
         * in the file to satisfy the request, an exception will be thrown.
         *
-        * @param $start int The byte offset of the start of the block.
-        * @param $length int The number of bytes to return. If omitted, the remainder
+        * @param int $start The byte offset of the start of the block.
+        * @param int $length The number of bytes to return. If omitted, the remainder
         *    of the file will be returned.
         *
         * @return string
@@ -570,7 +570,7 @@ class ZipDirectoryReader {
                $size = 0;
                foreach ( $struct as $type ) {
                        if ( is_array( $type ) ) {
-                               list( $typeName, $fieldSize ) = $type;
+                               list( , $fieldSize ) = $type;
                                $size += $fieldSize;
                        } else {
                                $size += $type;
@@ -583,9 +583,9 @@ class ZipDirectoryReader {
         * Unpack a binary structure. This is like the built-in unpack() function
         * except nicer.
         *
-        * @param $string string The binary data input
+        * @param string $string The binary data input
         *
-        * @param $struct array An associative array giving structure members and their
+        * @param array $struct An associative array giving structure members and their
         *    types. In the key is the field name. The value may be either an
         *    integer, in which case the field is a little-endian unsigned integer
         *    encoded in the given number of bytes, or an array, in which case the
@@ -594,7 +594,7 @@ class ZipDirectoryReader {
         *       - "string": The second array element gives the length of string.
         *          Not null terminated.
         *
-        * @param $offset int The offset into the string at which to start unpacking.
+        * @param int $offset The offset into the string at which to start unpacking.
         *
         * @throws MWException
         * @return array Unpacked associative array. Note that large integers in the input
@@ -651,7 +651,7 @@ class ZipDirectoryReader {
         * boolean.
         *
         * @param $value integer
-        * @param $bitIndex int The index of the bit, where 0 is the LSB.
+        * @param int $bitIndex The index of the bit, where 0 is the LSB.
         * @return bool
         */
        function testBit( $value, $bitIndex ) {
index 7369755..4d3c41b 100644 (file)
@@ -58,8 +58,8 @@ class CreditsAction extends FormlessAction {
        /**
         * Get a list of contributors
         *
-        * @param $cnt Int: maximum list of contributors to show
-        * @param $showIfMax Bool: whether to contributors if there more than $cnt
+        * @param int $cnt maximum list of contributors to show
+        * @param bool $showIfMax whether to contributors if there more than $cnt
         * @return String: html
         */
        public function getCredits( $cnt, $showIfMax = true ) {
@@ -100,8 +100,8 @@ class CreditsAction extends FormlessAction {
 
        /**
         * Get a list of contributors of $article
-        * @param $cnt Int: maximum list of contributors to show
-        * @param $showIfMax Bool: whether to contributors if there more than $cnt
+        * @param int $cnt maximum list of contributors to show
+        * @param bool $showIfMax whether to contributors if there more than $cnt
         * @return String: html
         */
        protected function getContributors( $cnt, $showIfMax ) {
index 23855ae..2312550 100644 (file)
@@ -147,9 +147,9 @@ class HistoryAction extends FormlessAction {
                /**
                 * Add date selector to quickly get to a certain time
                 */
-               $year        = $request->getInt( 'year' );
-               $month       = $request->getInt( 'month' );
-               $tagFilter   = $request->getVal( 'tagfilter' );
+               $year = $request->getInt( 'year' );
+               $month = $request->getInt( 'month' );
+               $tagFilter = $request->getVal( 'tagfilter' );
                $tagSelector = ChangeTags::buildTagFilterSelector( $tagFilter );
 
                /**
@@ -243,7 +243,7 @@ class HistoryAction extends FormlessAction {
        /**
         * Output a subscription feed listing recent edits to this page.
         *
-        * @param $type String: feed type
+        * @param string $type feed type
         */
        function feed( $type ) {
                global $wgFeedClasses, $wgFeedLimit;
@@ -511,8 +511,8 @@ class HistoryPager extends ReverseChronologicalPager {
        /**
         * Creates a submit button
         *
-        * @param $message String: text of the submit button, will be escaped
-        * @param $attributes Array: attributes
+        * @param string $message text of the submit button, will be escaped
+        * @param array $attributes attributes
         * @return String: HTML output for the submit button
         */
        function submitButton( $message, $attributes = array() ) {
index d943f99..1e312d7 100644 (file)
@@ -137,9 +137,9 @@ class InfoAction extends FormlessAction {
        /**
         * Adds a row to a table that will be added to the content.
         *
-        * @param $table string The table that will be added to the content
-        * @param $name string The name of the row
-        * @param $value string The value of the row
+        * @param string $table The table that will be added to the content
+        * @param string $name The name of the row
+        * @param string $value The value of the row
         * @return string The table with the row added
         */
        protected function addRow( $table, $name, $value ) {
@@ -152,8 +152,8 @@ class InfoAction extends FormlessAction {
        /**
         * Adds a table to the content that will be added to the output.
         *
-        * @param $content string The content that will be added to the output
-        * @param $table string The table
+        * @param string $content The content that will be added to the output
+        * @param string $table The table
         * @return string The content with the table added
         */
        protected function addTable( $content, $table ) {
index 9e48e3a..ee6f2c0 100644 (file)
@@ -80,8 +80,8 @@ abstract class ApiBase extends ContextSource {
        /**
         * Constructor
         * @param $mainModule ApiMain object
-        * @param $moduleName string Name of this module
-        * @param $modulePrefix string Prefix to use for parameter names
+        * @param string $moduleName Name of this module
+        * @param string $modulePrefix Prefix to use for parameter names
         */
        public function __construct( $mainModule, $moduleName, $modulePrefix = '' ) {
                $this->mMainModule = $mainModule;
@@ -135,7 +135,6 @@ abstract class ApiBase extends ContextSource {
                return $this->mModuleName;
        }
 
-
        /**
         * Get the module manager, or null if this module has no sub-modules
         * @since 1.21
@@ -190,7 +189,7 @@ abstract class ApiBase extends ContextSource {
         * @return ApiResult
         */
        public function getResult() {
-               // Main module has getResult() method overriden
+               // Main module has getResult() method overridden
                // Safety - avoid infinite loop:
                if ( $this->isMain() ) {
                        ApiBase::dieDebug( __METHOD__, 'base method was called on main module. ' );
@@ -225,7 +224,7 @@ abstract class ApiBase extends ContextSource {
         * section to notice any changes in API. Multiple calls to this
         * function will result in the warning messages being separated by
         * newlines
-        * @param $warning string Warning message
+        * @param string $warning Warning message
         */
        public function setWarning( $warning ) {
                $result = $this->getResult();
@@ -341,8 +340,8 @@ abstract class ApiBase extends ContextSource {
        }
 
        /**
-        * @param $prefix string Text to split output items
-        * @param $title string What is being output
+        * @param string $prefix Text to split output items
+        * @param string $title What is being output
         * @param $input string|array
         * @return string
         */
@@ -429,7 +428,7 @@ abstract class ApiBase extends ContextSource {
                                                        if ( $t === '' ) {
                                                                $nothingPrompt = 'Can be empty, or ';
                                                        } else {
-                                                               $choices[] =  $t;
+                                                               $choices[] = $t;
                                                        }
                                                }
                                                $desc .= $paramPrefix . $nothingPrompt . $prompt;
@@ -550,7 +549,7 @@ abstract class ApiBase extends ContextSource {
         * Get final list of parameters, after hooks have had a chance to
         * tweak it as needed.
         *
-        * @param $flags int Zero or more flags like GET_VALUES_FOR_HELP
+        * @param int $flags Zero or more flags like GET_VALUES_FOR_HELP
         * @return array|Bool False on no parameters
         * @since 1.21 $flags param added
         */
@@ -583,7 +582,7 @@ abstract class ApiBase extends ContextSource {
         * The array can also contain a boolean under the key PROP_LIST,
         * indicating whether the result is a list.
         *
-        * Don't call this functon directly: use getFinalResultProperties() to
+        * Don't call this function directly: use getFinalResultProperties() to
         * allow hooks to modify descriptions as needed.
         *
         * @return array|bool False on no properties
@@ -632,7 +631,7 @@ abstract class ApiBase extends ContextSource {
        /**
         * This method mangles parameter name based on the prefix supplied to the constructor.
         * Override this method to change parameter name during runtime
-        * @param $paramName string Parameter name
+        * @param string $paramName Parameter name
         * @return string Prefixed parameter name
         */
        public function encodeParamName( $paramName ) {
@@ -667,8 +666,8 @@ abstract class ApiBase extends ContextSource {
 
        /**
         * Get a value for the given parameter
-        * @param $paramName string Parameter name
-        * @param $parseLimit bool see extractRequestParams()
+        * @param string $paramName Parameter name
+        * @param bool $parseLimit see extractRequestParams()
         * @return mixed Parameter value
         */
        protected function getParameter( $paramName, $parseLimit = true ) {
@@ -679,7 +678,7 @@ abstract class ApiBase extends ContextSource {
 
        /**
         * Die if none or more than one of a certain set of parameters is set and not false.
-        * @param $params array of parameter names
+        * @param array $params of parameter names
         */
        public function requireOnlyOneParameter( $params ) {
                $required = func_get_args();
@@ -747,7 +746,7 @@ abstract class ApiBase extends ContextSource {
 
        /**
         * @param $params array
-        * @param $load bool|string Whether load the object's state from the database:
+        * @param bool|string $load Whether load the object's state from the database:
         *        - false: don't load (if the pageid is given, it will still be loaded)
         *        - 'fromdb': load from a slave database
         *        - 'fromdbmaster': load from the master database
@@ -796,7 +795,7 @@ abstract class ApiBase extends ContextSource {
        }
 
        /**
-        * Callback function used in requireOnlyOneParameter to check whether reequired parameters are set
+        * Callback function used in requireOnlyOneParameter to check whether required parameters are set
         *
         * @param  $x object Parameter to check is not null/false
         * @return bool
@@ -817,9 +816,9 @@ abstract class ApiBase extends ContextSource {
 
        /**
         * Return true if we're to watch the page, false if not, null if no change.
-        * @param $watchlist String Valid values: 'watch', 'unwatch', 'preferences', 'nochange'
+        * @param string $watchlist Valid values: 'watch', 'unwatch', 'preferences', 'nochange'
         * @param $titleObj Title the page under consideration
-        * @param $userOption String The user option to consider when $watchlist=preferences.
+        * @param string $userOption The user option to consider when $watchlist=preferences.
         *      If not set will magically default to either watchdefault or watchcreations
         * @return bool
         */
@@ -839,7 +838,7 @@ abstract class ApiBase extends ContextSource {
                                if ( $userWatching ) {
                                        return true;
                                }
-                               # If no user option was passed, use watchdefault or watchcreation
+                               # If no user option was passed, use watchdefault or watchcreations
                                if ( is_null( $userOption ) ) {
                                        $userOption = $titleObj->exists()
                                                        ? 'watchdefault' : 'watchcreations';
@@ -857,9 +856,9 @@ abstract class ApiBase extends ContextSource {
 
        /**
         * Set a watch (or unwatch) based the based on a watchlist parameter.
-        * @param $watch String Valid values: 'watch', 'unwatch', 'preferences', 'nochange'
+        * @param string $watch Valid values: 'watch', 'unwatch', 'preferences', 'nochange'
         * @param $titleObj Title the article's title to change
-        * @param $userOption String The user option to consider when $watch=preferences
+        * @param string $userOption The user option to consider when $watch=preferences
         */
        protected function setWatch( $watch, $titleObj, $userOption = null ) {
                $value = $this->getWatchlistValue( $watch, $titleObj, $userOption );
@@ -878,8 +877,8 @@ abstract class ApiBase extends ContextSource {
        /**
         * Using the settings determine the value for the given parameter
         *
-        * @param $paramName String: parameter name
-        * @param $paramSettings array|mixed default value or an array of settings
+        * @param string $paramName parameter name
+        * @param array|mixed $paramSettings default value or an array of settings
         *  using PARAM_* constants.
         * @param $parseLimit Boolean: parse limit?
         * @return mixed Parameter value
@@ -966,7 +965,6 @@ abstract class ApiBase extends ContextSource {
                                                if ( $required && $value === '' ) {
                                                        $this->dieUsageMsg( array( 'missingparam', $paramName ) );
                                                }
-
                                                break;
                                        case 'integer': // Force everything using intval() and optionally validate limits
                                                $min = isset ( $paramSettings[self::PARAM_MIN] ) ? $paramSettings[self::PARAM_MIN] : null;
@@ -1023,20 +1021,12 @@ abstract class ApiBase extends ContextSource {
                                                }
                                                break;
                                        case 'user':
-                                               if ( !is_array( $value ) ) {
-                                                       $value = array( $value );
-                                               }
-
-                                               foreach ( $value as $key => $val ) {
-                                                       $title = Title::makeTitleSafe( NS_USER, $val );
-                                                       if ( is_null( $title ) ) {
-                                                               $this->dieUsage( "Invalid value for user parameter $encParamName", "baduser_{$encParamName}" );
+                                               if ( is_array( $value ) ) {
+                                                       foreach ( $value as $key => $val ) {
+                                                               $value[$key] = $this->validateUser( $val, $encParamName );
                                                        }
-                                                       $value[$key] = $title->getText();
-                                               }
-
-                                               if ( !$multi ) {
-                                                       $value = $value[0];
+                                               } else {
+                                                       $value = $this->validateUser( $value, $encParamName );
                                                }
                                                break;
                                        case 'upload': // nothing to do
@@ -1047,7 +1037,7 @@ abstract class ApiBase extends ContextSource {
                        }
 
                        // Throw out duplicates if requested
-                       if ( is_array( $value ) && !$dupes ) {
+                       if ( !$dupes && is_array( $value ) ) {
                                $value = array_unique( $value );
                        }
 
@@ -1066,10 +1056,10 @@ abstract class ApiBase extends ContextSource {
         * Return an array of values that were given in a 'a|b|c' notation,
         * after it optionally validates them against the list allowed values.
         *
-        * @param $valueName string The name of the parameter (for error
+        * @param string $valueName The name of the parameter (for error
         *  reporting)
         * @param $value mixed The value being parsed
-        * @param $allowMultiple bool Can $value contain more than one value
+        * @param bool $allowMultiple Can $value contain more than one value
         *  separated by '|'?
         * @param $allowedValues mixed An array of values to check against. If
         *  null, all values are accepted.
@@ -1121,11 +1111,11 @@ abstract class ApiBase extends ContextSource {
        /**
         * Validate the value against the minimum and user/bot maximum limits.
         * Prints usage info on failure.
-        * @param $paramName string Parameter name
-        * @param $value int Parameter value
-        * @param $min int|null Minimum value
-        * @param $max int|null Maximum value for users
-        * @param $botMax int Maximum value for sysops/bots
+        * @param string $paramName Parameter name
+        * @param int $value Parameter value
+        * @param int|null $min Minimum value
+        * @param int|null $max Maximum value for users
+        * @param int $botMax Maximum value for sysops/bots
         * @param $enforceLimits Boolean Whether to enforce (die) if value is outside limits
         */
        function validateLimit( $paramName, &$value, $min, $max, $botMax = null, $enforceLimits = false ) {
@@ -1159,18 +1149,33 @@ abstract class ApiBase extends ContextSource {
        }
 
        /**
-        * @param $value string
-        * @param $paramName string
-        * @return string
+        * Validate and normalize of parameters of type 'timestamp'
+        * @param string $value Parameter value
+        * @param string $encParamName Parameter name
+        * @return string Validated and normalized parameter
         */
-       function validateTimestamp( $value, $paramName ) {
+       function validateTimestamp( $value, $encParamName ) {
                $unixTimestamp = wfTimestamp( TS_UNIX, $value );
                if ( $unixTimestamp === false ) {
-                       $this->dieUsage( "Invalid value '$value' for timestamp parameter $paramName", "badtimestamp_{$paramName}" );
+                       $this->dieUsage( "Invalid value '$value' for timestamp parameter $encParamName", "badtimestamp_{$encParamName}" );
                }
                return wfTimestamp( TS_MW, $unixTimestamp );
        }
 
+       /**
+        * Validate and normalize of parameters of type 'user'
+        * @param string $value Parameter value
+        * @param string $encParamName Parameter value
+        * @return string Validated and normalized parameter
+        */
+       private function validateUser( $value, $encParamName ) {
+               $title = Title::makeTitleSafe( NS_USER, $value );
+               if ( $title === null ) {
+                       $this->dieUsage( "Invalid value '$value' for user parameter $encParamName", "baduser_{$encParamName}" );
+               }
+               return $title->getText();
+       }
+
        /**
         * Adds a warning to the output, else dies
         *
@@ -1187,8 +1192,8 @@ abstract class ApiBase extends ContextSource {
 
        /**
         * Truncate an array to a certain length.
-        * @param $arr array Array to truncate
-        * @param $limit int Maximum length
+        * @param array $arr Array to truncate
+        * @param int $limit Maximum length
         * @return bool True if the array was truncated, false otherwise
         */
        public static function truncateArray( &$arr, $limit ) {
@@ -1204,12 +1209,12 @@ abstract class ApiBase extends ContextSource {
         * Throw a UsageException, which will (if uncaught) call the main module's
         * error handler and die with an error message.
         *
-        * @param $description string One-line human-readable description of the
+        * @param string $description One-line human-readable description of the
         *   error condition, e.g., "The API requires a valid action parameter"
-        * @param $errorCode string Brief, arbitrary, stable string to allow easy
+        * @param string $errorCode Brief, arbitrary, stable string to allow easy
         *   automated identification of the error, e.g., 'unknown_action'
-        * @param $httpRespCode int HTTP response code
-        * @param $extradata array Data to add to the "<error>" element; array in ApiResult format
+        * @param int $httpRespCode HTTP response code
+        * @param array $extradata Data to add to the "<error>" element; array in ApiResult format
         * @throws UsageException
         */
        public function dieUsage( $description, $errorCode, $httpRespCode = 0, $extradata = null ) {
@@ -1269,7 +1274,7 @@ abstract class ApiBase extends ContextSource {
                'badipaddress' => array( 'code' => 'invalidip', 'info' => "Invalid IP address specified" ),
                'ipb_expiry_invalid' => array( 'code' => 'invalidexpiry', 'info' => "Invalid expiry time" ),
                'ipb_already_blocked' => array( 'code' => 'alreadyblocked', 'info' => "The user you tried to block was already blocked" ),
-               'ipb_blocked_as_range' => array( 'code' => 'blockedasrange', 'info' => "IP address \"\$1\" was blocked as part of range \"\$2\". You can't unblock the IP invidually, but you can unblock the range as a whole." ),
+               'ipb_blocked_as_range' => array( 'code' => 'blockedasrange', 'info' => "IP address \"\$1\" was blocked as part of range \"\$2\". You can't unblock the IP individually, but you can unblock the range as a whole." ),
                'ipb_cant_unblock' => array( 'code' => 'cantunblock', 'info' => "The block you specified was not found. It may have been unblocked already" ),
                'mailnologin' => array( 'code' => 'cantsend', 'info' => "You are not logged in, you do not have a confirmed email address, or you are not allowed to send email to other users, so you cannot send email" ),
                'ipbblocked' => array( 'code' => 'ipbblocked', 'info' => 'You cannot block or unblock users while you are yourself blocked' ),
@@ -1434,7 +1439,7 @@ abstract class ApiBase extends ContextSource {
 
        /**
         * Return the error message related to a certain array
-        * @param $error array Element of a getUserPermissionsErrors()-style array
+        * @param array $error Element of a getUserPermissionsErrors()-style array
         * @return array('code' => code, 'info' => info)
         */
        public function parseMsg( $error ) {
@@ -1461,8 +1466,8 @@ abstract class ApiBase extends ContextSource {
 
        /**
         * Internal code errors should be reported with this method
-        * @param $method string Method or function name
-        * @param $message string Error message
+        * @param string $method Method or function name
+        * @param string $message Error message
         */
        protected static function dieDebug( $method, $message ) {
                wfDebugDieBacktrace( "Internal error in $method: $message" );
@@ -1599,7 +1604,7 @@ abstract class ApiBase extends ContextSource {
 
        /**
         * Parses a list of errors into a standardised format
-        * @param $errors array List of errors. Items can be in the for array( key, param1, param2, ... ) or array( 'code' => ..., 'info' => ... )
+        * @param array $errors List of errors. Items can be in the for array( key, param1, param2, ... ) or array( 'code' => ..., 'info' => ... )
         * @return array Parsed list of errors with items in the form array( 'code' => ..., 'info' => ... )
         */
        public function parseErrors( $errors ) {
@@ -1736,8 +1741,8 @@ abstract class ApiBase extends ContextSource {
        /**
         * Debugging function that prints a value and an optional backtrace
         * @param $value mixed Value to print
-        * @param $name string Description of the printed value
-        * @param $backtrace bool If true, print a backtrace
+        * @param string $name Description of the printed value
+        * @param bool $backtrace If true, print a backtrace
         */
        public static function debugPrint( $value, $name = 'unknown', $backtrace = false ) {
                print "\n\n<pre><b>Debugging value '$name':</b>\n\n";
index b479310..90432b9 100644 (file)
@@ -25,9 +25,9 @@
  */
 
 /**
-* API module that facilitates the blocking of users. Requires API write mode
-* to be enabled.
-*
+ * API module that facilitates the blocking of users. Requires API write mode
+ * to be enabled.
+ *
  * @ingroup API
  */
 class ApiBlock extends ApiBase {
index 7a36ce8..3f059d6 100644 (file)
@@ -108,8 +108,10 @@ class ApiCreateAccount extends ApiBase {
 
                $apiResult = $this->getResult();
 
-               if( $status->hasMessage( 'sessionfailure' ) ) {
-                       // Token was incorrect, so add it to result, but don't throw an exception.
+               if( $status->hasMessage( 'sessionfailure' ) || $status->hasMessage( 'nocookiesfornew' ) ) {
+                       // Token was incorrect, so add it to result, but don't throw an exception
+                       // since not having the correct token is part of the normal
+                       // flow of events.
                        $result['token'] = LoginForm::getCreateaccountToken();
                        $result['result'] = 'needtoken';
                } elseif( !$status->isOK() ) {
@@ -230,7 +232,6 @@ class ApiCreateAccount extends ApiBase {
        public function getPossibleErrors() {
                $localErrors = array(
                        'wrongpassword',
-                       'sessionfailure',
                        'sorbs_create_account_reason',
                        'noname',
                        'userexists',
index 422524d..d1f0806 100644 (file)
@@ -99,8 +99,8 @@ class ApiDelete extends ApiBase {
         *
         * @param $page Page|WikiPage object to work on
         * @param $user User doing the action
-        * @param $token String delete token (same as edit token)
-        * @param $reason String|null reason for the deletion. Autogenerated if NULL
+        * @param string $token delete token (same as edit token)
+        * @param string|null $reason reason for the deletion. Autogenerated if NULL
         * @return Status|array
         */
        public static function delete( Page $page, User $user, $token, &$reason = null ) {
index 1b9df68..cba3489 100644 (file)
@@ -58,6 +58,8 @@ class ApiEditPage extends ApiBase {
                                // array_shift( $titles );
 
                                $redirValues = array();
+
+                               /** @var $newTitle Title */
                                foreach ( $titles as $id => $newTitle ) {
 
                                        if ( !isset( $titles[$id - 1] ) ) {
@@ -257,7 +259,7 @@ class ApiEditPage extends ApiBase {
                if ( !is_null( $params['starttimestamp'] ) && $params['starttimestamp'] != '' ) {
                        $requestArray['wpStarttime'] = wfTimestamp( TS_MW, $params['starttimestamp'] );
                } else {
-                       $requestArray['wpStarttime'] = wfTimestampNow();        // Fake wpStartime
+                       $requestArray['wpStarttime'] = wfTimestampNow(); // Fake wpStartime
                }
 
                if ( $params['minor'] || ( !$params['notminor'] && $user->getOption( 'minordefault' ) ) )       {
@@ -304,6 +306,7 @@ class ApiEditPage extends ApiBase {
                $articleContext->setWikiPage( $pageObj );
                $articleContext->setUser( $this->getUser() );
 
+               /** @var $articleObject Article */
                $articleObject = Article::newFromWikiPage( $pageObj, $articleContext );
 
                $ep = new EditPage( $articleObject );
@@ -393,6 +396,7 @@ class ApiEditPage extends ApiBase {
 
                        case EditPage::AS_SUCCESS_NEW_ARTICLE:
                                $r['new'] = '';
+                               // fall-through
 
                        case EditPage::AS_SUCCESS_UPDATE:
                                $r['result'] = 'Success';
@@ -632,10 +636,8 @@ class ApiEditPage extends ApiBase {
 
        public function getExamples() {
                return array(
-
                        'api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&basetimestamp=20070824123454&token=%2B\\'
                                => 'Edit a page (anonymous user)',
-
                        'api.php?action=edit&title=Test&summary=NOTOC&minor=&prependtext=__NOTOC__%0A&basetimestamp=20070824123454&token=%2B\\'
                                => 'Prepend __NOTOC__ to a page (anonymous user)',
                        'api.php?action=edit&title=Test&undo=13585&undoafter=13579&basetimestamp=20070824123454&token=%2B\\'
index a3b4682..6c793b3 100644 (file)
@@ -61,9 +61,6 @@ class ApiFeedWatchlist extends ApiBase {
                        if( !isset( $wgFeedClasses[$params['feedformat']] ) ) {
                                $this->dieUsage( 'Invalid subscription feed type', 'feed-invalid' );
                        }
-                       if ( !is_null( $params['wlexcludeuser'] ) ) {
-                               $fauxReqArr['wlexcludeuser'] = $params['wlexcludeuser'];
-                       }
 
                        // limit to the number of hours going from now back
                        $endTime = wfTimestamp( TS_MW, time() - intval( $params['hours'] * 60 * 60 ) );
@@ -80,12 +77,15 @@ class ApiFeedWatchlist extends ApiBase {
                                'wllimit' => ( 50 > $wgFeedLimit ) ? $wgFeedLimit : 50
                        );
 
-                       if ( !is_null( $params['wlowner'] ) ) {
+                       if ( $params['wlowner'] !== null ) {
                                $fauxReqArr['wlowner'] = $params['wlowner'];
                        }
-                       if ( !is_null( $params['wltoken'] ) ) {
+                       if ( $params['wltoken'] !== null ) {
                                $fauxReqArr['wltoken'] = $params['wltoken'];
                        }
+                       if ( $params['wlexcludeuser'] !== null ) {
+                               $fauxReqArr['wlexcludeuser'] = $params['wlexcludeuser'];
+                       }
 
                        // Support linking to diffs instead of article
                        if ( $params['linktodiffs'] ) {
index a24953a..d8aa163 100644 (file)
@@ -38,7 +38,7 @@ abstract class ApiFormatBase extends ApiBase {
         * Constructor
         * If $format ends with 'fm', pretty-print the output in HTML.
         * @param $main ApiMain
-        * @param $format string Format name
+        * @param string $format Format name
         */
        public function __construct( $main, $format ) {
                parent::__construct( $main, $format );
@@ -83,7 +83,7 @@ abstract class ApiFormatBase extends ApiBase {
         * special-case fix that should be removed once the help has been
         * reworked to use a fully HTML interface.
         *
-        * @param $b bool Whether or not ampersands should be escaped.
+        * @param bool $b Whether or not ampersands should be escaped.
         */
        public function setUnescapeAmps ( $b ) {
                $this->mUnescapeAmps = $b;
@@ -127,7 +127,7 @@ abstract class ApiFormatBase extends ApiBase {
         * A human-targeted notice about available formats is printed for the HTML-based output,
         * except for help screens (caused by either an error in the API parameters,
         * the calling of action=help, or requesting the root script api.php).
-        * @param $isHelpScreen bool Whether a help screen is going to be shown
+        * @param bool $isHelpScreen Whether a help screen is going to be shown
         */
        function initPrinter( $isHelpScreen ) {
                if ( $this->mDisabled ) {
@@ -326,7 +326,7 @@ class ApiFormatFeedWrapper extends ApiFormatBase {
         * Call this method to initialize output data. See execute()
         * @param $result ApiResult
         * @param $feed object an instance of one of the $wgFeedClasses classes
-        * @param $feedItems array of FeedItem objects
+        * @param array $feedItems of FeedItem objects
         */
        public static function setResult( $result, $feed, $feedItems ) {
                // Store output in the Result data.
index 19c5e5f..abb6348 100644 (file)
@@ -85,7 +85,7 @@ class ApiFormatJson extends ApiFormatBase {
 
        public function getDescription() {
                if ( $this->mIsRaw ) {
-                       return 'Output data with the debuging elements in JSON format' . parent::getDescription();
+                       return 'Output data with the debugging elements in JSON format' . parent::getDescription();
                } else {
                        return 'Output data in JSON format' . parent::getDescription();
                }
diff --git a/includes/api/ApiImageRotate.php b/includes/api/ApiImageRotate.php
new file mode 100644 (file)
index 0000000..f9c8058
--- /dev/null
@@ -0,0 +1,216 @@
+<?php
+/**
+ *
+ * Created on January 3rd, 2013
+ *
+ * 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
+ *
+ * @file
+ */
+
+class ApiImageRotate extends ApiBase {
+
+       private $mPageSet = null;
+
+       public function __construct( $main, $action ) {
+               parent::__construct( $main, $action );
+       }
+
+       /**
+        * Add all items from $values into the result
+        * @param array $result output
+        * @param array $values values to add
+        * @param string $flag the name of the boolean flag to mark this element
+        * @param string $name if given, name of the value
+        */
+       private static function addValues( array &$result, $values, $flag = null, $name = null ) {
+               foreach ( $values as $val ) {
+                       if( $val instanceof Title ) {
+                               $v = array();
+                               ApiQueryBase::addTitleInfo( $v, $val );
+                       } elseif( $name !== null ) {
+                               $v = array( $name => $val );
+                       } else {
+                               $v = $val;
+                       }
+                       if( $flag !== null ) {
+                               $v[$flag] = '';
+                       }
+                       $result[] = $v;
+               }
+       }
+
+
+       public function execute() {
+               $params = $this->extractRequestParams();
+               $rotation = $params[ 'rotation' ];
+               $user = $this->getUser();
+
+               if( is_null( $rotation ) || $rotation % 90 ) {
+                       $this->dieUsage( "Rotation: {$rotation}", 'rotation must be multiple of 90 degrees' );
+               }
+
+               $pageSet = $this->getPageSet();
+               $pageSet->execute();
+
+               $result = array();
+               $result = array();
+
+               self::addValues( $result, $pageSet->getInvalidTitles(), 'invalid', 'title' );
+               self::addValues( $result, $pageSet->getSpecialTitles(), 'special', 'title' );
+               self::addValues( $result, $pageSet->getMissingPageIDs(), 'missing', 'pageid' );
+               self::addValues( $result, $pageSet->getMissingRevisionIDs(), 'missing', 'revid' );
+               self::addValues( $result, $pageSet->getMissingTitles(), 'missing' );
+               self::addValues( $result, $pageSet->getInterwikiTitlesAsResult() );
+
+               foreach ( $pageSet->getTitles() as $title ) {
+                       $file = wfFindFile( $title );
+
+                       $r = array();
+                       $r[ 'title' ] = $title->getFullText();
+                       if ( !$file ) {
+                               $r['missing'] = '';
+                               $r['result'] = 'Failure';
+                               $result[] = $r;
+                               continue;
+                       }
+                       $handler = $file->getHandler();
+                       if ( !$handler || !$handler->canRotate() ) {
+                               $r['invalid'] = '';
+                               $r['result'] = 'Failure';
+                               $result[] = $r;
+                               continue;
+                       }
+
+                       // Check whether we're allowed to rotate this file
+                       $this->checkPermissions( $this->getUser(), $file->getTitle() );
+
+                       $srcPath = $file->getLocalRefPath();
+                       $ext = strtolower( pathinfo( "$srcPath", PATHINFO_EXTENSION ) );
+                       $tmpFile = TempFSFile::factory( 'rotate_', $ext);
+                       $dstPath = $tmpFile->getPath();
+                       $err = $handler->rotate( $file, array(
+                               "srcPath" => $srcPath,
+                               "dstPath" => $dstPath,
+                               "rotation"=> $rotation
+                       ) );
+                       if ( !$err ) {
+                               $comment = wfMessage( 'rotate-comment' )->numParams( $rotation )->text();
+                               $status = $file->upload( $dstPath,
+                                       $comment, $comment, 0, false, false, $this->getUser() );
+                               if ( $status->isGood() ) {
+                                       $r['result'] = 'Success';
+                               } else {
+                                       $r['result'] = 'Failure';
+                                       $r['errormessage'] = $this->getResult()->convertStatusToArray( $status );
+                               }
+                       } else {
+                               $r['result'] = 'Failure';
+                               $r['errormessage'] = $err->toText();
+                       }
+                       $result[] = $r;
+               }
+               $apiResult = $this->getResult();
+               $apiResult->setIndexedTagName( $result, 'page' );
+               $apiResult->addValue( null, $this->getModuleName(), $result );
+       }
+
+       /**
+        * Get a cached instance of an ApiPageSet object
+        * @return ApiPageSet
+        */
+       private function getPageSet() {
+               if ( $this->mPageSet === null ) {
+                       $this->mPageSet = new ApiPageSet( $this, 0, NS_FILE );
+               }
+               return $this->mPageSet;
+       }
+
+       /**
+        * Checks that the user has permissions to perform rotations.
+        * Dies with usage message on inadequate permissions.
+        * @param $user User The user to check.
+        */
+       protected function checkPermissions( $user, $title ) {
+               $permissionErrors = array_merge(
+                       $title->getUserPermissionsErrors( 'edit' , $user ),
+                       $title->getUserPermissionsErrors( 'upload' , $user )
+               );
+
+               if ( $permissionErrors ) {
+                       $this->dieUsageMsg( $permissionErrors[0] );
+               }
+       }
+
+       public function mustBePosted() {
+               return true;
+       }
+
+       public function isWriteMode() {
+               return true;
+       }
+
+       public function getAllowedParams( $flags = 0 ) {
+               $pageSet = $this->getPageSet();
+               $result = array(
+                       'rotation' => array(
+                               ApiBase::PARAM_DFLT => 0,
+                       ),
+                       'token' => array(
+                               ApiBase::PARAM_TYPE => 'string',
+                               ApiBase::PARAM_REQUIRED => true
+                       ),
+               );
+               if ( $flags ) {
+                       $result += $this->getPageSet()->getFinalParams( $flags );
+               }
+               return $result;
+       }
+
+       public function getParamDescription() {
+               $pageSet = $this->getPageSet();
+               return $pageSet->getParamDescription() + array(
+                       'rotation' => 'Degrees to rotate image, values can be 0, 90, 180 or 270',
+                       'token' => 'Edit token. You can get one of these through prop=info',
+               );
+       }
+
+       public function getDescription() {
+               return 'Rotate one or more images';
+       }
+
+       public function needsToken() {
+               return true;
+       }
+
+       public function getTokenSalt() {
+               return '';
+       }
+
+       public function getPossibleErrors() {
+               $pageSet = $this->getPageSet();
+               return array_merge(
+                       parent::getPossibleErrors(),
+                       $pageSet->getPossibleErrors()
+               );
+       }
+
+       public function getExamples() {
+               return array(
+                       'api.php?action=imagerotate&titles=Example.jpg&rotation=90&token=+\\',
+               );
+       }
+}
index 3df952f..b936d3b 100644 (file)
@@ -38,7 +38,7 @@ class ApiLogin extends ApiBase {
 
        /**
         * Executes the log-in attempt using the parameters passed. If
-        * the log-in succeeeds, it attaches a cookie to the session
+        * the log-in succeeds, it attaches a cookie to the session
         * and outputs the user id, username, and session token. If a
         * log-in fails, as the result of a bad password, a nonexistent
         * user, or any other reason, the host is cached with an expiry
@@ -147,7 +147,7 @@ class ApiLogin extends ApiBase {
 
                        case LoginForm::ABORTED:
                                $result['result'] = 'Aborted';
-                               $result['reason'] =  $loginForm->mAbortLoginErrorMsg;
+                               $result['reason'] = $loginForm->mAbortLoginErrorMsg;
                                break;
 
                        default:
index 7053ef3..80bca2f 100644 (file)
@@ -83,6 +83,7 @@ class ApiMain extends ApiBase {
                'import' => 'ApiImport',
                'userrights' => 'ApiUserrights',
                'options' => 'ApiOptions',
+               'imagerotate' =>'ApiImageRotate',
        );
 
        /**
@@ -144,7 +145,7 @@ class ApiMain extends ApiBase {
         * Constructs an instance of ApiMain that utilizes the module and format specified by $request.
         *
         * @param $context IContextSource|WebRequest - if this is an instance of FauxRequest, errors are thrown and no printing occurs
-        * @param $enableWrite bool should be set to true if the api may modify data
+        * @param bool $enableWrite should be set to true if the api may modify data
         */
        public function __construct( $context = null, $enableWrite = false ) {
                if ( $context === null ) {
@@ -244,7 +245,7 @@ class ApiMain extends ApiBase {
        /**
         * Set the type of caching headers which will be sent.
         *
-        * @param $mode String One of:
+        * @param string $mode One of:
         *    - 'public':     Cache this object in public caches, if the maxage or smaxage
         *         parameter is set, or if setCacheMaxAge() was called. If a maximum age is
         *         not provided by any of these means, the object will be private.
@@ -273,7 +274,7 @@ class ApiMain extends ApiBase {
                        return;
                }
 
-               if ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) ) {
+               if ( !User::groupHasPermission( '*', 'read' ) ) {
                        // Private wiki, only private headers
                        if ( $mode !== 'private' ) {
                                wfDebug( __METHOD__ . ": ignoring request for $mode cache mode, private wiki\n" );
@@ -479,9 +480,9 @@ class ApiMain extends ApiBase {
 
        /**
         * Attempt to match an Origin header against a set of rules and a set of exceptions
-        * @param $value string Origin header
-        * @param $rules array Set of wildcard rules
-        * @param $exceptions array Set of wildcard rules
+        * @param string $value Origin header
+        * @param array $rules Set of wildcard rules
+        * @param array $exceptions Set of wildcard rules
         * @return bool True if $value matches a rule in $rules and doesn't match any rules in $exceptions, false otherwise
         */
        protected static function matchOrigin( $value, $rules, $exceptions ) {
@@ -504,7 +505,7 @@ class ApiMain extends ApiBase {
         * '*' => '.*?'
         * '?' => '.'
         *
-        * @param $wildcard string String with wildcards
+        * @param string $wildcard String with wildcards
         * @return string Regular expression
         */
        protected static function wildcardToRegex( $wildcard ) {
@@ -736,7 +737,7 @@ class ApiMain extends ApiBase {
        /**
         * Check the max lag if necessary
         * @param $module ApiBase object: Api module being used
-        * @param $params Array an array containing the request parameters.
+        * @param array $params an array containing the request parameters.
         * @return boolean True on success, false should exit immediately
         */
        protected function checkMaxLag( $module, $params ) {
@@ -768,7 +769,7 @@ class ApiMain extends ApiBase {
         */
        protected function checkExecutePermissions( $module ) {
                $user = $this->getUser();
-               if ( $module->isReadMode() && !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) &&
+               if ( $module->isReadMode() && !User::groupHasPermission( '*', 'read' ) &&
                        !$user->isAllowed( 'read' ) )
                {
                        $this->dieUsageMsg( 'readrequired' );
@@ -795,7 +796,7 @@ class ApiMain extends ApiBase {
        /**
         * Check POST for external response and setup result printer
         * @param $module ApiBase An Api module
-        * @param $params Array an array with the request parameters
+        * @param array $params an array with the request parameters
         */
        protected function setupExternalResponse( $module, $params ) {
                if ( !$this->getRequest()->wasPosted() && $module->mustBePosted() ) {
@@ -922,7 +923,7 @@ class ApiMain extends ApiBase {
         * Get a request upload, and register the fact that it was used, for logging.
         *
         * @since 1.21
-        * @param $name string Parameter name
+        * @param string $name Parameter name
         * @return WebRequestUpload
         */
        public function getUpload( $name ) {
@@ -1118,11 +1119,11 @@ class ApiMain extends ApiBase {
        protected function getCredits() {
                return array(
                        'API developers:',
-                       '    Roan Kattouw "<Firstname>.<Lastname>@gmail.com" (lead developer Sep 2007-present)',
+                       '    Roan Kattouw "<Firstname>.<Lastname>@gmail.com" (lead developer Sep 2007-2009)',
                        '    Victor Vasiliev - vasilvv at gee mail dot com',
                        '    Bryan Tong Minh - bryan . tongminh @ gmail . com',
                        '    Sam Reed - sam @ reedyboy . net',
-                       '    Yuri Astrakhan "<Firstname><Lastname>@gmail.com" (creator, lead developer Sep 2006-Sep 2007, 2012)',
+                       '    Yuri Astrakhan "<Firstname><Lastname>@gmail.com" (creator, lead developer Sep 2006-Sep 2007, 2012-present)',
                        '',
                        'Please send your comments, suggestions and questions to mediawiki-api@lists.wikimedia.org',
                        'or file a bug report at https://bugzilla.wikimedia.org/'
@@ -1210,7 +1211,7 @@ class ApiMain extends ApiBase {
 
        /**
         * @param $module ApiBase
-        * @param $paramName String What type of request is this? e.g. action, query, list, prop, meta, format
+        * @param string $paramName What type of request is this? e.g. action, query, list, prop, meta, format
         * @return string
         */
        public static function makeHelpMsgHeader( $module, $paramName ) {
@@ -1260,7 +1261,7 @@ class ApiMain extends ApiBase {
         * behavior of inherent ones.
         *
         * @deprecated since 1.21, Use getModuleManager()->addModule() instead.
-        * @param $name string The identifier for this module.
+        * @param string $name The identifier for this module.
         * @param $class ApiBase The class where this module is implemented.
         */
        protected function addModule( $name, $class ) {
@@ -1272,11 +1273,11 @@ class ApiMain extends ApiBase {
         * classes who wish to add to or modify current formatters.
         *
         * @deprecated since 1.21, Use getModuleManager()->addModule() instead.
-        * @param $name string The identifier for this format.
+        * @param string $name The identifier for this format.
         * @param $class ApiFormatBase The class implementing this format.
         */
        protected function addFormat( $name, $class ) {
-               $this->getModuleManager->addModule( $name, 'format', $class );
+               $this->getModuleManager()->addModule( $name, 'format', $class );
        }
 
        /**
index db1d36d..100392b 100644 (file)
@@ -62,9 +62,9 @@ class ApiModuleManager extends ContextSource {
         * classes who wish to add their own modules to their lexicon or override the
         * behavior of inherent ones.
         *
-        * @param $group string Name of the module group
-        * @param $name string The identifier for this module.
-        * @param $class string The class where this module is implemented.
+        * @param string $group Name of the module group
+        * @param string $name The identifier for this module.
+        * @param string $class The class where this module is implemented.
         */
        public function addModule( $name, $group, $class ) {
                $this->mGroups[$group] = null;
@@ -73,9 +73,9 @@ class ApiModuleManager extends ContextSource {
 
        /**
         * Get module instance by name, or instantiate it if it does not exist
-        * @param $moduleName string module name
-        * @param $group string optionally validate that the module is in a specific group
-        * @param $ignoreCache bool if true, force-creates a new instance and does not cache it
+        * @param string $moduleName module name
+        * @param string $group optionally validate that the module is in a specific group
+        * @param bool $ignoreCache if true, force-creates a new instance and does not cache it
         * @return mixed the new module instance, or null if failed
         */
        public function getModule( $moduleName, $group = null, $ignoreCache = false ) {
index faebcdc..8c996a2 100644 (file)
@@ -25,9 +25,9 @@
  */
 
 /**
-* API module that facilitates the changing of user's preferences.
-* Requires API write mode to be enabled.
-*
+ * API module that facilitates the changing of user's preferences.
+ * Requires API write mode to be enabled.
+ *
  * @ingroup API
  */
 class ApiOptions extends ApiBase {
@@ -80,7 +80,8 @@ class ApiOptions extends ApiBase {
                                        $validation = $field->validate( $value, $user->getOptions() );
                                        break;
                                case 'registered-multiselect':
-                                       // A key for a multiselect option.
+                               case 'registered-checkmatrix':
+                                       // A key for a multiselect or checkmatrix option.
                                        $validation = true;
                                        $value = $value !== null ? (bool) $value : null;
                                        break;
index 1bb7e47..bab59b7 100644 (file)
@@ -69,18 +69,21 @@ class ApiPageSet extends ApiBase {
        private $mFakePageId = -1;
        private $mCacheMode = 'public';
        private $mRequestedPageFields = array();
+       private $mDefaultNamespace = NS_MAIN;
 
        /**
         * Constructor
         * @param $dbSource ApiBase Module implementing getDB().
         *        Allows PageSet to reuse existing db connection from the shared state like ApiQuery.
-        * @param $flags int Zero or more flags like DISABLE_GENERATORS
+        * @param int $flags Zero or more flags like DISABLE_GENERATORS
+        * @param int $defaultNamespace the namespace to use if none is specified by a prefix.
         * @since 1.21 accepts $flags instead of two boolean values
         */
-       public function __construct( ApiBase $dbSource, $flags = 0 ) {
+       public function __construct( ApiBase $dbSource, $flags = 0, $defaultNamespace = NS_MAIN ) {
                parent::__construct( $dbSource->getMain(), $dbSource->getModuleName() );
                $this->mDbSource = $dbSource;
                $this->mAllowGenerator = ( $flags & ApiPageSet::DISABLE_GENERATORS ) == 0;
+               $this->mDefaultNamespace = $defaultNamespace;
 
                $this->profileIn();
                $this->mParams = $this->extractRequestParams();
@@ -217,7 +220,7 @@ class ApiPageSet extends ApiBase {
        /**
         * Request an additional field from the page table.
         * Must be called before execute()
-        * @param $fieldName string Field name
+        * @param string $fieldName Field name
         */
        public function requestField( $fieldName ) {
                $this->mRequestedPageFields[$fieldName] = null;
@@ -226,7 +229,7 @@ class ApiPageSet extends ApiBase {
        /**
         * Get the value of a custom field previously requested through
         * requestField()
-        * @param $fieldName string Field name
+        * @param string $fieldName Field name
         * @return mixed Field value
         */
        public function getCustomField( $fieldName ) {
@@ -510,7 +513,7 @@ class ApiPageSet extends ApiBase {
 
        /**
         * Populate this PageSet from a list of Titles
-        * @param $titles array of Title objects
+        * @param array $titles of Title objects
         */
        public function populateFromTitles( $titles ) {
                $this->profileIn();
@@ -520,7 +523,7 @@ class ApiPageSet extends ApiBase {
 
        /**
         * Populate this PageSet from a list of page IDs
-        * @param $pageIDs array of page IDs
+        * @param array $pageIDs of page IDs
         */
        public function populateFromPageIDs( $pageIDs ) {
                $this->profileIn();
@@ -541,7 +544,7 @@ class ApiPageSet extends ApiBase {
 
        /**
         * Populate this PageSet from a list of revision IDs
-        * @param $revIDs array of revision IDs
+        * @param array $revIDs of revision IDs
         */
        public function populateFromRevisionIDs( $revIDs ) {
                $this->profileIn();
@@ -594,7 +597,7 @@ class ApiPageSet extends ApiBase {
         * #5 Substitute the original LinkBatch object with the new list
         * #6 Repeat from step #1
         *
-        * @param $titles array of Title objects or strings
+        * @param array $titles of Title objects or strings
         */
        private function initFromTitles( $titles ) {
                // Get validated and normalized title objects
@@ -621,7 +624,7 @@ class ApiPageSet extends ApiBase {
 
        /**
         * Does the same as initFromTitles(), but is based on page IDs instead
-        * @param $pageids array of page IDs
+        * @param array $pageids of page IDs
         */
        private function initFromPageIds( $pageids ) {
                if ( !$pageids ) {
@@ -647,7 +650,7 @@ class ApiPageSet extends ApiBase {
                        $this->profileDBOut();
                }
 
-               $this->initFromQueryResult( $res, $remaining, false );  // process PageIDs
+               $this->initFromQueryResult( $res, $remaining, false ); // process PageIDs
 
                // Resolve any found redirects
                $this->resolvePendingRedirects();
@@ -657,9 +660,9 @@ class ApiPageSet extends ApiBase {
         * Iterate through the result of the query on 'page' table,
         * and for each row create and store title object and save any extra fields requested.
         * @param $res ResultWrapper DB Query result
-        * @param $remaining array of either pageID or ns/title elements (optional).
+        * @param array $remaining of either pageID or ns/title elements (optional).
         *        If given, any missing items will go to $mMissingPageIDs and $mMissingTitles
-        * @param $processTitles bool Must be provided together with $remaining.
+        * @param bool $processTitles Must be provided together with $remaining.
         *        If true, treat $remaining as an array of [ns][title]
         *        If false, treat it as an array of [pageIDs]
         */
@@ -728,7 +731,7 @@ class ApiPageSet extends ApiBase {
        /**
         * Does the same as initFromTitles(), but is based on revision IDs
         * instead
-        * @param $revids array of revision IDs
+        * @param array $revids of revision IDs
         */
        private function initFromRevIDs( $revids ) {
                if ( !$revids ) {
@@ -879,35 +882,36 @@ class ApiPageSet extends ApiBase {
         * This method validates access rights for the title,
         * and appends normalization values to the output.
         *
-        * @param $titles array of Title objects or strings
+        * @param array $titles of Title objects or strings
         * @return LinkBatch
         */
        private function processTitlesArray( $titles ) {
-               $genderCache = GenderCache::singleton();
-               $genderCache->doTitlesArray( $titles, __METHOD__ );
-
+               $usernames = array();
                $linkBatch = new LinkBatch();
 
                foreach ( $titles as $title ) {
-                       $titleObj = is_string( $title ) ? Title::newFromText( $title ) : $title;
+                       if ( is_string( $title ) ) {
+                               $titleObj = Title::newFromText( $title, $this->mDefaultNamespace );
+                       } else {
+                               $titleObj = $title;
+                       }
                        if ( !$titleObj ) {
                                // Handle invalid titles gracefully
-                               $this->mAllpages[0][$title] = $this->mFakePageId;
+                               $this->mAllPages[0][$title] = $this->mFakePageId;
                                $this->mInvalidTitles[$this->mFakePageId] = $title;
                                $this->mFakePageId--;
                                continue; // There's nothing else we can do
                        }
                        $unconvertedTitle = $titleObj->getPrefixedText();
                        $titleWasConverted = false;
-                       $iw = $titleObj->getInterwiki();
-                       if ( strval( $iw ) !== '' ) {
+                       if ( $titleObj->isExternal() ) {
                                // This title is an interwiki link.
-                               $this->mInterwikiTitles[$titleObj->getPrefixedText()] = $iw;
+                               $this->mInterwikiTitles[$unconvertedTitle] = $titleObj->getInterwiki();
                        } else {
                                // Variants checking
                                global $wgContLang;
                                if ( $this->mConvertTitles &&
-                                               count( $wgContLang->getVariants() ) > 1  &&
+                                               count( $wgContLang->getVariants() ) > 1 &&
                                                !$titleObj->exists() ) {
                                        // Language::findVariantLink will modify titleText and titleObj into
                                        // the canonical variant if possible
@@ -941,7 +945,15 @@ class ApiPageSet extends ApiBase {
                        } elseif ( is_string( $title ) && $title !== $titleObj->getPrefixedText() ) {
                                $this->mNormalizedTitles[$title] = $titleObj->getPrefixedText();
                        }
+
+                       // Need gender information
+                       if ( MWNamespace::hasGenderDistinction( $titleObj->getNamespace() ) ) {
+                               $usernames[] = $titleObj->getText();
+                       }
                }
+               // Get gender information
+               $genderCache = GenderCache::singleton();
+               $genderCache->doQuery( $usernames, __METHOD__ );
 
                return $linkBatch;
        }
index 6978a75..27f8cef 100644 (file)
@@ -69,7 +69,7 @@ class ApiParamInfo extends ApiBase {
         * @param array $params user parameters array
         * @param string $type parameter name
         * @param array $res store results in this array
-        * @param array $resultObj results object to set indexed tag.
+        * @param ApiResult $resultObj results object to set indexed tag.
         */
        private function addModulesInfo( $params, $type, &$res, $resultObj ) {
                if ( !is_array( $params[$type] ) ) {
@@ -291,7 +291,7 @@ class ApiParamInfo extends ApiBase {
                                $retval['props'][] = $propResult;
                        }
 
-                       // default is true for query modules, false for other modules, overriden by ApiBase::PROP_LIST
+                       // default is true for query modules, false for other modules, overridden by ApiBase::PROP_LIST
                        if ( $listResult === true || ( $listResult !== false && $obj instanceof ApiQueryBase ) ) {
                                $retval['listresult'] = '';
                        }
index ec8bfee..09b7a88 100644 (file)
@@ -68,7 +68,7 @@ class ApiParse extends ApiBase {
                // TODO: Does this still need $wgTitle?
                global $wgParser, $wgTitle;
 
-               // Currently unnecessary, code to act as a safeguard against any change in current behaviour of uselang
+               // Currently unnecessary, code to act as a safeguard against any change in current behavior of uselang
                $oldLang = null;
                if ( isset( $params['uselang'] ) && $params['uselang'] != $this->getContext()->getLanguage()->getCode() ) {
                        $oldLang = $this->getContext()->getLanguage(); // Backup language
index 95fdbce..503c692 100644 (file)
@@ -174,7 +174,7 @@ class ApiProtect extends ApiBase {
                        'token' => 'A protect token previously retrieved through prop=info',
                        'protections' => 'List of protection levels, formatted action=group (e.g. edit=sysop)',
                        'expiry' => array( 'Expiry timestamps. If only one timestamp is set, it\'ll be used for all protections.',
-                                       'Use \'infinite\', \'indefinite\' or \'never\', for a neverexpiring protection.' ),
+                                       'Use \'infinite\', \'indefinite\' or \'never\', for a never-expiring protection.' ),
                        'reason' => 'Reason for (un)protecting',
                        'cascade' => array( 'Enable cascading protection (i.e. protect pages included in this page)',
                                        'Ignored if not all protection levels are \'sysop\' or \'protect\'' ),
index bd92077..134f4a0 100644 (file)
@@ -35,10 +35,10 @@ class ApiPurge extends ApiBase {
 
        /**
         * Add all items from $values into the result
-        * @param $result array output
-        * @param $values array values to add
-        * @param $flag string the name of the boolean flag to mark this element
-        * @param $name string if given, name of the value
+        * @param array $result output
+        * @param array $values values to add
+        * @param string $flag the name of the boolean flag to mark this element
+        * @param string $name if given, name of the value
         */
        private static function addValues( array &$result, $values, $flag = null, $name = null ) {
                foreach ( $values as $val ) {
index 832284f..f69ad23 100644 (file)
@@ -150,9 +150,9 @@ class ApiQuery extends ApiBase {
         * If no such connection has been requested before, it will be created.
         * Subsequent calls with the same $name will return the same connection
         * as the first, regardless of the values of $db and $groups
-        * @param $name string Name to assign to the database connection
-        * @param $db int One of the DB_* constants
-        * @param $groups array Query groups
+        * @param string $name Name to assign to the database connection
+        * @param int $db One of the DB_* constants
+        * @param array $groups Query groups
         * @return DatabaseBase
         */
        public function getNamedDB( $name, $db, $groups ) {
@@ -201,7 +201,7 @@ class ApiQuery extends ApiBase {
        /**
         * Get whether the specified module is a prop, list or a meta query module
         * @deprecated since 1.21, use getModuleManager()->getModuleGroup()
-        * @param $moduleName string Name of the module to find type for
+        * @param string $moduleName Name of the module to find type for
         * @return mixed string or null
         */
        function getModuleType( $moduleName ) {
@@ -433,8 +433,8 @@ class ApiQuery extends ApiBase {
 
        /**
         * Create instances of all modules requested by the client
-        * @param $modules Array to append instantiated modules to
-        * @param $param string Parameter name to read modules from
+        * @param array $modules to append instantiated modules to
+        * @param string $param Parameter name to read modules from
         */
        private function instantiateModules( &$modules, $param ) {
                if ( isset( $this->mParams[$param] ) ) {
@@ -507,6 +507,7 @@ class ApiQuery extends ApiBase {
                        );
                }
                // Report special pages
+               /** @var $title Title */
                foreach ( $pageSet->getSpecialTitles() as $fakeId => $title ) {
                        $vals = array();
                        ApiQueryBase::addTitleInfo( $vals, $title );
@@ -576,6 +577,7 @@ class ApiQuery extends ApiBase {
                $titles = $pageSet->getGoodTitles();
                if ( count( $titles ) ) {
                        $user = $this->getUser();
+                       /** @var $title Title */
                        foreach ( $titles as $title ) {
                                if ( $title->userCan( 'read', $user ) ) {
                                        $exportTitles[] = $title;
@@ -662,7 +664,7 @@ class ApiQuery extends ApiBase {
 
        /**
         * For all modules of a given group, generate help messages and join them together
-        * @param $group string Module group
+        * @param string $group Module group
         * @return string
         */
        private function makeHelpMsgHelper( $group ) {
index adf2037..e24b162 100644 (file)
@@ -42,7 +42,7 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
 
        /**
         * Override parent method to make sure the repo's DB is used
-        * which may not necesarilly be the same as the local DB.
+        * which may not necessarily be the same as the local DB.
         *
         * TODO: allow querying non-local repos.
         * @return DatabaseBase
index b0ecca8..0555a39 100644 (file)
@@ -39,8 +39,7 @@ class ApiQueryAllMessages extends ApiQueryBase {
                $params = $this->extractRequestParams();
 
                if ( is_null( $params['lang'] ) ) {
-                       global $wgLang;
-                       $langObj = $wgLang;
+                       $langObj = $this->getLanguage();
                } else {
                        $langObj = Language::factory( $params['lang'] );
                }
index 0c6692a..d718b96 100644 (file)
@@ -117,7 +117,7 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
                if ( count( $params['prtype'] ) || $params['prexpiry'] != 'all' ) {
                        $this->addTables( 'page_restrictions' );
                        $this->addWhere( 'page_id=pr_page' );
-                       $this->addWhere( 'pr_expiry>' . $db->addQuotes( $db->timestamp() ) );
+                       $this->addWhere( "pr_expiry > {$db->addQuotes( $db->timestamp() )} OR pr_expiry IS NULL" );
 
                        if ( count( $params['prtype'] ) ) {
                                $this->addWhereFld( 'pr_type', $params['prtype'] );
@@ -135,8 +135,6 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
                                } elseif ( $params['prfiltercascade'] == 'noncascading' ) {
                                        $this->addWhereFld( 'pr_cascade', 0 );
                                }
-
-                               $this->addOption( 'DISTINCT' );
                        }
                        $forceNameTitleIndex = false;
 
@@ -146,6 +144,8 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
                                $this->addWhere( "pr_expiry != {$db->addQuotes( $db->getInfinity() )}" );
                        }
 
+                       $this->addOption( 'DISTINCT' );
+
                } elseif ( isset( $params['prlevel'] ) ) {
                        $this->dieUsage( 'prlevel may not be used without prtype', 'params' );
                }
@@ -347,7 +347,7 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
                                'Show info about 4 pages starting at the letter "T"',
                        ),
                        'api.php?action=query&generator=allpages&gaplimit=2&gapfilterredir=nonredirects&gapfrom=Re&prop=revisions&rvprop=content' => array(
-                               'Show content of first 2 non-redirect pages begining at "Re"',
+                               'Show content of first 2 non-redirect pages beginning at "Re"',
                        )
                );
        }
index 37f2b0f..7283aa0 100644 (file)
@@ -37,7 +37,7 @@ class ApiQueryAllUsers extends ApiQueryBase {
        /**
         * This function converts the user name to a canonical form
         * which is stored in the database.
-        * @param String $name
+        * @param string $name
         * @return String
         */
        private function getCanonicalUserName( $name ) {
@@ -161,7 +161,7 @@ class ApiQueryAllUsers extends ApiQueryBase {
                        $this->addFields( array( 'recentedits' => 'COUNT(*)' ) );
 
                        $this->addWhere( 'rc_log_type IS NULL OR rc_log_type != ' . $db->addQuotes( 'newusers' ) );
-                       $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $wgActiveUserDays*24*3600 );
+                       $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $wgActiveUserDays * 24 * 3600 );
                        $this->addWhere( 'rc_timestamp >= ' . $db->addQuotes( $timestamp ) );
 
                        $this->addOption( 'GROUP BY', $userFieldToSort );
@@ -279,7 +279,7 @@ class ApiQueryAllUsers extends ApiQueryBase {
                        if ( $fld_rights ) {
                                if ( !isset( $lastUserData['rights'] ) ) {
                                        if ( $lastUserObj ) {
-                                               $lastUserData['rights'] =  User::getGroupPermissions( $lastUserObj->getAutomaticGroups() );
+                                               $lastUserData['rights'] = User::getGroupPermissions( $lastUserObj->getAutomaticGroups() );
                                        } else {
                                                // This should not normally happen
                                                $lastUserData['rights'] = array();
index 0df2899..3ef6b84 100644 (file)
@@ -188,6 +188,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                $titleWhere = array();
                $allRedirNs = array();
                $allRedirDBkey = array();
+               /** @var $t Title */
                foreach ( $this->redirTitles as $t ) {
                        $redirNs = $t->getNamespace();
                        $redirDBkey = $t->getDBkey();
@@ -201,6 +202,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
 
                if ( !is_null( $this->redirID ) ) {
                        $op = $this->params['dir'] == 'descending' ? '<' : '>';
+                       /** @var $first Title */
                        $first = $this->redirTitles[0];
                        $title = $db->addQuotes( $first->getDBkey() );
                        $ns = $first->getNamespace();
@@ -246,7 +248,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                $this->params = $this->extractRequestParams( false );
                $this->redirect = isset( $this->params['redirect'] ) && $this->params['redirect'];
                $userMax = ( $this->redirect ? ApiBase::LIMIT_BIG1 / 2 : ApiBase::LIMIT_BIG1 );
-               $botMax  = ( $this->redirect ? ApiBase::LIMIT_BIG2 / 2 : ApiBase::LIMIT_BIG2 );
+               $botMax = ( $this->redirect ? ApiBase::LIMIT_BIG2 / 2 : ApiBase::LIMIT_BIG2 );
 
                $result = $this->getResult();
 
index 1423c73..8cd4fde 100644 (file)
@@ -112,7 +112,7 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Add a set of fields to select to the internal array
-        * @param $value array|string Field name or array of field names
+        * @param array|string $value Field name or array of field names
         */
        protected function addFields( $value ) {
                if ( is_array( $value ) ) {
@@ -124,8 +124,8 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Same as addFields(), but add the fields only if a condition is met
-        * @param $value array|string See addFields()
-        * @param $condition bool If false, do nothing
+        * @param array|string $value See addFields()
+        * @param bool $condition If false, do nothing
         * @return bool $condition
         */
        protected function addFieldsIf( $value, $condition ) {
@@ -162,7 +162,7 @@ abstract class ApiQueryBase extends ApiBase {
        /**
         * Same as addWhere(), but add the WHERE clauses only if a condition is met
         * @param $value mixed See addWhere()
-        * @param $condition bool If false, do nothing
+        * @param bool $condition If false, do nothing
         * @return bool $condition
         */
        protected function addWhereIf( $value, $condition ) {
@@ -175,8 +175,8 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Equivalent to addWhere(array($field => $value))
-        * @param $field string Field name
-        * @param $value string Value; ignored if null or empty array;
+        * @param string $field Field name
+        * @param string $value Value; ignored if null or empty array;
         */
        protected function addWhereFld( $field, $value ) {
                // Use count() to its full documented capabilities to simultaneously
@@ -189,14 +189,14 @@ abstract class ApiQueryBase extends ApiBase {
        /**
         * Add a WHERE clause corresponding to a range, and an ORDER BY
         * clause to sort in the right direction
-        * @param $field string Field name
-        * @param $dir string If 'newer', sort in ascending order, otherwise
+        * @param string $field Field name
+        * @param string $dir If 'newer', sort in ascending order, otherwise
         *  sort in descending order
-        * @param $start string Value to start the list at. If $dir == 'newer'
+        * @param string $start Value to start the list at. If $dir == 'newer'
         *  this is the lower boundary, otherwise it's the upper boundary
-        * @param $end string Value to end the list at. If $dir == 'newer' this
+        * @param string $end Value to end the list at. If $dir == 'newer' this
         *  is the upper boundary, otherwise it's the lower boundary
-        * @param $sort bool If false, don't add an ORDER BY clause
+        * @param bool $sort If false, don't add an ORDER BY clause
         */
        protected function addWhereRange( $field, $dir, $start, $end, $sort = true ) {
                $isDirNewer = ( $dir === 'newer' );
@@ -240,8 +240,8 @@ abstract class ApiQueryBase extends ApiBase {
        /**
         * Add an option such as LIMIT or USE INDEX. If an option was set
         * before, the old value will be overwritten
-        * @param $name string Option name
-        * @param $value string Option value
+        * @param string $name Option name
+        * @param string $value Option value
         */
        protected function addOption( $name, $value = null ) {
                if ( is_null( $value ) ) {
@@ -253,9 +253,9 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Execute a SELECT query based on the values in the internal arrays
-        * @param $method string Function the query should be attributed to.
+        * @param string $method Function the query should be attributed to.
         *  You should usually use __METHOD__ here
-        * @param $extraQuery array Query data to add but not store in the object
+        * @param array $extraQuery Query data to add but not store in the object
         *  Format is array( 'tables' => ..., 'fields' => ..., 'where' => ..., 'options' => ..., 'join_conds' => ... )
         * @return ResultWrapper
         */
@@ -298,9 +298,9 @@ abstract class ApiQueryBase extends ApiBase {
        /**
         * Add information (title and namespace) about a Title object to a
         * result array
-        * @param $arr array Result array à la ApiResult
+        * @param array $arr Result array à la ApiResult
         * @param $title Title
-        * @param $prefix string Module prefix
+        * @param string $prefix Module prefix
         */
        public static function addTitleInfo( &$arr, $title, $prefix = '' ) {
                $arr[$prefix . 'ns'] = intval( $title->getNamespace() );
@@ -325,8 +325,8 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Add a sub-element under the page element with the given page ID
-        * @param $pageId int Page ID
-        * @param $data array Data array à la ApiResult
+        * @param int $pageId Page ID
+        * @param array $data Data array à la ApiResult
         * @return bool Whether the element fit in the result
         */
        protected function addPageSubItems( $pageId, $data ) {
@@ -339,9 +339,9 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Same as addPageSubItems(), but one element of $data at a time
-        * @param $pageId int Page ID
-        * @param $item array Data array à la ApiResult
-        * @param $elemname string XML element name. If null, getModuleName()
+        * @param int $pageId Page ID
+        * @param array $item Data array à la ApiResult
+        * @param string $elemname XML element name. If null, getModuleName()
         *  is used
         * @return bool Whether the element fit in the result
         */
@@ -362,8 +362,8 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Set a query-continue value
-        * @param $paramName string Parameter name
-        * @param $paramValue string Parameter value
+        * @param string $paramName Parameter name
+        * @param string $paramValue Parameter value
         */
        protected function setContinueEnumParameter( $paramName, $paramValue ) {
                $paramName = $this->encodeParamName( $paramName );
@@ -388,9 +388,9 @@ abstract class ApiQueryBase extends ApiBase {
        /**
         * Selects the query database connection with the given name.
         * See ApiQuery::getNamedDB() for more information
-        * @param $name string Name to assign to the database connection
-        * @param $db int One of the DB_* constants
-        * @param $groups array Query groups
+        * @param string $name Name to assign to the database connection
+        * @param int $db One of the DB_* constants
+        * @param array $groups Query groups
         * @return DatabaseBase
         */
        public function selectNamedDB( $name, $db, $groups ) {
@@ -407,7 +407,7 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Convert a title to a DB key
-        * @param $title string Page title with spaces
+        * @param string $title Page title with spaces
         * @return string Page title with underscores
         */
        public function titleToKey( $title ) {
@@ -424,7 +424,7 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * The inverse of titleToKey()
-        * @param $key string Page title with underscores
+        * @param string $key Page title with underscores
         * @return string Page title with spaces
         */
        public function keyToTitle( $key ) {
@@ -442,7 +442,7 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * An alternative to titleToKey() that doesn't trim trailing spaces
-        * @param $titlePart string Title part with spaces
+        * @param string $titlePart Title part with spaces
         * @return string Title part with underscores
         */
        public function titlePartToKey( $titlePart ) {
@@ -451,7 +451,7 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * An alternative to keyToTitle() that doesn't trim trailing spaces
-        * @param $keyPart string Key part with spaces
+        * @param string $keyPart Key part with spaces
         * @return string Key part with underscores
         */
        public function keyPartToTitle( $keyPart ) {
@@ -592,7 +592,7 @@ abstract class ApiQueryGeneratorBase extends ApiQueryBase {
 
        /**
         * Overrides base class to prepend 'g' to every generator parameter
-        * @param $paramName string Parameter name
+        * @param string $paramName Parameter name
         * @return string Prefixed parameter name
         */
        public function encodeParamName( $paramName ) {
@@ -606,8 +606,8 @@ abstract class ApiQueryGeneratorBase extends ApiQueryBase {
        /**
         * Overrides base in case of generator & smart continue to
         * notify ApiQueryMain instead of adding them to the result right away.
-        * @param $paramName string Parameter name
-        * @param $paramValue string Parameter value
+        * @param string $paramName Parameter name
+        * @param string $paramValue Parameter value
         */
        protected function setContinueEnumParameter( $paramName, $paramValue ) {
                // If this is a generator and query->setGeneratorContinue() returns false, treat as before
index 2b48eb0..69a6441 100644 (file)
@@ -53,7 +53,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
         */
        private function run( $resultPageSet = null ) {
                if ( $this->getPageSet()->getGoodTitleCount() == 0 ) {
-                       return; // nothing to do
+                       return; // nothing to do
                }
 
                $params = $this->extractRequestParams();
index fbe555c..a889272 100644 (file)
@@ -48,6 +48,7 @@ class ApiQueryCategoryInfo extends ApiQueryBase {
                                        $this->getPageSet()->getMissingTitles();
                $cattitles = array();
                foreach ( $categories as $c ) {
+                       /** @var $t Title */
                        $t = $titles[$c];
                        $cattitles[$c] = $t->getDBkey();
                }
index fd9d4c5..9dbd859 100644 (file)
@@ -78,7 +78,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
 
                $this->addFieldsIf( 'cl_timestamp', $fld_timestamp || $params['sort'] == 'timestamp' );
 
-               $this->addTables( array( 'page', 'categorylinks' ) );   // must be in this order for 'USE INDEX'
+               $this->addTables( array( 'page', 'categorylinks' ) ); // must be in this order for 'USE INDEX'
 
                $this->addWhereFld( 'cl_to', $categoryTitle->getDBkey() );
                $queryTypes = $params['type'];
index 31812cf..31ca1ef 100644 (file)
@@ -74,7 +74,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
 
                if ( $mode == 'revs' || $mode == 'user' ) {
                        // Ignore namespace and unique due to inability to know whether they were purposely set
-                       foreach( array( 'from', 'to', 'prefix', /*'namespace',*/ 'continue', /*'unique'*/ ) as $p ) {
+                       foreach( array( 'from', 'to', 'prefix', /*'namespace', 'unique'*/ ) as $p ) {
                                if ( !is_null( $params[$p] ) ) {
                                        $this->dieUsage( "The '{$p}' parameter cannot be used in modes 1 or 2", 'badparams' );
                                }
@@ -116,7 +116,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                }
                // Check limits
                $userMax = $fld_content ? ApiBase::LIMIT_SML1 : ApiBase::LIMIT_BIG1;
-               $botMax  = $fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2;
+               $botMax = $fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2;
 
                $limit = $params['limit'];
 
@@ -361,7 +361,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        'namespace' => 'Only list pages in this namespace (3)',
                        'user' => 'Only list revisions by this user',
                        'excludeuser' => 'Don\'t list revisions by this user',
-                       'continue' => 'When more results are available, use this to continue (3)',
+                       'continue' => 'When more results are available, use this to continue (1, 3)',
                        'unique' => 'List only one revision for each page (3)',
                );
        }
@@ -399,7 +399,6 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        array( 'code' => 'badparams', 'info' => "The 'from' parameter cannot be used in modes 1 or 2" ),
                        array( 'code' => 'badparams', 'info' => "The 'to' parameter cannot be used in modes 1 or 2" ),
                        array( 'code' => 'badparams', 'info' => "The 'prefix' parameter cannot be used in modes 1 or 2" ),
-                       array( 'code' => 'badparams', 'info' => "The 'continue' parameter cannot be used in modes 1 or 2" ),
                        array( 'code' => 'badparams', 'info' => "The 'start' parameter cannot be used in mode 3" ),
                        array( 'code' => 'badparams', 'info' => "The 'end' parameter cannot be used in mode 3" ),
                ) );
index 3b04426..18dcba8 100644 (file)
@@ -92,6 +92,7 @@ class ApiQueryDuplicateFiles extends ApiQueryGeneratorBase {
 
                $sha1s = array();
                foreach ( $files as $file ) {
+                       /** @var $file File */
                        $sha1s[$file->getName()] = $file->getSha1();
                }
 
@@ -113,6 +114,7 @@ class ApiQueryDuplicateFiles extends ApiQueryGeneratorBase {
                        if( $params['dir'] == 'descending' ) {
                                $dupFiles = array_reverse( $dupFiles );
                        }
+                       /** @var $dupFile File */
                        foreach ( $dupFiles as $dupFile ) {
                                $dupName = $dupFile->getName();
                                if( $image == $dupName && $dupFile->isLocal() ) {
index 98380d6..eb9cdf9 100644 (file)
@@ -55,7 +55,7 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase {
                $query = $params['query'];
                $protocol = self::getProtocolPrefix( $params['protocol'] );
 
-               $this->addTables( array( 'page', 'externallinks' ) );   // must be in this order for 'USE INDEX'
+               $this->addTables( array( 'page', 'externallinks' ) ); // must be in this order for 'USE INDEX'
                $this->addOption( 'USE INDEX', 'el_index' );
                $this->addWhere( 'page_id=el_from' );
 
index 8718371..021074a 100644 (file)
@@ -207,7 +207,6 @@ class ApiQueryFilearchive extends ApiQueryBase {
                                $file['suppressed'] = '';
                        }
 
-
                        $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $file );
                        if ( !$fit ) {
                                $this->setContinueEnumParameter( 'continue', $row->fa_name );
index 34f78e7..95c2745 100644 (file)
@@ -90,6 +90,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                        continue;
                                }
 
+                               /** @var $img File */
                                $img = $images[$title];
 
                                if ( self::getTransformCount() >= self::TRANSFORM_LIMIT ) {
@@ -158,6 +159,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                // Get one more to facilitate query-continue functionality
                                $count = ( $gotOne ? 1 : 0 );
                                $oldies = $img->getHistory( $params['limit'] - $count + 1, $start, $params['end'] );
+                               /** @var $oldie File */
                                foreach ( $oldies as $oldie ) {
                                        if ( ++$count > $params['limit'] ) {
                                                // We've reached the extra one which shows that there are additional pages to be had. Stop here...
@@ -191,7 +193,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
 
        /**
         * From parameters, construct a 'scale' array
-        * @param $params Array: Parameters passed to api.
+        * @param array $params Parameters passed to api.
         * @return Array or Null: key-val array of 'width' and 'height', or null
         */
        public function getScale( $params ) {
@@ -222,8 +224,8 @@ class ApiQueryImageInfo extends ApiQueryBase {
         * We do this later than getScale, since we need the image
         * to know which handler, since handlers can make their own parameters.
         * @param File $image Image that params are for.
-        * @param Array $thumbParams thumbnail parameters from getScale
-        * @param String $otherParams of otherParams (iiurlparam).
+        * @param array $thumbParams thumbnail parameters from getScale
+        * @param string $otherParams of otherParams (iiurlparam).
         * @return Array of parameters for transform.
         */
        protected function mergeThumbParams ( $image, $thumbParams, $otherParams ) {
@@ -270,10 +272,10 @@ class ApiQueryImageInfo extends ApiQueryBase {
         * Get result information for an image revision
         *
         * @param $file File object
-        * @param $prop Array of properties to get (in the keys)
+        * @param array $prop of properties to get (in the keys)
         * @param $result ApiResult object
-        * @param $thumbParams Array containing 'width' and 'height' items, or null
-        * @param $version string Version of image metadata (for things like jpeg which have different versions).
+        * @param array $thumbParams containing 'width' and 'height' items, or null
+        * @param string $version Version of image metadata (for things like jpeg which have different versions).
         * @return Array: result array
         */
        static function getInfo( $file, $prop, $result, $thumbParams = null, $version = 'latest' ) {
@@ -367,7 +369,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                        }
 
                                        if ( isset( $prop['thumbmime'] ) && $file->getHandler() ) {
-                                               list( $ext, $mime ) = $file->getHandler()->getThumbType(
+                                               list( , $mime ) = $file->getHandler()->getThumbType(
                                                        $mto->getExtension(), $file->getMimeType(), $thumbParams );
                                                $vals['thumbmime'] = $mime;
                                        }
@@ -452,6 +454,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
 
        /**
         * @param $img File
+        * @param null|string $start
         * @return string
         */
        protected function getContinueStr( $img, $start = null ) {
@@ -516,6 +519,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
        /**
         * Returns array key value pairs of properties and their descriptions
         *
+        * @param string $modulePrefix
         * @return array
         */
        private static function getProperties( $modulePrefix = '' ) {
@@ -710,7 +714,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                        array( 'code' => "{$p}urlwidth", 'info' => "{$p}urlheight cannot be used without {$p}urlwidth" ),
                        array( 'code' => 'urlparam', 'info' => "Invalid value for {$p}urlparam" ),
                        array( 'code' => 'urlparam_no_width', 'info' => "{$p}urlparam requires {$p}urlwidth" ),
-                       array( 'code' => 'urlparam_urlwidth_mismatch', 'info' => "The width set in {$p}urlparm doesnt't " .
+                       array( 'code' => 'urlparam_urlwidth_mismatch', 'info' => "The width set in {$p}urlparm doesn't " .
                                "match the one in {$p}urlwidth" ),
                ) );
        }
index aa7359b..f2bf0a7 100644 (file)
@@ -49,7 +49,7 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
         */
        private function run( $resultPageSet = null ) {
                if ( $this->getPageSet()->getGoodTitleCount() == 0 ) {
-                       return; // nothing to do
+                       return; // nothing to do
                }
 
                $params = $this->extractRequestParams();
index a888d99..37cd915 100644 (file)
@@ -321,6 +321,7 @@ class ApiQueryInfo extends ApiQueryBase {
                        $this->getDisplayTitle();
                }
 
+               /** @var $title Title */
                foreach ( $this->everything as $pageid => $title ) {
                        $pageInfo = $this->extractPageInfo( $pageid, $title );
                        $fit = $result->addValue( array(
@@ -338,7 +339,7 @@ class ApiQueryInfo extends ApiQueryBase {
 
        /**
         * Get a result array with information about a title
-        * @param $pageid int Page ID (negative for missing titles)
+        * @param int $pageid Page ID (negative for missing titles)
         * @param $title Title object
         * @return array
         */
@@ -462,6 +463,7 @@ class ApiQueryInfo extends ApiQueryBase {
 
                        $res = $this->select( __METHOD__ );
                        foreach ( $res as $row ) {
+                               /** @var $title Title */
                                $title = $this->titles[$row->pr_page];
                                $a = array(
                                        'type' => $row->pr_type,
@@ -597,6 +599,7 @@ class ApiQueryInfo extends ApiQueryBase {
        private function getTSIDs() {
                $getTitles = $this->talkids = $this->subjectids = array();
 
+               /** @var $t Title */
                foreach ( $this->everything as $t ) {
                        if ( MWNamespace::isTalk( $t->getNamespace() ) ) {
                                if ( $this->fld_subjectid ) {
index 0aaa588..ac65d2d 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 /**
- * A query module to list all langlinks (links to correspanding foreign language pages).
+ * A query module to list all langlinks (links to corresponding foreign language pages).
  *
  * @ingroup API
  */
index 69d81ae..937f4f1 100644 (file)
@@ -79,7 +79,7 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
         */
        private function run( $resultPageSet = null ) {
                if ( $this->getPageSet()->getGoodTitleCount() == 0 ) {
-                       return; // nothing to do
+                       return; // nothing to do
                }
 
                $params = $this->extractRequestParams();
index f89c826..73dcea4 100644 (file)
@@ -451,7 +451,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
                                ' timestamp      - Adds the timestamp for the event',
                                ' comment        - Adds the comment of the event',
                                ' parsedcomment  - Adds the parsed comment of the event',
-                               ' details        - Lists addtional details about the event',
+                               ' details        - Lists additional details about the event',
                                ' tags           - Lists tags for the event',
                        ),
                        'type' => 'Filter log entries to only this type',
index 1c9deb7..b03bdfb 100644 (file)
@@ -75,6 +75,7 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase {
                $params = $this->extractRequestParams();
                $result = $this->getResult();
 
+               /** @var $qp QueryPage */
                $qp = new $this->qpMap[$params['page']]();
                if ( !$qp->userCanExecute( $this->getUser() ) ) {
                        $this->dieUsageMsg( 'specialpage-cantexecute' );
@@ -141,6 +142,7 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase {
        }
 
        public function getCacheMode( $params ) {
+               /** @var $qp QueryPage */
                $qp = new $this->qpMap[$params['page']]();
                if ( $qp->getRestriction() != '' ) {
                        return 'private';
index 99854c1..ae3bb89 100644 (file)
@@ -33,6 +33,8 @@
 
 class ApiQueryRandom extends ApiQueryGeneratorBase {
 
+       private $pageIDs;
+
        public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rn' );
        }
index 6acca67..72e80b8 100644 (file)
@@ -105,7 +105,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
 
        /**
         * Sets internal state to include the desired properties in the output.
-        * @param $prop Array associative array of properties, only keys are used here
+        * @param array $prop associative array of properties, only keys are used here
         */
        public function initProperties( $prop ) {
                $this->fld_comment = isset( $prop['comment'] );
@@ -149,6 +149,26 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                $this->addTables( 'recentchanges' );
                $index = array( 'recentchanges' => 'rc_timestamp' ); // May change
                $this->addTimestampWhereRange( 'rc_timestamp', $params['dir'], $params['start'], $params['end'] );
+
+               if ( !is_null( $params['continue'] ) ) {
+                       $cont = explode( '|', $params['continue'] );
+                       if ( count( $cont ) != 2 ) {
+                               $this->dieUsage( 'Invalid continue param. You should pass the ' .
+                                                               'original value returned by the previous query', '_badcontinue' );
+                       }
+
+                       $timestamp = $this->getDB()->addQuotes( wfTimestamp( TS_MW, $cont[0] ) );
+                       $id = intval( $cont[1] );
+                       $op = $params['dir'] == 'descending' ? '<' : '>';
+
+                       $this->addWhere(
+                               "rc_timestamp $op $timestamp OR " .
+                               "(rc_timestamp = $timestamp AND " .
+                               "rc_id <= $id)"
+                       );
+               }
+
+
                $this->addWhereFld( 'rc_namespace', $params['namespace'] );
                $this->addWhereFld( 'rc_deleted', 0 );
 
@@ -229,8 +249,9 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                                $this->dieUsage( 'You need the patrol right to request the patrolled flag', 'permissiondenied' );
                        }
 
+                       $this->addFields( 'rc_id' );
                        /* Add fields to our query if they are specified as a needed parameter. */
-                       $this->addFieldsIf( array( 'rc_id', 'rc_this_oldid', 'rc_last_oldid' ), $this->fld_ids );
+                       $this->addFieldsIf( array( 'rc_this_oldid', 'rc_last_oldid' ), $this->fld_ids );
                        $this->addFieldsIf( 'rc_comment', $this->fld_comment || $this->fld_parsedcomment );
                        $this->addFieldsIf( 'rc_user', $this->fld_user );
                        $this->addFieldsIf( 'rc_user_text', $this->fld_user || $this->fld_userid );
@@ -281,7 +302,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                foreach ( $res as $row ) {
                        if ( ++ $count > $params['limit'] ) {
                                // We've reached the one extra which shows that there are additional pages to be had. Stop here...
-                               $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->rc_timestamp ) );
+                               $this->setContinueEnumParameter( 'continue', wfTimestamp( TS_ISO_8601, $row->rc_timestamp ) . '|' . $row->rc_id );
                                break;
                        }
 
@@ -295,7 +316,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                                }
                                $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $vals );
                                if ( !$fit ) {
-                                       $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->rc_timestamp ) );
+                                       $this->setContinueEnumParameter( 'continue', wfTimestamp( TS_ISO_8601, $row->rc_timestamp ) . '|' . $row->rc_id );
                                        break;
                                }
                        } else {
@@ -314,7 +335,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
        /**
         * Extracts from a single sql row the data needed to describe one recent change.
         *
-        * @param $row The row from which to extract the data.
+        * @param mixed $row The row from which to extract the data.
         * @return array An array mapping strings (descriptors) to their respective string values.
         * @access public
         */
@@ -584,6 +605,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                                )
                        ),
                        'toponly' => false,
+                       'continue' => null,
                );
        }
 
@@ -621,6 +643,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                        'limit' => 'How many total changes to return',
                        'tag' => 'Only list changes tagged with this tag',
                        'toponly' => 'Only list changes which are the latest revision',
+                       'continue' => 'When more results are available, use this to continue',
                );
        }
 
index 9b54ee5..192fe87 100644 (file)
@@ -95,7 +95,6 @@ class ApiQueryRevisions extends ApiQueryBase {
                                !is_null( $params['endid'] ) || $params['dir'] === 'newer' ||
                                !is_null( $params['start'] ) || !is_null( $params['end'] ) );
 
-
                $pageSet = $this->getPageSet();
                $pageCount = $pageSet->getGoodTitleCount();
                $revCount = $pageSet->getRevisionCount();
@@ -168,7 +167,7 @@ class ApiQueryRevisions extends ApiQueryBase {
                $index = array();
 
                $userMax = ( $this->fld_content ? ApiBase::LIMIT_SML1 : ApiBase::LIMIT_BIG1 );
-               $botMax  = ( $this->fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2 );
+               $botMax = ( $this->fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2 );
                $limit = $params['limit'];
                if ( $limit == 'max' ) {
                        $limit = $this->getMain()->canApiHighLimits() ? $botMax : $userMax;
@@ -197,6 +196,7 @@ class ApiQueryRevisions extends ApiQueryBase {
                if ( isset( $prop['content'] ) || !is_null( $this->difftotext ) ) {
                        // For each page we will request, the user must have read rights for that page
                        $user = $this->getUser();
+                       /** @var $title Title */
                        foreach ( $pageSet->getGoodTitles() as $title ) {
                                if ( !$title->userCan( 'read', $user ) ) {
                                        $this->dieUsage(
index ac13589..810e1d6 100644 (file)
@@ -139,11 +139,15 @@ class ApiQuerySiteinfo extends ApiQueryBase {
 
                if ( $wgContLang->linkPrefixExtension() ) {
                        $data['linkprefix'] = wfMessage( 'linkprefix' )->inContentLanguage()->text();
+               } else {
+                       $data['linkprefix'] = '';
                }
 
                $linktrail = $wgContLang->linkTrail();
                if ( $linktrail ) {
                        $data['linktrail'] = $linktrail;
+               } else {
+                       $data['linktrail'] = '';
                }
 
                $git = SpecialVersion::getGitHeadSha1( $GLOBALS['IP'] );
@@ -372,7 +376,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                );
                        }
                } else {
-                       list( $host, $lag, $index ) = $lb->getMaxLag();
+                       list( , $lag, $index ) = $lb->getMaxLag();
                        $data[] = array(
                                'host' => $wgShowHostnames
                                                ? $lb->getServerName( $index )
index 2410f05..597c412 100644 (file)
@@ -442,7 +442,7 @@ class ApiQueryContributions extends ApiQueryBase {
                        'end' => 'The end timestamp to return to',
                        'continue' => 'When more results are available, use this to continue',
                        'user' => 'The users to retrieve contributions for',
-                       'userprefix' => "Retrieve contibutions for all users whose names begin with this value. Overrides {$p}user",
+                       'userprefix' => "Retrieve contributions for all users whose names begin with this value. Overrides {$p}user",
                        'dir' => $this->getDirectionDescription( $p ),
                        'namespace' => 'Only list contributions in these namespaces',
                        'prop' => array(
index 963c8f8..1a491ec 100644 (file)
@@ -77,18 +77,18 @@ class ApiQueryUserInfo extends ApiQueryBase {
 
                if ( isset( $this->prop['groups'] ) ) {
                        $vals['groups'] = $user->getEffectiveGroups();
-                       $result->setIndexedTagName( $vals['groups'], 'g' );     // even if empty
+                       $result->setIndexedTagName( $vals['groups'], 'g' ); // even if empty
                }
 
                if ( isset( $this->prop['implicitgroups'] ) ) {
                        $vals['implicitgroups'] = $user->getAutomaticGroups();
-                       $result->setIndexedTagName( $vals['implicitgroups'], 'g' );     // even if empty
+                       $result->setIndexedTagName( $vals['implicitgroups'], 'g' ); // even if empty
                }
 
                if ( isset( $this->prop['rights'] ) ) {
                        // User::getRights() may return duplicate values, strip them
                        $vals['rights'] = array_values( array_unique( $user->getRights() ) );
-                       $result->setIndexedTagName( $vals['rights'], 'r' );     // even if empty
+                       $result->setIndexedTagName( $vals['rights'], 'r' ); // even if empty
                }
 
                if ( isset( $this->prop['changeablegroups'] ) ) {
index dff924f..72ab786 100644 (file)
@@ -254,12 +254,12 @@ class ApiQueryUsers extends ApiQueryBase {
        }
 
        /**
-       * Gets all the groups that a user is automatically a member of (implicit groups)
-       *
-       * @deprecated since 1.20; call User::getAutomaticGroups() directly.
-       * @param $user User
-       * @return array
-       */
+        * Gets all the groups that a user is automatically a member of (implicit groups)
+        *
+        * @deprecated since 1.20; call User::getAutomaticGroups() directly.
+        * @param $user User
+        * @return array
+        */
        public static function getAutoGroups( $user ) {
                wfDeprecated( __METHOD__, '1.20' );
 
index dd50624..90b12c1 100644 (file)
@@ -240,14 +240,16 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
 
                if ( $this->fld_user || $this->fld_userid ) {
 
-                       if ( $this->fld_user ) {
-                               $vals['user'] = $row->rc_user_text;
-                       }
-
                        if ( $this->fld_userid ) {
+                               $vals['userid'] = $row->rc_user;
+                               // for backwards compatibility
                                $vals['user'] = $row->rc_user;
                        }
 
+                       if ( $this->fld_user ) {
+                               $vals['user'] = $row->rc_user_text;
+                       }
+
                        if ( !$row->rc_user ) {
                                $vals['anon'] = '';
                        }
@@ -511,7 +513,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                        'api.php?action=query&list=watchlist&wlallrev=&wlprop=ids|title|timestamp|user|comment',
                        'api.php?action=query&generator=watchlist&prop=info',
                        'api.php?action=query&generator=watchlist&gwlallrev=&prop=revisions&rvprop=timestamp|user',
-                       'api.php?action=query&list=watchlist&wlowner=Bob_Smith&wltoken=d8d562e9725ea1512894cdab28e5ceebc7f20237'
+                       'api.php?action=query&list=watchlist&wlowner=Bob_Smith&wltoken=123ABC'
                );
        }
 
index 790f2d8..39c114b 100644 (file)
@@ -36,8 +36,8 @@
  * There are two special key values that change how XML output is generated:
  *   '_element' This key sets the tag name for the rest of the elements in the current array.
  *              It is only inserted if the formatter returned true for getNeedsRawData()
- *   '*'        This key has special meaning only to the XML formatter, and is outputed as is
- *                             for all others. In XML it becomes the content of the current element.
+ *   '*'        This key has special meaning only to the XML formatter, and is outputted as is
+ *              for all others. In XML it becomes the content of the current element.
  *
  * @ingroup API
  */
@@ -147,10 +147,10 @@ class ApiResult extends ApiBase {
        /**
         * Add an output value to the array by name.
         * Verifies that value with the same name has not been added before.
-        * @param $arr array to add $value to
-        * @param $name string Index of $arr to add $value at
+        * @param array $arr to add $value to
+        * @param string $name Index of $arr to add $value at
         * @param $value mixed
-        * @param $flags int Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP. This parameter used to be
+        * @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP. This parameter used to be
         *        boolean, and the value of OVERRIDE=1 was specifically chosen so that it would be backwards
         *        compatible with the new method signature.
         *
@@ -183,9 +183,9 @@ class ApiResult extends ApiBase {
        /**
         * Adds a content element to an array.
         * Use this function instead of hardcoding the '*' element.
-        * @param $arr array to add the content element to
+        * @param array $arr to add the content element to
         * @param $value Mixed
-        * @param $subElemName string when present, content element is created
+        * @param string $subElemName when present, content element is created
         *  as a sub item of $arr. Use this parameter to create elements in
         *  format "<elem>text</elem>" without attributes.
         */
@@ -208,7 +208,7 @@ class ApiResult extends ApiBase {
         * give all indexed values the given tag name. This function MUST be
         * called on every array that has numerical indexes.
         * @param $arr array
-        * @param $tag string Tag name
+        * @param string $tag Tag name
         */
        public function setIndexedTagName( &$arr, $tag ) {
                // In raw mode, add the '_element', otherwise just ignore
@@ -225,7 +225,7 @@ class ApiResult extends ApiBase {
        /**
         * Calls setIndexedTagName() on each sub-array of $arr
         * @param $arr array
-        * @param $tag string Tag name
+        * @param string $tag Tag name
         */
        public function setIndexedTagName_recursive( &$arr, $tag ) {
                if ( !is_array( $arr ) ) {
@@ -244,7 +244,7 @@ class ApiResult extends ApiBase {
         * Calls setIndexedTagName() on an array already in the result.
         * Don't specify a path to a value that's not in the result, or
         * you'll get nasty errors.
-        * @param $path array Path to the array, like addValue()'s $path
+        * @param array $path Path to the array, like addValue()'s $path
         * @param $tag string
         */
        public function setIndexedTagName_internal( $path, $tag ) {
@@ -271,7 +271,7 @@ class ApiResult extends ApiBase {
         * @param $path array|string|null
         * @param $name string
         * @param $value mixed
-        * @param $flags int Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP. This parameter used to be
+        * @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP. This parameter used to be
         *        boolean, and the value of OVERRIDE=1 was specifically chosen so that it would be backwards
         *        compatible with the new method signature.
         * @return bool True if $value fits in the result, false if not
index 8ef1a97..b40476a 100644 (file)
@@ -133,6 +133,7 @@ class ApiSetNotificationTimestamp extends ApiBase {
                        }
 
                        // Now, put the valid titles into the result
+                       /** @var $title Title */
                        foreach ( $pageSet->getTitles() as $title ) {
                                $ns = $title->getNamespace();
                                $dbkey = $title->getDBkey();
@@ -283,9 +284,9 @@ class ApiSetNotificationTimestamp extends ApiBase {
 
        public function getExamples() {
                return array(
-                       'api.php?action=setnotificationtimestamp&entirewatchlist=&token=ABC123' => 'Reset the notification status for the entire watchlist',
-                       'api.php?action=setnotificationtimestamp&titles=Main_page&token=ABC123' => 'Reset the notification status for "Main page"',
-                       'api.php?action=setnotificationtimestamp&titles=Main_page&timestamp=2012-01-01T00:00:00Z&token=ABC123' => 'Set the notification timestamp for "Main page" so all edits since 1 January 2012 are unviewed',
+                       'api.php?action=setnotificationtimestamp&entirewatchlist=&token=123ABC' => 'Reset the notification status for the entire watchlist',
+                       'api.php?action=setnotificationtimestamp&titles=Main_page&token=123ABC' => 'Reset the notification status for "Main page"',
+                       'api.php?action=setnotificationtimestamp&titles=Main_page&timestamp=2012-01-01T00:00:00Z&token=123ABC' => 'Set the notification timestamp for "Main page" so all edits since 1 January 2012 are unviewed',
                );
        }
 
index 05d3b5a..f2733bd 100644 (file)
@@ -71,6 +71,7 @@ class ApiUpload extends ApiBase {
                $this->checkPermissions( $user );
 
                // Fetch the file (usually a no-op)
+               /** @var $status Status */
                $status = $this->mUpload->fetchFile();
                if ( !$status->isGood() ) {
                        $errors = $status->getErrorsArray();
@@ -116,13 +117,13 @@ class ApiUpload extends ApiBase {
        }
 
        /**
-        * Get an uplaod result based on upload context
+        * Get an upload result based on upload context
         * @return array
         */
        private function getContextResult() {
                $warnings = $this->getApiWarnings();
                if ( $warnings && !$this->mParams['ignorewarnings'] ) {
-                       // Get warnings formated in result array format
+                       // Get warnings formatted in result array format
                        return $this->getWarningsResult( $warnings );
                } elseif ( $this->mParams['chunk'] ) {
                        // Add chunk, and get result
@@ -137,8 +138,8 @@ class ApiUpload extends ApiBase {
        }
 
        /**
-        * Get Stash Result, throws an expetion if the file could not be stashed.
-        * @param $warnings array Array of Api upload warnings
+        * Get Stash Result, throws an exception if the file could not be stashed.
+        * @param array $warnings Array of Api upload warnings
         * @return array
         */
        private function getStashResult( $warnings ) {
@@ -160,7 +161,7 @@ class ApiUpload extends ApiBase {
 
        /**
         * Get Warnings Result
-        * @param $warnings array Array of Api upload warnings
+        * @param array $warnings Array of Api upload warnings
         * @return array
         */
        private function getWarningsResult( $warnings ) {
@@ -180,7 +181,7 @@ class ApiUpload extends ApiBase {
 
        /**
         * Get the result of a chunk upload.
-        * @param $warnings array Array of Api upload warnings
+        * @param array $warnings Array of Api upload warnings
         * @return array
         */
        private function getChunkResult( $warnings ) {
@@ -197,6 +198,7 @@ class ApiUpload extends ApiBase {
                        $filekey = $this->performStash();
                } else {
                        $filekey = $this->mParams['filekey'];
+                       /** @var $status Status */
                        $status = $this->mUpload->addChunk(
                                $chunkPath, $chunkSize, $this->mParams['offset'] );
                        if ( !$status->isGood() ) {
@@ -279,9 +281,9 @@ class ApiUpload extends ApiBase {
         * Throw an error that the user can recover from by providing a better
         * value for $parameter
         *
-        * @param $error array Error array suitable for passing to dieUsageMsg()
-        * @param $parameter string Parameter that needs revising
-        * @param $data array Optional extra data to pass to the user
+        * @param array $error Error array suitable for passing to dieUsageMsg()
+        * @param string $parameter Parameter that needs revising
+        * @param array $data Optional extra data to pass to the user
         * @throws UsageException
         */
        private function dieRecoverableError( $error, $parameter, $data = array() ) {
@@ -515,7 +517,6 @@ class ApiUpload extends ApiBase {
                }
        }
 
-
        /**
         * Check warnings.
         * Returns a suitable array for inclusion into API results if there were warnings
@@ -553,12 +554,11 @@ class ApiUpload extends ApiBase {
                return $warnings;
        }
 
-
        /**
         * Perform the actual upload. Returns a suitable result array on success;
         * dies on failure.
         *
-        * @param $warnings array Array of Api upload warnings
+        * @param array $warnings Array of Api upload warnings
         * @return array
         */
        protected function performUpload( $warnings ) {
@@ -567,6 +567,7 @@ class ApiUpload extends ApiBase {
                        $this->mParams['text'] = $this->mParams['comment'];
                }
 
+               /** @var $file File */
                $file = $this->mUpload->getLocalFile();
                $watch = $this->getWatchlistValue( $this->mParams['watchlist'], $file->getTitle() );
 
@@ -605,6 +606,7 @@ class ApiUpload extends ApiBase {
                                        "Failed to start PublishStashedFile.php", 'publishfailed' );
                        }
                } else {
+                       /** @var $status Status */
                        $status = $this->mUpload->performUpload( $this->mParams['comment'],
                                $this->mParams['text'], $watch, $this->getUser() );
 
index 7106b06..3e51299 100644 (file)
@@ -46,7 +46,7 @@ class ApiWatch extends ApiBase {
 
                $res = array( 'title' => $title->getPrefixedText() );
 
-               // Currently unnecessary, code to act as a safeguard against any change in current behaviour of uselang
+               // Currently unnecessary, code to act as a safeguard against any change in current behavior of uselang
                // Copy from ApiParse
                $oldLang = null;
                if ( isset( $params['uselang'] ) && $params['uselang'] != $this->getContext()->getLanguage()->getCode() ) {
index a4aa79e..a59cc9a 100644 (file)
@@ -222,11 +222,11 @@ class BacklinkCache {
         */
        protected function getPrefix( $table ) {
                static $prefixes = array(
-                       'pagelinks'     => 'pl',
-                       'imagelinks'    => 'il',
+                       'pagelinks' => 'pl',
+                       'imagelinks' => 'il',
                        'categorylinks' => 'cl',
                        'templatelinks' => 'tl',
-                       'redirect'      => 'rd',
+                       'redirect' => 'rd',
                );
 
                if ( isset( $prefixes[$table] ) ) {
@@ -259,14 +259,14 @@ class BacklinkCache {
                        case 'templatelinks':
                                $conds = array(
                                        "{$prefix}_namespace" => $this->title->getNamespace(),
-                                       "{$prefix}_title"     => $this->title->getDBkey(),
+                                       "{$prefix}_title" => $this->title->getDBkey(),
                                        "page_id={$prefix}_from"
                                );
                                break;
                        case 'redirect':
                                $conds = array(
                                        "{$prefix}_namespace" => $this->title->getNamespace(),
-                                       "{$prefix}_title"     => $this->title->getDBkey(),
+                                       "{$prefix}_title" => $this->title->getDBkey(),
                                        $this->getDb()->makeList( array(
                                                "{$prefix}_interwiki" => '',
                                                "{$prefix}_interwiki IS NULL",
@@ -356,7 +356,7 @@ class BacklinkCache {
         * Returns an array giving the start and end of each range. The first
         * batch has a start of false, and the last batch has an end of false.
         *
-        * @param $table String: the links table name
+        * @param string $table the links table name
         * @param $batchSize Integer
         * @return Array
         */
@@ -394,7 +394,6 @@ class BacklinkCache {
                        return $cacheEntry['batches'];
                }
 
-
                // 4) ... finally fetch from the slow database :(
                $this->getLinks( $table );
                $cacheEntry = $this->partitionResult( $this->fullResultCache[$table], $batchSize );
index c67b655..0f047e8 100644 (file)
@@ -98,11 +98,11 @@ class DependencyWrapper {
         * calculated value will be stored to the cache in a wrapper.
         *
         * @param $cache BagOStuff a cache object such as $wgMemc
-        * @param $key String: the cache key
+        * @param string $key the cache key
         * @param $expiry Integer: the expiry timestamp or interval in seconds
         * @param $callback Mixed: the callback for generating the value, or false
-        * @param $callbackParams Array: the function parameters for the callback
-        * @param $deps Array: the dependencies to store on a cache miss. Note: these
+        * @param array $callbackParams the function parameters for the callback
+        * @param array $deps the dependencies to store on a cache miss. Note: these
         *    are not the dependencies used on a cache hit! Cache hits use the stored
         *    dependency array.
         *
@@ -153,7 +153,7 @@ class FileDependency extends CacheDependency {
        /**
         * Create a file dependency
         *
-        * @param $filename String: the name of the file, preferably fully qualified
+        * @param string $filename the name of the file, preferably fully qualified
         * @param $timestamp Mixed: the unix last modified timestamp, or false if the
         *        file does not exist. If omitted, the timestamp will be loaded from
         *        the file.
index ccdd98a..30a7217 100644 (file)
@@ -107,7 +107,7 @@ abstract class FileCacheBase {
 
        /**
         * Check if up to date cache file exists
-        * @param $timestamp string MW_TS timestamp
+        * @param string $timestamp MW_TS timestamp
         *
         * @return bool
         */
index 2a169bb..63e4226 100644 (file)
@@ -59,8 +59,8 @@ class GenderCache {
 
        /**
         * Returns the gender for given username.
-        * @param $username String or User: username
-        * @param $caller String: the calling method
+        * @param string $username or User: username
+        * @param string $caller the calling method
         * @return String
         */
        public function getGenderOf( $username, $caller = '' ) {
@@ -116,7 +116,7 @@ class GenderCache {
         *
         * @since 1.20
         * @param $titles List: array of Title objects or strings
-        * @param $caller String: the calling method
+        * @param string $caller the calling method
         */
        public function doTitlesArray( $titles, $caller = '' ) {
                $users = array();
@@ -137,7 +137,7 @@ class GenderCache {
        /**
         * Preloads genders for given list of users.
         * @param $users List|String: usernames
-        * @param $caller String: the calling method
+        * @param string $caller the calling method
         */
        public function doQuery( $users, $caller = '' ) {
                $default = $this->getDefault();
index 372f983..72a2e8e 100644 (file)
@@ -223,7 +223,7 @@ class LinkBatch {
        /**
         * Construct a WHERE clause which will match all the given titles.
         *
-        * @param $prefix String: the appropriate table's field name prefix ('page', 'pl', etc)
+        * @param string $prefix the appropriate table's field name prefix ('page', 'pl', etc)
         * @param $db DatabaseBase object to use
         * @return mixed string with SQL where clause fragment, or false if no items.
         */
index 623f545..01ceeed 100644 (file)
@@ -74,7 +74,7 @@ class LinkCache {
         * Get a field of a title object from cache.
         * If this link is not good, it will return NULL.
         * @param $title Title
-        * @param $field String: ('length','redirect','revision','model')
+        * @param string $field ('length','redirect','revision','model')
         * @return mixed
         */
        public function getGoodLinkFieldObj( $title, $field ) {
@@ -162,7 +162,7 @@ class LinkCache {
        /**
         * Add a title to the link cache, return the page_id or zero if non-existent
         *
-        * @param $title String: title to add
+        * @param string $title title to add
         * @return Integer
         */
        public function addLink( $title ) {
index dc3151e..009b950 100644 (file)
@@ -538,7 +538,6 @@ class LocalisationCache {
                }
        }
 
-
        /**
         * Load a plural XML file with the given filename, compile the relevant
         * rules, and save the compiled rules in a process-local cache.
@@ -915,8 +914,8 @@ class LocalisationCache {
 interface LCStore {
        /**
         * Get a value.
-        * @param $code string Language code
-        * @param $key string Cache key
+        * @param string $code Language code
+        * @param string $key Cache key
         */
        function get( $code, $key );
 
index 89e5325..6e9d413 100644 (file)
@@ -122,7 +122,7 @@ class MessageCache {
         * Actual format of the file depends on the $wgLocalMessageCacheSerialized
         * setting.
         *
-        * @param $hash String: the hash of contents, to check validity.
+        * @param string $hash the hash of contents, to check validity.
         * @param $code Mixed: Optional language code, see documenation of load().
         * @return bool on failure.
         */
@@ -380,7 +380,7 @@ class MessageCache {
         * $wgMaxMsgCacheEntrySize are assigned a special value, and are loaded
         * on-demand from the database later.
         *
-        * @param $code String: language code.
+        * @param string $code language code.
         * @return Array: loaded messages for storing in caches.
         */
        function loadFromDB( $code ) {
@@ -460,7 +460,7 @@ class MessageCache {
        /**
         * Updates cache as necessary when message page is changed
         *
-        * @param $title String: name of the page changed.
+        * @param string $title name of the page changed.
         * @param $text Mixed: new contents of the page.
         */
        public function replace( $title, $text ) {
@@ -523,9 +523,9 @@ class MessageCache {
        /**
         * Shortcut to update caches.
         *
-        * @param $cache Array: cached messages with a version.
-        * @param $memc Bool: Wether to update or not memcache.
-        * @param $code String: Language code.
+        * @param array $cache cached messages with a version.
+        * @param bool $memc Wether to update or not memcache.
+        * @param string $code Language code.
         * @return bool on somekind of error.
         */
        protected function saveToCaches( $cache, $memc = true, $code = false ) {
@@ -578,50 +578,70 @@ class MessageCache {
        }
 
        /**
-        * Get a message from either the content language or the user language.
+        * Get a message from either the content language or the user language. The fallback
+        * language order is the users language fallback union the content language fallback.
+        * This list is then applied to find keys in the following order
+        * 1) MediaWiki:$key/$langcode (for every language except the content language where
+        *    we look at MediaWiki:$key)
+        * 2) Built-in messages via the l10n cache which is also in fallback order
         *
-        * @param $key String: the message cache key
-        * @param $useDB Boolean: get the message from the DB, false to use only
-        *               the localisation
-        * @param bool|string $langcode Code of the language to get the message for, if
-        *                  it is a valid code create a language for that language,
-        *                  if it is a string but not a valid code then make a basic
-        *                  language object, if it is a false boolean then use the
-        *                  current users language (as a fallback for the old
-        *                  parameter functionality), or if it is a true boolean
-        *                  then use the wikis content language (also as a
-        *                  fallback).
+        * @param string $key the message cache key
+        * @param $useDB Boolean: If true will look for the message in the DB, false only
+        *        get the message from the DB, false to use only the compiled l10n cache.
+        * @param bool|string|object $langcode Code of the language to get the message for.
+        *        - If string and a valid code, will create a standard language object
+        *        - If string but not a valid code, will create a basic language object
+        *        - If boolean and false, create object from the current users language
+        *        - If boolean and true, create object from the wikis content language
+        *        - If language object, use it as given
         * @param $isFullKey Boolean: specifies whether $key is a two part key
         *                   "msg/lang".
         *
         * @throws MWException
-        * @return string|bool
+        * @return string|bool False if the message doesn't exist, otherwise the message
         */
        function get( $key, $useDB = true, $langcode = true, $isFullKey = false ) {
                global $wgLanguageCode, $wgContLang;
 
+               wfProfileIn( __METHOD__ );
+
                if ( is_int( $key ) ) {
                        // "Non-string key given" exception sometimes happens for numerical strings that become ints somewhere on their way here
                        $key = strval( $key );
                }
 
                if ( !is_string( $key ) ) {
+                       wfProfileOut( __METHOD__ );
                        throw new MWException( 'Non-string key given' );
                }
 
                if ( strval( $key ) === '' ) {
                        # Shortcut: the empty key is always missing
+                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
-               $lang = wfGetLangObj( $langcode );
-               if ( !$lang ) {
-                       throw new MWException( "Bad lang code $langcode given" );
-               }
 
-               $langcode = $lang->getCode();
+               # Obtain the initial language object
+               if ( $isFullKey ) {
+                       $keyParts = explode( '/', $key );
+                       if ( count( $keyParts ) < 2 ) {
+                               throw new MWException( "Message key '$key' does not appear to be a full key." );
+                       }
 
-               $message = false;
+                       $langcode = array_pop( $keyParts );
+                       $key = implode( '/', $keyParts );
+               }
+
+               # Obtain a language object for the requested language from the passed language code
+               # Note that the language code could in fact be a language object already but we assume
+               # it's a string further below.
+               $requestedLangObj = wfGetLangObj( $langcode );
+               if ( !$requestedLangObj ) {
+                       wfProfileOut( __METHOD__ );
+                       throw new MWException( "Bad lang code $langcode given" );
+               }
+               $langcode = $requestedLangObj->getCode();
 
                # Normalise title-case input (with some inlining)
                $lckey = str_replace( ' ', '_', $key );
@@ -633,24 +653,37 @@ class MessageCache {
                        $uckey = $wgContLang->ucfirst( $lckey );
                }
 
+               # Loop through each language in the fallback list until we find something useful
+               $message = false;
+
                # Try the MediaWiki namespace
-               if( !$this->mDisable && $useDB ) {
-                       $title = $uckey;
-                       if( !$isFullKey && ( $langcode != $wgLanguageCode ) ) {
-                               $title .= '/' . $langcode;
+               if ( !$this->mDisable && $useDB ) {
+                       $fallbackChain = Language::getFallbacksIncludingSiteLanguage( $langcode );
+                       array_unshift( $fallbackChain, $langcode );
+
+                       foreach ( $fallbackChain as $langcode ) {
+                               if ( $langcode === $wgLanguageCode ) {
+                                       # Messages created in the content language will not have the /lang extension
+                                       $message = $this->getMsgFromNamespace( $uckey, $langcode );
+                               } else {
+                                       $message = $this->getMsgFromNamespace( "$uckey/$langcode", $langcode );
+                               }
+
+                               if ( $message !== false ) {
+                                       break;
+                               }
                        }
-                       $message = $this->getMsgFromNamespace( $title, $langcode );
                }
 
                # Try the array in the language object
                if ( $message === false ) {
-                       $message = $lang->getMessage( $lckey );
-                       if ( is_null( $message ) ) {
+                       $message = $requestedLangObj->getMessage( $lckey );
+                       if ( is_null ( $message ) ) {
                                $message = false;
                        }
                }
 
-               # Try the array of another language
+               # If we still have no message, maybe the key was in fact a full key so try that
                if( $message === false ) {
                        $parts = explode( '/', $lckey );
                        # We may get calls for things that are http-urls from sidebar
@@ -664,15 +697,9 @@ class MessageCache {
                        }
                }
 
-               # Is this a custom message? Try the default language in the db...
-               if( ( $message === false || $message === '-' ) &&
-                       !$this->mDisable && $useDB &&
-                       !$isFullKey && ( $langcode != $wgLanguageCode ) ) {
-                       $message = $this->getMsgFromNamespace( $uckey, $wgLanguageCode );
-               }
-
                # Final fallback
                if( $message === false ) {
+                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -686,6 +713,7 @@ class MessageCache {
                                '&#160;' => "\xc2\xa0",
                        ) );
 
+               wfProfileOut( __METHOD__ );
                return $message;
        }
 
@@ -693,8 +721,8 @@ class MessageCache {
         * Get a message from the MediaWiki namespace, with caching. The key must
         * first be converted to two-part lang/msg form if necessary.
         *
-        * @param $title String: Message cache key with initial uppercase letter.
-        * @param $code String: code denoting the language to try.
+        * @param string $title Message cache key with initial uppercase letter.
+        * @param string $code code denoting the language to try.
         *
         * @return string|bool False on failure
         */
index 784e30e..39bf4c9 100644 (file)
@@ -61,7 +61,7 @@ class SquidUpdate {
                        array( 'page_namespace', 'page_title' ),
                        array(
                                'pl_namespace' => $title->getNamespace(),
-                               'pl_title'     => $title->getDBkey(),
+                               'pl_title' => $title->getDBkey(),
                                'pl_from=page_id' ),
                        __METHOD__ );
                $blurlArr = $title->getSquidURLs();
@@ -254,8 +254,8 @@ class SquidUpdate {
 
        /**
         * Find the HTCP routing rule to use for a given URL.
-        * @param $url string URL to match
-        * @param $rules array Array of rules, see $wgHTCPMulticastRouting for format and behavior
+        * @param string $url URL to match
+        * @param array $rules Array of rules, see $wgHTCPMulticastRouting for format and behavior
         * @return mixed Element of $rules that matched, or false if nothing matched
         */
        static function getRuleForURL( $url, $rules ) {
index 6ec2366..bfbacfa 100644 (file)
@@ -45,7 +45,7 @@ class UserCache {
         * Get a property of a user based on their user ID
         *
         * @param $userId integer User ID
-        * @param $prop string User property
+        * @param string $prop User property
         * @return mixed The property or false if the user does not exist
         */
        public function getProp( $userId, $prop ) {
@@ -60,9 +60,9 @@ class UserCache {
 
        /**
         * Preloads user names for given list of users.
-        * @param $userIds Array List of user IDs
-        * @param $options Array Option flags; include 'userpage' and 'usertalk'
-        * @param $caller String: the calling method
+        * @param array $userIds List of user IDs
+        * @param array $options Option flags; include 'userpage' and 'usertalk'
+        * @param string $caller the calling method
         */
        public function doQuery( array $userIds, $options = array(), $caller = '' ) {
                wfProfileIn( __METHOD__ );
@@ -124,8 +124,8 @@ class UserCache {
         * Check if a cache type is in $options and was not loaded for this user
         *
         * @param $uid integer user ID
-        * @param $type string Cache type
-        * @param $options Array Requested cache types
+        * @param string $type Cache type
+        * @param array $options Requested cache types
         * @return bool
         */
        protected function queryNeeded( $uid, $type, array $options ) {
index bb8b77f..2d6df0e 100644 (file)
@@ -40,7 +40,6 @@ class RedisConnectionPool {
        protected $connectTimeout; // string; connection timeout
        protected $persistent; // bool; whether connections persist
        protected $password; // string; plaintext auth password
-       protected $poolSize; // integer; maximum number of idle connections
        protected $serializer; // integer; the serializer to use (Redis::SERIALIZER_*)
 
        protected $idlePoolSize = 0; // integer; current idle pool size
@@ -61,7 +60,6 @@ class RedisConnectionPool {
         *                      Optional, default is 1 second.
         *   - persistent     : Set this to true to allow connections to persist across
         *                      multiple web requests. False by default.
-        *   - poolSize       : Maximim number of idle connections. Default is 5.
         *   - password       : The authentication password, will be sent to Redis in clear text.
         *                      Optional, if it is unspecified, no AUTH command will be sent.
         *   - serializer     : Set to "php" or "igbinary". Default is "php".
@@ -72,18 +70,9 @@ class RedisConnectionPool {
                        throw new MWException( __CLASS__. ' requires the phpredis extension: ' .
                                'https://github.com/nicolasff/phpredis' );
                }
-               $this->connectTimeout = isset( $options['connectTimeout'] )
-                       ? $options['connectTimeout']
-                       : 1;
-               $this->persistent = isset( $options['persistent'] )
-                       ? $options['persistent']
-                       : false;
-               $this->password = isset( $options['password'] )
-                       ? $options['password']
-                       : '';
-               $this->poolSize = isset( $options['poolSize'] )
-                       ? $options['poolSize']
-                       : 5;
+               $this->connectTimeout = $options['connectTimeout'];
+               $this->persistent = $options['persistent'];
+               $this->password = $options['password'];
                if ( !isset( $options['serializer'] ) || $options['serializer'] === 'php' ) {
                        $this->serializer = Redis::SERIALIZER_PHP;
                } elseif ( $options['serializer'] === 'igbinary' ) {
@@ -93,32 +82,44 @@ class RedisConnectionPool {
                }
        }
 
+       /**
+        * @param $options Array
+        * @return Array
+        */
+       protected static function applyDefaultConfig( array $options ) {
+               if ( !isset( $options['connectTimeout'] ) ) {
+                       $options['connectTimeout'] = 1;
+               }
+               if ( !isset( $options['persistent'] ) ) {
+                       $options['persistent'] = false;
+               }
+               if ( !isset( $options['password'] ) ) {
+                       $options['password'] = null;
+               }
+               return $options;
+       }
+
        /**
         * @param $options Array
         * @return RedisConnectionPool
         */
        public static function singleton( array $options ) {
+               $options = self::applyDefaultConfig( $options );
                // Map the options to a unique hash...
-               $poolOptions = $options;
-               unset( $poolOptions['poolSize'] ); // avoid pool fragmentation
-               ksort( $poolOptions ); // normalize to avoid pool fragmentation
-               $id = sha1( serialize( $poolOptions ) );
+               ksort( $options ); // normalize to avoid pool fragmentation
+               $id = sha1( serialize( $options ) );
                // Initialize the object at the hash as needed...
                if ( !isset( self::$instances[$id] ) ) {
                        self::$instances[$id] = new self( $options );
                        wfDebug( "Creating a new " . __CLASS__ . " instance with id $id." );
                }
-               // Simply grow the pool size if the existing one is too small
-               $psize = isset( $options['poolSize'] ) ? $options['poolSize'] : 1; // size requested
-               self::$instances[$id]->poolSize = max( $psize, self::$instances[$id]->poolSize );
-
                return self::$instances[$id];
        }
 
        /**
         * Get a connection to a redis server. Based on code in RedisBagOStuff.php.
         *
-        * @param $server string A hostname/port combination or the absolute path of a UNIX socket.
+        * @param string $server A hostname/port combination or the absolute path of a UNIX socket.
         *                       If a hostname is specified but no port, port 6379 will be used.
         * @return RedisConnRef|bool Returns false on failure
         * @throws MWException
@@ -231,16 +232,16 @@ class RedisConnectionPool {
         * @return void
         */
        protected function closeExcessIdleConections() {
-               if ( $this->idlePoolSize <= $this->poolSize ) {
-                       return; // nothing to do
+               if ( $this->idlePoolSize <= count( $this->connections ) ) {
+                       return; // nothing to do (no more connections than servers)
                }
 
                foreach ( $this->connections as $server => &$serverConnections ) {
                        foreach ( $serverConnections as $key => &$connection ) {
                                if ( $connection['free'] ) {
                                        unset( $serverConnections[$key] );
-                                       if ( --$this->idlePoolSize <= $this->poolSize ) {
-                                               return; // done
+                                       if ( --$this->idlePoolSize <= count( $this->connections ) ) {
+                                               return; // done (no more connections than servers)
                                        }
                                }
                        }
@@ -254,15 +255,14 @@ class RedisConnectionPool {
         * object and let it be reopened during the next request.
         *
         * @param $server string
-        * @param $conn RedisConnRef
+        * @param $cref RedisConnRef
         * @param $e RedisException
         * @return void
         */
-       public function handleException( $server, RedisConnRef $conn, RedisException $e ) {
-               wfDebugLog( 'redis',
-                       "Redis exception on server $server: " . $e->getMessage() . "\n" );
+       public function handleException( $server, RedisConnRef $cref, RedisException $e ) {
+               wfDebugLog( 'redis', "Redis exception on server $server: " . $e->getMessage() . "\n" );
                foreach ( $this->connections[$server] as $key => $connection ) {
-                       if ( $connection['conn'] === $conn ) {
+                       if ( $cref->isConnIdentical( $connection['conn'] ) ) {
                                $this->idlePoolSize -= $connection['free'] ? 1 : 0;
                                unset( $this->connections[$server][$key] );
                                break;
@@ -280,12 +280,11 @@ class RedisConnectionPool {
 class RedisConnRef {
        /** @var RedisConnectionPool */
        protected $pool;
-
-       protected $server; // string
-
        /** @var Redis */
        protected $conn;
 
+       protected $server; // string
+
        /**
         * @param $pool RedisConnectionPool
         * @param $server string
@@ -301,6 +300,10 @@ class RedisConnRef {
                return call_user_func_array( array( $this->conn, $name ), $arguments );
        }
 
+       public function isConnIdentical( Redis $conn ) {
+               return $this->conn === $conn;
+       }
+
        function __destruct() {
                $this->pool->freeConnection( $this->server, $this->conn );
        }
index e14fb56..137efb8 100644 (file)
@@ -203,7 +203,6 @@ abstract class AbstractContent implements Content {
                return $this->getNativeData() === $that->getNativeData();
        }
 
-
        /**
         * Returns a list of DataUpdate objects for recording information about this
         * Content in some secondary data store.
@@ -243,7 +242,6 @@ abstract class AbstractContent implements Content {
                return $parserOutput->getSecondaryDataUpdates( $title, $recursive );
        }
 
-
        /**
         * @see Content::getRedirectChain
         *
@@ -424,8 +422,8 @@ abstract class AbstractContent implements Content {
         * This base implementation calls the hook ConvertContent to enable custom conversions.
         * Subclasses may override this to implement conversion for "their" content model.
         *
-        * @param String  $toModel the desired content model, use the CONTENT_MODEL_XXX flags.
-        * @param String  $lossy flag, set to "lossy" to allow lossy conversion. If lossy conversion is
+        * @param string  $toModel the desired content model, use the CONTENT_MODEL_XXX flags.
+        * @param string  $lossy flag, set to "lossy" to allow lossy conversion. If lossy conversion is
         * not allowed, full round-trip conversion is expected to work without losing information.
         *
         * @return Content|bool A content object with the content model $toModel, or false if
index 31345af..9b59a27 100644 (file)
@@ -65,7 +65,7 @@ interface Content {
         *
         * @since 1.21
         *
-        * @param $maxLength int Maximum length of the summary text
+        * @param int $maxLength Maximum length of the summary text
         * @return string The summary text
         */
        public function getTextForSummary( $maxLength = 250 );
@@ -148,7 +148,7 @@ interface Content {
         *
         * @since 1.21
         *
-        * @param $format string The format to check
+        * @param string $format The format to check
         * @return bool Whether the format is supported
         */
        public function isSupportedFormat( $format );
@@ -240,7 +240,7 @@ interface Content {
         *
         * @since 1.21
         *
-        * @param $hasLinks Bool: If it is known whether this content contains
+        * @param bool $hasLinks If it is known whether this content contains
         *    links, provide this information here, to avoid redundant parsing to
         *    find out.
         * @return boolean
@@ -335,7 +335,7 @@ interface Content {
         * target is hit in order to provide (hopefully) the Title of the final
         * destination instead of another redirect.
         *
-        * There is usually no need to override the default behaviour, subclasses that
+        * There is usually no need to override the default behavior, subclasses that
         * want to implement redirects should override getRedirectTarget().
         *
         * @since 1.21
@@ -371,7 +371,7 @@ interface Content {
         *
         * @since 1.21
         *
-        * @param $sectionId string The section's ID, given as a numeric string.
+        * @param string $sectionId The section's ID, given as a numeric string.
         *    The ID "0" retrieves the section before the first heading, "1" the
         *    text between the first heading (included) and the second heading
         *    (excluded), etc.
@@ -388,7 +388,7 @@ interface Content {
         *
         * @param $section null/false or a section number (0, 1, 2, T1, T2...), or "new"
         * @param $with Content: new content of the section
-        * @param $sectionTitle String: new section's subject, only if $section is 'new'
+        * @param string $sectionTitle new section's subject, only if $section is 'new'
         * @return string Complete article text, or null if error
         */
        public function replaceSection( $section, Content $with, $sectionTitle = '' );
@@ -491,8 +491,8 @@ interface Content {
         * Converts this content object into another content object with the given content model,
         * if that is possible.
         *
-        * @param String  $toModel the desired content model, use the CONTENT_MODEL_XXX flags.
-        * @param String  $lossy flag, set to "lossy" to allow lossy conversion. If lossy conversion is
+        * @param string  $toModel the desired content model, use the CONTENT_MODEL_XXX flags.
+        * @param string  $lossy flag, set to "lossy" to allow lossy conversion. If lossy conversion is
         * not allowed, full round-trip conversion is expected to work without losing information.
         *
         * @return Content|bool A content object with the content model $toModel, or false if
index 5e0447f..9c20195 100644 (file)
@@ -83,7 +83,7 @@ abstract class ContentHandler {
         *   form of the content.
         * - If $wgContentHandlerTextFallback is 'ignore' and $content is not a
         *   TextContent object, this method returns null.
-        * - otherwise, the behaviour is undefined.
+        * - otherwise, the behavior is undefined.
         *
         * @since 1.21
         *
@@ -129,7 +129,7 @@ abstract class ContentHandler {
         *
         * @since 1.21
         *
-        * @param $text string the textual representation, will be
+        * @param string $text the textual representation, will be
         *    unserialized to create the Content object
         * @param $title null|Title the title of the page this text belongs to.
         *    Required if $modelId is not provided.
@@ -141,7 +141,7 @@ abstract class ContentHandler {
         * @throws MWException
         * @return Content a Content object representing $text
         *
-        * @throw MWException if $model or $format is not supported or if $text can
+        * @throws MWException if $model or $format is not supported or if $text can
         *    not be unserialized using $format.
         */
        public static function makeContent( $text, Title $title = null,
@@ -300,7 +300,7 @@ abstract class ContentHandler {
         *
         * @since 1.21
         *
-        * @param $modelId String The ID of the content model for which to get a
+        * @param string $modelId The ID of the content model for which to get a
         *    handler. Use CONTENT_MODEL_XXX constants.
         * @return ContentHandler The ContentHandler singleton for handling the
         *    model given by $modelId
@@ -347,7 +347,7 @@ abstract class ContentHandler {
         * Model names are localized using system messages. Message keys
         * have the form content-model-$name, where $name is getContentModelName( $id ).
         *
-        * @param $name String The content model ID, as given by a CONTENT_MODEL_XXX
+        * @param string $name The content model ID, as given by a CONTENT_MODEL_XXX
         *    constant or returned by Revision::getContentModel().
         *
         * @return string The content format's localized name.
@@ -391,8 +391,8 @@ abstract class ContentHandler {
         * and a list of supported formats. Values for the parameters are typically
         * provided as literals by subclass's constructors.
         *
-        * @param $modelId String (use CONTENT_MODEL_XXX constants).
-        * @param $formats array List for supported serialization formats
+        * @param string $modelId (use CONTENT_MODEL_XXX constants).
+        * @param array $formats List for supported serialization formats
         *    (typically as MIME types)
         */
        public function __construct( $modelId, $formats ) {
@@ -420,7 +420,7 @@ abstract class ContentHandler {
         *
         * @since 1.21
         *
-        * @param $blob string serialized form of the content
+        * @param string $blob serialized form of the content
         * @param $format null|String the format used for serialization
         * @return Content the Content object created by deserializing $blob
         */
@@ -474,7 +474,7 @@ abstract class ContentHandler {
         *
         * @since 1.21
         *
-        * @param String $model_id The model to check
+        * @param string $model_id The model to check
         *
         * @throws MWException
         */
@@ -523,7 +523,7 @@ abstract class ContentHandler {
         *
         * @since 1.21
         *
-        * @param $format string the serialization format to check
+        * @param string $format the serialization format to check
         * @return bool
         */
        public function isSupportedFormat( $format ) {
@@ -540,7 +540,7 @@ abstract class ContentHandler {
         * Convenient for checking whether a format provided as a parameter is
         * actually supported.
         *
-        * @param $format string the serialization format to check
+        * @param string $format the serialization format to check
         *
         * @throws MWException
         */
@@ -575,7 +575,7 @@ abstract class ContentHandler {
         * @param $context IContextSource context to use, anything else will be
         *    ignored
         * @param $old Integer Old ID we want to show and diff with.
-        * @param $new int|string String either 'prev' or 'next'.
+        * @param int|string $new String either 'prev' or 'next'.
         * @param $rcid Integer ??? FIXME (default 0)
         * @param $refreshCache boolean If set, refreshes the diff cache
         * @param $unhide boolean If set, allow viewing deleted revs
@@ -712,7 +712,7 @@ abstract class ContentHandler {
         *
         * @param $oldContent Content|null: the previous text of the page.
         * @param $newContent Content|null: The submitted text of the page.
-        * @param $flags int Bit mask: a bit mask of flags submitted for the edit.
+        * @param int $flags Bit mask: a bit mask of flags submitted for the edit.
         *
         * @return string An appropriate auto-summary, or an empty string.
         */
@@ -997,10 +997,10 @@ abstract class ContentHandler {
         * Logs a deprecation warning, visible if $wgDevelopmentWarnings, but only if
         * self::$enableDeprecationWarnings is set to true.
         *
-        * @param String      $func The name of the deprecated function
+        * @param string      $func The name of the deprecated function
         * @param string      $version The version since the method is deprecated. Usually 1.21
         *                    for ContentHandler related stuff.
-        * @param String|bool $component: Component to which the function belongs.
+        * @param string|bool $component: Component to which the function belongs.
         *                                If false, it is assumed the function is in MediaWiki core.
         *
         * @see ContentHandler::$enableDeprecationWarnings
@@ -1019,9 +1019,9 @@ abstract class ContentHandler {
         * hook function, a new Content object is constructed from the new
         * text.
         *
-        * @param $event String: event name
-        * @param $args Array: parameters passed to hook functions
-        * @param $warn bool: whether to log a warning.
+        * @param string $event event name
+        * @param array $args parameters passed to hook functions
+        * @param bool $warn whether to log a warning.
         *                    Default to self::$enableDeprecationWarnings.
         *                    May be set to false for testing.
         *
@@ -1050,8 +1050,6 @@ abstract class ContentHandler {
                        wfSuppressWarnings();
 
                        foreach ( $handlers as $handler ) {
-                               $info = '';
-
                                if ( is_array( $handler ) ) {
                                        if ( is_object( $handler[0] ) ) {
                                                $info = get_class( $handler[0] );
index 3d4eb24..75f1aa0 100644 (file)
@@ -54,7 +54,6 @@ class CssContent extends TextContent {
                return new CssContent( $pst );
        }
 
-
        protected function getHtml( ) {
                $html = "";
                $html .= "<pre class=\"mw-code mw-css\" dir=\"ltr\">\n";
index 7508079..5221168 100644 (file)
@@ -55,7 +55,6 @@ class JavaScriptContent extends TextContent {
                return new JavaScriptContent( $pst );
        }
 
-
        protected function getHtml( ) {
                $html = "";
                $html .= "<pre class=\"mw-code mw-js\" dir=\"ltr\">\n";
index 0f7a531..91ba6ef 100644 (file)
@@ -81,7 +81,7 @@ class TextContent extends AbstractContent {
         * Returns true if this content is not a redirect, and $wgArticleCountMethod
         * is "any".
         *
-        * @param $hasLinks Bool: if it is known whether this content contains links,
+        * @param bool $hasLinks if it is known whether this content contains links,
         * provide this information here, to avoid redundant parsing to find out.
         *
         * @return bool True if the content is countable
@@ -173,28 +173,29 @@ class TextContent extends AbstractContent {
 
                # @todo: could implement this in DifferenceEngine and just delegate here?
 
-               if ( !$lang ) $lang = $wgContLang;
+               if ( !$lang ) {
+                       $lang = $wgContLang;
+               }
 
                $otext = $this->getNativeData();
                $ntext = $this->getNativeData();
 
                # Note: Use native PHP diff, external engines don't give us abstract output
-               $ota = explode( "\n", $wgContLang->segmentForDiff( $otext ) );
-               $nta = explode( "\n", $wgContLang->segmentForDiff( $ntext ) );
+               $ota = explode( "\n", $lang->segmentForDiff( $otext ) );
+               $nta = explode( "\n", $lang->segmentForDiff( $ntext ) );
 
                $diff = new Diff( $ota, $nta );
                return $diff;
        }
 
-
        /**
         * Returns a generic ParserOutput object, wrapping the HTML returned by
         * getHtml().
         *
         * @param $title Title Context title for parsing
-        * @param $revId int|null Revision ID (for {{REVISIONID}})
+        * @param int|null $revId Revision ID (for {{REVISIONID}})
         * @param $options ParserOptions|null Parser options
-        * @param $generateHtml bool Whether or not to generate HTML
+        * @param bool $generateHtml Whether or not to generate HTML
         *
         * @return ParserOutput representing the HTML form of the text
         */
@@ -258,8 +259,8 @@ class TextContent extends AbstractContent {
         * This implementation provides lossless conversion between content models based
         * on TextContent.
         *
-        * @param String  $toModel the desired content model, use the CONTENT_MODEL_XXX flags.
-        * @param String  $lossy flag, set to "lossy" to allow lossy conversion. If lossy conversion is
+        * @param string  $toModel the desired content model, use the CONTENT_MODEL_XXX flags.
+        * @param string  $lossy flag, set to "lossy" to allow lossy conversion. If lossy conversion is
         * not allowed, full round-trip conversion is expected to work without losing information.
         *
         * @return Content|bool A content object with the content model $toModel, or false if
index 89aac20..7d3cd37 100644 (file)
@@ -219,7 +219,7 @@ class WikitextContent extends TextContent {
         * Returns true if this content is not a redirect, and this content's text
         * is countable according to the criteria defined by $wgArticleCountMethod.
         *
-        * @param $hasLinks Bool  if it is known whether this content contains
+        * @param bool $hasLinks  if it is known whether this content contains
         *    links, provide this information here, to avoid redundant parsing to
         *    find out (default: null).
         * @param $title Title: (default: null)
@@ -278,9 +278,9 @@ class WikitextContent extends TextContent {
         * @since    1.21
         *
         * @param $title Title
-        * @param $revId int Revision to pass to the parser (default: null)
+        * @param int $revId Revision to pass to the parser (default: null)
         * @param $options ParserOptions (default: null)
-        * @param $generateHtml bool (default: false)
+        * @param bool $generateHtml (default: false)
         *
         * @internal param \IContextSource|null $context
         * @return ParserOutput representing the HTML form of the text
index f78ccbb..e1dcc66 100644 (file)
@@ -49,7 +49,6 @@ class WikitextContentHandler extends TextContentHandler {
                return new WikitextContent( '' );
        }
 
-
        /**
         * Returns a WikitextContent object representing a redirect to the given destination page.
         *
index 20cf5b4..6c009de 100644 (file)
@@ -36,7 +36,7 @@ abstract class DBAccessBase implements IDBAccessObject {
        protected $wiki = false;
 
        /**
-        * @param String|bool $wiki The target wiki's name. This must be an ID
+        * @param string|bool $wiki The target wiki's name. This must be an ID
         * that LBFactory can understand.
         */
        public function __construct( $wiki = false ) {
index f847b98..4eb6ff3 100644 (file)
@@ -46,7 +46,7 @@
  */
 interface IDBAccessObject {
        // Constants for object loading bitfield flags (higher => higher QoS)
-       const READ_LATEST  = 1; // read from the master
+       const READ_LATEST = 1; // read from the master
        const READ_LOCKING = 3; // READ_LATEST and "FOR UPDATE"
 
        // Convenience constant for callers to explicitly request slave data
index 56717b6..4e44374 100644 (file)
@@ -60,9 +60,9 @@ class CloneDatabase {
         * Constructor
         *
         * @param $db DatabaseBase A database subclass
-        * @param $tablesToClone Array An array of tables to clone, unprefixed
-        * @param $newTablePrefix String Prefix to assign to the tables
-        * @param $oldTablePrefix String Prefix on current tables, if not $wgDBprefix
+        * @param array $tablesToClone An array of tables to clone, unprefixed
+        * @param string $newTablePrefix Prefix to assign to the tables
+        * @param string $oldTablePrefix Prefix on current tables, if not $wgDBprefix
         * @param $dropCurrentTables bool
         */
        public function __construct( DatabaseBase $db, array $tablesToClone,
@@ -77,7 +77,7 @@ class CloneDatabase {
 
        /**
         * Set whether to use temporary tables or not
-        * @param $u Bool Use temporary tables when cloning the structure
+        * @param bool $u Use temporary tables when cloning the structure
         */
        public function useTemporaryTables( $u = true ) {
                $this->useTemporaryTables = $u;
@@ -112,7 +112,7 @@ class CloneDatabase {
 
        /**
         * Change the prefix back to the original.
-        * @param $dropTables bool Optionally drop the tables we created
+        * @param bool $dropTables Optionally drop the tables we created
         */
        public function destroy( $dropTables = false ) {
                if( $dropTables ) {
index ff2f7f7..65a74ab 100644 (file)
@@ -49,10 +49,10 @@ interface DatabaseType {
        /**
         * Open a connection to the database. Usually aborts on failure
         *
-        * @param $server String: database server host
-        * @param $user String: database user name
-        * @param $password String: database user password
-        * @param $dbName String: database name
+        * @param string $server database server host
+        * @param string $user database user name
+        * @param string $password database user password
+        * @param string $dbName database name
         * @return bool
         * @throws DBConnectionError
         */
@@ -151,8 +151,8 @@ interface DatabaseType {
         * mysql_fetch_field() wrapper
         * Returns false if the field doesn't exist
         *
-        * @param $table string: table name
-        * @param $field string: field name
+        * @param string $table table name
+        * @param string $field field name
         *
         * @return Field
         */
@@ -160,9 +160,9 @@ interface DatabaseType {
 
        /**
         * Get information about an index into an object
-        * @param $table string: Table name
-        * @param $index string: Index name
-        * @param $fname string: Calling function name
+        * @param string $table Table name
+        * @param string $index Index name
+        * @param string $fname Calling function name
         * @return Mixed: Database-specific index description class or false if the index does not exist
         */
        function indexInfo( $table, $index, $fname = 'Database::indexInfo' );
@@ -178,7 +178,7 @@ interface DatabaseType {
        /**
         * Wrapper for addslashes()
         *
-        * @param $s string: to be slashed.
+        * @param string $s to be slashed.
         * @return string: slashed string.
         */
        function strencode( $s );
@@ -282,7 +282,6 @@ abstract class DatabaseBase implements DatabaseType {
         */
        protected $fileHandle = null;
 
-
 # ------------------------------------------------------------------------------
 # Accessors
 # ------------------------------------------------------------------------------
@@ -370,7 +369,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Historically, transactions were allowed to be "nested". This is no
         * longer supported, so this function really only returns a boolean.
         *
-        * @param $level int An integer (0 or 1), or omitted to leave it unchanged.
+        * @param int $level An integer (0 or 1), or omitted to leave it unchanged.
         * @return int The previous value
         */
        public function trxLevel( $level = null ) {
@@ -379,7 +378,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Get/set the number of errors logged. Only useful when errors are ignored
-        * @param $count int The count to set, or omitted to leave it unchanged.
+        * @param int $count The count to set, or omitted to leave it unchanged.
         * @return int The error count
         */
        public function errorCount( $count = null ) {
@@ -388,7 +387,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Get/set the table prefix.
-        * @param $prefix string The table prefix to set, or omitted to leave it unchanged.
+        * @param string $prefix The table prefix to set, or omitted to leave it unchanged.
         * @return string The previous table prefix.
         */
        public function tablePrefix( $prefix = null ) {
@@ -408,7 +407,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Get properties passed down from the server info array of the load
         * balancer.
         *
-        * @param $name string The entry of the info array to get, or null to get the
+        * @param string $name The entry of the info array to get, or null to get the
         *   whole array
         *
         * @return LoadBalancer|null
@@ -491,7 +490,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Returns true if this database uses timestamps rather than integers
         *
         * @return bool
-       */
+        */
        public function realTimestamps() {
                return false;
        }
@@ -655,12 +654,12 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Constructor.
-        * @param $server String: database server host
-        * @param $user String: database user name
-        * @param $password String: database user password
-        * @param $dbName String: database name
+        * @param string $server database server host
+        * @param string $user database user name
+        * @param string $password database user password
+        * @param string $dbName database name
         * @param $flags
-        * @param $tablePrefix String: database table prefixes. By default use the prefix gave in LocalSettings.php
+        * @param string $tablePrefix database table prefixes. By default use the prefix gave in LocalSettings.php
         */
        function __construct( $server = false, $user = false, $password = false, $dbName = false,
                $flags = 0, $tablePrefix = 'get from global'
@@ -721,8 +720,8 @@ abstract class DatabaseBase implements DatabaseType {
         *
         * @since 1.18
         *
-        * @param $dbType String A possible DB type
-        * @param $p Array An array of options to pass to the constructor.
+        * @param string $dbType A possible DB type
+        * @param array $p An array of options to pass to the constructor.
         *    Valid options are: host, user, password, dbname, flags, tablePrefix
         * @return DatabaseBase subclass or null
         */
@@ -816,7 +815,7 @@ abstract class DatabaseBase implements DatabaseType {
        abstract protected function closeConnection();
 
        /**
-        * @param $error String: fallback error message, used if none is given by DB
+        * @param string $error fallback error message, used if none is given by DB
         * @throws DBConnectionError
         */
        function reportConnectionError( $error = 'Unknown error' ) {
@@ -1050,7 +1049,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Execute a prepared query with the various arguments
-        * @param $prepared String: the prepared sql
+        * @param string $prepared the prepared sql
         * @param $args Mixed: Either an array here, or put scalars as varargs
         *
         * @return ResultWrapper
@@ -1070,8 +1069,8 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * For faking prepared SQL statements on DBs that don't support it directly.
         *
-        * @param $preparedQuery String: a 'preparable' SQL statement
-        * @param $args Array of arguments to fill it with
+        * @param string $preparedQuery a 'preparable' SQL statement
+        * @param array $args of arguments to fill it with
         * @return string executable SQL
         */
        public function fillPrepared( $preparedQuery, $args ) {
@@ -1128,12 +1127,12 @@ abstract class DatabaseBase implements DatabaseType {
         *
         * If no result rows are returned from the query, false is returned.
         *
-        * @param $table string|array Table name. See DatabaseBase::select() for details.
-        * @param $var string The field name to select. This must be a valid SQL
+        * @param string|array $table Table name. See DatabaseBase::select() for details.
+        * @param string $var The field name to select. This must be a valid SQL
         *   fragment: do not use unvalidated user input.
-        * @param $cond string|array The condition array. See DatabaseBase::select() for details.
-        * @param $fname string The function name of the caller.
-        * @param $options string|array The query options. See DatabaseBase::select() for details.
+        * @param string|array $cond The condition array. See DatabaseBase::select() for details.
+        * @param string $fname The function name of the caller.
+        * @param string|array $options The query options. See DatabaseBase::select() for details.
         *
         * @return bool|mixed The value from the field, or false on failure.
         */
@@ -1165,7 +1164,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Returns an optional USE INDEX clause to go after the table, and a
         * string to go at the end of the query.
         *
-        * @param $options Array: associative array of options to be turned into
+        * @param array $options associative array of options to be turned into
         *              an SQL query, valid keys are listed in the function.
         * @return Array
         * @see DatabaseBase::select()
@@ -1249,7 +1248,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Returns an optional GROUP BY with an optional HAVING
         *
-        * @param $options Array: associative array of options
+        * @param array $options associative array of options
         * @return string
         * @see DatabaseBase::select()
         * @since 1.21
@@ -1274,7 +1273,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Returns an optional ORDER BY
         *
-        * @param $options Array: associative array of options
+        * @param array $options associative array of options
         * @return string
         * @see DatabaseBase::select()
         * @since 1.21
@@ -1293,11 +1292,11 @@ abstract class DatabaseBase implements DatabaseType {
         * Execute a SELECT query constructed using the various parameters provided.
         * See below for full details of the parameters.
         *
-        * @param $table String|Array Table name
-        * @param $vars String|Array Field names
-        * @param $conds String|Array Conditions
-        * @param $fname String Caller function name
-        * @param $options Array Query options
+        * @param string|array $table Table name
+        * @param string|array $vars Field names
+        * @param string|array $conds Conditions
+        * @param string $fname Caller function name
+        * @param array $options Query options
         * @param $join_conds Array Join conditions
         *
         * @param $table string|array
@@ -1441,11 +1440,11 @@ abstract class DatabaseBase implements DatabaseType {
         * doing UNION queries, where the SQL text of each query is needed. In general,
         * however, callers outside of Database classes should just use select().
         *
-        * @param $table string|array Table name
-        * @param $vars string|array Field names
-        * @param $conds string|array Conditions
-        * @param $fname string Caller function name
-        * @param $options string|array Query options
+        * @param string|array $table Table name
+        * @param string|array $vars Field names
+        * @param string|array $conds Conditions
+        * @param string $fname Caller function name
+        * @param string|array $options Query options
         * @param $join_conds string|array Join conditions
         *
         * @return string SQL query string.
@@ -1509,11 +1508,11 @@ abstract class DatabaseBase implements DatabaseType {
         * that a single row object is returned. If the query returns no rows,
         * false is returned.
         *
-        * @param $table string|array Table name
-        * @param $vars string|array Field names
-        * @param $conds array Conditions
-        * @param $fname string Caller function name
-        * @param $options string|array Query options
+        * @param string|array $table Table name
+        * @param string|array $vars Field names
+        * @param array $conds Conditions
+        * @param string $fname Caller function name
+        * @param string|array $options Query options
         * @param $join_conds array|string Join conditions
         *
         * @return object|bool
@@ -1551,11 +1550,11 @@ abstract class DatabaseBase implements DatabaseType {
         *
         * Takes the same arguments as DatabaseBase::select().
         *
-        * @param $table String: table name
-        * @param Array|string $vars : unused
-        * @param Array|string $conds : filters on the table
-        * @param $fname String: function name for profiling
-        * @param $options Array: options for select
+        * @param string $table table name
+        * @param array|string $vars : unused
+        * @param array|string $conds : filters on the table
+        * @param string $fname function name for profiling
+        * @param array $options options for select
         * @return Integer: row count
         */
        public function estimateRowCount( $table, $vars = '*', $conds = '',
@@ -1576,7 +1575,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Removes most variables from an SQL query and replaces them with X or N for numbers.
         * It's only slightly flawed. Don't use for anything important.
         *
-        * @param $sql String A SQL Query
+        * @param string $sql A SQL Query
         *
         * @return string
         */
@@ -1603,9 +1602,9 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Determines whether a field exists in a table
         *
-        * @param $table String: table name
-        * @param $field String: filed to check on that table
-        * @param $fname String: calling function name (optional)
+        * @param string $table table name
+        * @param string $field filed to check on that table
+        * @param string $fname calling function name (optional)
         * @return Boolean: whether $table has filed $field
         */
        public function fieldExists( $table, $field, $fname = 'DatabaseBase::fieldExists' ) {
@@ -1726,7 +1725,7 @@ abstract class DatabaseBase implements DatabaseType {
         *                 DatabaseBase::tableName().
         * @param $a       Array of rows to insert
         * @param $fname   String Calling function name (use __METHOD__) for logs/profiling
-        * @param $options Array of options
+        * @param array $options of options
         *
         * @return bool
         */
@@ -1785,7 +1784,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Make UPDATE options for the DatabaseBase::update function
         *
-        * @param $options Array: The options passed to DatabaseBase::update
+        * @param array $options The options passed to DatabaseBase::update
         * @return string
         */
        protected function makeUpdateOptions( $options ) {
@@ -1812,7 +1811,7 @@ abstract class DatabaseBase implements DatabaseType {
         * @param $table  String name of the table to UPDATE. This will be passed through
         *                DatabaseBase::tableName().
         *
-        * @param $values Array:  An array of values to SET. For each array element,
+        * @param array $values  An array of values to SET. For each array element,
         *                the key gives the field name, and the value gives the data
         *                to set that field to. The data will be quoted by
         *                DatabaseBase::addQuotes().
@@ -1824,7 +1823,7 @@ abstract class DatabaseBase implements DatabaseType {
         * @param $fname  String: The function name of the caller (from __METHOD__),
         *                for logging and profiling.
         *
-        * @param $options Array: An array of UPDATE options, can be:
+        * @param array $options An array of UPDATE options, can be:
         *                   - IGNORE: Ignore unique key conflicts
         *                   - LOW_PRIORITY: MySQL-specific, see MySQL manual.
         * @return Boolean
@@ -1843,7 +1842,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Makes an encoded list of strings from an array
-        * @param $a Array containing the data
+        * @param array $a containing the data
         * @param int $mode Constant
         *      - LIST_COMMA:          comma separated, no field names
         *      - LIST_AND:            ANDed WHERE clause (without the WHERE). See
@@ -1914,10 +1913,10 @@ abstract class DatabaseBase implements DatabaseType {
         * Build a partial where clause from a 2-d array such as used for LinkBatch.
         * The keys on each level may be either integers or strings.
         *
-        * @param $data Array: organized as 2-d
+        * @param array $data organized as 2-d
         *              array(baseKeyVal => array(subKeyVal => [ignored], ...), ...)
-        * @param $baseKey String: field name to match the base-level keys to (eg 'pl_namespace')
-        * @param $subKey String: field name to match the sub-level keys to (eg 'pl_title')
+        * @param string $baseKey field name to match the base-level keys to (eg 'pl_namespace')
+        * @param string $subKey field name to match the sub-level keys to (eg 'pl_title')
         * @return Mixed: string SQL fragment, or false if no items in array.
         */
        public function makeWhereFrom2d( $data, $baseKey, $subKey ) {
@@ -1979,7 +1978,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Build a concatenation list to feed into a SQL query
-        * @param $stringList Array: list of raw SQL expressions; caller is responsible for any quoting
+        * @param array $stringList list of raw SQL expressions; caller is responsible for any quoting
         * @return String
         */
        public function buildConcat( $stringList ) {
@@ -2027,8 +2026,8 @@ abstract class DatabaseBase implements DatabaseType {
         * themselves. Pass the canonical name to such functions. This is only needed
         * when calling query() directly.
         *
-        * @param $name String: database table name
-        * @param $format String One of:
+        * @param string $name database table name
+        * @param string $format One of:
         *   quoted - Automatically pass the table name through addIdentifierQuotes()
         *            so that it can be used in a query.
         *   raw - Do not add identifier quotes to the table name
@@ -2070,7 +2069,7 @@ abstract class DatabaseBase implements DatabaseType {
                                && in_array( $table, $wgSharedTables ) # A shared table is selected
                        ) {
                                $database = $wgSharedDB;
-                               $prefix   = $wgSharedPrefix === null ? $this->mTablePrefix : $wgSharedPrefix;
+                               $prefix = $wgSharedPrefix === null ? $this->mTablePrefix : $wgSharedPrefix;
                        } else {
                                $database = null;
                                $prefix = $this->mTablePrefix; # Default prefix
@@ -2142,8 +2141,8 @@ abstract class DatabaseBase implements DatabaseType {
         * Get an aliased table name
         * e.g. tableName AS newTableName
         *
-        * @param $name string Table name, see tableName()
-        * @param $alias string|bool Alias (optional)
+        * @param string $name Table name, see tableName()
+        * @param string|bool $alias Alias (optional)
         * @return string SQL name for aliased table. Will not alias a table to its own name
         */
        public function tableNameWithAlias( $name, $alias = false ) {
@@ -2175,8 +2174,8 @@ abstract class DatabaseBase implements DatabaseType {
         * Get an aliased field name
         * e.g. fieldName AS newFieldName
         *
-        * @param $name string Field name
-        * @param $alias string|bool Alias (optional)
+        * @param string $name Field name
+        * @param string|bool $alias Alias (optional)
         * @return string SQL name for aliased field. Will not alias a field to its own name
         */
        public function fieldNameWithAlias( $name, $alias = false ) {
@@ -2208,7 +2207,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Get the aliased table name clause for a FROM clause
         * which might have a JOIN and/or USE INDEX clause
         *
-        * @param $tables array ( [alias] => table )
+        * @param array $tables ( [alias] => table )
         * @param $use_index array Same as for select()
         * @param $join_conds array Same as for select()
         * @return string
@@ -2439,12 +2438,12 @@ abstract class DatabaseBase implements DatabaseType {
         * to collide. However if you do this, you run the risk of encountering
         * errors which wouldn't have occurred in MySQL.
         *
-        * @param $table String: The table to replace the row(s) in.
-        * @param $rows array Can be either a single row to insert, or multiple rows,
+        * @param string $table The table to replace the row(s) in.
+        * @param array $rows Can be either a single row to insert, or multiple rows,
         *    in the same format as for DatabaseBase::insert()
-        * @param $uniqueIndexes array is an array of indexes. Each element may be either
+        * @param array $uniqueIndexes is an array of indexes. Each element may be either
         *    a field name or an array of field names
-        * @param $fname String: Calling function name (use __METHOD__) for logs/profiling
+        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
         */
        public function replace( $table, $uniqueIndexes, $rows, $fname = 'DatabaseBase::replace' ) {
                $quotedTable = $this->tableName( $table );
@@ -2497,9 +2496,9 @@ abstract class DatabaseBase implements DatabaseType {
         * REPLACE query wrapper for MySQL and SQLite, which have a native REPLACE
         * statement.
         *
-        * @param $table string Table name
-        * @param $rows array Rows to insert
-        * @param $fname string Caller function name
+        * @param string $table Table name
+        * @param array $rows Rows to insert
+        * @param string $fname Caller function name
         *
         * @return ResultWrapper
         */
@@ -2607,10 +2606,10 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * DELETE query wrapper.
         *
-        * @param $table Array Table name
-        * @param $conds String|Array of conditions. See $conds in DatabaseBase::select() for
+        * @param array $table Table name
+        * @param string|array $conds of conditions. See $conds in DatabaseBase::select() for
         *               the format. Use $conds == "*" to delete all rows
-        * @param $fname String name of the calling function
+        * @param string $fname name of the calling function
         *
         * @throws DBUnexpectedError
         * @return bool|ResultWrapper
@@ -2634,24 +2633,24 @@ abstract class DatabaseBase implements DatabaseType {
         * INSERT SELECT wrapper. Takes data from a SELECT query and inserts it
         * into another table.
         *
-        * @param $destTable string The table name to insert into
-        * @param $srcTable string|array May be either a table name, or an array of table names
+        * @param string $destTable The table name to insert into
+        * @param string|array $srcTable May be either a table name, or an array of table names
         *    to include in a join.
         *
-        * @param $varMap array must be an associative array of the form
+        * @param array $varMap must be an associative array of the form
         *    array( 'dest1' => 'source1', ...). Source items may be literals
         *    rather than field names, but strings should be quoted with
         *    DatabaseBase::addQuotes()
         *
-        * @param $conds array Condition array. See $conds in DatabaseBase::select() for
+        * @param array $conds Condition array. See $conds in DatabaseBase::select() for
         *    the details of the format of condition arrays. May be "*" to copy the
         *    whole table.
         *
-        * @param $fname string The function name of the caller, from __METHOD__
+        * @param string $fname The function name of the caller, from __METHOD__
         *
-        * @param $insertOptions array Options for the INSERT part of the query, see
+        * @param array $insertOptions Options for the INSERT part of the query, see
         *    DatabaseBase::insert() for details.
-        * @param $selectOptions array Options for the SELECT part of the query, see
+        * @param array $selectOptions Options for the SELECT part of the query, see
         *    DatabaseBase::select() for details.
         *
         * @return ResultWrapper
@@ -2707,7 +2706,7 @@ abstract class DatabaseBase implements DatabaseType {
         * The version provided by default works in MySQL and SQLite.  It will very
         * likely need to be overridden for most other DBMSes.
         *
-        * @param $sql String SQL query we will append the limit too
+        * @param string $sql SQL query we will append the limit too
         * @param $limit Integer the SQL limit
         * @param $offset Integer|bool the SQL offset (default false)
         *
@@ -2736,7 +2735,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Construct a UNION query
         * This is used for providing overload point for other DB abstractions
         * not compatible with the MySQL syntax.
-        * @param $sqls Array: SQL statements to combine
+        * @param array $sqls SQL statements to combine
         * @param $all Boolean: use UNION ALL
         * @return String: SQL fragment
         */
@@ -2749,9 +2748,9 @@ abstract class DatabaseBase implements DatabaseType {
         * Returns an SQL expression for a simple conditional.  This doesn't need
         * to be overridden unless CASE isn't supported in your DBMS.
         *
-        * @param $cond string|array SQL expression which will result in a boolean value
-        * @param $trueVal String: SQL expression to return if true
-        * @param $falseVal String: SQL expression to return if false
+        * @param string|array $cond SQL expression which will result in a boolean value
+        * @param string $trueVal SQL expression to return if true
+        * @param string $falseVal SQL expression to return if false
         * @return String: SQL fragment
         */
        public function conditional( $cond, $trueVal, $falseVal ) {
@@ -2765,9 +2764,9 @@ abstract class DatabaseBase implements DatabaseType {
         * Returns a comand for str_replace function in SQL query.
         * Uses REPLACE() in MySQL
         *
-        * @param $orig String: column to modify
-        * @param $old String: column to seek
-        * @param $new String: column to replace with
+        * @param string $orig column to modify
+        * @param string $old column to seek
+        * @param string $new column to replace with
         *
         * @return string
         */
@@ -3058,7 +3057,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Nesting of transactions is not supported.
         *
         * @param $fname string
-        * @param $flush String Flush flag, set to 'flush' to disable warnings about explicitly committing implicit
+        * @param string $flush Flush flag, set to 'flush' to disable warnings about explicitly committing implicit
         *        transactions, or calling commit when no transaction is in progress.
         *        This will silently break any ongoing explicit transaction. Only set the flush flag if you are sure
         *        that it is safe to ignore these warnings in your context.
@@ -3132,10 +3131,10 @@ abstract class DatabaseBase implements DatabaseType {
         * The table names passed to this function shall not be quoted (this
         * function calls addIdentifierQuotes when needed).
         *
-        * @param $oldName String: name of table whose structure should be copied
-        * @param $newName String: name of table to be created
+        * @param string $oldName name of table whose structure should be copied
+        * @param string $newName name of table to be created
         * @param $temporary Boolean: whether the new table should be temporary
-        * @param $fname String: calling function name
+        * @param string $fname calling function name
         * @throws MWException
         * @return Boolean: true if operation was successful
         */
@@ -3149,8 +3148,8 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * List all tables on the database
         *
-        * @param $prefix string Only show tables with this prefix, e.g. mw_
-        * @param $fname String: calling function name
+        * @param string $prefix Only show tables with this prefix, e.g. mw_
+        * @param string $fname calling function name
         * @throws MWException
         */
        function listTables( $prefix = null, $fname = 'DatabaseBase::listTables' ) {
@@ -3294,7 +3293,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Returns true on success, error string or exception on failure (depending
         * on object's error ignore settings).
         *
-        * @param $filename String: File name to open
+        * @param string $filename File name to open
         * @param bool|callable $lineCallback Optional function called before reading each line
         * @param bool|callable $resultCallback Optional function called for each MySQL result
         * @param bool|string $fname Calling function name or false if name should be
@@ -3337,7 +3336,7 @@ abstract class DatabaseBase implements DatabaseType {
         * from updaters.inc. Keep in mind this always returns a patch, as
         * it fails back to MySQL if no DB-specific patch can be found
         *
-        * @param $patch String The name of the patch, like patch-something.sql
+        * @param string $patch The name of the patch, like patch-something.sql
         * @return String Full path to patch file
         */
        public function patchPath( $patch ) {
@@ -3356,7 +3355,7 @@ abstract class DatabaseBase implements DatabaseType {
         * ones in $GLOBALS. If an array is set here, $GLOBALS will not be used at
         * all. If it's set to false, $GLOBALS will be used.
         *
-        * @param $vars bool|array mapping variable name to value.
+        * @param bool|array $vars mapping variable name to value.
         */
        public function setSchemaVars( $vars ) {
                $this->mSchemaVars = $vars;
@@ -3371,7 +3370,7 @@ abstract class DatabaseBase implements DatabaseType {
         * @param $fp Resource: File handle
         * @param $lineCallback Callback: Optional function called before reading each query
         * @param $resultCallback Callback: Optional function called for each MySQL result
-        * @param $fname String: Calling function name
+        * @param string $fname Calling function name
         * @param $inputCallback Callback: Optional function called for each complete query sent
         * @return bool|string
         */
@@ -3428,8 +3427,8 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Called by sourceStream() to check if we've reached a statement end
         *
-        * @param $sql String SQL assembled so far
-        * @param $newLine String New line about to be added to $sql
+        * @param string $sql SQL assembled so far
+        * @param string $newLine New line about to be added to $sql
         * @return Bool Whether $newLine contains end of the statement
         */
        public function streamStatementEnd( &$sql, &$newLine ) {
@@ -3457,7 +3456,7 @@ abstract class DatabaseBase implements DatabaseType {
         * - / *$var* / is just encoded, besides traditional table prefix and
         *   table options its use should be avoided.
         *
-        * @param $ins String: SQL statement to replace variables in
+        * @param string $ins SQL statement to replace variables in
         * @return String The new SQL statement with variables replaced
         */
        protected function replaceSchemaVars( $ins ) {
@@ -3545,8 +3544,8 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Check to see if a named lock is available. This is non-blocking.
         *
-        * @param $lockName String: name of lock to poll
-        * @param $method String: name of method calling us
+        * @param string $lockName name of lock to poll
+        * @param string $method name of method calling us
         * @return Boolean
         * @since 1.20
         */
@@ -3560,8 +3559,8 @@ abstract class DatabaseBase implements DatabaseType {
         * Abstracted from Filestore::lock() so child classes can implement for
         * their own needs.
         *
-        * @param $lockName String: name of lock to aquire
-        * @param $method String: name of method calling us
+        * @param string $lockName name of lock to aquire
+        * @param string $method name of method calling us
         * @param $timeout Integer: timeout
         * @return Boolean
         */
@@ -3572,8 +3571,8 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Release a lock.
         *
-        * @param $lockName String: Name of lock to release
-        * @param $method String: Name of method calling us
+        * @param string $lockName Name of lock to release
+        * @param string $method Name of method calling us
         *
         * @return int Returns 1 if the lock was released, 0 if the lock was not established
         * by this thread (in which case the lock is not released), and NULL if the named
@@ -3586,10 +3585,10 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Lock specific tables
         *
-        * @param $read Array of tables to lock for read access
-        * @param $write Array of tables to lock for write access
-        * @param $method String name of caller
-        * @param $lowPriority bool Whether to indicate writes to be LOW PRIORITY
+        * @param array $read of tables to lock for read access
+        * @param array $write of tables to lock for write access
+        * @param string $method name of caller
+        * @param bool $lowPriority Whether to indicate writes to be LOW PRIORITY
         *
         * @return bool
         */
@@ -3600,7 +3599,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Unlock specific tables
         *
-        * @param $method String the caller
+        * @param string $method the caller
         *
         * @return bool
         */
@@ -3650,7 +3649,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Encode an expiry time into the DBMS dependent format
         *
-        * @param $expiry String: timestamp for expiry, or the 'infinity' string
+        * @param string $expiry timestamp for expiry, or the 'infinity' string
         * @return String
         */
        public function encodeExpiry( $expiry ) {
@@ -3662,7 +3661,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Decode an expiry time into a DBMS independent format
         *
-        * @param $expiry String: DB timestamp field value for expiry
+        * @param string $expiry DB timestamp field value for expiry
         * @param $format integer: TS_* constant, defaults to TS_MW
         * @return String
         */
index 18b2733..331b8ae 100644 (file)
@@ -35,7 +35,7 @@ class DBError extends MWException {
        /**
         * Construct a database error
         * @param $db DatabaseBase object which threw the error
-        * @param $error String A simple error message to be used for debugging
+        * @param string $error A simple error message to be used for debugging
         */
        function __construct( DatabaseBase &$db, $error ) {
                $this->db = $db;
@@ -153,7 +153,7 @@ class DBConnectionError extends DBError {
 
                $sorry = htmlspecialchars( $this->msg( 'dberr-problems', 'Sorry! This site is experiencing technical difficulties.' ) );
                $again = htmlspecialchars( $this->msg( 'dberr-again', 'Try waiting a few minutes and reloading.' ) );
-               $info  = htmlspecialchars( $this->msg( 'dberr-info', '(Can\'t contact the database server: $1)' ) );
+               $info = htmlspecialchars( $this->msg( 'dberr-info', '(Can\'t contact the database server: $1)' ) );
 
                # No database access
                MessageCache::singleton()->disable();
index 1c920cb..6c45ffa 100644 (file)
@@ -61,10 +61,10 @@ class DatabaseMssql extends DatabaseBase {
 
        /**
         * Usually aborts on failure
-        * @param String $server
-        * @param String $user
-        * @param String $password
-        * @param String $dbName
+        * @param string $server
+        * @param string $user
+        * @param string $password
+        * @param string $dbName
         * @throws DBConnectionError
         * @return bool|DatabaseBase|null
         */
@@ -284,7 +284,7 @@ class DatabaseMssql extends DatabaseBase {
         * @param $vars    Mixed: array or string, field name(s) to be retrieved
         * @param $conds   Mixed: array or string, condition(s) for WHERE
         * @param $fname   String: calling function name (use __METHOD__) for logs/profiling
-        * @param $options Array: associative array of options (e.g. array('GROUP BY' => 'page_title')),
+        * @param array $options associative array of options (e.g. array('GROUP BY' => 'page_title')),
         *                 see Database::makeSelectOptions code for list of supported stuff
         * @param $join_conds Array: Associative array of table join conditions (optional)
         *                                                 (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') )
@@ -309,7 +309,7 @@ class DatabaseMssql extends DatabaseBase {
         * @param $vars    Mixed:  Array or string, field name(s) to be retrieved
         * @param $conds   Mixed:  Array or string, condition(s) for WHERE
         * @param $fname   String: Calling function name (use __METHOD__) for logs/profiling
-        * @param $options Array:  Associative array of options (e.g. array('GROUP BY' => 'page_title')),
+        * @param array $options  Associative array of options (e.g. array('GROUP BY' => 'page_title')),
         *                 see Database::makeSelectOptions code for list of supported stuff
         * @param $join_conds Array: Associative array of table join conditions (optional)
         *                    (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') )
@@ -385,8 +385,8 @@ class DatabaseMssql extends DatabaseBase {
         *
         * Usually aborts on failure
         * If errors are explicitly ignored, returns success
-        * @param String $table
-        * @param Array $arrToInsert
+        * @param string $table
+        * @param array $arrToInsert
         * @param string $fname
         * @param array $options
         * @throws DBQueryError
@@ -813,8 +813,6 @@ class DatabaseMssql extends DatabaseBase {
                                                TO $newUser
                                                ;
                                        " );
-
-
        }
 
        function encodeBlob( $b ) {
@@ -893,7 +891,7 @@ class DatabaseMssql extends DatabaseBase {
        /**
         * @private
         *
-        * @param $options Array: an associative array of options to be turned into
+        * @param array $options an associative array of options to be turned into
         *                 an SQL query, valid keys are listed in the function.
         * @return Array
         */
index fab0e96..27aae18 100644 (file)
@@ -208,7 +208,7 @@ class DatabaseMysql extends DatabaseBase {
                // Unfortunately, mysql_fetch_object does not reset the last errno.
                // Only check for CR_SERVER_LOST and CR_UNKNOWN_ERROR, as
                // these are the only errors mysql_fetch_object can cause.
-               // See http://dev.mysql.com/doc/refman/5.0/es/mysql-fetch-row.html.
+               // See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
                if( $errno == 2000 || $errno == 2013 ) {
                        throw new DBUnexpectedError( $this, 'Error in fetchObject(): ' . htmlspecialchars( $this->lastError() ) );
                }
@@ -232,7 +232,7 @@ class DatabaseMysql extends DatabaseBase {
                // Unfortunately, mysql_fetch_array does not reset the last errno.
                // Only check for CR_SERVER_LOST and CR_UNKNOWN_ERROR, as
                // these are the only errors mysql_fetch_object can cause.
-               // See http://dev.mysql.com/doc/refman/5.0/es/mysql-fetch-row.html.
+               // See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
                if( $errno == 2000 || $errno == 2013 ) {
                        throw new DBUnexpectedError( $this, 'Error in fetchRow(): ' . htmlspecialchars( $this->lastError() ) );
                }
@@ -251,9 +251,11 @@ class DatabaseMysql extends DatabaseBase {
                wfSuppressWarnings();
                $n = mysql_num_rows( $res );
                wfRestoreWarnings();
-               if( $this->lastErrno() ) {
-                       throw new DBUnexpectedError( $this, 'Error in numRows(): ' . htmlspecialchars( $this->lastError() ) );
-               }
+               // Unfortunately, mysql_num_rows does not reset the last errno.
+               // We are not checking for any errors here, since
+               // these are no errors mysql_num_rows can cause.
+               // See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
+               // See https://bugzilla.wikimedia.org/42430
                return $n;
        }
 
@@ -695,8 +697,8 @@ class DatabaseMysql extends DatabaseBase {
        /**
         * Check to see if a named lock is available. This is non-blocking.
         *
-        * @param $lockName String: name of lock to poll
-        * @param $method String: name of method calling us
+        * @param string $lockName name of lock to poll
+        * @param string $method name of method calling us
         * @return Boolean
         * @since 1.20
         */
@@ -893,8 +895,8 @@ class DatabaseMysql extends DatabaseBase {
        /**
         * List all tables on the database
         *
-        * @param $prefix string Only show tables with this prefix, e.g. mw_
-        * @param $fname String: calling function name
+        * @param string $prefix Only show tables with this prefix, e.g. mw_
+        * @param string $fname calling function name
         * @return array
         */
        function listTables( $prefix = null, $fname = 'DatabaseMysql::listTables' ) {
index 626d841..75b3550 100644 (file)
@@ -1151,7 +1151,7 @@ class DatabaseOracle extends DatabaseBase {
         *
         * @private
         *
-        * @param $options Array: an associative array of options to be turned into
+        * @param array $options an associative array of options to be turned into
         *              an SQL query, valid keys are listed in the function.
         * @return array
         */
index 2cbcc4b..f32d775 100644 (file)
@@ -482,7 +482,6 @@ class DatabasePostgres extends DatabaseBase {
                parent::reportQueryError( $error, $errno, $sql, $fname, false );
        }
 
-
        function queryIgnore( $sql, $fname = 'DatabasePostgres::queryIgnore' ) {
                return $this->query( $sql, $fname, true );
        }
@@ -703,7 +702,6 @@ __INDEXATTR__;
                return $a;
        }
 
-
        function indexUnique( $table, $index, $fname = 'DatabasePostgres::indexUnique' ) {
                $sql = "SELECT indexname FROM pg_indexes WHERE tablename='{$table}'".
                        " AND indexdef LIKE 'CREATE UNIQUE%(" .
@@ -728,7 +726,7 @@ __INDEXATTR__;
         * @param $table   String: Name of the table to insert to.
         * @param $args    Array: Items to insert into the table.
         * @param $fname   String: Name of the function, for profiling
-        * @param $options String or Array. Valid options: IGNORE
+        * @param string $options or Array. Valid options: IGNORE
         *
         * @return bool Success of insert operation. IGNORE always returns true.
         */
@@ -1062,7 +1060,6 @@ __INDEXATTR__;
                return '[http://www.postgresql.org/ PostgreSQL]';
        }
 
-
        /**
         * Return current schema (executes SELECT current_schema())
         * Needs transaction
@@ -1081,8 +1078,8 @@ __INDEXATTR__;
         * This is list does not contain magic keywords like "$user"
         * Needs transaction
         *
-        * @seealso getSearchPath()
-        * @seealso setSearchPath()
+        * @see getSearchPath()
+        * @see setSearchPath()
         * @since 1.19
         * @return array list of actual schemas for the current sesson
         */
@@ -1350,7 +1347,7 @@ SQL;
         *
         * @private
         *
-        * @param $ins String: SQL string, read from a stream (usually tables.sql)
+        * @param string $ins SQL string, read from a stream (usually tables.sql)
         *
         * @return string SQL string
         */
@@ -1374,7 +1371,7 @@ SQL;
         *
         * @private
         *
-        * @param $options Array: an associative array of options to be turned into
+        * @param array $options an associative array of options to be turned into
         *              an SQL query, valid keys are listed in the function.
         * @return array
         */
@@ -1444,8 +1441,8 @@ SQL;
         * Check to see if a named lock is available. This is non-blocking.
         * See http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS
         *
-        * @param $lockName String: name of lock to poll
-        * @param $method String: name of method calling us
+        * @param string $lockName name of lock to poll
+        * @param string $method name of method calling us
         * @return Boolean
         * @since 1.20
         */
@@ -1466,7 +1463,7 @@ SQL;
         */
        public function lock( $lockName, $method, $timeout = 5 ) {
                $key = $this->addQuotes( $this->bigintFromLockName( $lockName ) );
-               for ( $attempts=1; $attempts <= $timeout; ++$attempts ) {
+               for ( $attempts = 1; $attempts <= $timeout; ++$attempts ) {
                        $result = $this->query(
                                "SELECT pg_try_advisory_lock($key) AS lockstatus", $method );
                        $row = $this->fetchObject( $result );
index 74bd9b7..2434650 100644 (file)
@@ -144,8 +144,8 @@ class DatabaseSqlite extends DatabaseBase {
 
        /**
         * Generates a database file name. Explicitly public for installer.
-        * @param $dir String: Directory where database resides
-        * @param $dbName String: Database name
+        * @param string $dir Directory where database resides
+        * @param string $dbName Database name
         * @return String
         */
        public static function generateFileName( $dir, $dbName ) {
@@ -194,9 +194,9 @@ class DatabaseSqlite extends DatabaseBase {
         * Attaches external database to our connection, see http://sqlite.org/lang_attach.html
         * for details.
         *
-        * @param $name String: database name to be used in queries like SELECT foo FROM dbname.table
-        * @param $file String: database file name. If omitted, will be generated using $name and $wgSQLiteDataDir
-        * @param $fname String: calling function name
+        * @param string $name database name to be used in queries like SELECT foo FROM dbname.table
+        * @param string $file database file name. If omitted, will be generated using $name and $wgSQLiteDataDir
+        * @param string $fname calling function name
         *
         * @return ResultWrapper
         */
@@ -597,7 +597,7 @@ class DatabaseSqlite extends DatabaseBase {
         * @return bool
         */
        function wasErrorReissuable() {
-               return $this->lastErrno() ==  17; // SQLITE_SCHEMA;
+               return $this->lastErrno() == 17; // SQLITE_SCHEMA;
        }
 
        /**
@@ -831,12 +831,11 @@ class DatabaseSqlite extends DatabaseBase {
                return $this->query( $sql, $fname );
        }
 
-
        /**
         * List all tables on the database
         *
-        * @param $prefix string Only show tables with this prefix, e.g. mw_
-        * @param $fname String: calling function name
+        * @param string $prefix Only show tables with this prefix, e.g. mw_
+        * @param string $fname calling function name
         *
         * @return array
         */
index 5e11076..b41c1e8 100644 (file)
@@ -219,9 +219,9 @@ class ResultWrapper implements Iterator {
  * doesn't go anywhere near an actual database.
  */
 class FakeResultWrapper extends ResultWrapper {
-       var $result     = array();
-       var $db         = null; // And it's going to stay that way :D
-       var $pos        = 0;
+       var $result = array();
+       var $db = null; // And it's going to stay that way :D
+       var $pos = 0;
        var $currentRow = null;
 
        function __construct( $array ) {
@@ -285,7 +285,7 @@ class LikeMatch {
        /**
         * Store a string into a LikeMatch marker object.
         *
-        * @param String $s
+        * @param string $s
         */
        public function __construct( $s ) {
                $this->str = $s;
index 6a7a5bb..6bc0cdd 100644 (file)
@@ -33,7 +33,6 @@
 
 interface IORMRow {
 
-
        /**
         * Constructor.
         *
index e46dbc0..3686565 100644 (file)
@@ -107,7 +107,7 @@ interface IORMTable {
         * @param string|null $functionName
         *
         * @return ORMResult The result set
-        * @throw DBQueryError if the query failed (even if the database was in ignoreErrors mode)
+        * @throws DBQueryError if the query failed (even if the database was in ignoreErrors mode)
         */
        public function select( $fields = null, array $conditions = array(),
                                                        array $options = array(), $functionName = null );
@@ -139,7 +139,7 @@ interface IORMTable {
         * @param null|string $functionName
         *
         * @return ResultWrapper
-        * @throw DBQueryError if the query failed (even if the database was in ignoreErrors mode)
+        * @throws DBQueryError if the query failed (even if the database was in ignoreErrors mode)
         */
        public function rawSelect( $fields = null, array $conditions = array(),
                                                           array $options = array(), $functionName = null );
@@ -311,7 +311,6 @@ interface IORMTable {
         */
        public function setReadDb( $db );
 
-
        /**
         * Get the ID of the any foreign wiki to use as a target for database operations
         *
@@ -324,7 +323,7 @@ interface IORMTable {
        /**
         * Set the ID of the any foreign wiki to use as a target for database operations
         *
-        * @param String|bool $wiki The target wiki, in a form that  LBFactory understands (or false if the local wiki shall be used)
+        * @param string|bool $wiki The target wiki, in a form that  LBFactory understands (or false if the local wiki shall be used)
         *
         * @since 1.20
         */
index cc7f133..d469e86 100644 (file)
@@ -86,7 +86,7 @@ abstract class LBFactory {
         * Create a new load balancer object. The resulting object will be untracked,
         * not chronology-protected, and the caller is responsible for cleaning it up.
         *
-        * @param $wiki String: wiki ID, or false for the current wiki
+        * @param string $wiki wiki ID, or false for the current wiki
         * @return LoadBalancer
         */
        abstract function newMainLB( $wiki = false );
@@ -94,7 +94,7 @@ abstract class LBFactory {
        /**
         * Get a cached (tracked) load balancer object.
         *
-        * @param $wiki String: wiki ID, or false for the current wiki
+        * @param string $wiki wiki ID, or false for the current wiki
         * @return LoadBalancer
         */
        abstract function getMainLB( $wiki = false );
@@ -104,8 +104,8 @@ abstract class LBFactory {
         * untracked, not chronology-protected, and the caller is responsible for
         * cleaning it up.
         *
-        * @param $cluster String: external storage cluster, or false for core
-        * @param $wiki String: wiki ID, or false for the current wiki
+        * @param string $cluster external storage cluster, or false for core
+        * @param string $wiki wiki ID, or false for the current wiki
         *
         * @return LoadBalancer
         */
@@ -114,8 +114,8 @@ abstract class LBFactory {
        /**
         * Get a cached (tracked) load balancer for external storage
         *
-        * @param $cluster String: external storage cluster, or false for core
-        * @param $wiki String: wiki ID, or false for the current wiki
+        * @param string $cluster external storage cluster, or false for core
+        * @param string $wiki wiki ID, or false for the current wiki
         *
         * @return LoadBalancer
         */
index 88b7500..2e4963d 100644 (file)
@@ -21,7 +21,6 @@
  * @ingroup Database
  */
 
-
 /**
  * A multi-wiki, multi-master factory for Wikimedia and similar installations.
  * Ignores the old configuration globals
@@ -154,7 +153,7 @@ class LBFactory_Multi extends LBFactory {
        }
 
        /**
-        * @param String $cluster
+        * @param string $cluster
         * @param bool $wiki
         * @throws MWException
         * @return LoadBalancer
index 4b165b2..7dca06d 100644 (file)
@@ -28,7 +28,7 @@ class LBFactory_Single extends LBFactory {
        protected $lb;
 
        /**
-        * @param $conf array An associative array with one member:
+        * @param array $conf An associative array with one member:
         *  - connection: The DatabaseBase connection object
         */
        function __construct( $conf ) {
index 311691d..aeebb13 100644 (file)
@@ -37,7 +37,7 @@ class LoadBalancer {
        private $mLoadMonitorClass, $mLoadMonitor;
 
        /**
-        * @param $params Array with keys:
+        * @param array $params with keys:
         *    servers           Required. Array of server info structures.
         *    masterWaitTimeout Replication lag wait timeout
         *    loadMonitor       Name of a class used to fetch server lag and load.
@@ -117,14 +117,14 @@ class LoadBalancer {
         * Given an array of non-normalised probabilities, this function will select
         * an element and return the appropriate key
         *
-        * @deprecated 1.21, use wfPickRandom()
+        * @deprecated 1.21, use ArrayUtils::pickRandom()
         *
         * @param $weights array
         *
         * @return bool|int|string
         */
        function pickRandom( $weights ) {
-               return wfPickRandom( $weights );
+               return ArrayUtils::pickRandom( $weights );
        }
 
        /**
@@ -323,7 +323,7 @@ class LoadBalancer {
                                        $this->mServers[$i]['slave pos'] = $conn->getSlavePos();
                                }
                        }
-                       if ( $this->mReadIndex <=0 && $this->mLoads[$i]>0 && $i !== false ) {
+                       if ( $this->mReadIndex <= 0 && $this->mLoads[$i] > 0 && $i !== false ) {
                                $this->mReadIndex = $i;
                        }
                }
@@ -433,7 +433,7 @@ class LoadBalancer {
         * This is the main entry point for this class.
         *
         * @param $i Integer: server index
-        * @param $groups Array: query groups
+        * @param array $groups query groups
         * @param bool|string $wiki Wiki ID
         *
         * @throws MWException
@@ -550,7 +550,7 @@ class LoadBalancer {
         * error will be available via $this->mErrorConnection.
         *
         * @param $i Integer server index
-        * @param $wiki String wiki ID to open
+        * @param string $wiki wiki ID to open
         * @return DatabaseBase
         *
         * @access private
@@ -596,7 +596,7 @@ class LoadBalancer {
         * error will be available via $this->mErrorConnection.
         *
         * @param $i Integer: server index
-        * @param $wiki String: wiki ID to open
+        * @param string $wiki wiki ID to open
         * @return DatabaseBase
         */
        function openForeignConnection( $i, $wiki ) {
@@ -684,11 +684,8 @@ class LoadBalancer {
                                'See DefaultSettings.php entry for $wgDBservers.' );
                }
 
-               $host = $server['host'];
-               $dbname = $server['dbname'];
-
                if ( $dbNameOverride !== false ) {
-                       $server['dbname'] = $dbname = $dbNameOverride;
+                       $server['dbname'] = $dbNameOverride;
                }
 
                # Create object
@@ -981,7 +978,7 @@ class LoadBalancer {
         * May attempt to open connections to slaves on the default DB. If there is
         * no lag, the maximum lag will be reported as -1.
         *
-        * @param $wiki string Wiki ID, or false for the default database
+        * @param string $wiki Wiki ID, or false for the default database
         *
         * @return array ( host, max lag, index of max lagged host )
         */
index cb3376f..ad7b3b2 100644 (file)
@@ -37,7 +37,7 @@ interface LoadMonitor {
        /**
         * Perform pre-connection load ratio adjustment.
         * @param $loads array
-        * @param $group String: the selected query group
+        * @param string $group the selected query group
         * @param $wiki String
         */
        function scaleLoads( &$loads, $group = false, $wiki = false );
index 6acc124..6c1f27f 100644 (file)
@@ -139,7 +139,7 @@ class ORMRow implements IORMRow {
         *
         * @since 1.20
         *
-        * @param $name string: Field name
+        * @param string $name Field name
         * @param $default mixed: Default value to return when none is found
         * (default: null)
         *
@@ -261,6 +261,11 @@ class ORMRow implements IORMRow {
                        if ( array_key_exists( $name, $this->fields ) ) {
                                $value = $this->fields[$name];
 
+                               // Skip null id fields so that the DBMS can set the default.
+                               if ( $name === 'id' && is_null ( $value ) ) {
+                                       continue;
+                               }
+
                                switch ( $type ) {
                                        case 'array':
                                                $value = (array)$value;
@@ -509,11 +514,7 @@ class ORMRow implements IORMRow {
                                        $value = (float)$value;
                                        break;
                                case 'bool':
-                                       if ( is_string( $value ) ) {
-                                               $value = $value !== '0';
-                                       } elseif ( is_int( $value ) ) {
-                                               $value = $value !== 0;
-                                       }
+                                       $value = (bool)$value;
                                        break;
                                case 'array':
                                        if ( is_string( $value ) ) {
index 06f88c1..bcbe94a 100644 (file)
@@ -201,7 +201,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
         * @return ORMResult
         */
        public function select( $fields = null, array $conditions = array(),
-                                                       array $options = array(), $functionName  = null ) {
+                                                       array $options = array(), $functionName = null ) {
                $res = $this->rawSelect( $fields, $conditions, $options, $functionName );
                return new ORMResult( $this, $res );
        }
@@ -221,7 +221,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
         * @throws DBQueryError if the query failed (even if the database was in ignoreErrors mode).
         */
        public function selectObjects( $fields = null, array $conditions = array(),
-                                                                  array $options = array(), $functionName  = null ) {
+                                                                  array $options = array(), $functionName = null ) {
                $result = $this->selectFields( $fields, $conditions, $options, false, $functionName );
 
                $objects = array();
@@ -247,7 +247,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
         * @throws DBQueryError if the quey failed (even if the database was in ignoreErrors mode).
         */
        public function rawSelect( $fields = null, array $conditions = array(),
-                                                          array $options = array(), $functionName  = null ) {
+                                                          array $options = array(), $functionName = null ) {
                if ( is_null( $fields ) ) {
                        $fields = array_keys( $this->getFields() );
                }
@@ -313,7 +313,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
         * @return array of array
         */
        public function selectFields( $fields = null, array $conditions = array(),
-                                                                 array $options = array(), $collapse = true, $functionName  = null ) {
+                                                                 array $options = array(), $collapse = true, $functionName = null ) {
                $objects = array();
 
                $result = $this->rawSelect( $fields, $conditions, $options, $functionName );
@@ -592,7 +592,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
        /**
         * Set the ID of the any foreign wiki to use as a target for database operations
         *
-        * @param String|bool $wiki The target wiki, in a form that  LBFactory understands (or false if the local wiki shall be used)
+        * @param string|bool $wiki The target wiki, in a form that  LBFactory understands (or false if the local wiki shall be used)
         *
         * @since 1.20
         */
index 8c60eca..8c39e1a 100644 (file)
@@ -135,7 +135,7 @@ class MWDebug {
         * @since 1.19
         * @param $msg string
         * @param $callerOffset int
-        * @param $level int A PHP error level. See sendWarning()
+        * @param int $level A PHP error level. See sendWarning()
         * @return mixed
         */
        public static function warning( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) {
@@ -162,9 +162,9 @@ class MWDebug {
         * - MediaWiki's debug log, if $wgDevelopmentWarnings is set to false.
         *
         * @since 1.19
-        * @param $function string: Function that is deprecated.
-        * @param $version string|bool: Version in which the function was deprecated.
-        * @param $component string|bool: Component to which the function belongs.
+        * @param string $function Function that is deprecated.
+        * @param string|bool $version Version in which the function was deprecated.
+        * @param string|bool $component Component to which the function belongs.
         *     If false, it is assumbed the function is in MediaWiki core.
         * @param $callerOffset integer: How far up the callstack is the original
         *    caller. 2 = function that called the function that called
@@ -270,8 +270,8 @@ class MWDebug {
         * Send a warning either to the debug log or by triggering an user PHP
         * error depending on $wgDevelopmentWarnings.
         *
-        * @param $msg string Message to send
-        * @param $caller array caller description get from getCallerDescription()
+        * @param string $msg Message to send
+        * @param array $caller caller description get from getCallerDescription()
         * @param $level error level to use if $wgDevelopmentWarnings is true
         */
        private static function sendWarning( $msg, $caller, $level ) {
index 6ef5fcb..94ffc06 100644 (file)
@@ -780,7 +780,6 @@ class Diff {
                        trigger_error( "Reversed closing doesn't match", E_USER_ERROR );
                }
 
-
                $prevtype = 'none';
                foreach ( $this->edits as $edit ) {
                        if ( $prevtype == $edit->type ) {
index c8f1d7f..67af7ae 100644 (file)
@@ -80,7 +80,7 @@ class DifferenceEngine extends ContextSource {
         * Constructor
         * @param $context IContextSource context to use, anything else will be ignored
         * @param $old Integer old ID we want to show and diff with.
-        * @param $new String either 'prev' or 'next'.
+        * @param string $new either 'prev' or 'next'.
         * @param $rcid Integer ??? FIXME (default 0)
         * @param $refreshCache boolean If set, refreshes the diff cache
         * @param $unhide boolean If set, allow viewing deleted revs
@@ -618,7 +618,7 @@ class DifferenceEngine extends ContextSource {
         *
         * @param string|bool $otitle Header for old text or false
         * @param string|bool $ntitle Header for new text or false
-        * @param $notice String: HTML between diff header and body
+        * @param string $notice HTML between diff header and body
         * @return mixed
         */
        function getDiff( $otitle, $ntitle, $notice = '' ) {
@@ -759,8 +759,8 @@ class DifferenceEngine extends ContextSource {
        /**
         * Generate a diff, no caching
         *
-        * @param $otext String: old text, must be already segmented
-        * @param $ntext String: new text, must be already segmented
+        * @param string $otext old text, must be already segmented
+        * @param string $ntext new text, must be already segmented
         * @return bool|string
         * @deprecated since 1.21, use generateContentDiffBody() instead!
         */
@@ -775,8 +775,8 @@ class DifferenceEngine extends ContextSource {
         *
         * @todo move this to TextDifferenceEngine, make DifferenceEngine abstract. At some point.
         *
-        * @param $otext String: old text, must be already segmented
-        * @param $ntext String: new text, must be already segmented
+        * @param string $otext old text, must be already segmented
+        * @param string $ntext new text, must be already segmented
         * @return bool|string
         */
        function generateTextDiffBody( $otext, $ntext ) {
@@ -887,7 +887,6 @@ class DifferenceEngine extends ContextSource {
                return $this->msg( 'lineno' )->numParams( $matches[1] )->escaped();
        }
 
-
        /**
         * If there are revisions between the ones being compared, return a note saying so.
         * @return string
@@ -938,7 +937,7 @@ class DifferenceEngine extends ContextSource {
         * Get a header for a specified revision.
         *
         * @param $rev Revision
-        * @param $complete String: 'complete' to get the header wrapped depending
+        * @param string $complete 'complete' to get the header wrapped depending
         *        the visibility of the revision and a link to edit the page.
         * @return String HTML fragment
         */
index 4ce9f19..10a6d45 100644 (file)
@@ -490,7 +490,6 @@ class WikiDiff3 {
 
                $temp = array( 0, 0, 0 );
 
-
                $max_progress = array_fill( 0, ceil( max( $forward_end_diag - $forward_start_diag,
                                $backward_end_diag - $backward_start_diag ) / 2 ), $temp );
                $num_progress = 0; // the 1st entry is current, it is initialized
index 5dd49d7..6c13f8e 100644 (file)
@@ -47,8 +47,8 @@ class ExternalStore {
        /**
         * Get an external store object of the given type, with the given parameters
         *
-        * @param $proto string Type of external storage, should be a value in $wgExternalStores
-        * @param $params array Associative array of ExternalStoreMedium parameters
+        * @param string $proto Type of external storage, should be a value in $wgExternalStores
+        * @param array $params Associative array of ExternalStoreMedium parameters
         * @return ExternalStoreMedium|bool The store class or false on error
         */
        public static function getStoreObject( $proto, array $params = array() ) {
@@ -66,8 +66,8 @@ class ExternalStore {
        /**
         * Fetch data from given URL
         *
-        * @param $url string The URL of the text to get
-        * @param $params array Associative array of ExternalStoreMedium parameters
+        * @param string $url The URL of the text to get
+        * @param array $params Associative array of ExternalStoreMedium parameters
         * @return string|bool The text stored or false on error
         * @throws MWException
         */
@@ -95,9 +95,9 @@ class ExternalStore {
         * The protocol part is used to identify the class, the rest is passed to the
         * class itself as a parameter.
         *
-        * @param $url String A partial external store URL ("<store type>://<location>")
+        * @param string $url A partial external store URL ("<store type>://<location>")
         * @param $data string
-        * @param $params array Associative array of ExternalStoreMedium parameters
+        * @param array $params Associative array of ExternalStoreMedium parameters
         * @return string|bool The URL of the stored data item, or false on error
         * @throws MWException
         */
@@ -126,7 +126,7 @@ class ExternalStore {
         * itself. It also fails-over to the next possible clusters.
         *
         * @param $data string
-        * @param $params array Associative array of ExternalStoreMedium parameters
+        * @param array $params Associative array of ExternalStoreMedium parameters
         * @return string|bool The URL of the stored data item, or false on error
         * @throws MWException
         */
index 3857771..196e7f2 100644 (file)
@@ -75,7 +75,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
        /**
         * Get a LoadBalancer for the specified cluster
         *
-        * @param $cluster String: cluster name
+        * @param string $cluster cluster name
         * @return LoadBalancer object
         */
        function &getLoadBalancer( $cluster ) {
@@ -87,7 +87,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
        /**
         * Get a slave database connection for the specified cluster
         *
-        * @param $cluster String: cluster name
+        * @param string $cluster cluster name
         * @return DatabaseBase object
         */
        function &getSlave( $cluster ) {
@@ -109,7 +109,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
        /**
         * Get a master database connection for the specified cluster
         *
-        * @param $cluster String: cluster name
+        * @param string $cluster cluster name
         * @return DatabaseBase object
         */
        function &getMaster( $cluster ) {
index 34e43e2..41af7d8 100644 (file)
@@ -33,7 +33,7 @@ abstract class ExternalStoreMedium {
        protected $params = array();
 
        /**
-        * @param $params array Options
+        * @param array $params Options
         */
        public function __construct( array $params = array() ) {
                $this->params = $params;
@@ -42,7 +42,7 @@ abstract class ExternalStoreMedium {
        /**
         * Fetch data from given external store URL
         *
-        * @param $url string An external store URL
+        * @param string $url An external store URL
         * @return string|bool The text stored or false on error
         * @throws MWException
         */
@@ -51,8 +51,8 @@ abstract class ExternalStoreMedium {
        /**
         * Insert a data item into a given location
         *
-        * @param $location string: the location name
-        * @param $data string: the data item
+        * @param string $location the location name
+        * @param string $data the data item
         * @return string|bool The URL of the stored data item, or false on error
         * @throws MWException
         */
index 17a88c6..7d0dbd5 100644 (file)
@@ -33,7 +33,7 @@ class FSFile {
        /**
         * Sets up the file object
         *
-        * @param $path string Path to temporary file on local disk
+        * @param string $path Path to temporary file on local disk
         * @throws MWException
         */
        public function __construct( $path ) {
@@ -231,7 +231,7 @@ class FSFile {
        /**
         * Get an associative array containing information about a file in the local filesystem.
         *
-        * @param $path String: absolute local filesystem path
+        * @param string $path absolute local filesystem path
         * @param $ext Mixed: the file extension, or true to extract it from the filename.
         *             Set it to false to ignore the extension.
         *
index a1d46c1..c976998 100644 (file)
@@ -70,7 +70,7 @@ class FSFileBackend extends FileBackendStore {
                if ( isset( $config['containerPaths'] ) ) {
                        $this->containerPaths = (array)$config['containerPaths'];
                        foreach ( $this->containerPaths as &$path ) {
-                               $path = rtrim( $path, '/' );  // remove trailing slash
+                               $path = rtrim( $path, '/' ); // remove trailing slash
                        }
                }
 
@@ -102,7 +102,7 @@ class FSFileBackend extends FileBackendStore {
        /**
         * Sanity check a relative file system path for validity
         *
-        * @param $path string Normalized relative path
+        * @param string $path Normalized relative path
         * @return bool
         */
        protected function isLegalRelPath( $path ) {
@@ -137,7 +137,7 @@ class FSFileBackend extends FileBackendStore {
        /**
         * Get the absolute file system path for a storage path
         *
-        * @param $storagePath string Storage path
+        * @param string $storagePath Storage path
         * @return string|null
         */
        protected function resolveToFSPath( $storagePath ) {
@@ -145,7 +145,7 @@ class FSFileBackend extends FileBackendStore {
                if ( $relPath === null ) {
                        return null; // invalid
                }
-               list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $storagePath );
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $storagePath );
                $fsPath = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
                if ( $relPath != '' ) {
                        $fsPath .= "/{$relPath}";
@@ -460,7 +460,7 @@ class FSFileBackend extends FileBackendStore {
         */
        protected function doPrepareInternal( $fullCont, $dirRel, array $params ) {
                $status = Status::newGood();
-               list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $params['dir'] );
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
                $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
                $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
                $existed = is_dir( $dir ); // already there?
@@ -487,7 +487,7 @@ class FSFileBackend extends FileBackendStore {
         */
        protected function doSecureInternal( $fullCont, $dirRel, array $params ) {
                $status = Status::newGood();
-               list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $params['dir'] );
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
                $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
                $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
                // Seed new directories with a blank index.html, to prevent crawling...
@@ -518,7 +518,7 @@ class FSFileBackend extends FileBackendStore {
         */
        protected function doPublishInternal( $fullCont, $dirRel, array $params ) {
                $status = Status::newGood();
-               list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $params['dir'] );
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
                $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
                $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
                // Unseed new directories with a blank index.html, to allow crawling...
@@ -549,7 +549,7 @@ class FSFileBackend extends FileBackendStore {
         */
        protected function doCleanInternal( $fullCont, $dirRel, array $params ) {
                $status = Status::newGood();
-               list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $params['dir'] );
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
                $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
                $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
                $this->trapWarnings();
@@ -598,7 +598,7 @@ class FSFileBackend extends FileBackendStore {
         * @return bool|null
         */
        protected function doDirectoryExists( $fullCont, $dirRel, array $params ) {
-               list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $params['dir'] );
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
                $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
                $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
 
@@ -614,7 +614,7 @@ class FSFileBackend extends FileBackendStore {
         * @return Array|null
         */
        public function getDirectoryListInternal( $fullCont, $dirRel, array $params ) {
-               list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $params['dir'] );
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
                $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
                $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
                $exists = is_dir( $dir );
@@ -633,7 +633,7 @@ class FSFileBackend extends FileBackendStore {
         * @return Array|FSFileBackendFileList|null
         */
        public function getFileListInternal( $fullCont, $dirRel, array $params ) {
-               list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $params['dir'] );
+               list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
                $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
                $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
                $exists = is_dir( $dir );
@@ -747,7 +747,7 @@ class FSFileBackend extends FileBackendStore {
        /**
         * Chmod a file, suppressing the warnings
         *
-        * @param $path string Absolute file system path
+        * @param string $path Absolute file system path
         * @return bool Success
         */
        protected function chmod( $path ) {
@@ -779,7 +779,7 @@ class FSFileBackend extends FileBackendStore {
        /**
         * Clean up directory separators for the given OS
         *
-        * @param $path string FS path
+        * @param string $path FS path
         * @return string
         */
        protected function cleanPathSlashes( $path ) {
@@ -857,7 +857,7 @@ abstract class FSFileBackendList implements Iterator {
        protected $params = array();
 
        /**
-        * @param $dir string file system directory
+        * @param string $dir file system directory
         * @param $params array
         */
        public function __construct( $dir, array $params ) {
@@ -878,7 +878,7 @@ abstract class FSFileBackendList implements Iterator {
        /**
         * Return an appropriate iterator object to wrap
         *
-        * @param $dir string file system directory
+        * @param string $dir file system directory
         * @return Iterator
         */
        protected function initIterator( $dir ) {
index 3ebfdb1..f40b8c1 100644 (file)
@@ -310,8 +310,8 @@ abstract class FileBackend {
         *   - a) unexpected operation errors occurred (network partitions, disk full...)
         *   - b) significant operation errors occurred and 'force' was not set
         *
-        * @param $ops Array List of operations to execute in order
-        * @param $opts Array Batch operation options
+        * @param array $ops List of operations to execute in order
+        * @param array $opts Batch operation options
         * @return Status
         */
        final public function doOperations( array $ops, array $opts = array() ) {
@@ -337,8 +337,8 @@ abstract class FileBackend {
         *
         * @see FileBackend::doOperations()
         *
-        * @param $op Array Operation
-        * @param $opts Array Operation options
+        * @param array $op Operation
+        * @param array $opts Operation options
         * @return Status
         */
        final public function doOperation( array $op, array $opts = array() ) {
@@ -351,8 +351,8 @@ abstract class FileBackend {
         *
         * @see FileBackend::doOperation()
         *
-        * @param $params Array Operation parameters
-        * @param $opts Array Operation options
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
         * @return Status
         */
        final public function create( array $params, array $opts = array() ) {
@@ -365,8 +365,8 @@ abstract class FileBackend {
         *
         * @see FileBackend::doOperation()
         *
-        * @param $params Array Operation parameters
-        * @param $opts Array Operation options
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
         * @return Status
         */
        final public function store( array $params, array $opts = array() ) {
@@ -379,8 +379,8 @@ abstract class FileBackend {
         *
         * @see FileBackend::doOperation()
         *
-        * @param $params Array Operation parameters
-        * @param $opts Array Operation options
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
         * @return Status
         */
        final public function copy( array $params, array $opts = array() ) {
@@ -393,8 +393,8 @@ abstract class FileBackend {
         *
         * @see FileBackend::doOperation()
         *
-        * @param $params Array Operation parameters
-        * @param $opts Array Operation options
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
         * @return Status
         */
        final public function move( array $params, array $opts = array() ) {
@@ -407,8 +407,8 @@ abstract class FileBackend {
         *
         * @see FileBackend::doOperation()
         *
-        * @param $params Array Operation parameters
-        * @param $opts Array Operation options
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
         * @return Status
         */
        final public function delete( array $params, array $opts = array() ) {
@@ -421,8 +421,8 @@ abstract class FileBackend {
         *
         * @see FileBackend::doOperation()
         *
-        * @param $params Array Operation parameters
-        * @param $opts Array Operation options
+        * @param array $params Operation parameters
+        * @param array $opts Operation options
         * @return Status
         * @since 1.21
         */
@@ -540,8 +540,8 @@ abstract class FileBackend {
         * will reflect each operation attempted for the given files. The status will be
         * considered "OK" as long as no fatal errors occurred.
         *
-        * @param $ops Array Set of operations to execute
-        * @param $opts Array Batch operation options
+        * @param array $ops Set of operations to execute
+        * @param array $opts Batch operation options
         * @return Status
         * @since 1.20
         */
@@ -568,7 +568,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::doQuickOperations()
         *
-        * @param $op Array Operation
+        * @param array $op Operation
         * @return Status
         * @since 1.20
         */
@@ -582,7 +582,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::doQuickOperation()
         *
-        * @param $params Array Operation parameters
+        * @param array $params Operation parameters
         * @return Status
         * @since 1.20
         */
@@ -596,7 +596,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::doQuickOperation()
         *
-        * @param $params Array Operation parameters
+        * @param array $params Operation parameters
         * @return Status
         * @since 1.20
         */
@@ -610,7 +610,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::doQuickOperation()
         *
-        * @param $params Array Operation parameters
+        * @param array $params Operation parameters
         * @return Status
         * @since 1.20
         */
@@ -624,7 +624,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::doQuickOperation()
         *
-        * @param $params Array Operation parameters
+        * @param array $params Operation parameters
         * @return Status
         * @since 1.20
         */
@@ -638,7 +638,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::doQuickOperation()
         *
-        * @param $params Array Operation parameters
+        * @param array $params Operation parameters
         * @return Status
         * @since 1.20
         */
@@ -652,7 +652,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::doQuickOperation()
         *
-        * @param $params Array Operation parameters
+        * @param array $params Operation parameters
         * @return Status
         * @since 1.21
         */
@@ -666,7 +666,7 @@ abstract class FileBackend {
         * otherwise safe from modification from other processes. Normally,
         * the file will be a new temp file, which should be adequate.
         *
-        * @param $params Array Operation parameters
+        * @param array $params Operation parameters
         * $params include:
         *   - srcs        : ordered source storage paths (e.g. chunk1, chunk2, ...)
         *   - dst         : file system path to 0-byte temp file
@@ -684,7 +684,7 @@ abstract class FileBackend {
         * except they are only applied *if* the directory/container had to be created.
         * These flags should always be set for directories that have private files.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - dir            : storage directory
         *   - noAccess       : try to deny file access (since 1.20)
@@ -712,7 +712,7 @@ abstract class FileBackend {
         * access to the storage user representing end-users in web requests.
         * This is not guaranteed to actually do anything.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - dir            : storage directory
         *   - noAccess       : try to deny file access
@@ -740,7 +740,7 @@ abstract class FileBackend {
         * access to the storage user representing end-users in web requests.
         * This essentially can undo the result of secure() calls.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - dir            : storage directory
         *   - access         : try to allow file access
@@ -767,7 +767,7 @@ abstract class FileBackend {
         * Backends using key/value stores may do nothing unless the directory
         * is that of an empty container, in which case it will be deleted.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - dir            : storage directory
         *   - recursive      : recursively delete empty subdirectories first (since 1.20)
@@ -806,7 +806,7 @@ abstract class FileBackend {
         * Check if a file exists at a storage path in the backend.
         * This returns false if only a directory exists at the path.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src    : source storage path
         *   - latest : use the latest available data
@@ -817,7 +817,7 @@ abstract class FileBackend {
        /**
         * Get the last-modified timestamp of the file at a storage path.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src    : source storage path
         *   - latest : use the latest available data
@@ -829,7 +829,7 @@ abstract class FileBackend {
         * Get the contents of a file at a storage path in the backend.
         * This should be avoided for potentially large files.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src    : source storage path
         *   - latest : use the latest available data
@@ -849,7 +849,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::getFileContents()
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - srcs        : list of source storage paths
         *   - latest      : use the latest available data
@@ -862,7 +862,7 @@ abstract class FileBackend {
        /**
         * Get the size (bytes) of a file at a storage path in the backend.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src    : source storage path
         *   - latest : use the latest available data
@@ -878,7 +878,7 @@ abstract class FileBackend {
         *   - size   : the file size (bytes)
         * Additional values may be included for internal use only.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src    : source storage path
         *   - latest : use the latest available data
@@ -889,7 +889,7 @@ abstract class FileBackend {
        /**
         * Get a SHA-1 hash of the file at a storage path in the backend.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src    : source storage path
         *   - latest : use the latest available data
@@ -901,7 +901,7 @@ abstract class FileBackend {
         * Get the properties of the file at a storage path in the backend.
         * This gives the result of FSFile::getProps() on a local copy of the file.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src    : source storage path
         *   - latest : use the latest available data
@@ -916,7 +916,7 @@ abstract class FileBackend {
         * will be sent if streaming began, while none will be sent otherwise.
         * Implementations should flush the output buffer before sending data.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src     : source storage path
         *   - headers : list of additional HTTP headers to send on success
@@ -938,7 +938,7 @@ abstract class FileBackend {
         * In that later case, there are copies of the file that must stay in sync.
         * Additionally, further calls to this function may return the same file.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src    : source storage path
         *   - latest : use the latest available data
@@ -958,7 +958,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::getLocalReference()
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - srcs        : list of source storage paths
         *   - latest      : use the latest available data
@@ -973,7 +973,7 @@ abstract class FileBackend {
         * The temporary copy will have the same file extension as the source.
         * Temporary files may be purged when the file object falls out of scope.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src    : source storage path
         *   - latest : use the latest available data
@@ -993,7 +993,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::getLocalCopy()
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - srcs        : list of source storage paths
         *   - latest      : use the latest available data
@@ -1013,9 +1013,10 @@ abstract class FileBackend {
         * Otherwise, one would need to use getLocalReference(), which involves loading
         * the entire file on to local disk.
         *
-        * @param $params Array
+        * @param array $params
         * $params include:
         *   - src : source storage path
+        *   - ttl : lifetime (seconds) if pre-authenticated; default is 1 day
         * @return string|null
         * @since 1.21
         */
@@ -1109,7 +1110,7 @@ abstract class FileBackend {
         * Preload persistent file stat and property cache into in-process cache.
         * This should be used when stat calls will be made on a known list of a many files.
         *
-        * @param $paths Array Storage paths
+        * @param array $paths Storage paths
         * @return void
         */
        public function preloadCache( array $paths ) {}
@@ -1118,7 +1119,7 @@ abstract class FileBackend {
         * Invalidate any in-process file stat and property cache.
         * If $paths is given, then only the cache for those files will be cleared.
         *
-        * @param $paths Array Storage paths (optional)
+        * @param array $paths Storage paths (optional)
         * @return void
         */
        public function clearCache( array $paths = null ) {}
@@ -1129,7 +1130,7 @@ abstract class FileBackend {
         *
         * Callers should consider using getScopedFileLocks() instead.
         *
-        * @param $paths Array Storage paths
+        * @param array $paths Storage paths
         * @param $type integer LockManager::LOCK_* constant
         * @return Status
         */
@@ -1140,7 +1141,7 @@ abstract class FileBackend {
        /**
         * Unlock the files at the given storage paths in the backend.
         *
-        * @param $paths Array Storage paths
+        * @param array $paths Storage paths
         * @param $type integer LockManager::LOCK_* constant
         * @return Status
         */
@@ -1156,7 +1157,7 @@ abstract class FileBackend {
         * Once the return value goes out scope, the locks will be released and
         * the status updated. Unlock fatals will not change the status "OK" value.
         *
-        * @param $paths Array Storage paths
+        * @param array $paths Storage paths
         * @param $type integer LockManager::LOCK_* constant
         * @param $status Status Status to update on lock/unlock
         * @return ScopedLock|null Returns null on failure
@@ -1176,7 +1177,7 @@ abstract class FileBackend {
         *
         * @see FileBackend::doOperations()
         *
-        * @param $ops Array List of file operations to FileBackend::doOperations()
+        * @param array $ops List of file operations to FileBackend::doOperations()
         * @param $status Status Status to update on lock/unlock
         * @return Array List of ScopedFileLocks or null values
         * @since 1.20
@@ -1197,7 +1198,7 @@ abstract class FileBackend {
        /**
         * Get the storage path for the given container for this backend
         *
-        * @param $container string Container name
+        * @param string $container Container name
         * @return string Storage path
         * @since 1.21
         */
@@ -1278,7 +1279,7 @@ abstract class FileBackend {
         */
        final public static function parentStoragePath( $storagePath ) {
                $storagePath = dirname( $storagePath );
-               list( $b, $cont, $rel ) = self::splitStoragePath( $storagePath );
+               list( , $rel ) = self::splitStoragePath( $storagePath );
                return ( $rel === null ) ? null : $storagePath;
        }
 
@@ -1307,8 +1308,8 @@ abstract class FileBackend {
        /**
         * Build a Content-Disposition header value per RFC 6266.
         *
-        * @param $type string One of (attachment, inline)
-        * @param $filename string Suggested file name (should not contain slashes)
+        * @param string $type One of (attachment, inline)
+        * @param string $filename Suggested file name (should not contain slashes)
         * @throws MWException
         * @return string
         * @since 1.20
@@ -1336,7 +1337,7 @@ abstract class FileBackend {
         *
         * This uses the same traversal protection as Title::secureAndSplit().
         *
-        * @param $path string Storage path relative to a container
+        * @param string $path Storage path relative to a container
         * @return string|null
         */
        final protected static function normalizeContainerPath( $path ) {
index 0bf5279..d790a99 100644 (file)
@@ -184,7 +184,7 @@ class FileBackendGroup {
         * @return FileBackend|null Backend or null on failure
         */
        public function backendFromPath( $storagePath ) {
-               list( $backend, $c, $p ) = FileBackend::splitStoragePath( $storagePath );
+               list( $backend, , ) = FileBackend::splitStoragePath( $storagePath );
                if ( $backend !== null && isset( $this->backends[$backend] ) ) {
                        return $this->get( $backend );
                }
index a5f5073..1e98adc 100644 (file)
@@ -204,7 +204,7 @@ class FileBackendMultiWrite extends FileBackend {
        /**
         * Check that a set of files are consistent across all internal backends
         *
-        * @param $paths Array List of storage paths
+        * @param array $paths List of storage paths
         * @return Status
         */
        public function consistencyCheck( array $paths ) {
@@ -270,7 +270,7 @@ class FileBackendMultiWrite extends FileBackend {
        /**
         * Check that a set of file paths are usable across all internal backends
         *
-        * @param $paths Array List of storage paths
+        * @param array $paths List of storage paths
         * @return Status
         */
        public function accessibilityCheck( array $paths ) {
@@ -295,7 +295,7 @@ class FileBackendMultiWrite extends FileBackend {
         * Check that a set of files are consistent across all internal backends
         * and re-synchronize those files againt the "multi master" if needed.
         *
-        * @param $paths Array List of storage paths
+        * @param array $paths List of storage paths
         * @return Status
         */
        public function resyncFiles( array $paths ) {
@@ -303,8 +303,8 @@ class FileBackendMultiWrite extends FileBackend {
 
                $mBackend = $this->backends[$this->masterIndex];
                foreach ( $paths as $path ) {
-                       $mPath  = $this->substPaths( $path, $mBackend );
-                       $mSha1  = $mBackend->getFileSha1Base36( array( 'src' => $mPath ) );
+                       $mPath = $this->substPaths( $path, $mBackend );
+                       $mSha1 = $mBackend->getFileSha1Base36( array( 'src' => $mPath ) );
                        $mExist = $mBackend->fileExists( array( 'src' => $mPath ) );
                        // Check if the master backend is available...
                        if ( $mExist === null ) {
@@ -336,7 +336,7 @@ class FileBackendMultiWrite extends FileBackend {
        /**
         * Get a list of file storage paths to read or write for a list of operations
         *
-        * @param $ops Array Same format as doOperations()
+        * @param array $ops Same format as doOperations()
         * @return Array List of storage paths to files (does not include directories)
         */
        protected function fileStoragePathsForOps( array $ops ) {
@@ -359,7 +359,7 @@ class FileBackendMultiWrite extends FileBackend {
         * Substitute the backend name in storage path parameters
         * for a set of operations with that of a given internal backend.
         *
-        * @param $ops Array List of file operation arrays
+        * @param array $ops List of file operation arrays
         * @param $backend FileBackendStore
         * @return Array
         */
@@ -380,7 +380,7 @@ class FileBackendMultiWrite extends FileBackend {
        /**
         * Same as substOpBatchPaths() but for a single operation
         *
-        * @param $ops array File operation array
+        * @param array $ops File operation array
         * @param $backend FileBackendStore
         * @return Array
         */
@@ -392,7 +392,7 @@ class FileBackendMultiWrite extends FileBackend {
        /**
         * Substitute the backend of storage paths with an internal backend's name
         *
-        * @param $paths Array|string List of paths or single string path
+        * @param array|string $paths List of paths or single string path
         * @param $backend FileBackendStore
         * @return Array|string
         */
@@ -407,7 +407,7 @@ class FileBackendMultiWrite extends FileBackend {
        /**
         * Substitute the backend of internal storage paths with the proxy backend's name
         *
-        * @param $paths Array|string List of paths or single string path
+        * @param array|string $paths List of paths or single string path
         * @return Array|string
         */
        protected function unsubstPaths( $paths ) {
@@ -447,11 +447,11 @@ class FileBackendMultiWrite extends FileBackend {
        }
 
        /**
-        * @param $path string Storage path
+        * @param string $path Storage path
         * @return bool Path container should have dir changes pushed to all backends
         */
        protected function replicateContainerDirChanges( $path ) {
-               list( $b, $shortCont, $r ) = self::splitStoragePath( $path );
+               list( , $shortCont,  ) = self::splitStoragePath( $path );
                return !in_array( $shortCont, $this->noPushDirConts );
        }
 
index 53c2698..3f1d185 100644 (file)
@@ -57,8 +57,8 @@ abstract class FileBackendStore extends FileBackend {
         */
        public function __construct( array $config ) {
                parent::__construct( $config );
-               $this->memCache       = new EmptyBagOStuff(); // disabled by default
-               $this->cheapCache     = new ProcessCacheLRU( 300 );
+               $this->memCache = new EmptyBagOStuff(); // disabled by default
+               $this->cheapCache = new ProcessCacheLRU( 300 );
                $this->expensiveCache = new ProcessCacheLRU( 5 );
        }
 
@@ -100,7 +100,7 @@ abstract class FileBackendStore extends FileBackend {
         *   - dstExists   : Whether a file exists at the destination (optimization).
         *                   Callers can use "false" if no existing file is being changed.
         *
-        * @param $params Array
+        * @param array $params
         * @return Status
         */
        final public function createInternal( array $params ) {
@@ -143,7 +143,7 @@ abstract class FileBackendStore extends FileBackend {
         *   - dstExists   : Whether a file exists at the destination (optimization).
         *                   Callers can use "false" if no existing file is being changed.
         *
-        * @param $params Array
+        * @param array $params
         * @return Status
         */
        final public function storeInternal( array $params ) {
@@ -186,7 +186,7 @@ abstract class FileBackendStore extends FileBackend {
         *   - dstExists           : Whether a file exists at the destination (optimization).
         *                           Callers can use "false" if no existing file is being changed.
         *
-        * @param $params Array
+        * @param array $params
         * @return Status
         */
        final public function copyInternal( array $params ) {
@@ -219,7 +219,7 @@ abstract class FileBackendStore extends FileBackend {
         *                           If the status is OK, then its value field will be
         *                           set to a FileBackendStoreOpHandle object.
         *
-        * @param $params Array
+        * @param array $params
         * @return Status
         */
        final public function deleteInternal( array $params ) {
@@ -255,7 +255,7 @@ abstract class FileBackendStore extends FileBackend {
         *   - dstExists           : Whether a file exists at the destination (optimization).
         *                           Callers can use "false" if no existing file is being changed.
         *
-        * @param $params Array
+        * @param array $params
         * @return Status
         */
        final public function moveInternal( array $params ) {
@@ -300,7 +300,7 @@ abstract class FileBackendStore extends FileBackend {
         *                     If the status is OK, then its value field will be
         *                     set to a FileBackendStoreOpHandle object.
         *
-        * @param $params Array
+        * @param array $params
         * @return Status
         */
        final public function describeInternal( array $params ) {
@@ -326,7 +326,7 @@ abstract class FileBackendStore extends FileBackend {
         * No-op file operation that does nothing.
         * Do not call this function from places outside FileBackend and FileOp.
         *
-        * @param $params Array
+        * @param array $params
         * @return Status
         */
        final public function nullInternal( array $params ) {
@@ -447,7 +447,7 @@ abstract class FileBackendStore extends FileBackend {
                        $status->merge( $this->doPrepareInternal( $fullCont, $dir, $params ) );
                } else { // directory is on several shards
                        wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
                        foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
                                $status->merge( $this->doPrepareInternal( "{$fullCont}{$suffix}", $dir, $params ) );
                        }
@@ -487,7 +487,7 @@ abstract class FileBackendStore extends FileBackend {
                        $status->merge( $this->doSecureInternal( $fullCont, $dir, $params ) );
                } else { // directory is on several shards
                        wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
                        foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
                                $status->merge( $this->doSecureInternal( "{$fullCont}{$suffix}", $dir, $params ) );
                        }
@@ -527,7 +527,7 @@ abstract class FileBackendStore extends FileBackend {
                        $status->merge( $this->doPublishInternal( $fullCont, $dir, $params ) );
                } else { // directory is on several shards
                        wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
                        foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
                                $status->merge( $this->doPublishInternal( "{$fullCont}{$suffix}", $dir, $params ) );
                        }
@@ -589,7 +589,7 @@ abstract class FileBackendStore extends FileBackend {
                        $this->deleteContainerCache( $fullCont ); // purge cache
                } else { // directory is on several shards
                        wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
                        foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
                                $status->merge( $this->doCleanInternal( "{$fullCont}{$suffix}", $dir, $params ) );
                                $this->deleteContainerCache( "{$fullCont}{$suffix}" ); // purge cache
@@ -951,7 +951,7 @@ abstract class FileBackendStore extends FileBackend {
                        return $this->doDirectoryExists( $fullCont, $dir, $params );
                } else { // directory is on several shards
                        wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
-                       list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
                        $res = false; // response
                        foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
                                $exists = $this->doDirectoryExists( "{$fullCont}{$suffix}", $dir, $params );
@@ -969,9 +969,9 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * @see FileBackendStore::directoryExists()
         *
-        * @param $container string Resolved container name
-        * @param $dir string Resolved path relative to container
-        * @param $params Array
+        * @param string $container Resolved container name
+        * @param string $dir Resolved path relative to container
+        * @param array $params
         * @return bool|null
         */
        abstract protected function doDirectoryExists( $container, $dir, array $params );
@@ -991,7 +991,7 @@ abstract class FileBackendStore extends FileBackend {
                } else {
                        wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
                        // File listing spans multiple containers/shards
-                       list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
                        return new FileBackendStoreShardDirIterator( $this,
                                $fullCont, $dir, $this->getContainerSuffixes( $shortCont ), $params );
                }
@@ -1002,9 +1002,9 @@ abstract class FileBackendStore extends FileBackend {
         *
         * @see FileBackendStore::getDirectoryList()
         *
-        * @param $container string Resolved container name
-        * @param $dir string Resolved path relative to container
-        * @param $params Array
+        * @param string $container Resolved container name
+        * @param string $dir Resolved path relative to container
+        * @param array $params
         * @return Traversable|Array|null Returns null on failure
         */
        abstract public function getDirectoryListInternal( $container, $dir, array $params );
@@ -1024,7 +1024,7 @@ abstract class FileBackendStore extends FileBackend {
                } else {
                        wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
                        // File listing spans multiple containers/shards
-                       list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] );
+                       list( , $shortCont, ) = self::splitStoragePath( $params['dir'] );
                        return new FileBackendStoreShardFileIterator( $this,
                                $fullCont, $dir, $this->getContainerSuffixes( $shortCont ), $params );
                }
@@ -1035,9 +1035,9 @@ abstract class FileBackendStore extends FileBackend {
         *
         * @see FileBackendStore::getFileList()
         *
-        * @param $container string Resolved container name
-        * @param $dir string Resolved path relative to container
-        * @param $params Array
+        * @param string $container Resolved container name
+        * @param string $dir Resolved path relative to container
+        * @param array $params
         * @return Traversable|Array|null Returns null on failure
         */
        abstract public function getFileListInternal( $container, $dir, array $params );
@@ -1049,7 +1049,7 @@ abstract class FileBackendStore extends FileBackend {
         * The result must have the same number of items as the input.
         * An exception is thrown if an unsupported operation is requested.
         *
-        * @param $ops Array Same format as doOperations()
+        * @param array $ops Same format as doOperations()
         * @return Array List of FileOp objects
         * @throws MWException
         */
@@ -1088,7 +1088,7 @@ abstract class FileBackendStore extends FileBackend {
         * each corresponding to a list of storage paths to be locked.
         * All returned paths are normalized.
         *
-        * @param $performOps Array List of FileOp objects
+        * @param array $performOps List of FileOp objects
         * @return Array ('sh' => list of paths, 'ex' => list of paths)
         */
        final public function getPathsToLockForOpsInternal( array $performOps ) {
@@ -1240,7 +1240,7 @@ abstract class FileBackendStore extends FileBackend {
         * The resulting Status object fields will correspond
         * to the order in which the handles where given.
         *
-        * @param $handles Array List of FileBackendStoreOpHandle objects
+        * @param array $handles List of FileBackendStoreOpHandle objects
         * @return Array Map of Status objects
         * @throws MWException
         */
@@ -1279,7 +1279,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Strip long HTTP headers from a file operation
         *
-        * @param $op array Same format as doOperation()
+        * @param array $op Same format as doOperation()
         * @return Array
         */
        protected function stripInvalidHeadersFromOp( array $op ) {
@@ -1302,7 +1302,7 @@ abstract class FileBackendStore extends FileBackend {
        final public function preloadCache( array $paths ) {
                $fullConts = array(); // full container names
                foreach ( $paths as $path ) {
-                       list( $fullCont, $r, $s ) = $this->resolveStoragePath( $path );
+                       list( $fullCont, , ) = $this->resolveStoragePath( $path );
                        $fullConts[] = $fullCont;
                }
                // Load from the persistent file and container caches
@@ -1335,7 +1335,7 @@ abstract class FileBackendStore extends FileBackend {
         *
         * @see FileBackend::clearCache()
         *
-        * @param $paths Array Storage paths (optional)
+        * @param array $paths Storage paths (optional)
         * @return void
         */
        protected function doClearCache( array $paths = null ) {}
@@ -1424,8 +1424,8 @@ abstract class FileBackendStore extends FileBackend {
         * Get the container name shard suffix for a given path.
         * Any empty suffix means the container is not sharded.
         *
-        * @param $container string Container name
-        * @param $relPath string Storage path relative to the container
+        * @param string $container Container name
+        * @param string $relPath Storage path relative to the container
         * @return string|null Returns null if shard could not be determined
         */
        final protected function getContainerShard( $container, $relPath ) {
@@ -1461,11 +1461,11 @@ abstract class FileBackendStore extends FileBackend {
         * Container dirs like "a", where the container shards on "x/xy",
         * can reside on several shards. Such paths are tricky to handle.
         *
-        * @param $storagePath string Storage path
+        * @param string $storagePath Storage path
         * @return bool
         */
        final public function isSingleShardPathInternal( $storagePath ) {
-               list( $c, $r, $shard ) = $this->resolveStoragePath( $storagePath );
+               list( , $shard ) = $this->resolveStoragePath( $storagePath );
                return ( $shard !== null );
        }
 
@@ -1541,8 +1541,8 @@ abstract class FileBackendStore extends FileBackend {
         * getting absolute paths (e.g. FS based backends). Note that the relative path
         * may be the empty string (e.g. the path is simply to the container).
         *
-        * @param $container string Container name
-        * @param $relStoragePath string Storage path relative to the container
+        * @param string $container Container name
+        * @param string $relStoragePath Storage path relative to the container
         * @return string|null Path or null if not valid
         */
        protected function resolveContainerPath( $container, $relStoragePath ) {
@@ -1552,7 +1552,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Get the cache key for a container
         *
-        * @param $container string Resolved container name
+        * @param string $container Resolved container name
         * @return string
         */
        private function containerCacheKey( $container ) {
@@ -1562,7 +1562,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Set the cached info for a container
         *
-        * @param $container string Resolved container name
+        * @param string $container Resolved container name
         * @param $val mixed Information to cache
         */
        final protected function setContainerCache( $container, $val ) {
@@ -1573,7 +1573,7 @@ abstract class FileBackendStore extends FileBackend {
         * Delete the cached info for a container.
         * The cache key is salted for a while to prevent race conditions.
         *
-        * @param $container string Resolved container name
+        * @param string $container Resolved container name
         */
        final protected function deleteContainerCache( $container ) {
                if ( !$this->memCache->set( $this->containerCacheKey( $container ), 'PURGED', 300 ) ) {
@@ -1608,7 +1608,7 @@ abstract class FileBackendStore extends FileBackend {
                }
                // Get all the corresponding cache keys for paths...
                foreach ( $paths as $path ) {
-                       list( $fullCont, $r, $s ) = $this->resolveStoragePath( $path );
+                       list( $fullCont, , ) = $this->resolveStoragePath( $path );
                        if ( $fullCont !== null ) { // valid path for this backend
                                $contNames[$this->containerCacheKey( $fullCont )] = $fullCont;
                        }
@@ -1633,7 +1633,7 @@ abstract class FileBackendStore extends FileBackend {
         * resolved container names and their corresponding cached info.
         * Only containers that actually exist should appear in the map.
         *
-        * @param $containerInfo Array Map of resolved container names to cached info
+        * @param array $containerInfo Map of resolved container names to cached info
         * @return void
         */
        protected function doPrimeContainerCache( array $containerInfo ) {}
@@ -1641,7 +1641,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Get the cache key for a file path
         *
-        * @param $path string Normalized storage path
+        * @param string $path Normalized storage path
         * @return string
         */
        private function fileCacheKey( $path ) {
@@ -1653,7 +1653,7 @@ abstract class FileBackendStore extends FileBackend {
         * Negatives (404s) are not cached. By not caching negatives, we can skip cache
         * salting for the case when a file is created at a path were there was none before.
         *
-        * @param $path string Storage path
+        * @param string $path Storage path
         * @param $val mixed Information to cache
         */
        final protected function setFileCache( $path, $val ) {
@@ -1670,7 +1670,7 @@ abstract class FileBackendStore extends FileBackend {
         * Since negatives (404s) are not cached, this does not need to be called when
         * a file is created at a path were there was none before.
         *
-        * @param $path string Storage path
+        * @param string $path Storage path
         */
        final protected function deleteFileCache( $path ) {
                $path = FileBackend::normalizeStoragePath( $path );
@@ -1687,7 +1687,7 @@ abstract class FileBackendStore extends FileBackend {
         * used in a list of storage paths or FileOp objects.
         * This loads the persistent cache values into the process cache.
         *
-        * @param $items Array List of storage paths or FileOps
+        * @param array $items List of storage paths or FileOps
         * @return void
         */
        final protected function primeFileCache( array $items ) {
@@ -1709,7 +1709,7 @@ abstract class FileBackendStore extends FileBackend {
                $paths = array_filter( $paths, 'strlen' ); // remove nulls
                // Get all the corresponding cache keys for paths...
                foreach ( $paths as $path ) {
-                       list( $cont, $rel, $s ) = $this->resolveStoragePath( $path );
+                       list( , $rel, ) = $this->resolveStoragePath( $path );
                        if ( $rel !== null ) { // valid path for this backend
                                $pathNames[$this->fileCacheKey( $path )] = $path;
                        }
@@ -1734,7 +1734,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Set the 'concurrency' option from a list of operation options
         *
-        * @param $opts array Map of operation options
+        * @param array $opts Map of operation options
         * @return Array
         */
        final protected function setConcurrencyFlags( array $opts ) {
@@ -1806,10 +1806,10 @@ abstract class FileBackendStoreShardListIterator implements Iterator {
 
        /**
         * @param $backend FileBackendStore
-        * @param $container string Full storage container name
-        * @param $dir string Storage directory relative to container
-        * @param $suffixes Array List of container shard suffixes
-        * @param $params Array
+        * @param string $container Full storage container name
+        * @param string $dir Storage directory relative to container
+        * @param array $suffixes List of container shard suffixes
+        * @param array $params
         */
        public function __construct(
                FileBackendStore $backend, $container, $dir, array $suffixes, array $params
@@ -1935,9 +1935,9 @@ abstract class FileBackendStoreShardListIterator implements Iterator {
        /**
         * Get the list for a given container shard
         *
-        * @param $container string Resolved container name
-        * @param $dir string Resolved path relative to container
-        * @param $params Array
+        * @param string $container Resolved container name
+        * @param string $dir Resolved path relative to container
+        * @param array $params
         * @return Traversable|Array|null
         */
        abstract protected function listFromShard( $container, $dir, array $params );
index 28f5b73..bb0ab57 100644 (file)
@@ -163,7 +163,7 @@ abstract class FileOp {
        /**
         * Update a dependency tracking array to account for this operation
         *
-        * @param $deps Array Prior path reads/writes; format of FileOp::newPredicates()
+        * @param array $deps Prior path reads/writes; format of FileOp::newPredicates()
         * @return Array
         */
        final public function applyDependencies( array $deps ) {
@@ -175,7 +175,7 @@ abstract class FileOp {
        /**
         * Check if this operation changes files listed in $paths
         *
-        * @param $paths Array Prior path reads/writes; format of FileOp::newPredicates()
+        * @param array $paths Prior path reads/writes; format of FileOp::newPredicates()
         * @return boolean
         */
        final public function dependsOn( array $deps ) {
@@ -195,8 +195,8 @@ abstract class FileOp {
        /**
         * Get the file journal entries for this file operation
         *
-        * @param $oPredicates Array Pre-op info about files (format of FileOp::newPredicates)
-        * @param $nPredicates Array Post-op info about files (format of FileOp::newPredicates)
+        * @param array $oPredicates Pre-op info about files (format of FileOp::newPredicates)
+        * @param array $nPredicates Post-op info about files (format of FileOp::newPredicates)
         * @return Array
         */
        final public function getJournalEntries( array $oPredicates, array $nPredicates ) {
@@ -392,7 +392,7 @@ abstract class FileOp {
        /**
         * Check if a file will exist in storage when this operation is attempted
         *
-        * @param $source string Storage path
+        * @param string $source Storage path
         * @param $predicates Array
         * @return bool
         */
@@ -408,7 +408,7 @@ abstract class FileOp {
        /**
         * Get the SHA-1 of a file in storage when this operation is attempted
         *
-        * @param $source string Storage path
+        * @param string $source Storage path
         * @param $predicates Array
         * @return string|bool False on failure
         */
index 6e103ec..fc51d78 100644 (file)
@@ -49,8 +49,8 @@ class FileOpBatch {
         *   - a) unexpected operation errors occurred (network partitions, disk full...)
         *   - b) significant operation errors occurred and 'force' was not set
         *
-        * @param $performOps Array List of FileOp operations
-        * @param $opts Array Batch operation options
+        * @param array $performOps List of FileOp operations
+        * @param array $opts Batch operation options
         * @param $journal FileJournal Journal to log operations to
         * @return Status
         */
index 9c271ea..0f3d97a 100644 (file)
@@ -194,14 +194,14 @@ class SwiftFileBackend extends FileBackendStore {
        }
 
        /**
-        * @param $disposition string Content-Disposition header value
+        * @param string $disposition Content-Disposition header value
         * @return string Truncated Content-Disposition header value to meet Swift limits
         */
        protected function truncDisp( $disposition ) {
                $res = '';
                foreach ( explode( ';', $disposition ) as $part ) {
                        $part = trim( $part );
-                       $new  = ( $res === '' ) ? $part : "{$res};{$part}";
+                       $new = ( $res === '' ) ? $part : "{$res};{$part}";
                        if ( strlen( $new ) <= 255 ) {
                                $res = $new;
                        } else {
@@ -411,7 +411,9 @@ class SwiftFileBackend extends FileBackendStore {
                        $sContObj = $this->getContainer( $srcCont );
                        $dContObj = $this->getContainer( $dstCont );
                } catch ( NoSuchContainerException $e ) {
-                       $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+                       if ( empty( $params['ignoreMissingSource'] ) || isset( $sContObj ) ) {
+                               $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+                       }
                        return $status;
                } catch ( CloudFilesException $e ) { // some other exception?
                        $this->handleException( $e, $status, __METHOD__, $params );
@@ -481,7 +483,9 @@ class SwiftFileBackend extends FileBackendStore {
                        $sContObj = $this->getContainer( $srcCont );
                        $dContObj = $this->getContainer( $dstCont );
                } catch ( NoSuchContainerException $e ) {
-                       $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+                       if ( empty( $params['ignoreMissingSource'] ) || isset( $sContObj ) ) {
+                               $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+                       }
                        return $status;
                } catch ( CloudFilesException $e ) { // some other exception?
                        $this->handleException( $e, $status, __METHOD__, $params );
@@ -557,7 +561,9 @@ class SwiftFileBackend extends FileBackendStore {
                } catch ( CDNNotEnabledException $e ) {
                        // CDN not enabled; nothing to see here
                } catch ( NoSuchContainerException $e ) {
-                       $status->fatal( 'backend-fail-delete', $params['src'] );
+                       if ( empty( $params['ignoreMissingSource'] ) ) {
+                               $status->fatal( 'backend-fail-delete', $params['src'] );
+                       }
                } catch ( NoSuchObjectException $e ) {
                        if ( empty( $params['ignoreMissingSource'] ) ) {
                                $status->fatal( 'backend-fail-delete', $params['src'] );
@@ -634,7 +640,7 @@ class SwiftFileBackend extends FileBackendStore {
 
                // (a) Check if container already exists
                try {
-                       $contObj = $this->getContainer( $fullCont );
+                       $this->getContainer( $fullCont );
                        // NoSuchContainerException not thrown: container must exist
                        return $status; // already exists
                } catch ( NoSuchContainerException $e ) {
@@ -816,7 +822,7 @@ class SwiftFileBackend extends FileBackendStore {
         * Fill in any missing object metadata and save it to Swift
         *
         * @param $obj CF_Object
-        * @param $path string Storage path to object
+        * @param string $path Storage path to object
         * @return bool Success
         * @throws Exception cloudfiles exceptions
         */
@@ -869,8 +875,6 @@ class SwiftFileBackend extends FileBackendStore {
                                try {
                                        $sContObj = $this->getContainer( $srcCont );
                                        $obj = new CF_Object( $sContObj, $srcRel, false, false ); // skip HEAD
-                                       // Get source file extension
-                                       $ext = FileBackend::extensionFromPath( $path );
                                        // Create a new temporary memory file...
                                        $handle = fopen( 'php://temp', 'wb' );
                                        if ( $handle ) {
@@ -958,11 +962,11 @@ class SwiftFileBackend extends FileBackendStore {
        /**
         * Do not call this function outside of SwiftFileBackendFileList
         *
-        * @param $fullCont string Resolved container name
-        * @param $dir string Resolved storage directory with no trailing slash
-        * @param $after string|null Storage path of file to list items after
+        * @param string $fullCont Resolved container name
+        * @param string $dir Resolved storage directory with no trailing slash
+        * @param string|null $after Storage path of file to list items after
         * @param $limit integer Max number of items to list
-        * @param $params Array Includes flag for 'topOnly'
+        * @param array $params Includes flag for 'topOnly'
         * @return Array List of relative paths of dirs directly under $dir
         */
        public function getDirListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) {
@@ -1031,11 +1035,11 @@ class SwiftFileBackend extends FileBackendStore {
        /**
         * Do not call this function outside of SwiftFileBackendFileList
         *
-        * @param $fullCont string Resolved container name
-        * @param $dir string Resolved storage directory with no trailing slash
-        * @param $after string|null Storage path of file to list items after
+        * @param string $fullCont Resolved container name
+        * @param string $dir Resolved storage directory with no trailing slash
+        * @param string|null $after Storage path of file to list items after
         * @param $limit integer Max number of items to list
-        * @param $params Array Includes flag for 'topOnly'
+        * @param array $params Includes flag for 'topOnly'
         * @return Array List of relative paths of files under $dir
         */
        public function getFileListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) {
@@ -1210,12 +1214,13 @@ class SwiftFileBackend extends FileBackendStore {
                                return null; // invalid path
                        }
                        try {
+                               $ttl = isset( $params['ttl'] ) ? $params['ttl'] : 86400;
                                $sContObj = $this->getContainer( $srcCont );
                                $obj = new CF_Object( $sContObj, $srcRel, false, false ); // skip HEAD
                                if ( $this->swiftTempUrlKey != '' ) {
-                                       return $obj->get_temp_url( $this->swiftTempUrlKey, 86400, "GET" );
+                                       return $obj->get_temp_url( $this->swiftTempUrlKey, $ttl, "GET" );
                                } else { // give S3 API URL for rgw
-                                       $expires = time() + 86400;
+                                       $expires = time() + $ttl;
                                        // Path for signature starts with the bucket
                                        $spath = '/' . rawurlencode( $srcCont ) . '/' .
                                                str_replace( '%2F', '/', rawurlencode( $srcRel ) );
@@ -1258,7 +1263,7 @@ class SwiftFileBackend extends FileBackendStore {
         * on a FileBackend params array, e.g. that of getLocalCopy().
         * $params is currently only checked for a 'latest' flag.
         *
-        * @param $params Array
+        * @param array $params
         * @return Array
         */
        protected function headersFromParams( array $params ) {
@@ -1321,8 +1326,8 @@ class SwiftFileBackend extends FileBackendStore {
         * (lists are truncated to 10000 item with no way to page), and is just a performance risk.
         *
         * @param $contObj CF_Container Swift container
-        * @param $readGrps Array List of read access routes
-        * @param $writeGrps Array List of write access routes
+        * @param array $readGrps List of read access routes
+        * @param array $writeGrps List of write access routes
         * @return Status
         */
        protected function setContainerAccess(
@@ -1345,7 +1350,7 @@ class SwiftFileBackend extends FileBackendStore {
         * Purge the CDN cache of affected objects if CDN caching is enabled.
         * This is for Rackspace/Akamai CDNs.
         *
-        * @param $objects Array List of CF_Object items
+        * @param array $objects List of CF_Object items
         * @return void
         */
        public function purgeCDNCache( array $objects ) {
@@ -1439,8 +1444,8 @@ class SwiftFileBackend extends FileBackendStore {
         * Get a Swift container object, possibly from process cache.
         * Use $reCache if the file count or byte count is needed.
         *
-        * @param $container string Container name
-        * @param $bypassCache bool Bypass all caches and load from Swift
+        * @param string $container Container name
+        * @param bool $bypassCache Bypass all caches and load from Swift
         * @return CF_Container
         * @throws CloudFilesException
         */
@@ -1467,7 +1472,7 @@ class SwiftFileBackend extends FileBackendStore {
        /**
         * Create a Swift container
         *
-        * @param $container string Container name
+        * @param string $container Container name
         * @return CF_Container
         * @throws CloudFilesException
         */
@@ -1481,7 +1486,7 @@ class SwiftFileBackend extends FileBackendStore {
        /**
         * Delete a Swift container
         *
-        * @param $container string Container name
+        * @param string $container Container name
         * @return void
         * @throws CloudFilesException
         */
@@ -1515,7 +1520,7 @@ class SwiftFileBackend extends FileBackendStore {
         * @param $e Exception
         * @param $status Status|null
         * @param $func string
-        * @param $params Array
+        * @param array $params
         * @return void
         */
        protected function handleException( Exception $e, $status, $func, array $params ) {
@@ -1582,9 +1587,9 @@ abstract class SwiftFileBackendList implements Iterator {
 
        /**
         * @param $backend SwiftFileBackend
-        * @param $fullCont string Resolved container name
-        * @param $dir string Resolved directory relative to container
-        * @param $params Array
+        * @param string $fullCont Resolved container name
+        * @param string $dir Resolved directory relative to container
+        * @param array $params
         */
        public function __construct( SwiftFileBackend $backend, $fullCont, $dir, array $params ) {
                $this->backend = $backend;
@@ -1653,11 +1658,11 @@ abstract class SwiftFileBackendList implements Iterator {
        /**
         * Get the given list portion (page)
         *
-        * @param $container string Resolved container name
-        * @param $dir string Resolved path relative to container
+        * @param string $container Resolved container name
+        * @param string $dir Resolved path relative to container
         * @param $after string|null
         * @param $limit integer
-        * @param $params Array
+        * @param array $params
         * @return Traversable|Array|null Returns null on failure
         */
        abstract protected function pageFromList( $container, $dir, &$after, $limit, array $params );
index b0f39c3..a1b7a45 100644 (file)
@@ -54,7 +54,7 @@ abstract class FileJournal {
         * Create an appropriate FileJournal object from config
         *
         * @param $config Array
-        * @param $backend string A registered file backend name
+        * @param string $backend A registered file backend name
         * @throws MWException
         * @return FileJournal
         */
@@ -90,8 +90,8 @@ abstract class FileJournal {
         *     newSha1 : The final base 36 SHA-1 of the file
         * Note that 'false' should be used as the SHA-1 for non-existing files.
         *
-        * @param $entries Array List of file operations (each an array of parameters)
-        * @param $batchId string UUID string that identifies the operation batch
+        * @param array $entries List of file operations (each an array of parameters)
+        * @param string $batchId UUID string that identifies the operation batch
         * @return Status
         */
        final public function logChangeBatch( array $entries, $batchId ) {
@@ -104,8 +104,8 @@ abstract class FileJournal {
        /**
         * @see FileJournal::logChangeBatch()
         *
-        * @param $entries Array List of file operations (each an array of parameters)
-        * @param $batchId string UUID string that identifies the operation batch
+        * @param array $entries List of file operations (each an array of parameters)
+        * @param string $batchId UUID string that identifies the operation batch
         * @return Status
         */
        abstract protected function doLogChangeBatch( array $entries, $batchId );
index 90f4ccd..f02387d 100644 (file)
@@ -71,7 +71,7 @@ abstract class DBLockManager extends QuorumLockManager {
         *                   This tells the DB server how long to wait before assuming
         *                   connection failure and releasing all the locks for a session.
         *
-        * @param Array $config
+        * @param array $config
         */
        public function __construct( array $config ) {
                parent::__construct( $config );
@@ -256,27 +256,38 @@ class MySqlLockManager extends DBLockManager {
                $status = Status::newGood();
 
                $db = $this->getConnection( $lockSrv ); // checked in isServerUp()
-               $keys = array_unique( array_map( array( $this, 'sha1Base36Absolute' ), $paths ) );
+
+               $keys = array(); // list of hash keys for the paths
+               $data = array(); // list of rows to insert
+               $checkEXKeys = array(); // list of hash keys that this has no EX lock on
                # Build up values for INSERT clause
-               $data = array();
-               foreach ( $keys as $key ) {
+               foreach ( $paths as $path ) {
+                       $key = $this->sha1Base36Absolute( $path );
+                       $keys[] = $key;
                        $data[] = array( 'fls_key' => $key, 'fls_session' => $this->session );
+                       if ( !isset( $this->locksHeld[$path][self::LOCK_EX] ) ) {
+                               $checkEXKeys[] = $key;
+                       }
                }
-               # Block new writers...
+
+               # Block new writers (both EX and SH locks leave entries here)...
                $db->insert( 'filelocks_shared', $data, __METHOD__, array( 'IGNORE' ) );
                # Actually do the locking queries...
                if ( $type == self::LOCK_SH ) { // reader locks
+                       $blocked = false;
                        # Bail if there are any existing writers...
-                       $blocked = $db->selectField( 'filelocks_exclusive', '1',
-                               array( 'fle_key' => $keys ),
-                               __METHOD__
-                       );
-                       # Prospective writers that haven't yet updated filelocks_exclusive
-                       # will recheck filelocks_shared after doing so and bail due to our entry.
+                       if ( count( $checkEXKeys ) ) {
+                               $blocked = $db->selectField( 'filelocks_exclusive', '1',
+                                       array( 'fle_key' => $checkEXKeys ),
+                                       __METHOD__
+                               );
+                       }
+                       # Other prospective writers that haven't yet updated filelocks_exclusive
+                       # will recheck filelocks_shared after doing so and bail due to this entry.
                } else { // writer locks
                        $encSession = $db->addQuotes( $this->session );
                        # Bail if there are any existing writers...
-                       # The may detect readers, but the safe check for them is below.
+                       # This may detect readers, but the safe check for them is below.
                        # Note: if two writers come at the same time, both bail :)
                        $blocked = $db->selectField( 'filelocks_shared', '1',
                                array( 'fls_key' => $keys, "fls_session != $encSession" ),
index f374fdd..eacba70 100644 (file)
@@ -43,7 +43,7 @@ class FSLockManager extends LockManager {
 
        protected $lockDir; // global dir for all servers
 
-       /** @var Array Map of (locked key => lock type => lock file handle) */
+       /** @var Array Map of (locked key => lock file handle) */
        protected $handles = array();
 
        /**
@@ -115,12 +115,16 @@ class FSLockManager extends LockManager {
                } elseif ( isset( $this->locksHeld[$path][self::LOCK_EX] ) ) {
                        $this->locksHeld[$path][$type] = 1;
                } else {
-                       wfSuppressWarnings();
-                       $handle = fopen( $this->getLockPath( $path ), 'a+' );
-                       wfRestoreWarnings();
-                       if ( !$handle ) { // lock dir missing?
-                               wfMkdirParents( $this->lockDir );
-                               $handle = fopen( $this->getLockPath( $path ), 'a+' ); // try again
+                       if ( isset( $this->handles[$path] ) ) {
+                               $handle = $this->handles[$path];
+                       } else {
+                               wfSuppressWarnings();
+                               $handle = fopen( $this->getLockPath( $path ), 'a+' );
+                               wfRestoreWarnings();
+                               if ( !$handle ) { // lock dir missing?
+                                       wfMkdirParents( $this->lockDir );
+                                       $handle = fopen( $this->getLockPath( $path ), 'a+' ); // try again
+                               }
                        }
                        if ( $handle ) {
                                // Either a shared or exclusive lock
@@ -128,7 +132,7 @@ class FSLockManager extends LockManager {
                                if ( flock( $handle, $lock | LOCK_NB ) ) {
                                        // Record this lock as active
                                        $this->locksHeld[$path][$type] = 1;
-                                       $this->handles[$path][$type] = $handle;
+                                       $this->handles[$path] = $handle;
                                } else {
                                        fclose( $handle );
                                        $status->fatal( 'lockmanager-fail-acquirelock', $path );
@@ -160,24 +164,13 @@ class FSLockManager extends LockManager {
                        --$this->locksHeld[$path][$type];
                        if ( $this->locksHeld[$path][$type] <= 0 ) {
                                unset( $this->locksHeld[$path][$type] );
-                               // If a LOCK_SH comes in while we have a LOCK_EX, we don't
-                               // actually add a handler, so check for handler existence.
-                               if ( isset( $this->handles[$path][$type] ) ) {
-                                       if ( $type === self::LOCK_EX
-                                               && isset( $this->locksHeld[$path][self::LOCK_SH] )
-                                               && !isset( $this->handles[$path][self::LOCK_SH] ) )
-                                       {
-                                               // EX lock came first: move this handle to the SH one
-                                               $this->handles[$path][self::LOCK_SH] = $this->handles[$path][$type];
-                                       } else {
-                                               // Mark this handle to be unlocked and closed
-                                               $handlesToClose[] = $this->handles[$path][$type];
-                                       }
-                                       unset( $this->handles[$path][$type] );
-                               }
                        }
                        if ( !count( $this->locksHeld[$path] ) ) {
                                unset( $this->locksHeld[$path] ); // no locks on this path
+                               if ( isset( $this->handles[$path] ) ) {
+                                       $handlesToClose[] = $this->handles[$path];
+                                       unset( $this->handles[$path] );
+                               }
                        }
                        // Unlock handles to release locks and delete
                        // any lock files that end up with no locks on them...
index 96d37ab..97de8dc 100644 (file)
@@ -66,7 +66,7 @@ class LSLockManager extends QuorumLockManager {
         *                    each having an odd-numbered list of server names (peers) as values.
         *   - connTimeout  : Lock server connection attempt timeout. [optional]
         *
-        * @param Array $config
+        * @param array $config
         */
        public function __construct( array $config ) {
                parent::__construct( $config );
index d222bab..6d155df 100644 (file)
@@ -75,7 +75,7 @@ abstract class LockManager {
        /**
         * Lock the resources at the given abstract paths
         *
-        * @param $paths Array List of resource names
+        * @param array $paths List of resource names
         * @param $type integer LockManager::LOCK_* constant
         * @return Status
         */
@@ -89,7 +89,7 @@ abstract class LockManager {
        /**
         * Unlock the resources at the given abstract paths
         *
-        * @param $paths Array List of storage paths
+        * @param array $paths List of storage paths
         * @param $type integer LockManager::LOCK_* constant
         * @return Status
         */
@@ -127,7 +127,7 @@ abstract class LockManager {
        /**
         * Lock resources with the given keys and lock type
         *
-        * @param $paths Array List of storage paths
+        * @param array $paths List of storage paths
         * @param $type integer LockManager::LOCK_* constant
         * @return string
         */
@@ -136,7 +136,7 @@ abstract class LockManager {
        /**
         * Unlock resources with the given keys and lock type
         *
-        * @param $paths Array List of storage paths
+        * @param array $paths List of storage paths
         * @param $type integer LockManager::LOCK_* constant
         * @return string
         */
index f0d5818..ac0bd49 100644 (file)
@@ -38,14 +38,14 @@ class LockManagerGroup {
        protected $managers = array();
 
        /**
-        * @param $domain string Domain (usually wiki ID)
+        * @param string $domain Domain (usually wiki ID)
         */
        protected function __construct( $domain ) {
                $this->domain = $domain;
        }
 
        /**
-        * @param $domain string Domain (usually wiki ID)
+        * @param string $domain Domain (usually wiki ID)
         * @return LockManagerGroup
         */
        public static function singleton( $domain = false ) {
index 099f11d..8131f81 100644 (file)
@@ -28,8 +28,8 @@
  * This is meant for multi-wiki systems that may share files.
  * All locks are non-blocking, which avoids deadlocks.
  *
- * All lock requests for a resource, identified by a hash string, will map
- * to one bucket. Each bucket maps to one or several peer servers, each running memcached.
+ * All lock requests for a resource, identified by a hash string, will map to one
+ * bucket. Each bucket maps to one or several peer servers, each running memcached.
  * A majority of peers must agree for a lock to be acquired.
  *
  * @ingroup LockManager
@@ -49,7 +49,7 @@ class MemcLockManager extends QuorumLockManager {
        protected $serversUp = array(); // (server name => bool)
 
        protected $lockExpiry; // integer; maximum time locks can be held
-       protected $session = ''; // string; random SHA-1 UUID
+       protected $session = ''; // string; random UUID
 
        /**
         * Construct a new instance from configuration.
@@ -61,7 +61,7 @@ class MemcLockManager extends QuorumLockManager {
         *   - memcConfig   : Configuration array for ObjectCache::newFromParams. [optional]
         *                    If set, this must use one of the memcached classes.
         *
-        * @param Array $config
+        * @param array $config
         * @throws MWException
         */
        public function __construct( array $config ) {
@@ -118,8 +118,8 @@ class MemcLockManager extends QuorumLockManager {
                foreach ( $paths as $path ) {
                        $locksKey = $this->recordKeyForPath( $path );
                        $locksHeld = isset( $lockRecords[$locksKey] )
-                               ? $lockRecords[$locksKey]
-                               : array( self::LOCK_SH => array(), self::LOCK_EX => array() ); // init
+                               ? self::sanitizeLockArray( $lockRecords[$locksKey] )
+                               : self::newLockArray(); // init
                        foreach ( $locksHeld[self::LOCK_EX] as $session => $expiry ) {
                                if ( $expiry < $now ) { // stale?
                                        unset( $locksHeld[self::LOCK_EX][$session] );
@@ -146,9 +146,15 @@ class MemcLockManager extends QuorumLockManager {
 
                // If there were no lock conflicts, update all the lock records...
                if ( $status->isOK() ) {
-                       foreach ( $lockRecords as $locksKey => $locksHeld ) {
-                               $memc->set( $locksKey, $locksHeld );
-                               wfDebug( __METHOD__ . ": acquired lock on key $locksKey.\n" );
+                       foreach ( $paths as $path ) {
+                               $locksKey = $this->recordKeyForPath( $path );
+                               $locksHeld = $lockRecords[$locksKey];
+                               $ok = $memc->set( $locksKey, $locksHeld, 7*86400 );
+                               if ( !$ok ) {
+                                       $status->fatal( 'lockmanager-fail-acquirelock', $path );
+                               } else {
+                                       wfDebug( __METHOD__ . ": acquired lock on key $locksKey.\n" );
+                               }
                        }
                }
 
@@ -183,17 +189,22 @@ class MemcLockManager extends QuorumLockManager {
                foreach ( $paths as $path ) {
                        $locksKey = $this->recordKeyForPath( $path ); // lock record
                        if ( !isset( $lockRecords[$locksKey] ) ) {
+                               $status->warning( 'lockmanager-fail-releaselock', $path );
                                continue; // nothing to do
                        }
-                       $locksHeld = $lockRecords[$locksKey];
-                       if ( is_array( $locksHeld ) && isset( $locksHeld[$type] ) ) {
-                               unset( $locksHeld[$type][$this->session] );
-                               $ok = $memc->set( $locksKey, $locksHeld );
+                       $locksHeld = self::sanitizeLockArray( $lockRecords[$locksKey] );
+                       if ( isset( $locksHeld[$type][$this->session] ) ) {
+                               unset( $locksHeld[$type][$this->session] ); // unregister this session
+                               if ( $locksHeld === self::newLockArray() ) {
+                                       $ok = $memc->delete( $locksKey );
+                               } else {
+                                       $ok = $memc->set( $locksKey, $locksHeld );
+                               }
+                               if ( !$ok ) {
+                                       $status->fatal( 'lockmanager-fail-releaselock', $path );
+                               }
                        } else {
-                               $ok = true;
-                       }
-                       if ( !$ok ) {
-                               $status->fatal( 'lockmanager-fail-releaselock', $path );
+                               $status->warning( 'lockmanager-fail-releaselock', $path );
                        }
                        wfDebug( __METHOD__ . ": released lock on key $locksKey.\n" );
                }
@@ -223,7 +234,7 @@ class MemcLockManager extends QuorumLockManager {
        /**
         * Get the MemcachedBagOStuff object for a $lockSrv
         *
-        * @param $lockSrv string Server name
+        * @param string $lockSrv Server name
         * @return MemcachedBagOStuff|null
         */
        protected function getCache( $lockSrv ) {
@@ -251,9 +262,29 @@ class MemcLockManager extends QuorumLockManager {
                return implode( ':', array( __CLASS__, 'locks', $this->sha1Base36Absolute( $path ) ) );
        }
 
+       /**
+        * @return Array An empty lock structure for a key
+        */
+       protected static function newLockArray() {
+               return array( self::LOCK_SH => array(), self::LOCK_EX => array() );
+       }
+
+       /**
+        * @param $a array
+        * @return Array An empty lock structure for a key
+        */
+       protected static function sanitizeLockArray( $a ) {
+               if ( is_array( $a ) && isset( $a[self::LOCK_EX] ) && isset( $a[self::LOCK_SH] ) ) {
+                       return $a;
+               } else {
+                       trigger_error( __METHOD__ . ": reset invalid lock array.", E_USER_WARNING );
+                       return self::newLockArray();
+               }
+       }
+
        /**
         * @param $memc MemcachedBagOStuff
-        * @param $keys Array List of keys to acquire
+        * @param array $keys List of keys to acquire
         * @return bool
         */
        protected function acquireMutexes( MemcachedBagOStuff $memc, array $keys ) {
@@ -279,10 +310,10 @@ class MemcLockManager extends QuorumLockManager {
                                        continue; // acquire in order
                                }
                        }
-               } while ( count( $lockedKeys ) < count( $keys ) && ( microtime( true ) - $start ) <= 6 );
+               } while ( count( $lockedKeys ) < count( $keys ) && ( microtime( true ) - $start ) <= 3 );
 
                if ( count( $lockedKeys ) != count( $keys ) ) {
-                       $this->releaseMutexes( $lockedKeys ); // failed; release what was locked
+                       $this->releaseMutexes( $memc, $lockedKeys ); // failed; release what was locked
                        return false;
                }
 
@@ -291,7 +322,7 @@ class MemcLockManager extends QuorumLockManager {
 
        /**
         * @param $memc MemcachedBagOStuff
-        * @param $keys Array List of acquired keys
+        * @param array $keys List of acquired keys
         * @return void
         */
        protected function releaseMutexes( MemcachedBagOStuff $memc, array $keys ) {
index 76a3ad6..b331b54 100644 (file)
@@ -46,8 +46,6 @@ abstract class QuorumLockManager extends LockManager {
                foreach ( $paths as $path ) {
                        if ( isset( $this->locksHeld[$path][$type] ) ) {
                                ++$this->locksHeld[$path][$type];
-                       } elseif ( isset( $this->locksHeld[$path][self::LOCK_EX] ) ) {
-                               $this->locksHeld[$path][$type] = 1;
                        } else {
                                $bucket = $this->getBucketFromPath( $path );
                                $pathsToLock[$bucket][] = $path;
@@ -118,7 +116,7 @@ abstract class QuorumLockManager extends LockManager {
         * This is all or nothing; if any key is locked then this totally fails.
         *
         * @param $bucket integer
-        * @param $paths Array List of resource keys to lock
+        * @param array $paths List of resource keys to lock
         * @param $type integer LockManager::LOCK_EX or LockManager::LOCK_SH
         * @return Status
         */
@@ -160,7 +158,7 @@ abstract class QuorumLockManager extends LockManager {
         * Attempt to release locks with the peers for a bucket
         *
         * @param $bucket integer
-        * @param $paths Array List of resource keys to lock
+        * @param array $paths List of resource keys to lock
         * @param $type integer LockManager::LOCK_EX or LockManager::LOCK_SH
         * @return Status
         */
index 5a80bee..edcb1d6 100644 (file)
@@ -43,7 +43,7 @@ class ScopedLock {
 
        /**
         * @param $manager LockManager
-        * @param $paths Array List of storage paths
+        * @param array $paths List of storage paths
         * @param $type integer LockManager::LOCK_* constant
         * @param $status Status
         */
@@ -62,7 +62,7 @@ class ScopedLock {
         * The status object is updated with any errors or warnings.
         *
         * @param $manager LockManager
-        * @param $paths Array List of storage paths
+        * @param array $paths List of storage paths
         * @param $type integer LockManager::LOCK_* constant
         * @param $status Status
         * @return ScopedLock|null Returns null on failure
@@ -78,6 +78,19 @@ class ScopedLock {
                return null;
        }
 
+       /**
+        * Release a scoped lock and set any errors in the attatched Status object.
+        * This is useful for early release of locks before function scope is destroyed.
+        * This is the same as setting the lock object to null.
+        *
+        * @param ScopedLock $lock
+        * @return void
+        * @since 1.21
+        */
+       public static function release( ScopedLock &$lock = null ) {
+               $lock = null;
+       }
+
        function __destruct() {
                $wasOk = $this->status->isOK();
                $this->status->merge( $this->manager->unlock( $this->paths, $this->type ) );
index 05e71d4..366dd8a 100644 (file)
@@ -155,7 +155,7 @@ class FileRepo {
        /**
         * Check if a single zone or list of zones is defined for usage
         *
-        * @param $doZones Array Only do a particular zones
+        * @param array $doZones Only do a particular zones
         * @throws MWException
         * @return Status
         */
@@ -199,8 +199,8 @@ class FileRepo {
        /**
         * Get the URL corresponding to one of the four basic zones
         *
-        * @param $zone String One of: public, deleted, temp, thumb
-        * @param $ext String|null Optional file extension
+        * @param string $zone One of: public, deleted, temp, thumb
+        * @param string|null $ext Optional file extension
         * @return String or false
         */
        public function getZoneUrl( $zone, $ext = null ) {
@@ -237,7 +237,7 @@ class FileRepo {
         * from the URL path, one can configure thumb_handler.php to recognize a special path on the
         * same host name as the wiki that is used for viewing thumbnails.
         *
-        * @param $zone String: one of: public, deleted, temp, thumb
+        * @param string $zone one of: public, deleted, temp, thumb
         * @return String or false
         */
        public function getZoneHandlerUrl( $zone ) {
@@ -340,7 +340,7 @@ class FileRepo {
         * version control should return false if the time is specified.
         *
         * @param $title Mixed: Title object or string
-        * @param $options array Associative array of options:
+        * @param array $options Associative array of options:
         *     time:           requested time for a specific file version, or false for the
         *                     current version. An image object will be returned which was
         *                     created at the specified time (which may be archived or current).
@@ -399,7 +399,7 @@ class FileRepo {
        /**
         * Find many files at once.
         *
-        * @param $items array An array of titles, or an array of findFile() options with
+        * @param array $items An array of titles, or an array of findFile() options with
         *    the "title" option giving the title. Example:
         *
         *     $findItem = array( 'title' => $title, 'private' => true );
@@ -431,8 +431,8 @@ class FileRepo {
         * Returns false if the file does not exist. Repositories not supporting
         * version control should return false if the time is specified.
         *
-        * @param $sha1 String base 36 SHA-1 hash
-        * @param $options array Option array, same as findFile().
+        * @param string $sha1 base 36 SHA-1 hash
+        * @param array $options Option array, same as findFile().
         * @return File|bool False on failure
         */
        public function findFileFromKey( $sha1, $options = array() ) {
@@ -476,7 +476,7 @@ class FileRepo {
         * Get an array of arrays or iterators of file objects for files that
         * have the given SHA-1 content hashes.
         *
-        * @param $hashes array An array of hashes
+        * @param array $hashes An array of hashes
         * @return array An Array of arrays or iterators of file objects and the hash as key
         */
        public function findBySha1s( array $hashes ) {
@@ -490,6 +490,18 @@ class FileRepo {
                return $result;
        }
 
+       /**
+        * Return an array of files where the name starts with $prefix.
+        *
+        * STUB
+        * @param string $prefix The prefix to search for
+        * @param int $limit The maximum amount of files to return
+        * @return array
+        */
+       public function findFilesByPrefix( $prefix, $limit ) {
+               return array();
+       }
+
        /**
         * Get the public root URL of the repository
         *
@@ -550,7 +562,7 @@ class FileRepo {
         * Get a relative path including trailing slash, e.g. f/fa/
         * If the repo is not hashed, returns an empty string
         *
-        * @param $name string Name of file
+        * @param string $name Name of file
         * @return string
         */
        public function getHashPath( $name ) {
@@ -561,7 +573,7 @@ class FileRepo {
         * Get a relative path including trailing slash, e.g. f/fa/
         * If the repo is not hashed, returns an empty string
         *
-        * @param $suffix string Basename of file from FileRepo::storeTemp()
+        * @param string $suffix Basename of file from FileRepo::storeTemp()
         * @return string
         */
        public function getTempHashPath( $suffix ) {
@@ -610,7 +622,7 @@ class FileRepo {
         * Make an url to this repo
         *
         * @param $query mixed Query string to append
-        * @param $entry string Entry point; defaults to index
+        * @param string $entry Entry point; defaults to index
         * @return string|bool False on failure
         */
        public function makeUrl( $query = '', $entry = 'index' ) {
@@ -664,8 +676,8 @@ class FileRepo {
         * repository's file class, since it may return invalid results. User code
         * should use File::getDescriptionText().
         *
-        * @param $name String: name of image to fetch
-        * @param $lang String: language to fetch it in, if any.
+        * @param string $name name of image to fetch
+        * @param string $lang language to fetch it in, if any.
         * @return string
         */
        public function getDescriptionRenderUrl( $name, $lang = null ) {
@@ -704,9 +716,9 @@ class FileRepo {
        /**
         * Store a file to a given destination.
         *
-        * @param $srcPath String: source file system path, storage path, or virtual URL
-        * @param $dstZone String: destination zone
-        * @param $dstRel String: destination relative path
+        * @param string $srcPath source file system path, storage path, or virtual URL
+        * @param string $dstZone destination zone
+        * @param string $dstRel destination relative path
         * @param $flags Integer: bitwise combination of the following flags:
         *     self::DELETE_SOURCE     Delete the source file after upload
         *     self::OVERWRITE         Overwrite an existing destination file instead of failing
@@ -729,7 +741,7 @@ class FileRepo {
        /**
         * Store a batch of files
         *
-        * @param $triplets Array: (src, dest zone, dest rel) triplets as per store()
+        * @param array $triplets (src, dest zone, dest rel) triplets as per store()
         * @param $flags Integer: bitwise combination of the following flags:
         *     self::DELETE_SOURCE     Delete the source file after upload
         *     self::OVERWRITE         Overwrite an existing destination file instead of failing
@@ -763,7 +775,7 @@ class FileRepo {
                                throw new MWException( 'Validation error in $dstRel' );
                        }
                        $dstPath = "$root/$dstRel";
-                       $dstDir  = dirname( $dstPath );
+                       $dstDir = dirname( $dstPath );
                        // Create destination directories for this triplet
                        if ( !$this->initDirectory( $dstDir )->isOK() ) {
                                return $this->newFatal( 'directorycreateerror', $dstDir );
@@ -811,7 +823,7 @@ class FileRepo {
         * Each file can be a (zone, rel) pair, virtual url, storage path.
         * It will try to delete each file, but ignores any errors that may occur.
         *
-        * @param $files array List of files to delete
+        * @param array $files List of files to delete
         * @param $flags Integer: bitwise combination of the following flags:
         *     self::SKIP_LOCKING      Skip any file locking when doing the deletions
         * @return FileRepoStatus
@@ -849,9 +861,9 @@ class FileRepo {
         * This function can be used to write to otherwise read-only foreign repos.
         * This is intended for copying generated thumbnails into the repo.
         *
-        * @param $src string Source file system path, storage path, or virtual URL
-        * @param $dst string Virtual URL or storage path
-        * @param $disposition string|null Content-Disposition if given and supported
+        * @param string $src Source file system path, storage path, or virtual URL
+        * @param string $dst Virtual URL or storage path
+        * @param string|null $disposition Content-Disposition if given and supported
         * @return FileRepoStatus
         */
        final public function quickImport( $src, $dst, $disposition = null ) {
@@ -863,7 +875,7 @@ class FileRepo {
         * This function can be used to write to otherwise read-only foreign repos.
         * This is intended for purging thumbnails.
         *
-        * @param $path string Virtual URL or storage path
+        * @param string $path Virtual URL or storage path
         * @return FileRepoStatus
         */
        final public function quickPurge( $path ) {
@@ -874,7 +886,7 @@ class FileRepo {
         * Deletes a directory if empty.
         * This function can be used to write to otherwise read-only foreign repos.
         *
-        * @param $dir string Virtual URL (or storage path) of directory to clean
+        * @param string $dir Virtual URL (or storage path) of directory to clean
         * @return Status
         */
        public function quickCleanDir( $dir ) {
@@ -894,7 +906,7 @@ class FileRepo {
         * All path parameters may be a file system path, storage path, or virtual URL.
         * When "dispositions" are given they are used as Content-Disposition if supported.
         *
-        * @param $triples Array List of (source path, destination path, disposition)
+        * @param array $triples List of (source path, destination path, disposition)
         * @return FileRepoStatus
         */
        public function quickImportBatch( array $triples ) {
@@ -922,7 +934,7 @@ class FileRepo {
         * This function can be used to write to otherwise read-only foreign repos.
         * This does no locking nor journaling and is intended for purging thumbnails.
         *
-        * @param $paths Array List of virtual URLs or storage paths
+        * @param array $paths List of virtual URLs or storage paths
         * @return FileRepoStatus
         */
        public function quickPurgeBatch( array $paths ) {
@@ -945,18 +957,17 @@ class FileRepo {
         * Returns a FileRepoStatus object with the file Virtual URL in the value,
         * file can later be disposed using FileRepo::freeTemp().
         *
-        * @param $originalName String: the base name of the file as specified
+        * @param string $originalName the base name of the file as specified
         *     by the user. The file extension will be maintained.
-        * @param $srcPath String: the current location of the file.
+        * @param string $srcPath the current location of the file.
         * @return FileRepoStatus object with the URL in the value.
         */
        public function storeTemp( $originalName, $srcPath ) {
                $this->assertWritableRepo(); // fail out if read-only
 
-               $date       = gmdate( "YmdHis" );
-               $hashPath   = $this->getHashPath( $originalName );
-               $dstRel     = "{$hashPath}{$date}!{$originalName}";
-               $dstUrlRel  = $hashPath . $date . '!' . rawurlencode( $originalName );
+               $date = gmdate( "YmdHis" );
+               $hashPath = $this->getHashPath( $originalName );
+               $dstUrlRel = $hashPath . $date . '!' . rawurlencode( $originalName );
                $virtualUrl = $this->getVirtualUrl( 'temp' ) . '/' . $dstUrlRel;
 
                $result = $this->quickImport( $srcPath, $virtualUrl );
@@ -968,7 +979,7 @@ class FileRepo {
        /**
         * Remove a temporary file or mark it for garbage collection
         *
-        * @param $virtualUrl String: the virtual URL returned by FileRepo::storeTemp()
+        * @param string $virtualUrl the virtual URL returned by FileRepo::storeTemp()
         * @return Boolean: true on success, false on failure
         */
        public function freeTemp( $virtualUrl ) {
@@ -986,8 +997,8 @@ class FileRepo {
        /**
         * Concatenate a list of temporary files into a target file location.
         *
-        * @param $srcPaths Array Ordered list of source virtual URLs/storage paths
-        * @param $dstPath String Target file system path
+        * @param array $srcPaths Ordered list of source virtual URLs/storage paths
+        * @param string $dstPath Target file system path
         * @param $flags Integer: bitwise combination of the following flags:
         *     self::DELETE_SOURCE     Delete the source files
         * @return FileRepoStatus
@@ -1032,13 +1043,13 @@ class FileRepo {
         * Options to $options include:
         *   - headers : name/value map of HTTP headers to use in response to GET/HEAD requests
         *
-        * @param $srcPath String: the source file system path, storage path, or URL
-        * @param $dstRel String: the destination relative path
-        * @param $archiveRel String: the relative path where the existing file is to
+        * @param string $srcPath the source file system path, storage path, or URL
+        * @param string $dstRel the destination relative path
+        * @param string $archiveRel the relative path where the existing file is to
         *        be archived, if there is one. Relative to the public zone root.
         * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate
         *        that the source file should be deleted if possible
-        * @param $options Array Optional additional parameters
+        * @param array $options Optional additional parameters
         * @return FileRepoStatus
         */
        public function publish(
@@ -1063,7 +1074,7 @@ class FileRepo {
        /**
         * Publish a batch of files
         *
-        * @param $ntuples Array: (source, dest, archive) triplets or
+        * @param array $ntuples (source, dest, archive) triplets or
         *        (source, dest, archive, options) 4-tuples as per publish().
         * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate
         *        that the source files should be deleted if possible
@@ -1085,7 +1096,7 @@ class FileRepo {
                $operations = array();
                $sourceFSFilesToDelete = array(); // cleanup for disk source files
                // Validate each triplet and get the store operation...
-               foreach ( $ntuples as $i => $ntuple ) {
+               foreach ( $ntuples as $ntuple ) {
                        list( $srcPath, $dstRel, $archiveRel ) = $ntuple;
                        $options = isset( $ntuple[3] ) ? $ntuple[3] : array();
                        // Resolve source to a storage path if virtual
@@ -1164,7 +1175,7 @@ class FileRepo {
                $status->merge( $backend->doOperations( $operations ) );
                // Find out which files were archived...
                foreach ( $ntuples as $i => $ntuple ) {
-                       list( $srcPath, $dstRel, $archiveRel ) = $ntuple;
+                       list( , $archiveRel ) = $ntuple;
                        $archivePath = $this->getZonePath( 'public' ) . "/$archiveRel";
                        if ( $this->fileExists( $archivePath ) ) {
                                $status->value[$i] = 'archived';
@@ -1186,12 +1197,12 @@ class FileRepo {
         * Creates a directory with the appropriate zone permissions.
         * Callers are responsible for doing read-only and "writable repo" checks.
         *
-        * @param $dir string Virtual URL (or storage path) of directory to clean
+        * @param string $dir Virtual URL (or storage path) of directory to clean
         * @return Status
         */
        protected function initDirectory( $dir ) {
                $path = $this->resolveToStoragePath( $dir );
-               list( $b, $container, $r ) = FileBackend::splitStoragePath( $path );
+               list( , $container, ) = FileBackend::splitStoragePath( $path );
 
                $params = array( 'dir' => $path );
                if ( $this->isPrivate || $container === $this->zones['deleted']['container'] ) {
@@ -1206,7 +1217,7 @@ class FileRepo {
        /**
         * Deletes a directory if empty.
         *
-        * @param $dir string Virtual URL (or storage path) of directory to clean
+        * @param string $dir Virtual URL (or storage path) of directory to clean
         * @return Status
         */
        public function cleanDir( $dir ) {
@@ -1222,7 +1233,7 @@ class FileRepo {
        /**
         * Checks existence of a a file
         *
-        * @param $file string Virtual URL (or storage path) of file to check
+        * @param string $file Virtual URL (or storage path) of file to check
         * @return bool
         */
        public function fileExists( $file ) {
@@ -1233,7 +1244,7 @@ class FileRepo {
        /**
         * Checks existence of an array of files.
         *
-        * @param $files Array: Virtual URLs (or storage paths) of files to check
+        * @param array $files Virtual URLs (or storage paths) of files to check
         * @return array|bool Either array of files and existence flags, or false
         */
        public function fileExistsBatch( array $files ) {
@@ -1271,7 +1282,7 @@ class FileRepo {
         * assumes a naming scheme in the deleted zone based on content hash, as
         * opposed to the public zone which is assumed to be unique.
         *
-        * @param $sourceDestPairs Array of source/destination pairs. Each element
+        * @param array $sourceDestPairs of source/destination pairs. Each element
         *        is a two-element array containing the source file path relative to the
         *        public root in the first element, and the archive file path relative
         *        to the deleted zone root in the second element.
@@ -1448,7 +1459,7 @@ class FileRepo {
         * Attempt to stream a file with the given virtual URL/storage path
         *
         * @param $virtualUrl string
-        * @param $headers Array Additional HTTP headers to send on success
+        * @param array $headers Additional HTTP headers to send on success
         * @return bool Success
         */
        public function streamFile( $virtualUrl, $headers = array() ) {
@@ -1610,7 +1621,7 @@ class FileRepo {
         */
        public function nameForThumb( $name ) {
                if ( strlen( $name ) > $this->abbrvThreshold ) {
-                       $ext  = FileBackend::extensionFromPath( $name );
+                       $ext = FileBackend::extensionFromPath( $name );
                        $name = ( $ext == '' ) ? 'thumbnail' : "thumbnail.$ext";
                }
                return $name;
index 98a21f7..ba574da 100644 (file)
@@ -247,10 +247,10 @@ class ForeignAPIRepo extends FileRepo {
         * If the url has been requested today, get it from cache
         * Otherwise retrieve remote thumb url, check for local file.
         *
-        * @param $name String is a dbkey form of a title
+        * @param string $name is a dbkey form of a title
         * @param $width
         * @param $height
-        * @param String $params Other rendering parameters (page number, etc) from handler's makeParamString.
+        * @param string $params Other rendering parameters (page number, etc) from handler's makeParamString.
         * @return bool|string
         */
        function getThumbUrlFromCache( $name, $width, $height, $params = "" ) {
@@ -320,7 +320,6 @@ class ForeignAPIRepo extends FileRepo {
                        return false;
                }
 
-
                # @todo FIXME: Delete old thumbs that aren't being used. Maintenance script?
                $backend->prepare( array( 'dir' => dirname( $localFilename ) ) );
                $params = array( 'dst' => $localFilename, 'content' => $thumb );
@@ -337,7 +336,7 @@ class ForeignAPIRepo extends FileRepo {
        /**
         * @see FileRepo::getZoneUrl()
         * @param $zone String
-        * @param $ext String|null Optional file extension
+        * @param string|null $ext Optional file extension
         * @return String
         */
        function getZoneUrl( $zone, $ext = null ) {
index 0fbaeef..be11b23 100644 (file)
@@ -103,8 +103,8 @@ class LocalRepo extends FileRepo {
        /**
         * Check if a deleted (filearchive) file has this sha1 key
         *
-        * @param $key String File storage key (base-36 sha1 key with file extension)
-        * @param $lock String|null Use "lock" to lock the row via FOR UPDATE
+        * @param string $key File storage key (base-36 sha1 key with file extension)
+        * @param string|null $lock Use "lock" to lock the row via FOR UPDATE
         * @return bool File with this key is in use
         */
        protected function deletedFileHasKey( $key, $lock = null ) {
@@ -120,8 +120,8 @@ class LocalRepo extends FileRepo {
        /**
         * Check if a hidden (revision delete) file has this sha1 key
         *
-        * @param $key String File storage key (base-36 sha1 key with file extension)
-        * @param $lock String|null Use "lock" to lock the row via FOR UPDATE
+        * @param string $key File storage key (base-36 sha1 key with file extension)
+        * @param string|null $lock Use "lock" to lock the row via FOR UPDATE
         * @return bool File with this key is in use
         */
        protected function hiddenFileHasKey( $key, $lock = null ) {
@@ -168,7 +168,7 @@ class LocalRepo extends FileRepo {
                        $expiry = 86400; // has invalidation, 1 day
                }
                $cachedValue = $wgMemc->get( $memcKey );
-               if ( $cachedValue === ' '  || $cachedValue === '' ) {
+               if ( $cachedValue === ' ' || $cachedValue === '' ) {
                        // Does not exist
                        return false;
                } elseif ( strval( $cachedValue ) !== '' ) {
@@ -217,7 +217,7 @@ class LocalRepo extends FileRepo {
                                'page_namespace' => $title->getNamespace(),
                                'page_title' => $title->getDBkey(),
                        ),
-                       __METHOD__  //Function name
+                       __METHOD__ //Function name
                );
                return $id;
        }
@@ -226,7 +226,7 @@ class LocalRepo extends FileRepo {
         * Get an array or iterator of file objects for files that have a given
         * SHA-1 content hash.
         *
-        * @param $hash String a sha1 hash to look for
+        * @param string $hash a sha1 hash to look for
         * @return Array
         */
        function findBySha1( $hash ) {
@@ -254,7 +254,7 @@ class LocalRepo extends FileRepo {
         *
         * Overrides generic implementation in FileRepo for performance reason
         *
-        * @param $hashes array An array of hashes
+        * @param array $hashes An array of hashes
         * @return array An Array of arrays or iterators of file objects and the hash as key
         */
        function findBySha1s( array $hashes ) {
@@ -281,6 +281,34 @@ class LocalRepo extends FileRepo {
                return $result;
        }
 
+       /**\r
+        * Return an array of files where the name starts with $prefix.\r
+        *\r
+        * @param string $prefix The prefix to search for\r
+        * @param int $limit The maximum amount of files to return\r
+        * @return array\r
+        */\r
+       public function findFilesByPrefix( $prefix, $limit ) {
+               $selectOptions = array( 'ORDER BY' => 'img_name', 'LIMIT' => intval( $limit ) );
+
+               // Query database\r
+               $dbr = $this->getSlaveDB();
+               $res = $dbr->select(
+                       'image',
+                       LocalFile::selectFields(),
+                       'img_name ' . $dbr->buildLike( $prefix, $dbr->anyString() ),
+                       __METHOD__,
+                       $selectOptions
+                       );
+
+               // Build file objects
+               $files = array();
+               foreach ( $res as $row ) {
+                       $files[] = $this->newFileFromRow( $row );
+               }
+               return $files;\r
+       }
+
        /**
         * Get a connection to the slave DB
         * @return DatabaseBase
index d3aea9f..1423d35 100644 (file)
@@ -18,10 +18,10 @@ repository-specific configuration is needed, or in static members of File or
 FileRepo, where no such configuration is needed.
 
 File objects are generated by a factory function from the repository. The
-repository thus has full control over the behaviour of its subsidiary file
+repository thus has full control over the behavior of its subsidiary file
 class, since it can subclass the file class and override functionality at its
 whim. Thus there is no need for the File subclass to query its parent repository
-for information about repository-class-dependent behaviour -- the file subclass
+for information about repository-class-dependent behavior -- the file subclass
 is generally fully aware of the static preferences of its repository. Limited
 exceptions can be made to this rule to permit sharing of functions, or perhaps
 even entire classes, between repositories.
index 1f5ae91..02dfdad 100644 (file)
@@ -79,8 +79,8 @@ class RepoGroup {
        /**
         * Construct a group of file repositories.
         *
-        * @param $localInfo array Associative array for local repo's info
-        * @param $foreignInfo Array of repository info arrays.
+        * @param array $localInfo Associative array for local repo's info
+        * @param array $foreignInfo of repository info arrays.
         *     Each info array is an associative array with the 'class' member
         *     giving the class name. The entire array is passed to the repository
         *     constructor as the first parameter.
@@ -96,7 +96,7 @@ class RepoGroup {
         * You can also use wfFindFile() to do this.
         *
         * @param $title Title|string Title object or string
-        * @param $options array Associative array of options:
+        * @param array $options Associative array of options:
         *     time:           requested time for an archived image, or false for the
         *                     current version. An image object will be returned which was
         *                     created at the specified time.
@@ -225,8 +225,8 @@ class RepoGroup {
         * Find an instance of the file with this key, created at the specified time
         * Returns false if the file does not exist.
         *
-        * @param $hash String base 36 SHA-1 hash
-        * @param $options array Option array, same as findFile()
+        * @param string $hash base 36 SHA-1 hash
+        * @param array $options Option array, same as findFile()
         * @return File object or false if it is not found
         */
        function findFileFromKey( $hash, $options = array() ) {
@@ -247,7 +247,7 @@ class RepoGroup {
        /**
         * Find all instances of files with this key
         *
-        * @param $hash String base 36 SHA-1 hash
+        * @param string $hash base 36 SHA-1 hash
         * @return Array of File objects
         */
        function findBySha1( $hash ) {
@@ -266,7 +266,7 @@ class RepoGroup {
        /**
         * Find all instances of files with this keys
         *
-        * @param $hashes Array base 36 SHA-1 hashes
+        * @param array $hashes base 36 SHA-1 hashes
         * @return Array of array of File objects
         */
        function findBySha1s( array $hashes ) {
@@ -335,7 +335,7 @@ class RepoGroup {
         * first parameter.
         *
         * @param $callback Callback: the function to call
-        * @param $params Array: optional additional parameters to pass to the function
+        * @param array $params optional additional parameters to pass to the function
         * @return bool
         */
        function forEachForeignRepo( $callback, $params = array() ) {
index 265e27e..cecd0ae 100644 (file)
@@ -152,7 +152,7 @@ abstract class File {
         * valid Title object with namespace NS_FILE or null
         *
         * @param $title Title|string
-        * @param $exception string|bool Use 'exception' to throw an error on bad titles
+        * @param string|bool $exception Use 'exception' to throw an error on bad titles
         * @throws MWException
         * @return Title|null
         */
@@ -190,7 +190,7 @@ abstract class File {
         * Normalize a file extension to the common form, and ensure it's clean.
         * Extensions with non-alphanumeric characters will be discarded.
         *
-        * @param $ext string (without the .)
+        * @param string $ext (without the .)
         * @return string
         */
        static function normalizeExtension( $ext ) {
@@ -214,7 +214,7 @@ abstract class File {
         * Checks if file extensions are compatible
         *
         * @param $old File Old file
-        * @param $new string New name
+        * @param string $new New name
         *
         * @return bool|null
         */
@@ -369,7 +369,7 @@ abstract class File {
         * returns false.
         *
         * @return string|bool ForeignAPIFile::getPath can return false
-       */
+        */
        public function getPath() {
                if ( !isset( $this->path ) ) {
                        $this->assertRepoDefined();
@@ -432,7 +432,7 @@ abstract class File {
         * Returns ID or name of user who uploaded the file
         * STUB
         *
-        * @param $type string 'text' or 'id'
+        * @param string $type 'text' or 'id'
         *
         * @return string|int
         */
@@ -512,12 +512,12 @@ abstract class File {
        }
 
        /**
-       * get versioned metadata
-       *
-       * @param $metadata Mixed Array or String of (serialized) metadata
-       * @param $version integer version number.
-       * @return Array containing metadata, or what was passed to it on fail (unserializing if not array)
-       */
+        * get versioned metadata
+        *
+        * @param $metadata Mixed Array or String of (serialized) metadata
+        * @param $version integer version number.
+        * @return Array containing metadata, or what was passed to it on fail (unserializing if not array)
+        */
        public function convertMetadataVersion($metadata, $version) {
                $handler = $this->getHandler();
                if ( !is_array( $metadata ) ) {
@@ -767,7 +767,7 @@ abstract class File {
         * Use File::THUMB_FULL_NAME to always get a name like "<params>-<source>".
         * Otherwise, the format may be "<params>-<source>" or "<params>-thumbnail.<ext>".
         *
-        * @param $params Array: handler-specific parameters
+        * @param array $params handler-specific parameters
         * @param $flags integer Bitfield that supports THUMB_* constants
         * @return string
         */
@@ -832,8 +832,8 @@ abstract class File {
        /**
         * Return either a MediaTransformError or placeholder thumbnail (if $wgIgnoreImageErrors)
         *
-        * @param $thumbPath string Thumbnail storage path
-        * @param $thumbUrl string Thumbnail URL
+        * @param string $thumbPath Thumbnail storage path
+        * @param string $thumbUrl Thumbnail URL
         * @param $params Array
         * @param $flags integer
         * @return MediaTransformOutput
@@ -852,7 +852,7 @@ abstract class File {
        /**
         * Transform a media file
         *
-        * @param $params Array: an associative array of handler-specific parameters.
+        * @param array $params an associative array of handler-specific parameters.
         *                Typical keys are width, height and page.
         * @param $flags Integer: a bitfield, may contain self::RENDER_NOW to force rendering
         * @return MediaTransformOutput|bool False on failure
@@ -978,7 +978,7 @@ abstract class File {
        }
 
        /**
-        * @param $thumbName string Thumbnail name
+        * @param string $thumbName Thumbnail name
         * @return string Content-Disposition header value
         */
        function getThumbDisposition( $thumbName ) {
@@ -1051,7 +1051,7 @@ abstract class File {
         * Purge shared caches such as thumbnails and DB data caching
         * STUB
         * Overridden by LocalFile
-        * @param $options Array Options, which include:
+        * @param array $options Options, which include:
         *     'forThumbRefresh' : The purging is only to refresh thumbnails
         */
        function purgeCache( $options = array() ) {}
@@ -1091,9 +1091,9 @@ abstract class File {
         *
         * STUB
         * @param $limit integer Limit of rows to return
-        * @param $start string timestamp Only revisions older than $start will be returned
-        * @param $end string timestamp Only revisions newer than $end will be returned
-        * @param $inc bool Include the endpoints of the time range
+        * @param string $start timestamp Only revisions older than $start will be returned
+        * @param string $end timestamp Only revisions newer than $end will be returned
+        * @param bool $inc Include the endpoints of the time range
         *
         * @return array
         */
@@ -1150,7 +1150,7 @@ abstract class File {
        /**
         * Get the path of an archived file relative to the public zone root
         *
-        * @param $suffix bool|string if not false, the name of an archived thumbnail file
+        * @param bool|string $suffix if not false, the name of an archived thumbnail file
         *
         * @return string
         */
@@ -1168,7 +1168,7 @@ abstract class File {
         * Get the path, relative to the thumbnail zone root, of the
         * thumbnail directory or a particular file if $suffix is specified
         *
-        * @param $suffix bool|string if not false, the name of a thumbnail file
+        * @param bool|string $suffix if not false, the name of a thumbnail file
         *
         * @return string
         */
@@ -1194,8 +1194,8 @@ abstract class File {
         * Get the path, relative to the thumbnail zone root, for an archived file's thumbs directory
         * or a specific thumb if the $suffix is given.
         *
-        * @param $archiveName string the timestamped name of an archived image
-        * @param $suffix bool|string if not false, the name of a thumbnail file
+        * @param string $archiveName the timestamped name of an archived image
+        * @param bool|string $suffix if not false, the name of a thumbnail file
         *
         * @return string
         */
@@ -1212,7 +1212,7 @@ abstract class File {
        /**
         * Get the path of the archived file.
         *
-        * @param $suffix bool|string if not false, the name of an archived file.
+        * @param bool|string $suffix if not false, the name of an archived file.
         *
         * @return string
         */
@@ -1224,8 +1224,8 @@ abstract class File {
        /**
         * Get the path of an archived file's thumbs, or a particular thumb if $suffix is specified
         *
-        * @param $archiveName string the timestamped name of an archived image
-        * @param $suffix bool|string if not false, the name of a thumbnail file
+        * @param string $archiveName the timestamped name of an archived image
+        * @param bool|string $suffix if not false, the name of a thumbnail file
         *
         * @return string
         */
@@ -1238,7 +1238,7 @@ abstract class File {
        /**
         * Get the path of the thumbnail directory, or a particular file if $suffix is specified
         *
-        * @param $suffix bool|string if not false, the name of a thumbnail file
+        * @param bool|string $suffix if not false, the name of a thumbnail file
         *
         * @return string
         */
@@ -1250,7 +1250,7 @@ abstract class File {
        /**
         * Get the path of the transcoded directory, or a particular file if $suffix is specified
         *
-        * @param $suffix bool|string if not false, the name of a media file
+        * @param bool|string $suffix if not false, the name of a media file
         *
         * @return string
         */
@@ -1262,7 +1262,7 @@ abstract class File {
        /**
         * Get the URL of the archive directory, or a particular file if $suffix is specified
         *
-        * @param $suffix bool|string if not false, the name of an archived file
+        * @param bool|string $suffix if not false, the name of an archived file
         *
         * @return string
         */
@@ -1281,8 +1281,8 @@ abstract class File {
        /**
         * Get the URL of the archived file's thumbs, or a particular thumb if $suffix is specified
         *
-        * @param $archiveName string the timestamped name of an archived image
-        * @param $suffix bool|string if not false, the name of a thumbnail file
+        * @param string $archiveName the timestamped name of an archived image
+        * @param bool|string $suffix if not false, the name of a thumbnail file
         *
         * @return string
         */
@@ -1302,8 +1302,8 @@ abstract class File {
        /**
         * Get the URL of the zone directory, or a particular file if $suffix is specified
         *
-        * @param $zone string name of requested zone
-        * @param $suffix bool|string if not false, the name of a file in zone
+        * @param string $zone name of requested zone
+        * @param bool|string $suffix if not false, the name of a file in zone
         *
         * @return string path
         */
@@ -1320,7 +1320,7 @@ abstract class File {
        /**
         * Get the URL of the thumbnail directory, or a particular file if $suffix is specified
         *
-        * @param $suffix bool|string if not false, the name of a thumbnail file
+        * @param bool|string $suffix if not false, the name of a thumbnail file
         *
         * @return string path
         */
@@ -1331,7 +1331,7 @@ abstract class File {
        /**
         * Get the URL of the transcoded directory, or a particular file if $suffix is specified
         *
-        * @param $suffix bool|string if not false, the name of a media file
+        * @param bool|string $suffix if not false, the name of a media file
         *
         * @return string path
         */
@@ -1342,7 +1342,7 @@ abstract class File {
        /**
         * Get the public zone virtual URL for a current version source file
         *
-        * @param $suffix bool|string if not false, the name of a thumbnail file
+        * @param bool|string $suffix if not false, the name of a thumbnail file
         *
         * @return string
         */
@@ -1358,7 +1358,7 @@ abstract class File {
        /**
         * Get the public zone virtual URL for an archived version source file
         *
-        * @param $suffix bool|string if not false, the name of a thumbnail file
+        * @param bool|string $suffix if not false, the name of a thumbnail file
         *
         * @return string
         */
@@ -1376,7 +1376,7 @@ abstract class File {
        /**
         * Get the virtual URL for a thumbnail file or directory
         *
-        * @param $suffix bool|string if not false, the name of a thumbnail file
+        * @param bool|string $suffix if not false, the name of a thumbnail file
         *
         * @return string
         */
@@ -1434,11 +1434,11 @@ abstract class File {
         * Options to $options include:
         *   - headers : name/value map of HTTP headers to use in response to GET/HEAD requests
         *
-        * @param $srcPath String: local filesystem path to the source image
+        * @param string $srcPath local filesystem path to the source image
         * @param $flags Integer: a bitwise combination of:
         *     File::DELETE_SOURCE    Delete the source file, i.e. move
         *         rather than copy
-        * @param $options Array Optional additional parameters
+        * @param array $options Optional additional parameters
         * @return FileRepoStatus object. On success, the value member contains the
         *     archive name, or an empty string if it was a new file.
         *
@@ -1567,9 +1567,9 @@ abstract class File {
         *
         * May throw database exceptions on error.
         *
-        * @param $versions array set of record ids of deleted items to restore,
+        * @param array $versions set of record ids of deleted items to restore,
         *                    or empty to restore all revisions.
-        * @param $unsuppress bool remove restrictions on content upon restoration?
+        * @param bool $unsuppress remove restrictions on content upon restoration?
         * @return int|bool the number of file revisions restored if successful,
         *         or false on failure
         * STUB
@@ -1629,7 +1629,7 @@ abstract class File {
         * Get an image size array like that returned by getImageSize(), or false if it
         * can't be determined.
         *
-        * @param $fileName String: The filename
+        * @param string $fileName The filename
         * @return Array
         */
        function getImageSize( $fileName ) {
@@ -1753,7 +1753,7 @@ abstract class File {
        /**
         * Get an associative array containing information about a file in the local filesystem.
         *
-        * @param $path String: absolute local filesystem path
+        * @param string $path absolute local filesystem path
         * @param $ext Mixed: the file extension, or true to extract it from the filename.
         *             Set it to false to ignore the extension.
         *
index 84e0df6..a96c1f3 100644 (file)
@@ -106,7 +106,7 @@ class ForeignAPIFile extends File {
        }
 
        /**
-        * @param Array $params
+        * @param array $params
         * @param int $flags
         * @return bool|MediaTransformOutput
         */
index 610f556..ee5883c 100644 (file)
@@ -115,7 +115,7 @@ class ForeignDBFile extends LocalFile {
         * @return string
         */
        function getDescriptionUrl() {
-               // Restore remote behaviour
+               // Restore remote behavior
                return File::getDescriptionUrl();
        }
 
@@ -123,7 +123,7 @@ class ForeignDBFile extends LocalFile {
         * @return string
         */
        function getDescriptionText() {
-               // Restore remote behaviour
+               // Restore remote behavior
                return File::getDescriptionText();
        }
 }
index 11eab1e..639228b 100644 (file)
@@ -123,7 +123,7 @@ class LocalFile extends File {
         * Create a LocalFile from a SHA-1 key
         * Do not call this except from inside a repo class.
         *
-        * @param $sha1 string base-36 SHA-1
+        * @param string $sha1 base-36 SHA-1
         * @param $repo LocalRepo
         * @param string|bool $timestamp MW_timestamp (optional)
         *
@@ -266,7 +266,7 @@ class LocalFile extends File {
                // If the cache value gets to large it will not fit in memcached and nothing will
                // get cached at all, causing master queries for any file access.
                foreach ( $this->getLazyCacheFields( '' ) as $field ) {
-                       if ( isset( $cache[$field] ) && strlen( $cache[$field] ) > 100*1024 ) {
+                       if ( isset( $cache[$field] ) && strlen( $cache[$field] ) > 100 * 1024 ) {
                                unset( $cache[$field] ); // don't let the value get too big
                        }
                }
@@ -644,7 +644,7 @@ class LocalFile extends File {
        /**
         * Returns ID or name of user who uploaded the file
         *
-        * @param $type string 'text' or 'id'
+        * @param string $type 'text' or 'id'
         * @return int|string
         */
        function getUser( $type = 'text' ) {
@@ -730,9 +730,8 @@ class LocalFile extends File {
         *        RTT regression for wikis without 404 handling.
         */
        function migrateThumbFile( $thumbName ) {
-               $thumbDir = $this->getThumbPath();
-
                /* Old code for bug 2532
+               $thumbDir = $this->getThumbPath();
                $thumbPath = "$thumbDir/$thumbName";
                if ( is_dir( $thumbPath ) ) {
                        // Directory where file should be
@@ -764,7 +763,7 @@ class LocalFile extends File {
 
        /**
         * Get all thumbnail names previously generated for this file
-        * @param $archiveName string|bool Name of an archive file, default false
+        * @param string|bool $archiveName Name of an archive file, default false
         * @return array first element is the base dir, then files in that base dir.
         */
        function getThumbnails( $archiveName = false ) {
@@ -828,7 +827,7 @@ class LocalFile extends File {
 
        /**
         * Delete cached transformed files for an archived version only.
-        * @param $archiveName string name of the archived file
+        * @param string $archiveName name of the archived file
         */
        function purgeOldThumbnails( $archiveName ) {
                global $wgUseSquid;
@@ -896,8 +895,8 @@ class LocalFile extends File {
 
        /**
         * Delete a list of thumbnails visible at urls
-        * @param $dir string base dir of the files.
-        * @param $files array of strings: relative filenames (to $dir)
+        * @param string $dir base dir of the files.
+        * @param array $files of strings: relative filenames (to $dir)
         */
        protected function purgeThumbList( $dir, $files ) {
                $fileListDebug = strtr(
@@ -1047,15 +1046,15 @@ class LocalFile extends File {
 
        /**
         * Upload a file and record it in the DB
-        * @param $srcPath String: source storage path, virtual URL, or filesystem path
-        * @param $comment String: upload description
-        * @param $pageText String: text to use for the new description page,
+        * @param string $srcPath source storage path, virtual URL, or filesystem path
+        * @param string $comment upload description
+        * @param string $pageText text to use for the new description page,
         *                  if a new description page is created
         * @param $flags Integer|bool: flags for publish()
-        * @param $props Array|bool: File properties, if known. This can be used to reduce the
+        * @param array|bool $props File properties, if known. This can be used to reduce the
         *               upload time when uploading virtual URLs for which the file info
         *               is already known
-        * @param $timestamp String|bool: timestamp for img_timestamp, or false to use the current time
+        * @param string|bool $timestamp timestamp for img_timestamp, or false to use the current time
         * @param $user User|null: User object or null to use $wgUser
         *
         * @return FileRepoStatus object. On success, the value member contains the
@@ -1373,10 +1372,10 @@ class LocalFile extends File {
         * The archive name should be passed through to recordUpload for database
         * registration.
         *
-        * @param $srcPath String: local filesystem path to the source image
+        * @param string $srcPath local filesystem path to the source image
         * @param $flags Integer: a bitwise combination of:
         *     File::DELETE_SOURCE      Delete the source file, i.e. move rather than copy
-        * @param $options Array Optional additional parameters
+        * @param array $options Optional additional parameters
         * @return FileRepoStatus object. On success, the value member contains the
         *     archive name, or an empty string if it was a new file.
         */
@@ -1391,11 +1390,11 @@ class LocalFile extends File {
         * The archive name should be passed through to recordUpload for database
         * registration.
         *
-        * @param $srcPath String: local filesystem path to the source image
-        * @param $dstRel String: target relative path
+        * @param string $srcPath local filesystem path to the source image
+        * @param string $dstRel target relative path
         * @param $flags Integer: a bitwise combination of:
         *     File::DELETE_SOURCE      Delete the source file, i.e. move rather than copy
-        * @param $options Array Optional additional parameters
+        * @param array $options Optional additional parameters
         * @return FileRepoStatus object. On success, the value member contains the
         *     archive name, or an empty string if it was a new file.
         */
@@ -1551,7 +1550,7 @@ class LocalFile extends File {
         *
         * May throw database exceptions on error.
         *
-        * @param $versions array set of record ids of deleted items to restore,
+        * @param array $versions set of record ids of deleted items to restore,
         *                    or empty to restore all revisions.
         * @param $unsuppress Boolean
         * @return FileRepoStatus
@@ -1971,7 +1970,7 @@ class LocalFileDeleteBatch {
                $this->file->lock();
                // Leave private files alone
                $privateFiles = array();
-               list( $oldRels, $deleteCurrent ) = $this->getOldRels();
+               list( $oldRels, ) = $this->getOldRels();
                $dbw = $this->file->repo->getMasterDB();
 
                if ( !empty( $oldRels ) ) {
@@ -2049,7 +2048,7 @@ class LocalFileDeleteBatch {
                $files = $newBatch = array();
 
                foreach ( $batch as $batchItem ) {
-                       list( $src, $dest ) = $batchItem;
+                       list( $src, ) = $batchItem;
                        $files[$src] = $this->file->repo->getVirtualUrl( 'public' ) . '/' . rawurlencode( $src );
                }
 
@@ -2634,7 +2633,7 @@ class LocalFileMoveBatch {
         */
        function getMoveTriplets() {
                $moves = array_merge( array( $this->cur ), $this->olds );
-               $triplets = array();    // The format is: (srcUrl, destZone, destUrl)
+               $triplets = array(); // The format is: (srcUrl, destZone, destUrl)
 
                foreach ( $moves as $move ) {
                        // $move: (oldRelativePath, newRelativePath)
index 4f27c8d..5c50592 100644 (file)
@@ -73,7 +73,7 @@ class OldLocalFile extends LocalFile {
         * Create a OldLocalFile from a SHA-1 key
         * Do not call this except from inside a repo class.
         *
-        * @param $sha1 string base-36 SHA-1
+        * @param string $sha1 base-36 SHA-1
         * @param $repo LocalRepo
         * @param string|bool $timestamp MW_timestamp (optional)
         *
@@ -123,8 +123,8 @@ class OldLocalFile extends LocalFile {
        /**
         * @param $title Title
         * @param $repo FileRepo
-        * @param $time String: timestamp or null to load by archive name
-        * @param $archiveName String: archive name or null to load by timestamp
+        * @param string $time timestamp or null to load by archive name
+        * @param string $archiveName archive name or null to load by timestamp
         * @throws MWException
         */
        function __construct( $title, $repo, $time, $archiveName ) {
@@ -318,8 +318,8 @@ class OldLocalFile extends LocalFile {
        /**
         * Upload a file directly into archive. Generally for Special:Import.
         *
-        * @param $srcPath string File system path of the source file
-        * @param $archiveName string Full archive name of the file, in the form
+        * @param string $srcPath File system path of the source file
+        * @param string $archiveName Full archive name of the file, in the form
         *     $timestamp!$filename, where $filename must match $this->getName()
         *
         * @param $timestamp string
@@ -350,10 +350,10 @@ class OldLocalFile extends LocalFile {
        /**
         * Record a file upload in the oldimage table, without adding log entries.
         *
-        * @param $srcPath string File system path to the source file
-        * @param $archiveName string The archive name of the file
+        * @param string $srcPath File system path to the source file
+        * @param string $archiveName The archive name of the file
         * @param $timestamp string
-        * @param $comment string Upload comment
+        * @param string $comment Upload comment
         * @param $user User User who did this upload
         * @return bool
         */
index 9a7f653..47ba6d6 100644 (file)
@@ -42,7 +42,7 @@ class UnregisteredLocalFile extends File {
        var $handler;
 
        /**
-        * @param $path string Storage path
+        * @param string $path Storage path
         * @param $mime string
         * @return UnregisteredLocalFile
         */
index 75e55f1..997255d 100644 (file)
@@ -129,7 +129,7 @@ class CliInstaller extends Installer {
        /**
         * Write LocalSettings.php to a given path
         *
-        * @param $path String Full path to write LocalSettings.php to
+        * @param string $path Full path to write LocalSettings.php to
         */
        public function writeConfigurationFile( $path ) {
                $ls = InstallerOverrides::getLocalSettingsGenerator( $this );
index 10d23fb..3472b7f 100644 (file)
@@ -527,7 +527,7 @@ abstract class DatabaseInstaller {
 
        /**
         * Get a standard web-user fieldset
-        * @param $noCreateMsg String: Message to display instead of the creation checkbox.
+        * @param string $noCreateMsg Message to display instead of the creation checkbox.
         *   Set this to false to show a creation checkbox.
         *
         * @return String
index 746cd12..4b4bc23 100644 (file)
@@ -92,7 +92,7 @@ abstract class DatabaseUpdater {
         * Constructor
         *
         * @param $db DatabaseBase object to perform updates on
-        * @param $shared bool Whether to perform updates on shared tables
+        * @param bool $shared Whether to perform updates on shared tables
         * @param $maintenance Maintenance Maintenance object which created us
         */
        protected function __construct( DatabaseBase &$db, $shared, Maintenance $maintenance = null ) {
@@ -177,7 +177,7 @@ abstract class DatabaseUpdater {
        /**
         * Output some text. If we're running from web, escape the text first.
         *
-        * @param $str String: Text to output
+        * @param string $str Text to output
         */
        public function output( $str ) {
                if ( $this->maintenance->isQuiet() ) {
@@ -197,7 +197,7 @@ abstract class DatabaseUpdater {
         *
         * @since 1.17
         *
-        * @param $update Array: the update to run. Format is the following:
+        * @param array $update the update to run. Format is the following:
         *                first item is the callback function, it also can be a
         *                simple string with the name of a function in this class,
         *                following elements are parameters to the function.
@@ -214,8 +214,8 @@ abstract class DatabaseUpdater {
         *
         * @since 1.18
         *
-        * @param $tableName String Name of table to create
-        * @param $sqlPath String Full path to the schema file
+        * @param string $tableName Name of table to create
+        * @param string $sqlPath Full path to the schema file
         */
        public function addExtensionTable( $tableName, $sqlPath ) {
                $this->extensionUpdates[] = array( 'addTable', $tableName, $sqlPath, true );
@@ -261,9 +261,9 @@ abstract class DatabaseUpdater {
         *
         * @since 1.21
         *
-        * @param $tableName string The table name
-        * @param $indexName string The index name
-        * @param $sqlPath string The path to the SQL change path
+        * @param string $tableName The table name
+        * @param string $indexName The index name
+        * @param string $sqlPath The path to the SQL change path
         */
        public function dropExtensionIndex( $tableName, $indexName, $sqlPath ) {
                $this->extensionUpdates[] = array( 'dropIndex', $tableName, $indexName, $sqlPath, true );
@@ -285,11 +285,11 @@ abstract class DatabaseUpdater {
         *
         * @since 1.21
         *
-        * @param $tableName string The table name
-        * @param $oldIndexName string The old index name
-        * @param $newIndexName string The new index name
+        * @param string $tableName The table name
+        * @param string $oldIndexName The old index name
+        * @param string $newIndexName The new index name
         * @param $skipBothIndexExistWarning Boolean: Whether to warn if both the old and the new indexes exist. [facultative; by default, false]
-        * @param $sqlPath string The path to the SQL change path
+        * @param string $sqlPath The path to the SQL change path
         */
        public function renameExtensionIndex( $tableName, $oldIndexName, $newIndexName, $sqlPath, $skipBothIndexExistWarning = false ) {
                $this->extensionUpdates[] = array( 'renameIndex', $tableName, $oldIndexName, $newIndexName, $skipBothIndexExistWarning, $sqlPath, true );
@@ -298,9 +298,9 @@ abstract class DatabaseUpdater {
        /**
         * @since 1.21
         *
-        * @param $tableName string The table name
-        * @param $fieldName string The field to be modified
-        * @param $sqlPath string The path to the SQL change path
+        * @param string $tableName The table name
+        * @param string $fieldName The field to be modified
+        * @param string $sqlPath The path to the SQL change path
         */
        public function modifyExtensionField( $tableName, $fieldName, $sqlPath) {
                $this->extensionUpdates[] = array( 'modifyField', $tableName, $fieldName, $sqlPath, true );
@@ -324,7 +324,7 @@ abstract class DatabaseUpdater {
         *
         * @since 1.19
         *
-        * @param $class string Name of a Maintenance subclass
+        * @param string $class Name of a Maintenance subclass
         */
        public function addPostDatabaseUpdateMaintenance( $class ) {
                $this->postDatabaseUpdateMaintenance[] = $class;
@@ -361,7 +361,7 @@ abstract class DatabaseUpdater {
                        $func = $funcList[0];
                        $arg = $funcList[1];
                        $origParams = $funcList[2];
-                       $ret = call_user_func_array( $func, $arg );
+                       call_user_func_array( $func, $arg );
                        flush();
                        $this->updatesSkipped[] = $origParams;
                }
@@ -370,7 +370,7 @@ abstract class DatabaseUpdater {
        /**
         * Do all the updates
         *
-        * @param $what Array: what updates to perform
+        * @param array $what what updates to perform
         */
        public function doUpdates( $what = array( 'core', 'extensions', 'stats' ) ) {
                global $wgVersion, $wgLocalisationCacheConf;
@@ -412,7 +412,7 @@ abstract class DatabaseUpdater {
        /**
         * Helper function for doUpdates()
         *
-        * @param $updates Array of updates to run
+        * @param array $updates of updates to run
         * @param $passSelf Boolean: whether to pass this object we calling external
         *                  functions
         */
@@ -459,7 +459,7 @@ abstract class DatabaseUpdater {
         * Helper function: check if the given key is present in the updatelog table.
         * Obviously, only use this for updates that occur after the updatelog table was
         * created!
-        * @param $key String Name of the key to check for
+        * @param string $key Name of the key to check for
         *
         * @return bool
         */
@@ -477,8 +477,8 @@ abstract class DatabaseUpdater {
         * Helper function: Add a key to the updatelog table
         * Obviously, only use this for updates that occur after the updatelog table was
         * created!
-        * @param $key String Name of key to insert
-        * @param $val String [optional] value to insert along with the key
+        * @param string $key Name of key to insert
+        * @param string $val [optional] value to insert along with the key
         */
        public function insertUpdateRow( $key, $val = null ) {
                $this->db->clearFlag( DBO_DDLMODE );
@@ -508,7 +508,7 @@ abstract class DatabaseUpdater {
         * Updates will be prevented if the table is a shared table and it is not
         * specified to run updates on shared tables.
         *
-        * @param $name String table name
+        * @param string $name table name
         * @return bool
         */
        protected function doTable( $name ) {
@@ -580,7 +580,7 @@ abstract class DatabaseUpdater {
        /**
         * Append an SQL fragment to the open file handle.
         *
-        * @param $filename String: File name to open
+        * @param string $filename File name to open
         */
        public function copyFile( $filename ) {
                $this->db->sourceFile( $filename, false, false, false,
@@ -594,7 +594,7 @@ abstract class DatabaseUpdater {
         *
         * This is used as a callback for for sourceLine().
         *
-        * @param $line String text to append to the file
+        * @param string $line text to append to the file
         * @return Boolean false to skip actually executing the file
         * @throws MWException
         */
@@ -609,9 +609,9 @@ abstract class DatabaseUpdater {
        /**
         * Applies a SQL patch
         *
-        * @param $path String Path to the patch file
+        * @param string $path Path to the patch file
         * @param $isFullPath Boolean Whether to treat $path as a relative or not
-        * @param $msg String Description of the patch
+        * @param string $msg Description of the patch
         * @return boolean false if patch is skipped.
         */
        protected function applyPatch( $path, $isFullPath = false, $msg = null ) {
@@ -640,8 +640,8 @@ abstract class DatabaseUpdater {
        /**
         * Add a new table to the database
         *
-        * @param $name String Name of the new table
-        * @param $patch String Path to the patch file
+        * @param string $name Name of the new table
+        * @param string $patch Path to the patch file
         * @param $fullpath Boolean Whether to treat $patch path as a relative or not
         * @return Boolean false if this was skipped because schema changes are skipped
         */
@@ -661,9 +661,9 @@ abstract class DatabaseUpdater {
        /**
         * Add a new field to an existing table
         *
-        * @param $table String Name of the table to modify
-        * @param $field String Name of the new field
-        * @param $patch String Path to the patch file
+        * @param string $table Name of the table to modify
+        * @param string $field Name of the new field
+        * @param string $patch Path to the patch file
         * @param $fullpath Boolean Whether to treat $patch path as a relative or not
         * @return Boolean false if this was skipped because schema changes are skipped
         */
@@ -685,9 +685,9 @@ abstract class DatabaseUpdater {
        /**
         * Add a new index to an existing table
         *
-        * @param $table String Name of the table to modify
-        * @param $index String Name of the new index
-        * @param $patch String Path to the patch file
+        * @param string $table Name of the table to modify
+        * @param string $index Name of the new index
+        * @param string $patch Path to the patch file
         * @param $fullpath Boolean Whether to treat $patch path as a relative or not
         * @return Boolean false if this was skipped because schema changes are skipped
         */
@@ -709,9 +709,9 @@ abstract class DatabaseUpdater {
        /**
         * Drop a field from an existing table
         *
-        * @param $table String Name of the table to modify
-        * @param $field String Name of the old field
-        * @param $patch String Path to the patch file
+        * @param string $table Name of the table to modify
+        * @param string $field Name of the old field
+        * @param string $patch Path to the patch file
         * @param $fullpath Boolean Whether to treat $patch path as a relative or not
         * @return Boolean false if this was skipped because schema changes are skipped
         */
@@ -731,9 +731,9 @@ abstract class DatabaseUpdater {
        /**
         * Drop an index from an existing table
         *
-        * @param $table String: Name of the table to modify
-        * @param $index String: Name of the index
-        * @param $patch String: Path to the patch file
+        * @param string $table Name of the table to modify
+        * @param string $index Name of the index
+        * @param string $patch Path to the patch file
         * @param $fullpath Boolean: Whether to treat $patch path as a relative or not
         * @return Boolean false if this was skipped because schema changes are skipped
         */
@@ -753,11 +753,11 @@ abstract class DatabaseUpdater {
        /**
         * Rename an index from an existing table
         *
-        * @param $table String: Name of the table to modify
-        * @param $oldIndex String: Old name of the index
-        * @param $newIndex String: New name of the index
+        * @param string $table Name of the table to modify
+        * @param string $oldIndex Old name of the index
+        * @param string $newIndex New name of the index
         * @param $skipBothIndexExistWarning Boolean: Whether to warn if both the old and the new indexes exist.
-        * @param $patch String: Path to the patch file
+        * @param string $patch Path to the patch file
         * @param $fullpath Boolean: Whether to treat $patch path as a relative or not
         * @return Boolean false if this was skipped because schema changes are skipped
         */
@@ -828,9 +828,9 @@ abstract class DatabaseUpdater {
        /**
         * Modify an existing field
         *
-        * @param $table String: name of the table to which the field belongs
-        * @param $field String: name of the field to modify
-        * @param $patch String: path to the patch file
+        * @param string $table name of the table to which the field belongs
+        * @param string $field name of the field to modify
+        * @param string $patch path to the patch file
         * @param $fullpath Boolean: whether to treat $patch path as a relative or not
         * @return Boolean false if this was skipped because schema changes are skipped
         */
index 0d910fd..a8641ca 100644 (file)
@@ -93,9 +93,9 @@ You cannot install MediaWiki.',
 However, MediaWiki requires PHP $2 or higher.',
        'config-unicode-using-utf8'       => 'Using Brion Vibber\'s utf8_normalize.so for Unicode normalization.',
        'config-unicode-using-intl'       => 'Using the [http://pecl.php.net/intl intl PECL extension] for Unicode normalization.',
-       'config-unicode-pure-php-warning' => "'''Warning''': The [http://pecl.php.net/intl intl PECL extension] is not available to handle Unicode normalization, falling back to slow pure-PHP implementation.
+       'config-unicode-pure-php-warning' => "'''Warning:''' The [http://pecl.php.net/intl intl PECL extension] is not available to handle Unicode normalization, falling back to slow pure-PHP implementation.
 If you run a high-traffic site, you should read a little on [//www.mediawiki.org/wiki/Unicode_normalization_considerations Unicode normalization].",
-       'config-unicode-update-warning'   => "'''Warning''': The installed version of the Unicode normalization wrapper uses an older version of [http://site.icu-project.org/ the ICU project's] library.
+       'config-unicode-update-warning'   => "'''Warning:''' The installed version of the Unicode normalization wrapper uses an older version of [http://site.icu-project.org/ the ICU project's] library.
 You should [//www.mediawiki.org/wiki/Unicode_normalization_considerations upgrade] if you are at all concerned about using Unicode.",
        'config-no-db'                    => 'Could not find a suitable database driver! You need to install a database driver for PHP.
 The following database types are supported: $1.
@@ -103,8 +103,8 @@ The following database types are supported: $1.
 If you are on shared hosting, ask your hosting provider to install a suitable database driver.
 If you compiled PHP yourself, reconfigure it with a database client enabled, for example using <code>./configure --with-mysql</code>.
 If you installed PHP from a Debian or Ubuntu package, then you also need install the php5-mysql module.',
-       'config-outdated-sqlite'          => "'''Warning''': you have SQLite $1, which is lower than minimum required version $2. SQLite will be unavailable.",
-       'config-no-fts3'                  => "'''Warning''': SQLite is compiled without the [//sqlite.org/fts3.html FTS3 module], search features will be unavailable on this backend.",
+       'config-outdated-sqlite'          => "'''Warning:''' you have SQLite $1, which is lower than minimum required version $2. SQLite will be unavailable.",
+       'config-no-fts3'                  => "'''Warning:''' SQLite is compiled without the [//sqlite.org/fts3.html FTS3 module], search features will be unavailable on this backend.",
        'config-register-globals'         => "'''Warning: PHP's <code>[http://php.net/register_globals register_globals]</code> option is enabled.'''
 '''Disable it if you can.'''
 MediaWiki will work, but your server is exposed to potential security vulnerabilities.",
@@ -127,19 +127,19 @@ MediaWiki requires functions in this module and will not work in this configurat
 If you're running Mandrake, install the php-xml package.",
        'config-pcre'                     => 'The PCRE support module appears to be missing.
 MediaWiki requires the Perl-compatible regular expression functions to work.',
-       'config-pcre-no-utf8'             => "'''Fatal''': PHP's PCRE module seems to be compiled without PCRE_UTF8 support.
+       'config-pcre-no-utf8'             => "'''Fatal:''' PHP's PCRE module seems to be compiled without PCRE_UTF8 support.
 MediaWiki requires UTF-8 support to function correctly.",
        'config-memory-raised'            => "PHP's <code>memory_limit</code> is $1, raised to $2.",
        'config-memory-bad'               => "'''Warning:''' PHP's <code>memory_limit</code> is $1.
 This is probably too low.
 The installation may fail!",
-       'config-ctype'                    => "'''Fatal''': PHP must be compiled with support for the [http://www.php.net/manual/en/ctype.installation.php Ctype extension].",
+       'config-ctype'                    => "'''Fatal:''' PHP must be compiled with support for the [http://www.php.net/manual/en/ctype.installation.php Ctype extension].",
        'config-xcache'                   => '[http://xcache.lighttpd.net/ XCache] is installed',
        'config-apc'                      => '[http://www.php.net/apc APC] is installed',
        'config-wincache'                 => '[http://www.iis.net/download/WinCacheForPhp WinCache] is installed',
        'config-no-cache'                 => "'''Warning:''' Could not find [http://www.php.net/apc APC], [http://xcache.lighttpd.net/ XCache] or [http://www.iis.net/download/WinCacheForPhp WinCache].
 Object caching is not enabled.",
-       'config-mod-security'             => "'''Warning''': Your web server has [http://modsecurity.org/ mod_security] enabled. If misconfigured, it can cause problems for MediaWiki or other software that allows users to post arbitrary content.
+       'config-mod-security'             => "'''Warning:''' Your web server has [http://modsecurity.org/ mod_security] enabled. If misconfigured, it can cause problems for MediaWiki or other software that allows users to post arbitrary content.
 Refer to [http://modsecurity.org/documentation/ mod_security documentation] or contact your host's support if you encounter random errors.",
        'config-diff3-bad'                => 'GNU diff3 not found.',
        'config-imagemagick'              => 'Found ImageMagick: <code>$1</code>.
@@ -150,7 +150,7 @@ Image thumbnailing will be enabled if you enable uploads.',
 Image thumbnailing will be disabled.',
        'config-no-uri'                   => "'''Error:''' Could not determine the current URI.
 Installation aborted.",
-       'config-no-cli-uri'               => "'''Warning''': No --scriptpath specified, using default: <code>$1</code>.",
+       'config-no-cli-uri'               => "'''Warning:''' No --scriptpath specified, using default: <code>$1</code>.",
        'config-using-server'             => 'Using server name "<nowiki>$1</nowiki>".',
        'config-using-uri'                => 'Using server URL "<nowiki>$1$2</nowiki>".',
        'config-uploads-not-safe'         => "'''Warning:''' Your default directory for uploads <code>$1</code> is vulnerable to arbitrary scripts execution.
@@ -317,7 +317,7 @@ This is '''not recommended''' unless you are having problems with your wiki.",
 You can now [$1 start using your wiki].",
        'config-regenerate'               => 'Regenerate <code>LocalSettings.php</code> →',
        'config-show-table-status'        => '<code>SHOW TABLE STATUS</code> query failed!',
-       'config-unknown-collation'        => "'''Warning:''' Database is using unrecognised collation.",
+       'config-unknown-collation'        => "'''Warning:''' Database is using unrecognized collation.",
        'config-db-web-account'           => 'Database account for web access',
        'config-db-web-help'              => 'Select the username and password that the web server will use to connect to the database server, during ordinary operation of the wiki.',
        'config-db-web-account-same'      => 'Use the same account as for installation',
@@ -327,7 +327,7 @@ The account you specify here must already exist.',
        'config-mysql-engine'             => 'Storage engine:',
        'config-mysql-innodb'             => 'InnoDB',
        'config-mysql-myisam'             => 'MyISAM',
-       'config-mysql-myisam-dep'         => "'''Warning''': You have selected MyISAM as storage engine for MySQL, which is not recommended for use with MediaWiki, because:
+       'config-mysql-myisam-dep'         => "'''Warning:''' You have selected MyISAM as storage engine for MySQL, which is not recommended for use with MediaWiki, because:
 * it barely supports concurrency due to table locking
 * it is more prone to corruption than other engines
 * the MediaWiki codebase does not always handle MyISAM as it should
@@ -514,12 +514,12 @@ MediaWiki currently requires that the tables be owned by the web user. Please sp
        'config-install-user-missing-create' => 'The specified user "$1" does not exist.
 Please click the "create account" checkbox below if you want to create it.',
        'config-install-tables'           => 'Creating tables',
-       'config-install-tables-exist'     => "'''Warning''': MediaWiki tables seem to already exist.
+       'config-install-tables-exist'     => "'''Warning:''' MediaWiki tables seem to already exist.
 Skipping creation.",
-       'config-install-tables-failed'    => "'''Error''': Table creation failed with the following error: $1",
+       'config-install-tables-failed'    => "'''Error:''' Table creation failed with the following error: $1",
        'config-install-interwiki'        => 'Populating default interwiki table',
        'config-install-interwiki-list'   => 'Could not read file <code>interwiki.list</code>.',
-       'config-install-interwiki-exists' => "'''Warning''': The interwiki table seems to already have entries.
+       'config-install-interwiki-exists' => "'''Warning:''' The interwiki table seems to already have entries.
 Skipping default list.",
        'config-install-stats'            => 'Initializing statistics',
        'config-install-keys'             => 'Generating secret keys',
@@ -542,7 +542,7 @@ If the download was not offered, or if you cancelled it, you can restart the dow
 
 $3
 
-'''Note''': If you do not do this now, this generated configuration file will not be available to you later if you exit the installation without downloading it.
+'''Note:''' If you do not do this now, this generated configuration file will not be available to you later if you exit the installation without downloading it.
 
 When that has been done, you can '''[$2 enter your wiki]'''.",
        'config-download-localsettings' => 'Download <code>LocalSettings.php</code>',
@@ -1035,12 +1035,13 @@ $messages['ang'] = array(
 
 /** Arabic (العربية)
  * @author Meno25
+ * @author Mido
  * @author OsamaK
  * @author روخو
  */
 $messages['ar'] = array(
        'config-desc' => 'مثبت لميدياويكي',
-       'config-title' => 'ميدياويكي 1$ التثبيت', # Fuzzy
+       'config-title' => 'تثبيت ميدياويكي $1',
        'config-information' => 'معلومات',
        'config-back' => '→ ارجع',
        'config-continue' => 'استمر ←',
@@ -1061,7 +1062,7 @@ $messages['ar'] = array(
 
 * [//www.mediawiki.org/wiki/Manual:Configuration_settings قائمة إعدادات الضبط]
 * [//www.mediawiki.org/wiki/Manual:FAQ أسئلة متكررة حول ميدياويكي]
-* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce القائمة البريدية الخاصة بإصدار ميدياويكي]',
+* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce القائمة البريدية الخاصة بإصدار ميدياويكي]', # Fuzzy
 );
 
 /** Aramaic (ܐܪܡܝܐ)
@@ -2888,6 +2889,7 @@ Gwiriit hag-eñ e c'hall an implijer « $1 » skrivañ er brastres « $2 ».",
        'config-install-mainpage-failed' => "Ne c'haller ket ensoc'hañ ar bajenn bennañ: $1",
        'config-download-localsettings' => 'Pellgargañ <code>LocalSettings.php</code>',
        'config-help' => 'skoazell',
+       'config-nofile' => 'N\'eus ket bet gallet kavout ar restr "$1". Daoust ha dilamet eo bet ?',
        'mainpagetext' => "'''Meziant MediaWiki staliet.'''",
        'mainpagedocfooter' => "Sellit ouzh [//meta.wikimedia.org/wiki/Help:Contents Sturlevr an implijerien] evit gouzout hiroc'h war an doare da implijout ar meziant wiki.
 
@@ -3044,6 +3046,9 @@ $messages['ceb'] = array(
  * @author Calak
  */
 $messages['ckb'] = array(
+       'config-wiki-language' => 'زمانی ویکی:',
+       'config-page-language' => 'زمان',
+       'config-page-name' => 'ناو',
        'mainpagetext' => "'''میدیاویکی بە سەرکەوتوویی دامەزرا.'''",
        'mainpagedocfooter' => 'لە [//meta.wikimedia.org/wiki/Help:Contents ڕێنوێنیی بەکارھێنەران] بۆ زانیاری سەبارەت بە بەکارھێنانی نەرمامێری ویکی کەڵک وەربگرە.
 
@@ -4419,6 +4424,21 @@ $messages['el'] = array(
        'mainpagedocfooter' => 'Περισσότερες πληροφορίες σχετικά με τη χρήση και με τη ρύθμιση παραμέτρων θα βρείτε στους συνδέσμους: [//meta.wikimedia.org/wiki/MediaWiki_localisation Οδηγίες για τροποποίηση του περιβάλλοντος εργασίας] και [//meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide Εγχειρίδιο χρήστη].', # Fuzzy
 );
 
+/** British English (British English)
+ * @author Shirayuki
+ */
+$messages['en-gb'] = array(
+       'config-unicode-using-utf8' => "Using Brion Vibber's utf8_normalize.so for Unicode normalisation.",
+       'config-unicode-using-intl' => 'Using the [http://pecl.php.net/intl intl PECL extension] for Unicode normalisation.',
+       'config-unicode-pure-php-warning' => "'''Warning:''' The [http://pecl.php.net/intl intl PECL extension] is not available to handle Unicode normalisation, falling back to slow pure-PHP implementation.
+If you run a high-traffic site, you should read a little on [//www.mediawiki.org/wiki/Unicode_normalization_considerations Unicode normalisation].",
+       'config-unicode-update-warning' => "'''Warning:''' The installed version of the Unicode normalisation wrapper uses an older version of [http://site.icu-project.org/ the ICU project's] library.
+You should [//www.mediawiki.org/wiki/Unicode_normalization_considerations upgrade] if you are at all concerned about using Unicode.",
+       'config-unknown-collation' => "'''Warning:''' Database is using unrecognised collation.",
+       'config-profile-fishbowl' => 'Authorised editors only',
+       'config-install-stats' => 'Initialising statistics',
+);
+
 /** Esperanto (Esperanto)
  * @author Airon90
  * @author Yekrats
@@ -10038,9 +10058,9 @@ MediaWikiのインストールはできません。',
 しかし、MediaWikiには PHP $2 以上が必要です。',
        'config-unicode-using-utf8' => 'Unicode正規化に、Brion Vibberのutf8_normalize.soを使用。',
        'config-unicode-using-intl' => 'Unicode正規化に[http://pecl.php.net/intl intl PECL 拡張機能]を使用。',
-       'config-unicode-pure-php-warning' => "'''警告''': Unicode 正規化の処理に [http://pecl.php.net/intl intl PECL 拡張機能]を利用できないため、処理が遅いピュア PHP の実装を代わりに使用しています。
+       'config-unicode-pure-php-warning' => "'''警告:''' Unicode 正規化の処理に [http://pecl.php.net/intl intl PECL 拡張機能]を利用できないため、処理が遅いピュア PHP の実装を代わりに使用しています。
 高トラフィックのサイトを運営する場合は、[//www.mediawiki.org/wiki/Unicode_normalization_considerations Unicode 正規化]をお読みください。",
-       'config-unicode-update-warning' => "'''警告''': インストールされているバージョンの Unicode 正規化ラッパーは、[http://site.icu-project.org/ ICU プロジェクト]のライブラリの古いバージョンを使用しています。
+       'config-unicode-update-warning' => "'''警告:''' インストールされているバージョンの Unicode 正規化ラッパーは、[http://site.icu-project.org/ ICU プロジェクト]のライブラリの古いバージョンを使用しています。
 Unicode を少しでも利用する可能性がある場合は、[//www.mediawiki.org/wiki/Unicode_normalization_considerations アップグレード]してください。",
        'config-no-db' => '適切なデータベース ドライバーが見つかりませんでした! PHP にデータベース ドライバーをインストールする必要があります。
 以下の種類のデータベースに対応しています: $1
@@ -10048,7 +10068,7 @@ Unicode を少しでも利用する可能性がある場合は、[//www.mediawik
 共有サーバーを使用している場合は、適切なデータベース ドライバーのインストールを、サーバーの管理者に依頼してください。
 PHP を自分でコンパイルした場合は、例えば <code>./configure --with-mysql</code> を実行して、データベース クライアントを使用できるように再設定してください。
 Debian または Ubuntu のパッケージから PHP をインストールした場合は、php5-mysql モジュールもインストールする必要があります。',
-       'config-no-fts3' => "'''警告''': SQLite は [//sqlite.org/fts3.html FTS3] モジュールなしでコンパイルされており、このバックエンドでは検索機能は利用できなくなります。",
+       'config-no-fts3' => "'''警告:''' SQLite は [//sqlite.org/fts3.html FTS3] モジュールなしでコンパイルされており、このバックエンドでは検索機能は利用できなくなります。",
        'config-register-globals' => "'''警告: PHP の <code>[http://php.net/register_globals register_globals]</code> オプションが有効になっています。'''
 '''可能なら無効化してください。'''
 MediaWiki は動作しますが、サーバーの潜在的なセキュリティ脆弱性が露呈されます。",
@@ -10071,7 +10091,7 @@ MediaWikiは、このモジュールの関数を必要としているため、
 Mandrakeを実行している場合、php-xmlパッケージをインストールしてください。',
        'config-pcre' => 'PCREをサポートしているモジュールが不足しているようです。
 MediaWikiは、Perl互換の正規表現関数の動作が必要です。',
-       'config-pcre-no-utf8' => "'''致命的エラー''': PHP の PCRE が PCRE_UTF8 対応なしでコンパイルされているようです。
+       'config-pcre-no-utf8' => "'''致命的エラー:''' PHP の PCRE が PCRE_UTF8 対応なしでコンパイルされているようです。
 MediaWiki を正しく動作させるには、UTF-8 対応が必要です。",
        'config-memory-raised' => 'PHPの<code>memory_limit</code>は$1で、$2に引き上げられました。',
        'config-memory-bad' => "'''警告:''' PHPの<code>memory_limit</code>に$1に設定されています。
@@ -10091,7 +10111,7 @@ MediaWiki を正しく動作させるには、UTF-8 対応が必要です。",
 画像のサムネイル生成は無効になります。',
        'config-no-uri' => "'''エラー:''' 現在のURIを決定できませんでした。
 インストールは中止されました。",
-       'config-no-cli-uri' => "'''警告''': --scriptpath が指定されていないため、既定値 <code>$1</code> を使用します。",
+       'config-no-cli-uri' => "'''警告:''' --scriptpath が指定されていないため、既定値 <code>$1</code> を使用します。",
        'config-using-server' => 'サーバー名「<nowiki>$1</nowiki>」を使用しています。',
        'config-using-uri' => 'サーバー URL「<nowiki>$1$2</nowiki>」を使用しています。',
        'config-uploads-not-safe' => "'''警告:''' アップロードの既定ディレクトリ <code>$1</code> に、任意のスクリプト実行に関する脆弱性があります。
@@ -10422,12 +10442,12 @@ GFDLは有効なライセンスですが、内容を理解するのは困難で
        'config-install-user-missing-create' => '指定したユーザー「$1」は存在しません。
 アカウントを作成する場合は、下の「アカウント作成」をクリックしてください。',
        'config-install-tables' => 'テーブルの作成',
-       'config-install-tables-exist' => "'''警告''': MediaWiki テーブルは既に存在するようです。
+       'config-install-tables-exist' => "'''警告:''' MediaWiki テーブルは既に存在するようです。
 作成を省略します。",
-       'config-install-tables-failed' => "'''エラー''': テーブルの作成が、以下のエラーにより失敗しました: $1",
+       'config-install-tables-failed' => "'''エラー:''' テーブルの作成が、以下のエラーにより失敗しました: $1",
        'config-install-interwiki' => '既定のウィキ間テーブルの導入',
        'config-install-interwiki-list' => 'ファイル <code>interwiki.list</code> から読み取れませんでした。',
-       'config-install-interwiki-exists' => "'''警告''': ウィキ間テーブルは既に登録されているようです。
+       'config-install-interwiki-exists' => "'''警告:''' ウィキ間テーブルは既に登録されているようです。
 既定のテーブルを無視します。",
        'config-install-stats' => '統計情報の初期化',
        'config-install-keys' => '秘密鍵の生成',
@@ -10446,7 +10466,7 @@ MediaWikiのインストールに成功しました。
 
 $3
 
-'''注意''': この生成された設定ファイルをダウンロードせずにインストールを終了すると、このファイルは利用できなくなります。
+'''注意:''' この生成された設定ファイルをダウンロードせずにインストールを終了すると、このファイルは利用できなくなります。
 
 上記の作業が完了すると、'''[$2 ウィキに入る]'''ことができます。",
        'config-download-localsettings' => '<code>LocalSettings.php</code> をダウンロード',
@@ -19809,7 +19829,10 @@ $messages['xal'] = array(
  * @author පසිඳු කාවින්ද
  */
 $messages['yi'] = array(
+       'config-desc' => 'דער אינסטאלירער פאר מעדיעוויקי',
+       'config-title' => 'מעדיעוויקי $1 אינסטאלירונג',
        'config-information' => 'אינפֿארמאציע',
+       'config-wiki-language' => 'ווקי שפראך:',
        'config-back' => '→ צוריק',
        'config-continue' => 'פֿארזעצן ←',
        'config-page-language' => 'שפראַך',
@@ -19955,7 +19978,7 @@ $1',
        'config-env-php-toolow' => '已安装PHP $1;但是,MediaWiki需要PHP $2或更高版本。',
        'config-unicode-using-utf8' => '使用Brion Vibber的utf8_normalize.so实现Unicode正常化。',
        'config-unicode-using-intl' => '使用[http://pecl.php.net/intl intl PECL扩展]实现Unicode正常化。',
-       'config-unicode-pure-php-warning' => "'''警告''':因为尚未安装 [http://pecl.php.net/intl intl PECL 扩展]以处理 Unicode 正常化,故只能退而采用运行较慢的纯 PHP 实现的方法。
+       'config-unicode-pure-php-warning' => "'''警告:'''因为尚未安装 [http://pecl.php.net/intl intl PECL 扩展]以处理 Unicode 正常化,故只能退而采用运行较慢的纯 PHP 实现的方法。
 如果您运行着一个高流量的站点,请参阅 [//www.mediawiki.org/wiki/Unicode_normalization_considerations Unicode 正常化]一文。",
        'config-unicode-update-warning' => "'''警告''':Unicode正常化封装器的已安装版本使用了旧版本的[http://site.icu-project.org/ ICU项目]库。如果您需要使用Unicode,请将其[//www.mediawiki.org/wiki/Unicode_normalization_considerations 升级]。",
        'config-no-db' => '找不到合适的数据库驱动!您需要为PHP安装数据库驱动。目前支持以下数据库:$1。
@@ -20060,7 +20083,6 @@ Object caching is not enabled.",
 请考虑将数据库统一放置在某处,如<code>/var/lib/mediawiki/yourwiki</code>下。",
        'config-oracle-def-ts' => '默认表空间:',
        'config-oracle-temp-ts' => '临时表空间:',
-       'config-type-ibm_db2' => 'IBM DB2',
        'config-support-info' => 'MediaWiki支持以下数据库系统:
 
 $1
        'config-support-postgres' => '* $1是一种流行的开源数据库系统,可作为MySQL的替代([http://www.php.net/manual/en/pgsql.installation.php 如何将对PostgreSQL的支持编译进PHP中])。本程序中可能依然存在一些小而明显的错误,因此并不建议在生产环境中使用该数据库系统。',
        'config-support-sqlite' => '* $1是一种轻量级的数据库系统,能被良好地支持。([http://www.php.net/manual/en/pdo.installation.php 如何将对SQLite的支持编译进PHP中],须使用PDO)',
        'config-support-oracle' => '* $1是一种商用企业级的数据库。([http://www.php.net/manual/en/oci8.installation.php 如何将对OCI8的支持编译进PHP中])',
-       'config-support-ibm_db2' => '* $1是一种商用企业级数据库。([http://www.php.net/manual/en/ibm-db2.installation.php 如何编译支持IBM DB2的PHP])',
        'config-header-mysql' => 'MySQL设置',
        'config-header-postgres' => 'PostgreSQL设置',
        'config-header-sqlite' => 'SQLite设置',
        'config-header-oracle' => 'Oracle设置',
-       'config-header-ibm_db2' => 'IBM DB2设置',
        'config-invalid-db-type' => '无效的数据库类型',
        'config-missing-db-name' => '您必须为“数据库名称”输入内容',
        'config-missing-db-host' => '您必须为“数据库主机”输入内容',
@@ -20150,7 +20170,6 @@ chmod a+w $3</pre>',
        'config-mysql-charset-help' => "在'''二进制模式'''下,MediaWiki会将UTF-8编码的文本存于数据库的二进制字段中。相对于MySQL的UTF-8模式,这种方法效率更高,并允许您使用全范围的Unicode字符。
 
 在'''UTF-8模式'''下,MySQL将知道您数据使用的字符集,并能适当地提供和转换内容。但这样做您将无法在数据库中存储[//zh.wikipedia.org/wiki/基本多文种平面 基本多文种平面]以外的字符。",
-       'config-ibm_db2-low-db-pagesize' => "您的DB2数据库默认表空间的页长(pagesize)不足。至少需要'''32K'''或更大的页长。",
        'config-site-name' => 'Wiki的名称:',
        'config-site-name-help' => '填入的内容会出现在浏览器的标题栏以及其他多处位置中。',
        'config-site-name-blank' => '输入网站的名称。',
@@ -20400,7 +20419,7 @@ $1',
        'config-env-php-toolow' => '已安裝 PHP $1;但是,MediaWiki 需要 PHP $2 或更高版本。',
        'config-unicode-using-utf8' => '將使用 Brion Vibber 的 utf8_normalize.so 以實作 Unicode 正規化。',
        'config-unicode-using-intl' => '將使用 [http://pecl.php.net/intl intl PECL 延伸函式庫]以實作 Unicode 正規化。',
-       'config-unicode-pure-php-warning' => "'''警告''':因為尚未安裝 [http://pecl.php.net/intl intl PECL 延伸函式庫]以處理 Unicode 正規化,故只能退而採用較慢的純 PHP 實作。如果您運行着一個高流量的網站,請參閱 [//www.mediawiki.org/wiki/Unicode_normalization_considerations Unicode 正規化]一文。",
+       'config-unicode-pure-php-warning' => "'''警告:'''因為尚未安裝 [http://pecl.php.net/intl intl PECL 延伸函式庫]以處理 Unicode 正規化,故只能退而採用較慢的純 PHP 實作。如果您運行着一個高流量的網站,請參閱 [//www.mediawiki.org/wiki/Unicode_normalization_considerations Unicode 正規化]一文。",
        'config-unicode-update-warning' => "'''警告''':Unicode正常化封裝器的已安裝版本使用了舊版本的[http://site.icu-project.org/ ICU項目]庫。如果您需要使用Unicode,請將其[//www.mediawiki.org/wiki/Unicode_normalization_considerations 升級]。",
        'config-no-db' => '找不到合適的數據庫驅動!您需要為PHP安裝數據庫驅動。目前支持以下數據庫:$1。
 
@@ -20504,7 +20523,6 @@ Object caching is not enabled.",
 請考慮將數據庫統一放置在某處,如<code>/var/lib/mediawiki/yourwiki</code>下。",
        'config-oracle-def-ts' => '默認表空間:',
        'config-oracle-temp-ts' => '臨時表空間:',
-       'config-type-ibm_db2' => 'IBM DB2',
        'config-support-info' => 'MediaWiki支持以下數據庫系統:
 
 $1
        'config-support-postgres' => '* $1是一種流行的開源數據庫系統,可作為MySQL的替代([http://www.php.net/manual/en/pgsql.installation.php 如何將對PostgreSQL的支持編譯進PHP中])。本程序中可能依然存在一些小而明顯的錯誤,因此並不建議在生產環境中使用該數據庫系統。',
        'config-support-sqlite' => '* $1是一種輕量級的數據庫系統,能被良好地支持。([http://www.php.net/manual/en/pdo.installation.php 如何將對SQLite的支持編譯進PHP中],須使用PDO)',
        'config-support-oracle' => '* $1是一種商用企業級的數據庫。([http://www.php.net/manual/en/oci8.installation.php 如何將對OCI8的支持編譯進PHP中])',
-       'config-support-ibm_db2' => '* $1是一種商用企業級數據庫。', # Fuzzy
        'config-header-mysql' => 'MySQL 的設定',
        'config-header-postgres' => 'PostgreSQL設置',
        'config-header-sqlite' => 'SQLite 的設定',
        'config-header-oracle' => '甲骨文設定',
-       'config-header-ibm_db2' => 'IBM DB2設置',
        'config-invalid-db-type' => '無效的資料庫類型',
        'config-missing-db-name' => '您必須為“數據庫名稱”輸入內容',
        'config-missing-db-host' => '您必須為“數據庫主機”輸入內容',
@@ -20594,7 +20610,6 @@ chmod a+w $3</pre>',
        'config-mysql-charset-help' => "在'''二進制模式'''下,MediaWiki會將UTF-8編碼的文本存於數據庫的二進制字段中。相對於MySQL的UTF-8模式,這種方法效率更高,並允許您使用全範圍的Unicode字符。
 
 在'''UTF-8模式'''下,MySQL將知道您數據使用的字符集,並能適當地提供和轉換內容。但這樣做您將無法在數據庫中存儲[//zh.wikipedia.org/wiki/基本多文種平面 基本多文種平面]以外的字符。",
-       'config-ibm_db2-low-db-pagesize' => "您的DB2數據庫默認表空間的頁長(pagesize)不足。至少需要'''32K'''或更大的頁長。",
        'config-site-name' => 'Wiki的名稱:',
        'config-site-name-help' => '填入的內容會出現在瀏覽器的標題欄以及其他多處位置中。',
        'config-site-name-blank' => '輸入站點名稱。',
index 850fb31..4d8e5f0 100644 (file)
@@ -988,7 +988,7 @@ abstract class Installer {
                                continue;
                        }
 
-                       list( $all, $lang, $territory, $charset, $modifier ) = $m;
+                       list( , $lang, , , ) = $m;
 
                        $candidatesByLocale[$m[0]] = $m;
                        $candidatesByLang[$lang][] = $m;
@@ -1089,7 +1089,6 @@ abstract class Installer {
                }
        }
 
-
        /**
         * Check the libicu version
         */
@@ -1173,8 +1172,8 @@ abstract class Installer {
         *
         * Used only by environment checks.
         *
-        * @param $path String: path to search
-        * @param $names Array of executable names
+        * @param string $path path to search
+        * @param array $names of executable names
         * @param $versionInfo Boolean false or array with two members:
         *               0 => Command to run for version check, with $1 for the full executable name
         *               1 => String to compare the output with
@@ -1278,7 +1277,7 @@ abstract class Installer {
        /**
         * Checks for presence of an Apache module. Works only if PHP is running as an Apache module, too.
         *
-        * @param $moduleName String: Name of module to check.
+        * @param string $moduleName Name of module to check.
         * @return bool
         */
        public static function apacheModulePresent( $moduleName ) {
@@ -1435,8 +1434,8 @@ abstract class Installer {
        /**
         * Actually perform the installation.
         *
-        * @param $startCB Array A callback array for the beginning of each step
-        * @param $endCB Array A callback array for the end of each step
+        * @param array $startCB A callback array for the beginning of each step
+        * @param array $endCB A callback array for the end of each step
         *
         * @return Array of Status objects
         */
@@ -1643,9 +1642,9 @@ abstract class Installer {
        /**
         * Add an installation step following the given step.
         *
-        * @param $callback Array A valid installation callback array, in this form:
+        * @param array $callback A valid installation callback array, in this form:
         *    array( 'name' => 'some-unique-name', 'callback' => array( $obj, 'function' ) );
-        * @param $findStep String the step to find. Omit to put the step at the beginning
+        * @param string $findStep the step to find. Omit to put the step at the beginning
         */
        public function addInstallStep( $callback, $findStep = 'BEGINNING' ) {
                $this->extraInstallSteps[$findStep][] = $callback;
index bbc6b64..7cb3779 100644 (file)
@@ -94,8 +94,8 @@ class LocalSettingsGenerator {
 
        /**
         * For $wgGroupPermissions, set a given ['group']['permission'] value.
-        * @param $group String Group name
-        * @param $rightsArr Array An array of permissions, in the form of:
+        * @param string $group Group name
+        * @param array $rightsArr An array of permissions, in the form of:
         *   array( 'right' => true, 'right2' => false )
         */
        public function setGroupRights( $group, $rightsArr ) {
@@ -157,7 +157,7 @@ class LocalSettingsGenerator {
        /**
         * Write the generated LocalSettings to a file
         *
-        * @param $fileName String Full path to filename to write to
+        * @param string $fileName Full path to filename to write to
         */
        public function writeFile( $fileName ) {
                file_put_contents( $fileName, $this->getText() );
@@ -255,59 +255,59 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 ## Uncomment this to disable output compression
 # \$wgDisableOutputCompression = true;
 
-\$wgSitename      = \"{$this->values['wgSitename']}\";
+\$wgSitename = \"{$this->values['wgSitename']}\";
 {$metaNamespace}
 ## The URL base path to the directory containing the wiki;
 ## defaults for all runtime URL paths are based off of this.
 ## For more information on customizing the URLs
 ## (like /w/index.php/Page_title to /wiki/Page_title) please see:
 ## http://www.mediawiki.org/wiki/Manual:Short_URL
-\$wgScriptPath       = \"{$this->values['wgScriptPath']}\";
-\$wgScriptExtension  = \"{$this->values['wgScriptExtension']}\";
+\$wgScriptPath = \"{$this->values['wgScriptPath']}\";
+\$wgScriptExtension = \"{$this->values['wgScriptExtension']}\";
 
 ## The protocol and server name to use in fully-qualified URLs
-\$wgServer           = \"{$this->values['wgServer']}\";
+\$wgServer = \"{$this->values['wgServer']}\";
 
 ## The relative URL path to the skins directory
-\$wgStylePath        = \"\$wgScriptPath/skins\";
+\$wgStylePath = \"\$wgScriptPath/skins\";
 
 ## The relative URL path to the logo.  Make sure you change this from the default,
 ## or else you'll overwrite your logo when you upgrade!
-\$wgLogo             = \"\$wgStylePath/common/images/wiki.png\";
+\$wgLogo = \"\$wgStylePath/common/images/wiki.png\";
 
 ## UPO means: this is also a user preference option
 
-\$wgEnableEmail      = {$this->values['wgEnableEmail']};
-\$wgEnableUserEmail  = {$this->values['wgEnableUserEmail']}; # UPO
+\$wgEnableEmail = {$this->values['wgEnableEmail']};
+\$wgEnableUserEmail = {$this->values['wgEnableUserEmail']}; # UPO
 
 \$wgEmergencyContact = \"{$this->values['wgEmergencyContact']}\";
-\$wgPasswordSender   = \"{$this->values['wgPasswordSender']}\";
+\$wgPasswordSender = \"{$this->values['wgPasswordSender']}\";
 
-\$wgEnotifUserTalk      = {$this->values['wgEnotifUserTalk']}; # UPO
-\$wgEnotifWatchlist     = {$this->values['wgEnotifWatchlist']}; # UPO
+\$wgEnotifUserTalk = {$this->values['wgEnotifUserTalk']}; # UPO
+\$wgEnotifWatchlist = {$this->values['wgEnotifWatchlist']}; # UPO
 \$wgEmailAuthentication = {$this->values['wgEmailAuthentication']};
 
 ## Database settings
-\$wgDBtype           = \"{$this->values['wgDBtype']}\";
-\$wgDBserver         = \"{$this->values['wgDBserver']}\";
-\$wgDBname           = \"{$this->values['wgDBname']}\";
-\$wgDBuser           = \"{$this->values['wgDBuser']}\";
-\$wgDBpassword       = \"{$this->values['wgDBpassword']}\";
+\$wgDBtype = \"{$this->values['wgDBtype']}\";
+\$wgDBserver = \"{$this->values['wgDBserver']}\";
+\$wgDBname = \"{$this->values['wgDBname']}\";
+\$wgDBuser = \"{$this->values['wgDBuser']}\";
+\$wgDBpassword = \"{$this->values['wgDBpassword']}\";
 
 {$this->dbSettings}
 
 ## Shared memory settings
-\$wgMainCacheType    = $cacheType;
+\$wgMainCacheType = $cacheType;
 \$wgMemCachedServers = $mcservers;
 
 ## To enable image uploads, make sure the 'images' directory
 ## is writable, then set this to true:
-\$wgEnableUploads  = {$this->values['wgEnableUploads']};
+\$wgEnableUploads = {$this->values['wgEnableUploads']};
 {$magic}\$wgUseImageMagick = true;
 {$magic}\$wgImageMagickConvertCommand = \"{$this->values['wgImageMagickConvertCommand']}\";
 
 # InstantCommons allows wiki to use images from http://commons.wikimedia.org
-\$wgUseInstantCommons  = {$this->values['wgUseInstantCommons']};
+\$wgUseInstantCommons = {$this->values['wgUseInstantCommons']};
 
 ## If you use ImageMagick (or any other shell command) on a
 ## Linux server, this will need to be set to the name of an
@@ -342,7 +342,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 ## appropriate copyright notice / icon. GNU Free Documentation
 ## License and Creative Commons licenses are supported so far.
 \$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright
-\$wgRightsUrl  = \"{$this->values['wgRightsUrl']}\";
+\$wgRightsUrl = \"{$this->values['wgRightsUrl']}\";
 \$wgRightsText = \"{$this->values['wgRightsText']}\";
 \$wgRightsIcon = \"{$this->values['wgRightsIcon']}\";
 
index 4eb2d39..f9a8ce7 100644 (file)
@@ -574,8 +574,8 @@ class MysqlInstaller extends DatabaseInstaller {
 
        /**
         * Return a formal 'User'@'Host' username for use in queries
-        * @param $name String Username, quotes will be added
-        * @param $host String Hostname, quotes will be added
+        * @param string $name Username, quotes will be added
+        * @param string $host Hostname, quotes will be added
         * @return String
         */
        private function buildFullUserName( $name, $host ) {
@@ -585,8 +585,8 @@ class MysqlInstaller extends DatabaseInstaller {
        /**
         * Try to see if the user account exists. Our "superuser" may not have
         * access to mysql.user, so false means "no" or "maybe"
-        * @param $host String Hostname to check
-        * @param $user String Username to check
+        * @param string $host Hostname to check
+        * @param string $user Username to check
         * @return boolean
         */
        private function userDefinitelyExists( $host, $user ) {
@@ -637,10 +637,10 @@ class MysqlInstaller extends DatabaseInstaller {
                $tblOpts = LocalSettingsGenerator::escapePhpString( $this->getTableOptions() );
                return
 "# MySQL specific settings
-\$wgDBprefix         = \"{$prefix}\";
+\$wgDBprefix = \"{$prefix}\";
 
 # MySQL table options to use during installation or update
-\$wgDBTableOptions   = \"{$tblOpts}\";
+\$wgDBTableOptions = \"{$tblOpts}\";
 
 # Experimental charset support for MySQL 5.0.
 \$wgDBmysql5 = {$dbmysql5};";
index 6a2d50f..9978a92 100644 (file)
@@ -236,9 +236,9 @@ class MysqlUpdater extends DatabaseUpdater {
         * 1.4 betas were missing the 'binary' marker from logging.log_title,
         * which causes a collation mismatch error on joins in MySQL 4.1.
         *
-        * @param $table String: table name
-        * @param $field String: field name to check
-        * @param $patchFile String: path to the patch to correct the field
+        * @param string $table table name
+        * @param string $field field name to check
+        * @param string $patchFile path to the patch to correct the field
         */
        protected function checkBin( $table, $field, $patchFile ) {
                if ( !$this->doTable( $table ) ) {
@@ -259,9 +259,9 @@ class MysqlUpdater extends DatabaseUpdater {
        /**
         * Check whether an index contain a field
         *
-        * @param $table String: table name
-        * @param $index String: index name to check
-        * @param $field String: field that should be in the index
+        * @param string $table table name
+        * @param string $index index name to check
+        * @param string $field field that should be in the index
         * @return Boolean
         */
        protected function indexHasField( $table, $index, $field ) {
@@ -416,7 +416,7 @@ class MysqlUpdater extends DatabaseUpdater {
                                if ( $prev_title == $row->cur_title && $prev_namespace == $row->cur_namespace ) {
                                        $deleteId[] = $row->cur_id;
                                }
-                               $prev_title     = $row->cur_title;
+                               $prev_title = $row->cur_title;
                                $prev_namespace = $row->cur_namespace;
                        }
                        $sql = "DELETE FROM $cur WHERE cur_id IN ( " . join( ',', $deleteId ) . ')';
index 4c72a8f..e853889 100644 (file)
@@ -202,7 +202,6 @@ class OracleInstaller extends DatabaseInstaller {
                $this->parent->addInstallStep( $callback, 'database' );
        }
 
-
        public function setupDatabase() {
                $status = Status::newGood();
                return $status;
@@ -294,7 +293,7 @@ class OracleInstaller extends DatabaseInstaller {
                $prefix = $this->getVar( 'wgDBprefix' );
                return
 "# Oracle specific settings
-\$wgDBprefix         = \"{$prefix}\";
+\$wgDBprefix = \"{$prefix}\";
 ";
        }
 
index 882ec53..4e5ae8c 100644 (file)
@@ -125,9 +125,9 @@ class PostgresInstaller extends DatabaseInstaller {
 
        /**
         * Open a PG connection with given parameters
-        * @param $user string User name
-        * @param $password string Password
-        * @param $dbName string Database name
+        * @param string $user User name
+        * @param string $password Password
+        * @param string $dbName Database name
         * @return Status
         */
        protected function openConnectionWithParams( $user, $password, $dbName ) {
@@ -147,7 +147,7 @@ class PostgresInstaller extends DatabaseInstaller {
 
        /**
         * Get a special type of connection
-        * @param $type string See openPgConnection() for details.
+        * @param string $type See openPgConnection() for details.
         * @return Status
         */
        protected function getPgConnection( $type ) {
@@ -183,7 +183,7 @@ class PostgresInstaller extends DatabaseInstaller {
         * separate connection for this allows us to avoid accidental cross-module
         * dependencies.
         *
-        * @param $type string The type of connection to get:
+        * @param string $type The type of connection to get:
         *    - create-db:     A connection for creating DBs, suitable for pre-
         *                     installation.
         *    - create-schema: A connection to the new DB, for creating schemas and
@@ -383,9 +383,9 @@ class PostgresInstaller extends DatabaseInstaller {
        /**
         * Recursive helper for canCreateObjectsForWebUser().
         * @param $conn DatabaseBase object
-        * @param $targetMember int Role ID of the member to look for
-        * @param $group int Role ID of the group to look for
-        * @param $maxDepth int Maximum recursive search depth
+        * @param int $targetMember Role ID of the member to look for
+        * @param int $group Role ID of the group to look for
+        * @param int $maxDepth Maximum recursive search depth
         * @return bool
         */
        protected function isRoleMember( $conn, $targetMember, $group, $maxDepth ) {
@@ -531,8 +531,8 @@ class PostgresInstaller extends DatabaseInstaller {
                $schema = $this->getVar( 'wgDBmwschema' );
                return
 "# Postgres specific settings
-\$wgDBport           = \"{$port}\";
-\$wgDBmwschema       = \"{$schema}\";";
+\$wgDBport = \"{$port}\";
+\$wgDBmwschema = \"{$schema}\";";
        }
 
        public function preUpgrade() {
index d8fa724..68df6ab 100644 (file)
@@ -240,7 +240,7 @@ class SqliteInstaller extends DatabaseInstaller {
 
                $module = DatabaseSqlite::getFulltextSearchModule();
                $fts3tTable = $this->db->checkForEnabledSearch();
-               if ( $fts3tTable &&  !$module ) {
+               if ( $fts3tTable && !$module ) {
                        $status->warning( 'config-sqlite-fts3-downgrade' );
                        $this->db->sourceFile( "$IP/maintenance/sqlite/archives/searchindex-no-fts.sql" );
                } elseif ( !$fts3tTable && $module == 'FTS3' ) {
@@ -256,6 +256,6 @@ class SqliteInstaller extends DatabaseInstaller {
                $dir = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgSQLiteDataDir' ) );
                return
 "# SQLite-specific settings
-\$wgSQLiteDataDir    = \"{$dir}\";";
+\$wgSQLiteDataDir = \"{$dir}\";";
        }
 }
index cd7a2c9..47650b6 100644 (file)
@@ -124,7 +124,7 @@ class SqliteUpdater extends DatabaseUpdater {
        protected function sqliteSetupSearchindex() {
                $module = DatabaseSqlite::getFulltextSearchModule();
                $fts3tTable = $this->updateRowExists( 'fts3' );
-               if ( $fts3tTable &&  !$module ) {
+               if ( $fts3tTable && !$module ) {
                        $this->applyPatch( 'searchindex-no-fts.sql', false, 'PHP is missing FTS3 support, downgrading tables' );
                } elseif ( !$fts3tTable && $module == 'FTS3' ) {
                        $this->applyPatch( 'searchindex-fts3.sql', false, "Adding FTS3 search capabilities" );
index c080871..a325507 100644 (file)
@@ -140,7 +140,7 @@ class WebInstaller extends Installer {
        /**
         * Main entry point.
         *
-        * @param $session Array: initial session array
+        * @param array $session initial session array
         *
         * @return Array: new session array
         */
@@ -461,7 +461,7 @@ class WebInstaller extends Installer {
 
        /**
         * Set a session variable.
-        * @param $name String key for the variable
+        * @param string $name key for the variable
         * @param $value Mixed
         */
        public function setSession( $name, $value ) {
@@ -610,7 +610,7 @@ class WebInstaller extends Installer {
        /**
         * Get HTML for an error box with an icon.
         *
-        * @param $text String: wikitext, get this with wfMessage()->plain()
+        * @param string $text wikitext, get this with wfMessage()->plain()
         *
         * @return string
         */
@@ -621,7 +621,7 @@ class WebInstaller extends Installer {
        /**
         * Get HTML for a warning box with an icon.
         *
-        * @param $text String: wikitext, get this with wfMessage()->plain()
+        * @param string $text wikitext, get this with wfMessage()->plain()
         *
         * @return string
         */
@@ -632,9 +632,9 @@ class WebInstaller extends Installer {
        /**
         * Get HTML for an info box with an icon.
         *
-        * @param $text String: wikitext, get this with wfMessage()->plain()
-        * @param $icon String: icon name, file in skins/common/images
-        * @param $class String: additional class name to add to the wrapper div
+        * @param string $text wikitext, get this with wfMessage()->plain()
+        * @param string $icon icon name, file in skins/common/images
+        * @param string $class additional class name to add to the wrapper div
         *
         * @return string
         */
@@ -668,7 +668,7 @@ class WebInstaller extends Installer {
 
        /**
         * Output a help box.
-        * @param $msg String key for wfMessage()
+        * @param string $msg key for wfMessage()
         */
        public function showHelpBox( $msg /*, ... */ ) {
                $args = func_get_args();
@@ -1006,7 +1006,7 @@ class WebInstaller extends Installer {
         * fake) passwords.
         *
         * @param $varNames Array
-        * @param $prefix String: the prefix added to variables to obtain form names
+        * @param string $prefix the prefix added to variables to obtain form names
         *
         * @return array
         */
index 42f451f..afbb9ab 100644 (file)
@@ -104,7 +104,7 @@ class WebInstallerOutput {
 
        /**
         * Get the raw vector CSS, flipping if needed
-        * @param $dir String 'ltr' or 'rtl'
+        * @param string $dir 'ltr' or 'rtl'
         * @return String
         */
        public function getCSS( $dir ) {
index e126c23..f352cf1 100644 (file)
@@ -128,7 +128,7 @@ abstract class WebInstallerPage {
        /**
         * Get the starting tags of a fieldset.
         *
-        * @param $legend String: message name
+        * @param string $legend message name
         *
         * @return string
         */
@@ -357,7 +357,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage {
 
        /**
         * Initiate an upgrade of the existing database
-        * @param $vars array Variables from LocalSettings.php and AdminSettings.php
+        * @param array $vars Variables from LocalSettings.php and AdminSettings.php
         * @return Status
         */
        protected function handleExistingUpgrade( $vars ) {
index 9ec58c9..bcf582e 100644 (file)
@@ -59,10 +59,10 @@ abstract class Job {
        /**
         * Create the appropriate object to handle a specific job
         *
-        * @param $command String: Job command
+        * @param string $command Job command
         * @param $title Title: Associated title
-        * @param $params Array|bool: Job parameters
-        * @param $id Int: Job identifier
+        * @param array|bool $params Job parameters
+        * @param int $id Job identifier
         * @throws MWException
         * @return Job
         */
@@ -82,7 +82,7 @@ abstract class Job {
         * This may add duplicate at insert time, but they will be
         * removed later on, when the first one is popped.
         *
-        * @param $jobs array of Job objects
+        * @param array $jobs of Job objects
         * @return bool
         * @deprecated 1.21
         */
@@ -97,7 +97,7 @@ abstract class Job {
         * be rolled-back as part of a larger transaction. However,
         * large batches of jobs can cause slave lag.
         *
-        * @param $jobs array of Job objects
+        * @param array $jobs of Job objects
         * @return bool
         * @deprecated 1.21
         */
@@ -111,7 +111,7 @@ abstract class Job {
         * runners.
         *
         * @param $type string
-        * @return Job
+        * @return Job|bool Returns false if there are no jobs
         * @deprecated 1.21
         */
        public static function pop_type( $type ) {
@@ -211,7 +211,7 @@ abstract class Job {
        }
 
        /**
-        * @param $key string A key that identifies the task
+        * @param string $key A key that identifies the task
         * @return Array
         */
        public static function newRootJobParams( $key ) {
index 4996a9e..b0dd925 100644 (file)
@@ -41,11 +41,18 @@ abstract class JobQueue {
         * @param $params array
         */
        protected function __construct( array $params ) {
-               $this->wiki     = $params['wiki'];
-               $this->type     = $params['type'];
-               $this->order    = isset( $params['order'] ) ? $params['order'] : 'random';
+               $this->wiki = $params['wiki'];
+               $this->type = $params['type'];
                $this->claimTTL = isset( $params['claimTTL'] ) ? $params['claimTTL'] : 0;
                $this->maxTries = isset( $params['maxTries'] ) ? $params['maxTries'] : 3;
+               if ( isset( $params['order'] ) && $params['order'] !== 'any' ) {
+                       $this->order = $params['order'];
+               } else {
+                       $this->order = $this->optimalOrder();
+               }
+               if ( !in_array( $this->order, $this->supportedOrders() ) ) {
+                       throw new MWException( __CLASS__ . " does not support '{$this->order}' order." );
+               }
        }
 
        /**
@@ -60,10 +67,10 @@ abstract class JobQueue {
         *                job runners since jobs can take different times to finish once popped.
         *                If "timestamp" is used, the queue will at least be loosely ordered
         *                by timestamp, allowing for some jobs to be popped off out of order.
-        *                If "random" is used, pop() will pick jobs in random order. This might be
-        *                useful for improving concurrency depending on the queue storage medium.
-        *                Note that "random" really means "don't care", so it may actually be FIFO
-        *                or only weakly random (e.g. pop() takes one of the first X jobs randomly).
+        *                If "random" is used, pop() will pick jobs in random order.
+        *                Note that it may only be weakly random (e.g. a lottery of the oldest X).
+        *                If "any" is choosen, the queue will use whatever order is the fastest.
+        *                This might be useful for improving concurrency for job acquisition.
         *   - claimTTL : If supported, the queue will recycle jobs that have been popped
         *                but not acknowledged as completed after this many seconds. Recycling
         *                of jobs simple means re-inserting them into the queue. Jobs can be
@@ -101,10 +108,32 @@ abstract class JobQueue {
                return $this->type;
        }
 
+       /**
+        * @return string One of (random, timestamp, fifo)
+        */
+       final public function getOrder() {
+               return $this->order;
+       }
+
+       /**
+        * @return Array Subset of (random, timestamp, fifo)
+        */
+       abstract protected function supportedOrders();
+
+       /**
+        * @return string One of (random, timestamp, fifo)
+        */
+       abstract protected function optimalOrder();
+
        /**
         * Quickly check if the queue is empty (has no available jobs).
         * Queue classes should use caching if they are any slower without memcached.
         *
+        * If caching is used, this might return false when there are actually no jobs.
+        * If pop() is called and returns false then it should correct the cache. Also,
+        * calling flushCaches() first prevents this. However, this affect is typically
+        * not distinguishable from the race condition between isEmpty() and pop().
+        *
         * @return bool
         * @throws MWException
         */
@@ -122,9 +151,11 @@ abstract class JobQueue {
        abstract protected function doIsEmpty();
 
        /**
-        * Get the number of available jobs in the queue.
+        * Get the number of available (unacquired) jobs in the queue.
         * Queue classes should use caching if they are any slower without memcached.
         *
+        * If caching is used, this number might be out of date for a minute.
+        *
         * @return integer
         * @throws MWException
         */
@@ -145,6 +176,8 @@ abstract class JobQueue {
         * Get the number of acquired jobs (these are temporarily out of the queue).
         * Queue classes should use caching if they are any slower without memcached.
         *
+        * If caching is used, this number might be out of date for a minute.
+        *
         * @return integer
         * @throws MWException
         */
@@ -180,7 +213,7 @@ abstract class JobQueue {
         * This does not require $wgJobClasses to be set for the given job type.
         * Outside callers should use JobQueueGroup::push() instead of this function.
         *
-        * @param $jobs array List of Jobs
+        * @param array $jobs List of Jobs
         * @param $flags integer Bitfield (supports JobQueue::QoS_Atomic)
         * @return bool Returns false on failure
         * @throws MWException
@@ -189,6 +222,7 @@ abstract class JobQueue {
                if ( !count( $jobs ) ) {
                        return true; // nothing to do
                }
+
                foreach ( $jobs as $job ) {
                        if ( $job->getType() !== $this->type ) {
                                throw new MWException( "Got '{$job->getType()}' job; expected '{$this->type}'." );
@@ -378,6 +412,16 @@ abstract class JobQueue {
         */
        protected function doFlushCaches() {}
 
+       /**
+        * Get an iterator to traverse over all of the jobs in this queue.
+        * This does not include jobs that are current acquired. In general,
+        * this should only be called on a queue that is no longer being popped.
+        *
+        * @return Iterator|Traversable|Array
+        * @throws MWException
+        */
+       abstract public function getAllQueuedJobs();
+
        /**
         * Namespace the queue with a key to isolate it for testing
         *
index fd64895..a7a459f 100644 (file)
  * @since 1.21
  */
 class JobQueueDB extends JobQueue {
-       const ROOTJOB_TTL     = 1209600; // integer; seconds to remember root jobs (14 days)
+       const ROOTJOB_TTL = 1209600; // integer; seconds to remember root jobs (14 days)
        const CACHE_TTL_SHORT = 30; // integer; seconds to cache info without re-validating
-       const CACHE_TTL_LONG  = 300; // integer; seconds to cache info that is kept up to date
-       const MAX_AGE_PRUNE   = 604800; // integer; seconds a job can live once claimed
-       const MAX_JOB_RANDOM  = 2147483647; // integer; 2^31 - 1, used for job_random
-       const MAX_OFFSET      = 255; // integer; maximum number of rows to skip
+       const CACHE_TTL_LONG = 300; // integer; seconds to cache info that is kept up to date
+       const MAX_AGE_PRUNE = 604800; // integer; seconds a job can live once claimed
+       const MAX_JOB_RANDOM = 2147483647; // integer; 2^31 - 1, used for job_random
+       const MAX_OFFSET = 255; // integer; maximum number of rows to skip
 
        protected $cluster = false; // string; name of an external DB cluster
 
@@ -50,6 +50,14 @@ class JobQueueDB extends JobQueue {
                $this->cluster = isset( $params['cluster'] ) ? $params['cluster'] : false;
        }
 
+       protected function supportedOrders() {
+               return array( 'random', 'timestamp', 'fifo' );
+       }
+
+       protected function optimalOrder() {
+               return 'random';
+       }
+
        /**
         * @see JobQueue::doIsEmpty()
         * @return bool
@@ -225,8 +233,8 @@ class JobQueueDB extends JobQueue {
                                $row = $this->claimOldest( $uuid );
                        } else { // random first
                                $rand = mt_rand( 0, self::MAX_JOB_RANDOM ); // encourage concurrent UPDATEs
-                               $gte  = (bool)mt_rand( 0, 1 ); // find rows with rand before/after $rand
-                               $row  = $this->claimRandom( $uuid, $rand, $gte );
+                               $gte = (bool)mt_rand( 0, 1 ); // find rows with rand before/after $rand
+                               $row = $this->claimRandom( $uuid, $rand, $gte );
                        }
                        // Check if we found a row to reserve...
                        if ( !$row ) {
@@ -258,9 +266,9 @@ class JobQueueDB extends JobQueue {
        /**
         * Reserve a row with a single UPDATE without holding row locks over RTTs...
         *
-        * @param $uuid string 32 char hex string
+        * @param string $uuid 32 char hex string
         * @param $rand integer Random unsigned integer (31 bits)
-        * @param $gte bool Search for job_random >= $random (otherwise job_random <= $random)
+        * @param bool $gte Search for job_random >= $random (otherwise job_random <= $random)
         * @return Row|false
         */
        protected function claimRandom( $uuid, $rand, $gte ) {
@@ -281,8 +289,8 @@ class JobQueueDB extends JobQueue {
                                // For small queues, using OFFSET will overshoot and return no rows more often.
                                // Instead, this uses job_random to pick a row (possibly checking both directions).
                                $ineq = $gte ? '>=' : '<=';
-                               $dir  = $gte ? 'ASC' : 'DESC';
-                               $row  = $dbw->selectRow( 'job', '*', // find a random job
+                               $dir = $gte ? 'ASC' : 'DESC';
+                               $row = $dbw->selectRow( 'job', '*', // find a random job
                                        array(
                                                'job_cmd'   => $this->type,
                                                'job_token' => '', // unclaimed
@@ -338,7 +346,7 @@ class JobQueueDB extends JobQueue {
        /**
         * Reserve a row with a single UPDATE without holding row locks over RTTs...
         *
-        * @param $uuid string 32 char hex string
+        * @param string $uuid 32 char hex string
         * @return Row|false
         */
        protected function claimOldest( $uuid ) {
@@ -580,6 +588,27 @@ class JobQueueDB extends JobQueue {
                }
        }
 
+       /**
+        * @see JobQueue::getAllQueuedJobs()
+        * @return Iterator
+        */
+       public function getAllQueuedJobs() {
+               list( $dbr, $scope ) = $this->getSlaveDB();
+               return new MappedIterator(
+                       $dbr->select( 'job', '*', array( 'job_cmd' => $this->getType(), 'job_token' => '' ) ),
+                       function( $row ) use ( $scope ) {
+                               $job = Job::factory(
+                                       $row->job_cmd,
+                                       Title::makeTitle( $row->job_namespace, $row->job_title ),
+                                       strlen( $row->job_params ) ? unserialize( $row->job_params ) : false,
+                                       $row->job_id
+                               );
+                               $job->id = $row->job_id; // XXX: work around broken subclasses
+                               return $job;
+                       }
+               );
+       }
+
        /**
         * @return Array (DatabaseBase, ScopedCallback)
         */
index 23a5494..351c71a 100644 (file)
@@ -37,7 +37,7 @@ class JobQueueGroup {
        protected $wiki; // string; wiki ID
 
        const TYPE_DEFAULT = 1; // integer; jobs popped by default
-       const TYPE_ANY     = 2; // integer; any job
+       const TYPE_ANY = 2; // integer; any job
 
        const USE_CACHE = 1; // integer; use process or persistent cache
 
@@ -46,7 +46,7 @@ class JobQueueGroup {
        const CACHE_VERSION = 1; // integer; cache version
 
        /**
-        * @param $wiki string Wiki ID
+        * @param string $wiki Wiki ID
         */
        protected function __construct( $wiki ) {
                $this->wiki = $wiki;
@@ -54,7 +54,7 @@ class JobQueueGroup {
        }
 
        /**
-        * @param $wiki string Wiki ID
+        * @param string $wiki Wiki ID
         * @return JobQueueGroup
         */
        public static function singleton( $wiki = false ) {
@@ -201,6 +201,25 @@ class JobQueueGroup {
                return $this->get( $job->getType() )->deduplicateRootJob( $job );
        }
 
+       /**
+        * Wait for any slaves or backup queue servers to catch up.
+        *
+        * This does nothing for certain queue classes.
+        *
+        * @return void
+        * @throws MWException
+        */
+       public function waitForBackups() {
+               global $wgJobTypeConf;
+
+               wfProfileIn( __METHOD__ );
+               // Try to avoid doing this more than once per queue storage medium
+               foreach ( $wgJobTypeConf as $type => $conf ) {
+                       $this->get( $type )->waitForBackups();
+               }
+               wfProfileOut( __METHOD__ );
+       }
+
        /**
         * Get the list of queue types
         *
@@ -236,6 +255,23 @@ class JobQueueGroup {
                return $types;
        }
 
+       /**
+        * Check if jobs should not be popped of a queue right now.
+        * This is only used for performance, such as to avoid spamming
+        * the queue with many sub-jobs before they actually get run.
+        *
+        * @param $type string
+        * @return bool
+        */
+       public function isQueueDeprioritized( $type ) {
+               if ( $type === 'refreshLinks2' ) {
+                       // Don't keep converting refreshLinks2 => refreshLinks jobs if the
+                       // later jobs have not been done yet. This helps throttle queue spam.
+                       return !$this->get( 'refreshLinks' )->isEmpty();
+               }
+               return false;
+       }
+
        /**
         * Execute any due periodic queue maintenance tasks for all queues.
         *
index 2ce47bb..3db8260 100644 (file)
@@ -33,7 +33,7 @@ class JobQueueRedis extends JobQueue {
 
        protected $server; // string; server address
 
-       const ROOTJOB_TTL   = 1209600; // integer; seconds to remember root jobs (14 days)
+       const ROOTJOB_TTL = 1209600; // integer; seconds to remember root jobs (14 days)
        const MAX_AGE_PRUNE = 604800; // integer; seconds a job can live once claimed (7 days)
 
        protected $key; // string; key to prefix the queue keys with (used for testing)
@@ -52,6 +52,14 @@ class JobQueueRedis extends JobQueue {
                $this->redisPool = RedisConnectionPool::singleton( $params['redisConfig'] );
        }
 
+       protected function supportedOrders() {
+               return array( 'timestamp', 'fifo' );
+       }
+
+       protected function optimalOrder() {
+               return 'fifo';
+       }
+
        /**
         * @see JobQueue::doIsEmpty()
         * @return bool
@@ -329,6 +337,52 @@ class JobQueueRedis extends JobQueue {
                return ( $timestamp && $timestamp > $params['rootJobTimestamp'] );
        }
 
+       /**
+        * @see JobQueue::getAllQueuedJobs()
+        * @return Iterator
+        */
+       public function getAllQueuedJobs() {
+               $conn = $this->getConnection();
+               if ( !$conn ) {
+                       throw new MWException( "Unable to connect to redis server." );
+               }
+               try {
+                       $that = $this;
+                       return new MappedIterator(
+                               $conn->lRange( $this->getQueueKey( 'l-unclaimed' ), 0, -1 ),
+                               function( $uid ) use ( $that, $conn ) {
+                                       return $that->getJobFromUidInternal( $uid, $conn );
+                               }
+                       );
+               } catch ( RedisException $e ) {
+                       $this->throwRedisException( $this->server, $conn, $e );
+               }
+       }
+
+       /**
+        * This function should not be called outside RedisJobQueue
+        *
+        * @param $uid string
+        * @param $conn RedisConnRef
+        * @return Job
+        * @throws MWException
+        */
+       public function getJobFromUidInternal( $uid, RedisConnRef $conn ) {
+               try {
+                       $fields = $conn->get( $this->prefixWithQueueKey( 'data', $uid ) );
+                       if ( !is_array( $fields ) ) { // wtf?
+                               $conn->delete( $this->prefixWithQueueKey( 'data', $uid ) );
+                               throw new MWException( "Could not find job with UID '$uid'." );
+                       }
+                       $title = Title::makeTitle( $fields['namespace'], $fields['title'] );
+                       $job = Job::factory( $fields['type'], $title, $fields['params'] );
+                       $job->metadata['sourceFields'] = $fields;
+                       return $job;
+               } catch ( RedisException $e ) {
+                       $this->throwRedisException( $this->server, $conn, $e );
+               }
+       }
+
        /**
         * Recycle or destroy any jobs that have been claimed for too long
         *
@@ -518,7 +572,7 @@ class JobQueueRedis extends JobQueue {
        }
 
        /**
-        * @param $uid string Job UID
+        * @param string $uid Job UID
         * @return bool Whether $uid is a SHA-1 hash based identifier for de-duplication
         */
        protected function isHashUid( $uid ) {
index 57c92e9..deb8fb0 100644 (file)
@@ -7,7 +7,6 @@ Notes on the Job queuing system architecture.
 \section intro Introduction
 
 The data model consist of the following main components:
-
 * The Job object represents a particular deferred task that happens in the
   background. All jobs subclass the Job object and put the main logic in the
   function called run().
@@ -15,6 +14,8 @@ The data model consist of the following main components:
   For example there may be a queue for email jobs and a queue for squid purge
   jobs.
 
+\section jobqueue Job queues
+
 Each job type has its own queue and is associated to a storage medium. One
 queue might save its jobs in redis while another one uses would use a database.
 
@@ -27,6 +28,7 @@ The factory class JobQueueGroup provides helper functions:
 
 The following queue classes are available:
 * JobQueueDB (stores jobs in the `job` table in a database)
+* JobQueueRedis (stores jobs in a redis server)
 
 All queue classes support some basic operations (though some may be no-ops):
 * enqueueing a batch of jobs
@@ -46,6 +48,27 @@ dequeued by a job runner, which crashes before completion, the job will be
 lost. Some jobs, like purging squid caches after a template change, may not
 require durable queues, whereas other jobs might be more important.
 
+\section aggregator Job queue aggregator
+
+The aggregators are used by nextJobDB.php, which is a script that will return a
+random ready queue (on any wiki in the farm) that can be used with runJobs.php.
+This can be used in conjuction with any scripts that handle wiki farm job queues.
+Note that $wgLocalDatabases defines what wikis are in the wiki farm.
+
+Since each job type has its own queue, and wiki-farms may have many wikis,
+there might be a large number of queues to keep track of. To avoid wasting
+large amounts of time polling empty queues, aggregators exists to keep track
+of which queues are ready.
+
+The following queue aggregator classes are available:
+* JobQueueAggregatorMemc (uses $wgMemc to track ready queues)
+* JobQueueAggregatorRedis (uses a redis server to track ready queues)
+
+Some aggregators cache data for a few minutes while others may be always up to date.
+This can be an important factor for jobs that need a low pickup time (or latency).
+
+\section jobs Jobs
+
 Callers should also try to make jobs maintain correctness when executed twice.
 This is useful for queues that actually implement ack(), since they may recycle
 dequeued but un-acknowledged jobs back into the queue to be attempted again. If
index 6158a67..05abeee 100644 (file)
@@ -36,9 +36,9 @@ class DoubleRedirectJob extends Job {
 
        /**
         * Insert jobs into the job queue to fix redirects to the given title
-        * @param $reason String: the reason for the fix, see message "double-redirect-fixed-<reason>"
+        * @param string $reason the reason for the fix, see message "double-redirect-fixed-<reason>"
         * @param $redirTitle Title: the title which has changed, redirects pointing to this title are fixed
-        * @param $destTitle bool Not used
+        * @param bool $destTitle Not used
         */
        public static function fixRedirects( $reason, $redirTitle, $destTitle = false ) {
                # Need to use the master to get the redirect table updated in the same transaction
index 1b64b10..524983b 100644 (file)
@@ -31,7 +31,7 @@ final class DuplicateJob extends Job {
         * Callers should use DuplicateJob::newFromJob() instead
         *
         * @param $title Title
-        * @param $params Array: job parameters
+        * @param array $params job parameters
         * @param $id Integer: job id
         */
        function __construct( $title, $params, $id = 0 ) {
@@ -46,9 +46,9 @@ final class DuplicateJob extends Job {
         */
        public static function newFromJob( Job $job ) {
                $djob = new self( $job->getTitle(), $job->getParams(), $job->getId() );
-               $djob->command  = $job->getType();
-               $djob->params   = is_array( $djob->params ) ? $djob->params : array();
-               $djob->params   = array( 'isDuplicate' => true ) + $djob->params;
+               $djob->command = $job->getType();
+               $djob->params = is_array( $djob->params ) ? $djob->params : array();
+               $djob->params = array( 'isDuplicate' => true ) + $djob->params;
                $djob->metadata = $job->metadata;
                return $djob;
        }
index 20245b3..818c6ab 100644 (file)
@@ -52,7 +52,7 @@ class HTMLCacheUpdateJob extends Job {
        /**
         * Construct a job
         * @param $title Title: the title linked to
-        * @param $params Array: job parameters (table, start and end page_ids)
+        * @param array $params job parameters (table, start and end page_ids)
         * @param $id Integer: job id
         */
        function __construct( $title, $params, $id = 0 ) {
@@ -60,9 +60,9 @@ class HTMLCacheUpdateJob extends Job {
 
                parent::__construct( 'htmlCacheUpdate', $title, $params, $id );
 
-               $this->rowsPerJob   = $wgUpdateRowsPerJob;
+               $this->rowsPerJob = $wgUpdateRowsPerJob;
                $this->rowsPerQuery = $wgUpdateRowsPerQuery;
-               $this->blCache      = $title->getBacklinkCache();
+               $this->blCache = $title->getBacklinkCache();
        }
 
        public function run() {
@@ -124,7 +124,7 @@ class HTMLCacheUpdateJob extends Job {
         *
         * @param $titleArray array
         * @param $rootJobParams array
-        * @rerturn void
+        * @return void
         */
        protected function insertJobsFromTitles( $titleArray, $rootJobParams = array() ) {
                // Carry over any "root job" information
index b4ea27d..d282a8e 100644 (file)
@@ -31,7 +31,7 @@
 class NullJob extends Job {
        /**
         * @param $title Title (can be anything)
-        * @param $params Array: job parameters (lives, usleep)
+        * @param array $params job parameters (lives, usleep)
         * @param $id Integer: job id
         */
        function __construct( $title, $params, $id = 0 ) {
index 20e4f16..9dbe827 100644 (file)
@@ -150,7 +150,7 @@ class RefreshLinksJob2 extends Job {
                        $masterPos = false;
                }
 
-               $tbc  = $this->title->getBacklinkCache();
+               $tbc = $this->title->getBacklinkCache();
 
                $jobs = array(); // jobs to insert
                if ( isset( $this->params['start'] ) && isset( $this->params['end'] ) ) {
@@ -192,8 +192,8 @@ class RefreshLinksJob2 extends Job {
         */
        protected function getSingleTitleJobs( $table, $masterPos ) {
                # The "start"/"end" fields are not set for the base jobs
-               $start  = isset( $this->params['start'] ) ? $this->params['start'] : false;
-               $end    = isset( $this->params['end'] ) ? $this->params['end'] : false;
+               $start = isset( $this->params['start'] ) ? $this->params['start'] : false;
+               $end = isset( $this->params['end'] ) ? $this->params['end'] : false;
                $titles = $this->title->getBacklinkCache()->getLinks( $table, $start, $end );
                # Convert into single page refresh links jobs.
                # This handles well when in sapi mode and is useful in any case for job
index e06f68e..8754914 100644 (file)
@@ -148,8 +148,8 @@ class UploadFromUrlJob extends Job {
         * Store a result in the session data. Note that the caller is responsible
         * for appropriate session_start and session_write_close calls.
         *
-        * @param $result String: the result (Success|Warning|Failure)
-        * @param $dataKey String: the key of the extra data
+        * @param string $result the result (Success|Warning|Failure)
+        * @param string $dataKey the key of the extra data
         * @param $dataValue Mixed: the extra data itself
         */
        protected function storeResultInSession( $result, $dataKey, $dataValue ) {
index 75da5c7..216b3a5 100644 (file)
@@ -47,7 +47,7 @@ class FormatJson {
        /**
         * Decodes a JSON string.
         *
-        * @param $value String: the json string being decoded.
+        * @param string $value the json string being decoded.
         * @param $assoc Boolean: when true, returned objects will be converted into associative arrays.
         *
         * @return Mixed: the value encoded in json in appropriate PHP type.
index fe84369..13bb183 100644 (file)
@@ -157,7 +157,7 @@ class Services_JSON
         * provides a slower PHP-only method for installations
         * that lack the multibye string extension.
         *
-        * @param $utf16 String: UTF-16 character
+        * @param string $utf16 UTF-16 character
         * @return String: UTF-8 character
         * @access private
         */
@@ -212,7 +212,7 @@ class Services_JSON
         * provides a slower PHP-only method for installations
         * that lack the multibye string extension.
         *
-        * @param $utf8 String: UTF-8 character
+        * @param string $utf8 UTF-8 character
         * @return String: UTF-16 character
         * @access private
         */
@@ -480,7 +480,7 @@ class Services_JSON
        /**
         * array-walking function for use in generating JSON-formatted name-value pairs
         *
-        * @param $name String: name of key to use
+        * @param string $name name of key to use
         * @param $value Mixed: reference to an array element to be encoded
         *
         * @return String: JSON-formatted name-value pair, like '"name":value'
@@ -500,7 +500,7 @@ class Services_JSON
        /**
         * reduce a string by removing leading and trailing comments and whitespace
         *
-        * @param $str String: string value to strip of comments and whitespace
+        * @param string $str string value to strip of comments and whitespace
         *
         * @return String: string value stripped of comments and whitespace
         * @access private
@@ -527,7 +527,7 @@ class Services_JSON
        /**
         * decodes a JSON string into appropriate variable
         *
-        * @param $str String: JSON-formatted string
+        * @param string $str JSON-formatted string
         *
         * @return mixed number, boolean, string, array, or object
         *                 corresponding to given JSON input string.
index 76c5b6a..fb1e9a4 100644 (file)
@@ -123,7 +123,7 @@ class CSSJanus {
 
        /**
         * Transform an LTR stylesheet to RTL
-        * @param $css String: stylesheet to transform
+        * @param string $css stylesheet to transform
         * @param $swapLtrRtlInURL Boolean: If true, swap 'ltr' and 'rtl' in URLs
         * @param $swapLeftRightInURL Boolean: If true, swap 'left' and 'right' in URLs
         * @return string Transformed stylesheet
@@ -305,8 +305,8 @@ class CSSJanus_Tokenizer {
 
        /**
         * Constructor
-        * @param $regex string Regular expression whose matches to replace by a token.
-        * @param $token string Token
+        * @param string $regex Regular expression whose matches to replace by a token.
+        * @param string $token Token
         */
        public function __construct( $regex, $token ) {
                $this->regex = $regex;
@@ -317,7 +317,7 @@ class CSSJanus_Tokenizer {
        /**
         * Replace all occurrences of $regex in $str with a token and remember
         * the original strings.
-        * @param $str String to tokenize
+        * @param string $str to tokenize
         * @return string Tokenized string
         */
        public function tokenize( $str ) {
@@ -336,7 +336,7 @@ class CSSJanus_Tokenizer {
        /**
         * Replace tokens with their originals. If multiple strings were tokenized, it's important they be
         * detokenized in exactly the SAME ORDER.
-        * @param $str String: previously run through tokenize()
+        * @param string $str previously run through tokenize()
         * @return string Original string
         */
        public function detokenize( $str ) {
index fc75cdc..8b0e287 100644 (file)
@@ -59,8 +59,8 @@ class CSSMin {
        /**
         * Gets a list of local file paths which are referenced in a CSS style sheet
         *
-        * @param $source string CSS data to remap
-        * @param $path string File path where the source was read from (optional)
+        * @param string $source CSS data to remap
+        * @param string $path File path where the source was read from (optional)
         * @return array List of local file references
         */
        public static function getLocalFileReferences( $source, $path = null ) {
@@ -115,10 +115,10 @@ class CSSMin {
         * Remaps CSS URL paths and automatically embeds data URIs for URL rules
         * preceded by an /* @embed * / comment
         *
-        * @param $source string CSS data to remap
-        * @param $local string File path where the source was read from
-        * @param $remote string URL path to the file
-        * @param $embedData bool If false, never do any data URI embedding, even if / * @embed * / is found
+        * @param string $source CSS data to remap
+        * @param string $local File path where the source was read from
+        * @param string $remote URL path to the file
+        * @param bool $embedData If false, never do any data URI embedding, even if / * @embed * / is found
         * @return string Remapped CSS data
         */
        public static function remap( $source, $local, $remote, $embedData = true ) {
@@ -219,7 +219,7 @@ class CSSMin {
        /**
         * Removes whitespace from CSS data
         *
-        * @param $css string CSS data to minify
+        * @param string $css CSS data to minify
         * @return string Minified CSS data
         */
        public static function minify( $css ) {
index ef7587d..d77d8ad 100644 (file)
@@ -191,7 +191,7 @@ abstract class GenericArrayObject extends ArrayObject {
        /**
         * Returns an array holding all the data that should go into serialization calls.
         * This is intended to allow overloading without having to reimplement the
-        * behaviour of this base class.
+        * behavior of this base class.
         *
         * @since 1.20
         *
index fae06ad..7f461a0 100644 (file)
@@ -329,9 +329,9 @@ class IEContentAnalyzer {
         * Get the MIME types from getMimesFromData(), but convert the result from IE's
         * idiosyncratic private types into something other apps will understand.
         *
-        * @param $fileName String: the file name (unused at present)
-        * @param $chunk String: the first 256 bytes of the file
-        * @param $proposed String: the MIME type proposed by the server
+        * @param string $fileName the file name (unused at present)
+        * @param string $chunk the first 256 bytes of the file
+        * @param string $proposed the MIME type proposed by the server
         *
         * @return Array: map of IE version to detected mime type
         */
@@ -367,9 +367,9 @@ class IEContentAnalyzer {
        /**
         * Get the untranslated MIME types for all known versions
         *
-        * @param $fileName String: the file name (unused at present)
-        * @param $chunk String: the first 256 bytes of the file
-        * @param $proposed String: the MIME type proposed by the server
+        * @param string $fileName the file name (unused at present)
+        * @param string $chunk the first 256 bytes of the file
+        * @param string $proposed the MIME type proposed by the server
         *
         * @return Array: map of IE version to detected mime type
         */
index e9cfa99..79387e6 100644 (file)
@@ -55,8 +55,8 @@ class IEUrlExtension {
         *
         * If the a variable is unset in $_SERVER, it should be unset in $vars.
         *
-        * @param $vars array A subset of $_SERVER.
-        * @param $extWhitelist array Extensions which are allowed, assumed harmless.
+        * @param array $vars A subset of $_SERVER.
+        * @param array $extWhitelist Extensions which are allowed, assumed harmless.
         * @return bool
         */
        public static function areServerVarsBad( $vars, $extWhitelist = array() ) {
@@ -92,8 +92,8 @@ class IEUrlExtension {
         * Given a right-hand portion of a URL, determine whether IE would detect
         * a potentially harmful file extension.
         *
-        * @param $urlPart string The right-hand portion of a URL
-        * @param $extWhitelist array An array of file extensions which may occur in this
+        * @param string $urlPart The right-hand portion of a URL
+        * @param array $extWhitelist An array of file extensions which may occur in this
         *    URL, and which should be allowed.
         * @return bool
         */
@@ -187,7 +187,7 @@ class IEUrlExtension {
         * - if we find a possible extension followed by a dot or another illegal
         *   character, we ignore it and continue searching
         *
-        * @param $url string URL
+        * @param string $url URL
         * @return mixed Detected extension (string), or false if none found
         */
        public static function findIE6Extension( $url ) {
@@ -245,7 +245,7 @@ class IEUrlExtension {
         * whether the script filename has been obscured.
         *
         * The function returns false if the server is not known to have this
-        * behaviour. Microsoft IIS in particular is known to decode escaped script
+        * behavior. Microsoft IIS in particular is known to decode escaped script
         * filenames.
         *
         * SERVER_SOFTWARE typically contains either a plain string such as "Zeus",
index db5326c..998805a 100644 (file)
@@ -72,9 +72,9 @@ class JavaScriptMinifier {
         *       literals (e.g. quoted strings) longer than $maxLineLength are encountered
         *       or when required to guard against semicolon insertion.
         *
-        * @param $s String JavaScript code to minify
-        * @param $statementsOnOwnLine Bool Whether to put each statement on its own line
-        * @param $maxLineLength Int Maximum length of a single line, or -1 for no maximum.
+        * @param string $s JavaScript code to minify
+        * @param bool $statementsOnOwnLine Whether to put each statement on its own line
+        * @param int $maxLineLength Maximum length of a single line, or -1 for no maximum.
         * @return String Minified code
         */
        public static function minify( $s, $statementsOnOwnLine = false, $maxLineLength = 1000 ) {
index 44b9edc..bc1988d 100644 (file)
@@ -36,6 +36,8 @@ if [ "$MW_MEM_LIMIT" -gt 0 ]; then
        else
                ulimit -v "$MW_MEM_LIMIT"
        fi
+else
+       MW_CGROUP=""
 fi
 if [ "$MW_FILE_SIZE_LIMIT" -gt 0 ]; then
        ulimit -f "$MW_FILE_SIZE_LIMIT"
index ed9aa5a..0f20ed1 100644 (file)
@@ -367,7 +367,7 @@ class ManualLogEntry extends LogEntryBase {
         *
         * @since 1.19
         *
-        * @param $parameters array Associative array
+        * @param array $parameters Associative array
         */
        public function setParameters( $parameters ) {
                $this->parameters = $parameters;
@@ -468,8 +468,8 @@ class ManualLogEntry extends LogEntryBase {
 
        /**
         * Publishes the log entry.
-        * @param $newId int id of the log entry.
-        * @param $to string: rcandudp (default), rc, udp
+        * @param int $newId id of the log entry.
+        * @param string $to rcandudp (default), rc, udp
         */
        public function publish( $newId, $to = 'rcandudp' ) {
                $log = new LogPage( $this->getType() );
index 47b2231..501af7d 100644 (file)
@@ -42,7 +42,7 @@ class LogEventsList extends ContextSource {
         *
         * @param $context IContextSource Context to use; formerly it was Skin object.
         * @param $unused void Unused; used to be an OutputPage object.
-        * @param $flags int flags; can be a combinaison of self::NO_ACTION_LINK,
+        * @param int $flags flags; can be a combinaison of self::NO_ACTION_LINK,
         *        self::NO_EXTRA_USER_LINKS or self::USE_REVDEL_CHECKBOXES.
         */
        public function __construct( $context, $unused = null, $flags = 0 ) {
@@ -88,7 +88,7 @@ class LogEventsList extends ContextSource {
        /**
         * Show options for the log list
         *
-        * @param $types string or Array
+        * @param string $types or Array
         * @param $user String
         * @param $page String
         * @param $pattern String
@@ -307,7 +307,6 @@ class LogEventsList extends ContextSource {
                $formatter->setContext( $this->getContext() );
                $formatter->setShowUserToolLinks( !( $this->flags & self::NO_EXTRA_USER_LINKS ) );
 
-               $title = $entry->getTarget();
                $time = htmlspecialchars( $this->getLanguage()->userTimeAndDate(
                        $entry->getTimestamp(), $this->getUser() ) );
 
@@ -450,10 +449,10 @@ class LogEventsList extends ContextSource {
         * Show log extract. Either with text and a box (set $msgKey) or without (don't set $msgKey)
         *
         * @param $out OutputPage|String-by-reference
-        * @param $types String|Array Log types to show
-        * @param $page String|Title The page title to show log entries for
-        * @param $user String The user who made the log entries
-        * @param $param array Associative Array with the following additional options:
+        * @param string|array $types Log types to show
+        * @param string|Title $page The page title to show log entries for
+        * @param string $user The user who made the log entries
+        * @param array $param Associative Array with the following additional options:
         * - lim Integer Limit of items to show, default is 50
         * - conds Array Extra conditions for the query (e.g. "log_action != 'revision'")
         * - showIfEmpty boolean Set to false if you don't want any output in case the loglist is empty
index 4d3565d..56209b9 100644 (file)
@@ -402,8 +402,10 @@ class LogFormatter {
 
                // Filter out parameters which are not in format #:foo
                foreach ( $entry->getParameters() as $key => $value ) {
-                       if ( strpos( $key, ':' ) === false ) continue;
-                       list( $index, $type, $name ) = explode( ':', $key, 3 );
+                       if ( strpos( $key, ':' ) === false ) {
+                               continue;
+                       }
+                       list( $index, $type, ) = explode( ':', $key, 3 );
                        $params[$index - 1] = $this->formatParameterValue( $type, $value );
                }
 
@@ -449,7 +451,7 @@ class LogFormatter {
 
        /**
         * Formats parameters values dependent to their type
-        * @param $type string The type of the value.
+        * @param string $type The type of the value.
         *   Valid are currently:
         *     * - (empty) or plain: The value is returned as-is
         *     * raw: The value will be added to the log message
@@ -468,7 +470,7 @@ class LogFormatter {
         *     * title-link: The value is a page title,
         *                   returns link to this page
         *     * number: Format value as number
-        * @param $value string The parameter value that should
+        * @param string $value The parameter value that should
         *                      be formated
         * @return string or Message::numParam or Message::rawParam
         *         Formated value
@@ -523,7 +525,7 @@ class LogFormatter {
         * Helper to make a link to the page, taking the plaintext
         * value in consideration.
         * @param $title Title the page
-        * @param $parameters array query parameters
+        * @param array $parameters query parameters
         * @throws MWException
         * @return String
         */
@@ -915,7 +917,6 @@ class DeleteLogFormatter extends LogFormatter {
                                }
                                $changeText = $this->context->getLanguage()->listToText( $changes );
 
-
                                $newParams = array_slice( $params, 0, 3 );
                                $newParams[3] = $changeText;
                                $count = count( explode( ',', $params[$paramStart] ) );
index 9778f27..4191c57 100644 (file)
@@ -50,16 +50,16 @@ class LogPage {
         */
        var $target;
 
-       /* @acess public */
+       /* @access public */
        var $updateRecentChanges, $sendToUDP;
 
        /**
         * Constructor
         *
-        * @param $type String: one of '', 'block', 'protect', 'rights', 'delete',
+        * @param string $type one of '', 'block', 'protect', 'rights', 'delete',
         *               'upload', 'move'
         * @param $rc Boolean: whether to update recent changes as well as the logging table
-        * @param $udp String: pass 'UDP' to send to the UDP feed if NOT sent to RC
+        * @param string $udp pass 'UDP' to send to the UDP feed if NOT sent to RC
         */
        public function __construct( $type, $rc = true, $udp = 'skipUDP' ) {
                $this->type = $type;
@@ -181,7 +181,7 @@ class LogPage {
        /**
         * Is $type a valid log type
         *
-        * @param $type String: log type to check
+        * @param string $type log type to check
         * @return Boolean
         */
        public static function isLogType( $type ) {
@@ -191,7 +191,7 @@ class LogPage {
        /**
         * Get the name for the given log type
         *
-        * @param $type String: logtype
+        * @param string $type logtype
         * @return String: log name
         * @deprecated in 1.19, warnings in 1.21. Use getName()
         */
@@ -210,7 +210,7 @@ class LogPage {
         * Get the log header for the given log type
         *
         * @todo handle missing log types
-        * @param $type String: logtype
+        * @param string $type logtype
         * @return String: headertext of this logtype
         * @deprecated in 1.19, warnings in 1.21. Use getDescription()
         */
@@ -223,12 +223,12 @@ class LogPage {
         * Generate text for a log entry.
         * Only LogFormatter should call this function.
         *
-        * @param $type String: log type
-        * @param $action String: log action
+        * @param string $type log type
+        * @param string $action log action
         * @param $title Mixed: Title object or null
         * @param $skin Mixed: Skin object or null. If null, we want to use the wiki
         *              content language, since that will go to the IRC feed.
-        * @param $params Array: parameters
+        * @param array $params parameters
         * @param $filterWikilinks Boolean: whether to filter wiki links
         * @return HTML string
         */
@@ -402,10 +402,10 @@ class LogPage {
        /**
         * Add a log entry
         *
-        * @param $action String: one of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'move_redir'
+        * @param string $action one of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'move_redir'
         * @param $target Title object
-        * @param $comment String: description associated
-        * @param $params Array: parameters passed later to wfMessage function
+        * @param string $comment description associated
+        * @param array $params parameters passed later to wfMessage function
         * @param $doer User object: the user doing the action
         *
         * @return int log_id of the inserted log entry
@@ -513,7 +513,7 @@ class LogPage {
         * Convert a comma-delimited list of block log flags
         * into a more readable (and translated) form
         *
-        * @param $flags string Flags to format
+        * @param string $flags Flags to format
         * @param $lang Language object to use
         * @return String
         */
@@ -534,7 +534,7 @@ class LogPage {
        /**
         * Translate a block log flag if possible
         *
-        * @param $flag int Flag to translate
+        * @param int $flag Flag to translate
         * @param $lang Language object to use
         * @return String
         */
@@ -562,7 +562,6 @@ class LogPage {
                return $messages[$flag];
        }
 
-
        /**
         * Name of the log.
         * @return Message
index fad1058..908755e 100644 (file)
@@ -35,14 +35,14 @@ class LogPager extends ReverseChronologicalPager {
         * Constructor
         *
         * @param $list LogEventsList
-        * @param $types String or Array: log types to show
-        * @param $performer String: the user who made the log entries
-        * @param $title String|Title: the page title the log entries are for
-        * @param $pattern String: do a prefix search rather than an exact title match
-        * @param $conds Array: extra conditions for the query
+        * @param string $types or Array: log types to show
+        * @param string $performer the user who made the log entries
+        * @param string|Title $title the page title the log entries are for
+        * @param string $pattern do a prefix search rather than an exact title match
+        * @param array $conds extra conditions for the query
         * @param $year Integer: the year to start from
         * @param $month Integer: the month to start from
-        * @param $tagFilter String: tag
+        * @param string $tagFilter tag
         */
        public function __construct( $list, $types = array(), $performer = '', $title = '', $pattern = '',
                $conds = array(), $year = false, $month = false, $tagFilter = '' ) {
@@ -90,7 +90,7 @@ class LogPager extends ReverseChronologicalPager {
         * Set the log reader to return only entries of the given type.
         * Type restrictions enforced here
         *
-        * @param $types String or array: Log types ('upload', 'delete', etc);
+        * @param string $types or array: Log types ('upload', 'delete', etc);
         *   empty string means no restriction
         */
        private function limitType( $types ) {
@@ -132,7 +132,7 @@ class LogPager extends ReverseChronologicalPager {
        /**
         * Set the log reader to return only entries by the given user.
         *
-        * @param $name String: (In)valid user name
+        * @param string $name (In)valid user name
         * @return bool
         */
        private function limitPerformer( $name ) {
@@ -167,7 +167,7 @@ class LogPager extends ReverseChronologicalPager {
         * Set the log reader to return only entries affecting the given page.
         * (For the block and rights logs, this is a user page.)
         *
-        * @param $page String or Title object: Title name
+        * @param string $page or Title object: Title name
         * @param $pattern String
         * @return bool
         */
index ca9b636..e2dc68b 100644 (file)
@@ -29,7 +29,7 @@
 class BitmapHandler extends ImageHandler {
        /**
         * @param $image File
-        * @param $params array Transform parameters. Entries with the keys 'width'
+        * @param array $params Transform parameters. Entries with the keys 'width'
         * and 'height' are the respective screen width and height, while the keys
         * 'physicalWidth' and 'physicalHeight' indicate the thumbnail dimensions.
         * @return bool
@@ -75,7 +75,6 @@ class BitmapHandler extends ImageHandler {
                return true;
        }
 
-
        /**
         * Extracts the width/height if the image will be scaled before rotating
         *
@@ -84,8 +83,8 @@ class BitmapHandler extends ImageHandler {
         * stored as raw landscape with 90-degress rotation, the resulting size
         * will be wider than it is tall.
         *
-        * @param $params array Parameters as returned by normaliseParams
-        * @param $rotation int The rotation angle that will be applied
+        * @param array $params Parameters as returned by normaliseParams
+        * @param int $rotation The rotation angle that will be applied
         * @return array ($width, $height) array
         */
        public function extractPreRotationDimensions( $params, $rotation ) {
@@ -100,7 +99,6 @@ class BitmapHandler extends ImageHandler {
                return array( $width, $height );
        }
 
-
        /**
         * Function that returns the number of pixels to be thumbnailed.
         * Intended for animated GIFs to multiply by the number of frames.
@@ -158,7 +156,6 @@ class BitmapHandler extends ImageHandler {
                        return $this->getClientScalingThumbnailImage( $image, $scalerParams );
                }
 
-
                if ( $scaler == 'client' ) {
                        # Client-side image scaling, use the source URL
                        # Using the destination URL in a TRANSFORM_LATER request would be incorrect
@@ -264,7 +261,7 @@ class BitmapHandler extends ImageHandler {
         * client side
         *
         * @param $image File File associated with this thumbnail
-        * @param $scalerParams array Array with scaler params
+        * @param array $scalerParams Array with scaler params
         * @return ThumbnailImage
         *
         * @todo fixme: no rotation support
@@ -281,7 +278,7 @@ class BitmapHandler extends ImageHandler {
         * Transform an image using ImageMagick
         *
         * @param $image File File associated with this thumbnail
-        * @param $params array Array with scaler params
+        * @param array $params Array with scaler params
         *
         * @return MediaTransformError Error object if error occurred, false (=no error) otherwise
         */
@@ -341,7 +338,7 @@ class BitmapHandler extends ImageHandler {
                $rotation = $this->getRotation( $image );
                list( $width, $height ) = $this->extractPreRotationDimensions( $params, $rotation );
 
-               $cmd  =
+               $cmd =
                        wfEscapeShellArg( $wgImageMagickConvertCommand ) .
                        // Specify white background color, will be used for transparent images
                        // in Internet Explorer/Windows instead of default black.
@@ -380,7 +377,7 @@ class BitmapHandler extends ImageHandler {
         * Transform an image using the Imagick PHP extension
         *
         * @param $image File File associated with this thumbnail
-        * @param $params array Array with scaler params
+        * @param array $params Array with scaler params
         *
         * @return MediaTransformError Error object if error occurred, false (=no error) otherwise
         */
@@ -457,7 +454,7 @@ class BitmapHandler extends ImageHandler {
         * Transform an image using a custom command
         *
         * @param $image File File associated with this thumbnail
-        * @param $params array Array with scaler params
+        * @param array $params Array with scaler params
         *
         * @return MediaTransformError Error object if error occurred, false (=no error) otherwise
         */
@@ -500,8 +497,8 @@ class BitmapHandler extends ImageHandler {
        /**
         * Get a MediaTransformError with error 'thumbnail_error'
         *
-        * @param $params array Parameter array as passed to the transform* functions
-        * @param $errMsg string Error message
+        * @param array $params Parameter array as passed to the transform* functions
+        * @param string $errMsg Error message
         * @return MediaTransformError
         */
        public function getMediaTransformError( $params, $errMsg ) {
@@ -513,7 +510,7 @@ class BitmapHandler extends ImageHandler {
         * Transform an image using the built in GD library
         *
         * @param $image File File associated with this thumbnail
-        * @param $params array Array with scaler params
+        * @param array $params Array with scaler params
         *
         * @return MediaTransformError Error object if error occurred, false (=no error) otherwise
         */
@@ -622,7 +619,7 @@ class BitmapHandler extends ImageHandler {
         * in a directory, so we're better off escaping and waiting for the bugfix
         * to filter down to users.
         *
-        * @param $path string The file path
+        * @param string $path The file path
         * @param bool|string $scene The scene specification, or false if there is none
         * @throws MWException
         * @return string
@@ -654,7 +651,7 @@ class BitmapHandler extends ImageHandler {
         * Armour a string against ImageMagick's GetPathComponent(). This is a
         * helper function for escapeMagickInput() and escapeMagickOutput().
         *
-        * @param $path string The file path
+        * @param string $path The file path
         * @param bool|string $scene The scene specification, or false if there is none
         * @throws MWException
         * @return string
@@ -758,6 +755,55 @@ class BitmapHandler extends ImageHandler {
                }
        }
 
+       /**
+        * @param $file File
+        * @param array $params Rotate parameters.
+        *      'rotation' clockwise rotation in degrees, allowed are multiples of 90
+        * @since 1.21
+        * @return bool
+        */
+       public function rotate( $file, $params ) {
+               global $wgImageMagickConvertCommand;
+
+               $rotation = ( $params[ 'rotation' ] + $this->getRotation( $file ) ) % 360;
+               $scene = false;
+
+               $scaler = self::getScalerType( null, false );
+               switch ( $scaler ) {
+                       case 'im':
+                               $cmd = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " .
+                                       wfEscapeShellArg( $this->escapeMagickInput( $params[ 'srcPath' ], $scene ) ) .
+                                       " -rotate -$rotation " .
+                                       wfEscapeShellArg( $this->escapeMagickOutput( $params[ 'dstPath' ] ) ) . " 2>&1";
+                               wfDebug( __METHOD__ . ": running ImageMagick: $cmd\n" );
+                               wfProfileIn( 'convert' );
+                               $retval = 0;
+                               $err = wfShellExec( $cmd, $retval, $env );
+                               wfProfileOut( 'convert' );
+                               if ( $retval !== 0 ) {
+                                       $this->logErrorForExternalProcess( $retval, $err, $cmd );
+                                       return new MediaTransformError( 'thumbnail_error', 0, 0, $err );
+                               }
+                               return false;
+                       case 'imext':
+                               $im = new Imagick();
+                               $im->readImage( $params['srcPath'] );
+                               if ( !$im->rotateImage( new ImagickPixel( 'white' ), 360 - $rotation ) ) {
+                                       return new MediaTransformError( 'thumbnail_error', 0, 0,
+                                               "Error rotating $rotation degrees" );
+                               }
+                               $result = $im->writeImage( $params['dstPath'] );
+                               if ( !$result ) {
+                                       return new MediaTransformError( 'thumbnail_error', 0, 0,
+                                               "Unable to write image to {$params['dstPath']}" );
+                               }
+                               return false;
+                       default:
+                               return new MediaTransformError( 'thumbnail_error', 0, 0,
+                                       "$scaler rotation not implemented" );
+               }
+       }
+
        /**
         * Rerurns whether the file needs to be rendered. Returns true if the
         * file requires rotation and we are able to rotate it.
index 55deef0..345e786 100644 (file)
@@ -47,13 +47,13 @@ class BitmapMetadataHandler {
        private $iptcType = 'iptc-no-hash';
 
        /**
-       * This does the photoshop image resource app13 block
-       * of interest, IPTC-IIM metadata is stored here.
-       *
-       * Mostly just calls doPSIR and doIPTC
-       *
-       * @param String $app13 String containing app13 block from jpeg file
-       */
+        * This does the photoshop image resource app13 block
+        * of interest, IPTC-IIM metadata is stored here.
+        *
+        * Mostly just calls doPSIR and doIPTC
+        *
+        * @param string $app13 String containing app13 block from jpeg file
+        */
        private function doApp13 ( $app13 ) {
                try {
                        $this->iptcType = JpegMetadataExtractor::doPSIR( $app13 );
@@ -69,7 +69,6 @@ class BitmapMetadataHandler {
                $this->addMetadata( $iptc, $this->iptcType );
        }
 
-
        /**
         * Get exif info using exif class.
         * Basically what used to be in BitmapHandler::getMetadata().
@@ -91,11 +90,11 @@ class BitmapMetadataHandler {
                }
        }
        /** Add misc metadata. Warning: atm if the metadata category
-       * doesn't have a priority, it will be silently discarded.
-       *
-       * @param Array $metaArray array of metadata values
-       * @param string $type type. defaults to other. if two things have the same type they're merged
-       */
+        * doesn't have a priority, it will be silently discarded.
+        *
+        * @param array $metaArray array of metadata values
+        * @param string $type type. defaults to other. if two things have the same type they're merged
+        */
        function addMetadata ( $metaArray, $type = 'other' ) {
                if ( isset( $this->metadata[$type] ) ) {
                        /* merge with old data */
@@ -106,14 +105,14 @@ class BitmapMetadataHandler {
        }
 
        /**
-       * Merge together the various types of metadata
-       * the different types have different priorites,
-       * and are merged in order.
-       *
-       * This function is generally called by the media handlers' getMetadata()
-       *
-       * @return Array metadata array
-       */
+        * Merge together the various types of metadata
+        * the different types have different priorites,
+        * and are merged in order.
+        *
+        * This function is generally called by the media handlers' getMetadata()
+        *
+        * @return Array metadata array
+        */
        function getMetadataArray () {
                // this seems a bit ugly... This is all so its merged in right order
                // based on the MWG recomendation.
@@ -144,7 +143,7 @@ class BitmapMetadataHandler {
 
        /** Main entry point for jpeg's.
         *
-        * @param $filename string filename (with full path)
+        * @param string $filename filename (with full path)
         * @return array metadata result array.
         * @throws MWException on invalid file.
         */
@@ -187,7 +186,7 @@ class BitmapMetadataHandler {
         * merge the png various tEXt chunks to that
         * are interesting, but for now it only does XMP
         *
-        * @param $filename String full path to file
+        * @param string $filename full path to file
         * @return Array Array for storage in img_metadata.
         */
        public static function PNG ( $filename ) {
@@ -216,7 +215,7 @@ class BitmapMetadataHandler {
         * They don't really have native metadata, so just merges together
         * XMP and image comment.
         *
-        * @param $filename string full path to file
+        * @param string $filename full path to file
         * @return Array metadata array
         */
        public static function GIF ( $filename ) {
@@ -282,7 +281,7 @@ class BitmapMetadataHandler {
         * Read the first 2 bytes of a tiff file to figure out
         * Little Endian or Big Endian. Needed for exif stuff.
         *
-        * @param $filename String The filename
+        * @param string $filename The filename
         * @return String 'BE' or 'LE' or false
         */
        static function getTiffByteOrder( $filename ) {
@@ -301,6 +300,4 @@ class BitmapMetadataHandler {
 
                }
        }
-
-
 }
index 9735791..4698966 100644 (file)
@@ -57,7 +57,6 @@ class DjVuImage {
                return $info !== false;
        }
 
-
        /**
         * Return data in the style of getimagesize()
         * @return array or false on failure
@@ -66,7 +65,7 @@ class DjVuImage {
                $data = $this->getInfo();
 
                if( $data !== false ) {
-                       $width  = $data['width'];
+                       $width = $data['width'];
                        $height = $data['height'];
 
                        return array( $width, $height, 'DjVu',
index 2dc2eae..c50b2f0 100644 (file)
  */
 class Exif {
 
-       const BYTE      = 1;    //!< An 8-bit (1-byte) unsigned integer.
-       const ASCII     = 2;    //!< An 8-bit byte containing one 7-bit ASCII code. The final byte is terminated with NULL.
-       const SHORT     = 3;    //!< A 16-bit (2-byte) unsigned integer.
-       const LONG      = 4;    //!< A 32-bit (4-byte) unsigned integer.
-       const RATIONAL  = 5;    //!< Two LONGs. The first LONG is the numerator and the second LONG expresses the denominator
-       const UNDEFINED = 7;    //!< An 8-bit byte that can take any value depending on the field definition
-       const SLONG     = 9;    //!< A 32-bit (4-byte) signed integer (2's complement notation),
-       const SRATIONAL = 10;   //!< Two SLONGs. The first SLONG is the numerator and the second SLONG is the denominator.
-       const IGNORE    = -1;   // A fake value for things we don't want or don't support.
+       const BYTE = 1; //!< An 8-bit (1-byte) unsigned integer.
+       const ASCII = 2; //!< An 8-bit byte containing one 7-bit ASCII code. The final byte is terminated with NULL.
+       const SHORT = 3; //!< A 16-bit (2-byte) unsigned integer.
+       const LONG = 4; //!< A 32-bit (4-byte) unsigned integer.
+       const RATIONAL = 5; //!< Two LONGs. The first LONG is the numerator and the second LONG expresses the denominator
+       const UNDEFINED = 7; //!< An 8-bit byte that can take any value depending on the field definition
+       const SLONG = 9; //!< A 32-bit (4-byte) signed integer (2's complement notation),
+       const SRATIONAL = 10; //!< Two SLONGs. The first SLONG is the numerator and the second SLONG is the denominator.
+       const IGNORE = -1; // A fake value for things we don't want or don't support.
 
        //@{
        /* @var array
@@ -102,8 +102,8 @@ class Exif {
        /**
         * Constructor
         *
-        * @param $file String: filename.
-        * @param $byteOrder String Type of byte ordering either 'BE' (Big Endian) or 'LE' (Little Endian). Default ''.
+        * @param string $file filename.
+        * @param string $byteOrder Type of byte ordering either 'BE' (Big Endian) or 'LE' (Little Endian). Default ''.
         * @throws MWException
         * @todo FIXME: The following are broke:
         * SubjectArea. Need to test the more obscure tags.
@@ -346,23 +346,23 @@ class Exif {
        }
 
        /**
-       * Collapse some fields together.
-       * This converts some fields from exif form, to a more friendly form.
-       * For example GPS latitude to a single number.
-       *
-       * The rationale behind this is that we're storing data, not presenting to the user
-       * For example a longitude is a single number describing how far away you are from
-       * the prime meridian. Well it might be nice to split it up into minutes and seconds
-       * for the user, it doesn't really make sense to split a single number into 4 parts
-       * for storage. (degrees, minutes, second, direction vs single floating point number).
-       *
-       * Other things this might do (not really sure if they make sense or not):
-       * Dates -> mediawiki date format.
-       * convert values that can be in different units to be in one standardized unit.
-       *
-       * As an alternative approach, some of this could be done in the validate phase
-       * if we make up our own types like Exif::DATE.
-       */
+        * Collapse some fields together.
+        * This converts some fields from exif form, to a more friendly form.
+        * For example GPS latitude to a single number.
+        *
+        * The rationale behind this is that we're storing data, not presenting to the user
+        * For example a longitude is a single number describing how far away you are from
+        * the prime meridian. Well it might be nice to split it up into minutes and seconds
+        * for the user, it doesn't really make sense to split a single number into 4 parts
+        * for storage. (degrees, minutes, second, direction vs single floating point number).
+        *
+        * Other things this might do (not really sure if they make sense or not):
+        * Dates -> mediawiki date format.
+        * convert values that can be in different units to be in one standardized unit.
+        *
+        * As an alternative approach, some of this could be done in the validate phase
+        * if we make up our own types like Exif::DATE.
+        */
        function collapseData( ) {
 
                $this->exifGPStoNumber( 'GPSLatitude' );
@@ -434,11 +434,11 @@ class Exif {
 
        }
        /**
-       * Do userComment tags and similar. See pg. 34 of exif standard.
-       * basically first 8 bytes is charset, rest is value.
-       * This has not been tested on any shift-JIS strings.
-       * @param $prop String prop name.
-       */
+        * Do userComment tags and similar. See pg. 34 of exif standard.
+        * basically first 8 bytes is charset, rest is value.
+        * This has not been tested on any shift-JIS strings.
+        * @param string $prop prop name.
+        */
        private function charCodeString ( $prop ) {
                if ( isset( $this->mFilteredExifData[$prop] ) ) {
 
@@ -495,21 +495,21 @@ class Exif {
                }
        }
        /**
-       * Convert an Exif::UNDEFINED from a raw binary string
-       * to its value. This is sometimes needed depending on
-       * the type of UNDEFINED field
-       * @param $prop String name of property
-       */
+        * Convert an Exif::UNDEFINED from a raw binary string
+        * to its value. This is sometimes needed depending on
+        * the type of UNDEFINED field
+        * @param string $prop name of property
+        */
        private function exifPropToOrd ( $prop ) {
                if ( isset( $this->mFilteredExifData[$prop] ) ) {
                        $this->mFilteredExifData[$prop] = ord( $this->mFilteredExifData[$prop] );
                }
        }
        /**
-       * Convert gps in exif form to a single floating point number
-       * for example 10 degress 20`40`` S -> -10.34444
-       * @param String $prop a gps coordinate exif tag name (like GPSLongitude)
-       */
+        * Convert gps in exif form to a single floating point number
+        * for example 10 degress 20`40`` S -> -10.34444
+        * @param string $prop a gps coordinate exif tag name (like GPSLongitude)
+        */
        private function exifGPStoNumber ( $prop ) {
                $loc =& $this->mFilteredExifData[$prop];
                $dir =& $this->mFilteredExifData[$prop . 'Ref'];
@@ -727,8 +727,8 @@ class Exif {
         * Validates if a tag has a legal value according to the Exif spec
         *
         * @private
-        * @param $section String: section where tag is located.
-        * @param $tag String: the tag to check.
+        * @param string $section section where tag is located.
+        * @param string $tag the tag to check.
         * @param $val Mixed: the value of the tag.
         * @param $recursive Boolean: true if called recursively for array types.
         * @return bool
@@ -828,7 +828,7 @@ class Exif {
         *
         * @private
         *
-        * @param $fname String: the name of the function calling this function
+        * @param string $fname the name of the function calling this function
         * @param $io Boolean: Specify whether we're beginning or ending
         */
        private function debugFile( $fname, $io ) {
index 97aa28b..f22a5a0 100644 (file)
@@ -25,7 +25,6 @@
  * @file
  */
 
-
 /**
  * Format Image metadata values into a human readable form.
  *
@@ -53,7 +52,7 @@ class FormatMetadata {
         * value which most of the time are plain integers. This function
         * formats Exif (and other metadata) values into human readable form.
         *
-        * @param $tags Array: the Exif data to format ( as returned by
+        * @param array $tags the Exif data to format ( as returned by
         *                    Exif::getFilteredData() or BitmapMetadataHandler )
         * @return array
         */
@@ -526,7 +525,6 @@ class FormatMetadata {
                                        }
                                        break;
 
-
                                case 'GPSTrackRef':
                                case 'GPSImgDirectionRef':
                                case 'GPSDestBearingRef':
@@ -829,20 +827,20 @@ class FormatMetadata {
        }
 
        /**
-       * A function to collapse multivalued tags into a single value.
-       * This turns an array of (for example) authors into a bulleted list.
-       *
-       * This is public on the basis it might be useful outside of this class.
-       *
-       * @param $vals Array array of values
-       * @param $type String Type of array (either lang, ul, ol).
-       * lang = language assoc array with keys being the lang code
-       * ul = unordered list, ol = ordered list
-       * type can also come from the '_type' member of $vals.
-       * @param $noHtml Boolean If to avoid returning anything resembling
-       * html. (Ugly hack for backwards compatibility with old mediawiki).
-       * @return String single value (in wiki-syntax).
-       */
+        * A function to collapse multivalued tags into a single value.
+        * This turns an array of (for example) authors into a bulleted list.
+        *
+        * This is public on the basis it might be useful outside of this class.
+        *
+        * @param array $vals array of values
+        * @param string $type Type of array (either lang, ul, ol).
+        * lang = language assoc array with keys being the lang code
+        * ul = unordered list, ol = ordered list
+        * type can also come from the '_type' member of $vals.
+        * @param $noHtml Boolean If to avoid returning anything resembling
+        * html. (Ugly hack for backwards compatibility with old mediawiki).
+        * @return String single value (in wiki-syntax).
+        */
        public static function flattenArray( $vals, $type = 'ul', $noHtml = false ) {
                if ( isset( $vals['_type'] ) ) {
                        $type = $vals['_type'];
@@ -941,8 +939,8 @@ class FormatMetadata {
 
        /** Helper function for creating lists of translations.
         *
-        * @param $value String value (this is not escaped)
-        * @param $lang String lang code of item or false
+        * @param string $value value (this is not escaped)
+        * @param string $lang lang code of item or false
         * @param $default Boolean if it is default value.
         * @param $noHtml Boolean If to avoid html (for back-compat)
         * @throws MWException
@@ -1008,10 +1006,10 @@ class FormatMetadata {
         *
         * @private
         *
-        * @param $tag String: the tag name to pass on
-        * @param $val String: the value of the tag
-        * @param $arg String: an argument to pass ($1)
-        * @param $arg2 String: a 2nd argument to pass ($2)
+        * @param string $tag the tag name to pass on
+        * @param string $val the value of the tag
+        * @param string $arg an argument to pass ($1)
+        * @param string $arg2 a 2nd argument to pass ($2)
         * @return string A wfMessage of "exif-$tag-$val" in lower case
         */
        static function msg( $tag, $val, $arg = null, $arg2 = null ) {
@@ -1117,7 +1115,7 @@ class FormatMetadata {
         * Note, leading 0's are significant, so this is
         * a string, not an int.
         *
-        * @param $val String: The 8 digit news code.
+        * @param string $val The 8 digit news code.
         * @return string The human readable form
         */
        private static function convertNewsCode( $val ) {
@@ -1190,8 +1188,8 @@ class FormatMetadata {
         * Format a coordinate value, convert numbers from floating point
         * into degree minute second representation.
         *
-        * @param $coord int degrees, minutes and seconds
-        * @param $type String: latitude or longitude (for if its a NWS or E)
+        * @param int $coord degrees, minutes and seconds
+        * @param string $type latitude or longitude (for if its a NWS or E)
         * @return mixed A floating point number or whatever we were fed
         */
        static function formatCoords( $coord, $type ) {
@@ -1226,7 +1224,7 @@ class FormatMetadata {
        /**
         * Format the contact info field into a single value.
         *
-        * @param $vals Array array with fields of the ContactInfo
+        * @param array $vals array with fields of the ContactInfo
         *    struct defined in the IPTC4XMP spec. Or potentially
         *    an array with one element that is a free form text
         *    value from the older iptc iim 1:118 prop.
@@ -1353,7 +1351,7 @@ class FormatMetadata {
  *
  * @deprecated since 1.18
  *
-**/
+ */
 class FormatExif {
        var $meta;
 
index 8b44585..6a4e753 100644 (file)
@@ -251,7 +251,7 @@ class GIFMetadataExtractor {
         */
        static function readGCT( $fh, $bpp ) {
                if ( $bpp > 0 ) {
-                       for( $i=1; $i<=pow( 2, $bpp ); ++$i ) {
+                       for( $i = 1; $i <= pow( 2, $bpp ); ++$i ) {
                                fread( $fh, 3 );
                        }
                }
index 06cbc3b..4191cde 100644 (file)
 class IPTC {
 
        /**
-       * This takes the results of iptcparse() and puts it into a
-       * form that can be handled by mediawiki. Generally called from
-       * BitmapMetadataHandler::doApp13.
-       *
-       * @see http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf
-       *
-       * @param $rawData String app13 block from jpeg containing iptc/iim data
-       * @return Array iptc metadata array
-       */
+        * This takes the results of iptcparse() and puts it into a
+        * form that can be handled by mediawiki. Generally called from
+        * BitmapMetadataHandler::doApp13.
+        *
+        * @see http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf
+        *
+        * @param string $rawData app13 block from jpeg containing iptc/iim data
+        * @return Array iptc metadata array
+        */
        static function parse( $rawData ) {
                $parsed = iptcparse( $rawData );
                $data = Array();
@@ -198,7 +198,7 @@ class IPTC {
                                        /* original transmission ref.
                                         * "A code representing the location of original transmission ac-
                                         * cording to practises of the provider."
-                                       */
+                                        */
                                        $data['OriginalTransmissionRef'] = self::convIPTC( $val, $c );
                                        break;
                                case '2#118': /*contact*/
@@ -350,14 +350,14 @@ class IPTC {
        }
 
        /**
-       * Convert an iptc date and time tags into the exif format
-       *
-       * @todo Potentially this should also capture the timezone offset.
-       * @param Array $date The date tag
-       * @param Array $time The time tag
-       * @param $c
-       * @return String Date in exif format.
-       */
+        * Convert an iptc date and time tags into the exif format
+        *
+        * @todo Potentially this should also capture the timezone offset.
+        * @param array $date The date tag
+        * @param array $time The time tag
+        * @param $c
+        * @return String Date in exif format.
+        */
        private static function timeHelper( $date, $time, $c ) {
                if ( count( $date ) === 1 ) {
                        //the standard says this should always be 1
@@ -417,12 +417,12 @@ class IPTC {
        }
 
        /**
-       * Helper function to convert charset for iptc values.
-       * @param $data string|array The iptc string
-       * @param $charset String: The charset
+        * Helper function to convert charset for iptc values.
+        * @param string|array $data The iptc string
+        * @param string $charset The charset
         *
         * @return string|array
-       */
+        */
        private static function convIPTC ( $data, $charset ) {
                if ( is_array( $data ) ) {
                        foreach ( $data as &$val ) {
@@ -435,12 +435,12 @@ class IPTC {
                return $data;
        }
        /**
-       * Helper function of a helper function to convert charset for iptc values.
-       * @param $data Mixed String or Array: The iptc string
-       * @param $charset String: The charset
-       *
-       * @return string
-       */
+        * Helper function of a helper function to convert charset for iptc values.
+        * @param $data Mixed String or Array: The iptc string
+        * @param string $charset The charset
+        *
+        * @return string
+        */
        private static function convIPTCHelper ( $data, $charset ) {
                if ( $charset ) {
                        wfSuppressWarnings();
@@ -465,13 +465,13 @@ class IPTC {
        }
 
        /**
-       * take the value of 1:90 tag and returns a charset
-       * @param String $tag 1:90 tag.
-       * @return string charset name or "?"
-       * Warning, this function does not (and is not intended to) detect
-       * all iso 2022 escape codes. In practise, the code for utf-8 is the
-       * only code that seems to have wide use. It does detect that code.
-       */
+        * take the value of 1:90 tag and returns a charset
+        * @param string $tag 1:90 tag.
+        * @return string charset name or "?"
+        * Warning, this function does not (and is not intended to) detect
+        * all iso 2022 escape codes. In practise, the code for utf-8 is the
+        * only code that seems to have wide use. It does detect that code.
+        */
        static function getCharset( $tag ) {
 
                //According to iim standard, charset is defined by the tag 1:90.
@@ -530,7 +530,7 @@ class IPTC {
                        case "\x1b(K":
                                $c = "ISO646-DE";
                                break;
-                       case "\x1b(N":  //crylic
+                       case "\x1b(N": //crylic
                                $c = "ISO_5427";
                                break;
                        case "\x1b(`": //iso646-NO
index 472372c..419afee 100644 (file)
@@ -139,7 +139,6 @@ abstract class ImageHandler extends MediaHandler {
                        $params['height'] = $params['physicalHeight'];
                }
 
-
                if ( !$this->validateThumbParams( $params['physicalWidth'],
                                $params['physicalHeight'], $srcWidth, $srcHeight, $mimeType ) ) {
                        return false;
index 5ea30f2..8b5d651 100644 (file)
@@ -59,4 +59,36 @@ class JpegHandler extends ExifBitmapHandler {
                }
        }
 
+       /**
+        * @param $file File
+        * @param array $params Rotate parameters.
+        *      'rotation' clockwise rotation in degrees, allowed are multiples of 90
+        * @since 1.21
+        * @return bool
+        */
+       public function rotate( $file, $params ) {
+               global $wgJpegTran;
+
+               $rotation = ( $params[ 'rotation' ] + $this->getRotation( $file ) ) % 360;
+
+               if( $wgJpegTran && is_file( $wgJpegTran ) ){
+                       $cmd = wfEscapeShellArg( $wgJpegTran ) .
+                               " -rotate " . wfEscapeShellArg( $rotation ) .
+                               " -outfile " . wfEscapeShellArg( $params[ 'dstPath' ] ) .
+                               " " . wfEscapeShellArg( $params[ 'srcPath' ] ) .  " 2>&1";
+                               wfDebug( __METHOD__ . ": running jpgtran: $cmd\n" );
+                               wfProfileIn( 'jpegtran' );
+                               $retval = 0;
+                               $err = wfShellExec( $cmd, $retval, $env );
+                               wfProfileOut( 'jpegtran' );
+                       if ( $retval !== 0 ) {
+                               $this->logErrorForExternalProcess( $retval, $err, $cmd );
+                               return new MediaTransformError( 'thumbnail_error', 0, 0, $err );
+                       }
+                       return false;
+               } else {
+                       return parent::rotate( $file, $params );
+               }
+       }
+
 }
index 60fd2a0..b0682d3 100644 (file)
@@ -37,16 +37,16 @@ class JpegMetadataExtractor {
        // that many segments. Your average file has about 10.
 
        /** Function to extract metadata segments of interest from jpeg files
-       * based on GIFMetadataExtractor.
-       *
-       * we can almost use getimagesize to do this
-       * but gis doesn't support having multiple app1 segments
-       * and those can't extract xmp on files containing both exif and xmp data
-       *
-       * @param String $filename name of jpeg file
-       * @return Array of interesting segments.
-       * @throws MWException if given invalid file.
-       */
+        * based on GIFMetadataExtractor.
+        *
+        * we can almost use getimagesize to do this
+        * but gis doesn't support having multiple app1 segments
+        * and those can't extract xmp on files containing both exif and xmp data
+        *
+        * @param string $filename name of jpeg file
+        * @return Array of interesting segments.
+        * @throws MWException if given invalid file.
+        */
        static function segmentSplitter ( $filename ) {
                $showXMP = function_exists( 'xml_parser_create_ns' );
 
@@ -183,18 +183,18 @@ class JpegMetadataExtractor {
        }
 
        /**
-       * This reads the photoshop image resource.
-       * Currently it only compares the iptc/iim hash
-       * with the stored hash, which is used to determine the precedence
-       * of the iptc data. In future it may extract some other info, like
-       * url of copyright license.
-       *
-       * This should generally be called by BitmapMetadataHandler::doApp13()
-       *
-       * @param String $app13 photoshop psir app13 block from jpg.
-       * @throws MWException (It gets caught next level up though)
-       * @return String if the iptc hash is good or not.
-       */
+        * This reads the photoshop image resource.
+        * Currently it only compares the iptc/iim hash
+        * with the stored hash, which is used to determine the precedence
+        * of the iptc data. In future it may extract some other info, like
+        * url of copyright license.
+        *
+        * This should generally be called by BitmapMetadataHandler::doApp13()
+        *
+        * @param string $app13 photoshop psir app13 block from jpg.
+        * @throws MWException (It gets caught next level up though)
+        * @return String if the iptc hash is good or not.
+        */
        public static function doPSIR ( $app13 ) {
                if ( !$app13 ) {
                        throw new MWException( "No App13 segment given" );
index 46993e7..9a3f645 100644 (file)
@@ -103,7 +103,7 @@ abstract class MediaHandler {
         * can't be determined.
         *
         * @param $image File: the image object, or false if there isn't one
-        * @param $path String: the filename
+        * @param string $path the filename
         * @return Array Follow the format of PHP getimagesize() internal function. See http://www.php.net/getimagesize
         */
        abstract function getImageSize( $image, $path );
@@ -113,26 +113,26 @@ abstract class MediaHandler {
         *
         * @param $image File: the image object, or false if there isn't one.
         *   Warning, FSFile::getPropsFromPath might pass an (object)array() instead (!)
-        * @param $path String: the filename
+        * @param string $path the filename
         * @return String
         */
        function getMetadata( $image, $path ) { return ''; }
 
        /**
-       * Get metadata version.
-       *
-       * This is not used for validating metadata, this is used for the api when returning
-       * metadata, since api content formats should stay the same over time, and so things
-       * using ForiegnApiRepo can keep backwards compatibility
-       *
-       * All core media handlers share a common version number, and extensions can
-       * use the GetMetadataVersion hook to append to the array (they should append a unique
-       * string so not to get confusing). If there was a media handler named 'foo' with metadata
-       * version 3 it might add to the end of the array the element 'foo=3'. if the core metadata
-       * version is 2, the end version string would look like '2;foo=3'.
-       *
-       * @return string version string
-       */
+        * Get metadata version.
+        *
+        * This is not used for validating metadata, this is used for the api when returning
+        * metadata, since api content formats should stay the same over time, and so things
+        * using ForiegnApiRepo can keep backwards compatibility
+        *
+        * All core media handlers share a common version number, and extensions can
+        * use the GetMetadataVersion hook to append to the array (they should append a unique
+        * string so not to get confusing). If there was a media handler named 'foo' with metadata
+        * version 3 it might add to the end of the array the element 'foo=3'. if the core metadata
+        * version is 2, the end version string would look like '2;foo=3'.
+        *
+        * @return string version string
+        */
        static function getMetadataVersion () {
                $version = Array( '2' ); // core metadata version
                wfRunHooks( 'GetMetadataVersion', Array( &$version ) );
@@ -140,15 +140,15 @@ abstract class MediaHandler {
        }
 
        /**
-       * Convert metadata version.
-       *
-       * By default just returns $metadata, but can be used to allow
-       * media handlers to convert between metadata versions.
-       *
-       * @param $metadata Mixed String or Array metadata array (serialized if string)
-       * @param $version Integer target version
-       * @return Array serialized metadata in specified version, or $metadata on fail.
-       */
+        * Convert metadata version.
+        *
+        * By default just returns $metadata, but can be used to allow
+        * media handlers to convert between metadata versions.
+        *
+        * @param $metadata Mixed String or Array metadata array (serialized if string)
+        * @param $version Integer target version
+        * @return Array serialized metadata in specified version, or $metadata on fail.
+        */
        function convertMetadataVersion( $metadata, $version = 1 ) {
                if ( !is_array( $metadata ) ) {
 
@@ -181,7 +181,6 @@ abstract class MediaHandler {
                return self::METADATA_GOOD;
        }
 
-
        /**
         * Get a MediaTransformOutput object representing an alternate of the transformed
         * output which will call an intermediary thumbnail assist script.
@@ -200,9 +199,9 @@ abstract class MediaHandler {
         * actually do the transform.
         *
         * @param $image File: the image object
-        * @param $dstPath String: filesystem destination path
-        * @param $dstUrl String: Destination URL to use in output HTML
-        * @param $params Array: Arbitrary set of parameters validated by $this->validateParam()
+        * @param string $dstPath filesystem destination path
+        * @param string $dstUrl Destination URL to use in output HTML
+        * @param array $params Arbitrary set of parameters validated by $this->validateParam()
         * @return MediaTransformOutput
         */
        final function getTransform( $image, $dstPath, $dstUrl, $params ) {
@@ -214,9 +213,9 @@ abstract class MediaHandler {
         * transform unless $flags contains self::TRANSFORM_LATER.
         *
         * @param $image File: the image object
-        * @param $dstPath String: filesystem destination path
-        * @param $dstUrl String: destination URL to use in output HTML
-        * @param $params Array: arbitrary set of parameters validated by $this->validateParam()
+        * @param string $dstPath filesystem destination path
+        * @param string $dstUrl destination URL to use in output HTML
+        * @param array $params arbitrary set of parameters validated by $this->validateParam()
         * @param $flags Integer: a bitfield, may contain self::TRANSFORM_LATER
         *
         * @return MediaTransformOutput
@@ -361,7 +360,7 @@ abstract class MediaHandler {
         *
         * This is used by the media handlers that use the FormatMetadata class
         *
-        * @param $metadataArray Array metadata array
+        * @param array $metadataArray metadata array
         * @return array for use displaying metadata.
         */
        function formatMetadataHelper( $metadataArray ) {
@@ -405,7 +404,6 @@ abstract class MediaHandler {
                return $fields;
        }
 
-
        /**
         * This is used to generate an array element for each metadata value
         * That array is then used to generate the table of metadata values
@@ -414,17 +412,17 @@ abstract class MediaHandler {
         * @param &$array Array An array containing elements for each type of visibility
         * and each of those elements being an array of metadata items. This function adds
         * a value to that array.
-        * @param $visibility string ('visible' or 'collapsed') if this value is hidden
+        * @param string $visibility ('visible' or 'collapsed') if this value is hidden
         * by default.
-        * @param $type String type of metadata tag (currently always 'exif')
-        * @param $id String the name of the metadata tag (like 'artist' for example).
+        * @param string $type type of metadata tag (currently always 'exif')
+        * @param string $id the name of the metadata tag (like 'artist' for example).
         * its name in the table displayed is the message "$type-$id" (Ex exif-artist ).
-        * @param $value String thingy goes into a wikitext table; it used to be escaped but
+        * @param string $value thingy goes into a wikitext table; it used to be escaped but
         * that was incompatible with previous practise of customized display
         * with wikitext formatting via messages such as 'exif-model-value'.
         * So the escaping is taken back out, but generally this seems a confusing
         * interface.
-        * @param $param String value to pass to the message for the name of the field
+        * @param string $param value to pass to the message for the name of the field
         * as $1. Currently this parameter doesn't seem to ever be used.
         *
         * Note, everything here is passed through the parser later on (!)
@@ -521,7 +519,7 @@ abstract class MediaHandler {
         * match the handler class, a Status object should be returned containing
         * relevant errors.
         *
-        * @param $fileName string The local path to the file.
+        * @param string $fileName The local path to the file.
         * @return Status object
         */
        function verifyUpload( $fileName ) {
@@ -532,8 +530,8 @@ abstract class MediaHandler {
         * Check for zero-sized thumbnails. These can be generated when
         * no disk space is available or some other error occurs
         *
-        * @param $dstPath string The location of the suspect file
-        * @param $retval int Return value of some shell process, file will be deleted if this is non-zero
+        * @param string $dstPath The location of the suspect file
+        * @param int $retval Return value of some shell process, file will be deleted if this is non-zero
         * @return bool True if removed, false otherwise
         */
        function removeBadFile( $dstPath, $retval = 0 ) {
@@ -566,4 +564,13 @@ abstract class MediaHandler {
        public function filterThumbnailPurgeList( &$files, $options ) {
                // Do nothing
        }
+
+       /*
+        * True if the handler can rotate the media
+        * @since 1.21
+        * @return bool
+        */
+       public static function canRotate() {
+               return false;
+       }
 }
index 1fbe029..1f95bc3 100644 (file)
@@ -80,7 +80,7 @@ abstract class MediaTransformOutput {
        }
 
        /**
-        * @param $storagePath string The permanent storage path
+        * @param string $storagePath The permanent storage path
         * @return void
         */
        public function setStoragePath( $storagePath ) {
@@ -90,7 +90,7 @@ abstract class MediaTransformOutput {
        /**
         * Fetch HTML for this transform output
         *
-        * @param $options array Associative array of options. Boolean options
+        * @param array $options Associative array of options. Boolean options
         *     should be indicated with a value of true for true, and false or
         *     absent for false.
         *
@@ -160,7 +160,7 @@ abstract class MediaTransformOutput {
        /**
         * Stream the file if there were no errors
         *
-        * @param $headers Array Additional HTTP headers to send on success
+        * @param array $headers Additional HTTP headers to send on success
         * @return Bool success
         */
        public function streamFile( $headers = array() ) {
@@ -228,9 +228,9 @@ class ThumbnailImage extends MediaTransformOutput {
         * It may also include a 'page' parameter for multipage files.
         *
         * @param $file File object
-        * @param $url String: URL path to the thumb
+        * @param string $url URL path to the thumb
         * @param $path String|bool|null: filesystem path to the thumb
-        * @param $parameters Array: Associative array of parameters
+        * @param array $parameters Associative array of parameters
         * @private
         */
        function __construct( $file, $url, $path = false, $parameters = array() ) {
@@ -270,7 +270,7 @@ class ThumbnailImage extends MediaTransformOutput {
         * Return HTML <img ... /> tag for the thumbnail, will include
         * width and height attributes and a blank alt text (as required).
         *
-        * @param $options array Associative array of options. Boolean options
+        * @param array $options Associative array of options. Boolean options
         *     should be indicated with a value of true for true, and false or
         *     absent for false.
         *
index e4235a7..f8cd6df 100644 (file)
@@ -51,7 +51,7 @@ class SVGReader {
         * Constructor
         *
         * Creates an SVGReader drawing from the source provided
-        * @param $source String: URI from which to read
+        * @param string $source URI from which to read
         * @throws MWException|Exception
         */
        function __construct( $source ) {
@@ -175,8 +175,8 @@ class SVGReader {
        /**
         * Read a textelement from an element
         *
-        * @param String $name of the element that we are reading from
-        * @param String $metafield that we will fill with the result
+        * @param string $name of the element that we are reading from
+        * @param string $metafield that we will fill with the result
         */
        private function readField( $name, $metafield=null ) {
                $this->debug ( "Read field $metafield" );
@@ -197,7 +197,7 @@ class SVGReader {
        /**
         * Read an XML snippet from an element
         *
-        * @param String $metafield that we will fill with the result
+        * @param string $metafield that we will fill with the result
         * @throws MWException
         */
        private function readXml( $metafield=null ) {
@@ -217,7 +217,7 @@ class SVGReader {
        /**
         * Filter all children, looking for animate elements
         *
-        * @param String $name of the element that we are reading from
+        * @param string $name of the element that we are reading from
         */
        private function animateFilter( $name ) {
                $this->debug ( "animate filter for tag $name" );
@@ -325,7 +325,7 @@ class SVGReader {
         * Return a rounded pixel equivalent for a labeled CSS/SVG length.
         * http://www.w3.org/TR/SVG11/coords.html#UnitIdentifiers
         *
-        * @param $length String: CSS/SVG length.
+        * @param string $length CSS/SVG length.
         * @param $viewportSize: Float optional scale for percentage units...
         * @return float: length in pixels
         */
index ba0d419..ba38d15 100644 (file)
@@ -72,7 +72,7 @@ class XCFHandler extends BitmapHandler {
         * @author Hexmode
         * @author Hashar
         *
-        * @param $filename String Full path to a XCF file
+        * @param string $filename Full path to a XCF file
         * @return bool|array metadata array just like PHP getimagesize()
         */
        static function getXCFMetaData( $filename ) {
index 0decb75..62738a0 100644 (file)
  */
 
 /**
-* Class for reading xmp data containing properties relevant to
-* images, and spitting out an array that FormatExif accepts.
-*
-* Note, this is not meant to recognize every possible thing you can
-* encode in XMP. It should recognize all the properties we want.
-* For example it doesn't have support for structures with multiple
-* nesting levels, as none of the properties we're supporting use that
-* feature. If it comes across properties it doesn't recognize, it should
-* ignore them.
-*
-* The public methods one would call in this class are
-* - parse( $content )
-     Reads in xmp content.
-     Can potentially be called multiple times with partial data each time.
-* - parseExtended( $content )
-     Reads XMPExtended blocks (jpeg files only).
-* - getResults
-     Outputs a results array.
-*
-* Note XMP kind of looks like rdf. They are not the same thing - XMP is
-* encoded as a specific subset of rdf. This class can read XMP. It cannot
-* read rdf.
-*
-*/
+ * Class for reading xmp data containing properties relevant to
+ * images, and spitting out an array that FormatExif accepts.
+ *
+ * Note, this is not meant to recognize every possible thing you can
+ * encode in XMP. It should recognize all the properties we want.
+ * For example it doesn't have support for structures with multiple
+ * nesting levels, as none of the properties we're supporting use that
+ * feature. If it comes across properties it doesn't recognize, it should
+ * ignore them.
+ *
+ * The public methods one would call in this class are
+ * - parse( $content )
+ *     Reads in xmp content.
+ *     Can potentially be called multiple times with partial data each time.
+ * - parseExtended( $content )
+ *     Reads XMPExtended blocks (jpeg files only).
+ * - getResults
+ *     Outputs a results array.
+ *
+ * Note XMP kind of looks like rdf. They are not the same thing - XMP is
+ * encoded as a specific subset of rdf. This class can read XMP. It cannot
+ * read rdf.
+ *
+ */
 class XMPReader {
 
        private $curItem = array();        // array to hold the current element (and previous element, and so on)
@@ -63,39 +63,38 @@ class XMPReader {
        protected $items;
 
        /**
-       * These are various mode constants.
-       * they are used to figure out what to do
-       * with an element when its encountered.
-       *
-       * For example, MODE_IGNORE is used when processing
-       * a property we're not interested in. So if a new
-       * element pops up when we're in that mode, we ignore it.
-       */
+        * These are various mode constants.
+        * they are used to figure out what to do
+        * with an element when its encountered.
+        *
+        * For example, MODE_IGNORE is used when processing
+        * a property we're not interested in. So if a new
+        * element pops up when we're in that mode, we ignore it.
+        */
        const MODE_INITIAL = 0;
-       const MODE_IGNORE  = 1;
-       const MODE_LI      = 2;
+       const MODE_IGNORE = 1;
+       const MODE_LI = 2;
        const MODE_LI_LANG = 3;
-       const MODE_QDESC   = 4;
+       const MODE_QDESC = 4;
 
        // The following MODE constants are also used in the
        // $items array to denote what type of property the item is.
-       const MODE_SIMPLE    = 10;
-       const MODE_STRUCT    = 11; // structure (associative array)
-       const MODE_SEQ       = 12; // ordered list
-       const MODE_BAG       = 13; // unordered list
-       const MODE_LANG      = 14;
-       const MODE_ALT       = 15; // non-language alt. Currently not implemented, and not needed atm.
+       const MODE_SIMPLE = 10;
+       const MODE_STRUCT = 11; // structure (associative array)
+       const MODE_SEQ = 12; // ordered list
+       const MODE_BAG = 13; // unordered list
+       const MODE_LANG = 14;
+       const MODE_ALT = 15; // non-language alt. Currently not implemented, and not needed atm.
        const MODE_BAGSTRUCT = 16; // A BAG of Structs.
 
        const NS_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
        const NS_XML = 'http://www.w3.org/XML/1998/namespace';
 
-
        /**
-       * Constructor.
-       *
-       * Primary job is to initialize the XMLParser
-       */
+        * Constructor.
+        *
+        * Primary job is to initialize the XMLParser
+        */
        function __construct() {
 
                if ( !function_exists( 'xml_parser_create_ns' ) ) {
@@ -109,9 +108,9 @@ class XMPReader {
 
        }
        /**
-       * Main use is if a single item has multiple xmp documents describing it.
-       * For example in jpeg's with extendedXMP
-       */
+        * Main use is if a single item has multiple xmp documents describing it.
+        * For example in jpeg's with extendedXMP
+        */
        private function resetXMLParser() {
 
                if ( $this->xmlParser ) {
@@ -131,20 +130,20 @@ class XMPReader {
        }
 
        /** Destroy the xml parser
-       *
-       * Not sure if this is actually needed.
-       */
+        *
+        * Not sure if this is actually needed.
+        */
        function __destruct() {
                // not sure if this is needed.
                xml_parser_free( $this->xmlParser );
        }
 
        /** Get the result array. Do some post-processing before returning
-       * the array, and transform any metadata that is special-cased.
-       *
-       * @return Array array of results as an array of arrays suitable for
-             FormatMetadata::getFormattedData().
-       */
+        * the array, and transform any metadata that is special-cased.
+        *
+        * @return Array array of results as an array of arrays suitable for
+        *      FormatMetadata::getFormattedData().
+        */
        public function getResults() {
                // xmp-special is for metadata that affects how stuff
                // is extracted. For example xmpNote:HasExtendedXMP.
@@ -207,7 +206,6 @@ class XMPReader {
                        }
                }
 
-
                // We don't want to return the special values, since they're
                // special and not info to be stored about the file.
                unset( $data['xmp-special'] );
@@ -238,7 +236,7 @@ class XMPReader {
         * Also catches any errors during processing, writes them to
         * debug log, blanks result array and returns false.
         *
-        * @param $content String: XMP data
+        * @param string $content XMP data
         * @param $allOfIt Boolean: If this is all the data (true) or if its split up (false). Default true
         * @param $reset Boolean: does xml parser need to be reset. Default false
         * @throws MWException
@@ -312,7 +310,7 @@ class XMPReader {
         *
         * @todo In serious need of testing
         * @see http://www.adobe.ge/devnet/xmp/pdfs/XMPSpecificationPart3.pdf XMP spec part 3 page 20
-        * @param String $content XMPExtended block minus the namespace signature
+        * @param string $content XMPExtended block minus the namespace signature
         * @return Boolean If it succeeded.
         */
        public function parseExtended( $content ) {
@@ -331,7 +329,6 @@ class XMPReader {
                        return false;
                }
 
-
                // we're not very robust here. we should accept it in the wrong order. To quote
                // the xmp standard:
                // "A JPEG writer should write the ExtendedXMP marker segments in order, immediately following the
@@ -368,21 +365,21 @@ class XMPReader {
        }
 
        /**
-       * Character data handler
-       * Called whenever character data is found in the xmp document.
-       *
-       * does nothing if we're in MODE_IGNORE or if the data is whitespace
-       * throws an error if we're not in MODE_SIMPLE (as we're not allowed to have character
-       * data in the other modes).
-       *
-       * As an example, this happens when we encounter XMP like:
-       * <exif:DigitalZoomRatio>0/10</exif:DigitalZoomRatio>
-       * and are processing the 0/10 bit.
-       *
-       * @param $parser XMLParser reference to the xml parser
-       * @param $data String Character data
-       * @throws MWException on invalid data
-       */
+        * Character data handler
+        * Called whenever character data is found in the xmp document.
+        *
+        * does nothing if we're in MODE_IGNORE or if the data is whitespace
+        * throws an error if we're not in MODE_SIMPLE (as we're not allowed to have character
+        * data in the other modes).
+        *
+        * As an example, this happens when we encounter XMP like:
+        * <exif:DigitalZoomRatio>0/10</exif:DigitalZoomRatio>
+        * and are processing the 0/10 bit.
+        *
+        * @param $parser XMLParser reference to the xml parser
+        * @param string $data Character data
+        * @throws MWException on invalid data
+        */
        function char( $parser, $data ) {
 
                $data = trim( $data );
@@ -412,11 +409,11 @@ class XMPReader {
        }
 
        /** When we hit a closing element in MODE_IGNORE
-       * Check to see if this is the element we started to ignore,
-       * in which case we get out of MODE_IGNORE
-       *
-       * @param $elm String Namespace of element followed by a space and then tag name of element.
-       */
+        * Check to see if this is the element we started to ignore,
+        * in which case we get out of MODE_IGNORE
+        *
+        * @param string $elm Namespace of element followed by a space and then tag name of element.
+        */
        private function endElementModeIgnore ( $elm ) {
                if ( $this->curItem[0] === $elm ) {
                        array_shift( $this->curItem );
@@ -425,20 +422,20 @@ class XMPReader {
        }
 
        /**
-       * Hit a closing element when in MODE_SIMPLE.
-       * This generally means that we finished processing a
-       * property value, and now have to save the result to the
-       * results array
-       *
-       * For example, when processing:
-       * <exif:DigitalZoomRatio>0/10</exif:DigitalZoomRatio>
-       * this deals with when we hit </exif:DigitalZoomRatio>.
-       *
-       * Or it could be if we hit the end element of a property
-       * of a compound data structure (like a member of an array).
-       *
-       * @param $elm String namespace, space, and tag name.
-       */
+        * Hit a closing element when in MODE_SIMPLE.
+        * This generally means that we finished processing a
+        * property value, and now have to save the result to the
+        * results array
+        *
+        * For example, when processing:
+        * <exif:DigitalZoomRatio>0/10</exif:DigitalZoomRatio>
+        * this deals with when we hit </exif:DigitalZoomRatio>.
+        *
+        * Or it could be if we hit the end element of a property
+        * of a compound data structure (like a member of an array).
+        *
+        * @param string $elm namespace, space, and tag name.
+        */
        private function endElementModeSimple ( $elm ) {
                if ( $this->charContent !== false ) {
                        if ( $this->processingArray ) {
@@ -472,7 +469,7 @@ class XMPReader {
         *
         * This method is called when we hit the "</exif:ISOSpeedRatings>" tag.
         *
-        * @param $elm String namespace . space . tag name.
+        * @param string $elm namespace . space . tag name.
         * @throws MWException
         */
        private function endElementNested( $elm ) {
@@ -539,7 +536,7 @@ class XMPReader {
         * (For comparison, we call endElementModeSimple when we
         * hit the "</rdf:li>")
         *
-        * @param $elm String namespace . ' ' . element name
+        * @param string $elm namespace . ' ' . element name
         * @throws MWException
         */
        private function endElementModeLi( $elm ) {
@@ -572,15 +569,15 @@ class XMPReader {
        }
 
        /**
-       * End element while in MODE_QDESC
-       * mostly when ending an element when we have a simple value
-       * that has qualifiers.
-       *
-       * Qualifiers aren't all that common, and we don't do anything
-       * with them.
-       *
-       * @param $elm String namespace and element
-       */
+        * End element while in MODE_QDESC
+        * mostly when ending an element when we have a simple value
+        * that has qualifiers.
+        *
+        * Qualifiers aren't all that common, and we don't do anything
+        * with them.
+        *
+        * @param string $elm namespace and element
+        */
        private function endElementModeQDesc( $elm ) {
 
                if ( $elm === self::NS_RDF . ' value' ) {
@@ -591,8 +588,6 @@ class XMPReader {
                        array_shift( $this->mode );
                        array_shift( $this->curItem );
                }
-
-
        }
 
        /**
@@ -605,7 +600,7 @@ class XMPReader {
         * xmp and have no meaning.
         *
         * @param $parser XMLParser
-        * @param $elm String namespace . ' ' . element name
+        * @param string $elm namespace . ' ' . element name
         * @throws MWException
         */
        function endElement( $parser, $elm ) {
@@ -679,16 +674,16 @@ class XMPReader {
        }
 
        /**
-       * Hit an opening element while in MODE_IGNORE
-       *
-       * XMP is extensible, so ignore any tag we don't understand.
-       *
-       * Mostly ignores, unless we encounter the element that we are ignoring.
-       * in which case we add it to the item stack, so we can ignore things
-       * that are nested, correctly.
-       *
-       * @param $elm String namespace . ' ' . tag name
-       */
+        * Hit an opening element while in MODE_IGNORE
+        *
+        * XMP is extensible, so ignore any tag we don't understand.
+        *
+        * Mostly ignores, unless we encounter the element that we are ignoring.
+        * in which case we add it to the item stack, so we can ignore things
+        * that are nested, correctly.
+        *
+        * @param string $elm namespace . ' ' . tag name
+        */
        private function startElementModeIgnore( $elm ) {
                if ( $elm === $this->curItem[0] ) {
                        array_unshift( $this->curItem, $elm );
@@ -697,12 +692,12 @@ class XMPReader {
        }
 
        /**
-       *  Start element in MODE_BAG (unordered array)
-       * this should always be <rdf:Bag>
-       *
-       * @param $elm String namespace . ' ' . tag
-       * @throws MWException if we have an element that's not <rdf:Bag>
-       */
+        *  Start element in MODE_BAG (unordered array)
+        * this should always be <rdf:Bag>
+        *
+        * @param string $elm namespace . ' ' . tag
+        * @throws MWException if we have an element that's not <rdf:Bag>
+        */
        private function startElementModeBag( $elm ) {
                if ( $elm === self::NS_RDF . ' Bag' ) {
                        array_unshift( $this->mode, self::MODE_LI );
@@ -713,12 +708,12 @@ class XMPReader {
        }
 
        /**
-       * Start element in MODE_SEQ (ordered array)
-       * this should always be <rdf:Seq>
-       *
-       * @param $elm String namespace . ' ' . tag
-       * @throws MWException if we have an element that's not <rdf:Seq>
-       */
+        * Start element in MODE_SEQ (ordered array)
+        * this should always be <rdf:Seq>
+        *
+        * @param string $elm namespace . ' ' . tag
+        * @throws MWException if we have an element that's not <rdf:Seq>
+        */
        private function startElementModeSeq( $elm ) {
                if ( $elm === self::NS_RDF . ' Seq' ) {
                        array_unshift( $this->mode, self::MODE_LI );
@@ -734,19 +729,19 @@ class XMPReader {
        }
 
        /**
-       * Start element in MODE_LANG (language alternative)
-       * this should always be <rdf:Alt>
-       *
-       * This tag tends to be used for metadata like describe this
-       * picture, which can be translated into multiple languages.
-       *
-       * XMP supports non-linguistic alternative selections,
-       * which are really only used for thumbnails, which
-       * we don't care about.
-       *
-       * @param $elm String namespace . ' ' . tag
-       * @throws MWException if we have an element that's not <rdf:Alt>
-       */
+        * Start element in MODE_LANG (language alternative)
+        * this should always be <rdf:Alt>
+        *
+        * This tag tends to be used for metadata like describe this
+        * picture, which can be translated into multiple languages.
+        *
+        * XMP supports non-linguistic alternative selections,
+        * which are really only used for thumbnails, which
+        * we don't care about.
+        *
+        * @param string $elm namespace . ' ' . tag
+        * @throws MWException if we have an element that's not <rdf:Alt>
+        */
        private function startElementModeLang( $elm ) {
                if ( $elm === self::NS_RDF . ' Alt' ) {
                        array_unshift( $this->mode, self::MODE_LI_LANG );
@@ -770,8 +765,8 @@ class XMPReader {
         *
         * This method is called when processing the <rdf:Description> element
         *
-        * @param $elm String namespace and tag names separated by space.
-        * @param $attribs Array Attributes of the element.
+        * @param string $elm namespace and tag names separated by space.
+        * @param array $attribs Attributes of the element.
         * @throws MWException
         */
        private function startElementModeSimple( $elm, $attribs ) {
@@ -799,19 +794,19 @@ class XMPReader {
        }
 
        /**
-       * Start an element when in MODE_QDESC.
-       * This generally happens when a simple element has an inner
-       * rdf:Description to hold qualifier elements.
-       *
-       * For example in:
-       * <exif:DigitalZoomRatio><rdf:Description><rdf:value>0/10</rdf:value>
-       *   <foo:someQualifier>Bar</foo:someQualifier> </rdf:Description>
-       *   </exif:DigitalZoomRatio>
-       * Called when processing the <rdf:value> or <foo:someQualifier>.
-       *
-       * @param $elm String namespace and tag name separated by a space.
-       *
-       */
+        * Start an element when in MODE_QDESC.
+        * This generally happens when a simple element has an inner
+        * rdf:Description to hold qualifier elements.
+        *
+        * For example in:
+        * <exif:DigitalZoomRatio><rdf:Description><rdf:value>0/10</rdf:value>
+        *   <foo:someQualifier>Bar</foo:someQualifier> </rdf:Description>
+        *   </exif:DigitalZoomRatio>
+        * Called when processing the <rdf:value> or <foo:someQualifier>.
+        *
+        * @param string $elm namespace and tag name separated by a space.
+        *
+        */
        private function startElementModeQDesc( $elm ) {
                if ( $elm === self::NS_RDF . ' value' ) {
                        return; // do nothing
@@ -829,9 +824,9 @@ class XMPReader {
         *
         * This is generally where most properties start.
         *
-        * @param $ns String Namespace
-        * @param $tag String tag name (without namespace prefix)
-        * @param $attribs Array array of attributes
+        * @param string $ns Namespace
+        * @param string $tag tag name (without namespace prefix)
+        * @param array $attribs array of attributes
         * @throws MWException
         */
        private function startElementModeInitial( $ns, $tag, $attribs ) {
@@ -890,9 +885,9 @@ class XMPReader {
         * <exif:Flash rdf:parseType='Resource'> <exif:Fired>True</exif:Fired>
         *  <exif:Mode>1</exif:Mode></exif:Flash>
         *
-        * @param $ns String namespace
-        * @param $tag String tag name (no ns)
-        * @param $attribs Array array of attribs w/ values.
+        * @param string $ns namespace
+        * @param string $tag tag name (no ns)
+        * @param array $attribs array of attribs w/ values.
         * @throws MWException
         */
        private function startElementModeStruct( $ns, $tag, $attribs ) {
@@ -930,18 +925,18 @@ class XMPReader {
        }
 
        /**
-       * opening element in MODE_LI
-       * process elements of arrays.
-       *
-       * Example:
-       * <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>64</rdf:li>
-       *   </rdf:Seq> </exif:ISOSpeedRatings>
-       * This method is called when we hit the <rdf:li> element.
-       *
-       * @param $elm String: namespace . ' ' . tagname
-       * @param $attribs Array: Attributes. (needed for BAGSTRUCTS)
-       * @throws MWException if gets a tag other than <rdf:li>
-       */
+        * opening element in MODE_LI
+        * process elements of arrays.
+        *
+        * Example:
+        * <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>64</rdf:li>
+        *   </rdf:Seq> </exif:ISOSpeedRatings>
+        * This method is called when we hit the <rdf:li> element.
+        *
+        * @param string $elm namespace . ' ' . tagname
+        * @param array $attribs Attributes. (needed for BAGSTRUCTS)
+        * @throws MWException if gets a tag other than <rdf:li>
+        */
        private function startElementModeLi( $elm, $attribs ) {
                if ( ( $elm ) !== self::NS_RDF . ' li' ) {
                        throw new MWException( "<rdf:li> expected but got $elm." );
@@ -981,19 +976,19 @@ class XMPReader {
        }
 
        /**
-       * Opening element in MODE_LI_LANG.
-       * process elements of language alternatives
-       *
-       * Example:
-       * <dc:title> <rdf:Alt> <rdf:li xml:lang="x-default">My house
-       *  </rdf:li> </rdf:Alt> </dc:title>
-       *
-       * This method is called when we hit the <rdf:li> element.
-       *
-       * @param $elm String namespace . ' ' . tag
-       * @param $attribs array array of elements (most importantly xml:lang)
-       * @throws MWException if gets a tag other than <rdf:li> or if no xml:lang
-       */
+        * Opening element in MODE_LI_LANG.
+        * process elements of language alternatives
+        *
+        * Example:
+        * <dc:title> <rdf:Alt> <rdf:li xml:lang="x-default">My house
+        *  </rdf:li> </rdf:Alt> </dc:title>
+        *
+        * This method is called when we hit the <rdf:li> element.
+        *
+        * @param string $elm namespace . ' ' . tag
+        * @param array $attribs array of elements (most importantly xml:lang)
+        * @throws MWException if gets a tag other than <rdf:li> or if no xml:lang
+        */
        private function startElementModeLiLang( $elm, $attribs ) {
                if ( $elm !== self::NS_RDF . ' li' ) {
                        throw new MWException( __METHOD__ . " <rdf:li> expected but got $elm." );
@@ -1021,8 +1016,8 @@ class XMPReader {
         * Also does some initial set up for the wrapper element
         *
         * @param $parser XMLParser
-        * @param $elm String namespace "<space>" element
-        * @param $attribs Array attribute name => value
+        * @param string $elm namespace "<space>" element
+        * @param array $attribs attribute name => value
         * @throws MWException
         */
        function startElement( $parser, $elm, $attribs ) {
@@ -1112,7 +1107,7 @@ class XMPReader {
         * <rdf:Description rdf:about="" xmlns:exif="http://ns.adobe.com/exif/1.0/" exif:DigitalZoomRatio="0/10">
         * @endcode
         *
-        * @param $attribs Array attribute=>value array.
+        * @param array $attribs attribute=>value array.
         * @throws MWException
         */
        private function doAttribs( $attribs ) {
@@ -1128,8 +1123,6 @@ class XMPReader {
                        $this->mode[0] = self::MODE_QDESC;
                }
                foreach ( $attribs as $name => $val ) {
-
-
                        if ( strpos( $name, ' ' ) === false ) {
                                // This shouldn't happen, but so far some old software forgets namespace
                                // on rdf:about.
@@ -1157,16 +1150,16 @@ class XMPReader {
        }
 
        /**
-       * Given an extracted value, save it to results array
-       *
-       * note also uses $this->ancestorStruct and
-       * $this->processingArray to determine what name to
-       * save the value under. (in addition to $tag).
-       *
-       * @param $ns String namespace of tag this is for
-       * @param $tag String tag name
-       * @param $val String value to save
-       */
+        * Given an extracted value, save it to results array
+        *
+        * note also uses $this->ancestorStruct and
+        * $this->processingArray to determine what name to
+        * save the value under. (in addition to $tag).
+        *
+        * @param string $ns namespace of tag this is for
+        * @param string $tag tag name
+        * @param string $val value to save
+        */
        private function saveValue( $ns, $tag, $val ) {
 
                $info =& $this->items[$ns][$tag];
index a4ba741..01b07db 100644 (file)
  */
 
 /**
-* This class is just a container for a big array
-* used by XMPReader to determine which XMP items to
-* extract.
-*/
+ * This class is just a container for a big array
+ * used by XMPReader to determine which XMP items to
+ * extract.
+ */
 class XMPInfo {
 
        /** get the items array
         * @return Array XMP item configuration array.
-       */
+        */
        public static function getItems ( ) {
                if( !self::$ranHooks ) {
                        // This is for if someone makes a custom metadata extension.
@@ -44,26 +44,25 @@ class XMPInfo {
        static private $ranHooks = false;
 
        /**
-       * XMPInfo::$items keeps a list of all the items
-       * we are interested to extract, as well as
-       * information about the item like what type
-       * it is.
-       *
-       * Format is an array of namespaces,
-       * each containing an array of tags
-       * each tag is an array of information about the
-       * tag, including:
-       *       * map_group - what group (used for precedence during conflicts)
-       *       * mode - What type of item (self::MODE_SIMPLE usually, see above for all values)
-       *       * validate - method to validate input. Could also post-process the input. A string value is assumed to be a static method of XMPValidate. Can also take a array( 'className', 'methodName' ).
-       *       * choices  - array of potential values (format of 'value' => true ). Only used with validateClosed
-       *       * rangeLow and rangeHigh - alternative to choices for numeric ranges. Again for validateClosed only.
-       *       * children - for MODE_STRUCT items, allowed children.
-       *       * structPart - Indicates that this element can only appear as a member of a structure.
-       *
-       * currently this just has a bunch of exif values as this class is only half-done
-       */
-
+        * XMPInfo::$items keeps a list of all the items
+        * we are interested to extract, as well as
+        * information about the item like what type
+        * it is.
+        *
+        * Format is an array of namespaces,
+        * each containing an array of tags
+        * each tag is an array of information about the
+        * tag, including:
+        *       * map_group - what group (used for precedence during conflicts)
+        *       * mode - What type of item (self::MODE_SIMPLE usually, see above for all values)
+        *       * validate - method to validate input. Could also post-process the input. A string value is assumed to be a static method of XMPValidate. Can also take a array( 'className', 'methodName' ).
+        *       * choices  - array of potential values (format of 'value' => true ). Only used with validateClosed
+        *      * rangeLow and rangeHigh - alternative to choices for numeric ranges. Again for validateClosed only.
+        *       * children - for MODE_STRUCT items, allowed children.
+        *      * structPart - Indicates that this element can only appear as a member of a structure.
+        *
+        * currently this just has a bunch of exif values as this class is only half-done
+        */
        static private $items = array(
                'http://ns.adobe.com/exif/1.0/' => array(
                        'ApertureValue' => array(
index e2ae535..f98f0b5 100644 (file)
  */
 
 /**
-* This contains some static methods for
-* validating XMP properties. See XMPInfo and XMPReader classes.
-*
-* Each of these functions take the same parameters
-* * an info array which is a subset of the XMPInfo::items array
-* * A value (passed as reference) to validate. This can be either a
-     simple value or an array
-* * A boolean to determine if this is validating a simple or complex values
-*
-* It should be noted that when an array is being validated, typically the validation
-* function is called once for each value, and then once at the end for the entire array.
-*
-* These validation functions can also be used to modify the data. See the gps and flash one's
-* for example.
-*
-* @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart1.pdf starting at pg 28
-* @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart2.pdf starting at pg 11
-*/
+ * This contains some static methods for
+ * validating XMP properties. See XMPInfo and XMPReader classes.
+ *
+ * Each of these functions take the same parameters
+ * * an info array which is a subset of the XMPInfo::items array
+ * * A value (passed as reference) to validate. This can be either a
+ *     simple value or an array
+ * * A boolean to determine if this is validating a simple or complex values
+ *
+ * It should be noted that when an array is being validated, typically the validation
+ * function is called once for each value, and then once at the end for the entire array.
+ *
+ * These validation functions can also be used to modify the data. See the gps and flash one's
+ * for example.
+ *
+ * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart1.pdf starting at pg 28
+ * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart2.pdf starting at pg 11
+ */
 class XMPValidate {
        /**
-       * function to validate boolean properties ( True or False )
-       *
-       * @param $info Array information about current property
-       * @param &$val Mixed current value to validate
-       * @param $standalone Boolean if this is a simple property or array
-       */
+        * function to validate boolean properties ( True or False )
+        *
+        * @param array $info information about current property
+        * @param &$val Mixed current value to validate
+        * @param $standalone Boolean if this is a simple property or array
+        */
        public static function validateBoolean( $info, &$val, $standalone ) {
                if ( !$standalone ) {
                        // this only validates standalone properties, not arrays, etc
@@ -61,12 +61,12 @@ class XMPValidate {
        }
 
        /**
-       * function to validate rational properties ( 12/10 )
-       *
-       * @param $info Array information about current property
-       * @param &$val Mixed current value to validate
-       * @param $standalone Boolean if this is a simple property or array
-       */
+        * function to validate rational properties ( 12/10 )
+        *
+        * @param array $info information about current property
+        * @param &$val Mixed current value to validate
+        * @param $standalone Boolean if this is a simple property or array
+        */
        public static function validateRational( $info, &$val, $standalone ) {
                if ( !$standalone ) {
                        // this only validates standalone properties, not arrays, etc
@@ -80,15 +80,15 @@ class XMPValidate {
        }
 
        /**
-       * function to validate rating properties -1, 0-5
-       *
-       * if its outside of range put it into range.
-       *
-       * @see MWG spec
-       * @param $info Array information about current property
-       * @param &$val Mixed current value to validate
-       * @param $standalone Boolean if this is a simple property or array
-       */
+        * function to validate rating properties -1, 0-5
+        *
+        * if its outside of range put it into range.
+        *
+        * @see MWG spec
+        * @param array $info information about current property
+        * @param &$val Mixed current value to validate
+        * @param $standalone Boolean if this is a simple property or array
+        */
        public static function validateRating( $info, &$val, $standalone ) {
                if ( !$standalone ) {
                        // this only validates standalone properties, not arrays, etc
@@ -119,12 +119,12 @@ class XMPValidate {
        }
 
        /**
-       * function to validate integers
-       *
-       * @param $info Array information about current property
-       * @param &$val Mixed current value to validate
-       * @param $standalone Boolean if this is a simple property or array
-       */
+        * function to validate integers
+        *
+        * @param array $info information about current property
+        * @param &$val Mixed current value to validate
+        * @param $standalone Boolean if this is a simple property or array
+        */
        public static function validateInteger( $info, &$val, $standalone ) {
                if ( !$standalone ) {
                        // this only validates standalone properties, not arrays, etc
@@ -138,13 +138,13 @@ class XMPValidate {
        }
 
        /**
-       * function to validate properties with a fixed number of allowed
-       * choices. (closed choice)
-       *
-       * @param $info Array information about current property
-       * @param &$val Mixed current value to validate
-       * @param $standalone Boolean if this is a simple property or array
-       */
+        * function to validate properties with a fixed number of allowed
+        * choices. (closed choice)
+        *
+        * @param array $info information about current property
+        * @param &$val Mixed current value to validate
+        * @param $standalone Boolean if this is a simple property or array
+        */
        public static function validateClosed( $info, &$val, $standalone ) {
                if ( !$standalone ) {
                        // this only validates standalone properties, not arrays, etc
@@ -169,12 +169,12 @@ class XMPValidate {
        }
 
        /**
-       * function to validate and modify flash structure
-       *
-       * @param $info Array information about current property
-       * @param &$val Mixed current value to validate
-       * @param $standalone Boolean if this is a simple property or array
-       */
+        * function to validate and modify flash structure
+        *
+        * @param array $info information about current property
+        * @param &$val Mixed current value to validate
+        * @param $standalone Boolean if this is a simple property or array
+        */
        public static function validateFlash( $info, &$val, $standalone ) {
                if ( $standalone ) {
                        // this only validates flash structs, not individual properties
@@ -198,17 +198,17 @@ class XMPValidate {
        }
 
        /**
-       * function to validate LangCode properties ( en-GB, etc )
-       *
-       * This is just a naive check to make sure it somewhat looks like a lang code.
-       *
-       * @see rfc 3066
-       * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart1.pdf page 30 (section 8.2.2.5)
-       *
-       * @param $info Array information about current property
-       * @param &$val Mixed current value to validate
-       * @param $standalone Boolean if this is a simple property or array
-       */
+        * function to validate LangCode properties ( en-GB, etc )
+        *
+        * This is just a naive check to make sure it somewhat looks like a lang code.
+        *
+        * @see rfc 3066
+        * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart1.pdf page 30 (section 8.2.2.5)
+        *
+        * @param array $info information about current property
+        * @param &$val Mixed current value to validate
+        * @param $standalone Boolean if this is a simple property or array
+        */
        public static function validateLangCode( $info, &$val, $standalone ) {
                if ( !$standalone ) {
                        // this only validates standalone properties, not arrays, etc
@@ -223,22 +223,22 @@ class XMPValidate {
        }
 
        /**
-       * function to validate date properties, and convert to (partial) Exif format.
-       *
-       * Dates can be one of the following formats:
-       * YYYY
-       * YYYY-MM
-       * YYYY-MM-DD
-       * YYYY-MM-DDThh:mmTZD
-       * YYYY-MM-DDThh:mm:ssTZD
-       * YYYY-MM-DDThh:mm:ss.sTZD
-       *
-       * @param $info Array information about current property
-       * @param &$val Mixed current value to validate. Converts to TS_EXIF as a side-effect.
-             in cases where there's only a partial date, it will give things like
-             2011:04.
-       * @param $standalone Boolean if this is a simple property or array
-       */
+        * function to validate date properties, and convert to (partial) Exif format.
+        *
+        * Dates can be one of the following formats:
+        * YYYY
+        * YYYY-MM
+        * YYYY-MM-DD
+        * YYYY-MM-DDThh:mmTZD
+        * YYYY-MM-DDThh:mm:ssTZD
+        * YYYY-MM-DDThh:mm:ss.sTZD
+        *
+        * @param array $info information about current property
+        * @param &$val Mixed current value to validate. Converts to TS_EXIF as a side-effect.
+        *      in cases where there's only a partial date, it will give things like
+        *      2011:04.
+        * @param $standalone Boolean if this is a simple property or array
+        */
        public static function validateDate( $info, &$val, $standalone ) {
                if ( !$standalone ) {
                        // this only validates standalone properties, not arrays, etc
@@ -295,7 +295,6 @@ class XMPValidate {
                                return;
                        }
 
-
                        // Extra check for empty string necessary due to TZ but no second case.
                        $stripSeconds = false;
                        if ( !isset( $res[6] ) || $res[6] === '' ) {
@@ -331,7 +330,7 @@ class XMPValidate {
         * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart2.pdf
         *        section 1.2.7.4 on page 23
         *
-        * @param $info Array unused (info about prop)
+        * @param array $info unused (info about prop)
         * @param &$val String GPS string in either DDD,MM,SSk or
         *           or DDD,MM.mmk form
         * @param $standalone Boolean if its a simple prop (should always be true)
index f5b698a..186ca04 100644 (file)
@@ -73,7 +73,7 @@ class UtfNormal {
         * Fast return for pure ASCII strings; some lesser optimizations for
         * strings containing only known-good characters. Not as fast as toNFC().
         *
-        * @param $string String: a UTF-8 string
+        * @param string $string a UTF-8 string
         * @return string a clean, shiny, normalized UTF-8 string
         */
        static function cleanUp( $string ) {
@@ -114,7 +114,7 @@ class UtfNormal {
         * Fast return for pure ASCII strings; some lesser optimizations for
         * strings containing only known-good characters.
         *
-        * @param $string String: a valid UTF-8 string. Input is not validated.
+        * @param string $string a valid UTF-8 string. Input is not validated.
         * @return string a UTF-8 string in normal form C
         */
        static function toNFC( $string ) {
@@ -132,7 +132,7 @@ class UtfNormal {
         * Convert a UTF-8 string to normal form D, canonical decomposition.
         * Fast return for pure ASCII strings.
         *
-        * @param $string String: a valid UTF-8 string. Input is not validated.
+        * @param string $string a valid UTF-8 string. Input is not validated.
         * @return string a UTF-8 string in normal form D
         */
        static function toNFD( $string ) {
@@ -151,7 +151,7 @@ class UtfNormal {
         * This may cause irreversible information loss, use judiciously.
         * Fast return for pure ASCII strings.
         *
-        * @param $string String: a valid UTF-8 string. Input is not validated.
+        * @param string $string a valid UTF-8 string. Input is not validated.
         * @return string a UTF-8 string in normal form KC
         */
        static function toNFKC( $string ) {
@@ -170,7 +170,7 @@ class UtfNormal {
         * This may cause irreversible information loss, use judiciously.
         * Fast return for pure ASCII strings.
         *
-        * @param $string String: a valid UTF-8 string. Input is not validated.
+        * @param string $string a valid UTF-8 string. Input is not validated.
         * @return string a UTF-8 string in normal form KD
         */
        static function toNFKD( $string ) {
@@ -197,7 +197,7 @@ class UtfNormal {
        /**
         * Returns true if the string is _definitely_ in NFC.
         * Returns false if not or uncertain.
-        * @param $string String: a valid UTF-8 string. Input is not validated.
+        * @param string $string a valid UTF-8 string. Input is not validated.
         * @return bool
         */
        static function quickIsNFC( $string ) {
@@ -237,7 +237,7 @@ class UtfNormal {
        /**
         * Returns true if the string is _definitely_ in NFC.
         * Returns false if not or uncertain.
-        * @param $string String: a UTF-8 string, altered on output to be valid UTF-8 safe for XML.
+        * @param string $string a UTF-8 string, altered on output to be valid UTF-8 safe for XML.
         * @return bool
         */
        static function quickIsNFCVerify( &$string ) {
@@ -503,8 +503,8 @@ class UtfNormal {
         * (depending on which decomposition map is passed to us).
         * Input is assumed to be *valid* UTF-8. Invalid code will break.
         * @private
-        * @param $string String: valid UTF-8 string
-        * @param $map Array: hash of expanded decomposition map
+        * @param string $string valid UTF-8 string
+        * @param array $map hash of expanded decomposition map
         * @return string a UTF-8 string decomposed, not yet normalized (needs sorting)
         */
        static function fastDecompose( $string, $map ) {
@@ -564,7 +564,7 @@ class UtfNormal {
         * Sorts combining characters into canonical order. This is the
         * final step in creating decomposed normal forms D and KD.
         * @private
-        * @param $string String: a valid, decomposed UTF-8 string. Input is not validated.
+        * @param string $string a valid, decomposed UTF-8 string. Input is not validated.
         * @return string a UTF-8 string with combining characters sorted in canonical order
         */
        static function fastCombiningSort( $string ) {
@@ -616,7 +616,7 @@ class UtfNormal {
         * Produces canonically composed sequences, i.e. normal form C or KC.
         *
         * @private
-        * @param $string String: a valid UTF-8 string in sorted normal form D or KD. Input is not validated.
+        * @param string $string a valid UTF-8 string in sorted normal form D or KD. Input is not validated.
         * @return string a UTF-8 string with canonical precomposed characters used where possible
         */
        static function fastCompose( $string ) {
@@ -762,7 +762,7 @@ class UtfNormal {
         * Function to replace some characters that we don't want
         * but most of the native normalize functions keep.
         *
-        * @param $string String The string
+        * @param string $string The string
         * @return String String with the character codes replaced.
         */
        private static function replaceForNativeNormalize( $string ) {
index bfad709..9b96a07 100644 (file)
@@ -71,7 +71,7 @@ function hexSequenceToUtf8( $sequence ) {
  * Take a UTF-8 string and return a space-separated series of hex
  * numbers representing Unicode code points. For debugging.
  *
- * @param $str String: UTF-8 string.
+ * @param string $str UTF-8 string.
  * @return string
  * @private
  */
@@ -114,7 +114,7 @@ function utf8ToCodepoint( $char ) {
        $z >>= $length;
 
        # Add in the free bits from subsequent bytes
-       for ( $i=1; $i<$length; $i++ ) {
+       for ( $i=1; $i < $length; $i++ ) {
                $z <<= 6;
                $z |= ord( $char[$i] ) & 0x3f;
        }
@@ -125,7 +125,7 @@ function utf8ToCodepoint( $char ) {
 /**
  * Escape a string for inclusion in a PHP single-quoted string literal.
  *
- * @param $string String: string to be escaped.
+ * @param string $string string to be escaped.
  * @return String: escaped string.
  * @public
  */
index 6c558ce..3fb8083 100644 (file)
@@ -90,8 +90,8 @@ class APCBagOStuff extends BagOStuff {
        /**
         * @param $key string
         * @param $callback closure Callback method to be executed
-        * @param $exptime int Either an interval in seconds or a unix timestamp for expiry
-        * @param $attempts int The amount of times to attempt a merge in case of failure
+        * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
+        * @param int $attempts The amount of times to attempt a merge in case of failure
         * @return bool success
         */
        public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
index 1205ceb..dd74467 100644 (file)
@@ -65,7 +65,7 @@ abstract class BagOStuff {
         * Set an item.
         * @param $key string
         * @param $value mixed
-        * @param $exptime int Either an interval in seconds or a unix timestamp for expiry
+        * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
         * @return bool success
         */
        abstract public function set( $key, $value, $exptime = 0 );
@@ -75,7 +75,7 @@ abstract class BagOStuff {
         * @param $casToken mixed
         * @param $key string
         * @param $value mixed
-        * @param $exptime int Either an interval in seconds or a unix timestamp for expiry
+        * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
         * @return bool success
         */
        abstract public function cas( $casToken, $key, $value, $exptime = 0 );
@@ -83,7 +83,7 @@ abstract class BagOStuff {
        /**
         * Delete an item.
         * @param $key string
-        * @param $time int Amount of time to delay the operation (mostly memcached-specific)
+        * @param int $time Amount of time to delay the operation (mostly memcached-specific)
         * @return bool True if the item was deleted or not found, false on failure
         */
        abstract public function delete( $key, $time = 0 );
@@ -95,8 +95,8 @@ abstract class BagOStuff {
         *
         * @param $key string
         * @param $callback closure Callback method to be executed
-        * @param $exptime int Either an interval in seconds or a unix timestamp for expiry
-        * @param $attempts int The amount of times to attempt a merge in case of failure
+        * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
+        * @param int $attempts The amount of times to attempt a merge in case of failure
         * @return bool success
         */
        public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
@@ -108,8 +108,8 @@ abstract class BagOStuff {
         *
         * @param $key string
         * @param $callback closure Callback method to be executed
-        * @param $exptime int Either an interval in seconds or a unix timestamp for expiry
-        * @param $attempts int The amount of times to attempt a merge in case of failure
+        * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
+        * @param int $attempts The amount of times to attempt a merge in case of failure
         * @return bool success
         */
        protected function mergeViaCas( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
@@ -137,8 +137,8 @@ abstract class BagOStuff {
         *
         * @param $key string
         * @param $callback closure Callback method to be executed
-        * @param $exptime int Either an interval in seconds or a unix timestamp for expiry
-        * @param $attempts int The amount of times to attempt a merge in case of failure
+        * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
+        * @param int $attempts The amount of times to attempt a merge in case of failure
         * @return bool success
         */
        protected function mergeViaLock( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
@@ -174,10 +174,10 @@ abstract class BagOStuff {
                        return true;
                }
 
-               $uRTT  = ceil( 1e6 * ( microtime( true ) - $timestamp ) ); // estimate RTT (us)
+               $uRTT = ceil( 1e6 * ( microtime( true ) - $timestamp ) ); // estimate RTT (us)
                $sleep = 2*$uRTT; // rough time to do get()+set()
 
-               $locked   = false; // lock acquired
+               $locked = false; // lock acquired
                $attempts = 0; // failed attempts
                do {
                        if ( ++$attempts >= 3 && $sleep <= 1e6 ) {
@@ -202,7 +202,7 @@ abstract class BagOStuff {
 
        /**
         * Delete all objects expiring before a certain date.
-        * @param $date string The reference date in MW format
+        * @param string $date The reference date in MW format
         * @param $progressCallback callback|bool Optional, a function which will be called
         *     regularly during long-running operations with the percentage progress
         *     as the first parameter.
@@ -218,7 +218,7 @@ abstract class BagOStuff {
 
        /**
         * Get an associative array containing the item for each of the keys that have items.
-        * @param $keys Array List of strings
+        * @param array $keys List of strings
         * @return Array
         */
        public function getMulti( array $keys ) {
@@ -260,7 +260,7 @@ abstract class BagOStuff {
 
        /**
         * Increase stored value of $key by $value while preserving its TTL
-        * @param $key String: Key to increase
+        * @param string $key Key to increase
         * @param $value Integer: Value to add to $key (Default 1)
         * @return integer|bool New value or false on failure
         */
index 51ce777..c82b3aa 100644 (file)
@@ -251,7 +251,7 @@ class DBABagOStuff extends BagOStuff {
 
                # Insert failed, check to see if it failed due to an expired key
                if ( !$ret ) {
-                       list( $value, $expiry ) = $this->decode( dba_fetch( $key, $handle ) );
+                       list( , $expiry ) = $this->decode( dba_fetch( $key, $handle ) );
 
                        if ( $expiry && $expiry < time() ) {
                                # Yes expired, delete and try again
index cc57ff1..6206057 100644 (file)
@@ -70,8 +70,8 @@ class EmptyBagOStuff extends BagOStuff {
        /**
         * @param $key string
         * @param $callback closure Callback method to be executed
-        * @param $exptime int Either an interval in seconds or a unix timestamp for expiry
-        * @param $attempts int The amount of times to attempt a merge in case of failure
+        * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
+        * @param int $attempts The amount of times to attempt a merge in case of failure
         * @return bool success
         */
        public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
index 4f8209d..3f1fa3a 100644 (file)
@@ -99,7 +99,7 @@ class MemcachedBagOStuff extends BagOStuff {
        /**
         * @param $key string
         * @param $value int
-        * @param $exptime int (default 0)
+        * @param int $exptime (default 0)
         * @return Mixed
         */
        public function add( $key, $value, $exptime = 0 ) {
index 2342d63..0d96ed6 100644 (file)
@@ -99,7 +99,6 @@ class MWMemcached {
 
        // }}}
 
-
        /**
         * Command statistics
         *
@@ -242,7 +241,7 @@ class MWMemcached {
        /**
         * Memcache initializer
         *
-        * @param $args Array Associative array of settings
+        * @param array $args Associative array of settings
         *
         * @return  mixed
         */
@@ -272,7 +271,7 @@ class MWMemcached {
         * Adds a key/value to the memcache server if one isn't already set with
         * that key
         *
-        * @param $key String: key to set with data
+        * @param string $key key to set with data
         * @param $val Mixed: value to store
         * @param $exp Integer: (optional) Expiration time. This can be a number of seconds
         * to cache for (up to 30 days inclusive).  Any timespans of 30 days + 1 second or
@@ -292,7 +291,7 @@ class MWMemcached {
        /**
         * Decrease a value stored on the memcache server
         *
-        * @param $key String: key to decrease
+        * @param string $key key to decrease
         * @param $amt Integer: (optional) amount to decrease
         *
         * @return Mixed: FALSE on failure, value on success
@@ -307,7 +306,7 @@ class MWMemcached {
        /**
         * Deletes a key from the server, optionally after $time
         *
-        * @param $key String: key to delete
+        * @param string $key key to delete
         * @param $time Integer: (optional) how long to wait before deleting
         *
         * @return Boolean: TRUE on success, FALSE on failure
@@ -407,7 +406,7 @@ class MWMemcached {
        /**
         * Retrieves the value associated with the key from the memcache server
         *
-        * @param $key array|string key to retrieve
+        * @param array|string $key key to retrieve
         * @param $casToken[optional] Float
         *
         * @return Mixed
@@ -467,7 +466,7 @@ class MWMemcached {
        /**
         * Get multiple keys from the server(s)
         *
-        * @param $keys Array: keys to retrieve
+        * @param array $keys keys to retrieve
         *
         * @return Array
         */
@@ -531,7 +530,7 @@ class MWMemcached {
        /**
         * Increments $key (optionally) by $amt
         *
-        * @param $key String: key to increment
+        * @param string $key key to increment
         * @param $amt Integer: (optional) amount to increment
         *
         * @return Integer: null if the key does not exist yet (this does NOT
@@ -548,7 +547,7 @@ class MWMemcached {
        /**
         * Overwrites an existing value for key; only works if key is already set
         *
-        * @param $key String: key to set value as
+        * @param string $key key to set value as
         * @param $value Mixed: value to store
         * @param $exp Integer: (optional) Expiration time. This can be a number of seconds
         * to cache for (up to 30 days inclusive).  Any timespans of 30 days + 1 second or
@@ -570,7 +569,7 @@ class MWMemcached {
         * output as an array (null array if no output)
         *
         * @param $sock Resource: socket to send command on
-        * @param $cmd String: command to run
+        * @param string $cmd command to run
         *
         * @return Array: output array
         */
@@ -604,7 +603,7 @@ class MWMemcached {
         * Unconditionally sets a key to a given value in the memcache.  Returns true
         * if set successfully.
         *
-        * @param $key String: key to set value as
+        * @param string $key key to set value as
         * @param $value Mixed: value to set
         * @param $exp Integer: (optional) Expiration time. This can be a number of seconds
         * to cache for (up to 30 days inclusive).  Any timespans of 30 days + 1 second or
@@ -626,7 +625,7 @@ class MWMemcached {
         * to a known, given value.  Returns true if set successfully.
         *
         * @param $casToken Float: current known value
-        * @param $key String: key to set value as
+        * @param string $key key to set value as
         * @param $value Mixed: value to set
         * @param $exp Integer: (optional) Expiration time. This can be a number of seconds
         * to cache for (up to 30 days inclusive).  Any timespans of 30 days + 1 second or
@@ -672,7 +671,7 @@ class MWMemcached {
        /**
         * Sets the server list to distribute key gets and puts between
         *
-        * @param $list Array of servers to connect to
+        * @param array $list of servers to connect to
         *
         * @see     MWMemcached::__construct()
         */
@@ -707,7 +706,7 @@ class MWMemcached {
        /**
         * Close the specified socket
         *
-        * @param $sock String: socket to close
+        * @param string $sock socket to close
         *
         * @access  private
         */
@@ -724,7 +723,7 @@ class MWMemcached {
         * Connects $sock to $host, timing out after $timeout
         *
         * @param $sock Integer: socket to connect
-        * @param $host String: Host:IP to connect to
+        * @param string $host Host:IP to connect to
         *
         * @return  boolean
         * @access  private
@@ -766,7 +765,7 @@ class MWMemcached {
        /**
         * Marks a host as dead until 30-40 seconds in the future
         *
-        * @param $sock String: socket to mark as dead
+        * @param string $sock socket to mark as dead
         *
         * @access  private
         */
@@ -792,7 +791,7 @@ class MWMemcached {
        /**
         * get_sock
         *
-        * @param $key String: key to retrieve value for;
+        * @param string $key key to retrieve value for;
         *
         * @return Mixed: resource on success, false on failure
         * @access private
@@ -841,7 +840,7 @@ class MWMemcached {
        /**
         * Creates a hash integer based on the $key
         *
-        * @param $key String: key to hash
+        * @param string $key key to hash
         *
         * @return Integer: hash value
         * @access private
@@ -859,8 +858,8 @@ class MWMemcached {
        /**
         * Perform increment/decriment on $key
         *
-        * @param $cmd String command to perform
-        * @param $key String|array key to perform it on
+        * @param string $cmd command to perform
+        * @param string|array $key key to perform it on
         * @param $amt Integer amount to adjust
         *
         * @return Integer: new value of $key
@@ -901,41 +900,78 @@ class MWMemcached {
         * Load items into $ret from $sock
         *
         * @param $sock Resource: socket to read from
-        * @param $ret Array: returned values
+        * @param array $ret returned values
         * @param $casToken[optional] Float
         * @return boolean True for success, false for failure
         *
         * @access private
         */
        function _load_items( $sock, &$ret, &$casToken = null ) {
+               $results = array();
+
                while ( 1 ) {
                        $decl = $this->_fgets( $sock );
+
                        if( $decl === false ) {
+                               /*
+                                * If nothing can be read, something is wrong because we know exactly when
+                                * to stop reading (right after "END") and we return right after that.
+                                */
                                return false;
-                       } elseif ( $decl == "END" ) {
-                               return true;
                        } elseif ( preg_match( '/^VALUE (\S+) (\d+) (\d+) (\d+)$/', $decl, $match ) ) {
-                               list( $rkey, $flags, $len, $casToken ) = array( $match[1], $match[2], $match[3], $match[4] );
-                               $data = $this->_fread( $sock, $len + 2 );
-                               if ( $data === false ) {
-                                       return false;
-                               }
-                               if ( substr( $data, -2 ) !== "\r\n" ) {
-                                       $this->_handle_error( $sock,
-                                               'line ending missing from data block from $1' );
+                               /*
+                                * Read all data returned. This can be either one or multiple values.
+                                * Save all that data (in an array) to be processed later: we'll first
+                                * want to continue reading until "END" before doing anything else,
+                                * to make sure that we don't leave our client in a state where it's
+                                * output is not yet fully read.
+                                */
+                               $results[] = array(
+                                       $match[1], // rkey
+                                       $match[2], // flags
+                                       $match[3], // len
+                                       $match[4], // casToken
+                                       $this->_fread( $sock, $match[3] + 2 ), // data
+                               );
+                       } elseif ( $decl == "END" ) {
+                               if ( count( $results ) == 0 ) {
                                        return false;
                                }
-                               $data = substr( $data, 0, -2 );
-                               $ret[$rkey] = $data;
 
-                               if ( $this->_have_zlib && $flags & self::COMPRESSED ) {
-                                       $ret[$rkey] = gzuncompress( $ret[$rkey] );
-                               }
+                               /**
+                                * All data has been read, time to process the data and build
+                                * meaningful return values.
+                                */
+                               foreach ( $results as $vars ) {
+                                       list( $rkey, $flags, $len, $casToken, $data ) = $vars;
+
+                                       if ( $data === false || substr( $data, -2 ) !== "\r\n" ) {
+                                               $this->_handle_error( $sock,
+                                                       'line ending missing from data block from $1' );
+                                               return false;
+                                       }
+                                       $data = substr( $data, 0, -2 );
+                                       $ret[$rkey] = $data;
+
+                                       if ( $this->_have_zlib && $flags & self::COMPRESSED ) {
+                                               $ret[$rkey] = gzuncompress( $ret[$rkey] );
+                                       }
 
-                               if ( $flags & self::SERIALIZED ) {
-                                       $ret[$rkey] = unserialize( $ret[$rkey] );
+                                       /*
+                                        * This unserialize is the exact reason that we only want to
+                                        * process data after having read until "END" (instead of doing
+                                        * this right away): "unserialize" can trigger outside code:
+                                        * in the event that $ret[$rkey] is a serialized object,
+                                        * unserializing it will trigger __wakeup() if present. If that
+                                        * function attempted to read from memcached (while we did not
+                                        * yet read "END"), these 2 calls would collide.
+                                        */
+                                       if ( $flags & self::SERIALIZED ) {
+                                               $ret[$rkey] = unserialize( $ret[$rkey] );
+                                       }
                                }
 
+                               return true;
                        } else {
                                $this->_handle_error( $sock, 'Error parsing response from $1' );
                                return false;
@@ -949,8 +985,8 @@ class MWMemcached {
        /**
         * Performs the requested storage operation to the memcache server
         *
-        * @param $cmd String: command to perform
-        * @param $key String: key to act on
+        * @param string $cmd command to perform
+        * @param string $key key to act on
         * @param $val Mixed: what we need to store
         * @param $exp Integer: (optional) Expiration time. This can be a number of seconds
         * to cache for (up to 30 days inclusive).  Any timespans of 30 days + 1 second or
@@ -1032,7 +1068,7 @@ class MWMemcached {
        /**
         * Returns the socket for the host
         *
-        * @param $host String: Host:IP to get socket for
+        * @param string $host Host:IP to get socket for
         *
         * @return Mixed: IO Stream or false
         * @access private
@@ -1211,7 +1247,6 @@ class MWMemcached {
        // }}}
 }
 
-
 // }}}
 
 class MemCachedClientforWiki extends MWMemcached {
index 9f06fa0..36f5ead 100644 (file)
@@ -206,7 +206,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         * the client, but some day we might find a case where it should be
         * different.
         *
-        * @param $key string The key used by the caller, or false if there wasn't one.
+        * @param string $key The key used by the caller, or false if there wasn't one.
         * @param $result Mixed The return value
         * @return Mixed
         */
index 4120749..92afaac 100644 (file)
@@ -171,8 +171,8 @@ class MultiWriteBagOStuff extends BagOStuff {
        /**
         * @param $key string
         * @param $callback closure Callback method to be executed
-        * @param $exptime int Either an interval in seconds or a unix timestamp for expiry
-        * @param $attempts int The amount of times to attempt a merge in case of failure
+        * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
+        * @param int $attempts The amount of times to attempt a merge in case of failure
         * @return bool success
         */
        public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
index f55da94..bc76294 100644 (file)
@@ -58,7 +58,7 @@ class ObjectCacheSessionHandler {
        /**
         * Get a cache key for the given session id.
         *
-        * @param $id String: session id
+        * @param string $id session id
         * @return String: cache key
         */
        static function getKey( $id ) {
@@ -89,7 +89,7 @@ class ObjectCacheSessionHandler {
        /**
         * Callback when reading session data.
         *
-        * @param $id String: session id
+        * @param string $id session id
         * @return Mixed: session data
         */
        static function read( $id ) {
@@ -103,7 +103,7 @@ class ObjectCacheSessionHandler {
        /**
         * Callback when writing session data.
         *
-        * @param $id String: session id
+        * @param string $id session id
         * @param $data Mixed: session data
         * @return Boolean: success
         */
@@ -116,7 +116,7 @@ class ObjectCacheSessionHandler {
        /**
         * Callback to destroy a session when calling session_destroy().
         *
-        * @param $id String: session id
+        * @param string $id session id
         * @return Boolean: success
         */
        static function destroy( $id ) {
index a9f5f8c..f9feaf9 100644 (file)
@@ -19,6 +19,7 @@
  *
  * @file
  */
+
 class RedisBagOStuff extends BagOStuff {
        /** @var RedisConnectionPool */
        protected $redisPool;
index 2404703..87f787d 100644 (file)
@@ -133,7 +133,7 @@ class SqlBagOStuff extends BagOStuff {
                        } else {
                                /*
                                 * We must keep a separate connection to MySQL in order to avoid deadlocks
-                                * However, SQLite has an opposite behaviour. And PostgreSQL needs to know
+                                * However, SQLite has an opposite behavior. And PostgreSQL needs to know
                                 * if we are in transaction or no
                                 */
                                if ( wfGetDB( DB_MASTER )->getType() == 'mysql' ) {
index 83f51f9..6d9b47a 100644 (file)
@@ -32,7 +32,7 @@ class WinCacheBagOStuff extends BagOStuff {
        /**
         * Get a value from the WinCache object cache
         *
-        * @param $key String: cache key
+        * @param string $key cache key
         * @param $casToken[optional] int: cas token
         * @return mixed
         */
@@ -51,9 +51,9 @@ class WinCacheBagOStuff extends BagOStuff {
        /**
         * Store a value in the WinCache object cache
         *
-        * @param $key String: cache key
+        * @param string $key cache key
         * @param $value Mixed: object to store
-        * @param $expire Int: expiration time
+        * @param int $expire expiration time
         * @return bool
         */
        public function set( $key, $value, $expire = 0 ) {
@@ -67,10 +67,10 @@ class WinCacheBagOStuff extends BagOStuff {
        /**
         * Store a value in the WinCache object cache, race condition-safe
         *
-        * @param $casToken int: cas token
-        * @param $key String: cache key
-        * @param $value int: object to store
-        * @param $exptime Int: expiration time
+        * @param int $casToken cas token
+        * @param string $key cache key
+        * @param int $value object to store
+        * @param int $exptime expiration time
         * @return bool
         */
        public function cas( $casToken, $key, $value, $exptime = 0 ) {
@@ -80,8 +80,8 @@ class WinCacheBagOStuff extends BagOStuff {
        /**
         * Remove a value from the WinCache object cache
         *
-        * @param $key String: cache key
-        * @param $time Int: not used in this implementation
+        * @param string $key cache key
+        * @param int $time not used in this implementation
         * @return bool
         */
        public function delete( $key, $time = 0 ) {
index 2722e9c..0f45db7 100644 (file)
@@ -31,7 +31,7 @@ class XCacheBagOStuff extends BagOStuff {
        /**
         * Get a value from the XCache object cache
         *
-        * @param $key String: cache key
+        * @param string $key cache key
         * @param $casToken mixed: cas token
         * @return mixed
         */
@@ -54,9 +54,9 @@ class XCacheBagOStuff extends BagOStuff {
        /**
         * Store a value in the XCache object cache
         *
-        * @param $key String: cache key
+        * @param string $key cache key
         * @param $value Mixed: object to store
-        * @param $expire Int: expiration time
+        * @param int $expire expiration time
         * @return bool
         */
        public function set( $key, $value, $expire = 0 ) {
@@ -83,8 +83,8 @@ class XCacheBagOStuff extends BagOStuff {
        /**
         * Remove a value from the XCache object cache
         *
-        * @param $key String: cache key
-        * @param $time Int: not used in this implementation
+        * @param string $key cache key
+        * @param int $time not used in this implementation
         * @return bool
         */
        public function delete( $key, $time = 0 ) {
@@ -99,8 +99,8 @@ class XCacheBagOStuff extends BagOStuff {
         *
         * @param $key string
         * @param $callback closure Callback method to be executed
-        * @param $exptime int Either an interval in seconds or a unix timestamp for expiry
-        * @param $attempts int The amount of times to attempt a merge in case of failure
+        * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
+        * @param int $attempts The amount of times to attempt a merge in case of failure
         * @return bool success
         */
        public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
index 881dded..6b70e1d 100644 (file)
@@ -116,7 +116,7 @@ class CacheTime {
         * per-article cache invalidation timestamps, or if it comes from
         * an incompatible older version.
         *
-        * @param $touched String: the affected article's last touched timestamp
+        * @param string $touched the affected article's last touched timestamp
         * @return Boolean
         */
        public function expired( $touched ) {
index a1b7ca0..542ac0f 100644 (file)
@@ -175,8 +175,8 @@ class CoreParserFunctions {
         * For links to "wiki"s, or similar software, spaces are encoded as '_',
         *
         * @param $parser Parser object
-        * @param $s String: The text to encode.
-        * @param $arg String (optional): The type of encoding.
+        * @param string $s The text to encode.
+        * @param string $arg (optional): The type of encoding.
         * @return string
         */
        static function urlencode( $parser, $s = '', $arg = null ) {
@@ -353,7 +353,7 @@ class CoreParserFunctions {
         * title which will normalise to the canonical title
         *
         * @param $parser Parser: parent parser
-        * @param $text String: desired title text
+        * @param string $text desired title text
         * @return String
         */
        static function displaytitle( $parser, $text = '' ) {
@@ -442,7 +442,6 @@ class CoreParserFunctions {
                return self::formatRaw( SiteStats::numberingroup( strtolower( $name ) ), $raw );
        }
 
-
        /**
         * Given a title, return the namespace name that would be given by the
         * corresponding magic word
@@ -646,7 +645,7 @@ class CoreParserFunctions {
         * @todo Document parameters
         *
         * @param $parser Parser
-        * @param $page String TODO DOCUMENT (Default: empty string)
+        * @param string $page TODO DOCUMENT (Default: empty string)
         * @param $raw TODO DOCUMENT (Default: null)
         * @return string
         */
@@ -700,8 +699,8 @@ class CoreParserFunctions {
        /**
         * Gives language names.
         * @param $parser Parser
-        * @param $code String  Language code (of which to get name)
-        * @param $inLanguage String  Language code (in which to get name)
+        * @param string $code  Language code (of which to get name)
+        * @param string $inLanguage  Language code (in which to get name)
         * @return String
         */
        static function language( $parser, $code = '', $inLanguage = '' ) {
@@ -773,8 +772,8 @@ class CoreParserFunctions {
 
        /**
         * @param $parser Parser
-        * @param $text String The sortkey to use
-        * @param $uarg String Either "noreplace" or "noerror" (in en)
+        * @param string $text The sortkey to use
+        * @param string $uarg Either "noreplace" or "noerror" (in en)
         *   both suppress errors, and noreplace does nothing if
         *   a default sortkey already exists.
         * @return string
index 88d68a7..167424a 100644 (file)
@@ -55,7 +55,7 @@ class DateFormatter {
                $this->lang = $lang;
 
                $this->monthNames = $this->getMonthRegex();
-               for ( $i=1; $i<=12; $i++ ) {
+               for ( $i = 1; $i <= 12; $i++ ) {
                        $this->xMonths[$this->lang->lc( $this->lang->getMonthName( $i ) )] = $i;
                        $this->xMonths[$this->lang->lc( $this->lang->getMonthAbbreviation( $i ) )] = $i;
                }
@@ -140,9 +140,9 @@ class DateFormatter {
        }
 
        /**
-        * @param $preference String: User preference
-        * @param $text String: Text to reformat
-        * @param $options Array: can contain 'linked' and/or 'match-whole'
+        * @param string $preference User preference
+        * @param string $text Text to reformat
+        * @param array $options can contain 'linked' and/or 'match-whole'
         * @return mixed|String
         */
        function reformat( $preference, $text, $options = array( 'linked' ) ) {
@@ -154,7 +154,7 @@ class DateFormatter {
                } else {
                        $preference = self::NONE;
                }
-               for ( $i=1; $i<=self::LAST; $i++ ) {
+               for ( $i = 1; $i <= self::LAST; $i++ ) {
                        $this->mSource = $i;
                        if ( isset ( $this->rules[$preference][$i] ) ) {
                                # Specific rules
@@ -203,7 +203,7 @@ class DateFormatter {
 
                $bits = array();
                $key = $this->keys[$this->mSource];
-               for ( $p=0; $p < strlen( $key ); $p++ ) {
+               for ( $p = 0; $p < strlen( $key ); $p++ ) {
                        if ( $key[$p] != ' ' ) {
                                $bits[$key[$p]] = $matches[$p+1];
                        }
@@ -250,7 +250,7 @@ class DateFormatter {
                        $bits['d'] = sprintf( '%02d', $bits['j'] );
                }
 
-               for ( $p=0; $p < strlen( $format ); $p++ ) {
+               for ( $p = 0; $p < strlen( $format ); $p++ ) {
                        $char = $format[$p];
                        switch ( $char ) {
                                case 'd': # ISO day of month
@@ -321,7 +321,7 @@ class DateFormatter {
 
        /**
         * Makes an ISO month, e.g. 02, from a month name
-        * @param $monthName String: month name
+        * @param string $monthName month name
         * @return string ISO month name
         */
        function makeIsoMonth( $monthName ) {
@@ -331,7 +331,7 @@ class DateFormatter {
 
        /**
         * @todo document
-        * @param $year String: Year name
+        * @param string $year Year name
         * @return string ISO year name
         */
        function makeIsoYear( $year ) {
index ff1e0af..49b2d33 100644 (file)
@@ -111,7 +111,7 @@ class LinkHolderArray {
         * strings will be returned.
         *
         * @param $other LinkHolderArray
-        * @param $texts Array of strings
+        * @param array $texts of strings
         * @return Array
         */
        function mergeForeign( $other, $texts ) {
@@ -210,9 +210,9 @@ class LinkHolderArray {
         *
         * @param $nt Title
         * @param $text String
-        * @param $query Array [optional]
-        * @param $trail String [optional]
-        * @param $prefix String [optional]
+        * @param array $query [optional]
+        * @param string $trail [optional]
+        * @param string $prefix [optional]
         * @return string
         */
        function makeHolder( $nt, $text = '', $query = array(), $trail = '', $prefix = '' ) {
@@ -513,7 +513,6 @@ class LinkHolderArray {
                        }
                }
 
-
                if( !$linkBatch->isEmpty() ) {
                        // construct query
                        $dbr = wfGetDB( DB_SLAVE );
@@ -614,7 +613,7 @@ class LinkHolderArray {
         */
        function replaceTextCallback( $matches ) {
                $type = $matches[1];
-               $key  = $matches[2];
+               $key = $matches[2];
                if( $type == 'LINK' ) {
                        list( $ns, $index ) = explode( ':', $key, 2 );
                        if( isset( $this->internals[$ns][$index]['text'] ) ) {
index ed5071e..7f21449 100644 (file)
@@ -122,8 +122,8 @@ class Parser {
        var $mFunctionHooks = array();
        var $mFunctionSynonyms = array( 0 => array(), 1 => array() );
        var $mFunctionTagHooks = array();
-       var $mStripList  = array();
-       var $mDefaultStripList  = array();
+       var $mStripList = array();
+       var $mDefaultStripList = array();
        var $mVarCache = array();
        var $mImageParams = array();
        var $mImageParamsMagicArray = array();
@@ -305,12 +305,11 @@ class Parser {
                 * string constructs.
                 *
                 * Must not consist of all title characters, or else it will change
-                * the behaviour of <nowiki> in a link.
+                * the behavior of <nowiki> in a link.
                 */
                $this->mUniqPrefix = "\x7fUNIQ" . self::getRandomString();
                $this->mStripState = new StripState( $this->mUniqPrefix );
 
-
                # Clear these on every parse, bug 4549
                $this->mTplExpandCache = $this->mTplRedirCache = $this->mTplDomCache = array();
 
@@ -341,12 +340,12 @@ class Parser {
         * Convert wikitext to HTML
         * Do not call this function recursively.
         *
-        * @param $text String: text we want to parse
+        * @param string $text text we want to parse
         * @param $title Title object
         * @param $options ParserOptions
         * @param $linestart boolean
         * @param $clearState boolean
-        * @param $revid Int: number to pass in {{REVISIONID}}
+        * @param int $revid number to pass in {{REVISIONID}}
         * @return ParserOutput a ParserOutput
         */
        public function parse( $text, Title $title, ParserOptions $options, $linestart = true, $clearState = true, $revid = null ) {
@@ -527,7 +526,7 @@ class Parser {
         *
         * If $frame is not provided, then template variables (e.g., {{{1}}}) within $text are not expanded
         *
-        * @param $text String: text extension wants to have parsed
+        * @param string $text text extension wants to have parsed
         * @param $frame PPFrame: The frame to use for expanding any template variables
         *
         * @return string
@@ -564,7 +563,7 @@ class Parser {
         * Recursive parser entry point that can be called from an extension tag
         * hook.
         *
-        * @param $text String: text to be expanded
+        * @param string $text text to be expanded
         * @param $frame PPFrame: The frame to use for expanding any template variables
         * @return String
         * @since 1.19
@@ -694,7 +693,7 @@ class Parser {
        /**
         * Accessor/mutator for the output type
         *
-        * @param $x int|null New value or null to just get the current one
+        * @param int|null $x New value or null to just get the current one
         * @return Integer
         */
        function OutputType( $x = null ) {
@@ -821,9 +820,9 @@ class Parser {
         *     '<element param="x">tag content</element>' ) )
         * @endcode
         *
-        * @param $elements array list of element names. Comments are always extracted.
-        * @param $text string Source text string.
-        * @param $matches array Out parameter, Array: extracted tags
+        * @param array $elements list of element names. Comments are always extracted.
+        * @param string $text Source text string.
+        * @param array $matches Out parameter, Array: extracted tags
         * @param $uniq_prefix string
         * @return String: stripped text
         */
@@ -843,16 +842,16 @@ class Parser {
                        }
                        if ( count( $p ) > 5 ) {
                                # comment
-                               $element    = $p[4];
+                               $element = $p[4];
                                $attributes = '';
-                               $close      = '';
-                               $inside     = $p[5];
+                               $close = '';
+                               $inside = $p[5];
                        } else {
                                # tag
-                               $element    = $p[1];
+                               $element = $p[1];
                                $attributes = $p[2];
-                               $close      = $p[3];
-                               $inside     = $p[4];
+                               $close = $p[3];
+                               $inside = $p[4];
                        }
 
                        $marker = "$uniq_prefix-$element-" . sprintf( '%08X', $n++ ) . self::MARKER_SUFFIX;
@@ -1005,7 +1004,7 @@ class Parser {
                                array_push( $tr_history, false );
                                array_push( $td_history, false );
                                array_push( $last_tag_history, '' );
-                       } elseif ( $first_character === '|' || $first_character === '!' || substr( $line, 0, 2 )  === '|+' ) {
+                       } elseif ( $first_character === '|' || $first_character === '!' || substr( $line, 0, 2 ) === '|+' ) {
                                # This might be cell elements, td, th or captions
                                if ( substr( $line, 0, 2 ) === '|+' ) {
                                        $first_character = '+';
@@ -1314,7 +1313,6 @@ class Parser {
                return $text . $trail;
        }
 
-
        /**
         * Parse headers and return html
         *
@@ -1542,8 +1540,7 @@ class Parser {
                $i = 0;
                while ( $i<count( $bits ) ) {
                        $url = $bits[$i++];
-                       // @todo FIXME: Unused variable.
-                       $protocol = $bits[$i++];
+                       $i++; // protocol
                        $text = $bits[$i++];
                        $trail = $bits[$i++];
 
@@ -1605,7 +1602,7 @@ class Parser {
         * Get the rel attribute for a particular external link.
         *
         * @since 1.21
-        * @param $url String|bool optional URL, to extract the domain from for rel =>
+        * @param string|bool $url optional URL, to extract the domain from for rel =>
         *   nofollow if appropriate
         * @param $title Title optional Title, for wgNoFollowNsExceptions lookups
         * @return string|null rel attribute for $url
@@ -1626,7 +1623,7 @@ class Parser {
         * (depending on configuration, namespace, and the URL's domain) and/or a
         * target attribute (depending on configuration).
         *
-        * @param $url String|bool optional URL, to extract the domain from for rel =>
+        * @param string|bool $url optional URL, to extract the domain from for rel =>
         *   nofollow if appropriate
         * @return Array associative array of HTML attributes
         */
@@ -1952,7 +1949,7 @@ class Parser {
                                wfProfileOut( __METHOD__ . "-might_be_img" );
                        }
 
-                       $wasblank = ( $text  == '' );
+                       $wasblank = ( $text == '' );
                        if ( $wasblank ) {
                                $text = $link;
                        } else {
@@ -2092,7 +2089,7 @@ class Parser {
         *
         * @param $nt Title
         * @param $text String
-        * @param $query Array or String
+        * @param array $query or String
         * @param $trail String
         * @param $prefix String
         * @return String: HTML-wikitext mix oh yuck
@@ -2119,7 +2116,7 @@ class Parser {
         * Not needed quite as much as it used to be since free links are a bit
         * more sensible these days. But bracketed links are still an issue.
         *
-        * @param $text String: more-or-less HTML
+        * @param string $text more-or-less HTML
         * @return String: less-or-more HTML with NOPARSE bits
         */
        function armorLinks( $text ) {
@@ -2139,7 +2136,7 @@ class Parser {
        /**
         * Handle link to subpage if necessary
         *
-        * @param $target String: the source of the link
+        * @param string $target the source of the link
         * @param &$text String: the link text, modified as necessary
         * @return string the full name of the link
         * @private
@@ -2459,7 +2456,7 @@ class Parser {
         * Split up a string on ':', ignoring any occurrences inside tags
         * to prevent illegal overlapping.
         *
-        * @param $str String the string to split
+        * @param string $str the string to split
         * @param &$before String set to everything before the ':'
         * @param &$after String set to everything after the ':'
         * @throws MWException
@@ -2988,7 +2985,7 @@ class Parser {
         * Preprocess some wikitext and return the document tree.
         * This is the ghost of replace_variables().
         *
-        * @param $text String: The text to parse
+        * @param string $text The text to parse
         * @param $flags Integer: bitwise combination of:
         *          self::PTD_FOR_INCLUSION    Handle "<noinclude>" and "<includeonly>" as if the text is being
         *                                     included. Default is to assume a direct page view.
@@ -3043,7 +3040,7 @@ class Parser {
         *  self::OT_PREPROCESS: templates but not extension tags
         *  self::OT_HTML: all templates and extension tags
         *
-        * @param $text String the text to transform
+        * @param string $text the text to transform
         * @param $frame PPFrame Object describing the arguments passed to the template.
         *        Arguments may also be provided as an associative array, as was the usual case before MW1.12.
         *        Providing arguments this way may be useful for extensions wishing to perform variable replacement explicitly.
@@ -3107,7 +3104,7 @@ class Parser {
         * Warn the user when a parser limitation is reached
         * Will warn at most once the user per limitation type
         *
-        * @param $limitationType String: should be one of:
+        * @param string $limitationType should be one of:
         *   'expensive-parserfunction' (corresponding messages:
         *       'expensive-parserfunction-warning',
         *       'expensive-parserfunction-category')
@@ -3117,8 +3114,8 @@ class Parser {
         *   'post-expand-template-inclusion' (corresponding messages:
         *       'post-expand-template-inclusion-warning',
         *       'post-expand-template-inclusion-category')
-        * @param $current int|null Current value
-        * @param $max int|null Maximum allowed, when an explicit limit has been
+        * @param int|null $current Current value
+        * @param int|null $max Maximum allowed, when an explicit limit has been
         *       exceeded, provide the values (optional)
         */
        function limitationWarn( $limitationType, $current = '', $max = '' ) {
@@ -3133,7 +3130,7 @@ class Parser {
         * Return the text of a template, after recursively
         * replacing any variables or templates within the template.
         *
-        * @param $piece Array: the parts of the template
+        * @param array $piece the parts of the template
         *  $piece['title']: the title, i.e. the part before the |
         *  $piece['parts']: the parameter array
         *  $piece['lineStart']: whether the brace was at the start of a line
@@ -3471,7 +3468,7 @@ class Parser {
                {
                        # Bug 529: if the template begins with a table or block-level
                        # element, it should be treated as beginning a new line.
-                       # This behaviour is somewhat controversial.
+                       # This behavior is somewhat controversial.
                        $text = "\n" . $text;
                }
 
@@ -3658,7 +3655,7 @@ class Parser {
         * Fetch a file and its title and register a reference to it.
         * If 'broken' is a key in $options then the file will appear as a broken thumbnail.
         * @param Title $title
-        * @param Array $options Array of options to RepoGroup::findFile
+        * @param array $options Array of options to RepoGroup::findFile
         * @return File|bool
         */
        function fetchFile( $title, $options = array() ) {
@@ -3670,7 +3667,7 @@ class Parser {
         * Fetch a file and its title and register a reference to it.
         * If 'broken' is a key in $options then the file will appear as a broken thumbnail.
         * @param Title $title
-        * @param Array $options Array of options to RepoGroup::findFile
+        * @param array $options Array of options to RepoGroup::findFile
         * @return Array ( File or false, Title of file )
         */
        function fetchFileAndTitle( $title, $options = array() ) {
@@ -3808,7 +3805,7 @@ class Parser {
         * Return the text to be used for a given extension tag.
         * This is the ghost of strip().
         *
-        * @param $params array Associative array of parameters:
+        * @param array $params Associative array of parameters:
         *     name       PPNode for the tag name
         *     attr       PPNode for unparsed text where tag attributes are thought to be
         *     attributes Optional associative array of parsed attributes
@@ -3847,7 +3844,7 @@ class Parser {
                                $output = call_user_func_array( $this->mTagHooks[$name],
                                        array( $content, $attributes, $this, $frame ) );
                        } elseif ( isset( $this->mFunctionTagHooks[$name] ) ) {
-                               list( $callback, $flags ) = $this->mFunctionTagHooks[$name];
+                               list( $callback, ) = $this->mFunctionTagHooks[$name];
                                if ( !is_callable( $callback ) ) {
                                        throw new MWException( "Tag hook for $name is not callable\n" );
                                }
@@ -3898,7 +3895,7 @@ class Parser {
        /**
         * Increment an include size counter
         *
-        * @param $type String: the type of expansion
+        * @param string $type the type of expansion
         * @param $size Integer: the size of the text
         * @return Boolean: false if this inclusion would take it over the maximum, true otherwise
         */
@@ -3984,7 +3981,7 @@ class Parser {
         * Add a tracking category, getting the title from a system message,
         * or print a debug message if the title is invalid.
         *
-        * @param $msg String: message key
+        * @param string $msg message key
         * @return Boolean: whether the addition was successful
         */
        public function addTrackingCategory( $msg ) {
@@ -4024,7 +4021,7 @@ class Parser {
         * string and re-inserts the newly formatted headlines.
         *
         * @param $text String
-        * @param $origText String: original, untouched wikitext
+        * @param string $origText original, untouched wikitext
         * @param $isMain Boolean
         * @return mixed|string
         * @private
@@ -4120,7 +4117,7 @@ class Parser {
                                # Increase TOC level
                                $toclevel++;
                                $sublevelCount[$toclevel] = 0;
-                               if ( $toclevel<$wgMaxTocLevel ) {
+                               if ( $toclevel < $wgMaxTocLevel ) {
                                        $prevtoclevel = $toclevel;
                                        $toc .= Linker::tocIndent();
                                        $numVisible++;
@@ -4142,7 +4139,7 @@ class Parser {
                                if ( $i == 0 ) {
                                        $toclevel = 1;
                                }
-                               if ( $toclevel<$wgMaxTocLevel ) {
+                               if ( $toclevel < $wgMaxTocLevel ) {
                                        if ( $prevtoclevel < $wgMaxTocLevel ) {
                                                # Unindent only if the previous toc level was shown :p
                                                $toc .= Linker::tocUnindent( $prevtoclevel - $toclevel );
@@ -4153,7 +4150,7 @@ class Parser {
                                }
                        } else {
                                # No change in level, end TOC line
-                               if ( $toclevel<$wgMaxTocLevel ) {
+                               if ( $toclevel < $wgMaxTocLevel ) {
                                        $toc .= Linker::tocLineEnd();
                                }
                        }
@@ -4401,7 +4398,7 @@ class Parser {
         * Transform wiki markup when saving a page by doing "\r\n" -> "\n"
         * conversion, substitting signatures, {{subst:}} templates, etc.
         *
-        * @param $text String: the text to transform
+        * @param string $text the text to transform
         * @param $title Title: the Title object for the current article
         * @param $user User: the User object describing the current user
         * @param $options ParserOptions: parsing options
@@ -4524,7 +4521,7 @@ class Parser {
         * as it may have changed if it's the $wgParser.
         *
         * @param $user User
-        * @param $nickname String|bool nickname to use or false to use user's default nickname
+        * @param string|bool $nickname nickname to use or false to use user's default nickname
         * @param $fancySig Boolean|null whether the nicknname is the complete signature
         *                  or null to use default value
         * @return string
@@ -4587,7 +4584,7 @@ class Parser {
         * 2) Substitute all transclusions
         *
         * @param $text String
-        * @param $parsing bool Whether we're cleaning (preferences save) or parsing
+        * @param bool $parsing Whether we're cleaning (preferences save) or parsing
         * @return String: signature text
         */
        public function cleanSig( $text, $parsing = false ) {
@@ -4662,7 +4659,7 @@ class Parser {
        /**
         * Wrapper for preprocess()
         *
-        * @param $text String: the text to preprocess
+        * @param string $text the text to preprocess
         * @param $options ParserOptions: options
         * @param $title Title object or null to use $wgTitle
         * @return String
@@ -4780,7 +4777,7 @@ class Parser {
         *   nowiki                    Wiki markup in the return value should be escaped
         *   isHTML                    The returned text is HTML, armour it against wikitext transformation
         *
-        * @param $id String: The magic word ID
+        * @param string $id The magic word ID
         * @param $callback Mixed: the callback function (and object) to use
         * @param $flags Integer: a combination of the following flags:
         *     SFH_NO_HASH   No leading hash, i.e. {{plural:...}} instead of {{#if:...}}
@@ -5358,8 +5355,8 @@ class Parser {
         *
         * External callers should use the getSection and replaceSection methods.
         *
-        * @param $text String: Page wikitext
-        * @param $section String: a section identifier string of the form:
+        * @param string $text Page wikitext
+        * @param string $section a section identifier string of the form:
         *   "<flag1> - <flag2> - ... - <section number>"
         *
         * Currently the only recognised flag is "T", which means the target section number
@@ -5376,8 +5373,8 @@ class Parser {
         * string. If $text is the empty string and section 0 is replaced, $newText is
         * returned.
         *
-        * @param $mode String: one of "get" or "replace"
-        * @param $newText String: replacement text for section data.
+        * @param string $mode one of "get" or "replace"
+        * @param string $newText replacement text for section data.
         * @return String: for "get", the extracted section text.
         *                 for "replace", the whole page with the section replaced.
         */
@@ -5497,9 +5494,9 @@ class Parser {
         *
         * If a section contains subsections, these are also returned.
         *
-        * @param $text String: text to look in
-        * @param $section String: section identifier
-        * @param $deftext String: default to return if section is not found
+        * @param string $text text to look in
+        * @param string $section section identifier
+        * @param string $deftext default to return if section is not found
         * @return string text of the requested section
         */
        public function getSection( $text, $section, $deftext = '' ) {
@@ -5511,9 +5508,9 @@ class Parser {
         * specified by $section has been replaced with $text. If the target
         * section does not exist, $oldtext is returned unchanged.
         *
-        * @param $oldtext String: former text of the article
-        * @param $section int section identifier
-        * @param $text String: replacing text
+        * @param string $oldtext former text of the article
+        * @param int $section section identifier
+        * @param string $text replacing text
         * @return String: modified text
         */
        public function replaceSection( $oldtext, $section, $text ) {
@@ -5595,7 +5592,7 @@ class Parser {
        /**
         * Mutator for $mDefaultSort
         *
-        * @param $sort string New value
+        * @param string $sort New value
         */
        public function setDefaultSort( $sort ) {
                $this->mDefaultSort = $sort;
@@ -5651,7 +5648,7 @@ class Parser {
         * instead.  For use in redirects, since IE6 interprets Redirect: headers
         * as something other than UTF-8 (apparently?), resulting in breakage.
         *
-        * @param $text String: The section name
+        * @param string $text The section name
         * @return string An anchor
         */
        public function guessLegacySectionNameFromWikiText( $text ) {
@@ -5671,7 +5668,7 @@ class Parser {
         * to create valid section anchors by mimicing the output of the
         * parser when headings are parsed.
         *
-        * @param $text String: text string to be stripped of wikitext
+        * @param string $text text string to be stripped of wikitext
         * for use in a Section anchor
         * @return string Filtered text string
         */
@@ -5822,7 +5819,7 @@ class Parser {
         * If the $data array has been stored persistently, the caller should first
         * check whether it is still valid, by calling isValidHalfParsedText().
         *
-        * @param $data array Serialized data
+        * @param array $data Serialized data
         * @throws MWException
         * @return String
         */
index bd4bcac..3eb83e3 100644 (file)
@@ -505,7 +505,6 @@ class ParserOptions {
                        $confstr .= '*';
                }
 
-
                // Space assigned for the stubthreshold but unused
                // since it disables the parser cache, its value will always
                // be 0 when this function is called by parsercache.
index 27b75ac..db649f1 100644 (file)
@@ -156,8 +156,8 @@ class ParserOutput extends CacheTime {
        /**
         * Checks, if a url is pointing to the own server
         *
-        * @param $internal String the server to check against
-        * @param $url String the url to check
+        * @param string $internal the server to check against
+        * @param string $url the url to check
         * @return bool
         */
        static function isLinkInternal( $internal, $url ) {
@@ -220,9 +220,9 @@ class ParserOutput extends CacheTime {
 
        /**
         * Register a file dependency for this output
-        * @param $name string Title dbKey
-        * @param $timestamp string MW timestamp of file creation (or false if non-existing)
-        * @param $sha1 string base 36 SHA-1 of file (or false if non-existing)
+        * @param string $name Title dbKey
+        * @param string $timestamp MW timestamp of file creation (or false if non-existing)
+        * @param string $sha1 base 36 SHA-1 of file (or false if non-existing)
         * @return void
         */
        function addImage( $name, $timestamp = null, $sha1 = null ) {
@@ -315,7 +315,7 @@ class ParserOutput extends CacheTime {
         * -- this is assumed to have been validated
         * (check equal normalisation, etc.)
         *
-        * @param $text String: desired title text
+        * @param string $text desired title text
         */
        public function setDisplayTitle( $text ) {
                $this->setTitleText( $text );
@@ -418,7 +418,6 @@ class ParserOutput extends CacheTime {
                return $this->mProperties;
        }
 
-
        /**
         * Returns the options from its ParserOptions which have been taken
         * into account to produce this output or false if not available.
index 687dceb..aeacd2e 100644 (file)
@@ -205,7 +205,6 @@ interface PPNode {
         */
        function getChildrenOfType( $type );
 
-
        /**
         * Returns the length of the array, or false if this is not an array-type node
         */
index 468802d..d0c57ab 100644 (file)
@@ -110,7 +110,7 @@ class Preprocessor_DOM implements Preprocessor {
         * Preprocess some wikitext and return the document tree.
         * This is the ghost of Parser::replace_variables().
         *
-        * @param $text String: the text to parse
+        * @param string $text the text to parse
         * @param $flags Integer: bitwise combination of:
         *          Parser::PTD_FOR_INCLUSION    Handle "<noinclude>" and "<includeonly>" as if the text is being
         *                                     included. Default is to assume a direct page view.
@@ -522,7 +522,7 @@ class Preprocessor_DOM implements Preprocessor {
                                if ( $equalsLength > 0 ) {
                                        if ( $searchStart - $equalsLength == $piece->startPos ) {
                                                // This is just a single string of equals signs on its own line
-                                               // Replicate the doHeadings behaviour /={count}(.+)={count}/
+                                               // Replicate the doHeadings behavior /={count}(.+)={count}/
                                                // First find out how many equals signs there really are (don't stop at 6)
                                                $count = $equalsLength;
                                                if ( $count < 3 ) {
@@ -911,7 +911,6 @@ class PPFrame_DOM implements PPFrame {
         */
        var $depth;
 
-
        /**
         * Construct a new preprocessor frame.
         * @param $preprocessor Preprocessor The parent preprocessor
index c22da64..fad1adb 100644 (file)
@@ -89,7 +89,7 @@ class Preprocessor_Hash implements Preprocessor {
         * Preprocess some wikitext and return the document tree.
         * This is the ghost of Parser::replace_variables().
         *
-        * @param $text String: the text to parse
+        * @param string $text the text to parse
         * @param $flags Integer: bitwise combination of:
         *          Parser::PTD_FOR_INCLUSION    Handle "<noinclude>" and "<includeonly>" as if the text is being
         *                                     included. Default is to assume a direct page view.
@@ -462,7 +462,7 @@ class Preprocessor_Hash implements Preprocessor {
                                if ( $equalsLength > 0 ) {
                                        if ( $searchStart - $equalsLength == $piece->startPos ) {
                                                // This is just a single string of equals signs on its own line
-                                               // Replicate the doHeadings behaviour /={count}(.+)={count}/
+                                               // Replicate the doHeadings behavior /={count}(.+)={count}/
                                                // First find out how many equals signs there really are (don't stop at 6)
                                                $count = $equalsLength;
                                                if ( $count < 3 ) {
@@ -861,7 +861,6 @@ class PPFrame_Hash implements PPFrame {
         */
        var $depth;
 
-
        /**
         * Construct a new preprocessor frame.
         * @param $preprocessor Preprocessor: the parent preprocessor
index 4994d3e..0f7e0d3 100644 (file)
@@ -118,7 +118,7 @@ class MWTidy {
         * If tidy isn't able to correct the markup, the original will be
         * returned in all its glory with a warning comment appended.
         *
-        * @param $text String: hideous HTML input
+        * @param string $text hideous HTML input
         * @return String: corrected HTML output
         */
        public static function tidy( $text ) {
@@ -171,7 +171,7 @@ class MWTidy {
         * Spawn an external HTML tidy process and get corrected markup back from it.
         * Also called in OutputHandler.php for full page validation
         *
-        * @param $text String: HTML to check
+        * @param string $text HTML to check
         * @param $stderr Boolean: Whether to read result from STDERR rather than STDOUT
         * @param &$retval int Exit code (-1 on internal error)
         * @return mixed String or null
@@ -235,7 +235,7 @@ class MWTidy {
         * Use the HTML tidy extension to use the tidy library in-process,
         * saving the overhead of spawning a new process.
         *
-        * @param $text String: HTML to check
+        * @param string $text HTML to check
         * @param $stderr Boolean: Whether to read result from error status instead of output
         * @param &$retval int Exit code (-1 on internal error)
         * @return mixed String or null
index 1ead836..5ecdc4f 100644 (file)
@@ -28,7 +28,7 @@
 
 /**
  * Begin profiling of a function
- * @param $functionname String: name of the function we will profile
+ * @param string $functionname name of the function we will profile
  */
 function wfProfileIn( $functionname ) {
        global $wgProfiler;
@@ -39,7 +39,7 @@ function wfProfileIn( $functionname ) {
 
 /**
  * Stop profiling of a function
- * @param $functionname String: name of the function we have profiled
+ * @param string $functionname name of the function we have profiled
  */
 function wfProfileOut( $functionname = 'missing' ) {
        global $wgProfiler;
@@ -250,7 +250,7 @@ class Profiler {
        /**
         * Recursive function the format the current profiling array into a tree
         *
-        * @param $stack array profiling array
+        * @param array $stack profiling array
         * @return array
         */
        function remapCallTree( $stack ) {
@@ -305,7 +305,7 @@ class Profiler {
         * Get the initial time of the request, based either on $wgRequestTime or
         * $wgRUstart. Will return null if not able to find data.
         *
-        * @param $metric string|false: metric to use, with the following possibilities:
+        * @param string|false $metric metric to use, with the following possibilities:
         *   - user: User CPU time (without system calls)
         *   - cpu: Total CPU time (user and system calls)
         *   - wall (or any other string): elapsed time
@@ -338,7 +338,7 @@ class Profiler {
         * Get the initial time of the request, based either on $wgRequestTime or
         * $wgRUstart. Will return null if not able to find data.
         *
-        * @param $metric string|false: metric to use, with the following possibilities:
+        * @param string|false $metric metric to use, with the following possibilities:
         *   - user: User CPU time (without system calls)
         *   - cpu: Total CPU time (user and system calls)
         *   - wall (or any other string): elapsed time
@@ -460,7 +460,7 @@ class Profiler {
 
                $width = 140;
                $nameWidth = $width - 65;
-               $format =      "%-{$nameWidth}s %6d %13.3f %13.3f %13.3f%% %9d  (%13.3f -%13.3f) [%d]\n";
+               $format = "%-{$nameWidth}s %6d %13.3f %13.3f %13.3f%% %9d  (%13.3f -%13.3f) [%d]\n";
                $titleFormat = "%-{$nameWidth}s %6s %13s %13s %13s %9s\n";
                $prof = "\nProfiling data\n";
                $prof .= sprintf( $titleFormat, 'Name', 'Calls', 'Total', 'Each', '%', 'Mem' );
@@ -582,7 +582,7 @@ class Profiler {
        /**
         * Add an entry in the debug log file
         *
-        * @param $s String to output
+        * @param string $s to output
         */
        function debug( $s ) {
                if( defined( 'MW_COMPILED' ) || function_exists( 'wfDebug' ) ) {
index 1322e47..1d4873c 100644 (file)
@@ -29,7 +29,7 @@
 class ProfilerSimple extends Profiler {
        var $mMinimumTime = 0;
 
-       var $zeroEntry = array( 'cpu'=> 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0 );
+       var $zeroEntry = array( 'cpu' => 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0 );
        var $errorEntry;
 
        public function isPersistent() {
index 5abe226..27f682c 100644 (file)
@@ -60,7 +60,7 @@ class ResourceLoader {
         * requests its own information. This sacrifice of modularity yields a substantial
         * performance improvement.
         *
-        * @param $modules Array: List of module names to preload information for
+        * @param array $modules List of module names to preload information for
         * @param $context ResourceLoaderContext: Context to load the information within
         */
        public function preloadModuleInfo( array $modules, ResourceLoaderContext $context ) {
@@ -127,8 +127,8 @@ class ResourceLoader {
         * If $data is empty, only contains whitespace or the filter was unknown,
         * $data is returned unmodified.
         *
-        * @param $filter String: Name of filter to run
-        * @param $data String: Text to filter, such as JavaScript or CSS text
+        * @param string $filter Name of filter to run
+        * @param string $data Text to filter, such as JavaScript or CSS text
         * @return String: Filtered data, or a comment containing an error message
         */
        protected function filter( $filter, $data ) {
@@ -210,7 +210,6 @@ class ResourceLoader {
                        $this->registerTestModules();
                }
 
-
                wfProfileOut( __METHOD__ );
        }
 
@@ -218,7 +217,7 @@ class ResourceLoader {
         * Registers a module with the ResourceLoader system.
         *
         * @param $name Mixed: Name of module as a string or List of name/object pairs as an array
-        * @param $info array Module info array. For backwards compatibility with 1.17alpha,
+        * @param array $info Module info array. For backwards compatibility with 1.17alpha,
         *   this may also be a ResourceLoaderModule object. Optional when using
         *   multiple-registration calling style.
         * @throws MWException: If a duplicate module registration is attempted
@@ -309,7 +308,7 @@ class ResourceLoader {
         * 'loadScript': URL (either fully-qualified or protocol-relative) of load.php for this source
         *
         * @param $id Mixed: source ID (string), or array( id1 => props1, id2 => props2, ... )
-        * @param $properties Array: source properties
+        * @param array $properties source properties
         * @throws MWException
         */
        public function addSource( $id, $properties = null) {
@@ -353,7 +352,7 @@ class ResourceLoader {
         * If the given framework id is unknkown, or if the in-object variable is not an array,
         * then it will return an empty array.
         *
-        * @param $framework String: Optional. Get only the test module names for one
+        * @param string $framework Optional. Get only the test module names for one
         * particular framework.
         * @return Array
         */
@@ -371,7 +370,7 @@ class ResourceLoader {
        /**
         * Get the ResourceLoaderModule object for a given module name.
         *
-        * @param $name String: Module name
+        * @param string $name Module name
         * @return ResourceLoaderModule if module has been registered, null otherwise
         */
        public function getModule( $name ) {
@@ -451,7 +450,7 @@ class ResourceLoader {
                                        $this->hasErrors = true;
                                        continue;
                                }
-                               $modules[$name] = $this->getModule( $name );
+                               $modules[$name] = $module;
                        } else {
                                $missing[] = $name;
                        }
@@ -531,8 +530,8 @@ class ResourceLoader {
        /**
         * Send content type and last modified headers to the client.
         * @param $context ResourceLoaderContext
-        * @param $mtime string TS_MW timestamp to use for last-modified
-        * @param $error bool Whether there are commented-out errors in the response
+        * @param string $mtime TS_MW timestamp to use for last-modified
+        * @param bool $error Whether there are commented-out errors in the response
         * @return void
         */
        protected function sendResponseHeaders( ResourceLoaderContext $context, $mtime, $errors ) {
@@ -541,12 +540,12 @@ class ResourceLoader {
                // to propagate to clients quickly
                // If there were errors, we also need a shorter expiry time so we can recover quickly
                if ( is_null( $context->getVersion() ) || $errors ) {
-                       $maxage  = $wgResourceLoaderMaxage['unversioned']['client'];
+                       $maxage = $wgResourceLoaderMaxage['unversioned']['client'];
                        $smaxage = $wgResourceLoaderMaxage['unversioned']['server'];
                // If a version was specified we can use a longer expiry time since changing
                // version numbers causes cache misses
                } else {
-                       $maxage  = $wgResourceLoaderMaxage['versioned']['client'];
+                       $maxage = $wgResourceLoaderMaxage['versioned']['client'];
                        $smaxage = $wgResourceLoaderMaxage['versioned']['server'];
                }
                if ( $context->getOnly() === 'styles' ) {
@@ -570,7 +569,7 @@ class ResourceLoader {
         * If there's an If-Modified-Since header, respond with a 304 appropriately
         * and clear out the output buffer. If the client cache is too old then do nothing.
         * @param $context ResourceLoaderContext
-        * @param $mtime string The TS_MW timestamp to check the header against
+        * @param string $mtime The TS_MW timestamp to check the header against
         * @return bool True iff 304 header sent and output handled
         */
        protected function tryRespondLastModified( ResourceLoaderContext $context, $mtime ) {
@@ -667,8 +666,8 @@ class ResourceLoader {
         * Generates code for a response
         *
         * @param $context ResourceLoaderContext: Context in which to generate a response
-        * @param $modules Array: List of module objects keyed by module name
-        * @param $missing Array: List of unavailable modules (optional)
+        * @param array $modules List of module objects keyed by module name
+        * @param array $missing List of unavailable modules (optional)
         * @return String: Response data
         */
        public function makeModuleResponse( ResourceLoaderContext $context,
@@ -835,7 +834,7 @@ class ResourceLoader {
         * Returns JS code to call to mw.loader.implement for a module with
         * given properties.
         *
-        * @param $name string Module name
+        * @param string $name Module name
         * @param $scripts Mixed: List of URLs to JavaScript files or String of JavaScript code
         * @param $styles Mixed: Array of CSS strings keyed by media type, or an array of lists of URLs to
         * CSS files keyed by media type
@@ -883,7 +882,7 @@ class ResourceLoader {
         * Combines an associative array mapping media type to CSS into a
         * single stylesheet with "@media" blocks.
         *
-        * @param $stylePairs Array: Array keyed by media type containing (arrays of) CSS strings.
+        * @param array $stylePairs Array keyed by media type containing (arrays of) CSS strings.
         *
         * @return Array
         */
@@ -943,12 +942,12 @@ class ResourceLoader {
         * which will have values corresponding to $name, $version, $dependencies
         * and $group as supplied.
         *
-        * @param $name String: Module name
+        * @param string $name Module name
         * @param $version Integer: Module version number as a timestamp
-        * @param $dependencies Array: List of module names on which this module depends
-        * @param $group String: Group which the module is in.
-        * @param $source String: Source of the module, or 'local' if not foreign.
-        * @param $script String: JavaScript code
+        * @param array $dependencies List of module names on which this module depends
+        * @param string $group Group which the module is in.
+        * @param string $source Source of the module, or 'local' if not foreign.
+        * @param string $script JavaScript code
         *
         * @return string
         */
@@ -976,11 +975,11 @@ class ResourceLoader {
         *     ) ):
         *        Registers modules with the given names and parameters.
         *
-        * @param $name String: Module name
+        * @param string $name Module name
         * @param $version Integer: Module version number as a timestamp
-        * @param $dependencies Array: List of module names on which this module depends
-        * @param $group String: group which the module is in.
-        * @param $source String: source of the module, or 'local' if not foreign
+        * @param array $dependencies List of module names on which this module depends
+        * @param string $group group which the module is in.
+        * @param string $source source of the module, or 'local' if not foreign
         *
         * @return string
         */
@@ -1006,8 +1005,8 @@ class ResourceLoader {
         *   - ResourceLoader::makeLoaderSourcesScript( array( $id1 => $props1, $id2 => $props2, ... ) );
         *       Register sources with the given IDs and properties.
         *
-        * @param $id String: source ID
-        * @param $properties Array: source properties (see addSource())
+        * @param string $id source ID
+        * @param array $properties source properties (see addSource())
         *
         * @return string
         */
@@ -1023,7 +1022,7 @@ class ResourceLoader {
         * Returns JS code which runs given JS code if the client-side framework is
         * present.
         *
-        * @param $script String: JavaScript code
+        * @param string $script JavaScript code
         *
         * @return string
         */
@@ -1035,7 +1034,7 @@ class ResourceLoader {
         * Returns JS code which will set the MediaWiki configuration array to
         * the given value.
         *
-        * @param $configuration Array: List of configuration values keyed by variable name
+        * @param array $configuration List of configuration values keyed by variable name
         *
         * @return string
         */
@@ -1048,7 +1047,7 @@ class ResourceLoader {
         *
         * For example, array( 'foo.bar', 'foo.baz', 'bar.baz', 'bar.quux' )
         * becomes 'foo.bar,baz|bar.baz,quux'
-        * @param $modules array of module names (strings)
+        * @param array $modules of module names (strings)
         * @return string Packed query string
         */
        public static function makePackedModulesString( $modules ) {
@@ -1086,16 +1085,16 @@ class ResourceLoader {
 
        /**
         * Build a load.php URL
-        * @param $modules array of module names (strings)
-        * @param $lang string Language code
-        * @param $skin string Skin name
-        * @param $user string|null User name. If null, the &user= parameter is omitted
-        * @param $version string|null Versioning timestamp
-        * @param $debug bool Whether the request should be in debug mode
-        * @param $only string|null &only= parameter
-        * @param $printable bool Printable mode
-        * @param $handheld bool Handheld mode
-        * @param $extraQuery array Extra query parameters to add
+        * @param array $modules of module names (strings)
+        * @param string $lang Language code
+        * @param string $skin Skin name
+        * @param string|null $user User name. If null, the &user= parameter is omitted
+        * @param string|null $version Versioning timestamp
+        * @param bool $debug Whether the request should be in debug mode
+        * @param string|null $only &only= parameter
+        * @param bool $printable Printable mode
+        * @param bool $handheld Handheld mode
+        * @param array $extraQuery Extra query parameters to add
         * @return string URL to load.php. May be protocol-relative (if $wgLoadScript is procol-relative)
         */
        public static function makeLoaderURL( $modules, $lang, $skin, $user = null, $version = null, $debug = false, $only = null,
@@ -1151,7 +1150,7 @@ class ResourceLoader {
         * Module names may not contain pipes (|), commas (,) or exclamation marks (!) and can be
         * at most 255 bytes.
         *
-        * @param $moduleName string Module name to check
+        * @param string $moduleName Module name to check
         * @return bool Whether $moduleName is a valid module name
         */
        public static function isValidModuleName( $moduleName ) {
index 0e96c6c..4588015 100644 (file)
@@ -58,14 +58,14 @@ class ResourceLoaderContext {
                // Interpret request
                // List of modules
                $modules = $request->getVal( 'modules' );
-               $this->modules   = $modules ? self::expandModuleNames( $modules ) : array();
+               $this->modules = $modules ? self::expandModuleNames( $modules ) : array();
                // Various parameters
-               $this->skin      = $request->getVal( 'skin' );
-               $this->user      = $request->getVal( 'user' );
-               $this->debug     = $request->getFuzzyBool( 'debug', $wgResourceLoaderDebug );
-               $this->only      = $request->getVal( 'only' );
-               $this->version   = $request->getVal( 'version' );
-               $this->raw       = $request->getFuzzyBool( 'raw' );
+               $this->skin = $request->getVal( 'skin' );
+               $this->user = $request->getVal( 'user' );
+               $this->debug = $request->getFuzzyBool( 'debug', $wgResourceLoaderDebug );
+               $this->only = $request->getVal( 'only' );
+               $this->version = $request->getVal( 'version' );
+               $this->raw = $request->getFuzzyBool( 'raw' );
 
                $skinnames = Skin::getSkinNames();
                // If no skin is specified, or we don't recognize the skin, use the default skin
@@ -78,7 +78,7 @@ class ResourceLoaderContext {
         * Expand a string of the form jquery.foo,bar|jquery.ui.baz,quux to
         * an array of module names like array( 'jquery.foo', 'jquery.bar',
         * 'jquery.ui.baz', 'jquery.ui.quux' )
-        * @param $modules String Packed module name list
+        * @param string $modules Packed module name list
         * @return array of module names
         */
        public static function expandModuleNames( $modules ) {
@@ -145,7 +145,7 @@ class ResourceLoaderContext {
        public function getLanguage() {
                if ( $this->language === null ) {
                        global $wgLang;
-                       $this->language  = $this->request->getVal( 'lang' );
+                       $this->language = $this->request->getVal( 'lang' );
                        if ( !$this->language ) {
                                $this->language = $wgLang->getCode();
                        }
index 9904107..cedb5dc 100644 (file)
@@ -137,11 +137,11 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Constructs a new module from an options array.
         *
-        * @param $options Array: List of options; if not given or empty, an empty module will be
+        * @param array $options List of options; if not given or empty, an empty module will be
         *     constructed
-        * @param $localBasePath String: Base path to prepend to all local paths in $options. Defaults
+        * @param string $localBasePath Base path to prepend to all local paths in $options. Defaults
         *     to $IP
-        * @param $remoteBasePath String: Base path to prepend to all remote paths in $options. Defaults
+        * @param string $remoteBasePath Base path to prepend to all remote paths in $options. Defaults
         *     to $wgScriptPath
         *
         * Below is a description for the $options array:
@@ -473,9 +473,9 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Collates file paths by option (where provided).
         *
-        * @param $list Array: List of file paths in any combination of index/path
+        * @param array $list List of file paths in any combination of index/path
         *     or path/options pairs
-        * @param $option String: option name
+        * @param string $option option name
         * @param $default Mixed: default value if the option isn't set
         * @return Array: List of file paths, collated by $option
         */
@@ -503,9 +503,9 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets a list of element that match a key, optionally using a fallback key.
         *
-        * @param $list Array: List of lists to select from
-        * @param $key String: Key to look for in $map
-        * @param $fallback String: Key to look for in $list if $key doesn't exist
+        * @param array $list List of lists to select from
+        * @param string $key Key to look for in $map
+        * @param string $fallback Key to look for in $list if $key doesn't exist
         * @return Array: List of elements from $map which matched $key or $fallback,
         *     or an empty list in case of no match
         */
@@ -558,7 +558,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets the contents of a list of JavaScript files.
         *
-        * @param $scripts Array: List of file paths to scripts to read, remap and concetenate
+        * @param array $scripts List of file paths to scripts to read, remap and concetenate
         * @throws MWException
         * @return String: Concatenated and remapped JavaScript data from $scripts
         */
@@ -588,7 +588,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets the contents of a list of CSS files.
         *
-        * @param $styles Array: List of media type/list of file paths pairs, to read, remap and
+        * @param array $styles List of media type/list of file paths pairs, to read, remap and
         * concetenate
         *
         * @param $flip bool
@@ -619,7 +619,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * This method can be used as a callback for array_map()
         *
-        * @param $path String: File path of style file to read
+        * @param string $path File path of style file to read
         * @param $flip bool
         *
         * @return String: CSS data in script file
index e4ae0a2..7d04927 100644 (file)
@@ -81,7 +81,7 @@ abstract class ResourceLoaderModule {
         * Set this module's name. This is called by ResourceLoader::register()
         * when registering the module. Other code should not call this.
         *
-        * @param $name String: Name
+        * @param string $name Name
         */
        public function setName( $name ) {
                $this->name = $name;
@@ -102,7 +102,7 @@ abstract class ResourceLoaderModule {
         * Set this module's origin. This is called by ResourceLodaer::register()
         * when registering the module. Other code should not call this.
         *
-        * @param $origin Int origin
+        * @param int $origin origin
         */
        public function setOrigin( $origin ) {
                $this->origin = $origin;
@@ -303,7 +303,7 @@ abstract class ResourceLoaderModule {
         * Get the files this module depends on indirectly for a given skin.
         * Currently these are only image files referenced by the module's CSS.
         *
-        * @param $skin String: Skin name
+        * @param string $skin Skin name
         * @return Array: List of files
         */
        public function getFileDependencies( $skin ) {
@@ -329,8 +329,8 @@ abstract class ResourceLoaderModule {
        /**
         * Set preloaded file dependency information. Used so we can load this
         * information for all modules at once.
-        * @param $skin String: Skin name
-        * @param $deps Array: Array of file names
+        * @param string $skin Skin name
+        * @param array $deps Array of file names
         */
        public function setFileDependencies( $skin, $deps ) {
                $this->fileDeps[$skin] = $deps;
@@ -339,7 +339,7 @@ abstract class ResourceLoaderModule {
        /**
         * Get the last modification timestamp of the message blob for this
         * module in a given language.
-        * @param $lang String: Language code
+        * @param string $lang Language code
         * @return Integer: UNIX timestamp, or 0 if the module doesn't have messages
         */
        public function getMsgBlobMtime( $lang ) {
@@ -367,7 +367,7 @@ abstract class ResourceLoaderModule {
        /**
         * Set a preloaded message blob last modification timestamp. Used so we
         * can load this information for all modules at once.
-        * @param $lang String: Language code
+        * @param string $lang Language code
         * @param $mtime Integer: UNIX timestamp or 0 if there is no such blob
         */
        public function setMsgBlobMtime( $lang, $mtime ) {
@@ -408,7 +408,6 @@ abstract class ResourceLoaderModule {
                return false;
        }
 
-
        /** @var JSParser lazy-initialized; use self::javaScriptParser() */
        private static $jsParser;
        private static $parseCacheVersion = 1;
@@ -463,7 +462,7 @@ abstract class ResourceLoaderModule {
        /**
         * Safe version of filemtime(), which doesn't throw a PHP warning if the file doesn't exist
         * but returns 1 instead.
-        * @param $filename string File name
+        * @param string $filename File name
         * @return int UNIX timestamp, or 1 if the file doesn't exist
         */
        protected static function safeFilemtime( $filename ) {
index 4ea9f4e..6c60d47 100644 (file)
@@ -126,7 +126,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
                        if ( strval( $script ) !== '' ) {
                                $script = $this->validateScriptFile( $titleText, $script );
                                if ( strpos( $titleText, '*/' ) === false ) {
-                                       $scripts .=  "/* $titleText */\n";
+                                       $scripts .= "/* $titleText */\n";
                                }
                                $scripts .= $script . "\n";
                        }
@@ -163,7 +163,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
                                $styles[$media] = array();
                        }
                        if ( strpos( $titleText, '*/' ) === false ) {
-                               $style =  "/* $titleText */\n" . $style;
+                               $style = "/* $titleText */\n" . $style;
                        }
                        $styles[$media][] = $style;
                }
index d64201c..1ace383 100644 (file)
@@ -398,7 +398,6 @@ class RevDel_ArchiveItem extends RevDel_RevisionItem {
        }
 }
 
-
 /**
  * Item class for a archive table row by ar_rev_id -- actually
  * used via RevDel_RevisionList.
index 8b8a3a3..b2108de 100644 (file)
@@ -47,7 +47,7 @@ abstract class RevDel_List extends RevisionListBase {
         * Set the visibility for the revisions in this list. Logging and
         * transactions are done here.
         *
-        * @param $params array Associative array of parameters. Members are:
+        * @param array $params Associative array of parameters. Members are:
         *     value:       The integer value to set the visibility to
         *     comment:     The log comment.
         * @return Status
@@ -176,7 +176,7 @@ abstract class RevDel_List extends RevisionListBase {
 
        /**
         * Record a log entry on the action
-        * @param $params array Associative array of parameters:
+        * @param array $params Associative array of parameters:
         *     newBits:         The new value of the *_deleted bitfield
         *     oldBits:         The old value of the *_deleted bitfield.
         *     title:           The target title
@@ -220,7 +220,7 @@ abstract class RevDel_List extends RevisionListBase {
 
        /**
         * Get log parameter array.
-        * @param $params array Associative array of log parameters, same as updateLog()
+        * @param array $params Associative array of log parameters, same as updateLog()
         * @return array
         */
        public function getLogParams( $params ) {
index c59edc2..fe351c5 100644 (file)
@@ -31,12 +31,12 @@ class RevisionDeleter {
         * Checks for a change in the bitfield for a certain option and updates the
         * provided array accordingly.
         *
-        * @param $desc String: description to add to the array if the option was
+        * @param string $desc description to add to the array if the option was
         * enabled / disabled.
         * @param $field Integer: the bitmask describing the single option.
         * @param $diff Integer: the xor of the old and new bitfields.
         * @param $new Integer: the new bitfield
-        * @param $arr Array: the array to update.
+        * @param array $arr the array to update.
         */
        protected static function checkItem( $desc, $field, $diff, $new, &$arr ) {
                if( $diff & $field ) {
index 5e5755c..6b3e62b 100644 (file)
@@ -58,7 +58,7 @@ class SearchEngine {
         * If title searches are not supported or disabled, return null.
         * STUB
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return SearchResultSet
         */
        function searchText( $term ) {
@@ -70,7 +70,7 @@ class SearchEngine {
         * If title searches are not supported or disabled, return null.
         * STUB
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return SearchResultSet
         */
        function searchTitle( $term ) {
@@ -118,7 +118,7 @@ class SearchEngine {
         * on text to be used for searching or updating search index.
         * Default implementation does nothing (simply returns $string).
         *
-        * @param $string string: String to process
+        * @param string $string String to process
         * @return string
         */
        public function normalizeText( $string ) {
@@ -239,7 +239,6 @@ class SearchEngine {
 
                $title = Title::newFromText( $searchterm );
 
-
                # Entering an IP address goes to the contributions page
                if ( $wgEnableSearchContributorsByIP ) {
                        if ( ( $title->getNamespace() == NS_USER && User::isIP( $title->getText() ) )
@@ -248,7 +247,6 @@ class SearchEngine {
                        }
                }
 
-
                # Entering a user goes to the user page whether it's there or not
                if ( $title->getNamespace() == NS_USER ) {
                        return $title;
@@ -675,7 +673,6 @@ class SearchResultTooMany {
        # # Some search engines may bail out if too many matches are found
 }
 
-
 /**
  * @todo FIXME: This class is horribly factored. It would probably be better to
  * have a useful base class to which you pass some standard information, then
@@ -809,7 +806,7 @@ class SearchResult {
        }
 
        /**
-        * @param $terms Array: terms to highlight
+        * @param array $terms terms to highlight
         * @return String: highlighted text snippet, null (and not '') if not supported
         */
        function getTextSnippet( $terms ) {
@@ -826,7 +823,7 @@ class SearchResult {
        }
 
        /**
-        * @param $terms Array: terms to highlight
+        * @param array $terms terms to highlight
         * @return String: highlighted title, '' if not supported
         */
        function getTitleSnippet( $terms ) {
@@ -834,7 +831,7 @@ class SearchResult {
        }
 
        /**
-        * @param $terms Array: terms to highlight
+        * @param array $terms terms to highlight
         * @return String: highlighted redirect name (redirect to this page), '' if none or not supported
         */
        function getRedirectSnippet( $terms ) {
@@ -945,7 +942,7 @@ class SearchHighlighter {
         * Default implementation of wikitext highlighting
         *
         * @param $text String
-        * @param $terms Array: terms to highlight (unescaped)
+        * @param array $terms terms to highlight (unescaped)
         * @param $contextlines Integer
         * @param $contextchars Integer
         * @return String
@@ -973,7 +970,7 @@ class SearchHighlighter {
                }
                $spat .= '/';
                $textExt = array(); // text extracts
-               $otherExt = array();  // other extracts
+               $otherExt = array(); // other extracts
                wfProfileIn( "$fname-split" );
                $start = 0;
                $textLen = strlen( $text );
@@ -1188,7 +1185,7 @@ class SearchHighlighter {
        /**
         * Split text into lines and add it to extracts array
         *
-        * @param $extracts Array: index -> $line
+        * @param array $extracts index -> $line
         * @param $count Integer
         * @param $text String
         */
@@ -1283,12 +1280,12 @@ class SearchHighlighter {
        /**
         * Search extracts for a pattern, and return snippets
         *
-        * @param $pattern String: regexp for matching lines
-        * @param $extracts Array: extracts to search
+        * @param string $pattern regexp for matching lines
+        * @param array $extracts extracts to search
         * @param $linesleft Integer: number of extracts to make
         * @param $contextchars Integer: length of snippet
-        * @param $out Array: map for highlighted snippets
-        * @param $offsets Array: map of starting points of snippets
+        * @param array $out map for highlighted snippets
+        * @param array $offsets map of starting points of snippets
         * @protected
         */
        function process( $pattern, $extracts, &$linesleft, &$contextchars, &$out, &$offsets ) {
index 85fe148..163d9dc 100644 (file)
@@ -38,7 +38,7 @@ class SearchMssql extends SearchEngine {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return MssqlSearchResultSet
         * @access public
         */
@@ -50,7 +50,7 @@ class SearchMssql extends SearchEngine {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return MssqlSearchResultSet
         * @access public
         */
@@ -59,7 +59,6 @@ class SearchMssql extends SearchEngine {
                return new MssqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
-
        /**
         * Return a partial WHERE clause to exclude redirects, if so set
         *
@@ -144,7 +143,7 @@ class SearchMssql extends SearchEngine {
         */
        function queryMain( $filteredTerm, $fulltext ) {
                $match = $this->parseQuery( $filteredTerm, $fulltext );
-               $page        = $this->db->tableName( 'page' );
+               $page = $this->db->tableName( 'page' );
                $searchindex = $this->db->tableName( 'searchindex' );
 
                return 'SELECT page_id, page_namespace, page_title, ftindex.[RANK]' .
index a76662b..4a501fd 100644 (file)
@@ -156,7 +156,7 @@ class SearchMySQL extends SearchEngine {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return MySQLSearchResultSet
         */
        function searchText( $term ) {
@@ -166,7 +166,7 @@ class SearchMySQL extends SearchEngine {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return MySQLSearchResultSet
         */
        function searchTitle( $term ) {
index 009502b..b0ea97f 100644 (file)
@@ -68,7 +68,7 @@ class SearchOracle extends SearchEngine {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return SqlSearchResultSet
         */
        function searchText( $term ) {
@@ -82,7 +82,7 @@ class SearchOracle extends SearchEngine {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return SqlSearchResultSet
         */
        function searchTitle( $term ) {
@@ -93,7 +93,6 @@ class SearchOracle extends SearchEngine {
                return new MySQLSearchResultSet( $resultSet, $this->searchTerms );
        }
 
-
        /**
         * Return a partial WHERE clause to exclude redirects, if so set
         * @return String
@@ -156,7 +155,6 @@ class SearchOracle extends SearchEngine {
                        $this->queryRanking( $filteredTerm, $fulltext ) . ' ' );
        }
 
-
        /**
         * Picks which field to index on, depending on what type of query.
         * @param $fulltext Boolean
@@ -221,7 +219,6 @@ class SearchOracle extends SearchEngine {
                        }
                }
 
-
                $searchon = $this->db->addQuotes( ltrim( $searchon, ' &' ) );
                $field = $this->getIndexField( $fulltext );
                return " CONTAINS($field, $searchon, 1) > 0 ";
@@ -281,7 +278,6 @@ class SearchOracle extends SearchEngine {
                        array() );
        }
 
-
        public static function legalSearchChars() {
                return "\"" . parent::legalSearchChars();
        }
index 727cc16..56464e9 100644 (file)
@@ -47,7 +47,7 @@ class SearchPostgres extends SearchEngine {
         * Currently searches a page's current title (page.page_title) and
         * latest revision article text (pagecontent.old_text)
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return PostgresSearchResultSet
         */
        function searchTitle( $term ) {
index f91399a..f3f4788 100644 (file)
@@ -156,7 +156,7 @@ class SearchSqlite extends SearchEngine {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return SqliteSearchResultSet
         */
        function searchText( $term ) {
@@ -166,7 +166,7 @@ class SearchSqlite extends SearchEngine {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param $term String: raw search term
+        * @param string $term raw search term
         * @return SqliteSearchResultSet
         */
        function searchTitle( $term ) {
@@ -196,7 +196,6 @@ class SearchSqlite extends SearchEngine {
                return new SqliteSearchResultSet( $resultSet, $this->searchTerms, $total );
        }
 
-
        /**
         * Return a partial WHERE clause to exclude redirects, if so set
         * @return String
@@ -275,7 +274,7 @@ class SearchSqlite extends SearchEngine {
 
        function getCountQuery( $filteredTerm, $fulltext ) {
                $match = $this->parseQuery( $filteredTerm, $fulltext );
-               $page        = $this->db->tableName( 'page' );
+               $page = $this->db->tableName( 'page' );
                $searchindex = $this->db->tableName( 'searchindex' );
                return "SELECT COUNT(*) AS c " .
                        "FROM $page,$searchindex " .
index 68161b9..0509272 100644 (file)
@@ -67,7 +67,7 @@ class MediaWikiSite extends Site {
         *
         * @since 1.21
         *
-        * @param String $title the target page's title, in normalized form.
+        * @param string $title the target page's title, in normalized form.
         *
         * @return String
         */
@@ -169,7 +169,6 @@ class MediaWikiSite extends Site {
                return $page['title'];
        }
 
-
        /**
         * Get normalization record for a given page title from an API response.
         *
@@ -304,7 +303,7 @@ class MediaWikiSite extends Site {
         * @see Site::getPageUrl
         *
         * This implementation returns a URL constructed using the path returned by getLinkPath().
-        * In addition to the default behaviour implemented by Site::getPageUrl(), this
+        * In addition to the default behavior implemented by Site::getPageUrl(), this
         * method converts the $pageName to DBKey-format by replacing spaces with underscores
         * before using it in the URL.
         *
index 525c375..076dc88 100644 (file)
@@ -40,7 +40,6 @@ class Site implements Serializable {
 
        const PATH_LINK = 'link';
 
-
        /**
         * A version ID that identifies the serialization structure used by getSerializationData()
         * and unserialize(). This is useful for constructing cache keys in cases where the cache relies
index 994365e..20da4a3 100644 (file)
@@ -50,7 +50,7 @@ class ActiveUsersPager extends UsersPager {
        /**
         * @param $context IContextSource
         * @param $group null Unused
-        * @param $par string Parameter passed to the page
+        * @param string $par Parameter passed to the page
         */
        function __construct( IContextSource $context = null, $group = null, $par = null ) {
                global $wgActiveUserDays;
@@ -244,4 +244,7 @@ class SpecialActiveUsers extends SpecialPage {
                }
        }
 
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index 5f8a0e4..a60c8ef 100644 (file)
@@ -77,6 +77,9 @@ class SpecialAllmessages extends SpecialPage {
 
        }
 
+       protected function getGroupName() {
+               return 'wiki';
+       }
 }
 
 /**
@@ -113,7 +116,7 @@ class AllmessagesTablePager extends TablePager {
 
                $this->lang = ( $langObj ? $langObj : $wgContLang );
                $this->langcode = $this->lang->getCode();
-               $this->foreign  = $this->langcode != $wgContLang->getCode();
+               $this->foreign = $this->langcode != $wgContLang->getCode();
 
                $request = $this->getRequest();
 
@@ -333,11 +336,9 @@ class AllmessagesTablePager extends TablePager {
 
        function formatValue( $field, $value ) {
                switch( $field ) {
-
                        case 'am_title' :
-
                                $title = Title::makeTitle( NS_MEDIAWIKI, $value . $this->suffix );
-                               $talk  = Title::makeTitle( NS_MEDIAWIKI_TALK, $value . $this->suffix );
+                               $talk = Title::makeTitle( NS_MEDIAWIKI_TALK, $value . $this->suffix );
 
                                if( $this->mCurrentRow->am_customised ) {
                                        $title = Linker::linkKnown( $title, $this->getLanguage()->lcfirst( $value ) );
index eeda739..f9cb5cd 100644 (file)
@@ -59,7 +59,7 @@ class SpecialAllpages extends IncludableSpecialPage {
        /**
         * Constructor
         *
-        * @param $name string: name of the special page, as seen in links and URLs (default: 'Allpages')
+        * @param string $name name of the special page, as seen in links and URLs (default: 'Allpages')
         */
        function __construct( $name = 'Allpages' ) {
                parent::__construct( $name );
@@ -68,7 +68,7 @@ class SpecialAllpages extends IncludableSpecialPage {
        /**
         * Entry point : initialise variables and call subfunctions.
         *
-        * @param $par String: becomes "FOO" when called like Special:Allpages/FOO (default NULL)
+        * @param string $par becomes "FOO" when called like Special:Allpages/FOO (default NULL)
         */
        function execute( $par ) {
                global $wgContLang;
@@ -107,16 +107,16 @@ class SpecialAllpages extends IncludableSpecialPage {
         * HTML for the top form
         *
         * @param $namespace Integer: a namespace constant (default NS_MAIN).
-        * @param $from String: dbKey we are starting listing at.
-        * @param $to String: dbKey we are ending listing at.
-        * @param $hideredirects Bool: dont show redirects  (default FALSE)
+        * @param string $from dbKey we are starting listing at.
+        * @param string $to dbKey we are ending listing at.
+        * @param bool $hideredirects dont show redirects  (default FALSE)
         * @return string
         */
        function namespaceForm( $namespace = NS_MAIN, $from = '', $to = '', $hideredirects = false ) {
                global $wgScript;
                $t = $this->getTitle();
 
-               $out  = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
+               $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
                $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
                $out .= Html::hidden( 'title', $t->getPrefixedText() );
                $out .= Xml::openElement( 'fieldset' );
@@ -165,9 +165,9 @@ class SpecialAllpages extends IncludableSpecialPage {
 
        /**
         * @param $namespace Integer (default NS_MAIN)
-        * @param $from String: list all pages from this name
-        * @param $to String: list all pages to this name
-        * @param $hideredirects Bool: dont show redirects (default FALSE)
+        * @param string $from list all pages from this name
+        * @param string $to list all pages to this name
+        * @param bool $hideredirects dont show redirects (default FALSE)
         */
        function showToplevel( $namespace = NS_MAIN, $from = '', $to = '', $hideredirects = false ) {
                $output = $this->getOutput();
@@ -294,10 +294,10 @@ class SpecialAllpages extends IncludableSpecialPage {
        /**
         * Show a line of "ABC to DEF" ranges of articles
         *
-        * @param $inpoint String: lower limit of pagenames
-        * @param $outpoint String: upper limit of pagenames
+        * @param string $inpoint lower limit of pagenames
+        * @param string $outpoint upper limit of pagenames
         * @param $namespace Integer (Default NS_MAIN)
-        * @param $hideredirects Bool: dont show redirects (default FALSE)
+        * @param bool $hideredirects dont show redirects (default FALSE)
         * @return string
         */
        function showline( $inpoint, $outpoint, $namespace = NS_MAIN, $hideredirects ) {
@@ -327,9 +327,9 @@ class SpecialAllpages extends IncludableSpecialPage {
 
        /**
         * @param $namespace Integer (Default NS_MAIN)
-        * @param $from String: list all pages from this name (default FALSE)
-        * @param $to String: list all pages to this name (default FALSE)
-        * @param $hideredirects Bool: dont show redirects (default FALSE)
+        * @param string $from list all pages from this name (default FALSE)
+        * @param string $to list all pages to this name (default FALSE)
+        * @param bool $hideredirects dont show redirects (default FALSE)
         */
        function showChunk( $namespace = NS_MAIN, $from = false, $to = false, $hideredirects = false ) {
                global $wgContLang;
@@ -457,7 +457,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                                                                Linker::link( $self, $this->msg( 'allpages' )->escaped() );
 
                        # Do we put a previous link ?
-                       if( isset( $prevTitle ) &&  $pt = $prevTitle->getText() ) {
+                       if( isset( $prevTitle ) && $pt = $prevTitle->getText() ) {
                                $query = array( 'from' => $prevTitle->getText() );
 
                                if( $namespace )
@@ -515,7 +515,7 @@ class SpecialAllpages extends IncludableSpecialPage {
 
        /**
         * @param $ns Integer: the namespace of the article
-        * @param $text String: the name of the article
+        * @param string $text the name of the article
         * @return array( int namespace, string dbkey, string pagename ) or NULL on error
         */
        protected function getNamespaceKeyAndText( $ns, $text ) {
@@ -538,4 +538,8 @@ class SpecialAllpages extends IncludableSpecialPage {
                        return null;
                }
        }
+
+       protected function getGroupName() {
+               return 'pages';
+       }
 }
index fc5df4f..b0f333c 100644 (file)
@@ -71,4 +71,8 @@ class AncientPagesPage extends QueryPage {
                );
                return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) );
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index ac05f67..50fdbc2 100644 (file)
@@ -225,7 +225,7 @@ class SpecialBlock extends FormSpecialPage {
        /**
         * If the user has already been blocked with similar settings, load that block
         * and change the defaults for the form fields to match the existing settings.
-        * @param $fields Array HTMLForm descriptor array
+        * @param array $fields HTMLForm descriptor array
         * @return Bool whether fields were altered (that is, whether the target is
         *     already blocked)
         */
@@ -451,7 +451,7 @@ class SpecialBlock extends FormSpecialPage {
        /**
         * Determine the target of the block, and the type of target
         * TODO: should be in Block.php?
-        * @param $par String subpage parameter passed to setup, or data value from
+        * @param string $par subpage parameter passed to setup, or data value from
         *     the HTMLForm
         * @param $request WebRequest optionally try and get data from a request too
         * @return array( User|string|null, Block::TYPE_ constant|null )
@@ -521,7 +521,7 @@ class SpecialBlock extends FormSpecialPage {
         * Validate a block target.
         *
         * @since 1.21
-        * @param String $value Block target to check
+        * @param string $value Block target to check
         * @param User $user Performer of the block
         * @return Status
         */
@@ -810,7 +810,7 @@ class SpecialBlock extends FormSpecialPage {
        /**
         * Convert a submitted expiry time, which may be relative ("2 weeks", etc) or absolute
         * ("24 May 2034", etc), into an absolute timestamp we can put into the database.
-        * @param $expiry String: whatever was typed into the form
+        * @param string $expiry whatever was typed into the form
         * @return String: timestamp or "infinity" string for the DB implementation
         */
        public static function parseExpiryInput( $expiry ) {
@@ -883,7 +883,7 @@ class SpecialBlock extends FormSpecialPage {
        /**
         * Return a comma-delimited list of "flags" to be passed to the log
         * reader for this block, to provide more information in the logs
-        * @param $data Array from HTMLForm data
+        * @param array $data from HTMLForm data
         * @param $type Block::TYPE_ constant (USER, RANGE, or IP)
         * @return string
         */
@@ -946,6 +946,10 @@ class SpecialBlock extends FormSpecialPage {
                $out->setPageTitle( $this->msg( 'blockipsuccesssub' ) );
                $out->addWikiMsg( 'blockipsuccesstext', wfEscapeWikiText( $this->target ) );
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
 
 # BC @since 1.18
index 56b9b00..e10df4f 100644 (file)
@@ -37,7 +37,7 @@ class SpecialBlockList extends SpecialPage {
        /**
         * Main execution point
         *
-        * @param $par String title fragment
+        * @param string $par title fragment
         */
        public function execute( $par ) {
                $this->setHeaders();
@@ -205,6 +205,10 @@ class SpecialBlockList extends SpecialPage {
                        $out->addHTML( Html::rawElement( 'ul', array( 'class' => 'mw-ipblocklist-otherblocks' ), $list ) . "\n" );
                }
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
 
 class BlockListPager extends TablePager {
index 3840b2f..85a3019 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 /**
- * A special page called by proxy_check.php to block open proxies
+ * A special page called by proxyCheck.php to block open proxies
  *
  * @ingroup SpecialPage
  */
@@ -59,4 +59,8 @@ class SpecialBlockme extends UnlistedSpecialPage {
 
                $this->getOutput()->addWikiMsg( 'proxyblocksuccess' );
        }
+
+       protected function getGroupName() {
+               return 'other';
+       }
 }
index 255b1b6..bdbd77b 100644 (file)
@@ -46,7 +46,7 @@ class SpecialBookSources extends SpecialPage {
        /**
         * Show the special page
         *
-        * @param $isbn string ISBN passed as a subpage parameter
+        * @param string $isbn ISBN passed as a subpage parameter
         */
        public function execute( $isbn ) {
                $this->setHeaders();
@@ -63,7 +63,7 @@ class SpecialBookSources extends SpecialPage {
 
        /**
         * Returns whether a given ISBN (10 or 13) is valid. True indicates validity.
-        * @param $isbn string ISBN passed for check
+        * @param string $isbn ISBN passed for check
         * @return bool
         */
        public static function isValidISBN( $isbn ) {
@@ -101,7 +101,7 @@ class SpecialBookSources extends SpecialPage {
        /**
         * Trim ISBN and remove characters which aren't required
         *
-        * @param $isbn string Unclean ISBN
+        * @param string $isbn Unclean ISBN
         * @return string
         */
        private static function cleanIsbn( $isbn ) {
@@ -116,7 +116,7 @@ class SpecialBookSources extends SpecialPage {
        private function makeForm() {
                global $wgScript;
 
-               $form  = '<fieldset><legend>' . $this->msg( 'booksources-search-legend' )->escaped() . '</legend>';
+               $form = '<fieldset><legend>' . $this->msg( 'booksources-search-legend' )->escaped() . '</legend>';
                $form .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
                $form .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() );
                $form .= '<p>' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn );
@@ -171,12 +171,16 @@ class SpecialBookSources extends SpecialPage {
        /**
         * Format a book source list item
         *
-        * @param $label string Book source label
-        * @param $url string Book source URL
+        * @param string $label Book source label
+        * @param string $url Book source URL
         * @return string
         */
        private function makeListItem( $label, $url ) {
                $url = str_replace( '$1', $this->isbn, $url );
                return '<li><a href="' . htmlspecialchars( $url ) . '" class="external">' . htmlspecialchars( $label ) . '</a></li>';
        }
+
+       protected function getGroupName() {
+               return 'other';
+       }
 }
index 77b69e8..fac4123 100644 (file)
@@ -151,4 +151,8 @@ class BrokenRedirectsPage extends QueryPage {
                $out .= " {$arr} {$to}";
                return $out;
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index 44388c4..9040c64 100644 (file)
@@ -50,6 +50,10 @@ class SpecialCategories extends SpecialPage {
                        Html::closeElement( 'div' )
                );
        }
+
+       protected function getGroupName() {
+               return 'pages';
+       }
 }
 
 /**
index 53faba7..59a0257 100644 (file)
@@ -254,4 +254,8 @@ class SpecialChangeEmail extends UnlistedSpecialPage {
 
                return $status->value;
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index 2b505b3..73eb97f 100644 (file)
@@ -270,4 +270,8 @@ class SpecialChangePassword extends UnlistedSpecialPage {
 
                $user->saveSettings();
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index 8be1cf0..c3bd3fe 100644 (file)
@@ -163,4 +163,8 @@ class SpecialComparePages extends SpecialPage {
                }
                return true;
        }
+
+       protected function getGroupName() {
+               return 'pagetools';
+       }
 }
index 85a415d..078c386 100644 (file)
@@ -98,7 +98,7 @@ class EmailConfirmation extends UnlistedSpecialPage {
                                $out->wrapWikiMsg( "<div class=\"error mw-confirmemail-pending\">\n$1\n</div>", 'confirmemail_pending' );
                        }
                        $out->addWikiMsg( 'confirmemail_text' );
-                       $form  = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl() ) );
+                       $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl() ) );
                        $form .= Html::hidden( 'token', $user->getEditToken() );
                        $form .= Xml::submitButton( $this->msg( 'confirmemail_send' )->text() );
                        $form .= Xml::closeElement( 'form' );
@@ -110,7 +110,7 @@ class EmailConfirmation extends UnlistedSpecialPage {
         * Attempt to confirm the user's email address and show success or failure
         * as needed; if successful, take the user to log in
         *
-        * @param $code string Confirmation code
+        * @param string $code Confirmation code
         */
        function attemptConfirm( $code ) {
                $user = User::newFromConfirmationCode( $code );
@@ -154,7 +154,7 @@ class EmailInvalidation extends UnlistedSpecialPage {
         * Attempt to invalidate the user's email address and show success or failure
         * as needed; if successful, link to main page
         *
-        * @param $code string Confirmation code
+        * @param string $code Confirmation code
         */
        function attemptInvalidate( $code ) {
                $user = User::newFromConfirmationCode( $code );
index d156d20..b118059 100644 (file)
@@ -192,7 +192,6 @@ class SpecialContributions extends SpecialPage {
                        }
                        $out->preventClickjacking( $pager->getPreventClickjacking() );
 
-
                        # Show the appropriate "footer" message - WHOIS tools, etc.
                        if ( $this->opts['contribs'] == 'newbie' ) {
                                $message = 'sp-contributions-footer-newbies';
@@ -541,6 +540,10 @@ class SpecialContributions extends SpecialPage {
                        Xml::closeElement( 'form' );
                return $form;
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
 
 /**
@@ -594,7 +597,7 @@ class ContribsPager extends ReverseChronologicalPager {
         * This method basically executes the exact same code as the parent class, though with
         * a hook added, to allow extentions to add additional queries.
         *
-        * @param $offset String: index offset, inclusive
+        * @param string $offset index offset, inclusive
         * @param $limit Integer: exact query limit
         * @param $descending Boolean: query direction, false for ascending, true for descending
         * @return ResultWrapper
@@ -627,7 +630,7 @@ class ContribsPager extends ReverseChronologicalPager {
                $result = array();
 
                // loop all results and collect them in an array
-               foreach ( $data as $j => $query ) {
+               foreach ( $data as $query ) {
                        foreach ( $query as $i => $row ) {
                                // use index column as key, allowing us to easily sort in PHP
                                $result[$row->{$this->getIndexField()} . "-$i"] = $row;
index f4904a5..6978d6b 100644 (file)
@@ -82,4 +82,8 @@ class DeadendPagesPage extends PageQueryPage {
                        return array( 'page_title' );
                }
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index 0c934a4..e374979 100644 (file)
@@ -261,7 +261,7 @@ class DeletedContributionsPage extends SpecialPage {
         * Special page "deleted user contributions".
         * Shows a list of the deleted contributions of a user.
         *
-        * @param $par String: (optional) user name of the user for which to show the contributions
+        * @param string $par (optional) user name of the user for which to show the contributions
         */
        function execute( $par ) {
                global $wgQueryPageDefaultLimit;
@@ -465,7 +465,7 @@ class DeletedContributionsPage extends SpecialPage {
 
        /**
         * Generates the namespace selector form with hidden attributes.
-        * @param $options Array: the options to be included.
+        * @param array $options the options to be included.
         * @return string
         */
        function getForm( $options ) {
@@ -522,4 +522,8 @@ class DeletedContributionsPage extends SpecialPage {
                        Xml::closeElement( 'form' );
                return $f;
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index a9c554a..2126ca5 100644 (file)
@@ -158,4 +158,8 @@ class DisambiguationsPage extends QueryPage {
 
                return "$from $edit $arr $to";
        }
+
+       protected function getGroupName() {
+               return 'pages';
+       }
 }
index 512fd85..5a5d749 100644 (file)
@@ -162,4 +162,8 @@ class DoubleRedirectsPage extends QueryPage {
 
                return( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index 7e1b44a..d2838e0 100644 (file)
@@ -205,7 +205,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         * $titles can be an array of strings or Title objects; the former
         * is preferred, since Titles are very memory-heavy
         *
-        * @param $titles array of strings, or Title objects
+        * @param array $titles of strings, or Title objects
         * @param $output String
         */
        private function showTitles( $titles, &$output ) {
@@ -313,7 +313,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         *
         * @param Title $title
         * @param int $namespace
-        * @param String $dbKey
+        * @param string $dbKey
         * @return bool: Whether this item is valid
         */
        private function checkTitle( $title, $namespace, $dbKey ) {
@@ -382,7 +382,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         * $titles can be an array of strings or Title objects; the former
         * is preferred, since Titles are very memory-heavy
         *
-        * @param $titles Array of strings, or Title objects
+        * @param array $titles of strings, or Title objects
         */
        private function watchTitles( $titles ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -415,7 +415,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         * $titles can be an array of strings or Title objects; the former
         * is preferred, since Titles are very memory-heavy
         *
-        * @param $titles Array of strings, or Title objects
+        * @param array $titles of strings, or Title objects
         */
        private function unwatchTitles( $titles ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -668,8 +668,8 @@ class EditWatchlistCheckboxSeriesField extends HTMLMultiSelectField {
         * form is open (bug 32126), but we know that invalid items will
         * be harmless so we can override it here.
         *
-        * @param $value String the value the field was submitted with
-        * @param $alldata Array the data collected from the form
+        * @param string $value the value the field was submitted with
+        * @param array $alldata the data collected from the form
         * @return Mixed Bool true on success, or String error to display.
         */
        function validate( $value, $alldata ) {
index 9a42c09..b5ad589 100644 (file)
@@ -163,7 +163,7 @@ class SpecialEmailUser extends UnlistedSpecialPage {
        /**
         * Validate target User
         *
-        * @param $target String: target user name
+        * @param string $target target user name
         * @return User object on success or a string on error
         */
        public static function getTarget( $target ) {
@@ -191,7 +191,7 @@ class SpecialEmailUser extends UnlistedSpecialPage {
         * Check whether a user is allowed to send email
         *
         * @param $user User object
-        * @param $editToken String: edit token
+        * @param string $editToken edit token
         * @return null on success or string on error
         */
        public static function getPermissionsError( $user, $editToken ) {
@@ -231,7 +231,7 @@ class SpecialEmailUser extends UnlistedSpecialPage {
        /**
         * Form to ask for target user name.
         *
-        * @param $name String: user name submitted.
+        * @param string $name user name submitted.
         * @return String: form asking for user name.
         */
        protected function userForm( $name ) {
@@ -337,4 +337,8 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                        return $status;
                }
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index 9d1ec10..7abfefe 100644 (file)
@@ -272,7 +272,7 @@ class SpecialExport extends SpecialPage {
        /**
         * Do the actual page exporting
         *
-        * @param $page String: user input on what page(s) to export
+        * @param string $page user input on what page(s) to export
         * @param $history Mixed: one of the WikiExporter history export constants
         * @param $list_authors Boolean: Whether to add distinct author list (when
         *                      not returning full history)
@@ -561,4 +561,7 @@ class SpecialExport extends SpecialPage {
                return $pageSet;
        }
 
+       protected function getGroupName() {
+               return 'pagetools';
+       }
 }
index 7e4bc9c..5b7f353 100644 (file)
@@ -60,7 +60,6 @@ class FewestrevisionsPage extends QueryPage {
                );
        }
 
-
        function sortDescending() {
                return false;
        }
@@ -94,4 +93,8 @@ class FewestrevisionsPage extends QueryPage {
 
                return $this->getLanguage()->specialList( $plink, $nlink );
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index 366aa81..f245816 100644 (file)
@@ -67,7 +67,7 @@ class FileDuplicateSearchPage extends QueryPage {
 
        /**
         *
-        * @param $dupes Array of File objects
+        * @param array $dupes of File objects
         */
        function showList( $dupes ) {
                $html = array();
@@ -215,4 +215,8 @@ class FileDuplicateSearchPage extends QueryPage {
 
                return "$plink . . $user . . $time";
        }
+
+       protected function getGroupName() {
+               return 'media';
+       }
 }
index e086650..bbcced2 100644 (file)
@@ -47,7 +47,7 @@ class SpecialFilepath extends SpecialPage {
                        $file = wfFindFile( $title );
 
                        if ( $file && $file->exists() ) {
-                               // Default behaviour: Use the direct link to the file.
+                               // Default behavior: Use the direct link to the file.
                                $url = $file->getURL();
                                $width = $request->getInt( 'width', -1 );
                                $height = $request->getInt( 'height', -1 );
@@ -86,4 +86,8 @@ class SpecialFilepath extends SpecialPage {
                        Html::closeElement( 'form' )
                );
        }
+
+       protected function getGroupName() {
+               return 'media';
+       }
 }
index 16772ec..aa56041 100644 (file)
@@ -341,6 +341,10 @@ class SpecialImport extends SpecialPage {
                        );
                }
        }
+
+       protected function getGroupName() {
+               return 'pagetools';
+       }
 }
 
 /**
index 84e3cb7..d204d50 100644 (file)
@@ -102,8 +102,8 @@ class SpecialJavaScriptTest extends SpecialPage {
         * Function to wrap the summary.
         * It must be given a valid state as a second parameter or an exception will
         * be thrown.
-        * @param $html String: The raw HTML.
-        * @param $state String: State, one of 'noframework', 'unknownframework' or 'frameworkfound'
+        * @param string $html The raw HTML.
+        * @param string $state State, one of 'noframework', 'unknownframework' or 'frameworkfound'
         * @throws MWException
         * @return string
         */
@@ -157,4 +157,8 @@ HTML;
                // $wgJavaScriptTestConfig in DefaultSettings.php
                $out->addJsConfigVars( 'QUnitTestSwarmInjectJSPath', $wgJavaScriptTestConfig['qunit']['testswarm-injectjs'] );
        }
+
+       protected function getGroupName() {
+               return 'other';
+       }
 }
index f5fa697..53625cf 100644 (file)
@@ -22,7 +22,6 @@
  * @author Brion Vibber
  */
 
-
 /**
  * Special:LinkSearch to search the external-links table.
  * @ingroup SpecialPage
@@ -222,4 +221,8 @@ class LinkSearchPage extends QueryPage {
        function getOrderFields() {
                return array();
        }
+
+       protected function getGroupName() {
+               return 'redirects';
+       }
 }
index 661db7b..c864ae2 100644 (file)
@@ -51,6 +51,10 @@ class SpecialListFiles extends IncludableSpecialPage {
                }
                $this->getOutput()->addHTML( $html );
        }
+
+       protected function getGroupName() {
+               return 'media';
+       }
 }
 
 /**
index c82522a..7cccf88 100644 (file)
@@ -139,12 +139,12 @@ class SpecialListGroupRights extends SpecialPage {
        /**
         * Create a user-readable list of permissions from the given array.
         *
-        * @param $permissions Array of permission => bool (from $wgGroupPermissions items)
-        * @param $revoke Array of permission => bool (from $wgRevokePermissions items)
-        * @param $add Array of groups this group is allowed to add or true
-        * @param $remove Array of groups this group is allowed to remove or true
-        * @param $addSelf Array of groups this group is allowed to add to self or true
-        * @param $removeSelf Array of group this group is allowed to remove from self or true
+        * @param array $permissions of permission => bool (from $wgGroupPermissions items)
+        * @param array $revoke of permission => bool (from $wgRevokePermissions items)
+        * @param array $add of groups this group is allowed to add or true
+        * @param array $remove of groups this group is allowed to remove or true
+        * @param array $addSelf of groups this group is allowed to add to self or true
+        * @param array $removeSelf of group this group is allowed to remove from self or true
         * @return string List of all granted permissions, separated by comma separator
         */
        private function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) {
@@ -212,4 +212,8 @@ class SpecialListGroupRights extends SpecialPage {
                        return '<ul><li>' . implode( "</li>\n<li>", $r ) . '</li></ul>';
                }
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index cdad688..0283767 100644 (file)
@@ -126,4 +126,8 @@ class ListredirectsPage extends QueryPage {
                        return "<del>$rd_link</del>";
                }
        }
+
+       protected function getGroupName() {
+               return 'pages';
+       }
 }
index 3265d1a..ed21396 100644 (file)
@@ -36,7 +36,7 @@ class UsersPager extends AlphabeticPager {
 
        /**
         * @param $context IContextSource
-        * @param $par array (Default null)
+        * @param array $par (Default null)
         * @param $including boolean Whether this page is being transcluded in
         * another page
         */
@@ -297,8 +297,8 @@ class UsersPager extends AlphabeticPager {
        /**
         * Format a link to a group description page
         *
-        * @param $group String: group name
-        * @param $username String Username
+        * @param string $group group name
+        * @param string $username Username
         * @return string
         */
        protected static function buildGroupLink( $group, $username ) {
@@ -321,7 +321,7 @@ class SpecialListUsers extends IncludableSpecialPage {
        /**
         * Show the special page
         *
-        * @param $par string (optional) A group to list users from
+        * @param string $par (optional) A group to list users from
         */
        public function execute( $par ) {
                $this->setHeaders();
@@ -347,4 +347,8 @@ class SpecialListUsers extends IncludableSpecialPage {
 
                $this->getOutput()->addHTML( $s );
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index d71ac6e..95ef951 100644 (file)
@@ -102,4 +102,8 @@ class SpecialLockdb extends FormSpecialPage {
                $out->addSubtitle( $this->msg( 'lockdbsuccesssub' ) );
                $out->addWikiMsg( 'lockdbsuccesstext' );
        }
+
+       protected function getGroupName() {
+               return 'wiki';
+       }
 }
index 7800e56..4fc0f6e 100644 (file)
@@ -182,7 +182,6 @@ class SpecialLog extends SpecialPage {
                return $s;
        }
 
-
        /**
         * Set page title and show header for this log type
         * @param $type string
@@ -194,4 +193,7 @@ class SpecialLog extends SpecialPage {
                $this->getOutput()->addHTML( $page->getDescription()->parseAsBlock() );
        }
 
+       protected function getGroupName() {
+               return 'changes';
+       }
 }
index 2889f7e..8c6a88a 100644 (file)
@@ -81,4 +81,8 @@ class LonelyPagesPage extends PageQueryPage {
                        return array( 'page_title' );
                }
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index dd60e37..c045f9e 100644 (file)
@@ -34,4 +34,8 @@ class LongPagesPage extends ShortPagesPage {
        function sortDescending() {
                return true;
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index 432956f..c5a109d 100644 (file)
@@ -92,7 +92,6 @@ class MIMEsearchPage extends QueryPage {
                parent::execute( $par );
        }
 
-
        function formatResult( $skin, $result ) {
                global $wgContLang;
 
@@ -134,4 +133,8 @@ class MIMEsearchPage extends QueryPage {
                );
                return in_array( $type, $types );
        }
+
+       protected function getGroupName() {
+               return 'media';
+       }
 }
index 85e1d65..c68f2df 100644 (file)
@@ -423,6 +423,10 @@ class SpecialMergeHistory extends SpecialPage {
 
                return true;
        }
+
+       protected function getGroupName() {
+               return 'pagetools';
+       }
 }
 
 class MergeHistoryPager extends ReverseChronologicalPager {
index 085a09f..11f26bd 100644 (file)
@@ -99,4 +99,8 @@ class MostcategoriesPage extends QueryPage {
 
                return $this->getLanguage()->specialList( $link, $count );
        }
+
+       protected function getGroupName() {
+               return 'highuse';
+       }
 }
index 01a5caf..78b2d91 100644 (file)
@@ -58,4 +58,7 @@ class MostimagesPage extends ImageQueryPage {
                return $this->msg( 'nimagelinks' )->numParams( $row->value )->escaped() . '<br />';
        }
 
+       protected function getGroupName() {
+               return 'highuse';
+       }
 }
index e08cdf3..574a9af 100644 (file)
@@ -114,4 +114,8 @@ class MostinterwikisPage extends QueryPage {
 
                return $this->getLanguage()->specialList( $link, $count );
        }
+
+       protected function getGroupName() {
+               return 'highuse';
+       }
 }
index 66814cb..4b6e567 100644 (file)
@@ -81,7 +81,7 @@ class MostlinkedPage extends QueryPage {
         * Make a link to "what links here" for the specified title
         *
         * @param $title Title being queried
-        * @param $caption String: text to display on the link
+        * @param string $caption text to display on the link
         * @return String
         */
        function makeWlhLink( $title, $caption ) {
@@ -107,4 +107,8 @@ class MostlinkedPage extends QueryPage {
                        $this->msg( 'nlinks' )->numParams( $result->value )->escaped() );
                return $this->getLanguage()->specialList( $link, $wlh );
        }
+
+       protected function getGroupName() {
+               return 'highuse';
+       }
 }
index df2975c..a1bce45 100644 (file)
@@ -94,4 +94,8 @@ class MostlinkedCategoriesPage extends QueryPage {
                $nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
                return $this->getLanguage()->specialList( $plink, $nlinks );
        }
+
+       protected function getGroupName() {
+               return 'highuse';
+       }
 }
index a2d51db..506e6b2 100644 (file)
@@ -124,4 +124,8 @@ class MostlinkedTemplatesPage extends QueryPage {
                $label = $this->msg( 'ntransclusions' )->numParams( $result->value )->escaped();
                return Linker::link( $wlh, $label );
        }
+
+       protected function getGroupName() {
+               return 'highuse';
+       }
 }
index b025331..ad6b788 100644 (file)
@@ -31,4 +31,8 @@ class MostrevisionsPage extends FewestrevisionsPage {
        function sortDescending() {
                return true;
        }
+
+       protected function getGroupName() {
+               return 'highuse';
+       }
 }
index bf93ef2..4adb037 100644 (file)
@@ -71,7 +71,6 @@ class MovePageForm extends UnlistedSpecialPage {
                        ? Title::newFromText( $newTitleText_bc )
                        : Title::makeTitleSafe( $newTitleTextNs, $newTitleTextMain );
 
-
                $user = $this->getUser();
 
                # Check rights
@@ -104,7 +103,7 @@ class MovePageForm extends UnlistedSpecialPage {
        /**
         * Show the form
         *
-        * @param $err Array: error messages. Each item is an error message.
+        * @param array $err error messages. Each item is an error message.
         *    It may either be a string message name or array message name and
         *    parameters, like the second argument to OutputPage::wrapWikiMsg().
         */
@@ -494,7 +493,6 @@ class MovePageForm extends UnlistedSpecialPage {
                        $msgName = 'movepage-moved-noredirect';
                }
 
-
                $out->addHTML( $this->msg( 'movepage-moved' )->rawParams( $oldLink,
                        $newLink )->params( $oldText, $newText )->parseAsBlock() );
                $out->addWikiMsg( $msgName );
@@ -677,4 +675,8 @@ class MovePageForm extends UnlistedSpecialPage {
                }
                $out->addHTML( "</ul>\n" );
        }
+
+       protected function getGroupName() {
+               return 'pagetools';
+       }
 }
index caf48be..52cbc3a 100644 (file)
@@ -42,8 +42,11 @@ class SpecialNewFiles extends IncludableSpecialPage {
                        $this->getOutput()->addHTML( $pager->getNavigationBar() );
                }
        }
-}
 
+       protected function getGroupName() {
+               return 'changes';
+       }
+}
 
 /**
  * @ingroup SpecialPage Pager
index 6e8e634..ebb3021 100644 (file)
@@ -476,6 +476,10 @@ class SpecialNewpages extends IncludableSpecialPage {
                }
                return '';
        }
+
+       protected function getGroupName() {
+               return 'changes';
+       }
 }
 
 /**
index 189798d..8f8c981 100644 (file)
@@ -131,4 +131,8 @@ class SpecialPagesWithProp extends QueryPage {
                }
                return $ret;
        }
+
+       protected function getGroupName() {
+               return 'pages';
+       }
 }
index f42a7a1..90b0ac8 100644 (file)
@@ -326,4 +326,8 @@ class SpecialPasswordReset extends FormSpecialPage {
 
                return false;
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index 99b586e..7ce8c13 100644 (file)
@@ -72,4 +72,8 @@ class PopularPagesPage extends QueryPage {
                $nv = $this->msg( 'nviews' )->numParams( $result->value )->escaped();
                return $this->getLanguage()->specialList( $link, $nv );
        }
+
+       protected function getGroupName() {
+               return 'wiki';
+       }
 }
index 340172c..a50e7c1 100644 (file)
@@ -87,4 +87,8 @@ class SpecialPreferences extends SpecialPage {
 
                return true;
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index e1e18e4..6affa73 100644 (file)
@@ -35,7 +35,7 @@ class SpecialPrefixindex extends SpecialAllpages {
 
        /**
         * Entry point : initialise variables and call subfunctions.
-        * @param $par String: becomes "FOO" when called like Special:Prefixindex/FOO (default null)
+        * @param string $par becomes "FOO" when called like Special:Prefixindex/FOO (default null)
         */
        function execute( $par ) {
                global $wgContLang;
@@ -83,14 +83,14 @@ class SpecialPrefixindex extends SpecialAllpages {
        /**
         * HTML for the top form
         * @param $namespace Integer: a namespace constant (default NS_MAIN).
-        * @param $from String: dbKey we are starting listing at.
-        * @param $hideredirects Bool: hide redirects (default FALSE)
+        * @param string $from dbKey we are starting listing at.
+        * @param bool $hideredirects hide redirects (default FALSE)
         * @return string
         */
        function namespacePrefixForm( $namespace = NS_MAIN, $from = '', $hideredirects = false ) {
                global $wgScript;
 
-               $out  = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
+               $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
                $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
                $out .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() );
                $out .= Xml::openElement( 'fieldset' );
@@ -135,8 +135,8 @@ class SpecialPrefixindex extends SpecialAllpages {
        /**
         * @param $namespace Integer, default NS_MAIN
         * @param $prefix String
-        * @param $from String: list all pages from this name (default FALSE)
-        * @param $hideredirects Bool: hide redirects (default FALSE)
+        * @param string $from list all pages from this name (default FALSE)
+        * @param bool $hideredirects hide redirects (default FALSE)
         */
        function showPrefixChunk( $namespace = NS_MAIN, $prefix, $from = null, $hideredirects = false ) {
                global $wgContLang;
@@ -263,4 +263,8 @@ class SpecialPrefixindex extends SpecialAllpages {
 
                $this->getOutput()->addHTML( $out2 . $out . $footer );
        }
+
+       protected function getGroupName() {
+               return 'pages';
+       }
 }
index d580d62..eb89bec 100644 (file)
@@ -29,7 +29,7 @@
 class SpecialProtectedpages extends SpecialPage {
 
        protected $IdLevel = 'level';
-       protected $IdType  = 'type';
+       protected $IdType = 'type';
 
        public function __construct() {
                parent::__construct( 'Protectedpages' );
@@ -146,9 +146,9 @@ class SpecialProtectedpages extends SpecialPage {
 
        /**
         * @param $namespace Integer
-        * @param $type String: restriction type
-        * @param $level String: restriction level
-        * @param $sizetype String: "min" or "max"
+        * @param string $type restriction type
+        * @param string $level restriction level
+        * @param string $sizetype "min" or "max"
         * @param $size Integer
         * @param $indefOnly Boolean: only indefinie protection
         * @param $cascadeOnly Boolean: only cascading protection
@@ -290,6 +290,10 @@ class SpecialProtectedpages extends SpecialPage {
                                array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ),
                                implode( "\n", $options ) ) . "</span>";
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
 
 /**
index abb4af3..6a94deb 100644 (file)
@@ -29,7 +29,7 @@
 class SpecialProtectedtitles extends SpecialPage {
 
        protected $IdLevel = 'level';
-       protected $IdType  = 'type';
+       protected $IdType = 'type';
 
        public function __construct() {
                parent::__construct( 'Protectedtitles' );
@@ -182,6 +182,10 @@ class SpecialProtectedtitles extends SpecialPage {
                                array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ),
                                implode( "\n", $options ) );
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
 
 /**
index 13a7043..b59f834 100644 (file)
@@ -28,7 +28,7 @@
  * @ingroup SpecialPage
  */
 class RandomPage extends SpecialPage {
-       private $namespaces;  // namespaces to select pages from
+       private $namespaces; // namespaces to select pages from
        protected $isRedir = false; // should the result be a redirect?
        protected $extra = array(); // Extra SQL statements
 
@@ -159,4 +159,8 @@ class RandomPage extends SpecialPage {
 
                return $dbr->fetchObject( $res );
        }
+
+       protected function getGroupName() {
+               return 'redirects';
+       }
 }
index 2cc5f9e..008678f 100644 (file)
@@ -129,7 +129,6 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                return $this->rcOptions;
        }
 
-
        /**
         * Main execution point
         *
@@ -340,7 +339,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                if( $opts['namespace'] !== '' ) {
                        $selectedNS = $dbr->addQuotes( $opts['namespace'] );
                        $operator = $opts['invert'] ? '!='  : '=';
-                       $boolean  = $opts['invert'] ? 'AND' : 'OR';
+                       $boolean = $opts['invert'] ? 'AND' : 'OR';
 
                        # namespace association (bug 2429)
                        if( !$opts['associated'] ) {
@@ -469,7 +468,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
        /**
         * Send output to the OutputPage object, only called if not used feeds
         *
-        * @param $rows Array of database rows
+        * @param array $rows of database rows
         * @param $opts FormOptions
         */
        public function webOutput( $rows, $opts ) {
@@ -725,7 +724,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
        /**
         * Filter $rows by categories set in $opts
         *
-        * @param $rows Array of database rows
+        * @param array $rows of database rows
         * @param $opts FormOptions
         */
        function filterByCategories( &$rows, FormOptions $opts ) {
@@ -790,8 +789,8 @@ class SpecialRecentChanges extends IncludableSpecialPage {
         * Makes change an option link which carries all the other options
         *
         * @param $title Title
-        * @param $override Array: options to override
-        * @param $options Array: current options
+        * @param array $override options to override
+        * @param array $options current options
         * @param $active Boolean: whether to show the link in bold
         * @return string
         */
@@ -863,7 +862,6 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                }
                $dl = $lang->pipeList( $dl );
 
-
                // show/hide links
                $showhide = array( $this->msg( 'show' )->text(), $this->msg( 'hide' )->text() );
                $filters = array(
@@ -909,4 +907,8 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                        'mediawiki.special.recentchanges',
                ) );
        }
+
+       protected function getGroupName() {
+               return 'changes';
+       }
 }
index 6f75da4..c85e891 100644 (file)
@@ -464,8 +464,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
        }
 
        /**
-       * @return String: HTML
-       */
+        * @return String: HTML
+        */
        protected function buildCheckBoxes() {
                $html = '<table>';
                // If there is just one item, use checkboxes
@@ -594,8 +594,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
 
        /**
         * Put together a rev_deleted bitfield
-        * @param $bitPars array extractBitParams() params
-        * @param $oldfield int current bitfield
+        * @param array $bitPars extractBitParams() params
+        * @param int $oldfield current bitfield
         * @return array
         */
        public static function extractBitfield( $bitPars, $oldfield ) {
@@ -623,4 +623,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                        array( 'value' => $bitfield, 'comment' => $reason )
                );
        }
+
+       protected function getGroupName() {
+               return 'pagetools';
+       }
 }
index 77f0ddb..6c40148 100644 (file)
@@ -78,7 +78,7 @@ class SpecialSearch extends SpecialPage {
        /**
         * Entry point
         *
-        * @param $par String or null
+        * @param string $par or null
         */
        public function execute( $par ) {
                $this->setHeaders();
@@ -261,7 +261,7 @@ class SpecialSearch extends SpecialPage {
                if( $textMatches && $textMatches->hasSuggestion() ) {
                        $st = SpecialPage::getTitleFor( 'Search' );
 
-                       # mirror Go/Search behaviour of original request ..
+                       # mirror Go/Search behavior of original request ..
                        $didYouMeanParams = array( 'search' => $textMatches->getSuggestionQuery() );
 
                        if( $this->fulltext != null ) {
@@ -356,7 +356,6 @@ class SpecialSearch extends SpecialPage {
                $out->addHTML( $this->formHeader( $term, $num, $totalRes ) );
                $out->addHtml( $this->getProfileForm( $this->profile, $term ) );
 
-
                $out->addHtml( Xml::closeElement( 'form' ) );
                $out->addHtml( "<div class='searchresults'>" );
 
@@ -537,7 +536,7 @@ class SpecialSearch extends SpecialPage {
         * Format a single hit result
         *
         * @param $result SearchResult
-        * @param $terms Array: terms to highlight
+        * @param array $terms terms to highlight
         *
         * @return string
         */
@@ -759,7 +758,7 @@ class SpecialSearch extends SpecialPage {
         * @param $lastInterwiki String
         * @param $terms Array
         * @param $query String
-        * @param $customCaptions Array: iw prefix -> caption
+        * @param array $customCaptions iw prefix -> caption
         *
         * @return string
         */
@@ -852,7 +851,7 @@ class SpecialSearch extends SpecialPage {
        /**
         * Generates the power search box at [[Special:Search]]
         *
-        * @param $term String: search term
+        * @param string $term search term
         * @param $opts array
         * @return String: HTML form
         */
@@ -1074,10 +1073,10 @@ class SpecialSearch extends SpecialPage {
         * Make a search link with some target namespaces
         *
         * @param $term String
-        * @param $namespaces Array ignored
-        * @param $label String: link's text
-        * @param $tooltip String: link's tooltip
-        * @param $params Array: query string parameters
+        * @param array $namespaces ignored
+        * @param string $label link's text
+        * @param string $tooltip link's tooltip
+        * @param array $params query string parameters
         * @return String: HTML fragment
         */
        protected function makeSearchLink( $term, $namespaces, $label, $tooltip, $params = array() ) {
@@ -1107,7 +1106,7 @@ class SpecialSearch extends SpecialPage {
        /**
         * Check if query starts with image: prefix
         *
-        * @param $term String: the string to check
+        * @param string $term the string to check
         * @return Boolean
         */
        protected function startsWithImage( $term ) {
@@ -1123,7 +1122,7 @@ class SpecialSearch extends SpecialPage {
        /**
         * Check if query starts with all: prefix
         *
-        * @param $term String: the string to check
+        * @param string $term the string to check
         * @return Boolean
         */
        protected function startsWithAll( $term ) {
@@ -1162,4 +1161,7 @@ class SpecialSearch extends SpecialPage {
                $this->extraParams[$key] = $value;
        }
 
+       protected function getGroupName() {
+               return 'redirects';
+       }
 }
index 5a4e8f0..1be7fbe 100644 (file)
@@ -110,4 +110,8 @@ class ShortPagesPage extends QueryPage {
                                ? "${hlinkInParentheses} {$dm}{$plink} {$dm}[{$size}]"
                                : "<del>${hlinkInParentheses} {$dm}{$plink} {$dm}[{$size}]</del>";
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index d80218f..57fffb8 100644 (file)
@@ -62,7 +62,7 @@ class SpecialSpecialpages extends UnlistedSpecialPage {
                $groups = array();
                foreach ( $pages as $page ) {
                        if ( $page->isListed() ) {
-                               $group = SpecialPageFactory::getGroup( $page );
+                               $group = $page->getFinalGroupName();
                                if( !isset( $groups[$group] ) ) {
                                        $groups[$group] = array();
                                }
index f4bc666..bc1b600 100644 (file)
@@ -277,21 +277,60 @@ class SpecialStatistics extends SpecialPage {
                return $text;
        }
 
-       private function getOtherStats( $stats ) {
-               if ( !count( $stats ) )
-                       return '';
+       /**
+        * Conversion of external statistics into an internal representation
+        * Following a ([<header-message>][<item-message>] = number) pattern
+        *
+        * @param array $stats
+        * @return string
+        */
+       private function getOtherStats( array $stats ) {
+               $return = '';
 
-               $return = Xml::openElement( 'tr' ) .
-                       Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 'statistics-header-hooks' )->parse() ) .
-                       Xml::closeElement( 'tr' );
+               foreach( $stats as $header => $items ) {
+
+                       // Identify the structure used
+                       if ( is_array( $items ) ) {
 
-               foreach( $stats as $name => $number ) {
-                       $name = htmlspecialchars( $name );
-                       $number = htmlspecialchars( $number );
+                               // Ignore headers that are recursively set as legacy header
+                               if ( $header !== 'statistics-header-hooks' ) {
+                                       $return .= $this->formatRowHeader( $header );
+                               }
+
+                               // Collect all items that belong to the same header
+                               foreach( $items as $key => $value ) {
+                                       $name = $this->msg( $key )->inContentLanguage()->parse();
+                                       $number = htmlspecialchars( $value );
+
+                                       $return .= $this->formatRow( $name, $this->getLanguage()->formatNum( $number ), array( 'class' => 'mw-statistics-hook' ) );
+                               }
+                       } else {
+                               // Create the legacy header only once
+                               if ( $return === '' ) {
+                                       $return .= $this->formatRowHeader( 'statistics-header-hooks' );
+                               }
 
-                       $return .= $this->formatRow( $name, $this->getLanguage()->formatNum( $number ), array( 'class' => 'mw-statistics-hook' ) );
+                               // Recursively remap the legacy structure
+                               $return .= $this->getOtherStats( array( 'statistics-header-hooks' => array( $header => $items ) ) );
+                       }
                }
 
                return $return;
        }
+
+       /**
+        * Format row header
+        *
+        * @param string $header
+        * @return string
+        */
+       private function formatRowHeader( $header ) {
+               return Xml::openElement( 'tr' ) .
+                       Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( $header )->parse() ) .
+                       Xml::closeElement( 'tr' );
+       }
+
+       protected function getGroupName() {
+               return 'wiki';
+       }
 }
index 4036ebb..6d16103 100644 (file)
@@ -92,4 +92,8 @@ class SpecialTags extends SpecialPage {
 
                return Xml::tags( 'tr', null, $newRow ) . "\n";
        }
+
+       protected function getGroupName() {
+               return 'changes';
+       }
 }
index 076469c..c4a53cf 100644 (file)
@@ -213,4 +213,8 @@ class SpecialUnblock extends SpecialPage {
 
                return true;
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index 5865bf6..53aa3f3 100644 (file)
@@ -60,4 +60,7 @@ class UncategorizedImagesPage extends ImageQueryPage {
                );
        }
 
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index 37fcb2f..b518e6f 100644 (file)
@@ -55,7 +55,7 @@ class UncategorizedPagesPage extends PageQueryPage {
                        // default for page_namespace is all content namespaces (if requestedNamespace is false)
                        // otherwise, page_namespace is requestedNamespace
                        'conds' => array ( 'cl_from IS NULL',
-                                       'page_namespace' => ( $this->requestedNamespace!==false ? $this->requestedNamespace : MWNamespace::getContentNamespaces() ),
+                                       'page_namespace' => ( $this->requestedNamespace !== false ? $this->requestedNamespace : MWNamespace::getContentNamespaces() ),
                                        'page_is_redirect' => 0 ),
                        'join_conds' => array ( 'categorylinks' => array (
                                        'LEFT JOIN', 'cl_from = page_id' ) )
@@ -69,4 +69,8 @@ class UncategorizedPagesPage extends PageQueryPage {
                        return array( 'page_namespace', 'page_title' );
                return array( 'page_title' );
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index b6578a3..34a30a0 100644 (file)
@@ -67,7 +67,7 @@ class PageArchive {
         * given title prefix.
         * Returns result wrapper with (ar_namespace, ar_title, count) fields.
         *
-        * @param $prefix String: title prefix
+        * @param string $prefix title prefix
         * @return ResultWrapper
         */
        public static function listPagesByPrefix( $prefix ) {
@@ -331,7 +331,7 @@ class PageArchive {
         * Once restored, the items will be removed from the archive tables.
         * The deletion log will be updated with an undeletion notice.
         *
-        * @param $timestamps Array: pass an empty array to restore all revisions, otherwise list the ones to undelete.
+        * @param array $timestamps pass an empty array to restore all revisions, otherwise list the ones to undelete.
         * @param $comment String
         * @param $fileVersions Array
         * @param $unsuppress Boolean
@@ -413,7 +413,7 @@ class PageArchive {
         * to the cur/old tables. If the page currently exists, all revisions will
         * be stuffed into old, otherwise the most recent will go into cur.
         *
-        * @param $timestamps Array: pass an empty array to restore all revisions, otherwise list the ones to undelete.
+        * @param array $timestamps pass an empty array to restore all revisions, otherwise list the ones to undelete.
         * @param $unsuppress Boolean: remove all ar_deleted/fa_deleted restrictions of seletected revs
         *
         * @param $comment String
@@ -447,9 +447,9 @@ class PageArchive {
                        $makepage = false;
                        # Page already exists. Import the history, and if necessary
                        # we'll update the latest revision field in the record.
-                       $newid             = 0;
-                       $pageId            = $page->page_id;
-                       $previousRevId    = $page->page_latest;
+
+                       $previousRevId = $page->page_latest;
+
                        # Get the time span of this page
                        $previousTimestamp = $dbw->selectField( 'revision', 'rev_timestamp',
                                array( 'rev_id' => $previousRevId ),
@@ -532,10 +532,8 @@ class PageArchive {
                $revision = Revision::newFromArchiveRow( $row,
                        array(
                                'title' => $article->getTitle(), // used to derive default content model
-                       ) );
-
-               $m = $revision->getContentModel();
-
+                       )
+               );
                $user = User::newFromName( $revision->getRawUserText(), false );
                $content = $revision->getContent( Revision::RAW );
 
@@ -552,7 +550,7 @@ class PageArchive {
                                return Status::newFatal( "undeleterevdel" );
                        }
                        // Safe to insert now...
-                       $newid  = $article->insertOn( $dbw );
+                       $newid = $article->insertOn( $dbw );
                        $pageId = $newid;
                } else {
                        // Check if a deleted revision will become the current revision...
@@ -563,7 +561,7 @@ class PageArchive {
                                }
                        }
 
-                       $newid  = false;
+                       $newid = false;
                        $pageId = $article->getId();
                }
 
@@ -1260,7 +1258,7 @@ class SpecialUndelete extends SpecialPage {
 
                if ( $this->mAllowed ) {
                        # Slip in the hidden controls here
-                       $misc  = Html::hidden( 'target', $this->mTarget );
+                       $misc = Html::hidden( 'target', $this->mTarget );
                        $misc .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() );
                        $misc .= Xml::closeElement( 'form' );
                        $out->addHTML( $misc );
@@ -1380,7 +1378,7 @@ class SpecialUndelete extends SpecialPage {
         *
         * @param $rev Revision
         * @param $titleObj Title
-        * @param $ts string Timestamp
+        * @param string $ts Timestamp
         * @return string
         */
        function getPageLink( $rev, $titleObj, $ts ) {
@@ -1411,8 +1409,8 @@ class SpecialUndelete extends SpecialPage {
         *
         * @param $file File
         * @param $titleObj Title
-        * @param $ts string A timestamp
-        * @param $key String: a storage key
+        * @param string $ts A timestamp
+        * @param string $key a storage key
         *
         * @return String: HTML fragment
         */
@@ -1525,4 +1523,8 @@ class SpecialUndelete extends SpecialPage {
                        $out->addWikiText( '<div class="error">' . $status->getWikiText( 'undelete-error-short', 'undelete-error-long' ) . '</div>' );
                }
        }
+
+       protected function getGroupName() {
+               return 'pagetools';
+       }
 }
index 2e77254..35141d8 100644 (file)
@@ -84,4 +84,8 @@ class SpecialUnlockdb extends FormSpecialPage {
                $out->addSubtitle( $this->msg( 'unlockdbsuccesssub' ) );
                $out->addWikiMsg( 'unlockdbsuccesstext' );
        }
+
+       protected function getGroupName() {
+               return 'wiki';
+       }
 }
index 69c42d5..6b91dd3 100644 (file)
@@ -64,4 +64,8 @@ class UnusedCategoriesPage extends QueryPage {
                $title = Title::makeTitle( NS_CATEGORY, $result->title );
                return Linker::link( $title, htmlspecialchars( $title->getText() ) );
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index cdab557..6955328 100644 (file)
@@ -80,4 +80,7 @@ class UnusedimagesPage extends ImageQueryPage {
                return $this->msg( 'unusedimagestext' )->parseAsBlock();
        }
 
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index fe79731..493e936 100644 (file)
@@ -85,4 +85,8 @@ class UnusedtemplatesPage extends QueryPage {
        function getPageHeader() {
                return $this->msg( 'unusedtemplatestext' )->parseAsBlock();
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index d397149..05ec6b0 100644 (file)
@@ -94,4 +94,8 @@ class UnwatchedpagesPage extends QueryPage {
 
                return $this->getLanguage()->specialList( $plink, $wlink );
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index a37f5fb..89c06b2 100644 (file)
@@ -39,7 +39,7 @@ class SpecialUpload extends SpecialPage {
        }
 
        /** Misc variables **/
-       public $mRequest;                       // The WebRequest or FauxRequest this form is supposed to handle
+       public $mRequest; // The WebRequest or FauxRequest this form is supposed to handle
        public $mSourceType;
 
        /**
@@ -54,7 +54,7 @@ class SpecialUpload extends SpecialPage {
        public $mUploadClicked;
 
        /** User input variables from the "description" section **/
-       public $mDesiredDestName;       // The requested target file name
+       public $mDesiredDestName; // The requested target file name
        public $mComment;
        public $mLicense;
 
@@ -66,10 +66,10 @@ class SpecialUpload extends SpecialPage {
 
        /** Hidden variables **/
        public $mDestWarningAck;
-       public $mForReUpload;           // The user followed an "overwrite this file" link
-       public $mCancelUpload;          // The user clicked "Cancel and return to upload form" button
+       public $mForReUpload; // The user followed an "overwrite this file" link
+       public $mCancelUpload; // The user clicked "Cancel and return to upload form" button
        public $mTokenOk;
-       public $mUploadSuccessful = false;      // Subclasses can use this to determine whether a file was uploaded
+       public $mUploadSuccessful = false; // Subclasses can use this to determine whether a file was uploaded
 
        /** Text injection points for hooks not using HTMLForm **/
        public $uploadFormTextTop;
@@ -103,7 +103,6 @@ class SpecialUpload extends SpecialPage {
                $this->mCopyrightStatus = $request->getText( 'wpUploadCopyStatus' );
                $this->mCopyrightSource = $request->getText( 'wpUploadSource' );
 
-
                $this->mForReUpload = $request->getBool( 'wpForReUpload' ); // updating a file
                $this->mCancelUpload = $request->getCheck( 'wpCancelUpload' )
                        || $request->getCheck( 'wpReUpload' ); // b/w compat
@@ -208,8 +207,8 @@ class SpecialUpload extends SpecialPage {
        /**
         * Get an UploadForm instance with title and text properly set.
         *
-        * @param $message String: HTML string to add to the form
-        * @param $sessionKey String: session key in case this is a stashed upload
+        * @param string $message HTML string to add to the form
+        * @param string $sessionKey session key in case this is a stashed upload
         * @param $hideIgnoreWarning Boolean: whether to hide "ignore warning" check box
         * @return UploadForm
         */
@@ -299,7 +298,7 @@ class SpecialUpload extends SpecialPage {
         * essentially means that UploadBase::VERIFICATION_ERROR and
         * UploadBase::EMPTY_FILE should not be passed here.
         *
-        * @param $message String: HTML message to be passed to mainUploadForm
+        * @param string $message HTML message to be passed to mainUploadForm
         */
        protected function showRecoverableUploadError( $message ) {
                $sessionKey = $this->mUpload->stashSession();
@@ -373,7 +372,7 @@ class SpecialUpload extends SpecialPage {
        /**
         * Show the upload form with error message, but do not stash the file.
         *
-        * @param $message string HTML string
+        * @param string $message HTML string
         */
        protected function showUploadError( $message ) {
                $message = '<h2>' . $this->msg( 'uploadwarning' )->escaped() . "</h2>\n" .
@@ -522,11 +521,10 @@ class SpecialUpload extends SpecialPage {
                }
        }
 
-
        /**
         * Provides output to the user for a result of UploadBase::verifyUpload
         *
-        * @param $details Array: result of UploadBase::verifyUpload
+        * @param array $details result of UploadBase::verifyUpload
         * @throws MWException
         */
        protected function processVerificationError( $details ) {
@@ -625,7 +623,7 @@ class SpecialUpload extends SpecialPage {
         * Formats a result of UploadBase::getExistsWarning as HTML
         * This check is static and can be done pre-upload via AJAX
         *
-        * @param $exists Array: the result of UploadBase::getExistsWarning
+        * @param array $exists the result of UploadBase::getExistsWarning
         * @return String: empty string if there is no warning or an HTML fragment
         */
        public static function getExistsWarning( $exists ) {
@@ -678,7 +676,7 @@ class SpecialUpload extends SpecialPage {
        /**
         * Get a list of warnings
         *
-        * @param $filename String: local filename, e.g. 'file exists', 'non-descriptive filename'
+        * @param string $filename local filename, e.g. 'file exists', 'non-descriptive filename'
         * @return Array: list of warning messages
         */
        public static function ajaxGetExistsWarning( $filename ) {
@@ -719,6 +717,9 @@ class SpecialUpload extends SpecialPage {
                        $gallery->toHtml() . "</li>\n";
        }
 
+       protected function getGroupName() {
+               return 'media';
+       }
 }
 
 /**
@@ -1084,7 +1085,6 @@ class UploadForm extends HTMLForm {
                $out = $this->getOutput();
                $out->addJsConfigVars( $scriptVars );
 
-
                $out->addModules( array(
                        'mediawiki.action.edit', // For <charinsert> support
                        'mediawiki.legacy.upload', // Old form stuff...
index 31f9669..ddf0c6d 100644 (file)
@@ -57,7 +57,7 @@ class SpecialUploadStash extends UnlistedSpecialPage {
        /**
         * Execute page -- can output a file directly or show a listing of them.
         *
-        * @param $subPage String: subpage, e.g. in http://example.com/wiki/Special:UploadStash/foo.jpg, the "foo.jpg" part
+        * @param string $subPage subpage, e.g. in http://example.com/wiki/Special:UploadStash/foo.jpg, the "foo.jpg" part
         * @return Boolean: success
         */
        public function execute( $subPage ) {
@@ -73,7 +73,7 @@ class SpecialUploadStash extends UnlistedSpecialPage {
         * If file available in stash, cats it out to the client as a simple HTTP response.
         * n.b. Most sanity checking done in UploadStashLocalFile, so this is straightforward.
         *
-        * @param $key String: the key of a particular requested file
+        * @param string $key the key of a particular requested file
         * @throws HttpError
         * @return bool
         */
@@ -167,8 +167,8 @@ class SpecialUploadStash extends UnlistedSpecialPage {
        /**
         * Scale a file (probably with a locally installed imagemagick, or similar) and output it to STDOUT.
         * @param $file File
-        * @param $params array Scaling parameters ( e.g. array( width => '50' ) );
-        * @param $flags int Scaling flags ( see File:: constants )
+        * @param array $params Scaling parameters ( e.g. array( width => '50' ) );
+        * @param int $flags Scaling flags ( see File:: constants )
         * @throws MWException
         * @throws UploadStashFileNotFoundException
         * @return boolean success
@@ -277,8 +277,8 @@ class SpecialUploadStash extends UnlistedSpecialPage {
        /**
         * Output HTTP response of raw content
         * Side effect: writes HTTP response to STDOUT.
-        * @param $content String content
-        * @param $contentType String mime type
+        * @param string $content content
+        * @param string $contentType mime type
         * @throws SpecialUploadStashTooLargeException
         * @return bool
         */
@@ -296,8 +296,8 @@ class SpecialUploadStash extends UnlistedSpecialPage {
         * Output headers for streaming
         * XXX unsure about encoding as binary; if we received from HTTP perhaps we should use that encoding, concatted with semicolon to mimeType as it usually is.
         * Side effect: preps PHP to write headers to STDOUT.
-        * @param String $contentType : string suitable for content-type header
-        * @param String $size: length in bytes
+        * @param string $contentType : string suitable for content-type header
+        * @param string $size: length in bytes
         */
        private static function outputFileHeaders( $contentType, $size ) {
                header( "Content-Type: $contentType", true );
@@ -327,14 +327,9 @@ class SpecialUploadStash extends UnlistedSpecialPage {
        /**
         * Default action when we don't have a subpage -- just show links to the uploads we have,
         * Also show a button to clear stashed files
-        * @param $status [optional] Status: the result of processRequest
         * @return bool
         */
-       private function showUploads( $status = null ) {
-               if ( $status === null ) {
-                       $status = Status::newGood();
-               }
-
+       private function showUploads() {
                // sets the title, etc.
                $this->setHeaders();
                $this->outputHeader();
index 634d06f..dc350bf 100644 (file)
@@ -201,7 +201,7 @@ class LoginForm extends SpecialPage {
                if( !$status->isGood() ) {
                        $error = $this->getOutput()->parse( $status->getWikiText() );
                        $this->mainLoginForm( $error );
-                       return false;
+                       return;
                }
 
                $u = $status->getValue();
@@ -604,7 +604,7 @@ class LoginForm extends SpecialPage {
                                // faces etc will probably just fail cleanly here.
                                $retval = self::RESET_PASS;
                        } else {
-                               $retval = ( $this->mPassword  == '' ) ? self::EMPTY_PASS : self::WRONG_PASS;
+                               $retval = ( $this->mPassword == '' ) ? self::EMPTY_PASS : self::WRONG_PASS;
                        }
                } elseif ( $wgBlockDisablesLogin && $u->isBlocked() ) {
                        // If we've enabled it, make it so that a blocked user cannot login
@@ -636,7 +636,7 @@ class LoginForm extends SpecialPage {
        /**
         * Increment the login attempt throttle hit count for the (username,current IP)
         * tuple unless the throttle was already reached.
-        * @param $username string The user name
+        * @param string $username The user name
         * @return Bool|Integer The integer hit count or True if it is already at the limit
         */
        public static function incLoginThrottle( $username ) {
@@ -664,7 +664,7 @@ class LoginForm extends SpecialPage {
 
        /**
         * Clear the login attempt throttle hit count for the (username,current IP) tuple.
-        * @param $username string The user name
+        * @param string $username The user name
         * @return void
         */
        public static function clearLoginThrottle( $username ) {
@@ -831,6 +831,9 @@ class LoginForm extends SpecialPage {
                }
        }
 
+       /**
+        * @param $error string
+        */
        function resetLoginForm( $error ) {
                $this->getOutput()->addHTML( Xml::element( 'p', array( 'class' => 'error' ), $error ) );
                $reset = new SpecialChangePassword();
@@ -841,8 +844,8 @@ class LoginForm extends SpecialPage {
        /**
         * @param $u User object
         * @param $throttle Boolean
-        * @param $emailTitle String: message name of email title
-        * @param $emailText String: message name of email text
+        * @param string $emailTitle message name of email title
+        * @param string $emailText message name of email text
         * @return Status object
         */
        function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) {
@@ -870,7 +873,6 @@ class LoginForm extends SpecialPage {
                return $result;
        }
 
-
        /**
         * Run any hooks registered for logins, then HTTP redirect to
         * $this->mReturnTo (or Main Page if that's undefined).  Formerly we had a
@@ -923,7 +925,7 @@ class LoginForm extends SpecialPage {
        /**
         * Display an "successful action" page.
         *
-        * @param $title string|Message page's title
+        * @param string|Message $title page's title
         * @param $msgname string
         * @param $injected_html string
         */
@@ -945,6 +947,7 @@ class LoginForm extends SpecialPage {
         * User::isBlockedFromCreateAccount(), which gets this block, ignores the 'hardblock'
         * setting on blocks (bug 13611).
         * @param $block Block the block causing this error
+        * @throws ErrorPageError
         */
        function userBlockedMessage( Block $block ) {
                # Let's be nice about this, it's likely that this feature will be used
@@ -1334,8 +1337,8 @@ class LoginForm extends SpecialPage {
         * Create a language selector link for a particular language
         * Links back to this page preserving type and returnto
         *
-        * @param $text Link text
-        * @param $lang Language code
+        * @param string $text Link text
+        * @param string $lang Language code
         * @return string
         */
        function makeLanguageSelectorLink( $text, $lang ) {
@@ -1363,4 +1366,8 @@ class LoginForm extends SpecialPage {
                        $query
                );
        }
+
+       protected function getGroupName() {
+               return 'login';
+       }
 }
index 4be36c6..d957e87 100644 (file)
@@ -62,4 +62,8 @@ class SpecialUserlogout extends UnlistedSpecialPage {
 
                $out->returnToMain();
        }
+
+       protected function getGroupName() {
+               return 'login';
+       }
 }
index 4d43baf..d4baae2 100644 (file)
@@ -153,8 +153,8 @@ class UserrightsPage extends SpecialPage {
         * Save user groups changes in the database.
         * Data comes from the editUserGroupsForm() form function
         *
-        * @param $username String: username to apply changes to.
-        * @param $reason String: reason for group change
+        * @param string $username username to apply changes to.
+        * @param string $reason reason for group change
         * @return null
         */
        function saveUserGroups( $username, $reason = '' ) {
@@ -189,9 +189,9 @@ class UserrightsPage extends SpecialPage {
         * Save user groups changes in the database.
         *
         * @param $user User object
-        * @param $add Array of groups to add
-        * @param $remove Array of groups to remove
-        * @param $reason String: reason for group change
+        * @param array $add of groups to add
+        * @param array $remove of groups to remove
+        * @param string $reason reason for group change
         * @return Array: Tuple of added, then removed groups
         */
        function doSaveUserGroups( $user, $add, $remove, $reason = '' ) {
@@ -240,7 +240,6 @@ class UserrightsPage extends SpecialPage {
                return array( $add, $remove );
        }
 
-
        /**
         * Add a rights log entry for an action.
         */
@@ -259,7 +258,7 @@ class UserrightsPage extends SpecialPage {
 
        /**
         * Edit user groups membership
-        * @param $username String: name of the user.
+        * @param string $username name of the user.
         */
        function editUserGroupsForm( $username ) {
                $status = $this->fetchUser( $username );
@@ -393,7 +392,7 @@ class UserrightsPage extends SpecialPage {
         * form will be able to manipulate based on the current user's system
         * permissions.
         *
-        * @param $groups Array: list of groups the given user is in
+        * @param array $groups list of groups the given user is in
         * @return Array:  Tuple of addable, then removable groups
         */
        protected function splitGroups( $groups ) {
@@ -528,7 +527,7 @@ class UserrightsPage extends SpecialPage {
         * Adds a table with checkboxes where you can select what groups to add/remove
         *
         * @todo Just pass the username string?
-        * @param $usergroups Array: groups the user belongs to
+        * @param array $usergroups groups the user belongs to
         * @param $user User a user object
         * @return string XHTML table element with checkboxes
         */
@@ -612,7 +611,7 @@ class UserrightsPage extends SpecialPage {
        }
 
        /**
-        * @param $group string: the name of the group to check
+        * @param string $group the name of the group to check
         * @return bool Can we add the group?
         */
        private function canAdd( $group ) {
@@ -640,4 +639,8 @@ class UserrightsPage extends SpecialPage {
                $output->addHTML( Xml::element( 'h2', null, $rightsLogPage->getName()->text() ) );
                LogEventsList::showLogExtract( $output, 'rights', $user->getUserPage() );
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
index f847ca3..81d1781 100644 (file)
@@ -620,7 +620,7 @@ class SpecialVersion extends SpecialPage {
        /**
         * Convert an array of items into a list for display.
         *
-        * @param $list Array of elements to display
+        * @param array $list of elements to display
         * @param $sort Boolean: whether to sort the items in $list
         *
         * @return String
@@ -754,7 +754,7 @@ class SpecialVersion extends SpecialPage {
        /**
         * Retrieve the revision number of a Subversion working directory.
         *
-        * @param $dir String: directory of the svn checkout
+        * @param string $dir directory of the svn checkout
         *
         * @return Integer: revision number as int
         */
@@ -771,7 +771,7 @@ class SpecialVersion extends SpecialPage {
        }
 
        /**
-        * @param $dir String: directory of the git checkout
+        * @param string $dir directory of the git checkout
         * @return bool|String sha1 of commit HEAD points to
         */
        public static function getGitHeadSha1( $dir ) {
@@ -779,7 +779,6 @@ class SpecialVersion extends SpecialPage {
                return $repo->getHeadSHA1();
        }
 
-
        /**
         * Get the list of entry points and their URLs
         * @return string Wikitext
@@ -828,6 +827,10 @@ class SpecialVersion extends SpecialPage {
                return $out;
        }
 
+       protected function getGroupName() {
+               return 'wiki';
+       }
+
        function showEasterEgg() {
                $rx = $rp = $xe = '';
                $alpha = array( "", "kbQW", "\$\n()" );
index 0b1fb25..0035bfa 100644 (file)
@@ -72,4 +72,8 @@ class WantedCategoriesPage extends WantedQueryPage {
                $nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
                return $this->getLanguage()->specialList( $plink, $nlinks );
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index ddeb4a1..9a2d30a 100644 (file)
@@ -87,4 +87,8 @@ class WantedFilesPage extends WantedQueryPage {
                        )
                );
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index 05df400..acec4ea 100644 (file)
@@ -91,4 +91,8 @@ class WantedPagesPage extends WantedQueryPage {
                wfRunHooks( 'WantedPages::getQueryInfo', array( &$this, &$query ) );
                return $query;
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index f3e3369..f5539c1 100644 (file)
@@ -52,4 +52,8 @@ class WantedTemplatesPage extends WantedQueryPage {
                                                'page_title = tl_title' ) ) )
                );
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index 7114fc9..89c2e76 100644 (file)
@@ -200,7 +200,6 @@ class SpecialWatchlist extends SpecialPage {
 
                # Up estimate of watched items by 15% to compensate for talk pages...
 
-
                # Toggles
                if( $values['hideOwn'] ) {
                        $conds[] = 'rc_user != ' . $user->getId();
@@ -504,4 +503,8 @@ class SpecialWatchlist extends SpecialPage {
 
                return floor( $count / 2 );
        }
+
+       protected function getGroupName() {
+               return 'changes';
+       }
 }
index 0b835a2..cb3e985 100644 (file)
@@ -94,9 +94,9 @@ class SpecialWhatLinksHere extends SpecialPage {
        }
 
        /**
-        * @param $level int     Recursion level
+        * @param int $level     Recursion level
         * @param $target Title   Target title
-        * @param $limit int     Number of entries to display
+        * @param int $limit     Number of entries to display
         * @param $from Title   Display from this article ID
         * @param $back Title   Display from this article ID at backwards scrolling
         */
@@ -464,4 +464,8 @@ class SpecialWhatLinksHere extends SpecialPage {
                }
                return Xml::fieldset( $this->msg( 'whatlinkshere-filters' )->text(), $this->getLanguage()->pipeList( $links ) );
        }
+
+       protected function getGroupName() {
+               return 'pagetools';
+       }
 }
index 2988b04..3723740 100644 (file)
@@ -95,4 +95,8 @@ class WithoutInterwikiPage extends PageQueryPage {
                }
                return $query;
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
index 49713fc..f4b98b0 100644 (file)
@@ -190,10 +190,10 @@ abstract class UploadBase {
 
        /**
         * Initialize the path information
-        * @param $name string the desired destination name
-        * @param $tempPath string the temporary path
-        * @param $fileSize int the file size
-        * @param $removeTempFile bool (false) remove the temporary file?
+        * @param string $name the desired destination name
+        * @param string $tempPath the temporary path
+        * @param int $fileSize the file size
+        * @param bool $removeTempFile (false) remove the temporary file?
         * @throws MWException
         */
        public function initializePathInfo( $name, $tempPath, $fileSize, $removeTempFile = false ) {
@@ -244,7 +244,7 @@ abstract class UploadBase {
        }
 
        /**
-        * @param $srcPath String: the source path
+        * @param string $srcPath the source path
         * @return string the real path if it was a virtual URL
         */
        function getRealPath( $srcPath ) {
@@ -353,7 +353,7 @@ abstract class UploadBase {
        /**
         * Verify the mime type
         *
-        * @param $mime string representing the mime
+        * @param string $mime representing the mime
         * @return mixed true if the file is verified, an array otherwise
         */
        protected function verifyMimeType( $mime ) {
@@ -704,8 +704,6 @@ abstract class UploadBase {
                }
                $this->mFilteredName = $nt->getDBkey();
 
-
-
                /**
                 * We'll want to blacklist against *any* 'extension', and use
                 * only the final one for the whitelist.
@@ -733,7 +731,6 @@ abstract class UploadBase {
                                        $ext = array( $this->mFinalExtension );
                                }
                        }
-
                }
 
                /* Don't allow users to override the blacklist (check file extension) */
@@ -887,8 +884,8 @@ abstract class UploadBase {
        /**
         * Checks if the mime type of the uploaded file matches the file extension.
         *
-        * @param $mime String: the mime type of the uploaded file
-        * @param $extension String: the filename extension that the file is to be served with
+        * @param string $mime the mime type of the uploaded file
+        * @param string $extension the filename extension that the file is to be served with
         * @return Boolean
         */
        public static function verifyExtension( $mime, $extension ) {
@@ -928,9 +925,9 @@ abstract class UploadBase {
         * potentially harmful. The present implementation will produce false
         * positives in some situations.
         *
-        * @param $file String: pathname to the temporary upload file
-        * @param $mime String: the mime type of the file
-        * @param $extension String: the extension of the file
+        * @param string $file pathname to the temporary upload file
+        * @param string $mime the mime type of the file
+        * @param string $extension the extension of the file
         * @return Boolean: true if the file contains something looking like embedded scripts
         */
        public static function detectScript( $file, $mime, $extension ) {
@@ -1128,14 +1125,13 @@ abstract class UploadBase {
                        }
 
                        # use set to add a remote / data / script target to an element
-                       if( $strippedElement == 'set' && $stripped == 'to' &&  preg_match( '!(http|https|data|script):!sim', $value ) ) {
+                       if( $strippedElement == 'set' && $stripped == 'to' && preg_match( '!(http|https|data|script):!sim', $value ) ) {
                                wfDebug( __METHOD__ . ": Found svg setting attibute to '$value' in uploaded file.\n" );
                                return true;
                        }
 
-
                        # use handler attribute with remote / data / script
-                       if( $stripped == 'handler' &&  preg_match( '!(http|https|data|script):!sim', $value ) ) {
+                       if( $stripped == 'handler' && preg_match( '!(http|https|data|script):!sim', $value ) ) {
                                wfDebug( __METHOD__ . ": Found svg setting handler with remote/data/script '$attrib'='$value' in uploaded file.\n" );
                                return true;
                        }
@@ -1177,7 +1173,7 @@ abstract class UploadBase {
         * This relies on the $wgAntivirus and $wgAntivirusSetup variables.
         * $wgAntivirusRequired may be used to deny upload if the scan fails.
         *
-        * @param $file String: pathname to the temporary upload file
+        * @param string $file pathname to the temporary upload file
         * @return mixed false if not virus is found, NULL if the scan fails or is disabled,
         *         or a string containing feedback from the virus scanner if a virus was found.
         *         If textual feedback is missing but a virus was found, this function returns true.
@@ -1305,7 +1301,7 @@ abstract class UploadBase {
         * Check if a user is the last uploader
         *
         * @param $user User object
-        * @param $img String: image name
+        * @param string $img image name
         * @return Boolean
         */
        public static function userCanReUpload( User $user, $img ) {
@@ -1377,6 +1373,17 @@ abstract class UploadBase {
                        }
                }
 
+               // Check for files with the same name but a different extension
+               $similarFiles = RepoGroup::singleton()->getLocalRepo()->findFilesByPrefix(
+                               "{$partname}.", 1 );
+               if ( count( $similarFiles ) ) {
+                       return array(\r
+                               'warning' => 'exists-normalized',\r
+                               'file' => $file,\r
+                               'normalizedFile' => $similarFiles[0],\r
+                       );
+               }
+
                if ( self::isThumbName( $file->getName() ) ) {
                        # Check for filenames like 50px- or 180px-, these are mostly thumbnails
                        $nt_thb = Title::newFromText( substr( $partname, strpos( $partname, '-' ) + 1 ) . '.' . $extension, NS_FILE );
@@ -1397,7 +1404,6 @@ abstract class UploadBase {
                        }
                }
 
-
                foreach( self::getFilenamePrefixBlacklist() as $prefix ) {
                        if ( substr( $partname, 0, strlen( $prefix ) ) == $prefix ) {
                                return array(
index 5a838ab..fb0c786 100644 (file)
@@ -173,9 +173,9 @@ class UploadFromChunks extends UploadFromFile {
        /**
         * Add a chunk to the temporary directory
         *
-        * @param $chunkPath string path to temporary chunk file
-        * @param $chunkSize int size of the current chunk
-        * @param $offset int offset of current chunk ( mutch match database chunk offset )
+        * @param string $chunkPath path to temporary chunk file
+        * @param int $chunkSize size of the current chunk
+        * @param int $offset offset of current chunk ( mutch match database chunk offset )
         * @return Status
         */
        public function addChunk( $chunkPath, $chunkSize, $offset ) {
index 70debee..cfa3879 100644 (file)
@@ -97,7 +97,7 @@ class UploadStash {
         * Get a file and its metadata from the stash.
         * The noAuth param is a bit janky but is required for automated scripts which clean out the stash.
         *
-        * @param $key String: key under which file information is stored
+        * @param string $key key under which file information is stored
         * @param $noAuth Boolean (optional) Don't check authentication. Used by maintenance scripts.
         * @throws UploadStashFileNotFoundException
         * @throws UploadStashNotLoggedInException
@@ -155,7 +155,7 @@ class UploadStash {
        /**
         * Getter for file metadata.
         *
-        * @param $key String: key under which file information is stored
+        * @param string $key key under which file information is stored
         * @return Array
         */
        public function getMetadata ( $key ) {
@@ -166,7 +166,7 @@ class UploadStash {
        /**
         * Getter for fileProps
         *
-        * @param $key String: key under which file information is stored
+        * @param string $key key under which file information is stored
         * @return Array
         */
        public function getFileProps ( $key ) {
@@ -177,8 +177,8 @@ class UploadStash {
        /**
         * Stash a file in a temp directory and record that we did this in the database, along with other metadata.
         *
-        * @param $path String: path to file you want stashed
-        * @param $sourceType String: the type of upload that generated this file (currently, I believe, 'file' or null)
+        * @param string $path path to file you want stashed
+        * @param string $sourceType the type of upload that generated this file (currently, I believe, 'file' or null)
         * @throws UploadStashBadPathException
         * @throws UploadStashFileException
         * @throws UploadStashNotLoggedInException
@@ -349,7 +349,6 @@ class UploadStash {
                return $this->removeFileNoAuth( $key );
        }
 
-
        /**
         * Remove a file (see removeFile), but doesn't check ownership first.
         *
@@ -448,7 +447,7 @@ class UploadStash {
        /**
         * Helper function: do the actual database query to fetch file metadata.
         *
-        * @param $key String: key
+        * @param string $key key
         * @param $readFromDB: constant (default: DB_SLAVE)
         * @return boolean
         */
@@ -482,7 +481,7 @@ class UploadStash {
        /**
         * Helper function: Initialize the UploadStashFile for a given file.
         *
-        * @param $key String: key under which to store the object
+        * @param string $key key under which to store the object
         * @throws UploadStashZeroLengthFileException
         * @return bool
         */
@@ -506,8 +505,8 @@ class UploadStashFile extends UnregisteredLocalFile {
         * Arguably UnregisteredLocalFile should be handling its own file repo but that class is a bit retarded currently
         *
         * @param $repo FileRepo: repository where we should find the path
-        * @param $path String: path to file
-        * @param $key String: key to store the path and any stashed data under
+        * @param string $path path to file
+        * @param string $key key to store the path and any stashed data under
         * @throws UploadStashBadPathException
         * @throws UploadStashFileNotFoundException
         */
@@ -556,7 +555,7 @@ class UploadStashFile extends UnregisteredLocalFile {
         * The actual argument is the result of thumbName although we seem to have
         * buggy code elsewhere that expects a boolean 'suffix'
         *
-        * @param $thumbName String: name of thumbnail (e.g. "120px-123456.jpg" ), or false to just get the path
+        * @param string $thumbName name of thumbnail (e.g. "120px-123456.jpg" ), or false to just get the path
         * @return String: path thumbnail should take on filesystem, or containing directory if thumbname is false
         */
        public function getThumbPath( $thumbName = false ) {
@@ -572,7 +571,7 @@ class UploadStashFile extends UnregisteredLocalFile {
         * We override this because we want to use the pretty url name instead of the
         * ugly file name.
         *
-        * @param $params Array: handler-specific parameters
+        * @param array $params handler-specific parameters
         * @param $flags integer Bitfield that supports THUMB_* constants
         * @return String: base name for URL, like '120px-12345.jpg', or null if there is no handler
         */
@@ -595,7 +594,7 @@ class UploadStashFile extends UnregisteredLocalFile {
         * the thumbnail urls be predictable. However, in our model the URL is not based on the filename
         * (that's hidden in the db)
         *
-        * @param $thumbName String: basename of thumbnail file -- however, we don't want to use the file exactly
+        * @param string $thumbName basename of thumbnail file -- however, we don't want to use the file exactly
         * @return String: URL to access thumbnail, or URL with partial path
         */
        public function getThumbUrl( $thumbName = false ) {
index 2c3dc07..b3e40b6 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Version of index.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 egine.
+ * to execute scripts with PHP5 engine.
  *
  * 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
index ef6a367..01751db 100644 (file)
@@ -3984,6 +3984,45 @@ class Language {
                }
        }
 
+       /**
+        * Get the ordered list of fallback languages, ending with the fallback
+        * language chain for the site language.
+        *
+        * @since 1.21
+        * @param $code string Language code
+        * @return array
+        */
+       public static function getFallbacksIncludingSiteLanguage( $code ) {
+               global $wgLanguageCode;
+
+               // Usually, we will only store a tiny number of fallback chains, so we
+               // keep them in static memory.
+               static $fallbackLanguageCache = array();
+               $cacheKey = "{$code}-{$wgLanguageCode}";
+
+               if ( !array_key_exists( $cacheKey, $fallbackLanguageCache ) ) {
+                       $fallbacks = self::getFallbacksFor( $code );
+
+                       // Take the final 'en' off of the array before splicing
+                       if ( end( $fallbacks ) === 'en' ) {
+                               array_pop( $fallbacks );
+                       }
+                       // Append the site's fallback chain
+                       $siteFallbacks = self::getFallbacksFor( $wgLanguageCode );
+
+                       // Eliminate any languages already included in the chain
+                       $siteFallbacks = array_intersect( array_diff( $siteFallbacks, $fallbacks ), $siteFallbacks );
+                       if ( $siteFallbacks ) {
+                               $fallbacks = array_merge( $fallbacks, $siteFallbacks );
+                       }
+                       if ( end( $fallbacks ) !== 'en' ) {
+                               $fallbacks[] = 'en';
+                       }
+                       $fallbackLanguageCache[$cacheKey] = $fallbacks;
+               }
+               return $fallbackLanguageCache[$cacheKey];
+       }
+
        /**
         * Get all messages for a given language
         * WARNING: this may take a long time. If you just need all message *keys*
index e4262a4..c373c6d 100644 (file)
@@ -642,7 +642,7 @@ Moenie vergeet om u [[Special:Preferences|voorkeure vir {{SITENAME}}]] te stel n
 'gotaccount' => "Het u reeds 'n rekening? '''$1'''.",
 'gotaccountlink' => 'Teken in',
 'userlogin-resetlink' => 'U aanmeld besonderhede vergeet?',
-'createaccountmail' => 'deur e-pos',
+'createaccountmail' => "Gebruik 'n tydelike lukrake wagwoord en stuur dit na die e-posadres hier onder",
 'createaccountreason' => 'Rede:',
 'badretype' => 'Die ingetikte wagwoorde is nie dieselfde nie.',
 'userexists' => "Die gebruikersnaam wat u gekies het is reeds geneem.
@@ -710,7 +710,7 @@ Wag asseblief alvorens u weer probeer.",
 'loginlanguagelabel' => 'Taal: $1',
 'suspicious-userlogout' => "U versoek om af te teken is geïgnoreer omdat dit lyk asof dit deur 'n gebreekte webleser of instaanbediener gestuur is.",
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => 'Onbekende fout in PHP se mail()-funksie',
 'user-mail-no-addy' => "Geprobeer om e-pos te stuur sonder 'n e-posadres.",
 'user-mail-no-body' => "Daar is probeer om 'n leë of 'n onredelike kort boodskap te stuur.",
@@ -1242,7 +1242,7 @@ Details kan in die [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} s
 'search-interwiki-default' => '$1 resultate:',
 'search-interwiki-more' => '(meer)',
 'search-relatedarticle' => 'Verwante',
-'mwsuggest-disable' => 'Deaktiveer AJAX-voorstelle',
+'mwsuggest-disable' => 'Deaktiveer soek-voorstelle',
 'searcheverything-enable' => 'Soek in alle naamruimtes',
 'searchrelated' => 'verwante',
 'searchall' => 'alle',
@@ -1391,7 +1391,7 @@ Die inligting is vir ander gebruikers sigbaar.',
 'prefs-displaywatchlist' => 'Weergaweopsies',
 'prefs-diffs' => 'Verskille',
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => 'Die e-posadres lyk geldig',
 'email-address-validity-invalid' => "Verskaf 'n geldige e-posadres",
 
@@ -1990,6 +1990,12 @@ Miskien wil u eerder die beskrywing daar op die [$2 lêerbeskrywing] bywerk.',
 Hulle moet gewysig word om eerder direk na die regte onderwerpe te skakel.<br />
 'n Bladsy word beskou as 'n dubbelsinnigheidsbladsy as dit 'n sjabloon bevat wat geskakel is vanaf [[MediaWiki:Disambiguationspage]]",
 
+'pageswithprop' => "Blaaie met 'n bladsy-eienskap",
+'pageswithprop-legend' => "Blaaie met 'n bladsy-eienskap",
+'pageswithprop-text' => "Hierdie bladsy lys blaaie met 'n bepaalde blady-eienskap.",
+'pageswithprop-prop' => 'Naam van die eienskap:',
+'pageswithprop-submit' => 'OK',
+
 'doubleredirects' => 'Dubbele aansture',
 'doubleredirectstext' => 'Hierdie lys bevat bladsye wat aansture na ander aanstuurblaaie is.
 Elke ry bevat skakels na die eerste en die tweede aanstuur, asook die eerste reël van van die tweede aanstuur se teks, wat gewoonlik die "regte" teiken-bladsy gee waarna die eerste aanstuur behoort te wys.
@@ -2182,7 +2188,7 @@ Daar kan [[{{MediaWiki:Listgrouprights-helppage}}|extra inligting]] oor individu
 'listgrouprights-addgroup-self-all' => 'Alle groepe byvoeg tot eie gebruiker',
 'listgrouprights-removegroup-self-all' => 'Alle groepe verwyder van eie gebruiker',
 
-# E-mail user
+# Email user
 'mailnologin' => 'Geen versendadres beskikbaar',
 'mailnologintext' => "U moet [[Special:UserLogin|ingeteken]] wees en 'n geldige e-posadres in die [[Special:Preferences|voorkeure]] hê om e-pos aan ander gebruikers te stuur.",
 'emailuser' => 'Stuur e-pos na hierdie gebruiker',
@@ -2219,7 +2225,7 @@ Daar kan [[{{MediaWiki:Listgrouprights-helppage}}|extra inligting]] oor individu
 'usermessage-editor' => 'Stelselboodskapper',
 
 # Watchlist
-'watchlist' => 'My dophoulys',
+'watchlist' => 'Dophoulys',
 'mywatchlist' => 'Dophoulys',
 'watchlistfor2' => 'Vir $1 $2',
 'nowatchlist' => 'U het geen items in u dophoulys nie.',
@@ -3016,6 +3022,7 @@ Hierdie situasie was waarskynlik deur 'n skakel na 'n eksterne webtuiste op ons
 'pageinfo-robot-noindex' => 'Nie indekseerbaar nie',
 'pageinfo-views' => 'Aantal kere gewys',
 'pageinfo-watchers' => 'Aantal dophouers',
+'pageinfo-few-watchers' => 'Minder as {{PLURAL:$1|dophouer|$1 dophouers}}',
 'pageinfo-redirects-name' => 'Aansture na die bladsy',
 'pageinfo-subpages-name' => 'Subblaaie van die bladsy',
 'pageinfo-subpages-value' => '$1 ($2 {{PLURAL:$2|aanstuur|aansture}}; $3 {{PLURAL:$3|nie-aanstuur|nie-aansture}})',
@@ -3556,7 +3563,7 @@ Ander velde sal versteek wees.
 'monthsall' => 'alle',
 'limitall' => 'alle',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'Bevestig e-posadres',
 'confirmemail_noemail' => "U het nie 'n geldige e-posadres in u [[Special:Preferences|gebruikersvoorkeure]] gestel nie.",
 'confirmemail_text' => "Hierdie wiki vereis dat u e-posadres bevestig word voordat epos-funksies gebruik word. Klik onderstaande knoppie om 'n bevestigingspos na u adres te stuur. Die pos sal 'n skakel met 'n kode insluit; maak hierdie skakel oop in u webblaaier om te bevestig dat die adres geldig is.",
@@ -3782,7 +3789,7 @@ Beelde word in hulle volle resolusie gewys. Ander lêertipes word direk met hull
 'specialpages-group-highuse' => 'Baie gebruikte bladsye',
 'specialpages-group-pages' => 'Lyste van bladsye',
 'specialpages-group-pagetools' => 'Bladsyhulpmiddels',
-'specialpages-group-wiki' => 'Wiki data en hulpmiddels',
+'specialpages-group-wiki' => 'Data en hulpmiddels',
 'specialpages-group-redirects' => 'Aanstuur gewone bladsye',
 'specialpages-group-spam' => 'Spam-hulpmiddels',
 
@@ -3879,6 +3886,7 @@ Beelde word in hulle volle resolusie gewys. Ander lêertipes word direk met hull
 'logentry-newusers-newusers' => 'Gebruiker $1 is geskep',
 'logentry-newusers-create' => 'Gebruiker $1 is geskep',
 'logentry-newusers-create2' => 'Gebruiker $3 is deur $1 geskep',
+'logentry-newusers-byemail' => 'Gebruiker $3 is deur $1 geskep en die wagwoord is per e-pos aangestuur',
 'logentry-newusers-autocreate' => 'Die gebruiker $1 is outomaties geskep',
 'logentry-rights-rights' => '$1 het groepslidmaatskap vir $3 van $4 na $5 gewysig',
 'logentry-rights-rights-legacy' => '$1 het groepslidmaatskap vir $3 gewysig',
@@ -3937,6 +3945,7 @@ Anders kan u die eenvoudige vorm hieronder gebruik. U kommentaar sal by die blad
 'api-error-ok-but-empty' => 'Interne fout: geen reaksie van die bediener.',
 'api-error-overwrite' => "'N bestaande lêer vervang word nie toegelaat nie.",
 'api-error-stashfailed' => 'Interne fout: Server nie tydelike lêer te stoor.',
+'api-error-publishfailed' => 'Interne fout: bediener kon nie die tydelike lêer publiseer nie.',
 'api-error-timeout' => 'Die bediener het nie reageer binne die verwagte tyd.',
 'api-error-unclassified' => "'n Onbekende fout het voorgekom.",
 'api-error-unknown-code' => 'Onbekende fout: "$1"',
index 7912159..8e68785 100644 (file)
@@ -2289,8 +2289,10 @@ $1',
 تعامل الصفحة كصفحة توضيح إذا كان بها قالب موجود في [[MediaWiki:Disambiguationspage]]",
 
 'pageswithprop' => 'صفحات مع خاصية الصفحة',
+'pageswithprop-legend' => 'صفحات مع خاصية الصفحة',
 'pageswithprop-text' => 'تسرد هذه الصفحة الصفحات التي تستخدم خاصية صفحة معينة.',
 'pageswithprop-prop' => 'اسم الخاصية:',
+'pageswithprop-submit' => 'اذهب',
 
 'doubleredirects' => 'تحويلات مزدوجة',
 'doubleredirectstext' => 'هذه الصفحة تعرض الصفحات التي تحول إلى صفحات تحويل أخرى.
@@ -4439,7 +4441,7 @@ $5
 'duration-centuries' => '{{PLURAL: $1||قرن واحد|قرنان|$1 قرون|$1 قرنًا|$1 قرن}}',
 'duration-millennia' => '{{PLURAL: $1||ألفية واحدة|ألفيتان|$1 ألفيات|$1 ألفية}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'صفحات مع خاصية الصفحة',
-'pageswithprop-submit' => 'اذهب',
+# Image rotation
+'rotate-comment' => 'تدوير الصورة  {{PLURAL:$1||درجة واحدة|درجتان|$1 درجات|$1 درجة}} باتجاه عقارب الساعة',
+
 );
index 741d427..03416b1 100644 (file)
@@ -1567,7 +1567,7 @@ Do you want to change the settings?',
 'pageinfo-lasttime' => 'ܣܝܩܘܡܐ ܕܫܘܚܠܦܐ ܐܚܪܝܐ',
 'pageinfo-edits' => 'ܡܢܝܢܐ ܕܫܘܚܠܦ̈ܐ',
 'pageinfo-authors' => 'ܡܢܝܢܐ ܕܡܫܚܠܦܢ̈ܐ ܡܫܚܠܦ̈ܐ',
-'pageinfo-recent-edits' => 'ܡܢܝܢܐ ܕܫܘܚܠܦ̈ܐ ܐܚܪ̈ܝܐ (ܒ {{PLURAL:$1||ܚܕ ܝܘܡܐ|$1 ܝܘܡܬ̈ܐ}})',
+'pageinfo-recent-edits' => 'ܡܢܝܢܐ ܕܫܘܚܠܦ̈ܐ ܐܚܪ̈ܝܐ (ܒ $1 ܕܕܥܒܪ)',
 'pageinfo-recent-authors' => 'ܡܢܝܢܐ ܕܡܫܚܠܦܢ̈ܐ ܡܫܚܠܦ̈ܐ ܐܚܪ̈ܝܐ',
 'pageinfo-toolboxlink' => 'ܝܕ̈ܥܬܐ ܥܠ ܦܐܬܐ',
 'pageinfo-contentpage-yes' => 'ܐܝܢ',
index ae21f24..2cb5726 100644 (file)
@@ -1875,8 +1875,10 @@ Alcuérdate de comprobar otros enllaces a les plantíes enantes d'esborrales.",
 Una páxina tratase como una páxina de dixebra si usa una plantía que tea enllaciada dende [[MediaWiki:Disambiguationspage]]",
 
 'pageswithprop' => 'Páxines con una propiedá de páxina',
+'pageswithprop-legend' => 'Páxines con una propiedá de páxina',
 'pageswithprop-text' => "Esta páxina llista les páxines qu'usen una propiedá de páxina determinada.",
 'pageswithprop-prop' => 'Nome de la propiedá:',
+'pageswithprop-submit' => 'Dir',
 
 'doubleredirects' => 'Redireiciones dobles',
 'doubleredirectstext' => 'Esta páxina llista páxines que redireicionen a otres páxines de redireición.
@@ -3883,7 +3885,7 @@ D\'otra miente, pues usar el formulariu cenciellu d\'abaxo. El to comentariu apa
 'duration-centuries' => '$1 {{PLURAL:$1|sieglu|sieglos}}',
 'duration-millennia' => '$1 {{PLURAL:$1|mileniu|milenios}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Páxines con una propiedá de páxina',
-'pageswithprop-submit' => 'Dir',
+# Image rotation
+'rotate-comment' => 'Imaxe xirada $1 {{PLURAL:$1|grau|graos}} en sentíu horariu',
+
 );
index 1e54f43..85246aa 100644 (file)
@@ -378,7 +378,7 @@ $1',
 'pool-errorunknown' => 'Билдәһеҙ хата',
 
 # All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations).
-'aboutsite' => '{{grammar:genitive|{{SITENAME}}}} тураһында',
+'aboutsite' => '{{SITENAME}} тураһында',
 'aboutpage' => 'Project:Тасуирлама',
 'copyright' => '$1 ярашлы эстәлеге менән һәр кем файҙалана ала.',
 'copyrightpage' => '{{ns:project}}:Авторлыҡ хоҡуҡтары',
@@ -645,7 +645,7 @@ $2',
 'loginlanguagelabel' => 'Тел: $1',
 'suspicious-userlogout' => 'Һеҙҙең сеансты тамамлау тураһында һорауығыҙ кире ҡағылды, сөнки ул төҙөк булмаған браузер йәки кэшлаусы прокси тарафынан ебәрелгән һорауға оҡшаған.',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => 'PHP-ның mail() функцияһында билдәһеҙ хата',
 'user-mail-no-addy' => 'Электрон почта адресы булмайынса электрон хәбәр ебәреп ҡараны',
 
@@ -1323,7 +1323,7 @@ $1",
 'prefs-displaywatchlist' => 'Күренеш көйләүҙәре',
 'prefs-diffs' => 'Айырмалар',
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => 'E-mail адрес дөрөҫ булғанға оҡшаған',
 'email-address-validity-invalid' => 'Дөрөҫ e-mail адресын керетегеҙ',
 
@@ -2103,7 +2103,7 @@ $1',
 'listgrouprights-addgroup-self-all' => 'Үҙенең иҫәп яҙмаһына бөтә төркөмдәрҙе өҫтәү',
 'listgrouprights-removegroup-self-all' => 'Үҙенең иҫәп яҙмаһынан бөтә төркөмдәрҙе юйыу',
 
-# E-mail user
+# Email user
 'mailnologin' => 'Хат ебәреү өсөн адрес юҡ',
 'mailnologintext' => 'Башҡа ҡатнашыусыларға хат ебәреү өсөн, һеҙ [[Special:UserLogin|танылырға]] һәм [[Special:Preferences|көйләүҙәрегеҙҙә]] ысын электрон адрес почтаһы кереткән булырға тейешһегеҙ.',
 'emailuser' => 'Ҡатнашыусыға хат',
@@ -3472,7 +3472,7 @@ $1',
 'monthsall' => 'бөтә',
 'limitall' => 'бөтә',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'Электрон почта адресын раҫлау',
 'confirmemail_noemail' => 'Һеҙҙең [[Special:Preferences|көйләүҙәрегеҙҙә]] дөрөҫ электрон почта адресы юҡ.',
 'confirmemail_text' => '{{SITENAME}} проекты электрон почта мөмкинлектәрен ҡулланыр алдынан электрон почта адресының раҫланыуын талап итә.
index e910798..ec98157 100644 (file)
@@ -565,7 +565,7 @@ $2',
 'loginlanguagelabel' => 'Мова: $1',
 'suspicious-userlogout' => 'Ваш запыт на выхад быў адмоўлены, паколькі ён выглядае як накіраваны са зламанага браўзера або кэшаванне проксі-сервераў.',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => 'Невядомая памылка ў функцыі PHP-пошты',
 'user-mail-no-addy' => 'Паспрабаваў адправіць электронны ліст без адрасу электроннай пошты',
 
@@ -1198,7 +1198,7 @@ $1",
 'prefs-displaywatchlist' => 'Паказ',
 'prefs-diffs' => 'Розніцы',
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => "Адрас электроннай пошты з'яўляецца сапраўдным",
 'email-address-validity-invalid' => 'Увядзіце слушны адрас электроннай пошты',
 
@@ -1355,7 +1355,7 @@ $1",
 'action-sendemail' => 'адпраўка электронных пісем',
 
 # Recent changes
-'nchanges' => '$1 {{PLURAL:$1|мена|менаў}}',
+'nchanges' => '$1 {{PLURAL:$1|змена|зменÑ\8b|зменаў}}',
 'recentchanges' => 'Нядаўнія змяненні',
 'recentchanges-legend' => 'Магчымасці паказу',
 'recentchanges-summary' => 'Гэта апошнія мены на пляцоўцы {{SITENAME}}.',
@@ -1929,7 +1929,7 @@ $1',
 'listgrouprights-addgroup-self-all' => 'Дадаць усе групы да свайго акаунта',
 'listgrouprights-removegroup-self-all' => 'Выдаліць усе групы са свайго акаунта',
 
-# E-mail user
+# Email user
 'mailnologin' => 'Няма эл.адрасу',
 'mailnologintext' => 'Трэба [[Special:UserLogin|ўвайсці ў сістэму]] і мець пацверджаны адрас эл.пошты ў сваіх [[Special:Preferences|настáўленнях]], каб слаць эл.пошту іншым удзельнікам.',
 'emailuser' => 'Эл.пошта ўдзельніка',
@@ -2216,7 +2216,7 @@ $1',
 'contributions-title' => 'Уклад удзельніка $1',
 'mycontris' => 'Уклад',
 'contribsub2' => 'Для $1 ($2)',
-'nocontribs' => 'Не знойдзена менаў, адпаведных зададзеным параметрам.',
+'nocontribs' => 'Ð\9dе Ð·Ð½Ð¾Ð¹Ð´Ð·ÐµÐ½Ð° Ð·Ð¼ÐµÐ½Ð°Ñ\9e, Ð°Ð´Ð¿Ð°Ð²ÐµÐ´Ð½Ñ\8bÑ\85 Ð·Ð°Ð´Ð°Ð´Ð·ÐµÐ½Ñ\8bм Ð¿Ð°Ñ\80амеÑ\82Ñ\80ам.',
 'uctop' => '(апошн.)',
 'month' => 'Ад месяцу (і раней):',
 'year' => 'Ад году (і раней):',
@@ -3223,7 +3223,7 @@ $1',
 'monthsall' => 'усе',
 'limitall' => 'усе',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'Пацвердзіць адрас эл.пошты',
 'confirmemail_noemail' => 'У [[Special:Preferences|вашых настаўленнях]] няма дапушчальнага адрасу эл.пошты.',
 'confirmemail_text' => 'На пляцоўцы {{SITENAME}} патрабуецца праверка адрасу эл.пошты перад тым, як карыстацца магчымасцямі эл.пошты. Націсніце кнопку, што ніжэй, каб адаслаць сабе пацвярджальны ліст. У лісце будзе спасылка на спецыяльную пацвярджальную старонку, якую трэба будзе адкрыць у браўзеры, каб пацвердзіць правільнасць свайго адрасу эл.пошты.',
@@ -3458,7 +3458,7 @@ MediaWiki распаўсюджваецца, спадзеючыся на прыд
 'tags-description-header' => 'Поўнае апісанне значэння',
 'tags-hitcount-header' => 'Пазначаных правак',
 'tags-edit' => 'правіць',
-'tags-hitcount' => '$1 {{PLURAL:$1|мена|менаў}}',
+'tags-hitcount' => '$1 {{PLURAL:$1|змена|зменÑ\8b|зменаў}}',
 
 # Special:ComparePages
 'comparepages' => 'Параўнанне старонак',
index 86f18f1..cdfa9b9 100644 (file)
@@ -2028,8 +2028,10 @@ $1',
 Старонка лічыцца шматзначнай, калі яна ўтрымлівае шаблён назва якога знаходзіцца на старонцы [[MediaWiki:Disambiguationspage]]",
 
 'pageswithprop' => 'Старонкі з уласьцівасьцямі старонак',
+'pageswithprop-legend' => 'Старонкі з уласьцівасьцямі старонак',
 'pageswithprop-text' => 'На гэтай старонцы адлюстроўваюцца старонкі, якія ўжываюць пэўныя ўласьцівасьці старонак',
 'pageswithprop-prop' => 'Імя ўласьцівасьці:',
+'pageswithprop-submit' => 'Паказаць',
 
 'doubleredirects' => 'Двайныя перанакіраваньні',
 'doubleredirectstext' => 'На гэтай старонцы пададзены сьпіс перанакіраваньняў на іншыя перанакіраваньні. Кожны радок утрымлівае спасылкі на першае і другое перанакіраваньне, а таксама мэтавую старонку другога перанакіраваньня, якая звычайна зьяўляецца «сапраўднай» мэтавай старонкай, куды павіннае спасылацца першае перанакіраваньне.
@@ -4014,7 +4016,7 @@ MediaWiki распаўсюджваецца з надзеяй, што будзе
 'duration-centuries' => '$1 {{PLURAL:$1|стагодзьдзе|стагодзьдзі|стагодзьдзяў}}',
 'duration-millennia' => '$1 {{PLURAL:$1|тысячагодзьдзе|тысячагодзьдзі|тысячагодзьдзяў}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Старонкі з уласьцівасьцямі старонак',
-'pageswithprop-submit' => 'Паказаць',
+# Image rotation
+'rotate-comment' => 'Выява павернутая на $1{{PLURAL:$1|°}} па гадзіньнікавай стрэлцы',
+
 );
index 03eafd8..35c9b4f 100644 (file)
@@ -1207,6 +1207,10 @@ $1",
 'editundo' => 'връщане',
 'diff-multi' => '({{PLURAL:$1|Не е показана една междинна версия|Не са показани $1 междинни версии}} от {{PLURAL:$2|един потребител|$2 потребителя}}.)',
 'diff-multi-manyusers' => '({{PLURAL:$1|Не е показана една междинна версия|Не са показани $1 междинни версии}} от повече от $2 {{PLURAL:$2|потребител|потребителя}})',
+'difference-missing-revision' => '{{PLURAL:$2|Не беше открита|Не бяха открити}} {{PLURAL:$2|една версия|$2 версии}} от тази разликова препратка ($1).
+
+Това обикновено се случва, когато е последвана остаряларазликова препратка на страница,коятоебила изтрита.
+Повече подробности могат да бъдат открити в [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} дневника на изтриванията].',
 
 # Search results
 'searchresults' => 'Резултати от търсенето',
@@ -1250,7 +1254,7 @@ $1",
 'search-interwiki-default' => '$1 резултата:',
 'search-interwiki-more' => '(още)',
 'search-relatedarticle' => 'Свързани',
-'mwsuggest-disable' => 'Изключване на AJAX предположенията',
+'mwsuggest-disable' => 'Изключване на предположенията при търсене',
 'searcheverything-enable' => 'Търсене във всички именни пространства',
 'searchrelated' => 'свързани',
 'searchall' => 'всички',
@@ -2113,8 +2117,8 @@ $1',
 'mailnologintext' => 'Необходимо е да [[Special:UserLogin|влезете]] и да посочите валидна електронна поща в [[Special:Preferences|настройките]] си, за да може да пращате писма на други потребители.',
 'emailuser' => 'Писмо до потребителя',
 'emailpage' => 'Пращане писмо на потребител',
-'emailpagetext' => 'Можете да използвате формуляра по-долу, за да изпратите електронно писмо на този потребител.
-Адресът, който се въвели в [[Special:Preferences|настройките си]], ще се появи в полето „От“ на писмото, така че получателят ще е в състояние да ви отговори.',
+'emailpagetext' => 'Можете да използвате формуляра по-долу, за да изпратите електронно писмо на {{GENDER:$1|този потребител}}.
+Адресът, който се въвели в [[Special:Preferences|настройките си]], ще се появи в полето „От“ на писмото, така че получателят ще е в състояние да ви отговори директно.',
 'usermailererror' => 'Пощенският обект даде грешка:',
 'defemailsubject' => 'Писмо от потребител $1 в {{SITENAME}}',
 'usermaildisabled' => 'Потребителят не е разрешил да получава електронна поща',
@@ -2897,6 +2901,7 @@ $1',
 'pageinfo-lasttime' => 'Дата на последнoто редактиране',
 'pageinfo-edits' => 'Общ брой редакции',
 'pageinfo-authors' => 'Общ брой на отделните автори',
+'pageinfo-recent-edits' => 'Скорошен брой редакции (в рамките на $1)',
 'pageinfo-magic-words' => '{{PLURAL:$1|Вълшебна думичка|Вълшебни думички}} ($1)',
 'pageinfo-hidden-categories' => '{{PLURAL:$1|Скрита категория|Скрити категории}} ($1)',
 'pageinfo-toolboxlink' => 'Информация за страницата',
@@ -2958,6 +2963,7 @@ $1',
 'file-info-size-pages' => '$1 × $2 пиксела, размер на файла: $3, MIME тип: $4, $5 {{PLURAL:$5|страница|страници}}',
 'file-nohires' => 'Не е налична версия с по-висока разделителна способност.',
 'svg-long-desc' => 'Файл във формат SVG, основен размер: $1 × $2 пиксела, големина на файла: $3',
+'svg-long-desc-animated' => 'Анимиран SVG файл, основен размер $1 × $2 пиксела, големина на файла: $3',
 'svg-long-error' => 'Невалиден SVG файл: $1',
 'show-big-image' => 'Пълна разделителна способност',
 'show-big-image-preview' => 'Размер на този преглед: $1.',
@@ -3545,6 +3551,7 @@ $5
 'version-license' => 'Лиценз',
 'version-poweredby-credits' => "Това уики се задвиждва от '''[//www.mediawiki.org/ MediaWiki]''', copyright © 2001-$1 $2.",
 'version-poweredby-others' => 'други',
+'version-credits-summary' => 'Бихме искали да изкажем признателност на следните хора за техните приноси към [[Special:Version|MediaWiki]].',
 'version-license-info' => 'MediaWiki е свободен софтуер, можете да го разпространявате и/или променяте съгласно условията на GNU General Public License, както е публикуван от Free Software Foundation, версия 2 на лиценза или (по ваше усмотрение) която и да е следваща версия.
 
 MediaWiki се разпространява с надеждата, че ще бъде полезен, но БЕЗ НИКАКВИ ГАРАНЦИИ, без дори косвена гаранция за ПРОДАВАЕМОСТ или ПРИГОДНОСТ ЗА КОНКРЕТНА УПОТРЕБА. Вижте GNU General Public License за повече подробности.
index 6f30fdb..91a73c4 100644 (file)
@@ -696,6 +696,7 @@ Legend: '''({{int:cur}})''' = हाल के संशोधन के सा
 'tooltip-n-help' => 'जगह पता लगावे खातिर',
 'tooltip-t-whatlinkshere' => 'अहिजा लिंक होखे वाला सब विकि पन्ना के सूची',
 'tooltip-t-recentchangeslinked' => 'ई पन्ना से जुड़ल पन्नवन पर तुरंत भईल परिवर्तन',
+'tooltip-feed-atom' => 'ई पन्ना खातिर अणु फ़ीड',
 'tooltip-t-upload' => 'फाईल लादीं (अपलोड )',
 'tooltip-t-specialpages' => 'ख़ाश पन्नवन के सूची',
 'tooltip-t-print' => 'ई पन्ना के छापे लायक संस्करण।',
index fe75026..832d514 100644 (file)
@@ -1942,6 +1942,7 @@ Padal e tlefent kas war-eeun d'an danvez anezho.<br />
 Sellet e vez ouzh ur bajenn evel ouzh ur bajenn disheñvelout ma ra gant ur patrom liammet ouzh [[MediaWiki:Disambiguationspage]]",
 
 'pageswithprop-prop' => 'Anv ar perzh :',
+'pageswithprop-submit' => 'Mont',
 
 'doubleredirects' => 'Adkasoù doubl',
 'doubleredirectstext' => 'Rollañ a ra ar bajenn-mañ ar pajennoù a adkas da bajennoù adkas all.
@@ -2497,7 +2498,7 @@ Roit a-is an abeg resis (o verkañ, da skouer, roll ar pajennoù bet graet gaou
 ** Emzalc'h hegazus/handeus betek re
 ** Mont re bell gant implij meur a gont
 ** Anv implijer n'eo ket aotreet",
-'ipb-hardblock' => "Mirout a ra ouzh an implijerien kevreet da zegas kemmoù adalek ar c'homlec'h IP-mañ",
+'ipb-hardblock' => "Mirout ouzh an implijerien kevreet da zegas kemmoù adalek ar chomlec'h IP-mañ",
 'ipbcreateaccount' => 'Mirout ouzh an implijer da grouiñ kontoù',
 'ipbemailban' => 'Mirout ouzh an implijer da gas posteloù',
 'ipbenableautoblock' => "Stankañ war-eeun ar chomlec'h IP diwezhañ implijet gant an den-mañ hag an holl chomlec'hioù a c'hallfe klask kemmañ traoù drezo drezo diwezhatoc'h",
@@ -3930,6 +3931,4 @@ A-hend-all e c'hallit ober gant ar furmskrid eeunaet dindan. Ouzhpennet e vo hoc
 'duration-centuries' => "$1 {{PLURAL:$1|c'hantved|kantved}}",
 'duration-millennia' => '$1 {{PLURAL:$1|milvloaz|milvoaz}}',
 
-# Unknown messages
-'pageswithprop-submit' => 'Mont',
 );
index 159486b..020c424 100644 (file)
@@ -20,6 +20,7 @@
  * @author Jordi Roqué
  * @author Juanpabl
  * @author Kaganer
+ * @author Marcmpujol
  * @author Martorell
  * @author McDutchie
  * @author Pasqual (ca)
@@ -330,6 +331,7 @@ $messages = array(
 'newwindow' => '(obre en una nova finestra)',
 'cancel' => 'Anuŀla',
 'moredotdotdot' => 'Més...',
+'morenotlisted' => 'Més no en la llista...',
 'mypage' => 'Pàgina',
 'mytalk' => 'Discussió',
 'anontalk' => "Discussió d'aquesta IP",
@@ -695,6 +697,7 @@ Si us plau, esperi abans de tornar-ho a intentar.",
 # Email sending
 'php-mail-error-unknown' => 'Error desconegut en la funció mail() de PHP',
 'user-mail-no-addy' => "S'ha intentat enviar un missatge de correu electrònic sense adreça.",
+'user-mail-no-body' => 'Vas intentar enviar un correu electrònic amb un cos buit o excessivament curt.',
 
 # Change password dialog
 'resetpass' => 'Canvia la contrasenya',
@@ -2313,6 +2316,8 @@ Vegeu la [[Special:ProtectedPages|llista de pàgines protegides]] per a la llist
 'prot_1movedto2' => '[[$1]] mogut a [[$2]]',
 'protect-badnamespace-title' => 'Espai de nom no-protectable',
 'protect-badnamespace-text' => 'Les pàgines en aquest espai de nom no pot ser protegit.',
+'protect-norestrictiontypes-text' => 'Aquesta pàgina no es pot protegir ja que no hi ha cap tipus de restricció disponible.',
+'protect-norestrictiontypes-title' => 'Pàgina no protegible',
 'protect-legend' => 'Confirmeu la protecció',
 'protectcomment' => 'Motiu:',
 'protectexpiry' => "Data d'expiració",
index 40d4a5c..877a495 100644 (file)
@@ -149,7 +149,7 @@ $messages = array(
 # User preference toggles
 'tog-underline' => 'ھێڵ ھێنان بەژێر بەستەرەکان:',
 'tog-justify' => 'پەرەگرافەکان پڕاوپر نیشان بدە',
-'tog-hideminor' => 'دەستکارییە بچووکەکان بشارەوە لە دوایین گۆڕانکارییەکاندا',
+'tog-hideminor' => 'دەستکارییە بچووکەکان لە دوایین گۆڕانکارییەکاندا بشارەوە',
 'tog-hidepatrolled' => 'لە دوایین گۆڕانکاریەکان، دەستکاریە پارێزراوەکان داشارە',
 'tog-newpageshidepatrolled' => 'لە لیستی لاپەڕە نوێکان، لاپەڕە پارێزراوەکان داشارە',
 'tog-extendwatchlist' => 'لیستی چاودێری درێژبکەرەوە بۆ نیشان دانی ھەموو گۆڕانکارییەکان، نەک تەنھا دوایینەکان.',
@@ -326,7 +326,7 @@ $messages = array(
 'searcharticle' => 'بڕۆ',
 'history' => 'مێژووی پەڕە',
 'history_short' => 'مێژووی پەڕە',
-'updatedmarker' => 'لە دوای دواسەردانم نوێکراوەتەوە',
+'updatedmarker' => 'لە دوایین سەردانمدا نوێ کراوەتەوە',
 'printableversion' => 'وەشانی ئامادەی چاپ',
 'permalink' => 'بەستەری ھەمیشەیی',
 'print' => 'چاپ',
@@ -365,7 +365,7 @@ $messages = array(
 'otherlanguages' => 'بە زمانەکانی تر',
 'redirectedfrom' => '(ڕەوانەکراوە لە $1 ەوە)',
 'redirectpagesub' => 'پەڕەی ڕەوانەکردن',
-'lastmodifiedat' => 'ئەم پەڕەیە دواجار لە $2ی $1 نوێکراوەتەوە.',
+'lastmodifiedat' => 'ئەم پەڕەیە دواجار لە $2ی $1 نوێ کراوەتەوە.',
 'viewcount' => 'ئەم پەڕەیە {{PLURAL:$1|یەکجار|$1 جار}} بینراوە.',
 'protectedpage' => 'پەڕەی پارێزراو',
 'jumpto' => 'باز بدە بۆ:',
@@ -898,7 +898,7 @@ $2
 ئەمە لەبەر چاو بگرە کە دەستکاریکردنی ئەم پەڕەیە بەقازانجە یان نا.
 لۆگی سڕینەوە و گواستنەوەی ئەم پەڕەیە بۆ سانایی لێرەدا ھاتووە:",
 'moveddeleted-notice' => 'ئەم پەڕەیە سڕاوەتەوە.
-لۆگی سڕینەوە و گواستنەوە بۆ پەڕەکە لە خوارەوە دابینکراوە.',
+لۆگی سڕینەوە و گواستنەوە بۆ پەڕەکە لە ژێرەوە دابین کراوە.',
 'log-fulllog' => 'دیتنی لۆگی تەواو',
 'edit-hook-aborted' => 'دەستکاری لە لایەن قولاپەوە ھەڵوەشێنرایەوە.
 ھۆکارەکەی لەبەر دەست نییە.',
@@ -1481,7 +1481,7 @@ $1",
 'diff' => 'جیاوازی',
 'hist' => 'مێژوو',
 'hide' => 'بشارەوە',
-'show' => 'نیشانبدە',
+'show' => 'نیشان بدە',
 'minoreditletter' => 'ب',
 'newpageletter' => 'ن',
 'boteditletter' => '.بۆت',
index 706ba27..0a087e1 100644 (file)
@@ -2122,8 +2122,10 @@ Asi by místo toho měly odkazovat na konkrétnější stránku.<br />
 Stránka je považována za rozcestník, pokud používá některou ze šablon odkazovaných na [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Stránky s vlastností',
+'pageswithprop-legend' => 'Stránky s vlastností',
 'pageswithprop-text' => 'Tato stránka obsahuje seznam stránek, které používají zadanou vlastnost stránky.',
 'pageswithprop-prop' => 'Název vlastnosti:',
+'pageswithprop-submit' => 'Provést',
 
 'doubleredirects' => 'Dvojitá přesměrování',
 'doubleredirectstext' => 'Na této stránce je seznam přesměrování vedoucích na další přesměrování.
@@ -4158,7 +4160,7 @@ Jinak můžete využít jednoduchý formulář níže. Váš komentář bude př
 'duration-centuries' => '$1 {{PLURAL:$1|století}}',
 'duration-millennia' => '$1 {{PLURAL:$1|tisíciletí}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Stránky s vlastností',
-'pageswithprop-submit' => 'Provést',
+# Image rotation
+'rotate-comment' => 'Obrázek otočen o $1 {{PLURAL:$1|stupeň|stupně|stupňů}} po směru hodinových ručiček',
+
 );
index c39aa66..6d0156c 100644 (file)
@@ -611,7 +611,7 @@ Oedwch ychydig cyn mentro eto.',
 'loginlanguagelabel' => 'Iaith: $1',
 'suspicious-userlogout' => 'Gwrthodwyd eich cais i allgofnodi oherwydd ei fod yn ymddangos mai gweinydd wedi torri neu ddirprwy gelc a anfonodd y cais.',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => 'Gwall anhysbys yng ngweithrediad post() PHP',
 'user-mail-no-addy' => 'Wedi ceisio anfon e-bost heb gyfeiriad e-bost',
 'user-mail-no-body' => 'Ceisiwyd anfon e-bost gwag neu e-bost oedd a thestun rhy bwt iddo.',
@@ -1284,7 +1284,7 @@ Mae'r wybodaeth hon ar gael i'r cyhoedd.",
 'prefs-displaywatchlist' => 'Dewisiadau arddangos',
 'prefs-diffs' => "Cymharu golygiadau ('gwahan')",
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => 'Y cyfeiriad e-bost yn ymddangos yn un dilys',
 'email-address-validity-invalid' => 'Rhowch gyfeiriad e-bost dilys',
 
@@ -1867,6 +1867,12 @@ Cofiwch chwilio am gysylltiadau eraill at nodyn a'u hystyried cyn ei ddileu.",
 'disambiguations-text' => "Mae'r tudalennau canlynol yn cynnwys un neu ragor o gysylltau, sydd yn arwain at '''dudalennau gwahaniaethu'''. Hwyrach y byddai'n hwylusach petai'r cyswllt yn arwain yn syth at y dudalen briodol.<br />
 Diffinir tudalen yn dudalen gwahaniaethu pan mae'n cynnwys un o'r nodiadau '[[MediaWiki:Disambiguationspage|tudalen gwahaniaethu]]'.",
 
+'pageswithprop' => 'Tudalennau a chanddynt nodwedd arbennig',
+'pageswithprop-legend' => 'Tudalennau a chanddynt nodwedd arbennig',
+'pageswithprop-text' => "Mae'r dudalen hon yn rhestru tudalennau sydd yn defnyddio nodwedd arbennig yn y dudalen.",
+'pageswithprop-prop' => "Enw'r nodwedd:",
+'pageswithprop-submit' => 'Gwneler',
+
 'doubleredirects' => 'Ailgyfeiriadau dwbl',
 'doubleredirectstext' => "Mae pob rhes yn cynnwys cysylltiad i'r ddau ail-gyfeiriad cyntaf, ynghyd â chyrchfan yr ail ailgyfeiriad. Fel arfer bydd hyn yn rhoi'r gwir dudalen y dylai'r tudalennau cynt gyfeirio ati.
 Gosodwyd <del>llinell</del> drwy'r eitemau sydd eisoes wedi eu datrys.",
@@ -2056,7 +2062,7 @@ Mae angen parth lefel-uchaf o leiaf, er enghraifft "*.org".<br />
 'listgrouprights-addgroup-self-all' => "Yn gallu ychwanegu'r holl grwpiau at eich cyfrif eich hunan",
 'listgrouprights-removegroup-self-all' => "Yn gallu tynnu'r holl grwpiau oddi ar eich cyfrif eich hunan",
 
-# E-mail user
+# Email user
 'mailnologin' => "Does dim cyfeiriad i'w anfon iddo",
 'mailnologintext' => 'Rhaid eich bod wedi [[Special:UserLogin|mewngofnodi]]
 a bod cyfeiriad e-bost dilys yn eich [[Special:Preferences|dewisiadau]]
@@ -3427,7 +3433,7 @@ Cuddir y meysydd eraill trwy ragosodiad.
 'monthsall' => 'pob mis',
 'limitall' => 'oll',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => "Cadarnhau'r cyfeiriad e-bost",
 'confirmemail_noemail' => 'Does dim cyfeiriad e-bost dilys wedi ei osod yn eich [[Special:Preferences|dewisiadau defnyddiwr]].',
 'confirmemail_text' => "Cyn i chi allu defnyddio'r nodweddion e-bost, mae'n rhaid i {{SITENAME}} ddilysu'ch cyfeiriad e-bost. Pwyswch y botwm isod er mwyn anfon côd cadarnhau i'ch cyfeiriad e-bost. Bydd yr e-bost yn cynnwys cyswllt gyda chôd ynddi; llwythwch y cyswllt ar eich porwr er mwyn cadarnhau dilysrwydd eich cyfeiriad e-bost.",
@@ -3816,4 +3822,7 @@ Dangosir delweddau ar eu maint llawn, dechreuir ffeiliau o fathau eraill yn unio
 'duration-centuries' => '$1 {{PLURAL:$1|canmlwydd|ganmlwydd|ganmlwydd|canmlwydd|chanmlwydd|canmlwydd}}',
 'duration-millennia' => '$1 {{PLURAL:$1|milflwydd|filflwydd|filflwydd|milflwydd|milflwydd|milflwydd}}',
 
+# Image rotation
+'rotate-comment' => "Trowyd y llun $1 {{PLURAL:$1|gradd|radd|radd|gradd}} gyda'r cloc",
+
 );
index c6f969d..88ffe6f 100644 (file)
@@ -41,6 +41,7 @@
  * @author Sarrus
  * @author Sir48
  * @author Slomox
+ * @author Steenth
  * @author Svip
  * @author Søren Løvborg
  * @author Tjernobyl
@@ -691,7 +692,7 @@ Vent venligst før du prøver igen.',
 'loginlanguagelabel' => 'Sprog: $1',
 'suspicious-userlogout' => 'Din anmodning om at logge ud blev nægtet, fordi det ser ud som den blev sendt af en ødelagt browser eller caching proxy.',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => "Ukendt fejl i PHP's mail()-funtion",
 'user-mail-no-addy' => 'Forsøgte at sende email uden en email-adresse',
 'user-mail-no-body' => 'Forsøgte at sende en e-mail med tomt eller urimeligt kort indhold.',
@@ -1351,7 +1352,7 @@ Hvis du vælger at oplyse dit navn, vil det blive brugt til at tilskrive dig dit
 'prefs-info' => 'Grundlæggende information',
 'prefs-i18n' => 'Internationalisering:',
 'prefs-signature' => 'Signatur',
-'prefs-dateformat' => 'Dataformat',
+'prefs-dateformat' => 'Formatering af datoer',
 'prefs-timeoffset' => 'Tidsforskel',
 'prefs-advancedediting' => 'Avancerede indstillinger',
 'prefs-advancedrc' => 'Avancerede indstillinger',
@@ -1363,7 +1364,7 @@ Hvis du vælger at oplyse dit navn, vil det blive brugt til at tilskrive dig dit
 'prefs-displaywatchlist' => 'Visningsmuligheder',
 'prefs-diffs' => 'Forskelle',
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => 'E-mailadressen ser ud til at være gyldig',
 'email-address-validity-invalid' => 'Indtast en gyldig e-mail adresse',
 
@@ -1953,6 +1954,12 @@ Husk at kontrollere for andre henvisninger til skabelonerne før de slettes.',
 De bør henvise direkte til et mere passende emne i stedet.<br />
 En side behandles som en side med en flertydig titel hvis den bruger en skabelon som der er henvist til fra [[MediaWiki:Disambiguationspage]].",
 
+'pageswithprop' => 'Sider med en sideegenskab',
+'pageswithprop-legend' => 'Sider med en sideegenskab',
+'pageswithprop-text' => 'Denne side viser en liste over sider, der bruger en bestemt sideegenskaben.',
+'pageswithprop-prop' => 'Egenskabsnavn:',
+'pageswithprop-submit' => 'Gå',
+
 'doubleredirects' => 'Dobbelte omdirigeringer',
 'doubleredirectstext' => 'Dette er en liste over sider som omdirigerer til andre omdirigeringssider.
 Hver linje indeholder henvisninger til den første og den anden omdirigering, såvel som til målet for den anden omdirigering som sædvanligvis er den "rigtige" målside som den første omdirigering burde henvise til.
@@ -2144,7 +2151,7 @@ Der findes muligvis [[{{MediaWiki:Listgrouprights-helppage}}|yderligere informat
 'listgrouprights-addgroup-self-all' => 'Kan tilføje alle grupper til egen konto',
 'listgrouprights-removegroup-self-all' => 'Kan fjerne alle grupper fra egen konto',
 
-# E-mail user
+# Email user
 'mailnologin' => 'Du er ikke logget på',
 'mailnologintext' => 'Du skal være [[Special:UserLogin|logget på]] og have en gyldig e-mailadresse sat i dine [[Special:Preferences|indstillinger]] for at sende e-mail til andre brugere.',
 'emailuser' => 'E-mail til denne bruger',
@@ -3510,7 +3517,7 @@ Kun indholdet af lister (linjer startende med *) bliver brugt. Den første henvi
 'monthsall' => 'alle',
 'limitall' => 'alle',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'Bekræft e-mail-adressen',
 'confirmemail_noemail' => 'Du har ikke angivet en gyldig e-mail-adresse i din [[Special:Preferences|brugerprofil]].',
 'confirmemail_text' => '{{SITENAME}} kræver, at du bekræfter en e-mail-adresse (autentificering), før du kan bruge de udvidede e-mail-funktioner. Med et klik på kontrolfeltet forneden sendes en e-mail til dig. Denne e-mail indeholder et link med en bekræftelseskode. Med et klik på dette link bekræftes, at e-mail-adressen er gyldig.',
@@ -3904,4 +3911,7 @@ Ellers kan du bruge den enkle formular nedenfor. Din kommentar vil blive tilføj
 'duration-centuries' => '$1 {{PLURAL:$1|århundrede|århundreder}}',
 'duration-millennia' => '$1 {{PLURAL:$1|årtusind|årtusinder}}',
 
+# Image rotation
+'rotate-comment' => 'Billedet roteres med $1 {{PLURAL:$1| grad|grader}} med uret',
+
 );
index 56acaf1..bf99454 100644 (file)
@@ -194,7 +194,6 @@ $specialPageAliases = array(
        'Userlogin'                 => array( 'Anmelden' ),
        'Userlogout'                => array( 'Abmelden' ),
        'Userrights'                => array( 'Benutzerrechte' ),
-       'Version'                   => array( 'Versionsinformationen' ),
        'Wantedcategories'          => array( 'Gewünschte_Kategorien' ),
        'Wantedfiles'               => array( 'Gewünschte_Dateien', 'Fehlende_Dateien' ),
        'Wantedpages'               => array( 'Gewünschte_Seiten' ),
@@ -722,7 +721,7 @@ Siehe die [[Special:Version|Versionsseite]]',
 'nosuchaction' => 'Diese Aktion gibt es nicht',
 'nosuchactiontext' => 'Die in der URL angegebene Aktion wird von MediaWiki nicht unterstützt.
 Es kann ein Schreibfehler in der URL vorliegen oder es wurde ein fehlerhafter Link angeklickt.
-Es kann sich auch um einen Programmierfehler in der Software, die auf {{SITENAME}} benutzt wird, handeln.',
+Es kann sich auch um einen Programmierfehler in der Software, die von {{SITENAME}} benutzt wird, handeln.',
 'nosuchspecialpage' => 'Spezialseite nicht vorhanden',
 'nospecialpagetext' => '<strong>Die aufgerufene Spezialseite ist nicht vorhanden.</strong>
 
@@ -2175,8 +2174,10 @@ Vielleicht möchtest du die Beschreibung auf der dortigen [$2 Dateibeschreibungs
 Eine Seite gilt als Begriffsklärungsseite, wenn sie mindestens eine der auf der Seite [[MediaWiki:Disambiguationspage|Disambiguationspage]] aufgeführten Vorlagen enthält.",
 
 'pageswithprop' => 'Seiten mit einer Seiteneigenschaft',
+'pageswithprop-legend' => 'Seiten mit einer Seiteneigenschaft',
 'pageswithprop-text' => 'Diese Spezialseite listet Seiten auf, die eine bestimmte Seiteneigenschaft verwenden.',
 'pageswithprop-prop' => 'Eigenschaftsname:',
+'pageswithprop-submit' => 'Los',
 
 'doubleredirects' => 'Doppelte Weiterleitungen',
 'doubleredirectstext' => 'Diese Liste enthält Weiterleitungen, die auf Weiterleitungen verlinken.
@@ -4179,7 +4180,7 @@ Anderenfalls kannst du auch das untenstehende einfache Formular nutzen. Dein Kom
 'duration-centuries' => '$1 {{PLURAL:$1|Jahrhundert|Jahrhunderte}}',
 'duration-millennia' => '$1 {{PLURAL:$1|Jahrtausend|Jahrtausende}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Seiten mit einer Seiteneigenschaft',
-'pageswithprop-submit' => 'Los',
+# Image rotation
+'rotate-comment' => 'Bild um $1 {{PLURAL:$1|Grad}} im Uhrzeigersinn gedreht',
+
 );
index a5f9ea4..905afc8 100644 (file)
@@ -696,7 +696,7 @@ Perse: $2',
 'viewsourcetext' => 'To şikinay çımey na pele bıvêne u kopya kerê:',
 'viewyourtext' => "Na pela '''Vurnayışê ke kerdê''' re şıma şenê kopya kerê:",
 'protectedinterface' => 'Na pela qandê nusnerin destegê verri dana u kes xırabin nêqero deye kerda kılit.',
-'editinginterface' => "'''İqaz:''' Şıma hao jû pela ke seba nuşteyê meqalanê cayanê bırnayeyan dana, vurnenê.
+'editinginterface' => "'''İqaz:''' Şıma hayo yew pela ke seba nuşteyê meqalanê cayanê bırnayeyan dana, vurnenê.
 Vurnayışê na pele karberanê binan rê serpela karberi kena ke bımocno.
 Seba çarnayışi, yardımê [//translatewiki.net/wiki/Main_Page?setlang=diq translatewiki.net]i ra procêdoşkerdışi rê diqet kerên.",
 'sqlhidden' => '(SQL pers kerdışê nımıte)',
@@ -1304,8 +1304,8 @@ Detayê besternayışi [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}
 'searchsubtitle' => 'Tı semedê \'\'\'[[:$1]]\'\'\' cıgeyra. ([[Special:Prefixindex/$1|pelê ke pêro be "$1" ra dest niyaê pıra]]{{int:pipe-separator}}[[Special:WhatLinksHere/$1|pelê ke pêro be "$1"\' ra gırê xo esto]])',
 'searchsubtitleinvalid' => "Tı cıgeyra qe '''$1'''",
 'toomanymatches' => 'Zêde teki (zewci) peyser çarnay, şıma rê zehmet, be persê do bin ra bıcerrebnên.',
-'titlematches' => 'tekê (zewcê) sernamey pele',
-'notitlematches' => 'Tekê (zewcê) sernamey pele çıniyê.',
+'titlematches' => 'Tekê (zewcê) sernameyê pele',
+'notitlematches' => 'Tekê (zewcê) sernameyê pele çıniyê.',
 'textmatches' => 'Tekê (zewcê) nuştey pele',
 'notextmatches' => 'tekê (zewcê) nuştey pele çıniyê',
 'prevn' => '{{PLURAL:$1|$1}} verên',
@@ -2020,12 +2020,12 @@ listeya ke ha ver a têna na {{PLURAL:$1|dosyaya ewwili|dosyaya $1 ewwili}} mocn
 'filedelete-success-old' => "Versiyonê'''[[Media:$1|$1]]'''î $3, $2 esteriyayo.",
 'filedelete-nofile' => "'''$1''' çin o.",
 'filedelete-nofile-old' => "Versiyonê arşivi ye '''$1'''î pê enê detayanê xasî çin o.",
-'filedelete-otherreason' => 'Sebebê binî',
-'filedelete-reason-otherlist' => 'Sebebê binî',
+'filedelete-otherreason' => 'Sebebo bin/ilaweyın:',
+'filedelete-reason-otherlist' => 'Sebebo bin',
 'filedelete-reason-dropdown' => '*sebebê hewna kerdışi
 ** ihlalê heqê telifi
 ** Çift/dosyaya kopyayın',
-'filedelete-edit-reasonlist' => 'Sebebê esterayîşî bivurne',
+'filedelete-edit-reasonlist' => 'Sebebanê esterıtışi bıvurne',
 'filedelete-maintenance' => 'Esterayîş u resterasyonê dosyayî wextê texmirî de nibenê.',
 'filedelete-maintenance-title' => 'Dosyaya nêbesterneyêna',
 
@@ -2602,7 +2602,7 @@ qê referansi qeydê vernigrewtışi cêr de eşkera biyo:',
 'sp-contributions-blocked-notice-anon' => 'Eno adresê IPi bloke biyo.
 Cıkewtışo tewr peyêno ke bloke biyo, cêr seba referansi belikerdeyo:',
 'sp-contributions-search' => 'Dekerdena cı geyrê',
-'sp-contributions-username' => 'Adresa IP yana namey karberi:',
+'sp-contributions-username' => 'Adresa IPy ya zi nameyê karberi:',
 'sp-contributions-toponly' => 'Tenya rewizyonanê tewr peyniyan bimocne',
 'sp-contributions-submit' => 'Cı geyre',
 
@@ -2633,7 +2633,7 @@ Cıkewtışo tewr peyêno ke bloke biyo, cêr seba referansi belikerdeyo:',
 'blockip-title' => 'Karberi kılit ke',
 'blockip-legend' => 'Karber blok bike',
 'blockiptext' => 'pê şuxulnayişê formê cêrıni, şıma eşkeni verniyê vurnayişkerdışê yew karberi ya zi yew IPyi bıgêrî. No têna qey verni-gırewtışê vandalizmiyo u gani şıma [[{{MediaWiki:Policy-url}}|qaydeyan]] re diqqet bıkeri. cêr de muheqqeq sebebê verni-grewtışi bınusi. (mesela: -nê- pelani de vandalizm kerdo).',
-'ipadressorusername' => 'Adresa IP yana namey karberi:',
+'ipadressorusername' => 'Adresa IPy ya zi nameyê karberi:',
 'ipbexpiry' => 'Qedyayış:',
 'ipbreason' => 'Sebeb:',
 'ipbreasonotherlist' => 'Sebebê bini',
@@ -2671,18 +2671,18 @@ Cıkewtışo tewr peyêno ke bloke biyo, cêr seba referansi belikerdeyo:',
 'ipb-blocklist' => 'Blokî ke hama estê ey bivîne',
 'ipb-blocklist-contribs' => 'Ser $1 îştîrakî',
 'unblockip' => 'Hesabê karberî a bike',
-'unblockiptext' => 'eke şıma qayili ê yê ke verniyê IPadesê inan geriyayê akeri formê cêrıni dekerê.',
-'ipusubmit' => 'Ena blok wedarne',
+'unblockiptext' => 'Cıreştışê nuştışê IP ya zi karberio ke ver ra gêriyayo, seba peyser barkerdışi dey rê formê cêrêni bıgurenên.',
+'ipusubmit' => 'Enê kılitkerdışi wedare',
 'unblocked' => '[[User:$1|$1]] blok biyo',
 'unblocked-range' => "Blokey $1'i wederya",
 'unblocked-id' => 'Blokê $1î wedariyayo',
-'blocklist' => 'Karberê kılitbiyaey',
-'ipblocklist' => 'Karberê kılitbiyaey',
-'ipblocklist-legend' => 'Yew karberê blok biyaye bivîne',
-'blocklist-userblocks' => 'Wederneyanê hesaba bınımne',
-'blocklist-tempblocks' => 'Wederneyanê idaretan bınımne',
-'blocklist-addressblocks' => 'Nêverdışanê IP bınımne',
-'blocklist-rangeblocks' => 'Nêverdışanê gırda bınımne',
+'blocklist' => 'Karberê kılitbiyayey',
+'ipblocklist' => 'Karberê kılitbiyayey',
+'ipblocklist-legend' => 'Yew karberê kılitbiyayey bıvêne',
+'blocklist-userblocks' => 'Kılitkerdışê hesaban bınımne',
+'blocklist-tempblocks' => 'Kılitkerdışan mıweqet bınımne',
+'blocklist-addressblocks' => 'Tenya kılitkerdışanê IPy bınımne',
+'blocklist-rangeblocks' => 'Kılitkerdışanê rêzkiyan bınımne',
 'blocklist-timestamp' => 'İmzay demi',
 'blocklist-target' => 'Menzil',
 'blocklist-expiry' => 'Wahdey qedyayışi',
@@ -2699,7 +2699,7 @@ Cıkewtışo tewr peyêno ke bloke biyo, cêr seba referansi belikerdeyo:',
 'createaccountblock' => 'Hesab viraştîş blok biyo',
 'emailblock' => 'e-mail blok biyo',
 'blocklist-nousertalk' => 'ti nieşken pele minaqaşe xo bivurne',
-'ipblocklist-empty' => 'Listeyê blokî veng o.',
+'ipblocklist-empty' => 'Lista kılitkerdışi venga.',
 'ipblocklist-no-results' => 'Adresa IPya waştiye ya zi namey karberi kılit nêbiyo.',
 'blocklink' => 'kılit ke',
 'unblocklink' => 'bloqi hewad',
@@ -3220,8 +3220,8 @@ Gurênayışê nae de, beno ke sistemê şıma zerar bıvêno.",
 'minutes' => 'verdê {{PLURAL:$1|$1 daka|$1 daka}}',
 'hours' => 'Verdê {{PLURAL:$1|$1 seata|$1 seata}}',
 'days' => 'Verdê {{PLURAL:$1|$1 rocan|$1 rocan}}',
-'months' => '{{PLURAL:$1|aşmi|$1 aşman}}',
-'years' => '{{PLURAL:$1|$1 ser|$1 seran}}',
+'months' => '{{PLURAL:$1|aşme|$1 aşmi}}',
+'years' => '{{PLURAL:$1|$1 serre|$1 serri}}',
 'ago' => 'Verdê $1',
 'just-now' => 'Hema newke',
 
index a758c2b..50478ae 100644 (file)
@@ -1891,8 +1891,10 @@ Snaź coš wopisanje na jeje [$2 boku datajowego wopisanja] wobźěłaś.',
 Maju bok za  bok rozjasnjenja zapśimjeśow, gaž wužywa pśedłogu, na kótaruž wótkazujo se wót [[MediaWiki:Disambiguationspage]].',
 
 'pageswithprop' => 'Boki z kakosću boka',
+'pageswithprop-legend' => 'Boki z kakosću boka',
 'pageswithprop-text' => 'Toś ten bok nalicyjo boki, kótarež wužywaju wěstu kakosć boka.',
 'pageswithprop-prop' => 'Mě kakosći:',
+'pageswithprop-submit' => 'Wótpósłaś',
 
 'doubleredirects' => 'Dwójne dalejpósrědnjenja',
 'doubleredirectstext' => 'Toś ten bok nalicujo boki, kótarež dalej pósrědnjaju na druge dalejpósrědnjenja.
@@ -3834,7 +3836,7 @@ Hować móžoš slědujucy jadnory formular wužywaś. Twój komentar pśidajo s
 'duration-centuries' => '$1 {{PLURAL:$1|stolěśe|stolěśi|stolěśa|stolěśow}}',
 'duration-millennia' => '$1 {{PLURAL:$1|lěttysac|lěttysaca|lěttysace|lěttysacow}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Boki z kakosću boka',
-'pageswithprop-submit' => 'Wótpósłaś',
+# Image rotation
+'rotate-comment' => 'Wobraz wó $1 {{PLURAL:$1|stopjeń|stopnja|stopnje|stopnjow}} ako špěra źo wobwjertnjony',
+
 );
index d7f6016..aa17b99 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 /**
- * Fallback language, used for all unspecified messages and behaviour. This
+ * Fallback language, used for all unspecified messages and behavior. This
  * is English by default, for all files other than this one.
  *
  * Do NOT set this to false in any other message file! Leave the line out to
@@ -188,7 +188,7 @@ $bookstoreList = array(
 
 /**
  * Magic words
- * Customisable syntax for wikitext and elsewhere.
+ * Customizable syntax for wikitext and elsewhere.
  *
  * IDs must be valid identifiers, they cannot contain hyphens.
  * CASE is 0 to match all case variants, 1 for case-sensitive
@@ -620,7 +620,7 @@ $messages = array(
 /*
 The sidebar for MonoBook is generated from this message, lines that do not
 begin with * or ** are discarded, furthermore lines that do begin with ** and
-do not contain | are also discarded, but do not depend on this behaviour for
+do not contain | are also discarded, but do not depend on this behavior for
 future releases. Also note that since each list value is wrapped in a unique
 XHTML id it should only appear once and include characters that are legal
 XHTML id names.
@@ -1348,7 +1348,7 @@ It may have been moved or deleted while you were viewing the page.',
 'loginreqtitle'                    => 'Login required',
 'loginreqlink'                     => 'log in',
 'loginreqpagetext'                 => 'You must $1 to view other pages.',
-'accmailtitle'                     => 'Password sent.',
+'accmailtitle'                     => 'Password sent',
 'accmailtext'                      => "A randomly generated password for [[User talk:$1|$1]] has been sent to $2.
 
 The password for this new account can be changed on the ''[[Special:ChangePassword|change password]]'' page upon logging in.",
@@ -1358,10 +1358,11 @@ To create the page, start typing in the box below (see the [[{{MediaWiki:Helppag
 If you are here by mistake, click your browser's '''back''' button.",
 'newarticletextanon'               => '{{int:newarticletext}}', # do not translate or duplicate this message to other languages
 'talkpagetext'                     => '<!-- MediaWiki:talkpagetext -->', # do not translate or duplicate this message to other languages
-'anontalkpagetext'                 => "----''This is the discussion page for an anonymous user who has not created an account yet, or who does not use it.
+'anontalkpagetext'                 => "----
+''This is the discussion page for an anonymous user who has not created an account yet, or who does not use it.''
 We therefore have to use the numerical IP address to identify him/her.
 Such an IP address can be shared by several users.
-If you are an anonymous user and feel that irrelevant comments have been directed at you, please [[Special:UserLogin/signup|create an account]] or [[Special:UserLogin|log in]] to avoid future confusion with other anonymous users.''",
+If you are an anonymous user and feel that irrelevant comments have been directed at you, please [[Special:UserLogin/signup|create an account]] or [[Special:UserLogin|log in]] to avoid future confusion with other anonymous users.",
 'noarticletext'                    => 'There is currently no text in this page.
 You can [[Special:Search/{{PAGENAME}}|search for this page title]] in other pages,
 <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} search the related logs],
@@ -3198,7 +3199,7 @@ Fill in a specific reason below (for example, citing particular pages that were
 ** Removing content from pages
 ** Spamming links to external sites
 ** Inserting nonsense/gibberish into pages
-** Intimidating behaviour/harassment
+** Intimidating behavior/harassment
 ** Abusing multiple accounts
 ** Unacceptable username',
 'ipb-hardblock'                   => 'Prevent logged-in users from editing from this IP address',
@@ -3229,9 +3230,9 @@ See the [[Special:BlockList|block list]] to review blocks.',
 'unblockip'                       => 'Unblock user',
 'unblockiptext'                   => 'Use the form below to restore write access to a previously blocked IP address or username.',
 'ipusubmit'                       => 'Remove this block',
-'unblocked'                       => '[[User:$1|$1]] has been unblocked',
-'unblocked-range'                 => '$1 has been unblocked',
-'unblocked-id'                    => 'Block $1 has been removed',
+'unblocked'                       => '[[User:$1|$1]] has been unblocked.',
+'unblocked-range'                 => '$1 has been unblocked.',
+'unblocked-id'                    => 'Block $1 has been removed.',
 'blocklist'                       => 'Blocked users',
 'ipblocklist'                     => 'Blocked users',
 'ipblocklist-legend'              => 'Find a blocked user',
@@ -3463,7 +3464,7 @@ In the latter case you can also use a link, for example [[{{#Special:Export}}/{{
 Please visit [//www.mediawiki.org/wiki/Localisation MediaWiki Localisation] and [//translatewiki.net translatewiki.net] if you wish to contribute to the generic MediaWiki localisation.',
 'allmessagesnotsupportedDB'     => "This page cannot be used because '''\$wgUseDatabaseMessages''' has been disabled.",
 'allmessages-filter-legend'     => 'Filter',
-'allmessages-filter'            => 'Filter by customisation state:',
+'allmessages-filter'            => 'Filter by customization state:',
 'allmessages-filter-unmodified' => 'Unmodified',
 'allmessages-filter-all'        => 'All',
 'allmessages-filter-modified'   => 'Modified',
@@ -5001,4 +5002,7 @@ Otherwise, you can use the easy form below. Your comment will be added to the pa
 'duration-centuries' => '$1 {{PLURAL:$1|century|centuries}}',
 'duration-millennia' => '$1 {{PLURAL:$1|millennium|millennia}}',
 
+#Rotation
+'rotate-comment' => 'Image rotated by $1 {{PLURAL:$1|degree|degrees}} clockwise',
+
 );
index 17889f9..301984d 100644 (file)
@@ -658,7 +658,7 @@ $1',
 
 # Short words for each namespace, by default used in the namespace tab in monobook
 'nstab-main' => 'Página',
-'nstab-user' => 'Página de usuari{{gender:{{#titleparts:{{BASEPAGENAME}}|1}}|o|a|o}}',
+'nstab-user' => 'Página de usuario',
 'nstab-media' => 'Media',
 'nstab-special' => 'Página especial',
 'nstab-project' => 'Página del proyecto',
index b1ca22b..094e966 100644 (file)
@@ -434,7 +434,7 @@ $messages = array(
 'qbbrowse' => 'Sirvi',
 'qbedit' => 'Redigeeri',
 'qbpageoptions' => 'Lehekülje suvandid',
-'qbmyoptions' => 'Minu suvandid',
+'qbmyoptions' => 'Minu leheküljed',
 'qbspecialpages' => 'Erileheküljed',
 'faq' => 'KKK',
 'faqpage' => 'Project:KKK',
@@ -523,7 +523,7 @@ $1',
 'aboutsite' => '{{GRAMMAR:genitive|{{SITENAME}}}} tiitelandmed',
 'aboutpage' => 'Project:Tiitelandmed',
 'copyright' => 'Kogu tekst on kasutatav litsentsi $1 tingimustel.',
-'copyrightpage' => '{{ns:project}}:Autoriõigused',
+'copyrightpage' => '{{ns:project}}:Autoriõigus',
 'currentevents' => 'Sündmused',
 'currentevents-url' => 'Project:Sündmused',
 'disclaimers' => 'Hoiatused',
@@ -2027,6 +2027,12 @@ Sisesta kujul tüüp/alamtüüp, näiteks <code>image/jpeg</code>.',
 Võimalik, et sellised lingid peaks viitama sobivamatele lehekülgedele.
 Lehekülg loetakse täpsustusleheküljeks, kui see kasutab malli, millele viitab sõnum [[MediaWiki:Disambiguationspage]].",
 
+'pageswithprop' => 'Leheatribuudiga leheküljed',
+'pageswithprop-legend' => 'Leheatribuudiga leheküljed',
+'pageswithprop-text' => 'Sellel leheküljel on loetletud mõnd leheatribuuti kasutavad leheküljed.',
+'pageswithprop-prop' => 'Atribuudi nimi:',
+'pageswithprop-submit' => 'Mine',
+
 'doubleredirects' => 'Kahekordsed ümbersuunamised',
 'doubleredirectstext' => 'Käesolev leht esitab loendi lehtedest, mis sisaldavad ümbersuunamisi teistele ümbersuunamislehtedele.
 Igal real on ära toodud esimene ja teine ümbersuunamisleht ning samuti teise ümbersuunamislehe sihtmärk, mis tavaliselt on esialgse ümbersuunamise tegelik siht, millele see otse osutama peakski.
@@ -2283,7 +2289,7 @@ Edasised muudatused sellel leheküljel ja seotud aruteluleheküljel tuuakse ära
 'iteminvalidname' => "Probleem üksusega '$1'. Selle nimes on viga.",
 'wlnote' => "Allpool on {{PLURAL:$1|viimane muudatus|viimased '''$1''' muudatust}} viimase {{PLURAL:$2|tunni|'''$2''' tunni}} jooksul seisuga $3, $4.",
 'wlshowlast' => 'Näita viimast $1 tundi $2 päeva. $3',
-'watchlist-options' => 'Jälgimisloendi võimalused',
+'watchlist-options' => 'Jälgimisloendi seaded',
 
 # Displayed when you click the "watch" button and it is in the process of watching
 'watching' => 'Jälgimine...',
@@ -2348,7 +2354,7 @@ Tagasiside ja abi:
 'confirmdeletetext' => 'Sa oled andmebaasist kustutamas lehekülge koos kogu tema ajalooga.
 Palun kinnita, et tahad seda tõepoolest teha, et sa mõistad tagajärgi ja et sinu tegevus on kooskõlas siinse [[{{MediaWiki:Policy-url}}|sisekorraga]].',
 'actioncomplete' => 'Toiming sooritatud',
-'actionfailed' => 'Tegevus ebaõnnestus',
+'actionfailed' => 'Toiming ebaõnnestus',
 'deletedtext' => '"$1" on kustutatud. Kustutatud leheküljed on ära toodud eraldi loendis ($2).',
 'dellogpage' => 'Kustutamislogi',
 'dellogpagetext' => 'Allpool on esitatud nimekiri viimastest kustutamistest.
@@ -2831,7 +2837,7 @@ Viimasel juhul saab kasutada ka linki, näiteks lehekülje "[[{{MediaWiki:Mainpa
 # Namespace 8 related
 'allmessages' => 'Kõik süsteemi sõnumid',
 'allmessagesname' => 'Nimi',
-'allmessagesdefault' => 'Vaikimisi tekst',
+'allmessagesdefault' => 'Vaiketekst',
 'allmessagescurrent' => 'Praegune tekst',
 'allmessagestext' => 'See on loend kõikidest olemasolevatest süsteemisõnumitest MediaWiki nimeruumis.
 Kui soovid MediaWiki tarkvara tõlkimises osaleda, siis vaata lehti [//www.mediawiki.org/wiki/Localisation MediaWiki lokaliseerimine] ja [//translatewiki.net translatewiki.net].',
@@ -2932,9 +2938,9 @@ Palun ürita uuesti.',
 # Tooltip help for the actions
 'tooltip-pt-userpage' => 'Sinu kasutajaleht',
 'tooltip-pt-anonuserpage' => 'Sinu IP-aadressi kasutajalehekülg',
-'tooltip-pt-mytalk' => 'Minu aruteluleht',
+'tooltip-pt-mytalk' => 'Sinu arutelulehekülg',
 'tooltip-pt-anontalk' => 'Arutelu sellelt IP-aadressilt tehtud muudatuste kohta',
-'tooltip-pt-preferences' => 'Minu eelistused',
+'tooltip-pt-preferences' => 'Sinu eelistused',
 'tooltip-pt-watchlist' => 'Lehekülgede loend, mida jälgid muudatuste osas',
 'tooltip-pt-mycontris' => 'Sinu kaastööde loend',
 'tooltip-pt-login' => 'Me julgustame teid sisse logima, kuid see pole kohustuslik.',
@@ -2950,7 +2956,7 @@ Saad vaadata selle lähteteksti.',
 'tooltip-ca-unprotect' => 'Muuda selle lehekülje kaitset',
 'tooltip-ca-delete' => 'Kustuta see lehekülg',
 'tooltip-ca-undelete' => 'Taasta enne lehekülje kustutamist tehtud muudatused',
-'tooltip-ca-move' => 'Teisalda see lehekülg teise nime alla.',
+'tooltip-ca-move' => 'Teisalda see lehekülg',
 'tooltip-ca-watch' => 'Lisa see lehekülg oma jälgimisloendisse',
 'tooltip-ca-unwatch' => 'Eemalda see lehekülg oma jälgimisloendist',
 'tooltip-search' => 'Otsi vikist',
@@ -3164,6 +3170,8 @@ Järgnevas loendis, mis on sorteeritud $2, on '''$1''' {{PLURAL:$1|fail|faili}}.
 'minutes' => '{{PLURAL:$1|üks minut|$1 minutit}}',
 'hours' => '{{PLURAL:$1|üks tund|$1 tundi}}',
 'days' => '{{PLURAL:$1|üks päev|$1 päeva}}',
+'months' => '{{PLURAL:$1|Üks kuu|$1 kuud}}',
+'years' => '{{PLURAL:$1|Üks aasta|$1 aastat}}',
 'ago' => '$1 tagasi',
 'just-now' => 'just nüüd',
 
@@ -3935,6 +3943,7 @@ Kui ei, kasuta allolevat lihtsat vormi. Sinu kommentaar lisatakse koos kasutajan
 'api-error-ok-but-empty' => 'Sisetõrge: Server ei vasta.',
 'api-error-overwrite' => 'Olemasolevate failide ülekirjutamine pole lubatud.',
 'api-error-stashfailed' => 'Sisetõrge: Serveril ei õnnestunud ajutist faili talletada.',
+'api-error-publishfailed' => 'Sisetõrge: Serveril ebaõnnestus ajutise faili avaldamine.',
 'api-error-timeout' => 'Server ei vastanud oodatud aja sees.',
 'api-error-unclassified' => 'Ilmnes teadmata tõrge.',
 'api-error-unknown-code' => 'Teadmata tõrge: "$1"',
@@ -3955,4 +3964,7 @@ Kui ei, kasuta allolevat lihtsat vormi. Sinu kommentaar lisatakse koos kasutajan
 'duration-centuries' => '$1 {{PLURAL:$1|sajandi}}',
 'duration-millennia' => '$1 {{PLURAL:$1|aastatuhande}}',
 
+# Image rotation
+'rotate-comment' => 'Pilti pööratud $1 {{PLURAL:$1|kraad|kraadi}} päripäeva',
+
 );
index 62599b8..70329a1 100644 (file)
@@ -244,9 +244,9 @@ $messages = array(
 'hidden-category-category' => 'Kategoria ezkutuak',
 'category-subcat-count' => '{{PLURAL:$2|Kategoria honek beste honako azpikategoria baino ez du.|Kategoria honek honako {{PLURAL:$1|azpikategoria du|$1 azpikategoriak ditu}}, guztira dauden $2tik.}}',
 'category-subcat-count-limited' => 'Kategoria honek {{PLURAL:$1|azpikategoria hau du|$1 azpikategoria hauek ditu}}.',
-'category-article-count' => '{{PLURAL:$2|Kategoria honek honako orrialdea baino ez du.|Honako {{PLURAL:$1|orrialdea kategoria honetan dago|$1 orrialdeak kategoria hauetan daude}}, guztira dauden $2 (e)tik.}}',
+'category-article-count' => '{{PLURAL:$2|Kategoria honek ondorengo orri hau baino ez du.|Ondorengo {{PLURAL:$1|orri hau kategoria honetan dago|$1 orriak kategoria honetan daude}}. Guztira $2 orri dira kategoria honetan.}}',
 'category-article-count-limited' => 'Ondorengo {{PLURAL:$1|orri hau kategoria honetan dago.|$1 orri hauek kategoria honetan daude.}}',
-'category-file-count' => '{{PLURAL:$2|Kategoria honek fitxategi hau baino ez du.|Honako {{PLURAL:$1|fitxategia kategoria honetan dago|$1 fitxategiak kategoria honetan daude}} guztira dauden $2 (e)tik.}}',
+'category-file-count' => '{{PLURAL:$2|Kategoria honek ondorengo fitxategi hau baino ez du.|Ondorengo {{PLURAL:$1|fitxategi hau kategoria honetan dago|$1 fitxategiak kategoria honetan daude}}. Guztira $2 fitxategi dira kategoria honetan.}}',
 'category-file-count-limited' => 'Ondorengo {{PLURAL:$1|fitxategia kategoria honetan dago.|$1 fitxategiak kategoria honetan daude.}}',
 'listingcontinuesabbrev' => 'jarr.',
 'index-category' => 'Indexatutako orrialdeak',
@@ -313,7 +313,7 @@ $messages = array(
 'editthispage' => 'Orri hau aldatu',
 'create-this-page' => 'Orrialde hau sortu',
 'delete' => 'Ezabatu',
-'deletethispage' => 'Orrialde hau ezabatu',
+'deletethispage' => 'Ezabatu orri hau',
 'undelete_short' => 'Berreskuratu {{PLURAL:$1|aldaketa bat|$1 aldaketa}}',
 'viewdeleted_short' => 'Ikusi ezabatutako {{PLURAL:$1|bidalketa bat|$1 bidalketa}}',
 'protect' => 'Babestu',
@@ -805,12 +805,12 @@ Orrialdea gordetzeko erabakitzen duzun unean goiko koadroko edukia '''bakarrik''
 'nonunicodebrowser' => "'''OHARRA: Zure nabigatzailea ez dator Unicode arauarekin bat. Artikuluak modu seguruan aldatu ahal izateko beste sistema bat gaitu da: ASCII ez diren karaktereak kode hamaseitar bezala agertuko dira aldaketa koadroan.'''",
 'editingold' => "'''KONTUZ: Artikulu honen bertsio zahar bat aldatzen ari zara. Gorde egiten baduzu, azkenengo aldaketa baino lehenagoko aldakuntzak, ezabatuak izango dira.'''",
 'yourdiff' => 'Ezberdintasunak',
-'copyrightwarning' => "Kontuan izan {{SITENAME}}(e)n egindako ekarpen guztiak $2 baldintzapean argitaratzen direla (ikus $1 informazio gehiagorako). Zure testua banatzeko baldintza hauekin ados ez bazaude, ez ezazu bidali.<br />
-Era berean, bidaltzen ari zaren edukia zuk zeuk idatzitakoa dela edo jabetza publikoko edo baliabide aske batetik kopiatu duzula zin egin ari zara.
-'''EZ BIDALI BAIMENIK GABEKO COPYRIGHTDUN EDUKIRIK!'''",
-'copyrightwarning2' => "Mesedez, kontuan izan {{SITENAME}}(e)n egindako ekarpen guztiak besteek aldatu edo ezabatu ditzaketela. Ez baduzu besteek aldaketak egitea nahi, ez ezazu bidali.<br />
-Era berean, bidaltzen ari zaren edukia zuk zeuk idatzitakoa dela edo jabetza publikoko edo baliabide aske batetik kopiatu duzula zin egin ari zara (ikus $1 informazio gehiagorako).
-'''EZ BIDALI BAIMENIK GABEKO COPYRIGHTDUN EDUKIRIK!'''",
+'copyrightwarning' => "Kontuan izan ezazu {{SITENAME}} webgunean egindako ekarpen guztiak $2 lizentziaren pean argitaratzen direla (xehetasunetarako, ikus $1). Zuk idatzitakoa libreki aldatua eta banatua izatea nahi ez baduzu, ez ezazu hemen jarri.<br />
+Era berean, hitzematen ari zara hau zuk zeuk idatzia dela, edo jabari publikotik nahiz askea den beste ituri batetik kopiatu duzula.
+'''Ez erabili copyright eskubideek babestutako lanik, baimenik gabe!'''",
+'copyrightwarning2' => "Mesedez, kontuan izan ezazu {{SITENAME}} webgunean egindako ekarpen guztiak beste erabiltzaileek aldatu edo ezabatu ditzaketela. Zuk idatzitakoa libreki aldatua izatea nahi ez baduzu, ez ezazu hemen jarri.<br />
+Era berean, hitzematen ari zara hau zuk zeuk idatzia dela, edo jabari publikotik nahiz askea den beste ituri batetik kopiatu duzula (xehetasunetarako, ikus $1).
+'''Ez erabili copyright eskubideek babestutako lanik, baimenik gabe!'''",
 'longpageerror' => "'''Errorea: Bidali duzun testuak {{PLURAL:$1|kilobyte 1eko|$1 kilobyteko}} luzera du, eta {{PLURAL:$2|kilobyte 1eko|$2 kilobyteko}} maximoa baino luzeagoa da.'''
 Ezin da gorde.",
 'readonlywarning' => "'''Oharra: Datu-basea blokeatu egin da mantenu lanak burutzeko, beraz ezingo dituzu orain zure aldaketak gorde.'''
@@ -879,7 +879,7 @@ Eztabaidak aipatu gabe utzi dira.',
 Mesedez beheko alderaketa egiaztatu, egin nahi duzuna hori dela frogatzeko, eta ondoren azpiko aldaketak gorde, aldaketa desegiten amaitzeko.',
 'undo-failure' => 'Ezin izan da aldaketa desegin tarteko aldaketekin gatazkak direla-eta.',
 'undo-norev' => 'Aldaketa ezin da desegin ez delako existitzen edo ezabatu zutelako.',
-'undo-summary' => '[[Special:Contributions/$2|$2(r)en]] $1 berrikuspena desegin da ([[User talk:$2|Eztabaida]])',
+'undo-summary' => '[[Special:Contributions/$2|$2]] ([[User talk:$2|eztabaida]]) wikilariaren $1 berrikuspena desegin da',
 
 # Account creation failure
 'cantcreateaccounttitle' => 'Ezin izan da kontua sortu',
@@ -1004,10 +1004,10 @@ Ezin duzu atzitu.',
 'revdelete-concurrent-change' => 'Errorea, $1 $2 data duen elementua aldatzean: badirudi haren egoera aldatu duela nor edo nork, zu aldatzen saiatzen ari zinela.
 Begira itzazu erregistroak.',
 'revdelete-reason-dropdown' => '*Ezabatzeko ohiko arrazoiak
-** Egile eskubideen urraketa
+** Egile eskubideak urratzea
 ** Informazio pertsonal edo iruzkin desegokia
 ** Lankide izen desegokia
-** Iraingarria izan daitekeen informazioa',
+** Kalumnia edo iraintzat jo daiteke',
 'revdelete-otherreason' => 'Bestelako arrazoia:',
 'revdelete-reasonotherlist' => 'Beste arrazoi bat',
 'revdelete-edit-reasonlist' => 'Ezabaketa arrazoiak aldatu',
@@ -1398,7 +1398,7 @@ $1 {{PLURAL:$1|karakteretik|karakteretik}} behera izan behar ditu.',
 'nchanges' => '{{PLURAL:$1|aldaketa 1|$1 aldaketa}}',
 'recentchanges' => 'Aldaketa berriak',
 'recentchanges-legend' => 'Azken aldaketen aukerak',
-'recentchanges-summary' => 'Orrialde honetan wiki honetan egindako azken aldaketak erakusten dira.',
+'recentchanges-summary' => 'Orri honetan ikuska ditzakezu wiki honetan egindako azken aldaketak.',
 'recentchanges-feed-description' => 'Sindikazio honetan wikian eginiko azkeneko aldaketak jarrai daitezke.',
 'recentchanges-label-newpage' => 'Aldaketa honek orrialde berri bat sortu du',
 'recentchanges-label-minor' => 'Hau aldaketa txikia da',
@@ -2273,7 +2273,9 @@ Ikus [[Special:BlockList|blokeoen zerrenda]] blokeoak aztertzeko.',
 'blocklist' => 'Blokeatutako erabiltzaileak',
 'ipblocklist' => 'Blokeatutako erabiltzaileak',
 'ipblocklist-legend' => 'Blokeatutako erabiltzaile bat bilatu',
+'blocklist-timestamp' => 'Eguna eta ordua',
 'blocklist-target' => 'Helburua',
+'blocklist-by' => 'Blokeoa ezarri duen administratzailea',
 'blocklist-reason' => 'Arrazoia',
 'ipblocklist-submit' => 'Bilatu',
 'ipblocklist-localblock' => 'Tokiko blokeoa',
@@ -2298,7 +2300,7 @@ Ikus [[Special:BlockList|blokeoen zerrenda]] blokeoak aztertzeko.',
 Blokeo erregistroa ematen da azpian erreferentziarako:',
 'blocklog-showsuppresslog' => 'Lankide hau aurretik blokeatua eta ezkutatua izan da.
 Erregistroa ematen da azpian erreferentziarako:',
-'blocklogentry' => '"[[$1]]" wikilariari blokeoa ezarri zaio. Blokeoaldia: $2 $3',
+'blocklogentry' => 'wikilariak [[$1]] erabiltzailea blokeatu du. Blokeoaldia: $2 $3',
 'reblock-logentry' => '[[$1]] wikilariari blokeoaldia aldatu diogu. Blokeoaldi berria: $2 $3',
 'blocklogtext' => 'Erabiltzaileen blokeoen ezarpen eta ezabaketen erregistroa da hau. 
 Automatikoki blokeatutako IP helbideak ez dira zerrendatzen. 
@@ -3353,7 +3355,9 @@ Irudiak bereizmen handienean daude, bestelako fitxategi motak beraiei esleitutak
 'htmlform-selectorother-other' => 'Beste bat',
 
 # New logging system
-'logentry-delete-delete' => '$1 wikilariak $3 orria ezabatu du',
+'logentry-delete-delete' => '$1 wikilariak «$3» orria ezabatu du',
+'logentry-delete-event' => '$1 wikilariak ikusgaitasuna aldatu {{PLURAL:$5|dio erregistroko sarrera bati|die erregistroko $5 sarrerari}}, $3 orrian: $4',
+'logentry-suppress-event' => '$1 wikilariak ezkutuan ikusgaitasuna aldatu {{PLURAL:$5|dio erregistroko sarrera bati|die erregistroko $5 sarrerari}}, $3 orrian: $4',
 'revdelete-restricted' => 'administratzaileentzako mugak ezarri dira',
 'revdelete-unrestricted' => 'administratzaileentzako mugak kendu dira',
 'logentry-move-move' => '$1 wikilariak «$3» orria «$4» izenera aldatu du',
index 1c979a7..423d9db 100644 (file)
@@ -2238,6 +2238,12 @@ https://www.mediawiki.org/wiki/Manual:Image_Authorization را ببینید.',
 این صفحه‌ها شاید در عوض به موضوعات مرتبط پیوند داده شوند.<br />
 یک صفحه هنگامی صفحهٔ ابهام‌زدایی در نظر گرفته می‌شود که در آن از الگویی که به [[MediaWiki:Disambiguationspage]] پیوند دارد استفاده شده باشد.",
 
+'pageswithprop' => 'صفحه‌های دارای خاصیت صفحه',
+'pageswithprop-legend' => 'صفحه‌های دارای خاصیت صفحه',
+'pageswithprop-text' => 'این صفحه فهرستی است از صفحه‌هایی که از یک خاصیت صفحهٔ خاص استفاده می‌کنند.',
+'pageswithprop-prop' => 'نام خاصیت:',
+'pageswithprop-submit' => 'برو',
+
 'doubleredirects' => 'تغییرمسیرهای دوتایی',
 'doubleredirectstext' => 'این صفحه فهرستی از صفحه‌های تغییرمسیری را ارائه می‌کند که به صفحهٔ تغییرمسیر دیگری اشاره می‌کنند.
 هر سطر دربردارندهٔ پیوندهایی به تغییرمسیر اول و دوم و همچنین مقصد تغییرمسیر دوم است، که معمولاً صفحهٔ مقصد واقعی است و نخستین تغییرمسیر باید به آن اشاره کند.
@@ -4285,4 +4291,7 @@ $5
 'duration-centuries' => '$1 قرن',
 'duration-millennia' => '{{PLURAL:$1|هزار سال |$1 هزار سال}}',
 
+# Image rotation
+'rotate-comment' => 'تصویر به دست $1 {{PLURAL:$1|درجهٔ|درجهٔ}} ساعت‌گرد چرخانده شد',
+
 );
index bf8695f..42bbc9b 100644 (file)
@@ -2035,6 +2035,11 @@ Syöte: sisältötyyppi/alatyyppi, esimerkiksi <code>image/jpeg</code>.',
 Täsmennyssivun sijaan ne voisivat linkittää suoraan asianomaiseen aiheeseen.<br />
 Sivua kohdellaan täsmennyssivuna, jos se käyttää mallinetta, johon on linkki sivulta [[MediaWiki:Disambiguationspage]].",
 
+'pageswithprop' => 'Sivut sivun ominaisuuden mukaan',
+'pageswithprop-legend' => 'Sivut sivun ominaisuuden mukaan',
+'pageswithprop-text' => 'Tällä sivulla on lueteltu sivut, jotka käyttävät erityistä sivun ominaisuutta.',
+'pageswithprop-submit' => 'Siirry',
+
 'doubleredirects' => 'Kaksinkertaiset ohjaukset',
 'doubleredirectstext' => 'Tässä listassa on ohjaussivut, jotka ohjaavat toiseen ohjaussivuun.
 Jokaisella rivillä on linkit ensimmäiseen ja toiseen ohjaukseen sekä toisen ohjauksen kohteen ensimmäiseen riviin, eli yleensä ”oikeaan” kohteeseen, johon ensimmäisen ohjauksen pitäisi osoittaa.
@@ -3993,6 +3998,4 @@ Muussa tapauksessa voit käyttää alla olevaa helpompaa lomaketta. Kommenttisi
 'duration-centuries' => '$1 {{PLURAL:$1|vuosisata|vuosisataa}}',
 'duration-millennia' => '$1 {{PLURAL:$1|vuosituhat|vuosituhatta}}',
 
-# Unknown messages
-'pageswithprop-submit' => 'Siirry',
 );
index ac3698a..228d04c 100644 (file)
@@ -2153,8 +2153,10 @@ Elles devraient plutôt pointer vers le bon article.<br />
 Une page est considérée comme une page d'homonymie si elle utilise un modèle lié à [[MediaWiki:Disambiguationspage]]",
 
 'pageswithprop' => 'Pages avec une propriété de page',
+'pageswithprop-legend' => 'Pages avec une propriété de page',
 'pageswithprop-text' => 'Cette page liste les pages qui utilisent une propriété de page particulière.',
 'pageswithprop-prop' => 'Nom de la propriété:',
+'pageswithprop-submit' => 'Aller',
 
 'doubleredirects' => 'Doubles redirections',
 'doubleredirectstext' => 'Voici une liste des pages qui redirigent vers des pages qui sont elles-mêmes des pages de redirection.
@@ -4239,7 +4241,7 @@ Sinon, vous pouvez utiliser le formulaire simplifié ci-dessous. Votre commentai
 'duration-centuries' => '$1 siècle{{PLURAL:$1||s}}',
 'duration-millennia' => '$1 millénaire{{PLURAL:$1||s}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Pages avec une propriété de page',
-'pageswithprop-submit' => 'Aller',
+# Image rotation
+'rotate-comment' => 'Image pivotée de $1 {{PLURAL:$1|degré|degrés}} dans le sens des aiguilles d’une montre',
+
 );
index 70ec290..12f0d75 100644 (file)
@@ -1000,7 +1000,7 @@ Vos pouede [[Special:Search/{{PAGENAME}}|fâre na rechèrche sur cél titro]] de
 'missing-revision' => 'La vèrsion numerô $1 de la pâge apelâye « {{PAGENAME}} » ègziste pas.
 
 En g·ènèral cen arreve en siuvent un lim d’un historico dèpassâ de vers na pâge qu’est étâye suprimâye.
-Vos pouede trovar més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].',
+Vos pouede trovar més de dètalys sur lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].',
 'userpage-userdoesnotexist' => 'Lo compto utilisator « $1 » est pas encartâ.
 Se vos plét, controlâd que vos voléd fâre / changiér cela pâge.',
 'userpage-userdoesnotexist-view' => 'Lo compto utilisator « $1 » est pas encartâ.',
@@ -1194,30 +1194,30 @@ Pôt-étre el est étâye suprimâye du vouiqui ou ben renomâye.
 'rev-deleted-event' => '(accion du jornal enlevâye)',
 'rev-deleted-user-contribs' => '[nom d’utilisator ou ben adrèce IP enlevâ(ye) - changement cachiê sur les contribucions]',
 'rev-deleted-text-permission' => "Ceta vèrsion de la pâge est étâye '''suprimâye'''.
-Y pôt avêr més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].",
+Y pôt avêr més de dètalys sur lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].",
 'rev-deleted-text-unhide' => "Ceta vèrsion de la pâge est étâye '''suprimâye'''.
-Y pôt avêr més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].
+Y pôt avêr més de dètalys sur lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].
 Vos pouede adés [$1 vêre cela vèrsion] se vos o voléd.",
 'rev-suppressed-text-unhide' => "Ceta vèrsion de la pâge est étâye '''rèprimâye'''.
-Y pôt avêr més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les rèprèssions].
+Y pôt avêr més de dètalys sur lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les rèprèssions].
 Vos pouede adés [$1 vêre cela vèrsion] se vos o voléd.",
 'rev-deleted-text-view' => "Ceta vèrsion de la pâge est étâye '''suprimâye'''.
-Vos la pouede vêre ; y pôt avêr més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].",
+Vos la pouede vêre ; y pôt avêr més de dètalys sur lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].",
 'rev-suppressed-text-view' => "Ceta vèrsion de la pâge est étâye '''rèprimâye'''.
-Vos la pouede vêre ; y pôt avêr més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} jornal de les rèprèssions].",
+Vos la pouede vêre ; y pôt avêr més de dètalys sur lo [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} jornal de les rèprèssions].",
 'rev-deleted-no-diff' => "Vos pouede pas vêre ceta dif perce que yona de les vèrsions est étâye '''suprimâye'''.
-Y pôt avêr més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].",
+Y pôt avêr més de dètalys sur lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].",
 'rev-suppressed-no-diff' => "Vos pouede pas vêre ceta dif, yona de les vèrsions est étâye '''suprimâye'''.",
 'rev-deleted-unhide-diff' => "Yona de les vèrsions de ceta dif est étâye '''suprimâye'''.
-Y pôt avêr més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].
+Y pôt avêr més de dètalys sur lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].
 Vos pouede adés [$1 vêre cela dif] se vos o voléd.",
 'rev-suppressed-unhide-diff' => "Yona de les vèrsions de ceta dif est étâye '''rèprimâye'''.
-Y pôt avêr més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les rèprèssions].
+Y pôt avêr més de dètalys sur lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les rèprèssions].
 Vos pouede adés [$1 vêre cela dif] se vos o voléd.",
 'rev-deleted-diff-view' => "Yona de les vèrsions de ceta dif est étâye '''suprimâye'''.
-Vos pouede vêre ceta dif ; y pôt avêr més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].",
+Vos pouede vêre ceta dif ; y pôt avêr més de dètalys sur lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].",
 'rev-suppressed-diff-view' => "Yona de les vèrsions de ceta dif est étâye '''rèprimâye'''.
-Vos pouede vêre ceta dif ; y pôt avêr més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} jornal de les rèprèssions].",
+Vos pouede vêre ceta dif ; y pôt avêr més de dètalys sur lo [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} jornal de les rèprèssions].",
 'rev-delundel' => 'montrar / cachiér',
 'rev-showdeleted' => 'montrar',
 'revisiondelete' => 'Suprimar / refâre des vèrsions',
@@ -1233,7 +1233,7 @@ fonccion, la vèrsion spècifiâye ègziste pas ou ben vos èprovâd de cachiér
 'revdelete-show-file-submit' => 'Ouè',
 'revdelete-selected' => "'''{{PLURAL:$2|Vèrsion chouèsia|Vèrsions chouèsies}} de [[:$1]] :'''",
 'logdelete-selected' => "'''{{PLURAL:$1|Èvènement du jornal chouèsi|Èvènements du jornal chouèsis}} :'''",
-'revdelete-text' => "'''Les vèrsions et los èvènements suprimâ(ye)s aparètront adés dedens l’historico de la pâge et pués dedens los jornals, mas quârques parties de lor contegnu seront inaccèssibles u publico.'''
+'revdelete-text' => "'''Les vèrsions et los èvènements suprimâ(ye)s aparètront adés dedens l’historico de la pâge et pués sur los jornals, mas quârques parties de lor contegnu seront inaccèssibles u publico.'''
 Los ôtros administrators de {{SITENAME}} porront tojorn arrevar u contegnu cachiê et lo refâre per cela mém’entèrface, du muens que des rèstriccions de ples seyont pas dèfenies.",
 'revdelete-confirm' => 'Se vos plét, confirmâd qu’o est franc cen que vos voléd fâre, que vos en compregnéd les consèquences et pués que vos o féte en acôrd avouéc les [[{{MediaWiki:Policy-url}}|règlles de dedens]].',
 'revdelete-suppress-text' => "La rèprèssion dêt étre empleyêe '''ren que''' dens cetos câs :
@@ -1336,7 +1336,7 @@ Notâd que l’usâjo des lims de navigacion rebeterat a zérô cela colona.',
 'difference-missing-revision' => '{{PLURAL:$2|Na vèrsion|$2 vèrsions}} de cela difèrence ($1) {{PLURAL:$2|est pas étâye trovâye|sont pas étâyes trovâyes}}.
 
 En g·ènèral cen arreve en siuvent un lim d’una dif dèpassâye de vers na pâge qu’est étâye suprimâye.
-Vos pouede trovar més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].',
+Vos pouede trovar més de dètalys sur lo [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jornal de les suprèssions].',
 
 # Search results
 'searchresults' => 'Rèsultats de la rechèrche',
@@ -1511,8 +1511,9 @@ Dêt pas dèpassar $1 caractèro{{PLURAL:$1||s}}.',
 'prefs-help-gender' => 'U chouèx : empleyê por acordar en sèxo los mèssâjos de la programeria.
 Cel’enformacion serat publica.',
 'email' => 'Mèssageria èlèctronica',
-'prefs-help-realname' => 'U chouèx : se vos lo balyéd, serat empleyê por vos atribuar voutres ôvres.',
-'prefs-help-email' => 'L’adrèce èlèctronica est u chouèx, mas el est nècèssèra por rebetar a zérô voutron contresegno, se vos vegnévâd a l’oubliar.',
+'prefs-help-realname' => 'L’endicacion du veré nom est u chouèx.
+Se vos chouèsésséd de lo balyér, serat empleyê por vos atribuar voutres ôvres.',
+'prefs-help-email' => 'L’endicacion de l’adrèce èlèctronica est u chouèx, mas el est nècèssèra por rebetar a zérô voutron contresegno, se vos vegnévâd a l’oubliar.',
 'prefs-help-email-others' => 'Vos porriâd asse-ben chouèsir de lèssiér los ôtros sè veriér vers vos per mèssageria èlèctronica avouéc un lim sur voutra pâge utilisator ou ben de discussion sen que seye nècèssèro de rèvèlar voutron identitât.',
 'prefs-help-email-required' => 'Un’adrèce èlèctronica est nècèssèra.',
 'prefs-info' => 'Enformacions de bâsa',
@@ -1748,11 +1749,11 @@ Les pâges de voutra [[Special:Watchlist|lista de siuvu]] sont en '''grâs'''.",
 
 Por comoditât, lo jornal de les suprèssions et des dèplacements de cela pâge est balyê ce-desot :",
 'uploadtext' => "Empleyéd lo formulèro ce-desot por tèlèchargiér des fichiérs.
-Por vêre ou ben rechèrchiér des fichiérs tèlèchargiês dês devant, vêde la [[Special:FileList|lista des fichiérs tèlèchargiês]]. Los (re-)tèlèchargements sont asse-ben encartâs dedens lo [[Special:Log/upload|jornal des tèlèchargements]], et les suprèssions dedens lo [[Special:Log/delete|jornal de les suprèssions]].
+Por vêre ou ben rechèrchiér des fichiérs tèlèchargiês dês devant, vêde la [[Special:FileList|lista des fichiérs tèlèchargiês]]. Los (re-)tèlèchargements sont asse-ben encartâs sur lo [[Special:Log/upload|jornal des tèlèchargements]], et les suprèssions sur lo [[Special:Log/delete|jornal de les suprèssions]].
 
 Por entrebetar un fichiér dedens na pâge, empleyéd un lim de yona de cetes fôrmes :
 * '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Fichiér.jpg]]</nowiki></code>''' por empleyér la vèrsion en plêna largior du fichiér
-* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Fichiér.png|200px|thumb|left|tèxto dèscriptif]]</nowiki></code>''' por empleyér na figura de 200 pixèls de lârjo dedens na bouèta gôche avouéc « tèxto dèscriptif » coment dèscripcion
+* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Fichiér.png|200px|thumb|left|tèxto dèscriptif]]</nowiki></code>''' por empleyér na figura de 200 pixèls de lârjo dedens na bouèta gôche avouéc « tèxto dèscriptif » coment dèscripcion
 * '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:Fichiér.ogg]]</nowiki></code>''' por liyér tot drêt vers lo fichiér sen lo fâre vêre",
 'upload-permitted' => 'Tipos de fichiérs ôtorisâs : $1.',
 'upload-preferred' => 'Tipos de fichiérs prèferâs : $1.',
@@ -2139,6 +2140,12 @@ Oubliâd pas de controlar s’y at gins d’ôtro lim de vers los modèlos devan
 Devriant pletout pouentar vers na pâge que vat avouéc.<br />
 Na pâge est trètâye coment na pâge d’homonimia s’emplèye un modèlo liyê a [[MediaWiki:Disambiguationspage]].",
 
+'pageswithprop' => 'Pâges avouéc na propriètât de pâge',
+'pageswithprop-legend' => 'Pâges avouéc na propriètât de pâge',
+'pageswithprop-text' => 'Ceta pâge liste les pâges qu’emplèyont na propriètât de pâge particuliére.',
+'pageswithprop-prop' => 'Nom de la propriètât :',
+'pageswithprop-submit' => 'Alar trovar',
+
 'doubleredirects' => 'Redirèccions dobles',
 'doubleredirectstext' => 'Ceta pâge liste les pâges que redirijont vers d’ôtres pâges de redirèccion.
 Châque renche contint des lims de vers la premiére et la seconda redirèccion, et pués la ciba de la seconda redirèccion, cen que balye habituèlament la « veré » pâge ciba, de vers laquinta la premiére redirèccion devrêt pouentar.
@@ -2244,8 +2251,8 @@ Se vos plét, notâd que d’ôtros setos Vouèbe pôvont avêr un lim de vers u
 'log' => 'Jornals',
 'all-logs-page' => 'Tôs los jornals publicos',
 'alllogstext' => 'Vua combinâye de tôs los jornals disponiblos dessus {{SITENAME}}.
-Vos pouede rètrendre la vua en chouèséssent un tipo de jornal, lo nom d’utilisator (sensiblo a la câssa) la pâge regardâye (sensibla la câssa avouéc).',
-'logempty' => 'Niona piéce que corrèspond dedens lo jornal.',
+Vos pouede rètrendre la vua en chouèséssent un tipo de jornal, lo nom d’utilisator (sensiblo a la câssa) la pâge regardâye (sensibla la câssa avouéc).',
+'logempty' => 'Niona piéce que corrèspond sur lo jornal.',
 'log-title-wildcard' => 'Chèrchiér entre-mié los titros que començont per cél tèxto',
 'showhideselectedlogentries' => 'Montrar / cachiér les entrâs de jornal chouèsies',
 
@@ -2432,7 +2439,7 @@ Veriéd-vos vers lo contributor :
 mèl. : $PAGEEDITOR_EMAIL
 vouiqui : $PAGEEDITOR_WIKI
 
-Y arat gins d’ôtra notificacion en câs de changements a vegnir, a muens que vos visitâd cela pâge. Vos pouede asse-ben tornar inicialisar los segnalements de notificacion por totes les pâges de voutra lista de survelyence.
+Y arat gins d’ôtra notificacion en câs de changements a vegnir, du muens que vos visiteyâd cela pâge. Vos pouede asse-ben rebetar a zérô los segnalements de notificacion por totes les pâges de voutra lista de siuvu.
 
 Voutron sistèmo de notificacion de {{SITENAME}}
 
@@ -2440,10 +2447,10 @@ Voutron sistèmo de notificacion de {{SITENAME}}
 Por changiér la configuracion de notificacion per mèssageria èlèctronica, visitâd
 {{canonicalurl:{{#special:Preferences}}}}
 
-Por changiér la configuracion de voutra lista de survelyence, visitâd
+Por changiér la configuracion de voutra lista de siuvu, visitâd
 {{canonicalurl:{{#special:EditWatchlist}}}}
 
-Por suprimar la pâge de voutra lista de survelyence, visitâd
+Por suprimar la pâge de voutra lista de siuvu, visitâd
 $UNWATCHURL
 
 Avis et assistance de ples :
@@ -2454,21 +2461,21 @@ Avis et assistance de ples :
 # Delete
 'deletepage' => 'Suprimar la pâge',
 'confirm' => 'Confirmar',
-'excontent' => 'contegnéve « $1 »',
-'excontentauthor' => 'contegnéve « $1 » (et son solèt contributor ére « [[Special:Contributions/$2|$2]] »)',
-'exbeforeblank' => 'contegnéve devant blanchiment « $1 »',
+'excontent' => 'lo contegnu ére : « $1 »',
+'excontentauthor' => 'lo contegnu ére : « $1 » (et lo solèt contributor ére « [[Special:Contributions/$2|$2]] »)',
+'exbeforeblank' => 'lo contegnu devant blanchiment ére : « $1 »',
 'exblank' => 'la pâge ére voueda',
 'delete-confirm' => 'Suprimar « $1 »',
 'delete-legend' => 'Suprimar',
-'historywarning' => "'''Atencion :''' la pâge que vos éte prèst a suprimar at un historico que contint a pou prés $1 {{PLURAL:$1|vèrsion|vèrsions}} :",
-'confirmdeletetext' => 'Vos éte prèst a suprimar una pâge ou ben un fichiér et pués tot son historico.
-Volyéd confirmar qu’o est franc cen que vos voléd fâre, que vos en compregnéd les consèquences et pués que vos féte cen en acôrd avouéc les [[{{MediaWiki:Policy-url}}|règlles de dedens]].',
+'historywarning' => "'''Atencion :''' la pâge que vos éte prèst a suprimar at un historico avouéc a pou prés $1 vèrsion{{PLURAL:$1||s}} :",
+'confirmdeletetext' => 'Vos éte prèst a suprimar na pâge et pués tot lo sin historico.
+Se vos plét, confirmâd qu’o est franc cen que vos voléd fâre, que vos en compregnéd les consèquences et pués que vos o féte en acôrd avouéc les [[{{MediaWiki:Policy-url}}|règlles de dedens]].',
 'actioncomplete' => 'Accion fêta',
-'actionfailed' => 'L’accion at pas reussia',
-'deletedtext' => '« $1 » at étâ suprimâ.
-Vêde lo $2 por una lista de les novèles suprèssions.',
+'actionfailed' => 'L’accion at pas reussi',
+'deletedtext' => '« $1 » est étâye suprimâye.
+Vêde lo $2 por na lista de les novèles suprèssions.',
 'dellogpage' => 'Jornal de les suprèssions',
-'dellogpagetext' => 'Vê-que la lista de les suprèssions les ples novèles.',
+'dellogpagetext' => 'Vê-que na lista de les suprèssions les ples novèles.',
 'deletionlog' => 'jornal de les suprèssions',
 'reverted' => 'Vèrsion devant rètablia',
 'deletecomment' => 'Rêson :',
@@ -2479,10 +2486,10 @@ Vêde lo $2 por una lista de les novèles suprèssions.',
 ** Violacion du drêt d’ôtor
 ** Vandalismo',
 'delete-edit-reasonlist' => 'Changiér les rêsons de suprèssion',
-'delete-toobig' => 'Ceta pâge at un historico important, dèpassent $1 vèrsion{{PLURAL:$1||s}}.
-La suprèssion de tâles pâges at étâ limitâ por èvitar des pèrturbacions emprèvues de {{SITENAME}}.',
-'delete-warning-toobig' => 'Ceta pâge at un historico important, dèpassent $1 vèrsion{{PLURAL:$1||s}}.
-La suprimar pôt troblar lo fonccionement de la bâsa de balyês de {{SITENAME}} ;
+'delete-toobig' => 'Ceta pâge at un grôs historico de changements avouéc més de $1 vèrsion{{PLURAL:$1||s}}.
+La suprèssion de pâges d’ense est étâye rètrenta por prèvegnir des pèrturbacions emprèvues de {{SITENAME}}.',
+'delete-warning-toobig' => 'Ceta pâge at un grôs historico de changements avouéc més de $1 vèrsion{{PLURAL:$1||s}}.
+La suprimar pôt troblar la mârche de la bâsa de balyês de {{SITENAME}} ;
 a fâre avouéc prudence.',
 
 # Rollback
@@ -2491,50 +2498,52 @@ a fâre avouéc prudence.',
 'rollbacklink' => 'rèvocar',
 'rollbacklinkcount' => 'rèvocar $1 changement{{PLURAL:$1||s}}',
 'rollbacklinkcount-morethan' => 'rèvocar més de $1 changement{{PLURAL:$1||s}}',
-'rollbackfailed' => 'La rèvocacion at pas reussia',
-'cantrollback' => 'Empossiblo de rèvocar lo changement ;
+'rollbackfailed' => 'La rèvocacion at pas reussi',
+'cantrollback' => 'Y at pas moyen de rèvocar lo changement ;
 lo dèrriér contributor est lo solèt ôtor de ceta pâge.',
-'alreadyrolled' => 'Empossiblo de rèvocar lo dèrriér changement de la pâge « [[:$1]] » fêt per [[User:$2|$2]] ([[User talk:$2|Discutar]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) ;
-quârqu’un d’ôtro at ja changiê ou ben rèvocâ la pâge.
+'alreadyrolled' => 'Y at pas moyen de rèvocar lo dèrriér changement de la pâge « [[:$1]] » fêt per [[User:$2|$2]] ([[User talk:$2|discutar]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) ;
+un ôtro at ja changiê ou ben rèvocâ la pâge.
 
-Lo dèrriér changement de la pâge at étâ fêt per [[User:$3|$3]] ([[User talk:$3|Discutar]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).',
+Lo dèrriér changement de la pâge est étâ fêt per [[User:$3|$3]] ([[User talk:$3|discutar]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).',
 'editcomment' => "Lo rèsumâ de changement ére : « ''$1'' ».",
-'revertpage' => 'Rèvocacion des changements a [[Special:Contributions/$2|$2]] ([[User talk:$2|Discutar]]) de vers la dèrriére vèrsion a [[User:$1|$1]]',
-'revertpage-nouser' => 'Rèvocacion des changements per (nom d’usanciér suprimâ) a la dèrriére vèrsion per [[User:$1|$1]]',
-'rollback-success' => 'Rèvocacion des changements fêts per $1 ;
-rètablissement de la dèrriére vèrsion per $2.',
+'revertpage' => 'Rèvocacion des changements de [[Special:Contributions/$2|$2]] ([[User talk:$2|discutar]]) de vers la dèrriére vèrsion de [[User:$1|$1]]',
+'revertpage-nouser' => 'Rèvocacion des changements de (nom d’utilisator enlevâ) de vers la dèrriére vèrsion de [[User:$1|$1]]',
+'rollback-success' => 'Rèvocacion des changements de $1 ;
+rèstoracion de la dèrriére vèrsion de $2.',
 
 # Edit tokens
-'sessionfailure-title' => 'Èrror de sèance',
+'sessionfailure-title' => 'Falyita de sèance',
 'sessionfailure' => 'Voutra sèance de branchement semble avêr des problèmos ;
-cela accion at étâ anulâ en prèvencion d’un piratâjo de sèance.
-Volyéd clicar dessus « Devant », rechargiér la pâge de yô que vos vegnéd, et pués tornar èprovar.',
+cel’accion est étâye anulâye en prèvencion d’un piratâjo de sèance.
+Se vos plét, clicâd dessus « Devant », rechargiéd la pâge de yô que vos vegnéd et pués tornâd èprovar.',
 
 # Protect
 'protectlogpage' => 'Jornal de les protèccions',
-'protectlogtext' => 'Vê-que na lista des changements de protèccion de les pâges.
-Vêde la [[Special:ProtectedPages|lista de les pâges protègiêyes]] por la lista de les protèccions que sont ora actives.',
+'protectlogtext' => 'Vê-que na lista des changements de les protèccions de pâges.
+Vêde la [[Special:ProtectedPages|lista de les pâges protègiêes]] por la lista de les protèccions que sont ora actives.',
 'protectedarticle' => 'at protègiê « [[$1]] »',
 'modifiedarticleprotection' => 'at changiê lo nivél de protèccion de « [[$1]] »',
 'unprotectedarticle' => 'at enlevâ la protèccion de « [[$1]] »',
-'movedarticleprotection' => 'at dèplaciê los paramètres de protèccion dês « [[$2]] » vers « [[$1]] »',
-'protect-title' => 'Changiér lo nivél de protèccion por « $1 »',
+'movedarticleprotection' => 'at dèplaciê la configuracion de protèccion dês « [[$2]] » vers « [[$1]] »',
+'protect-title' => 'Changiér lo nivél de protèccion de « $1 »',
 'protect-title-notallowed' => 'Vêre lo nivél de protèccion de « $1 »',
-'prot_1movedto2' => 'at renomâ [[$1]] en [[$2]]',
+'prot_1movedto2' => 'at dèplaciê [[$1]] vers [[$2]]',
 'protect-badnamespace-title' => 'Èspâço de noms pas protèjâblo',
-'protect-badnamespace-text' => 'Les pâges dens ceti èspâço de noms pôvont pas étre protègiês.',
+'protect-badnamespace-text' => 'Les pâges dedens cet’èspâço de noms pôvont pas étre protègiêes.',
+'protect-norestrictiontypes-text' => 'Cela pâge pôt pas étre protègiêe, y at gins de tipo de rèstriccion disponiblo.',
+'protect-norestrictiontypes-title' => 'Pâge pas protèjâbla',
 'protect-legend' => 'Confirmar la protèccion',
 'protectcomment' => 'Rêson :',
 'protectexpiry' => 'Dâta d’èxpiracion :',
-'protect_expiry_invalid' => 'La dâta d’èxpiracion est envalida.',
-'protect_expiry_old' => 'La dâta d’èxpiracion est ja passâ.',
+'protect_expiry_invalid' => 'La dâta d’èxpiracion est pas justa.',
+'protect_expiry_old' => 'La dâta d’èxpiracion est ja passâye.',
 'protect-unchain-permissions' => 'Dèvèrrolyér adés més de chouèx de protèccion',
-'protect-text' => "Vos pouede vêre et changiér lo nivél de protèccion de la pâge '''$1'''.",
-'protect-locked-blocked' => "Vos pouede pas changiér los nivéls de protèccion tant que vos éte blocâ.
+'protect-text' => "Ique vos pouede vêre et changiér lo nivél de protèccion de la pâge '''$1'''.",
+'protect-locked-blocked' => "Vos pouede pas changiér los nivéls de protèccion tant que vos éte blocâ{{GENDER:||ye|(ye)}}.
 Vê-que la configuracion d’ora de la pâge '''$1''' :",
-'protect-locked-dblock' => "Los nivéls de protèccion pôvont pas étre changiês perce que la bâsa de balyês est vèrrolyê.
+'protect-locked-dblock' => "Los nivéls de protèccion pôvont pas étre changiês, la bâsa de balyês est vèrrolyêe.
 Vê-que la configuracion d’ora de la pâge '''$1''' :",
-'protect-locked-access' => "Vos avéd pas los drêts nècèssèros por changiér los nivéls de protèccion de pâges.
+'protect-locked-access' => "Voutron compto at pas los drêts nècèssèros por changiér los nivéls de protèccion de pâges.
 Vê-que la configuracion d’ora de la pâge '''$1''' :",
 'protect-cascadeon' => 'Ora, ceta pâge est protègiê perce qu’el est encllua dens {{PLURAL:$1|ceta pâge|cetes pâges}}, {{PLURAL:$1|qu’at étâ protègiê|qu’ont étâ protègiês}} avouéc lo chouèx « Protèccion en cascâda » activâ.
 Vos pouede changiér lo nivél de protèccion de ceta pâge sen que cen afècte la protèccion en cascâda.',
index 4d0846f..24cbbea 100644 (file)
@@ -527,7 +527,7 @@ Wees sü gödj än täif, bit dü wider ferseechst.',
 'loginlanguagelabel' => 'Spräke: $1',
 'suspicious-userlogout' => 'Dan Oufmäldönjfrååge wörd ferwaigred, deer ja fermouslik foon en defäkte browser unti en cache-proxy sånd wörd.',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => 'Ünbekäänd feeler mä det funktsjuun mail() faan PHP.',
 'user-mail-no-addy' => 'Köö niinj e-mail schake suner e-mail-adres.',
 'user-mail-no-body' => 'Dü wulst en e-mail saner tekst wechsjüür.',
@@ -1053,7 +1053,7 @@ Dü könst det uun't [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}}
 'search-interwiki-default' => '$1 resultoote:',
 'search-interwiki-more' => '(widere)',
 'search-relatedarticle' => 'früne',
-'mwsuggest-disable' => 'forsliike per Ajax deaktiviire',
+'mwsuggest-disable' => "Föörslacher för't sjüken deaktiwiare",
 'searcheverything-enable' => 'Onj ål noomerüme säke',
 'searchrelated' => 'früne',
 'searchall' => 'åle',
@@ -1195,7 +1195,7 @@ Do san jo ual iinstelangen wech.',
 'prefs-displaywatchlist' => "Mögelkhaiden för't uunwisin",
 'prefs-diffs' => 'Ferskeel',
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => 'Detdiar E-Mail-adres schocht gud ütj.',
 'email-address-validity-invalid' => 'Du en echt E-Mail-adres uun.',
 
@@ -1448,7 +1448,7 @@ Det beskriiwang faan't [$2 beskriiwangssidj] woort oner uunwiset.",
 # Special:ListGroupRights
 'listgrouprights-members' => '(lasmoote-list)',
 
-# E-mail user
+# Email user
 'emailuser' => 'E-mail tu dideere brüker',
 
 # Watchlist
index c2ed6cc..85faf16 100644 (file)
@@ -2058,8 +2058,10 @@ No canto de ligar cos homónimos deben apuntar cara á páxina apropiada.<br />
 Unha páxina trátase como páxina de homónimos cando nela se usa un modelo que está ligado desde [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Páxinas cunha propiedade de páxina',
+'pageswithprop-legend' => 'Páxinas cunha propiedade de páxina',
 'pageswithprop-text' => 'Esta páxina lista aquelas páxinas que utilizan unha propiedade de páxina determinada.',
 'pageswithprop-prop' => 'Nome da propiedade:',
+'pageswithprop-submit' => 'Mostrar',
 
 'doubleredirects' => 'Redireccións dobres',
 'doubleredirectstext' => 'Esta lista contén as páxinas que redirixen cara a outras páxinas de redirección.
@@ -4071,7 +4073,7 @@ En caso contrario, pode empregar o formulario sinxelo inferior. O seu comentario
 'duration-centuries' => '$1 {{PLURAL:$1|século|séculos}}',
 'duration-millennia' => '$1 {{PLURAL:$1|milenio|milenios}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Páxinas cunha propiedade de páxina',
-'pageswithprop-submit' => 'Mostrar',
+# Image rotation
+'rotate-comment' => 'Imaxe rotada $1 {{PLURAL:$1|grao|graos}} en sentido horario',
+
 );
index 6f0b4c5..e94c0db 100644 (file)
@@ -961,7 +961,7 @@ Ta duillagyn er [[Special:Watchlist|dty rolley arrey]] ayns '''clou trome'''.",
 'listgrouprights-helppage' => 'Help:Kiartyn y phossan',
 'listgrouprights-members' => '(rolley olteynyn)',
 
-# E-mail user
+# Email user
 'emailuser' => "Cur post-L da'n ymmydeyr shoh",
 'emailfrom' => 'Veih:',
 'emailto' => 'Da:',
@@ -1154,7 +1154,7 @@ Shoh ny reaghaghyn roie da'n duillag '''$1''':",
 ** Removing content from pages
 ** Spamming links to external sites
 ** Inserting nonsense/gibberish into pages
-** Intimidating behaviour/harassment
+** Intimidating behavior/harassment
 ** Abusing multiple accounts
 * Oyr elley
 ** Ennym ymmydeyryn neuchooie
index ebc13bc..5d9db96 100644 (file)
@@ -1053,7 +1053,7 @@ $2
 '''הוא טרם נשמר!'''",
 'sitejspreview' => "'''זכרו שזו רק תצוגה מקדימה של קוד ה־JavaScript הזה.'''
 '''הוא טרם נשמר!'''",
-'userinvalidcssjstitle' => "'''אזהרה''': העיצוב \"\$1\" אינו קיים.
+'userinvalidcssjstitle' => "'''אזהרה:''' העיצוב \"\$1\" אינו קיים.
 דפי .css ו־.js מותאמים אישית משתמשים בכותרת עם אותיות קטנות – למשל, {{ns:user}}:דוגמה/vector.css ולא {{ns:user}}:דוגמה/Vector.css.",
 'updated' => '(מעודכן)',
 'note' => "'''הערה:'''",
@@ -1408,7 +1408,7 @@ $1",
 'showingresults' => "{{PLURAL:$1|מוצגת תוצאה '''אחת'''|מוצגות עד '''$1''' תוצאות}} החל ממספר '''$2''':",
 'showingresultsnum' => "{{PLURAL:$3|מוצגת תוצאה '''אחת'''|מוצגות '''$3''' תוצאות}} החל ממספר '''$2''':",
 'showingresultsheader' => "{{PLURAL:$5|תוצאה '''$1''' מתוך '''$3'''|תוצאות '''$1 - $2''' מתוך '''$3'''}} עבור '''$4'''",
-'nonefound' => "'''הערה''': כברירת מחדל, החיפוש מבוצע במספר מרחבי שם בלבד. באפשרותכם לכתוב '''all:''' לפני מונח החיפוש כדי לחפש בכל הדפים (כולל דפי שיחה, תבניות, ועוד), או לכתוב לפני מונח החיפוש את מרחב השם שאתם מעוניינים בו.",
+'nonefound' => "'''הערה:''' כברירת מחדל, החיפוש מבוצע במספר מרחבי שם בלבד. באפשרותכם לכתוב '''all:''' לפני מונח החיפוש כדי לחפש בכל הדפים (כולל דפי שיחה, תבניות, ועוד), או לכתוב לפני מונח החיפוש את מרחב השם שאתם מעוניינים בו.",
 'search-nonefound' => 'לא נמצאו תוצאות המתאימות לחיפוש.',
 'powersearch' => 'חיפוש מתקדם',
 'powersearch-legend' => 'חיפוש מתקדם',
@@ -2150,8 +2150,10 @@ $1',
 דף נחשב לדף פירושונים אם הוא משתמש בתבנית המקושרת מהדף [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'דפים עם מאפיין דף',
-'pageswithprop-text' => 'הדף הזה נותן רשימה של דפים שמשתמשים במאפיין דף מסוים.',
+'pageswithprop-legend' => 'דפים עם מאפיין דף',
+'pageswithprop-text' => 'בדף זה מופיעה רשימת דפים שמשתמשים במאפיין דף מסוים.',
 'pageswithprop-prop' => 'שם המאפיין:',
+'pageswithprop-submit' => 'הצגה',
 
 'doubleredirects' => 'הפניות כפולות',
 'doubleredirectstext' => 'בדף הזה מופיעה רשימת דפי הפניה שמפנים לדפי הפניה אחרים.
@@ -2743,7 +2745,7 @@ $1',
 'unblockiptext' => 'השתמשו בטופס שלהלן כדי להחזיר את הרשאות הכתיבה למשתמש או כתובת IP חסומים.',
 'ipusubmit' => 'שחרור חסימה',
 'unblocked' => 'המשתמש [[User:$1|$1]] שוחרר מחסימתו.',
-'unblocked-range' => '$1 שוחרר מחסימתו',
+'unblocked-range' => '$1 שוחרר מחסימתו.',
 'unblocked-id' => 'חסימה מספר $1 שוחררה.',
 'blocklist' => 'משתמשים חסומים',
 'ipblocklist' => 'משתמשים חסומים',
@@ -3820,7 +3822,7 @@ $5
 'scarytranscludetoolong' => '[כתובת ה־URL ארוכה מדי]',
 
 # Delete conflict
-'deletedwhileediting' => "'''אזהרה''': דף זה נמחק לאחר שהתחלתם לערוך!",
+'deletedwhileediting' => "'''אזהרה:''' דף זה נמחק לאחר שהתחלתם לערוך!",
 'confirmrecreate' => "הדף נמחק על ידי המשתמש [[User:$1|$1]] ([[User talk:$1|שיחה]]) לאחר שהתחלתם לערוך אותו, מסיבה זו:
 :'''$2'''
 אנא אשרו שאתם אכן רוצים ליצור מחדש את הדף.",
@@ -4218,7 +4220,7 @@ $5
 'duration-centuries' => '{{PLURAL:$1|מאה שנה|מאתיים שנה|$1 מאות שנים}}',
 'duration-millennia' => '{{PLURAL:$1|אלף שנה|אלפיים שנה|$1 אלפי שנים}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'דפים עם מאפיין דף',
-'pageswithprop-submit' => 'שליחה',
+# Image rotation
+'rotate-comment' => 'התמונה סובבה {{PLURAL:$1|במעלה אחת|ב֫־$1 מעלות}} בכיוון השעון',
+
 );
index 56dfd2c..88215c4 100644 (file)
@@ -811,7 +811,7 @@ Molimo Vas da pričekate prije nego što pokušate ponovo.',
 'loginlanguagelabel' => 'Jezik: $1',
 'suspicious-userlogout' => 'Vaš zahtjev za odjavu je odbijen jer to izgleda kao da je poslan preko pokvarenog preglednika ili keširanog posrednika (proxyja).',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => 'Nepoznata pogreška u PHP-mail() funkciji',
 'user-mail-no-addy' => 'Pokušaj slanja e-maila bez e-mail adrese.',
 
@@ -1478,9 +1478,9 @@ Ne smije biti duži od $1 {{PLURAL:$1|znaka|znaka|znakova}}.',
 'prefs-displaywatchlist' => 'Opcije prikaza',
 'prefs-diffs' => 'razl',
 
-# User preference: e-mail validation using jQuery
-'email-address-validity-valid' => 'E-mail adresa se pokazuje ispravnom',
-'email-address-validity-invalid' => 'Unesite valjanu e-mail adresu',
+# User preference: email validation using jQuery
+'email-address-validity-valid' => 'Adresa e-pošte pokazuje se ispravnom',
+'email-address-validity-invalid' => 'Unesite valjanu adresu e-pošte',
 
 # User rights
 'userrights' => 'Upravljanje suradničkim pravima',
@@ -2241,7 +2241,7 @@ Dodatne informacije o pojedinim pravim se mogu pronaći [[{{MediaWiki:Listgroupr
 'listgrouprights-addgroup-self-all' => 'Dodaj sve skupine vlastitom računu',
 'listgrouprights-removegroup-self-all' => 'Uklonite sve skupine iz vlastitog računa',
 
-# E-mail user
+# Email user
 'mailnologin' => 'Nema adrese pošiljaoca',
 'mailnologintext' => 'Morate biti [[Special:UserLogin|prijavljeni]]
 i imati valjanu adresu e-pošte u svojim [[Special:Preferences|postavkama]]
@@ -2663,7 +2663,7 @@ Pogledajte [[Special:BlockList|popis blokiranja]] za pregled blokiranih suradnik
 'anononlyblock' => 'samo IP adrese',
 'noautoblockblock' => 'blokiranje samoga sebe je onemogućeno',
 'createaccountblock' => 'blokirano stvaranje suradničkog računa',
-'emailblock' => 'e-mail je blokiran',
+'emailblock' => 'e-pošta je blokirana',
 'blocklist-nousertalk' => 'bez uređivanja vlastite stranice za razgovor',
 'ipblocklist-empty' => 'Popis blokiranja je prazan.',
 'ipblocklist-no-results' => 'Tražena IP adresa ili suradničko ime nije blokirano.',
@@ -2671,7 +2671,7 @@ Pogledajte [[Special:BlockList|popis blokiranja]] za pregled blokiranih suradnik
 'unblocklink' => 'deblokiraj',
 'change-blocklink' => 'promijeni blokiranje',
 'contribslink' => 'doprinosi',
-'emaillink' => 'pošalji e-mail',
+'emaillink' => 'pošalji e-poruku',
 'autoblocker' => 'Automatski ste blokirani jer je Vašu IP adresu nedavno koristio "[[User:$1|$1]]" koji je blokiran zbog: "$2".',
 'blocklogpage' => 'Evidencija blokiranja',
 'blocklog-showlog' => 'Ovaj suradnik je ranije blokiran.
@@ -3605,7 +3605,7 @@ Svaka sljedeća poveznica u istom retku je izuzetak, npr. kod stranica gdje se s
 'monthsall' => 'sve',
 'limitall' => 'sve',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'Potvrda e-mail adrese',
 'confirmemail_noemail' => 'Niste unijeli važeću e-mail adresu u Vaše [[Special:Preferences|suradničke postavke]].',
 'confirmemail_text' => 'U ovom wikiju morate prije korištenja e-mail naredbi potvrditi svoju e-mail adresu. Kliknite na gumb ispod kako biste poslali poruku s potvrdom na Vašu adresu. U poruci će biti poveznica koju morate otvoriti u svom web pregledniku i time potvrditi svoju e-mail adresu.',
index a91c38e..ae8984e 100644 (file)
@@ -1895,8 +1895,10 @@ Snano chceš wopisanje na jeje [$2 stronje datajoweho wopisanja] wobdźěłać.'
 'disambiguations-text' => "Slědowace strony wobsahuja znajmjeńša jedyn wotkaz k stronje '''rozjasnjenja wjacezmyslnosće'''. Měli město toho na poprawnu stronu wotkazać.<br />Maja stronu za stronu rozjasnjenja wjacezmyslnosće, jeli předłohu wužiwa, na kotruž so wot [[MediaWiki:Disambiguationspage]] wotkazuje.",
 
 'pageswithprop' => 'Strony z kajkosću strony',
+'pageswithprop-legend' => 'Strony z kajkosću strony',
 'pageswithprop-text' => 'Tuta strona nalistuje strony, kotrež wěstu kajkosć strony wužiwaja.',
 'pageswithprop-prop' => 'Mjeno kajkosće:',
+'pageswithprop-submit' => 'Wotpósłać',
 
 'doubleredirects' => 'Dwójne daleposrědkowanja',
 'doubleredirectstext' => 'Tuta strona nalistuje strony, kotrež k druhim daleposrědkowanskim stronam dale posrědkuja.
@@ -3826,7 +3828,7 @@ Hewak móžeš slědowacy jednory formular wužiwać. Twój komentar přida so s
 'duration-centuries' => '$1 {{PLURAL:$1|lětstotk|lětstotkaj|lětstotki|lětstotkow}}',
 'duration-millennia' => '$1 {{PLURAL:$1|lěttysac|lěttysacaj|lěttysacy|lěttysacow}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Strony z kajkosću strony',
-'pageswithprop-submit' => 'Wotpósłać',
+# Image rotation
+'rotate-comment' => 'Wobraz wo $1 {{PLURAL:$1|stopjeń|stopnjej|stopnje|stopnjow}} w směrje časnika wjerćany',
+
 );
index a9d9597..2cd7074 100644 (file)
@@ -3094,6 +3094,7 @@ Ez valószínűleg egy olyan link miatt van, ami egy feketelistán lévő oldalr
 'spambot_username' => 'MediaWiki spam kitakarítása',
 'spam_reverting' => 'Visszatérés a $1 lapra mutató hivatkozásokat nem tartalmazó utolsó változathoz',
 'spam_blanking' => 'Az összes változat tartalmazott a $1 lapra mutató hivatkozásokat, kiürítés',
+'spam_deleting' => 'Minden változat tartalmazott $1-re mutató hivatkozást, törlöm',
 
 # Info page
 'pageinfo-title' => 'Információk a(z) „$1” lapról',
@@ -3722,6 +3723,7 @@ Ez a megerősítő e-mail $4-ig érvényes.',
 # Scary transclusion
 'scarytranscludedisabled' => '[Wikiközi beillesztés le van tiltva]',
 'scarytranscludefailed' => '[$1 sablon letöltése sikertelen]',
+'scarytranscludefailed-httpstatus' => ' [Nem sikerült betölteni a(z) $1 sablont: HTTP $2]',
 'scarytranscludetoolong' => '[Az URL túl hosszú]',
 
 # Delete conflict
@@ -3977,8 +3979,8 @@ A képek teljes méretben jelennek meg, más fájltípusok közvetlenül a hozz
 'logentry-newusers-create2' => '$1 létrehozta $3 felhasználói fiókját',
 'logentry-newusers-byemail' => 'Szerkesztői lap $3 néven létrehozva $1 által, jelszó kiküldve emailben.',
 'logentry-newusers-autocreate' => '$1 fiók automatikusan létrehozva',
-'logentry-rights-rights' => '$1 megváltoztatta $3 csoport tagságát erről: $4 erre: $5',
-'logentry-rights-rights-legacy' => '$1 megváltoztatta $3 csoport tagságát',
+'logentry-rights-rights' => '$1 megváltoztatta $3 csoporttagságát erről: $4 erre: $5',
+'logentry-rights-rights-legacy' => '$1 megváltoztatta $3 csoporttagságát',
 'logentry-rights-autopromote' => '$1 automatikusan előléptetve erről: $4 erre: $5',
 'rightsnone' => '(semmi)',
 
@@ -4054,4 +4056,7 @@ A képek teljes méretben jelennek meg, más fájltípusok közvetlenül a hozz
 'duration-centuries' => '{{PLURAL:$1|egy|$1}} évszázad',
 'duration-millennia' => '{{PLURAL:$1|egy|$1}} évezred',
 
+# Image rotation
+'rotate-comment' => 'Elforgattam a képet $1 fokkal, az óramutató járásával megegyező irányban',
+
 );
index 4d5fcfc..11cb3fd 100644 (file)
@@ -425,7 +425,7 @@ $messages = array(
 # Vector skin
 'vector-action-addsection' => 'Ավելացնել քննարկում',
 'vector-action-delete' => 'Ջնջել',
-'vector-action-move' => 'Õ\8eÕ¥Ö\80Õ¡Õ¶Õ¾Õ¡Õ¶Õ¥Õ¬',
+'vector-action-move' => 'Õ\8fÕ¥Õ²Õ¡Ö\83Õ¸Õ­Õ¥Õ¬ Õ¡ÕµÕ½ Õ§Õ»Õ¨',
 'vector-action-protect' => 'Պաշտպանել',
 'vector-action-undelete' => 'Վերականգնել',
 'vector-action-unprotect' => 'Հանել պաշտպանումից',
@@ -502,7 +502,7 @@ $1',
 'pool-errorunknown' => 'Անհայտ սխալ',
 
 # All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations).
-'aboutsite' => '{{grammar:genitive|{{SITENAME}}}}ի մասին',
+'aboutsite' => '{{grammar:genitive|{{SITENAME}}}} մասին',
 'aboutpage' => 'Project:Էությունը',
 'copyright' => 'Կայքի բովանդակությունը գտնվում է «$1» արտոնագրի տակ։',
 'copyrightpage' => '{{ns:project}}:Հեղինակային իրավունքներ',
@@ -672,7 +672,7 @@ $2',
 'welcomecreation-msg' => 'Ձեր հաշիվն ստեղծված է։
 Չմոռանաք փոփոխել ձեր [[Special:Preferences|նախընտրությունները]]։',
 'yourname' => 'Մասնակցի անուն՝',
-'yourpassword' => 'Գաղտնաբառ.',
+'yourpassword' => 'Գաղտնաբառ՝',
 'yourpasswordagain' => 'Կրկնեք գաղտնաբառը',
 'remembermypassword' => 'Հիշել իմ մուտքագրված տվյալները այս համակարգչում ($1 {{PLURAL:$1|օրից|օրից}} ոչ ավել ժամկետով)',
 'yourdomainname' => 'Ձեր դոմենը՝',
@@ -1007,6 +1007,7 @@ $2',
 
 # Content models
 'content-model-wikitext' => 'վիքիտեքստ',
+'content-model-javascript' => 'ՋավաՍկրիպտ',
 
 # "Undo" feature
 'undo-success' => 'Խմբագրումը կարող է հետ շրջվել։ Ստուգեք տարբերակների համեմատությունը ստորև, որպեսզի համոզվեք, որ դա է ձեզ հետաքրքրող փոփոխությունը և մատնահարեք «Հիշել էջը»՝ գործողությունն ավարտելու համար։',
@@ -1261,7 +1262,7 @@ $3 մասնակիցը տվել է հետևյալ պատճառը. ''$2''",
 'prefs-emailconfirm-label' => 'Էլ-փոստի վավերացում․',
 'prefs-textboxsize' => 'Խմբագրման պատուհանի չափը',
 'youremail' => 'Էլեկտրոնային փոստ.',
-'username' => 'Մասնակցի անուն.',
+'username' => '{{GENDER:$1|Մասնակցի անուն}}՝',
 'uid' => 'Մասնակցի իդենտիֆիկատոր.',
 'prefs-memberingroups' => 'Անդամակցության {{PLURAL:$1|խումբ|խմբեր}}.',
 'prefs-registration' => 'Գրանցման ամսաթիվը․',
@@ -1622,6 +1623,8 @@ $3 մասնակիցը տվել է հետևյալ պատճառը. ''$2''",
 Փոխարենը նրանք, հավանաբար, պետք է հղեն համապատասխան թեմային։<br />
 Էջը համարվում է երկիմաստության փարատման էջ, եթե այն պարունակում է [[MediaWiki:Disambiguationspage]] էջում ընդգրկված կաղապարներից որևէ մեկը։',
 
+'pageswithprop-submit' => 'Անցնել',
+
 'doubleredirects' => 'Կրկնակի վերահղումներ',
 'doubleredirectstext' => 'Այս էջում բերված են վերահղման էջերին վերահղող էջերը։ Յուրաքանչյուր տող պարունակում է հղումներ դեպի առաջին և երկրորդ վերահղումները, ինչպես նաև երկրորդ վերահղման նպատակային էջի առաջին տողը, որում սովորաբար նշված է էջի անվանումը, որին պետք է հղի նաև առաջին վերահղումը։',
 'double-redirect-fixed-move' => '«[[$1]]» էջը վերանվանված է և այժմ վերահղում է «[[$2]]» էջին։',
@@ -1644,7 +1647,7 @@ $3 մասնակիցը տվել է հետևյալ պատճառը. ''$2''",
 'ncategories' => '$1 {{PLURAL:$1|կատեգորիա|կատեգորիաներ}}',
 'ninterwikis' => '$1 {{PLURAL:$1|ինտերվիքի|ինտերվիքիներ}}',
 'nlinks' => '$1 {{PLURAL:$1|հղում|հղումներ}}',
-'nmembers' => '$1 {{PLURAL:$1|անդամ|անդամ}}',
+'nmembers' => '$1 {{PLURAL:$1|անդամ|անդամներ}}',
 'nrevisions' => '$1 {{PLURAL:$1|տարբերակ|տարբերակներ}}',
 'nviews' => '$1 {{PLURAL:$1|դիտում|դիտումներ}}',
 'nimagelinks' => 'օգտագործվում է $1 {{PLURAL:$1|էջ|էջեր}}',
@@ -1958,9 +1961,9 @@ $NEWPAGE
 
 # Restrictions (nouns)
 'restriction-edit' => 'Խմբագրում',
-'restriction-move' => 'Õ\8fÕ¥Õ²Õ¡Ö\83Õ¸Õ­Õ¸Ö\82Õ´',
+'restriction-move' => 'Õ\8fÕ¥Õ²Õ¡Ö\83Õ¸Õ­Õ¥Õ¬',
 'restriction-create' => 'Ստեղծում',
-'restriction-upload' => 'Ô²Õ¥Õ¼Õ¶Õ¸Ö\82Õ´',
+'restriction-upload' => 'Ô²Õ¥Õ¼Õ¶Õ¥Õ¬',
 
 # Restriction levels
 'restriction-level-sysop' => 'լրիվ պաշտպանված',
@@ -2324,13 +2327,13 @@ Please visit [//www.mediawiki.org/wiki/Localisation MediaWiki Localisation] and
 'tooltip-ca-protect' => 'Պաշտպանել այս էջը',
 'tooltip-ca-delete' => 'Ջնջել այս էջը',
 'tooltip-ca-undelete' => 'Վերականգնել այս էջի խմբագրումները՝ կատարված ջնջումից առաջ',
-'tooltip-ca-move' => 'Õ\8eÕ¥Ö\80Õ¡Õ¶Õ¾Õ¡Õ¶Õ¥Õ¬ էջը',
+'tooltip-ca-move' => 'Õ\8fÕ¥Õ²Õ¡Ö\83Õ¸Õ­Õ¥Õ¬ Õ¡ÕµÕ½ էջը',
 'tooltip-ca-watch' => 'Ավելացնել այս էջը ձեր հսկողության ցանկին',
 'tooltip-ca-unwatch' => 'Հանել այս էջը ձեր հսկողության ցանկից',
 'tooltip-search' => 'Որոնել {{SITENAME}} կայքում',
 'tooltip-search-go' => 'Անցնել այս ճշգրիտ անվանումով էջին',
 'tooltip-search-fulltext' => 'Գտնել այս տեքստով էջերը',
-'tooltip-p-logo' => 'Ô³Õ¬Õ­Õ¡Õ¾Õ¸Ö\80 Õ§Õ»',
+'tooltip-p-logo' => 'Ô±ÕµÖ\81Õ¥Õ¬Õ¥Ö\84 Ô³Õ¬Õ­Õ¡Õ¾Õ¸Ö\80 Ô·Õ»Õ¨',
 'tooltip-n-mainpage' => 'Այցելեք Գլխավոր Էջը',
 'tooltip-n-mainpage-description' => 'Անցնել գլխավոր էջ',
 'tooltip-n-portal' => 'Նախագծի մասին, որտեղ գտնել ինչը, ինչով կարող եք օգնել',
@@ -2444,6 +2447,8 @@ Please visit [//www.mediawiki.org/wiki/Localisation MediaWiki Localisation] and
 'skinname-myskin' => 'ԻմՏեսք',
 'skinname-chick' => 'Ծիտ',
 'skinname-simple' => 'Պարզ',
+'skinname-modern' => 'Մոդերն',
+'skinname-vector' => 'Սովորական',
 
 # Patrolling
 'markaspatrolleddiff' => 'Նշել որպես ստուգված',
@@ -2480,6 +2485,7 @@ $1',
 'mediawarning' => "'''Զգուշացում'''. այս նիշքի տեսակը կարող է պարունակել վնասակար ծրագրային կոդ։ Այն կիրարկելը կարող է վտանգել ձեր համակարգը։",
 'imagemaxsize' => 'Պատկերի էջում պատկերի չափի սահմանափակում.',
 'thumbsize' => 'Պատկերների փոքրացված չափ.',
+'widthheight' => '$1 × $2',
 'widthheightpage' => '$1 × $2, $3 էջեր',
 'file-info' => 'նիշքի չափ՝ $1, MIME-տեսակ՝ $2',
 'file-info-size' => '$1 × $2 փիքսել, նիշքի չափը՝ $3, MIME-տեսակը՝ $4',
@@ -2547,6 +2553,8 @@ $1',
 'exif-componentsconfiguration-0' => 'գոյություն չունի',
 
 'exif-urgency-normal' => 'Նորմալ ($1)',
+'exif-urgency-low' => 'Թույլ ($1)',
+'exif-urgency-high' => 'Ուժեղ ($1)',
 
 # External editor support
 'edit-externally' => 'Խմբագրել այս նիշքը արտաքին խմբագրիչով',
index 8426896..2c71229 100644 (file)
@@ -166,7 +166,7 @@ $messages = array(
 'tog-previewonfirst' => 'Monstrar previsualisation al prime modification',
 'tog-nocache' => "Disactivar le ''cache'' de paginas in le navigator",
 'tog-enotifwatchlistpages' => 'Notificar me per e-mail quando un pagina o file in mi observatorio es modificate',
-'tog-enotifusertalkpages' => 'Notificar me via e-mail quando mi pagina de discussion es modificate',
+'tog-enotifusertalkpages' => 'Notificar me per e-mail quando mi pagina de discussion es modificate',
 'tog-enotifminoredits' => 'Notificar me etiam de modificationes minor de paginas e files',
 'tog-enotifrevealaddr' => 'Revelar mi adresse de e-mail in messages de notification',
 'tog-shownumberswatching' => 'Monstrar le numero de usatores que observa le pagina',
@@ -628,16 +628,16 @@ e continuar a usar le contrasigno original.',
 'passwordsent' => 'Un nove contrasigno ha essite inviate al adresse de e-mail registrate pro "$1".
 Per favor aperi session de novo post reciper lo.',
 'blocked-mailpassword' => 'Tu adresse IP es blocate de facer modificationes, e pro impedir le abuso, le uso del function pro recuperar contrasignos es equalmente blocate.',
-'eauthentsent' => 'Un e-mail de confirmation ha essite inviate al adresse de e-mail nominate.
-Ante que alcun altere e-mail se invia al conto, tu debera sequer le instructiones in le e-mail, pro confirmar que le conto es de facto tue.',
+'eauthentsent' => 'Un e-mail de confirmation ha essite inviate al adresse de e-mail specificate.
+Pro poter reciper altere e-mail a iste conto, tu debe sequer le instructiones in iste e-mail pro confirmar que le conto es realmente tue.',
 'throttled-mailpassword' => 'Un rememoration del contrasigno ha jam essite inviate intra le ultime {{PLURAL:$1|hora|$1 horas}}.
 Pro prevenir le abuso, solmente un rememoration de contrasigno essera inviate per {{PLURAL:$1|hora|$1 horas}}.',
 'mailerror' => 'Error de inviar e-mail: $1',
 'acct_creation_throttle_hit' => 'Le visitatores de iste wiki usante tu adresse IP ha create {{PLURAL:$1|1 conto|$1 contos}} durante le ultime die, e isto es le maximo permittite in iste periodo de tempore.
 A causa de isto, le visitatores usante iste adresse IP non pote crear nove contos al momento.',
-'emailauthenticated' => 'Tu adresse de e-mail esseva authentificate le $2 a $3.',
-'emailnotauthenticated' => 'Tu adresse de e-mail non ha essite authentificate ancora.
-Nos non inviara e-mail pro alcun del sequente functiones.',
+'emailauthenticated' => 'Tu adresse de e-mail ha essite confirmate le $2 a $3.',
+'emailnotauthenticated' => 'Tu non ha ancora confirmate tu adresse de e-mail.
+Nulle e-mail essera inviate pro le sequente functiones.',
 'noemailprefs' => 'Es necessari specificar un adresse de e-mail in tu preferentias pro poter executar iste functiones.',
 'emailconfirmlink' => 'Confirmar tu adresse de e-mail',
 'invalidemailaddress' => 'Le adresse de e-mail ha un formato invalide e non pote esser acceptate.
@@ -1270,7 +1270,7 @@ Nota que lor indices del contento de {{SITENAME}} pote esser obsolete.',
 'prefs-misc' => 'Misc',
 'prefs-resetpass' => 'Cambiar contrasigno',
 'prefs-changeemail' => 'Cambiar e-mail',
-'prefs-setemail' => 'Definir un adresse de e-mail',
+'prefs-setemail' => 'Specificar un adresse de e-mail',
 'prefs-email' => 'Optiones de e-mail',
 'prefs-rendering' => 'Apparentia',
 'saveprefs' => 'Confirmar',
@@ -1346,7 +1346,7 @@ Illo debe haber minus de $1 {{PLURAL:$1|character|characteres}}.',
 Si tu opta pro dar lo, isto essera usate pro dar te attribution pro tu contributiones.',
 'prefs-help-email' => 'Le adresse de e-mail es optional, ma es necessari pro le reinitialisation de tu contrasigno, in caso que tu lo oblida.',
 'prefs-help-email-others' => 'Tu pote etiam optar pro permitter que altere personas te contacta via tu pagina de usator o de discussion, sin necessitate de revelar tu identitate.',
-'prefs-help-email-required' => 'Le adresse de e-mail es requirite.',
+'prefs-help-email-required' => 'Un adresse de e-mail es obligatori.',
 'prefs-info' => 'Informationes de base',
 'prefs-i18n' => 'Internationalisation',
 'prefs-signature' => 'Signatura',
@@ -1967,8 +1967,10 @@ Istes debe forsan ligar directemente al articulo sur le thema in question.<br />
 Un pagina se tracta como pagina de disambiguation si illo usa un patrono que es ligate ab [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Paginas con un proprietate de pagina',
+'pageswithprop-legend' => 'Paginas con un proprietate de pagina',
 'pageswithprop-text' => 'Iste pagina lista le paginas que usa un certe proprietate de pagina.',
 'pageswithprop-prop' => 'Nomine del proprietate:',
+'pageswithprop-submit' => 'Va',
 
 'doubleredirects' => 'Redirectiones duple',
 'doubleredirectstext' => 'Iste pagina lista paginas de redirection verso altere paginas de redirection.
@@ -3587,8 +3589,8 @@ Le alteres essera initialmente celate.
 Activa le button infra pro inviar un message de confirmation a tu adresse.
 Le message includera un ligamine continente un codice;
 visita le ligamine in tu navigator pro confirmar que tu adresse de e-mail es valide.',
-'confirmemail_pending' => 'Un codice de confirmation ha ja essite inviate a te;
-si tu ha recentemente create tu conto, es recommendate attender le arrivata de illo durante alcun minutas ante de provar requestar un nove codice.',
+'confirmemail_pending' => 'Un codice de confirmation ha jam essite inviate a te per e-mail;
+si tu ha create tu conto recentemente, per favor attende alcun minutas que le message de confirmation arriva ante de requestar un nove codice.',
 'confirmemail_send' => 'Inviar un codice de confirmation',
 'confirmemail_sent' => 'Message de confirmation inviate.',
 'confirmemail_oncreate' => 'Un codice de confirmation ha essite inviate a tu adresse de e-mail.
@@ -3606,14 +3608,14 @@ Tu pote ora aperir un session e fruer te del wiki.',
 'confirmemail_error' => 'Un problema occurreva durante le salveguarda de tu confirmation.',
 'confirmemail_subject' => 'Confirmation del adresse de e-mail pro {{SITENAME}}',
 'confirmemail_body' => 'Un persona, probabilemente tu, usante le adresse IP $1,
-ha registrate un conto "$2" con iste adresse de e-mail in {{SITENAME}}.
+ha create un conto "$2" con iste adresse de e-mail in {{SITENAME}}.
 
-Pro confirmar que iste conto es de facto tue, e pro activar le functiones
+Pro confirmar que iste conto es realmente tue, e pro activar le functiones
 de e-mail in {{SITENAME}}, visita iste ligamine in tu navigator:
 
 $3
 
-Si tu *non* ha registrate le conto, seque iste ligamine
+Si tu *non* ha create iste conto, seque le sequente ligamine
 pro cancellar le confirmation del adresse de e-mail:
 
 $5
@@ -3622,7 +3624,7 @@ Iste codice de confirmation expirara a $4.',
 'confirmemail_body_changed' => 'Un persona, probabilemente tu, usante le adresse IP $1,
 ha cambiate le adresse de e-mail del conto "$2" a iste adresse in {{SITENAME}}.
 
-Pro confirmar que iste conto es de facto tue, e pro reactivar le functiones
+Pro confirmar que iste conto es realmente tue, e pro reactivar le functiones
 de e-mail in {{SITENAME}}, visita iste ligamine in tu navigator:
 
 $3
@@ -3636,7 +3638,7 @@ Iste codice de confirmation expirara a $4.',
 'confirmemail_body_set' => 'Un persona, probabilemente tu, usante le adresse IP $1,
 ha specificate que iste adresse de e-mail pertine al conto "$2" in {{SITENAME}}.
 
-Pro confirmar que iste conto es de facto tue, e pro reactivar le functiones
+Pro confirmar que iste conto es realmente tue, e pro activar le functiones
 de e-mail in {{SITENAME}}, visita iste ligamine in tu navigator:
 
 $3
@@ -3988,7 +3990,7 @@ Si non, tu pote usar le formulario facile hic infra. Tu commento essera addite a
 'duration-centuries' => '$1 {{PLURAL:$1|seculo|seculos}}',
 'duration-millennia' => '$1 {{PLURAL:$1|millennio|millennios}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Paginas con un proprietate de pagina',
-'pageswithprop-submit' => 'Va',
+# Image rotation
+'rotate-comment' => 'Imagine rotate de $1 {{PLURAL:$1|grado|grados}} in senso horologic',
+
 );
index d03eb29..b8f27d7 100644 (file)
@@ -2113,6 +2113,12 @@ Cek dahulu pranala lain ke templat tersebut sebelum menghapusnya.',
 Halaman-halaman tersebut seharusnya berpaut ke topik-topik yang sesuai.<br />
 Suatu halaman dianggap sebagai halaman disambiguasi apabila halaman tersebut menggunakan templat yang terhubung ke [[MediaWiki:Disambiguationspage]].",
 
+'pageswithprop' => 'Halaman dengan halaman properti',
+'pageswithprop-legend' => 'Halaman dengan halaman properti',
+'pageswithprop-text' => 'Halaman ini berisi daftar halaman yang menggunakan properti halaman tertentu.',
+'pageswithprop-prop' => 'Nama properti:',
+'pageswithprop-submit' => 'Pergi',
+
 'doubleredirects' => 'Pengalihan ganda',
 'doubleredirectstext' => 'Halaman ini memuat daftar halaman yang dialihkan ke halaman pengalihan yang lain.
 Setiap baris memuat pranala ke pengalihan pertama dan pengalihan kedua serta target dari pengalihan kedua yang umumnya adalah halaman yang "sebenarnya". Halaman peralihan pertama seharusnya dialihkan ke halaman yang bukan merupakan halaman peralihan.
@@ -4239,4 +4245,7 @@ Jika tidak, Anda dapat menggunakan formulir mudah di bawah ini. Komentar Anda ak
 'duration-centuries' => '{{PLURAL:$1||}}$1 abad',
 'duration-millennia' => '{{PLURAL:$1||}}$1 milenium',
 
+# Image rotation
+'rotate-comment' => 'Gambar diputar $1 {{PLURAL:$1|derajat}} searah jarum jam',
+
 );
index 125f2c6..553bf8c 100644 (file)
@@ -1851,6 +1851,12 @@ Laglagipem ti agkita kadagiti sabsabali a panilpo ti plantilia sakbay nga ikkate
 Dagitoy ket embes a nasken a maisilpoda kadagiti maitutop a panid.<br />
 Ti panid ket matrato a kas panangilawlawag a panid no agusar ti plantilia a nakasilpo manipud idiay [[MediaWiki:Disambiguationspage]].",
 
+'pageswithprop' => 'Pampanid nga adda maysa a tagikua ti panid',
+'pageswithprop-legend' => 'Pampanid nga adda maysa a tagikua ti panid',
+'pageswithprop-text' => 'Daytoy a panid ket ilistana ti pampanid nga agus-usar ti naisangayan a tagikua ti panid.',
+'pageswithprop-prop' => 'Nagan ti tagikua:',
+'pageswithprop-submit' => 'Inkan',
+
 'doubleredirects' => 'Dagiti namindua a naibaw-ing',
 'doubleredirectstext' => 'Daytoy a panid ket ilistana dagiti panid nga agbaw-ing kadagiti sabsabali a baw-ing a pampanid.
 Iti tunggal maysa nga aray ket adda nagyanna kadagiti panilpo iti umuna ken maikadua a baw-ing, ken iti puntaan iti maikadua a baw-ing, nga isu ti "pudno" a puntaan ti panid, nga ti umuna a baw-ing ket isu ti ipatudona.
@@ -3819,4 +3825,7 @@ Nupay kasta, mau-sarmo ti nakabuklan dita baba. Ti komentario nga itedmo ket mai
 'duration-centuries' => '$1 {{PLURAL:$1|siglo|sig-siglo}}',
 'duration-millennia' => '$1 {{PLURAL:$1|milenio|mil-milenio}}',
 
+# Image rotation
+'rotate-comment' => 'Ti ladawan ket napusipos babaen ti $1 {{PLURAL:$1|a degrado|a degdegrado}} nga agpakanawan',
+
 );
index b10d7d7..8b883bd 100644 (file)
@@ -2025,8 +2025,10 @@ Esse potrebbero dover puntare a una pagina più appropriata.<br />
 Vengono considerate pagine di disambiguazione tutte quelle che contengono i template elencati in [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Pagine con una pagina di proprietà',
+'pageswithprop-legend' => 'Pagine con una pagina di proprietà',
 'pageswithprop-text' => 'Questa pagina elenca le pagine che utilizzano una particolare pagina di proprietà.',
 'pageswithprop-prop' => 'Nome proprietà:',
+'pageswithprop-submit' => 'Vai',
 
 'doubleredirects' => 'Redirect doppi',
 'doubleredirectstext' => 'In questa pagina sono elencate pagine che reindirizzano ad altre pagine di redirect.
@@ -4006,7 +4008,7 @@ Le immagini vengono mostrate alla massima risoluzione disponibile, per gli altri
 'duration-centuries' => '$1 {{PLURAL:$1|secolo|secoli}}',
 'duration-millennia' => '$1 {{PLURAL:$1|millennio|millenni}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Pagine con una pagina di proprietà',
-'pageswithprop-submit' => 'Vai',
+# Image rotation
+'rotate-comment' => 'Immagine ruotata di $1 {{PLURAL:$1|grado|gradi}} in senso orario',
+
 );
index 9774ff6..3b89696 100644 (file)
@@ -849,8 +849,8 @@ Cookieを有効にしていることを確認して、このページを再読
 このメッセージを無視して、引き続き以前のパスワードを使用し続けることができます。',
 'noemail' => '利用者「$1」のメールアドレスは登録されていません。',
 'noemailcreate' => '有効なメールアドレスを入力する必要があります',
-'passwordsent' => '新しいパスワードを「$1」に登録されたメールアドレスに送信しました。
\83¡ã\83¼ã\83«ã\82\92å\8f\97ã\81\91å\8f\96ã\81£たら、再度ログインしてください。',
+'passwordsent' => '新しいパスワードを「$1」に登録されたメールアドレスにお送りしました。
\83¡ã\83¼ã\83«ã\81\8cå±\8aã\81\84たら、再度ログインしてください。',
 'blocked-mailpassword' => 'ご使用中のIPアドレスからの編集はブロックされており、不正利用防止のため、パスワードの再発行機能は使用できません。',
 'eauthentsent' => '指定したメールアドレスに、アドレス確認のためのメールをお送りしました。
 メールに記載された手順に従って、このアカウントの所有者であることの確認が取れると、このアカウント宛のメールを受け取れるようになります。',
@@ -950,7 +950,7 @@ $2
 
 # Special:ChangeEmail
 'changeemail' => 'メールアドレスの変更',
-'changeemail-header' => 'ã\82¢ã\82«ã\82¦ã\83³ã\83\88ã\81®ã\83¡ã\83¼ã\83«ã\82¢ã\83\89ã\83¬ã\82¹ã\82\92変更',
+'changeemail-header' => 'ã\82¢ã\82«ã\82¦ã\83³ã\83\88ã\81®ã\83¡ã\83¼ã\83«ã\82¢ã\83\89ã\83¬ã\82¹ã\81®変更',
 'changeemail-text' => 'このフォームではメールアドレスを変更できます。この変更を確認するためにパスワードを入力する必要があります。',
 'changeemail-no-info' => 'このページに直接アクセスするためにはログインしている必要があります。',
 'changeemail-oldemail' => '現在のメールアドレス:',
@@ -1039,7 +1039,7 @@ $1または他の[[{{MediaWiki:Grouppage-sysop}}|管理者]]にこのブロッ
 'loginreqtitle' => 'ログインが必要',
 'loginreqlink' => 'ログイン',
 'loginreqpagetext' => '他のページを閲覧するには$1する必要があります。',
-'accmailtitle' => 'パスワードをお送りしました',
+'accmailtitle' => 'パスワードをお送りしました',
 'accmailtext' => "[[User talk:$1|$1]]のために無作為に生成したパスワードを、$2に送信しました。
 
 この新アカウントのパスワードは、ログインした際に''[[Special:ChangePassword|パスワード変更]]''ページで変更できます。",
@@ -1047,10 +1047,10 @@ $1または他の[[{{MediaWiki:Grouppage-sysop}}|管理者]]にこのブロッ
 'newarticletext' => "まだ存在しないページへのリンクをたどりました。
 このページを新規作成するには、ページの内容を以下のボックスに記入してください (詳しくは[[{{MediaWiki:Helppage}}|ヘルプページ]]を参照してください)。
 誤ってこのページにたどり着いた場合には、ブラウザーの'''戻る'''ボタンで前のページに戻ってください。",
-'anontalkpagetext' => "----''このページはアカウントをまだ作成していないか使用していない匿名利用者のための議論ページです。
-匿名利用者を識別するために、利用者名の代わりにIPアドレスが使用されています。
-IP アドレスは複数の利用者で共有されている場合があります。
-もし、あなたが匿名利用者であり、自分に関係のないコメントが寄せられている考えられる場合は、[[Special:UserLogin/signup|アカウントを作成する]]か[[Special:UserLogin|ログインして]]他の匿名利用者と間違えられないようにしてください。''",
+'anontalkpagetext' => "----
+''このページはアカウントをまだ作成していないか使用していない匿名利用者のための議論ページです。''
+
+匿名利用者を識別するために、利用者名の代わりにIPアドレスが使用されています。IP アドレスは複数の利用者で共有されている場合があります。もし、あなたが匿名利用者であり、自分に関係のないコメントが寄せられていると考えられる場合は、[[Special:UserLogin/signup|アカウントを作成する]]か[[Special:UserLogin|ログインして]]他の匿名利用者と間違えられないようにしてください。",
 'noarticletext' => '現在このページには内容がありません。
 他のページ内で[[Special:Search/{{PAGENAME}}|このページ名を検索]]、
 <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} 関連する記録を検索]、
@@ -1446,7 +1446,7 @@ $1",
 'showingresults' => "'''$2''' 件目以降の最大 {{PLURAL:$1|'''$1''' 件の結果}}を表示しています。",
 'showingresultsnum' => "'''$2''' 件目以降の {{PLURAL:$3|'''$3''' 件の結果}}を表示しています。",
 'showingresultsheader' => "「'''$4'''」の検索結果 {{PLURAL:$5|'''$3''' 件中の '''$1''' 件目|'''$3''' 件中の '''$1''' 件目から '''$2''' 件目}}",
-'nonefound' => "'''注意''': 既定では一部の名前空間のみを検索します。
+'nonefound' => "'''注意:''' 既定では一部の名前空間のみを検索します。
 ''all:''を前に付けると、すべて (トークページやテンプレートなどを含む) を対象にできます。検索する名前空間を前に付けることもできます。",
 'search-nonefound' => '問い合わせに合致する検索結果はありませんでした。',
 'powersearch' => '高度な検索',
@@ -2209,8 +2209,10 @@ contenttype/subtypeの形式で入力してください (例: <code>image/jpeg</
 [[MediaWiki:Disambiguationspage]] にリンクがあるテンプレートを使用しているページを、曖昧さ回避ページと見なします。",
 
 'pageswithprop' => 'ページプロパティがあるページ',
+'pageswithprop-legend' => 'ページプロパティがあるページ',
 'pageswithprop-text' => 'このページでは、特定のページプロパティを持つページを列挙します。',
 'pageswithprop-prop' => 'プロパティ名:',
+'pageswithprop-submit' => '実行',
 
 'doubleredirects' => '二重転送',
 'doubleredirectstext' => 'このページでは、転送ページへの転送ページを列挙します。
@@ -2814,9 +2816,9 @@ $1',
 'unblockip' => 'ブロックを解除',
 'unblockiptext' => '以下のフォームで利用者またはIPアドレスのブロックを解除できます。',
 'ipusubmit' => 'このブロックを解除',
-'unblocked' => '[[User:$1|$1]]のブロックを解除しました',
-'unblocked-range' => '$1のブロックを解除しました',
-'unblocked-id' => 'ブロック$1を除去しました',
+'unblocked' => '[[User:$1|$1]]のブロックを解除しました',
+'unblocked-range' => '$1のブロックを解除しました',
+'unblocked-id' => 'ブロック$1を除去しました',
 'blocklist' => 'ブロックされている利用者',
 'ipblocklist' => 'ブロックされている利用者',
 'ipblocklist-legend' => 'ブロックされている利用者の検索',
@@ -3963,7 +3965,7 @@ $5
 
 この確認コードは $4 に期限切れになります。',
 'confirmemail_invalidated' => 'メールアドレスの確認が中止されました',
-'invalidateemail' => 'メールアドレスの認証中止',
+'invalidateemail' => 'メールアドレスの確認中止',
 
 # Scary transclusion
 'scarytranscludedisabled' => '[ウィキ間の参照読み込みは無効になっています]',
@@ -4382,7 +4384,7 @@ MediaWikiは、有用であることを期待して配布されていますが
 'duration-centuries' => '$1 {{PLURAL:$1|世紀}}',
 'duration-millennia' => '$1{{PLURAL:$1|,000 年}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'ページプロパティがあるページ',
-'pageswithprop-submit' => '実行',
+# Image rotation
+'rotate-comment' => '画像を時計回りに $1 {{PLURAL:$1|度}}回転',
+
 );
index 8956b61..d012011 100644 (file)
@@ -1961,6 +1961,9 @@ $1',
 ამის ნაცვლად, სავარაუდოდ, ისისნი უნდა მიუთითებდნენ შესაბამის კონკრეტულ სტატიაზე.<br />
 გვერდი ითვლება მრავამნიშვნელოვნად, თუ მასში განთავსებულია თარგი, რომლის სახელიც მითითებულია გვერდზე [[MediaWiki:Disambiguationspage]].",
 
+'pageswithprop-prop' => 'თვისების სახელი:',
+'pageswithprop-submit' => 'მიდი',
+
 'doubleredirects' => 'ორმაგი გადამისამართება',
 'doubleredirectstext' => 'ამ გვერდზე ჩამოთვლილია გვერდები, რომლებიც გადამისამართებულია სხვა გადამისამართების გვერდებზე.
 ყოველი მწკრივი შეიცავს ბმულებს პირველ და მეორე გადამისამართებაზე, აგრეთვე მეორე გადამისამართების ტექსტის პირველ სტრიქონს, რომელშიც ჩვეულებრივ მითითებულია რეალური „სამიზნე“ გვერდის სათაური. საჭიროა, რომ პირველი გადამისამართებაც უთითებდეს ამ გვერდზე.
@@ -2600,7 +2603,7 @@ $1',
 'blocklog-showsuppresslog' => 'ეს მომხმარებლი უკვე დამალულია და დაბლოკილია.
 დაბლოკვათა ჟურნალი ქვემოთ მოყვანილია:',
 'blocklogentry' => 'დაიბლოკა [[$1]]. ბლოკირების ვადა $2 $3.',
-'reblock-logentry' => 'á\83¨á\83\94á\83\90á\83¡á\83¬á\83\9dá\83 á\83\90 á\83\91á\83\9aá\83\9dá\83\99á\83\98á\83 á\83\94á\83\91á\83\98á\83¡ á\83\99á\83\9dá\83\9cá\83¤á\83\98á\83\92á\83£á\83 á\83\90á\83ªá\83\98á\83\90 [[$1]]-á\83¡á\83\97á\83\95á\83\98á\83¡, á\83\95á\83\90á\83\93á\83\90 á\83\92á\83\90á\83¡á\83\93á\83\98á\83¡ $2 $3',
+'reblock-logentry' => 'á\83¨á\83\94á\83\90á\83¡á\83¬á\83\9dá\83 á\83\90 á\83\91á\83\9aá\83\9dá\83\99á\83\98á\83 á\83\94á\83\91á\83\98á\83¡ á\83\99á\83\9dá\83\9cá\83¤á\83\98á\83\92á\83£á\83 á\83\90á\83ªá\83\98á\83\90 [[$1]]-á\83¡á\83\97á\83\95á\83\98á\83¡, á\83\91á\83\9aá\83\9dá\83\99á\83\98á\83 á\83\94á\83\91á\83\98á\83¡ á\83\95á\83\90á\83\93á\83\90á\83\90 $2 $3',
 'blocklogtext' => 'ეს არის მომხმარებლების დაბლოკვის და განბლოკვის ჟურნალი. 
 ავტომატურად დაბლოკილი IP მისამართები არაა ჩამოთვლილი. 
 იხილეთ [[Special:BlockList|ბლოკირებების სია]] მიმდინარე დაბლოკვებისთვის.',
index 0c50033..8208dd8 100644 (file)
@@ -428,7 +428,7 @@ Kerem kerê, deqêna oncia bıcerrebnê.",
 'protectedpagetext' => 'Na pele vurnaisu rê qapan biya.',
 'viewsourcetext' => 'Sıma şikinê çımê na pele bıvênê u kopya kerê:',
 'protectedinterface' => "Na pele ''software'' rê meqalunê caunê bırnau dana, u qapana ke suıstımalu rê engel bo.",
-'editinginterface' => "'''Teme:''' Sıma hao jü pela ke serba nustê meqalunê caunê bırnau dana, vurnenê.
+'editinginterface' => "Teme:''' Sıma hawo jü pela ke serba nustê meqalunê caunê bırnau dana, vurnenê.
 Vurnaisê na pele karberunê binu rê serpela karberi kena ke bıasno.
 Serba çarnaişi, yardımê [//translatewiki.net/wiki/Main_Page?setlang=kiu translatewiki.net]i ra procêdoskerdene rê diqet kerê.",
 'sqlhidden' => '(Persê SQLi nımıteo)',
@@ -1138,7 +1138,7 @@ Cêr [$2 pela arezekerdena dosya de] arezekerdene asnina.',
 'listgrouprights-addgroup-all' => 'Heme grubu ilawe ke',
 'listgrouprights-removegroup-all' => 'Heme grubu wedare',
 
-# E-mail user
+# Email user
 'emailuser' => 'Nê karberi rê e-poste bırusne',
 'emailpage' => 'Karberi rê e-poste bırusne',
 'emailfrom' => 'Kami ra:',
index 0c50dcf..9de6252 100644 (file)
@@ -624,8 +624,8 @@ $1',
 'toc' => '목차',
 'showtoc' => '보이기',
 'hidetoc' => '숨기기',
-'collapsible-collapse' => 'ì\88¨ê¸°기',
-'collapsible-expand' => '보이기',
+'collapsible-collapse' => 'ì \91기',
+'collapsible-expand' => '펼치기',
 'thisisdeleted' => '$1을 보거나 되살리겠습니까?',
 'viewdeleted' => '$1을 보겠습니까?',
 'restorelink' => '삭제된 편집 $1개',
@@ -2168,8 +2168,10 @@ URL이 맞고 해당 웹사이트가 작동하는지 확인해주세요.',
 [[MediaWiki:Disambiguationspage]]에서 링크된 틀을 사용하는 문서를 동음이의 문서로 간주합니다.",
 
 'pageswithprop' => '문서 속성으로 된 문서',
+'pageswithprop-legend' => '문서 속성으로 된 문서',
 'pageswithprop-text' => '이 문서는 특정 문서 속성을 사용한 문서를 나타냅니다.',
 'pageswithprop-prop' => '속성 이름:',
+'pageswithprop-submit' => '가기',
 
 'doubleredirects' => '이중 넘겨주기 목록',
 'doubleredirectstext' => '이 문서는 다른 넘겨주기 문서로 넘겨주고 있는 문서의 목록입니다.
@@ -4210,7 +4212,7 @@ $5
 'duration-centuries' => '$1{{PLURAL:$1|세기}}',
 'duration-millennia' => '$1{{PLURAL:$1|천년}}',
 
-# Unknown messages
-'pageswithprop-legend' => '문서 속성으로 된 문서',
-'pageswithprop-submit' => '가기',
+# Image rotation
+'rotate-comment' => '그림을 시계 방향으로 $1{{PLURAL:$1|도}}로 회전함',
+
 );
index e1080cf..165c9f9 100644 (file)
@@ -254,17 +254,17 @@ $messages = array(
 'fri' => 'Vie',
 'sat' => 'Shab',
 'january' => 'Enero',
-'february' => 'Fevrero',
+'february' => 'Hevrero',
 'march' => 'Março',
-'april' => 'Abril',
+'april' => 'Avril',
 'may_long' => 'Mayo',
-'june' => 'Junio',
+'june' => 'Juño',
 'july' => 'Jullo',
 'august' => 'Agosto',
-'september' => 'Setembre',
-'october' => 'Ochůvre',
-'november' => 'Novembre',
-'december' => 'Diziembre',
+'september' => 'Setiembre',
+'october' => 'Ochòvre',
+'november' => 'Noviembre',
+'december' => 'Deziembre',
 'january-gen' => 'Enero',
 'february-gen' => 'Fevrero',
 'march-gen' => 'Março',
@@ -343,9 +343,9 @@ $messages = array(
 'vector-view-history' => 'Ver la storia',
 'vector-view-view' => 'Meldar',
 'vector-view-viewsource' => 'Ver su manadero',
-'actions' => 'Acciones',
+'actions' => 'Aksiones',
 'namespaces' => 'Espacios de nombres',
-'variants' => 'Varyantes',
+'variants' => 'Formas diferentes',
 
 'errorpagetitle' => 'Yerro',
 'returnto' => 'Tornar a $1.',
@@ -358,7 +358,7 @@ $messages = array(
 'history' => 'La îstoria de la hoja',
 'history_short' => 'Îstoria',
 'updatedmarker' => 'trocado desde mi visita de alcavo',
-'printableversion' => 'Versión apropiada para imprimir',
+'printableversion' => 'Forma apropiada para imprimir',
 'permalink' => 'Atamiento permanente',
 'print' => 'Imprimir',
 'view' => 'Ver',
@@ -379,12 +379,12 @@ $messages = array(
 'talkpage' => 'Diskutir la hoja',
 'talkpagelinktext' => 'Messaje',
 'specialpage' => 'Hoja Especial',
-'personaltools' => 'Aparatos personales',
+'personaltools' => 'Aparates personales',
 'postcomment' => 'Capítůlo muevo',
 'articlepage' => 'Ver el artícůlo de contenido',
 'talk' => 'Diskusyón',
 'views' => 'Vistas',
-'toolbox' => 'Cuadro de Aparatos',
+'toolbox' => 'Cuadro de aparates',
 'userpage' => 'Ver la hoja del usador',
 'projectpage' => 'Ver la hoja del projeto',
 'imagepage' => 'Ver la hoja de la dosya',
@@ -398,9 +398,9 @@ $messages = array(
 'redirectpagesub' => 'Hoja redirigida',
 'lastmodifiedat' => 'Esta hoja fue trocada por la última vez el $1, a las $2.',
 'protectedpage' => 'Hoja guardada',
-'jumpto' => 'Salta á:',
+'jumpto' => 'Salta a:',
 'jumptonavigation' => 'navigación',
-'jumptosearch' => 'búsqueda',
+'jumptosearch' => 'búsquida',
 
 # All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations).
 'aboutsite' => 'Encima de la {{SITENAME}}',
@@ -410,22 +410,22 @@ $messages = array(
 'currentevents' => 'Novedades',
 'currentevents-url' => 'Project:Novedades',
 'disclaimers' => 'Refuso de responsabilitá',
-'disclaimerpage' => 'Project:Rēfuso de responsabilitá jeneral',
+'disclaimerpage' => 'Project:Refuso de responsabilitá jeneral',
 'edithelp' => '¿Cómo se la troca?',
 'edithelppage' => 'Help:Una hoja, ¿cómodo se la troca?',
 'helppage' => 'Help:Contènidos',
 'mainpage' => 'La Primera Hoja',
 'mainpage-description' => 'La Primera Hoja',
 'policy-url' => 'Project:Politikas',
-'portal' => 'Puertal de la komunitá',
-'portal-url' => 'Project:Puertal de la komunitá',
-'privacy' => 'Principio de particůlaridad',
-'privacypage' => 'Project:Principio de particůlaridad',
+'portal' => 'Portal de la komunitá',
+'portal-url' => 'Project:Portal de la komunitá',
+'privacy' => 'Principio de particòlaridad',
+'privacypage' => 'Project:Principio de particòlaridad',
 
 'badaccess' => 'Yerro de permissión',
 
 'ok' => 'DE ACORDDO',
-'retrievedfrom' => 'Tomado del addresso "$1"',
+'retrievedfrom' => 'Acòjido del adhresso "$1"',
 'youhavenewmessages' => 'Tienes $1 ($2).',
 'newmessageslink' => 'mesajes nuevos',
 'newmessagesdifflink' => 'el trocamiento de alcabo',
@@ -435,14 +435,14 @@ $messages = array(
 'viewsourceold' => 'Ver su manadero',
 'editlink' => 'trocar',
 'viewsourcelink' => 'ver su manadero',
-'editsectionhint' => 'Troca el capítůlo: $1',
+'editsectionhint' => 'Troca el kapítolo: $1',
 'toc' => 'Contènidos',
 'showtoc' => 'Amostrar',
 'hidetoc' => 'esconder',
 'thisisdeleted' => 'Ver o restorar $1?',
 'viewdeleted' => 'Desea ver $1?',
 'site-rss-feed' => 'Fuente de RSS de $1',
-'site-atom-feed' => 'Fuente de Atom de $1',
+'site-atom-feed' => 'Alimentela de Atom de $1',
 'page-rss-feed' => '"$1" Fuente RSS',
 'page-atom-feed' => '"$1" Subscripción Atom',
 'red-link-title' => '$1 (esta hoja no egziste)',
@@ -451,7 +451,7 @@ $messages = array(
 'nstab-main' => 'Hoja',
 'nstab-user' => 'Hoja de empleador',
 'nstab-media' => 'Hoja de Meddia',
-'nstab-special' => 'Hoja special',
+'nstab-special' => 'Hoja especial',
 'nstab-project' => 'Hoja del proyecto',
 'nstab-image' => 'Dosya',
 'nstab-mediawiki' => 'Messaj',
@@ -485,7 +485,7 @@ Puede ser que contiene uno o más caracteres que no se pueden usar en los títul
 'yourpasswordagain' => 'Entra de muevo la parola',
 'remembermypassword' => 'Acórdate de mi entrada de usador en este bilgisayar/orddênador (por un maksimum de {{PLURAL:$1|día|días}})',
 'login' => 'Entrar',
-'nav-login-createaccount' => 'Entrar / Crîar un cuento',
+'nav-login-createaccount' => 'Entrar / Criar un cuento',
 'loginprompt' => 'Kale tener "cookies" aktivadas enel navegador para enrejistrarse en {{SITENAME}}',
 'userlogin' => 'Entrar / Registrarse',
 'logout' => 'Salir',
@@ -653,12 +653,12 @@ Leyenda: (act) = diferencias con la versión actual,
 'history-title' => 'Istorya de trokamientos para «$1»',
 'lineno' => 'Shurá $1:',
 'compareselectedversions' => 'Comparar versiones escogidas',
-'editundo' => 'deshaze',
+'editundo' => 'des-haze',
 'diff-multi' => '(No {{PLURAL:$1|es amostrado un trokamiento intermedio echo|son amostrados $1 trokamientos intermedios echos}} por {{PLURAL:$2|un usador|$2 usadores}})',
 
 # Search results
-'searchresults' => 'Resultados de la búsqueda',
-'searchresults-title' => 'Resultados de la búsqueda de «$1»',
+'searchresults' => 'Resultados de la búsquida',
+'searchresults-title' => 'Resultados de la búsquida de «$1»',
 'searchresulttext' => 'Para saber más encima de buscar en {{SITENAME}}, mira la [[{{MediaWiki:Helppage}}|{{int:help}}]].',
 'searchsubtitle' => 'Buscates \'\'\'[[:$1]]\'\'\' ([[Special:Prefixindex/$1|todas las hojas que empeçan con "$1"]] {{int:pipe-separator}} [[Special:WhatLinksHere/$1|todas las hojas que dan link a «$1»]])',
 'searchsubtitleinvalid' => "Buscates '''$1'''",
@@ -668,7 +668,7 @@ Leyenda: (act) = diferencias con la versión actual,
 'nextn' => '{{PLURAL:$1|$1}} venideras',
 'prevn-title' => '$1 {{PLURAL:$1|resultado|resultados}} de antes',
 'nextn-title' => '$1 {{PLURAL:$1|resultado|resultados}} venideros',
-'shown-title' => 'Àmostrar $1 {{PLURAL:$1|resultado|resultados}} por hoja',
+'shown-title' => 'Amostrar $1 {{PLURAL:$1|resultado|resultados}} por hoja',
 'viewprevnext' => 'Ver ($1 {{int:pipe-separator}} $2) ($3).',
 'searchmenu-exists' => 'Egziste una oja yamada "[[:$1]]" en esta viki',
 'searchmenu-new' => "'''Crîar la hoja «[[:$1]]» en esta viki!'''",
@@ -888,11 +888,11 @@ La descripción en su [$2 hoja de descripción del arxivo] está amostrada debax
 # Special:ListGroupRights
 'listgrouprights-members' => '(ver los miembros de este grupo)',
 
-# E-mail user
+# Email user
 'emailuser' => 'Embia e-mail a este usuario',
 
 # Watchlist
-'watchlist' => 'Mi lista de escogidas',
+'watchlist' => 'Lista de akavidamiento',
 'mywatchlist' => 'La mi lista de akavidamientos',
 'watchlistfor2' => 'Para $1 $2',
 'addedwatchtext' => "La hoja «[[:$1]]» fue ajustada a tu [[Special:Watchlist|lista de escogidas]]. Los trocamientos venideros en esta hoja i en tu hoja de diskussión associada se van indicar aí, i la hoja va aparecer '''gordo''' en la hoja de [[Special:RecentChanges|trocamientos freskos]] para hazerla más kolay de detektar.
@@ -985,7 +985,7 @@ A continuación se mostran las opciones actuales de la hoja '''$1''':",
 'sp-contributions-submit' => 'Buscar',
 
 # What links here
-'whatlinkshere' => 'Atamientos á esta hoja',
+'whatlinkshere' => 'Atamientos a esta hoja',
 'whatlinkshere-title' => 'Hojas que dan link a "$1"',
 'whatlinkshere-page' => 'Hoja:',
 'linkshere' => "Las hojas venideras dan link a '''[[:$1]]''':",
@@ -1009,7 +1009,7 @@ A continuación se mostran las opciones actuales de la hoja '''$1''':",
 'blocklink' => 'blokea',
 'unblocklink' => 'quita el bloqueo',
 'change-blocklink' => 'troca el blokeo',
-'contribslink' => 'Àjustamientos',
+'contribslink' => 'donos',
 'blocklogpage' => 'Bloqueos de usuarios',
 'blocklogentry' => 'bloqueó a [[$1]] $3 durante un tiempo de $2',
 'unblocklogentry' => 'desbloqueó a "$1"',
@@ -1068,14 +1068,14 @@ Si puede ser, escoge otro nombre.',
 'tooltip-pt-preferences' => 'Mis preferencias',
 'tooltip-pt-watchlist' => 'La lista de los trocamientos acontècidos en las hojas akavidadas.',
 'tooltip-pt-mycontris' => 'La lista de tus àjustamientos',
-'tooltip-pt-login' => "T'encorajamos d'entrar ma no sos obligado",
+'tooltip-pt-login' => 'Te encorajamos de entrar ma no estás obligado',
 'tooltip-pt-logout' => 'Salir',
-'tooltip-ca-talk' => 'Diskusyón encima del artícůlo de contènido',
-'tooltip-ca-edit' => 'Puedes trocar esta hoja. Y si puede ser, usa el botón de previsteo antes de enrejistrar la hoja',
+'tooltip-ca-talk' => 'Diskusyón encima del artíkolo',
+'tooltip-ca-edit' => 'Puedes trocar esta hoja. Te rogamos, antes de enrejistrarla, echa una ojada en kullaneando el botón de previsteo',
 'tooltip-ca-addsection' => 'Empeça una nueva sección',
 'tooltip-ca-viewsource' => 'Esta hoja está guardada.
 Puedes ver su manadero',
-'tooltip-ca-history' => "Enderechamientos passados d'esta hoja",
+'tooltip-ca-history' => 'Enderechamientos passados de esta hoja',
 'tooltip-ca-protect' => 'Guardar esta hoja',
 'tooltip-ca-delete' => 'Efassar esta hoja',
 'tooltip-ca-move' => 'Taxirea (renombra) esta hoja',
@@ -1084,25 +1084,25 @@ Puedes ver su manadero',
 'tooltip-search' => 'Busca en {{SITENAME}}',
 'tooltip-search-go' => 'Si ay una hoja con este nombre egzakto, vate allá.',
 'tooltip-search-fulltext' => 'Busca este teksto en las hojas',
-'tooltip-p-logo' => 'Visita la primera hoja',
+'tooltip-p-logo' => 'Vate a la primera hoja',
 'tooltip-n-mainpage' => 'Visita la primera hoja',
-'tooltip-n-mainpage-description' => 'Visita la primera hoja',
+'tooltip-n-mainpage-description' => 'Vate a la primera hoja',
 'tooltip-n-portal' => 'Encima del projeto, lo que puedes hazer y ánde topar todo',
-'tooltip-n-currentevents' => 'Información encima de los acontècimientos de oy día',
-'tooltip-n-recentchanges' => 'La lista de los trocamientos freskos en el viki',
-'tooltip-n-randompage' => 'Carga una kualunke hoja asegún viene',
-'tooltip-n-help' => 'El lugar para âmbezarse',
-'tooltip-t-whatlinkshere' => 'Una lista de todas las hojas del viki que tienen atamientos con esta hoja',
-'tooltip-t-recentchangeslinked' => 'Los trocamientos freskos de las hojas que tienen atamiento con esta hoja',
+'tooltip-n-currentevents' => 'Jhaberes y acontècimientos de oy día',
+'tooltip-n-recentchanges' => 'Lista de los trocamientos muevos en el viki',
+'tooltip-n-randompage' => 'Carga una hoja por asardo',
+'tooltip-n-help' => 'Para saver mas',
+'tooltip-t-whatlinkshere' => 'La lista de todas las hojas del viki que se atan con esta hoja',
+'tooltip-t-recentchangeslinked' => 'Los trocamientos freskos de las hojas atadas con esta hoja',
 'tooltip-feed-rss' => 'Sindicación RSS de esta hoja',
 'tooltip-feed-atom' => "Fuente de Atom d'esta hoja",
 'tooltip-t-contributions' => 'Ver la lista de ajustamientos de este usuario',
 'tooltip-t-emailuser' => 'A este usuario, mándale una letra electrόnica (ímey)',
-'tooltip-t-upload' => 'Suve dosyas por aquí',
-'tooltip-t-specialpages' => 'La lista de todas las hojas especiales',
-'tooltip-t-print' => "Versión apropiada para imprimir d'esta hoja",
-'tooltip-t-permalink' => "Atamiento permanente á est'enderechamiento de la hoja",
-'tooltip-ca-nstab-main' => 'Ve el artílo de contènido',
+'tooltip-t-upload' => 'Suve las dosyas por aquí',
+'tooltip-t-specialpages' => 'Lista de todas las hojas especiales',
+'tooltip-t-print' => 'Forma apropiada para imprimir esta hoja',
+'tooltip-t-permalink' => 'Atamiento permanente a este enderechamiento de la hoja',
+'tooltip-ca-nstab-main' => 'Ve el artíkolo de contènido',
 'tooltip-ca-nstab-user' => 'Ve la hoja de usuario',
 'tooltip-ca-nstab-special' => 'Esta es una hoja especial, la hoja ya no se puede trocar',
 'tooltip-ca-nstab-project' => 'Ver la hoja del prodjekto',
@@ -1133,11 +1133,11 @@ Puedes ver su manadero',
 'show-big-image' => 'Resolución original',
 
 # Bad image list
-'bad_image_list' => "El formato es ańsina:
+'bad_image_list' => 'El formato es ansina:
 
-Cale akavidar sólo elementos de lista (quere dezir: shurás/satires qu'empeçan con *).
-El primer atamiento de cada shurá deve de ser un atamiento á una dosya negra (á la dosya que se quere blokear).
-Los atamientos venideros que stan en la mesma shurá s'aprecian como eksepsiones, por eńxemplo, hojas ande la dosya se ve en la shurá.",
+Sólo elementos de lista (liñas empeçando con *) se toman en konsidherasyón.
+El primer atamiento de cada liña deve de atarse con una dosya negra (la dosya que se quere blokar).
+Los atamientos venideros que están en la misma liña se konsidheran como eksepsiones (yaani hojas ande la dosya puede aparecer encaxada en la liña)',
 
 # Metadata
 'metadata' => 'Metadatos',
@@ -1192,7 +1192,7 @@ Los otros campos se van a guardar por defecto.
 'namespacesall' => 'todos',
 'monthsall' => '(todos)',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'Konfirmar direksion e-pósta',
 'confirmemail_send' => 'Embiar el kodigo de konfirmasion.',
 'confirmemail_sent' => 'Konfirmasion de pósta embiada.',
index 7d21f9e..3231768 100644 (file)
@@ -575,6 +575,9 @@ $2',
 'customjsprotected' => "Dir hutt net d'Recht dës JavaScript-Säit z'änneren, well dorop déi perséinlech Astellunge vun engem anere Benotzer gespäichert sinn.",
 'ns-specialprotected' => 'Spezialsäite kënnen net verännert ginn.',
 'titleprotected' => "Eng Säit mat dësem Numm kann net ugeluecht ginn. Dës Spär gouf vum [[User:$1|$1]] gemaach deen als Grond ''$2'' uginn huet.",
+'filereadonlyerror' => 'De Fichier "$1" konnt net geännert ginn well de Repertoire vun de Fichieren "$2" nëmme geliest däerf ginn.
+
+Den Administrateur den d\'Schreiwe gespaart huet, huet dës Erklärung uginn: "$3"',
 'invalidtitle-knownnamespace' => 'Net valabelen Titel mam Nummraum "$2" a mam Text "$3"',
 'invalidtitle-unknownnamespace' => 'Net valabelen Titel mat der onbekannter Nummraum-Zuel $1 a mam Text "$2"',
 'exception-nologin' => 'Net ageloggt',
@@ -1924,7 +1927,9 @@ Si sollte am beschten op déi eigentlech gemengte Säit verlinkt sinn.<br />
 Eng Säite gëtt als Homonymie-Säit behandelt, wa si eng Schabloun benotzt déi vu [[MediaWiki:Disambiguationspage]] verlinkt ass.",
 
 'pageswithprop' => 'Säite mat enger Säiten-Eegeschaft',
+'pageswithprop-legend' => 'Säite mat enger Säiten-Eegeschaft',
 'pageswithprop-prop' => 'Numm vun der Eegeschaft:',
+'pageswithprop-submit' => 'Lass',
 
 'doubleredirects' => 'Duebel Viruleedungen',
 'doubleredirectstext' => 'Op dëser Säit stinn déi Säiten déi op aner Viruleedungssäite viruleeden.
@@ -3865,7 +3870,4 @@ Soss kënnt Dir den einfache Formulär hei drënner benotzen. Är Bemierkung gë
 'duration-centuries' => '$1 {{PLURAL:$1|Joerhonnert|Joerhonnerten}}',
 'duration-millennia' => '$1 {{PLURAL:$1|Millenaire|Millenairen}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Säite mat enger Säiten-Eegeschaft',
-'pageswithprop-submit' => 'Lass',
 );
index 9f64387..833d0ff 100644 (file)
@@ -213,13 +213,13 @@ $messages = array(
 'thursday' => '週四',
 'friday' => '週五',
 'saturday' => '週六',
-'sun' => '日',
-'mon' => '一',
-'tue' => '二',
-'wed' => '三',
-'thu' => 'å\91¨å\9b\9b',
-'fri' => '五',
-'sat' => 'å\91¨å\85­',
+'sun' => '日',
+'mon' => '一',
+'tue' => '二',
+'wed' => '三',
+'thu' => '四',
+'fri' => '五',
+'sat' => '六',
 'january' => '一月',
 'february' => '二月',
 'march' => '三月',
@@ -407,7 +407,7 @@ $1',
 
 'ok' => '可',
 'retrievedfrom' => '取自"$1"',
-'youhavenewmessages' => '子有$1($2)',
+'youhavenewmessages' => '有$1書至子書房也。($2)',
 'newmessageslink' => '新訊',
 'newmessagesdifflink' => '變更',
 'youhavenewmessagesfromusers' => '子有 $1 自 {{PLURAL:$3|another user|$3 簿戶也}} ($2)。',
@@ -597,7 +597,7 @@ $2',
 'loginlanguagelabel' => '語:$1',
 'suspicious-userlogout' => '爾欲無離也,可由壞瀏覽器或快枝代理呈送之。',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => '於 PHP mail() 參數現錯',
 
 # Change password dialog
@@ -813,8 +813,8 @@ $2',
 'last' => '前',
 'page_first' => '首',
 'page_last' => '末',
-'histlegend' => "辨ç\95°ï¼\9aæ\93\87äº\8cå­\94å¾\8c,按Enter、或點下鈕以辨之。<br />
-釋義:'''({{int:cur}})'''與今審辨;'''({{int:last}})'''與前審辨;'''{{int:minoreditletter}}''',校文",
+'histlegend' => "辨ç\95°ï¼\9aæ\97¢æ\93\87äº\8cå­\94,按Enter、或點下鈕以辨之。<br />
+釋義:'''({{int:cur}})'''與今審辨;'''({{int:last}})'''與前審辨;'''{{int:minoreditletter}}''',令校",
 'history-fieldset-title' => '誌覽',
 'history-show-deleted' => '只刪',
 'histfirst' => '初',
@@ -1129,7 +1129,7 @@ $1",
 'prefs-displaywatchlist' => '示項',
 'prefs-diffs' => '異',
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => '電郵有效之',
 'email-address-validity-invalid' => '貢一效之電郵',
 
@@ -1293,7 +1293,7 @@ $1",
 'recentchanges-label-newpage' => '此纂開新頁',
 'recentchanges-label-minor' => '此乃細纂',
 'recentchanges-label-bot' => '此乃機纂',
-'recentchanges-label-unpatrolled' => 'æ­¤ä¹\83æ\9cªå·¡ä¹\8bçº\82',
+'recentchanges-label-unpatrolled' => 'æ\98¯çº\82æ\9cªå·¡',
 'rcnote' => "下為自$4$5起,'''$2'''日內'''$1'''近易也。",
 'rcnotefrom' => "下為自'''$2'''至'''$1'''之易也。",
 'rclistfrom' => '自$1起之易也',
@@ -1600,6 +1600,7 @@ $1',
 'statistics-mostpopular' => '燴炙',
 
 'disambiguations' => '釋義',
+'disambiguationspage' => 'Template:弭誤解',
 'disambiguations-text' => '頁下引[[MediaWiki:Disambiguationspage]]模,求釋義,宜正題之。',
 
 'doubleredirects' => '窮渡',
@@ -1768,7 +1769,7 @@ $1',
 'listgrouprights-addgroup-self-all' => '加自之全組',
 'listgrouprights-removegroup-self-all' => '除自之全組',
 
-# E-mail user
+# Email user
 'mailnologin' => '無驛',
 'mailnologintext' => '[[Special:UserLogin|登簿]]置郵,方可捎書。',
 'emailuser' => '捎君',
@@ -1871,7 +1872,7 @@ $NEWPAGE
 'historywarning' => '警示,此頁約有誌$1:',
 'confirmdeletetext' => '欲刪此物與誌,知後果、合[[{{MediaWiki:Policy-url}}]]後再為之。',
 'actioncomplete' => '成矣',
-'actionfailed' => 'æ\95\97ç\9f£',
+'actionfailed' => 'æ\9cªç«\9f',
 'deletedtext' => '"$1"刪矣,見誌刪於$2。',
 'dellogpage' => '誌刪',
 'dellogpagetext' => '近刪如下:',
@@ -2594,7 +2595,7 @@ $1',
 'monthsall' => '全',
 'limitall' => '全',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => '核郵驛',
 'confirmemail_noemail' => '[[Special:Preferences|簿註]]有驛。',
 'confirmemail_send' => '遣核符',
index 0f009cc..e80541b 100644 (file)
@@ -27,9 +27,9 @@ $messages = array(
 # User preference toggles
 'tog-underline' => 'Garih bawahi tautan:',
 'tog-justify' => 'Ratokan paragraf',
-'tog-hideminor' => 'Suruakkan suntingan ketek di parubahan tabaru',
-'tog-hidepatrolled' => 'Suruakkan suntingan nan lah dijago di parubahan tabaru',
-'tog-newpageshidepatrolled' => 'Suruakkan laman nan lah dijago dari dafta laman baru',
+'tog-hideminor' => 'Suruakan suntiangan ketek di parubahan tabaru',
+'tog-hidepatrolled' => 'Suruakan suntiangan nan lah dipatroli di parubahan tabaru',
+'tog-newpageshidepatrolled' => 'Suruakkan laman nan lah dipatroli dari dafta laman baru',
 'tog-extendwatchlist' => 'Kambangkan dafta pantau untuak malihek sado parubahan, indak nan baru se',
 'tog-usenewrc' => 'Gunokan tampilan parubahan tingkek lanjuik (paralu JavaScript)',
 'tog-numberheadings' => 'Agiah nomor judua sacaro otomatis',
@@ -56,15 +56,15 @@ $messages = array(
 'tog-fancysig' => 'Jadikan tando tangan manjadi teks wiki (indak jo tautan otomatis)',
 'tog-externaleditor' => 'Gunokan editor dari lua sacaro bawaan (untuak nan ahli sajo, butuah pangaturan khusus di komputer Sanak [//www.mediawiki.org/wiki/Manual:External_editors Informasi labiah lanjuik.])',
 'tog-externaldiff' => 'Gunokan diff eksternal sacaro bawaan (untuak nan ahli sajo, kabutuahan pangaturan khusus pado komputer Sanak [//www.mediawiki.org/wiki/Manual:External_editors Informasi labiah lanjuik.].)',
-'tog-showjumplinks' => 'Aktifkan tautan pambantu "langsuang ka"',
-'tog-uselivepreview' => 'Gunokan pratayang langsuang (JavaScript) (eksperimental)',
-'tog-forceeditsummary' => 'Ingekkan awak bilo kotak ringkasan suntiangan masih kosoang',
-'tog-watchlisthideown' => 'Suruakkan suntiangan surang di dafta pantau',
-'tog-watchlisthidebots' => 'Suruakkan suntiangan bot di dafta pantau',
-'tog-watchlisthideminor' => 'Suruakkan suntiangan ketek di dafta pantau',
-'tog-watchlisthideliu' => 'Suruakkan suntiangan pangguno masuak log di dafta pantau',
-'tog-watchlisthideanons' => 'Suruakkan suntiangan pangguno indak di kana di dafta pantau',
-'tog-watchlisthidepatrolled' => 'Suruakkan suntiangan tapatroli di dafta pantau',
+'tog-showjumplinks' => 'Aktifkan pautan bantuan "langsuang ka"',
+'tog-uselivepreview' => 'Gunoan pratonton langsuang (JavaScript) (eksperimental)',
+'tog-forceeditsummary' => 'Ingekan ambo bilo kotak ikhtisar suntiangan kosong',
+'tog-watchlisthideown' => 'Suruakan suntiangan surang di dafta pantau',
+'tog-watchlisthidebots' => 'Suruakan suntiangan bot di dafta pantau',
+'tog-watchlisthideminor' => 'Suruakan suntiangan ketek di dafta pantau',
+'tog-watchlisthideliu' => 'Suruakan suntiangan pangguno masuak log di dafta pantau',
+'tog-watchlisthideanons' => 'Suruakan suntiangan pangguno indak di kana di dafta pantau',
+'tog-watchlisthidepatrolled' => 'Suruakan suntiangan tapatroli di dafta pantau',
 'tog-ccmeonemails' => 'Kiriman Ambo salinan surel nan dikiriman ka urang lain',
 'tog-diffonly' => 'Jan tampilan isi laman di bawah pabedoan suntiangan',
 'tog-showhiddencats' => 'Tampilan kategori tasambunyi',
@@ -84,7 +84,7 @@ $messages = array(
 # Dates
 'sunday' => 'Akaik',
 'monday' => 'Sinayan',
-'tuesday' => 'Salaso',
+'tuesday' => 'Salasa',
 'wednesday' => "Raba'a",
 'thursday' => 'Kamih',
 'friday' => 'Jumaik',
@@ -179,7 +179,7 @@ $messages = array(
 'vector-action-delete' => 'Hapuih',
 'vector-action-move' => 'Pindahkan',
 'vector-action-protect' => 'Linduangkan',
-'vector-action-undelete' => 'Pambatalan panghapusan',
+'vector-action-undelete' => 'Pambatalan panghapuihan',
 'vector-action-unprotect' => 'Tuka palinduangan',
 'vector-simplesearch-preference' => 'Aktifkan kotak pancarian sadarano (hanyo kulik Vector)',
 'vector-view-create' => 'Buek',
@@ -188,7 +188,7 @@ $messages = array(
 'vector-view-view' => 'Baco',
 'vector-view-viewsource' => 'Caliak sumber',
 'actions' => 'Tindakan',
-'namespaces' => 'Ruang namo:',
+'namespaces' => 'Ruang namo',
 'variants' => 'Varian:',
 
 'navigation-heading' => 'Menu navigasi',
@@ -202,26 +202,26 @@ $messages = array(
 'searcharticle' => 'Tuju',
 'history' => 'Riwayaik laman',
 'history_short' => 'Riwayaik',
-'updatedmarker' => 'diubah sajak kunjuangan tarakhir ambo',
+'updatedmarker' => 'diubah samanjak kunjuangan tarakhia ambo',
 'printableversion' => 'Versi cetak',
 'permalink' => 'Pautan parmanen',
 'print' => 'Cetak',
-'view' => 'Tampilkan',
+'view' => 'Baco',
 'edit' => 'Suntiang',
 'create' => 'Buek',
 'editthispage' => 'Suntiang laman ko',
 'create-this-page' => 'Buek laman iko',
 'delete' => 'Hapuih',
-'deletethispage' => 'Hapuih laman iko',
-'undelete_short' => 'Batal hapuih $1 {{PLURAL:$1|suntiangan|suntiangan}}',
-'viewdeleted_short' => 'Liek {{PLURAL:$1|ciek suntiangan|$1 suntiangan}} nan dihapuih',
+'deletethispage' => 'Hapuih laman ko',
+'undelete_short' => 'Batal hapuih $1 {{PLURAL:$1|suntiangan}}',
+'viewdeleted_short' => 'Lihek {{PLURAL:$1|$1 suntiangan}} nan dihapuih',
 'protect' => 'Linduangkan',
 'protect_change' => 'ubah',
-'protectthispage' => 'Lindungi laman iko',
+'protectthispage' => 'Linduangi laman ko',
 'unprotect' => 'Tuka palinduangan',
 'unprotectthispage' => 'Tuka palindungan laman ko',
 'newpage' => 'Laman baru',
-'talkpage' => 'Musyawarahkan laman ko',
+'talkpage' => 'Rundiangkan laman ko',
 'talkpagelinktext' => 'maota',
 'specialpage' => 'Laman istimewa',
 'personaltools' => 'Pakakeh pribadi',
@@ -675,9 +675,9 @@ Kato sandi untuak akun baharu iko dapek diubah di laman ''[[Special:ChangePasswo
 'newarticletext' => "Laman nan awak cari alun ado.
 Untuak mambuek laman tu, mulailah dangan manulih dalam kotak di bawah (caliak [[{{MediaWiki:Helppage}}|laman bantuan]] untuak informasi lanjuiknyo).
 Jikok awak indak sangajo sampai ka laman ko, klik tombol '''back''' pado panjalajah web awak.",
-'anontalkpagetext' => "----''Iko adolah laman pambicaraan saurang pangguno anonim nan alun mambuek akun atau indak manggunoannyo.
-Jadi, kami tapaso harus mamakai alamat IP nan basangkutan untuak maidentifikasikannyo.
-Jikok Sanak adolah saurang pangguno anonim dan marasa mandapekkan komentar-komentar nan indak relevan nan ditujuan langsung kapado Sanak, sila [[Special:UserLogin/signup|mambuek akun]] atau [[Special:UserLogin|masuak log]] untuak mahindari karancuan jo pangguno anonim lainnya di lain wakatu.''",
+'anontalkpagetext' => "----''Iko adolah laman rundiang saurang pangguno anonim nan alun mambuek akun atau indak manggunoannyo.
+Jadi, kami tapaso mamakai alamat IP nan takaik untuak mangenalinyo.
+Jikok Sanak adolah pangguno anonim dan maraso mandapek komentar nan indak lamak nan ditujuan langsung kapado Sanak, cubolah [[Special:UserLogin/signup|mambuek akun]] atau [[Special:UserLogin|masuak log]] guno manghindari karancuan jo pangguno anonim lainnyo.''",
 'noarticletext' => 'Kini ko indak ada teks di laman iko.
 Sanak dapek [[Special:Search/{{PAGENAME}}|malakukan pancarian untuak judul laman iko]] di laman-laman lain, <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} mancari log takaik], atau [{{fullurl:{{FULLPAGENAME}}|action=edit}} manyuntiang laman iko]</span>.',
 'noarticletext-nopermission' => 'Kini ko indak ado teks dalam laman ko.
@@ -965,8 +965,8 @@ Rinciannyo mungkin ado di [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAME
 'showingresults' => "Di bawah ko dikaluaan sampai {{PLURAL:$1|'''$1''' hasil}}, dimulai dari #'''$2'''.",
 'showingresultsnum' => "Di bawah ko dikaluaan {{PLURAL:$3|'''$3'''}} hasil mulai dari #'''$2'''.",
 'showingresultsheader' => "{{PLURAL:$5|Hasil '''$1 - $2''' dari '''$3'''}} untuak '''$4'''",
-'nonefound' => "'''Catatan''': hanyo babarapo ruangnamo yang dicari sacaro default.
-Cubo awali permintaan awak tu jo ''all:'' untuak mancari sado kandungan (tamasuak laman ota, templat, dll), atau gunoan ruangnamo yang diinginkan sabagai awalan.",
+'nonefound' => "'''Catatan''': hanyo babarapo ruangnamo nan dicari sacaro default.
+Cubo awali pamintaan Sanak tu jo ''sadonyo:'' untuak mancari kasado kandungan (tamasuak laman rundiang, templat, dll), atau gunoan ruangnamo nan diinginkan sabagai awalan.",
 'search-nonefound' => 'Indak ado hasil nan cocok sasuai jo parmintaan',
 'powersearch' => 'Pencarian lanjut',
 'powersearch-legend' => 'Pencarian lanjut',
@@ -1089,8 +1089,8 @@ Jan labiah dari $1 {{PLURAL:$1|karakter}}.',
 'prefs-help-realname' => "Namo asli sifaiknyo opsional.
 Jiko' Angku manambahkannyo, namo asli Angku akan digunoan untuak mengenal hasil karaja Angku.",
 'prefs-help-email' => "Alamaik surel ko hanyolah tambahan, tapi paralu untuak ma-''reset'' kato sandi, bilo Sanak lupo kato sandi.",
-'prefs-help-email-others' => 'Sanak dapek mamiliah untuak mangizinkan urang lain manghubungi jo surel malalui laman pangguno atau laman diskusi.
-Alamaik surel tu indakkan tau dek urang nan manghubungi sanak tu.',
+'prefs-help-email-others' => 'Sanak dapek mamiliah untuak mangizinkan urang lain manghubungi jo surel malalui laman pangguno atau laman rundiang.
+Alamaik surel Sanak indakkan tau dek urang nan manghubungi sanak tu.',
 'prefs-help-email-required' => 'Alamaik surel wajib diisi.',
 'prefs-info' => 'Informasi dasar',
 'prefs-i18n' => 'Internasionalisasi',
@@ -1230,7 +1230,22 @@ Laman pado [[Special:Watchlist|dafta pantau Sanak]] ditandoi jo '''cetak taba'''
 
 # Upload
 'upload' => 'Muek berkas',
-'uploadlogpage' => 'Log unggah',
+'uploadbtn' => 'Mamuek berkas',
+'reuploaddesc' => 'Batal dan baliak ka formulir pamuatan',
+'uploadtext' => "Gunoan formulir di bawah untuak mangunggah berkas.
+Untuak manampilan atau mancari berkas nan sabalumnyo dimuek, gunoan [[Special:FileList|dafta berkas]]. Pangunggahan (ulang) tacatat dalam [[Special:Log/upload|log pangunggahan]], samantaro panghapuihan tacatat dalam [[Special:Log/delete|log panghapuihan]].
+
+Untuak manampilkan atau manyaratoan berkas pado suatu laman, gunoan salah satu format di bawah ko:
+* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Berkas.jpg]]</nowiki></code>''' untuak manampilan berkas dalam ukuran aslinyo
+* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Berkas.png|200px|thumb|left|teks alternatif]]</nowiki></code>''' untuak manampilan berkas jo leba 200px dalam sabuah kotak di kiri laman jo 'teks alternatif' sabagai katarangan gambar
+* '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:Berkas.ogg]]</nowiki></code>''' sabagai pautan langsuang ka berkas nan dimaksud tanpa manampilan berkas tarsabuik di laman wiki",
+'upload-permitted' => 'Jenis berkas nan dipabuliahan: $1.',
+'upload-preferred' => 'Jenis berkas nan disaranan: $1.',
+'upload-prohibited' => 'Jenis berkas nan dilarang: $1.',
+'uploadlog' => 'log pangunggahan',
+'uploadlogpage' => 'Log pangunggahan',
+'uploadlogpagetext' => 'Barikuik adolah dafta unggahan berkas tabaru. 
+Lihek [[Special:NewFiles|galeri berkas baru]] untuak tampilan visual.',
 'filename' => 'Namo berkas',
 'filedesc' => 'Ikhtisar',
 'fileuploadsummary' => 'Ikhtisar:',
@@ -1254,11 +1269,27 @@ Koq berkas tu samemang marupoan gambar dalam ukuran aslinyo, Sanak indak paralu
 Nampaknyo berkas ko marupoan gambar jo ukuran dipaketek ''(miniatua)''.
 Koq Sanak ado versi resolusi panuah dari gambar ko, cubolah muekan berkas tasabuik. Koq indak, harap ubah namo berkas ko.",
 'uploadedimage' => 'muek "[[$1]]"',
+'upload-source' => 'Berkas sumber',
+'sourcefilename' => 'Namo berkas sumber:',
+'sourceurl' => 'URL sumber:',
+'destfilename' => 'Namo berkas tujuan:',
+'upload-maxfilesize' => 'Ukuran berkas maksimum: $1',
+'upload-description' => 'Katarangan berkas',
+'upload-options' => 'Opsi pangunggahan',
+'watchthisupload' => 'Pantau berkas ko',
 
 'license' => 'Lisensi:',
 'license-header' => 'Lisensi',
+'nolicense' => 'Indak ad nan dipiliah',
+'license-nopreview' => '(Pratonton indak tasadio)',
+'upload_source_url' => ' (suatu URL valid nan dapek diakses publik)',
+'upload_source_file' => ' (berkas nan di komputer Sanak)',
 
 # Special:ListFiles
+'listfiles-summary' => 'Laman istimewa ko manampilan kasado berkas nan alah diunggah.
+Katiko disariang dek pangguno, hanyo versi berkas tabaru dari berkas nan diunggah nan tampil.',
+'listfiles_search_for' => 'Cari namo berkas:',
+'imgfile' => 'berkas',
 'listfiles' => 'Dafta berkas',
 'listfiles_thumb' => 'Miniatur',
 'listfiles_date' => 'Tanggal',
@@ -1288,6 +1319,7 @@ Koq Sanak ado versi resolusi panuah dari gambar ko, cubolah muekan berkas tasabu
 'imagelinks' => 'Panggunoan berkas',
 'linkstoimage' => 'Barikuik ko {{PLURAL:$1|$1 laman nan takaik}} jo berkas:',
 'nolinkstoimage' => 'Indak ado laman nan batauik ka berkas ko.',
+'morelinkstoimage' => 'Lihek [[Special:WhatLinksHere/$1|pautan baliak]] ka berkas ko.',
 'linkstoimage-redirect' => '$1 (pangaliahan berkas) $2',
 'sharedupload' => 'Berkas ko barasal dari $1 dan mungkin digunoan oleh berbagai proyek lain.',
 'sharedupload-desc-here' => 'Berkas ko dari $1, mungkin juo digunoan untuak proyek-proyek lain.
@@ -1476,8 +1508,8 @@ Alamaik surel nan Sanak masuakkan di [[Special:Preferences|pangaturan akun]] aka
 'watchlist' => 'Pantauan',
 'mywatchlist' => 'Pantauan',
 'watchlistfor2' => 'Untuak $1 $2',
-'addedwatchtext' => "Laman \"[[:\$1]]\" lah ditambahkan ka [[Special:Watchlist|dafta pantauan Sanak]].
-Parubahan laman ko tamasuak laman rundiangnyo akan ditampilan pado [[Special:RecentChanges|dafta parubahan]] '''bacetak taba''' agar labiah mudah mancaliaknyo.",
+'addedwatchtext' => 'Laman "[[:$1]]" lah ditambahan ka [[Special:Watchlist|Pantauan]] Sanak.
+Parubahan laman ko tamasuak laman rundiangnyo akan ditampilan disinan.',
 'removewatch' => 'Hapuih dari dafta pantau',
 'removedwatchtext' => 'Laman "[[:$1]]" lah dihapuih dari [[Special:Watchlist|dafta pantau Sanak]].',
 'watch' => 'Pantau',
@@ -1666,7 +1698,7 @@ Entri log pamblokiran tabaru ado di bawah ko untuak referensi:',
 'ipbotheroption' => 'lainnyo',
 'ipbotherreason' => 'Alasan lain/tambahan:',
 'ipbhidename' => 'Suruakan namo pangguno dari dafta jo suntiangan',
-'ipbwatchuser' => 'Pantau laman pangguno ko jo laman diskusinyo',
+'ipbwatchuser' => 'Pantau laman pangguno ko jo laman rundiangnyo',
 'ipb-disableusertalk' => 'Halang pangguno ko manyuntiang laman diskusinyo wakatu disakek',
 'ipb-change-block' => 'Sakek baliak pangguno jo setelan ko',
 'ipb-confirm' => 'Konfirmasi sakek',
index b62520c..53ed722 100644 (file)
@@ -2167,8 +2167,10 @@ $1',
 Една страница се смета за страница за појаснување ако го користи шаблонот што води од [[MediaWiki:Disambiguationspage]]",
 
 'pageswithprop' => 'Страници со својство',
+'pageswithprop-legend' => 'Страници со својство',
 'pageswithprop-text' => 'На страницава се наведени страници што користат дадено својство.',
 'pageswithprop-prop' => 'Име на својството:',
+'pageswithprop-submit' => 'Оди',
 
 'doubleredirects' => 'Двојни пренасочувања',
 'doubleredirectstext' => 'Оваа страница ги прикажува пренасочувачките страници до други пренасочувачки страници.
@@ -4348,7 +4350,7 @@ $5
 'duration-centuries' => '$1 {{PLURAL:$1|век|века}}',
 'duration-millennia' => '$1 {{PLURAL:$1|милениум|милениуми}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Страници со својство',
-'pageswithprop-submit' => 'Оди',
+# Image rotation
+'rotate-comment' => 'Сликата е завртена за $1 {{PLURAL:$1|степен|степени}} вдесно',
+
 );
index 16f11e5..efb0ed4 100644 (file)
@@ -806,7 +806,7 @@ $2',
 'loginlanguagelabel' => 'भाषा: $1',
 'suspicious-userlogout' => 'तुमचे अदाखल होणे प्रतिबंधित झाले कारण असे दिसते की ते तुटलेल्या न्याहाळकाद्वारे पाठवले गेले.',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => 'पीएचपीच्या विपत्र() पर्यायात अज्ञात चूक',
 'user-mail-no-addy' => 'ईमेल पत्त्या विना ईमेल पाठवण्यचा प्रयत्न केला',
 
@@ -1438,7 +1438,7 @@ $1",
 'prefs-displaywatchlist' => 'दर्शन पर्याय',
 'prefs-diffs' => 'फरक',
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => 'विपत्रपत्ता वैध आहे',
 'email-address-validity-invalid' => 'वैध विपत्रपत्ता लिहा',
 
@@ -2182,7 +2182,7 @@ Input:contenttype/subtype, e.g. <code>image/jpeg</code>.',
 'listgrouprights-addgroup-self-all' => 'सर्व समूह स्वतःच्या खात्यात मिळवा',
 'listgrouprights-removegroup-self-all' => 'सर्व समूह स्वतःच्या खात्यातून काढून टाका',
 
-# E-mail user
+# Email user
 'mailnologin' => 'पाठविण्याचा पत्ता नाही',
 'mailnologintext' => 'इतर सदस्यांना विपत्र(ई-मेल) पाठवण्याकरिता तुम्ही [[Special:UserLogin|प्रवेश केलेला]] असणे आणि  प्रमाणित (ई-मेल) पत्ता तुमच्या [[Special:Preferences|पसंतीत]] नमुद असणे आवश्यक आहे.',
 'emailuser' => 'या सदस्याला ई-मेल पाठवा',
@@ -3511,7 +3511,7 @@ $1',
 'monthsall' => 'सर्व',
 'limitall' => 'सर्व',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'ई-मेल पत्ता पडताळून पहा',
 'confirmemail_noemail' => '[[Special:Preferences|सदस्य पसंतीत]] तुम्ही प्रमाणित विपत्र (ई-मेल) पत्ता दिलेला नाही.',
 'confirmemail_text' => 'विपत्र सुविधा वापरण्या पूर्वी {{SITENAME}}वर तुमचा विपत्र (ई-मेल) पत्ता प्रमाणित करणे गरजेचे आहे. तुमच्या पत्त्यावर निश्चितीकरण विपत्र (ई-मेल) पाठवण्याकरिता खालील बटण सुरू करा.विपत्रात कुटसंकेतच्(पासवर्ड) असलेला दुवा असेल;तुमचा विपत्र (ई-मेल) पत्ता प्रमाणित करण्या करिता तुमच्या विचरकात हा दिलेला दुवा चढवा.',
index 0417459..ed747db 100644 (file)
@@ -877,7 +877,7 @@ Wacht even voordat u het opnieuw probeert.',
 'loginlanguagelabel' => 'Taal: $1',
 'suspicious-userlogout' => 'Uw verzoek om af te melden is genegeerd, omdat het lijkt alsof het verzoek is verzonden door een browser of cacheproxy die stuk is.',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => 'Er is een onbekende fout opgetreden in de mail()-functie van PHP',
 'user-mail-no-addy' => 'Geprobeerd een e-mail te verzenden zonder een e-mailadres.',
 'user-mail-no-body' => 'Er is geprobeerd een e-mail te verzenden zonder inhoud of met een hele korte inhoud.',
@@ -1579,7 +1579,7 @@ Als u deze opgeeft, kan deze naam gebruikt worden om u erkenning te geven voor u
 'prefs-displaywatchlist' => 'Weergaveopties',
 'prefs-diffs' => 'Verschillen',
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => 'Het e-mailadres lijkt geldig',
 'email-address-validity-invalid' => 'Geef een geldig e-mailadres op',
 
@@ -2191,6 +2191,12 @@ Vergeet niet de "Koppelingen naar deze pagina" te controleren alvorens deze sjab
 Deze horen waarschijnlijk direct naar een meer toepasselijke pagina te verwijzen.<br />
 Een pagina wordt gezien als doorverwijspagina als er een sjabloon op staat dat opgenomen is op [[MediaWiki:Disambiguationspage]].",
 
+'pageswithprop' => "Pagina's met een pagina-eigenschap",
+'pageswithprop-legend' => "Pagina's met een pagina-eigenschap",
+'pageswithprop-text' => "Op deze pagina worden pagina's weergegeven met een bepaalde pagina-eigenschap.",
+'pageswithprop-prop' => 'Naam van de eigenschap:',
+'pageswithprop-submit' => 'OK',
+
 'doubleredirects' => 'Dubbele doorverwijzingen',
 'doubleredirectstext' => "Deze lijst bevat pagina's die doorverwijzen naar andere doorverwijspagina's.
 Elke rij bevat koppelingen naar de eerste en de tweede doorverwijspagina en een koppeling naar de doelpagina van de tweede doorverwijspagina.
@@ -2386,7 +2392,7 @@ Er kan [[{{MediaWiki:Listgrouprights-helppage}}|extra informatie]] over individu
 'listgrouprights-addgroup-self-all' => 'Alle groepen toevoegen aan eigen gebruiker',
 'listgrouprights-removegroup-self-all' => 'Alle groepen verwijderen van eigen gebruiker',
 
-# E-mail user
+# Email user
 'mailnologin' => 'Geen verzendadres beschikbaar',
 'mailnologintext' => 'U moet [[Special:UserLogin|aangemeld]] zijn en een geldig e-mailadres in uw [[Special:Preferences|voorkeuren]] vermelden om andere gebruikers te kunnen e-mailen.',
 'emailuser' => 'Deze gebruiker e-mailen',
@@ -3809,7 +3815,7 @@ Andere velden worden verborgen.
 'monthsall' => 'alle',
 'limitall' => 'alle',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'E-mailadres bevestigen',
 'confirmemail_noemail' => 'U hebt geen geldig e-mailadres ingegeven in uw [[Special:Preferences|gebruikersvoorkeuren]].',
 'confirmemail_text' => '{{SITENAME}} eist bevestiging van uw e-mailadres voordat u de e-mailmogelijkheden kunt gebruiken.
index 55c7e3a..62483f9 100644 (file)
@@ -2046,8 +2046,10 @@ Dei bør kan henda lenkja til ei meir passande side i staden.<br />
 Ei side vert handsama som ei fleirtydingsside om ho nyttar ein mal som er lenkja til frå [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Sider med ein sideeigenskap',
+'pageswithprop-legend' => 'Sider med ein sideeigenskap',
 'pageswithprop-text' => 'Denne sida listar opp sider som nyttar ein viss sideeigenskap.',
 'pageswithprop-prop' => 'Namn på eigenskap:',
+'pageswithprop-submit' => 'Gå',
 
 'doubleredirects' => 'Doble omdirigeringar',
 'doubleredirectstext' => 'Kvar line inneheld lenkjer til den første og den andre omdirigeringa, og den første lina frå den andre omdirigeringsteksten. Det gjev som regel den «rette» målartikkelen, som den første omdirigeringa skulle ha peikt på. <del>Overstrykne</del> liner har vorte retta på.',
@@ -2604,7 +2606,7 @@ $1',
 'ipb-change-block' => 'Blokker brukaren på nytt med desse innstillingane',
 'ipb-confirm' => 'Stadfest blokkering',
 'badipaddress' => 'IP-adressa er ugyldig eller blokkering av brukarar er slått av på tenaren.',
-'blockipsuccesssub' => 'Blokkeringa er utførd',
+'blockipsuccesssub' => 'Blokkeringa er utført',
 'blockipsuccesstext' => '«[[Special:Contributions/$1|$1]]» er blokkert.<br />
 Sjå [[Special:BlockList|blokkeringslista]] for alle blokkeringane.',
 'ipb-blockingself' => 'Du er i ferd med å blokkera deg sjølv. Er du viss på at du ynskjer gjera dette?',
@@ -3993,7 +3995,4 @@ Om ikkje kan du nytta det enkle skjemaet under. Merknaden din vert lagd til på
 'duration-centuries' => '$1 {{PLURAL:$1|hundreår|hundreår}}',
 'duration-millennia' => '$1 {{PLURAL:$1|tusenår|tusenår}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Sider med ein sideeigenskap',
-'pageswithprop-submit' => 'Gå',
 );
index 18c04c4..13e0a46 100644 (file)
@@ -265,7 +265,7 @@ $messages = array(
 'tog-extendwatchlist' => 'କେବଳ ନଗଦ ନୁହେଁ, ସବୁଯାକ ବଦଳକୁ ଦେଖାଇବା ନିମନ୍ତେ ଦେଖଣାତାଲିକାକୁ ବଢ଼ାଇବେ',
 'tog-usenewrc' => 'ନଗଦ ବଦଳରେ ପୃଷ୍ଠା ଅନୁଯାୟୀ ଗୋଷ୍ଠୀ ବଦଳ ଏବଂ ଦେଖଣା (ଜାଭାସ୍କ୍ରିପ୍ଟ ଲୋଡ଼ା)',
 'tog-numberheadings' => 'ଆପେଆପେ-ସଂଖ୍ୟାର ନାମଗୁଡ଼ିକ',
-'tog-showtoolbar' => 'ସମà­\8dପାଦନା à¬\9fà­\81ଲବାର à¬¦à­\87à¬\96ାà¬\87ବà­\87 (à¬\9cାଭାସà­\8dà¬\95à­\8dରିପà­\8dà¬\9f à¬¸à¬\9aଳ à¬\95ରିବà­\87)',
+'tog-showtoolbar' => 'ସମà­\8dପାଦନା à¬\9fà­\81ଲବାର à¬¦à­\87à¬\96ାà¬\87ବà­\87 (à¬\9cାଭାସà­\8dà¬\95à­\8dରିପà­\8dà¬\9f à¬²à­\8bଡ଼ା)',
 'tog-editondblclick' => 'ଦୁଇଥର କ୍ଲିକରେ ପୃଷ୍ଠା ବଦଳାଇବେ (ଜାଭାସ୍କ୍ରିପ୍ଟ ଲୋଡ଼ା)',
 'tog-editsection' => '[ବଦଳାଇବେ] ଲିଙ୍କରେ ବିଭାଗର ସମ୍ପାଦନାକୁ ସଚଳ କରିବେ',
 'tog-editsectiononrightclick' => 'ବିଭାଗ ନାମରେ ଡାହାଣ କ୍ଲିକ କରି ବିଭାଗ ସମ୍ପାଦନାକୁ ସଚଳ କରିବେ (ଜାଭାସ୍କ୍ରିପ୍ଟ ଲୋଡ଼ା)',
@@ -3010,7 +3010,7 @@ MediaWiki ବ୍ୟବହାର କରି [[Special:Import|ପୃଷ୍ଠା 
 'tooltip-n-mainpage-description' => 'ପ୍ରଧାନ ପୃଷ୍ଠା',
 'tooltip-n-portal' => 'ଏହି ପ୍ରକଳ୍ପଟିରେ ଖୋଜା ଖୋଜି ପାଇଁ ଆପଣ କେମିତି ସାହାଯ୍ୟ କରିପାରିବେ',
 'tooltip-n-currentevents' => 'ନଗଦ କାମର ପଛପଟେ ଚାଲିଥିବା କାମର ତଥ୍ୟ',
-'tooltip-n-recentchanges' => 'ବିକିରେ ଏହିମାତ୍ର କରାଯାଇଥିବା ଅଦଳ ବଦଳ',
+'tooltip-n-recentchanges' => 'à­±ିକିରେ ଏହିମାତ୍ର କରାଯାଇଥିବା ଅଦଳ ବଦଳ',
 'tooltip-n-randompage' => 'ଯାହିତାହି ପୃଷ୍ଠାଟିଏ ଖୋଲ',
 'tooltip-n-help' => 'ଖୋଜି ପାଇବା ଭଳି ଜାଗା',
 'tooltip-t-whatlinkshere' => 'ଏଠାରେ ଯୋଡ଼ାଯାଇଥିବା ପୃଷ୍ଠାସବୁର ତାଲିକା',
index 06a3205..932c13a 100644 (file)
@@ -189,23 +189,23 @@ $digitGroupingPattern = "##,##,###";
 
 $messages = array(
 # User preference toggles
-'tog-underline' => 'à¨\85ੰਡਰ-ਲਾà¨\88ਨ à¨²à¨¿à©°à¨\95:',
-'tog-justify' => 'ਪà©\88ਰਾ à¨¸à¨¹à©\80 à¨\95ਰà©\87 .',
-'tog-hideminor' => 'ਮà©\8cਨà¨\9cà©\81ਦਾ à¨¬à¨¦à¨²à¨¾à¨¬ à¨®à©\88 à¨¸à©\88 à¨¨à©\80à¨\95à©\88 à¨¬à¨¦à¨²à¨¾à¨¬ à¨\95à©\8c à¨\9bà©\81ਪਾ à¨\95ਰ à¨°à¨\96à©\87.',
-'tog-hidepatrolled' => 'ਮà©\8cਨà¨\9cà©\81ਦਾ à¨¬à¨¦à¨²à¨¾à¨¬ à¨®à©\88 à¨¸à©\88 à¨¸à¨¹à©\80ਤà¨\95 à¨¬à¨¦à¨²à¨¾à¨¬ à¨\95à©\8c à¨\9bà©\81ਪਾ à¨\95ਰ à¨°à¨\96à©\87.',
+'tog-underline' => 'à¨\95à©\9cà©\80à¨\86à¨\82 à¨\85ਧà©\8bਰà©\87à¨\96ਨ:',
+'tog-justify' => 'ਪਰਿੱà¨\9bà©\87ਦ à¨¸à¨®à¨¾à¨¨ à¨\95ਰà©\8b',
+'tog-hideminor' => 'ਹਾਲ â\80\99à¨\9a à¨¹à©\8bà¨\8f à¨¬à¨¦à¨²à¨¾à¨µ à¨µà¨¿à©±à¨\9a à¨\9bà©\8bà¨\9fà©\87 à¨¬à¨¦à¨²à¨¾à¨µ à¨\9bà©\81ਪਾà¨\93',
+'tog-hidepatrolled' => 'ਹਾਲ â\80\99à¨\9a à¨¹à©\8bà¨\8f à¨¬à¨¦à¨²à¨¾à¨µ à¨µà¨¿à©±à¨\9a à¨\9cਾà¨\82à¨\9aà©\87 à¨¹à©\8bà¨\8f à¨¬à¨¦à¨²à¨¾à¨µ à¨\9bà©\81ਪਾà¨\93',
 'tog-newpageshidepatrolled' => 'ਨਵੀ ਸੁਚੀ ਮੈ ਸੈ ਗਸ਼ਤ ਪਰਚੇ ਕੌ ਛੁਪਾਏ.',
-'tog-extendwatchlist' => 'ਸਾਰà©\80 à¨¨à¨µà©\80 à¨¤à¨¬à¨¦à©\80ਲà©\80à¨\86 à¨¹à©\80 à¨¨à¨¹à©\80 ,ਪà©\82ਰਾਣà©\80 à¨¤à¨¬à¨¦à©\80ਲà©\80à¨\86 à¨¨à©\82à©° à¨µà©\80 à¨¨à¨µà©\80 à¨¸à©\82à¨\9aà©\80 à¨µà¨¿à¨\9a à¨µà¨§à¨¾ à¨\95à©\88 à¨¸à¨¼à¨¾à¨®à©\80ਲ à¨\95ਰà©\8c.',
-'tog-usenewrc' => 'ਤਾà¨\9c਼ਾ à¨¤à¨¬à¨¦à©\80ਲà©\80à¨\86à¨\82 à¨\85ਤà©\87 à¨¨à¨¿à¨\97ਰਾਨà©\80-ਲਿਸà¨\9f à¨µà¨¿à¨\9a à¨¸à¨«à¨¼à©\87 à¨®à©\81ਤਾਬà¨\95 à¨¤à¨¬à¨¦à©\80ਲà©\80à¨\86à¨\82 à¨¦à©\87 à¨\97ਰà©\81ੱਪ à¨¬à¨£à¨¾à¨\93 (à¨\9cਾਵਾ à¨¸à¨\95à©\8dਰਿਪà¨\9f à¨²à©\8bà©\9cà©\80à¨\82ਦà©\80 ਹੈ)',
+'tog-extendwatchlist' => 'à¨\95à©\87ਵਲ à¨¹à¨¾à¨²à¨¿à¨\86 à¨¹à©\80 à¨¨à¨¹à©\80à¨\82, à¨¸à¨\97à©\8bà¨\82 à¨¸à¨¾à¨°à©\87 à¨ªà¨°à¨¿à¨µà¨°à¨¤à¨¨à¨¾à¨\82 à¨¨à©\82à©° à¨µà¨¿à¨\96ਾà¨\89ਣ à¨²à¨\88 à¨§à¨¿à¨\86ਨਸà©\82à¨\9aà©\80 à¨¨à©\82à©° à¨µà¨¿à¨¸à¨¥à¨¾à¨°à¨¿à¨¤ à¨\95ਰà©\8b',
+'tog-usenewrc' => 'ਹਾਲ â\80\99à¨\9a à¨¹à©\8bà¨\8f à¨¬à¨¦à¨²à¨¾à¨µ à¨\85ਤà©\87 à¨§à¨¿à¨\86ਨਸà©\82à¨\9aà©\80 à¨µà¨¿à©±à¨\9a à¨ªà©°à¨¨à©\87 à¨®à©\81ਤਾਬà¨\95 à¨¬à¨¦à¨²à¨¾à¨µ à¨¦à©\87 à¨\97ਰà©\81ੱਪ à¨¬à¨£à¨¾à¨\93 (à¨\9cਾਵਾਸà¨\95à©\8dਰਿਪà¨\9f à¨¦à©\80 à¨\9cਰà©\82ਰਤ ਹੈ)',
 'tog-numberheadings' => 'ਆਟੋ-ਨੰਬਰ ਹੈਡਿੰਗ',
 'tog-showtoolbar' => 'ਐਡਿਟ ਟੂਲਬਾਰ ਵੇਖੋ (JavaScript)',
-'tog-editondblclick' => 'ਦੂਹਰੇ ਕਲਿੱਕ ਨਾਲ਼ ਸਫ਼ੇ ਸੋਧੋ (ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਲੋੜੀਂਦੀ ਹੈ)',
-'tog-editsection' => '[ਸੰਪਾਦਨ] à¨²à¨¿à©°à¨\95ਾà¨\82 à¨\9c਼ਰà©\80à¨\8f à¨¸à©\88à¨\95ਸ਼ਨ à¨¸à©\8bਧ à¨\9aਾਲà©\82 ਕਰੋ',
+'tog-editondblclick' => 'ਦੂਹਰੇ ਕਲਿੱਕ ’ਤੇ ਪੰਨੇ ਨੂੰ ਸੰਪਾਦਿਤ ਕਰੋ (ਜਾਵਾਸਕ੍ਰਿਪਟ ਦੀ ਜਰੂਰਤ ਹੈ)',
+'tog-editsection' => '[ਸੰਪਾਦਨ] à¨\95à©\9cà©\80à¨\86à¨\82 à¨¦à©\81à¨\86ਰਾ à¨\85ਨà©\81ਭਾà¨\97 à¨¸à©°à¨ªà¨¾à¨¦à¨¨ à¨¸à¨®à¨°à©±à¨¥à¨¾à¨µà¨¾à¨¨ ਕਰੋ',
 'tog-editsectiononrightclick' => 'ਸੈਕਸ਼ਨ ਸਿਰਲੇਖਾਂ ਤੇ ਸੱਜੀ ਕਲਿੱਕ ਦੁਆਰਾ ਸੋਧ ਯੋਗ ਕਰੋ (ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਲੋੜੀਂਦੀ ਹੈ)',
 'tog-showtoc' => 'ਟੇਬਲ ਆਫ਼ ਕੰਨਟੈੱਟ ਵੇਖਾਓ (for pages with more than 3 headings)',
 'tog-rememberpassword' => 'ਇਸ ਬਰਾਊਜ਼ਰ ਉੱਤੇ ਮੇਰਾ ਲਾਗਇਨ ਯਾਦ ਰੱਖੋ ($1 {{PLURAL:$1|ਦਿਨ|ਦਿਨਾਂ}} ਲਈ ਵੱਧ ਤੋਂ ਵੱਧ)',
 'tog-watchcreations' => 'ਮੇਰੇ ਵਲੋਂ ਬਣਾਏ ਗਏ ਪੰਨੇ ਅਤੇ ਅੱਪਲੋਡ ਕੀਤੀਆਂ ਫ਼ਾਈਲਾਂ ਮੇਰੀ ਧਿਆਨਸੂਚੀ ਵਿੱਚ ਪਾਓ',
-'tog-watchdefault' => 'ਮà©\87ਰà©\87 à¨µà©±à¨²à©\8bà¨\82 à¨¸à©\8bਧà©\87 à¨\97à¨\8f à¨¸à¨«à¨¼à©\87 à¨\85ਤà©\87 à¨«à¨¼à¨¾à¨\88ਲਾà¨\82 à¨®à©\87ਰà©\80 à¨¨à¨¿à¨\97ਰਾਨà©\80-ਲਿਸà¨\9f à¨µà¨¿ਚ ਪਾਓ',
-'tog-watchmoves' => 'ਮà©\87ਰà©\87 à¨µà©±à¨²à©\8bà¨\82 à¨¬à¨¦à¨²à©\87 à¨¸à¨¿à¨°à¨²à©\87à¨\96ਾà¨\82 à¨µà¨¾à¨²à¨¼à©\87 à¨¸à¨«à¨¼à©\87 à¨\85ਤà©\87 à¨«à¨¼à¨¾à¨\88ਲਾà¨\82 à¨®à©\87ਰà©\80 à¨¨à¨¿à¨\97ਰਾਨà©\80-ਲਿਸà¨\9f à¨µà¨¿ਚ ਪਾਓ',
+'tog-watchdefault' => 'ਮà©\87ਰà©\87 à¨µà©±à¨²à©\8bà¨\82 à¨¸à©°à¨ªà¨¾à¨¦à¨¿à¨¤ à¨\97à¨\8f à¨ªà©°à¨¨à©\87 à¨\85ਤà©\87 à¨«à¨¾à¨\88ਲਾà¨\82 à¨®à©\87ਰà©\80 à¨§à¨¿à¨\86ਨਸà©\82à¨\9aà©\80 à¨µà¨¿à©±ਚ ਪਾਓ',
+'tog-watchmoves' => 'ਮà©\87ਰà©\87 à¨µà©±à¨²à©\8bà¨\82 à¨¸à¨¥à¨¾à¨¨à¨¾à¨\82ਤਰਿਤ à¨ªà©°à¨¨à©\87 à¨\85ਤà©\87 à¨«à¨¾à¨\88ਲਾà¨\82 à¨®à©\87ਰà©\80 à¨§à¨¿à¨\86ਨਸà©\82à¨\9aà©\80 à¨µà¨¿à©±ਚ ਪਾਓ',
 'tog-watchdeletion' => 'ਮੇਰੇ ਵਲੋਂ ਮਿਟਾਏ ਗਏ ਸਫ਼ੇ ਅਤੇ ਫ਼ਾਈਲਾਂ ਮੇਰੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿਚ ਪਾਓ',
 'tog-minordefault' => 'ਸਾਰੇ ਫੇਰ-ਬਦਲਾਂ ’ਤੇ ਮੂਲ ਰੂਪ ਵਿਚ ਛੋਟੀਆਂ ਹੋਣ ਦਾ ਨਿਸ਼ਾਨ ਲਾਓ',
 'tog-previewontop' => 'ਐਡਿਟ ਬਕਸੇ ਤੋਂ ਪਹਿਲਾਂ ਝਲਕ ਵੇਖਾਓ',
@@ -671,7 +671,7 @@ Note that some pages may continue to be displayed as if you were still logged in
 'login-abort-generic' => 'ਤੁਹਾਡੀ ਲਾਗਇਨ ਨਾਕਾਮ ਸੀ - ਰੱਦ',
 'loginlanguagelabel' => 'ਭਾਸ਼ਾ: $1',
 
-# E-mail sending
+# Email sending
 'user-mail-no-addy' => 'ਬਿਨਾਂ ਈ-ਮੇਲ ਪਤਾ ਦਿੱਤੇ ਈ-ਮੇਲ ਭੇਜਣ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ।',
 
 # Change password dialog
@@ -1170,7 +1170,7 @@ $3|'''1''' ਨਤੀਜਾ|'''$3''' ਨਤੀਜੇ}} ਵਖਾਓ।",
 'prefs-advancedwatchlist' => 'ਤਕਨੀਕੀ ਚੋਣਾਂ',
 'prefs-diffs' => 'ਫ਼ਰਕ',
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => 'ਈ-ਮੇਲ ਪਤਾ ਸਹੀ ਲਗਦਾ ਹੈ',
 'email-address-validity-invalid' => 'ਸਹੀ ਈ-ਮੇਲ ਪਤਾ ਦਾਖ਼ਲ ਕਰੋ',
 
@@ -1603,7 +1603,7 @@ to upload files.',
 'listgrouprights-addgroup-all' => 'ਸਾਰੇ ਗਰੁੱਪ ਜੋੜੋ',
 'listgrouprights-removegroup-all' => 'ਸਾਰੇ ਗਰੁੱਪ ਹਟਾਓ',
 
-# E-mail user
+# Email user
 'mailnologin' => 'ਕੋਈ ਭੇਜਣ ਐਡਰੈੱਸ ਨਹੀਂ',
 'mailnologintext' => 'ਦੂਜੇ ਮੈਂਬਰਾਂ ਨੂੰ ਈ-ਮੇਲ ਭੇਜਣ ਲਈ ਤੁਹਾਨੂੰ [[Special:UserLogin|ਲਾਗਇਨ]] ਹੋਣਾ ਅਤੇ ਆਪਣੀਆਂ [[Special:Preferences|ਪਸੰਦਾਂ]] ਵਿਚ ਇਕ ਸਹੀ ਈ-ਮੇਲ ਪਤਾ ਦੇਣਾ ਪਵੇਗਾ।',
 'emailuser' => 'ਇਸ ਵਰਤੋਂਕਾਰ ਨੂੰ ਈ-ਮੇਲ ਭੇਜੋ',
@@ -2119,7 +2119,7 @@ delete|ਹਟਾਉਣ ਦਾ ਚਿੱਠਾ]] ਵੇਖੋ।',
 'monthsall' => 'ਸਭ',
 'limitall' => 'ਸਭ',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'ਈਮੇਲ ਐਡਰੈੱਸ ਪੁਸ਼ਟੀ',
 'confirmemail_send' => 'ਇੱਕ ਪੁਸ਼ਟੀ ਕੋਡ ਭੇਜੋ',
 'confirmemail_sent' => 'ਪੁਸ਼ਟੀ ਈਮੇਲ ਭੇਜੀ ਗਈ।',
index 2cea497..fad29ed 100644 (file)
@@ -808,7 +808,7 @@ Odczekaj chwilę zanim ponowisz próbę.',
 'loginlanguagelabel' => 'Język: $1',
 'suspicious-userlogout' => 'Żądanie wylogowania zostało odrzucone ponieważ wygląda na to, że zostało wysłane przez uszkodzoną przeglądarkę lub buforujący serwer proxy.',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => 'Wystąpił nieznany błąd w funkcji PHP mail()',
 'user-mail-no-addy' => 'Próba wysłania e‐maila bez adresu odbiorcy',
 'user-mail-no-body' => 'Próbowano wysłać e-mail o psutej lub krótkiej treści.',
@@ -1491,7 +1491,7 @@ Jeśli zdecydujesz się je podać, zostaną użyte, by udokumentować Twoje auto
 'prefs-displaywatchlist' => 'Opcje wyświetlania',
 'prefs-diffs' => 'Zmiany',
 
-# User preference: e-mail validation using jQuery
+# User preference: email validation using jQuery
 'email-address-validity-valid' => 'Wygląda na prawidłowy',
 'email-address-validity-invalid' => 'Wymagany jest prawidłowy adres!',
 
@@ -2282,7 +2282,7 @@ Sprawdź stronę z [[{{MediaWiki:Listgrouprights-helppage}}|dodatkowymi informac
 'listgrouprights-addgroup-self-all' => 'Może dodać własne konto do wszystkich grup',
 'listgrouprights-removegroup-self-all' => 'Może usunąć własne konto ze wszystkich grup',
 
-# E-mail user
+# Email user
 'mailnologin' => 'Brak adresu',
 'mailnologintext' => 'Musisz się [[Special:UserLogin|zalogować]] i mieć wpisany aktualny adres e‐mailowy w swoich [[Special:Preferences|preferencjach]], aby móc wysłać e‐mail do innego użytkownika.',
 'emailuser' => 'Wyślij e‐mail do tego użytkownika',
@@ -3136,6 +3136,7 @@ Najprawdopodobniej zostało to spowodowane przez link do zewnętrznej strony int
 'pageinfo-robot-noindex' => 'Nieindeksowalne',
 'pageinfo-views' => 'Odsłon',
 'pageinfo-watchers' => 'Liczba obserwujących',
+'pageinfo-few-watchers' => 'Mniej niż $1 {{PLURAL:$1|obserwujący|obserwujących}}',
 'pageinfo-redirects-name' => 'Liczba przekierowań do tej strony',
 'pageinfo-subpages-name' => 'Liczba podstron tej strony',
 'pageinfo-subpages-value' => '$1 ($2 {{PLURAL:$2|przekierowanie|przekierowania|przekierowań}}; $3 {{PLURAL:$3|bez przekierowania|bez przekierowań|bez przekierowań}})',
@@ -3691,7 +3692,7 @@ Pozostałe pola zostaną domyślnie ukryte.
 'monthsall' => 'wszystkie',
 'limitall' => 'wszystkie',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'Potwierdzanie adresu e‐mail',
 'confirmemail_noemail' => 'Nie podał{{GENDER:|eś|aś|eś/aś}} prawidłowego adresu e‐mail w [[Special:Preferences|preferencjach]].',
 'confirmemail_text' => 'Projekt {{SITENAME}} wymaga weryfikacji adresu e‐mail przed użyciem funkcji korzystających z poczty.
@@ -4144,4 +4145,7 @@ W przeciwnym wypadku można użyć prostego formularza poniżej. Komentarz zosta
 'duration-centuries' => '$1 {{PLURAL:$1|stulecie|stulecia|stuleci}}',
 'duration-millennia' => '$1 {{PLURAL:$1|tysiąclecie|tysiąclecia|tysiącleci}}',
 
+# Image rotation
+'rotate-comment' => 'Obraz został odwrócony o $1 {{PLURAL:$1|stopień|stopnie|stopni}} (w kierunku zgodnym z ruchem wskazówek zegara)',
+
 );
index 7eff256..51107c8 100644 (file)
@@ -1007,7 +1007,7 @@ O registro de bloqueio mais recente é fornecido abaixo, para referência:',
 'userjspreview' => "'''Lembre-se que está apenas testando/prevendo o seu JavaScript particular e que ele ainda não foi salvo!'''",
 'sitecsspreview' => "'''Lembre-se de que você está apenas previsualizando este CSS.'''
 '''Ele ainda não foi salvo!'''",
-'sitejspreview' => "''Lembre-se de que você está apenas previsualizando este código JavaScript.'''
+'sitejspreview' => "'''Lembre-se de que você está apenas previsualizando este código JavaScript.'''
 '''Ele ainda não foi salvo!'''",
 'userinvalidcssjstitle' => "'''Aviso:''' Não existe um tema \"\$1\". Lembre-se que as páginas .css e  .js utilizam um título em minúsculas, exemplo: {{ns:user}}:Alguém/vector.css aposto a {{ns:user}}:Alguém/Vector.css.",
 'updated' => '(Atualizado)',
@@ -2115,8 +2115,10 @@ Talvez fosse melhor que possuissem links para uma página mais específica.</br>
 Uma página é considerada como de desambiguação se utilizar uma predefinição que esteja definida em [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Páginas com uma propriedade de página',
+'pageswithprop-legend' => 'Páginas com uma propriedade de página',
 'pageswithprop-text' => 'Esta página lista as páginas que usam uma determinada propriedade de página.',
 'pageswithprop-prop' => 'Nome da propriedade:',
+'pageswithprop-submit' => 'Ir',
 
 'doubleredirects' => 'Redirecionamentos duplos',
 'doubleredirectstext' => 'Esta página lista as páginas que redirecionam para outros redirecionamentos.
@@ -4096,7 +4098,4 @@ Caso contrário, você poderá usar o formulário simplificado a seguir. Seu com
 'duration-centuries' => '$1 {{PLURAL:$1|século|séculos}}',
 'duration-millennia' => '$1 {{PLURAL:$1|milênio|milênios}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Páginas com uma propriedade de página',
-'pageswithprop-submit' => 'Ir',
 );
index 57be6de..b29addc 100644 (file)
@@ -346,8 +346,8 @@ Parameters:
 'listingcontinuesabbrev' => 'Shown in contiuation of each first letter group. This message follows the first letter.
 
 See http://test.wikipedia.org/wiki/Category:Test_ko?uselang={{SUBPAGENAME}}, for example.',
-'index-category' => 'Name of the [[mw:Help:Tracking categories|tracking category]] where pages with the <nowiki>__INDEX__</nowiki> behaviour switch are listed. For description of this behaviour switch see [[mw:Help:Magic_words#Behavior_switches|MediaWiki]].',
-'noindex-category' => 'Name of the [[mw:Help:Tracking categories|tracking category]] where pages with the <nowiki>__NOINDEX__</nowiki> behaviour switch are listed. For description of this behaviour switch see [[mw:Help:Magic_words#Behavior_switches|MediaWiki]].',
+'index-category' => 'Name of the [[mw:Help:Tracking categories|tracking category]] where pages with the <nowiki>__INDEX__</nowiki> behavior switch are listed. For description of this behavior switch see [[mw:Help:Magic_words#Behavior_switches|MediaWiki]].',
+'noindex-category' => 'Name of the [[mw:Help:Tracking categories|tracking category]] where pages with the <nowiki>__NOINDEX__</nowiki> behavior switch are listed. For description of this behavior switch see [[mw:Help:Magic_words#Behavior_switches|MediaWiki]].',
 'broken-file-category' => 'Name of [[mw:Help:Tracking categories|tracking category]] where pages that embed files that do not exist ("broken images") are listed.',
 'categoryviewer-pagedlinks' => '{{Optional}}
 The pagination links in category viewer. Parameters:
@@ -756,7 +756,8 @@ The format is: "{{int:youhavenewmessagesmulti| [[MediaWiki:Newmessageslink/{{SUB
 This is the link used to collapse a collapsible element. (used as plaintext. No wikitext or html is parsed.)
 
 See also:
-* {{msg-mw|Collapsible-expand}}',
+* {{msg-mw|Collapsible-expand}}
+{{Identical|Collapse}}',
 'collapsible-expand' => '{{Doc-actionlink}}
 This is the link used to expand a collapsible element (used as plaintext. No wikitext or html is parsed.)
 
@@ -814,8 +815,7 @@ See also:
 * {{msg-mw|Accesskey-ca-nstab-main}}
 * {{msg-mw|Tooltip-ca-nstab-main}}
 {{Identical|Page}}',
-'nstab-user' => 'The name for the tab of the user namespace. Example: [[User:Example]]. It is possible to use <nowiki>
-{{GENDER:{{#titleparts:{{BASEPAGENAME}}|1}}|male form|female form}}</nowiki> if needed.
+'nstab-user' => 'The name for the tab of the user namespace. Example: [[User:Example]]. It is possible to use <nowiki>{{GENDER:{{BASEPAGENAME}}|male form|female form}}</nowiki> if needed.
 
 See also:
 * {{msg-mw|Nstab-user}}
@@ -3877,9 +3877,13 @@ This block of text is shown on [[:Special:Disambiguations]].
 
 'pageswithprop' => 'Title for [[Special:PagesWithProp]].
 {{Identical|Page with page property}}',
+'pageswithprop-legend' => 'Legend for the input form on [[Special:PagesWithProp]].
+{{Identical|Page with page property}}',
 'pageswithprop-text' => 'Introductory text for the input form on [[Special:PagesWithProp]]',
 'pageswithprop-prop' => 'Label for the property name input field on [[Special:PagesWithProp]].
 {{Identical|Property name}}',
+'pageswithprop-submit' => 'Label for the submit button on [[Special:PagesWithProp]].
+{{Identical|Go}}',
 
 'doubleredirects' => 'Name of [[Special:DoubleRedirects]] displayed in [[Special:SpecialPages]]',
 'doubleredirectstext' => 'Shown on top of [[Special:Doubleredirects]]',
@@ -8782,9 +8786,7 @@ $4 is the gender of the target user.',
 'duration-centuries' => '{{Related|Duration}}',
 'duration-millennia' => '{{Related|Duration}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Legend for the input form on [[Special:PagesWithProp]].
-{{Identical|Page with page property}}',
-'pageswithprop-submit' => 'Label for the submit button on [[Special:PagesWithProp]].
-{{Identical|Go}}',
+# Image rotation
+'rotate-comment' => 'Edit summary for the act of rotating an image.',
+
 );
index 0a58032..59c163e 100644 (file)
@@ -2086,8 +2086,10 @@ Acestea ar trebui să conțină legături către un articol mai potrivit.<br />
 O pagină este considerată o pagină de dezambiguizare dacă folosește formate care apar la [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Pagini cu o proprietate de pagină',
+'pageswithprop-legend' => 'Pagini cu o proprietate de pagină',
 'pageswithprop-text' => 'Această pagină listează paginile care utilizează o anumită proprietate de pagină.',
 'pageswithprop-prop' => 'Numele proprietății:',
+'pageswithprop-submit' => 'Du-te',
 
 'doubleredirects' => 'Redirecționări duble',
 'doubleredirectstext' => 'Această listă conține pagini care redirecționează la alte pagini de redirecționare.
@@ -4064,7 +4066,7 @@ Imaginile sunt afișate la rezoluția lor maximă, în timp ce alte tipuri de fi
 'duration-centuries' => '$1 {{PLURAL:$1|secol|secole|de secole}}',
 'duration-millennia' => '$1 {{PLURAL:$1|mileniu|milenii|de milenii}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Pagini cu o proprietate de pagină',
-'pageswithprop-submit' => 'Du-te',
+# Image rotation
+'rotate-comment' => 'Imagine rotită în sensul acelor de ceasornic cu $1 {{PLURAL:$1|grad|grade|de grade}}',
+
 );
index 0157ad5..556ec83 100644 (file)
@@ -1864,8 +1864,10 @@ Arrecuèrdete de condrollà pe otre collegaminde a le template apprime de scange
 'Na pàgene jè trattate cumme pàgene de disambiguazione ce tu ause 'nu template ca è appundate da [[MediaWiki:Disambiguationspage]]",
 
 'pageswithprop' => "Pàggene cu 'na probbietà d'a pàgene",
+'pageswithprop-legend' => "Pàggene cu 'na probbietà d'a pàgene",
 'pageswithprop-text' => "Sta pàgene elenghe le pàggene ca ausane 'na particolare probbietà d'a pàgene.",
 'pageswithprop-prop' => "Nome d'a probbietà:",
+'pageswithprop-submit' => 'Véje',
 
 'doubleredirects' => 'Ridirezionaminde a doppie',
 'doubleredirectstext' => "Sta pàgene elenghe le pàggene ca se ridirezionane sus a otre pàggene de ridirezionaminde.
@@ -4093,7 +4095,7 @@ Ce nò, tu puè ausà 'u module facile aqquà sotte. 'U commende tune avène agg
 'duration-centuries' => '$1 {{PLURAL:$1|sechele|sechele}}',
 'duration-millennia' => '$1 {{PLURAL:$1|millennie|millennie}}',
 
-# Unknown messages
-'pageswithprop-legend' => "Pàggene cu 'na probbietà d'a pàgene",
-'pageswithprop-submit' => 'Véje',
+# Image rotation
+'rotate-comment' => 'Immaggine rotate de $1 {{PLURAL:$1|grade}} in sienze orarie',
+
 );
index 956bf31..5de63cf 100644 (file)
@@ -2195,8 +2195,10 @@ $1',
 Страница считается многозначной, если на ней размещён шаблон, имя которого указано на странице [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Страницы с переопределёнными свойствами',
+'pageswithprop-legend' => 'Страницы с переопределёнными свойствами',
 'pageswithprop-text' => 'Здесь перечислены страницы, у которых были вручную переопределены отдельные свойства.',
 'pageswithprop-prop' => 'Название свойства:',
+'pageswithprop-submit' => 'Найти',
 
 'doubleredirects' => 'Двойные перенаправления',
 'doubleredirectstext' => 'На этой странице представлен список перенаправлений на другие перенаправления.
@@ -4205,8 +4207,8 @@ MediaWiki распространяется в надежде, что она бу
 'logentry-patrol-patrol-auto' => '$1 автоматически {{GENDER:$1|отпатрулировал|отпатрулировала}} версию $4 страницы $3',
 'logentry-newusers-newusers' => 'Создана учётная запись $1',
 'logentry-newusers-create' => 'Создана учётная запись $1',
-'logentry-newusers-create2' => '$1 {{GENDER:$2|создал|создала}} учётную запись для $3',
-'logentry-newusers-byemail' => 'Учетная запись пользователя $3 была создана $1 и пароль был отправлен по электронной почте',
+'logentry-newusers-create2' => '$1 {{GENDER:$2|создал|создала}} учётную запись $3',
+'logentry-newusers-byemail' => '$1 {{GENDER:$2|создал|создала}} учётную запись $3 и пароль был отправлен по электронной почте',
 'logentry-newusers-autocreate' => 'Автоматически создана учётная запись $1',
 'logentry-rights-rights' => '$1 {{GENDER:$1|изменил|изменила}} членство в группах для $3 с $4 на $5',
 'logentry-rights-rights-legacy' => '$1 {{GENDER:$1|изменил|изменила}} членство в группах для $3',
@@ -4286,7 +4288,4 @@ MediaWiki распространяется в надежде, что она бу
 'duration-centuries' => '$1 {{PLURAL:$1|век|века|веков}}',
 'duration-millennia' => '$1 {{PLURAL:$1|тысячелетие|тысячелетия|тысячелетий}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Страницы с переопределёнными свойствами',
-'pageswithprop-submit' => 'Найти',
 );
index 4c28cab..a09a709 100644 (file)
@@ -13,6 +13,7 @@
  * @author Irena Plahuta
  * @author McDutchie
  * @author Smihael
+ * @author Vadgt
  * @author XJamRastafire
  * @author Yerpo
  * @author romanm
@@ -1998,8 +1999,10 @@ Namesto tega bi morda bilo bolje, da se povezujejo na primernejše strani.<br />
 Stran se obravnava kot razločitvena, če uporablja predloge, povezane z [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Strani z lastnostmi strani',
+'pageswithprop-legend' => 'Strani z lastnostmi strani',
 'pageswithprop-text' => 'Stran navaja vse strani, ki uporabljajo določene lastnosti strani.',
 'pageswithprop-prop' => 'Ime lastnosti:',
+'pageswithprop-submit' => 'Pojdi',
 
 'doubleredirects' => 'Dvojne preusmeritve',
 'doubleredirectstext' => 'Ta stran navaja strani, ki se preusmerjajo na druge preusmeritvene strani.
@@ -3985,7 +3988,7 @@ V nasprotnem primeru lahko uporabite preprost obrazec spodaj. Vašo pripombo bom
 'duration-centuries' => '$1 {{PLURAL:$1|stoletje|stoletji|stoletja|stoletij}}',
 'duration-millennia' => '$1 {{PLURAL:$1|tisočletje|tisočletji|tisočletja|tisočletij}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Strani z lastnostmi strani',
-'pageswithprop-submit' => 'Pojdi',
+# Image rotation
+'rotate-comment' => 'Slika zavrti s  $1  {{PLURAL:$1| degree|degrees}} v smeri urinega kazalca',
+
 );
index 9a531b8..d0aec6b 100644 (file)
@@ -2098,8 +2098,10 @@ De bör troligtvis ändras så att de länkar till en mer passande sida iställe
 En sida anses vara en förgreningssida om den inkluderar en mall som länkas till från [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Sidor med en sidegenskap',
+'pageswithprop-legend' => 'Sidor med en sidegenskap',
 'pageswithprop-text' => 'Denna sida listar sidor som använder en speciell sidegenskap.',
 'pageswithprop-prop' => 'Egenskapsnamn:',
+'pageswithprop-submit' => 'Gå',
 
 'doubleredirects' => 'Dubbla omdirigeringar',
 'doubleredirectstext' => 'Det här är en lista över sidor som dirigerar om till andra omdirigeringssidor. Varje rad innehåller länkar till den första och andra omdirigeringsidan, samt till målet för den andra omdirigeringen. Målet för den andra omdirigeringen är ofta den "riktiga" sidan, som den första omdirigeringen egentligen ska leda till.
@@ -4100,7 +4102,7 @@ Annars kan du använda det enkla formuläret nedan. Din kommentar kommer att lä
 'duration-centuries' => '$1 {{PLURAL:$1|sekel|sekel}}',
 'duration-millennia' => '$1 {{PLURAL:$1|millennium|millennier}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Sidor med en sidegenskap',
-'pageswithprop-submit' => 'Gå',
+# Image rotation
+'rotate-comment' => 'Bilden roteras $1 {{PLURAL:$1|grad|grader}} medurs',
+
 );
index 371a819..9a9c71f 100644 (file)
@@ -77,7 +77,7 @@ $messages = array(
 'tog-hidepatrolled' => 'Пинҳон кардани вироишҳои гаштхӯрда дар тағйироти охир',
 'tog-newpageshidepatrolled' => 'Пинҳони саҳифаҳои гаштхӯрда аз феҳристи саҳифаҳои нав',
 'tog-extendwatchlist' => 'Густариши феҳристи пайгириҳо барои нишон додани ҳамаи тағйиротҳо, на танҳо аз ҳама охирин',
-'tog-usenewrc' => 'Ð\90з Ñ\82аÒ\93йиÑ\80оÑ\82и Ð¾Ñ\85иÑ\80и Ð³Ñ\83Ñ\81Ñ\82аÑ\80иÑ\88Ñ\91Ñ\84Ñ\82а Ð¸Ñ\81Ñ\82иÑ\84ода Ð±Ð°Ñ\80ед(ҶаваСкÑ\80ипÑ\82 Ð»Ð¾Ð·Ð¸Ð¼ Ð°Ñ\81т)',
+'tog-usenewrc' => 'Ð\93Ñ\83Ñ\80ӯҳбандии Ñ\82аÒ\93ийÑ\80оÑ\82 Ð±Ð°Ñ\80 Ð¿Ð¾Ñ\8fи Ñ\81аÑ\84ҳа Ð´Ð°Ñ\80 Ñ\82аÒ\93ийÑ\80оÑ\82и Ð¾Ñ\85иÑ\80 Ð²Ð° Ñ\84еҳÑ\80иÑ\81Ñ\82и Ð¿Ð°Ð¹Ð³Ð¸Ñ\80иҳо (ниÑ\91зманди Ò¶Ð°Ð²Ð°Ð¡ÐºÑ\80ипт)',
 'tog-numberheadings' => 'шуморагузори~и худкори инвонҳо',
 'tog-showtoolbar' => 'Намоиши навори абзори вироиш (JavaScript)',
 'tog-editondblclick' => 'Вироиш намудани саҳифаҳо ҳангоми ду карат пахш намудани тугмаи мушак (JavaScript)',
@@ -85,17 +85,17 @@ $messages = array(
 'tog-editsectiononrightclick' => 'Ба кор андохтани вироиши сарлавҳаҳои қисматҳо бо клики рост (ҶаваСкрипт)',
 'tog-showtoc' => 'Намоиши феҳристи мундариҷон (барои мақолаҳои бо беш аз 3 сарлавҳа)',
 'tog-rememberpassword' => 'Вуруди манро дар ин мурургар дар хотир нигоҳ дор (ҳадди аксар то $1 {{PLURAL:$1|рӯз|рӯз}})',
-'tog-watchcreations' => 'Ð\94оÑ\85ил Ð½Ð°Ð¼Ñ\83дани Ñ\81аҳиÑ\84аҳое, ÐºÐ¸ Ð¼Ð°Ð½ Ñ\81оÑ\85Ñ\82аам Ð±Ð° Ñ\84еҳÑ\80иÑ\81Ñ\82и Ð½Ð°Ð·Ð°Ñ\80оÑ\82и Ð¼Ð°Ð½',
-'tog-watchdefault' => 'Саҳифаҳои эҷодкардаамро ба феҳристи пайгириам илова кунед',
-'tog-watchmoves' => 'Саҳифаҳои кӯчонидаамро ба феҳристи пайгириҳоям илова кунед',
-'tog-watchdeletion' => 'Саҳифаҳои эҷодкардаи манро ба феҳристи пайгириҳоям илова кунед',
+'tog-watchcreations' => 'СаҳиÑ\84аҳое, ÐºÐ¸ Ð¼ÐµÑ\81озам Ð²Ð° Ð¿Ð°Ñ\80вандаҳое, ÐºÐ¸ Ð±Ð¾Ñ\80гÑ\83зоÑ\80Ó£ Ð¼ÐµÐºÑ\83нам Ð±Ð° Ñ\84еҳÑ\80иÑ\81Ñ\82и Ð¿Ð°Ð¹Ð³Ð¸Ñ\80иҳоÑ\8fм Ð°Ñ\84зÑ\83да Ñ\88авад.',
+'tog-watchdefault' => 'Саҳифаҳо ва парвандаҳое, ки вироиш мекунам ба феҳристи пайгириҳоям афзуда шавад',
+'tog-watchmoves' => 'Саҳифаҳо ва парвандаҳое, ки мунтақил мекунам ба феҳристи пайгириҳоям афзуда шавад',
+'tog-watchdeletion' => 'Саҳифаҳо ва парвандаҳое, ки ҳазф мекунам ба феҳристи пайгириҳоям афзуда шавад',
 'tog-minordefault' => 'Пешфарзи ҳамаи вироишҳоро ҷузъи ишора кунед',
 'tog-previewontop' => 'Намоиши пешнамоиши қаблӣ пеш аз қуттии вироиш ва на пас аз он',
 'tog-previewonfirst' => 'Нишон додани пешнамоиш дар нахустин вироиш',
 'tog-nocache' => 'Ҳофизаи ниҳонии саҳифа дар мурургар ғайрифаъол шавад',
-'tog-enotifwatchlistpages' => 'Агар саҳифае мавриди пайгирии ман тағйир карда шавад ба ман тариқи почтаи электронӣ пайём бифиристед.',
+'tog-enotifwatchlistpages' => 'Агар сафҳа ё парвандае аз феҳристи пайгириҳоям вироиш шуд ба ман номае фиристода шавад',
 'tog-enotifusertalkpages' => 'Ҳангоме ки дар саҳифаи корбариам тағйир дода мешавад ба ман тариқи почтаи электронӣ пайём бифиристед.',
-'tog-enotifminoredits' => 'Ð\91аÑ\80ои Ñ\82аÒ\93йиÑ\80оÑ\82и Ò·Ñ\83зÑ\8aи Ð±Ð° Ð¼Ð°Ð½ Ñ\82аÑ\80иÒ\9bи Ð¿Ð¾Ñ\87Ñ\82аи Ñ\8dлекÑ\82Ñ\80онӣ Ð¿Ð°Ð¹Ñ\91м Ð±Ð¸Ñ\84иÑ\80иÑ\81Ñ\82ед.',
+'tog-enotifminoredits' => 'Ð\91аÑ\80ои Ñ\82аÒ\93ийÑ\80оÑ\82и Ò·Ñ\83зÑ\8aÓ£ Ð´Ð°Ñ\80 Ñ\81аÑ\84ҳаҳо Ð²Ð° Ð¿Ð°Ñ\80вандаҳо Ò³Ð°Ð¼ Ð±Ð° Ð¼Ð°Ð½ Ð½Ð¾Ð¼Ð°Ðµ Ñ\84иÑ\80иÑ\81Ñ\82ода Ñ\88авад',
 'tog-enotifrevealaddr' => 'Нишонаи почтаи электронии ман дар номаҳои иттилорасонӣ қайд шавад',
 'tog-shownumberswatching' => 'Нишон додани шумораи корбарони пайгир',
 'tog-oldsig' => 'Пешнамоиши имзои вуҷуддошта:',
@@ -118,7 +118,7 @@ $messages = array(
 
 'underline-always' => 'Доимо',
 'underline-never' => 'Ҳеҷгоҳ',
-'underline-default' => 'Пешфарзи мурургар',
+'underline-default' => 'Пӯст ё мурургари пешфарз',
 
 # Font style option in Special:Preferences
 'editfont-style' => 'Сабки қалами ҷаъбаи вироиш:',
@@ -196,14 +196,15 @@ $messages = array(
 'listingcontinuesabbrev' => 'идома',
 'index-category' => 'Саҳифаҳои намояшуда',
 'noindex-category' => 'Саҳифаҳои намоиянашуда',
+'broken-file-category' => 'Саҳифаҳои дорои пайванди шикаста ба парванда',
 
 'about' => 'Дар бораи',
 'article' => 'Саҳифаи мӯҳтаво',
 'newwindow' => '(дар равзанаи ҷадид боз мешавад)',
 'cancel' => 'Лағв',
 'moredotdotdot' => 'Бештар...',
-'mypage' => 'Саҳифаи ман',
-'mytalk' => 'Ð\93Ñ\83Ñ\84Ñ\82Ñ\83гӯи Ð¼Ð°Ð½',
+'mypage' => 'Саҳифа',
+'mytalk' => 'Ð\91аҳÑ\81',
 'anontalk' => 'Баҳс бо ин IP',
 'navigation' => 'Гаштан',
 'and' => '&#32;ва',
@@ -424,7 +425,7 @@ $1',
 'viewsource' => 'Намоиши матни вики',
 'actionthrottled' => 'Ҷилави амали шумо гирифта шуд',
 'actionthrottledtext' => 'Ба манзури ҷилавгирӣ аз спам, шумо иҷоза надоред, ки чунин амалеро беш аз чанд бор дар як муддати замони кӯтоҳ анҷом бидиҳед. Лутфан пас аз чанд дақиқа дубора талош кунед.',
-'protectedpagetext' => 'Ин саҳифа барои ҷилавгирӣ аз вироиш қуфл шудааст.',
+'protectedpagetext' => 'Ин саҳифа барои ҷилавгирӣ аз вироиш ва дигар амалҳо қуфл шудааст.',
 'viewsourcetext' => 'Шумо метавонед матни викии ин саҳифаро назар кунед ё нусха бардоред:',
 'protectedinterface' => 'Ин саҳифа ороишдиҳандаи матни ин нармафзор аст, ва ба манзури пешгирӣ аз харобкорӣ қуфл шудааст.',
 'editinginterface' => "'''Огоҳӣ:''' Шумо саҳифаеро вироиш карда истодаед, ки матни интерфейси барнома мебошад. Тағйироти ин саҳифа барои намуди интерфейси дигар корбарон таъсир хоҳад расонид. Барои тарҷумаҳо, лутфан аз [//translatewiki.net/wiki/Main_Page?setlang=tg Бетавики], ки лоиҳаи маҳаликунонии МедиаВики мебошад, истифода кунед.",
@@ -464,6 +465,7 @@ $1',
 'createaccount' => 'Ҳисоби ҷадидеро созед',
 'gotaccount' => "Ҳисоби корбарӣ доред? '''$1'''.",
 'gotaccountlink' => 'Вуруд шавед',
+'userlogin-resetlink' => 'Ҷузъиёти вурудро фаромӯш кардаед?',
 'createaccountmail' => 'бо почтаи электронӣ',
 'createaccountreason' => 'Сабаб:',
 'badretype' => 'Калимаҳои убуре, ки ворид кардаед бо ҳамдигар мувофиқат намекунанд.',
@@ -529,12 +531,18 @@ $1',
 'resetpass_forbidden' => 'Дар {{SITENAME}} калимаҳои убурро наметавон тағйир дод',
 'resetpass-no-info' => 'Барои дастрасии мустақим ба ин саҳифа шумо бояд ба систем ворид шуда бошед.',
 'resetpass-submit-loggedin' => 'Тағйири гузарвожа',
+'resetpass-submit-cancel' => 'Лағв',
 'resetpass-wrong-oldpass' => 'Гузарвожаи мувақат ё охир номӯътабар.
 Мумкин аст, ки шумо аллакай гузарвожаатонро бо муваффақият тағйир дода бошед ё дархости як гузарвожаи мувақатӣ карда бошед.',
 'resetpass-temp-password' => 'Гузарвожаи муваққатӣ:',
 
 # Special:PasswordReset
-'passwordreset-username' => 'Номи корбарӣ',
+'passwordreset-username' => 'Номи корбарӣ:',
+'passwordreset-emailelement' => 'Номи корбарӣ: $1
+Гузарвожаи муваққатӣ: $2',
+
+# Special:ChangeEmail
+'changeemail-cancel' => 'Лағв',
 
 # Edit page toolbar
 'bold_sample' => 'Матни пурранг',
@@ -627,7 +635,8 @@ $1',
 'userinvalidcssjstitle' => "'''Ҳушдор:'''Пӯсте бо номи \"\$1\" вуҷуд надорад. Таваҷҷӯҳ кунед ки саҳифаҳои .css ва .js бо ҳарфҳои хурд навишта мешаванд, Намуна. {{ns:user}}:Фу/vector.css дар муқобили корбар {{ns:user}}:Фу/Vector.css.",
 'updated' => '(Ба рӯз шуда)',
 'note' => "'''Эзоҳ:'''",
-'previewnote' => "'''Ин фақат пешнамоиш аст; дигаргуниҳо ҳоло захира нашудаанд!'''",
+'previewnote' => "'''Ба ёд дошта бошед, ки ин фақат пешнамоиш аст.'''
+Тағийроти шумо ҳанӯз захира нашудааст!",
 'previewconflict' => 'Ин пешнамоиш аккоскунандаи матни ноҳияи вироиш дар боло аст ва агар онро захира кунед бо ҳамин шакл нишода дода хоҳад шуд.',
 'session_fail_preview' => "'''Бубахшед! Аз сабаби аз даст рафтани иттилооти нишасти корбарӣ, наметавонем вироишҳои шуморо пардозиш кунем.
 Лутфан дубора саъй кунед. Агар боз бо ҳамин паём рӯ ба рӯ шавед, аз систем хориҷ шавед ва муҷаддадан ворид шавед.'''",
@@ -681,6 +690,9 @@ $1',
 Шумо зарурияти вироиши ин саҳифаро дида баромаданатон лозим.
 Сабти ҳазфшавии ин саҳифа барои фароҳам овардани имкониятҳои қулай оварда шудааст:",
 
+# Parser/template warnings
+'post-expand-template-argument-category' => 'Саҳифаҳои ҳавои шаблонҳои бо параметрҳои нодида гирифташуда',
+
 # "Undo" feature
 'undo-success' => 'Ин вироиш метавонад ботил шавад. Лутфан муқоисаи зеринро барои таъйид кардани амалӣ худ, баррасӣ кунед, ва баъдан барои анҷом додани ботилкунии вироиш тағйироти зеринро захира кунед.',
 'undo-failure' => 'Ба иллати бархӯрдани вироишҳои дар миён омада, ин вироишро ботил наметавон кард.',
@@ -711,6 +723,7 @@ $1',
 Шарҳ: (феълӣ) тафовут бо нусхаи феълӣ
 (қаблӣ) = тафовут бо нусхаи феълӣ, ҷузъ = вироиши ҷузъӣ',
 'history-fieldset-title' => 'Мурури таърих',
+'history-show-deleted' => 'Фақат ҳазфшуда',
 'histfirst' => 'Аввалин',
 'histlast' => 'Охирин',
 'historysize' => '({{PLURAL:$1|1 байт|$1 байт}})',
@@ -754,6 +767,7 @@ $1',
 'revdelete-success' => "'''Тағйири намоёнии нусха бо муваффақият анҷом шуд.'''",
 'logdelete-success' => "'''Тағйири намоёнии маврид бо муваффақият анҷом шуд.'''",
 'revdel-restore' => 'Тағйири падидорӣ',
+'revdel-restore-deleted' => 'нусхаҳои ҳазфшуда',
 'revdel-restore-visible' => 'нусхаҳои намоён',
 'pagehist' => 'Таърихи саҳифа',
 'deletedhist' => 'Таърихи ҳазфшуда',
@@ -796,7 +810,7 @@ $1',
 'lineno' => 'Сатри $1:',
 'compareselectedversions' => 'Нусхаҳои интихобшударо муқоиса кунед',
 'editundo' => 'ботил',
-'diff-multi' => '({{PLURAL:$1|вироиши миёнӣ|$1 вироишоти миёнӣ}} нишон дода нашудааст.)',
+'diff-multi' => '({{PLURAL:$1|як|$1}} вироиш миёнӣ тавассути {{PLURAL:$2|як|$2}} корбар нишон дода нашудааст)',
 
 # Search results
 'searchresults' => 'Натиҷаҳои ҷустуҷӯ',
@@ -813,16 +827,19 @@ $1',
 'nextn' => 'баъдӣ {{PLURAL:$1|$1}}',
 'viewprevnext' => 'Намоиш ($1 {{int:pipe-separator}} $2) ($3)',
 'searchmenu-legend' => 'Гузинаҳои ҷустуҷӯ',
+'searchmenu-exists' => "'''Саҳифае бо номи \"[[:\$1]]\" дар ин вики вуҷуд дорад.'''",
 'searchmenu-new' => "'''Эҷоди саҳифаи \"[[:\$1]]\" дар ин вики!'''",
 'searchhelp-url' => 'Help:Мундариҷа',
-'searchprofile-articles' => 'Саҳифаҳои мӯҳтавоӣ',
-'searchprofile-project' => 'Саҳифаҳои лоиҳа',
-'searchprofile-images' => 'Парвандаҳо',
+'searchprofile-articles' => 'Саҳифаҳои мӯҳтаво',
+'searchprofile-project' => 'Саҳифаҳои роҳномо ва лоиҳа',
+'searchprofile-images' => 'Чандрасонаӣ',
+'searchprofile-everything' => 'Ҳамачиз',
 'searchprofile-advanced' => 'Пешрафта',
 'searchprofile-articles-tooltip' => 'Ҷустуҷӯ дар $1',
 'searchprofile-project-tooltip' => 'Ҷустуҷӯ дар $1',
 'searchprofile-images-tooltip' => 'Ҷустуҷӯи парвандаҳо',
 'searchprofile-everything-tooltip' => 'Ҷустуҷӯи ҳамаи мӯҳтаво (бо ҳисоби саҳифаҳои баҳс)',
+'searchprofile-advanced-tooltip' => 'Ҷустуҷӯ дар фазоҳои номи дилхоҳ',
 'search-result-size' => '$1 ({{PLURAL:$2|1 калима|$2 калимаҳо}})',
 'search-result-score' => 'Иртибот: $1%',
 'search-redirect' => '(тағйири масир $1)',
@@ -838,6 +855,7 @@ $1',
 'showingresultsnum' => "Намоиши {{PLURAL:$3|'''1''' натиҷа|'''$3''' натоиҷ}} оғоз аз #'''$2'''.",
 'nonefound' => "'''Эзоҳ''': Танҳо чанд фазоиномҳо аз рӯи пешфарш ҷустуҷӯ мешаванд.
 Ҷустуҷӯи худро бо пешванди ''ҳама:'' барои ҷустуҷӯи мӯҳтавои пурра (саҳифаҳои баҳс, шаблонҳо ва ғайраҳо) такрор кунед, ё фазои номи дилхоҳро чун пешванд истифода баред.",
+'search-nonefound' => 'Натиҷаи муносиб бо дархост пайдо нашуд.',
 'powersearch' => 'Ҷустуҷӯ',
 'powersearch-legend' => 'Ҷустуҷӯи пешрафта',
 'powersearch-ns' => 'Ҷустуҷӯ дар фазоҳои ном:',
@@ -856,7 +874,7 @@ $1',
 
 # Preferences page
 'preferences' => 'Тарҷиҳот',
-'mypreferences' => 'Тарҷиҳоти ман',
+'mypreferences' => 'Танзимот',
 'prefs-edits' => 'Шумораи вироишҳо:',
 'prefsnologin' => 'Ба систем ворид нашудаед',
 'prefsnologintext' => 'Барои танзими тарҷиҳоти корбарӣ бояд [[Special:UserLogin|вуруд ба систем шавед]].',
@@ -916,7 +934,7 @@ $1',
 'gender-female' => 'Зан',
 'email' => 'Почтаи электронӣ',
 'prefs-help-realname' => 'Номи ҳақиқӣ ихтиёрӣ ва агар шумо онро пешниҳод кунед онро ҳамчун муаллифи эҷодиётатон ёдоварӣ карда хоҳад шуд.',
-'prefs-help-email' => 'Нишонаи почтаи электронӣ (ихтиёрӣ); тамоси дигар корбарон бо шуморо ба василаи номаи электронӣ аз тариқи саҳифаи корбарӣ ё саҳифаи баҳси корбарӣ, бидуни ниёз ба фош кардани сомона ва нишонаи воқеъи почтаи электронии шумо мумкин месозад.',
+'prefs-help-email' => 'Нишонаи электронӣ ихтиёрист, аммо фиристодани гузарвожаи навро агар гузарвожаи худро фаромӯш кунед мумкин мегардад.',
 'prefs-help-email-required' => 'Нишони почтаи электрони лозим аст.',
 
 # User rights
@@ -1022,6 +1040,10 @@ $1',
 'recentchanges-legend' => 'Ихтиёроти тағйироти охирин',
 'recentchanges-summary' => 'Назорати тағйиротҳои навтарин дар Википедиа дар ҳамин саҳифа аст.',
 'recentchanges-feed-description' => 'Радёбии охирин тағйироти ин вики дар ин хурд.',
+'recentchanges-label-newpage' => 'Ин вироиш саҳифаи нав эҷод кард',
+'recentchanges-label-minor' => 'Ин вироиши ҷузъи аст',
+'recentchanges-label-bot' => 'Ин вироишро робот анҷом додааст',
+'recentchanges-label-unpatrolled' => 'Ин вироиш ҳанӯз гаштзанӣ нашудааст',
 'rcnote' => "Дар поён  {{PLURAL:$1|'''1''' тағйире аст|'''$1''' тағйирот мебошанд}}, ки дар давоми {{PLURAL:$2|рӯҳ|'''$2''' рӯзҳои}} охир, сар карда аз $5, $4.",
 'rcnotefrom' => 'Дар зер тағйиротҳои охирин аз <b>$2</b> (то <b>$1</b> нишон дода шудааст).',
 'rclistfrom' => 'Нишон додани тағйиротҳои нав сар карда аз $1',
@@ -1140,7 +1162,7 @@ $1',
 'upload-curl-error28-text' => 'Ин сомона беш аз андоза дар посух тӯл кард. Лутфан баррасӣ кунед, ки оё сомона фаъол ва бар хат аст ё на. Сипас лаҳзае интизор шавед ва дубора талош кунед. Шояд бад набошад дар вақти н он қадар банд дубора талош кунед.',
 
 'license' => 'Иҷозатнома:',
-'license-header' => 'Иҷозатнома:',
+'license-header' => 'Иҷозатнома',
 'nolicense' => 'Ҳеҷ яке интихоб нашудааст',
 'license-nopreview' => '(Пешнамоиш вуҷуд надорад)',
 'upload_source_url' => '(як нишони интернетии мӯътабар ва оммавӣ)',
@@ -1306,6 +1328,7 @@ $1',
 'protectedtitlestext' => 'Унвонҳои зерин аз эҷод муҳофизат шудаанд',
 'protectedtitlesempty' => 'Дар ҳоли ҳозир ҳеҷ унвоне бо ин параметрҳо муҳофизат нащудааст',
 'listusers' => 'Рӯйхати корбарон',
+'usercreated' => '{{GENDER:$3|Эҷодшуда}} дар таърихи $1 дар соати $2',
 'newpages' => 'Саҳифаҳои нав',
 'newpages-username' => 'Номи корбар:',
 'ancientpages' => 'Саҳифаҳои кӯҳнатарин',
@@ -1386,7 +1409,7 @@ Also see [[Special:WantedCategories|wanted categories]].',
 'listgrouprights-helppage' => 'Help:Дастрасиҳои гурӯҳӣ',
 'listgrouprights-members' => '(феҳристи аъзоён)',
 
-# E-mail user
+# Email user
 'mailnologin' => 'Нишонае аз фиристанда вуҷуд надорад',
 'mailnologintext' => 'Барои фиристодани почтаи электронӣ барои корбарони дигар бояд [[Special:UserLogin|ба систем ворид шавед]] ва нишонаи почтаи электронии мӯътабар дар [[Special:Preferences|тарҷиҳоти]] худ дошта бошед.',
 'emailuser' => 'Фиристодани email ба ин корбар',
@@ -1408,8 +1431,9 @@ Also see [[Special:WantedCategories|wanted categories]].',
 'emailsenttext' => 'Номаи почтаи электронии шумо фиристода шуд.',
 
 # Watchlist
-'watchlist' => 'Феҳристи назароти ман',
-'mywatchlist' => 'Феҳристи назароти ман',
+'watchlist' => 'Феҳристи пайгирӣ',
+'mywatchlist' => 'Феҳристи пайгириҳо',
+'watchlistfor2' => 'Барои $1 $2',
 'nowatchlist' => 'Дар феҳристи пайгириҳои шумо ҳеҷ мавриде нест.',
 'watchlistanontext' => 'Лутфан барои мушоҳида ва вироиши феҳристи пайгириҳои худ аз $1 истифода кунед.',
 'watchnologin' => 'Вуруд нашуда',
@@ -1486,6 +1510,7 @@ $NEWPAGE
 'historywarning' => 'Ҳушдор: Саҳифае ки шумо ҳазф карданиед, таърих дорад:',
 'confirmdeletetext' => 'Шумо дар ҳоли ҳазф кардани як саҳифа ё аксе аз пойгоҳ дода ҳамроҳ бо тамоми таърихи он ҳастед. Лутфан ин амалро тасдиқ кунед ва итминон ҳосил кунед, ки оқибати ин корро медонед ва ин амалро мутобиқи [[{{MediaWiki:Policy-url}}|сиёсати ҳазф]] анҷом медиҳед.',
 'actioncomplete' => 'Амал иҷро шуд',
+'actionfailed' => 'Амал номуваффақ шуд',
 'deletedtext' => '"$1" ҳазф шудааст.
 Нигаред ба $2 барои гузориши ҳазфи охирин.',
 'dellogpage' => 'Гузоришҳои ҳазф',
@@ -1615,9 +1640,9 @@ $1',
 'blanknamespace' => '(Аслӣ)',
 
 # Contributions
-'contributions' => 'Ҳиссагузории корбар',
+'contributions' => 'Ҳиссагузориҳои {{GENDER:$1|корбар}}',
 'contributions-title' => 'Ҳиссагузориҳои корбар барои $1',
-'mycontris' => 'Хиссагузории ман',
+'mycontris' => 'Ҳиссагузориҳо',
 'contribsub2' => 'Барои $1 ($2)',
 'nocontribs' => 'Ҳеҷ тағйире бо ин мушаххасот пайдо нашуд.',
 'uctop' => '(боло)',
@@ -1628,7 +1653,9 @@ $1',
 'sp-contributions-newbies-sub' => 'Барои навкорон',
 'sp-contributions-blocklog' => 'Гузориши басташуданҳо',
 'sp-contributions-deleted' => 'Ҳиссагузориҳои ҳазфшудаи корбар',
-'sp-contributions-talk' => 'Баҳс',
+'sp-contributions-uploads' => 'боргузориҳо',
+'sp-contributions-logs' => 'гузоришҳо',
+'sp-contributions-talk' => 'баҳс',
 'sp-contributions-userrights' => 'Мудирияти ихтиёроти корбарӣ',
 'sp-contributions-search' => 'Ҷустуҷӯи ҳиссагузориҳо',
 'sp-contributions-username' => 'IP нишона ё номи корбар:',
@@ -1643,13 +1670,14 @@ $1',
 'nolinkshere-ns' => "Ҳеҷ саҳифа аз фазоиноми интихобшуда ба '''[[:$1]]''' пайванд надорад.",
 'isredirect' => 'саҳифаи тағйири масир',
 'istemplate' => 'истифодашуда дар саҳифа',
-'isimage' => 'пайванди акс',
+'isimage' => 'пайванд ба парванда',
 'whatlinkshere-prev' => '{{PLURAL:$1|қаблӣ|қаблӣ $1}}',
 'whatlinkshere-next' => '{{PLURAL:$1|баъдӣ|баъдӣ $1}}',
 'whatlinkshere-links' => '← пайвандҳо',
 'whatlinkshere-hideredirs' => '$1 тағйири масир',
 'whatlinkshere-hidetrans' => '$1 трансгунҷоишҳо',
 'whatlinkshere-hidelinks' => '$1 пайвандҳо',
+'whatlinkshere-hideimages' => '$1 пайвандҳои парванда',
 'whatlinkshere-filters' => 'Филтрҳо',
 
 # Block/unblock
@@ -1692,7 +1720,7 @@ $1',
 'ipusubmit' => 'Боз кардани дастрасӣ',
 'unblocked' => 'Дастрасии [[User:$1|$1]] боз карда шуд',
 'unblocked-id' => 'Қатъи дастрасии шумораи $1 хотима ёфт',
-'ipblocklist' => 'IP нишонаҳо ва номҳои корбарии баста шуда',
+'ipblocklist' => 'Корбарони басташуда',
 'ipblocklist-legend' => 'Ҷустуҷӯи корбари баста шуда',
 'ipblocklist-submit' => 'Ҷустуҷӯ',
 'infiniteblock' => 'бе поён',
@@ -1959,6 +1987,7 @@ $1',
 'tooltip-rollback' => '"Вогард" вироиш(ҳо)ро ба ин саҳифаи охирин ҳиссагузор бо як клик мегардонад',
 'tooltip-undo' => '"Ботил" ин вироишро ботил мекунад ва форми вироишро дар ҳолати пешнамоиш боз мекунад.
 Ин имкони илова кардани як сабаберо дар хулоса медиҳад.',
+'tooltip-summary' => 'Хулосаи кӯтоҳ ворид кунед',
 
 # Metadata
 'notacceptable' => 'Коргузори ин вики аз ирсоли дода ба шакле ки барномаи шумо битавонад намоиш диҳад, пешкаш карда наметавонад.',
@@ -2048,7 +2077,7 @@ $1',
 'metadata-help' => 'Ин парванда иттилооти иловагиро дар бар мегирад, эҳтимол аз аксбардораки рақамӣ ё сканер дар вақти сохтан ва рақамӣ кардан, илова шудааст. Агар парванда аз вазъияти ибтидоиаш тағйир дода бошад, мумкин аст, шарҳу тафсилоти мавҷуди иттилооти аксро тамоман бозтоб надиҳад.',
 'metadata-expand' => 'Намоиши ҷузъиёти тафсилӣ',
 'metadata-collapse' => 'Пинҳон кардани ҷузъиёти тафсилӣ',
-'metadata-fields' => 'EXIF фосилаҳои додаҳо, ки дар ин паём оварда шудаанд дар ҷадвали акс ҷамъ шуда бошанд ҳам, намоиш дода хоҳанд шуд. Бақия онҳо танҳо дар вақти боз кардани ҷадвал нишон дода хоҳанд шуд.
+'metadata-fields' => 'Фарододаҳои тасвир нишон додашуда дар ин пайғом вақти ҷадвал фарододаҳои тавсир ҷамъ шуда бошад ҳам намоиш дода мешавад. Бақияи маворид танҳо замоне нишон дода мешавад, ки ҷадвали ёдшуда боз шавад.
 * make
 * model
 * datetimeoriginal
@@ -2318,7 +2347,7 @@ $1',
 'monthsall' => 'ҳама',
 'limitall' => 'ҳама',
 
-# E-mail address confirmation
+# Email address confirmation
 'confirmemail' => 'Тасдиқи нишонаи почтаи электронӣ',
 'confirmemail_noemail' => 'Шумо дар саҳифаи [[Special:Preferences|тарҷиҳоти корбарии]] худ нишонаи почтаи электронии мӯътабареро ворид накардаед.',
 'confirmemail_text' => '{{SITENAME}} таъйиди эътибои почтаи электронии шуморо пеш аз истифода хидмати электронӣ талаб мекунад. Тугмаи зеринро фаъол кунед то номаи таъйидӣ ба почтаи электронии шумо фиристода шавад. Ин нома пайвандеро дар бар мегирад, ки коде дорад; пайвандро дар мурургар боз кунед, то ки почтаи электрониатон  дар ҳақиқат таъйид шавад.',
@@ -2511,6 +2540,7 @@ $5
 'blankpage' => 'Саҳифаи холӣ',
 
 # Special:Tags
+'tag-filter' => 'Филтри [[Special:Tags|барчасбҳо]]:',
 'tags-edit' => 'вироиш',
 
 # Database error messages
index 30a3d36..fd59e98 100644 (file)
@@ -1895,10 +1895,10 @@ $1',
 'doubleredirectstext' => 'หน้านี้แสดงรายการหน้าที่เปลี่ยนทางไปยังหน้าเปลี่ยนทางอื่น
 แต่ละแถวมีการเชื่อมโยงไปยังการเปลี่ยนทางครั้งแรกและครั้งที่สอง เช่นเดียวกับเป้าหมายของการเปลี่ยนทางครั้งที่สอง ซึ่งมักเป็นหน้าเป้าหมาย "ที่แท้จริง" ที่การเปลี่ยนแปลงครั้งแรกควรชี้ไป
 หน่วยที่<del>ขีดฆ่า</del> คือ รายการที่ได้แก้ไขแล้ว',
-'double-redirect-fixed-move' => '[[$1]] à¸\96ูà¸\81à¹\80à¸\9bลีà¹\88ยà¸\99à¸\8aืà¹\88อแล้ว 
+'double-redirect-fixed-move' => '[[$1]] à¹\84à¸\94à¹\89ยà¹\89ายแล้ว 
 ขณะนี้เปลี่ยนทางไปยัง [[$2]]',
 'double-redirect-fixed-maintenance' => 'การแก้ไขการเปลี่ยนทางซ้ำซ้อนจาก [[$1]] ไปยัง [[$2]]',
-'double-redirect-fixer' => 'à¸\9cูà¹\89ซ่อมหน้าเปลี่ยนทาง',
+'double-redirect-fixer' => 'à¸\95ัวซ่อมหน้าเปลี่ยนทาง',
 
 'brokenredirects' => 'หน้าเปลี่ยนทางเสีย',
 'brokenredirectstext' => 'หน้าเปลี่ยนทางต่อไปนี้เชื่อมโยงไปยังหน้าที่ยังไม่ถูกสร้าง:',
@@ -2196,7 +2196,7 @@ $UNWATCHURL
 'deletepage' => 'ลบหน้า',
 'confirm' => 'ยืนยัน',
 'excontent' => "เนื้อหาเดิม: '$1'",
-'excontentauthor' => "เนื้อหาเดิม: '$1' (และผู้เขียนคนเดียว คือ '[[Special:Contributions/$2|$2]]')",
+'excontentauthor' => "à¹\80à¸\99ืà¹\89อหาà¹\80à¸\94ิม: '$1' (à¹\81ละมีà¸\9cูà¹\89à¹\80à¸\82ียà¸\99à¸\84à¸\99à¹\80à¸\94ียว à¸\84ือ '[[Special:Contributions/$2|$2]]')",
 'exbeforeblank' => "เนื้อหาก่อนถูกทำว่างคือ: '$1'",
 'exblank' => 'หน้าว่าง',
 'delete-confirm' => 'ลบ "$1"',
@@ -2356,7 +2356,7 @@ $1',
 'undelete-filename-mismatch' => 'ไม่สามารถกู้คืนรุ่นไฟล์ที่มีตราเวลา $1: ชื่อไฟล์ไม่ตรง',
 'undelete-bad-store-key' => 'ไม่สามารถกู้คืนรุ่นไฟล์ที่มีตราเวลา $1: ไฟล์สูญหายก่อนถูกลบ',
 'undelete-cleanup-error' => 'เกิดความผิดพลาดในการลบไฟล์กรุที่ไม่ใช้แล้ว "$1"',
-'undelete-missing-filearchive' => 'ไม่สามารถกู้คืนไฟล์เก่าหมายเลข $1 เพราะไม่มีในฐานข้อมูล 
+'undelete-missing-filearchive' => 'à¹\84มà¹\88สามารà¸\96à¸\81ูà¹\89à¸\84ืà¸\99à¹\84à¸\9fลà¹\8cà¹\80à¸\81à¹\88าหมายà¹\80ลà¸\82 $1 à¹\80à¸\9eราะà¹\84มà¹\88มีà¸\82à¹\89อมูลà¹\83à¸\99à¸\90าà¸\99à¸\82à¹\89อมูล 
 ไฟล์อาจถูกกู้คืนไปแล้ว',
 'undelete-error' => 'เกิดข้อผิดพลาดในการกู้คืนหน้า',
 'undelete-error-short' => 'เกิดข้อผิดพลาดในการกู้คืนไฟล์: $1',
@@ -2438,10 +2438,10 @@ $1',
 ** ใส่ข้อมูลเท็จ
 ** ลบเนื้อหาในหน้าออก
 ** ใส่ลิงก์สแปม
-** ใส่ข้อความขยะเข้ามา
-** à¸\84ุà¸\81à¸\84ามà¸\9cูà¹\89อืà¹\88
-** à¸\81à¹\88อà¸\81วà¸\99à¸\9cูà¹\89อืà¹\88à¸\99
-** à¸\8aืà¹\88อà¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\97ีà¹\88à¹\84มà¹\88สุภาà¸\9eหรือà¹\84มà¹\88à¸\84วรà¹\83à¸\8a้',
+** à¹\83สà¹\88à¸\82à¹\89อà¸\84วามà¹\84รà¹\89สาระ/à¸\82ยะà¹\80à¸\82à¹\89ามา
+** à¸\9eฤà¸\95ิà¸\81รรมà¸\82à¹\88มà¸\82ูà¹\88/รัà¸\87à¸\84วา
+** à¹\83à¸\8aà¹\89หลายà¸\9aัà¸\8dà¸\8aีà¹\83à¸\99à¸\97าà¸\87à¸\97ีà¹\88à¸\9cิà¸\94
+** à¸\8aืà¹\88อà¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\97ีà¹\88à¹\84มà¹\88อาà¸\88ยอมรัà¸\9aà¹\84à¸\94้',
 'ipb-hardblock' => 'ป้องกันไม่ให้ผู้ใช้ล็อกอินแก้ไขจากเลขที่อยู่ไอพีนี้',
 'ipbcreateaccount' => 'ป้องกันการสร้างบัญชี',
 'ipbemailban' => 'ป้องกันมิให้ผู้ใช้ส่งอีเมล',
@@ -2463,12 +2463,12 @@ $1',
 'ipb-blockingself' => 'คุณกำลังบล็อกตัวเอง! แน่ใจแล้วหรือว่าต้องการทำอย่างนั้น',
 'ipb-confirmhideuser' => 'คุณกำลังบล็อกผู้ใช้โดยเป็นผู้ใช้ "ซ่อนผู้ใช้" ซึ่งจะระงับชื่อผู้ใช้ในรายการและหน่วยปูมทั้งหมด คุณแน่ใจหรือว่าต้องการดำเนินการเช่นนั้น',
 'ipb-edit-dropdown' => 'แก้ไขสาเหตุการบล็อก',
-'ipb-unblock-addr' => 'à¹\80ลิà¸\81บล็อก $1',
-'ipb-unblock' => 'à¹\80ลิà¸\81บล็อกผู้ใช้หรือเลขที่อยู่ไอพี',
+'ipb-unblock-addr' => 'à¸\9bลà¸\94บล็อก $1',
+'ipb-unblock' => 'à¸\9bลà¸\94บล็อกผู้ใช้หรือเลขที่อยู่ไอพี',
 'ipb-blocklist' => 'ดูการบล็อกปัจจุบัน',
 'ipb-blocklist-contribs' => 'ผลงานเขียนโดย $1',
 'unblockip' => 'ปลดบล็อกผู้ใช้',
-'unblockiptext' => 'à¹\83à¸\8aà¹\89à¹\81à¸\9aà¸\9aà¸\94à¹\89าà¸\99ลà¹\88าà¸\87สำหรัà¸\9aคืนสิทธิการเข้าถึงการเขียนแก่เลขที่อยู่ไอพี หรือชื่อผู้ใช้ที่เคยถูกบล็อก',
+'unblockiptext' => 'à¹\83à¸\8aà¹\89à¹\81à¸\9aà¸\9aà¸\94à¹\89าà¸\99ลà¹\88าà¸\87à¹\80à¸\9eืà¹\88อคืนสิทธิการเข้าถึงการเขียนแก่เลขที่อยู่ไอพี หรือชื่อผู้ใช้ที่เคยถูกบล็อก',
 'ipusubmit' => 'ยกเลิกการบล็อกนี้',
 'unblocked' => '[[User:$1|$1]] ถูกบล็อก',
 'unblocked-range' => '$1 ถูกปลดบล็อกแล้ว',
@@ -2486,16 +2486,16 @@ $1',
 'blocklist-by' => 'ผู้ดูแลระบบที่บล็อก',
 'blocklist-params' => 'พารามิเตอร์การบล็อก',
 'blocklist-reason' => 'เหตุผล',
-'ipblocklist-submit' => 'สืà¸\9aà¸\84à¹\89à¸\99',
-'ipblocklist-localblock' => 'à¸\81ารสà¸\81ัà¸\94à¸\81ัà¹\89à¸\99ภายในวิกินี้',
-'ipblocklist-otherblocks' => '{{PLURAL:$1|à¸\81ารสà¸\81ัà¸\94à¸\81ัà¹\89à¸\99}}อืà¹\88à¸\99à¹\86',
+'ipblocklist-submit' => 'à¸\84à¹\89à¸\99หา',
+'ipblocklist-localblock' => 'à¸\81ารà¸\9aลà¹\87อà¸\81ในวิกินี้',
+'ipblocklist-otherblocks' => '{{PLURAL:$1|à¸\81ารà¸\9aลà¹\87อà¸\81}}อืà¹\88à¸\99',
 'infiniteblock' => 'ไม่มีกำหนด',
 'expiringblock' => 'หมดอายุ $1 เวลา $2',
 'anononlyblock' => 'ไม่ล็อกอินเท่านั้น',
 'noautoblockblock' => 'ยกเลิกการบล็อกอัตโนมัติ',
-'createaccountblock' => 'à¸\9aลà¹\87อà¸\81การสร้างบัญชีผู้ใช้ใหม่',
-'emailblock' => 'à¸\9aลà¹\87อà¸\81à¸\81ารสà¹\88à¸\87อีเมล',
-'blocklist-nousertalk' => 'à¹\84มà¹\88สามารà¸\96à¹\81à¸\81à¹\89à¹\84à¸\82หà¸\99à¹\89าอภิà¸\9bรายของตนเอง',
+'createaccountblock' => 'à¸\9bิà¸\94à¹\83à¸\8aà¹\89à¸\87าà¸\99การสร้างบัญชีผู้ใช้ใหม่',
+'emailblock' => 'à¸\9bิà¸\94à¹\83à¸\8aà¹\89à¸\87าà¸\99อีเมล',
+'blocklist-nousertalk' => 'à¹\84มà¹\88สามารà¸\96à¹\81à¸\81à¹\89à¹\84à¸\82หà¸\99à¹\89าà¸\84ุยà¸\81ัà¸\9aà¸\9cูà¹\89à¹\83à¸\8aà¹\89ของตนเอง',
 'ipblocklist-empty' => 'รายการบล็อกว่าง',
 'ipblocklist-no-results' => 'เลขที่อยู่ไอพีหรือชื่อผู้ใช้ที่ต้องการไม่ได้ถูกบล็อก',
 'blocklink' => 'บล็อก',
@@ -2694,7 +2694,7 @@ $1',
 
 # Thumbnails
 'thumbnail-more' => 'ขยาย',
-'filemissing' => 'à¹\84มà¹\88à¹\80à¸\88อà¹\84à¸\9fลà¹\8c',
+'filemissing' => 'à¹\84à¸\9fลà¹\8cสูà¸\8dหาย',
 'thumbnail_error' => 'เกิดปัญหาไม่สามารถทำรูปย่อได้: $1',
 'djvu_page_error' => 'หน้าเดจาวู (DjVu) เกินขนาด',
 'djvu_no_xml' => 'ไม่สามารถส่งเอกซ์เอ็มแอล (XML) สำหรับไฟล์เดจาวู (DjVu)',
@@ -2758,11 +2758,11 @@ $1',
 
 # Tooltip help for the actions
 'tooltip-pt-userpage' => 'หน้าผู้ใช้ของคุณ',
-'tooltip-pt-anonuserpage' => 'หà¸\99à¹\89าà¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\82อà¸\87หมายà¹\80ลà¸\82à¹\84อà¸\9eีà¸\97ีà¹\88แก้ไข',
+'tooltip-pt-anonuserpage' => 'หà¸\99à¹\89าà¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\82อà¸\87à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88à¹\84อà¸\9eีà¸\97ีà¹\88à¸\84ุà¸\93à¸\81ำลัà¸\87à¹\83à¸\8aà¹\89แก้ไข',
 'tooltip-pt-mytalk' => 'หน้าอภิปรายของคุณ',
-'tooltip-pt-anontalk' => 'à¸\9eูà¸\94à¸\84ุยà¹\80à¸\81ีà¹\88ยวà¸\81ัà¸\9aà¸\81ารà¹\81à¸\81à¹\89à¹\84à¸\82à¸\88าà¸\81หมายà¹\80ลà¸\82à¹\84อà¸\9eี',
+'tooltip-pt-anontalk' => 'à¸\9eูà¸\94à¸\84ุยà¹\80à¸\81ีà¹\88ยวà¸\81ัà¸\9aà¸\81ารà¹\81à¸\81à¹\89à¹\84à¸\82à¸\88าà¸\81à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88à¹\84อà¸\9eีà¸\99ีà¹\89',
 'tooltip-pt-preferences' => 'ตั้งค่าการใช้งานส่วนตัว',
-'tooltip-pt-watchlist' => 'รายà¸\81ารà¸\97ีà¹\88เฝ้าดูการแก้ไข',
+'tooltip-pt-watchlist' => 'รายà¸\81ารหà¸\99à¹\89าà¸\97ีà¹\88à¸\84ุà¸\93เฝ้าดูการแก้ไข',
 'tooltip-pt-mycontris' => 'รายการหน้าที่คุณเขียน',
 'tooltip-pt-login' => 'ไม่จำเป็นต้องล็อกอินในการแก้ไข แต่แนะนำอย่างยิ่งให้ล็อกอิน',
 'tooltip-pt-anonlogin' => 'ไม่จำเป็นต้องล็อกอินในการแก้ไข แต่แนะนำอย่างยิ่งให้ล็อกอิน',
@@ -2864,7 +2864,7 @@ $1',
 'notacceptable' => 'เซิร์ฟเวอร์ของวิกิไม่สามารถให้ข้อมูลในรูปแบบที่ไคลเอนต์สามารถอ่านได้',
 
 # Attribution
-'anonymous' => 'ผู้ใช้นิรนามของ{{SITENAME}}',
+'anonymous' => '{{PLURAL:$1|ผู้ใช้|ผู้ใช้}}นิรนามของ{{SITENAME}}',
 'siteuser' => 'ผู้ใช้ $1 จาก {{SITENAME}}',
 'anonuser' => 'ผู้ใช้นิรนามจาก {{SITENAME}} $1',
 'lastmodifiedatby' => 'แก้ไขล่าสุดเมื่อเวลา $2 $1 โดย $3',
@@ -2877,8 +2877,9 @@ $1',
 
 # Spam protection
 'spamprotectiontitle' => 'ตัวกรองป้องกันสแปม',
-'spamprotectiontext' => 'หน้าที่คุณต้องการบันทึกโดนบล็อกด้วยตัวกรองสแปม ซึ่งอาจเกิดจากมีลิงก์ไปยังเว็บไซต์ภายนอกที่อยู่ในบัญชีดำ',
-'spamprotectionmatch' => 'ข้อความต่อไปนี้ได้ทำให้ตัวกรองสแปมของเราทำงาน: $1',
+'spamprotectiontext' => 'ข้อความที่คุณต้องการบันทึกถูกตัวกรองสแปมบล็อก
+อาจเกิดจากลิงก์ไปยังเว็บไซต์ภายนอกที่ถูกขึ้นบัญชีดำ',
+'spamprotectionmatch' => 'ข้อความต่อไปนี้กระตุ้นให้ตัวกรองสแปมของเราทำงาน: $1',
 'spambot_username' => 'กวาดล้างมีเดียวิกิสแปม',
 'spam_reverting' => 'ย้อนกลับไปรุ่นก่อนหน้าที่ไม่มีลิงก์ไปยังเว็บ $1',
 'spam_blanking' => 'รุ่นการปรับปรุงทุกรุ่นประกอบไปด้วยลิงก์ไปยังเว็บ $1 (ทำหน้าว่าง)',
@@ -2899,6 +2900,7 @@ $1',
 'pageinfo-robot-policy' => 'สถานะเสิร์ชเอนจิน',
 'pageinfo-views' => 'จำนวนการเข้าดู',
 'pageinfo-watchers' => 'จำนวนผู้เข้าดูหน้า',
+'pageinfo-few-watchers' => '{{PLURAL:$1|ผู้เฝ้าดู|ผู้เฝ้าดู}}น้อยกว่า $1 คน',
 'pageinfo-redirects-name' => 'หน้าเปลี่ยนทางมายังหน้านี้',
 'pageinfo-subpages-name' => 'หน้าย่อยของหน้านี้',
 'pageinfo-subpages-value' => '$1 ($2 หน้าเปลี่ยนทาง; $3 หน้าไม่เปลี่ยนทาง)',
@@ -3336,21 +3338,28 @@ $1',
 # Email address confirmation
 'confirmemail' => 'ยืนยันอีเมล',
 'confirmemail_noemail' => 'ไม่ได้ใส่อีเมลในส่วน [[Special:Preferences|การตั้งค่าส่วนตัว]]',
-'confirmemail_text' => 'ถ้าต้องการใช้คำสั่งพิเศษในด้านอีเมสล จำเป็นต้องใส่ค่าอีเมลก่อน โดยกดที่ปุ่มด้านล่าง และทางระบบจะส่งไปที่อีเมลนี้ ในอีเมลจะมีลิงก์ซึ่งมีรหัสสำหรับยืนยันอีเมล',
-'confirmemail_pending' => 'รหัสยืนยันได้ถูกส่งไปที่อีเมลของคุณ ถ้าได้สร้างบัญชีเร็วนี้ ให้รอซักครู่ก่อนที่จะขอรหัสอีกครั้งหนึ่ง',
-'confirmemail_send' => 'ส่งรหัสยืนยันผ่านทางอีเมล',
-'confirmemail_sent' => 'อีเมลยืนยันได้ส่งเรียบร้อย',
-'confirmemail_oncreate' => 'รหัสยืนยันได้ถูกส่งไปที่อีเมล อย่างไรก็ตามรหัสนี้ไม่จำเป็นสำหรับการล็อกอิน เว้นเสียแต่ว่าต้องการใช้คำสั่งพิเศษในด้านอีเมลของวิกินี้',
-'confirmemail_sendfailed' => 'ขออภัย {{SITENAME}} ไม่สามารถส่งอีเมลให้คุณยืนยันการใช้งานได้
-กรุณาตรวจสอบอีเมลว่าถูกต้อง และไม่มีอักขระที่ไม่สามารถใช้ได้
+'confirmemail_text' => '{{SITENAME}} กำหนดให้คุณตรวจสอบความสมเหตุสมผลของที่อยู่อีเมลของคุณก่อนใช้คุณลักษณะอีเมล
+เปิดใช้งานปุ่มด้านล่างเพื่อส่งเมลยืนยันไปยังที่อยู่ของคุณ
+เมลจะรวมลิงก์ซึ่งมีรหัส
+โหลดลิงก์ในเบราว์เซอร์ของคุณเพื่อยืนยันว่าที่อยู่อีเมลของคุณสมเหตุสมผล',
+'confirmemail_pending' => 'รหัสยืนยันถูกอีเมลไปหาคุณแล้ว 
+ถ้าคุณเพิ่งสร้างบัญชี คุณอาจอยากรอสักครู่ให้ส่งไปถึงก่อนพยายามขอรหัสใหม่',
+'confirmemail_send' => 'ส่งรหัสยืนยันทางอีเมล',
+'confirmemail_sent' => 'ส่งอีเมลยืนยันแล้ว',
+'confirmemail_oncreate' => 'รหัสยืนยันถูกส่งไปยังที่อยู่อีเมลของคุณ
+รหัสนี้ไม่กำหนดให้ต้องล็อกอิน แต่คุณต้องระบุรหัสก่อนเปิดใช้งานคุณลักษณะที่อาศัยอีเมลทั้งหมดในวิกินี้',
+'confirmemail_sendfailed' => '{{SITENAME}} ไม่สามารถส่งเมลยืนยันได้
+โปรดตรวจสอบที่อยู่อีเมลว่าไม่มีอักขระที่ไม่สมเหตุสมผล
 
 ข้อความตีกลับ: $1',
-'confirmemail_invalid' => 'รหัสยืนยันไม่ถูกต้อง หรือรหัสหมดอายุ',
-'confirmemail_needlogin' => 'ต้องทำการ $1 เพื่อยืนยันอีเมลของคุณว่าถูกต้อง',
-'confirmemail_success' => 'อีเมลคุณได้รับการยืนยันแล้ว คุณอาจจะล็อกอินและมีความสุขกับวิกิ',
+'confirmemail_invalid' => 'รหัสยืนยันไม่ถูกต้อง 
+รหัสอาจหมดอายุแล้ว',
+'confirmemail_needlogin' => 'ต้อง $1 เพื่อยืนยันที่อยู่อีเมลของคุณ',
+'confirmemail_success' => 'อีเมลคุณได้รับการยืนยันแล้ว
+คุณอาจ[[Special:UserLogin|ล็อกอิน]]ตอนนี้และสนุกกับการแก้ไขวิกิ',
 'confirmemail_loggedin' => 'อีเมลคุณได้รับการยืนยันแล้ว',
-'confirmemail_error' => 'มีà¸\9bัà¸\8dหาà¹\80à¸\81ิà¸\94à¸\82ึà¹\89à¸\99à¹\83à¸\99à¸\81ารยืà¸\99ยัà¸\99อีà¹\80มล',
-'confirmemail_subject' => '{{SITENAME}} ยืนยันการใช้งานอีเมล',
+'confirmemail_error' => 'à¹\80à¸\81ิà¸\94à¸\9bัà¸\8dหาà¸\82à¸\93ะà¸\9aัà¸\99à¸\97ึà¸\81à¸\81ารยืà¸\99ยัà¸\99à¸\82อà¸\87à¸\84ุà¸\93',
+'confirmemail_subject' => 'การยืนยันที่อยู่อีเมล {{SITENAME}}',
 'confirmemail_body' => 'ใครบางคน ซึ่งอาจจะเป็นคุณ จากหมายเลขไอพี $1 ได้ลงทะเบียนในชื่อ "$2" โดยใช้อีเมลนี้ที่ {{SITENAME}}
 
 เพื่อยืนยันว่าบัญชีผู้ใช้นี้เป็นของคุณอย่างแน่อน และใช้งานฟีเจอร์ส่งอีเมลหาผู้ใช้บน {{SITENAME}} กดลิงก์นี้ในเว็บเบราวเซอร์ของคุณ:
index 7f05e5e..7a249ab 100644 (file)
@@ -756,7 +756,7 @@ Tarayıcınızın önbelleğini temizleyene kadar bazı sayfalar sanki hâlâ ot
 [[Special:Preferences|{{SITENAME}} tercihlerinizi]] değiştirmeyi unutmayın.',
 'yourname' => 'Kullanıcı adı:',
 'yourpassword' => 'Parola:',
-'yourpasswordagain' => 'Parolayı yeniden yaz:',
+'yourpasswordagain' => 'Parolayı yeniden girin:',
 'remembermypassword' => 'Girişimi bu tarayıcıda hatırla (en fazla $1 {{PLURAL:$1|gün|gün}} için)',
 'securelogin-stick-https' => "Giriş yaptıktan sonra HTTPS'e bağlı kal",
 'yourdomainname' => 'Alan adınız:',
@@ -1487,7 +1487,7 @@ $1 {{PLURAL:$1|karakterin|karakterin}} altında olmalı.',
 'prefs-help-gender' => 'İsteğe bağlı: Yazılım tarafından doğru cinsiyet adreslemesi için kullanılır. Bu bilgi umumi olacaktır.',
 'email' => 'E-posta',
 'prefs-help-realname' => '* Gerçek isim (isteğe bağlı): eğer gerçek isminizi vermeyi seçerseniz, çalışmanızı size atfederken kullanılacaktır.',
-'prefs-help-email' => 'E-posta adresi isteğe bağlıdır; ancak eğer parolanızı unutursanız e-posta adresinize yeni parola gönderilmesine olanak sağlar.',
+'prefs-help-email' => 'E-posta adresi isteğe bağlıdır; ancak parolanızı unutmanız durumunda parola sıfırlamak için gerekecektir.',
 'prefs-help-email-others' => 'Ayrıca kullanıcı sayfanızdaki bir bağlantı yoluyla diğer kullanıcıların size e-posta atmasına izin vermeyi seçebilirsiniz.
 Diğer kullanıcılar sizinle bu yolla iletişime geçtiğinde e-posta adresiniz açıklanmaz.',
 'prefs-help-email-required' => 'E-posta adresi gerekmektedir.',
index 121decf..e308178 100644 (file)
@@ -224,15 +224,15 @@ $messages = array(
 'tog-editsectiononrightclick' => 'Бүлек исеменә тычканның уң чирттермәсе белән төрткәч үзгәртү бите ачылсын (JavaScript кирәк)',
 'tog-showtoc' => 'Эчтәлек күрсәтелсен (3 тән күбрәк башламлы битләрдә)',
 'tog-rememberpassword' => 'Хисап язмамны бу браузерда саклансын (иң күп $1 {{PLURAL:$1|көн|көн|көн}}гә кадәр)',
-'tog-watchcreations' => 'ТөзегÓ\99н Ð±Ð¸Ñ\82лÓ\99Ñ\80ем күзәтү исемлегемә өстәлсен',
-'tog-watchdefault' => 'Үзгәрткән битләрем күзәтү исемлегемә өстәлсен',
-'tog-watchmoves' => 'Ð\9aÒ¯Ñ\87еÑ\80гÓ\99н Ð±Ð¸Ñ\82лÓ\99Ñ\80ем күзәтү исемлегемә өстәлсен',
-'tog-watchdeletion' => 'Ð\91еÑ\82еÑ\80елгÓ\99н Ð±Ð¸Ñ\82лÓ\99Ñ\80емне ÐºÒ¯Ð·Ó\99Ñ\82Ò¯ Ð¸Ñ\81емлегемгÓ\99 Ó©Ñ\81Ñ\82Ó\99Ò¯',
+'tog-watchcreations' => 'Ð\9cин Ñ\82өзегÓ\99н Ð±Ð¸Ñ\82лÓ\99Ñ\80 Ò»Ó\99м Ð¹Ó©ÐºÐ»Ó\99гÓ\99н Ñ\84айллаÑ\80 күзәтү исемлегемә өстәлсен',
+'tog-watchdefault' => 'Мин үзгәрткән битләр һәм файллар күзәтү исемлегемә өстәлсен',
+'tog-watchmoves' => 'Ð\9cин ÐºÒ¯Ñ\87еÑ\80гÓ\99н Ð±Ð¸Ñ\82лÓ\99Ñ\80 Ò»Ó\99м Ñ\84айллаÑ\80 күзәтү исемлегемә өстәлсен',
+'tog-watchdeletion' => 'Ð\9cин Ð±ÐµÑ\82еÑ\80гÓ\99н Ð±Ð¸Ñ\82лÓ\99Ñ\80 Ò»Ó\99м Ñ\84айллаÑ\80нÑ\8b ÐºÒ¯Ð·Ó\99Ñ\82Ò¯ Ð¸Ñ\81емлегемгÓ\99 Ó©Ñ\81Ñ\82Ó\99лÑ\81ен',
 'tog-minordefault' => 'Барлык үзгәртүләрне килешү буенча кече дип билгеләнсен',
 'tog-previewontop' => 'Үзгәртү тәрәзәсеннән өстәрәк битне алдан карау өлкәсен күрсәтелсен',
 'tog-previewonfirst' => 'Үзгәртү битенә күчкәндә башта алдан карау бите күрсәтелсен',
 'tog-nocache' => 'Битләр кэшлауны тыелсын',
-'tog-enotifwatchlistpages' => 'Күзәтү исемлегемдәге бит үзгәртелү турында электрон почтага хәбәр җибәрелсен',
+'tog-enotifwatchlistpages' => 'Күзәтү исемлегемдәге бит яки файл үзгәртелү турында электрон почтага хәбәр җибәрелсен',
 'tog-enotifusertalkpages' => 'Бәхәс битем үзгәртелү турында электрон почтага хәбәр җибәрелсен',
 'tog-enotifminoredits' => 'Кече үзгәртүләр турында да электрон почтага хәбәр җибәрелсен',
 'tog-enotifrevealaddr' => 'Хәбәрләрдә e-mail адресым күрсәтелсен',
@@ -607,6 +607,7 @@ $2',
 
 Сез {{SITENAME}} проектында аноним рәвештә кала яисә шул ук яки башка исем белән яңадан <span class='plainlinks'>[$1 керә]</span> аласыз.
 Кайбер битләр Сез кергән кебек күрсәтелергә мөмкин. Моны бетерү өчен браузер кэшын чистартыгыз.",
+'welcomeuser' => 'Хуш килдегез, $1!',
 'yourname' => 'Кулланучы исеме:',
 'yourpassword' => 'Серсүз:',
 'yourpasswordagain' => 'Серсүзне кабат кертү:',
@@ -686,7 +687,7 @@ $2',
 'loginlanguagelabel' => 'Тел: $1',
 'suspicious-userlogout' => 'Сезнең эшчәнлекне бетерү соравыгыз кире кагылды, чөнки ул ялгыш браузер яисә кэшлаучы прокси аша җибәрелергэ мөмкин.',
 
-# E-mail sending
+# Email sending
 'php-mail-error-unknown' => 'PHP mail() функциясендә билгесез хата',
 'user-mail-no-addy' => 'Электрон почта адресыннан башка электрон хат җибәрмәкче булды',
 
@@ -754,6 +755,7 @@ $2
 'changeemail-oldemail' => 'Хәзерге электрон әрҗә адресы:',
 'changeemail-newemail' => 'Яңа электрон почта адресы:',
 'changeemail-none' => '(юк)',
+'changeemail-password' => '«{{SITENAME}}» проекты өчен серсүзегез:',
 'changeemail-submit' => 'E-mail адресын үзгәртү',
 'changeemail-cancel' => 'Баш тарту',
 
@@ -885,6 +887,7 @@ $2
 Мондый хаталар аноним web-проксилар кулланганда килеп чыгарга мөмкин.",
 'edit_form_incomplete' => "'''Төзәтү кырларының кайбер өлешләре серверга барып ирешмәде. Сезнең үзгәртүләр бозылмаганмы - игътибар белән тикшерегез һәм яңадан җибәреп карагыз.'''",
 'editing' => '«$1» битен үзгәртү',
+'creating' => '«$1» битен ясау',
 'editingsection' => '«$1» битендә бүлек үзгәртүе',
 'editingcomment' => '«$1» битен үзгәртү (яңа бүлек)',
 'editconflict' => 'Үзгәртү конфликты: $1',
@@ -1675,6 +1678,7 @@ PICT # төрле
 'allpagesnext' => 'Киләсе',
 'allpagessubmit' => 'Башкару',
 'allpagesprefix' => 'Алкушымчалы битләрне күрсәтү:',
+'allpages-hide-redirects' => 'Юнәлтүләрне яшер',
 
 # Special:Categories
 'categories' => 'Төркемнәр',
@@ -1712,7 +1716,7 @@ PICT # төрле
 'listgrouprights-helppage' => 'Help:Төркемнәрнең хокуклары',
 'listgrouprights-members' => '(төркем исемлеге)',
 
-# E-mail user
+# Email user
 'emailuser' => 'Бу кулланучыга хат',
 'emailuser-title-target' => '{{GENDER:$1|Кулланучыга}} электрон хат язу',
 'emailuser-title-notarget' => 'Кулланучыга хат җибәрү',
@@ -1738,7 +1742,7 @@ PICT # төрле
 'emailsenttext' => 'E-mail хатыгыз җиберелде.',
 
 # Watchlist
-'watchlist' => 'Күзәтү исемлегем',
+'watchlist' => 'Күзәтү исемлеге',
 'mywatchlist' => 'Күзәтү исемлеге',
 'watchlistfor2' => '$1 $2 өчен',
 'nowatchlist' => 'Күзәтү исемлегегездә битләр юк.',
@@ -1907,7 +1911,7 @@ $1',
 'blanknamespace' => '(Төп)',
 
 # Contributions
-'contributions' => 'Кулланучының кертеме',
+'contributions' => '{{GENDER:$1|Кулланучының} кертеме',
 'contributions-title' => '$1 исемле кулланучының кертеме',
 'mycontris' => 'Кертем',
 'contribsub2' => '$1 ($2) өчен',
@@ -2427,6 +2431,9 @@ $1',
 'hijri-calendar-m7' => 'Раҗәб',
 'hijri-calendar-m9' => 'Рамазан',
 
+# Signatures
+'signature' => '[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|бәхәс]])',
+
 # Core parser functions
 'duplicate-defaultsort' => 'Игътибар. Уйланма куелган "$2" бүлгәләү ачкычы элеккеге уйланма куелган "$1" бүлгәләү ачкычын үзгәртә.',
 
index ad530a5..52c5226 100644 (file)
@@ -2166,8 +2166,10 @@ $1',
 Сторінка вважається багатозначною, якщо на ній розміщений шаблон, назва якого є на сторінці [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Сторінки з перевизначеними властивостями',
+'pageswithprop-legend' => 'Сторінки з перевизначеними властивостями',
 'pageswithprop-text' => 'Тут перераховані сторінки, у яких були вручну перевизначені окремі властивості.',
 'pageswithprop-prop' => 'Назва властивості:',
+'pageswithprop-submit' => 'Перейти',
 
 'doubleredirects' => 'Подвійні перенаправлення',
 'doubleredirectstext' => 'На цій сторінці наведено список перенаправлень на інші перенаправлення.
@@ -4349,7 +4351,7 @@ MediaWiki поширюється в надії, що вона буде кори
 'duration-centuries' => '$1 {{PLURAL:$1|століття|століття|століть}}',
 'duration-millennia' => '$1 {{PLURAL:$1|тисячоліття|тисячоліття|тисячоліть}}',
 
-# Unknown messages
-'pageswithprop-legend' => 'Сторінки з перевизначеними властивостями',
-'pageswithprop-submit' => 'Перейти',
+# Image rotation
+'rotate-comment' => 'Зображення повернуте на $1 {{PLURAL:$1|градус|градусів}} за годинниковою стрілкою',
+
 );
index 8489a3e..9dd6a75 100644 (file)
@@ -105,42 +105,61 @@ $linkTrail = '/^([a-zʻʼ“»]+)(.*)$/sDu';
 $messages = array(
 # User preference toggles
 'tog-underline' => 'Havolalarning tagiga chizish:',
-'tog-justify' => "Matnni sahifaning eni bo'yicha tekislash",
-'tog-hideminor' => "Yangi oʻzgarishlar ro'yxatida kichik tahrirlarni yashirish",
-'tog-hidepatrolled' => 'Yangi oʻzgarishlar roʻyxatida patrullangan tahrirlarni yashirish',
-'tog-newpageshidepatrolled' => "Yangi sahifalar ro'yxatida patrullangan sahifalarni yashirish",
-'tog-numberheadings' => 'Sarlavhalarni avtomatik tarzda raqamlash',
-'tog-showtoolbar' => "Tahrirlash vaqtida yuqorigi unsurlar darchasini ko'rsatish (JavaScript)",
-'tog-editsection' => "[tahrir] havolasini har bir seksiyada ko'rsatish",
-'tog-showtoc' => "Mundarijani ko'rsatish (3 ta sarlavhadan ko'p bo'lgan sahifalar uchun)",
-'tog-rememberpassword' => 'Hisob ma’lumotlarini ushbu kompyuterda eslab qolish (eng ko‘pi bilan $1 {{PLURAL:$1|kunga|kunga}})',
+'tog-justify' => 'Matnni sahifaning eni boʻyicha tekislash',
+'tog-hideminor' => 'Yangi oʻzgarishlar roʻyxatida kichik tahrirlarni yashirish',
+'tog-hidepatrolled' => 'Yangi oʻzgarishlar roʻyxatida tekshirilgan tahrirlarni yashirish',
+'tog-newpageshidepatrolled' => 'Yangi sahifalar roʻyxatida tekshirilgan sahifalarni yashirish',
+'tog-extendwatchlist' => 'Kengaytirilgan kuzatuv roʻyxati: faqat oxirgi paytdagi emas, barcha oʻzgarishlar koʻrsatiladi',
+'tog-usenewrc' => 'Yangi oʻzgarishlar va kuzatuv roʻyxatidagi sahifalarni guruhlarga boʻlish (JavaScript orqali)',
+'tog-numberheadings' => 'Sarlavhalarni avtomatik raqamlash',
+'tog-showtoolbar' => 'Tahrirlash asboblari joylashgan yoʻlakchani koʻrsatish (JavaScript orqali)',
+'tog-editondblclick' => 'Sichqoncha tugmasini ikki martagina bosib tahrirlashni boshlash',
+'tog-editsection' => '[tahrir] havolasini har bir boʻlim boshida koʻrsatish',
+'tog-editsectiononrightclick' => 'Boʻlim sarlavhasiga sichqonchaning oʻng tugmasi bilan bosib tahrirlashni boshlash',
+'tog-showtoc' => 'Mundarijani koʻrsatish (3 tadan koʻproq sarlavha bor sahifalarda)',
+'tog-rememberpassword' => 'Hisob ma’lumotlarim ushbu brauzerda eslab qolinsin (ko‘pi bilan $1 {{PLURAL:$1|kunga|kunga}})',
 'tog-watchcreations' => 'Men yaratgan sahifalarni va yuklagan fayllarni kuzatuv roʻyxatimga qoʻsh',
 'tog-watchdefault' => 'Men tahrirlagan sahifa va fayllarni kuzatuv roʻyxatimga qoʻsh',
 'tog-watchmoves' => 'Men koʻchirgan sahifa va fayllarni kuzatuv roʻyxatimga qoʻsh',
-'tog-watchdeletion' => 'Men yoʻqotgan sahifa va fayllarni kuzatuv roʻyxatimga qoʻsh',
-'tog-minordefault' => "Boshlang'ich holatga barcha tahrirlarni kamahamiyatli qilib belgilash",
-'tog-previewontop' => "Oldindan ko'rishni tahrirlash oynasi oldiga joylashtirish",
-'tog-previewonfirst' => "Tahrirlashga o'tishda batafsil ko'rinishni ko'rsatish",
-'tog-nocache' => "Brauzerda sahifalarni keshda saqlashni o'chirish",
+'tog-watchdeletion' => 'Men oʻchirgan sahifa va fayllarni kuzatuv roʻyxatimga qoʻsh',
+'tog-minordefault' => 'Sukut boʻyicha barcha tahrirlarimni «kichik tahrir» etib belgilash',
+'tog-previewontop' => 'Tahrir oynasi tepasida koʻrib chiqish',
+'tog-previewonfirst' => 'Tahrirlashga oʻtiboq koʻrib chiqishni boshlash',
+'tog-nocache' => 'Brauzer sahifalarni kesh xotirasida saqlamasin',
 'tog-enotifwatchlistpages' => 'Kuzatuv roʻyxatimdagi sahifa yoki fayllar oʻzgartirilsa, e-pochtamga bu haqda xat yuborilsin',
 'tog-enotifusertalkpages' => 'Munozara sahifam oʻzgartirilsa, e-pochtamga bu haqda xat yuborilsin',
+'tog-enotifminoredits' => 'Kichik tahrir qilinsa ham e-pochtamga bu haqda xat yuborilsin',
+'tog-enotifrevealaddr' => 'Xabar beruvchi xatlarda e-pochta manzilim koʻrsatilsin',
+'tog-shownumberswatching' => 'Sahifani kuzatuv roʻyxatiga olgan foydalanuvchilar sonini koʻrsatish',
 'tog-oldsig' => 'Joriy imzo:',
-'tog-fancysig' => 'Imzoni wikimatn sifatida qara (avtomatik ishoratsiz)',
-'tog-showjumplinks' => '"ga o\'tish" yordamchi havolalarini yoqish',
-'tog-ccmeonemails' => 'Men boshqa foydalanuvchilarga yuborayotgan xatnig nusxasi oʻzimning e-pochtamga ham yuborilsin',
+'tog-fancysig' => 'Imzoni viki-belgi qilib koʻrsatish (avtomatik ishoratsiz)',
+'tog-externaleditor' => 'Sukut boʻyicha tashqi tahrirlash dasturidan foydalanish (faqat mutaxassislar uchun, kompyuteringizda maxsus moslamalar boʻlishi zarur. [//www.mediawiki.org/wiki/Manual:External_editors More batafsil])',
+'tog-externaldiff' => 'Sukut boʻyicha tashqi taqqoslash dasturidan foydalanish (faqat mutaxassislar uchun, kompyuteringizda maxsus moslamalar boʻlishi zarur. [//www.mediawiki.org/wiki/Manual:External_editors More batafsil])',
+'tog-showjumplinks' => 'yordamchi "tez oʻtish" havolalarini yoqish',
+'tog-uselivepreview' => 'Tez koʻrib chiqish (JavaScript orqali) (sinovda)',
+'tog-forceeditsummary' => 'Qisqa tavsif oynasi toʻldirilmagani haqida ogohlantirish koʻrsatilsin',
+'tog-watchlisthideown' => 'Oʻz tahrirlarim kuzatuv roʻyxatimda koʻrsatilmasin',
+'tog-watchlisthidebots' => 'Botlar qilgan tahrirlar kuzatuv roʻyxatimda koʻrsatilmasin',
+'tog-watchlisthideminor' => 'Kichik tahrirlar kuzatuv roʻyxatimda koʻrsatilmasin',
+'tog-watchlisthideliu' => 'Tizimga kirgan foydalanuvchilar tahrirlari kuzatuv roʻyxatimda koʻrsatilmasin',
+'tog-watchlisthideanons' => 'Anonim foydalanuvchilar tahrirlari kuzatuv roʻyxatimda koʻrsatilmasin',
+'tog-watchlisthidepatrolled' => 'Tekshirilgan tahrirlar kuzatuv roʻyxatimda koʻrsatilmasin',
+'tog-ccmeonemails' => 'Boshqa ishtirokchilarga yozgan xatimning nusxasi oʻzimning e-pochtamga joʻnatilsin.',
+'tog-diffonly' => 'Versiyalar taqqoslanayotganda, pastda sahifa matni koʻrsatilmasin',
 'tog-showhiddencats' => 'Yashirin turkumlarni koʻrsatish',
 'tog-noconvertlink' => "Sarlavhaga aylantirish dastagini o'chirib qo'yish",
+'tog-norollbackdiff' => 'Tahrir qaytarilganda, versiyalar taqqosini koʻrsatish kerak emas',
 
 'underline-always' => 'Har doim',
 'underline-never' => 'Hech qachon',
 'underline-default' => 'Brauzer moslamari boʻyicha',
 
 # Font style option in Special:Preferences
-'editfont-style' => 'Tahrirlash maydoni bosma harflari turi',
+'editfont-style' => 'Tahrirlash maydonidagi shrift turi:',
 'editfont-default' => 'Brauzer moslamari boʻyicha',
-'editfont-monospace' => 'Monoenli bosma harflar',
-'editfont-sansserif' => 'Sans-serif bosma harflari',
-'editfont-serif' => 'Serif bosma harflari',
+'editfont-monospace' => 'Teng enli shrift (Monospaced)',
+'editfont-sansserif' => 'Kertiksiz shrift (Sans-serif)',
+'editfont-serif' => 'Kertikli shrift (Serif)',
 
 # Dates
 'sunday' => 'Yakshanba',
@@ -195,20 +214,23 @@ $messages = array(
 'dec' => 'dek',
 
 # Categories related messages
-'pagecategories' => '{{PLURAL:$1|Turkum|Turkumlar}}',
+'pagecategories' => '{{PLURAL:$1|Turkum}}',
 'category_header' => '"$1" turkumidagi maqolalar.',
 'subcategories' => 'Ostturkumlar',
 'category-media-header' => '"$1" turkumidagi fayllar',
 'category-empty' => "''Ushbu turkumda hozircha sahifa yoki fayllar yoʻq.''",
-'hidden-categories' => '{{PLURAL:$1|Yashirin turkum|Yashirin turkumlar}}',
+'hidden-categories' => '{{PLURAL:$1|Yashirin turkum}}',
 'hidden-category-category' => 'Yashirin turkumlar',
-'category-subcat-count' => '{{PLURAL:$2|Ushbu turkumda faqat bitta ostturkum mavjud.|Ushbu turkumda quyidagi {{PLURAL:$1|ostturkum|$1 ostturkumlar}}, hammasi boʻlib $2 ta ostturkum mavjud.}}',
-'category-article-count' => '{{PLURAL:$2|Ushbu turkumda faqat bitta sahifa mavjud.|Ushbu turkumda quyidagi {{PLURAL:$1|sahifa|$1 sahifalar}}, hammasi boʻlib $2 ta sahifa mavjud.}}',
-'category-file-count' => "{{PLURAL:$2|Ushbu turkum faqat bitta faylga ega.|Ushbu turkumdagi $2 ta fayldan quyidagi $1 tasi ko'rsatildi.}}",
+'category-subcat-count' => '{{PLURAL:$2|Ushbu turkumda faqat bitta ostturkum mavjud.|Quyida ushbu turkumga kiruvchi $2 ta ostturkumdan $1 tasi koʻrsatilgan.}}',
+'category-subcat-count-limited' => 'Ushbu turkumda $1 ta ostturkum mavjud.',
+'category-article-count' => '{{PLURAL:$2|Ushbu turkumda faqat bitta sahifa mavjud.|Quyida ushbu turkumga kiruvchi $2 ta sahifadan $1 tasi koʻrsatilgan.}}',
+'category-article-count-limited' => 'Ushbu turkumda $1 ta sahifa mavjud.',
+'category-file-count' => '{{PLURAL:$2|Ushbu turkumda faqat bitta fayl mavjud.|Quyida ushbu turkumga kiruvchi $2 ta fayldan $1 tasi koʻrsatilgan.}}',
+'category-file-count-limited' => 'Ushbu turkumda $1 ta fayl mavjud.',
 'listingcontinuesabbrev' => 'davomi',
 'index-category' => 'Indekslanadigan sahifalar',
 'noindex-category' => 'Indekslanmaydigan sahifalar',
-'broken-file-category' => 'Ishlamaydigan fayl havolalariga ega sahifalar',
+'broken-file-category' => 'Ishlamaydigan fayl havolalari bor sahifalar',
 
 'linkprefix' => '/^(.*?)([a-zA-Z\\x80-\\xffʻʼ«„]+)$/sDu',
 
@@ -217,18 +239,19 @@ $messages = array(
 'newwindow' => '(yangi oynada ochiladi)',
 'cancel' => 'Bekor qilish',
 'moredotdotdot' => 'Batafsil...',
+'morenotlisted' => 'Boshqa hech nima yoʻq...',
 'mypage' => 'Sahifa',
-'mytalk' => 'Munozaram',
-'anontalk' => 'Bu IP uchun suhbat',
+'mytalk' => 'Munozara',
+'anontalk' => 'Ushbu IP-manzil munozarasi',
 'navigation' => 'Saytda harakatlanish',
 'and' => '&#32;va',
 
 # Cologne Blue skin
 'qbfind' => 'Qidiruv',
-'qbbrowse' => "Ko'rish",
+'qbbrowse' => 'Koʻrish',
 'qbedit' => 'Tahrirlash',
-'qbpageoptions' => 'Ushbu sahifa',
-'qbmyoptions' => 'Mening sahifalarim',
+'qbpageoptions' => 'Ushbu sahifa moslamalari',
+'qbmyoptions' => 'Moslamalarim',
 'qbspecialpages' => 'Maxsus sahifalar',
 'faq' => 'TSS',
 'faqpage' => 'Project:TSS',
@@ -239,80 +262,86 @@ $messages = array(
 'vector-action-move' => 'Ko‘chirish',
 'vector-action-protect' => 'Himoyalash',
 'vector-action-undelete' => 'Tiklash',
-'vector-action-unprotect' => "Himoyani o'zgartirish",
-'vector-simplesearch-preference' => 'Soddalashtirilgan qidiruv uskunasini yoqish (faqat "Vektor" tashqi ko\'rinishi uchun)',
+'vector-action-unprotect' => 'Himoyalashni oʻzgartirish',
+'vector-simplesearch-preference' => 'Soddalashtirilgan qidiruv qatorini koʻrsat (faqat «Vektorli» tashqi koʻrinish uchun)',
 'vector-view-create' => 'Yaratish',
 'vector-view-edit' => 'Tahrirlash',
 'vector-view-history' => 'Tarix',
 'vector-view-view' => 'Mutolaa',
-'vector-view-viewsource' => "Manbasini ko'rish",
+'vector-view-viewsource' => 'Manbasini koʻrish',
 'actions' => 'Amallar',
 'namespaces' => 'Nomfazolar',
 'variants' => 'Variantlar',
 
+'navigation-heading' => 'Navigatsiya',
 'errorpagetitle' => 'Xato',
 'returnto' => '$1 sahifasiga qaytish.',
-'tagline' => '{{SITENAME}} dan',
+'tagline' => '{{SITENAME}} dan olingan',
 'help' => 'Yordam',
 'search' => 'Qidiruv',
 'searchbutton' => 'Qidirish',
-'go' => "O'tish",
+'go' => 'Oʻtish',
 'searcharticle' => 'O‘tish',
 'history' => 'Sahifa tarixi',
 'history_short' => 'Tarix',
-'updatedmarker' => 'mening oxirgi tashrifimdan keyin yangilandi',
+'updatedmarker' => 'oxirgi tashrifimdan keyingi oʻzgarishlar',
 'printableversion' => 'Bosma uchun versiya',
 'permalink' => 'Doimiy ishorat',
-'print' => 'Chop et',
+'print' => 'Chop etish',
 'view' => 'Koʻrish',
 'edit' => 'Tahrirlash',
 'create' => 'Yaratish',
-'editthispage' => 'Sahifani tahrirlash',
+'editthispage' => 'Ushbu sahifani tahrirlash',
 'create-this-page' => 'Ushbu sahifani yaratish',
 'delete' => 'O‘chirish',
 'deletethispage' => 'Ushbu sahifani o‘chirish',
-'undelete_short' => '{{PLURAL:$1|tahrir|$1 tahrirlar}}ni tiklash',
-'viewdeleted_short' => "{{PLURAL:$1|o'chirilgan tahrir|$1 ta o'chirilgan tahrirlar}}ni ko'rish",
+'undelete_short' => '$1 ta tahrirni tiklash',
+'viewdeleted_short' => '$1 ta oʻchirilgan tahrirni koʻrish',
 'protect' => 'Himoyalash',
-'protect_change' => 'o‘zgartirish',
+'protect_change' => 'zgartirish',
 'protectthispage' => 'Ushbu sahifani himoyalash',
 'unprotect' => 'Himoyadan chiqarish',
-'unprotectthispage' => "Ushbu sahifaning himoyasini o'zgaritish",
+'unprotectthispage' => 'Ushbu sahifaning himoyasini oʻzgaritish',
 'newpage' => 'Yangi sahifa',
 'talkpage' => 'Bu sahifa haqida munozara',
-'talkpagelinktext' => 'munozara',
+'talkpagelinktext' => 'Munozara',
 'specialpage' => 'Maxsus sahifa',
 'personaltools' => 'Shaxsiy uskunalar',
 'postcomment' => 'Yangi boʻlim',
-'articlepage' => 'Sahifani ko‘rish',
+'articlepage' => 'Maqolani koʻrib chiqish',
 'talk' => 'Munozara',
-'views' => 'Ko‘rinishlar',
+'views' => 'Qarashlar',
 'toolbox' => 'Asboblar',
-'userpage' => "Foydalanuvchi sahifasini ko'rish",
-'projectpage' => "Loyiha sahifasini ko'rish",
-'imagepage' => "Fayl sahifasini ko'rish",
-'mediawikipage' => "Xabar sahifasini ko'rsatish",
-'templatepage' => "Andoza sahifasini ko'rish",
+'userpage' => 'Foydalanuvchi sahifasini koʻrish',
+'projectpage' => 'Loyiha sahifasini koʻrish',
+'imagepage' => 'Fayl sahifasini koʻrish',
+'mediawikipage' => 'Xabar sahifasini koʻrsatish',
+'templatepage' => 'Andoza sahifasini koʻrish',
 'viewhelppage' => 'Yordam olish',
-'categorypage' => 'Turkum sahifasi',
+'categorypage' => 'Turkum sahifasini koʻrish',
 'viewtalkpage' => 'Munozarani koʻrish',
 'otherlanguages' => 'Boshqa tillarda',
 'redirectedfrom' => '($1dan yoʻnaltirildi)',
 'redirectpagesub' => 'Yoʻnaltiruvchi sahifa',
-'lastmodifiedat' => 'Bu sahifa oxirgi marta $2, $1 sanasida tahrirlangan.',
+'lastmodifiedat' => 'Bu sahifa oxirgi marta $1 soat $2 da tahrirlangan.',
 'viewcount' => 'Bu sahifaga {{PLURAL:$1|bir marta|$1 marta}} murojaat qilingan.',
 'protectedpage' => 'Himoyalangan sahifa',
 'jumpto' => 'Oʻtish:',
 'jumptonavigation' => 'saytda harakatlanish',
 'jumptosearch' => 'qidiruv',
-'pool-timeout' => "Muhosara (to'sish) ni kutish vaqti tugadi",
-'pool-queuefull' => "So'rovlar jamlanmasi to'ldi",
-'pool-errorunknown' => "Noma'lum xato",
+'view-pool-error' => 'Uzr, ayni paytda serverlarga ortiqcha yuk tushgan.
+Bu sahifaga birdaniga koʻpchilik kirmoqchi boʻldi.
+Iltimos, biroz kutib turing va keyin yangitdan kirishga urinib koʻring.
+
+$1',
+'pool-timeout' => 'Toʻsishni kutish vaqti tugadi',
+'pool-queuefull' => 'Soʻrovlar jamlanmasi toʻldi',
+'pool-errorunknown' => 'Nomaʼlum xato',
 
 # All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations).
 'aboutsite' => '{{SITENAME}} haqida',
 'aboutpage' => 'Project:Haqida',
-'copyright' => 'Kontent $1 ostidadir.',
+'copyright' => 'Keltirilgan maʼlumotlar $1 orqali tarqatilmoqda.',
 'copyrightpage' => '{{ns:project}}:Mualliflik huquqlari',
 'currentevents' => 'Joriy hodisalar',
 'currentevents-url' => 'Project:Joriy hodisalar',
@@ -425,7 +454,7 @@ Shuni e'tiborga olingki, ayrim sahifalar siz brauzeringiz keshini tozalamaguning
 'yourname' => 'Foydalanuvchi nomi',
 'yourpassword' => 'Maxfiy soʻz',
 'yourpasswordagain' => 'Maxfiy so‘zni qayta kiriting:',
-'remembermypassword' => 'Hisob ma’lumotlarini ushbu kompyuterda eslab qolish (eng ko‘pi bilan $1 {{PLURAL:$1|kun|kun}} uchun)',
+'remembermypassword' => 'Hisob ma’lumotlarim ushbu brauzerda eslab qolinsin (ko‘pi bilan $1 {{PLURAL:$1|kunga|kunga}})',
 'securelogin-stick-https' => "Kirgandan keyin HTTPS bo'yicha ulanishni davom ettirish",
 'yourdomainname' => 'Sizning domeningiz:',
 'password-change-forbidden' => "Siz bu vikida maxfiy so'zni o'zgartira olmaysiz.",
@@ -1133,7 +1162,7 @@ Also see [[Special:WantedCategories|wanted categories]].',
 'emailsubject' => 'Sarlavha:',
 'emailmessage' => 'Xabar',
 'emailsend' => 'Joʻnatish',
-'emailccme' => 'Maktub nusxasini menga joʻnatish',
+'emailccme' => 'Maktub nusxasi mening elektron pochtamga joʻnatilsin',
 'emailccsubject' => '$1ga maktubingizning nusxasi: $2',
 'emailsent' => "Xat jo'natildi",
 'emailsenttext' => "Sizning elektron maktubingiz jo'natildi.",
@@ -1153,7 +1182,7 @@ Also see [[Special:WantedCategories|wanted categories]].',
 
 Agar siz bu sahifani kuzatuv ro'yxatingizdan o'chirmoqchi bo'lsangiz \"Kuzatmaslik\" yozuvini bosing.",
 'removewatch' => "Kuzatuv ro'yxatidan o'chirish",
-'removedwatchtext' => '"[[:$1]]" sahifasi kuzatuv ro\'yxatingizdan o\'chirildi.',
+'removedwatchtext' => '"[[:$1]]" sahifasi [[Special:Watchlist|kuzatuv roʻyxatingizdan]] oʻchirildi.',
 'watch' => 'Kuzatish',
 'watchthispage' => 'Sahifani kuzatish',
 'unwatch' => 'Kuzatmaslik',
index 18b469d..c90b0a5 100644 (file)
@@ -510,7 +510,7 @@ $messages = array(
 'userpage' => 'Xem trang thành viên',
 'projectpage' => 'Xem trang dự án',
 'imagepage' => 'Xem trang tập tin',
-'mediawikipage' => 'Thông báo giao diện',
+'mediawikipage' => 'Thông điệp giao diện',
 'templatepage' => 'Trang bản mẫu',
 'viewhelppage' => 'Trang trợ giúp',
 'categorypage' => 'Trang thể loại',
@@ -603,7 +603,7 @@ $1',
 'nstab-special' => 'Trang đặc biệt',
 'nstab-project' => 'Dự án',
 'nstab-image' => 'Tập tin',
-'nstab-mediawiki' => 'Thông báo',
+'nstab-mediawiki' => 'Thông điệp',
 'nstab-template' => 'Bản mẫu',
 'nstab-help' => 'Trợ giúp',
 'nstab-category' => 'Thể loại',
@@ -679,8 +679,8 @@ Truy vấn: $2',
 'protectedpagetext' => 'Trang này đã bị khóa không cho sửa đổi hoặc tác động khác.',
 'viewsourcetext' => 'Bạn vẫn có thể xem và chép xuống mã nguồn của trang này:',
 'viewyourtext' => "Bạn vẫn có thể xem và chép xuống mã nguồn '''các sửa đổi của bạn''' tại trang này:",
-'protectedinterface' => 'Trang này cung cấp một thông báo trong giao diện phần mềm, và bị khóa để tránh phá hoại. Để bổ sung hoặc thay đổi bản dịch ở bất cứ wiki nào, xin vui lòng đóng góp vào [//translatewiki.net/wiki/Main_Page?setlang=vi translatewiki.net], dự án bản địa hóa của MediaWiki.',
-'editinginterface' => "'''Lưu ý:''' Bạn đang sửa chữa một trang dùng để cung cấp thông báo giao diện cho phần mềm. Những thay đổi tại trang này sẽ ảnh hưởng đến giao diện của rất nhiều người dùng wiki này. Để bổ sung hoặc thay đổi bản dịch ở bất cứ wiki nào, xin vui lòng đóng góp vào [//translatewiki.net/wiki/Main_Page?setlang=vi translatewiki.net], dự án bản địa hóa của MediaWiki.",
+'protectedinterface' => 'Trang này cung cấp một thông điệp trong giao diện phần mềm, và bị khóa để tránh phá hoại. Để bổ sung hoặc thay đổi bản dịch ở bất cứ wiki nào, xin vui lòng đóng góp vào [//translatewiki.net/wiki/Main_Page?setlang=vi translatewiki.net], dự án bản địa hóa của MediaWiki.',
+'editinginterface' => "'''Lưu ý:''' Bạn đang sửa chữa một trang dùng để cung cấp thông điệp giao diện cho phần mềm. Những thay đổi tại trang này sẽ ảnh hưởng đến giao diện của rất nhiều người dùng wiki này. Để bổ sung hoặc thay đổi bản dịch ở bất cứ wiki nào, xin vui lòng đóng góp vào [//translatewiki.net/wiki/Main_Page?setlang=vi translatewiki.net], dự án bản địa hóa của MediaWiki.",
 'sqlhidden' => '(đã giấu truy vấn SQL)',
 'cascadeprotected' => 'Trang này đã bị khóa không cho sửa đổi, vì nó được nhúng vào {{PLURAL:$1|trang|những trang}} đã bị khóa với tùy chọn “khóa theo tầng” được kích hoạt:
 $2',
@@ -783,7 +783,7 @@ Hãy nhập một địa chỉ có định dạng đúng hoặc bỏ trống ô
 'createaccount-title' => 'Tài khoản mới tại {{SITENAME}}',
 'createaccount-text' => 'Ai đó đã tạo một tài khoản với tên $2 tại {{SITENAME}} ($4). Mật khẩu của "$2" là "$3". Bạn nên đăng nhập và đổi mật khẩu ngay bây giờ.
 
-Xin hãy bỏ qua thông báo này nếu tài khoản này không phải do bạn tạo ra.',
+Xin hãy bỏ qua thông điệp này nếu tài khoản này không phải do bạn tạo ra.',
 'usernamehasherror' => 'Tên người dùng không thể chứa dấu rào',
 'login-throttled' => 'Bạn đã thử quá nhiều mật khẩu của tài khoản này.
 Xin hãy đợi chốc lát rồi thử lại.',
@@ -1081,10 +1081,10 @@ Nó nên ít hơn $2 {{PLURAL:$2|lần gọi|lần gọi}}, hiện giờ đang l
 'expensive-parserfunction-category' => 'Trang có quá nhiều lời gọi hàm cú pháp cần mức độ xử lý cao',
 'post-expand-template-inclusion-warning' => 'Cảnh báo: Kích thước bản mẫu nhúng vào quá lớn.
 Một số bản mẫu sẽ không được đưa vào.',
-'post-expand-template-inclusion-category' => 'Những trang có kích thước bản mẫu nhúng vào vượt quá giới hạn cho phép',
-'post-expand-template-argument-warning' => 'Cảnh báo: Trang này có chứa ít nhất một giá trị bản mẫu có kích thước bung ra quá lớn.
-Những giá trị này sẽ bị bỏ đi.',
-'post-expand-template-argument-category' => 'Những trang có chứa những giá trị bản mẫu bị loại bỏ',
+'post-expand-template-inclusion-category' => 'Trang có kích thước bản mẫu nhúng vào vượt quá giới hạn cho phép',
+'post-expand-template-argument-warning' => 'Cảnh báo: Trang này có chứa ít nhất một tham số bản mẫu có kích thước bung ra quá lớn.
+Những tham số này sẽ bị bỏ đi.',
+'post-expand-template-argument-category' => 'Trang có chứa tham số bản mẫu bị loại bỏ',
 'parser-template-loop-warning' => 'Phát hiện bản mẫu lặp vòng: [[$1]]',
 'parser-template-recursion-depth-warning' => 'Bản mẫu đã vượt quá giới hạn về độ sâu đệ quy ($1)',
 'language-converter-depth-warning' => 'Đã vượt quá giới hạn độ sâu của bộ chuyển đổi ngôn ngữ ($1)',
@@ -2070,8 +2070,10 @@ Hãy nhớ kiểm tra các liên kết khác đến bản mẫu trước khi xó
 'disambiguations-text' => "Các trang này có liên kết đến ít nhất một '''trang định hướng''', những trang này có thể có liên kết đến các trang đúng nghĩa hơn.<br />Các trang định hướng là trang sử dụng những bản mẫu được liệt kê ở [[MediaWiki:Disambiguationspage]].",
 
 'pageswithprop' => 'Trang có thuộc tính trang',
+'pageswithprop-legend' => 'Các trang có thuộc tính trang',
 'pageswithprop-text' => 'Trang này liệt kê các trang sử dụng một thuộc tính trang nào đó.',
 'pageswithprop-prop' => 'Tên thuộc tính:',
+'pageswithprop-submit' => 'Xem',
 
 'doubleredirects' => 'Đổi hướng kép',
 'doubleredirectstext' => 'Trang này liệt kê các trang đổi hướng đến một trang đổi hướng khác.
@@ -2295,8 +2297,8 @@ Có [[{{MediaWiki:Listgrouprights-helppage}}|thông tin thêm]] về từng nhó
 'emailuserfooter' => 'Thư điện tử này được $1 gửi đến $2 thông qua chức năng “Gửi thư cho người này” của {{SITENAME}}.',
 
 # User Messenger
-'usermessage-summary' => 'Đang để lại thông báo hệ thống.',
-'usermessage-editor' => 'Trình thông báo hệ thống',
+'usermessage-summary' => 'Đang để lại thông điệp hệ thống.',
+'usermessage-editor' => 'Trình thông điệp hệ thống',
 
 # Watchlist
 'watchlist' => 'Danh sách theo dõi',
@@ -2871,12 +2873,12 @@ Trong trường hợp sau bạn cũng có thể dùng một liên kết, ví d
 'export-pagelinks' => 'Gồm cả các trang liên kết sâu đến:',
 
 # Namespace 8 related
-'allmessages' => 'Thông báo hệ thống',
-'allmessagesname' => 'Tên thông báo',
+'allmessages' => 'Thông điệp hệ thống',
+'allmessagesname' => 'Tên thông điệp',
 'allmessagesdefault' => 'Nội dung mặc định',
 'allmessagescurrent' => 'Nội dung hiện thời',
-'allmessagestext' => 'Đây là toàn bộ thông báo hệ thống có trong không gian tên MediaWiki.
-Mời vào [//www.mediawiki.org/wiki/Localisation Địa phương hóa MediaWiki]  và [//translatewiki.net translatewiki.net] nếu bạn muốn đóng góp dịch chung cả MediaWiki.',
+'allmessagestext' => 'Đây là toàn bộ thông điệp hệ thống có trong không gian tên MediaWiki.
+Mời vào [//www.mediawiki.org/wiki/Localisation?uselang=vi Địa phương hóa MediaWiki] và [//translatewiki.net/wiki/?uselang=vi translatewiki.net] nếu bạn muốn đóng góp dịch chung cả MediaWiki.',
 'allmessagesnotsupportedDB' => "Trang này không dùng được vì biến '''\$wgUseDatabaseMessages''' đã bị tắt.",
 'allmessages-filter-legend' => 'Bộ lọc',
 'allmessages-filter' => 'Lọc theo tình trạng sửa đổi:',
@@ -3012,13 +3014,13 @@ Lưu nó vào máy tính của bạn rồi tải nó lên đây.',
 'tooltip-t-specialpages' => 'Danh sách các trang đặc biệt',
 'tooltip-t-print' => 'Bản để in ra của trang',
 'tooltip-t-permalink' => 'Liên kết thường trực đến phiên bản này của trang',
-'tooltip-ca-nstab-main' => 'Xem trang nội dung này',
-'tooltip-ca-nstab-user' => 'Xem trang về người này',
+'tooltip-ca-nstab-main' => 'Xem trang nội dung',
+'tooltip-ca-nstab-user' => 'Xem trang cá nhân',
 'tooltip-ca-nstab-media' => 'Xem trang phương tiện',
 'tooltip-ca-nstab-special' => 'Đây là một trang đặc biệt, bạn không thể sửa đổi nó.',
 'tooltip-ca-nstab-project' => 'Xem trang dự án',
 'tooltip-ca-nstab-image' => 'Xem trang miêu tả tập tin',
-'tooltip-ca-nstab-mediawiki' => 'Xem thông báo hệ thống',
+'tooltip-ca-nstab-mediawiki' => 'Xem thông điệp hệ thống',
 'tooltip-ca-nstab-template' => 'Xem bản mẫu',
 'tooltip-ca-nstab-help' => 'Xem trang trợ giúp',
 'tooltip-ca-nstab-category' => 'Xem trang thể loại',
@@ -4183,7 +4185,7 @@ Nếu không thì bạn có thể điền biểu mẫu đơn giản ở dưới.
 'duration-centuries' => '$1 thế kỷ',
 'duration-millennia' => '$1 thiên niên kỷ',
 
-# Unknown messages
-'pageswithprop-legend' => 'Các trang có thuộc tính trang',
-'pageswithprop-submit' => 'Xem',
+# Image rotation
+'rotate-comment' => 'Đã quay hình $1 độ theo chiều kim đồng hồ',
+
 );
index 5d81dd2..c52243f 100644 (file)
@@ -631,7 +631,11 @@ o [{{fullurl:{{FULLPAGENAME}}|action=edit}} igliwat ini nga pakli]</span>.',
 'noarticletext-nopermission' => 'Waray yana nahasurat hini nga pakli
 Puyde hi ikaw [[Special:Search/{{PAGENAME}}|magbiling han ngaran hini nga pakli]] ha iba nga mga pakli,
 o <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} mamiling han mga nanginginlabot nga mga talaan]</span>, kundi diri ka gintutugotan hin paghímò hini nga pakli.',
+'userpage-userdoesnotexist' => 'Diri nakarehistro an akawnt han gumaramit nga "$1".
+Alayon pagpamuruotbuot kun karuyag mo maghimo/mag-edit hini nga pakli.',
 'userpage-userdoesnotexist-view' => "An akawnt han gumaramit ni ''$1'' in diri nakarehistro.",
+'blocked-notice-logextract' => 'Ini nga gumaramit in nakapugong yana.
+An pinakaurhi nga log entry han mga pinugong in ginhatag ha ubos para hit reperensya:',
 'updated' => '(Ginbag-ohan)',
 'note' => "'''Pahibaro:'''",
 'previewnote' => "'''Hinumdumi nga pahiuna-nga-paggawas pa la ini.'''
@@ -850,6 +854,7 @@ Ginpapasabot nga an sulod han mga panudlok han {{SITENAME}} in bangin daan an.',
 'prefs-user-pages' => 'Mga pakli hin gumaramit',
 'prefs-personal' => 'Pangilal-an han nagamit',
 'prefs-rc' => 'Kalalabay la nga mga pagbabag-o',
+'prefs-watchlist' => 'Listahan hit binabantayan',
 'prefs-watchlist-days' => 'Mga adlaw nga makikita ha barantayan:',
 'prefs-watchlist-days-max' => 'Pinakadamo $1 {{PLURAL:$1|ka adlaw|ka mga adlaw}}',
 'prefs-watchlist-edits-max' => 'Pinakadako nga ihap: 1000',
@@ -889,8 +894,8 @@ Ginpapasabot nga an sulod han mga panudlok han {{SITENAME}} in bangin daan an.',
 'default' => 'aada-nga-daan',
 'prefs-files' => 'Mga paypay',
 'youremail' => 'E-mail:',
-'username' => 'Agnay hiton gumaramit:',
-'uid' => 'ID han gumaramit:',
+'username' => '{{HENERO:$1|Agnay hit gumaramit}}:',
+'uid' => 'ID hit {{HENERO:$1|Gumaramit}}:',
 'prefs-memberingroups' => 'Api han {{PLURAL:$1| nga hugpo|nga mga hugpo}}:',
 'prefs-registration' => 'Oras han pagrehistro:',
 'yourrealname' => 'Tinuod nga ngaran:',
@@ -956,6 +961,7 @@ Diri ka gintutugotan pagliwat han mga katungod han gumaramit ha iba nga mga wiki
 'group-bureaucrat-member' => '{{GENDER:$1|burokrata}}',
 
 'grouppage-user' => '{{ns:project}}:Mga gumaramit',
+'grouppage-autoconfirmed' => '{{ns:project}}:Mga gumaramit nga naka-awtokompirmado',
 'grouppage-bot' => '{{ns:project}}:Mga bot',
 'grouppage-sysop' => '{{ns:project}}:Mga magdudumara',
 'grouppage-bureaucrat' => '{{ns:project}}:Mga burokrata',
@@ -974,7 +980,9 @@ Diri ka gintutugotan pagliwat han mga katungod han gumaramit ha iba nga mga wiki
 'right-movefile' => 'Balhina an mga paypay',
 'right-upload' => 'Igkarga paigbaw an mga paypay',
 'right-reupload' => 'Sapawa an mga aada nga mga paypay',
+'right-reupload-own' => 'Igsapaw an aada yana nga mga paypay nga ginkarga-pasaka nimo mismo',
 'right-upload_by_url' => 'Igkarga paigbaw an mga paypay tikang ha uska URL',
+'right-autoconfirmed' => 'Igliwat an mga semi-pinanpasaliporan nga pakli',
 'right-bot' => 'Igtrato komo uska naglulugaring nga proseso',
 'right-delete' => 'Igpara an mga pakli',
 'right-bigdelete' => 'Igpara an mga pakli nga may-ada dagko nga mga kaagi',
@@ -1026,6 +1034,7 @@ Diri ka gintutugotan pagliwat han mga katungod han gumaramit ha iba nga mga wiki
 'action-protect' => 'igsaliwan an katupngan han pananalipod para hini nga pakli',
 'action-import' => 'ig-angbit ini nga pakli tikang ha iba nga wiki',
 'action-importupload' => 'ig-angbit ini nga pakli tikang ha uska ginkarga-pasaka nga paypay',
+'action-patrol' => 'markahi an kanan iba pagliwat komo nakapatrolya',
 'action-mergehistory' => 'Igtampo an kaagi hini nga pakli',
 'action-userrights' => 'Igliwat an ngatanan nga mga katungod han gumaramit',
 'action-sendemail' => 'Padara hin mga e-mail',
@@ -1084,6 +1093,7 @@ Mga pakli ha [[Special:Watchlist|imo angay timan-an]] in naka-'''bold'''.",
 
 An taramdan han pagpara ngan pagbalhin para hini nga pakli in ginhahatag para han imo kamurayaw:",
 'upload-permitted' => 'Gintutugotan nga mga klase han paypay: $1.',
+'upload-preferred' => 'Mas karugag nga mga tipo hin paypay: %1.',
 'upload-prohibited' => 'Gindidire nga mga klase han paypay: $1.',
 'uploadlog' => 'Talaan hin ginkarga-pasaka',
 'uploadlogpage' => 'Talaan han mga ginkarga-paigbaw',
@@ -1091,11 +1101,15 @@ An taramdan han pagpara ngan pagbalhin para hini nga pakli in ginhahatag para ha
 'filedesc' => 'Dalikyat nga pulong',
 'fileuploadsummary' => 'Dalikyat nga pulong:',
 'filereuploadsummary' => 'Mga pagbal-iw ha fayl:',
+'filestatus' => 'Kahimtang han copyright:',
 'filesource' => 'Tinikangan:',
+'uploadedfiles' => 'Mga paypay nga ginkarga-pasaka',
 'ignorewarning' => 'Pabay-i an pahimatngon ngan igtipig la ngahaw',
 'ignorewarnings' => 'Pasagdi an bisan ano nga mga pahimatngon',
+'minlength1' => 'Iton ngaran-han-paypay in kinahanglan may-ada bisan usa la nga letra.',
 'filename-toolong' => 'Iton ngaran hin paypay in diri puyde na mas lapos pa ha 240 ka mga byte.',
 'badfilename' => 'An ngaran-han-paypay in ginliwat ngada ha "$1".',
+'empty-file' => 'An paypay nga imo ginsumite in waray sulod.',
 'filename-tooshort' => 'An ngaran han fayl in halipot hin duro.',
 'filetype-banned' => 'Ini nga klase nga paypay in gindidire.',
 'illegal-filename' => 'An ngaran han fayl in diri gintutugutan.',
@@ -1105,6 +1119,7 @@ An taramdan han pagpara ngan pagbalhin para hini nga pakli in ginhahatag para ha
 'large-file' => 'Ginrerekomenda nga it mga paypay in diri malapos hin $1;
 ini nga paypay in $2.',
 'largefileserver' => 'Ini nga paypay in durudako kaysa ha ginpapakarawat han serbidor.',
+'windows-nonascii-filename' => 'Ini nga wiki in diri nakasuportado han mga ngaran-han-paypay nga may-ada pinaurog nga mga karakter.',
 'uploadwarning' => 'Pahimatngon han pagkarga paigbaw',
 'savefile' => 'Igtipig an paypay',
 'uploadedimage' => 'ginkarga-paigbaw "[[$1]]"',
@@ -1153,6 +1168,21 @@ $1',
 'backend-fail-create' => 'Diri nasusuratan an paypay nga "$1".',
 'backend-fail-maxsize' => 'Diri nasusuratan an paypay nga "$1" tungod nga mas dako ini kaysa hin {{PLURAL:"$2|usa nga byte|$2 nga mga byte}}.',
 'backend-fail-readonly' => 'An panluyo nga tiripigan nga "$1" in ha pagkayana in panbasa-la.  An rason nga ginhatag in: "\'\'$2\'\'"',
+'backend-fail-connect' => 'Diri nakakasumpay ha storage backend "$1".',
+
+# Lock manager
+'lockmanager-notlocked' => 'Waray ka rangka an "$1"; diri ini nakatrangka.',
+'lockmanager-fail-closelock' => 'Diri nakakasera han nakatrangka nga paypay para han "$1".',
+'lockmanager-fail-deletelock' => 'Diri nakakapara han nakatrangka nga paypay para hit "$1".',
+'lockmanager-fail-acquirelock' => 'Diri nakakakarawat hin trangka para hit "$1".',
+'lockmanager-fail-openlock' => 'Diri nakakaabre han nakatrangka nga paypay para hit "$1".',
+'lockmanager-fail-releaselock' => 'Diri nakakabul-iw han trangka para hit "$1".',
+
+# ZipDirectoryReader
+'zip-wrong-format' => 'An espisipikado nga paypay in diri naka ZIP nga paypay.',
+
+# Special:UploadStash
+'uploadstash-errclear' => 'An paghawan han mga paypay in diri malinamposon.',
 
 # img_auth script messages
 'img-auth-accessdenied' => 'Diri gintutugutan makasulod',
@@ -1207,7 +1237,11 @@ An paglaladawan han iya [$2 fayl han paglaladawan nga pakli] didto in ginpapakit
 'upload-disallowed-here' => 'Diri nimo masasapaw ini nga paypay.',
 
 # File reversion
+'filerevert' => 'Igbalik $1',
+'filerevert-legend' => 'Igbalik an paypay',
 'filerevert-comment' => 'Rason:',
+'filerevert-defaultcomment' => 'Ginbalik nga bersyon han $2, $1',
+'filerevert-submit' => 'Igbalik',
 
 # File deletion
 'filedelete' => 'Igpara $1',
@@ -1225,6 +1259,9 @@ An paglaladawan han iya [$2 fayl han paglaladawan nga pakli] didto in ginpapakit
 'mimetype' => 'MIME nga klase:',
 'download' => 'pagkarga paubos',
 
+# Unwatched pages
+'unwatchedpages' => 'Mga paypay nga gintanggal an pagbantay',
+
 # List redirects
 'listredirects' => 'Talaan hin mga redirect',
 
@@ -1258,6 +1295,11 @@ An paglaladawan han iya [$2 fayl han paglaladawan nga pakli] didto in ginpapakit
 'disambiguations' => 'Mga pakli nga nasumpay ha mga pansayod nga pakli',
 'disambiguationspage' => 'Template:pansayod',
 
+'pageswithprop-submit' => 'Kadto-a',
+
+'doubleredirects' => 'Mga doble nga redirekta',
+'double-redirect-fixer' => 'Mangangayad hin redirekta',
+
 'brokenredirects' => 'Mga redirect nga utod',
 'brokenredirects-edit' => 'igliwat',
 'brokenredirects-delete' => 'paraa',
@@ -1289,12 +1331,18 @@ An paglaladawan han iya [$2 fayl han paglaladawan nga pakli] didto in ginpapakit
 'mostlinked' => 'Pinakadamo nga mga ginsumpayan nga pakli',
 'mostlinkedcategories' => 'Pinakadamo nga mga ginsumpayan nga kaarangay',
 'mostlinkedtemplates' => 'Pinakadamo nga mga ginsumpayan nga batakan',
+'mostcategories' => 'Mga paypay nga may-ada pinakadamo nga mga kaarangay',
+'mostimages' => 'Pinakadamo nga nahisumpayan nga mga paypay',
+'mostinterwikis' => 'Mga pakli nga may-ada pinakadamo nga mga interwiki',
+'mostrevisions' => 'Mga pakli nga may-ada pinakadamo nga mga rebisyon',
 'prefixindex' => 'Ngatanan nga pakli nga may-ada pahiuna-nga-sumpay',
 'shortpages' => 'Haglipot nga mga pakli',
 'longpages' => 'Haglaba nga mga pakli',
 'deadendpages' => 'Waray na kakadtoan nga mga pakli',
 'protectedpages' => 'Pinapasaliporan nga mga pakli',
+'protectedtitles' => 'Pinapasaliporan nga mga titulo',
 'listusers' => 'Lista han mga gumaramit',
+'listusers-editsonly' => 'Igpakita la an mga gumaramit nga may-ada ginliwat',
 'listusers-creationsort' => 'Ginsusunodsunod pinaagi han paghimo nga petsa',
 'usereditcount' => '$1 {{PLURAL:$1|ka pagliwat|ka mga pagliwat}}',
 'usercreated' => '{{GENDER:$3|Ginhimo}} han $1 ha $2',
@@ -1333,6 +1381,7 @@ An paglaladawan han iya [$2 fayl han paglaladawan nga pakli] didto in ginpapakit
 'allpagesnext' => 'Sunod',
 'allpagessubmit' => 'Kadto-a',
 'allpages-bad-ns' => '{{SITENAME}} in waray ngaran-lat\'ang nga "$1".',
+'allpages-hide-redirects' => 'Igtago an mga redirekta',
 
 # SpecialCachedPage
 'cachedspecial-refresh-now' => 'Igkita an pinakaurhi.',
@@ -1387,6 +1436,7 @@ An paglaladawan han iya [$2 fayl han paglaladawan nga pakli] didto in ginpapakit
 'noemailtitle' => 'Waray e-mail address',
 'nowikiemailtitle' => 'Waray gintutugutan nga e-mail',
 'emailusername' => 'Agnay hiton gumaramit:',
+'emailusernamesubmit' => 'Igsumite',
 'emailfrom' => 'Tikang kan:',
 'emailto' => 'Para kan:',
 'emailsubject' => 'Himangrawon:',
@@ -1404,13 +1454,20 @@ An paglaladawan han iya [$2 fayl han paglaladawan nga pakli] didto in ginpapakit
 'mywatchlist' => 'Mga angay timan-an nakon',
 'watchlistfor2' => 'Para ha $1 $2',
 'watchnologin' => 'Diri nakalog-in',
+'addwatch' => 'Igdugang an listahan hit binabantayan',
 'watch' => 'Bantayi',
 'watchthispage' => 'Bantayi ini nga pakli',
 'unwatch' => 'Pabay-i an pagbantay',
+'unwatchthispage' => 'Undangi pagbantay',
 'watchlist-details' => '{{PLURAL:$1|$1 nga pakli|$1 nga mga pakli}} nga aada ha imo talaan nga binabantayan, diri lakip an mga hiruhimangraw-nga-pakli.',
 'wlshowlast' => 'Igpakita an katapusan nga $1 nga mga oras $2 nga mga adlaw $3',
 'watchlist-options' => 'Mga pirilian han talaan han binabantayan',
 
+# Displayed when you click the "watch" button and it is in the process of watching
+'watching' => 'Ginbabantay...',
+'unwatching' => 'Diri na ginbabantay...',
+
+'enotif_reset' => 'Markahi an ngatanan nga mga pakli nga ginbisita na',
 'enotif_impersonal_salutation' => 'gumaramit han {{SITENAME}}',
 'enotif_anon_editor' => 'waray magpakilala nga gumaramit $1',
 'created' => 'nahimo',
@@ -1421,6 +1478,7 @@ An paglaladawan han iya [$2 fayl han paglaladawan nga pakli] didto in ginpapakit
 'confirm' => 'Kompirma',
 'excontent' => "An sulod in: ''$1''",
 'excontentauthor' => 'an sulod in: \'\'$1\'\' (ngan hi "[[Special:Contributions/$2|$2]]" la an nag-amot)',
+'exbeforeblank' => 'sulod san-o paghawan in: "$1"',
 'exblank' => 'waray sulod an pakli',
 'delete-confirm' => 'Igpara "$1"',
 'delete-legend' => 'Igpara',
@@ -1452,7 +1510,7 @@ Kitaa an $2 para hin talaan han mga gibag-ohi nga mga ginpamara.',
 'prot_1movedto2' => '[[$1]] in ginbalhin ngadto ha [[$2]]',
 'protectcomment' => 'Katadongan:',
 'protect-default' => 'Togota an ngatanan nga mga gumaramit',
-'protect-level-sysop' => 'Mga magdudumara la',
+'protect-level-sysop' => 'Tuguti la an mga magdudumara',
 'protect-othertime' => 'Lain nga oras:',
 'protect-othertime-op' => 'lain nga oras',
 'protect-otherreason' => 'Lain/dugang nga katadongan:',
@@ -1855,6 +1913,7 @@ $1',
 
 # Video information, used by Language::formatTimePeriod() to format lengths in the above messages
 'ago' => '$1 an nakalabay',
+'just-now' => 'yana pala',
 
 # Bad image list
 'bad_image_list' => 'An kabutangan in masunod:
index d520b8c..c102940 100644 (file)
@@ -320,7 +320,7 @@ $messages = array(
 'about' => 'וועגן',
 'article' => 'אינהאלט בלאט',
 'newwindow' => '(עפֿנט זיך אין א נײַעם פענסטער)',
-'cancel' => '×\96×\99×\99 ×\9e×\91×\98×\9c',
+'cancel' => '×\90Ö·× ×\95×\9c×\99ר×\9f',
 'moredotdotdot' => 'נאך…',
 'mypage' => 'מײַן בלאט',
 'mytalk' => 'שמועס',
index 995cf1b..faf797b 100644 (file)
@@ -2021,6 +2021,7 @@ $1',
 'disambiguations-text' => "以下的页面都有到'''消歧义页'''的链接,但它们可能可以链接到更适当的页面。<br />一个页面如果使用了[[MediaWiki:Disambiguationspage]]内的模板,则会被视为消歧义页。",
 
 'pageswithprop-prop' => '属性名称:',
+'pageswithprop-submit' => '提交',
 
 'doubleredirects' => '双重重定向页',
 'doubleredirectstext' => '本页面列出重定向至其他重定向页的页面。每行含有第一及第二重定向的链接和第二重定向的目标(通常是第一重定向应该指向的“真实”目标页面)。<del>带删除线的</del>条目已被解决。',
@@ -4014,6 +4015,4 @@ MediaWiki发表时预期有用,但对此'''无任何保证''',亦无隐含
 'duration-centuries' => '$1个世纪',
 'duration-millennia' => '$1千年',
 
-# Unknown messages
-'pageswithprop-submit' => '提交',
 );
index 4b547a0..d863b82 100644 (file)
@@ -1873,7 +1873,7 @@ $1',
 'filehist-filesize' => '檔案大小',
 'filehist-comment' => '註解',
 'filehist-missing' => '檔案遺失',
-'imagelinks' => 'æ\96\87件使用情況',
+'imagelinks' => 'æª\94æ¡\88使用情況',
 'linkstoimage' => '以下的$1個頁面連接到本檔案:',
 'linkstoimage-more' => '多於$1個頁面連接到這個檔案。
 下面的清單只列示了連去這個檔案的最首$1個頁面。
@@ -1987,8 +1987,10 @@ Template:消除歧義',
 'disambiguations-text' => "以下的頁面都有至少一個連到'''消歧義頁'''的鏈接,但它們應鏈接到合適的頁面。<br />一個頁面如果使用了[[MediaWiki:Disambiguationspage]]內的模板,則會被視為消歧義頁。",
 
 'pageswithprop' => '有頁面屬性的頁面',
+'pageswithprop-legend' => '有頁面屬性的頁面',
 'pageswithprop-text' => '此頁列出所有頁面使用了特定的頁面屬性。',
 'pageswithprop-prop' => '屬性名稱:',
+'pageswithprop-submit' => '進入',
 
 'doubleredirects' => '雙重重定向頁面',
 'doubleredirectstext' => '這一頁列出所有重定向頁面重定向到另一個重定向頁的頁面。每一行都包含到第一和第二個重定向頁面的連結,以及第二個重定向頁面的目標,通常顯示的都會是"真正"的目標頁面,也就是第一個重定向頁面應該指向的頁面。
@@ -3994,7 +3996,7 @@ MediaWiki是基於使用目的而加以發佈,然而不負任何擔保責任
 'duration-centuries' => '$1個世紀',
 'duration-millennia' => '$1千年',
 
-# Unknown messages
-'pageswithprop-legend' => '有頁面屬性的頁面',
-'pageswithprop-submit' => '進入',
+# Image rotation
+'rotate-comment' => '順時針旋轉圖像$1{{PLURAL:$1|度|度}}',
+
 );
index 728530f..9471c65 100644 (file)
--- a/load.php5
+++ b/load.php5
@@ -1,7 +1,7 @@
 <?php
 /**
  * Version of load.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 egine.
+ * to execute scripts with PHP5 engine.
  *
  * 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
index 9f95f5d..5cb6f5f 100644 (file)
@@ -93,7 +93,7 @@ installations.
        runJobs.php
        Immediately complete all jobs in the job queue
 
-       stats.php
+       showCacheStats.php
        Show all statistics stored in the cache
 
        undelete.php
@@ -106,4 +106,4 @@ installations.
        Update pages restriction to the new schema
 
        userOptions.php
-       Change user options
\ No newline at end of file
+       Change user options
diff --git a/maintenance/clearCacheStats.php b/maintenance/clearCacheStats.php
new file mode 100644 (file)
index 0000000..7a0d664
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Removes all statistics tracking from the cache.
+ *
+ * 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
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
+require_once( __DIR__ . '/Maintenance.php' );
+
+/**
+ * Maintenance script to remove all statistics tracking from the cache.
+ *
+ * @ingroup Maintenance
+ */
+class ClearCacheStats extends Maintenance {
+
+       public function __construct() {
+               parent::__construct();
+               $this->mDescription = "Remove all statistics tracking from the cache";
+       }
+
+       public function execute() {
+               global $wgLocalDatabases, $wgMemc;
+               foreach ( $wgLocalDatabases as $db ) {
+                       $wgMemc->delete( "$db:stats:request_with_session" );
+                       $wgMemc->delete( "$db:stats:request_without_session" );
+                       $wgMemc->delete( "$db:stats:pcache_hit" );
+                       $wgMemc->delete( "$db:stats:pcache_miss_expired" );
+                       $wgMemc->delete( "$db:stats:pcache_miss_absent" );
+                       $wgMemc->delete( "$db:stats:pcache_miss_stub" );
+                       $wgMemc->delete( "$db:stats:image_cache_hit" );
+                       $wgMemc->delete( "$db:stats:image_cache_miss" );
+                       $wgMemc->delete( "$db:stats:image_cache_update" );
+                       $wgMemc->delete( "$db:stats:diff_cache_hit" );
+                       $wgMemc->delete( "$db:stats:diff_cache_miss" );
+                       $wgMemc->delete( "$db:stats:diff_uncacheable" );
+                       $wgMemc->delete( "$db:stats:job-insert" );
+                       $wgMemc->delete( "$db:stats:job-pop" );
+               }
+       }
+}
+
+$maintClass = "ClearCacheStats";
+require_once( RUN_MAINTENANCE_IF_MAIN );
diff --git a/maintenance/clearInterwikiCache.php b/maintenance/clearInterwikiCache.php
new file mode 100644 (file)
index 0000000..88769df
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Clear the cache of interwiki prefixes for all local wikis.
+ *
+ * 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
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
+require_once( __DIR__ . '/Maintenance.php' );
+
+/**
+ * Maintenance script to clear the cache of interwiki prefixes for all local wikis.
+ *
+ * @ingroup Maintenance
+ */
+class ClearInterwikiCache extends Maintenance {
+
+       public function __construct() {
+               parent::__construct();
+               $this->mDescription = "Clear all interwiki links for all languages from the cache";
+       }
+
+       public function execute() {
+               global $wgLocalDatabases, $wgMemc;
+               $dbr = wfGetDB( DB_SLAVE );
+               $res = $dbr->select( 'interwiki', array( 'iw_prefix' ), false );
+               $prefixes = array();
+               foreach ( $res as $row ) {
+                       $prefixes[] = $row->iw_prefix;
+               }
+
+               foreach ( $wgLocalDatabases as $db ) {
+                       $this->output( "$db..." );
+                       foreach ( $prefixes as $prefix ) {
+                               $wgMemc->delete( "$db:interwiki:$prefix" );
+                       }
+                       $this->output( "done\n" );
+               }
+       }
+}
+
+$maintClass = "ClearInterwikiCache";
+require_once( RUN_MAINTENANCE_IF_MAIN );
diff --git a/maintenance/clear_interwiki_cache.php b/maintenance/clear_interwiki_cache.php
deleted file mode 100644 (file)
index 88769df..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-/**
- * Clear the cache of interwiki prefixes for all local wikis.
- *
- * 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
- *
- * @file
- * @ingroup Maintenance
- */
-
-require_once( __DIR__ . '/Maintenance.php' );
-
-/**
- * Maintenance script to clear the cache of interwiki prefixes for all local wikis.
- *
- * @ingroup Maintenance
- */
-class ClearInterwikiCache extends Maintenance {
-
-       public function __construct() {
-               parent::__construct();
-               $this->mDescription = "Clear all interwiki links for all languages from the cache";
-       }
-
-       public function execute() {
-               global $wgLocalDatabases, $wgMemc;
-               $dbr = wfGetDB( DB_SLAVE );
-               $res = $dbr->select( 'interwiki', array( 'iw_prefix' ), false );
-               $prefixes = array();
-               foreach ( $res as $row ) {
-                       $prefixes[] = $row->iw_prefix;
-               }
-
-               foreach ( $wgLocalDatabases as $db ) {
-                       $this->output( "$db..." );
-                       foreach ( $prefixes as $prefix ) {
-                               $wgMemc->delete( "$db:interwiki:$prefix" );
-                       }
-                       $this->output( "done\n" );
-               }
-       }
-}
-
-$maintClass = "ClearInterwikiCache";
-require_once( RUN_MAINTENANCE_IF_MAIN );
diff --git a/maintenance/clear_stats.php b/maintenance/clear_stats.php
deleted file mode 100644 (file)
index 4581d53..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**
- * Removes all statistics tracking from the cache.
- *
- * 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
- *
- * @file
- * @ingroup Maintenance
- */
-
-require_once( __DIR__ . '/Maintenance.php' );
-
-/**
- * Maintenance script to remove all statistics tracking from the cache.
- *
- * @ingroup Maintenance
- */
-class clear_stats extends Maintenance {
-
-       public function __construct() {
-               parent::__construct();
-               $this->mDescription = "Remove all statistics tracking from the cache";
-       }
-
-       public function execute() {
-               global $wgLocalDatabases, $wgMemc;
-               foreach ( $wgLocalDatabases as $db ) {
-                       $wgMemc->delete( "$db:stats:request_with_session" );
-                       $wgMemc->delete( "$db:stats:request_without_session" );
-                       $wgMemc->delete( "$db:stats:pcache_hit" );
-                       $wgMemc->delete( "$db:stats:pcache_miss_expired" );
-                       $wgMemc->delete( "$db:stats:pcache_miss_absent" );
-                       $wgMemc->delete( "$db:stats:pcache_miss_stub" );
-                       $wgMemc->delete( "$db:stats:image_cache_hit" );
-                       $wgMemc->delete( "$db:stats:image_cache_miss" );
-                       $wgMemc->delete( "$db:stats:image_cache_update" );
-                       $wgMemc->delete( "$db:stats:diff_cache_hit" );
-                       $wgMemc->delete( "$db:stats:diff_cache_miss" );
-                       $wgMemc->delete( "$db:stats:diff_uncacheable" );
-                       $wgMemc->delete( "$db:stats:job-insert" );
-                       $wgMemc->delete( "$db:stats:job-pop" );
-               }
-       }
-}
-
-$maintClass = "clear_stats";
-require_once( RUN_MAINTENANCE_IF_MAIN );
diff --git a/maintenance/initSiteStats.php b/maintenance/initSiteStats.php
new file mode 100644 (file)
index 0000000..1990659
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Re-initialise or update the site statistics table.
+ *
+ * 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
+ *
+ * @file
+ * @ingroup Maintenance
+ * @author Brion Vibber
+ * @author Rob Church <robchur@gmail.com>
+ */
+
+require_once( __DIR__ . '/Maintenance.php' );
+
+/**
+ * Maintenance script to re-initialise or update the site statistics table
+ *
+ * @ingroup Maintenance
+ */
+class InitSiteStats extends Maintenance {
+       public function __construct() {
+               parent::__construct();
+               $this->mDescription = "Re-initialise the site statistics tables";
+               $this->addOption( 'update', 'Update the existing statistics (preserves the ss_total_views field)' );
+               $this->addOption( 'noviews', "Don't update the page view counter" );
+               $this->addOption( 'active', 'Also update active users count' );
+               $this->addOption( 'use-master', 'Count using the master database' );
+       }
+
+       public function execute() {
+               $this->output( "Refresh Site Statistics\n\n" );
+               $counter = new SiteStatsInit( $this->hasOption( 'use-master' ) );
+
+               $this->output( "Counting total edits..." );
+               $edits = $counter->edits();
+               $this->output( "{$edits}\nCounting number of articles..." );
+
+               $good  = $counter->articles();
+               $this->output( "{$good}\nCounting total pages..." );
+
+               $pages = $counter->pages();
+               $this->output( "{$pages}\nCounting number of users..." );
+
+               $users = $counter->users();
+               $this->output( "{$users}\nCounting number of images..." );
+
+               $image = $counter->files();
+               $this->output( "{$image}\n" );
+
+               if ( !$this->hasOption( 'noviews' ) ) {
+                       $this->output( "Counting total page views..." );
+                       $views = $counter->views();
+                       $this->output( "{$views}\n" );
+               }
+
+               if ( $this->hasOption( 'active' ) ) {
+                       $this->output( "Counting active users..." );
+                       $active = SiteStatsUpdate::cacheUpdate( wfGetDB( DB_MASTER ) );
+                       $this->output( "{$active}\n" );
+               }
+
+               $this->output( "\nUpdating site statistics..." );
+
+               if ( $this->hasOption( 'update' ) ) {
+                       $counter->update();
+               } else {
+                       $counter->refresh();
+               }
+
+               $this->output( "done.\n" );
+       }
+}
+
+$maintClass = "InitSiteStats";
+require_once( RUN_MAINTENANCE_IF_MAIN );
diff --git a/maintenance/initStats.php b/maintenance/initStats.php
deleted file mode 100644 (file)
index 5d8b886..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-/**
- * Re-initialise or update the site statistics table.
- *
- * 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
- *
- * @file
- * @ingroup Maintenance
- * @author Brion Vibber
- * @author Rob Church <robchur@gmail.com>
- */
-
-require_once( __DIR__ . '/Maintenance.php' );
-
-/**
- * Maintenance script to re-initialise or update the site statistics table
- *
- * @ingroup Maintenance
- */
-class InitStats extends Maintenance {
-       public function __construct() {
-               parent::__construct();
-               $this->mDescription = "Re-initialise the site statistics tables";
-               $this->addOption( 'update', 'Update the existing statistics (preserves the ss_total_views field)' );
-               $this->addOption( 'noviews', "Don't update the page view counter" );
-               $this->addOption( 'active', 'Also update active users count' );
-               $this->addOption( 'use-master', 'Count using the master database' );
-       }
-
-       public function execute() {
-               $this->output( "Refresh Site Statistics\n\n" );
-               $counter = new SiteStatsInit( $this->hasOption( 'use-master' ) );
-
-               $this->output( "Counting total edits..." );
-               $edits = $counter->edits();
-               $this->output( "{$edits}\nCounting number of articles..." );
-
-               $good  = $counter->articles();
-               $this->output( "{$good}\nCounting total pages..." );
-
-               $pages = $counter->pages();
-               $this->output( "{$pages}\nCounting number of users..." );
-
-               $users = $counter->users();
-               $this->output( "{$users}\nCounting number of images..." );
-
-               $image = $counter->files();
-               $this->output( "{$image}\n" );
-
-               if ( !$this->hasOption( 'noviews' ) ) {
-                       $this->output( "Counting total page views..." );
-                       $views = $counter->views();
-                       $this->output( "{$views}\n" );
-               }
-
-               if ( $this->hasOption( 'active' ) ) {
-                       $this->output( "Counting active users..." );
-                       $active = SiteStatsUpdate::cacheUpdate( wfGetDB( DB_MASTER ) );
-                       $this->output( "{$active}\n" );
-               }
-
-               $this->output( "\nUpdating site statistics..." );
-
-               if ( $this->hasOption( 'update' ) ) {
-                       $counter->update();
-               } else {
-                       $counter->refresh();
-               }
-
-               $this->output( "done.\n" );
-       }
-}
-
-$maintClass = "InitStats";
-require_once( RUN_MAINTENANCE_IF_MAIN );
index ebf8a02..7c16df6 100644 (file)
@@ -1640,9 +1640,10 @@ $wgMessageStructure = array(
        'pageswithprop' => array(
                'pageswithprop',
                'pageswithprop-summary',
+               'pageswithprop-legend',
                'pageswithprop-text',
                'pageswithprop-prop',
-               'pageswithprop-ok',
+               'pageswithprop-submit',
        ),
        'doubleredirects' => array(
                'doubleredirects',
@@ -3851,13 +3852,16 @@ $wgMessageStructure = array(
                'duration-centuries',
                'duration-millennia'
        ),
+       'rotation' => array(
+               'rotate-comment',
+       ),
 );
 
 /** Comments for each block */
 $wgBlockComments = array(
        'sidebar'             => "The sidebar for MonoBook is generated from this message, lines that do not
 begin with * or ** are discarded, furthermore lines that do begin with ** and
-do not contain | are also discarded, but do not depend on this behaviour for
+do not contain | are also discarded, but do not depend on this behavior for
 future releases. Also note that since each list value is wrapped in a unique
 XHTML id it should only appear once and include characters that are legal
 XHTML id names.",
@@ -4094,4 +4098,5 @@ Variants for Chinese language",
        'apierrors'             => 'API errors',
        'duration'              => 'Durations',
        'cachedspecial'         => 'SpecialCachedPage',
+       'rotation'              => 'Image rotation',
 );
index f5bf4da..1be5146 100644 (file)
@@ -77,10 +77,9 @@ class nextJobDB extends Maintenance {
                                return; // no jobs for this type
                        }
 
-                       list( $type, $db ) = $candidates[ mt_rand( 0, count( $candidates ) - 1 ) ];
-                       if ( !$this->checkJob( $type, $db ) ) { // queue is actually empty?
-                               $pendingDBs[$type] = array_diff( $pendingDBs[$type], $db );
-                               JobQueueAggregator::singleton()->notifyQueueEmpty( $db, $type );
+                       list( $type, $db ) = $candidates[mt_rand( 0, count( $candidates ) - 1 )];
+                       if ( JobQueueGroup::singleton( $db )->isQueueDeprioritized( $type ) ) {
+                               $pendingDBs[$type] = array_diff( $pendingDBs[$type], array( $db ) );
                                $again = true;
                        }
                } while ( $again );
@@ -92,17 +91,6 @@ class nextJobDB extends Maintenance {
                }
        }
 
-       /**
-        * Check if the specified database has a job of the specified type in it.
-        * The type may be false to indicate "all".
-        * @param $type string
-        * @param $dbName string
-        * @return bool
-        */
-       private function checkJob( $type, $dbName ) {
-               return !JobQueueGroup::singleton( $dbName )->get( $type )->isEmpty();
-       }
-
        /**
         * Do all ready periodic jobs for all databases every 5 minutes (and .1% of the time)
         * @return integer
diff --git a/maintenance/proxyCheck.php b/maintenance/proxyCheck.php
new file mode 100644 (file)
index 0000000..2ccf703
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Command line script to check for an open proxy at a specified location.
+ *
+ * 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
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
+if( PHP_SAPI != 'cli' ) {
+       die( 1 );
+}
+
+/**
+ *
+ */
+$output = '';
+
+/**
+ * Exit if there are not enough parameters, or if it's not command line mode
+ */
+if ( ( isset( $_REQUEST ) && array_key_exists( 'argv', $_REQUEST ) ) || count( $argv ) < 4 ) {
+       $output .= "Incorrect parameters\n";
+} else {
+       /**
+        * Get parameters
+        */
+       $ip = $argv[1];
+       $port = $argv[2];
+       $url = $argv[3];
+       $host = trim(`hostname`);
+       $output = "Connecting to $ip:$port, target $url, this hostname $host\n";
+
+       # Open socket
+       $sock = @fsockopen($ip, $port, $errno, $errstr, 5);
+       if ($errno == 0 ) {
+               $output .= "Connected\n";
+               # Send payload
+               $request = "GET $url HTTP/1.0\r\n";
+#              $request .= "Proxy-Connection: Keep-Alive\r\n";
+#              $request .= "Pragma: no-cache\r\n";
+#              $request .= "Host: ".$url."\r\n";
+#              $request .= "User-Agent: MediaWiki open proxy check\r\n";
+               $request .= "\r\n";
+               @fputs($sock, $request);
+               $response = fgets($sock, 65536);
+               $output .= $response;
+               @fclose($sock);
+       } else {
+               $output .= "No connection\n";
+       }
+}
+
+$output = escapeshellarg( $output );
+
+#`echo $output >> /home/tstarling/open/proxy.log`;
diff --git a/maintenance/proxy_check.php b/maintenance/proxy_check.php
deleted file mode 100644 (file)
index 2ccf703..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/**
- * Command line script to check for an open proxy at a specified location.
- *
- * 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
- *
- * @file
- * @ingroup Maintenance
- */
-
-if( PHP_SAPI != 'cli' ) {
-       die( 1 );
-}
-
-/**
- *
- */
-$output = '';
-
-/**
- * Exit if there are not enough parameters, or if it's not command line mode
- */
-if ( ( isset( $_REQUEST ) && array_key_exists( 'argv', $_REQUEST ) ) || count( $argv ) < 4 ) {
-       $output .= "Incorrect parameters\n";
-} else {
-       /**
-        * Get parameters
-        */
-       $ip = $argv[1];
-       $port = $argv[2];
-       $url = $argv[3];
-       $host = trim(`hostname`);
-       $output = "Connecting to $ip:$port, target $url, this hostname $host\n";
-
-       # Open socket
-       $sock = @fsockopen($ip, $port, $errno, $errstr, 5);
-       if ($errno == 0 ) {
-               $output .= "Connected\n";
-               # Send payload
-               $request = "GET $url HTTP/1.0\r\n";
-#              $request .= "Proxy-Connection: Keep-Alive\r\n";
-#              $request .= "Pragma: no-cache\r\n";
-#              $request .= "Host: ".$url."\r\n";
-#              $request .= "User-Agent: MediaWiki open proxy check\r\n";
-               $request .= "\r\n";
-               @fputs($sock, $request);
-               $response = fgets($sock, 65536);
-               $output .= $response;
-               @fclose($sock);
-       } else {
-               $output .= "No connection\n";
-       }
-}
-
-$output = escapeshellarg( $output );
-
-#`echo $output >> /home/tstarling/open/proxy.log`;
index f067dc6..e21dd17 100644 (file)
@@ -52,21 +52,19 @@ class PurgeParserCache extends Maintenance {
                        global $wgParserCacheExpireTime;
                        $date = wfTimestamp( TS_MW, time() + $wgParserCacheExpireTime - intval( $inputAge ) );
                } else {
-                       echo "Must specify either --expiredate or --age\n";
-                       exit( 1 );
+                       $this->error( "Must specify either --expiredate or --age", 1 );
                }
 
                $english = Language::factory( 'en' );
-               echo "Deleting objects expiring before " . $english->timeanddate( $date ) . "\n";
+               $this->output( "Deleting objects expiring before " . $english->timeanddate( $date ) . "\n" );
 
                $pc = wfGetParserCacheStorage();
                $success = $pc->deleteObjectsExpiringBefore( $date, array( $this, 'showProgress' ) );
                if ( !$success ) {
-                       echo "\nCannot purge this kind of parser cache.\n";
-                       exit( 1 );
+                       $this->error( "\nCannot purge this kind of parser cache.", 1 );
                }
                $this->showProgress( 100 );
-               echo "\nDone\n";
+               $this->output( "\nDone\n" );
        }
 
        function showProgress( $percent ) {
@@ -77,8 +75,8 @@ class PurgeParserCache extends Maintenance {
                $this->lastProgress = $percentString;
 
                $stars = floor( $percent / 2 );
-               echo '[' . str_repeat( '*', $stars ), str_repeat( '.', 50 - $stars ) . '] ' .
-                       "$percentString%\r";
+               $this->output( '[' . str_repeat( '*', $stars ) . str_repeat( '.', 50 - $stars ) . '] ' .
+                       "$percentString%\r" );
 
        }
 }
index f9557ce..b1be714 100644 (file)
@@ -73,7 +73,7 @@ class RunJobs extends Maintenance {
                $type = $this->getOption( 'type', false );
                $wgTitle = Title::newFromText( 'RunJobs.php' );
                $dbw = wfGetDB( DB_MASTER );
-               $n = 0;
+               $jobsRun = 0; // counter
 
                $group = JobQueueGroup::singleton();
                // Handle any required periodic queue maintenance
@@ -82,11 +82,13 @@ class RunJobs extends Maintenance {
                        $this->runJobsLog( "Executed $count periodic queue task(s)." );
                }
 
+               $lastTime = time();
                do {
                        $job = ( $type === false )
                                ? $group->pop( JobQueueGroup::TYPE_DEFAULT, JobQueueGroup::USE_CACHE )
                                : $group->pop( $type ); // job from a single queue
                        if ( $job ) { // found a job
+                               ++$jobsRun;
                                $this->runJobsLog( $job->toString() . " STARTING" );
 
                                // Run the job...
@@ -112,14 +114,21 @@ class RunJobs extends Maintenance {
                                }
 
                                // Break out if we hit the job count or wall time limits...
-                               if ( $maxJobs && ++$n >= $maxJobs ) {
+                               if ( $maxJobs && $jobsRun >= $maxJobs ) {
                                        break;
                                } elseif ( $maxTime && ( time() - $startTime ) > $maxTime ) {
                                        break;
                                }
 
-                               // Don't let any slaves/backups fall behind...
-                               $group->get( $job->getType() )->waitForBackups();
+                               // Don't let any of the main DB slaves get backed up
+                               $timePassed = time() - $lastTime;
+                               if ( $timePassed >= 5 || $timePassed < 0 ) {
+                                       wfWaitForSlaves();
+                               }
+                               // Don't let any queue slaves/backups fall behind
+                               if ( $jobsRun > 0 && ( $jobsRun % 100 ) == 0 ) {
+                                       $group->waitForBackups();
+                               }
                        }
                } while ( $job ); // stop when there are no jobs
        }
diff --git a/maintenance/showCacheStats.php b/maintenance/showCacheStats.php
new file mode 100644 (file)
index 0000000..8f23868
--- /dev/null
@@ -0,0 +1,106 @@
+<?php
+/**
+ * Show statistics from the cache.
+ *
+ * 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
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
+require_once( __DIR__ . '/Maintenance.php' );
+
+/**
+ * Maintenance script that shows statistics from the cache.
+ *
+ * @ingroup Maintenance
+ */
+class ShowCacheStats extends Maintenance {
+
+       public function __construct() {
+               $this->mDescription = "Show statistics from the cache";
+               parent::__construct();
+       }
+
+       public function getDbType() {
+               return Maintenance::DB_NONE;
+       }
+
+       public function execute() {
+               global $wgMemc;
+
+               // Can't do stats if
+               if ( get_class( $wgMemc ) == 'EmptyBagOStuff' ) {
+                       $this->error( "You are running EmptyBagOStuff, I can not provide any statistics.", true );
+               }
+               $session = intval( $wgMemc->get( wfMemcKey( 'stats', 'request_with_session' ) ) );
+               $noSession = intval( $wgMemc->get( wfMemcKey( 'stats', 'request_without_session' ) ) );
+               $total = $session + $noSession;
+               if ( $total == 0 ) {
+                       $this->error( "You either have no stats or the cache isn't running. Aborting.", true );
+               }
+               $this->output( "Requests\n" );
+               $this->output( sprintf( "with session:      %-10d %6.2f%%\n", $session, $session / $total * 100 ) );
+               $this->output( sprintf( "without session:   %-10d %6.2f%%\n", $noSession, $noSession / $total * 100 ) );
+               $this->output( sprintf( "total:             %-10d %6.2f%%\n", $total, 100 ) );
+
+
+               $this->output( "\nParser cache\n" );
+               $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_hit' ) ) );
+               $expired = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_expired' ) ) );
+               $absent = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_absent' ) ) );
+               $stub = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_stub' ) ) );
+               $total = $hits + $expired + $absent + $stub;
+               if ( $total ) {
+                       $this->output( sprintf( "hits:              %-10d %6.2f%%\n", $hits, $hits / $total * 100 ) );
+                       $this->output( sprintf( "expired:           %-10d %6.2f%%\n", $expired, $expired / $total * 100 ) );
+                       $this->output( sprintf( "absent:            %-10d %6.2f%%\n", $absent, $absent / $total * 100 ) );
+                       $this->output( sprintf( "stub threshold:    %-10d %6.2f%%\n", $stub, $stub / $total * 100 ) );
+                       $this->output( sprintf( "total:             %-10d %6.2f%%\n", $total, 100 ) );
+               } else {
+                       $this->output( "no statistics available\n" );
+               }
+
+               $this->output( "\nImage cache\n" );
+               $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'image_cache_hit' ) ) );
+               $misses = intval( $wgMemc->get( wfMemcKey( 'stats', 'image_cache_miss' ) ) );
+               $updates = intval( $wgMemc->get( wfMemcKey( 'stats', 'image_cache_update' ) ) );
+               $total = $hits + $misses;
+               if ( $total ) {
+                       $this->output( sprintf( "hits:              %-10d %6.2f%%\n", $hits, $hits / $total * 100 ) );
+                       $this->output( sprintf( "misses:            %-10d %6.2f%%\n", $misses, $misses / $total * 100 ) );
+                       $this->output( sprintf( "updates:           %-10d\n", $updates ) );
+               } else {
+                       $this->output( "no statistics available\n" );
+               }
+
+               $this->output( "\nDiff cache\n" );
+               $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'diff_cache_hit' ) ) );
+               $misses = intval( $wgMemc->get( wfMemcKey( 'stats', 'diff_cache_miss' ) ) );
+               $uncacheable = intval( $wgMemc->get( wfMemcKey( 'stats', 'diff_uncacheable' ) ) );
+               $total = $hits + $misses + $uncacheable;
+               if ( $total ) {
+                       $this->output( sprintf( "hits:              %-10d %6.2f%%\n", $hits, $hits / $total * 100 ) );
+                       $this->output( sprintf( "misses:            %-10d %6.2f%%\n", $misses, $misses / $total * 100 ) );
+                       $this->output( sprintf( "uncacheable:       %-10d %6.2f%%\n", $uncacheable, $uncacheable / $total * 100 ) );
+               } else {
+                       $this->output( "no statistics available\n" );
+               }
+       }
+}
+
+$maintClass = "ShowCacheStats";
+require_once( RUN_MAINTENANCE_IF_MAIN );
diff --git a/maintenance/showSiteStats.php b/maintenance/showSiteStats.php
new file mode 100644 (file)
index 0000000..e7359b2
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+
+/**
+ * Show the cached statistics.
+ * Give out the same output as [[Special:Statistics]]
+ *
+ * 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
+ *
+ * @file
+ * @ingroup Maintenance
+ * @author Antoine Musso <hashar at free dot fr>
+ * Based on initSiteStats.php by:
+ * @author Brion Vibber
+ * @author Rob Church <robchur@gmail.com>
+ *
+ * @license GNU General Public License 2.0 or later
+ */
+
+require_once( __DIR__ . '/Maintenance.php' );
+
+/**
+ * Maintenance script to show the cached statistics.
+ *
+ * @ingroup Maintenance
+ */
+class ShowSiteStats extends Maintenance {
+       public function __construct() {
+               parent::__construct();
+               $this->mDescription = "Show the cached statistics";
+       }
+       public function execute() {
+               $fields = array(
+                       'ss_total_views' => 'Total views',
+                       'ss_total_edits' => 'Total edits',
+                       'ss_good_articles' => 'Number of articles',
+                       'ss_total_pages' => 'Total pages',
+                       'ss_users' => 'Number of users',
+                       'ss_images' => 'Number of images',
+               );
+
+               // Get cached stats from slave database
+               $dbr = wfGetDB( DB_SLAVE );
+               $stats = $dbr->selectRow( 'site_stats', '*', '', __METHOD__ );
+
+               // Get maximum size for each column
+               $max_length_value = $max_length_desc = 0;
+               foreach ( $fields as $field => $desc ) {
+                       $max_length_value = max( $max_length_value, strlen( $stats->$field ) );
+                       $max_length_desc  = max( $max_length_desc,  strlen( $desc ) ) ;
+               }
+
+               // Show them
+               foreach ( $fields as $field => $desc ) {
+                       $this->output( sprintf( "%-{$max_length_desc}s: %{$max_length_value}d\n", $desc, $stats->$field ) );
+               }
+       }
+}
+
+$maintClass = "ShowSiteStats";
+require_once( RUN_MAINTENANCE_IF_MAIN );
diff --git a/maintenance/showStats.php b/maintenance/showStats.php
deleted file mode 100644 (file)
index 3036406..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-
-/**
- * Show the cached statistics.
- * Give out the same output as [[Special:Statistics]]
- *
- * 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
- *
- * @file
- * @ingroup Maintenance
- * @author Antoine Musso <hashar at free dot fr>
- * Based on initStats.php by:
- * @author Brion Vibber
- * @author Rob Church <robchur@gmail.com>
- *
- * @license GNU General Public License 2.0 or later
- */
-
-require_once( __DIR__ . '/Maintenance.php' );
-
-/**
- * Maintenance script to show the cached statistics.
- *
- * @ingroup Maintenance
- */
-class ShowStats extends Maintenance {
-       public function __construct() {
-               parent::__construct();
-               $this->mDescription = "Show the cached statistics";
-       }
-       public function execute() {
-               $fields = array(
-                       'ss_total_views' => 'Total views',
-                       'ss_total_edits' => 'Total edits',
-                       'ss_good_articles' => 'Number of articles',
-                       'ss_total_pages' => 'Total pages',
-                       'ss_users' => 'Number of users',
-                       'ss_images' => 'Number of images',
-               );
-
-               // Get cached stats from slave database
-               $dbr = wfGetDB( DB_SLAVE );
-               $stats = $dbr->selectRow( 'site_stats', '*', '', __METHOD__ );
-
-               // Get maximum size for each column
-               $max_length_value = $max_length_desc = 0;
-               foreach ( $fields as $field => $desc ) {
-                       $max_length_value = max( $max_length_value, strlen( $stats->$field ) );
-                       $max_length_desc  = max( $max_length_desc,  strlen( $desc ) ) ;
-               }
-
-               // Show them
-               foreach ( $fields as $field => $desc ) {
-                       $this->output( sprintf( "%-{$max_length_desc}s: %{$max_length_value}d\n", $desc, $stats->$field ) );
-               }
-       }
-}
-
-$maintClass = "ShowStats";
-require_once( RUN_MAINTENANCE_IF_MAIN );
diff --git a/maintenance/stats.php b/maintenance/stats.php
deleted file mode 100644 (file)
index be448f9..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-/**
- * Show statistics from the cache.
- *
- * 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
- *
- * @file
- * @ingroup Maintenance
- */
-
-require_once( __DIR__ . '/Maintenance.php' );
-
-/**
- * Maintenance script that shows statistics from the cache.
- *
- * @ingroup Maintenance
- */
-class CacheStats extends Maintenance {
-
-       public function __construct() {
-               $this->mDescription = "Show statistics from the cache";
-               parent::__construct();
-       }
-
-       public function getDbType() {
-               return Maintenance::DB_NONE;
-       }
-
-       public function execute() {
-               global $wgMemc;
-
-               // Can't do stats if
-               if ( get_class( $wgMemc ) == 'EmptyBagOStuff' ) {
-                       $this->error( "You are running EmptyBagOStuff, I can not provide any statistics.", true );
-               }
-               $session = intval( $wgMemc->get( wfMemcKey( 'stats', 'request_with_session' ) ) );
-               $noSession = intval( $wgMemc->get( wfMemcKey( 'stats', 'request_without_session' ) ) );
-               $total = $session + $noSession;
-               if ( $total == 0 ) {
-                       $this->error( "You either have no stats or the cache isn't running. Aborting.", true );
-               }
-               $this->output( "Requests\n" );
-               $this->output( sprintf( "with session:      %-10d %6.2f%%\n", $session, $session / $total * 100 ) );
-               $this->output( sprintf( "without session:   %-10d %6.2f%%\n", $noSession, $noSession / $total * 100 ) );
-               $this->output( sprintf( "total:             %-10d %6.2f%%\n", $total, 100 ) );
-
-
-               $this->output( "\nParser cache\n" );
-               $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_hit' ) ) );
-               $expired = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_expired' ) ) );
-               $absent = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_absent' ) ) );
-               $stub = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_stub' ) ) );
-               $total = $hits + $expired + $absent + $stub;
-               if ( $total ) {
-                       $this->output( sprintf( "hits:              %-10d %6.2f%%\n", $hits, $hits / $total * 100 ) );
-                       $this->output( sprintf( "expired:           %-10d %6.2f%%\n", $expired, $expired / $total * 100 ) );
-                       $this->output( sprintf( "absent:            %-10d %6.2f%%\n", $absent, $absent / $total * 100 ) );
-                       $this->output( sprintf( "stub threshold:    %-10d %6.2f%%\n", $stub, $stub / $total * 100 ) );
-                       $this->output( sprintf( "total:             %-10d %6.2f%%\n", $total, 100 ) );
-               } else {
-                       $this->output( "no statistics available\n" );
-               }
-
-               $this->output( "\nImage cache\n" );
-               $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'image_cache_hit' ) ) );
-               $misses = intval( $wgMemc->get( wfMemcKey( 'stats', 'image_cache_miss' ) ) );
-               $updates = intval( $wgMemc->get( wfMemcKey( 'stats', 'image_cache_update' ) ) );
-               $total = $hits + $misses;
-               if ( $total ) {
-                       $this->output( sprintf( "hits:              %-10d %6.2f%%\n", $hits, $hits / $total * 100 ) );
-                       $this->output( sprintf( "misses:            %-10d %6.2f%%\n", $misses, $misses / $total * 100 ) );
-                       $this->output( sprintf( "updates:           %-10d\n", $updates ) );
-               } else {
-                       $this->output( "no statistics available\n" );
-               }
-
-               $this->output( "\nDiff cache\n" );
-               $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'diff_cache_hit' ) ) );
-               $misses = intval( $wgMemc->get( wfMemcKey( 'stats', 'diff_cache_miss' ) ) );
-               $uncacheable = intval( $wgMemc->get( wfMemcKey( 'stats', 'diff_uncacheable' ) ) );
-               $total = $hits + $misses + $uncacheable;
-               if ( $total ) {
-                       $this->output( sprintf( "hits:              %-10d %6.2f%%\n", $hits, $hits / $total * 100 ) );
-                       $this->output( sprintf( "misses:            %-10d %6.2f%%\n", $misses, $misses / $total * 100 ) );
-                       $this->output( sprintf( "uncacheable:       %-10d %6.2f%%\n", $uncacheable, $uncacheable / $total * 100 ) );
-               } else {
-                       $this->output( "no statistics available\n" );
-               }
-       }
-}
-
-$maintClass = "CacheStats";
-require_once( RUN_MAINTENANCE_IF_MAIN );
index 5e5cc8f..030a147 100644 (file)
@@ -523,7 +523,7 @@ class RecompressTracked {
         *
         * Write the new URL to the text table and set the bt_moved flag.
         *
-        * This is done in a single transaction to provide restartable behaviour
+        * This is done in a single transaction to provide restartable behavior
         * without data loss.
         *
         * The transaction is kept short to reduce locking.
index a93ad79..158019b 100644 (file)
@@ -57,10 +57,11 @@ class SyncFileBackend extends Maintenance {
                        }
                        if ( $this->hasOption( 'postime' ) ) {
                                $id = (int)$src->getJournal()->getPositionAtTime( $this->getOption( 'postime' ) );
+                               $this->output( "Requested journal position is $id.\n" );
                        } else {
                                $id = (int)$src->getJournal()->getCurrentPosition();
+                               $this->output( "Current journal position is $id.\n" );
                        }
-                       $this->output( "Current journal position is $id.\n" );
                        if ( file_put_contents( $posFile, $id, LOCK_EX ) !== false ) {
                                $this->output( "Saved journal position file.\n" );
                        } else {
@@ -95,8 +96,15 @@ class SyncFileBackend extends Maintenance {
                        $this->output( "Ending journal position is $end.\n" );
                }
 
+               // Periodically update the position file
+               $callback = function( $pos ) use ( $startFromPosFile, $posFile, $start ) {
+                       if ( $startFromPosFile && $pos >= $start ) { // successfully advanced
+                               file_put_contents( $posFile, $pos, LOCK_EX );
+                       }
+               };
+
                // Actually sync the dest backend with the reference backend
-               $lastOKPos = $this->syncBackends( $src, $dst, $start, $end );
+               $lastOKPos = $this->syncBackends( $src, $dst, $start, $end, $callback );
 
                // Update the sync position file
                if ( $startFromPosFile && $lastOKPos >= $start ) { // successfully advanced
@@ -130,9 +138,12 @@ class SyncFileBackend extends Maintenance {
         * @param $dst FileBackend
         * @param $start integer Starting journal position
         * @param $end integer Starting journal position
+        * @param $callback Closure Callback to update any position file
         * @return integer|false Journal entry ID or false if there are none
         */
-       protected function syncBackends( FileBackend $src, FileBackend $dst, $start, $end ) {
+       protected function syncBackends(
+               FileBackend $src, FileBackend $dst, $start, $end, Closure $callback
+       ) {
                $lastOKPos = 0; // failed
                $first = true; // first batch
 
@@ -163,6 +174,7 @@ class SyncFileBackend extends Maintenance {
                        $status = $this->syncFileBatch( array_keys( $pathsInBatch ), $src, $dst );
                        if ( $status->isOK() ) {
                                $lastOKPos = max( $lastOKPos, $lastPosInBatch );
+                               $callback( $lastOKPos ); // update position file
                        } else {
                                $this->error( print_r( $status->getErrorsArray(), true ) );
                                break; // no gaps; everything up to $lastPos must be OK
index 97d6ff2..a917783 100644 (file)
@@ -86,10 +86,12 @@ CREATE TABLE /*_*/user (
   -- Same with passwords.
   user_email tinytext NOT NULL,
 
-  -- This is a timestamp which is updated when a user
-  -- logs in, logs out, changes preferences, or performs
-  -- some other action requiring HTML cache invalidation
-  -- to ensure that the UI is updated.
+  -- If the browser sends an If-Modified-Since header, a 304 response is
+  -- suppressed if the value in this field for the current user is later than
+  -- the value in the IMS header. That is, this field is an invalidation timestamp
+  -- for the browser cache of logged-in users. Among other things, it is used
+  -- to prevent pages generated for a previously logged in user from being
+  -- displayed after a session expiry followed by a fresh login.
   user_touched binary(14) NOT NULL default '',
 
   -- A pseudorandomly generated value that is stored in
index 8e9c368..bc9e891 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Version of mw-config/index.php to used in web server requiring .php5
- * extension to execute scripts with PHP5 egine.
+ * extension to execute scripts with PHP5 engine.
  *
  * 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
index 58bd351..0c499a4 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Version of opensearch_desc.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 egine.
+ * to execute scripts with PHP5 engine.
  *
  * 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
index ae29c4c..b65f69a 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Version of redirect.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 egine.
+ * to execute scripts with PHP5 engine.
  *
  * 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
index 562c176..10689cd 100644 (file)
@@ -26,7 +26,9 @@ if( !defined( 'MEDIAWIKI' ) ) {
 
 return array(
 
-       /* Special modules who have their own classes */
+       /**
+        * Special modules who have their own classes
+        */
 
        // Scripts managed by the local wiki (stored in the MediaWiki namespace)
        'site' => array( 'class' => 'ResourceLoaderSiteModule' ),
@@ -48,7 +50,16 @@ return array(
        // Scripts for the dynamic language specific data, like grammar forms.
        'mediawiki.language.data' => array( 'class' => 'ResourceLoaderLanguageDataModule' ),
 
-       /* Skins */
+       /**
+        * Skins
+        * Be careful not to add 'scripts' to these modules,
+        * since they are loaded with OutputPage::addModuleStyles so that the skin styles
+        * apply without javascript.
+        * If a skin needs custom js in the interface, register a separate module
+        * and add it to the load queue with OutputPage::addModules.
+        *
+        * See Vector for an example.
+        */
 
        'skins.chick' => array(
                'styles' => array( 'chick/main.css' => array( 'media' => 'screen, handheld' ) ),
@@ -102,6 +113,10 @@ return array(
                        'vector/screen.css' => array( 'media' => 'screen' ),
                        'vector/screen-hd.css' => array( 'media' => 'screen and (min-width: 982px)' ),
                ),
+               'remoteBasePath' => $GLOBALS['wgStylePath'],
+               'localBasePath' => $GLOBALS['wgStyleDirectory'],
+       ),
+       'skins.vector.js' => array(
                'scripts' => 'vector/vector.js',
                'remoteBasePath' => $GLOBALS['wgStylePath'],
                'localBasePath' => $GLOBALS['wgStyleDirectory'],
@@ -580,13 +595,6 @@ return array(
                'scripts' => 'resources/mediawiki.api/mediawiki.api.parse.js',
                'dependencies' => 'mediawiki.api',
        ),
-       'mediawiki.api.titleblacklist' => array(
-               'scripts' => 'resources/mediawiki.api/mediawiki.api.titleblacklist.js',
-               'dependencies' => array(
-                       'mediawiki.api',
-                       'mediawiki.Title',
-               ),
-       ),
        'mediawiki.api.watch' => array(
                'scripts' => 'resources/mediawiki.api/mediawiki.api.watch.js',
                'dependencies' => array(
index ace4a55..b369584 100644 (file)
@@ -33,226 +33,209 @@ $.fn.makeCollapsible = function () {
                        $firstItem,
                        collapsibleId,
                        $customTogglers,
-                       firstval,
-                       /**
-                        * @param {jQuery} $collapsible
-                        * @param {string} action The action this function will take ('expand' or 'collapse').
-                        * @param {jQuery|null} [optional] $defaultToggle
-                        * @param {Object|undefined} options
-                        */
-                       toggleElement = function ( $collapsible, action, $defaultToggle, options ) {
-                               var $collapsibleContent, $containers;
-                               options = options || {};
-
-                               // Validate parameters
-
-                               // $collapsible must be an instance of jQuery
-                               if ( !$collapsible.jquery ) {
-                                       return;
-                               }
-                               if ( action !== 'expand' && action !== 'collapse' ) {
-                                       // action must be string with 'expand' or 'collapse'
-                                       return;
-                               }
-                               if ( $defaultToggle === undefined ) {
-                                       $defaultToggle = null;
-                               }
-                               if ( $defaultToggle !== null && !$defaultToggle.jquery ) {
-                                       // is optional (may be undefined), but if defined it must be an instance of jQuery.
-                                       // If it's not, abort right away.
-                                       // After this $defaultToggle is either null or a valid jQuery instance.
-                                       return;
-                               }
-
-                               if ( action === 'collapse' ) {
-
-                                       // Collapse the element
-                                       if ( $collapsible.is( 'table' ) ) {
-                                               // Hide all table rows of this table
-                                               // Slide doens't work with tables, but fade does as of jQuery 1.1.3
-                                               // http://stackoverflow.com/questions/467336#920480
-                                               $containers = $collapsible.find( '> tbody > tr' );
-                                               if ( $defaultToggle ) {
-                                                       // Exclude tablerow containing togglelink
-                                                       $containers = $containers.not( $defaultToggle.closest( 'tr' ) );
-                                               }
-
-                                               if ( options.instantHide ) {
-                                                       $containers.hide();
-                                               } else {
-                                                       $containers.stop( true, true ).fadeOut();
-                                               }
+                       firstval;
+
+               /**
+                * @param {jQuery} $collapsible
+                * @param {string} action The action this function will take ('expand' or 'collapse').
+                * @param {jQuery|null} [optional] $defaultToggle
+                * @param {Object|undefined} options
+                */
+               function toggleElement( $collapsible, action, $defaultToggle, options ) {
+                       var $collapsibleContent, $containers;
+                       options = options || {};
+
+                       // Validate parameters
+
+                       // $collapsible must be an instance of jQuery
+                       if ( !$collapsible.jquery ) {
+                               return;
+                       }
+                       if ( action !== 'expand' && action !== 'collapse' ) {
+                               // action must be string with 'expand' or 'collapse'
+                               return;
+                       }
+                       if ( $defaultToggle === undefined ) {
+                               $defaultToggle = null;
+                       }
+                       if ( $defaultToggle !== null && !$defaultToggle.jquery ) {
+                               // is optional (may be undefined), but if defined it must be an instance of jQuery.
+                               // If it's not, abort right away.
+                               // After this $defaultToggle is either null or a valid jQuery instance.
+                               return;
+                       }
 
-                                       } else if ( $collapsible.is( 'ul' ) || $collapsible.is( 'ol' ) ) {
-                                               $containers = $collapsible.find( '> li' );
-                                               if ( $defaultToggle ) {
-                                                       // Exclude list-item containing togglelink
-                                                       $containers = $containers.not( $defaultToggle.parent() );
-                                               }
+                       // Handle different kinds of elements
 
-                                               if ( options.instantHide ) {
-                                                       $containers.hide();
-                                               } else {
-                                                       $containers.stop( true, true ).slideUp();
-                                               }
+                       if ( $collapsible.is( 'table' ) ) {
+                               // Tables
+                               $containers = $collapsible.find( '> tbody > tr' );
+                               if ( $defaultToggle ) {
+                                       // Exclude table row containing togglelink
+                                       $containers = $containers.not( $defaultToggle.closest( 'tr' ) );
+                               }
 
+                               if ( action === 'collapse' ) {
+                                       // Hide all table rows of this table
+                                       // Slide doesn't work with tables, but fade does as of jQuery 1.1.3
+                                       // http://stackoverflow.com/questions/467336#920480
+                                       if ( options.instantHide ) {
+                                               $containers.hide();
                                        } else {
-                                               // <div>, <p> etc.
-                                               $collapsibleContent = $collapsible.find( '> .mw-collapsible-content' );
+                                               $containers.stop( true, true ).fadeOut();
+                                       }
+                               } else {
+                                       $containers.stop( true, true ).fadeIn();
+                               }
 
-                                               // If a collapsible-content is defined, collapse it
-                                               if ( $collapsibleContent.length ) {
-                                                       if ( options.instantHide ) {
-                                                               $collapsibleContent.hide();
-                                                       } else {
-                                                               $collapsibleContent.slideUp();
-                                                       }
+                       } else if ( $collapsible.is( 'ul' ) || $collapsible.is( 'ol' ) ) {
+                               // Lists
+                               $containers = $collapsible.find( '> li' );
+                               if ( $defaultToggle ) {
+                                       // Exclude list-item containing togglelink
+                                       $containers = $containers.not( $defaultToggle.parent() );
+                               }
 
-                                               // Otherwise assume this is a customcollapse with a remote toggle
-                                               // .. and there is no collapsible-content because the entire element should be toggled
-                                               } else {
-                                                       if ( options.instantHide ) {
-                                                               $collapsible.hide();
-                                                       } else {
-                                                               if ( $collapsible.is( 'tr' ) || $collapsible.is( 'td' ) || $collapsible.is( 'th' ) ) {
-                                                                       $collapsible.fadeOut();
-                                                               } else {
-                                                                       $collapsible.slideUp();
-                                                               }
-                                                       }
-                                               }
+                               if ( action === 'collapse' ) {
+                                       if ( options.instantHide ) {
+                                               $containers.hide();
+                                       } else {
+                                               $containers.stop( true, true ).slideUp();
                                        }
-
                                } else {
+                                       $containers.stop( true, true ).slideDown();
+                               }
 
-                                       // Expand the element
-                                       if ( $collapsible.is( 'table' ) ) {
-                                               $containers = $collapsible.find( '>tbody>tr' );
-                                               if ( $defaultToggle ) {
-                                                       // Exclude tablerow containing togglelink
-                                                       $containers.not( $defaultToggle.parent().parent() ).stop(true, true).fadeIn();
-                                               } else {
-                                                       $containers.stop( true, true ).fadeIn();
-                                               }
+                       } else {
+                               // Everything else: <div>, <p> etc.
+                               $collapsibleContent = $collapsible.find( '> .mw-collapsible-content' );
 
-                                       } else if ( $collapsible.is( 'ul' ) || $collapsible.is( 'ol' ) ) {
-                                               $containers = $collapsible.find( '> li' );
-                                               if ( $defaultToggle ) {
-                                                       // Exclude list-item containing togglelink
-                                                       $containers.not( $defaultToggle.parent() ).stop( true, true ).slideDown();
+                               // If a collapsible-content is defined, act on it
+                               if ( $collapsibleContent.length ) {
+                                       if ( action === 'collapse' ) {
+                                               if ( options.instantHide ) {
+                                                       $collapsibleContent.hide();
                                                } else {
-                                                       $containers.stop( true, true ).slideDown();
+                                                       $collapsibleContent.slideUp();
                                                }
-
                                        } else {
-                                               // <div>, <p> etc.
-                                               $collapsibleContent = $collapsible.find( '> .mw-collapsible-content' );
-
-                                               // If a collapsible-content is defined, collapse it
-                                               if ( $collapsibleContent.length ) {
-                                                       $collapsibleContent.slideDown();
+                                               $collapsibleContent.slideDown();
+                                       }
 
-                                               // Otherwise assume this is a customcollapse with a remote toggle
-                                               // .. and there is no collapsible-content because the entire element should be toggled
+                               // Otherwise assume this is a customcollapse with a remote toggle
+                               // .. and there is no collapsible-content because the entire element should be toggled
+                               } else {
+                                       if ( action === 'collapse' ) {
+                                               if ( options.instantHide ) {
+                                                       $collapsible.hide();
                                                } else {
                                                        if ( $collapsible.is( 'tr' ) || $collapsible.is( 'td' ) || $collapsible.is( 'th' ) ) {
-                                                               $collapsible.fadeIn();
+                                                               $collapsible.fadeOut();
                                                        } else {
-                                                               $collapsible.slideDown();
+                                                               $collapsible.slideUp();
                                                        }
                                                }
-                                       }
-                               }
-                       },
-                       /**
-                        * Toggles collapsible and togglelink class and updates text label.
-                        *
-                        * @param {jQuery} $that
-                        * @param {jQuery.Event} e
-                        * @param {Object|undefined} options
-                        */
-                       toggleLinkDefault = function ( $that, e, options ) {
-                               var $collapsible = $that.closest( '.mw-collapsible' ).toggleClass( 'mw-collapsed' );
-                               e.preventDefault();
-                               e.stopPropagation();
-
-                               // It's expanded right now
-                               if ( !$that.hasClass( 'mw-collapsible-toggle-collapsed' ) ) {
-                                       // Change link to "Show"
-                                       $that.removeClass( 'mw-collapsible-toggle-expanded' ).addClass( 'mw-collapsible-toggle-collapsed' );
-                                       if ( $that.find( '> a' ).length ) {
-                                               $that.find( '> a' ).text( expandtext );
                                        } else {
-                                               $that.text( expandtext );
+                                               if ( $collapsible.is( 'tr' ) || $collapsible.is( 'td' ) || $collapsible.is( 'th' ) ) {
+                                                       $collapsible.fadeIn();
+                                               } else {
+                                                       $collapsible.slideDown();
+                                               }
                                        }
-                                       // Collapse element
-                                       toggleElement( $collapsible, 'collapse', $that, options );
+                               }
+                       }
+               }
 
-                               // It's collapsed right now
+               /**
+                * Toggles collapsible and togglelink class and updates text label.
+                *
+                * @param {jQuery} $that
+                * @param {jQuery.Event} e
+                * @param {Object|undefined} options
+                */
+               function toggleLinkDefault( $that, e, options ) {
+                       var $collapsible = $that.closest( '.mw-collapsible' ).toggleClass( 'mw-collapsed' );
+                       e.preventDefault();
+                       e.stopPropagation();
+
+                       // It's expanded right now
+                       if ( !$that.hasClass( 'mw-collapsible-toggle-collapsed' ) ) {
+                               // Change link to "Show"
+                               $that.removeClass( 'mw-collapsible-toggle-expanded' ).addClass( 'mw-collapsible-toggle-collapsed' );
+                               if ( $that.find( '> a' ).length ) {
+                                       $that.find( '> a' ).text( expandtext );
                                } else {
-                                       // Change link to "Hide"
-                                       $that.removeClass( 'mw-collapsible-toggle-collapsed' ).addClass( 'mw-collapsible-toggle-expanded' );
-                                       if ( $that.find( '> a' ).length ) {
-                                               $that.find( '> a' ).text( collapsetext );
-                                       } else {
-                                               $that.text( collapsetext );
-                                       }
-                                       // Expand element
-                                       toggleElement( $collapsible, 'expand', $that, options );
-                               }
-                               return;
-                       },
-                       /**
-                        * Toggles collapsible and togglelink class.
-                        *
-                        * @param {jQuery} $that
-                        * @param {jQuery.Event} e
-                        * @param {Object|undefined} options
-                        */
-                       toggleLinkPremade = function ( $that, e, options ) {
-                               var $collapsible = $that.eq( 0 ).closest( '.mw-collapsible' ).toggleClass( 'mw-collapsed' );
-                               if ( $.nodeName( e.target, 'a' ) ) {
-                                       return true;
+                                       $that.text( expandtext );
                                }
-                               e.preventDefault();
-                               e.stopPropagation();
-
-                               // It's expanded right now
-                               if ( !$that.hasClass( 'mw-collapsible-toggle-collapsed' ) ) {
-                                       // Change toggle to collapsed
-                                       $that.removeClass( 'mw-collapsible-toggle-expanded' ).addClass( 'mw-collapsible-toggle-collapsed' );
-                                       // Collapse element
-                                       toggleElement( $collapsible, 'collapse', $that, options );
+                               // Collapse element
+                               toggleElement( $collapsible, 'collapse', $that, options );
 
-                               // It's collapsed right now
+                       // It's collapsed right now
+                       } else {
+                               // Change link to "Hide"
+                               $that.removeClass( 'mw-collapsible-toggle-collapsed' ).addClass( 'mw-collapsible-toggle-expanded' );
+                               if ( $that.find( '> a' ).length ) {
+                                       $that.find( '> a' ).text( collapsetext );
                                } else {
-                                       // Change toggle to expanded
-                                       $that.removeClass( 'mw-collapsible-toggle-collapsed' ).addClass( 'mw-collapsible-toggle-expanded' );
-                                       // Expand element
-                                       toggleElement( $collapsible, 'expand', $that, options );
-                               }
-                               return;
-                       },
-                       /**
-                        * Toggles customcollapsible.
-                        *
-                        * @param {jQuery} $that
-                        * @param {jQuery.Event} e
-                        * @param {Object|undefined} options
-                        * @param {jQuery} $collapsible
-                        */
-                       toggleLinkCustom = function ( $that, e, options, $collapsible ) {
-                               // For the initial state call of customtogglers there is no event passed
-                               if ( e ) {
-                                       e.preventDefault();
-                                       e.stopPropagation();
+                                       $that.text( collapsetext );
                                }
-                               // Get current state and toggle to the opposite
-                               var action = $collapsible.hasClass( 'mw-collapsed' ) ? 'expand' : 'collapse';
-                               $collapsible.toggleClass( 'mw-collapsed' );
-                               toggleElement( $collapsible, action, $that, options );
+                               // Expand element
+                               toggleElement( $collapsible, 'expand', $that, options );
+                       }
+                       return;
+               }
+
+               /**
+                * Toggles collapsible and togglelink class.
+                *
+                * @param {jQuery} $that
+                * @param {jQuery.Event} e
+                * @param {Object|undefined} options
+                */
+               function toggleLinkPremade( $that, e, options ) {
+                       var $collapsible = $that.eq( 0 ).closest( '.mw-collapsible' ).toggleClass( 'mw-collapsed' );
+                       if ( $.nodeName( e.target, 'a' ) ) {
+                               return true;
+                       }
+                       e.preventDefault();
+                       e.stopPropagation();
 
-                       };
+                       // It's expanded right now
+                       if ( !$that.hasClass( 'mw-collapsible-toggle-collapsed' ) ) {
+                               // Change toggle to collapsed
+                               $that.removeClass( 'mw-collapsible-toggle-expanded' ).addClass( 'mw-collapsible-toggle-collapsed' );
+                               // Collapse element
+                               toggleElement( $collapsible, 'collapse', $that, options );
+
+                       // It's collapsed right now
+                       } else {
+                               // Change toggle to expanded
+                               $that.removeClass( 'mw-collapsible-toggle-collapsed' ).addClass( 'mw-collapsible-toggle-expanded' );
+                               // Expand element
+                               toggleElement( $collapsible, 'expand', $that, options );
+                       }
+                       return;
+               }
+
+               /**
+                * Toggles customcollapsible.
+                *
+                * @param {jQuery} $that
+                * @param {jQuery.Event} e
+                * @param {Object|undefined} options
+                * @param {jQuery} $collapsible
+                */
+               function toggleLinkCustom( $that, e, options, $collapsible ) {
+                       // For the initial state call of customtogglers there is no event passed
+                       if ( e ) {
+                               e.preventDefault();
+                               e.stopPropagation();
+                       }
+                       // Get current state and toggle to the opposite
+                       var action = $collapsible.hasClass( 'mw-collapsed' ) ? 'expand' : 'collapse';
+                       $collapsible.toggleClass( 'mw-collapsed' );
+                       toggleElement( $collapsible, action, $that, options );
+               }
 
                // Return if it has been enabled already.
                if ( $collapsible.data( 'mw-made-collapsible' ) ) {
diff --git a/resources/mediawiki.api/mediawiki.api.titleblacklist.js b/resources/mediawiki.api/mediawiki.api.titleblacklist.js
deleted file mode 100644 (file)
index 8c46717..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * @class mw.Api.plugin.titleblacklist
- */
-( function ( mw, $ ) {
-
-       $.extend( mw.Api.prototype, {
-               /**
-                * Convinience method for `action=titleblacklist`.
-                * Note: This action is not provided by MediaWiki core, but as part of the TitleBlacklist extension.
-                *
-                * @param {mw.Title|string} title
-                * @param {Function} [ok] Success callback (deprecated)
-                * @param {Function} [err] Error callback (deprecated)
-                * @return {jQuery.Promise}
-                * @return {Function} return.done
-                * @return {Object|boolean} return.done.result False if title wasn't blacklisted, an object with 'reason', 'line'
-                *  and 'message' properties if title was blacklisted.
-                */
-               isBlacklisted: function ( title, ok, err ) {
-                       var d = $.Deferred();
-                       // Backwards compatibility (< MW 1.20)
-                       d.done( ok );
-                       d.fail( err );
-
-                       this.get( {
-                                       action: 'titleblacklist',
-                                       tbaction: 'create',
-                                       tbtitle: title.toString()
-                               } )
-                               .done( function ( data ) {
-                                       var result;
-
-                                       // this fails open (if nothing valid is returned by the api, allows the title)
-                                       // also fails open when the API is not present, which will be most of the time
-                                       // as this API module is part of the TitleBlacklist extension.
-                                       if ( data.titleblacklist && data.titleblacklist.result && data.titleblacklist.result === 'blacklisted' ) {
-                                               if ( data.titleblacklist.reason ) {
-                                                       result = {
-                                                               reason: data.titleblacklist.reason,
-                                                               line: data.titleblacklist.line,
-                                                               message: data.titleblacklist.message
-                                                       };
-                                               } else {
-                                                       mw.log( 'mw.Api.titleblacklist::isBlacklisted> no reason data for blacklisted title', 'debug' );
-                                                       result = {
-                                                               reason: 'Blacklisted, but no reason supplied',
-                                                               line: 'Unknown',
-                                                               message: null
-                                                       };
-                                               }
-                                               d.resolve( result );
-                                       } else {
-                                               d.resolve( false );
-                                       }
-                               } )
-                               .fail( d.reject );
-
-                       return d.promise();
-               }
-
-       } );
-
-       /**
-        * @class mw.Api
-        * @mixins mw.Api.plugin.titleblacklist
-        */
-
-}( mediaWiki, jQuery ) );
index 76f0259..183b525 100644 (file)
                                                $span.append( childNode );
                                        } );
                                } else {
-                                       // strings, integers, anything else
-                                       // (will soon switch to createTextNode() for non-objects)
-                                       $span.append( node );
+                                       // Let jQuery append nodes, arrays of nodes and jQuery objects
+                                       // other things (strings, numbers, ..) are appended as text nodes (not as HTML strings)
+                                       $span.append( $.type( node ) === 'object' ? node : document.createTextNode( node ) );
                                }
                        } );
                        return $span;
index 4dbf04c..2ceb3ea 100644 (file)
@@ -391,7 +391,9 @@ var mw = ( function ( $, undefined ) {
                                // List of callback functions waiting for modules to be ready to be called
                                jobs = [],
                                // Selector cache for the marker element. Use getMarker() to get/use the marker!
-                               $marker = null;
+                               $marker = null,
+                               // Buffer for addEmbeddedCSS.
+                               cssBuffer = '';
 
                        /* Private methods */
 
@@ -452,52 +454,82 @@ var mw = ( function ( $, undefined ) {
                        }
 
                        /**
-                        * Checks if certain cssText is safe to append to
-                        * a stylesheet.
+                        * Checks whether it is safe to add this css to a stylesheet.
                         *
-                        * Right now it only makes sure that cssText containing `@import`
-                        * rules will end up in a new stylesheet (as those only work when
-                        * placed at the start of a stylesheet; bug 35562).
-                        * This could later be extended to take care of other bugs, such as
-                        * the IE cssRules limit - not the same as the IE styleSheets limit).
                         * @private
-                        * @param {jQuery} $style
                         * @param {string} cssText
-                        * @return {boolean}
+                        * @return {boolean} False if a new one must be created.
                         */
-                       function canExpandStylesheetWith( $style, cssText ) {
+                       function canExpandStylesheetWith( cssText ) {
+                               // Makes sure that cssText containing `@import`
+                               // rules will end up in a new stylesheet (as those only work when
+                               // placed at the start of a stylesheet; bug 35562).
                                return cssText.indexOf( '@import' ) === -1;
                        }
 
+                       /**
+                        * @param {string} [cssText=cssBuffer] If called without cssText,
+                        * the internal buffer will be inserted instead.
+                        */
                        function addEmbeddedCSS( cssText ) {
                                var $style, styleEl;
-                               $style = getMarker().prev();
-                               // Re-use `<style>` tags if possible, this to try to stay
-                               // under the IE stylesheet limit (bug 31676).
-                               // Also verify that the the element before Marker actually is one
-                               // that came from ResourceLoader, and not a style tag that some
-                               // other script inserted before our marker, or, more importantly,
-                               // it may not be a style tag at all (could be `<meta>` or `<script>`).
-                               if (
-                                       $style.data( 'ResourceLoaderDynamicStyleTag' ) === true &&
-                                       canExpandStylesheetWith( $style, cssText )
-                               ) {
-                                       // There's already a dynamic <style> tag present and
-                                       // canExpandStylesheetWith() gave a green light to append more to it.
-                                       styleEl = $style.get( 0 );
-                                       if ( styleEl.styleSheet ) {
-                                               try {
-                                                       styleEl.styleSheet.cssText += cssText; // IE
-                                               } catch ( e ) {
-                                                       log( 'addEmbeddedCSS fail\ne.message: ' + e.message, e );
-                                               }
-                                       } else {
-                                               styleEl.appendChild( document.createTextNode( String( cssText ) ) );
+
+                               // Yield once before inserting the <style> tag. There are likely
+                               // more calls coming up which we can combine this way.
+                               // Appending a stylesheet and waiting for the browser to repaint
+                               // is fairly expensive, this reduces it (bug 45810)
+                               if ( cssText ) {
+                                       // Be careful not to extend the buffer with css that needs a new stylesheet
+                                       if ( !cssBuffer || canExpandStylesheetWith( cssText ) ) {
+                                               // Linebreak for somewhat distinguishable sections
+                                               // (the rl-cachekey comment separating each)
+                                               cssBuffer += '\n' + cssText;
+                                               // TODO: Use requestAnimationFrame in the future which will
+                                               // perform even better by not injecting styles while the browser
+                                               // is paiting.
+                                               setTimeout( addEmbeddedCSS );
+                                               return;
                                        }
+
+                               // This is a delayed call and we got a buffer still
+                               } else if ( cssBuffer ) {
+                                       cssText = cssBuffer;
+                                       cssBuffer = '';
                                } else {
-                                       $( addStyleTag( cssText, getMarker() ) )
-                                               .data( 'ResourceLoaderDynamicStyleTag', true );
+                                       // This is a delayed call, but buffer is already cleared by
+                                       // another delayed call.
+                                       return;
                                }
+
+                               // By default, always create a new <style>. Appending text
+                               // to a <style> tag means the contents have to be re-parsed (bug 45810).
+                               // Except, of course, in IE below 9, in there we default to
+                               // re-using and appending to a <style> tag due to the
+                               // IE stylesheet limit (bug 31676).
+                               if ( 'documentMode' in document && document.documentMode <= 9 ) {
+
+                                       $style = getMarker().prev();
+                                       // Verify that the the element before Marker actually is a
+                                       // <style> tag and one that came from ResourceLoader
+                                       // (not some other style tag or even a `<meta>` or `<script>`).
+                                       if ( $style.data( 'ResourceLoaderDynamicStyleTag' ) === true ) {
+                                               // There's already a dynamic <style> tag present and
+                                               // canExpandStylesheetWith() gave a green light to append more to it.
+                                               styleEl = $style.get( 0 );
+                                               if ( styleEl.styleSheet ) {
+                                                       try {
+                                                               styleEl.styleSheet.cssText += cssText; // IE
+                                                       } catch ( e ) {
+                                                               log( 'addEmbeddedCSS fail\ne.message: ' + e.message, e );
+                                                       }
+                                               } else {
+                                                       styleEl.appendChild( document.createTextNode( String( cssText ) ) );
+                                               }
+                                               return;
+                                       }
+                               }
+
+                               $( addStyleTag( cssText, getMarker() ) ).data( 'ResourceLoaderDynamicStyleTag', true );
                        }
 
                        /**
index cb7dd63..5211b0d 100644 (file)
 
                                // If the jQuery selector isn't found within the <ul>,
                                // or if nextnode was invalid or not passed at all,
-                               // then just append it at the end of the <ul> (this is the default behaviour)
+                               // then just append it at the end of the <ul> (this is the default behavior)
                                } else {
                                        $ul.append( $item );
                                }
index 3e01d23..d0f9995 100644 (file)
@@ -57,7 +57,7 @@ class SkinVector extends SkinTemplate {
                                "/{$this->stylename}/csshover{$min}.htc\")}</style><![endif]-->"
                );
 
-               $out->addModuleScripts( 'skins.vector' );
+               $out->addModules( 'skins.vector.js' );
        }
 
        /**
index 79911fe..2fa0cba 100644 (file)
@@ -189,7 +189,7 @@ blockquote {
 pre, code, tt, kbd, samp, .mw-code {
        /*
         * Some browsers will render the monospace text too small, namely Firefox, Chrome and Safari.
-        * Specifying any valid, second value will trigger correct behaviour without forcing a different font.
+        * Specifying any valid, second value will trigger correct behavior without forcing a different font.
         */
        font-family: monospace, Courier;
 }
index 1fe750e..6e1c94f 100644 (file)
@@ -232,6 +232,9 @@ td.mw-label {
 .prefsection table {
        width: 100%;
 }
+.prefsection table.mw-htmlform-matrix {
+       width: auto;
+}
 td.mw-submit {
        white-space: nowrap;
 }
@@ -254,6 +257,11 @@ tr.mw-htmlform-vertical-label td.mw-label {
        white-space: nowrap;
 }
 
+.mw-htmlform-matrix td {
+       padding-left: 0.5em;
+       padding-right: 0.5em;
+}
+
 input#wpSummary {
        width: 80%;
        margin-bottom: 1em;
index 6e212eb..b7320cb 100644 (file)
@@ -37,7 +37,7 @@ if ( version_compare( PHPUnit_Runner_Version::id(), '3.5.0', '>=' ) ) {
        # PHPUnit 3.5.0 introduced a nice autoloader based on class name
        require_once( 'PHPUnit/Autoload.php' );
 } else {
-       # Keep the old pre PHPUnit 3.5.0 behaviour for compatibility
+       # Keep the old pre PHPUnit 3.5.0 behavior for compatibility
        require_once( 'PHPUnit/TextUI/Command.php' );
 }
 
index 492edb6..e9218de 100644 (file)
@@ -512,6 +512,27 @@ The ''[[Main Page]]'''s talk page.
 </p>
 !! end
 
+###
+### Non-html5 tags
+###
+
+!! test
+Non-html5 tags should be accepted
+!! input
+<center>''foo''</center>
+<big>''foo''</big>
+<font>''foo''</font>
+<strike>''foo''</strike>
+<tt>''foo''</tt>
+!! result
+<center><i>foo</i></center>
+<p><big><i>foo</i></big>
+<font><i>foo</i></font>
+<strike><i>foo</i></strike>
+<tt><i>foo</i></tt>
+</p>
+!! end
+
 ###
 ### <nowiki> test cases
 ###
@@ -7752,7 +7773,7 @@ http://example.com [[Image:foobar.jpg]]
 !!end
 
 !! test
-Short headings with trailing space should match behaviour of Parser::doHeadings (bug 19910)
+Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
 !! input
 === 
 The line above must have a trailing space!
@@ -9863,7 +9884,7 @@ section=1
 ==marked==
 !!end
 
-# Test behaviour of bug 19910
+# Test behavior of bug 19910
 !! test
 Sectiion with all-equals
 !! options
index f16d06c..51fbff1 100644 (file)
@@ -128,7 +128,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         *
         * The obtained filename is enlisted to be removed upon tearDown
         *
-        * @returns string: absolute name of the temporary file
+        * @return string: absolute name of the temporary file
         */
        protected function getNewTempFile() {
                $fname = tempnam( wfTempDir(), 'MW_PHPUnit_' . get_class( $this ) . '_' );
@@ -142,7 +142,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         * The obtained directory is enlisted to be removed (recursively with all its contained
         * files) upon tearDown.
         *
-        * @returns string: absolute name of the temporary directory
+        * @return string: absolute name of the temporary directory
         */
        protected function getNewTempDirectory() {
                // Starting of with a temporary /file/.
index b64a54e..00eba30 100644 (file)
@@ -48,7 +48,7 @@ class EditPageTest extends MediaWikiTestCase {
                $dbw = wfGetDB( DB_MASTER );
 
                $dbw->update( 'revision',
-                       array( 'rev_timestamp' => $timestamp ),
+                       array( 'rev_timestamp' => $dbw->timestamp( $timestamp ) ),
                        array( 'rev_id' => $page->getLatest() ) );
 
                $page->clear();
index b6e23ab..590664e 100644 (file)
@@ -443,7 +443,7 @@ class HtmlTest extends MediaWikiTestCase {
 
        /**
         * Test out Html::element drops or enforces default value
-        * @cover Html::dropDefaults
+        * @covers Html::dropDefaults
         * @dataProvider provideElementsWithAttributesHavingDefaultValues
         */
        function testDropDefaults( $expected, $element, $attribs, $message = '' ) {
index 90de96d..e353c46 100644 (file)
@@ -4,7 +4,7 @@ class LinkerTest extends MediaWikiLangTestCase {
 
        /**
         * @dataProvider provideCasesForUserLink
-        * @cover Linker::userLink
+        * @covers Linker::userLink
         */
        function testUserLink( $expected, $userId, $userName, $altUserName = false, $msg = '' ) {
                $this->setMwGlobals( array(
index 244e4a8..a79b3a2 100644 (file)
@@ -85,6 +85,8 @@ class LinksUpdateTest extends MediaWikiTestCase {
        }
 
        public function testUpdate_categorylinks() {
+               $this->setMwGlobals( 'wgCategoryCollation', 'uppercase' );
+
                list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
 
                $po->addCategory( "Foo", "FOO" );
index 9707f49..c0ed4a5 100644 (file)
@@ -63,7 +63,7 @@ class SanitizerTest extends MediaWikiTestCase {
        }
 
        /**
-        * @cover Sanitizer::removeHTMLtags
+        * @covers Sanitizer::removeHTMLtags
         * @dataProvider provideHtml5Tags
         *
         * @param String $tag Name of an HTML5 element (ie: 'video')
@@ -116,7 +116,7 @@ class SanitizerTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideTagAttributesToDecode
-        * @cover Sanitizer::decodeTagAttributes
+        * @covers Sanitizer::decodeTagAttributes
         */
        function testDecodeTagAttributes( $expected, $attributes, $message = '' ) {
                $this->assertEquals( $expected,
@@ -165,7 +165,7 @@ class SanitizerTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideDeprecatedAttributes
-        * @cover Sanitizer::fixTagAttributes
+        * @covers Sanitizer::fixTagAttributes
         */
        function testDeprecatedAttributesUnaltered( $inputAttr, $inputEl, $message = '' ) {
                $this->assertEquals( " $inputAttr",
@@ -193,7 +193,7 @@ class SanitizerTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideCssCommentsFixtures
-        * @cover Sanitizer::checkCss
+        * @covers Sanitizer::checkCss
         */
        function testCssCommentsChecking( $expected, $css, $message = '' ) {
                $this->assertEquals( $expected,
index 31216b3..db3d265 100644 (file)
@@ -6,7 +6,7 @@ class StringUtilsTest extends MediaWikiTestCase {
         * This test StringUtils::isUtf8 whenever we have mbstring extension
         * loaded.
         *
-        * @cover StringUtils::isUtf8
+        * @covers StringUtils::isUtf8
         * @dataProvider provideStringsForIsUtf8Check
         */
        function testIsUtf8WithMbstring( $expected, $string ) {
@@ -24,7 +24,7 @@ class StringUtilsTest extends MediaWikiTestCase {
         * implementation used as a fallback when mb_check_encoding() is
         * not available.
         *
-        * @cover StringUtils::isUtf8
+        * @covers StringUtils::isUtf8
         * @dataProvider provideStringsForIsUtf8Check
         */
        function testIsUtf8WithPhpFallbackImplementation( $expected, $string ) {
index da5eb33..1efbaea 100644 (file)
@@ -344,7 +344,7 @@ class ApiEditPageTest extends ApiTestCase {
                $dbw = wfGetDB( DB_MASTER );
 
                $dbw->update( 'revision',
-                       array( 'rev_timestamp' => $timestamp ),
+                       array( 'rev_timestamp' => $dbw->timestamp( $timestamp ) ),
                        array( 'rev_id' => $page->getLatest() ) );
 
                $page->clear();
diff --git a/tests/phpunit/includes/cache/MessageCacheTest.php b/tests/phpunit/includes/cache/MessageCacheTest.php
new file mode 100644 (file)
index 0000000..4cc8bd2
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+
+/**
+ * @group Database
+ * @group Cache
+ */
+class MessageCacheTest extends MediaWikiLangTestCase {
+
+       protected function setUp() {
+               parent::setUp();
+               MessageCache::singleton()->enable();
+       }
+
+       function addDBData() {
+               // be sure english messages under $key, not $key/en
+               $this->setMwGlobals( array(
+                       'wgLanguageCode' => 'en',
+                       'wgContLang' => Language::factory( 'en' ),
+               ) );
+
+               // Set up messages and fallbacks ab -> ru -> en
+               $this->makePage( 'FallbackLanguageTest-Full', 'ab' );
+               $this->makePage( 'FallbackLanguageTest-Full', 'ru' );
+               $this->makePage( 'FallbackLanguageTest-Full', 'en' );
+
+               // Fallbacks where ab does not exist
+               $this->makePage( 'FallbackLanguageTest-Partial', 'ru' );
+               $this->makePage( 'FallbackLanguageTest-Partial', 'en' );
+
+               // Fallback to english
+               $this->makePage( 'FallbackLanguageTest-English', 'en' );
+
+               // Full key tests -- always want russian
+               $this->makePage( 'MessageCacheTest-FullKeyTest', 'ab' );
+               $this->makePage( 'MessageCacheTest-FullKeyTest', 'ru' );
+       }
+
+       /**
+        * Helper function for addDBData -- adds a simple page to the database
+        *
+        * @param string $title Title of page to be created
+        * @param string $lang  Language and content of the created page
+        */
+       protected function makePage( $title, $lang ) {
+               global $wgContLang;
+
+               $title = Title::newFromText(
+                       ($lang == $wgContLang->getCode()) ? $title : "$title/$lang",
+                       NS_MEDIAWIKI
+               );
+               $wikiPage = new WikiPage( $title );
+               $content = ContentHandler::makeContent( $lang, $title );
+               $wikiPage->doEditContent( $content, "$lang translation test case" );
+       }
+
+       /**
+        * Test message fallbacks, bug #1495
+        *
+        * @dataProvider provideMessagesForFallback
+        */
+       function testMessageFallbacks( $message, $lang, $expectedContent ) {
+               $result = MessageCache::singleton()->get( $message, true, $lang );
+               $this->assertEquals( $expectedContent, $result, "Message fallback failed." );
+       }
+
+       function provideMessagesForFallback() {
+               return array(
+                       array( 'FallbackLanguageTest-Full', 'ab', 'ab' ),
+                       array( 'FallbackLanguageTest-Partial', 'ab', 'ru' ),
+                       array( 'FallbackLanguageTest-English', 'ab', 'en' ),
+                       array( 'FallbackLanguageTest-None', 'ab', false ),
+               );
+       }
+
+       /**
+        * There's a fallback case where the message key is given as fully qualified -- this
+        * should ignore the passed $lang and use the language from the key
+        *
+        * @dataProvider provideMessagesForFullKeys
+        */
+       function testFullKeyBehaviour( $message, $lang, $expectedContent ) {
+               $result = MessageCache::singleton()->get( $message, true, $lang, true );
+               $this->assertEquals( $expectedContent, $result, "Full key message fallback failed." );
+       }
+
+       function provideMessagesForFullKeys() {
+               return array(
+                       array( 'MessageCacheTest-FullKeyTest/ru', 'ru', 'ru' ),
+                       array( 'MessageCacheTest-FullKeyTest/ru', 'ab', 'ru' ),
+                       array( 'MessageCacheTest-FullKeyTest/ru/foo', 'ru', false ),
+               );
+       }
+
+}
index 9739f4c..263553a 100644 (file)
@@ -107,6 +107,22 @@ class TestORMRowTest extends ORMRowTest {
                );
        }
 
+       /**
+        * @since 1.21
+        * @return array
+        */
+       protected function getMockValues() {
+               return array(
+                       'id' => 1,
+                       'str' => 'foobar4645645',
+                       'int' => 42,
+                       'float' => 4.2,
+                       'bool' => '',
+                       'array' => array( 42, 'foobar' ),
+                       'blob' => new stdClass()
+               );
+       }
+
 }
 
 class TestORMRow extends ORMRow {}
index dac5edb..b7cf446 100644 (file)
@@ -2024,54 +2024,97 @@ class FileBackendTest extends MediaWikiTestCase {
        private function doTestLockCalls() {
                $backendName = $this->backendClass();
 
-               for ( $i=0; $i<50; $i++ ) {
-                       $paths = array(
-                               "test1.txt",
-                               "test2.txt",
-                               "test3.txt",
-                               "subdir1",
-                               "subdir1", // duplicate
-                               "subdir1/test1.txt",
-                               "subdir1/test2.txt",
-                               "subdir2",
-                               "subdir2", // duplicate
-                               "subdir2/test3.txt",
-                               "subdir2/test4.txt",
-                               "subdir2/subdir",
-                               "subdir2/subdir/test1.txt",
-                               "subdir2/subdir/test2.txt",
-                               "subdir2/subdir/test3.txt",
-                               "subdir2/subdir/test4.txt",
-                               "subdir2/subdir/test5.txt",
-                               "subdir2/subdir/sub",
-                               "subdir2/subdir/sub/test0.txt",
-                               "subdir2/subdir/sub/120-px-file.txt",
-                       );
+               $paths = array(
+                       "test1.txt",
+                       "test2.txt",
+                       "test3.txt",
+                       "subdir1",
+                       "subdir1", // duplicate
+                       "subdir1/test1.txt",
+                       "subdir1/test2.txt",
+                       "subdir2",
+                       "subdir2", // duplicate
+                       "subdir2/test3.txt",
+                       "subdir2/test4.txt",
+                       "subdir2/subdir",
+                       "subdir2/subdir/test1.txt",
+                       "subdir2/subdir/test2.txt",
+                       "subdir2/subdir/test3.txt",
+                       "subdir2/subdir/test4.txt",
+                       "subdir2/subdir/test5.txt",
+                       "subdir2/subdir/sub",
+                       "subdir2/subdir/sub/test0.txt",
+                       "subdir2/subdir/sub/120-px-file.txt",
+               );
 
+               for ( $i=0; $i<25; $i++ ) {
                        $status = $this->backend->lockFiles( $paths, LockManager::LOCK_EX );
-                       $this->assertEquals( array(), $status->errors,
-                               "Locking of files succeeded ($backendName)." );
+                       $this->assertEquals( print_r( array(), true ), print_r( $status->errors, true ),
+                               "Locking of files succeeded ($backendName) ($i)." );
                        $this->assertEquals( true, $status->isOK(),
-                               "Locking of files succeeded with OK status ($backendName)." );
+                               "Locking of files succeeded with OK status ($backendName) ($i)." );
 
                        $status = $this->backend->lockFiles( $paths, LockManager::LOCK_SH );
-                       $this->assertEquals( array(), $status->errors,
-                               "Locking of files succeeded ($backendName)." );
+                       $this->assertEquals( print_r( array(), true ), print_r( $status->errors, true ),
+                               "Locking of files succeeded ($backendName) ($i)." );
                        $this->assertEquals( true, $status->isOK(),
-                               "Locking of files succeeded with OK status ($backendName)." );
+                               "Locking of files succeeded with OK status ($backendName) ($i)." );
 
                        $status = $this->backend->unlockFiles( $paths, LockManager::LOCK_SH );
-                       $this->assertEquals( array(), $status->errors,
-                               "Locking of files succeeded ($backendName)." );
+                       $this->assertEquals( print_r( array(), true ), print_r( $status->errors, true ),
+                               "Locking of files succeeded ($backendName) ($i)." );
+                       $this->assertEquals( true, $status->isOK(),
+                               "Locking of files succeeded with OK status ($backendName) ($i)." );
+
+                       $status = $this->backend->unlockFiles( $paths, LockManager::LOCK_EX );
+                       $this->assertEquals( print_r( array(), true ), print_r( $status->errors, true ),
+                               "Locking of files succeeded ($backendName). ($i)" );
+                       $this->assertEquals( true, $status->isOK(),
+                               "Locking of files succeeded with OK status ($backendName) ($i)." );
+
+                       ## Flip the acquire/release ordering around ##
+
+                       $status = $this->backend->lockFiles( $paths, LockManager::LOCK_SH );
+                       $this->assertEquals( print_r( array(), true ), print_r( $status->errors, true ),
+                               "Locking of files succeeded ($backendName) ($i)." );
+                       $this->assertEquals( true, $status->isOK(),
+                               "Locking of files succeeded with OK status ($backendName) ($i)." );
+
+                       $status = $this->backend->lockFiles( $paths, LockManager::LOCK_EX );
+                       $this->assertEquals( print_r( array(), true ), print_r( $status->errors, true ),
+                               "Locking of files succeeded ($backendName) ($i)." );
                        $this->assertEquals( true, $status->isOK(),
-                               "Locking of files succeeded with OK status ($backendName)." );
+                               "Locking of files succeeded with OK status ($backendName) ($i)." );
 
                        $status = $this->backend->unlockFiles( $paths, LockManager::LOCK_EX );
-                       $this->assertEquals( array(), $status->errors,
-                               "Locking of files succeeded ($backendName)." );
+                       $this->assertEquals( print_r( array(), true ), print_r( $status->errors, true ),
+                               "Locking of files succeeded ($backendName). ($i)" );
+                       $this->assertEquals( true, $status->isOK(),
+                               "Locking of files succeeded with OK status ($backendName) ($i)." );
+
+                       $status = $this->backend->unlockFiles( $paths, LockManager::LOCK_SH );
+                       $this->assertEquals( print_r( array(), true ), print_r( $status->errors, true ),
+                               "Locking of files succeeded ($backendName) ($i)." );
                        $this->assertEquals( true, $status->isOK(),
-                               "Locking of files succeeded with OK status ($backendName)." );
+                               "Locking of files succeeded with OK status ($backendName) ($i)." );
                }
+
+               $status = Status::newGood();
+               $sl = $this->backend->getScopedFileLocks( $paths, LockManager::LOCK_EX, $status );
+               $this->assertType( 'ScopedLock', $sl,
+                       "Scoped locking of files succeeded ($backendName)." );
+               $this->assertEquals( array(), $status->errors,
+                       "Scoped locking of files succeeded ($backendName)." );
+               $this->assertEquals( true, $status->isOK(),
+                       "Scoped locking of files succeeded with OK status ($backendName)." );
+
+               ScopedLock::release( $sl );
+               $this->assertEquals( null, $sl,
+                       "Scoped unlocking of files succeeded ($backendName)." );
+               $this->assertEquals( array(), $status->errors,
+                       "Scoped unlocking of files succeeded ($backendName)." );
+               $this->assertEquals( true, $status->isOK(),
+                       "Scoped unlocking of files succeeded with OK status ($backendName)." );
        }
 
        // test helper wrapper for backend prepare() function
index f3dd0a0..88b07f0 100644 (file)
@@ -15,6 +15,7 @@ class BagOStuffTest extends MediaWikiTestCase {
                        $name = $this->getCliArg( 'use-bagostuff=' );
 
                        $this->cache = ObjectCache::newFromId( $name );
+
                } else {
                        // no type defined - use simple hash
                        $this->cache = new HashBagOStuff;
@@ -104,4 +105,34 @@ class BagOStuffTest extends MediaWikiTestCase {
                        }
                }
        }
+
+       public function testAdd() {
+               $key = wfMemcKey( 'test' );
+               $this->assertTrue( $this->cache->add( $key, 'test' ) );
+       }
+
+       public function testGet() {
+               $value = array( 'this' => 'is', 'a' => 'test' );
+
+               $key = wfMemcKey( 'test' );
+               $this->cache->add( $key, $value );
+               $this->assertEquals( $this->cache->get( $key ), $value );
+       }
+
+       public function testGetMulti() {
+               $value1 = array( 'this' => 'is', 'a' => 'test' );
+               $value2 = array( 'this' => 'is', 'another' => 'test' );
+
+               $key1 = wfMemcKey( 'test1' );
+               $key2 = wfMemcKey( 'test2' );
+
+               $this->cache->add( $key1, $value1 );
+               $this->cache->add( $key2, $value2 );
+
+               $this->assertEquals( $this->cache->getMulti( array( $key1, $key2 ) ), array( $key1 => $value1, $key2 => $value2 ) );
+
+               // cleanup
+               $this->cache->delete( $key1 );
+               $this->cache->delete( $key2 );
+       }
 }
index 235e9ad..741f8b7 100644 (file)
@@ -92,7 +92,7 @@ class MaintenanceFixup extends Maintenance {
                        // Someone generated a MaintenanceFixup instance without calling
                        // simulateShutdown. We'd have to raise a PHPUnit exception to correctly
                        // flag this illegal usage. However, we are already in a destruktor, which
-                       // would trigger undefined behaviour. Hence, we can only report to the
+                       // would trigger undefined behavior. Hence, we can only report to the
                        // error output :( Hopefully people read the PHPUnit output.
                        $name = $this->testCase->getName();
                        fwrite( STDERR, "ERROR! Instance of " . __CLASS__ . " for test $name "
@@ -184,7 +184,7 @@ class MaintenanceTest extends MediaWikiTestCase {
        // Although the following tests do not seem to be too consistent (compare for
        // example the newlines within the test.*StringString tests, or the
        // test.*Intermittent.* tests), the objective of these tests is not to describe
-       // consistent behaviour, but rather currently existing behaviour.
+       // consistent behavior, but rather currently existing behavior.
 
 
        function testOutputEmpty() {
index 97e0533..39ae363 100644 (file)
@@ -17,7 +17,7 @@
                assert.deepEqual( $.colorUtil.getRGB( '#eEe' ), [238, 238, 238], 'Hex string: 3 char mixed' );
                assert.deepEqual( $.colorUtil.getRGB( 'rgba(0, 0, 0, 0)' ), [255, 255, 255], 'Zero rgba for Safari 3; Transparent (whitespace)' );
 
-               // Perhaps this is a bug in colorUtil, but it is the current behaviour so, let's keep
+               // Perhaps this is a bug in colorUtil, but it is the current behavior so, let's keep
                // track of it, so we will know in case it would ever change.
                assert.strictEqual( $.colorUtil.getRGB( 'rgba(0,0,0,0)' ), undefined, 'Zero rgba without whitespace' );
 
index 5fae065..7571b92 100644 (file)
@@ -40,7 +40,7 @@
                assert.strictEqual( $.isEmpty( [] ), true, 'isEmpty: []' );
                assert.strictEqual( $.isEmpty( {} ), true, 'isEmpty: {}' );
 
-               // Documented behaviour
+               // Documented behavior
                assert.strictEqual( $.isEmpty( { length: 0 } ), true, 'isEmpty: { length: 0 }' );
        } );
 
index f23964c..0a9df96 100644 (file)
@@ -81,7 +81,7 @@
                        } );
        }
 
-       QUnit.test( 'Replace', 7, function ( assert ) {
+       QUnit.test( 'Replace', 9, function ( assert ) {
                var parser = mw.jqueryMsg.getMessageFunction();
 
                mw.messages.set( 'simple', 'Foo $1 baz $2' );
@@ -90,7 +90,6 @@
                assert.equal( parser( 'simple', 'bar' ), 'Foo bar baz $2', 'Replacements with less substitutes' );
                assert.equal( parser( 'simple', 'bar', 'quux' ), 'Foo bar baz quux', 'Replacements with all substitutes' );
 
-               /* Temporarily disabling until 2013-03 --Kaldari
                mw.messages.set( 'plain-input', '<foo foo="foo">x$1y&lt;</foo>z' );
 
                assert.equal(
                        'Foo &lt;bar bar="bar"&gt;&amp;gt;&lt;/bar&gt;',
                        'Replacement is not considered html'
                );
-               */
 
                mw.messages.set( 'object-replace', 'Foo $1' );
 
index b599b02..e8663f8 100644 (file)
                mw.loader.implement(
                        'test.implement.a',
                        function () {
-                               assert.equal(
-                                       $element.css( 'float' ),
-                                       'right',
-                                       'style is applied'
-                               );
+                               QUnit.stop();
+                               setTimeout(function () {
+                                       assert.equal(
+                                               $element.css( 'float' ),
+                                               'right',
+                                               'style is applied'
+                                       );
+                                       QUnit.start();
+                               });
                        },
                        {
                                'all': '.mw-test-implement-a { float: right; }'
                mw.loader.implement(
                        'test.implement.c',
                        function () {
-                               assert.equal(
-                                       $element.css( 'float' ),
-                                       'right',
-                                       'style is applied'
-                               );
+                               QUnit.stop();
+                               setTimeout(function () {
+                                       assert.equal(
+                                               $element.css( 'float' ),
+                                               'right',
+                                               'style is applied'
+                                       );
+                                       QUnit.start();
+                               });
                        },
                        {
                                'all': '.mw-test-implement-c { float: right; }'
index db388d2..2a57d4a 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Version of thumb.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 egine.
+ * to execute scripts with PHP5 engine.
  *
  * 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
index 20d681b..f160c87 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Version of thumb_handler.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 egine.
+ * to execute scripts with PHP5 engine.
  *
  * 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