Merge "Make update.php file executable"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 12 May 2014 10:36:05 +0000 (10:36 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 12 May 2014 10:36:05 +0000 (10:36 +0000)
248 files changed:
.gitattributes [new file with mode: 0644]
RELEASE-NOTES-1.23
RELEASE-NOTES-1.24
docs/hooks.txt
includes/Article.php
includes/AutoLoader.php
includes/Collation.php
includes/DefaultSettings.php
includes/FeedUtils.php
includes/FileDeleteForm.php
includes/GlobalFunctions.php
includes/Hooks.php
includes/Html.php
includes/HtmlFormatter.php
includes/ImageQueryPage.php
includes/Init.php
includes/Licenses.php
includes/Linker.php
includes/MagicWord.php
includes/Message.php
includes/MessageBlobStore.php
includes/Namespace.php
includes/OutputHandler.php
includes/OutputPage.php
includes/PHPVersionError.php
includes/Pager.php
includes/Preferences.php
includes/PrefixSearch.php
includes/RevisionList.php
includes/Sanitizer.php
includes/Setup.php
includes/SiteConfiguration.php
includes/SiteStats.php
includes/Skin.php
includes/SkinTemplate.php
includes/SquidPurgeClient.php
includes/StatCounter.php
includes/StreamFile.php
includes/StubObject.php
includes/TimestampException.php
includes/Title.php
includes/TitleArrayFromResult.php
includes/User.php
includes/UserArrayFromResult.php
includes/UserMailer.php
includes/WatchedItem.php
includes/WebRequest.php
includes/WebStart.php
includes/Wiki.php
includes/WikiFilePage.php
includes/WikiPage.php
includes/Xml.php
includes/api/ApiFeedContributions.php
includes/api/ApiFeedWatchlist.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiWatch.php
includes/cache/LinkCache.php
includes/changes/RecentChange.php
includes/content/AbstractContent.php
includes/content/ContentHandler.php
includes/content/CssContent.php
includes/content/JavaScriptContent.php
includes/content/TextContent.php
includes/content/WikitextContent.php
includes/filerepo/file/LocalFile.php
includes/gallery/ImageGalleryBase.php
includes/htmlform/HTMLHiddenField.php
includes/installer/Installer.php
includes/installer/OracleUpdater.php
includes/installer/PostgresUpdater.php
includes/installer/WebInstallerPage.php
includes/installer/i18n/ksh.json
includes/installer/i18n/mk.json
includes/installer/i18n/pt.json
includes/installer/i18n/sco.json
includes/installer/i18n/sk.json
includes/installer/i18n/zh-hant.json
includes/libs/JavaScriptMinifier.php
includes/libs/jsminplus.php
includes/libs/lessc.inc.php
includes/media/Bitmap.php
includes/media/Jpeg.php
includes/objectcache/HashBagOStuff.php
includes/objectcache/MemcachedClient.php
includes/objectcache/MultiWriteBagOStuff.php
includes/objectcache/ObjectCache.php
includes/objectcache/SqlBagOStuff.php
includes/parser/CacheTime.php
includes/parser/CoreParserFunctions.php
includes/parser/DateFormatter.php
includes/parser/LinkHolderArray.php
includes/parser/Parser.php
includes/parser/ParserCache.php
includes/parser/ParserOptions.php
includes/parser/ParserOutput.php
includes/parser/Parser_DiffTest.php
includes/parser/Preprocessor.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/poolcounter/PoolCounter.php
includes/poolcounter/PoolCounterRedis.php
includes/profiler/Profiler.php
includes/profiler/ProfilerSimpleDB.php
includes/profiler/ProfilerStub.php
includes/rcfeed/IRCColourfulRCFeedFormatter.php
includes/rcfeed/MachineReadableRCFeedFormatter.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderContext.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/revisiondelete/RevisionDelete.php
includes/revisiondelete/RevisionDeleteAbstracts.php
includes/revisiondelete/RevisionDeleter.php
includes/search/SearchEngine.php
includes/search/SearchHighlighter.php
includes/search/SearchMssql.php
includes/search/SearchMySQL.php
includes/search/SearchOracle.php
includes/search/SearchSqlite.php
includes/site/MediaWikiSite.php
includes/site/Site.php
includes/site/SiteList.php
includes/site/SiteSQLStore.php
includes/specialpage/ChangesListSpecialPage.php
includes/specialpage/SpecialPageFactory.php
includes/specials/SpecialActiveusers.php
includes/specials/SpecialAllpages.php
includes/specials/SpecialBlock.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialBooksources.php
includes/specials/SpecialBrokenRedirects.php
includes/specials/SpecialCachedPage.php
includes/specials/SpecialChangeEmail.php
includes/specials/SpecialChangePassword.php
includes/specials/SpecialContributions.php
includes/specials/SpecialCreateAccount.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialExport.php
includes/specials/SpecialImport.php
includes/specials/SpecialJavaScriptTest.php
includes/specials/SpecialListfiles.php
includes/specials/SpecialListgrouprights.php
includes/specials/SpecialLockdb.php
includes/specials/SpecialLog.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialNewimages.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialRevisiondelete.php
includes/specials/SpecialRunJobs.php
includes/specials/SpecialSearch.php
includes/specials/SpecialUserlogin.php
includes/specials/SpecialWatchlist.php
includes/templates/NoLocalSettings.php
includes/templates/Usercreate.php
includes/templates/Userlogin.php
includes/upload/UploadBase.php
includes/upload/UploadFromChunks.php
includes/upload/UploadFromFile.php
includes/upload/UploadFromStash.php
includes/upload/UploadFromUrl.php
includes/upload/UploadStash.php
includes/utils/CdbPHP.php
includes/utils/ConfEditor.php [deleted file]
languages/Language.php
languages/LanguageConverter.php
languages/i18n/aeb.json
languages/i18n/as.json
languages/i18n/be-tarask.json
languages/i18n/bn.json
languages/i18n/ca.json
languages/i18n/ce.json
languages/i18n/ckb.json
languages/i18n/co.json
languages/i18n/de.json
languages/i18n/diq.json
languages/i18n/en.json
languages/i18n/es.json
languages/i18n/eu.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/he.json
languages/i18n/hu.json
languages/i18n/it.json
languages/i18n/ja.json
languages/i18n/kk-cyrl.json
languages/i18n/ko.json
languages/i18n/krc.json
languages/i18n/ksh.json
languages/i18n/lb.json
languages/i18n/lez.json
languages/i18n/mk.json
languages/i18n/ml.json
languages/i18n/ne.json
languages/i18n/pt-br.json
languages/i18n/pt.json
languages/i18n/qqq.json
languages/i18n/qu.json
languages/i18n/ru.json
languages/i18n/sa.json
languages/i18n/sco.json
languages/i18n/sgs.json
languages/i18n/si.json
languages/i18n/sl.json
languages/i18n/so.json
languages/i18n/sr-ec.json
languages/i18n/sr-el.json
languages/i18n/sv.json
languages/i18n/te.json
languages/i18n/th.json
languages/i18n/tr.json
languages/i18n/uz.json
languages/i18n/vi.json
languages/i18n/zh-hans.json
languages/i18n/zh-hant.json
maintenance/Maintenance.php
maintenance/generateJsonI18n.php
maintenance/install.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc
maintenance/oracle/archives/patch-page_links_updated.sql [new file with mode: 0644]
maintenance/oracle/archives/patch-rc_source.sql [new file with mode: 0644]
maintenance/oracle/archives/patch-user_password_expire.sql
maintenance/oracle/tables.sql
maintenance/pageExists.php [new file with mode: 0644]
resources/lib/oojs-ui/i18n/krc.json
resources/lib/oojs-ui/oojs-ui.js
resources/lib/oojs-ui/oojs-ui.svg.css
resources/src/jquery/jquery.suggestions.js
resources/src/mediawiki.api/mediawiki.api.js
resources/src/mediawiki.api/mediawiki.api.watch.js
resources/src/mediawiki.special/mediawiki.special.css
skins/common/commonContent.css
skins/common/commonPrint.css
skins/common/shared.css
skins/common/wikibits.js
skins/vector/components/thumbnails.less [new file with mode: 0644]
skins/vector/screen.less
tests/parser/parserTest.inc
tests/phpunit/includes/MWNamespaceTest.php
tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/includes/content/CssContentTest.php
tests/phpunit/includes/content/TextContentTest.php
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/install-phpunit.sh
thumb.php

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..50ca329
--- /dev/null
@@ -0,0 +1 @@
+*.sh eol=lf
index 37e304d..575fdc3 100644 (file)
@@ -39,9 +39,12 @@ production.
 * $wgPasswordSenderName has been removed and is no longer functional. To set a
   custom mailer name, the system message 'emailsender' should be modified
   (default: "{{SITENAME}}").
-* If you customized [[MediaWiki:Enotif body]] (the text of email notifications),
+* (bug 63269) Email notifications were not correctly handling the
+  [[MediaWiki:Helppage]] message being set to a full URL (the default).
+  If you customized [[MediaWiki:Enotif body]] (the text of email notifications),
   you'll need to edit it locally to include the URL via the new variable
-  $HELPPAGE instead of the parser functions fullurl and canonicalurl.
+  $HELPPAGE instead of the parser functions fullurl and canonicalurl; otherwise
+  you don't have to do anything.
 * $wgDBAhandler was removed as the only class using it was also removed
 * The 'max threads' setting was removed from $wgDBservers.
 * Support for AdminSettings.php has been completely removed. All configuration
@@ -513,7 +516,7 @@ Don't forget to always back up your database before upgrading!
 
 See the file UPGRADE for more detailed upgrade instructions.
 
-For notes on 1.21.x and older releases, see HISTORY.
+For notes on 1.22.x and older releases, see HISTORY.
 
 == Online documentation ==
 
index 09aeb89..439e5f5 100644 (file)
@@ -9,16 +9,23 @@ MediaWiki 1.24 is an alpha-quality branch and is not recommended for use in
 production.
 
 === Configuration changes in 1.24 ===
+* The server's canonical hostname is available as $wgServerName, which is
+  exposed in both mw.config and ApiQuerySiteInfo.
 
 === New features in 1.24 ===
 * Added a new hook, "WhatLinksHereProps", to allow extensions to annotate
   WhatLinksHere entries.
+* Added a new hook, "ContentGetParserOutput", to customize parser output for
+  a given content object.
+* Deprecated the hook "ShowRawCssJs", use "ContentGetParserOutput" instead.
 * HTMLForm's HTMLTextField now supports the 'url' type.
 * HTMLForm fields may now be dynamically hidden based on the values of other
   fields in the form.
 * HTMLForm now supports multiple copies of an input field or set of input
   fields, e.g. the form may request "one or more usernames" without having to
   have the user enter delimited list of names into a text field.
+* Added a new hook, "SidebarBeforeOutput", to allow to edit the structure of
+  the sidebar just before its display.
 
 === Bug fixes in 1.24 ===
 * (bug 62258) A bug was fixed in File::getUnscaledThumb when a height
@@ -57,6 +64,24 @@ changes to languages because of Bugzilla reports.
 * CLDRPluralRuleConverter_Operator to CLDRPluralRuleConverterOperator
 * CLDRPluralRuleEvaluator_Range to CLDRPluralRuleEvaluatorRange
 * CSSJanus_Tokenizer to CSSJanusTokenizer
+* MediaWiki_I18N to MediaWikiI18N
+* RevDel_ArchiveItem to RevDelArchiveItem
+* RevDel_ArchiveList to RevDelArchiveList
+* RevDel_ArchivedFileItem to RevDelArchivedFileItem
+* RevDel_ArchivedFileList to RevDelArchivedFileList
+* RevDel_ArchivedRevisionItem to RevDelArchivedRevisionItem
+* RevDel_FileItem to RevDelFileItem
+* RevDel_FileList to RevDelFileList
+* RevDel_Item to RevDelItem
+* RevDel_List to RevDelList
+* RevDel_LogItem to RevDelLogItem
+* RevDel_LogList to RevDelLogList
+* RevDel_RevisionItem to RevDelRevisionItem
+* RevDel_RevisionList to RevDelRevisionList
+
+==== Removed classes ====
+* IPBlockForm - Use SpecialBlock directly
+* WatchlistEditor - Use SpecialEditWatchlist directly
 
 == Compatibility ==
 
@@ -76,7 +101,7 @@ The supported versions are:
 
 == Upgrading ==
 
-1.24 has several database changes since 1.22, and will not work without schema
+1.24 has several database changes since 1.23, and will not work without schema
 updates. Note that due to changes to some very large tables like the revision
 table, the schema update may take quite long (minutes on a medium sized site,
 many hours on a large site).
@@ -96,7 +121,7 @@ Don't forget to always back up your database before upgrading!
 
 See the file UPGRADE for more detailed upgrade instructions.
 
-For notes on 1.21.x and older releases, see HISTORY.
+For notes on 1.22.x and older releases, see HISTORY.
 
 == Online documentation ==
 
index 688e0cd..966afd8 100644 (file)
@@ -250,6 +250,7 @@ $block: The block from which the autoblock is coming.
 'AbortEmailNotification': Can be used to cancel email notifications for an edit.
 $editor: The User who made the change.
 $title: The Title of the page that was edited.
+$rc: The current RecentChange object.
 
 'AbortLogin': Return false to cancel account login.
 $user: the User object being authenticated against
@@ -280,7 +281,7 @@ $title: the page title
 'SendWatchlistEmailNotification': Return true to send watchlist email notification
 $targetUser: the user whom to send watchlist email notification
 $title: the page title
-$this: EmailNotification object
+$enotif: EmailNotification object
 
 'AbortChangePassword': Return false to cancel password change.
 $user: the User object to which the password change is occuring
@@ -887,6 +888,19 @@ $title: the Title in question.
 Handler functions that modify $ok should generally return false to prevent further
 hooks from further modifying $ok.
 
+'ContentGetParserOutput': Customize parser output for a given content object,
+called by AbstractContent::getParserOutput. May be used to override the normal
+model-specific rendering of page content.
+$content: The Content to render
+$title: Title of the page, as context
+$revId: The revision ID, as context
+$options: ParserOptions for rendering. To avoid confusing the parser cache,
+the output can only depend on parameters provided to this hook function, not on global state.
+$generateHtml: boolean, indicating whether full HTML should be generated. If false,
+generation of HTML may be skipped, but other information should still be present in the
+ParserOutput object.
+&$output: ParserOutput, to manipulate or replace
+
 'ConvertContent': Called by AbstractContent::convert when a conversion to another
 content model is requested.
 $content: The Content object to be converted.
@@ -2171,7 +2185,7 @@ $title : Current Title object being displayed in search results.
 $article: The article object corresponding to the page
 
 'ShowRawCssJs': Customise the output of raw CSS and JavaScript in page views.
-DEPRECATED, use the ContentHandler facility to handle CSS and JavaScript!
+DEPRECATED, use the ContentGetParserOutput hook instead!
 $text: Text being shown
 $title: Title of the custom script/stylesheet page
 $output: Current OutputPage object
@@ -2226,6 +2240,12 @@ $skin: Skin object
 &$bar: Sidebar contents
 Modify $bar to add or modify sidebar portlets.
 
+'SidebarBeforeOutput': Allows to edit sidebar just before its output by skins.
+$skin Skin object
+&$bar: Sidebar content
+Modify $bar to add or modify sidebar portlets.
+Warning: This hook is run on each display. You should consider to use 'SkinBuildSidebar' that is aggressively cached.
+
 'SkinCopyrightFooter': Allow for site and per-namespace customization of
 copyright notice.
 $title: displayed page title
@@ -2596,7 +2616,7 @@ $user: Current user object
 &$whitelisted: Boolean value of whether this title is whitelisted
 
 'TitleSquidURLs': Called to determine which URLs to purge from HTTP caches.
-$this: Title object to purge
+$title: Title object to purge
 &$urls: An array of URLs to purge from the caches, to be manipulated.
 
 'UndeleteForm::showHistory': Called in UndeleteForm::showHistory, after a
index 0a4b5ee..3bb1563 100644 (file)
@@ -832,8 +832,9 @@ class Article implements Page {
         * Show a page view for a page formatted as CSS or JavaScript. To be called by
         * Article::view() only.
         *
-        * This is hooked by SyntaxHighlight_GeSHi to do syntax highlighting of these
-        * page views.
+        * This exists mostly to serve the deprecated ShowRawCssJs hook (used to customize these views).
+        * It has been replaced by the ContentGetParserOutput hook, which lets you do the same but with
+        * more flexibility.
         *
         * @param bool $showCacheHint Whether to show a message telling the user
         *   to clear the browser cache (default: true).
index bfee420..cb1a052 100644 (file)
@@ -135,7 +135,7 @@ $wgAutoloadLocalClasses = array(
        'MagicWordArray' => 'includes/MagicWord.php',
        'MailAddress' => 'includes/UserMailer.php',
        'MediaWiki' => 'includes/Wiki.php',
-       'MediaWiki_I18N' => 'includes/SkinTemplate.php',
+       'MediaWikiI18N' => 'includes/SkinTemplate.php',
        'MediaWikiVersionFetcher' => 'includes/MediaWikiVersionFetcher.php',
        'Message' => 'includes/Message.php',
        'MessageBlobStore' => 'includes/MessageBlobStore.php',
@@ -876,19 +876,19 @@ $wgAutoloadLocalClasses = array(
        'ResourceLoaderWikiModule' => 'includes/resourceloader/ResourceLoaderWikiModule.php',
 
        # includes/revisiondelete
-       'RevDel_ArchivedFileItem' => 'includes/revisiondelete/RevisionDelete.php',
-       'RevDel_ArchivedFileList' => 'includes/revisiondelete/RevisionDelete.php',
-       'RevDel_ArchivedRevisionItem' => 'includes/revisiondelete/RevisionDelete.php',
-       'RevDel_ArchiveItem' => 'includes/revisiondelete/RevisionDelete.php',
-       'RevDel_ArchiveList' => 'includes/revisiondelete/RevisionDelete.php',
-       'RevDel_FileItem' => 'includes/revisiondelete/RevisionDelete.php',
-       'RevDel_FileList' => 'includes/revisiondelete/RevisionDelete.php',
-       'RevDel_Item' => 'includes/revisiondelete/RevisionDeleteAbstracts.php',
-       'RevDel_List' => 'includes/revisiondelete/RevisionDeleteAbstracts.php',
-       'RevDel_LogItem' => 'includes/revisiondelete/RevisionDelete.php',
-       'RevDel_LogList' => 'includes/revisiondelete/RevisionDelete.php',
-       'RevDel_RevisionItem' => 'includes/revisiondelete/RevisionDelete.php',
-       'RevDel_RevisionList' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelArchivedFileItem' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelArchivedFileList' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelArchivedRevisionItem' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelArchiveItem' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelArchiveList' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelFileItem' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelFileList' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelItem' => 'includes/revisiondelete/RevisionDeleteAbstracts.php',
+       'RevDelList' => 'includes/revisiondelete/RevisionDeleteAbstracts.php',
+       'RevDelLogItem' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelLogList' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelRevisionItem' => 'includes/revisiondelete/RevisionDelete.php',
+       'RevDelRevisionList' => 'includes/revisiondelete/RevisionDelete.php',
        'RevisionDeleter' => 'includes/revisiondelete/RevisionDeleter.php',
        'RevisionDeleteUser' => 'includes/revisiondelete/RevisionDeleteUser.php',
 
@@ -952,7 +952,6 @@ $wgAutoloadLocalClasses = array(
        'HTMLBlockedUsersItemSelect' => 'includes/specials/SpecialBlockList.php',
        'ImageListPager' => 'includes/specials/SpecialListfiles.php',
        'ImportReporter' => 'includes/specials/SpecialImport.php',
-       'IPBlockForm' => 'includes/specials/SpecialBlock.php',
        'LinkSearchPage' => 'includes/specials/SpecialLinkSearch.php',
        'ListredirectsPage' => 'includes/specials/SpecialListredirects.php',
        'ListDuplicatedFilesPage' => 'includes/specials/SpecialListDuplicatedFiles.php',
@@ -1063,7 +1062,6 @@ $wgAutoloadLocalClasses = array(
        'WantedFilesPage' => 'includes/specials/SpecialWantedfiles.php',
        'WantedPagesPage' => 'includes/specials/SpecialWantedpages.php',
        'WantedTemplatesPage' => 'includes/specials/SpecialWantedtemplates.php',
-       'WatchlistEditor' => 'includes/specials/SpecialEditWatchlist.php',
        'WithoutInterwikiPage' => 'includes/specials/SpecialWithoutinterwiki.php',
 
        # includes/templates
@@ -1107,9 +1105,6 @@ $wgAutoloadLocalClasses = array(
        'CdbWriter' => 'includes/utils/Cdb.php',
        'CdbWriterDBA' => 'includes/utils/CdbDBA.php',
        'CdbWriterPHP' => 'includes/utils/CdbPHP.php',
-       'ConfEditor' => 'includes/utils/ConfEditor.php',
-       'ConfEditorParseError' => 'includes/utils/ConfEditor.php',
-       'ConfEditorToken' => 'includes/utils/ConfEditor.php',
        'DoubleReplacer' => 'includes/utils/StringUtils.php',
        'ExplodeIterator' => 'includes/utils/StringUtils.php',
        'HashtableReplacer' => 'includes/utils/StringUtils.php',
index 071a278..4c85e52 100644 (file)
@@ -208,10 +208,15 @@ class IcuCollation extends Collation {
                // Verified by native speakers
                'be' => array( "Ё" ),
                'be-tarask' => array( "Ё" ),
+               'cy' => array( "Ch", "Dd", "Ff", "Ng", "Ll", "Ph", "Rh", "Th" ),
                'en' => array(),
+               'fa' => array( "آ", "ء", "ه" ),
                'fi' => array( "Å", "Ä", "Ö" ),
+               'fr' => array(),
                'hu' => array( "Cs", "Dz", "Dzs", "Gy", "Ly", "Ny", "Ö", "Sz", "Ty", "Ü", "Zs" ),
+               'is' => array( "Á", "Ð", "É", "Í", "Ó", "Ú", "Ý", "Þ", "Æ", "Ö", "Å" ),
                'it' => array(),
+               'lv' => array( "Č", "Ģ", "Ķ", "Ļ", "Ņ", "Š", "Ž" ),
                'pl' => array( "Ą", "Ć", "Ę", "Ł", "Ń", "Ó", "Ś", "Ź", "Ż" ),
                'pt' => array(),
                'ru' => array(),
@@ -229,7 +234,6 @@ class IcuCollation extends Collation {
                'ca' => array(),
                'co' => array(),
                'cs' => array( "Č", "Ch", "Ř", "Š", "Ž" ),
-               'cy' => array( "Ch", "Dd", "Ff", "Ng", "Ll", "Ph", "Rh", "Th" ),
                'da' => array( "Æ", "Ø", "Å" ),
                'de' => array(),
                'dsb' => array( "Č", "Ć", "Dź", "Ě", "Ch", "Ł", "Ń", "Ŕ", "Š", "Ś", "Ž", "Ź" ),
@@ -238,9 +242,7 @@ class IcuCollation extends Collation {
                'es' => array( "Ñ" ),
                'et' => array( "Š", "Ž", "Õ", "Ä", "Ö", "Ü" ),
                'eu' => array( "Ñ" ),
-               'fa' => array( "آ", "ء", "ه" ),
                'fo' => array( "Á", "Ð", "Í", "Ó", "Ú", "Ý", "Æ", "Ø", "Å" ),
-               'fr' => array(),
                'fur' => array( "À", "Á", "Â", "È", "Ì", "Ò", "Ù" ),
                'fy' => array(),
                'ga' => array(),
@@ -248,7 +250,6 @@ class IcuCollation extends Collation {
                'gl' => array( "Ch", "Ll", "Ñ" ),
                'hr' => array( "Č", "Ć", "Dž", "Đ", "Lj", "Nj", "Š", "Ž" ),
                'hsb' => array( "Č", "Dź", "Ě", "Ch", "Ł", "Ń", "Ř", "Š", "Ć", "Ž" ),
-               'is' => array( "Á", "Ð", "É", "Í", "Ó", "Ú", "Ý", "Þ", "Æ", "Ö", "Å" ),
                'kk' => array( "Ү", "І" ),
                'kl' => array( "Æ", "Ø", "Å" ),
                'ku' => array( "Ç", "Ê", "Î", "Ş", "Û" ),
@@ -256,7 +257,6 @@ class IcuCollation extends Collation {
                'la' => array(),
                'lb' => array(),
                'lt' => array( "Č", "Š", "Ž" ),
-               'lv' => array( "Č", "Ģ", "Ķ", "Ļ", "Ņ", "Š", "Ž" ),
                'mk' => array(),
                'mo' => array( "Ă", "Â", "Î", "Ş", "Ţ" ),
                'mt' => array( "Ċ", "Ġ", "Għ", "Ħ", "Ż" ),
index c281893..cf94bae 100644 (file)
@@ -104,6 +104,13 @@ $wgServer = WebRequest::detectServer();
  */
 $wgCanonicalServer = false;
 
+/**
+ * Server name. This is automatically computed by parsing the bare
+ * hostname out of $wgCanonicalServer. It should not be customized.
+ * @since 1.24
+ */
+$wgServerName = false;
+
 /************************************************************************//**
  * @name   Script path settings
  * @{
@@ -1304,21 +1311,22 @@ $wgDjvuOutputExtension = 'jpg';
  * @{
  */
 
-$serverName = substr( $wgServer, strrpos( $wgServer, '/' ) + 1 );
 
 /**
  * Site admin email address.
+ *
+ * Defaults to "wikiadmin@{$wgServerName}".
  */
-$wgEmergencyContact = 'wikiadmin@' . $serverName;
+$wgEmergencyContact = false;
 
 /**
  * Password reminder email address.
  *
  * The address we should use as sender when a user is requesting his password.
+ *
+ * Defaults to "apache@{$wgServerName}".
  */
-$wgPasswordSender = 'apache@' . $serverName;
-
-unset( $serverName ); # Don't leak local variables to global scope
+$wgPasswordSender = false;
 
 /**
  * Password reminder name
@@ -2885,11 +2893,6 @@ $wgShowIPinHeader = true;
  */
 $wgSiteNotice = '';
 
-/**
- * A subtitle to add to the tagline, for skins that have it/
- */
-$wgExtraSubtitle = '';
-
 /**
  * If this is set, a "donate" link will appear in the sidebar. Set it to a URL.
  */
@@ -3605,6 +3608,9 @@ $wgNamespacesWithSubpages = array(
  * Tracking categories allow pages with certain characteristics to be tracked.
  * It works by adding any such page to a category automatically.
  *
+ * A message with the suffix '-desc' should be added as a description message
+ * to have extra information on Special:TrackingCategories.
+ *
  * @since 1.23
  */
 $wgTrackingCategories = array(
@@ -4252,6 +4258,7 @@ $wgGroupPermissions['*']['editmyoptions'] = true;
 $wgGroupPermissions['user']['move'] = true;
 $wgGroupPermissions['user']['move-subpages'] = true;
 $wgGroupPermissions['user']['move-rootuserpages'] = true; // can move root userpages
+$wgGroupPermissions['user']['move-categorypages'] = true;
 $wgGroupPermissions['user']['movefile'] = true;
 $wgGroupPermissions['user']['read'] = true;
 $wgGroupPermissions['user']['edit'] = true;
@@ -4299,6 +4306,7 @@ $wgGroupPermissions['sysop']['importupload'] = true;
 $wgGroupPermissions['sysop']['move'] = true;
 $wgGroupPermissions['sysop']['move-subpages'] = true;
 $wgGroupPermissions['sysop']['move-rootuserpages'] = true;
+$wgGroupPermissions['sysop']['move-categorypages'] = true;
 $wgGroupPermissions['sysop']['patrol'] = true;
 $wgGroupPermissions['sysop']['autopatrol'] = true;
 $wgGroupPermissions['sysop']['protect'] = true;
index d407a0e..83ce755 100644 (file)
@@ -102,7 +102,9 @@ class FeedUtils {
         * @param string $actiontext Text of the action; in case of log event
         * @return string
         */
-       public static function formatDiffRow( $title, $oldid, $newid, $timestamp, $comment, $actiontext = '' ) {
+       public static function formatDiffRow( $title, $oldid, $newid, $timestamp,
+               $comment, $actiontext = ''
+       ) {
                global $wgFeedDiffCutoff, $wgLang;
                wfProfileIn( __METHOD__ );
 
@@ -245,9 +247,15 @@ class FeedUtils {
                        'diff'             => 'background-color: white; color:black;',
                        '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;',
+                       '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;',
                );
 
index 642c49e..b4e2458 100644 (file)
@@ -83,7 +83,10 @@ class FileDeleteForm {
                $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed( 'suppressrevision' );
 
                if ( $this->oldimage ) {
-                       $this->oldfile = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $this->title, $this->oldimage );
+                       $this->oldfile = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName(
+                               $this->title,
+                               $this->oldimage
+                       );
                }
 
                if ( !self::haveDeletableFile( $this->file, $this->oldfile, $this->oldimage ) ) {
@@ -107,11 +110,20 @@ class FileDeleteForm {
                                $reason = $deleteReasonList;
                        }
 
-                       $status = self::doDelete( $this->title, $this->file, $this->oldimage, $reason, $suppress, $wgUser );
+                       $status = self::doDelete(
+                               $this->title,
+                               $this->file,
+                               $this->oldimage,
+                               $reason,
+                               $suppress,
+                               $wgUser
+                       );
 
                        if ( !$status->isGood() ) {
                                $wgOut->addHTML( '<h2>' . $this->prepareMessage( 'filedeleteerror-short' ) . "</h2>\n" );
-                               $wgOut->addWikiText( '<div class="error">' . $status->getWikiText( 'filedeleteerror-short', 'filedeleteerror-long' ) . '</div>' );
+                               $wgOut->addWikiText( '<div class="error">' .
+                                       $status->getWikiText( 'filedeleteerror-short', 'filedeleteerror-long' )
+                                       . '</div>' );
                        }
                        if ( $status->ok ) {
                                $wgOut->setPageTitle( wfMessage( 'actioncomplete' ) );
@@ -141,7 +153,9 @@ class FileDeleteForm {
         * @throws MWException
         * @return bool|Status
         */
-       public static function doDelete( &$title, &$file, &$oldimage, $reason, $suppress, User $user = null ) {
+       public static function doDelete( &$title, &$file, &$oldimage, $reason,
+               $suppress, User $user = null
+       ) {
                if ( $user === null ) {
                        global $wgUser;
                        $user = $wgUser;
@@ -188,7 +202,8 @@ class FileDeleteForm {
                                        }
                                }
                        } catch ( MWException $e ) {
-                               // rollback before returning to prevent UI from displaying incorrect "View or restore N deleted edits?"
+                               // Rollback before returning to prevent UI from displaying
+                               // incorrect "View or restore N deleted edits?"
                                $dbw->rollback( __METHOD__ );
                                throw $e;
                        }
@@ -266,8 +281,14 @@ class FileDeleteForm {
                        <tr>
                                <td></td>
                                <td class='mw-submit'>" .
-                                       Xml::submitButton( wfMessage( 'filedelete-submit' )->text(),
-                                               array( 'name' => 'mw-filedelete-submit', 'id' => 'mw-filedelete-submit', 'tabindex' => '4' ) ) .
+                                       Xml::submitButton(
+                                               wfMessage( 'filedelete-submit' )->text(),
+                                               array(
+                                                       'name' => 'mw-filedelete-submit',
+                                                       'id' => 'mw-filedelete-submit',
+                                                       'tabindex' => '4'
+                                               )
+                                       ) .
                                "</td>
                        </tr>" .
                        Xml::closeElement( 'table' ) .
@@ -309,8 +330,10 @@ class FileDeleteForm {
        private function prepareMessage( $message ) {
                global $wgLang;
                if ( $this->oldimage ) {
+                       # Message keys used:
+                       # 'filedelete-intro-old', 'filedelete-nofile-old', 'filedelete-success-old'
                        return wfMessage(
-                               "{$message}-old", # To ensure grep will find them: 'filedelete-intro-old', 'filedelete-nofile-old', 'filedelete-success-old'
+                               "{$message}-old",
                                wfEscapeWikiText( $this->title->getText() ),
                                $wgLang->date( $this->getTimestamp(), true ),
                                $wgLang->time( $this->getTimestamp(), true ),
index d94d2f1..ed99aa9 100644 (file)
@@ -2922,8 +2922,10 @@ function wfShellExec( $cmd, &$retval = null, $environ = array(),
                $readyPipes = $pipes;
 
                // Clear last error
+               // @codingStandardsIgnoreStart Generic.PHP.NoSilencedErrors.Discouraged
                @trigger_error( '' );
                if ( @stream_select( $readyPipes, $emptyArray, $emptyArray, null ) === false ) {
+                       // @codingStandardsIgnoreEnd
                        $error = error_get_last();
                        if ( strncmp( $error['message'], $eintrMessage, strlen( $eintrMessage ) ) == 0 ) {
                                continue;
@@ -3407,9 +3409,11 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1,
                        $decimal = bcadd( $decimal, $baseChars[$char] );
                }
 
+               // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
                for ( $result = ''; bccomp( $decimal, 0 ); $decimal = bcdiv( $decimal, $destBase, 0 ) ) {
                        $result .= $baseChars[bcmod( $decimal, $destBase )];
                }
+               // @codingStandardsIgnoreEnd
 
                $result = strrev( $result );
        } else {
index 785e717..89457e8 100644 (file)
@@ -27,7 +27,8 @@
 /**
  * @since 1.18
  */
-class MWHookException extends MWException {}
+class MWHookException extends MWException {
+}
 
 /**
  * Hooks class.
@@ -37,7 +38,6 @@ class MWHookException extends MWException {}
  * @since 1.18
  */
 class Hooks {
-
        /**
         * Array of events mapped to an array of callbacks to be run
         * when that event is triggered.
index 2a8c9b1..5262ffe 100644 (file)
@@ -695,16 +695,20 @@ class Html {
         *
         * @param array $params Params to set.
         * - selected: [optional] Id of namespace which should be pre-selected
-        * - all: [optional] Value of item for "all namespaces". If null or unset, no "<option>" is generated to select all namespaces
-        * - 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
+        * - all: [optional] Value of item for "all namespaces". If null or unset,
+        *   no "<option>" is generated to select all namespaces.
+        * - 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 array $selectAttribs HTML attributes for the generated select element.
-        * - id:   [optional], default: 'namespace'
-        * - name: [optional], default: 'namespace'
+        * - id:   [optional], default: 'namespace'.
+        * - name: [optional], default: 'namespace'.
         * @return string HTML code to select a namespace.
         */
-       public static function namespaceSelector( array $params = array(), array $selectAttribs = array() ) {
+       public static function namespaceSelector( array $params = array(),
+               array $selectAttribs = array()
+       ) {
                global $wgContLang;
 
                ksort( $selectAttribs );
index 987a683..b2209c3 100644 (file)
@@ -259,7 +259,8 @@ class HtmlFormatter {
         * specify the $element in the method it'll change the underlying dom and you won't be able to get
         * it back.
         *
-        * @param DOMElement|string|null $element ID of element to get HTML from or false to get it from the whole tree
+        * @param DOMElement|string|null $element ID of element to get HTML from or
+        *   false to get it from the whole tree
         * @return string Processed HTML
         */
        public function getText( $element = null ) {
index 75f7ba6..b0266cb 100644 (file)
@@ -47,12 +47,17 @@ abstract class ImageQueryPage extends QueryPage {
 
                        # $res might contain the whole 1,000 rows, so we read up to
                        # $num [should update this to use a Pager]
-                       for ( $i = 0; $i < $num && $row = $dbr->fetchObject( $res ); $i++ ) {
+                       $i = 0;
+                       foreach ( $res as $row ) {
+                               $i++;
                                $namespace = isset( $row->namespace ) ? $row->namespace : NS_FILE;
                                $title = Title::makeTitleSafe( $namespace, $row->title );
                                if ( $title instanceof Title && $title->getNamespace() == NS_FILE ) {
                                        $gallery->add( $title, $this->getCellHtml( $row ) );
                                }
+                               if ( $i === $num ) {
+                                       break;
+                               }
                        }
 
                        $out->addHTML( $gallery->toHtml() );
@@ -60,7 +65,8 @@ abstract class ImageQueryPage extends QueryPage {
        }
 
        // Gotta override this since it's abstract
-       function formatResult( $skin, $result ) { }
+       function formatResult( $skin, $result ) {
+       }
 
        /**
         * Get additional HTML to be shown in a results' cell
index 5b1dc83..d9aeb7b 100644 (file)
@@ -31,7 +31,7 @@
  * deprecated.
  */
 class MWInit {
-       static $compilerVersion;
+       private static $compilerVersion;
 
        /**
         * @deprecated since 1.22
index e3db5b4..54b779e 100644 (file)
  * A License class for use on Special:Upload
  */
 class Licenses extends HTMLFormField {
-       /**
-        * @var string
-        */
+       /** @var string */
        protected $msg;
 
-       /**
-        * @var array
-        */
+       /** @var array */
        protected $licenses = array();
 
-       /**
-        * @var string
-        */
+       /** @var string */
        protected $html;
        /**#@-*/
 
        /**
-        * Constructor
-        *
         * @param array $params
         */
        public function __construct( $params ) {
                parent::__construct( $params );
 
-               $this->msg = empty( $params['licenses'] ) ? wfMessage( 'licenses' )->inContentLanguage()->plain() : $params['licenses'];
+               $this->msg = empty( $params['licenses'] )
+                       ? wfMessage( 'licenses' )->inContentLanguage()->plain()
+                       : $params['licenses'];
                $this->selected = null;
 
                $this->makeLicenses();
@@ -198,19 +192,13 @@ class Licenses extends HTMLFormField {
  * A License class for use on Special:Upload (represents a single type of license).
  */
 class License {
-       /**
-        * @var string
-        */
-       var $template;
+       /** @var string */
+       public $template;
 
-       /**
-        * @var string
-        */
-       var $text;
+       /** @var string */
+       public $text;
 
        /**
-        * Constructor
-        *
         * @param string $str license name??
         */
        function __construct( $str ) {
index 6433d19..a912fde 100644 (file)
@@ -530,7 +530,7 @@ class Linker {
         *
         * @param array $handlerParams Associative array of media handler parameters, to be passed
         *       to transform(). Typical keys are "width" and "page".
-        * @param string $time Timestamp of the file, set as false for current
+        * @param string|bool $time Timestamp of the file, set as false for current
         * @param string $query Query params for desc url
         * @param int|null $widthOption Used by the parser to remember the user preference thumbnailsize
         * @since 1.20
index 56786f1..4781667 100644 (file)
@@ -270,7 +270,7 @@ class MagicWord {
         * Allow external reads of TTL array
         *
         * @param int $id
-        * @return array
+        * @return int
         */
        static function getCacheTTL( $id ) {
                if ( array_key_exists( $id, self::$mCacheTTLs ) ) {
index 31fbb07..8d4058e 100644 (file)
@@ -960,7 +960,14 @@ class Message {
         * @return string Wikitext parsed into HTML.
         */
        protected function parseText( $string ) {
-               $out = MessageCache::singleton()->parse( $string, $this->title, /*linestart*/true, $this->interface, $this->language );
+               $out = MessageCache::singleton()->parse(
+                       $string,
+                       $this->title,
+                       /*linestart*/true,
+                       $this->interface,
+                       $this->language
+               );
+
                return $out instanceof ParserOutput ? $out->getText() : $out;
        }
 
@@ -974,7 +981,12 @@ class Message {
         * @return string Wikitext with {{-constructs replaced with their values.
         */
        protected function transformText( $string ) {
-               return MessageCache::singleton()->transform( $string, $this->interface, $this->language, $this->title );
+               return MessageCache::singleton()->transform(
+                       $string,
+                       $this->interface,
+                       $this->language,
+                       $this->title
+               );
        }
 
        /**
index f5b346c..5725898 100644 (file)
@@ -32,7 +32,6 @@
  * constituent messages or the resource itself is changed.
  */
 class MessageBlobStore {
-
        /**
         * Get the message blobs for a set of modules
         *
@@ -128,7 +127,8 @@ class MessageBlobStore {
         * @param string $name Module name
         * @param ResourceLoaderModule $module
         * @param string $lang Language code
-        * @return string Regenerated message blob, or null if there was no blob for the given module/language pair
+        * @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 ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -331,6 +331,7 @@ class MessageBlobStore {
         */
        private static function getFromDB( ResourceLoader $resourceLoader, $modules, $lang ) {
                global $wgCacheEpoch;
+
                $retval = array();
                $dbr = wfGetDB( DB_SLAVE );
                $res = $dbr->select( 'msg_resource',
@@ -345,10 +346,14 @@ class MessageBlobStore {
                                // This shouldn't be possible
                                throw new MWException( __METHOD__ . ' passed an invalid module name' );
                        }
+
                        // Update the module's blobs if the set of messages changed or if the blob is
                        // older than $wgCacheEpoch
-                       if ( array_keys( FormatJson::decode( $row->mr_blob, true ) ) !== array_values( array_unique( $module->getMessages() ) ) ||
-                                       wfTimestamp( TS_MW, $row->mr_timestamp ) <= $wgCacheEpoch ) {
+                       $keys = array_keys( FormatJson::decode( $row->mr_blob, true ) );
+                       $values = array_values( array_unique( $module->getMessages() ) );
+                       if ( $keys !== $values
+                               || wfTimestamp( TS_MW, $row->mr_timestamp ) <= $wgCacheEpoch
+                       ) {
                                $retval[$row->mr_resource] = self::updateModule( $row->mr_resource, $module, $lang );
                        } else {
                                $retval[$row->mr_resource] = $row->mr_blob;
index 45c2da9..4edddbc 100644 (file)
@@ -67,7 +67,7 @@ class MWNamespace {
        public static function isMovable( $index ) {
                global $wgAllowImageMoving;
 
-               $result = !( $index < NS_MAIN || ( $index == NS_FILE && !$wgAllowImageMoving ) || $index == NS_CATEGORY );
+               $result = !( $index < NS_MAIN || ( $index == NS_FILE && !$wgAllowImageMoving ) );
 
                /**
                 * @since 1.20
index c783fd3..b3b3b88 100644 (file)
@@ -164,7 +164,10 @@ function wfMangleFlashPolicy( $s ) {
  * @param int $length
  */
 function wfDoContentLength( $length ) {
-       if ( !headers_sent() && isset( $_SERVER['SERVER_PROTOCOL'] ) && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0' ) {
+       if ( !headers_sent()
+               && isset( $_SERVER['SERVER_PROTOCOL'] )
+               && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0'
+       ) {
                header( "Content-Length: $length" );
        }
 }
index 76f0aab..16e070c 100644 (file)
  * @todo document
  */
 class OutputPage extends ContextSource {
-       /// Should be private. Used with addMeta() which adds "<meta>"
-       var $mMetatags = array();
+       /** @var array Should be private. Used with addMeta() which adds "<meta>" */
+       protected $mMetatags = array();
 
-       var $mLinktags = array();
-       var $mCanonicalUrl = false;
+       /** @var array */
+       protected $mLinktags = array();
 
-       /// Additional stylesheets. Looks like this is for extensions. Might be replaced by resource loader.
-       var $mExtStyles = array();
+       /** @var bool */
+       protected $mCanonicalUrl = false;
 
-       /// Should be private - has getter and setter. Contains the HTML title
-       var $mPagetitle = '';
+       /**
+        * @var array Additional stylesheets. Looks like this is for extensions.
+        *   Might be replaced by resource loader.
+        */
+       protected $mExtStyles = array();
+
+       /**
+        * @var string Should be private - has getter and setter. Contains
+        *   the HTML title */
+       public $mPagetitle = '';
 
-       /// Contains all of the "<body>" content. Should be private we got set/get accessors and the append() method.
-       var $mBodytext = '';
+       /**
+        * @var string Contains all of the "<body>" content. Should be private we
+        *   got set/get accessors and the append() method.
+        */
+       public $mBodytext = '';
 
        /**
         * Holds the debug lines that will be output as comments in page source if
@@ -58,43 +69,43 @@ class OutputPage extends ContextSource {
         */
        public $mDebugtext = '';
 
-       /// Should be private. Stores contents of "<title>" tag
-       var $mHTMLtitle = '';
-
-       /// Should be private. Is the displayed content related to the source of the corresponding wiki article.
-       var $mIsarticle = false;
+       /** @var string Stores contents of "<title>" tag */
+       private $mHTMLtitle = '';
 
        /**
-        * Should be private. Has get/set methods properly documented.
-        * Stores "article flag" toggle.
+        * @var bool Is the displayed content related to the source of the
+        *   corresponding wiki article.
         */
-       var $mIsArticleRelated = true;
+       private $mIsarticle = false;
+
+       /** @var bool Stores "article flag" toggle. */
+       private $mIsArticleRelated = true;
 
        /**
-        * Should be private. We have to set isPrintable(). Some pages should
+        * @var bool We have to set isPrintable(). Some pages should
         * never be printed (ex: redirections).
         */
-       var $mPrintable = false;
+       private $mPrintable = false;
 
        /**
-        * Should be private. We have set/get/append methods.
-        *
-        * Contains the page subtitle. Special pages usually have some links here.
-        * Don't confuse with site subtitle added by skins.
+        * @var array Contains the page subtitle. Special pages usually have some
+        *   links here. Don't confuse with site subtitle added by skins.
         */
        private $mSubtitle = array();
 
-       var $mRedirect = '';
-       var $mStatusCode;
+       /** @var string */
+       public $mRedirect = '';
+
+       /** @var int */
+       protected $mStatusCode;
 
        /**
-        * mLastModified and mEtag are used for sending cache control.
-        * The whole caching system should probably be moved into its own class.
+        * @ var string mLastModified and mEtag are used for sending cache control.
+        *   The whole caching system should probably be moved into its own class.
         */
-       var $mLastModified = '';
+       protected $mLastModified = '';
 
        /**
-        * Should be private. No getter but used in sendCacheControl();
         * Contains an HTTP Entity Tags (see RFC 2616 section 3.13) which is used
         * as a unique identifier for the content. It is later used by the client
         * to compare its cached version with the server version. Client sends
@@ -103,70 +114,93 @@ class OutputPage extends ContextSource {
         * To get more information, you will have to look at HTTP/1.1 protocol which
         * is properly described in RFC 2616 : http://tools.ietf.org/html/rfc2616
         */
-       var $mETag = false;
+       private $mETag = false;
+
+       /** @var array */
+       protected $mCategoryLinks = array();
 
-       var $mCategoryLinks = array();
-       var $mCategories = array();
+       /** @var array */
+       protected $mCategories = array();
 
-       /// Should be private. Array of Interwiki Prefixed (non DB key) Titles (e.g. 'fr:Test page')
-       var $mLanguageLinks = array();
+       /** @var array Array of Interwiki Prefixed (non DB key) Titles (e.g. 'fr:Test page') */
+       private $mLanguageLinks = array();
 
        /**
-        * Should be private. Used for JavaScript (pre resource loader)
-        * We should split js / css.
+        * Used for JavaScript (pre resource loader)
+        * @todo We should split JS / CSS.
         * mScripts content is inserted as is in "<head>" by Skin. This might
-        * contains either a link to a stylesheet or inline css.
+        * contain either a link to a stylesheet or inline CSS.
         */
-       var $mScripts = '';
+       private $mScripts = '';
 
-       /**
-        * Inline CSS styles. Use addInlineStyle() sparingly
-        */
-       var $mInlineStyles = '';
+       /** @var string Inline CSS styles. Use addInlineStyle() sparingly */
+       protected $mInlineStyles = '';
 
-       //
-       var $mLinkColours;
+       /** @todo Unused? */
+       private $mLinkColours;
 
        /**
-        * Used by skin template.
+        * @var string Used by skin template.
         * Example: $tpl->set( 'displaytitle', $out->mPageLinkTitle );
         */
-       var $mPageLinkTitle = '';
+       public $mPageLinkTitle = '';
+
+       /** @var array Array of elements in "<head>". Parser might add its own headers! */
+       protected $mHeadItems = array();
+
+       // @todo FIXME: Next 5 variables probably come from the resource loader
+
+       /** @var array */
+       protected $mModules = array();
+
+       /** @var array */
+       protected $mModuleScripts = array();
+
+       /** @var array */
+       protected $mModuleStyles = array();
 
-       /// Array of elements in "<head>". Parser might add its own headers!
-       var $mHeadItems = array();
+       /** @var array */
+       protected $mModuleMessages = array();
 
-       // @todo FIXME: Next variables probably comes from the resource loader
-       var $mModules = array(), $mModuleScripts = array(), $mModuleStyles = array(), $mModuleMessages = array();
-       var $mResourceLoader;
-       var $mJsConfigVars = array();
+       /** @var ResourceLoader */
+       protected $mResourceLoader;
 
-       /** @todo FIXME: Is this still used ?*/
-       var $mInlineMsg = array();
+       /** @var array */
+       protected $mJsConfigVars = array();
 
-       var $mTemplateIds = array();
-       var $mImageTimeKeys = array();
+       /** @var array */
+       protected $mTemplateIds = array();
 
-       var $mRedirectCode = '';
+       /** @var array */
+       protected $mImageTimeKeys = array();
 
-       var $mFeedLinksAppendQuery = null;
+       /** @var string */
+       public $mRedirectCode = '';
 
-       # What level of 'untrustworthiness' is allowed in CSS/JS modules loaded on this page?
-       # @see ResourceLoaderModule::$origin
-       # ResourceLoaderModule::ORIGIN_ALL is assumed unless overridden;
+       protected $mFeedLinksAppendQuery = null;
+
+       /** @var array
+        * What level of 'untrustworthiness' is allowed in CSS/JS modules loaded on this page?
+        * @see ResourceLoaderModule::$origin
+        * ResourceLoaderModule::ORIGIN_ALL is assumed unless overridden;
+        */
        protected $mAllowedModules = array(
                ResourceLoaderModule::TYPE_COMBINED => ResourceLoaderModule::ORIGIN_ALL,
        );
 
+       /** @var bool Whether output is disabled.  If this is true, the 'output' method will do nothing. */
+       protected $mDoNothing = false;
+
+       // Parser related.
+
        /**
-        * Whether output is disabled.  If this is true, the 'output' method will do nothing.
-        *
-        * @var bool $mDoNothing
+        * @var int
+        * @todo Unused?
         */
-       var $mDoNothing = false;
+       private $mContainsOldMagic = 0;
 
-       // Parser related.
-       var $mContainsOldMagic = 0, $mContainsNewMagic = 0;
+       /** @var int */
+       protected $mContainsNewMagic = 0;
 
        /**
         * lazy initialised, use parserOptions()
@@ -175,57 +209,64 @@ class OutputPage extends ContextSource {
        protected $mParserOptions = null;
 
        /**
-        * Handles the atom / rss links.
-        * We probably only support atom in 2011.
-        * Looks like a private variable.
+        * Handles the Atom / RSS links.
+        * We probably only support Atom in 2011.
         * @see $wgAdvertisedFeedTypes
         */
-       var $mFeedLinks = array();
+       private $mFeedLinks = array();
 
        // Gwicke work on squid caching? Roughly from 2003.
-       var $mEnableClientCache = true;
+       protected $mEnableClientCache = true;
 
-       /**
-        * Flag if output should only contain the body of the article.
-        * Should be private.
-        */
-       var $mArticleBodyOnly = false;
+       /** @var bool Flag if output should only contain the body of the article. */
+       private $mArticleBodyOnly = false;
+
+       /** @var bool */
+       protected $mNewSectionLink = false;
 
-       var $mNewSectionLink = false;
-       var $mHideNewSectionLink = false;
+       /** @var bool */
+       protected $mHideNewSectionLink = false;
 
        /**
-        * Comes from the parser. This was probably made to load CSS/JS only
-        * if we had "<gallery>". Used directly in CategoryPage.php
+        * @var bool Comes from the parser. This was probably made to load CSS/JS
+        * only if we had "<gallery>". Used directly in CategoryPage.php.
         * Looks like resource loader can replace this.
         */
-       var $mNoGallery = false;
+       public $mNoGallery = false;
+
+       /** @var string */
+       private $mPageTitleActionText = '';
 
-       // should be private.
-       var $mPageTitleActionText = '';
-       var $mParseWarnings = array();
+       /** @var array */
+       private $mParseWarnings = array();
 
-       // Cache stuff. Looks like mEnableClientCache
-       var $mSquidMaxage = 0;
+       /** @var int Cache stuff. Looks like mEnableClientCache */
+       protected $mSquidMaxage = 0;
 
-       // @todo document
-       var $mPreventClickjacking = true;
+       /**
+        * @var bool
+        * @todo Document
+        */
+       protected $mPreventClickjacking = true;
+
+       /** @var int To include the variable {{REVISIONID}} */
+       private $mRevisionId = null;
 
-       /// should be private. To include the variable {{REVISIONID}}
-       var $mRevisionId = null;
+       /** @var string */
        private $mRevisionTimestamp = null;
 
-       var $mFileVersion = null;
+       /** @var array */
+       protected $mFileVersion = null;
 
        /**
-        * An array of stylesheet filenames (relative from skins path), with options
-        * for CSS media, IE conditions, and RTL/LTR direction.
+        * @var array An array of stylesheet filenames (relative from skins path),
+        * with options for CSS media, IE conditions, and RTL/LTR direction.
         * For internal use; add settings in the skin via $this->addStyle()
         *
         * Style again! This seems like a code duplication since we already have
-        * mStyles. This is what makes OpenSource amazing.
+        * mStyles. This is what makes Open Source amazing.
         */
-       var $styles = array();
+       protected $styles = array();
 
        /**
         * Whether jQuery is already handled.
@@ -445,7 +486,9 @@ class OutputPage extends ContextSource {
         * @param string $type
         * @return array
         */
-       protected function filterModules( $modules, $position = null, $type = ResourceLoaderModule::TYPE_COMBINED ) {
+       protected function filterModules( $modules, $position = null,
+               $type = ResourceLoaderModule::TYPE_COMBINED
+       ) {
                $resourceLoader = $this->getResourceLoader();
                $filteredModules = array();
                foreach ( $modules as $val ) {
@@ -724,7 +767,8 @@ class OutputPage extends ContextSource {
                $clientHeaderTime = strtotime( $clientHeader );
                wfRestoreWarnings();
                if ( !$clientHeaderTime ) {
-                       wfDebug( __METHOD__ . ": unable to parse the client's If-Modified-Since header: $clientHeader\n" );
+                       wfDebug( __METHOD__
+                               . ": unable to parse the client's If-Modified-Since header: $clientHeader\n" );
                        return false;
                }
                $clientHeaderTime = wfTimestamp( TS_MW, $clientHeaderTime );
@@ -875,10 +919,12 @@ class OutputPage extends ContextSource {
        }
 
        /**
-        * "Page title" means the contents of \<h1\>. It is stored as a valid HTML fragment.
-        * This function allows good tags like \<sup\> in the \<h1\> tag, but not bad tags like \<script\>.
-        * This function automatically sets \<title\> to the same content as \<h1\> but with all tags removed.
-        * Bad tags that were escaped in \<h1\> will still be escaped in \<title\>, and good tags like \<i\> will be dropped entirely.
+        * "Page title" means the contents of \<h1\>. It is stored as a valid HTML
+        * fragment. This function allows good tags like \<sup\> in the \<h1\> tag,
+        * but not bad tags like \<script\>. This function automatically sets
+        * \<title\> to the same content as \<h1\> but with all tags removed. Bad
+        * tags that were escaped in \<h1\> will still be escaped in \<title\>, and
+        * good tags like \<i\> will be dropped entirely.
         *
         * @param string|Message $name
         */
@@ -960,7 +1006,8 @@ class OutputPage extends ContextSource {
                if ( $title->isRedirect() ) {
                        $query['redirect'] = 'no';
                }
-               $this->addSubtitle( $this->msg( 'backlinksubtitle' )->rawParams( Linker::link( $title, null, array(), $query ) ) );
+               $this->addSubtitle( $this->msg( 'backlinksubtitle' )
+                       ->rawParams( Linker::link( $title, null, array(), $query ) ) );
        }
 
        /**
@@ -1203,11 +1250,15 @@ class OutputPage extends ContextSource {
                # Fetch existence plus the hiddencat property
                $dbr = wfGetDB( DB_SLAVE );
                $res = $dbr->select( array( 'page', 'page_props' ),
-                       array( 'page_id', 'page_namespace', 'page_title', 'page_len', 'page_is_redirect', 'page_latest', 'pp_value' ),
+                       array( 'page_id', 'page_namespace', 'page_title', 'page_len',
+                               'page_is_redirect', 'page_latest', 'pp_value' ),
                        $lb->constructSet( 'page', $dbr ),
                        __METHOD__,
                        array(),
-                       array( 'page_props' => array( 'LEFT JOIN', array( 'pp_propname' => 'hiddencat', 'pp_page = page_id' ) ) )
+                       array( 'page_props' => array( 'LEFT JOIN', array(
+                               'pp_propname' => 'hiddencat',
+                               'pp_page = page_id'
+                       ) ) )
                );
 
                # Add the results to the link cache
@@ -1227,7 +1278,10 @@ class OutputPage extends ContextSource {
                }
 
                # Add the remaining categories to the skin
-               if ( wfRunHooks( 'OutputPageMakeCategoryLinks', array( &$this, $categories, &$this->mCategoryLinks ) ) ) {
+               if ( wfRunHooks(
+                       'OutputPageMakeCategoryLinks',
+                       array( &$this, $categories, &$this->mCategoryLinks ) )
+               ) {
                        foreach ( $categories as $category => $type ) {
                                $origcategory = $category;
                                $title = Title::makeTitleSafe( NS_CATEGORY, $category );
@@ -1294,7 +1348,8 @@ class OutputPage extends ContextSource {
         */
        public function isUserJsAllowed() {
                wfDeprecated( __METHOD__, '1.18' );
-               return $this->getAllowedModules( ResourceLoaderModule::TYPE_SCRIPTS ) >= ResourceLoaderModule::ORIGIN_USER_INDIVIDUAL;
+               return $this->getAllowedModules( ResourceLoaderModule::TYPE_SCRIPTS ) >=
+                       ResourceLoaderModule::ORIGIN_USER_INDIVIDUAL;
        }
 
        /**
@@ -1537,7 +1592,9 @@ class OutputPage extends ContextSource {
         * @param bool $interface Whether it is an interface message
         *   (for example disables conversion)
         */
-       public function addWikiTextTitle( $text, Title $title, $linestart, $tidy = false, $interface = false ) {
+       public function addWikiTextTitle( $text, Title $title, $linestart,
+               $tidy = false, $interface = false
+       ) {
                global $wgParser;
 
                wfProfileIn( __METHOD__ );
@@ -1931,7 +1988,8 @@ class OutputPage extends ContextSource {
                                        wfDebug( __METHOD__ . ": proxy caching with ESI; {$this->mLastModified} **\n", 'log' );
                                        # start with a shorter timeout for initial testing
                                        # header( 'Surrogate-Control: max-age=2678400+2678400, content="ESI/1.0"');
-                                       $response->header( 'Surrogate-Control: max-age=' . $wgSquidMaxage . '+' . $this->mSquidMaxage . ', content="ESI/1.0"' );
+                                       $response->header( 'Surrogate-Control: max-age=' . $wgSquidMaxage
+                                               . '+' . $this->mSquidMaxage . ', content="ESI/1.0"' );
                                        $response->header( 'Cache-Control: s-maxage=0, must-revalidate, max-age=0' );
                                } else {
                                        # We'll purge the proxy cache for anons explicitly, but require end user agents
@@ -1941,7 +1999,8 @@ class OutputPage extends ContextSource {
                                        wfDebug( __METHOD__ . ": local proxy caching; {$this->mLastModified} **\n", 'log' );
                                        # start with a shorter timeout for initial testing
                                        # header( "Cache-Control: s-maxage=2678400, must-revalidate, max-age=0" );
-                                       $response->header( 'Cache-Control: s-maxage=' . $this->mSquidMaxage . ', must-revalidate, max-age=0' );
+                                       $response->header( 'Cache-Control: s-maxage=' . $this->mSquidMaxage
+                                               . ', must-revalidate, max-age=0' );
                                }
                        } else {
                                # We do want clients to cache if they can, but they *must* check for updates
@@ -2161,7 +2220,9 @@ class OutputPage extends ContextSource {
 
                if ( $msg instanceof Message ) {
                        if ( $params !== array() ) {
-                               trigger_error( 'Argument ignored: $params. The message parameters argument is discarded when the $msg argument is a Message object instead of a string.', E_USER_NOTICE );
+                               trigger_error( 'Argument ignored: $params. The message parameters argument '
+                                       . 'is discarded when the $msg argument is a Message object instead of '
+                                       . 'a string.', E_USER_NOTICE );
                        }
                        $this->addHTML( $msg->parseAsBlock() );
                } else {
@@ -2329,11 +2390,14 @@ class OutputPage extends ContextSource {
         *
         * @param string $source Source code to show (or null).
         * @param bool $protected Is this a permissions error?
-        * @param array $reasons List of reasons for this error, as returned by Title::getUserPermissionsErrors().
+        * @param array $reasons List of reasons for this error, as returned by
+        *   Title::getUserPermissionsErrors().
         * @param string $action Action that was denied or null if unknown
         * @throws ReadOnlyError
         */
-       public function readOnlyPage( $source = null, $protected = false, $reasons = array(), $action = null ) {
+       public function readOnlyPage( $source = null, $protected = false,
+               $reasons = array(), $action = null
+       ) {
                $this->setRobotPolicy( 'noindex,nofollow' );
                $this->setArticleRelated( false );
 
@@ -2556,7 +2620,8 @@ $templates
 
                $bodyClasses[] = $sk->getPageClasses( $this->getTitle() );
                $bodyClasses[] = 'skin-' . Sanitizer::escapeClass( $sk->getSkinName() );
-               $bodyClasses[] = 'action-' . Sanitizer::escapeClass( Action::getActionName( $this->getContext() ) );
+               $bodyClasses[] =
+                       'action-' . Sanitizer::escapeClass( Action::getActionName( $this->getContext() ) );
 
                $bodyAttrs = array();
                // While the implode() is not strictly needed, it's used for backwards compatibility
@@ -2585,15 +2650,19 @@ $templates
        }
 
        /**
-        * TODO: Document
+        * @todo Document
         * @param array|string $modules One or more module names
         * @param string $only ResourceLoaderModule TYPE_ class constant
         * @param bool $useESI
-        * @param array $extraQuery Array with extra query parameters to add to each request. array( param => value )
-        * @param bool $loadCall If true, output an (asynchronous) mw.loader.load() call rather than a "<script src='...'>" tag
+        * @param array $extraQuery Array with extra query parameters to add to each
+        *   request. array( param => value ).
+        * @param bool $loadCall If true, output an (asynchronous) mw.loader.load()
+        *   call rather than a "<script src='...'>" tag.
         * @return string The html "<script>", "<link>" and "<style>" tags
         */
-       protected function makeResourceLoaderLink( $modules, $only, $useESI = false, array $extraQuery = array(), $loadCall = false ) {
+       protected function makeResourceLoaderLink( $modules, $only, $useESI = false,
+               array $extraQuery = array(), $loadCall = false
+       ) {
                global $wgResourceLoaderUseESI;
 
                $modules = (array)$modules;
@@ -2607,7 +2676,6 @@ $templates
                        return $links;
                }
 
-
                if ( count( $modules ) > 1 ) {
                        // Remove duplicate module requests
                        $modules = array_unique( $modules );
@@ -2837,8 +2905,14 @@ $templates
 
                // Scripts and messages "only" requests marked for top inclusion
                // Messages should go first
-               $links[] = $this->makeResourceLoaderLink( $this->getModuleMessages( true, 'top' ), ResourceLoaderModule::TYPE_MESSAGES );
-               $links[] = $this->makeResourceLoaderLink( $this->getModuleScripts( true, 'top' ), ResourceLoaderModule::TYPE_SCRIPTS );
+               $links[] = $this->makeResourceLoaderLink(
+                       $this->getModuleMessages( true, 'top' ),
+                       ResourceLoaderModule::TYPE_MESSAGES
+               );
+               $links[] = $this->makeResourceLoaderLink(
+                       $this->getModuleScripts( true, 'top' ),
+                       ResourceLoaderModule::TYPE_SCRIPTS
+               );
 
                // Modules requests - let the client calculate dependencies and batch requests as it likes
                // Only load modules that have marked themselves for loading at the top
@@ -2859,12 +2933,14 @@ $templates
        }
 
        /**
-        * JS stuff to put at the 'bottom', which can either be the bottom of the "<body>"
-        * or the bottom of the "<head>" depending on $wgResourceLoaderExperimentalAsyncLoading:
-        * modules marked with position 'bottom', legacy scripts ($this->mScripts),
-        * user preferences, site JS and user JS.
+        * JS stuff to put at the 'bottom', which can either be the bottom of the
+        * "<body>" or the bottom of the "<head>" depending on
+        * $wgResourceLoaderExperimentalAsyncLoading: modules marked with position
+        * 'bottom', legacy scripts ($this->mScripts), user preferences, site JS
+        * and user JS.
         *
-        * @param bool $inHead If true, this HTML goes into the "<head>", if false it goes into the "<body>"
+        * @param bool $inHead If true, this HTML goes into the "<head>",
+        *   if false it goes into the "<body>".
         * @return string
         */
        function getScriptsForBottomQueue( $inHead ) {
@@ -2903,7 +2979,12 @@ $templates
                );
 
                // Add user JS if enabled
-               if ( $wgAllowUserJs && $this->getUser()->isLoggedIn() && $this->getTitle() && $this->getTitle()->isJsSubpage() && $this->userCanPreview() ) {
+               if ( $wgAllowUserJs
+                       && $this->getUser()->isLoggedIn()
+                       && $this->getTitle()
+                       && $this->getTitle()->isJsSubpage()
+                       && $this->userCanPreview()
+               ) {
                        # XXX: additional security check/prompt?
                        // We're on a preview of a JS subpage
                        // Exclude this page from the user module in case it's in there (bug 26283)
@@ -2911,7 +2992,8 @@ $templates
                                array( 'excludepage' => $this->getTitle()->getPrefixedDBkey() ), $inHead
                        );
                        // Load the previewed JS
-                       $links[] = Html::inlineScript( "\n" . $this->getRequest()->getText( 'wpTextbox1' ) . "\n" ) . "\n";
+                       $links[] = Html::inlineScript( "\n"
+                                       . $this->getRequest()->getText( 'wpTextbox1' ) . "\n" ) . "\n";
 
                        // FIXME: If the user is previewing, say, ./vector.js, his ./common.js will be loaded
                        // asynchronously and may arrive *after* the inline script here. So the previewed code
@@ -2999,7 +3081,9 @@ $templates
 
                $title = $this->getTitle();
                $ns = $title->getNamespace();
-               $canonicalNamespace = MWNamespace::exists( $ns ) ? MWNamespace::getCanonicalName( $ns ) : $title->getNsText();
+               $canonicalNamespace = MWNamespace::exists( $ns )
+                       ? MWNamespace::getCanonicalName( $ns )
+                       : $title->getNsText();
 
                $sk = $this->getSkin();
                // Get the relevant title so that AJAX features can use the correct page name
@@ -3008,7 +3092,8 @@ $templates
                $relevantUser = $sk->getRelevantUser();
 
                if ( $ns == NS_SPECIAL ) {
-                       list( $canonicalSpecialPageName, /*...*/ ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
+                       list( $canonicalSpecialPageName, /*...*/ ) =
+                               SpecialPageFactory::resolveAlias( $title->getDBkey() );
                } elseif ( $this->canUseWikiPage() ) {
                        $wikiPage = $this->getWikiPage();
                        $curRevisionId = $wikiPage->getLatest();
@@ -3058,6 +3143,7 @@ $templates
                        'wgMonthNamesShort' => $lang->getMonthAbbreviationsArray(),
                        'wgRelevantPageName' => $relevantTitle->getPrefixedDBkey(),
                );
+
                if ( $user->isLoggedIn() ) {
                        $vars['wgUserId'] = $user->getId();
                        $vars['wgUserEditCount'] = $user->getEditCount();
@@ -3068,20 +3154,26 @@ $templates
                        // the client side.
                        $vars['wgUserNewMsgRevisionId'] = $user->getNewMessageRevisionId();
                }
+
                if ( $wgContLang->hasVariants() ) {
                        $vars['wgUserVariant'] = $wgContLang->getPreferredVariant();
                }
                // Same test as SkinTemplate
-               $vars['wgIsProbablyEditable'] = $title->quickUserCan( 'edit', $user ) && ( $title->exists() || $title->quickUserCan( 'create', $user ) );
+               $vars['wgIsProbablyEditable'] = $title->quickUserCan( 'edit', $user )
+                       && ( $title->exists() || $title->quickUserCan( 'create', $user ) );
+
                foreach ( $title->getRestrictionTypes() as $type ) {
                        $vars['wgRestriction' . ucfirst( $type )] = $title->getRestrictions( $type );
                }
+
                if ( $title->isMainPage() ) {
                        $vars['wgIsMainPage'] = true;
                }
+
                if ( $this->mRedirectedFrom ) {
                        $vars['wgRedirectedFrom'] = $this->mRedirectedFrom->getPrefixedDBkey();
                }
+
                if ( $relevantUser ) {
                        $vars['wgRelevantUserName'] = $relevantUser->getName();
                }
@@ -3199,11 +3291,17 @@ $templates
                # uses whichever one appears later in the HTML source. Make sure
                # apple-touch-icon is specified first to avoid this.
                if ( $wgAppleTouchIcon !== false ) {
-                       $tags['apple-touch-icon'] = Html::element( 'link', array( 'rel' => 'apple-touch-icon', 'href' => $wgAppleTouchIcon ) );
+                       $tags['apple-touch-icon'] = Html::element( 'link', array(
+                               'rel' => 'apple-touch-icon',
+                               'href' => $wgAppleTouchIcon
+                       ) );
                }
 
                if ( $wgFavicon !== false ) {
-                       $tags['favicon'] = Html::element( 'link', array( 'rel' => 'shortcut icon', 'href' => $wgFavicon ) );
+                       $tags['favicon'] = Html::element( 'link', array(
+                               'rel' => 'shortcut icon',
+                               'href' => $wgFavicon
+                       ) );
                }
 
                # OpenSearch description link
@@ -3224,7 +3322,11 @@ $templates
                                'type' => 'application/rsd+xml',
                                // Output a protocol-relative URL here if $wgServer is protocol-relative
                                // Whether RSD accepts relative or protocol-relative URLs is completely undocumented, though
-                               'href' => wfExpandUrl( wfAppendQuery( wfScript( 'api' ), array( 'action' => 'rsd' ) ), PROTO_RELATIVE ),
+                               'href' => wfExpandUrl( wfAppendQuery(
+                                       wfScript( 'api' ),
+                                       array( 'action' => 'rsd' ) ),
+                                       PROTO_RELATIVE
+                               ),
                        ) );
                }
 
@@ -3309,7 +3411,8 @@ $templates
                                        $tags[] = $this->feedLink(
                                                $format,
                                                $rctitle->getLocalURL( array( 'feed' => $format ) ),
-                                               $this->msg( "site-{$format}-feed", $wgSitename )->text() # For grep: 'site-rss-feed', 'site-atom-feed'.
+                                               # For grep: 'site-rss-feed', 'site-atom-feed'
+                                               $this->msg( "site-{$format}-feed", $wgSitename )->text()
                                        );
                                }
                        }
@@ -3410,7 +3513,13 @@ $templates
 
                // Add ResourceLoader styles
                // Split the styles into these groups
-               $styles = array( 'other' => array(), 'user' => array(), 'site' => array(), 'private' => array(), 'noscript' => array() );
+               $styles = array(
+                       'other' => array(),
+                       'user' => array(),
+                       'site' => array(),
+                       'private' => array(),
+                       'noscript' => array()
+               );
                $links = array();
                $otherTags = ''; // Tags to append after the normal <link> tags
                $resourceLoader = $this->getResourceLoader();
@@ -3458,16 +3567,20 @@ $templates
                        $styles[ isset( $styles[$group] ) ? $group : 'other' ][] = $name;
                }
 
-               // We want site, private and user styles to override dynamically added styles from modules, but we want
-               // dynamically added styles to override statically added styles from other modules. So the order
-               // has to be other, dynamic, site, private, user
-               // Add statically added styles for other modules
+               // We want site, private and user styles to override dynamically added
+               // styles from modules, but we want dynamically added styles to override
+               // statically added styles from other modules. So the order has to be
+               // other, dynamic, site, private, user. Add statically added styles for
+               // other modules
                $links[] = $this->makeResourceLoaderLink( $styles['other'], ResourceLoaderModule::TYPE_STYLES );
                // Add normal styles added through addStyle()/addInlineStyle() here
                $links[] = implode( "\n", $this->buildCssLinksArray() ) . $this->mInlineStyles;
                // Add marker tag to mark the place where the client-side loader should inject dynamic styles
                // We use a <meta> tag with a made-up name for this because that's valid HTML
-               $links[] = Html::element( 'meta', array( 'name' => 'ResourceLoaderDynamicStyles', 'content' => '' ) ) . "\n";
+               $links[] = Html::element(
+                       'meta',
+                       array( 'name' => 'ResourceLoaderDynamicStyles', 'content' => '' )
+               ) . "\n";
 
                // Add site, private and user styles
                // 'private' at present only contains user.options, so put that before 'user'
@@ -3569,8 +3682,10 @@ $templates
                                } elseif ( preg_match( $screenMediaQueryRegex, $media ) === 1 ) {
                                        // This regex will not attempt to understand a comma-separated media_query_list
                                        //
-                                       // Example supported values for $media: 'screen', 'only screen', 'screen and (min-width: 982px)' ),
-                                       // Example NOT supported value for $media: '3d-glasses, screen, print and resolution > 90dpi'
+                                       // Example supported values for $media:
+                                       // 'screen', 'only screen', 'screen and (min-width: 982px)' ),
+                                       // Example NOT supported value for $media:
+                                       // '3d-glasses, screen, print and resolution > 90dpi'
                                        //
                                        // If it's a print request, we never want any kind of screen stylesheets
                                        // If it's a handheld request (currently the only other choice with a switch),
@@ -3628,7 +3743,8 @@ $templates
         *
         * Is equivalent to:
         *
-        *    $wgOut->addWikiText( "<div class='error'>\n" . wfMessage( 'some-error' )->plain() . "\n</div>" );
+        *    $wgOut->addWikiText( "<div class='error'>\n"
+        *        . wfMessage( 'some-error' )->plain() . "\n</div>" );
         *
         * The newline after opening div is needed in some wikitext. See bug 19226.
         *
index 9b5373b..0fb3952 100644 (file)
@@ -43,10 +43,13 @@ function wfPHPVersionError( $type ) {
 
        $phpVersion = phpversion();
        $protocol = isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';
-       $message = "MediaWiki $mwVersion requires at least PHP version $minimumVersionPHP, you are using PHP $phpVersion.";
+       $message = "MediaWiki $mwVersion requires at least "
+               . "PHP version $minimumVersionPHP, you are using PHP $phpVersion.";
+
        if ( $type == 'cli' ) {
-               $finalOutput = "You are using PHP version $phpVersion but MediaWiki $mwVersion needs PHP $minimumVersionPHP or higher. ABORTING.\n" .
-               "Check if you have a newer php executable with a different name, such as php5.\n";
+               $finalOutput = "You are using PHP version $phpVersion "
+                       . "but MediaWiki $mwVersion needs PHP $minimumVersionPHP or higher. ABORTING.\n"
+                       . "Check if you have a newer php executable with a different name, such as php5.\n";
        } elseif ( $type == 'index.php' ) {
                $pathinfo = pathinfo( $_SERVER['SCRIPT_NAME'] );
                $encLogo = htmlspecialchars(
index 33bf067..5f05460 100644 (file)
@@ -365,7 +365,9 @@ abstract class IndexPager extends ContextSource implements Pager {
         * @return ResultWrapper
         */
        public function reallyDoQuery( $offset, $limit, $descending ) {
-               list( $tables, $fields, $conds, $fname, $options, $join_conds ) = $this->buildQueryInfo( $offset, $limit, $descending );
+               list( $tables, $fields, $conds, $fname, $options, $join_conds ) =
+                       $this->buildQueryInfo( $offset, $limit, $descending );
+
                return $this->mDb->select( $tables, $fields, $conds, $fname, $options, $join_conds );
        }
 
@@ -409,7 +411,8 @@ abstract class IndexPager extends ContextSource implements Pager {
         *
         * @param ResultWrapper $result
         */
-       protected function preprocessResults( $result ) {}
+       protected function preprocessResults( $result ) {
+       }
 
        /**
         * Get the formatted result list. Calls getStartBody(), formatRow() and
@@ -491,7 +494,8 @@ abstract class IndexPager extends ContextSource implements Pager {
         *
         * @return void
         */
-       protected function doBatchLookups() {}
+       protected function doBatchLookups() {
+       }
 
        /**
         * Hook into getBody(), allows text to be inserted at the start. This
@@ -924,8 +928,9 @@ abstract class ReverseChronologicalPager extends IndexPager {
  * @ingroup Pager
  */
 abstract class TablePager extends IndexPager {
-       var $mSort;
-       var $mCurrentRow;
+       protected $mSort;
+
+       protected $mCurrentRow;
 
        public function __construct( IContextSource $context = null ) {
                if ( $context ) {
@@ -995,7 +1000,10 @@ abstract class TablePager extends IndexPager {
                }
 
                $tableClass = $this->getTableClass();
-               $ret = Html::openElement( 'table', array( 'style' => 'border:1px;', 'class' => "mw-datatable $tableClass" ) );
+               $ret = Html::openElement( 'table', array(
+                       'style' => 'border:1px;',
+                       'class' => "mw-datatable $tableClass" )
+               );
                $ret .= Html::rawElement( 'thead', array(), Html::rawElement( 'tr', array(), "\n" . $s . "\n" ) );
                $ret .= Html::openElement( 'tbody' ) . "\n";
 
index 493626a..13e94dd 100644 (file)
  * over to the tryUISubmit static method of this class.
  */
 class Preferences {
-       static $defaultPreferences = null;
-       static $saveFilters = array(
-                       'timecorrection' => array( 'Preferences', 'filterTimezoneInput' ),
-                       'cols' => array( 'Preferences', 'filterIntval' ),
-                       'rows' => array( 'Preferences', 'filterIntval' ),
-                       'rclimit' => array( 'Preferences', 'filterIntval' ),
-                       'wllimit' => array( 'Preferences', 'filterIntval' ),
-                       'searchlimit' => array( 'Preferences', 'filterIntval' ),
+       /** @var array */
+       protected static $defaultPreferences = null;
+
+       /** @var array */
+       protected static $saveFilters = array(
+               'timecorrection' => array( 'Preferences', 'filterTimezoneInput' ),
+               'cols' => array( 'Preferences', 'filterIntval' ),
+               'rows' => array( 'Preferences', 'filterIntval' ),
+               'rclimit' => array( 'Preferences', 'filterIntval' ),
+               'wllimit' => array( 'Preferences', 'filterIntval' ),
+               'searchlimit' => array( 'Preferences', 'filterIntval' ),
        );
 
        // Stuff that shouldn't be saved as a preference.
@@ -1401,7 +1404,10 @@ class Preferences {
 
                // Fortunately, the realname field is MUCH simpler
                // (not really "private", but still shouldn't be edited without permission)
-               if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->isAllowed( 'editmyprivateinfo' ) && array_key_exists( 'realname', $formData ) ) {
+               if ( !in_array( 'realname', $wgHiddenPrefs )
+                       && $user->isAllowed( 'editmyprivateinfo' )
+                       && array_key_exists( 'realname', $formData )
+               ) {
                        $realName = $formData['realname'];
                        $user->setRealName( $realName );
                }
index c5dd698..a796d35 100644 (file)
@@ -121,7 +121,7 @@ abstract class PrefixSearch {
         * @param array $titles
         * @return array
         */
-       protected abstract function titles( array $titles );
+       abstract protected function titles( array $titles );
 
        /**
         * When implemented in a descendant class, receives an array of titles as strings and returns
@@ -131,7 +131,7 @@ abstract class PrefixSearch {
         *
         * @return array
         */
-       protected abstract function strings( array $strings );
+       abstract protected function strings( array $strings );
 
        /**
         * Do a prefix search of titles and return a list of matching page names.
@@ -296,7 +296,9 @@ class TitlePrefixSearch extends PrefixSearch {
 class StringPrefixSearch extends PrefixSearch {
 
        protected function titles( array $titles ) {
-               return array_map( function( Title $t ) { return $t->getPrefixedText(); }, $titles );
+               return array_map( function ( Title $t ) {
+                       return $t->getPrefixedText();
+               }, $titles );
        }
 
        protected function strings( array $strings ) {
index 506ac4c..7c39617 100644 (file)
@@ -326,7 +326,7 @@ class RevisionItem extends RevisionItemBase {
 
        /**
         * Get the HTML link to the revision text.
-        * Overridden by RevDel_ArchiveItem.
+        * Overridden by RevDelArchiveItem.
         * @return string
         */
        protected function getRevisionLink() {
@@ -347,7 +347,7 @@ class RevisionItem extends RevisionItemBase {
 
        /**
         * Get the HTML link to the diff.
-        * Overridden by RevDel_ArchiveItem
+        * Overridden by RevDelArchiveItem
         * @return string
         */
        protected function getDiffLink() {
index 59ac046..1ea6523 100644 (file)
@@ -358,7 +358,7 @@ class Sanitizer {
         * @param string $text
         * @param callable $processCallback Callback to do any variable or parameter
         *   replacements in HTML attribute values
-        * @param array $args Arguments for the processing callback
+        * @param array|bool $args Arguments 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
@@ -459,7 +459,10 @@ class Sanitizer {
                                                $badtag = true;
                                        } elseif ( $slash ) {
                                                # Closing a tag... is it the one we just opened?
-                                               $ot = @array_pop( $tagstack );
+                                               wfSuppressWarnings();
+                                               $ot = array_pop( $tagstack );
+                                               wfRestoreWarnings();
+
                                                if ( $ot != $t ) {
                                                        if ( isset( $htmlsingleallowed[$ot] ) ) {
                                                                # Pop all elements with an optional close tag
@@ -489,7 +492,10 @@ class Sanitizer {
                                                                        }
                                                                }
                                                        } else {
-                                                               @array_push( $tagstack, $ot );
+                                                               wfSuppressWarnings();
+                                                               array_push( $tagstack, $ot );
+                                                               wfRestoreWarnings();
+
                                                                # <li> can be nested in <ul> or <ol>, skip those cases:
                                                                if ( !isset( $htmllist[$ot] ) || !isset( $listtags[$t] ) ) {
                                                                        $badtag = true;
@@ -567,9 +573,16 @@ class Sanitizer {
                } else {
                        # this might be possible using tidy itself
                        foreach ( $bits as $x ) {
-                               preg_match( '/^(\\/?)(\\w+)([^>]*?)(\\/{0,1}>)([^<]*)$/',
-                               $x, $regs );
-                               @list( /* $qbar */, $slash, $t, $params, $brace, $rest ) = $regs;
+                               preg_match(
+                                       '/^(\\/?)(\\w+)([^>]*?)(\\/{0,1}>)([^<]*)$/',
+                                       $x,
+                                       $regs
+                               );
+
+                               wfSuppressWarnings();
+                               list( /* $qbar */, $slash, $t, $params, $brace, $rest ) = $regs;
+                               wfRestoreWarnings();
+
                                $badtag = false;
                                if ( isset( $htmlelements[$t = strtolower( $t )] ) ) {
                                        if ( is_callable( $processCallback ) ) {
index b155f90..a1bca22 100644 (file)
@@ -43,6 +43,7 @@ if ( !isset( $wgVersion ) ) {
 }
 
 // Set various default paths sensibly...
+
 if ( $wgScript === false ) {
        $wgScript = "$wgScriptPath/index$wgScriptExtension";
 }
@@ -122,7 +123,8 @@ if ( isset( $wgFooterIcons['poweredby'] )
        && isset( $wgFooterIcons['poweredby']['mediawiki'] )
        && $wgFooterIcons['poweredby']['mediawiki']['src'] === null
 ) {
-       $wgFooterIcons['poweredby']['mediawiki']['src'] = "$wgStylePath/common/images/poweredby_mediawiki_88x31.png";
+       $wgFooterIcons['poweredby']['mediawiki']['src'] =
+               "$wgStylePath/common/images/poweredby_mediawiki_88x31.png";
 }
 
 /**
@@ -251,7 +253,10 @@ if ( $wgRCFilterByAge ) {
        // as determined by $wgRCMaxAge.
        // Note that we allow 1 link higher than the max for things like 56 days but a 60 day link.
        sort( $wgRCLinkDays );
+
+       // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
        for ( $i = 0; $i < count( $wgRCLinkDays ); $i++ ) {
+               // @codingStandardsIgnoreEnd
                if ( $wgRCLinkDays[$i] >= $wgRCMaxAge / ( 3600 * 24 ) ) {
                        $wgRCLinkDays = array_slice( $wgRCLinkDays, 0, $i + 1, false );
                        break;
@@ -366,7 +371,9 @@ if ( $wgArticleCountMethod === null ) {
 }
 
 if ( $wgInvalidateCacheOnLocalSettingsChange ) {
+       // @codingStandardsIgnoreStart Generic.PHP.NoSilencedErrors.Discouraged - No GlobalFunction here yet.
        $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( "$IP/LocalSettings.php" ) ) );
+       // @codingStandardsIgnoreEnd
 }
 
 if ( $wgNewUserLog ) {
@@ -420,9 +427,34 @@ require_once "$IP/includes/normal/UtfNormalDefines.php";
 wfProfileOut( $fname . '-includes' );
 
 wfProfileIn( $fname . '-defaults2' );
+
+if ( $wgCanonicalServer === false ) {
+       $wgCanonicalServer = wfExpandUrl( $wgServer, PROTO_HTTP );
+}
+
+// Set server name
+$serverParts = wfParseUrl( $wgCanonicalServer );
+if ( $wgServerName !== false ) {
+       wfWarn( '$wgServerName should be derived from $wgCanonicalServer, '
+               . 'not customized. Overwriting $wgServerName.' );
+}
+$wgServerName = $serverParts['host'];
+unset( $serverParts );
+
+// Set defaults for configuration variables
+// that are derived from the server name by default
+if ( $wgEmergencyContact === false ) {
+       $wgEmergencyContact = 'wikiadmin@' . $wgServerName;
+}
+
+if ( $wgPasswordSender === false ) {
+       $wgPasswordSender = 'apache@' . $wgServerName;
+}
+
 if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) {
        $wgSecureLogin = false;
-       wfWarn( 'Secure login was enabled on a server that only supports HTTP or HTTPS. Disabling secure login.' );
+       wfWarn( 'Secure login was enabled on a server that only supports '
+               . 'HTTP or HTTPS. Disabling secure login.' );
 }
 
 // Now that GlobalFunctions is loaded, set defaults that depend
@@ -433,10 +465,6 @@ if ( $wgTmpDirectory === false ) {
        wfProfileOut( $fname . '-tempDir' );
 }
 
-if ( $wgCanonicalServer === false ) {
-       $wgCanonicalServer = wfExpandUrl( $wgServer, PROTO_HTTP );
-}
-
 // $wgHTCPMulticastRouting got renamed to $wgHTCPRouting in MediaWiki 1.22
 // ensure back compatibility.
 if ( !$wgHTCPRouting && $wgHTCPMulticastRouting ) {
@@ -531,13 +559,10 @@ if ( !wfIniGetBool( 'session.auto_start' ) ) {
        session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
 }
 
-if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
-       if ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) ) {
-               wfSetupSession();
-               $wgSessionStarted = true;
-       } else {
-               $wgSessionStarted = false;
-       }
+if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode &&
+       ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) )
+) {
+       wfSetupSession();
 }
 
 wfProfileOut( $fname . '-session' );
index 2f28e7b..b99840f 100644 (file)
  * extract( $globals );
  * @endcode
  *
- * TODO: give examples for,
+ * @todo Give examples for,
  * suffixes:
  * $conf->suffixes = array( 'wiki' );
  * localVHosts
@@ -176,7 +176,9 @@ class SiteConfiguration {
         * @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() ) {
+       public function get( $settingName, $wiki, $suffix = null, $params = array(),
+               $wikiTags = array()
+       ) {
                $params = $this->mergeParams( $wiki, $suffix, $params, $wikiTags );
                return $this->getSetting( $settingName, $wiki, $params );
        }
@@ -228,7 +230,9 @@ class SiteConfiguration {
                                                        $retval = $thisSetting[$suffix];
                                                }
                                                break;
-                                       } elseif ( array_key_exists( "+$suffix", $thisSetting ) && is_array( $thisSetting["+$suffix"] ) ) {
+                                       } elseif ( array_key_exists( "+$suffix", $thisSetting )
+                                               && is_array( $thisSetting["+$suffix"] )
+                                       ) {
                                                if ( !isset( $retval ) ) {
                                                        $retval = array();
                                                }
@@ -338,7 +342,9 @@ class SiteConfiguration {
         * @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() ) {
+       public function extractVar( $setting, $wiki, $suffix, &$var,
+               $params = array(), $wikiTags = array()
+       ) {
                $value = $this->get( $setting, $wiki, $suffix, $params, $wikiTags );
                if ( !is_null( $value ) ) {
                        $var = $value;
@@ -353,7 +359,9 @@ class SiteConfiguration {
         * @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() ) {
+       public function extractGlobal( $setting, $wiki, $suffix = null,
+               $params = array(), $wikiTags = array()
+       ) {
                $params = $this->mergeParams( $wiki, $suffix, $params, $wikiTags );
                $this->extractGlobalSetting( $setting, $wiki, $params );
        }
@@ -386,7 +394,9 @@ class SiteConfiguration {
         * @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() ) {
+       public function extractAllGlobals( $wiki, $suffix = null, $params = array(),
+               $wikiTags = array()
+       ) {
                $params = $this->mergeParams( $wiki, $suffix, $params, $wikiTags );
                foreach ( $this->settings as $varName => $setting ) {
                        $this->extractGlobalSetting( $varName, $wiki, $params );
@@ -574,12 +584,14 @@ class SiteConfiguration {
         */
        static function arrayMerge( $array1/* ... */ ) {
                $out = $array1;
-               for ( $i = 1; $i < func_num_args(); $i++ ) {
+               $argsCount = func_num_args();
+               for ( $i = 1; $i < $argsCount; $i++ ) {
                        foreach ( func_get_arg( $i ) as $key => $value ) {
                                if ( isset( $out[$key] ) && is_array( $out[$key] ) && is_array( $value ) ) {
                                        $out[$key] = self::arrayMerge( $out[$key], $value );
                                } elseif ( !isset( $out[$key] ) || !$out[$key] && !is_numeric( $key ) ) {
-                                       // Values that evaluate to true given precedence, for the primary purpose of merging permissions arrays.
+                                       // Values that evaluate to true given precedence, for the
+                                       // primary purpose of merging permissions arrays.
                                        $out[$key] = $value;
                                } elseif ( is_numeric( $key ) ) {
                                        $out[] = $value;
index 4685c3e..4e737d1 100644 (file)
  * Static accessor class for site_stats and related things
  */
 class SiteStats {
-       static $row, $loaded = false;
-       static $jobs;
-       static $pageCount = array();
-       static $groupMemberCounts = array();
+       /** @var bool|ResultWrapper */
+       private static $row;
+
+       /** @var bool */
+       private static $loaded = false;
+
+       /** @var int */
+       private static $jobs;
+
+       /** @var int[] */
+       private static $pageCount = array();
+
+       /** @var int[] */
+       private static $groupMemberCounts = array();
 
        static function recache() {
                self::load( true );
@@ -190,7 +200,10 @@ class SiteStats {
                if ( !isset( self::$jobs ) ) {
                        $dbr = wfGetDB( DB_SLAVE );
                        self::$jobs = array_sum( JobQueueGroup::singleton()->getQueueSizes() );
-                       /* Zero rows still do single row read for row that doesn't exist, but people are annoyed by that */
+                       /**
+                        * Zero rows still do single row read for row that doesn't exist,
+                        * but people are annoyed by that
+                        */
                        if ( self::$jobs == 1 ) {
                                self::$jobs = 0;
                        }
index 8300da7..9d1034b 100644 (file)
@@ -678,12 +678,15 @@ abstract class Skin extends ContextSource {
        function printSource() {
                $oldid = $this->getRevisionId();
                if ( $oldid ) {
-                       $url = htmlspecialchars( wfExpandIRI( $this->getTitle()->getCanonicalURL( 'oldid=' . $oldid ) ) );
+                       $canonicalUrl = $this->getTitle()->getCanonicalURL( 'oldid=' . $oldid );
+                       $url = htmlspecialchars( wfExpandIRI( $canonicalUrl ) );
                } else {
                        // oldid not available for non existing pages
                        $url = htmlspecialchars( wfExpandIRI( $this->getTitle()->getCanonicalURL() ) );
                }
-               return $this->msg( 'retrievedfrom', '<a dir="ltr" href="' . $url . '">' . $url . '</a>' )->text();
+
+               return $this->msg( 'retrievedfrom', '<a dir="ltr" href="' . $url
+                       . '">' . $url . '</a>' )->text();
        }
 
        /**
@@ -799,7 +802,9 @@ abstract class Skin extends ContextSource {
                global $wgRightsPage, $wgRightsUrl, $wgRightsText, $wgContLang;
 
                if ( $type == 'detect' ) {
-                       if ( !$this->isRevisionCurrent() && !$this->msg( 'history_copyright' )->inContentLanguage()->isDisabled() ) {
+                       if ( !$this->isRevisionCurrent()
+                               && !$this->msg( 'history_copyright' )->inContentLanguage()->isDisabled()
+                       ) {
                                $type = 'history';
                        } else {
                                $type = 'normal';
@@ -827,14 +832,21 @@ abstract class Skin extends ContextSource {
                // Allow for site and per-namespace customization of copyright notice.
                $forContent = true;
 
-               wfRunHooks( 'SkinCopyrightFooter', array( $this->getTitle(), $type, &$msg, &$link, &$forContent ) );
+               wfRunHooks(
+                       'SkinCopyrightFooter',
+                       array( $this->getTitle(), $type, &$msg, &$link, &$forContent )
+               );
 
                $msgObj = $this->msg( $msg )->rawParams( $link );
                if ( $forContent ) {
                        $msg = $msgObj->inContentLanguage()->text();
                        if ( $this->getLanguage()->getCode() !== $wgContLang->getCode() ) {
-                               $msg = Html::rawElement( 'span', array( 'lang' => $wgContLang->getHtmlCode(), 'dir' => $wgContLang->getDir() ), $msg );
+                               $msg = Html::rawElement( 'span', array(
+                                       'lang' => $wgContLang->getHtmlCode(),
+                                       'dir' => $wgContLang->getDir()
+                               ), $msg );
                        }
+
                        return $msg;
                } else {
                        return $msgObj->text();
@@ -878,7 +890,8 @@ abstract class Skin extends ContextSource {
                global $wgStylePath;
 
                $url = htmlspecialchars( "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" );
-               $text = '<a href="//www.mediawiki.org/"><img src="' . $url . '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
+               $text = '<a href="//www.mediawiki.org/"><img src="' . $url
+                       . '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
                wfRunHooks( 'SkinGetPoweredBy', array( &$text, $this ) );
                return $text;
        }
@@ -934,8 +947,10 @@ abstract class Skin extends ContextSource {
 
        /**
         * Renders a $wgFooterIcons icon according to the method's arguments
-        * @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
+        * @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' ) {
@@ -945,7 +960,8 @@ abstract class Skin extends ContextSource {
                        $url = isset( $icon["url"] ) ? $icon["url"] : null;
                        unset( $icon["url"] );
                        if ( isset( $icon["src"] ) && $withImage === 'withImage' ) {
-                               $html = Html::element( 'img', $icon ); // do this the lazy way, just pass icon data as an attribute array
+                               // do this the lazy way, just pass icon data as an attribute array
+                               $html = Html::element( 'img', $icon );
                        } else {
                                $html = htmlspecialchars( $icon["alt"] );
                        }
@@ -1044,8 +1060,11 @@ abstract class Skin extends ContextSource {
                } else {
                        $targetUser = User::newFromId( $id );
                }
-               return $this->getUser()->canSendEmail() && # the sending user must have a confirmed email address
-                       $targetUser->canReceiveEmail(); # the target user must have a confirmed email address and allow emails from users
+
+               # The sending user must have a confirmed email address and the target
+               # user must have a confirmed email address and allow emails from users.
+               return $this->getUser()->canSendEmail() &&
+                       $targetUser->canReceiveEmail();
        }
 
        /**
@@ -1244,6 +1263,8 @@ abstract class Skin extends ContextSource {
                if ( $wgEnableSidebarCache ) {
                        $cachedsidebar = $wgMemc->get( $key );
                        if ( $cachedsidebar ) {
+                               wfRunHooks( 'SidebarBeforeOutput', array( $this, &$cachedsidebar ) );
+
                                wfProfileOut( __METHOD__ );
                                return $cachedsidebar;
                        }
@@ -1257,6 +1278,8 @@ abstract class Skin extends ContextSource {
                        $wgMemc->set( $key, $bar, $wgSidebarCacheExpiry );
                }
 
+               wfRunHooks( 'SidebarBeforeOutput', array( $this, &$bar ) );
+
                wfProfileOut( __METHOD__ );
                return $bar;
        }
index b186447..e8fa944 100644 (file)
  * @private
  * @ingroup Skins
  */
-class MediaWiki_I18N {
-       var $_context = array();
+class MediaWikiI18N {
+       private $context = array();
 
        function set( $varName, $value ) {
-               $this->_context[$varName] = $value;
+               $this->context[$varName] = $value;
        }
 
        function translate( $value ) {
@@ -46,7 +46,7 @@ class MediaWiki_I18N {
                while ( preg_match( '/\$([0-9]*?)/sm', $value, $m ) ) {
                        list( $src, $var ) = $m;
                        wfSuppressWarnings();
-                       $varValue = $this->_context[$var];
+                       $varValue = $this->context[$var];
                        wfRestoreWarnings();
                        $value = str_replace( $src, $varValue, $value );
                }
@@ -68,35 +68,29 @@ class MediaWiki_I18N {
  * @ingroup Skins
  */
 class SkinTemplate extends Skin {
-       /**#@+
-        * @private
-        */
-
        /**
-        * Name of our skin, it probably needs to be all lower case.  Child classes
-        * should override the default.
+        * @var string Name of our skin, it probably needs to be all lower case.
+        *   Child classes should override the default.
         */
-       var $skinname = 'monobook';
+       public $skinname = 'monobook';
 
        /**
-        * Stylesheets set to use.  Subdirectory in skins/ where various stylesheets
-        * are located.  Child classes should override the default.
+        * @var string Stylesheets set to use. Subdirectory in skins/ where various
+        *   stylesheets are located.  Child classes should override the default.
         */
-       var $stylename = 'monobook';
+       public $stylename = 'monobook';
 
        /**
-        * For QuickTemplate, the name of the subclass which will actually fill the
-        * template.  Child classes should override the default.
+        * @var string For QuickTemplate, the name of the subclass which will
+        *   actually fill the template.  Child classes should override the default.
         */
-       var $template = 'QuickTemplate';
+       public $template = 'QuickTemplate';
 
        /**
-        * Whether this skin use OutputPage::headElement() to generate the "<head>"
-        * tag
+        * @var bool Whether this skin use OutputPage::headElement() to generate
+        *   the "<head>" tag.
         */
-       var $useHeadElement = false;
-
-       /**#@-*/
+       public $useHeadElement = false;
 
        /**
         * Add specific styles for this skin
@@ -187,7 +181,10 @@ class SkinTemplate extends Skin {
                                        'lang' => $ilInterwikiCodeBCP47,
                                        'hreflang' => $ilInterwikiCodeBCP47,
                                );
-                               wfRunHooks( 'SkinTemplateGetLanguageLink', array( &$languageLink, $languageLinkTitle, $this->getTitle() ) );
+                               wfRunHooks(
+                                       'SkinTemplateGetLanguageLink',
+                                       array( &$languageLink, $languageLinkTitle, $this->getTitle() )
+                               );
                                $languageLinks[] = $languageLink;
                        }
                }
@@ -402,7 +399,8 @@ class SkinTemplate extends Skin {
                // that interface elements are in a different language.
                $tpl->set( 'userlangattributes', '' );
                $tpl->set( 'specialpageattributes', '' ); # obsolete
-               // Used by VectorBeta to insert HTML before content but after the heading for the page title. Defaults to empty string.
+               // Used by VectorBeta to insert HTML before content but after the
+               // heading for the page title. Defaults to empty string.
                $tpl->set( 'prebodyhtml', '' );
 
                if ( $userLangCode !== $wgContLang->getHtmlCode() || $userLangDir !== $wgContLang->getDir() ) {
@@ -561,9 +559,14 @@ class SkinTemplate extends Skin {
                // and output printfooter and debughtml separately
                $tpl->set( 'bodycontent', $tpl->data['bodytext'] );
 
-               // Append printfooter and debughtml onto bodytext so that skins that were already
-               // using bodytext before they were split out don't suddenly start not outputting information
-               $tpl->data['bodytext'] .= Html::rawElement( 'div', array( 'class' => 'printfooter' ), "\n{$tpl->data['printfooter']}" ) . "\n";
+               // Append printfooter and debughtml onto bodytext so that skins that
+               // were already using bodytext before they were split out don't suddenly
+               // start not outputting information.
+               $tpl->data['bodytext'] .= Html::rawElement(
+                       'div',
+                       array( 'class' => 'printfooter' ),
+                       "\n{$tpl->data['printfooter']}"
+               ) . "\n";
                $tpl->data['bodytext'] .= $tpl->data['debughtml'];
 
                // allow extensions adding stuff after the page content.
@@ -733,7 +736,8 @@ class SkinTemplate extends Skin {
                        $login_url = array(
                                'text' => $this->msg( $loginlink )->text(),
                                'href' => self::makeSpecialUrl( 'Userlogin', $returnto ),
-                               'active' => $title->isSpecial( 'Userlogin' ) && ( $loginlink == 'nav-login-createaccount' || !$is_signup ),
+                               'active' => $title->isSpecial( 'Userlogin' )
+                                       && ( $loginlink == 'nav-login-createaccount' || !$is_signup ),
                        );
                        $createaccount_url = array(
                                'text' => $this->msg( 'pt-createaccount' )->text(),
@@ -875,9 +879,10 @@ class SkinTemplate extends Skin {
         * links, however these are usually automatically generated by SkinTemplate
         * itself and are not necessary when using a hook. The only things these may
         * matter to are people modifying content_navigation after it's initial creation:
-        * - id: A "preferred" id, most skins are best off outputting this preferred id for best compatibility
+        * - id: A "preferred" id, most skins are best off outputting this preferred
+        *   id for best compatibility.
         * - tooltiponly: This is set to true for some tabs in cases where the system
-        *                believes that the accesskey should not be added to the tab.
+        *   believes that the accesskey should not be added to the tab.
         *
         * @return array
         */
@@ -974,7 +979,9 @@ class SkinTemplate extends Skin {
                                wfProfileIn( __METHOD__ . '-edit' );
 
                                // Checks if user can edit the current page if it exists or create it otherwise
-                               if ( $title->quickUserCan( 'edit', $user ) && ( $title->exists() || $title->quickUserCan( 'create', $user ) ) ) {
+                               if ( $title->quickUserCan( 'edit', $user )
+                                       && ( $title->exists() || $title->quickUserCan( 'create', $user ) )
+                               ) {
                                        // Builds CSS class for talk page links
                                        $isTalkClass = $isTalk ? ' istalk' : '';
                                        // Whether the user is editing the page
@@ -985,14 +992,22 @@ class SkinTemplate extends Skin {
                                                && ( ( $isTalk && $this->isRevisionCurrent() ) || $out->showNewSectionLink() );
                                        $section = $request->getVal( 'section' );
 
-                                       if ( $title->exists() || ( $title->getNamespace() == NS_MEDIAWIKI && $title->getDefaultMessageText() !== false ) ) {
+                                       if ( $title->exists()
+                                               || ( $title->getNamespace() == NS_MEDIAWIKI
+                                                       && $title->getDefaultMessageText() !== false
+                                               )
+                                       ) {
                                                $msgKey = $isForeignFile ? 'edit-local' : 'edit';
                                        } else {
                                                $msgKey = $isForeignFile ? 'create-local' : 'create';
                                        }
                                        $content_navigation['views']['edit'] = array(
-                                               'class' => ( $isEditing && ( $section !== 'new' || !$showNewSection ) ? 'selected' : '' ) . $isTalkClass,
-                                               'text' => wfMessageFallback( "$skname-view-$msgKey", $msgKey )->setContext( $this->getContext() )->text(),
+                                               'class' => ( $isEditing && ( $section !== 'new' || !$showNewSection )
+                                                       ? 'selected'
+                                                       : ''
+                                               ) . $isTalkClass,
+                                               'text' => wfMessageFallback( "$skname-view-$msgKey", $msgKey )
+                                                       ->setContext( $this->getContext() )->text(),
                                                'href' => $title->getLocalURL( $this->editUrlOptions() ),
                                                'primary' => !$isForeignFile, // don't collapse this in vector
                                        );
@@ -1003,7 +1018,8 @@ class SkinTemplate extends Skin {
                                                //$content_navigation['actions']['addsection']
                                                $content_navigation['views']['addsection'] = array(
                                                        'class' => ( $isEditing && $section == 'new' ) ? 'selected' : false,
-                                                       'text' => wfMessageFallback( "$skname-action-addsection", 'addsection' )->setContext( $this->getContext() )->text(),
+                                                       'text' => wfMessageFallback( "$skname-action-addsection", 'addsection' )
+                                                               ->setContext( $this->getContext() )->text(),
                                                        'href' => $title->getLocalURL( 'action=edit&section=new' )
                                                );
                                        }
@@ -1012,7 +1028,8 @@ class SkinTemplate extends Skin {
                                        // Adds view source view link
                                        $content_navigation['views']['viewsource'] = array(
                                                'class' => ( $onPage && $action == 'edit' ) ? 'selected' : false,
-                                               'text' => wfMessageFallback( "$skname-action-viewsource", 'viewsource' )->setContext( $this->getContext() )->text(),
+                                               'text' => wfMessageFallback( "$skname-action-viewsource", 'viewsource' )
+                                                       ->setContext( $this->getContext() )->text(),
                                                'href' => $title->getLocalURL( $this->editUrlOptions() ),
                                                'primary' => true, // don't collapse this in vector
                                        );
@@ -1025,7 +1042,8 @@ class SkinTemplate extends Skin {
                                        // Adds history view link
                                        $content_navigation['views']['history'] = array(
                                                'class' => ( $onPage && $action == 'history' ) ? 'selected' : false,
-                                               'text' => wfMessageFallback( "$skname-view-history", 'history_short' )->setContext( $this->getContext() )->text(),
+                                               'text' => wfMessageFallback( "$skname-view-history", 'history_short' )
+                                                       ->setContext( $this->getContext() )->text(),
                                                'href' => $title->getLocalURL( 'action=history' ),
                                                'rel' => 'archives',
                                        );
@@ -1033,7 +1051,8 @@ class SkinTemplate extends Skin {
                                        if ( $title->quickUserCan( 'delete', $user ) ) {
                                                $content_navigation['actions']['delete'] = array(
                                                        'class' => ( $onPage && $action == 'delete' ) ? 'selected' : false,
-                                                       'text' => wfMessageFallback( "$skname-action-delete", 'delete' )->setContext( $this->getContext() )->text(),
+                                                       'text' => wfMessageFallback( "$skname-action-delete", 'delete' )
+                                                               ->setContext( $this->getContext() )->text(),
                                                        'href' => $title->getLocalURL( 'action=delete' )
                                                );
                                        }
@@ -1042,7 +1061,8 @@ class SkinTemplate extends Skin {
                                                $moveTitle = SpecialPage::getTitleFor( 'Movepage', $title->getPrefixedDBkey() );
                                                $content_navigation['actions']['move'] = array(
                                                        'class' => $this->getTitle()->isSpecial( 'Movepage' ) ? 'selected' : false,
-                                                       'text' => wfMessageFallback( "$skname-action-move", 'move' )->setContext( $this->getContext() )->text(),
+                                                       'text' => wfMessageFallback( "$skname-action-move", 'move' )
+                                                               ->setContext( $this->getContext() )->text(),
                                                        'href' => $moveTitle->getLocalURL()
                                                );
                                        }
@@ -1052,7 +1072,8 @@ class SkinTemplate extends Skin {
                                                $n = $title->isDeleted();
                                                if ( $n ) {
                                                        $undelTitle = SpecialPage::getTitleFor( 'Undelete' );
-                                                       // If the user can't undelete but can view deleted history show them a "View .. deleted" tab instead
+                                                       // If the user can't undelete but can view deleted
+                                                       // history show them a "View .. deleted" tab instead.
                                                        $msgKey = $user->isAllowed( 'undelete' ) ? 'undelete' : 'viewdeleted';
                                                        $content_navigation['actions']['undelete'] = array(
                                                                'class' => $this->getTitle()->isSpecial( 'Undelete' ) ? 'selected' : false,
@@ -1070,7 +1091,8 @@ class SkinTemplate extends Skin {
                                        $mode = $title->isProtected() ? 'unprotect' : 'protect';
                                        $content_navigation['actions'][$mode] = array(
                                                'class' => ( $onPage && $action == $mode ) ? 'selected' : false,
-                                               'text' => wfMessageFallback( "$skname-action-$mode", $mode )->setContext( $this->getContext() )->text(),
+                                               'text' => wfMessageFallback( "$skname-action-$mode", $mode )
+                                                       ->setContext( $this->getContext() )->text(),
                                                'href' => $title->getLocalURL( "action=$mode" )
                                        );
                                }
@@ -1375,7 +1397,7 @@ abstract class QuickTemplate {
         */
        function __construct() {
                $this->data = array();
-               $this->translator = new MediaWiki_I18N();
+               $this->translator = new MediaWikiI18N();
        }
 
        /**
@@ -1411,7 +1433,7 @@ abstract class QuickTemplate {
        }
 
        /**
-        * @param MediaWiki_I18N $t
+        * @param MediaWikiI18N $t
         */
        public function setTranslator( &$t ) {
                $this->translator = &$t;
@@ -1556,11 +1578,15 @@ abstract class BaseTemplate extends QuickTemplate {
                wfProfileIn( __METHOD__ );
 
                $toolbox = array();
-               if ( isset( $this->data['nav_urls']['whatlinkshere'] ) && $this->data['nav_urls']['whatlinkshere'] ) {
+               if ( isset( $this->data['nav_urls']['whatlinkshere'] )
+                       && $this->data['nav_urls']['whatlinkshere']
+               ) {
                        $toolbox['whatlinkshere'] = $this->data['nav_urls']['whatlinkshere'];
                        $toolbox['whatlinkshere']['id'] = 't-whatlinkshere';
                }
-               if ( isset( $this->data['nav_urls']['recentchangeslinked'] ) && $this->data['nav_urls']['recentchangeslinked'] ) {
+               if ( isset( $this->data['nav_urls']['recentchangeslinked'] )
+                       && $this->data['nav_urls']['recentchangeslinked']
+               ) {
                        $toolbox['recentchangeslinked'] = $this->data['nav_urls']['recentchangeslinked'];
                        $toolbox['recentchangeslinked']['msg'] = 'recentchangeslinked-toolbox';
                        $toolbox['recentchangeslinked']['id'] = 't-recentchangeslinked';
@@ -1576,7 +1602,9 @@ abstract class BaseTemplate extends QuickTemplate {
                                $toolbox['feeds']['links'][$key]['class'] = 'feedlink';
                        }
                }
-               foreach ( array( 'contributions', 'log', 'blockip', 'emailuser', 'userrights', '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";
@@ -1844,7 +1872,9 @@ abstract class BaseTemplate extends QuickTemplate {
                        }
                        while ( count( $wrapper ) > 0 ) {
                                $element = array_pop( $wrapper );
-                               $html = Html::rawElement( $element['tag'], isset( $element['attributes'] ) ? $element['attributes'] : null, $html );
+                               $html = Html::rawElement( $element['tag'], isset( $element['attributes'] )
+                                       ? $element['attributes']
+                                       : null, $html );
                        }
                }
 
@@ -1880,7 +1910,9 @@ abstract class BaseTemplate extends QuickTemplate {
                                        $attrs['class'] = $options['link-class'];
                                }
                        }
-                       $html = Html::rawElement( isset( $attrs['href'] ) ? 'a' : $options['link-fallback'], $attrs, $html );
+                       $html = Html::rawElement( isset( $attrs['href'] )
+                               ? 'a'
+                               : $options['link-fallback'], $attrs, $html );
                }
 
                return $html;
@@ -1916,10 +1948,11 @@ abstract class BaseTemplate extends QuickTemplate {
         */
        function makeListItem( $key, $item, $options = array() ) {
                if ( isset( $item['links'] ) ) {
-                       $html = '';
+                       $links = array();
                        foreach ( $item['links'] as $linkKey => $link ) {
-                               $html .= $this->makeLink( $linkKey, $link, $options );
+                               $links[] = $this->makeLink( $linkKey, $link, $options );
                        }
+                       $html = implode( ' ', $links );
                } else {
                        $link = $item;
                        // These keys are used by makeListItem and shouldn't be passed on to the link
index 6cd7828..c790bb7 100644 (file)
  * Could be replaced by curl_multi_exec() or some such.
  */
 class SquidPurgeClient {
-       var $host, $port, $ip;
+       /** @var string */
+       protected $host;
 
-       var $readState = 'idle';
-       var $writeBuffer = '';
-       var $requests = array();
-       var $currentRequestIndex;
+       /** @var int */
+       protected $port;
+
+       /** @var string|bool */
+       protected $ip;
+
+       /** @var string */
+       protected $readState = 'idle';
+
+       /** @var string */
+       protected $writeBuffer = '';
+
+       /** @var array */
+       protected $requests = array();
+
+       /** @var mixed */
+       protected $currentRequestIndex;
 
        const EINTR = 4;
        const EAGAIN = 11;
@@ -41,13 +55,16 @@ class SquidPurgeClient {
        const BUFFER_SIZE = 8192;
 
        /**
-        * The socket resource, or null for unconnected, or false for disabled due to error
+        * @var resource|null The socket resource, or null for unconnected, or false
+        *   for disabled due to error.
         */
-       var $socket;
+       protected $socket;
 
-       var $readBuffer;
+       /** @var string */
+       protected $readBuffer;
 
-       var $bodyRemaining;
+       /** @var int */
+       protected $bodyRemaining;
 
        /**
         * @param string $server
@@ -380,12 +397,11 @@ class SquidPurgeClient {
 }
 
 class SquidPurgeClientPool {
+       /** @var array of SquidPurgeClient */
+       protected $clients = array();
 
-       /**
-        * @var array of SquidPurgeClient
-        */
-       var $clients = array();
-       var $timeout = 5;
+       /** @var int */
+       protected $timeout = 5;
 
        /**
         * @param array $options
index a429c36..102fffd 100644 (file)
@@ -39,7 +39,8 @@ class StatCounter {
        /** @var array */
        protected $deltas = array(); // (key => count)
 
-       protected function __construct() {}
+       protected function __construct() {
+       }
 
        /**
         * @return StatCounter
index ef82705..2503150 100644 (file)
@@ -158,10 +158,14 @@ class StreamFile {
                # used for thumbnails (thumb.php)
                if ( $wgTrivialMimeDetection ) {
                        switch ( $ext ) {
-                               case 'gif': return 'image/gif';
-                               case 'png': return 'image/png';
-                               case 'jpg': return 'image/jpeg';
-                               case 'jpeg': return 'image/jpeg';
+                               case 'gif':
+                                       return 'image/gif';
+                               case 'png':
+                                       return 'image/png';
+                               case 'jpg':
+                                       return 'image/jpeg';
+                               case 'jpeg':
+                                       return 'image/jpeg';
                        }
 
                        return 'unknown/unknown';
index bb173e7..64df81b 100644 (file)
  * which refers to it should be kept to a minimum.
  */
 class StubObject {
-       var $mGlobal, $mClass, $mParams;
+       /** @var null|string */
+       protected $mGlobal;
+
+       /** @var null|string */
+       protected $mClass;
+
+       /** @var array */
+       protected $mParams;
 
        /**
         * Constructor.
@@ -142,9 +149,11 @@ class StubObject {
                        $caller = wfGetCaller( $level );
                        if ( ++$recursionLevel > 2 ) {
                                wfProfileOut( $fname );
-                               throw new MWException( "Unstub loop detected on call of \${$this->mGlobal}->$name from $caller\n" );
+                               throw new MWException( "Unstub loop detected on call of "
+                                       . "\${$this->mGlobal}->$name from $caller\n" );
                        }
-                       wfDebug( "Unstubbing \${$this->mGlobal} on call of \${$this->mGlobal}::$name from $caller\n" );
+                       wfDebug( "Unstubbing \${$this->mGlobal} on call of "
+                               . "\${$this->mGlobal}::$name from $caller\n" );
                        $GLOBALS[$this->mGlobal] = $this->_newObject();
                        --$recursionLevel;
                        wfProfileOut( $fname );
index 4345a73..b9c0c35 100644 (file)
@@ -3,4 +3,5 @@
 /**
  * @since 1.20
  */
-class TimestampException extends MWException {}
+class TimestampException extends MWException {
+}
index 70d2baa..67958ff 100644 (file)
@@ -56,38 +56,102 @@ class Title {
         */
        // @{
 
-       var $mTextform = '';              // /< Text form (spaces not underscores) of the main part
-       var $mUrlform = '';               // /< URL-encoded form of the main part
-       var $mDbkeyform = '';             // /< Main part with underscores
-       var $mUserCaseDBKey;              // /< DB key with the initial letter in the case specified by the user
-       var $mNamespace = NS_MAIN;        // /< Namespace index, i.e. one of the NS_xxxx constants
-       var $mInterwiki = '';             // /< Interwiki prefix
-       var $mFragment = '';              // /< Title fragment (i.e. the bit after the #)
-       var $mArticleID = -1;             // /< Article ID, fetched from the link cache on demand
-       var $mLatestID = false;           // /< ID of most recent revision
-       var $mContentModel = false;       // /< ID of the page's content model, i.e. one of the CONTENT_MODEL_XXX constants
-       private $mEstimateRevisions;      // /< Estimated number of revisions; null of not loaded
-       var $mRestrictions = array();     // /< Array of groups allowed to edit this article
-       var $mOldRestrictions = false;
-       var $mCascadeRestriction;         ///< Cascade restrictions on this page to included templates and images?
-       var $mCascadingRestrictions;      // Caching the results of getCascadeProtectionSources
-       var $mRestrictionsExpiry = array(); ///< When do the restrictions on this page expire?
-       var $mHasCascadingRestrictions;   ///< Are cascading restrictions in effect on this page?
-       var $mCascadeSources;             ///< Where are the cascading restrictions coming from on this page?
-       var $mRestrictionsLoaded = false; ///< Boolean for initialisation on demand
-       var $mPrefixedText = null;        ///< Text form including namespace/interwiki, initialised on demand
-       var $mTitleProtection;            ///< Cached value for getTitleProtection (create protection)
-       # Don't change the following default, NS_MAIN is hardcoded in several
-       # places.  See bug 696.
-       # Zero except in {{transclusion}} tags
-       var $mDefaultNamespace = NS_MAIN; // /< Namespace index when there is no namespace
-       var $mWatched = null;             // /< Is $wgUser watching this page? null if unfilled, accessed through userIsWatching()
-       var $mLength = -1;                // /< The page length, 0 for special pages
-       var $mRedirect = null;            // /< Is the article at this title a redirect?
-       var $mNotificationTimestamp = array(); // /< Associative array of user ID -> timestamp/false
-       var $mHasSubpage;                 // /< Whether a page has any subpages
-       private $mPageLanguage = false;   // /< The (string) language code of the page's language and content code.
-       private $mTitleValue = null;      // /< A corresponding TitleValue object
+       /** @var string Text form (spaces not underscores) of the main part */
+       public $mTextform = '';
+
+       /** @var string URL-encoded form of the main part */
+       public $mUrlform = '';
+
+       /** @var string Main part with underscores */
+       public $mDbkeyform = '';
+
+       /** @var string Database key with the initial letter in the case specified by the user */
+       protected $mUserCaseDBKey;
+
+       /** @var int Namespace index, i.e. one of the NS_xxxx constants */
+       public $mNamespace = NS_MAIN;
+
+       /** @var string Interwiki prefix */
+       public $mInterwiki = '';
+
+       /** @var string Title fragment (i.e. the bit after the #) */
+       public $mFragment = '';
+
+       /** @var int Article ID, fetched from the link cache on demand */
+       public $mArticleID = -1;
+
+       /** @var bool|int ID of most recent revision */
+       protected $mLatestID = false;
+
+       /**
+        * @var bool|string ID of the page's content model, i.e. one of the
+        *   CONTENT_MODEL_XXX constants
+        */
+       public $mContentModel = false;
+
+       /** @var int Estimated number of revisions; null of not loaded */
+       private $mEstimateRevisions;
+
+       /** @var array Array of groups allowed to edit this article */
+       public $mRestrictions = array();
+
+       /** @var bool  */
+       protected $mOldRestrictions = false;
+
+       /** @var bool Cascade restrictions on this page to included templates and images? */
+       public $mCascadeRestriction;
+
+       /** Caching the results of getCascadeProtectionSources */
+       public $mCascadingRestrictions;
+
+       /** @var array When do the restrictions on this page expire? */
+       protected $mRestrictionsExpiry = array();
+
+       /** @var bool Are cascading restrictions in effect on this page? */
+       protected $mHasCascadingRestrictions;
+
+       /** @var array Where are the cascading restrictions coming from on this page? */
+       public $mCascadeSources;
+
+       /** @var bool Boolean for initialisation on demand */
+       public $mRestrictionsLoaded = false;
+
+       /** @var string Text form including namespace/interwiki, initialised on demand */
+       protected $mPrefixedText = null;
+
+       /** @var mixed Cached value for getTitleProtection (create protection) */
+       public $mTitleProtection;
+
+       /**
+        * @var int Namespace index when there is no namespace. Don't change the
+        *   following default, NS_MAIN is hardcoded in several places. See bug 696.
+        *   Zero except in {{transclusion}} tags.
+        */
+       public $mDefaultNamespace = NS_MAIN;
+
+       /**
+        * @var bool Is $wgUser watching this page? null if unfilled, accessed
+        * through userIsWatching()
+        */
+       protected $mWatched = null;
+
+       /** @var int The page length, 0 for special pages */
+       protected $mLength = -1;
+
+       /** @var null Is the article at this title a redirect? */
+       public $mRedirect = null;
+
+       /** @var array Associative array of user ID -> timestamp/false */
+       private $mNotificationTimestamp = array();
+
+       /** @var bool Whether a page has any subpages */
+       private $mHasSubpages;
+
+       /** @var bool The (string) language code of the page's language and content code. */
+       private $mPageLanguage = false;
+
+       /** @var TitleValue A corresponding TitleValue object */
+       private $mTitleValue = null;
        // @}
 
        /**
@@ -115,7 +179,11 @@ class Title {
                }
 
                if ( !$titleCodec ) {
-                       $titleCodec = new MediaWikiTitleCodec( $wgContLang, GenderCache::singleton(), $wgLocalInterwikis );
+                       $titleCodec = new MediaWikiTitleCodec(
+                               $wgContLang,
+                               GenderCache::singleton(),
+                               $wgLocalInterwikis
+                       );
                        $titleCodecFingerprint = $fingerprint;
                }
 
@@ -136,10 +204,8 @@ class Title {
                return self::getTitleParser();
        }
 
-       /**
-        * Constructor
-        */
-       /*protected*/ function __construct() { }
+       function __construct() {
+       }
 
        /**
         * Create a new Title from a prefixed DB key
@@ -218,8 +284,7 @@ class Title {
                        }
                        return $t;
                } else {
-                       $ret = null;
-                       return $ret;
+                       return null;
                }
        }
 
@@ -267,8 +332,9 @@ class Title {
        }
 
        /**
-        * Returns a list of fields that are to be selected for initializing Title objects or LinkCache entries.
-        * Uses $wgContentHandlerUseDB to determine whether to include page_content_model.
+        * Returns a list of fields that are to be selected for initializing Title
+        * objects or LinkCache entries. Uses $wgContentHandlerUseDB to determine
+        * whether to include page_content_model.
         *
         * @return array
         */
@@ -1137,9 +1203,11 @@ class Title {
         * This is generally true for pages in the MediaWiki namespace having CONTENT_MODEL_CSS
         * or CONTENT_MODEL_JAVASCRIPT.
         *
-        * This method does *not* return true for per-user JS/CSS. Use isCssJsSubpage() for that!
+        * This method does *not* return true for per-user JS/CSS. Use isCssJsSubpage()
+        * for that!
         *
-        * Note that this method should not return true for pages that contain and show "inactive" CSS or JS.
+        * Note that this method should not return true for pages that contain and
+        * show "inactive" CSS or JS.
         *
         * @return bool
         */
@@ -1148,8 +1216,9 @@ class Title {
                        && ( $this->hasContentModel( CONTENT_MODEL_CSS )
                                || $this->hasContentModel( CONTENT_MODEL_JAVASCRIPT ) );
 
-               #NOTE: this hook is also called in ContentHandler::getDefaultModel. It's called here again to make sure
-               #      hook functions can force this method to return true even outside the mediawiki namespace.
+               # @note This hook is also called in ContentHandler::getDefaultModel.
+               #   It's called here again to make sure hook functions can force this
+               #   method to return true even outside the mediawiki namespace.
 
                wfRunHooks( 'TitleIsCssOrJsPage', array( $this, &$isCssOrJsPage ) );
 
@@ -1858,7 +1927,9 @@ class Title {
                        global $wgUser;
                        $user = $wgUser;
                }
-               return !count( $this->getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries, true ) );
+
+               return !count( $this->getUserPermissionsErrorsInternal(
+                       $action, $user, $doExpensiveQueries, true ) );
        }
 
        /**
@@ -1874,7 +1945,9 @@ class Title {
         *   whose corresponding errors may be ignored.
         * @return array Array of arguments to wfMessage to explain permissions problems.
         */
-       public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) {
+       public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true,
+               $ignoreErrors = array()
+       ) {
                $errors = $this->getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries );
 
                // Remove the errors being ignored.
@@ -1900,8 +1973,12 @@ class Title {
         *
         * @return array List of errors
         */
-       private function checkQuickPermissions( $action, $user, $errors, $doExpensiveQueries, $short ) {
-               if ( !wfRunHooks( 'TitleQuickPermissions', array( $this, $user, $action, &$errors, $doExpensiveQueries, $short ) ) ) {
+       private function checkQuickPermissions( $action, $user, $errors,
+               $doExpensiveQueries, $short
+       ) {
+               if ( !wfRunHooks( 'TitleQuickPermissions',
+                       array( $this, $user, $action, &$errors, $doExpensiveQueries, $short ) )
+               ) {
                        return $errors;
                }
 
@@ -1924,6 +2001,11 @@ class Title {
                                $errors[] = array( 'movenotallowedfile' );
                        }
 
+                       // Check if user is allowed to move category pages if it's a category page
+                       if ( $this->mNamespace == NS_CATEGORY && !$user->isAllowed( 'move-categorypages' ) ) {
+                               $errors[] = array( 'cant-move-category-page' );
+                       }
+
                        if ( !$user->isAllowed( 'move' ) ) {
                                // User can't move anything
                                $userCanMove = User::groupHasPermission( 'user', 'move' );
@@ -1943,6 +2025,10 @@ class Title {
                                        && $this->mNamespace == NS_USER && !$this->isSubpage() ) {
                                // Show user page-specific message only if the user can move other pages
                                $errors[] = array( 'cant-move-to-user-page' );
+                       } elseif ( !$user->isAllowed( 'move-categorypages' )
+                                       && $this->mNamespace == NS_CATEGORY ) {
+                               // Show category page-specific message only if the user can move other pages
+                               $errors[] = array( 'cant-move-to-category-page' );
                        }
                } elseif ( !$user->isAllowed( $action ) ) {
                        $errors[] = $this->missingPermissionError( $action, $short );
@@ -2020,7 +2106,9 @@ class Title {
         *
         * @return array List of errors
         */
-       private function checkSpecialsAndNSPermissions( $action, $user, $errors, $doExpensiveQueries, $short ) {
+       private function checkSpecialsAndNSPermissions( $action, $user, $errors,
+               $doExpensiveQueries, $short
+       ) {
                # Only 'createaccount' can be performed on special pages,
                # which don't actually exist in the DB.
                if ( NS_SPECIAL == $this->mNamespace && $action !== 'createaccount' ) {
@@ -2119,7 +2207,9 @@ class Title {
         *
         * @return array List of errors
         */
-       private function checkCascadingSourcesRestrictions( $action, $user, $errors, $doExpensiveQueries, $short ) {
+       private function checkCascadingSourcesRestrictions( $action, $user, $errors,
+               $doExpensiveQueries, $short
+       ) {
                if ( $doExpensiveQueries && !$this->isCssJsSubpage() ) {
                        # We /could/ use the protection level on the source page, but it's
                        # fairly ugly as we have to establish a precedence hierarchy for pages
@@ -2166,11 +2256,15 @@ class Title {
         *
         * @return array List of errors
         */
-       private function checkActionPermissions( $action, $user, $errors, $doExpensiveQueries, $short ) {
+       private function checkActionPermissions( $action, $user, $errors,
+               $doExpensiveQueries, $short
+       ) {
                global $wgDeleteRevisionsLimit, $wgLang;
 
                if ( $action == 'protect' ) {
-                       if ( count( $this->getUserPermissionsErrorsInternal( 'edit', $user, $doExpensiveQueries, true ) ) ) {
+                       if ( count( $this->getUserPermissionsErrorsInternal( 'edit',
+                               $user, $doExpensiveQueries, true ) )
+                       ) {
                                // If they can't edit, they shouldn't protect.
                                $errors[] = array( 'protect-cantedit' );
                        }
@@ -2186,7 +2280,11 @@ class Title {
                                if ( $title_protection['pt_create_perm'] == ''
                                        || !$user->isAllowed( $title_protection['pt_create_perm'] )
                                ) {
-                                       $errors[] = array( 'titleprotected', User::whoIs( $title_protection['pt_user'] ), $title_protection['pt_reason'] );
+                                       $errors[] = array(
+                                               'titleprotected',
+                                               User::whoIs( $title_protection['pt_user'] ),
+                                               $title_protection['pt_reason']
+                                       );
                                }
                        }
                } elseif ( $action == 'move' ) {
@@ -2367,7 +2465,9 @@ class Title {
         * @param bool $short Set this to true to stop after the first permission error.
         * @return array Array of arrays of the arguments to wfMessage to explain permissions problems.
         */
-       protected function getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries = true, $short = false ) {
+       protected function getUserPermissionsErrorsInternal( $action, $user,
+               $doExpensiveQueries = true, $short = false
+       ) {
                wfProfileIn( __METHOD__ );
 
                # Read has special handling
@@ -3372,7 +3472,15 @@ class Title {
                $namespaceFiled = "{$prefix}_namespace";
                $titleField = "{$prefix}_title";
 
-               $fields = array( $namespaceFiled, $titleField, 'page_id', 'page_len', 'page_is_redirect', 'page_latest' );
+               $fields = array(
+                       $namespaceFiled,
+                       $titleField,
+                       'page_id',
+                       'page_len',
+                       'page_is_redirect',
+                       'page_latest'
+               );
+
                if ( $wgContentHandlerUseDB ) {
                        $fields[] = 'page_content_model';
                }
@@ -3383,7 +3491,10 @@ class Title {
                        array( "{$prefix}_from" => $id ),
                        __METHOD__,
                        $options,
-                       array( 'page' => array( 'LEFT JOIN', array( "page_namespace=$namespaceFiled", "page_title=$titleField" ) ) )
+                       array( 'page' => array(
+                               'LEFT JOIN',
+                               array( "page_namespace=$namespaceFiled", "page_title=$titleField" )
+                       ) )
                );
 
                $retVal = array();
@@ -3419,9 +3530,11 @@ class Title {
        }
 
        /**
-        * Get an array of Title objects referring to non-existent articles linked from this page
+        * Get an array of Title objects referring to non-existent articles linked
+        * from this page.
         *
-        * @todo check if needed (used only in SpecialBrokenRedirects.php, and should use redirect table in this case)
+        * @todo check if needed (used only in SpecialBrokenRedirects.php, and
+        *   should use redirect table in this case).
         * @return Title[] Array of Title the Title objects
         */
        public function getBrokenLinksFrom() {
@@ -3758,7 +3871,13 @@ class Title {
                                $comment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() . $reason;
                        }
                        // @todo FIXME: $params?
-                       $logId = $log->addEntry( 'move_prot', $nt, $comment, array( $this->getPrefixedText() ), $wgUser );
+                       $logId = $log->addEntry(
+                               'move_prot',
+                               $nt,
+                               $comment,
+                               array( $this->getPrefixedText() ),
+                               $wgUser
+                       );
 
                        // reread inserted pr_ids for log relation
                        $insertedPrIds = $dbw->select(
@@ -3812,9 +3931,17 @@ class Title {
                }
 
                if ( $createRedirect ) {
-                       $contentHandler = ContentHandler::getForTitle( $this );
-                       $redirectContent = $contentHandler->makeRedirectContent( $nt,
-                               wfMessage( 'move-redirect-text' )->inContentLanguage()->plain() );
+                       if ( $this->getNamespace() == NS_CATEGORY
+                               && !wfMessage( 'category-move-redirect-override' )->isDisabled()
+                       ) {
+                               $redirectContent = new WikitextContent(
+                                       wfMessage( 'category-move-redirect-override' )
+                                               ->params( $nt->getPrefixedText() )->inContentLanguage()->plain() );
+                       } else {
+                               $contentHandler = ContentHandler::getForTitle( $this );
+                               $redirectContent = $contentHandler->makeRedirectContent( $nt,
+                                       wfMessage( 'move-redirect-text' )->inContentLanguage()->plain() );
+                       }
 
                        // NOTE: If this page's content model does not support redirects, $redirectContent will be null.
                } else {
@@ -4025,7 +4152,10 @@ class Title {
                $this->mArticleID = $row ? intval( $row->page_id ) : 0;
                $this->mRedirect = $row ? (bool)$row->page_is_redirect : false;
                $this->mLatestID = $row ? intval( $row->page_latest ) : false;
-               $this->mContentModel = $row && isset( $row->page_content_model ) ? strval( $row->page_content_model ) : false;
+               $this->mContentModel = $row && isset( $row->page_content_model )
+                       ? strval( $row->page_content_model )
+                       : false;
+
                if ( !$this->mRedirect ) {
                        return false;
                }
@@ -4554,7 +4684,9 @@ class Title {
                        // Use always content language to avoid loading hundreds of languages
                        // to get the link color.
                        global $wgContLang;
-                       list( $name, ) = 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();
                }
@@ -4574,7 +4706,9 @@ class Title {
                        return false;
                }
 
-               list( $name, $lang ) = MessageCache::singleton()->figureMessage( $wgContLang->lcfirst( $this->getText() ) );
+               list( $name, $lang ) = MessageCache::singleton()->figureMessage(
+                       $wgContLang->lcfirst( $this->getText() )
+               );
                $message = wfMessage( $name )->inLanguage( $lang )->useDatabase( false );
 
                if ( $message->exists() ) {
@@ -4837,9 +4971,12 @@ class Title {
                }
 
                if ( !$this->mPageLanguage || $this->mPageLanguage[1] !== $wgLanguageCode ) {
-                       // Note that this may depend on user settings, so the cache should be only per-request.
-                       // NOTE: ContentHandler::getPageLanguage() may need to load the content to determine the page language!
-                       // Checking $wgLanguageCode hasn't changed for the benefit of unit tests.
+                       // Note that this may depend on user settings, so the cache should
+                       // be only per-request.
+                       // NOTE: ContentHandler::getPageLanguage() may need to load the
+                       // content to determine the page language!
+                       // Checking $wgLanguageCode hasn't changed for the benefit of unit
+                       // tests.
                        $contentHandler = ContentHandler::getForTitle( $this );
                        $langObj = wfGetLangObj( $contentHandler->getPageLanguage( $this ) );
                        $this->mPageLanguage = array( $langObj->getCode(), $wgLanguageCode );
@@ -4872,8 +5009,9 @@ class Title {
                        return $wgLang;
                }
 
-               //NOTE: can't be cached persistently, depends on user settings
-               //NOTE: ContentHandler::getPageViewLanguage() may need to load the content to determine the page language!
+               // @note Can't be cached persistently, depends on user settings.
+               // @note ContentHandler::getPageViewLanguage() may need to load the
+               //   content to determine the page language!
                $contentHandler = ContentHandler::getForTitle( $this );
                $pageLang = $contentHandler->getPageViewLanguage( $this );
                return $pageLang;
index 4fcb2eb..668ea54 100644 (file)
  */
 
 class TitleArrayFromResult extends TitleArray implements Countable {
+       /** @var ResultWrapper */
+       public $res;
 
-       /**
-        * @var ResultWrapper
-        */
-       var $res;
-       var $key, $current;
+       public $key;
+
+       public $current;
 
        function __construct( $res ) {
                $this->res = $res;
index f5768af..8198282 100644 (file)
@@ -76,7 +76,7 @@ class User {
         * corresponding database fields must call a cache-clearing function.
         * @showinitializer
         */
-       static $mCacheVars = array(
+       protected static $mCacheVars = array(
                // user table
                'mId',
                'mName',
@@ -105,7 +105,7 @@ class User {
         * "right-$right".
         * @showinitializer
         */
-       static $mCoreRights = array(
+       protected static $mCoreRights = array(
                'apihighlimits',
                'autoconfirmed',
                'autopatrol',
@@ -143,6 +143,7 @@ class User {
                'minoredit',
                'move',
                'movefile',
+               'move-categorypages',
                'move-rootuserpages',
                'move-subpages',
                'nominornewtalk',
@@ -175,17 +176,45 @@ class User {
                'viewmywatchlist',
                'writeapi',
        );
+
        /**
         * String Cached results of getAllRights()
         */
-       static $mAllRights = false;
+       protected static $mAllRights = false;
 
        /** @name Cache variables */
        //@{
-       var $mId, $mName, $mRealName, $mPassword, $mNewpassword, $mNewpassTime,
-               $mEmail, $mTouched, $mToken, $mEmailAuthenticated,
-               $mEmailToken, $mEmailTokenExpires, $mRegistration, $mEditCount,
-               $mGroups, $mOptionOverrides;
+       public $mId;
+
+       public $mName;
+
+       public $mRealName;
+
+       public $mPassword;
+
+       public $mNewpassword;
+
+       public $mNewpassTime;
+
+       public $mEmail;
+
+       public $mTouched;
+
+       protected $mToken;
+
+       public $mEmailAuthenticated;
+
+       protected $mEmailToken;
+
+       protected $mEmailTokenExpires;
+
+       protected $mRegistration;
+
+       protected $mEditCount;
+
+       public $mGroups;
+
+       protected $mOptionOverrides;
 
        protected $mPasswordExpires;
        //@}
@@ -194,12 +223,12 @@ class User {
         * Bool Whether the cache variables have been loaded.
         */
        //@{
-       var $mOptionsLoaded;
+       public $mOptionsLoaded;
 
        /**
         * Array with already loaded items or true if all items have been loaded.
         */
-       private $mLoadedItems = array();
+       protected $mLoadedItems = array();
        //@}
 
        /**
@@ -211,41 +240,55 @@ class User {
         *
         * Use the User::newFrom*() family of functions to set this.
         */
-       var $mFrom;
+       public $mFrom;
 
        /**
         * Lazy-initialized variables, invalidated with clearInstanceCache
         */
-       var $mNewtalk, $mDatePreference, $mBlockedby, $mHash, $mRights,
-               $mBlockreason, $mEffectiveGroups, $mImplicitGroups, $mFormerGroups, $mBlockedGlobally,
-               $mLocked, $mHideName, $mOptions;
+       protected $mNewtalk;
+
+       protected $mDatePreference;
+
+       public $mBlockedby;
+
+       protected $mHash;
+
+       public $mRights;
+
+       protected $mBlockreason;
+
+       protected $mEffectiveGroups;
+
+       protected $mImplicitGroups;
+
+       protected $mFormerGroups;
+
+       protected $mBlockedGlobally;
+
+       protected $mLocked;
+
+       public $mHideName;
+
+       public $mOptions;
 
        /**
         * @var WebRequest
         */
        private $mRequest;
 
-       /**
-        * @var Block
-        */
-       var $mBlock;
+       /** @var Block */
+       public $mBlock;
 
-       /**
-        * @var bool
-        */
-       var $mAllowUsertalk;
+       /** @var bool */
+       protected $mAllowUsertalk;
 
-       /**
-        * @var Block
-        */
+       /** @var Block */
        private $mBlockedFromCreateAccount = false;
 
-       /**
-        * @var array
-        */
+       /** @var array */
        private $mWatchedItems = array();
 
-       static $idCacheByName = array();
+       public static $idCacheByName = array();
 
        /**
         * Lightweight constructor for an anonymous user.
@@ -516,7 +559,12 @@ class User {
                }
 
                $dbr = wfGetDB( DB_SLAVE );
-               $s = $dbr->selectRow( 'user', array( 'user_id' ), array( 'user_name' => $nt->getText() ), __METHOD__ );
+               $s = $dbr->selectRow(
+                       'user',
+                       array( 'user_id' ),
+                       array( 'user_name' => $nt->getText() ),
+                       __METHOD__
+               );
 
                if ( $s === false ) {
                        $result = null;
@@ -557,7 +605,8 @@ class User {
         * @return bool
         */
        public static function isIP( $name ) {
-               return preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.(?:xxx|\d{1,3})$/', $name ) || IP::isIPv6( $name );
+               return preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.(?:xxx|\d{1,3})$/', $name )
+                       || IP::isIPv6( $name );
        }
 
        /**
@@ -755,7 +804,9 @@ class User {
                        } elseif ( $wgContLang->lc( $password ) == $wgContLang->lc( $this->mName ) ) {
                                $status->error( 'password-name-match' );
                                return $status;
-                       } elseif ( isset( $blockedLogins[$this->getName()] ) && $password == $blockedLogins[$this->getName()] ) {
+                       } elseif ( isset( $blockedLogins[$this->getName()] )
+                               && $password == $blockedLogins[$this->getName()]
+                       ) {
                                $status->error( 'password-login-forbidden' );
                                return $status;
                        } else {
@@ -954,7 +1005,8 @@ class User {
         */
        public static function randomPassword() {
                global $wgMinimalPasswordLength;
-               // Decide the final password length based on our min password length, stopping at a minimum of 10 chars
+               // Decide the final password length based on our min password length,
+               // stopping at a minimum of 10 chars.
                $length = max( 10, $wgMinimalPasswordLength );
                // Multiply by 1.25 to get the number of hex characters we need
                $length = $length * 1.25;
@@ -1085,14 +1137,16 @@ class User {
                }
 
                if ( $request->getSessionData( 'wsToken' ) ) {
-                       $passwordCorrect = ( $proposedUser->getToken( false ) === $request->getSessionData( 'wsToken' ) );
+                       $passwordCorrect =
+                               ( $proposedUser->getToken( false ) === $request->getSessionData( 'wsToken' ) );
                        $from = 'session';
                } elseif ( $request->getCookie( 'Token' ) ) {
                        # Get the token from DB/cache and clean it up to remove garbage padding.
                        # This deals with historical problems with bugs and the default column value.
                        $token = rtrim( $proposedUser->getToken( false ) ); // correct token
                        // Make comparison in constant time (bug 61346)
-                       $passwordCorrect = strlen( $token ) && $this->compareSecrets( $token, $request->getCookie( 'Token' ) );
+                       $passwordCorrect = strlen( $token )
+                               && $this->compareSecrets( $token, $request->getCookie( 'Token' ) );
                        $from = 'cookie';
                } else {
                        // No session or persistent login cookie
@@ -1122,11 +1176,13 @@ class User {
                        $passwordCorrect = false;
                } else {
                        $result = 0;
-                       for ( $i = 0; $i < strlen( $answer ); $i++ ) {
+                       $answerLength = strlen( $answer );
+                       for ( $i = 0; $i < $answerLength; $i++ ) {
                                $result |= ord( $answer[$i] ) ^ ord( $test[$i] );
                        }
                        $passwordCorrect = ( $result == 0 );
                }
+
                return $passwordCorrect;
        }
 
@@ -1147,7 +1203,12 @@ class User {
                }
 
                $dbr = wfGetDB( DB_MASTER );
-               $s = $dbr->selectRow( 'user', self::selectFields(), array( 'user_id' => $this->mId ), __METHOD__ );
+               $s = $dbr->selectRow(
+                       'user',
+                       self::selectFields(),
+                       array( 'user_id' => $this->mId ),
+                       __METHOD__
+               );
 
                wfRunHooks( 'UserLoadFromDatabase', array( $this, &$s ) );
 
@@ -1721,10 +1782,11 @@ class User {
        /**
         * Check if user is blocked
         *
-        * @param bool $bFromSlave Whether to check the slave database instead of the master
+        * @param bool $bFromSlave Whether to check the slave database instead of
+        *   the master. Hacked from false due to horrible probs on site.
         * @return bool True if blocked, false otherwise
         */
-       public function isBlocked( $bFromSlave = true ) { // hacked from false due to horrible probs on site
+       public function isBlocked( $bFromSlave = true ) {
                return $this->getBlock( $bFromSlave ) instanceof Block && $this->getBlock()->prevents( 'edit' );
        }
 
@@ -2081,7 +2143,8 @@ class User {
        /**
         * Update the 'You have new messages!' status.
         * @param bool $val Whether the user has new messages
-        * @param Revision $curRev New, as yet unseen revision of the user talk page. Ignored if null or !$val.
+        * @param Revision $curRev New, as yet unseen revision of the user talk
+        *   page. Ignored if null or !$val.
         */
        public function setNewtalk( $val, $curRev = null ) {
                if ( wfReadOnly() ) {
@@ -2265,7 +2328,8 @@ class User {
 
        /**
         * Get the user's current token.
-        * @param bool $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 ) {
@@ -2602,7 +2666,8 @@ class User {
         *
         * @see User::listOptionKinds
         * @param IContextSource $context
-        * @param array $options 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 ) {
@@ -3477,17 +3542,20 @@ class User {
         * Add a user to the database, return the user object
         *
         * @param string $name Username to add
-        * @param array $params Array 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
-        *   - email_authenticated  The email authentication timestamp
-        *   - real_name            The user's real name
-        *   - options              An associative array of non-default options
-        *   - token                Random authentication token. Do not set.
-        *   - registration         Registration timestamp. Do not set.
-        *
-        * @return User|null User object, or null if the username already exists
+        * @param array $params Array 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.
+        *   - email_authenticated: The email authentication timestamp.
+        *   - real_name: The user's real name.
+        *   - options: An associative array of non-default options.
+        *   - token: Random authentication token. Do not set.
+        *   - registration: Registration timestamp. Do not set.
+        *
+        * @return User|null User object, or null if the username already exists.
         */
        public static function createNew( $name, $params = array() ) {
                $user = new User;
@@ -3658,7 +3726,8 @@ class User {
                if ( $this->mBlockedFromCreateAccount === false && !$this->isAllowed( 'ipblock-exempt' ) ) {
                        $this->mBlockedFromCreateAccount = Block::newFromTarget( null, $this->getRequest()->getIP() );
                }
-               return $this->mBlockedFromCreateAccount instanceof Block && $this->mBlockedFromCreateAccount->prevents( 'createaccount' )
+               return $this->mBlockedFromCreateAccount instanceof Block
+                       && $this->mBlockedFromCreateAccount->prevents( 'createaccount' )
                        ? $this->mBlockedFromCreateAccount
                        : false;
        }
@@ -3817,7 +3886,8 @@ class User {
         * Generate a looking random token for various uses.
         *
         * @return string The new random token
-        * @deprecated since 1.20: Use MWCryptRand for secure purposes or wfRandomString for pseudo-randomness
+        * @deprecated since 1.20: Use MWCryptRand for secure purposes or
+        *   wfRandomString for pseudo-randomness.
         */
        public static function generateToken() {
                return MWCryptRand::generateHex( 32 );
@@ -3839,6 +3909,7 @@ class User {
                if ( $val != $sessionToken ) {
                        wfDebug( "User::matchEditToken: broken session data\n" );
                }
+
                return $val == $sessionToken;
        }
 
@@ -3897,7 +3968,8 @@ class User {
         *
         * @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 $from Optional From address; if unspecified, default
+        *   $wgPasswordSender will be used.
         * @param string $replyto Reply-To address
         * @return Status
         */
@@ -4283,8 +4355,11 @@ class User {
         */
        public static function getImplicitGroups() {
                global $wgImplicitGroups;
+
                $groups = $wgImplicitGroups;
-               wfRunHooks( 'UserGetImplicitGroups', array( &$groups ) );       #deprecated, use $wgImplictGroups instead
+               # Deprecated, use $wgImplictGroups instead
+               wfRunHooks( 'UserGetImplicitGroups', array( &$groups ) );
+
                return $groups;
        }
 
@@ -4358,7 +4433,13 @@ class User {
        public static function changeableByGroup( $group ) {
                global $wgAddGroups, $wgRemoveGroups, $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf;
 
-               $groups = array( 'add' => array(), 'remove' => array(), 'add-self' => array(), 'remove-self' => array() );
+               $groups = array(
+                       'add' => array(),
+                       'remove' => array(),
+                       'add-self' => array(),
+                       'remove-self' => array()
+               );
+
                if ( empty( $wgAddGroups[$group] ) ) {
                        // Don't add anything to $groups
                } elseif ( $wgAddGroups[$group] === true ) {
index 0012b44..dd67acd 100644 (file)
  */
 
 class UserArrayFromResult extends UserArray implements Countable {
+       /** @var ResultWrapper */
+       public $res;
 
-       /**
-        * @var ResultWrapper
-        */
-       var $res;
-       var $key, $current;
+       /** @var int */
+       public $key;
+
+       /** @var  */
+       public $current;
 
        /**
         * @param ResultWrapper $res
index 1ec2792..d3e8cb8 100644 (file)
@@ -58,7 +58,7 @@ class MailAddress {
                if ( $this->address ) {
                        if ( $this->name != '' && !wfIsWindows() ) {
                                global $wgEnotifUseRealName;
-                               $name = ( $wgEnotifUseRealName && $this->realName ) ? $this->realName : $this->name;
+                               $name = ( $wgEnotifUseRealName && $this->realName !== '' ) ? $this->realName : $this->name;
                                $quoted = UserMailer::quotedPrintable( $name );
                                if ( strpos( $quoted, '.' ) !== false || strpos( $quoted, ',' ) !== false ) {
                                        $quoted = '"' . $quoted . '"';
@@ -81,7 +81,7 @@ class MailAddress {
  * Collection of static functions for sending mail
  */
 class UserMailer {
-       static $mErrorString;
+       private static $mErrorString;
 
        /**
         * Send mail using a PEAR mailer
@@ -160,7 +160,9 @@ class UserMailer {
         * @throws MWException
         * @return Status
         */
-       public static function send( $to, $from, $subject, $body, $replyto = null, $contentType = 'text/plain; charset=UTF-8' ) {
+       public static function send( $to, $from, $subject, $body, $replyto = null,
+               $contentType = 'text/plain; charset=UTF-8'
+       ) {
                global $wgSMTP, $wgEnotifMaxRecips, $wgAdditionalMailParams, $wgAllowHTMLEmail;
                $mime = null;
                if ( !is_array( $to ) ) {
@@ -268,7 +270,11 @@ class UserMailer {
                                        $body['text'] = str_replace( "\n", "\r\n", $body['text'] );
                                        $body['html'] = str_replace( "\n", "\r\n", $body['html'] );
                                }
-                               $mime = new Mail_mime( array( 'eol' => $endl, 'text_charset' => 'UTF-8', 'html_charset' => 'UTF-8' ) );
+                               $mime = new Mail_mime( array(
+                                       'eol' => $endl,
+                                       'text_charset' => 'UTF-8',
+                                       'html_charset' => 'UTF-8'
+                               ) );
                                $mime->setTXTBody( $body['text'] );
                                $mime->setHTMLBody( $body['html'] );
                                $body = $mime->get(); // must call get() before headers()
@@ -360,7 +366,13 @@ class UserMailer {
                                        if ( $safeMode ) {
                                                $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers );
                                        } else {
-                                               $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams );
+                                               $sent = mail(
+                                                       $recip,
+                                                       self::quotedPrintable( $subject ),
+                                                       $body,
+                                                       $headers,
+                                                       $wgAdditionalMailParams
+                                               );
                                        }
                                }
                        } catch ( Exception $e ) {
@@ -501,7 +513,9 @@ class EmailNotification {
         * @param bool $oldid (default: false)
         * @param string $pageStatus (default: 'changed')
         */
-       public function notifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid = false, $pageStatus = 'changed' ) {
+       public function notifyOnPageChange( $editor, $title, $timestamp, $summary,
+               $minorEdit, $oldid = false, $pageStatus = 'changed'
+       ) {
                global $wgEnotifUseJobQ, $wgEnotifWatchlist, $wgShowUpdatedMarker, $wgEnotifMinorEdits,
                        $wgUsersNotifiedOnAllChanges, $wgEnotifUserTalk;
 
@@ -555,7 +569,10 @@ class EmailNotification {
                        // Only send notification for non minor edits, unless $wgEnotifMinorEdits
                        if ( !$minorEdit || ( $wgEnotifMinorEdits && !$editor->isAllowed( 'nominornewtalk' ) ) ) {
                                $isUserTalkPage = ( $title->getNamespace() == NS_USER_TALK );
-                               if ( $wgEnotifUserTalk && $isUserTalkPage && $this->canSendUserTalkEmail( $editor, $title, $minorEdit ) ) {
+                               if ( $wgEnotifUserTalk
+                                       && $isUserTalkPage
+                                       && $this->canSendUserTalkEmail( $editor, $title, $minorEdit )
+                               ) {
                                        $sendEmail = true;
                                }
                        }
@@ -564,6 +581,7 @@ class EmailNotification {
                if ( !$sendEmail ) {
                        return;
                }
+
                if ( $wgEnotifUseJobQ ) {
                        $params = array(
                                'editor' => $editor->getName(),
@@ -578,7 +596,16 @@ class EmailNotification {
                        $job = new EnotifNotifyJob( $title, $params );
                        JobQueueGroup::singleton()->push( $job );
                } else {
-                       $this->actuallyNotifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers, $pageStatus );
+                       $this->actuallyNotifyOnPageChange(
+                               $editor,
+                               $title,
+                               $timestamp,
+                               $summary,
+                               $minorEdit,
+                               $oldid,
+                               $watchers,
+                               $pageStatus
+                       );
                }
        }
 
@@ -632,8 +659,10 @@ class EmailNotification {
                $userTalkId = false;
 
                if ( !$minorEdit || ( $wgEnotifMinorEdits && !$editor->isAllowed( 'nominornewtalk' ) ) ) {
-
-                       if ( $wgEnotifUserTalk && $isUserTalkPage && $this->canSendUserTalkEmail( $editor, $title, $minorEdit ) ) {
+                       if ( $wgEnotifUserTalk
+                               && $isUserTalkPage
+                               && $this->canSendUserTalkEmail( $editor, $title, $minorEdit )
+                       ) {
                                $targetUser = User::newFromName( $title->getText() );
                                $this->compose( $targetUser );
                                $userTalkId = $targetUser->getId();
@@ -761,13 +790,16 @@ class EmailNotification {
                        $keys['$PAGEEDITOR_EMAIL'] = wfMessage( 'noemailtitle' )->inContentLanguage()->text();
 
                } else {
-                       $keys['$PAGEEDITOR'] = $wgEnotifUseRealName ? $this->editor->getRealName() : $this->editor->getName();
+                       $keys['$PAGEEDITOR'] = $wgEnotifUseRealName && $this->editor->getRealName() !== ''
+                               ? $this->editor->getRealName() : $this->editor->getName();
                        $emailPage = SpecialPage::getSafeTitleFor( 'Emailuser', $this->editor->getName() );
                        $keys['$PAGEEDITOR_EMAIL'] = $emailPage->getCanonicalURL();
                }
 
                $keys['$PAGEEDITOR_WIKI'] = $this->editor->getUserPage()->getCanonicalURL();
-               $keys['$HELPPAGE'] = wfExpandUrl( Skin::makeInternalOrExternalUrl( wfMessage( 'helppage' )->inContentLanguage()->text() ) );
+               $keys['$HELPPAGE'] = wfExpandUrl(
+                       Skin::makeInternalOrExternalUrl( wfMessage( 'helppage' )->inContentLanguage()->text() )
+               );
 
                # Replace this after transforming the message, bug 35019
                $postTransformKeys['$PAGESUMMARY'] = $this->summary == '' ? ' - ' : $this->summary;
@@ -857,8 +889,9 @@ class EmailNotification {
        function sendPersonalised( $watchingUser ) {
                global $wgContLang, $wgEnotifUseRealName;
                // From the PHP manual:
-               //     Note:  The to parameter cannot be an address in the form of "Something <someone@example.com>".
-               //     The mail command will not parse this properly while talking with the MTA.
+               //   Note: The to parameter cannot be an address in the form of
+               //   "Something <someone@example.com>". The mail command will not parse
+               //   this properly while talking with the MTA.
                $to = new MailAddress( $watchingUser );
 
                # $PAGEEDITDATE is the time and date of the page change
@@ -868,7 +901,8 @@ class EmailNotification {
                        array( '$WATCHINGUSERNAME',
                                '$PAGEEDITDATE',
                                '$PAGEEDITTIME' ),
-                       array( $wgEnotifUseRealName ? $watchingUser->getRealName() : $watchingUser->getName(),
+                       array( $wgEnotifUseRealName && $watchingUser->getRealName() !== ''
+                                       ? $watchingUser->getRealName() : $watchingUser->getName(),
                                $wgContLang->userDate( $this->timestamp, $watchingUser ),
                                $wgContLang->userTime( $this->timestamp, $watchingUser ) ),
                        $this->body );
index 9f2b498..f69fe63 100644 (file)
@@ -41,8 +41,23 @@ class WatchedItem {
         */
        const CHECK_USER_RIGHTS = 1;
 
-       var $mTitle, $mUser, $mCheckRights;
-       private $loaded = false, $watched, $timestamp;
+       /** @var Title */
+       public $mTitle;
+
+       /** @var User */
+       public $mUser;
+
+       /** @var int */
+       public $mCheckRights;
+
+       /** @var bool */
+       private $loaded = false;
+
+       /** @var bool */
+       private $watched;
+
+       /** @var string */
+       private $timestamp;
 
        /**
         * Create a WatchedItem object with the given user and title
@@ -53,7 +68,9 @@ class WatchedItem {
         *     Pass either WatchedItem::IGNORE_USER_RIGHTS or WatchedItem::CHECK_USER_RIGHTS.
         * @return WatchedItem
         */
-       public static function fromUserTitle( $user, $title, $checkRights = WatchedItem::CHECK_USER_RIGHTS ) {
+       public static function fromUserTitle( $user, $title,
+               $checkRights = WatchedItem::CHECK_USER_RIGHTS
+       ) {
                $wl = new WatchedItem;
                $wl->mUser = $user;
                $wl->mTitle = $title;
@@ -389,7 +406,13 @@ class WatchedItem {
                # Perform replace
                # Note that multi-row replace is very efficient for MySQL but may be inefficient for
                # some other DBMSes, mostly due to poor simulation by us
-               $dbw->replace( 'watchlist', array( array( 'wl_user', 'wl_namespace', 'wl_title' ) ), $values, __METHOD__ );
+               $dbw->replace(
+                       'watchlist',
+                       array( array( 'wl_user', 'wl_namespace', 'wl_title' ) ),
+                       $values,
+                       __METHOD__
+               );
+
                return true;
        }
 }
index 12cf0d9..ac8e159 100644 (file)
@@ -696,7 +696,9 @@ class WebRequest {
        public function getRequestURL() {
                if ( isset( $_SERVER['REQUEST_URI'] ) && strlen( $_SERVER['REQUEST_URI'] ) ) {
                        $base = $_SERVER['REQUEST_URI'];
-               } elseif ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] ) && strlen( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ) {
+               } elseif ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] )
+                       && strlen( $_SERVER['HTTP_X_ORIGINAL_URL'] )
+               ) {
                        // Probably IIS; doesn't set REQUEST_URI
                        $base = $_SERVER['HTTP_X_ORIGINAL_URL'];
                } elseif ( isset( $_SERVER['SCRIPT_NAME'] ) ) {
@@ -1010,9 +1012,9 @@ class WebRequest {
 We can't serve non-HTML content from the URL you have requested, because
 Internet Explorer would interpret it as an incorrect and potentially dangerous
 content type.</p>
-<p>Instead, please use <a href="$encUrl">this URL</a>, which is the same as the URL you have requested, except that
-"&amp;*" is appended. This prevents Internet Explorer from seeing a bogus file
-extension.
+<p>Instead, please use <a href="$encUrl">this URL</a>, which is the same as the
+URL you have requested, except that "&amp;*" is appended. This prevents Internet
+Explorer from seeing a bogus file extension.
 </p>
 </body>
 </html>
@@ -1023,14 +1025,16 @@ HTML;
 
        /**
         * Parse the Accept-Language header sent by the client into an array
-        * @return array array( languageCode => q-value ) sorted by q-value in descending order then
-        *                                                appearing time in the header in ascending order.
+        *
+        * @return array array( languageCode => q-value ) sorted by q-value in
+        *   descending order then appearing time in the header in ascending order.
         * May contain the "language" '*', which applies to languages other than those explicitly listed.
         * This is aligned with rfc2616 section 14.4
         * Preference for earlier languages appears in rfc3282 as an extension to HTTP/1.1.
         */
        public function getAcceptLang() {
-               // Modified version of code found at http://www.thefutureoftheweb.com/blog/use-accept-language-header
+               // Modified version of code found at
+               // http://www.thefutureoftheweb.com/blog/use-accept-language-header
                $acceptLang = $this->getHeader( 'Accept-Language' );
                if ( !$acceptLang ) {
                        return array();
@@ -1041,8 +1045,11 @@ HTML;
 
                // Break up string into pieces (languages and q factors)
                $lang_parse = null;
-               preg_match_all( '/([a-z]{1,8}(-[a-z]{1,8})*|\*)\s*(;\s*q\s*=\s*(1(\.0{0,3})?|0(\.[0-9]{0,3})?)?)?/',
-                       $acceptLang, $lang_parse );
+               preg_match_all(
+                       '/([a-z]{1,8}(-[a-z]{1,8})*|\*)\s*(;\s*q\s*=\s*(1(\.0{0,3})?|0(\.[0-9]{0,3})?)?)?/',
+                       $acceptLang,
+                       $lang_parse
+               );
 
                if ( !count( $lang_parse[1] ) ) {
                        return array();
@@ -1084,7 +1091,8 @@ HTML;
                }
 
                if ( is_array( $_SERVER['REMOTE_ADDR'] ) || strpos( $_SERVER['REMOTE_ADDR'], ',' ) !== false ) {
-                       throw new MWException( __METHOD__ . " : Could not determine the remote IP address due to multiple values." );
+                       throw new MWException( __METHOD__
+                               . " : Could not determine the remote IP address due to multiple values." );
                } else {
                        $ipchain = $_SERVER['REMOTE_ADDR'];
                }
@@ -1303,7 +1311,9 @@ class FauxRequest extends WebRequest {
         * @param string $protocol 'http' or 'https'
         * @throws MWException
         */
-       public function __construct( $data = array(), $wasPosted = false, $session = null, $protocol = 'http' ) {
+       public function __construct( $data = array(), $wasPosted = false,
+               $session = null, $protocol = 'http'
+       ) {
                if ( is_array( $data ) ) {
                        $this->data = $data;
                } else {
index 766b3bf..09f01c0 100644 (file)
 # This must be done before any globals are set by the code
 if ( ini_get( 'register_globals' ) ) {
        if ( isset( $_REQUEST['GLOBALS'] ) || isset( $_FILES['GLOBALS'] ) ) {
-               die( '<a href="http://www.hardened-php.net/globals-problem">$GLOBALS overwrite vulnerability</a>' );
+               die( '<a href="http://www.hardened-php.net/globals-problem">'
+                       . '$GLOBALS overwrite vulnerability</a>' );
        }
+
        $verboten = array(
                'GLOBALS',
                '_SERVER',
@@ -50,6 +52,7 @@ if ( ini_get( 'register_globals' ) ) {
                '_SESSION',
                'HTTP_SESSION_VARS'
        );
+
        foreach ( $_REQUEST as $name => $value ) {
                if ( in_array( $name, $verboten ) ) {
                        header( "HTTP/1.1 500 Internal Server Error" );
index aed1f65..eff251f 100644 (file)
@@ -26,9 +26,8 @@
  * @internal documentation reviewed 15 Mar 2010
  */
 class MediaWiki {
-
        /**
-        * TODO: fold $output, etc, into this
+        * @todo Fold $output, etc, into this
         * @var IContextSource
         */
        private $context;
@@ -117,7 +116,11 @@ class MediaWiki {
                }
 
                // Use the main page as default title if nothing else has been provided
-               if ( $ret === null && strval( $title ) === '' && !$request->getCheck( 'curid' ) && $action !== 'delete' ) {
+               if ( $ret === null
+                       && strval( $title ) === ''
+                       && !$request->getCheck( 'curid' )
+                       && $action !== 'delete'
+               ) {
                        $ret = Title::newMainPage();
                }
 
index 44f0599..34f15c3 100644 (file)
@@ -180,7 +180,8 @@ class WikiFilePage extends WikiPage {
                        $this->mFile->upgradeRow();
                        $this->mFile->purgeCache( array( 'forThumbRefresh' => true ) );
                } else {
-                       wfDebug( 'ImagePage::doPurge no image for ' . $this->mFile->getName() . "; limiting purge to cache only\n" );
+                       wfDebug( 'ImagePage::doPurge no image for '
+                               . $this->mFile->getName() . "; limiting purge to cache only\n" );
                        // even if the file supposedly doesn't exist, force any cached information
                        // to be updated (in case the cached information is wrong)
                        $this->mFile->purgeCache( array( 'forThumbRefresh' => true ) );
index d53acd0..9a26c15 100644 (file)
@@ -352,10 +352,11 @@ class WikiPage implements Page, IDBAccessObject {
         * some source.
         *
         * @param object|string|int $from One of the following:
-        *        - A DB query result object
-        *        - "fromdb" or WikiPage::READ_NORMAL to get from a slave DB
-        *        - "fromdbmaster" or WikiPage::READ_LATEST to get from the master DB
-        *        - "forupdate"  or WikiPage::READ_LOCKING to get from the master DB using SELECT FOR UPDATE
+        *   - A DB query result object.
+        *   - "fromdb" or WikiPage::READ_NORMAL to get from a slave DB.
+        *   - "fromdbmaster" or WikiPage::READ_LATEST to get from the master DB.
+        *   - "forupdate"  or WikiPage::READ_LOCKING to get from the master DB
+        *     using SELECT FOR UPDATE.
         *
         * @return void
         */
@@ -688,7 +689,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @return string|bool The text of the current revision
         * @deprecated since 1.21, getContent() should be used instead.
         */
-       public function getText( $audience = Revision::FOR_PUBLIC, User $user = null ) { // @todo deprecated, replace usage!
+       public function getText( $audience = Revision::FOR_PUBLIC, User $user = null ) {
                ContentHandler::deprecated( __METHOD__, '1.21' );
 
                $this->loadLastEdit();
@@ -1291,9 +1292,10 @@ class WikiPage implements Page, IDBAccessObject {
         * @param bool $lastRevIsRedirect If given, will optimize adding and
         *   removing rows in redirect table.
         * @return bool true on success, false on failure
-        * @private
         */
-       public function updateRevisionOn( $dbw, $revision, $lastRevision = null, $lastRevIsRedirect = null ) {
+       public function updateRevisionOn( $dbw, $revision, $lastRevision = null,
+               $lastRevIsRedirect = null
+       ) {
                global $wgContentHandlerUseDB;
 
                wfProfileIn( __METHOD__ );
@@ -1477,10 +1479,13 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @deprecated since 1.21, use replaceSectionContent() instead
         */
-       public function replaceSection( $section, $text, $sectionTitle = '', $edittime = null ) {
+       public function replaceSection( $section, $text, $sectionTitle = '',
+               $edittime = null
+       ) {
                ContentHandler::deprecated( __METHOD__, '1.21' );
 
-               if ( strval( $section ) == '' ) { //NOTE: keep condition in sync with condition in replaceSectionContent!
+               //NOTE: keep condition in sync with condition in replaceSectionContent!
+               if ( strval( $section ) == '' ) {
                        // Whole-page edit; let the whole text through
                        return $text;
                }
@@ -1504,8 +1509,10 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @return bool
         *
-        * @todo The skin should check this and not offer section functionality if sections are not supported.
-        * @todo The EditPage should check this and not offer section functionality if sections are not supported.
+        * @todo The skin should check this and not offer section functionality if
+        *   sections are not supported.
+        * @todo The EditPage should check this and not offer section functionality
+        *   if sections are not supported.
         */
        public function supportsSections() {
                return $this->getContentHandler()->supportsSections();
@@ -1606,10 +1613,11 @@ class WikiPage implements Page, IDBAccessObject {
         *      EDIT_AUTOSUMMARY
         *          Fill in blank summaries with generated text where possible
         *
-        * If neither EDIT_NEW nor EDIT_UPDATE is specified, the status of the article will be detected.
-        * If EDIT_UPDATE is specified and the article doesn't exist, the function will return an
-        * edit-gone-missing error. If EDIT_NEW is specified and the article does exist, an
-        * edit-already-exists error will be returned. These two conditions are also possible with
+        * If neither EDIT_NEW nor EDIT_UPDATE is specified, the status of the
+        * article will be detected. If EDIT_UPDATE is specified and the article
+        * doesn't exist, the function will return an edit-gone-missing error. If
+        * EDIT_NEW is specified and the article does exist, an edit-already-exists
+        * error will be returned. These two conditions are also possible with
         * auto-detection due to MediaWiki's performance-optimised locking strategy.
         *
         * @param bool|int $baseRevId The revision ID this edit was based off, if any
@@ -1617,19 +1625,21 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @throws MWException
         * @return Status object. Possible errors:
-        *     edit-hook-aborted:       The ArticleSave hook aborted the edit but didn't set the fatal flag of $status
-        *     edit-gone-missing:       In update mode, but the article didn't exist
-        *     edit-conflict:           In update mode, the article changed unexpectedly
-        *     edit-no-change:          Warning that the text was the same as before
-        *     edit-already-exists:     In creation mode, but the article already exists
+        *   edit-hook-aborted: The ArticleSave hook aborted the edit but didn't
+        *     set the fatal flag of $status
+        *   edit-gone-missing: In update mode, but the article didn't exist.
+        *   edit-conflict: In update mode, the article changed unexpectedly.
+        *   edit-no-change: Warning that the text was the same as before.
+        *   edit-already-exists: In creation mode, but the article already exists.
         *
-        *  Extensions may define additional errors.
+        * Extensions may define additional errors.
         *
-        *  $return->value will contain an associative array with members as follows:
-        *     new:                     Boolean indicating if the function attempted to create a new article
-        *     revision:                The revision object for the inserted revision, or null
+        * $return->value will contain an associative array with members as follows:
+        *     new: Boolean indicating if the function attempted to create a new article.
+        *     revision: The revision object for the inserted revision, or null.
         *
-        *  Compatibility note: this function previously returned a boolean value indicating success/failure
+        * Compatibility note: this function previously returned a boolean value
+        * indicating success/failure
         *
         * @deprecated since 1.21: use doEditContent() instead.
         */
@@ -1663,29 +1673,32 @@ class WikiPage implements Page, IDBAccessObject {
         *      EDIT_AUTOSUMMARY
         *          Fill in blank summaries with generated text where possible
         *
-        * If neither EDIT_NEW nor EDIT_UPDATE is specified, the status of the article will be detected.
-        * If EDIT_UPDATE is specified and the article doesn't exist, the function will return an
-        * edit-gone-missing error. If EDIT_NEW is specified and the article does exist, an
-        * edit-already-exists error will be returned. These two conditions are also possible with
+        * If neither EDIT_NEW nor EDIT_UPDATE is specified, the status of the
+        * article will be detected. If EDIT_UPDATE is specified and the article
+        * doesn't exist, the function will return an edit-gone-missing error. If
+        * EDIT_NEW is specified and the article does exist, an edit-already-exists
+        * error will be returned. These two conditions are also possible with
         * auto-detection due to MediaWiki's performance-optimised locking strategy.
         *
         * @param bool|int $baseRevId The revision ID this edit was based off, if any
         * @param User $user The user doing the edit
-        * @param string $serialisation_format Format for storing the content in the database
+        * @param string $serialisation_format Format for storing the content in the
+        *   database.
         *
         * @throws MWException
         * @return Status object. Possible errors:
-        *     edit-hook-aborted:       The ArticleSave hook aborted the edit but didn't set the fatal flag of $status
-        *     edit-gone-missing:       In update mode, but the article didn't exist
-        *     edit-conflict:           In update mode, the article changed unexpectedly
-        *     edit-no-change:          Warning that the text was the same as before
-        *     edit-already-exists:     In creation mode, but the article already exists
+        *     edit-hook-aborted: The ArticleSave hook aborted the edit but didn't
+        *       set the fatal flag of $status.
+        *     edit-gone-missing: In update mode, but the article didn't exist.
+        *     edit-conflict: In update mode, the article changed unexpectedly.
+        *     edit-no-change: Warning that the text was the same as before.
+        *     edit-already-exists: In creation mode, but the article already exists.
         *
         *  Extensions may define additional errors.
         *
         *  $return->value will contain an associative array with members as follows:
-        *     new:                     Boolean indicating if the function attempted to create a new article
-        *     revision:                The revision object for the inserted revision, or null
+        *     new: Boolean indicating if the function attempted to create a new article.
+        *     revision: The revision object for the inserted revision, or null.
         *
         * @since 1.21
         */
@@ -2020,7 +2033,8 @@ class WikiPage implements Page, IDBAccessObject {
                $options = $this->getContentHandler()->makeParserOptions( $context );
 
                if ( $this->getTitle()->isConversionTable() ) {
-                       // @todo ConversionTable should become a separate content model, so we don't need special cases like this one.
+                       // @todo ConversionTable should become a separate content model, so
+                       // we don't need special cases like this one.
                        $options->disableContentConversion();
                }
 
@@ -2087,7 +2101,9 @@ class WikiPage implements Page, IDBAccessObject {
 
                $edit->format = $serialization_format;
                $edit->popts = $this->makeParserOptions( 'canonical' );
-               $edit->output = $edit->pstContent ? $edit->pstContent->getParserOutput( $this->mTitle, $revid, $edit->popts ) : null;
+               $edit->output = $edit->pstContent
+                       ? $edit->pstContent->getParserOutput( $this->mTitle, $revid, $edit->popts )
+                       : null;
 
                $edit->newContent = $content;
                $edit->oldContent = $this->getContent( Revision::RAW );
@@ -2298,7 +2314,9 @@ class WikiPage implements Page, IDBAccessObject {
         * @param User $user The user updating the restrictions
         * @return Status
         */
-       public function doUpdateRestrictions( array $limit, array $expiry, &$cascade, $reason, User $user ) {
+       public function doUpdateRestrictions( array $limit, array $expiry,
+               &$cascade, $reason, User $user
+       ) {
                global $wgCascadingRestrictionLevels, $wgContLang;
 
                if ( wfReadOnly() ) {
@@ -2384,7 +2402,9 @@ class WikiPage implements Page, IDBAccessObject {
                        }
 
                        // Only certain restrictions can cascade...
-                       $editrestriction = isset( $limit['edit'] ) ? array( $limit['edit'] ) : $this->mTitle->getRestrictions( 'edit' );
+                       $editrestriction = isset( $limit['edit'] )
+                               ? array( $limit['edit'] )
+                               : $this->mTitle->getRestrictions( 'edit' );
                        foreach ( array_keys( $editrestriction, 'sysop' ) as $key ) {
                                $editrestriction[$key] = 'editprotected'; // backwards compatibility
                        }
@@ -2407,7 +2427,15 @@ class WikiPage implements Page, IDBAccessObject {
 
                        // insert null revision to identify the page protection change as edit summary
                        $latest = $this->getLatest();
-                       $nullRevision = $this->insertProtectNullRevision( $revCommentMsg, $limit, $expiry, $cascade, $reason, $user );
+                       $nullRevision = $this->insertProtectNullRevision(
+                               $revCommentMsg,
+                               $limit,
+                               $expiry,
+                               $cascade,
+                               $reason,
+                               $user
+                       );
+
                        if ( $nullRevision === null ) {
                                return Status::newFatal( 'no-null-revision', $this->mTitle->getPrefixedText() );
                        }
@@ -2509,7 +2537,9 @@ class WikiPage implements Page, IDBAccessObject {
         * @param User|null $user
         * @return Revision|null Null on error
         */
-       public function insertProtectNullRevision( $revCommentMsg, array $limit, array $expiry, $cascade, $reason, $user = null ) {
+       public function insertProtectNullRevision( $revCommentMsg, array $limit,
+               array $expiry, $cascade, $reason, $user = null
+       ) {
                global $wgContLang;
                $dbw = wfGetDB( DB_MASTER );
 
@@ -2526,7 +2556,8 @@ class WikiPage implements Page, IDBAccessObject {
                $protectDescription = $this->protectDescription( $limit, $expiry );
                if ( $protectDescription ) {
                        $editComment .= wfMessage( 'word-separator' )->inContentLanguage()->text();
-                       $editComment .= wfMessage( 'parentheses' )->params( $protectDescription )->inContentLanguage()->text();
+                       $editComment .= wfMessage( 'parentheses' )->params( $protectDescription )
+                               ->inContentLanguage()->text();
                }
                if ( $cascade ) {
                        $editComment .= wfMessage( 'word-separator' )->inContentLanguage()->text();
@@ -2825,8 +2856,9 @@ class WikiPage implements Page, IDBAccessObject {
         * Do some database updates after deletion
         *
         * @param int $id page_id value of the page being deleted
-        * @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.
+        * @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.
         */
        public function doDeleteUpdates( $id, Content $content = null ) {
                // update site status
@@ -2963,7 +2995,9 @@ class WikiPage implements Page, IDBAccessObject {
                if ( $s === false ) {
                        // No one else ever edited this page
                        return array( array( 'cantrollback' ) );
-               } elseif ( $s->rev_deleted & Revision::DELETED_TEXT || $s->rev_deleted & Revision::DELETED_USER ) {
+               } elseif ( $s->rev_deleted & Revision::DELETED_TEXT
+                       || $s->rev_deleted & Revision::DELETED_USER
+               ) {
                        // Only admins can see this text
                        return array( array( 'notvisiblerev' ) );
                }
@@ -3031,7 +3065,13 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                // Actually store the edit
-               $status = $this->doEditContent( $target->getContent(), $summary, $flags, $target->getId(), $guser );
+               $status = $this->doEditContent(
+                       $target->getContent(),
+                       $summary,
+                       $flags,
+                       $target->getId(),
+                       $guser
+               );
 
                if ( !$status->isOK() ) {
                        return $status->getErrorsArray();
@@ -3138,7 +3178,8 @@ class WikiPage implements Page, IDBAccessObject {
         * Purge caches on page update etc
         *
         * @param Title $title
-        * @todo Verify that $title is always a Title object (and never false or null), add Title hint to parameter $title
+        * @todo Verify that $title is always a Title object (and never false or
+        *   null), add Title hint to parameter $title.
         */
        public static function onArticleEdit( $title ) {
                // Invalidate caches of articles which include this page
@@ -3220,7 +3261,8 @@ class WikiPage implements Page, IDBAccessObject {
         * @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.
+               // NOTE: stub for backwards-compatibility. assumes the given text is
+               // wikitext. will break horribly if it isn't.
 
                ContentHandler::deprecated( __METHOD__, '1.21' );
 
@@ -3370,7 +3412,8 @@ class WikiPage implements Page, IDBAccessObject {
 
                if ( count( $links_diff ) > 0 ) {
                        // Whee, link updates time.
-                       // Note: we are only interested in links here. We don't need to get other DataUpdate items from the parser output.
+                       // Note: we are only interested in links here. We don't need to get
+                       // other DataUpdate items from the parser output.
                        $u = new LinksUpdate( $this->mTitle, $parserOutput, false );
                        $u->doUpdate();
                }
@@ -3457,10 +3500,12 @@ class WikiPage implements Page, IDBAccessObject {
        }
 
        /**
-        * Returns a list of updates to be performed when this page is deleted. The updates should remove any information
-        * about this page from secondary data stores such as links tables.
+        * Returns a list of updates to be performed when this page is deleted. The
+        * updates should remove any information about this page from secondary data
+        * stores such as links tables.
         *
-        * @param Content|null $content Optional Content object for determining the necessary updates
+        * @param Content|null $content Optional Content object for determining the
+        *   necessary updates.
         * @return array An array of DataUpdates objects
         */
        public function getDeletionUpdates( Content $content = null ) {
@@ -3483,57 +3528,42 @@ class WikiPage implements Page, IDBAccessObject {
 }
 
 class PoolWorkArticleView extends PoolCounterWork {
-
-       /**
-        * @var Page
-        */
+       /** @var Page */
        private $page;
 
-       /**
-        * @var string
-        */
+       /** @var string */
        private $cacheKey;
 
-       /**
-        * @var int
-        */
+       /** @var int */
        private $revid;
 
-       /**
-        * @var ParserOptions
-        */
+       /** @var ParserOptions */
        private $parserOptions;
 
-       /**
-        * @var Content|null
-        */
+       /** @var Content|null */
        private $content = null;
 
-       /**
-        * @var ParserOutput|bool
-        */
+       /** @var ParserOutput|bool */
        private $parserOutput = false;
 
-       /**
-        * @var bool
-        */
+       /** @var bool */
        private $isDirty = false;
 
-       /**
-        * @var Status|bool
-        */
+       /** @var Status|bool */
        private $error = false;
 
        /**
-        * Constructor
-        *
         * @param Page $page
-        * @param int $revid ID of the revision being parsed
-        * @param bool $useParserCache Whether to use the parser cache
-        * @param ParserOptions $parserOptions ParserOptions to use for the parse operation
-        * @param Content|string $content Content to parse or null to load it; may also be given as a wikitext string, for BC
-        */
-       public function __construct( Page $page, ParserOptions $parserOptions, $revid, $useParserCache, $content = null ) {
+        * @param int $revid ID of the revision being parsed.
+        * @param bool $useParserCache Whether to use the parser cache.
+        * @param ParserOptions $parserOptions ParserOptions to use for the parse
+        *   operation.
+        * @param Content|string $content Content to parse or null to load it; may
+        *   also be given as a wikitext string, for BC.
+        */
+       public function __construct( Page $page, ParserOptions $parserOptions,
+               $revid, $useParserCache, $content = null
+       ) {
                if ( is_string( $content ) ) { // BC: old style call
                        $modelId = $page->getRevision()->getContentModel();
                        $format = $page->getRevision()->getContentFormat();
@@ -3611,7 +3641,11 @@ class PoolWorkArticleView extends PoolCounterWork {
                $cacheTime = wfTimestampNow();
 
                $time = - microtime( true );
-               $this->parserOutput = $content->getParserOutput( $this->page->getTitle(), $this->revid, $this->parserOptions );
+               $this->parserOutput = $content->getParserOutput(
+                       $this->page->getTitle(),
+                       $this->revid,
+                       $this->parserOptions
+               );
                $time += microtime( true );
 
                // Timing hack
index 6510eae..6fb5380 100644 (file)
@@ -36,7 +36,9 @@ class Xml {
         * @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 ) {
+       public static function element( $element, $attribs = null, $contents = '',
+               $allowShortTag = true
+       ) {
                $out = '<' . $element;
                if ( !is_null( $attribs ) ) {
                        $out .= self::expandAttributes( $attribs );
@@ -142,7 +144,9 @@ class Xml {
         * @return string
         * @deprecated since 1.19
         */
-       public static function namespaceSelector( $selected = '', $all = null, $element_name = 'namespace', $label = null ) {
+       public static function namespaceSelector( $selected = '', $all = null,
+               $element_name = 'namespace', $label = null
+       ) {
                wfDeprecated( __METHOD__, '1.19' );
                return Html::namespaceSelector( array(
                        'selected' => $selected,
@@ -158,8 +162,9 @@ class Xml {
        /**
         * Create a date selector
         *
-        * @param string $selected The month which should be selected, default ''
-        * @param string $allmonths Value of a special item denoting all month. Null to not include (default)
+        * @param string $selected The month which should be selected, default ''.
+        * @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
         */
@@ -170,12 +175,20 @@ class Xml {
                        $selected = '';
                }
                if ( !is_null( $allmonths ) ) {
-                       $options[] = self::option( wfMessage( 'monthsall' )->text(), $allmonths, $selected === $allmonths );
+                       $options[] = self::option(
+                               wfMessage( 'monthsall' )->text(),
+                               $allmonths,
+                               $selected === $allmonths
+                       );
                }
                for ( $i = 1; $i < 13; $i++ ) {
                        $options[] = self::option( $wgLang->getMonthName( $i ), $i, $selected === $i );
                }
-               return self::openElement( 'select', array( 'id' => $id, 'name' => 'month', 'class' => 'mw-month-selector' ) )
+               return self::openElement( 'select', array(
+                       'id' => $id,
+                       'name' => 'month',
+                       'class' => 'mw-month-selector'
+               ) )
                        . implode( "\n", $options )
                        . self::closeElement( 'select' );
        }
@@ -222,7 +235,9 @@ class Xml {
         * @param Message|null $msg Label message key (since 1.20)
         * @return array containing 2 items: label HTML and select list HTML
         */
-       public static function languageSelector( $selected, $customisedOnly = true, $inLanguage = null, $overrideAttrs = array(), Message $msg = null ) {
+       public static function languageSelector( $selected, $customisedOnly = true,
+               $inLanguage = null, $overrideAttrs = array(), Message $msg = null
+       ) {
                global $wgLanguageCode;
 
                $include = $customisedOnly ? 'mwfile' : 'mw';
@@ -313,8 +328,11 @@ class Xml {
         * @param array $attribs Other attributes
         * @return string HTML
         */
-       public static function password( $name, $size = false, $value = false, $attribs = array() ) {
-               return self::input( $name, $size, $value, array_merge( $attribs, array( 'type' => 'password' ) ) );
+       public static function password( $name, $size = false, $value = false,
+               $attribs = array()
+       ) {
+               return self::input( $name, $size, $value,
+                       array_merge( $attribs, array( 'type' => 'password' ) ) );
        }
 
        /**
@@ -395,7 +413,9 @@ class Xml {
         * @param array $attribs Other attributes
         * @return string HTML
         */
-       public static function inputLabel( $label, $name, $id, $size = false, $value = false, $attribs = array() ) {
+       public static function inputLabel( $label, $name, $id, $size = false,
+               $value = false, $attribs = array()
+       ) {
                list( $label, $input ) = self::inputLabelSep( $label, $name, $id, $size, $value, $attribs );
                return $label . '&#160;' . $input;
        }
@@ -412,7 +432,9 @@ class Xml {
         *
         * @return array
         */
-       public static function inputLabelSep( $label, $name, $id, $size = false, $value = false, $attribs = array() ) {
+       public static function inputLabelSep( $label, $name, $id, $size = false,
+               $value = false, $attribs = array()
+       ) {
                return array(
                        Xml::label( $label, $id, $attribs ),
                        self::input( $name, $size, $value, array( 'id' => $id ) + $attribs )
@@ -448,7 +470,9 @@ class Xml {
         *
         * @return string HTML
         */
-       public static function radioLabel( $label, $name, $value, $id, $checked = false, $attribs = array() ) {
+       public static function radioLabel( $label, $name, $value, $id,
+               $checked = false, $attribs = array()
+       ) {
                return self::radio( $name, $value, $checked, array( 'id' => $id ) + $attribs ) .
                        '&#160;' .
                        self::label( $label, $id, $attribs );
@@ -487,14 +511,17 @@ class Xml {
         * Build a drop-down box from a textual list.
         *
         * @param string $name Name and id for the drop-down
-        * @param string $list Correctly formatted text (newline delimited) to be used to generate the options
+        * @param string $list Correctly formatted text (newline delimited) to be
+        *   used to generate the options.
         * @param string $other Text for the "Other reasons" option
         * @param string $selected Option which should be pre-selected
         * @param string $class CSS classes for the drop-down
         * @param int $tabindex Value of the tabindex attribute
         * @return string
         */
-       public static function listDropDown( $name = '', $list = '', $other = '', $selected = '', $class = '', $tabindex = null ) {
+       public static function listDropDown( $name = '', $list = '', $other = '',
+               $selected = '', $class = '', $tabindex = null
+       ) {
                $optgroup = false;
 
                $options = self::option( $other, 'other', $selected === 'other' );
@@ -554,8 +581,10 @@ class Xml {
        /**
         * Shortcut for creating fieldsets.
         *
-        * @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 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
@@ -740,8 +769,11 @@ class Xml {
        /**
         * Generate a form (without the opening form element).
         * Output optionally includes a submit button.
-        * @param array $fields Associative array, key is the name of a message that contains a description for the field, value is an HTML string containing the appropriate input.
-        * @param string $submitLabel The name of a message containing a label for the submit button.
+        * @param array $fields Associative array, key is the name of a message that
+        *   contains a description for the field, value is an HTML string
+        *   containing the appropriate input.
+        * @param string $submitLabel The name of a message containing a label for
+        *   the submit button.
         * @param array $submitAttribs The attributes to add to the submit button
         * @return string HTML form.
         */
@@ -758,14 +790,17 @@ class Xml {
                        // the input somehow.
 
                        $form .= Xml::tags( 'td', array( 'class' => 'mw-label' ), wfMessage( $labelmsg )->parse() );
-                       $form .= Xml::openElement( 'td', array( 'class' => 'mw-input' ) ) . $input . Xml::closeElement( 'td' );
+                       $form .= Xml::openElement( 'td', array( 'class' => 'mw-input' ) )
+                               . $input . Xml::closeElement( 'td' );
                        $form .= Xml::closeElement( 'tr' );
                }
 
                if ( $submitLabel ) {
                        $form .= Xml::openElement( 'tr' );
                        $form .= Xml::tags( 'td', array(), '' );
-                       $form .= Xml::openElement( 'td', array( 'class' => 'mw-submit' ) ) . Xml::submitButton( wfMessage( $submitLabel )->text(), $submitAttribs ) . Xml::closeElement( 'td' );
+                       $form .= Xml::openElement( 'td', array( 'class' => 'mw-submit' ) )
+                               . Xml::submitButton( wfMessage( $submitLabel )->text(), $submitAttribs )
+                               . Xml::closeElement( 'td' );
                        $form .= Xml::closeElement( 'tr' );
                }
 
index 6f7121b..afd5a13 100644 (file)
@@ -112,7 +112,7 @@ class ApiFeedContributions extends ApiBase {
                        return new FeedItem(
                                $title->getPrefixedText(),
                                $this->feedItemDesc( $revision ),
-                               $title->getFullURL(),
+                               $title->getFullURL( array( 'diff' => $revision->getId() ) ),
                                $date,
                                $this->feedItemAuthor( $revision ),
                                $comments
index 545b94d..64c3eec 100644 (file)
@@ -34,7 +34,6 @@
 class ApiFeedWatchlist extends ApiBase {
 
        private $watchlistModule = null;
-       private $linkToDiffs = false;
        private $linkToSections = false;
 
        /**
@@ -73,7 +72,7 @@ class ApiFeedWatchlist extends ApiBase {
                                'meta' => 'siteinfo',
                                'siprop' => 'general',
                                'list' => 'watchlist',
-                               'wlprop' => 'title|user|comment|timestamp',
+                               'wlprop' => 'title|user|comment|timestamp|ids',
                                'wldir' => 'older', // reverse order - from newest to oldest
                                'wlend' => $endTime, // stop at this time
                                'wllimit' => min( 50, $wgFeedLimit )
@@ -95,12 +94,6 @@ class ApiFeedWatchlist extends ApiBase {
                                $fauxReqArr['wltype'] = $params['wltype'];
                        }
 
-                       // Support linking to diffs instead of article
-                       if ( $params['linktodiffs'] ) {
-                               $this->linkToDiffs = true;
-                               $fauxReqArr['wlprop'] .= '|ids';
-                       }
-
                        // Support linking directly to sections when possible
                        // (possible only if section name is present in comment)
                        if ( $params['linktosections'] ) {
@@ -173,7 +166,7 @@ class ApiFeedWatchlist extends ApiBase {
        private function createFeedItem( $info ) {
                $titleStr = $info['title'];
                $title = Title::newFromText( $titleStr );
-               if ( $this->linkToDiffs && isset( $info['revid'] ) ) {
+               if ( isset( $info['revid'] ) ) {
                        $titleUrl = $title->getFullURL( array( 'diff' => $info['revid'] ) );
                } else {
                        $titleUrl = $title->getFullURL();
@@ -225,7 +218,6 @@ class ApiFeedWatchlist extends ApiBase {
                                ApiBase::PARAM_MIN => 1,
                                ApiBase::PARAM_MAX => 72,
                        ),
-                       'linktodiffs' => false,
                        'linktosections' => false,
                );
                if ( $flags ) {
@@ -254,7 +246,6 @@ class ApiFeedWatchlist extends ApiBase {
                return array(
                        'feedformat' => 'The format of the feed',
                        'hours' => 'List pages modified within this many hours from now',
-                       'linktodiffs' => 'Link to change differences instead of article pages',
                        'linktosections' => 'Link directly to changed sections if possible',
                        'allrev' => $wldescr['allrev'],
                        'wlowner' => $wldescr['owner'],
@@ -279,7 +270,7 @@ class ApiFeedWatchlist extends ApiBase {
        public function getExamples() {
                return array(
                        'api.php?action=feedwatchlist',
-                       'api.php?action=feedwatchlist&allrev=&linktodiffs=&hours=6'
+                       'api.php?action=feedwatchlist&allrev=&hours=6'
                );
        }
 
index 636d798..2124dc3 100644 (file)
@@ -241,6 +241,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $data['script'] = $GLOBALS['wgScript'];
                $data['variantarticlepath'] = $GLOBALS['wgVariantArticlePath'];
                $data['server'] = $GLOBALS['wgServer'];
+               $data['servername'] = $GLOBALS['wgServerName'];
                $data['wikiid'] = wfWikiID();
                $data['time'] = wfTimestamp( TS_ISO_8601, time() );
 
index 6dfb1b4..1fcc679 100644 (file)
@@ -47,26 +47,49 @@ class ApiWatch extends ApiBase {
                // by default we use pageset to extract the page to work on.
                // title is still supported for backward compatibility
                if ( !isset( $params['title'] ) ) {
-                       $pageSet->execute();
-                       $res = $pageSet->getInvalidTitlesAndRevisions( array(
-                               'invalidTitles',
-                               'special',
-                               'missingIds',
-                               'missingRevIds',
-                               'interwikiTitles'
-                       ) );
-
-                       foreach ( $pageSet->getMissingTitles() as $title ) {
-                               $r = $this->watchTitle( $title, $user, $params );
-                               $r['missing'] = 1;
-                               $res[] = $r;
+                       if ( $params['entirewatchlist'] && $pageSet->getDataSource() !== null ) {
+                               $this->dieUsage(
+                                       "Cannot use 'entirewatchlist' at the same time as '{$pageSet->getDataSource()}'",
+                                       'multisource'
+                               );
                        }
 
-                       foreach ( $pageSet->getGoodTitles() as $title ) {
-                               $r = $this->watchTitle( $title, $user, $params );
-                               $res[] = $r;
+                       if ( $params['entirewatchlist'] ) {
+                               if ( !$params['unwatch'] ) {
+                                       $this->dieUsage(
+                                               "'entirewatchlist' option can only be used with 'unwatch' parameter.",
+                                               'invalidparammix'
+                                       );
+                               } else {
+                                       // We're going to do this in the database as a bulk operation
+                                       // instead of one at a time, so it doesn't time out on largeish lists.
+                                       $dbw = wfGetDB( DB_MASTER );
+                                       $dbw->delete( 'watchlist', array( 'wl_user' => $user->getId() ), __METHOD__ );
+                                       $user->invalidateCache();
+                                       $res = array();
+                               }
+                       } else {
+                               $pageSet->execute();
+                               $res = $pageSet->getInvalidTitlesAndRevisions( array(
+                                       'invalidTitles',
+                                       'special',
+                                       'missingIds',
+                                       'missingRevIds',
+                                       'interwikiTitles'
+                               ) );
+
+                               foreach ( $pageSet->getMissingTitles() as $title ) {
+                                       $r = $this->watchTitle( $title, $user, $params );
+                                       $r['missing'] = 1;
+                                       $res[] = $r;
+                               }
+
+                               foreach ( $pageSet->getGoodTitles() as $title ) {
+                                       $r = $this->watchTitle( $title, $user, $params );
+                                       $res[] = $r;
+                               }
+                               $this->getResult()->setIndexedTagName( $res, 'w' );
                        }
-                       $this->getResult()->setIndexedTagName( $res, 'w' );
                } else {
                        // dont allow use of old title parameter with new pageset parameters.
                        $extraParams = array_keys( array_filter( $pageSet->extractRequestParams(), function ( $x ) {
@@ -175,6 +198,7 @@ class ApiWatch extends ApiBase {
                                ApiBase::PARAM_DEPRECATED => true
                        ),
                        'unwatch' => false,
+                       'entirewatchlist' => false,
                        'uselang' => null,
                        'token' => array(
                                ApiBase::PARAM_TYPE => 'string',
@@ -194,6 +218,8 @@ class ApiWatch extends ApiBase {
                return $psModule->getParamDescription() + array(
                        'title' => 'The page to (un)watch. use titles instead',
                        'unwatch' => 'If set the page will be unwatched rather than watched',
+                       'entirewatchlist' => 'Work on all watched pages without returning a list; '
+                               . 'can only be used together with \'unwatch\' option.',
                        'uselang' => 'Language to show the message in',
                        'token' => 'A token previously acquired via prop=info',
                );
index 95b15b8..e80dfb3 100644 (file)
@@ -87,7 +87,7 @@ class LinkCache {
 
        /**
         * @param string $title
-        * @return array|int
+        * @return int
         */
        public function getGoodLinkID( $title ) {
                if ( array_key_exists( $title, $this->mGoodLinks ) ) {
index bbf4ab6..f7beb0c 100644 (file)
@@ -279,7 +279,7 @@ class RecentChange {
                        $editor = $this->getPerformer();
                        $title = $this->getTitle();
 
-                       if ( wfRunHooks( 'AbortEmailNotification', array( $editor, $title ) ) ) {
+                       if ( wfRunHooks( 'AbortEmailNotification', array( $editor, $title, $this ) ) ) {
                                # @todo FIXME: This would be better as an extension hook
                                $enotif = new EmailNotification();
                                $enotif->notifyOnPageChange( $editor, $title,
index 77d3542..8ba43f6 100644 (file)
@@ -450,4 +450,69 @@ abstract class AbstractContent implements Content {
 
                return $result;
        }
+
+       /**
+        * Returns a ParserOutput object containing information derived from this content.
+        * Most importantly, unless $generateHtml was false, the return value contains an
+        * HTML representation of the content.
+        *
+        * Subclasses that want to control the parser output may override this, but it is
+        * preferred to override fillParserOutput() instead.
+        *
+        * Subclasses that override getParserOutput() itself should take care to call the
+        * ContentGetParserOutput hook.
+        *
+        * @since 1.24
+        *
+        * @param Title $title Context title for parsing
+        * @param int|null $revId Revision ID (for {{REVISIONID}})
+        * @param ParserOptions|null $options Parser options
+        * @param bool $generateHtml Whether or not to generate HTML
+        *
+        * @return ParserOutput Containing information derived from this content.
+        */
+       public function getParserOutput( Title $title, $revId = null,
+               ParserOptions $options = null, $generateHtml = true
+       ) {
+               if ( $options === null ) {
+                       $options = $this->getContentHandler()->makeParserOptions( 'canonical' );
+               }
+
+               $po = new ParserOutput();
+
+               if ( wfRunHooks( 'ContentGetParserOutput',
+                       array( $this, $title, $revId, $options, $generateHtml, &$po ) ) ) {
+
+                       $this->fillParserOutput( $title, $revId, $options, $generateHtml, $po );
+               }
+
+               return $po;
+       }
+
+       /**
+        * Fills the provided ParserOutput with information derived from the content.
+        * Unless $generateHtml was false, this includes an HTML representation of the content.
+        *
+        * This is called by getParserOutput() after consulting the ContentGetParserOutput hook.
+        * Subclasses are expected to override this method (or getParserOutput(), if need be).
+        * Subclasses of TextContent should generally override getHtml() instead.
+        *
+        * This placeholder implementation always throws an exception.
+        *
+        * @since 1.24
+        *
+        * @param Title $title Context title for parsing
+        * @param int|null $revId Revision ID (for {{REVISIONID}})
+        * @param ParserOptions|null $options Parser options
+        * @param bool $generateHtml Whether or not to generate HTML
+        * @param ParserOutput &$output The output object to fill (reference).
+        *
+        * @throws MWException
+        */
+       protected function fillParserOutput( Title $title, $revId,
+               ParserOptions $options, $generateHtml, ParserOutput &$output
+       ) {
+               // Don't make abstract, so subclasses that override getParserOutput() directly don't fail.
+               throw new MWException( 'Subclasses of AbstractContent must override fillParserOutput!' );
+       }
 }
index defa7da..dd7e27d 100644 (file)
@@ -454,7 +454,7 @@ abstract class ContentHandler {
 
        /**
         * Creates a new Content object that acts as a redirect to the given page,
-        * or null of redirects are not supported by this content model.
+        * or null if redirects are not supported by this content model.
         *
         * This default implementation always returns null. Subclasses supporting redirects
         * must override this method.
index 5fc2c9f..2673084 100644 (file)
@@ -67,7 +67,7 @@ class CssContent extends TextContent {
        protected function getHtml() {
                $html = "";
                $html .= "<pre class=\"mw-code mw-css\" dir=\"ltr\">\n";
-               $html .= $this->getHighlightHtml();
+               $html .= htmlspecialchars( $this->getNativeData() );
                $html .= "\n</pre>\n";
 
                return $html;
index 11a470e..442b705 100644 (file)
@@ -66,7 +66,7 @@ class JavaScriptContent extends TextContent {
        protected function getHtml() {
                $html = "";
                $html .= "<pre class=\"mw-code mw-js\" dir=\"ltr\">\n";
-               $html .= $this->getHighlightHtml();
+               $html .= htmlspecialchars( $this->getNativeData() );
                $html .= "\n</pre>\n";
 
                return $html;
index 0c6b06f..b772f17 100644 (file)
@@ -201,30 +201,30 @@ class TextContent extends AbstractContent {
        }
 
        /**
-        * Returns a generic ParserOutput object, wrapping the HTML returned by
-        * getHtml().
+        * Fills the provided ParserOutput object with information derived from the content.
+        * Unless $generateHtml was false, this includes an HTML representation of the content
+        * provided by getHtml().
+        *
+        * For content models listed in $wgTextModelsToParse, this method will call the MediaWiki
+        * wikitext parser on the text to extract any (wikitext) links, magic words, etc.
+        *
+        * Subclasses may override this to provide custom content processing.
+        * For custom HTML generation alone, it is sufficient to override getHtml().
         *
         * @param Title $title Context title for parsing
         * @param int $revId Revision ID (for {{REVISIONID}})
         * @param ParserOptions $options Parser options
         * @param bool $generateHtml Whether or not to generate HTML
-        *
-        * @return ParserOutput Representing the HTML form of the text.
+        * @param ParserOutput $output The output object to fill (reference).
         */
-       public function getParserOutput( Title $title, $revId = null,
-               ParserOptions $options = null, $generateHtml = true ) {
+       protected function fillParserOutput( Title $title, $revId,
+               ParserOptions $options, $generateHtml, ParserOutput &$output
+       ) {
                global $wgParser, $wgTextModelsToParse;
 
-               if ( !$options ) {
-                       //NOTE: use canonical options per default to produce cacheable output
-                       $options = $this->getContentHandler()->makeParserOptions( 'canonical' );
-               }
-
                if ( in_array( $this->getModel(), $wgTextModelsToParse ) ) {
-                       // parse just to get links etc into the database
-                       $po = $wgParser->parse( $this->getNativeData(), $title, $options, true, true, $revId );
-               } else {
-                       $po = new ParserOutput();
+                       // parse just to get links etc into the database, HTML is replaced below.
+                       $output = $wgParser->parse( $this->getNativeData(), $title, $options, true, true, $revId );
                }
 
                if ( $generateHtml ) {
@@ -233,19 +233,19 @@ class TextContent extends AbstractContent {
                        $html = '';
                }
 
-               $po->setText( $html );
-
-               return $po;
+               $output->setText( $html );
        }
 
        /**
         * Generates an HTML version of the content, for display. Used by
-        * getParserOutput() to construct a ParserOutput object.
+        * fillParserOutput() to provide HTML for the ParserOutput object.
+        *
+        * Subclasses may override this to provide a custom HTML rendering.
+        * If further information is to be derived from the content (such as
+        * categories), the fillParserOutput() method can be overridden instead.
         *
-        * This default implementation just calls getHighlightHtml(). Content
-        * models that have another mapping to HTML (as is the case for markup
-        * languages like wikitext) should override this method to generate the
-        * appropriate HTML.
+        * For backwards-compatibility, this default implementation just calls
+        * getHighlightHtml().
         *
         * @return string An HTML representation of the content
         */
@@ -254,13 +254,22 @@ class TextContent extends AbstractContent {
        }
 
        /**
-        * Generates a syntax-highlighted version of the content, as HTML.
-        * Used by the default implementation of getHtml().
+        * Generates an HTML version of the content, for display.
+        *
+        * This default implementation returns an HTML-escaped version
+        * of the raw text content.
         *
-        * @return string A HTML representation of the content's markup
+        * @note: The functionality of this method should really be implemented
+        * in getHtml(), and subclasses should override getHtml() if needed.
+        * getHighlightHtml() is kept around for backward compatibility with
+        * extensions that already override it.
+        *
+        * @deprecated since 1.24. Use getHtml() instead. In particular, subclasses overriding
+        *     getHighlightHtml() should override getHtml() instead.
+        *
+        * @return string An HTML representation of the content
         */
        protected function getHighlightHtml() {
-               # TODO: make Highlighter interface, use highlighter here, if available
                return htmlspecialchars( $this->getNativeData() );
        }
 
index dba0205..ccea916 100644 (file)
@@ -311,41 +311,33 @@ class WikitextContent extends TextContent {
         * Returns a ParserOutput object resulting from parsing the content's text
         * using $wgParser.
         *
-        * @since 1.21
-        *
         * @param Title $title
         * @param int $revId Revision to pass to the parser (default: null)
         * @param ParserOptions $options (default: null)
         * @param bool $generateHtml (default: true)
-        *
-        * @return ParserOutput Representing the HTML form of the text
+        * @param &$output ParserOutput representing the HTML form of the text,
+        *           may be manipulated or replaced.
         */
-       public function getParserOutput( Title $title, $revId = null,
-               ParserOptions $options = null, $generateHtml = true ) {
+       protected function fillParserOutput( Title $title, $revId,
+                       ParserOptions $options, $generateHtml, ParserOutput &$output
+       ) {
                global $wgParser;
 
-               if ( !$options ) {
-                       //NOTE: use canonical options per default to produce cacheable output
-                       $options = $this->getContentHandler()->makeParserOptions( 'canonical' );
-               }
-
                list( $redir, $text ) = $this->getRedirectTargetAndText();
-               $po = $wgParser->parse( $text, $title, $options, true, true, $revId );
+               $output = $wgParser->parse( $text, $title, $options, true, true, $revId );
 
                // Add redirect indicator at the top
                if ( $redir ) {
                        // Make sure to include the redirect link in pagelinks
-                       $po->addLink( $redir );
+                       $output->addLink( $redir );
                        if ( $generateHtml ) {
                                $chain = $this->getRedirectChain();
-                               $po->setText(
+                               $output->setText(
                                        Article::getRedirectHeaderHtml( $title->getPageLanguage(), $chain, false ) .
-                                       $po->getText()
+                                       $output->getText()
                                );
                        }
                }
-
-               return $po;
        }
 
        /**
index 7fb85b9..73ab04d 100644 (file)
@@ -2126,7 +2126,11 @@ class LocalFileDeleteBatch {
                        $dbw->insertSelect( 'filearchive', 'image',
                                array(
                                        'fa_storage_group' => $encGroup,
-                                       'fa_storage_key' => $dbw->conditional( array( 'img_sha1' => '' ), $dbw->addQuotes( '' ), $concat ),
+                                       'fa_storage_key' => $dbw->conditional(
+                                               array( 'img_sha1' => '' ),
+                                               $dbw->addQuotes( '' ),
+                                               $concat
+                                       ),
                                        'fa_deleted_user' => $encUserId,
                                        'fa_deleted_timestamp' => $encTimestamp,
                                        'fa_deleted_reason' => $encReason,
@@ -2158,7 +2162,11 @@ class LocalFileDeleteBatch {
                        $dbw->insertSelect( 'filearchive', 'oldimage',
                                array(
                                        'fa_storage_group' => $encGroup,
-                                       'fa_storage_key' => $dbw->conditional( array( 'oi_sha1' => '' ), $dbw->addQuotes( '' ), $concat ),
+                                       'fa_storage_key' => $dbw->conditional(
+                                               array( 'oi_sha1' => '' ),
+                                               $dbw->addQuotes( '' ),
+                                               $concat
+                                       ),
                                        'fa_deleted_user' => $encUserId,
                                        'fa_deleted_timestamp' => $encTimestamp,
                                        'fa_deleted_reason' => $encReason,
index befab15..39da597 100644 (file)
  * @ingroup Media
  */
 abstract class ImageGalleryBase extends ContextSource {
-       /** @var array Gallery images */
+       /**
+        * @var array Gallery images
+        * @deprecated in 1.23 (was declared "var") and will be removed in 1.24
+        */
        public $mImages;
 
-       /** @var bool Whether to show the filesize in bytes in categories */
+       /**
+        * @var bool Whether to show the filesize in bytes in categories
+        * @deprecated in 1.23 (was declared "var") and will be removed in 1.24
+        */
        public $mShowBytes;
 
-       /** @var bool Whether to show the filename. Default: true */
+       /**
+        * @var bool Whether to show the filename. Default: true
+        * @deprecated in 1.23 (was declared "var") and will be removed in 1.24
+        */
        public $mShowFilename;
 
-       /** @var string Gallery mode. Default: traditional */
+       /**
+        * @var string Gallery mode. Default: traditional
+        * @deprecated in 1.23 (was declared "var") and will be removed in 1.24
+        */
        public $mMode;
 
-       /** @var bool|string Gallery caption. Default: false */
+       /**
+        * @var bool|string Gallery caption. Default: false
+        * @deprecated in 1.23 (was declared "var") and will be removed in 1.24
+        */
        public $mCaption = false;
 
        /**
         * @var bool Hide blacklisted images?
+        * @deprecated in 1.23 (was declared "var") and will be removed in 1.24
         */
        public $mHideBadImages;
 
index 003ccfe..6ea95ed 100644 (file)
@@ -5,7 +5,7 @@ class HTMLHiddenField extends HTMLFormField {
                parent::__construct( $params );
 
                # Per HTML5 spec, hidden fields cannot be 'required'
-               # http://dev.w3.org/html5/spec/states-of-the-type-attribute.html#hidden-state
+               # http://www.w3.org/TR/html5/forms.html#hidden-state-%28type=hidden%29
                unset( $this->mParams['required'] );
        }
 
index 372091a..85717c5 100644 (file)
@@ -200,7 +200,7 @@ abstract class Installer {
                '_NamespaceType' => 'site-name',
                '_AdminName' => '', // will be set later, when the user selects language
                '_AdminPassword' => '',
-               '_AdminPassword2' => '',
+               '_AdminPasswordConfirm' => '',
                '_AdminEmail' => '',
                '_Subscribe' => false,
                '_SkipOptional' => 'continue',
index 68a5519..0ef41fa 100644 (file)
@@ -97,6 +97,8 @@ class OracleUpdater extends DatabaseUpdater {
                        array( 'addIndex', 'logging', 'i06', 'patch-logging_user_text_type_time_index.sql' ),
                        array( 'addIndex', 'logging', 'i07', 'patch-logging_user_text_time_index.sql' ),
                        array( 'addField', 'user', 'user_password_expires', 'patch-user_password_expire.sql' ),
+                       array( 'addField', 'page', 'page_links_updated', 'patch-page_links_updated.sql' ),
+                       array( 'addField', 'recentchanges', 'rc_source', 'patch-rc_source.sql' ),
 
                        //1.24
 
index e7aab8a..8c81080 100644 (file)
@@ -406,7 +406,8 @@ class PostgresUpdater extends DatabaseUpdater {
                        array( 'addPgField', 'recentchanges', 'rc_source', "TEXT NOT NULL DEFAULT ''" ),
                        array( 'addPgField', 'page', 'page_links_updated', "TIMESTAMPTZ NULL" ),
                        array( 'addPgField', 'mwuser', 'user_password_expires', 'TIMESTAMPTZ NULL' ),
-                       array( 'changeFieldPurgeTable', 'l10n_cache', 'lc_value', 'bytea', "replace(lc_value,'\','\\\\')::bytea" ),
+                       array( 'changeFieldPurgeTable', 'l10n_cache', 'lc_value', 'bytea',
+                               "replace(lc_value,'\','\\\\')::bytea" ),
 
                        // 1.24
                        array( 'addPgField', 'page_props', 'pp_sortkey', 'float NULL' ),
index 3b3473b..4de7f06 100644 (file)
@@ -790,7 +790,7 @@ class WebInstaller_Name extends WebInstallerPage {
                                'label' => 'config-admin-password',
                        ) ) .
                        $this->parent->getPasswordBox( array(
-                               'var' => '_AdminPassword2',
+                               'var' => '_AdminPasswordConfirm',
                                'label' => 'config-admin-password-confirm'
                        ) ) .
                        $this->parent->getTextBox( array(
@@ -829,7 +829,7 @@ class WebInstaller_Name extends WebInstallerPage {
        public function submit() {
                $retVal = true;
                $this->parent->setVarsFromRequest( array( 'wgSitename', '_NamespaceType',
-                       '_AdminName', '_AdminPassword', '_AdminPassword2', '_AdminEmail',
+                       '_AdminName', '_AdminPassword', '_AdminPasswordConfirm', '_AdminEmail',
                        '_Subscribe', '_SkipOptional', 'wgMetaNamespace' ) );
 
                // Validate site name
@@ -911,7 +911,7 @@ class WebInstaller_Name extends WebInstallerPage {
                        # $user->getPasswordValidity just checks for $wgMinimalPasswordLength.
                        # This message is more specific and helpful.
                        $msg = 'config-admin-password-blank';
-               } elseif ( $pwd !== $this->getVar( '_AdminPassword2' ) ) {
+               } elseif ( $pwd !== $this->getVar( '_AdminPasswordConfirm' ) ) {
                        $msg = 'config-admin-password-mismatch';
                } elseif ( $valid !== true ) {
                        $msg = $valid;
@@ -919,7 +919,7 @@ class WebInstaller_Name extends WebInstallerPage {
                if ( $msg !== false ) {
                        call_user_func_array( array( $this->parent, 'showError' ), (array)$msg );
                        $this->setVar( '_AdminPassword', '' );
-                       $this->setVar( '_AdminPassword2', '' );
+                       $this->setVar( '_AdminPasswordConfirm', '' );
                        $retVal = false;
                }
 
index 4f45d97..261f750 100644 (file)
        "config-mysql-charset-help": "Beim Schpeishere em <strong>binäre Fomaat</strong> deiht MediaWiki Täxt, dä em UTF-8 Fommaat kütt, en dä Daatebangk en binär kodeerte Daatefälder faßhallde.\nDat es flöcker un spaasaamer wi et UTF-8 Fommaat vum <i lang=\"en\">MySQL</i> un määd et müjjelesch, all un jeedes <i lang=\"en\">Unicode</i>-Zeische met faßzehallde.\n\nBeim Schpeishere em <strong>UTF-8 Fomaat<strong> deiht et <i lang=\"en\">MySQL</i> der Zeischesaz un de Kodeerung vun dä Daate känne, un kann se akeraat aanzeije un ömwandelle,\nallerdengs künne kein Zeische ußerhalv vum [//de.wikipedia.org/wiki/Basic_Multilingual_Plane#Gliederung_in_Ebenen_und_Bl.C3.B6cke jrundlääje Knubbel för vill Schprooche (<i lang=\"en\">Basic Multilingual Plane — BMP</i>)] afjeschpeischert wääde.",
        "config-mssql-auth": "De Zoot Aanmäldong:",
        "config-mssql-install-auth": "Söhk us, wi dat Aanmälde aan dä Daatebangk vor sesch jonn sull för de Enschtallazjuhn.\nWann De <em>{{int:Config-mssql-windowsauth}}</em> nemms, weed jenumme, met wat emmer dä Wäbßööver aam loufe es.",
-       "config-mssql-web-auth": "Söhk us, wi dat Aanmälde aan dä Daatebangk vor sesch jonn sull för de nommaale Ärbeid vum Wiki.\nWann De <em>{{int:Config-mssql-windowsauth}}</em> nemms, weed jenumme, met wat emmer dä Wäbßööver aam loufe es.",
+       "config-mssql-web-auth": "Söhk us, wi dat Aanmälde aan dä Daatebangk vor sesch jonn sull för de nommaale Ärbeid vum Wiki.\nWann De <em>{{int:Config-mssql-windowsauth}}</em> nemms, weed dat jenumme, wohmet dä Wäbßööver aam loufe es.",
        "config-mssql-sqlauth": "De Aanmäldong bemm <i lang=\"en\" xml:lang=\"en\">SQL</i>-ẞööver vun <i lang=\"en\" xml:lang=\"en\">Microsoft</i>",
        "config-mssql-windowsauth": "De Annmäldong bemm <i lang=\"en\" xml:lang=\"en\">Windows</i>",
        "config-site-name": "Däm Wiki singe Name:",
index 6891c7f..cde1dc4 100644 (file)
@@ -15,9 +15,9 @@
        "config-upgrade-key-missing": "Востановена е постоечка воспоставка на МедијаВики.\nЗа да ја надградите, вметнете го следниов ред на дното од вашата страница <code>LocalSettings.php</code>:\n\n$1",
        "config-localsettings-incomplete": "Постоечката страница <code>LocalSettings.php</code> е нецелосна.\nНе е поставена променливата $1.\nИзменете ја страницата <code>LocalSettings.php</code> така што ќе ѝ зададете вредност на променливата, па стиснете на „{{int:Config-continue}}“.",
        "config-localsettings-connection-error": "Се појави грешка при поврзувањето со базата користејќи ги поставките назначени во <code>LocalSettings.php</code>. Исправете ги овие поставки и обидете се повторно.\n\n$1",
-       "config-session-error": "Грешка при започнување на сесијата: $1",
-       "config-session-expired": "Вашите сесиски податоци истекоа.\nПоставките на сесиите траат $1.\nНивниот рок можете да го зголемите со задавање на <code>session.gc_maxlifetime</code> во php.ini.\nПочнете ја воспоставката одново.",
-       "config-no-session": "Ð\92аÑ\88иÑ\82е Ñ\81еÑ\81иÑ\81ки Ð¿Ð¾Ð´Ð°Ñ\82оÑ\86и се изгубени!\nПогледајте во php.ini дали <code>session.save_path</code> е поставен во правилна папка.",
+       "config-session-error": "Грешка при започнување на седницата: $1",
+       "config-session-expired": "Вашите податоци од седницата истекоа.\nПоставките на седниците траат $1.\nНивниот рок можете да го зголемите со задавање на <code>session.gc_maxlifetime</code> во php.ini.\nПочнете ја воспоставката одново.",
+       "config-no-session": "Ð\9fодаÑ\82оÑ\86иÑ\82е Ð¾Ð´ Ñ\81едниÑ\86аÑ\82а се изгубени!\nПогледајте во php.ini дали <code>session.save_path</code> е поставен во правилна папка.",
        "config-your-language": "Вашиот јазик:",
        "config-your-language-help": "Одберете на кој јазик да се одвива воспоставката.",
        "config-wiki-language": "Јазик на викито:",
index 905e5ad..db088af 100644 (file)
@@ -13,7 +13,8 @@
                        "Fúlvio",
                        "Giro720",
                        "Imperadeiro98",
-                       "Cainamarques"
+                       "Cainamarques",
+                       "Vitorvicentevalente"
                ]
        },
        "config-desc": "O instalador do MediaWiki",
index 63ed324..9f609ee 100644 (file)
@@ -50,7 +50,7 @@
        "config-env-php-toolow": "PHP $1 is instâlled.\nHoue'er, MediaWiki requires PHP $2 or heier.",
        "config-unicode-using-utf8": "Uising Brion Vibber's utf8_normalize.so fer Unicode normalization.",
        "config-unicode-using-intl": "Uising the [http://pecl.php.net/intl intl PECL extension] fer Unicode normalization.",
-       "config-unicode-pure-php-warning": "<strong>Warnishment:</strong> The [http://pecl.php.net/intl intl PECL extension] isna available tae handle Unicode normalization, fawin back tae slow pure-PHP implementation.\nGif ye rin ae high-traffic site, ye shid read ae wee bit oan [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations Unicode normalization].",
+       "config-unicode-pure-php-warning": "<strong>Warnishment:</strong> The [http://pecl.php.net/intl intl PECL extension] is no available tae haunle Unicode normalisation, fawin back tae slaw pure-PHP implementation.\nGif ye rin ae hei-traffic steid, ye shid read ae wee bit oan [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations Unicode normalization].",
        "config-unicode-update-warning": "<strong>Warnishment:</strong> The instawed version o the Unicode normalization wrapper uises aen aulder version o [http://site.icu-project.org/ the ICU project's] librie.\nYe shid [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations upgrade] gif ye'r concerned aneat uisin Unicode.",
        "config-no-db": "Coudna fynd ae suitable database driver! Ye need tae instaw ae database driver fer PHP.\nThe follaein database types ar supported: $1.\n\nGif ye compiled PHP yersel, reconfeegure it wi ae database client enabled, fer example, uising <code>./confeegure --wi-mysqli</code>.\nGif ye installed PHP fae ae Debian or Ubuntu package, than ye need tae instaw forby, fer example, the <code>php5-mysql</code> package.",
        "config-outdated-sqlite": "<strong>Warnishment:</strong> ye have SQLite $1, this is lower than minimum required version $2. SQLite will be onavailable.",
        "config-profile-no-anon": "Please mak aen accoont",
        "config-profile-fishbowl": "Permited eiditors yinly",
        "config-profile-private": "Private wiki",
-       "config-profile-help": "Wikis wark best whan ye lat aes monie fawk eedit thaim aes possible.\nIn MediaWiki, it's easie tae luik ower the recent chynges, n tae revert onie damage that's dun bi naeeve or maleecioos uisers.\n\nHouever, monie hae foond MediaWiki tae be uissful in ae wide varietie o roles, n sometimes it isna easie tae conveence awbodie o the beneefits o the wiki wa.\nSae ye hae the choice.\n\nThe <strong>{{int:config-profile-wiki}}</strong> model permits oniebdie tae eedit, wioot even loggin in.\nAe wiki wi <strong>{{int:config-profile-no-anon}}</strong> provides eextra accoontabeelitie, but micht deter casual contreebuters.\n\nThe <strong>{{int:config-profile-fishbowl}}</strong> scenario permits appruived uisers tae eedit, but the publeec can see the pages, incluidin histerie.\nA <strong>{{int:config-profile-private}}</strong> yinlie permits appruived uisers tae see pages, wi the same groop permited tae eedit.\n\nMair complex uiser richts confeegurations ar available efter instawation, see the [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:User_rights relevant manual entrie].",
+       "config-profile-help": "Wikis wark best whan ye lat aes monie fawk eedit thaim aes possible.\nIn MediaWiki, it's easie tae luik ower the recent chynges, n tae revert onie damage that's dun bi naeeve or maleecioos uisers.\n\nHouever, monie hae foond MediaWiki tae be uissful in ae wide varietie o roles, n sometimes it's na easie tae conveence awbodie o the beneefits o the wiki wa.\nSae ye hae the choice.\n\nThe <strong>{{int:config-profile-wiki}}</strong> model allous oniebdie tae eedit, wioot even loggin in.\nAe wiki wi <strong>{{int:config-profile-no-anon}}</strong> provides eextra accoontabeelitie, but micht deter casual contreebuters.\n\nThe <strong>{{int:config-profile-fishbowl}}</strong> scenario allous appruived uisers tae eedit, but the publeec can see the pages, incluidin histerie.\nA <strong>{{int:config-profile-private}}</strong> yinlie permits appruived uisers tae see pages, wi the same groop permited tae eedit.\n\nMair complex uiser richts confeegurations ar available efter instawation, see the [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:User_rights relevant manual entrie].",
        "config-license": "Copiericht n license:",
        "config-license-none": "Nae license fiter",
        "config-license-cc-by-sa": "Creative Commyns Attribution Share Alike",
        "config-logo": "Logo URL:",
        "config-logo-help": "MediaWiki's defaut skin inclædes space fer ae 135x160 pixel logo abuin the sidebaur menu.\nUplaid aen eemage o the appropriate size, n enter the URL here.\n\nYe can uise <code>$wgStylePath</code> or <code>$wgScriptPath</code> gif yer logo is relative til thae paths.\n\nGif ye dinna want ae logo, lea this kist blank.",
        "config-instantcommons": "Enable Instant Commyns",
-       "config-instantcommons-help": "[//www.mediawiki.org/wiki/InstantCommons Instant Commyns] is ae featur that permits wikis tae uise eemages, soonds n ither media foond oan the [//commons.wikimedia.org/ Wikimedia Commyns] site.\nIn order tae dae this, MediaWiki needs access til the Internet.\n\nFer mair information oan this featur, incluidin instructions oan hou tae set it up fer wikis ither than the Wikimedia Commyns, consult [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgForeignFileRepos the manual].",
+       "config-instantcommons-help": "[//www.mediawiki.org/wiki/InstantCommons Instant Commyns] is ae featur that allous wikis tae uise eemages, soonds n ither media foond oan the [//commons.wikimedia.org/ Wikimedia Commons] steid.\nIn order tae dae this, MediaWiki needs access til the Internet.\n\nFer mair information oan this featur, incluidin instructions oan hou tae set it up fer wikis ither than the Wikimedia Commons, consult [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgForeignFileRepos the manual].",
        "config-cc-error": "The Creative Commyns license chuiser gae naw result.\nEnter the license name manually.",
        "config-cc-again": "Pick again...",
        "config-cc-not-chosen": "Chuise whit Creative Commyns license ye want an clap oan \"proceed\".",
        "config-nofile": "File \"$1\" coudna be foond. Haes it been delytit?",
        "config-extension-link": "Did ye ken that yer wiki supports [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions extensions]?\n\nYe can brouse [//www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category extensions bi categorie] or the [//www.mediawiki.org/wiki/Extension_Matrix Extension Matrix] tae see the full leet o extensions.",
        "mainpagetext": "<strong>MediaWiki haes been installit wi speed.</strong>",
-       "mainpagedocfooter": "Consult the [//meta.wikimedia.org/wiki/Help:Contents Uiser's Guide] fer informâtion oan uising the wiki saffware.\n\n== Gettin stairted ==\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Confeegurâtion settins leet]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailin leet]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki fer yer leid]"
+       "mainpagedocfooter": "Consult the [//meta.wikimedia.org/wiki/Help:Contents Uiser's Guide] fer information oan uisin the wiki saffware.\n\n== Gettin stairtit ==\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Confeeguration settins leet]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailin leet]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki fer yer leid]"
 }
index c6d9b4c..ad6bca7 100644 (file)
@@ -34,6 +34,8 @@
        "config-page-existingwiki": "Existujúca wiki",
        "config-help-restart": "Chcete vymazať všetky uložené dáta, ktoré ste zadali a reštartovať proces inštalácie?",
        "config-restart": "Áno, reštartovať",
+       "config-env-good": "Prostredie bolo skontrolované.\nMôžete nainštalovať MediaWiki.",
+       "config-env-bad": "Prostredie bolo skontrolované.\nNemôžete nainštalovať MediaWiki.",
        "config-env-php": "PHP $1 je nainštalované.",
        "config-env-php-toolow": "PHP $1 je nainštalované. Avšak, MediaWiki vyžaduje PHP $2 alebo vyššie.",
        "config-db-type": "Typ databázy:",
index 63c92bb..ed986c0 100644 (file)
@@ -50,7 +50,7 @@
        "config-help-restart": "是否要清除所有已輸入且儲存的資料,並重新開始安裝程序嗎?",
        "config-restart": "是的,重新開始",
        "config-welcome": "=== 環境檢查 ===\n現在會做基本的檢查,檢查環境是否符合 MediaWiki 安裝所需。\n若您要尋求如何完成安裝的協助,請記得提供以下訊息。",
-       "config-copyright": "=== 版權聲明與授權條款 ===\n\n$1\n\n本程式為自由軟體;您可依據自由軟體基金會所發表的 GNU 通用公共授權條款規定,將本程式重新發佈與/或修改;無論您依據的是本授權條款的第二版或 (您可自行選擇) 之後的任何版本。\n\n本程式發佈的目的是希望可以提供幫助,但 <strong>不負任何擔保責任</strong>;亦無隱含對 <strong>適售性</strong> 或 <strong>特定用途的適用性</strong> 的情形擔保。詳情請參照GNU 通用公共授權。\n\n您應已隨本程式收到 <doclink href=\"Copying\">GNU 通用公共授權條款</doclink>;如果沒有,請信件通知自由軟體基金會,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA,或 [http://www.gnu.org/copyleft/gpl.html 線上閱讀]。",
+       "config-copyright": "=== 版權聲明與授權條款 ===\n\n$1\n\n本程式為自由軟體;您可依據自由軟體基金會所發表的 GNU 通用公共授權條款規定,將本程式重新發佈與/或修改;無論您依據的是本授權條款的第二版或 (您可自行選擇) 之後的任何版本。\n\n本程式發佈的目的是希望可以提供幫助,但 <strong>不負任何擔保責任</strong>;亦無隱含對 <strong>適售性</strong> 或 <strong>特定用途的適用性</strong> 的情形擔保。詳情請參照 GNU 通用公共授權。\n\n您應已隨本程式收到 <doclink href=\"Copying\">GNU 通用公共授權條款的副本</doclink>;如果沒有,請信件通知自由軟體基金會,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA,或 [http://www.gnu.org/copyleft/gpl.html 線上閱讀]。",
        "config-sidebar": "* [www.mediawiki.org/wiki/MediaWiki/zh-hant MediaWiki 首頁]\n* [www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents/zh 使用者指南]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents/zh 管理者指南]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ/zh-hant 常見問題集]\n----\n* <doclink href=Readme>讀我說明</doclink>\n* <doclink href=ReleaseNotes>發行說明</doclink>\n* <doclink href=Copying>版權聲明</doclink>\n* <doclink href=UpgradeDoc>升級</doclink>",
        "config-env-good": "環境檢查已完成。\n您可以安裝 MediaWiki。",
        "config-env-bad": "環境檢查已完成。\n您無法安裝 MediaWiki。",
index 998805a..2990782 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+// @codingStandardsIgnoreFile File external to MediaWiki. Ignore coding conventions checks.
 /**
  * JavaScript Minifier
  *
index f250217..ed0382c 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+// @codingStandardsIgnoreFile File external to MediaWiki. Ignore coding conventions checks.
 /**
  * JSMinPlus version 1.4
  *
index e57dbcf..37723d5 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-
+// @codingStandardsIgnoreFile File external to MediaWiki. Ignore coding conventions checks.
 /**
  * lessphp v0.4.0@2cc77e3c7b
  * http://leafo.net/lessphp
index 607c4e5..44be178 100644 (file)
@@ -138,6 +138,10 @@ class BitmapHandler extends ImageHandler {
                        'dstUrl' => $dstUrl,
                );
 
+               if ( isset( $params['quality'] ) && $params['quality'] === 'low' ) {
+                       $scalerParams['quality'] = 30;
+               }
+
                # Determine scaler type
                $scaler = self::getScalerType( $dstPath );
 
@@ -147,6 +151,7 @@ class BitmapHandler extends ImageHandler {
                if ( !$image->mustRender() &&
                        $scalerParams['physicalWidth'] == $scalerParams['srcWidth']
                        && $scalerParams['physicalHeight'] == $scalerParams['srcHeight']
+                       && !isset( $scalerParams['quality'] )
                ) {
 
                        # normaliseParams (or the user) wants us to return the unscaled image
@@ -163,12 +168,14 @@ class BitmapHandler extends ImageHandler {
 
                if ( $flags & self::TRANSFORM_LATER ) {
                        wfDebug( __METHOD__ . ": Transforming later per flags.\n" );
-                       $params = array(
+                       $newParams = array(
                                'width' => $scalerParams['clientWidth'],
                                'height' => $scalerParams['clientHeight']
                        );
-
-                       return new ThumbnailImage( $image, $dstUrl, false, $params );
+                       if ( isset( $params['quality'] ) ) {
+                               $newParams['quality'] = $params['quality'];
+                       }
+                       return new ThumbnailImage( $image, $dstUrl, false, $newParams );
                }
 
                # Try to make a target path for the thumbnail
@@ -235,12 +242,14 @@ class BitmapHandler extends ImageHandler {
                } elseif ( $mto ) {
                        return $mto;
                } else {
-                       $params = array(
+                       $newParams = array(
                                'width' => $scalerParams['clientWidth'],
                                'height' => $scalerParams['clientHeight']
                        );
-
-                       return new ThumbnailImage( $image, $dstUrl, $dstPath, $params );
+                       if ( isset( $params['quality'] ) ) {
+                               $newParams['quality'] = $params['quality'];
+                       }
+                       return new ThumbnailImage( $image, $dstUrl, $dstPath, $newParams );
                }
        }
 
@@ -314,7 +323,8 @@ class BitmapHandler extends ImageHandler {
                $animation_post = array();
                $decoderHint = array();
                if ( $params['mimeType'] == 'image/jpeg' ) {
-                       $quality = array( '-quality', '80' ); // 80%
+                       $qualityVal = isset( $params['quality'] ) ? (string) $params['quality'] : null;
+                       $quality = array( '-quality', $qualityVal ?: '80' ); // 80%
                        # Sharpening, see bug 6193
                        if ( ( $params['physicalWidth'] + $params['physicalHeight'] )
                                / ( $params['srcWidth'] + $params['srcHeight'] )
@@ -419,7 +429,8 @@ class BitmapHandler extends ImageHandler {
                                        list( $radius, $sigma ) = explode( 'x', $wgSharpenParameter );
                                        $im->sharpenImage( $radius, $sigma );
                                }
-                               $im->setCompressionQuality( 80 );
+                               $qualityVal = isset( $params['quality'] ) ? (string) $params['quality'] : null;
+                               $im->setCompressionQuality( $qualityVal ?: 80 );
                        } elseif ( $params['mimeType'] == 'image/png' ) {
                                $im->setCompressionQuality( 95 );
                        } elseif ( $params['mimeType'] == 'image/gif' ) {
@@ -531,13 +542,14 @@ class BitmapHandler extends ImageHandler {
                # input routine for this.
 
                $typemap = array(
-                       'image/gif' => array( 'imagecreatefromgif', 'palette', 'imagegif' ),
-                       'image/jpeg' => array( 'imagecreatefromjpeg', 'truecolor',
+                       'image/gif' => array( 'imagecreatefromgif', 'palette', false, 'imagegif' ),
+                       'image/jpeg' => array( 'imagecreatefromjpeg', 'truecolor', true,
                                array( __CLASS__, 'imageJpegWrapper' ) ),
-                       'image/png' => array( 'imagecreatefrompng', 'bits', 'imagepng' ),
-                       'image/vnd.wap.wbmp' => array( 'imagecreatefromwbmp', 'palette', 'imagewbmp' ),
-                       'image/xbm' => array( 'imagecreatefromxbm', 'palette', 'imagexbm' ),
+                       'image/png' => array( 'imagecreatefrompng', 'bits', false, 'imagepng' ),
+                       'image/vnd.wap.wbmp' => array( 'imagecreatefromwbmp', 'palette', false, 'imagewbmp' ),
+                       'image/xbm' => array( 'imagecreatefromxbm', 'palette', false, 'imagexbm' ),
                );
+
                if ( !isset( $typemap[$params['mimeType']] ) ) {
                        $err = 'Image type not supported';
                        wfDebug( "$err\n" );
@@ -545,7 +557,7 @@ class BitmapHandler extends ImageHandler {
 
                        return $this->getMediaTransformError( $params, $errMsg );
                }
-               list( $loader, $colorStyle, $saveType ) = $typemap[$params['mimeType']];
+               list( $loader, $colorStyle, $useQuality, $saveType ) = $typemap[$params['mimeType']];
 
                if ( !function_exists( $loader ) ) {
                        $err = "Incomplete GD library configuration: missing function $loader";
@@ -597,7 +609,12 @@ class BitmapHandler extends ImageHandler {
 
                imagesavealpha( $dst_image, true );
 
-               call_user_func( $saveType, $dst_image, $params['dstPath'] );
+               $funcParams = array( $dst_image, $params['dstPath'] );
+               if ( $useQuality && isset( $params['quality'] ) ) {
+                       $funcParams[] = $params['quality'];
+               }
+               call_user_func_array( $saveType, $funcParams );
+
                imagedestroy( $dst_image );
                imagedestroy( $src_image );
 
@@ -730,9 +747,10 @@ class BitmapHandler extends ImageHandler {
                return $cache;
        }
 
-       static function imageJpegWrapper( $dst_image, $thumbPath ) {
+       // FIXME: transformImageMagick() & transformImageMagickExt() uses JPEG quality 80, here it's 95?
+       static function imageJpegWrapper( $dst_image, $thumbPath, $quality = 95 ) {
                imageinterlace( $dst_image );
-               imagejpeg( $dst_image, $thumbPath, 95 );
+               imagejpeg( $dst_image, $thumbPath, $quality );
        }
 
        /**
index 9ed626f..a0f7acb 100644 (file)
  * @ingroup Media
  */
 class JpegHandler extends ExifBitmapHandler {
+
+       function normaliseParams( $image, &$params ) {
+               if ( !parent::normaliseParams( $image, $params ) ) {
+                       return false;
+               }
+               if ( isset( $params['quality'] ) && !self::validateQuality( $params['quality'] ) ) {
+                       return false;
+               }
+               return true;
+       }
+
+       function validateParam( $name, $value ) {
+               if ( $name === 'quality' ) {
+                       return self::validateQuality( $value );
+               } else {
+                       return parent::validateParam( $name, $value );
+               }
+       }
+
+       /** Validate and normalize quality value to be between 1 and 100 (inclusive).
+        * @param int $value quality value, will be converted to integer or 0 if invalid
+        * @return bool true if the value is valid
+        */
+       private static function validateQuality( $value ) {
+               return $value === 'low';
+       }
+
+       function makeParamString( $params ) {
+               // Prepend quality as "qValue-". This has to match parseParamString() below
+               $res = parent::makeParamString( $params );
+               if ( $res && isset( $params['quality'] ) ) {
+                       $res = "q{$params['quality']}-$res";
+               }
+               return $res;
+       }
+
+       function parseParamString( $str ) {
+               // $str contains "qlow-200px" or "200px" strings because thumb.php would strip the filename
+               // first - check if the string begins with "qlow-", and if so, treat it as quality.
+               // Pass the first portion, or the whole string if "qlow-" not found, to the parent
+               // The parsing must match the makeParamString() above
+               $res = false;
+               $m = false;
+               if ( preg_match( '/q([^-]+)-(.*)$/', $str, $m ) ) {
+                       $v = $m[1];
+                       if ( self::validateQuality( $v ) ) {
+                               $res = parent::parseParamString( $m[2] );
+                               if ( $res ) {
+                                       $res['quality'] = $v;
+                               }
+                       }
+               } else {
+                       $res = parent::parseParamString( $str );
+               }
+               return $res;
+       }
+
+       function getScriptParams( $params ) {
+               $res = parent::getScriptParams( $params );
+               if ( isset( $params['quality'] ) ) {
+                       $res['quality'] = $params['quality'];
+               }
+               return $res;
+       }
+
        function getMetadata( $image, $filename ) {
                try {
                        $meta = BitmapMetadataHandler::Jpeg( $filename );
index db0e579..6e50a8c 100644 (file)
@@ -28,7 +28,8 @@
  * @ingroup Cache
  */
 class HashBagOStuff extends BagOStuff {
-       var $bag;
+       /** @var array */
+       protected $bag;
 
        function __construct() {
                $this->bag = array();
index bc59c6f..9de840b 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+// @codingStandardsIgnoreFile It's an external lib and it isn't. Let's not bother.
 /**
  * Memcached client for PHP.
  *
index c656bdd..497f75d 100644 (file)
@@ -29,7 +29,8 @@
  * @ingroup Cache
  */
 class MultiWriteBagOStuff extends BagOStuff {
-       var $caches;
+       /** @var array BagOStuff[] */
+       protected $caches;
 
        /**
         * Constructor. Parameters are:
index 3be251c..0009999 100644 (file)
@@ -27,7 +27,7 @@
  * @ingroup Cache
  */
 class ObjectCache {
-       static $instances = array();
+       public static $instances = array();
 
        /**
         * Get a cached instance of the specified type of cache object.
@@ -87,8 +87,9 @@ class ObjectCache {
                        $class = $params['class'];
                        return new $class( $params );
                } else {
-                       throw new MWException( "The definition of cache type \"" . print_r( $params, true ) . "\" lacks both " .
-                               "factory and class parameters." );
+                       throw new MWException( "The definition of cache type \""
+                               . print_r( $params, true ) . "\" lacks both "
+                               . "factory and class parameters." );
                }
        }
 
index e6a8c45..bcd5942 100644 (file)
  * @ingroup Cache
  */
 class SqlBagOStuff extends BagOStuff {
-       /**
-        * @var LoadBalancer
-        */
-       var $lb;
+       /** @var LoadBalancer */
+       protected $lb;
+
+       protected $serverInfos;
+
+       /** @var array */
+       protected $serverNames;
+
+       /** @var int */
+       protected $numServers;
+
+       /** @var array */
+       protected $conns;
+
+       /** @var int */
+       protected $lastExpireAll = 0;
 
-       var $serverInfos;
-       var $serverNames;
-       var $numServers;
-       var $conns;
-       var $lastExpireAll = 0;
-       var $purgePeriod = 100;
-       var $shards = 1;
-       var $tableName = 'objectcache';
+       /** @var int */
+       protected $purgePeriod = 100;
 
-       protected $connFailureTimes = array(); // UNIX timestamps
-       protected $connFailureErrors = array(); // exceptions
+       /** @var int */
+       protected $shards = 1;
+
+       /** @var string */
+       protected $tableName = 'objectcache';
+
+       /** @var array UNIX timestamps */
+       protected $connFailureTimes = array();
+
+       /** @var array Exceptions */
+       protected $connFailureErrors = array();
 
        /**
         * Constructor. Parameters are:
@@ -721,7 +736,8 @@ class SqlBagOStuff extends BagOStuff {
                if ( $exception->db && $exception->db->wasReadOnlyError() ) {
                        try {
                                $exception->db->rollback( __METHOD__ );
-                       } catch ( DBError $e ) {}
+                       } catch ( DBError $e ) {
+                       }
                }
                wfDebugLog( 'SQLBagOStuff', "DBError: {$exception->getMessage()}" );
                if ( $exception instanceof DBConnectionError ) {
@@ -780,4 +796,5 @@ class SqlBagOStuff extends BagOStuff {
 /**
  * Backwards compatibility alias
  */
-class MediaWikiBagOStuff extends SqlBagOStuff { }
+class MediaWikiBagOStuff extends SqlBagOStuff {
+}
index 464bacd..91f404a 100644 (file)
@@ -32,11 +32,23 @@ class CacheTime {
         */
        public $mUsedOptions;
 
-       var     $mVersion = Parser::VERSION,  # Compatibility check
-               $mCacheTime = '',             # Time when this object was generated, or -1 for uncacheable. Used in ParserCache.
-               $mCacheExpiry = null,         # Seconds after which the object should expire, use 0 for uncachable. Used in ParserCache.
-               $mContainsOldMagic,           # Boolean variable indicating if the input contained variables like {{CURRENTDAY}}
-               $mCacheRevisionId = null;     # Revision ID that was parsed
+       /** @var string Compatibility check */
+       protected $mVersion = Parser::VERSION;
+
+       /** @var string Time when this object was generated, or -1 for uncacheable. Used in ParserCache. */
+       protected $mCacheTime = '';
+
+       /**
+        * @var int Seconds after which the object should expire, use 0 for uncachable.
+        *   Used in ParserCache.
+        */
+       protected $mCacheExpiry = null;
+
+       /** @var bool Boolean variable indicating if the input contained variables like {{CURRENTDAY}} */
+       protected $mContainsOldMagic;
+
+       /** @var int Revision ID that was parsed */
+       protected $mCacheRevisionId = null;
 
        /**
         * @return string TS_MW timestamp
@@ -161,12 +173,14 @@ class CacheTime {
         */
        public function expired( $touched ) {
                global $wgCacheEpoch;
-               return !$this->isCacheable() || // parser says it's uncacheable
-                       $this->getCacheTime() < $touched ||
-                       $this->getCacheTime() <= $wgCacheEpoch ||
-                       $this->getCacheTime() < wfTimestamp( TS_MW, time() - $this->getCacheExpiry() ) || // expiry period has passed
-                       !isset( $this->mVersion ) ||
-                       version_compare( $this->mVersion, Parser::VERSION, "lt" );
+
+               return !$this->isCacheable() // parser says it's uncacheable
+                       || $this->getCacheTime() < $touched
+                       || $this->getCacheTime() <= $wgCacheEpoch
+                       || $this->getCacheTime() <
+                               wfTimestamp( TS_MW, time() - $this->getCacheExpiry() ) // expiry period has passed
+                       || !isset( $this->mVersion )
+                       || version_compare( $this->mVersion, Parser::VERSION, "lt" );
        }
 
        /**
index 65c3e1d..3425b6b 100644 (file)
@@ -71,7 +71,11 @@ class CoreParserFunctions {
                        $parser->setFunctionHook( 'displaytitle', array( __CLASS__, 'displaytitle' ), SFH_NO_HASH );
                }
                if ( $wgAllowSlowParserFunctions ) {
-                       $parser->setFunctionHook( 'pagesinnamespace', array( __CLASS__, 'pagesinnamespace' ), SFH_NO_HASH );
+                       $parser->setFunctionHook(
+                               'pagesinnamespace',
+                               array( __CLASS__, 'pagesinnamespace' ),
+                               SFH_NO_HASH
+                       );
                }
        }
 
@@ -83,7 +87,9 @@ class CoreParserFunctions {
        static function intFunction( $parser, $part1 = '' /*, ... */ ) {
                if ( strval( $part1 ) !== '' ) {
                        $args = array_slice( func_get_args(), 2 );
-                       $message = wfMessage( $part1, $args )->inLanguage( $parser->getOptions()->getUserLangObj() )->plain();
+                       $message = wfMessage( $part1, $args )
+                               ->inLanguage( $parser->getOptions()->getUserLangObj() )->plain();
+
                        return array( $message, 'noparse' => false );
                } else {
                        return array( 'found' => false );
@@ -188,7 +194,7 @@ class CoreParserFunctions {
        /**
         * @param Parser $parser
         * @param string $s
-        * @return
+        * @return string
         */
        static function lc( $parser, $s = '' ) {
                global $wgContLang;
@@ -198,7 +204,7 @@ class CoreParserFunctions {
        /**
         * @param Parser $parser
         * @param string $s
-        * @return
+        * @return string
         */
        static function uc( $parser, $s = '' ) {
                global $wgContLang;
@@ -285,7 +291,7 @@ class CoreParserFunctions {
         * @param Parser $parser
         * @param string $case
         * @param string $word
-        * @return
+        * @return string
         */
        static function grammar( $parser, $case = '', $word = '' ) {
                $word = $parser->killMarkers( $word );
@@ -295,7 +301,7 @@ class CoreParserFunctions {
        /**
         * @param Parser $parser
         * @param string $username
-        * @return
+        * @return string
         */
        static function gender( $parser, $username ) {
                wfProfileIn( __METHOD__ );
@@ -337,7 +343,7 @@ class CoreParserFunctions {
        /**
         * @param Parser $parser
         * @param string $text
-        * @return
+        * @return string
         */
        static function plural( $parser, $text = '' ) {
                $forms = array_slice( func_get_args(), 2 );
@@ -393,12 +399,21 @@ class CoreParserFunctions {
                // only requested titles that normalize to the actual title are allowed through
                // if $wgRestrictDisplayTitle is true (it is by default)
                // mimic the escaping process that occurs in OutputPage::setPageTitle
-               $text = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $text, $htmlTagsCallback, array(), array(), $bad ) );
+               $text = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags(
+                       $text,
+                       $htmlTagsCallback,
+                       array(),
+                       array(),
+                       $bad
+               ) );
                $title = Title::newFromText( Sanitizer::stripAllTags( $text ) );
 
                if ( !$wgRestrictDisplayTitle ) {
                        $parser->mOutput->setDisplayTitle( $text );
-               } elseif ( $title instanceof Title && !$title->hasFragment() && $title->equals( $parser->mTitle ) ) {
+               } elseif ( $title instanceof Title
+                       && !$title->hasFragment()
+                       && $title->equals( $parser->mTitle )
+               ) {
                        $parser->mOutput->setDisplayTitle( $text );
                }
 
@@ -466,6 +481,8 @@ class CoreParserFunctions {
         * corresponding magic word
         * Note: function name changed to "mwnamespace" rather than "namespace"
         * to not break PHP 5.3
+        * @param Parser $parser
+        * @param string $title
         * @return mixed|string
         */
        static function mwnamespace( $parser, $title = null ) {
@@ -521,6 +538,8 @@ class CoreParserFunctions {
        /**
         * Functions to get and normalize pagenames, corresponding to the magic words
         * of the same names
+        * @param Parser $parser
+        * @param string $title
         * @return string
         */
        static function pagename( $parser, $title = null ) {
@@ -626,6 +645,10 @@ class CoreParserFunctions {
         * Return the number of pages, files or subcats in the given category,
         * or 0 if it's nonexistent. This is an expensive parser function and
         * can't be called too many times per page.
+        * @param Parser $parser
+        * @param string $name
+        * @param string $arg1
+        * @param string $arg2
         * @return string
         */
        static function pagesincategory( $parser, $name = '', $arg1 = null, $arg2 = null ) {
@@ -855,8 +878,9 @@ class CoreParserFunctions {
                }
        }
 
-       // Usage {{filepath|300}}, {{filepath|nowiki}}, {{filepath|nowiki|300}} or {{filepath|300|nowiki}}
-       // or {{filepath|300px}}, {{filepath|200x300px}}, {{filepath|nowiki|200x300px}}, {{filepath|200x300px|nowiki}}
+       // Usage {{filepath|300}}, {{filepath|nowiki}}, {{filepath|nowiki|300}}
+       // or {{filepath|300|nowiki}} or {{filepath|300px}}, {{filepath|200x300px}},
+       // {{filepath|nowiki|200x300px}}, {{filepath|200x300px|nowiki}}.
        public static function filepath( $parser, $name = '', $argA = '', $argB = '' ) {
                $file = wfFindFile( $name );
 
@@ -995,6 +1019,7 @@ class CoreParserFunctions {
         * Get the pageid of a specified page
         * @param Parser $parser
         * @param string $title Title to get the pageid from
+        * @return int|null|string
         * @since 1.23
         */
        public static function pageid( $parser, $title = null ) {
@@ -1039,6 +1064,7 @@ class CoreParserFunctions {
         * Get the id from the last revision of a specified page.
         * @param Parser $parser
         * @param string $title Title to get the id from
+        * @return int|null|string
         * @since 1.23
         */
        public static function revisionid( $parser, $title = null ) {
@@ -1055,6 +1081,7 @@ class CoreParserFunctions {
         * Get the day from the last revision of a specified page.
         * @param Parser $parser
         * @param string $title Title to get the day from
+        * @return string
         * @since 1.23
         */
        public static function revisionday( $parser, $title = null ) {
@@ -1071,6 +1098,7 @@ class CoreParserFunctions {
         * Get the day with leading zeros from the last revision of a specified page.
         * @param Parser $parser
         * @param string $title Title to get the day from
+        * @return string
         * @since 1.23
         */
        public static function revisionday2( $parser, $title = null ) {
@@ -1087,6 +1115,7 @@ class CoreParserFunctions {
         * Get the month with leading zeros from the last revision of a specified page.
         * @param Parser $parser
         * @param string $title Title to get the month from
+        * @return string
         * @since 1.23
         */
        public static function revisionmonth( $parser, $title = null ) {
@@ -1103,6 +1132,7 @@ class CoreParserFunctions {
         * Get the month from the last revision of a specified page.
         * @param Parser $parser
         * @param string $title Title to get the month from
+        * @return string
         * @since 1.23
         */
        public static function revisionmonth1( $parser, $title = null ) {
@@ -1119,6 +1149,7 @@ class CoreParserFunctions {
         * Get the year from the last revision of a specified page.
         * @param Parser $parser
         * @param string $title Title to get the year from
+        * @return string
         * @since 1.23
         */
        public static function revisionyear( $parser, $title = null ) {
@@ -1135,6 +1166,7 @@ class CoreParserFunctions {
         * Get the timestamp from the last revision of a specified page.
         * @param Parser $parser
         * @param string $title Title to get the timestamp from
+        * @return string
         * @since 1.23
         */
        public static function revisiontimestamp( $parser, $title = null ) {
@@ -1151,6 +1183,7 @@ class CoreParserFunctions {
         * Get the user from the last revision of a specified page.
         * @param Parser $parser
         * @param string $title Title to get the user from
+        * @return string
         * @since 1.23
         */
        public static function revisionuser( $parser, $title = null ) {
index 3ddc9d4..f022646 100644 (file)
  * @ingroup Parser
  */
 class DateFormatter {
-       var $mSource, $mTarget;
-       var $monthNames = '', $rxDM, $rxMD, $rxDMY, $rxYDM, $rxMDY, $rxYMD;
+       protected $mSource;
 
-       var $regexes, $pDays, $pMonths, $pYears;
-       var $rules, $xMonths, $preferences;
+       protected $mTarget;
+
+       /** @var string */
+       protected $monthNames = '';
+
+       /** @todo Are these unused? */
+       private $rxDM;
+       private $rxMD;
+       private $rxDMY;
+       private $rxYDM;
+       private $rxMDY;
+       private $rxYMD;
+
+       /** @var array */
+       protected $regexes;
+
+       /** @todo Are these unused? */
+       private $pDays;
+       private $pMonths;
+       private $pYears;
+
+       /** @var array */
+       protected $rules;
+
+       /** @var array */
+       protected $xMonths;
+
+       /** @var array */
+       protected $preferences;
+
+       /** @var bool */
+       protected $mLinked;
 
        protected $lang;
 
@@ -205,7 +234,8 @@ class DateFormatter {
 
                $bits = array();
                $key = $this->keys[$this->mSource];
-               for ( $p = 0; $p < strlen( $key ); $p++ ) {
+               $keyLength = strlen( $key );
+               for ( $p = 0; $p < $keyLength; $p++ ) {
                        if ( $key[$p] != ' ' ) {
                                $bits[$key[$p]] = $matches[$p + 1];
                        }
@@ -254,7 +284,8 @@ class DateFormatter {
                        $bits['d'] = sprintf( '%02d', $bits['j'] );
                }
 
-               for ( $p = 0; $p < strlen( $format ); $p++ ) {
+               $formatLength = strlen( $format );
+               for ( $p = 0; $p < $formatLength; $p++ ) {
                        $char = $format[$p];
                        switch ( $char ) {
                                case 'd': # ISO day of month
@@ -293,6 +324,7 @@ class DateFormatter {
                        }
                }
                if ( $fail ) {
+                       /** @todo FIXME: $matches doesn't exist here, what's expected? */
                        $text = $matches[0];
                }
 
@@ -354,6 +386,7 @@ class DateFormatter {
 
        /**
         * @todo document
+        * @param string $iso
         * @return int|string
         */
        function makeNormalYear( $iso ) {
index 2f95af2..fd84265 100644 (file)
  * @ingroup Parser
  */
 class LinkHolderArray {
-       var $internals = array(), $interwikis = array();
-       var $size = 0;
-       var $parent;
+       /** @var array */
+       public $internals = array();
+
+       /** @var array */
+       public $interwikis = array();
+
+       /** @var int */
+       protected $size = 0;
+
+       /** @var Parser */
+       protected $parent;
+
+       /** @var int */
        protected $tempIdOffset;
 
        function __construct( $parent ) {
@@ -151,6 +161,7 @@ class LinkHolderArray {
        /**
         * Get a subset of the current LinkHolderArray which is sufficient to
         * interpret the given text.
+        * @param string $text
         * @return LinkHolderArray
         */
        function getSubArray( $text ) {
@@ -253,12 +264,14 @@ class LinkHolderArray {
        /**
         * Replace <!--LINK--> link placeholders with actual links, in the buffer
         *
+        * @param $text
         * @return array Array of link CSS classes, indexed by PDBK.
         */
        function replace( &$text ) {
                wfProfileIn( __METHOD__ );
 
-               $colours = $this->replaceInternal( $text ); // FIXME: replaceInternal doesn't return a value
+               /** @todo FIXME: replaceInternal doesn't return a value */
+               $colours = $this->replaceInternal( $text );
                $this->replaceInterwiki( $text );
 
                wfProfileOut( __METHOD__ );
@@ -334,7 +347,8 @@ class LinkHolderArray {
 
                        $res = $dbr->select(
                                'page',
-                               array( 'page_id', 'page_namespace', 'page_title', 'page_is_redirect', 'page_len', 'page_latest' ),
+                               array( 'page_id', 'page_namespace', 'page_title',
+                                       'page_is_redirect', 'page_len', 'page_latest' ),
                                $dbr->makeList( $where, LIST_OR ),
                                __METHOD__
                        );
@@ -537,7 +551,8 @@ class LinkHolderArray {
                        // construct query
                        $dbr = wfGetDB( DB_SLAVE );
                        $varRes = $dbr->select( 'page',
-                               array( 'page_id', 'page_namespace', 'page_title', 'page_is_redirect', 'page_len', 'page_latest' ),
+                               array( 'page_id', 'page_namespace', 'page_title',
+                                       'page_is_redirect', 'page_len', 'page_latest' ),
                                $linkBatch->constructSet( 'page', $dbr ),
                                __METHOD__
                        );
index 35b1b17..2066580 100644 (file)
@@ -119,107 +119,205 @@ class Parser {
        const TOC_START = '<mw:toc>';
        const TOC_END = '</mw:toc>';
 
-       # Persistent:
-       var $mTagHooks = array();
-       var $mTransparentTagHooks = array();
-       var $mFunctionHooks = array();
-       var $mFunctionSynonyms = array( 0 => array(), 1 => array() );
-       var $mFunctionTagHooks = array();
-       var $mStripList = array();
-       var $mDefaultStripList = array();
-       var $mVarCache = array();
-       var $mImageParams = array();
-       var $mImageParamsMagicArray = array();
-       var $mMarkerIndex = 0;
-       var $mFirstCall = true;
+       # Persistent
 
-       # Initialised by initialiseVariables()
+       /** @var array */
+       public $mTagHooks = array();
 
-       /**
-        * @var MagicWordArray
-        */
-       var $mVariables;
+       /** @var array */
+       public $mTransparentTagHooks = array();
+
+       /** @var array */
+       public $mFunctionHooks = array();
+
+       /** @var array */
+       protected $mFunctionSynonyms = array( 0 => array(), 1 => array() );
+
+       /** @var array */
+       protected $mFunctionTagHooks = array();
+
+       /** @var array */
+       protected $mStripList = array();
 
        /**
-        * @var MagicWordArray
+        * @var array
+        * @todo Unused?
         */
-       var $mSubstWords;
-       var $mConf, $mPreprocessor, $mExtLinkBracketedRegex, $mUrlProtocols; # Initialised in constructor
+       private $mDefaultStripList = array();
+
+       /** @var array */
+       protected $mVarCache = array();
+
+       /** @var array */
+       protected $mImageParams = array();
+
+       /** @var array */
+       protected $mImageParamsMagicArray = array();
+
+       /** @var int */
+       public $mMarkerIndex = 0;
+
+       /** @var bool */
+       protected $mFirstCall = true;
+
+       # Initialised by initialiseVariables()
+
+       /** @var MagicWordArray */
+       public $mVariables;
+
+       /** @var MagicWordArray */
+       protected $mSubstWords;
+
+       # Initialised in constructor
+
+       /** @var array */
+       protected $mConf;
+
+       /** @var Parser */
+       public $mPreprocessor;
+
+       /** @var string */
+       protected $mExtLinkBracketedRegex;
+
+       /** @var string */
+       protected $mUrlProtocols;
 
        # Cleared with clearState():
-       /**
-        * @var ParserOutput
-        */
-       var $mOutput;
-       var $mAutonumber, $mDTopen;
+
+       /** @var ParserOutput */
+       public $mOutput;
+
+       /** @var int */
+       protected $mAutonumber;
+
+       /** @var bool */
+       protected $mDTopen;
+
+       /** @var StripState */
+       public $mStripState;
 
        /**
-        * @var StripState
+        * @var array
+        * @todo Unused?
         */
-       var $mStripState;
+       private $mIncludeCount;
 
-       var $mIncludeCount, $mArgStack, $mLastSection, $mInPre;
        /**
-        * @var LinkHolderArray
+        * @var bool
+        * @todo Unused?
         */
-       var $mLinkHolders;
+       private $mArgStack;
 
-       var $mLinkID;
-       var $mIncludeSizes, $mPPNodeCount, $mGeneratedPPNodeCount, $mHighestExpansionDepth;
-       var $mDefaultSort;
-       var $mTplExpandCache; # empty-frame expansion cache
-       var $mTplRedirCache, $mTplDomCache, $mHeadings, $mDoubleUnderscores;
-       var $mExpensiveFunctionCount; # number of expensive parser function calls
-       var $mShowToc, $mForceTocPosition;
+       /** @var string */
+       protected $mLastSection;
 
-       /**
-        * @var User
-        */
-       var $mUser; # User object; only used when doing pre-save transform
+       /** @var bool */
+       protected $mInPre;
+
+       /** @var LinkHolderArray */
+       protected $mLinkHolders;
+
+       /** @var int */
+       protected $mLinkID;
+
+       /** @var array */
+       protected $mIncludeSizes;
+
+       /** @var int */
+       public $mPPNodeCount;
+
+       /** @var int */
+       public $mGeneratedPPNodeCount;
+
+       /** @var int */
+       public $mHighestExpansionDepth;
+
+       /** @var bool|string */
+       protected $mDefaultSort;
+
+       /** @var array Empty-frame expansion cache */
+       protected $mTplExpandCache;
+
+       /** @var array */
+       protected $mTplRedirCache;
+
+       /** @var array */
+       protected $mTplDomCache;
+
+       /** @var array */
+       public $mHeadings;
+
+       /** @var array */
+       protected $mDoubleUnderscores;
+
+       /** @var int Number of expensive parser function calls */
+       protected $mExpensiveFunctionCount;
+
+       /** @var bool */
+       protected $mShowToc;
+
+       /** @var bool */
+       protected $mForceTocPosition;
+
+       /** @var User User object; only used when doing pre-save transform */
+       protected $mUser;
 
        # Temporary
        # These are variables reset at least once per parse regardless of $clearState
 
-       /**
-        * @var ParserOptions
-        */
-       var $mOptions;
+       /** @var ParserOptions */
+       public $mOptions;
 
-       /**
-        * @var Title
-        */
-       var $mTitle;        # Title context, used for self-link rendering and similar things
-       var $mOutputType;   # Output type, one of the OT_xxx constants
-       var $ot;            # Shortcut alias, see setOutputType()
-       var $mRevisionObject; # The revision object of the specified revision ID
-       var $mRevisionId;   # ID to display in {{REVISIONID}} tags
-       var $mRevisionTimestamp; # The timestamp of the specified revision ID
-       var $mRevisionUser; # User to display in {{REVISIONUSER}} tag
-       var $mRevisionSize; # Size to display in {{REVISIONSIZE}} variable
-       var $mRevIdForTs;   # The revision ID which was used to fetch the timestamp
-       var $mInputSize = false; # For {{PAGESIZE}} on current page.
+       /** @var Title Title context, used for self-link rendering and similar things */
+       public $mTitle;
+
+       /** @var array Shortcut alias, see setOutputType() */
+       public $ot;
+
+       /** @var string The timestamp of the specified revision ID */
+       public $mRevisionTimestamp;
+
+       /** @var string */
+       public $mUniqPrefix;
 
        /**
-        * @var string
+        * @var boolean Recursive call protection.
+        * This variable should be treated as if it were private.
         */
-       var $mUniqPrefix;
+       public $mInParse = false;
+
+       /** @var int Output type, one of the OT_xxx constants */
+       protected $mOutputType;
+
+       /** @var Revision The revision object of the specified revision ID */
+       protected $mRevisionObject;
+
+       /** @var int ID to display in {{REVISIONID}} tags */
+       protected $mRevisionId;
+
+       /** @var string User to display in {{REVISIONUSER}} tag */
+       protected $mRevisionUser;
+
+       /** @var int Size to display in {{REVISIONSIZE}} variable */
+       protected $mRevisionSize;
+
+       /** @var bool|int For {{PAGESIZE}} on current page. */
+       protected $mInputSize = false;
 
        /**
         * @var array Array with the language name of each language link (i.e. the
         * interwiki prefix) in the key, value arbitrary. Used to avoid sending
         * duplicate language links to the ParserOutput.
         */
-       var $mLangLinkLanguages;
+       protected $mLangLinkLanguages;
 
        /**
-        * @var boolean Recursive call protection.
-        * This variable should be treated as if it were private.
+        * @var int The revision ID which was used to fetch the timestamp
+        * @todo Unused?
         */
-       public $mInParse = false;
+       private $mRevIdForTs;
 
        /**
-        * Constructor
-        *
         * @param array $conf
         */
        public function __construct( $conf = array() ) {
@@ -360,7 +458,9 @@ class Parser {
         * @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 ) {
+       public function parse( $text, Title $title, ParserOptions $options,
+               $linestart = true, $clearState = true, $revid = null
+       ) {
                /**
                 * First pass--just handle <nowiki> sections, pass the rest off
                 * to internalParse() which does all the real work.
@@ -602,7 +702,7 @@ class Parser {
         * If $frame is not provided, then template variables (e.g., {{{1}}}) within $text are not expanded
         *
         * @param string $text Text extension wants to have parsed
-        * @param PPFrame $frame The frame to use for expanding any template variables
+        * @param bool|PPFrame $frame The frame to use for expanding any template variables
         *
         * @return string
         */
@@ -644,7 +744,7 @@ class Parser {
         * hook.
         *
         * @param string $text Text to be expanded
-        * @param PPFrame $frame The frame to use for expanding any template variables
+        * @param bool|PPFrame $frame The frame to use for expanding any template variables
         * @return string
         * @since 1.19
         */
@@ -1091,7 +1191,10 @@ 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 = '+';
@@ -1236,7 +1339,12 @@ class Parser {
                }
 
                wfRunHooks( 'InternalParseBeforeSanitize', array( &$this, &$text, &$this->mStripState ) );
-               $text = Sanitizer::removeHTMLtags( $text, array( &$this, 'attributeStripCallback' ), false, array_keys( $this->mTransparentTagHooks ) );
+               $text = Sanitizer::removeHTMLtags(
+                       $text,
+                       array( &$this, 'attributeStripCallback' ),
+                       false,
+                       array_keys( $this->mTransparentTagHooks )
+               );
                wfRunHooks( 'InternalParseBeforeLinks', array( &$this, &$text, &$this->mStripState ) );
 
                # Tables need to come after variable replacement for things to work
@@ -1642,7 +1750,8 @@ class Parser {
                $bits = preg_split( $this->mExtLinkBracketedRegex, $text, -1, PREG_SPLIT_DELIM_CAPTURE );
                if ( $bits === false ) {
                        wfProfileOut( __METHOD__ );
-                       throw new MWException( "PCRE needs to be compiled with --enable-unicode-properties in order for MediaWiki to function" );
+                       throw new MWException( "PCRE needs to be compiled with "
+                               . "--enable-unicode-properties in order for MediaWiki to function" );
                }
                $s = array_shift( $bits );
 
@@ -1788,13 +1897,12 @@ class Parser {
        /**
         * make an image if it's allowed, either through the global
         * option, through the exception, or through the on-wiki whitelist
-        * @private
         *
-        * $param string $url
+        * @param string $url
         *
         * @return string
         */
-       function maybeMakeExternalImage( $url ) {
+       private function maybeMakeExternalImage( $url ) {
                $imagesfrom = $this->mOptions->getAllowExternalImagesFrom();
                $imagesexception = !empty( $imagesfrom );
                $text = false;
@@ -1812,16 +1920,23 @@ class Parser {
                } else {
                        $imagematch = false;
                }
+
                if ( $this->mOptions->getAllowExternalImages()
-                       || ( $imagesexception && $imagematch ) ) {
+                       || ( $imagesexception && $imagematch )
+               ) {
                        if ( preg_match( self::EXT_IMAGE_REGEX, $url ) ) {
                                # Image found
                                $text = Linker::makeExternalImage( $url );
                        }
                }
                if ( !$text && $this->mOptions->getEnableImageWhitelist()
-                       && preg_match( self::EXT_IMAGE_REGEX, $url ) ) {
-                       $whitelist = explode( "\n", wfMessage( 'external_image_whitelist' )->inContentLanguage()->text() );
+                       && preg_match( self::EXT_IMAGE_REGEX, $url )
+               ) {
+                       $whitelist = explode(
+                               "\n",
+                               wfMessage( 'external_image_whitelist' )->inContentLanguage()->text()
+                       );
+
                        foreach ( $whitelist as $entry ) {
                                # Sanitize the regex fragment, make it case-insensitive, ignore blank entries/comments
                                if ( strpos( $entry, '#' ) === 0 || $entry === '' ) {
@@ -1914,8 +2029,11 @@ class Parser {
                $useSubpages = $this->areSubpagesAllowed();
                wfProfileOut( __METHOD__ . '-setup' );
 
+               // @codingStandardsIgnoreStart Squiz.WhiteSpace.SemicolonSpacing.Incorrect
                # Loop for each link
                for ( ; $line !== false && $line !== null; $a->next(), $line = $a->current() ) {
+                       // @codingStandardsIgnoreStart
+
                        # Check for excessive memory usage
                        if ( $holders->isBig() ) {
                                # Too big
@@ -1966,7 +2084,8 @@ class Parser {
                                        $m[1] = str_replace( array( '<', '>' ), array( '&lt;', '&gt;' ), rawurldecode( $m[1] ) );
                                }
                                $trail = $m[3];
-                       } elseif ( preg_match( $e1_img, $line, $m ) ) { # Invalid, but might be an image with a link in its caption
+                       } elseif ( preg_match( $e1_img, $line, $m ) ) {
+                               # Invalid, but might be an image with a link in its caption
                                $might_be_img = true;
                                $text = $m[2];
                                if ( strpos( $m[1], '%' ) !== false ) {
@@ -2076,7 +2195,9 @@ class Parser {
                        if ( $noforce ) {
                                # Interwikis
                                wfProfileIn( __METHOD__ . "-interwiki" );
-                               if ( $iw && $this->mOptions->getInterwikiMagic() && $nottalk && Language::fetchLanguageName( $iw, null, 'mw' ) ) {
+                               if ( $iw && $this->mOptions->getInterwikiMagic()
+                                       && $nottalk && Language::fetchLanguageName( $iw, null, 'mw' )
+                               ) {
                                        // XXX: the above check prevents links to sites with identifiers that are not language codes
 
                                        # Bug 24502: filter duplicates
@@ -2348,7 +2469,7 @@ class Parser {
        }
 
        /**
-        * TODO: document
+        * @todo Document
         * @param string $char
         * @private
         *
@@ -2488,13 +2609,22 @@ class Parser {
                                wfProfileIn( __METHOD__ . "-paragraph" );
                                # No prefix (not in list)--go to paragraph mode
                                # XXX: use a stack for nestable elements like span, table and div
-                               $openmatch = preg_match( '/(?:<table|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<dl|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
+                               $openmatch = preg_match(
+                                       '/(?:<table|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|'
+                                               . '<p|<ul|<ol|<dl|<li|<\\/tr|<\\/td|<\\/th)/iS',
+                                       $t
+                               );
                                $closematch = preg_match(
-                                       '/(?:<\\/table|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|' .
-                                       '<td|<th|<\\/?blockquote|<\\/?div|<hr|<\\/pre|<\\/p|<\\/mw:|' . $this->mUniqPrefix . '-pre|<\\/li|<\\/ul|<\\/ol|<\\/dl|<\\/?center)/iS', $t );
+                                       '/(?:<\\/table|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'
+                                               . '<td|<th|<\\/?blockquote|<\\/?div|<hr|<\\/pre|<\\/p|<\\/mw:|'
+                                               . $this->mUniqPrefix
+                                               . '-pre|<\\/li|<\\/ul|<\\/ol|<\\/dl|<\\/?center)/iS',
+                                       $t
+                               );
+
                                if ( $openmatch or $closematch ) {
                                        $paragraphStack = false;
-                                       # TODO bug 5718: paragraph closed
+                                       # @todo bug 5718: paragraph closed
                                        $output .= $this->closeParagraph();
                                        if ( $preOpenMatch and !$preCloseMatch ) {
                                                $this->mInPre = true;
@@ -2506,7 +2636,10 @@ class Parser {
                                        }
                                        $inBlockElem = !$closematch;
                                } elseif ( !$inBlockElem && !$this->mInPre ) {
-                                       if ( ' ' == substr( $t, 0, 1 ) and ( $this->mLastSection === 'pre' || trim( $t ) != '' ) and !$inBlockquote ) {
+                                       if ( ' ' == substr( $t, 0, 1 )
+                                               && ( $this->mLastSection === 'pre' || trim( $t ) != '' )
+                                               && !$inBlockquote
+                                       ) {
                                                # pre
                                                if ( $this->mLastSection !== 'pre' ) {
                                                        $paragraphStack = false;
@@ -2744,7 +2877,7 @@ class Parser {
         * @return string
         */
        function getVariableValue( $index, $frame = false ) {
-               global $wgContLang, $wgSitename, $wgServer;
+               global $wgContLang, $wgSitename, $wgServer, $wgServerName;
                global $wgArticlePath, $wgScriptPath, $wgStylePath;
 
                if ( is_null( $this->mTitle ) ) {
@@ -2836,13 +2969,21 @@ class Parser {
                                $value = wfEscapeWikiText( $this->mTitle->getRootText() );
                                break;
                        case 'rootpagenamee':
-                               $value = wfEscapeWikiText( wfUrlEncode( str_replace( ' ', '_', $this->mTitle->getRootText() ) ) );
+                               $value = wfEscapeWikiText( wfUrlEncode( str_replace(
+                                       ' ',
+                                       '_',
+                                       $this->mTitle->getRootText()
+                               ) ) );
                                break;
                        case 'basepagename':
                                $value = wfEscapeWikiText( $this->mTitle->getBaseText() );
                                break;
                        case 'basepagenamee':
-                               $value = wfEscapeWikiText( wfUrlEncode( str_replace( ' ', '_', $this->mTitle->getBaseText() ) ) );
+                               $value = wfEscapeWikiText( wfUrlEncode( str_replace(
+                                       ' ',
+                                       '_',
+                                       $this->mTitle->getBaseText()
+                               ) ) );
                                break;
                        case 'talkpagename':
                                if ( $this->mTitle->canTalk() ) {
@@ -2953,7 +3094,9 @@ class Parser {
                                $value = $this->mTitle->getNamespace();
                                break;
                        case 'talkspace':
-                               $value = $this->mTitle->canTalk() ? str_replace( '_', ' ', $this->mTitle->getTalkNsText() ) : '';
+                               $value = $this->mTitle->canTalk()
+                                       ? str_replace( '_', ' ', $this->mTitle->getTalkNsText() )
+                                       : '';
                                break;
                        case 'talkspacee':
                                $value = $this->mTitle->canTalk() ? wfUrlencode( $this->mTitle->getTalkNsText() ) : '';
@@ -2985,13 +3128,19 @@ class Parser {
                                $value = $pageLang->formatNum( MWTimestamp::getInstance( $ts )->format( 'w' ) );
                                break;
                        case 'localdayname':
-                               $value = $pageLang->getWeekdayName( (int)MWTimestamp::getLocalInstance( $ts )->format( 'w' ) + 1 );
+                               $value = $pageLang->getWeekdayName(
+                                       (int)MWTimestamp::getLocalInstance( $ts )->format( 'w' ) + 1
+                               );
                                break;
                        case 'localyear':
                                $value = $pageLang->formatNum( MWTimestamp::getLocalInstance( $ts )->format( 'Y' ), true );
                                break;
                        case 'localtime':
-                               $value = $pageLang->time( MWTimestamp::getLocalInstance( $ts )->format( 'YmdHis' ), false, false );
+                               $value = $pageLang->time(
+                                       MWTimestamp::getLocalInstance( $ts )->format( 'YmdHis' ),
+                                       false,
+                                       false
+                               );
                                break;
                        case 'localhour':
                                $value = $pageLang->formatNum( MWTimestamp::getLocalInstance( $ts )->format( 'H' ), true );
@@ -3045,8 +3194,7 @@ class Parser {
                        case 'server':
                                return $wgServer;
                        case 'servername':
-                               $serverParts = wfParseUrl( $wgServer );
-                               return $serverParts && isset( $serverParts['host'] ) ? $serverParts['host'] : $wgServer;
+                               return $wgServerName;
                        case 'scriptpath':
                                return $wgScriptPath;
                        case 'stylepath':
@@ -3061,7 +3209,11 @@ class Parser {
                                break;
                        default:
                                $ret = null;
-                               wfRunHooks( 'ParserGetVariableValueSwitch', array( &$this, &$this->mVarCache, &$index, &$ret, &$frame ) );
+                               wfRunHooks(
+                                       'ParserGetVariableValueSwitch',
+                                       array( &$this, &$this->mVarCache, &$index, &$ret, &$frame )
+                               );
+
                                return $ret;
                }
 
@@ -3145,15 +3297,16 @@ class Parser {
         *  self::OT_HTML: all templates and extension tags
         *
         * @param string $text The text to transform
-        * @param PPFrame $frame 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.
-        * @param bool $argsOnly Only do argument (triple-brace) expansion, not double-brace expansion
-        * @private
-        *
+        * @param bool|PPFrame $frame 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.
+        * @param bool $argsOnly Only do argument (triple-brace) expansion, not
+        *   double-brace expansion.
         * @return string
         */
-       function replaceVariables( $text, $frame = false, $argsOnly = false ) {
+       public function replaceVariables( $text, $frame = false, $argsOnly = false ) {
                # Is there any text? Also, Prevent too big inclusions!
                if ( strlen( $text ) < 1 || strlen( $text ) > $this->mOptions->getMaxIncludeSize() ) {
                        return $text;
@@ -3163,7 +3316,8 @@ class Parser {
                if ( $frame === false ) {
                        $frame = $this->getPreprocessor()->newFrame();
                } elseif ( !( $frame instanceof PPFrame ) ) {
-                       wfDebug( __METHOD__ . " called using plain parameters instead of a PPFrame instance. Creating custom frame.\n" );
+                       wfDebug( __METHOD__ . " called using plain parameters instead of "
+                               . "a PPFrame instance. Creating custom frame.\n" );
                        $frame = $this->getPreprocessor()->newCustomFrame( $frame );
                }
 
@@ -3224,8 +3378,8 @@ class Parser {
         *   'expansion-depth-exceeded' (corresponding messages:
         *       'expansion-depth-exceeded-warning',
         *       'expansion-depth-exceeded-category')
-        * @param int|null $current Current value
-        * @param int|null $max Maximum allowed, when an explicit limit has been
+        * @param string|int|null $current Current value
+        * @param string|int|null $max Maximum allowed, when an explicit limit has been
         *       exceeded, provide the values (optional)
         */
        function limitationWarn( $limitationType, $current = '', $max = '' ) {
@@ -3241,25 +3395,31 @@ class Parser {
         * replacing any variables or templates within 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
+        *   $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
         * @param PPFrame $frame The current frame, contains template arguments
-        * @throws MWException
+        * @throws Exception
         * @return string The text of the template
-        * @private
         */
-       function braceSubstitution( $piece, $frame ) {
+       public function braceSubstitution( $piece, $frame ) {
                wfProfileIn( __METHOD__ );
                wfProfileIn( __METHOD__ . '-setup' );
 
-               # Flags
-               $found = false;             # $text has been filled
-               $nowiki = false;            # wiki markup in $text should be escaped
-               $isHTML = false;            # $text is HTML, armour it against wikitext transformation
-               $forceRawInterwiki = false; # Force interwiki transclusion to be done in raw mode not rendered
-               $isChildObj = false;        # $text is a DOM node needing expansion in a child frame
-               $isLocalObj = false;        # $text is a DOM node needing expansion in the current frame
+               // Flags
+
+               // $text has been filled
+               $found = false;
+               // wiki markup in $text should be escaped
+               $nowiki = false;
+               // $text is HTML, armour it against wikitext transformation
+               $isHTML = false;
+               // Force interwiki transclusion to be done in raw mode not rendered
+               $forceRawInterwiki = false;
+               // $text is a DOM node needing expansion in a child frame
+               $isChildObj = false;
+               // $text is a DOM node needing expansion in the current frame
+               $isLocalObj = false;
 
                # Title object, where $text came from
                $title = false;
@@ -3274,7 +3434,8 @@ class Parser {
                $originalTitle = $part1;
 
                # $args is a list of argument nodes, starting from index 0, not including $part1
-               # @todo FIXME: If piece['parts'] is null then the call to getLength() below won't work b/c this $args isn't an object
+               # @todo FIXME: If piece['parts'] is null then the call to getLength()
+               # below won't work b/c this $args isn't an object
                $args = ( null == $piece['parts'] ) ? array() : $piece['parts'];
                wfProfileOut( __METHOD__ . '-setup' );
 
@@ -3414,7 +3575,8 @@ class Parser {
                                        // "uselang" will have no effect since the Language object
                                        // is forced to the one defined in ParserOptions.
                                        $pageArgs = array();
-                                       for ( $i = 0; $i < $args->getLength(); $i++ ) {
+                                       $argsLength = $args->getLength();
+                                       for ( $i = 0; $i < $argsLength; $i++ ) {
                                                $bits = $args->item( $i )->splitArg();
                                                if ( strval( $bits['index'] ) === '' ) {
                                                        $name = trim( $frame->expand( $bits['name'], PPFrame::STRIP_COMMENTS ) );
@@ -3547,7 +3709,8 @@ class Parser {
                                preg_replace( '/^:/', '', $originalTitle );
                                $text = "[[:$originalTitle]]";
                        }
-                       $text .= $this->insertStripItem( '<!-- WARNING: template omitted, post-expand include size too large -->' );
+                       $text .= $this->insertStripItem( '<!-- WARNING: template omitted, '
+                               . 'post-expand include size too large -->' );
                        $this->limitationWarn( 'post-expand-template-inclusion' );
                }
 
@@ -3577,6 +3740,7 @@ class Parser {
         * @param PPFrame $frame The current frame, contains template arguments
         * @param string $function Function name
         * @param array $args Arguments to the function
+        * @throws MWException
         * @return array
         */
        public function callParserFunction( $frame, $function, array $args = array() ) {
@@ -3721,7 +3885,8 @@ class Parser {
         * @return array ( string or false, Title )
         */
        function fetchTemplateAndTitle( $title ) {
-               $templateCb = $this->mOptions->getTemplateCallback(); # Defaults to Parser::statelessFetchTemplate()
+               // Defaults to Parser::statelessFetchTemplate()
+               $templateCb = $this->mOptions->getTemplateCallback();
                $stuff = call_user_func( $templateCb, $title, $this );
                $text = $stuff['text'];
                $finalTitle = isset( $stuff['finalTitle'] ) ? $stuff['finalTitle'] : $title;
@@ -3753,7 +3918,7 @@ class Parser {
         * Can be overridden via ParserOptions::setTemplateCallback().
         *
         * @param Title $title
-        * @param Parser $parser
+        * @param bool|Parser $parser
         *
         * @return array
         */
@@ -3930,8 +4095,10 @@ class Parser {
                $status = $req->execute(); // Status object
                if ( $status->isOK() ) {
                        $text = $req->getContent();
-               } elseif ( $req->getStatus() != 200 ) { // Though we failed to fetch the content, this status is useless.
-                       return wfMessage( 'scarytranscludefailed-httpstatus', $url, $req->getStatus() /* HTTP status */ )->inContentLanguage()->text();
+               } elseif ( $req->getStatus() != 200 ) {
+                       // Though we failed to fetch the content, this status is useless.
+                       return wfMessage( 'scarytranscludefailed-httpstatus' )
+                               ->params( $url, $req->getStatus() /* HTTP status */ )->inContentLanguage()->text();
                } else {
                        return wfMessage( 'scarytranscludefailed', $url )->inContentLanguage()->text();
                }
@@ -4013,7 +4180,8 @@ class Parser {
                $name = $frame->expand( $params['name'] );
                $attrText = !isset( $params['attr'] ) ? null : $frame->expand( $params['attr'] );
                $content = !isset( $params['inner'] ) ? null : $frame->expand( $params['inner'] );
-               $marker = "{$this->mUniqPrefix}-$name-" . sprintf( '%08X', $this->mMarkerIndex++ ) . self::MARKER_SUFFIX;
+               $marker = "{$this->mUniqPrefix}-$name-"
+                       . sprintf( '%08X', $this->mMarkerIndex++ ) . self::MARKER_SUFFIX;
 
                $isFunctionTag = isset( $this->mFunctionTagHooks[strtolower( $name )] ) &&
                        ( $this->ot['html'] || $this->ot['pre'] );
@@ -4145,7 +4313,9 @@ class Parser {
                if ( isset( $this->mDoubleUnderscores['notoc'] ) && !$this->mForceTocPosition ) {
                        $this->mShowToc = false;
                }
-               if ( isset( $this->mDoubleUnderscores['hiddencat'] ) && $this->mTitle->getNamespace() == NS_CATEGORY ) {
+               if ( isset( $this->mDoubleUnderscores['hiddencat'] )
+                       && $this->mTitle->getNamespace() == NS_CATEGORY
+               ) {
                        $this->addTrackingCategory( 'hidden-category-category' );
                }
                # (bug 8068) Allow control over whether robots index a page.
@@ -4240,7 +4410,11 @@ class Parser {
                # Get all headlines for numbering them and adding funky stuff like [edit]
                # links - this is for later, but we need the number of headlines right now
                $matches = array();
-               $numMatches = preg_match_all( '/<H(?P<level>[1-6])(?P<attrib>.*?' . '>)\s*(?P<header>[\s\S]*?)\s*<\/H[1-6] *>/i', $text, $matches );
+               $numMatches = preg_match_all(
+                       '/<H(?P<level>[1-6])(?P<attrib>.*?' . '>)\s*(?P<header>[\s\S]*?)\s*<\/H[1-6] *>/i',
+                       $text,
+                       $matches
+               );
 
                # if there are fewer than 4 headlines in the article, do not show TOC
                # unless it's been explicitly enabled.
@@ -4389,7 +4563,10 @@ class Parser {
                        # We strip any parameter from accepted tags (second regex), except dir="rtl|ltr" from <span>,
                        # to allow setting directionality in toc items.
                        $tocline = preg_replace(
-                               array( '#<(?!/?(span|sup|sub|i|b)(?: [^>]*)?>).*?' . '>#', '#<(/?(?:span(?: dir="(?:rtl|ltr)")?|sup|sub|i|b))(?: .*?)?' . '>#' ),
+                               array(
+                                       '#<(?!/?(span|sup|sub|i|b)(?: [^>]*)?>).*?' . '>#',
+                                       '#<(/?(?:span(?: dir="(?:rtl|ltr)")?|sup|sub|i|b))(?: .*?)?' . '>#'
+                               ),
                                array( '', '<$1>' ),
                                $safeHeadline
                        );
@@ -4453,7 +4630,11 @@ class Parser {
                        # Don't number the heading if it is the only one (looks silly)
                        if ( count( $matches[3] ) > 1 && $this->mOptions->getNumberHeadings() ) {
                                # the two are different if the line contains a link
-                               $headline = Html::element( 'span', array( 'class' => 'mw-headline-number' ), $numbering ) . ' ' . $headline;
+                               $headline = Html::element(
+                                       'span',
+                                       array( 'class' => 'mw-headline-number' ),
+                                       $numbering
+                               ) . ' ' . $headline;
                        }
 
                        # Create the anchor for linking from the TOC to the section
@@ -4503,14 +4684,22 @@ class Parser {
                                        # that sections inside <includeonly> should be counted.
                                        $editlinkArgs = array( $titleText, "T-$sectionIndex"/*, null */ );
                                } else {
-                                       $editlinkArgs = array( $this->mTitle->getPrefixedText(), $sectionIndex, $headlineHint );
+                                       $editlinkArgs = array(
+                                               $this->mTitle->getPrefixedText(),
+                                               $sectionIndex,
+                                               $headlineHint
+                                       );
                                }
-                               // We use a bit of pesudo-xml for editsection markers. The language converter is run later on
-                               // Using a UNIQ style marker leads to the converter screwing up the tokens when it converts stuff
-                               // And trying to insert strip tags fails too. At this point all real inputted tags have already been escaped
-                               // so we don't have to worry about a user trying to input one of these markers directly.
-                               // We use a page and section attribute to stop the language converter from converting these important bits
-                               // of data, but put the headline hint inside a content block because the language converter is supposed to
+                               // We use a bit of pesudo-xml for editsection markers. The
+                               // language converter is run later on. Using a UNIQ style marker
+                               // leads to the converter screwing up the tokens when it
+                               // converts stuff. And trying to insert strip tags fails too. At
+                               // this point all real inputted tags have already been escaped,
+                               // so we don't have to worry about a user trying to input one of
+                               // these markers directly. We use a page and section attribute
+                               // to stop the language converter from converting these
+                               // important bits of data, but put the headline hint inside a
+                               // content block because the language converter is supposed to
                                // be able to convert that piece of data.
                                $editlink = '<mw:editsection page="' . htmlspecialchars( $editlinkArgs[0] );
                                $editlink .= '" section="' . htmlspecialchars( $editlinkArgs[1] ) . '"';
@@ -4605,7 +4794,9 @@ class Parser {
         * @param bool $clearState Whether to clear the parser state first
         * @return string The altered wiki markup
         */
-       public function preSaveTransform( $text, Title $title, User $user, ParserOptions $options, $clearState = true ) {
+       public function preSaveTransform( $text, Title $title, User $user,
+               ParserOptions $options, $clearState = true
+       ) {
                if ( $clearState ) {
                        $magicScopeVariable = $this->lock();
                }
@@ -4677,10 +4868,14 @@ class Parser {
                $tc = '[' . Title::legalChars() . ']';
                $nc = '[ _0-9A-Za-z\x80-\xff-]'; # Namespaces can use non-ascii!
 
-               $p1 = "/\[\[(:?$nc+:|:|)($tc+?)( ?\\($tc+\\))\\|]]/";                   # [[ns:page (context)|]]
-               $p4 = "/\[\[(:?$nc+:|:|)($tc+?)( ?($tc+))\\|]]/";                           # [[ns:page(context)|]] (double-width brackets, added in r40257)
-               $p3 = "/\[\[(:?$nc+:|:|)($tc+?)( ?\\($tc+\\)|)((?:, |,)$tc+|)\\|]]/";         # [[ns:page (context), context|]] (using either single or double-width comma)
-               $p2 = "/\[\[\\|($tc+)]]/";                                              # [[|page]] (reverse pipe trick: add context from page title)
+               // [[ns:page (context)|]]
+               $p1 = "/\[\[(:?$nc+:|:|)($tc+?)( ?\\($tc+\\))\\|]]/";
+               // [[ns:page(context)|]] (double-width brackets, added in r40257)
+               $p4 = "/\[\[(:?$nc+:|:|)($tc+?)( ?($tc+))\\|]]/";
+               // [[ns:page (context), context|]] (using either single or double-width comma)
+               $p3 = "/\[\[(:?$nc+:|:|)($tc+?)( ?\\($tc+\\)|)((?:, |,)$tc+|)\\|]]/";
+               // [[|page]] (reverse pipe trick: add context from page title)
+               $p2 = "/\[\[\\|($tc+)]]/";
 
                # try $p1 first, to turn "[[A, B (C)|]]" into "[[A, B (C)|A, B]]"
                $text = preg_replace( $p1, '[[\\1\\2\\3|\\2]]', $text );
@@ -4757,7 +4952,8 @@ class Parser {
                $nickText = wfEscapeWikiText( $nickname );
                $msgName = $user->isAnon() ? 'signature-anon' : 'signature';
 
-               return wfMessage( $msgName, $userText, $nickText )->inContentLanguage()->title( $this->getTitle() )->text();
+               return wfMessage( $msgName, $userText, $nickText )->inContentLanguage()
+                       ->title( $this->getTitle() )->text();
        }
 
        /**
@@ -4831,7 +5027,9 @@ class Parser {
         * @param int $outputType
         * @param bool $clearState
         */
-       public function startExternalParse( Title $title = null, ParserOptions $options, $outputType, $clearState = true ) {
+       public function startExternalParse( Title $title = null, ParserOptions $options,
+               $outputType, $clearState = true
+       ) {
                $this->startParse( $title, $options, $outputType, $clearState );
        }
 
@@ -4841,7 +5039,9 @@ class Parser {
         * @param int $outputType
         * @param bool $clearState
         */
-       private function startParse( Title $title = null, ParserOptions $options, $outputType, $clearState = true ) {
+       private function startParse( Title $title = null, ParserOptions $options,
+               $outputType, $clearState = true
+       ) {
                $this->setTitle( $title );
                $this->mOptions = $options;
                $this->setOutputType( $outputType );
@@ -5525,7 +5725,7 @@ class Parser {
 
        /**
         * @param string $caption
-        * @param LinkHolderArray $holders
+        * @param LinkHolderArray|bool $holders
         * @return mixed|string
         */
        protected function stripAltText( $caption, $holders ) {
@@ -5566,7 +5766,7 @@ class Parser {
         * values, so they can be safely tested and escaped.
         *
         * @param string $text
-        * @param PPFrame $frame
+        * @param bool|PPFrame $frame
         * @return string
         */
        function attributeStripCallback( &$text, $frame = false ) {
@@ -5581,7 +5781,11 @@ class Parser {
         * @return array
         */
        function getTags() {
-               return array_merge( array_keys( $this->mTransparentTagHooks ), array_keys( $this->mTagHooks ), array_keys( $this->mFunctionTagHooks ) );
+               return array_merge(
+                       array_keys( $this->mTransparentTagHooks ),
+                       array_keys( $this->mTagHooks ),
+                       array_keys( $this->mFunctionTagHooks )
+               );
        }
 
        /**
@@ -5604,7 +5808,10 @@ class Parser {
                        list( $element, $content, $params, $tag ) = $data;
                        $tagName = strtolower( $element );
                        if ( isset( $this->mTransparentTagHooks[$tagName] ) ) {
-                               $output = call_user_func_array( $this->mTransparentTagHooks[$tagName], array( $content, $params, $this ) );
+                               $output = call_user_func_array(
+                                       $this->mTransparentTagHooks[$tagName],
+                                       array( $content, $params, $this )
+                               );
                        } else {
                                $output = $tag;
                        }
@@ -6181,7 +6388,8 @@ class Parser {
         */
        protected function lock() {
                if ( $this->mInParse ) {
-                       throw new MWException( "Parser state cleared while parsing. Did you call Parser::parse recursively?" );
+                       throw new MWException( "Parser state cleared while parsing. "
+                               . "Did you call Parser::parse recursively?" );
                }
                $this->mInParse = true;
 
index e374361..33f0f96 100644 (file)
@@ -26,6 +26,7 @@
  * @todo document
  */
 class ParserCache {
+       /** @var MWMemcached  */
        private $mMemc;
        /**
         * Get an instance of this object
@@ -144,7 +145,8 @@ class ParserCache {
                        if ( !$useOutdated && $optionsKey->expired( $article->getTouched() ) ) {
                                wfIncrStats( "pcache_miss_expired" );
                                $cacheTime = $optionsKey->getCacheTime();
-                               wfDebug( "Parser options key expired, touched " . $article->getTouched() . ", epoch $wgCacheEpoch, cached $cacheTime\n" );
+                               wfDebug( "Parser options key expired, touched " . $article->getTouched()
+                                       . ", epoch $wgCacheEpoch, cached $cacheTime\n" );
                                return false;
                        } elseif ( $optionsKey->isDifferentRevision( $article->getLatest() ) ) {
                                wfIncrStats( "pcache_miss_revid" );
@@ -164,7 +166,10 @@ class ParserCache {
                        $usedOptions = ParserOptions::legacyOptions();
                }
 
-               return $this->getParserOutputKey( $article, $popts->optionsHash( $usedOptions, $article->getTitle() ) );
+               return $this->getParserOutputKey(
+                       $article,
+                       $popts->optionsHash( $usedOptions, $article->getTitle() )
+               );
        }
 
        /**
@@ -215,7 +220,8 @@ class ParserCache {
                if ( !$useOutdated && $value->expired( $touched ) ) {
                        wfIncrStats( "pcache_miss_expired" );
                        $cacheTime = $value->getCacheTime();
-                       wfDebug( "ParserOutput key expired, touched $touched, epoch $wgCacheEpoch, cached $cacheTime\n" );
+                       wfDebug( "ParserOutput key expired, touched $touched, "
+                               . "epoch $wgCacheEpoch, cached $cacheTime\n" );
                        $value = false;
                } elseif ( $value->isDifferentRevision( $article->getLatest() ) ) {
                        wfIncrStats( "pcache_miss_revid" );
index 7c84b67..efd5f74 100644 (file)
 /**
  * \brief Set options of the Parser
  *
- * All member variables are supposed to be private in theory, although in practise this is not the case.
+ * All member variables are supposed to be private in theory, although in
+ * practise this is not the case.
  *
  * @ingroup Parser
  */
 class ParserOptions {
+       /** @var bool Parsing the page for a "preview" operation? */
+       public $mIsPreview = false;
 
-       /**
-        * Interlanguage links are removed and returned in an array
-        */
-       var $mInterwikiMagic;
+       /** @var bool Interlanguage links are removed and returned in an array */
+       protected $mInterwikiMagic;
 
-       /**
-        * Allow external images inline?
-        */
-       var $mAllowExternalImages;
+       /** @var bool Allow external images inline? */
+       protected $mAllowExternalImages;
 
-       /**
-        * If not, any exception?
-        */
-       var $mAllowExternalImagesFrom;
+       /** @var string|array If not, any exception? */
+       protected $mAllowExternalImagesFrom;
 
-       /**
-        * If not or it doesn't match, should we check an on-wiki whitelist?
-        */
-       var $mEnableImageWhitelist;
+       /** @var bool If not or it doesn't match, should we check an on-wiki whitelist? */
+       protected $mEnableImageWhitelist;
 
-       /**
-        * Date format index
-        */
-       var $mDateFormat = null;
+       /** @var string Date format index */
+       protected $mDateFormat = null;
 
-       /**
-        * Create "edit section" links?
-        */
-       var $mEditSection = true;
+       /** @var bool Create "edit section" links? */
+       protected $mEditSection = true;
 
-       /**
-        * Allow inclusion of special pages?
-        */
-       var $mAllowSpecialInclusion;
+       /** @var bool Allow inclusion of special pages? */
+       protected $mAllowSpecialInclusion;
 
-       /**
-        * Use tidy to cleanup output HTML?
-        */
-       var $mTidy = false;
+       /** @var bool Use tidy to cleanup output HTML? */
+       protected $mTidy = false;
 
        /**
-        * Which lang to call for PLURAL and GRAMMAR
+        * @var bool Which lang to call for PLURAL and GRAMMAR
+        * @todo FIXME: This comment doesn't appear to be correct.
+        *   Should be this? Whether this is an interface message.
         */
-       var $mInterfaceMessage = false;
+       protected $mInterfaceMessage = false;
 
-       /**
-        * Overrides $mInterfaceMessage with arbitrary language
-        */
-       var $mTargetLanguage = null;
+       /** @var string|Language Overrides $mInterfaceMessage with arbitrary language */
+       protected $mTargetLanguage = null;
 
-       /**
-        * Maximum size of template expansions, in bytes
-        */
-       var $mMaxIncludeSize;
+       /** @var int Maximum size of template expansions, in bytes */
+       protected $mMaxIncludeSize;
 
-       /**
-        * Maximum number of nodes touched by PPFrame::expand()
-        */
-       var $mMaxPPNodeCount;
+       /** @var int Maximum number of nodes touched by PPFrame::expand() */
+       protected $mMaxPPNodeCount;
 
-       /**
-        * Maximum number of nodes generated by Preprocessor::preprocessToObj()
-        */
-       var $mMaxGeneratedPPNodeCount;
+       /** @var int Maximum number of nodes generated by Preprocessor::preprocessToObj() */
+       protected $mMaxGeneratedPPNodeCount;
 
-       /**
-        * Maximum recursion depth in PPFrame::expand()
-        */
-       var $mMaxPPExpandDepth;
+       /** @var int Maximum recursion depth in PPFrame::expand() */
+       protected $mMaxPPExpandDepth;
 
-       /**
-        * Maximum recursion depth for templates within templates
-        */
-       var $mMaxTemplateDepth;
+       /** @var int Maximum recursion depth for templates within templates */
+       protected $mMaxTemplateDepth;
 
-       /**
-        * Maximum number of calls per parse to expensive parser functions
-        */
-       var $mExpensiveParserFunctionLimit;
+       /** @var int Maximum number of calls per parse to expensive parser functions */
+       protected $mExpensiveParserFunctionLimit;
 
-       /**
-        * Remove HTML comments. ONLY APPLIES TO PREPROCESS OPERATIONS
-        */
-       var $mRemoveComments = true;
+       /** @var bool Remove HTML comments. ONLY APPLIES TO PREPROCESS OPERATIONS */
+       protected $mRemoveComments = true;
 
-       /**
-        * Callback for template fetching. Used as first argument to call_user_func().
-        */
-       var $mTemplateCallback =
-               array( 'Parser', 'statelessFetchTemplate' );
+       /** @var array Callback for template fetching. Used as first argument to call_user_func(). */
+       protected $mTemplateCallback = array( 'Parser', 'statelessFetchTemplate' );
 
-       /**
-        * Enable limit report in an HTML comment on output
-        */
-       var $mEnableLimitReport = false;
+       /** @var bool Enable limit report in an HTML comment on output */
+       protected $mEnableLimitReport = false;
 
-       /**
-        * Timestamp used for {{CURRENTDAY}} etc.
-        */
-       var $mTimestamp;
+       /** @var string Timestamp used for {{CURRENTDAY}} etc. */
+       protected $mTimestamp;
 
-       /**
-        * Target attribute for external links
-        */
-       var $mExternalLinkTarget;
+       /** @var bool|string Target attribute for external links */
+       protected $mExternalLinkTarget;
 
        /**
-        * Clean up signature texts?
+        * @var bool Clean up signature texts?
         *
         * 1) Strip ~~~, ~~~~ and ~~~~~ out of signatures
         * 2) Substitute all transclusions
         */
-       var $mCleanSignatures;
+       protected $mCleanSignatures;
 
-       /**
-        * Transform wiki markup when saving the page?
-        */
-       var $mPreSaveTransform = true;
+       /** @var bool Transform wiki markup when saving the page? */
+       protected $mPreSaveTransform = true;
 
-       /**
-        * Whether content conversion should be disabled
-        */
-       var $mDisableContentConversion;
+       /** @var bool Whether content conversion should be disabled */
+       protected $mDisableContentConversion;
 
-       /**
-        * Whether title conversion should be disabled
-        */
-       var $mDisableTitleConversion;
+       /** @var bool Whether title conversion should be disabled */
+       protected $mDisableTitleConversion;
 
-       /**
-        * Automatically number headings?
-        */
-       var $mNumberHeadings;
+       /** @var string Automatically number headings? */
+       protected $mNumberHeadings;
 
-       /**
-        * Thumb size preferred by the user.
-        */
-       var $mThumbSize;
+       /** @var string Thumb size preferred by the user. */
+       protected $mThumbSize;
 
-       /**
-        * Maximum article size of an article to be marked as "stub"
-        */
+       /** @var Language Language object of the User language. */
+       protected $mUserLang;
+
+       /** @var User Stored user object */
+       protected $mUser;
+
+       /** @var bool Parsing the page for a "preview" operation on a single section? */
+       protected $mIsSectionPreview = false;
+
+       /** @var bool Parsing the printable version of the page? */
+       protected $mIsPrintable = false;
+
+       /** @var string Extra key that should be present in the caching key. */
+       protected $mExtraKey = '';
+
+       /** @var callable Function to be called when an option is accessed. */
+       protected $onAccessCallback = null;
+
+       /** @var int Maximum article size of an article to be marked as "stub" */
        private $mStubThreshold;
 
-       /**
-        * Language object of the User language.
-        */
-       var $mUserLang;
+       function getInterwikiMagic() {
+               return $this->mInterwikiMagic;
+       }
 
-       /**
-        * @var User
-        * Stored user object
-        */
-       var $mUser;
+       function getAllowExternalImages() {
+               return $this->mAllowExternalImages;
+       }
 
-       /**
-        * Parsing the page for a "preview" operation?
-        */
-       var $mIsPreview = false;
+       function getAllowExternalImagesFrom() {
+               return $this->mAllowExternalImagesFrom;
+       }
 
-       /**
-        * Parsing the page for a "preview" operation on a single section?
-        */
-       var $mIsSectionPreview = false;
+       function getEnableImageWhitelist() {
+               return $this->mEnableImageWhitelist;
+       }
 
-       /**
-        * Parsing the printable version of the page?
-        */
-       var $mIsPrintable = false;
+       function getEditSection() {
+               return $this->mEditSection;
+       }
 
-       /**
-        * Extra key that should be present in the caching key.
-        */
-       var $mExtraKey = '';
+       function getNumberHeadings() {
+               $this->optionUsed( 'numberheadings' );
 
-       /**
-        * Function to be called when an option is accessed.
-        */
-       protected $onAccessCallback = null;
+               return $this->mNumberHeadings;
+       }
+
+       function getAllowSpecialInclusion() {
+               return $this->mAllowSpecialInclusion;
+       }
+
+       function getTidy() {
+               return $this->mTidy;
+       }
+
+       function getInterfaceMessage() {
+               return $this->mInterfaceMessage;
+       }
+
+       function getTargetLanguage() {
+               return $this->mTargetLanguage;
+       }
+
+       function getMaxIncludeSize() {
+               return $this->mMaxIncludeSize;
+       }
+
+       function getMaxPPNodeCount() {
+               return $this->mMaxPPNodeCount;
+       }
+
+       function getMaxGeneratedPPNodeCount() {
+               return $this->mMaxGeneratedPPNodeCount;
+       }
+
+       function getMaxPPExpandDepth() {
+               return $this->mMaxPPExpandDepth;
+       }
+
+       function getMaxTemplateDepth() {
+               return $this->mMaxTemplateDepth;
+       }
 
-       function getInterwikiMagic()                { return $this->mInterwikiMagic; }
-       function getAllowExternalImages()           { return $this->mAllowExternalImages; }
-       function getAllowExternalImagesFrom()       { return $this->mAllowExternalImagesFrom; }
-       function getEnableImageWhitelist()          { return $this->mEnableImageWhitelist; }
-       function getEditSection()                   { return $this->mEditSection; }
-       function getNumberHeadings()                { $this->optionUsed( 'numberheadings' );
-                                                                                                 return $this->mNumberHeadings; }
-       function getAllowSpecialInclusion()         { return $this->mAllowSpecialInclusion; }
-       function getTidy()                          { return $this->mTidy; }
-       function getInterfaceMessage()              { return $this->mInterfaceMessage; }
-       function getTargetLanguage()                { return $this->mTargetLanguage; }
-       function getMaxIncludeSize()                { return $this->mMaxIncludeSize; }
-       function getMaxPPNodeCount()                { return $this->mMaxPPNodeCount; }
-       function getMaxGeneratedPPNodeCount()       { return $this->mMaxGeneratedPPNodeCount; }
-       function getMaxPPExpandDepth()              { return $this->mMaxPPExpandDepth; }
-       function getMaxTemplateDepth()              { return $this->mMaxTemplateDepth; }
        /* @since 1.20 */
-       function getExpensiveParserFunctionLimit()  { return $this->mExpensiveParserFunctionLimit; }
-       function getRemoveComments()                { return $this->mRemoveComments; }
-       function getTemplateCallback()              { return $this->mTemplateCallback; }
-       function getEnableLimitReport()             { return $this->mEnableLimitReport; }
-       function getCleanSignatures()               { return $this->mCleanSignatures; }
-       function getExternalLinkTarget()            { return $this->mExternalLinkTarget; }
-       function getDisableContentConversion()      { return $this->mDisableContentConversion; }
-       function getDisableTitleConversion()        { return $this->mDisableTitleConversion; }
-       function getThumbSize()                     { $this->optionUsed( 'thumbsize' );
-                                                                                                 return $this->mThumbSize; }
-       function getStubThreshold()                 { $this->optionUsed( 'stubthreshold' );
-                                                                                                 return $this->mStubThreshold; }
-
-       function getIsPreview()                     { return $this->mIsPreview; }
-       function getIsSectionPreview()              { return $this->mIsSectionPreview; }
-       function getIsPrintable()                   { $this->optionUsed( 'printable' );
-                                                                                                 return $this->mIsPrintable; }
-       function getUser()                          { return $this->mUser; }
-       function getPreSaveTransform()              { return $this->mPreSaveTransform; }
+       function getExpensiveParserFunctionLimit() {
+               return $this->mExpensiveParserFunctionLimit;
+       }
+
+       function getRemoveComments() {
+               return $this->mRemoveComments;
+       }
+
+       function getTemplateCallback() {
+               return $this->mTemplateCallback;
+       }
+
+       function getEnableLimitReport() {
+               return $this->mEnableLimitReport;
+       }
+
+       function getCleanSignatures() {
+               return $this->mCleanSignatures;
+       }
+
+       function getExternalLinkTarget() {
+               return $this->mExternalLinkTarget;
+       }
+
+       function getDisableContentConversion() {
+               return $this->mDisableContentConversion;
+       }
+
+       function getDisableTitleConversion() {
+               return $this->mDisableTitleConversion;
+       }
+
+       function getThumbSize() {
+               $this->optionUsed( 'thumbsize' );
+
+               return $this->mThumbSize;
+       }
+
+       function getStubThreshold() {
+               $this->optionUsed( 'stubthreshold' );
+
+               return $this->mStubThreshold;
+       }
+
+       function getIsPreview() {
+               return $this->mIsPreview;
+       }
+
+       function getIsSectionPreview() {
+               return $this->mIsSectionPreview;
+       }
+
+       function getIsPrintable() {
+               $this->optionUsed( 'printable' );
+
+               return $this->mIsPrintable;
+       }
+
+       function getUser() {
+               return $this->mUser;
+       }
+
+       function getPreSaveTransform() {
+               return $this->mPreSaveTransform;
+       }
 
        function getDateFormat() {
                $this->optionUsed( 'dateformat' );
@@ -293,47 +319,139 @@ class ParserOptions {
                return $this->getUserLangObj()->getCode();
        }
 
-       function setInterwikiMagic( $x )            { return wfSetVar( $this->mInterwikiMagic, $x ); }
-       function setAllowExternalImages( $x )       { return wfSetVar( $this->mAllowExternalImages, $x ); }
-       function setAllowExternalImagesFrom( $x )   { return wfSetVar( $this->mAllowExternalImagesFrom, $x ); }
-       function setEnableImageWhitelist( $x )      { return wfSetVar( $this->mEnableImageWhitelist, $x ); }
-       function setDateFormat( $x )                { return wfSetVar( $this->mDateFormat, $x ); }
-       function setEditSection( $x )               { return wfSetVar( $this->mEditSection, $x ); }
-       function setNumberHeadings( $x )            { return wfSetVar( $this->mNumberHeadings, $x ); }
-       function setAllowSpecialInclusion( $x )     { return wfSetVar( $this->mAllowSpecialInclusion, $x ); }
-       function setTidy( $x )                      { return wfSetVar( $this->mTidy, $x ); }
+       function setInterwikiMagic( $x ) {
+               return wfSetVar( $this->mInterwikiMagic, $x );
+       }
+
+       function setAllowExternalImages( $x ) {
+               return wfSetVar( $this->mAllowExternalImages, $x );
+       }
+
+       function setAllowExternalImagesFrom( $x ) {
+               return wfSetVar( $this->mAllowExternalImagesFrom, $x );
+       }
+
+       function setEnableImageWhitelist( $x ) {
+               return wfSetVar( $this->mEnableImageWhitelist, $x );
+       }
+
+       function setDateFormat( $x ) {
+               return wfSetVar( $this->mDateFormat, $x );
+       }
+
+       function setEditSection( $x ) {
+               return wfSetVar( $this->mEditSection, $x );
+       }
+
+       function setNumberHeadings( $x ) {
+               return wfSetVar( $this->mNumberHeadings, $x );
+       }
+
+       function setAllowSpecialInclusion( $x ) {
+               return wfSetVar( $this->mAllowSpecialInclusion, $x );
+       }
+
+       function setTidy( $x ) {
+               return wfSetVar( $this->mTidy, $x );
+       }
 
        /** @deprecated since 1.19 */
-       function setSkin( $x )                      { wfDeprecated( __METHOD__, '1.19' ); }
-       function setInterfaceMessage( $x )          { return wfSetVar( $this->mInterfaceMessage, $x ); }
-       function setTargetLanguage( $x )            { return wfSetVar( $this->mTargetLanguage, $x, true ); }
-       function setMaxIncludeSize( $x )            { return wfSetVar( $this->mMaxIncludeSize, $x ); }
-       function setMaxPPNodeCount( $x )            { return wfSetVar( $this->mMaxPPNodeCount, $x ); }
-       function setMaxGeneratedPPNodeCount( $x )   { return wfSetVar( $this->mMaxGeneratedPPNodeCount, $x ); }
-       function setMaxTemplateDepth( $x )          { return wfSetVar( $this->mMaxTemplateDepth, $x ); }
+       function setSkin( $x ) {
+               wfDeprecated( __METHOD__, '1.19' );
+       }
+
+       function setInterfaceMessage( $x ) {
+               return wfSetVar( $this->mInterfaceMessage, $x );
+       }
+
+       function setTargetLanguage( $x ) {
+               return wfSetVar( $this->mTargetLanguage, $x, true );
+       }
+
+       function setMaxIncludeSize( $x ) {
+               return wfSetVar( $this->mMaxIncludeSize, $x );
+       }
+
+       function setMaxPPNodeCount( $x ) {
+               return wfSetVar( $this->mMaxPPNodeCount, $x );
+       }
+
+       function setMaxGeneratedPPNodeCount( $x ) {
+               return wfSetVar( $this->mMaxGeneratedPPNodeCount, $x );
+       }
+
+       function setMaxTemplateDepth( $x ) {
+               return wfSetVar( $this->mMaxTemplateDepth, $x );
+       }
+
        /* @since 1.20 */
-       function setExpensiveParserFunctionLimit( $x ) { return wfSetVar( $this->mExpensiveParserFunctionLimit, $x ); }
-       function setRemoveComments( $x )            { return wfSetVar( $this->mRemoveComments, $x ); }
-       function setTemplateCallback( $x )          { return wfSetVar( $this->mTemplateCallback, $x ); }
-       function enableLimitReport( $x = true )     { return wfSetVar( $this->mEnableLimitReport, $x ); }
-       function setTimestamp( $x )                 { return wfSetVar( $this->mTimestamp, $x ); }
-       function setCleanSignatures( $x )           { return wfSetVar( $this->mCleanSignatures, $x ); }
-       function setExternalLinkTarget( $x )        { return wfSetVar( $this->mExternalLinkTarget, $x ); }
-       function disableContentConversion( $x = true ) { return wfSetVar( $this->mDisableContentConversion, $x ); }
-       function disableTitleConversion( $x = true ) { return wfSetVar( $this->mDisableTitleConversion, $x ); }
-       function setUserLang( $x )                  {
+       function setExpensiveParserFunctionLimit( $x ) {
+               return wfSetVar( $this->mExpensiveParserFunctionLimit, $x );
+       }
+
+       function setRemoveComments( $x ) {
+               return wfSetVar( $this->mRemoveComments, $x );
+       }
+
+       function setTemplateCallback( $x ) {
+               return wfSetVar( $this->mTemplateCallback, $x );
+       }
+
+       function enableLimitReport( $x = true ) {
+               return wfSetVar( $this->mEnableLimitReport, $x );
+       }
+
+       function setTimestamp( $x ) {
+               return wfSetVar( $this->mTimestamp, $x );
+       }
+
+       function setCleanSignatures( $x ) {
+               return wfSetVar( $this->mCleanSignatures, $x );
+       }
+
+       function setExternalLinkTarget( $x ) {
+               return wfSetVar( $this->mExternalLinkTarget, $x );
+       }
+
+       function disableContentConversion( $x = true ) {
+               return wfSetVar( $this->mDisableContentConversion, $x );
+       }
+
+       function disableTitleConversion( $x = true ) {
+               return wfSetVar( $this->mDisableTitleConversion, $x );
+       }
+
+       function setUserLang( $x ) {
                if ( is_string( $x ) ) {
                        $x = Language::factory( $x );
                }
+
                return wfSetVar( $this->mUserLang, $x );
        }
-       function setThumbSize( $x )                 { return wfSetVar( $this->mThumbSize, $x ); }
-       function setStubThreshold( $x )             { return wfSetVar( $this->mStubThreshold, $x ); }
-       function setPreSaveTransform( $x )          { return wfSetVar( $this->mPreSaveTransform, $x ); }
 
-       function setIsPreview( $x )                 { return wfSetVar( $this->mIsPreview, $x ); }
-       function setIsSectionPreview( $x )          { return wfSetVar( $this->mIsSectionPreview, $x ); }
-       function setIsPrintable( $x )               { return wfSetVar( $this->mIsPrintable, $x ); }
+       function setThumbSize( $x ) {
+               return wfSetVar( $this->mThumbSize, $x );
+       }
+
+       function setStubThreshold( $x ) {
+               return wfSetVar( $this->mStubThreshold, $x );
+       }
+
+       function setPreSaveTransform( $x ) {
+               return wfSetVar( $this->mPreSaveTransform, $x );
+       }
+
+       function setIsPreview( $x ) {
+               return wfSetVar( $this->mIsPreview, $x );
+       }
+
+       function setIsSectionPreview( $x ) {
+               return wfSetVar( $this->mIsSectionPreview, $x );
+       }
+
+       function setIsPrintable( $x ) {
+               return wfSetVar( $this->mIsPrintable, $x );
+       }
 
        /**
         * Extra key that should be present in the parser cache key.
@@ -464,7 +582,14 @@ class ParserOptions {
         * @return array
         */
        public static function legacyOptions() {
-               return array( 'stubthreshold', 'numberheadings', 'userlang', 'thumbsize', 'editsection', 'printable' );
+               return array(
+                       'stubthreshold',
+                       'numberheadings',
+                       'userlang',
+                       'thumbsize',
+                       'editsection',
+                       'printable'
+               );
        }
 
        /**
index b7cc490..74ce325 100644 (file)
  * @ingroup Parser
  */
 class ParserOutput extends CacheTime {
-       var $mText,                       # The output text
-               $mLanguageLinks,              # List of the full text of language links, in the order they appear
-               $mCategories,                 # Map of category names to sort keys
-               $mTitleText,                  # title text of the chosen language variant
-               $mLinks = array(),            # 2-D map of NS/DBK to ID for the links in the document. ID=zero for broken.
-               $mTemplates = array(),        # 2-D map of NS/DBK to ID for the template references. ID=zero for broken.
-               $mTemplateIds = array(),      # 2-D map of NS/DBK to rev ID for the template references. ID=zero for broken.
-               $mImages = array(),           # DB keys of the images used, in the array key only
-               $mFileSearchOptions = array(), # DB keys of the images used mapped to sha1 and MW timestamp
-               $mExternalLinks = array(),    # External link URLs, in the key only
-               $mInterwikiLinks = array(),   # 2-D map of prefix/DBK (in keys only) for the inline interwiki links in the document.
-               $mNewSection = false,         # Show a new section link?
-               $mHideNewSection = false,     # Hide the new section link?
-               $mNoGallery = false,          # No gallery on category page? (__NOGALLERY__)
-               $mHeadItems = array(),        # Items to put in the <head> section
-               $mModules = array(),          # Modules to be loaded by the resource loader
-               $mModuleScripts = array(),    # Modules of which only the JS will be loaded by the resource loader
-               $mModuleStyles = array(),     # Modules of which only the CSSS will be loaded by the resource loader
-               $mModuleMessages = array(),   # Modules of which only the messages will be loaded by the resource loader
-               $mJsConfigVars = array(),     # JavaScript config variable for mw.config combined with this page
-               $mOutputHooks = array(),      # Hook tags as per $wgParserOutputHooks
-               $mWarnings = array(),         # Warning text to be returned to the user. Wikitext formatted, in the key only
-               $mSections = array(),         # Table of contents
-               $mEditSectionTokens = false,  # prefix/suffix markers if edit sections were output as tokens
-               $mProperties = array(),       # Name/value pairs to be cached in the DB
-               $mTOCHTML = '',               # HTML of the TOC
-               $mTimestamp,                  # Timestamp of the revision
-               $mTOCEnabled = true;          # Whether TOC should be shown, can't override __NOTOC__
-               private $mIndexPolicy = '';       # 'index' or 'noindex'?  Any other value will result in no change.
-               private $mAccessedOptions = array(); # List of ParserOptions (stored in the keys)
-               private $mSecondaryDataUpdates = array(); # List of DataUpdate, used to save info from the page somewhere else.
-               private $mExtensionData = array(); # extra data used by extensions
-               private $mLimitReportData = array(); # Parser limit report data
-               private $mParseStartTime = array(); # Timestamps for getTimeSinceStart()
-
-       const EDITSECTION_REGEX = '#<(?:mw:)?editsection page="(.*?)" section="(.*?)"(?:/>|>(.*?)(</(?:mw:)?editsection>))#';
+       /** @var string The output text */
+       public $mText;
+
+       /** @var array List of the full text of language links; in the order they appear */
+       public $mLanguageLinks;
+
+       /** @var array Map of category names to sort keys */
+       public $mCategories;
+
+       /** @var array DB keys of the images used; in the array key only */
+       public $mImages = array();
+
+       /** @var array Modules to be loaded by the resource loader */
+       public $mModules = array();
+
+       /** @var array Name/value pairs to be cached in the DB */
+       public $mProperties = array();
+
+       /** @var string Title text of the chosen language variant */
+       protected $mTitleText;
+
+       /** @var array 2-D map of NS/DBK to ID for the links in the document. ID=zero for broken. */
+       protected $mLinks = array();
+
+       /** @var array 2-D map of NS/DBK to ID for the template references. ID=zero for broken. */
+       protected $mTemplates = array();
+
+       /** @var array 2-D map of NS/DBK to rev ID for the template references. ID=zero for broken. */
+       protected $mTemplateIds = array();
+
+       /** @var array DB keys of the images used mapped to sha1 and MW timestamp */
+       protected $mFileSearchOptions = array();
+
+       /** @var array External link URLs; in the key only */
+       protected $mExternalLinks = array();
+
+       /**
+        * @var array 2-D map of prefix/DBK (in keys only) for the inline interwiki
+        *   links in the document.
+        */
+       protected $mInterwikiLinks = array();
+
+       /** @var bool Show a new section link? */
+       protected $mNewSection = false;
+
+       /** @var bool Hide the new section link? */
+       protected $mHideNewSection = false;
+
+       /** @var bool No gallery on category page? (__NOGALLERY__) */
+       public $mNoGallery = false;
+
+       /** @var array Items to put in the <head> section */
+       protected $mHeadItems = array();
+
+       /** @var array Modules of which only the JS will be loaded by the resource loader */
+       protected $mModuleScripts = array();
+
+       /** @var array Modules of which only the CSSS will be loaded by the resource loader */
+       protected $mModuleStyles = array();
+
+       /** @var array Modules of which only the messages will be loaded by the resource loader */
+       protected $mModuleMessages = array();
+
+       /** @var array JavaScript config variable for mw.config combined with this page */
+       protected $mJsConfigVars = array();
+
+       /** @var array Hook tags as per $wgParserOutputHooks */
+       protected $mOutputHooks = array();
+
+       /** @var array Warning text to be returned to the user. Wikitext formatted; in the key only */
+       protected $mWarnings = array();
+
+       /** @var array Table of contents */
+       protected $mSections = array();
+
+       /** @var bool Prefix/suffix markers if edit sections were output as tokens */
+       protected $mEditSectionTokens = false;
+
+       /** @var string HTML of the TOC */
+       protected $mTOCHTML = '';
+
+       /** @var string Timestamp of the revision */
+       protected $mTimestamp;
+
+       /** @var bool Whether TOC should be shown, can't override __NOTOC__ */
+       protected $mTOCEnabled = true;
+
+       /** @var string 'index' or 'noindex'?  Any other value will result in no change. */
+       private $mIndexPolicy = '';
+
+       /** @var array List of ParserOptions (stored in the keys) */
+       private $mAccessedOptions = array();
+
+       /** @var array List of DataUpdate, used to save info from the page somewhere else. */
+       private $mSecondaryDataUpdates = array();
+
+       /** @var array Extra data used by extensions */
+       private $mExtensionData = array();
+
+       /** @var array Parser limit report data */
+       private $mLimitReportData = array();
+
+       /** @var array Timestamps for getTimeSinceStart() */
+       private $mParseStartTime = array();
+
+       const EDITSECTION_REGEX =
+               '#<(?:mw:)?editsection page="(.*?)" section="(.*?)"(?:/>|>(.*?)(</(?:mw:)?editsection>))#';
 
        function __construct( $text = '', $languageLinks = array(), $categoryLinks = array(),
                $containsOldMagic = false, $titletext = ''
@@ -116,50 +187,166 @@ class ParserOutput extends CacheTime {
                return call_user_func_array( array( $skin, 'doEditSectionLink' ), $args );
        }
 
-       function &getLanguageLinks()         { return $this->mLanguageLinks; }
-       function getInterwikiLinks()         { return $this->mInterwikiLinks; }
-       function getCategoryLinks()          { return array_keys( $this->mCategories ); }
-       function &getCategories()            { return $this->mCategories; }
-       function getTitleText()              { return $this->mTitleText; }
-       function getSections()               { return $this->mSections; }
-       function getEditSectionTokens()      { return $this->mEditSectionTokens; }
-       function &getLinks()                 { return $this->mLinks; }
-       function &getTemplates()             { return $this->mTemplates; }
-       function &getTemplateIds()           { return $this->mTemplateIds; }
-       function &getImages()                { return $this->mImages; }
-       function &getFileSearchOptions()     { return $this->mFileSearchOptions; }
-       function &getExternalLinks()         { return $this->mExternalLinks; }
-       function getNoGallery()              { return $this->mNoGallery; }
-       function getHeadItems()              { return $this->mHeadItems; }
-       function getModules()                { return $this->mModules; }
-       function getModuleScripts()          { return $this->mModuleScripts; }
-       function getModuleStyles()           { return $this->mModuleStyles; }
-       function getModuleMessages()         { return $this->mModuleMessages; }
+       function &getLanguageLinks() {
+               return $this->mLanguageLinks;
+       }
+
+       function getInterwikiLinks() {
+               return $this->mInterwikiLinks;
+       }
+
+       function getCategoryLinks() {
+               return array_keys( $this->mCategories );
+       }
+
+       function &getCategories() {
+               return $this->mCategories;
+       }
+
+       function getTitleText() {
+               return $this->mTitleText;
+       }
+
+       function getSections() {
+               return $this->mSections;
+       }
+
+       function getEditSectionTokens() {
+               return $this->mEditSectionTokens;
+       }
+
+       function &getLinks() {
+               return $this->mLinks;
+       }
+
+       function &getTemplates() {
+               return $this->mTemplates;
+       }
+
+       function &getTemplateIds() {
+               return $this->mTemplateIds;
+       }
+
+       function &getImages() {
+               return $this->mImages;
+       }
+
+       function &getFileSearchOptions() {
+               return $this->mFileSearchOptions;
+       }
+
+       function &getExternalLinks() {
+               return $this->mExternalLinks;
+       }
+
+       function getNoGallery() {
+               return $this->mNoGallery;
+       }
+
+       function getHeadItems() {
+               return $this->mHeadItems;
+       }
+
+       function getModules() {
+               return $this->mModules;
+       }
+
+       function getModuleScripts() {
+               return $this->mModuleScripts;
+       }
+
+       function getModuleStyles() {
+               return $this->mModuleStyles;
+       }
+
+       function getModuleMessages() {
+               return $this->mModuleMessages;
+       }
+
        /** @since 1.23 */
-       function getJsConfigVars()           { return $this->mJsConfigVars; }
-       function getOutputHooks()            { return (array)$this->mOutputHooks; }
-       function getWarnings()               { return array_keys( $this->mWarnings ); }
-       function getIndexPolicy()            { return $this->mIndexPolicy; }
-       function getTOCHTML()                { return $this->mTOCHTML; }
-       function getTimestamp()              { return $this->mTimestamp; }
-       function getLimitReportData()        { return $this->mLimitReportData; }
-       function getTOCEnabled()             { return $this->mTOCEnabled; }
-
-       function setText( $text )            { return wfSetVar( $this->mText, $text ); }
-       function setLanguageLinks( $ll )     { return wfSetVar( $this->mLanguageLinks, $ll ); }
-       function setCategoryLinks( $cl )     { return wfSetVar( $this->mCategories, $cl ); }
-
-       function setTitleText( $t )          { return wfSetVar( $this->mTitleText, $t ); }
-       function setSections( $toc )         { return wfSetVar( $this->mSections, $toc ); }
-       function setEditSectionTokens( $t )  { return wfSetVar( $this->mEditSectionTokens, $t ); }
-       function setIndexPolicy( $policy )   { return wfSetVar( $this->mIndexPolicy, $policy ); }
-       function setTOCHTML( $tochtml )      { return wfSetVar( $this->mTOCHTML, $tochtml ); }
-       function setTimestamp( $timestamp )  { return wfSetVar( $this->mTimestamp, $timestamp ); }
-       function setTOCEnabled( $flag )      { return wfSetVar( $this->mTOCEnabled, $flag ); }
-
-       function addCategory( $c, $sort )    { $this->mCategories[$c] = $sort; }
-       function addLanguageLink( $t )       { $this->mLanguageLinks[] = $t; }
-       function addWarning( $s )            { $this->mWarnings[$s] = 1; }
+       function getJsConfigVars() {
+               return $this->mJsConfigVars;
+       }
+
+       function getOutputHooks() {
+               return (array)$this->mOutputHooks;
+       }
+
+       function getWarnings() {
+               return array_keys( $this->mWarnings );
+       }
+
+       function getIndexPolicy() {
+               return $this->mIndexPolicy;
+       }
+
+       function getTOCHTML() {
+               return $this->mTOCHTML;
+       }
+
+       function getTimestamp() {
+               return $this->mTimestamp;
+       }
+
+       function getLimitReportData() {
+               return $this->mLimitReportData;
+       }
+
+       function getTOCEnabled() {
+               return $this->mTOCEnabled;
+       }
+
+       function setText( $text ) {
+               return wfSetVar( $this->mText, $text );
+       }
+
+       function setLanguageLinks( $ll ) {
+               return wfSetVar( $this->mLanguageLinks, $ll );
+       }
+
+       function setCategoryLinks( $cl ) {
+               return wfSetVar( $this->mCategories, $cl );
+       }
+
+       function setTitleText( $t ) {
+               return wfSetVar( $this->mTitleText, $t );
+       }
+
+       function setSections( $toc ) {
+               return wfSetVar( $this->mSections, $toc );
+       }
+
+       function setEditSectionTokens( $t ) {
+               return wfSetVar( $this->mEditSectionTokens, $t );
+       }
+
+       function setIndexPolicy( $policy ) {
+               return wfSetVar( $this->mIndexPolicy, $policy );
+       }
+
+       function setTOCHTML( $tochtml ) {
+               return wfSetVar( $this->mTOCHTML, $tochtml );
+       }
+
+       function setTimestamp( $timestamp ) {
+               return wfSetVar( $this->mTimestamp, $timestamp );
+       }
+
+       function setTOCEnabled( $flag ) {
+               return wfSetVar( $this->mTOCEnabled, $flag );
+       }
+
+       function addCategory( $c, $sort ) {
+               $this->mCategories[$c] = $sort;
+       }
+
+       function addLanguageLink( $t ) {
+               $this->mLanguageLinks[] = $t;
+       }
+
+       function addWarning( $s ) {
+               $this->mWarnings[$s] = 1;
+       }
 
        function addOutputHook( $hook, $data = false ) {
                $this->mOutputHooks[] = array( $hook, $data );
@@ -512,8 +699,8 @@ class ParserOutput extends CacheTime {
         * extracted from the page's content, including a LinksUpdate object for all links stored in
         * this ParserOutput object.
         *
-        * @note: Avoid using this method directly, use ContentHandler::getSecondaryDataUpdates() instead! The content
-        *        handler may provide additional update objects.
+        * @note Avoid using this method directly, use ContentHandler::getSecondaryDataUpdates()
+        *   instead! The content handler may provide additional update objects.
         *
         * @since 1.20
         *
index 920b6f6..4d821ca 100644 (file)
 /**
  * @ingroup Parser
  */
-class Parser_DiffTest
-{
-       var $parsers, $conf;
-       var $shortOutput = false;
+class Parser_DiffTest {
+       /** @var array */
+       protected $parsers;
 
-       var $dtUniqPrefix;
+       /** @var array */
+       protected $conf;
+
+       /** @var bool */
+       protected $shortOutput = false;
+
+       /** @var string */
+       protected $dtUniqPrefix;
 
        function __construct( $conf ) {
                if ( !isset( $conf['parsers'] ) ) {
index 4cd5694..b8e262a 100644 (file)
@@ -40,7 +40,8 @@ interface Preprocessor {
        function newFrame();
 
        /**
-        * Create a new custom frame for programmatic use of parameter replacement as used in some extensions
+        * Create a new custom frame for programmatic use of parameter replacement
+        * as used in some extensions.
         *
         * @param array $args
         *
@@ -49,7 +50,8 @@ interface Preprocessor {
        function newCustomFrame( $args );
 
        /**
-        * Create a new custom node for programmatic use of parameter replacement as used in some extensions
+        * Create a new custom node for programmatic use of parameter replacement
+        * as used in some extensions.
         *
         * @param array $values
         */
@@ -84,8 +86,8 @@ interface PPFrame {
        /**
         * Create a child frame
         *
-        * @param array $args
-        * @param Title $title
+        * @param array|bool $args
+        * @param bool|Title $title
         * @param int $indexOffset A number subtracted from the index attributes of the arguments
         *
         * @return PPFrame
index df3cbeb..7d8a0b6 100644 (file)
  * @ingroup Parser
  */
 class Preprocessor_DOM implements Preprocessor {
+       /** @var Parser */
+       public $parser;
 
-       /**
-        * @var Parser
-        */
-       var $parser;
-
-       var $memoryLimit;
+       protected $memoryLimit;
 
        const CACHE_VERSION = 1;
 
@@ -73,18 +70,34 @@ class Preprocessor_DOM implements Preprocessor {
 
                foreach ( $values as $k => $val ) {
                        if ( is_int( $k ) ) {
-                               $xml .= "<part><name index=\"$k\"/><value>" . htmlspecialchars( $val ) . "</value></part>";
+                               $xml .= "<part><name index=\"$k\"/><value>"
+                                       . htmlspecialchars( $val ) . "</value></part>";
                        } else {
-                               $xml .= "<part><name>" . htmlspecialchars( $k ) . "</name>=<value>" . htmlspecialchars( $val ) . "</value></part>";
+                               $xml .= "<part><name>" . htmlspecialchars( $k )
+                                       . "</name>=<value>" . htmlspecialchars( $val ) . "</value></part>";
                        }
                }
 
                $xml .= "</list>";
 
+               wfProfileIn( __METHOD__ . '-loadXML' );
                $dom = new DOMDocument();
-               $dom->loadXML( $xml );
-               $root = $dom->documentElement;
+               wfSuppressWarnings();
+               $result = $dom->loadXML( $xml );
+               wfRestoreWarnings();
+               if ( !$result ) {
+                       // Try running the XML through UtfNormal to get rid of invalid characters
+                       $xml = UtfNormal::cleanUp( $xml );
+                       // 1 << 19 == XML_PARSE_HUGE, needed so newer versions of libxml2 don't barf when the XML is >256 levels deep
+                       $result = $dom->loadXML( $xml, 1 << 19 );
+               }
+               wfProfileOut( __METHOD__ . '-loadXML' );
+
+               if ( !$result ) {
+                       throw new MWException( 'Parameters passed to ' . __METHOD__ . ' result in invalid XML' );
+               }
 
+               $root = $dom->documentElement;
                $node = new PPNode_DOM( $root->childNodes );
                return $node;
        }
@@ -111,8 +124,9 @@ class Preprocessor_DOM implements Preprocessor {
         *
         * @param string $text The text to parse
         * @param int $flags 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.
+        *     Parser::PTD_FOR_INCLUSION  Handle "<noinclude>" and "<includeonly>"
+        *                                as if the text is being included. Default
+        *                                is to assume a direct page view.
         *
         * The generated DOM tree must depend only on the input text and the flags.
         * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of bug 4899.
@@ -180,7 +194,8 @@ class Preprocessor_DOM implements Preprocessor {
                if ( !$result ) {
                        // Try running the XML through UtfNormal to get rid of invalid characters
                        $xml = UtfNormal::cleanUp( $xml );
-                       // 1 << 19 == XML_PARSE_HUGE, needed so newer versions of libxml2 don't barf when the XML is >256 levels deep
+                       // 1 << 19 == XML_PARSE_HUGE, needed so newer versions of libxml2
+                       // don't barf when the XML is >256 levels deep.
                        $result = $dom->loadXML( $xml, 1 << 19 );
                }
                if ( $result ) {
@@ -233,7 +248,9 @@ class Preprocessor_DOM implements Preprocessor {
                        $ignoredTags = array( 'includeonly', '/includeonly' );
                        $ignoredElements = array( 'noinclude' );
                        $xmlishElements[] = 'noinclude';
-                       if ( strpos( $text, '<onlyinclude>' ) !== false && strpos( $text, '</onlyinclude>' ) !== false ) {
+                       if ( strpos( $text, '<onlyinclude>' ) !== false
+                               && strpos( $text, '</onlyinclude>' ) !== false
+                       ) {
                                $enableOnlyinclude = true;
                        }
                } else {
@@ -249,19 +266,28 @@ class Preprocessor_DOM implements Preprocessor {
                $stack = new PPDStack;
 
                $searchBase = "[{<\n"; #}
-               $revText = strrev( $text ); // For fast reverse searches
+               // For fast reverse searches
+               $revText = strrev( $text );
                $lengthText = strlen( $text );
 
-               $i = 0;                     # Input pointer, starts out pointing to a pseudo-newline before the start
-               $accum =& $stack->getAccum();   # Current accumulator
+               // Input pointer, starts out pointing to a pseudo-newline before the start
+               $i = 0;
+               // Current accumulator
+               $accum =& $stack->getAccum();
                $accum = '<root>';
-               $findEquals = false;            # True to find equals signs in arguments
-               $findPipe = false;              # True to take notice of pipe characters
+               // True to find equals signs in arguments
+               $findEquals = false;
+               // True to take notice of pipe characters
+               $findPipe = false;
                $headingIndex = 1;
-               $inHeading = false;        # True if $i is inside a possible heading
-               $noMoreGT = false;         # True if there are no more greater-than (>) signs right of $i
-               $findOnlyinclude = $enableOnlyinclude; # True to ignore all input up to the next <onlyinclude>
-               $fakeLineStart = true;     # Do a line-start run without outputting an LF character
+               // True if $i is inside a possible heading
+               $inHeading = false;
+               // True if there are no more greater-than (>) signs right of $i
+               $noMoreGT = false;
+               // True to ignore all input up to the next <onlyinclude>
+               $findOnlyinclude = $enableOnlyinclude;
+               // Do a line-start run without outputting an LF character
+               $fakeLineStart = true;
 
                while ( true ) {
                        //$this->memCheck();
@@ -346,7 +372,9 @@ class Preprocessor_DOM implements Preprocessor {
                        if ( $found == 'angle' ) {
                                $matches = false;
                                // Handle </onlyinclude>
-                               if ( $enableOnlyinclude && substr( $text, $i, strlen( '</onlyinclude>' ) ) == '</onlyinclude>' ) {
+                               if ( $enableOnlyinclude
+                                       && substr( $text, $i, strlen( '</onlyinclude>' ) ) == '</onlyinclude>'
+                               ) {
                                        $findOnlyinclude = true;
                                        continue;
                                }
@@ -460,7 +488,9 @@ class Preprocessor_DOM implements Preprocessor {
 
                                // Handle ignored tags
                                if ( in_array( $lowerName, $ignoredTags ) ) {
-                                       $accum .= '<ignore>' . htmlspecialchars( substr( $text, $i, $tagEndPos - $i + 1 ) ) . '</ignore>';
+                                       $accum .= '<ignore>'
+                                               . htmlspecialchars( substr( $text, $i, $tagEndPos - $i + 1 ) )
+                                               . '</ignore>';
                                        $i = $tagEndPos + 1;
                                        continue;
                                }
@@ -520,9 +550,11 @@ class Preprocessor_DOM implements Preprocessor {
 
                                $count = strspn( $text, '=', $i, 6 );
                                if ( $count == 1 && $findEquals ) {
-                                       // DWIM: This looks kind of like a name/value separator
-                                       // Let's let the equals handler have it and break the potential heading
-                                       // This is heuristic, but AFAICT the methods for completely correct disambiguation are very complex.
+                                       // DWIM: This looks kind of like a name/value separator.
+                                       // Let's let the equals handler have it and break the
+                                       // potential heading. This is heuristic, but AFAICT the
+                                       // methods for completely correct disambiguation are very
+                                       // complex.
                                } elseif ( $count > 0 ) {
                                        $piece = array(
                                                'open' => "\n",
@@ -541,8 +573,9 @@ class Preprocessor_DOM implements Preprocessor {
                                // A heading must be open, otherwise \n wouldn't have been in the search list
                                assert( '$piece->open == "\n"' );
                                $part = $piece->getCurrentPart();
-                               // Search back through the input to see if it has a proper close
-                               // Do this using the reversed string since the other solutions (end anchor, etc.) are inefficient
+                               // Search back through the input to see if it has a proper close.
+                               // Do this using the reversed string since the other solutions
+                               // (end anchor, etc.) are inefficient.
                                $wsLength = strspn( $revText, " \t", $lengthText - $i );
                                $searchStart = $i - $wsLength;
                                if ( isset( $part->commentEnd ) && $searchStart - 1 == $part->commentEnd ) {
@@ -736,16 +769,22 @@ class Preprocessor_DOM implements Preprocessor {
  * @ingroup Parser
  */
 class PPDStack {
-       var $stack, $rootAccum;
+       /** @var array */
+       public $stack;
 
-       /**
-        * @var PPDStack
-        */
-       var $top;
-       var $out;
-       var $elementClass = 'PPDStackElement';
+       /** @var string */
+       public $rootAccum;
+
+       /** @var bool|PPDStack */
+       public $top;
+
+       /** @var */
+       public $out;
 
-       static $false = false;
+       /** @var string */
+       protected $elementClass = 'PPDStackElement';
+
+       protected static $false = false;
 
        function __construct() {
                $this->stack = array();
@@ -825,13 +864,26 @@ class PPDStack {
  * @ingroup Parser
  */
 class PPDStackElement {
-       var     $open,              // Opening character (\n for heading)
-               $close,             // Matching closing character
-               $count,             // Number of opening characters found (number of "=" for heading)
-               $parts,             // Array of PPDPart objects describing pipe-separated parts.
-               $lineStart;         // True if the open char appeared at the start of the input line. Not set for headings.
+       /** @var string Opening character (\n for heading) */
+       public $open;
+
+       /** @var string Matching closing character */
+       public $close;
+
+       /** @var int Number of opening characters found (number of "=" for heading) */
+       public $count;
+
+       /** @var array PPDPart objects describing pipe-separated parts. */
+       public $parts;
+
+       /**
+        * @var bool True if the open char appeared at the start of the input line.
+        * Not set for headings.
+        */
+       public $lineStart;
 
-       var $partClass = 'PPDPart';
+       /** @var string */
+       protected $partClass = 'PPDPart';
 
        function __construct( $data = array() ) {
                $class = $this->partClass;
@@ -871,6 +923,7 @@ class PPDStackElement {
        /**
         * Get the output string that would result if the close is not found.
         *
+        * @param bool|int $openingCount
         * @return string
         */
        function breakSyntax( $openingCount = false ) {
@@ -899,7 +952,8 @@ class PPDStackElement {
  * @ingroup Parser
  */
 class PPDPart {
-       var $out; // Output accumulator string
+       /** @var string */
+       public $out;
 
        // Optional member variables:
        //   eqpos        Position of equals sign in output accumulator
@@ -916,34 +970,29 @@ class PPDPart {
  * @ingroup Parser
  */
 class PPFrame_DOM implements PPFrame {
+       /** @var array */
+       public $titleCache;
 
        /**
-        * @var Preprocessor
+        * @var array Hashtable listing templates which are disallowed for expansion
+        *   in this frame, having been encountered previously in parent frames.
         */
-       var $preprocessor;
+       public $loopCheckHash;
 
        /**
-        * @var Parser
+        * @var int Recursion depth of this frame, top = 0.
+        * Note that this is NOT the same as expansion depth in expand()
         */
-       var $parser;
+       public $depth;
 
-       /**
-        * @var Title
-        */
-       var $title;
-       var $titleCache;
+       /** @var Preprocessor */
+       protected $preprocessor;
 
-       /**
-        * Hashtable listing templates which are disallowed for expansion in this frame,
-        * having been encountered previously in parent frames.
-        */
-       var $loopCheckHash;
+       /** @var Parser */
+       protected $parser;
 
-       /**
-        * Recursion depth of this frame, top = 0
-        * Note that this is NOT the same as expansion depth in expand()
-        */
-       var $depth;
+       /** @var Title */
+       protected $title;
 
        /**
         * Construct a new preprocessor frame.
@@ -1148,8 +1197,9 @@ class PPFrame_DOM implements PPFrame {
                                        ) {
                                                $out .= '';
                                        } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
-                                               # Add a strip marker in PST mode so that pstPass2() can run some old-fashioned regexes on the result
-                                               # Not in RECOVER_COMMENTS mode (extractSections) though
+                                               # Add a strip marker in PST mode so that pstPass2() can
+                                               # run some old-fashioned regexes on the result.
+                                               # Not in RECOVER_COMMENTS mode (extractSections) though.
                                                $out .= $this->parser->insertStripItem( $contextNode->textContent );
                                        } else {
                                                # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
@@ -1160,7 +1210,9 @@ class PPFrame_DOM implements PPFrame {
                                        # OT_WIKI will only respect <ignore> in substed templates.
                                        # The other output types respect it unless NO_IGNORE is set.
                                        # extractSections() sets NO_IGNORE and so never respects it.
-                                       if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] ) || ( $flags & PPFrame::NO_IGNORE ) ) {
+                                       if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] )
+                                               || ( $flags & PPFrame::NO_IGNORE )
+                                       ) {
                                                $out .= $contextNode->textContent;
                                        } else {
                                                $out .= '';
@@ -1433,22 +1485,31 @@ class PPFrame_DOM implements PPFrame {
  * @ingroup Parser
  */
 class PPTemplateFrame_DOM extends PPFrame_DOM {
-       var $numberedArgs, $namedArgs;
+       /** @var PPFrame_DOM */
+       public $parent;
 
-       /**
-        * @var PPFrame_DOM
-        */
-       var $parent;
-       var $numberedExpansionCache, $namedExpansionCache;
+       /** @var array */
+       protected $numberedArgs;
+
+       /** @var array */
+       protected $namedArgs;
+
+       /** @var array */
+       protected $numberedExpansionCache;
+
+       /** @var string[] */
+       protected $namedExpansionCache;
 
        /**
         * @param Preprocessor $preprocessor
-        * @param PPFrame_DOM $parent
+        * @param bool|PPFrame_DOM $parent
         * @param array $numberedArgs
         * @param array $namedArgs
-        * @param Title $title
+        * @param bool|Title $title
         */
-       function __construct( $preprocessor, $parent = false, $numberedArgs = array(), $namedArgs = array(), $title = false ) {
+       function __construct( $preprocessor, $parent = false, $numberedArgs = array(),
+               $namedArgs = array(), $title = false
+       ) {
                parent::__construct( $preprocessor );
 
                $this->parent = $parent;
@@ -1524,7 +1585,10 @@ class PPTemplateFrame_DOM extends PPFrame_DOM {
                }
                if ( !isset( $this->numberedExpansionCache[$index] ) ) {
                        # No trimming for unnamed arguments
-                       $this->numberedExpansionCache[$index] = $this->parent->expand( $this->numberedArgs[$index], PPFrame::STRIP_COMMENTS );
+                       $this->numberedExpansionCache[$index] = $this->parent->expand(
+                               $this->numberedArgs[$index],
+                               PPFrame::STRIP_COMMENTS
+                       );
                }
                return $this->numberedExpansionCache[$index];
        }
@@ -1564,7 +1628,7 @@ class PPTemplateFrame_DOM extends PPFrame_DOM {
  * @ingroup Parser
  */
 class PPCustomFrame_DOM extends PPFrame_DOM {
-       var $args;
+       protected $args;
 
        function __construct( $preprocessor, $args ) {
                parent::__construct( $preprocessor );
@@ -1610,12 +1674,11 @@ class PPCustomFrame_DOM extends PPFrame_DOM {
  * @ingroup Parser
  */
 class PPNode_DOM implements PPNode {
+       /** @var DOMElement */
+       public $node;
 
-       /**
-        * @var DOMElement
-        */
-       var $node;
-       var $xpath;
+       /** @var DOMXPath */
+       protected $xpath;
 
        function __construct( $node, $xpath = false ) {
                $this->node = $node;
index aebb98e..a5b6b43 100644 (file)
  * @ingroup Parser
  */
 class Preprocessor_Hash implements Preprocessor {
-       /**
-        * @var Parser
-        */
-       var $parser;
+       /** @var Parser */
+       public $parser;
 
        const CACHE_VERSION = 1;
 
@@ -114,7 +112,9 @@ class Preprocessor_Hash implements Preprocessor {
                // Check cache.
                global $wgMemc, $wgPreprocessorCacheThreshold;
 
-               $cacheable = $wgPreprocessorCacheThreshold !== false && strlen( $text ) > $wgPreprocessorCacheThreshold;
+               $cacheable = $wgPreprocessorCacheThreshold !== false
+                       && strlen( $text ) > $wgPreprocessorCacheThreshold;
+
                if ( $cacheable ) {
                        wfProfileIn( __METHOD__ . '-cacheable' );
 
@@ -161,7 +161,9 @@ class Preprocessor_Hash implements Preprocessor {
                        $ignoredTags = array( 'includeonly', '/includeonly' );
                        $ignoredElements = array( 'noinclude' );
                        $xmlishElements[] = 'noinclude';
-                       if ( strpos( $text, '<onlyinclude>' ) !== false && strpos( $text, '</onlyinclude>' ) !== false ) {
+                       if ( strpos( $text, '<onlyinclude>' ) !== false
+                               && strpos( $text, '</onlyinclude>' ) !== false
+                       ) {
                                $enableOnlyinclude = true;
                        }
                } else {
@@ -177,18 +179,27 @@ class Preprocessor_Hash implements Preprocessor {
                $stack = new PPDStack_Hash;
 
                $searchBase = "[{<\n";
-               $revText = strrev( $text ); // For fast reverse searches
+               // For fast reverse searches
+               $revText = strrev( $text );
                $lengthText = strlen( $text );
 
-               $i = 0;                     # Input pointer, starts out pointing to a pseudo-newline before the start
-               $accum =& $stack->getAccum();   # Current accumulator
-               $findEquals = false;            # True to find equals signs in arguments
-               $findPipe = false;              # True to take notice of pipe characters
+               // Input pointer, starts out pointing to a pseudo-newline before the start
+               $i = 0;
+               // Current accumulator
+               $accum =& $stack->getAccum();
+               // True to find equals signs in arguments
+               $findEquals = false;
+               // True to take notice of pipe characters
+               $findPipe = false;
                $headingIndex = 1;
-               $inHeading = false;        # True if $i is inside a possible heading
-               $noMoreGT = false;         # True if there are no more greater-than (>) signs right of $i
-               $findOnlyinclude = $enableOnlyinclude; # True to ignore all input up to the next <onlyinclude>
-               $fakeLineStart = true;     # Do a line-start run without outputting an LF character
+               // True if $i is inside a possible heading
+               $inHeading = false;
+               // True if there are no more greater-than (>) signs right of $i
+               $noMoreGT = false;
+               // True to ignore all input up to the next <onlyinclude>
+               $findOnlyinclude = $enableOnlyinclude;
+               // Do a line-start run without outputting an LF character
+               $fakeLineStart = true;
 
                while ( true ) {
                        //$this->memCheck();
@@ -273,7 +284,9 @@ class Preprocessor_Hash implements Preprocessor {
                        if ( $found == 'angle' ) {
                                $matches = false;
                                // Handle </onlyinclude>
-                               if ( $enableOnlyinclude && substr( $text, $i, strlen( '</onlyinclude>' ) ) == '</onlyinclude>' ) {
+                               if ( $enableOnlyinclude
+                                       && substr( $text, $i, strlen( '</onlyinclude>' ) ) == '</onlyinclude>'
+                               ) {
                                        $findOnlyinclude = true;
                                        continue;
                                }
@@ -452,9 +465,10 @@ class Preprocessor_Hash implements Preprocessor {
 
                                $count = strspn( $text, '=', $i, 6 );
                                if ( $count == 1 && $findEquals ) {
-                                       // DWIM: This looks kind of like a name/value separator
-                                       // Let's let the equals handler have it and break the potential heading
-                                       // This is heuristic, but AFAICT the methods for completely correct disambiguation are very complex.
+                                       // DWIM: This looks kind of like a name/value separator.
+                                       // Let's let the equals handler have it and break the potential
+                                       // heading. This is heuristic, but AFAICT the methods for
+                                       // completely correct disambiguation are very complex.
                                } elseif ( $count > 0 ) {
                                        $piece = array(
                                                'open' => "\n",
@@ -472,8 +486,9 @@ class Preprocessor_Hash implements Preprocessor {
                                // A heading must be open, otherwise \n wouldn't have been in the search list
                                assert( '$piece->open == "\n"' );
                                $part = $piece->getCurrentPart();
-                               // Search back through the input to see if it has a proper close
-                               // Do this using the reversed string since the other solutions (end anchor, etc.) are inefficient
+                               // Search back through the input to see if it has a proper close.
+                               // Do this using the reversed string since the other solutions
+                               // (end anchor, etc.) are inefficient.
                                $wsLength = strspn( $revText, " \t", $lengthText - $i );
                                $searchStart = $i - $wsLength;
                                if ( isset( $part->commentEnd ) && $searchStart - 1 == $part->commentEnd ) {
@@ -805,7 +820,9 @@ class PPDPart_Hash extends PPDPart {
  * @ingroup Parser
  */
 class PPDAccum_Hash {
-       var $firstNode, $lastNode;
+       public $firstNode;
+
+       public $lastNode;
 
        function __construct() {
                $this->firstNode = $this->lastNode = false;
@@ -850,10 +867,10 @@ class PPDAccum_Hash {
        }
 
        /**
-        * Append a PPAccum_Hash
+        * Append a PPDAccum_Hash
         * Takes over ownership of the nodes in the source argument. These nodes may
         * subsequently be modified, especially nextSibling.
-        * @param PPAccum_Hash $accum
+        * @param PPDAccum_Hash $accum
         */
        function addAccum( $accum ) {
                if ( $accum->lastNode === false ) {
@@ -873,34 +890,30 @@ class PPDAccum_Hash {
  * @ingroup Parser
  */
 class PPFrame_Hash implements PPFrame {
-
        /**
-        * @var Parser
+        * @var int Recursion depth of this frame, top = 0
+        * Note that this is NOT the same as expansion depth in expand()
         */
-       var $parser;
+       public $depth;
 
-       /**
-        * @var Preprocessor
-        */
-       var $preprocessor;
+       /** @var Parser */
+       protected $parser;
 
-       /**
-        * @var Title
-        */
-       var $title;
-       var $titleCache;
+       /** @var Preprocessor */
+       protected $preprocessor;
 
-       /**
-        * Hashtable listing templates which are disallowed for expansion in this frame,
-        * having been encountered previously in parent frames.
-        */
-       var $loopCheckHash;
+       /** @var Title */
+       protected $title;
+
+       /** @var array */
+       protected $titleCache;
 
        /**
-        * Recursion depth of this frame, top = 0
-        * Note that this is NOT the same as expansion depth in expand()
+        * @var array Hashtable listing templates which are disallowed for
+        *   expansion in this frame, having been encountered previously in
+        *   parent frames.
         */
-       var $depth;
+       protected $loopCheckHash;
 
        /**
         * Construct a new preprocessor frame.
@@ -1038,7 +1051,11 @@ class PPFrame_Hash implements PPFrame {
                                        # Double-brace expansion
                                        $bits = $contextNode->splitTemplate();
                                        if ( $flags & PPFrame::NO_TEMPLATES ) {
-                                               $newIterator = $this->virtualBracketedImplode( '{{', '|', '}}', $bits['title'], $bits['parts'] );
+                                               $newIterator = $this->virtualBracketedImplode(
+                                                       '{{', '|', '}}',
+                                                       $bits['title'],
+                                                       $bits['parts']
+                                               );
                                        } else {
                                                $ret = $this->parser->braceSubstitution( $bits, $this );
                                                if ( isset( $ret['object'] ) ) {
@@ -1051,7 +1068,11 @@ class PPFrame_Hash implements PPFrame {
                                        # Triple-brace expansion
                                        $bits = $contextNode->splitTemplate();
                                        if ( $flags & PPFrame::NO_ARGS ) {
-                                               $newIterator = $this->virtualBracketedImplode( '{{{', '|', '}}}', $bits['title'], $bits['parts'] );
+                                               $newIterator = $this->virtualBracketedImplode(
+                                                       '{{{', '|', '}}}',
+                                                       $bits['title'],
+                                                       $bits['parts']
+                                               );
                                        } else {
                                                $ret = $this->parser->argSubstitution( $bits, $this );
                                                if ( isset( $ret['object'] ) ) {
@@ -1069,8 +1090,9 @@ class PPFrame_Hash implements PPFrame {
                                        ) {
                                                $out .= '';
                                        } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
-                                               # Add a strip marker in PST mode so that pstPass2() can run some old-fashioned regexes on the result
-                                               # Not in RECOVER_COMMENTS mode (extractSections) though
+                                               # Add a strip marker in PST mode so that pstPass2() can
+                                               # run some old-fashioned regexes on the result.
+                                               # Not in RECOVER_COMMENTS mode (extractSections) though.
                                                $out .= $this->parser->insertStripItem( $contextNode->firstChild->value );
                                        } else {
                                                # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
@@ -1081,7 +1103,9 @@ class PPFrame_Hash implements PPFrame {
                                        # OT_WIKI will only respect <ignore> in substed templates.
                                        # The other output types respect it unless NO_IGNORE is set.
                                        # extractSections() sets NO_IGNORE and so never respects it.
-                                       if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] ) || ( $flags & PPFrame::NO_IGNORE ) ) {
+                                       if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] )
+                                               || ( $flags & PPFrame::NO_IGNORE )
+                                       ) {
                                                $out .= $contextNode->firstChild->value;
                                        } else {
                                                //$out .= '';
@@ -1351,17 +1375,31 @@ class PPFrame_Hash implements PPFrame {
  * @ingroup Parser
  */
 class PPTemplateFrame_Hash extends PPFrame_Hash {
-       var $numberedArgs, $namedArgs, $parent;
-       var $numberedExpansionCache, $namedExpansionCache;
+       /** @var array */
+       protected $numberedArgs;
+
+       /** @var array */
+       protected $namedArgs;
+
+       /** @var bool|PPFrame */
+       protected $parent;
+
+       /** @var array */
+       protected $numberedExpansionCache;
+
+       /** @var  */
+       protected $namedExpansionCache;
 
        /**
         * @param Preprocessor $preprocessor
         * @param bool|PPFrame $parent
         * @param array $numberedArgs
         * @param array $namedArgs
-        * @param Title $title
+        * @param bool|Title $title
         */
-       function __construct( $preprocessor, $parent = false, $numberedArgs = array(), $namedArgs = array(), $title = false ) {
+       function __construct( $preprocessor, $parent = false, $numberedArgs = array(),
+               $namedArgs = array(), $title = false
+       ) {
                parent::__construct( $preprocessor );
 
                $this->parent = $parent;
@@ -1450,7 +1488,10 @@ class PPTemplateFrame_Hash extends PPFrame_Hash {
                }
                if ( !isset( $this->numberedExpansionCache[$index] ) ) {
                        # No trimming for unnamed arguments
-                       $this->numberedExpansionCache[$index] = $this->parent->expand( $this->numberedArgs[$index], PPFrame::STRIP_COMMENTS );
+                       $this->numberedExpansionCache[$index] = $this->parent->expand(
+                               $this->numberedArgs[$index],
+                               PPFrame::STRIP_COMMENTS
+                       );
                }
                return $this->numberedExpansionCache[$index];
        }
@@ -1498,7 +1539,8 @@ class PPTemplateFrame_Hash extends PPFrame_Hash {
  * @ingroup Parser
  */
 class PPCustomFrame_Hash extends PPFrame_Hash {
-       var $args;
+       /** @var array */
+       protected $args;
 
        function __construct( $preprocessor, $args ) {
                parent::__construct( $preprocessor );
@@ -1548,7 +1590,13 @@ class PPCustomFrame_Hash extends PPFrame_Hash {
  * @ingroup Parser
  */
 class PPNode_Hash_Tree implements PPNode {
-       var $name, $firstChild, $lastChild, $nextSibling;
+       public $name;
+
+       public $firstChild;
+
+       public $lastChild;
+
+       public $nextSibling;
 
        function __construct( $name ) {
                $this->name = $name;
@@ -1770,7 +1818,9 @@ class PPNode_Hash_Tree implements PPNode {
  * @ingroup Parser
  */
 class PPNode_Hash_Text implements PPNode {
-       var $value, $nextSibling;
+       public $value;
+
+       public $nextSibling;
 
        function __construct( $value ) {
                if ( is_object( $value ) ) {
@@ -1787,22 +1837,50 @@ class PPNode_Hash_Text implements PPNode {
                return $this->nextSibling;
        }
 
-       function getChildren() { return false; }
-       function getFirstChild() { return false; }
-       function getChildrenOfType( $name ) { return false; }
-       function getLength() { return false; }
-       function item( $i ) { return false; }
-       function getName() { return '#text'; }
-       function splitArg() { throw new MWException( __METHOD__ . ': not supported' ); }
-       function splitExt() { throw new MWException( __METHOD__ . ': not supported' ); }
-       function splitHeading() { throw new MWException( __METHOD__ . ': not supported' ); }
+       function getChildren() {
+               return false;
+       }
+
+       function getFirstChild() {
+               return false;
+       }
+
+       function getChildrenOfType( $name ) {
+               return false;
+       }
+
+       function getLength() {
+               return false;
+       }
+
+       function item( $i ) {
+               return false;
+       }
+
+       function getName() {
+               return '#text';
+       }
+
+       function splitArg() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       function splitExt() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       function splitHeading() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
 }
 
 /**
  * @ingroup Parser
  */
 class PPNode_Hash_Array implements PPNode {
-       var $value, $nextSibling;
+       public $value;
+
+       public $nextSibling;
 
        function __construct( $value ) {
                $this->value = $value;
@@ -1820,25 +1898,50 @@ class PPNode_Hash_Array implements PPNode {
                return $this->value[$i];
        }
 
-       function getName() { return '#nodelist'; }
+       function getName() {
+               return '#nodelist';
+       }
 
        function getNextSibling() {
                return $this->nextSibling;
        }
 
-       function getChildren() { return false; }
-       function getFirstChild() { return false; }
-       function getChildrenOfType( $name ) { return false; }
-       function splitArg() { throw new MWException( __METHOD__ . ': not supported' ); }
-       function splitExt() { throw new MWException( __METHOD__ . ': not supported' ); }
-       function splitHeading() { throw new MWException( __METHOD__ . ': not supported' ); }
+       function getChildren() {
+               return false;
+       }
+
+       function getFirstChild() {
+               return false;
+       }
+
+       function getChildrenOfType( $name ) {
+               return false;
+       }
+
+       function splitArg() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       function splitExt() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       function splitHeading() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
 }
 
 /**
  * @ingroup Parser
  */
 class PPNode_Hash_Attr implements PPNode {
-       var $name, $value, $nextSibling;
+       /** @var string */
+       public $name;
+
+       /** @var string */
+       public $value;
+
+       public $nextSibling;
 
        function __construct( $name, $value ) {
                $this->name = $name;
@@ -1857,12 +1960,35 @@ class PPNode_Hash_Attr implements PPNode {
                return $this->nextSibling;
        }
 
-       function getChildren() { return false; }
-       function getFirstChild() { return false; }
-       function getChildrenOfType( $name ) { return false; }
-       function getLength() { return false; }
-       function item( $i ) { return false; }
-       function splitArg() { throw new MWException( __METHOD__ . ': not supported' ); }
-       function splitExt() { throw new MWException( __METHOD__ . ': not supported' ); }
-       function splitHeading() { throw new MWException( __METHOD__ . ': not supported' ); }
+       function getChildren() {
+               return false;
+       }
+
+       function getFirstChild() {
+               return false;
+       }
+
+       function getChildrenOfType( $name ) {
+               return false;
+       }
+
+       function getLength() {
+               return false;
+       }
+
+       function item( $i ) {
+               return false;
+       }
+
+       function splitArg() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       function splitExt() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       function splitHeading() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
 }
index a44200f..34953c0 100644 (file)
@@ -123,7 +123,10 @@ abstract class PoolCounter {
        abstract public function release();
 }
 
+// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
 class PoolCounter_Stub extends PoolCounter {
+       // @codingStandardsIgnoreEnd
+
        public function __construct() {
                /* No parameters needed */
        }
index 36101e0..093fe49 100644 (file)
@@ -45,7 +45,7 @@
  * Also this should be on a server plenty of RAM for the working set to avoid evictions.
  * Evictions could temporarily allow wait queues to double in size or temporarily cause
  * pools to appear as full when they are not. Using volatile-ttl and bumping memory-samples
- * and redis.conf can be helpful otherwise.
+ * in redis.conf can be helpful otherwise.
  *
  * @ingroup Redis
  * @since 1.23
@@ -406,7 +406,8 @@ LUA;
                                if ( $poolCounter->slot !== null ) {
                                        $poolCounter->release();
                                }
-                       } catch ( Exception $e ) {}
+                       } catch ( Exception $e ) {
+                       }
                }
        }
 }
index efbdf05..f6bafd5 100644 (file)
@@ -101,8 +101,10 @@ abstract class Profiler {
        /** @var TransactionProfiler */
        protected $trxProfiler;
 
-       /** @var Profiler */
-       public static $__instance = null; // do not call this outside Profiler and ProfileSection
+       // @codingStandardsIgnoreStart PSR2.Classes.PropertyDeclaration.Underscore
+       /** @var Profiler Do not call this outside Profiler and ProfileSection */
+       public static $__instance = null;
+       // @codingStandardsIgnoreEnd
 
        /**
         * @param array $params
index 6911d4b..38a6436 100644 (file)
@@ -105,6 +105,7 @@ class ProfilerSimpleDB extends ProfilerStandard {
                        if ( $useTrx ) {
                                $dbw->commit();
                        }
-               } catch ( DBError $e ) {}
+               } catch ( DBError $e ) {
+               }
        }
 }
index 6de97ba..1d3b65d 100644 (file)
@@ -30,16 +30,37 @@ class ProfilerStub extends Profiler {
        public function isStub() {
                return true;
        }
+
        public function isPersistent() {
                return false;
        }
-       public function profileIn( $fn ) {}
-       public function profileOut( $fn ) {}
-       public function getOutput() {}
-       public function close() {}
-       public function logData() {}
-       public function getCurrentSection() { return ''; }
-       public function transactionWritingIn( $server, $db, $id = '' ) {}
-       public function transactionWritingOut( $server, $db, $id = '' ) {}
-       public function getRawData() { return array(); }
+
+       public function profileIn( $fn ) {
+       }
+
+       public function profileOut( $fn ) {
+       }
+
+       public function getOutput() {
+       }
+
+       public function close() {
+       }
+
+       public function logData() {
+       }
+
+       public function getCurrentSection() {
+               return '';
+       }
+
+       public function transactionWritingIn( $server, $db, $id = '' ) {
+       }
+
+       public function transactionWritingOut( $server, $db, $id = '' ) {
+       }
+
+       public function getRawData() {
+               return array();
+       }
 }
index c2e5b03..02a8d7e 100644 (file)
@@ -77,15 +77,22 @@ class IRCColourfulRCFeedFormatter implements RCFeedFormatter {
 
                if ( $attribs['rc_type'] == RC_LOG ) {
                        $targetText = $rc->getTitle()->getPrefixedText();
-                       $comment = self::cleanupForIRC( str_replace( "[[$targetText]]", "[[\00302$targetText\00310]]", $actionComment ) );
+                       $comment = self::cleanupForIRC( str_replace(
+                               "[[$targetText]]",
+                               "[[\00302$targetText\00310]]",
+                               $actionComment
+                       ) );
                        $flag = $attribs['rc_log_action'];
                } else {
                        $comment = self::cleanupForIRC( $attribs['rc_comment'] );
                        $flag = '';
-                       if ( !$attribs['rc_patrolled'] && ( $wgUseRCPatrol || $attribs['rc_type'] == RC_NEW && $wgUseNPPatrol ) ) {
+                       if ( !$attribs['rc_patrolled']
+                               && ( $wgUseRCPatrol || $attribs['rc_type'] == RC_NEW && $wgUseNPPatrol )
+                       ) {
                                $flag .= '!';
                        }
-                       $flag .= ( $attribs['rc_type'] == RC_NEW ? "N" : "" ) . ( $attribs['rc_minor'] ? "M" : "" ) . ( $attribs['rc_bot'] ? "B" : "" );
+                       $flag .= ( $attribs['rc_type'] == RC_NEW ? "N" : "" )
+                               . ( $attribs['rc_minor'] ? "M" : "" ) . ( $attribs['rc_bot'] ? "B" : "" );
                }
 
                if ( $feed['add_interwiki_prefix'] === true && $wgLocalInterwikis ) {
index e5077a2..3f17bcd 100644 (file)
@@ -38,7 +38,7 @@ abstract class MachineReadableRCFeedFormatter implements RCFeedFormatter {
         * @see RCFeedFormatter::getLine
         */
        public function getLine( array $feed, RecentChange $rc, $actionComment ) {
-               global $wgCanonicalServer, $wgScriptPath;
+               global $wgCanonicalServer, $wgServerName, $wgScriptPath;
                $attrib = $rc->getAttributes();
 
                $packet = array(
@@ -120,6 +120,8 @@ abstract class MachineReadableRCFeedFormatter implements RCFeedFormatter {
                }
 
                $packet['server_url'] = $wgCanonicalServer;
+               $packet['server_name'] = $wgServerName;
+
                $packet['server_script_path'] = $wgScriptPath ?: '/';
                $packet['wiki'] = wfWikiID();
 
index d723d0e..680bd99 100644 (file)
  *    https://www.mediawiki.org/wiki/ResourceLoader
  */
 class ResourceLoader {
-
-       /**
-        * @var int
-        */
+       /** @var int */
        protected static $filterCacheVersion = 7;
-       /**
-        * @var array
-        */
+
+       /** @var array */
        protected static $requiredSourceProperties = array( 'loadScript' );
 
-       /**
-        * @var array Module name/ResourceLoaderModule object pairs
-        */
+       /** @var array Module name/ResourceLoaderModule object pairs */
        protected $modules = array();
 
-       /**
-        * @var array Associative array mapping module name to info associative array
-        */
+       /** @var array Associative array mapping module name to info associative array */
        protected $moduleInfos = array();
 
        /**
@@ -55,14 +47,10 @@ class ResourceLoader {
         */
        protected $testModuleNames = array();
 
-       /**
-        * @var array e.g. array( 'source-id' => array( 'loadScript' => 'http://.../load.php' ) )
-        */
+       /** @var array e.g. array( 'source-id' => array( 'loadScript' => 'http://.../load.php' ) ) */
        protected $sources = array();
 
-       /**
-        * @var bool
-        */
+       /** @var bool */
        protected $hasErrors = false;
 
        /**
@@ -225,7 +213,10 @@ class ResourceLoader {
                wfProfileIn( __METHOD__ );
 
                // Add 'local' source first
-               $this->addSource( 'local', array( 'loadScript' => $wgLoadScript, 'apiScript' => wfScript( 'api' ) ) );
+               $this->addSource(
+                       'local',
+                       array( 'loadScript' => $wgLoadScript, 'apiScript' => wfScript( 'api' ) )
+               );
 
                // Add other sources
                $this->addSource( $wgResourceLoaderSources );
@@ -275,7 +266,8 @@ class ResourceLoader {
                        // Check $name for validity
                        if ( !self::isValidModuleName( $name ) ) {
                                wfProfileOut( __METHOD__ );
-                               throw new MWException( "ResourceLoader module name '$name' is invalid, see ResourceLoader::isValidModuleName()" );
+                               throw new MWException( "ResourceLoader module name '$name' is invalid, "
+                                       . "see ResourceLoader::isValidModuleName()" );
                        }
 
                        // Attach module
@@ -304,7 +296,9 @@ class ResourceLoader {
                global $IP, $wgEnableJavaScriptTest;
 
                if ( $wgEnableJavaScriptTest !== true ) {
-                       throw new MWException( 'Attempt to register JavaScript test modules but <code>$wgEnableJavaScriptTest</code> is false. Edit your <code>LocalSettings.php</code> to enable it.' );
+                       throw new MWException( 'Attempt to register JavaScript test modules '
+                               . 'but <code>$wgEnableJavaScriptTest</code> is false. '
+                               . 'Edit your <code>LocalSettings.php</code> to enable it.' );
                }
 
                wfProfileIn( __METHOD__ );
@@ -325,7 +319,8 @@ class ResourceLoader {
                        $module['dependencies'][] = 'test.mediawiki.qunit.testrunner';
                }
 
-               $testModules['qunit'] = ( include "$IP/tests/qunit/QUnitTestResources.php" ) + $testModules['qunit'];
+               $testModules['qunit'] =
+                       ( include "$IP/tests/qunit/QUnitTestResources.php" ) + $testModules['qunit'];
 
                foreach ( $testModules as $id => $names ) {
                        // Register test modules
@@ -395,10 +390,12 @@ class ResourceLoader {
         * @return array
         */
        public function getTestModuleNames( $framework = 'all' ) {
-               /// @todo api siteinfo prop testmodulenames modulenames
+               /** @todo api siteinfo prop testmodulenames modulenames */
                if ( $framework == 'all' ) {
                        return $this->testModuleNames;
-               } elseif ( isset( $this->testModuleNames[$framework] ) && is_array( $this->testModuleNames[$framework] ) ) {
+               } elseif ( isset( $this->testModuleNames[$framework] )
+                       && is_array( $this->testModuleNames[$framework] )
+               ) {
                        return $this->testModuleNames[$framework];
                } else {
                        return array();
@@ -763,7 +760,10 @@ class ResourceLoader {
                                $blobs = MessageBlobStore::get( $this, $modules, $context->getLanguage() );
                        } catch ( Exception $e ) {
                                MWExceptionHandler::logException( $e );
-                               wfDebugLog( 'resourceloader', __METHOD__ . ": pre-fetching blobs from MessageBlobStore failed: $e" );
+                               wfDebugLog(
+                                       'resourceloader',
+                                       __METHOD__ . ": pre-fetching blobs from MessageBlobStore failed: $e"
+                               );
                                $this->hasErrors = true;
                                // Add exception to the output as a comment
                                $exceptions .= self::formatException( $e );
@@ -795,9 +795,13 @@ class ResourceLoader {
                                                $scripts = $module->getScriptURLsForDebug( $context );
                                        } else {
                                                $scripts = $module->getScript( $context );
-                                               // rtrim() because there are usually a few line breaks after the last ';'.
-                                               // A new line at EOF, a new line added by ResourceLoaderFileModule::readScriptFiles, etc.
-                                               if ( is_string( $scripts ) && strlen( $scripts ) && substr( rtrim( $scripts ), -1 ) !== ';' ) {
+                                               // rtrim() because there are usually a few line breaks
+                                               // after the last ';'. A new line at EOF, a new line
+                                               // added by ResourceLoaderFileModule::readScriptFiles, etc.
+                                               if ( is_string( $scripts )
+                                                       && strlen( $scripts )
+                                                       && substr( rtrim( $scripts ), -1 ) !== ';'
+                                               ) {
                                                        // Append semicolon to prevent weird bugs caused by files not
                                                        // terminating their statements right (bug 27054)
                                                        $scripts .= ";\n";
@@ -1055,7 +1059,9 @@ class ResourceLoader {
         * @param string $script JavaScript code
         * @return string
         */
-       public static function makeCustomLoaderScript( $name, $version, $dependencies, $group, $source, $script ) {
+       public static function makeCustomLoaderScript( $name, $version, $dependencies,
+               $group, $source, $script
+       ) {
                $script = str_replace( "\n", "\n\t", trim( $script ) );
                return Xml::encodeJsCall(
                        "( function ( name, version, dependencies, group, source ) {\n\t$script\n} )",
@@ -1218,9 +1224,12 @@ class ResourceLoader {
         * @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,
-                       $printable = false, $handheld = false, $extraQuery = array() ) {
+       public static function makeLoaderURL( $modules, $lang, $skin, $user = null,
+               $version = null, $debug = false, $only = null, $printable = false,
+               $handheld = false, $extraQuery = array()
+       ) {
                global $wgLoadScript;
+
                $query = self::makeLoaderQuery( $modules, $lang, $skin, $user, $version, $debug,
                        $only, $printable, $handheld, $extraQuery
                );
@@ -1247,8 +1256,10 @@ class ResourceLoader {
         *
         * @return array
         */
-       public static function makeLoaderQuery( $modules, $lang, $skin, $user = null, $version = null, $debug = false, $only = null,
-                       $printable = false, $handheld = false, $extraQuery = array() ) {
+       public static function makeLoaderQuery( $modules, $lang, $skin, $user = null,
+               $version = null, $debug = false, $only = null, $printable = false,
+               $handheld = false, $extraQuery = array()
+       ) {
                $query = array(
                        'modules' => self::makePackedModulesString( $modules ),
                        'lang' => $lang,
index 63ec5de..9013e2b 100644 (file)
@@ -27,7 +27,6 @@
  * of a specific loader request
  */
 class ResourceLoaderContext {
-
        /* Protected Members */
 
        protected $resourceLoader;
@@ -109,7 +108,8 @@ class ResourceLoaderContext {
        }
 
        /**
-        * Return a dummy ResourceLoaderContext object suitable for passing into things that don't "really" need a context
+        * Return a dummy ResourceLoaderContext object suitable for passing into
+        * things that don't "really" need a context.
         * @return ResourceLoaderContext
         */
        public static function newDummyContext() {
index 61fb111..382bdd9 100644 (file)
  * ResourceLoader module based on local JavaScript/CSS files.
  */
 class ResourceLoaderFileModule extends ResourceLoaderModule {
-
        /* Protected Members */
 
        /** @var string Local base path, see __construct() */
        protected $localBasePath = '';
+
        /** @var string Remote base path, see __construct() */
        protected $remoteBasePath = '';
+
        /**
         * @var array List of paths to JavaScript files to always include
         * @par Usage:
@@ -41,6 +42,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @endcode
         */
        protected $scripts = array();
+
        /**
         * @var array List of JavaScript files to include when using a specific language
         * @par Usage:
@@ -49,6 +51,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @endcode
         */
        protected $languageScripts = array();
+
        /**
         * @var array List of JavaScript files to include when using a specific skin
         * @par Usage:
@@ -57,6 +60,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @endcode
         */
        protected $skinScripts = array();
+
        /**
         * @var array List of paths to JavaScript files to include in debug mode
         * @par Usage:
@@ -65,6 +69,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @endcode
         */
        protected $debugScripts = array();
+
        /**
         * @var array List of paths to JavaScript files to include in the startup module
         * @par Usage:
@@ -73,6 +78,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @endcode
         */
        protected $loaderScripts = array();
+
        /**
         * @var array List of paths to CSS files to always include
         * @par Usage:
@@ -81,6 +87,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @endcode
         */
        protected $styles = array();
+
        /**
         * @var array List of paths to CSS files to include when using specific skins
         * @par Usage:
@@ -89,6 +96,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @endcode
         */
        protected $skinStyles = array();
+
        /**
         * @var array List of modules this module depends on
         * @par Usage:
@@ -97,6 +105,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @endcode
         */
        protected $dependencies = array();
+
        /**
         * @var array List of message keys used by this module
         * @par Usage:
@@ -105,14 +114,19 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @endcode
         */
        protected $messages = array();
+
        /** @var string Name of group to load this module in */
        protected $group;
+
        /** @var string Position on the page to load this module at */
        protected $position = 'bottom';
+
        /** @var bool Link to raw files in debug mode */
        protected $debugRaw = true;
+
        /** @var bool Whether mw.loader.state() call should be omitted */
        protected $raw = false;
+
        protected $targets = array( 'desktop' );
 
        /**
@@ -129,6 +143,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @endcode
         */
        protected $modifiedTime = array();
+
        /**
         * @var array Place where readStyleFile() tracks file dependencies
         * @par Usage:
@@ -809,7 +824,8 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                $result = $compiler->cachedCompile( $source );
 
                if ( !is_array( $result ) ) {
-                       throw new MWException( 'LESS compiler result has type ' . gettype( $result ) . '; array expected.' );
+                       throw new MWException( 'LESS compiler result has type '
+                               . gettype( $result ) . '; array expected.' );
                }
 
                $this->localFileRefs += array_keys( $result['files'] );
index 0996a33..9ddd184 100644 (file)
@@ -26,7 +26,6 @@
  * Abstraction for resource loader modules, with name registration and maxage functionality.
  */
 abstract class ResourceLoaderModule {
-
        # Type of resource
        const TYPE_SCRIPTS = 'scripts';
        const TYPE_STYLES = 'styles';
@@ -476,7 +475,8 @@ abstract class ResourceLoaderModule {
                        return $data;
                }
 
-               wfDebugLog( 'resourceloader', __METHOD__ . ": New definition hash for module {$this->getName()} in context {$context->getHash()}: $hash." );
+               wfDebugLog( 'resourceloader', __METHOD__ . ": New definition hash for module "
+                       . "{$this->getName()} in context {$context->getHash()}: $hash." );
 
                $timestamp = time();
                $cache->set( $key, $timestamp );
index d0f0541..f9c5057 100644 (file)
@@ -44,8 +44,8 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                }
 
                global $wgLoadScript, $wgScript, $wgStylePath, $wgScriptExtension,
-                       $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang,
-                       $wgVariantArticlePath, $wgActionPaths, $wgVersion,
+                       $wgArticlePath, $wgScriptPath, $wgServer, $wgServerName,
+                       $wgContLang, $wgVariantArticlePath, $wgActionPaths, $wgVersion,
                        $wgEnableAPI, $wgEnableWriteAPI, $wgDBname,
                        $wgSitename, $wgFileExtensions, $wgExtensionAssetsPath,
                        $wgCookiePrefix, $wgResourceLoaderMaxQueryLength,
@@ -85,6 +85,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        // becoming [] instead of {} in JS (bug 34604)
                        'wgActionPaths' => (object)$wgActionPaths,
                        'wgServer' => $wgServer,
+                       'wgServerName' => $wgServerName,
                        'wgUserLanguage' => $context->getLanguage(),
                        'wgContentLanguage' => $wgContLang->getCode(),
                        'wgVersion' => $wgVersion,
index dcec5dd..7e0e45d 100644 (file)
  * 'archive' table for traditionally-deleted revisions that have an
  * ar_rev_id saved.
  *
- * See RevDel_RevisionItem and RevDel_ArchivedRevisionItem for items.
+ * See RevDelRevisionItem and RevDelArchivedRevisionItem for items.
  */
-class RevDel_RevisionList extends RevDel_List {
-       var $currentRevId;
+class RevDelRevisionList extends RevDelList {
+       /** @var int */
+       protected $currentRevId;
 
        public function getType() {
                return 'revision';
@@ -80,7 +81,7 @@ class RevDel_RevisionList extends RevDel_List {
                }
 
                // Check if any requested revisions are available fully deleted.
-               $archived = $db->select( array( 'archive' ), '*',
+               $archived = $db->select( array( 'archive' ), Revision::selectArchiveFields(),
                        array(
                                'ar_rev_id' => $ids
                        ),
@@ -108,12 +109,12 @@ class RevDel_RevisionList extends RevDel_List {
 
        public function newItem( $row ) {
                if ( isset( $row->rev_id ) ) {
-                       return new RevDel_RevisionItem( $this, $row );
+                       return new RevDelRevisionItem( $this, $row );
                } elseif ( isset( $row->ar_rev_id ) ) {
-                       return new RevDel_ArchivedRevisionItem( $this, $row );
+                       return new RevDelArchivedRevisionItem( $this, $row );
                } else {
                        // This shouldn't happen. :)
-                       throw new MWException( 'Invalid row type in RevDel_RevisionList' );
+                       throw new MWException( 'Invalid row type in RevDelRevisionList' );
                }
        }
 
@@ -146,8 +147,8 @@ class RevDel_RevisionList extends RevDel_List {
 /**
  * Item class for a live revision table row
  */
-class RevDel_RevisionItem extends RevDel_Item {
-       var $revision;
+class RevDelRevisionItem extends RevDelItem {
+       protected $revision;
 
        public function __construct( $list, $row ) {
                parent::__construct( $list, $row );
@@ -225,7 +226,7 @@ class RevDel_RevisionItem extends RevDel_Item {
 
        /**
         * Get the HTML link to the revision text.
-        * Overridden by RevDel_ArchiveItem.
+        * Overridden by RevDelArchiveItem.
         * @return string
         */
        protected function getRevisionLink() {
@@ -248,7 +249,7 @@ class RevDel_RevisionItem extends RevDel_Item {
 
        /**
         * Get the HTML link to the diff.
-        * Overridden by RevDel_ArchiveItem
+        * Overridden by RevDelArchiveItem
         * @return string
         */
        protected function getDiffLink() {
@@ -308,7 +309,7 @@ class RevDel_RevisionItem extends RevDel_Item {
 /**
  * List for archive table items, i.e. revisions deleted via action=delete
  */
-class RevDel_ArchiveList extends RevDel_RevisionList {
+class RevDelArchiveList extends RevDelRevisionList {
        public function getType() {
                return 'archive';
        }
@@ -326,7 +327,7 @@ class RevDel_ArchiveList extends RevDel_RevisionList {
                foreach ( $this->ids as $id ) {
                        $timestamps[] = $db->timestamp( $id );
                }
-               return $db->select( 'archive', '*',
+               return $db->select( 'archive', Revision::selectArchiveFields(),
                                array(
                                        'ar_namespace' => $this->title->getNamespace(),
                                        'ar_title' => $this->title->getDBkey(),
@@ -338,7 +339,7 @@ class RevDel_ArchiveList extends RevDel_RevisionList {
        }
 
        public function newItem( $row ) {
-               return new RevDel_ArchiveItem( $this, $row );
+               return new RevDelArchiveItem( $this, $row );
        }
 
        public function doPreCommitUpdates() {
@@ -353,9 +354,9 @@ class RevDel_ArchiveList extends RevDel_RevisionList {
 /**
  * Item class for a archive table row
  */
-class RevDel_ArchiveItem extends RevDel_RevisionItem {
+class RevDelArchiveItem extends RevDelRevisionItem {
        public function __construct( $list, $row ) {
-               RevDel_Item::__construct( $list, $row );
+               RevDelItem::__construct( $list, $row );
                $this->revision = Revision::newFromArchiveRow( $row,
                        array( 'page' => $this->list->title->getArticleID() ) );
        }
@@ -436,11 +437,11 @@ class RevDel_ArchiveItem extends RevDel_RevisionItem {
 
 /**
  * Item class for a archive table row by ar_rev_id -- actually
- * used via RevDel_RevisionList.
+ * used via RevDelRevisionList.
  */
-class RevDel_ArchivedRevisionItem extends RevDel_ArchiveItem {
+class RevDelArchivedRevisionItem extends RevDelArchiveItem {
        public function __construct( $list, $row ) {
-               RevDel_Item::__construct( $list, $row );
+               RevDelItem::__construct( $list, $row );
 
                $this->revision = Revision::newFromArchiveRow( $row,
                        array( 'page' => $this->list->title->getArticleID() ) );
@@ -469,7 +470,16 @@ class RevDel_ArchivedRevisionItem extends RevDel_ArchiveItem {
 /**
  * List for oldimage table items
  */
-class RevDel_FileList extends RevDel_List {
+class RevDelFileList extends RevDelList {
+       /** @var array */
+       protected $storeBatch;
+
+       /** @var array */
+       protected $deleteBatch;
+
+       /** @var array */
+       protected $cleanupBatch;
+
        public function getType() {
                return 'oldimage';
        }
@@ -486,8 +496,6 @@ class RevDel_FileList extends RevDel_List {
                return File::DELETED_FILE;
        }
 
-       var $storeBatch, $deleteBatch, $cleanupBatch;
-
        /**
         * @param DatabaseBase $db
         * @return mixed
@@ -510,7 +518,7 @@ class RevDel_FileList extends RevDel_List {
        }
 
        public function newItem( $row ) {
-               return new RevDel_FileItem( $this, $row );
+               return new RevDelFileItem( $this, $row );
        }
 
        public function clearFileOps() {
@@ -568,12 +576,9 @@ class RevDel_FileList extends RevDel_List {
 /**
  * Item class for an oldimage table row
  */
-class RevDel_FileItem extends RevDel_Item {
-
-       /**
-        * @var File
-        */
-       var $file;
+class RevDelFileItem extends RevDelItem {
+       /** @var File */
+       protected $file;
 
        public function __construct( $list, $row ) {
                parent::__construct( $list, $row );
@@ -657,7 +662,7 @@ class RevDel_FileItem extends RevDel_Item {
 
        /**
         * Get the link to the file.
-        * Overridden by RevDel_ArchivedFileItem.
+        * Overridden by RevDelArchivedFileItem.
         * @return string
         */
        protected function getLink() {
@@ -782,7 +787,7 @@ class RevDel_FileItem extends RevDel_Item {
 /**
  * List for filearchive table items
  */
-class RevDel_ArchivedFileList extends RevDel_FileList {
+class RevDelArchivedFileList extends RevDelFileList {
        public function getType() {
                return 'filearchive';
        }
@@ -810,16 +815,16 @@ class RevDel_ArchivedFileList extends RevDel_FileList {
        }
 
        public function newItem( $row ) {
-               return new RevDel_ArchivedFileItem( $this, $row );
+               return new RevDelArchivedFileItem( $this, $row );
        }
 }
 
 /**
  * Item class for a filearchive table row
  */
-class RevDel_ArchivedFileItem extends RevDel_FileItem {
+class RevDelArchivedFileItem extends RevDelFileItem {
        public function __construct( $list, $row ) {
-               RevDel_Item::__construct( $list, $row );
+               RevDelItem::__construct( $list, $row );
                $this->file = ArchivedFile::newFromRow( $row );
        }
 
@@ -884,7 +889,7 @@ class RevDel_ArchivedFileItem extends RevDel_FileItem {
 /**
  * List for logging table items
  */
-class RevDel_LogList extends RevDel_List {
+class RevDelLogList extends RevDelList {
        public function getType() {
                return 'logging';
        }
@@ -921,7 +926,20 @@ class RevDel_LogList extends RevDel_List {
         */
        public function doQuery( $db ) {
                $ids = array_map( 'intval', $this->ids );
-               return $db->select( 'logging', '*',
+               return $db->select( 'logging', array(
+                               'log_id',
+                               'log_type',
+                               'log_action',
+                               'log_timestamp',
+                               'log_user',
+                               'log_user_text',
+                               'log_namespace',
+                               'log_title',
+                               'log_page',
+                               'log_comment',
+                               'log_params',
+                               'log_deleted'
+                       ),
                        array( 'log_id' => $ids ),
                        __METHOD__,
                        array( 'ORDER BY' => 'log_id DESC' )
@@ -929,7 +947,7 @@ class RevDel_LogList extends RevDel_List {
        }
 
        public function newItem( $row ) {
-               return new RevDel_LogItem( $this, $row );
+               return new RevDelLogItem( $this, $row );
        }
 
        public function getSuppressBit() {
@@ -952,7 +970,7 @@ class RevDel_LogList extends RevDel_List {
 /**
  * Item class for a logging table row
  */
-class RevDel_LogItem extends RevDel_Item {
+class RevDelLogItem extends RevDelItem {
        public function getIdField() {
                return 'log_id';
        }
@@ -1024,7 +1042,9 @@ class RevDel_LogItem extends RevDel_Item {
                // User links and action text
                $action = $formatter->getActionText();
                // Comment
-               $comment = $this->list->getLanguage()->getDirMark() . Linker::commentBlock( $this->row->log_comment );
+               $comment = $this->list->getLanguage()->getDirMark()
+                       . Linker::commentBlock( $this->row->log_comment );
+
                if ( LogEventsList::isDeleted( $this->row, LogPage::DELETED_COMMENT ) ) {
                        $comment = '<span class="history-deleted">' . $comment . '</span>';
                }
@@ -1040,9 +1060,15 @@ class RevDel_LogItem extends RevDel_Item {
                        'type' => $logEntry->getType(),
                        'action' => $logEntry->getSubtype(),
                );
-               $ret += $logEntry->isDeleted( LogPage::DELETED_USER ) ? array( 'userhidden' => '' ) : array();
-               $ret += $logEntry->isDeleted( LogPage::DELETED_COMMENT ) ? array( 'commenthidden' => '' ) : array();
-               $ret += $logEntry->isDeleted( LogPage::DELETED_ACTION ) ? array( 'actionhidden' => '' ) : array();
+               $ret += $logEntry->isDeleted( LogPage::DELETED_USER )
+                       ? array( 'userhidden' => '' )
+                       : array();
+               $ret += $logEntry->isDeleted( LogPage::DELETED_COMMENT )
+                       ? array( 'commenthidden' => '' )
+                       : array();
+               $ret += $logEntry->isDeleted( LogPage::DELETED_ACTION )
+                       ? array( 'actionhidden' => '' )
+                       : array();
 
                if ( LogEventsList::userCan( $this->row, LogPage::DELETED_ACTION, $user ) ) {
                        ApiQueryLogEvents::addLogParams(
index e326dce..086db3a 100644 (file)
 /**
  * Abstract base class for a list of deletable items. The list class
  * needs to be able to make a query from a set of identifiers to pull
- * relevant rows, to return RevDel_Item subclasses wrapping them, and
+ * relevant rows, to return RevDelItem subclasses wrapping them, and
  * to wrap bulk update operations.
  */
-abstract class RevDel_List extends RevisionListBase {
+abstract class RevDelList extends RevisionListBase {
        function __construct( IContextSource $context, Title $title, array $ids ) {
                parent::__construct( $context, $title );
                $this->ids = $ids;
@@ -105,7 +105,9 @@ abstract class RevDel_List extends RevisionListBase {
                        $status->itemStatuses = array();
                }
 
+               // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
                for ( $this->reset(); $this->current(); $this->next() ) {
+                       // @codingStandardsIgnoreEnd
                        $item = $this->current();
                        unset( $missing[$item->getId()] );
 
@@ -315,7 +317,7 @@ abstract class RevDel_List extends RevisionListBase {
 /**
  * Abstract base class for deletable items
  */
-abstract class RevDel_Item extends RevisionItemBase {
+abstract class RevDelItem extends RevisionItemBase {
        /**
         * Returns true if the item is "current", and the operation to set the given
         * bits can't be executed for that reason
index ecfe1d8..e42301b 100644 (file)
 class RevisionDeleter {
        /** List of known revdel types, with their corresponding list classes */
        private static $allowedTypes = array(
-               'revision' => 'RevDel_RevisionList',
-               'archive' => 'RevDel_ArchiveList',
-               'oldimage' => 'RevDel_FileList',
-               'filearchive' => 'RevDel_ArchivedFileList',
-               'logging' => 'RevDel_LogList',
+               'revision' => 'RevDelRevisionList',
+               'archive' => 'RevDelArchiveList',
+               'oldimage' => 'RevDelFileList',
+               'filearchive' => 'RevDelArchivedFileList',
+               'logging' => 'RevDelLogList',
        );
 
        /** Type map to support old log entries */
@@ -77,7 +77,7 @@ class RevisionDeleter {
         * @param IContextSource $context
         * @param Title $title
         * @param array $ids
-        * @return RevDel_List
+        * @return RevDelList
         */
        public static function createList( $typeName, IContextSource $context, Title $title, array $ids ) {
                $typeName = self::getCanonicalTypeName( $typeName );
index 827d8c3..907047e 100644 (file)
  * @ingroup Search
  */
 class SearchEngine {
-       var $limit = 10;
-       var $offset = 0;
-       var $prefix = '';
-       var $searchTerms = array();
-       var $namespaces = array( NS_MAIN );
+       /** @var string */
+       public $prefix = '';
+
+       /** @var int[] */
+       public $namespaces = array( NS_MAIN );
+
+       /** @var int */
+       protected $limit = 10;
+
+       /** @var int */
+       protected $offset = 0;
+
+       /** @var array|string */
+       protected $searchTerms = array();
+
+       /** @var bool */
        protected $showSuggestion = true;
 
        /** @var array Feature values */
@@ -106,8 +117,9 @@ class SearchEngine {
        }
 
        /**
-        * Transform search term in cases when parts of the query came as different GET params (when supported)
-        * e.g. for prefix queries: search=test&prefix=Main_Page/Archive -> test prefix:Main Page/Archive
+        * Transform search term in cases when parts of the query came as different
+        * GET params (when supported), e.g. for prefix queries:
+        * search=test&prefix=Main_Page/Archive -> test prefix:Main Page/Archive
         */
        function transformSearchTerm( $term ) {
                return $term;
@@ -148,7 +160,10 @@ class SearchEngine {
                $allSearchTerms = array( $searchterm );
 
                if ( $wgContLang->hasVariants() ) {
-                       $allSearchTerms = array_merge( $allSearchTerms, $wgContLang->autoConvertToAllVariants( $searchterm ) );
+                       $allSearchTerms = array_merge(
+                               $allSearchTerms,
+                               $wgContLang->autoConvertToAllVariants( $searchterm )
+                       );
                }
 
                $titleResult = null;
@@ -523,6 +538,7 @@ class SearchEngine {
         */
        public static function getOpenSearchTemplate() {
                global $wgOpenSearchTemplate, $wgCanonicalServer;
+
                if ( $wgOpenSearchTemplate ) {
                        return $wgOpenSearchTemplate;
                } else {
@@ -530,7 +546,9 @@ class SearchEngine {
                        if ( !$ns ) {
                                $ns = "0";
                        }
-                       return $wgCanonicalServer . wfScript( 'api' ) . '?action=opensearch&search={searchTerms}&namespace=' . $ns;
+
+                       return $wgCanonicalServer . wfScript( 'api' )
+                               . '?action=opensearch&search={searchTerms}&namespace=' . $ns;
                }
        }
 
index 5e734fe..b8b2bae 100644 (file)
@@ -27,7 +27,7 @@
  * @ingroup Search
  */
 class SearchHighlighter {
-       var $mCleanWikitext = true;
+       protected $mCleanWikitext = true;
 
        function __construct( $cleanupWikitext = true ) {
                $this->mCleanWikitext = $cleanupWikitext;
@@ -40,11 +40,11 @@ class SearchHighlighter {
         * @param array $terms Terms to highlight (unescaped)
         * @param int $contextlines
         * @param int $contextchars
-        * @return tring
+        * @return string
         */
        public function highlightText( $text, $terms, $contextlines, $contextchars ) {
-               global $wgContLang;
-               global $wgSearchHighlightBoundaries;
+               global $wgContLang, $wgSearchHighlightBoundaries;
+
                $fname = __METHOD__;
 
                if ( $text == '' ) {
@@ -138,7 +138,11 @@ class SearchHighlighter {
                foreach ( $terms as $index => $term ) {
                        // manually do upper/lowercase stuff for utf-8 since PHP won't do it
                        if ( preg_match( '/[\x80-\xff]/', $term ) ) {
-                               $terms[$index] = preg_replace_callback( '/./us', array( $this, 'caseCallback' ), $terms[$index] );
+                               $terms[$index] = preg_replace_callback(
+                                       '/./us',
+                                       array( $this, 'caseCallback' ),
+                                       $terms[$index]
+                               );
                        } else {
                                $terms[$index] = $term;
                        }
@@ -229,7 +233,12 @@ class SearchHighlighter {
                        if ( $len < $targetchars - 20 ) {
                                // complete this line
                                if ( $len < strlen( $all[$index] ) ) {
-                                       $extended[$index] = $this->extract( $all[$index], $offsets[$index], $offsets[$index] + $targetchars, $offsets[$index] );
+                                       $extended[$index] = $this->extract(
+                                               $all[$index],
+                                               $offsets[$index],
+                                               $offsets[$index] + $targetchars,
+                                               $offsets[$index]
+                                       );
                                        $len = strlen( $extended[$index] );
                                }
 
@@ -254,7 +263,9 @@ class SearchHighlighter {
                foreach ( $snippets as $index => $line ) {
                        if ( $last == - 1 ) {
                                $extract .= $line; // first line
-                       } elseif ( $last + 1 == $index && $offsets[$last] + strlen( $snippets[$last] ) >= strlen( $all[$last] ) ) {
+                       } elseif ( $last + 1 == $index
+                               && $offsets[$last] + strlen( $snippets[$last] ) >= strlen( $all[$last] )
+                       ) {
                                $extract .= " " . $line; // continous lines
                        } else {
                                $extract .= '<b> ... </b>' . $line;
@@ -360,7 +371,13 @@ class SearchHighlighter {
                $s = max( 0, $point - $tolerance );
                $l = min( strlen( $text ), $point + $tolerance ) - $s;
                $m = array();
-               if ( preg_match( '/[ ,.!?~!@#$%^&*\(\)+=\-\\\|\[\]"\'<>]/', substr( $text, $s, $l ), $m, PREG_OFFSET_CAPTURE ) ) {
+
+               if ( preg_match(
+                       '/[ ,.!?~!@#$%^&*\(\)+=\-\\\|\[\]"\'<>]/',
+                       substr( $text, $s, $l ),
+                       $m,
+                       PREG_OFFSET_CAPTURE
+               ) ) {
                        return $m[0][1] + $s + $offset;
                } else {
                        // check if point is on a valid first UTF8 char
@@ -373,6 +390,7 @@ class SearchHighlighter {
                                }
                                $char = ord( $text[$point] );
                        }
+
                        return $point;
 
                }
@@ -444,7 +462,11 @@ class SearchHighlighter {
                $text = preg_replace( "/\\{\\{([^|]+?)\\}\\}/", "", $text );
                $text = preg_replace( "/\\{\\{([^|]+\\|)(.*?)\\}\\}/", "\\2", $text );
                $text = preg_replace( "/\\[\\[([^|]+?)\\]\\]/", "\\1", $text );
-               $text = preg_replace_callback( "/\\[\\[([^|]+\\|)(.*?)\\]\\]/", array( $this, 'linkReplace' ), $text );
+               $text = preg_replace_callback(
+                       "/\\[\\[([^|]+\\|)(.*?)\\]\\]/",
+                       array( $this, 'linkReplace' ),
+                       $text
+               );
                // $text = preg_replace("/\\[\\[([^|]+\\|)(.*?)\\]\\]/", "\\2", $text);
                $text = preg_replace( "/<\/?[^>]+>/", "", $text );
                $text = preg_replace( "/'''''/", "", $text );
index ed76ff8..4960c42 100644 (file)
@@ -34,7 +34,10 @@ class SearchMssql extends SearchDatabase {
         * @access public
         */
        function searchText( $term ) {
-               $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), true ) ) );
+               $resultSet = $this->db->resultObject(
+                       $this->db->query( $this->getQuery( $this->filter( $term ), true ) )
+               );
+
                return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
@@ -46,7 +49,10 @@ class SearchMssql extends SearchDatabase {
         * @access public
         */
        function searchTitle( $term ) {
-               $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), false ) ) );
+               $resultSet = $this->db->resultObject(
+                       $this->db->query( $this->getQuery( $this->filter( $term ), false ) )
+               );
+
                return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
index cc20d02..77a0c43 100644 (file)
@@ -29,8 +29,9 @@
  * @ingroup Search
  */
 class SearchMySQL extends SearchDatabase {
-       var $strictMatching = true;
-       static $mMinSearchLength;
+       protected $strictMatching = true;
+
+       private static $mMinSearchLength;
 
        /**
         * Parse the user's query and transform it into an SQL fragment which will
@@ -43,6 +44,7 @@ class SearchMySQL extends SearchDatabase {
         */
        function parseQuery( $filteredText, $fulltext ) {
                global $wgContLang;
+
                $lc = $this->legalSearchChars(); // Minus format chars
                $searchon = '';
                $this->searchTerms = array();
@@ -52,7 +54,9 @@ class SearchMySQL extends SearchDatabase {
                if ( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
                                $filteredText, $m, PREG_SET_ORDER ) ) {
                        foreach ( $m as $bits ) {
-                               @list( /* all */, $modifier, $term, $nonQuoted, $wildcard ) = $bits;
+                               wfSuppressWarnings();
+                               list( /* all */, $modifier, $term, $nonQuoted, $wildcard ) = $bits;
+                               wfRestoreWarnings();
 
                                if ( $nonQuoted != '' ) {
                                        $term = $nonQuoted;
index c944152..4cfcec3 100644 (file)
@@ -29,7 +29,6 @@
  * @ingroup Search
  */
 class SearchOracle extends SearchDatabase {
-
        private $reservedWords = array(
                'ABOUT' => 1,
                'ACCUM' => 1,
@@ -70,7 +69,10 @@ class SearchOracle extends SearchDatabase {
                        return new SqlSearchResultSet( false, '' );
                }
 
-               $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), true ) ) );
+               $resultSet = $this->db->resultObject(
+                       $this->db->query( $this->getQuery( $this->filter( $term ), true ) )
+               );
+
                return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
@@ -85,7 +87,10 @@ class SearchOracle extends SearchDatabase {
                        return new SqlSearchResultSet( false, '' );
                }
 
-               $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), false ) ) );
+               $resultSet = $this->db->resultObject(
+                       $this->db->query( $this->getQuery( $this->filter( $term ), false ) )
+               );
+
                return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
index 6b1a6b2..62fb236 100644 (file)
@@ -50,7 +50,9 @@ class SearchSqlite extends SearchDatabase {
                if ( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
                                $filteredText, $m, PREG_SET_ORDER ) ) {
                        foreach ( $m as $bits ) {
-                               @list( /* all */, $modifier, $term, $nonQuoted, $wildcard ) = $bits;
+                               wfSuppressWarnings();
+                               list( /* all */, $modifier, $term, $nonQuoted, $wildcard ) = $bits;
+                               wfRestoreWarnings();
 
                                if ( $nonQuoted != '' ) {
                                        $term = $nonQuoted;
index 2a86b31..4854bcb 100644 (file)
@@ -33,7 +33,6 @@
  * @ingroup Site
  */
 class MediaWikiSite extends Site {
-
        const PATH_FILE = 'file_path';
        const PATH_PAGE = 'page_path';
 
@@ -76,14 +75,16 @@ class MediaWikiSite extends Site {
        }
 
        /**
-        * Returns the normalized form of the given page title, using the normalization rules of the given site.
-        * If the given title is a redirect, the redirect weill be resolved and the redirect target is returned.
+        * Returns the normalized form of the given page title, using the
+        * normalization rules of the given site. If the given title is a redirect,
+        * the redirect weill be resolved and the redirect target is returned.
         *
-        * @note  : This actually makes an API request to the remote site, so beware that this function is slow and depends
-        *          on an external service.
+        * @note This actually makes an API request to the remote site, so beware
+        *   that this function is slow and depends on an external service.
         *
-        * @note  : If MW_PHPUNIT_TEST is defined, the call to the external site is skipped, and the title
-        *          is normalized using the local normalization rules as implemented by the Title class.
+        * @note If MW_PHPUNIT_TEST is defined, the call to the external site is
+        *   skipped, and the title is normalized using the local normalization
+        *   rules as implemented by the Title class.
         *
         * @see Site::normalizePageName
         *
@@ -103,8 +104,10 @@ class MediaWikiSite extends Site {
 
                // Go on call the external site
                if ( defined( 'MW_PHPUNIT_TEST' ) ) {
-                       // If the code is under test, don't call out to other sites, just normalize locally.
-                       // Note: this may cause results to be inconsistent with the actual normalization used by the respective remote site!
+                       // If the code is under test, don't call out to other sites, just
+                       // normalize locally.
+                       // Note: this may cause results to be inconsistent with the actual
+                       // normalization used by the respective remote site!
 
                        $t = Title::newFromText( $pageName );
                        return $t->getPrefixedText();
@@ -152,12 +155,14 @@ class MediaWikiSite extends Site {
                $page = static::extractPageRecord( $data, $pageName );
 
                if ( isset( $page['missing'] ) ) {
-                       wfDebugLog( "MediaWikiSite", "call to <$url> returned a marker for a missing page title! " . $ret );
+                       wfDebugLog( "MediaWikiSite", "call to <$url> returned a marker for a missing page title! "
+                               . $ret );
                        return false;
                }
 
                if ( isset( $page['invalid'] ) ) {
-                       wfDebugLog( "MediaWikiSite", "call to <$url> returned a marker for an invalid page title! " . $ret );
+                       wfDebugLog( "MediaWikiSite", "call to <$url> returned a marker for an invalid page title! "
+                               . $ret );
                        return false;
                }
 
@@ -348,5 +353,4 @@ class MediaWikiSite extends Site {
 
                return $filePath;
        }
-
 }
index 59230c7..e3559f5 100644 (file)
@@ -27,7 +27,6 @@
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
 class Site implements Serializable {
-
        const TYPE_UNKNOWN = 'unknown';
        const TYPE_MEDIAWIKI = 'mediawiki';
 
@@ -340,11 +339,12 @@ class Site implements Serializable {
        }
 
        /**
-        * Returns the main path type, that is the type of the path that should generally be used to construct links
-        * to the target site.
+        * Returns the main path type, that is the type of the path that should
+        * generally be used to construct links to the target site.
         *
-        * This default implementation returns Site::PATH_LINK as the default path type. Subclasses can override this
-        * to define a different default path type, or return false to disable site links.
+        * This default implementation returns Site::PATH_LINK as the default path
+        * type. Subclasses can override this to define a different default path
+        * type, or return false to disable site links.
         *
         * @since 1.21
         *
@@ -541,7 +541,9 @@ class Site implements Serializable {
         * @return string[]
         */
        public function getInterwikiIds() {
-               return array_key_exists( self::ID_INTERWIKI, $this->localIds ) ? $this->localIds[self::ID_INTERWIKI] : array();
+               return array_key_exists( self::ID_INTERWIKI, $this->localIds )
+                       ? $this->localIds[self::ID_INTERWIKI]
+                       : array();
        }
 
        /**
@@ -553,7 +555,9 @@ class Site implements Serializable {
         * @return string[]
         */
        public function getNavigationIds() {
-               return array_key_exists( self::ID_EQUIVALENT, $this->localIds ) ? $this->localIds[self::ID_EQUIVALENT] : array();
+               return array_key_exists( self::ID_EQUIVALENT, $this->localIds )
+                       ? $this->localIds[self::ID_EQUIVALENT] :
+                       array();
        }
 
        /**
@@ -693,10 +697,10 @@ class Site implements Serializable {
                $this->setForward( $fields['forward'] );
                $this->setInternalId( $fields['internalid'] );
        }
-
 }
 
 /**
  * @deprecated
  */
-class SiteObject extends Site {}
+class SiteObject extends Site {
+}
index 6992450..dfe4ec5 100644 (file)
@@ -27,7 +27,6 @@
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
 class SiteList extends GenericArrayObject {
-
        /**
         * Internal site identifiers pointing to their sites offset value.
         *
@@ -350,10 +349,10 @@ class SiteList extends GenericArrayObject {
 
                return $serializationData;
        }
-
 }
 
 /**
  * @deprecated
  */
-class SiteArray extends SiteList {}
+class SiteArray extends SiteList {
+}
index d14569a..f382d98 100644 (file)
@@ -29,7 +29,6 @@
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
 class SiteSQLStore implements SiteStore {
-
        /**
         * @since 1.21
         *
@@ -169,7 +168,10 @@ class SiteSQLStore implements SiteStore {
                }
 
                if ( $siteRow->hasField( 'language' ) ) {
-                       $site->setLanguageCode( $siteRow->getField( 'language' ) === '' ? null : $siteRow->getField( 'language' ) );
+                       $site->setLanguageCode( $siteRow->getField( 'language' ) === ''
+                               ? null
+                               : $siteRow->getField( 'language' )
+                       );
                }
 
                if ( $siteRow->hasField( 'source' ) ) {
@@ -504,5 +506,4 @@ class Sites extends SiteSQLStore {
        public function getSiteGroup( $group ) {
                return $this->getSites()->getGroup( $group );
        }
-
 }
index 7e108af..f7c95d1 100644 (file)
@@ -405,42 +405,42 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                global $wgRecentChangesFlags;
                $user = $context->getUser();
                # The legend showing what the letters and stuff mean
-               $legend = Xml::openElement( 'dl' ) . "\n";
+               $legend = Html::openElement( 'dl' ) . "\n";
                # Iterates through them and gets the messages for both letter and tooltip
                $legendItems = $wgRecentChangesFlags;
-               if ( !$user->useRCPatrol() ) {
+               if ( !( $user->useRCPatrol() || $user->useNPPatrol() ) ) {
                        unset( $legendItems['unpatrolled'] );
                }
-               foreach ( $legendItems as $key => $legendInfo ) { # generate items of the legend
-                       $label = $legendInfo['title'];
-                       $letter = $legendInfo['letter'];
-                       $cssClass = isset( $legendInfo['class'] ) ? $legendInfo['class'] : $key;
+               foreach ( $legendItems as $key => $item ) { # generate items of the legend
+                       $label = $item['title'];
+                       $letter = $item['letter'];
+                       $cssClass = isset( $item['class'] ) ? $item['class'] : $key;
 
-                       $legend .= Xml::element( 'dt',
+                       $legend .= Html::element( 'dt',
                                array( 'class' => $cssClass ), $context->msg( $letter )->text()
                        ) . "\n";
                        if ( $key === 'newpage' ) {
-                               $legend .= Xml::openElement( 'dd' );
+                               $legend .= Html::openElement( 'dd' );
                                $legend .= $context->msg( $label )->escaped();
                                $legend .= ' ' . $context->msg( 'recentchanges-legend-newpage' )->parse();
-                               $legend .= Xml::closeElement( 'dd' ) . "\n";
+                               $legend .= Html::closeElement( 'dd' ) . "\n";
                        } else {
-                               $legend .= Xml::element( 'dd', array(),
+                               $legend .= Html::element( 'dd', array(),
                                        $context->msg( $label )->text()
                                ) . "\n";
                        }
                }
                # (+-123)
-               $legend .= Xml::tags( 'dt',
+               $legend .= Html::rawElement( 'dt',
                        array( 'class' => 'mw-plusminus-pos' ),
                        $context->msg( 'recentchanges-legend-plusminus' )->parse()
                ) . "\n";
-               $legend .= Xml::element(
+               $legend .= Html::element(
                        'dd',
                        array( 'class' => 'mw-changeslist-legend-plusminus' ),
                        $context->msg( 'recentchanges-label-plusminus' )->text()
                ) . "\n";
-               $legend .= Xml::closeElement( 'dl' ) . "\n";
+               $legend .= Html::closeElement( 'dl' ) . "\n";
 
                # Collapsibility
                $legend =
index 2305f21..dd22769 100644 (file)
@@ -407,17 +407,21 @@ class SpecialPageFactory {
         * Return categorised listable special pages which are available
         * for the current user, but not for everyone
         *
+        * @param User|null $user User object to use or null for $wgUser
         * @return array ( string => Specialpage )
         */
-       public static function getRestrictedPages() {
-               global $wgUser;
+       public static function getRestrictedPages( User $user = null ) {
                $pages = array();
+               if ( $user === null ) {
+                       global $wgUser;
+                       $user = $wgUser;
+               }
                foreach ( self::getList() as $name => $rec ) {
                        $page = self::getPage( $name );
                        if (
                                $page->isListed()
                                && $page->isRestricted()
-                               && $page->userCanExecute( $wgUser )
+                               && $page->userCanExecute( $user )
                        ) {
                                $pages[$name] = $page;
                        }
index d963677..c42c089 100644 (file)
@@ -31,7 +31,6 @@
  * @ingroup SpecialPage
  */
 class ActiveUsersPager extends UsersPager {
-
        /**
         * @var FormOptions
         */
@@ -194,20 +193,31 @@ class ActiveUsersPager extends UsersPager {
                $self = $this->getTitle();
                $limit = $this->mLimit ? Html::hidden( 'limit', $this->mLimit ) : '';
 
-               $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); # Form tag
+               # Form tag
+               $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
                $out .= Xml::fieldset( $this->msg( 'activeusers' )->text() ) . "\n";
                $out .= Html::hidden( 'title', $self->getPrefixedDBkey() ) . $limit . "\n";
 
+               # Username field
                $out .= Xml::inputLabel( $this->msg( 'activeusers-from' )->text(),
-                       'username', 'offset', 20, $this->requestedUser, array( 'tabindex' => 1 ) ) . '<br />';# Username field
+                       'username', 'offset', 20, $this->requestedUser, array( 'tabindex' => 1 ) ) . '<br />';
 
                $out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' )->text(),
                        'hidebots', 'hidebots', $this->opts->getValue( 'hidebots' ), array( 'tabindex' => 2 ) );
 
-               $out .= Xml::checkLabel( $this->msg( 'activeusers-hidesysops' )->text(),
-                       'hidesysops', 'hidesysops', $this->opts->getValue( 'hidesysops' ), array( 'tabindex' => 3 ) ) . '<br />';
-
-               $out .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text(), array( 'tabindex' => 4 ) ) . "\n";# Submit button and form bottom
+               $out .= Xml::checkLabel(
+                       $this->msg( 'activeusers-hidesysops' )->text(),
+                       'hidesysops',
+                       'hidesysops',
+                       $this->opts->getValue( 'hidesysops' ),
+                       array( 'tabindex' => 3 )
+               ) . '<br />';
+
+               # Submit button and form bottom
+               $out .= Xml::submitButton(
+                       $this->msg( 'allpagessubmit' )->text(),
+                       array( 'tabindex' => 4 )
+               ) . "\n";
                $out .= Xml::closeElement( 'fieldset' );
                $out .= Xml::closeElement( 'form' );
 
index fe49cf2..11425e9 100644 (file)
@@ -35,30 +35,6 @@ class SpecialAllpages extends IncludableSpecialPage {
         */
        protected $maxPerPage = 345;
 
-       /**
-        * Maximum number of pages to show on single index subpage.
-        *
-        * @var int $maxLineCount
-        */
-       protected $maxLineCount = 100;
-
-       /**
-        * Maximum number of chars to show for an entry.
-        *
-        * @var int $maxPageLength
-        */
-       protected $maxPageLength = 70;
-
-       /**
-        * Maximum number of pages in a hierarchical ("top level") list.
-        *
-        * Traversal of the entire page list by spidering the top levels is thought
-        * to require O(N^3) DB CPU time where N is the number of pages on the wiki.
-        * See bug 56840. If this limit is exceeded, the behaviour becomes like a
-        * simple alphabetic pager.
-        */
-       protected $maxTopLevelPages = 50000;
-
        /**
         * Determines, which message describes the input field 'nsfrom'.
         *
@@ -206,157 +182,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                        $where[] = 'page_title <= ' . $dbr->addQuotes( $to );
                }
 
-               global $wgMemc;
-               $key = wfMemcKey( 'allpages', 'ns', $namespace, sha1( $from ), sha1( $to ) );
-               $lines = $wgMemc->get( $key );
-
-               $count = $dbr->estimateRowCount( 'page', '*', $where, __METHOD__ );
-
-               // Don't show a hierarchical list if the number of pages is very large,
-               // since generating it will cause a lot of scanning
-               if ( $count > $this->maxTopLevelPages ) {
-                       $this->showChunk( $namespace, $from, $to, $hideredirects );
-
-                       return;
-               }
-
-               $maxPerSubpage = intval( $count / $this->maxLineCount );
-               $maxPerSubpage = max( $maxPerSubpage, $this->maxPerPage );
-
-               if ( !is_array( $lines ) ) {
-                       $options = array( 'LIMIT' => 1 );
-                       $options['ORDER BY'] = 'page_title ASC';
-                       $firstTitle = $dbr->selectField( 'page', 'page_title', $where, __METHOD__, $options );
-                       $lastTitle = $firstTitle;
-                       # This array is going to hold the page_titles in order.
-                       $lines = array( $firstTitle );
-                       # If we are going to show n rows, we need n+1 queries to find the relevant titles.
-                       $done = false;
-                       while ( !$done ) {
-                               // Fetch the last title of this chunk and the first of the next
-                               $chunk = ( $lastTitle === false )
-                                       ? array()
-                                       : array( 'page_title >= ' . $dbr->addQuotes( $lastTitle ) );
-                               $res = $dbr->select( 'page', /* FROM */
-                                       'page_title', /* WHAT */
-                                       array_merge( $where, $chunk ),
-                                       __METHOD__,
-                                       array( 'LIMIT' => 2, 'OFFSET' => $maxPerSubpage - 1, 'ORDER BY' => 'page_title ASC' )
-                               );
-
-                               $s = $dbr->fetchObject( $res );
-                               if ( $s ) {
-                                       array_push( $lines, $s->page_title );
-                               } else {
-                                       // Final chunk, but ended prematurely. Go back and find the end.
-                                       $endTitle = $dbr->selectField( 'page', 'MAX(page_title)',
-                                               array_merge( $where, $chunk ),
-                                               __METHOD__ );
-                                       array_push( $lines, $endTitle );
-                                       $done = true;
-                               }
-
-                               $s = $res->fetchObject();
-                               if ( $s ) {
-                                       array_push( $lines, $s->page_title );
-                                       $lastTitle = $s->page_title;
-                               } else {
-                                       // This was a final chunk and ended exactly at the limit.
-                                       // Rare but convenient!
-                                       $done = true;
-                               }
-                               $res->free();
-                       }
-                       $wgMemc->add( $key, $lines, 3600 );
-               }
-
-               // If there are only two or less sections, don't even display them.
-               // Instead, display the first section directly.
-               if ( count( $lines ) <= 2 ) {
-                       if ( !empty( $lines ) ) {
-                               $this->showChunk( $namespace, $from, $to, $hideredirects );
-                       } else {
-                               $output->addHTML( $this->namespaceForm( $namespace, $from, $to, $hideredirects ) );
-                       }
-
-                       return;
-               }
-
-               # At this point, $lines should contain an even number of elements.
-               $out .= Xml::openElement( 'table', array( 'class' => 'allpageslist' ) );
-               while ( count( $lines ) > 0 ) {
-                       $inpoint = array_shift( $lines );
-                       $outpoint = array_shift( $lines );
-                       $out .= $this->showline( $inpoint, $outpoint, $namespace, $hideredirects );
-               }
-               $out .= Xml::closeElement( 'table' );
-               $nsForm = $this->namespaceForm( $namespace, $from, $to, $hideredirects );
-
-               # Is there more?
-               if ( $this->including() ) {
-                       $out2 = '';
-               } else {
-                       if ( isset( $from ) || isset( $to ) ) {
-                               $out2 = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-form' ) ) .
-                                       '<tr>
-                                                       <td>' .
-                                       $nsForm .
-                                       '</td>
-                                                       <td class="mw-allpages-nav">' .
-                                       Linker::link( $this->getPageTitle(), $this->msg( 'allpages' )->escaped(),
-                                               array(), array(), 'known' ) .
-                                       "</td>
-                                               </tr>" .
-                                       Xml::closeElement( 'table' );
-                       } else {
-                               $out2 = $nsForm;
-                       }
-               }
-               $output->addHTML( $out2 . $out );
-       }
-
-       /**
-        * Show a line of "ABC to DEF" ranges of articles
-        *
-        * @param string $inpoint Lower limit of pagenames
-        * @param string $outpoint Upper limit of pagenames
-        * @param int $namespace (Default NS_MAIN)
-        * @param bool $hideRedirects Don't show redirects. Default: false
-        * @return string
-        */
-       function showline( $inpoint, $outpoint, $namespace = NS_MAIN, $hideRedirects = false ) {
-               // Use content language since page titles are considered to use content language
-               global $wgContLang;
-
-               $inpointf = str_replace( '_', ' ', $inpoint );
-               $outpointf = str_replace( '_', ' ', $outpoint );
-
-               // Don't let the length runaway
-               $inpointf = $wgContLang->truncate( $inpointf, $this->maxPageLength );
-               $outpointf = $wgContLang->truncate( $outpointf, $this->maxPageLength );
-
-               $queryParams = array(
-                       'from' => $inpoint,
-                       'to' => $outpoint,
-               );
-
-               if ( $namespace ) {
-                       $queryParams['namespace'] = $namespace;
-               }
-               if ( $hideRedirects ) {
-                       $queryParams['hideredirects'] = 1;
-               }
-
-               $url = $this->getPageTitle()->getLocalURL( $queryParams );
-               $inlink = Html::element( 'a', array( 'href' => $url ), $inpointf );
-               $outlink = Html::element( 'a', array( 'href' => $url ), $outpointf );
-
-               $out = $this->msg( 'alphaindexline' )->rawParams(
-                       "$inlink</td><td>",
-                       "</td><td>$outlink"
-               )->escaped();
-
-               return '<tr><td class="mw-allpages-alphaindexline">' . $out . '</td></tr>';
+               $this->showChunk( $namespace, $from, $to, $hideredirects );
        }
 
        /**
index 716bf80..8c46a93 100644 (file)
@@ -84,7 +84,8 @@ class SpecialBlock extends FormSpecialPage {
                        $this->getSkin()->setRelevantUser( $this->target );
                }
 
-               list( $this->previousTarget, /*...*/ ) = Block::parseTarget( $request->getVal( 'wpPreviousTarget' ) );
+               list( $this->previousTarget, /*...*/ ) =
+                       Block::parseTarget( $request->getVal( 'wpPreviousTarget' ) );
                $this->requestedHideUser = $request->getBool( 'wpHideUser' );
        }
 
@@ -129,7 +130,6 @@ class SpecialBlock extends FormSpecialPage {
                        'Target' => array(
                                'type' => 'text',
                                'label-message' => 'ipaddressorusername',
-                               'tabindex' => '1',
                                'id' => 'mw-bi-target',
                                'size' => '45',
                                'autofocus' => true,
@@ -140,7 +140,6 @@ class SpecialBlock extends FormSpecialPage {
                                'type' => !count( $suggestedDurations ) ? 'text' : 'selectorother',
                                'label-message' => 'ipbexpiry',
                                'required' => true,
-                               'tabindex' => '2',
                                'options' => $suggestedDurations,
                                'other' => $this->msg( 'ipbother' )->text(),
                                'default' => $this->msg( 'ipb-default-expiry' )->inContentLanguage()->text(),
@@ -361,7 +360,10 @@ class SpecialBlock extends FormSpecialPage {
 
                # Link to unblock the specified user, or to a blank unblock form
                if ( $this->target instanceof User ) {
-                       $message = $this->msg( 'ipb-unblock-addr', wfEscapeWikiText( $this->target->getName() ) )->parse();
+                       $message = $this->msg(
+                               'ipb-unblock-addr',
+                               wfEscapeWikiText( $this->target->getName() )
+                       )->parse();
                        $list = SpecialPage::getTitleFor( 'Unblock', $this->target->getName() );
                } else {
                        $message = $this->msg( 'ipb-unblock' )->parse();
@@ -451,7 +453,7 @@ class SpecialBlock extends FormSpecialPage {
 
        /**
         * Determine the target of the block, and the type of target
-        * TODO: should be in Block.php?
+        * @todo Should be in Block.php?
         * @param string $par subpage parameter passed to setup, or data value from
         *     the HTMLForm
         * @param WebRequest $request Optionally try and get data from a request too
@@ -765,7 +767,11 @@ class SpecialBlock extends FormSpecialPage {
 
                # Can't watch a rangeblock
                if ( $type != Block::TYPE_RANGE && $data['Watch'] ) {
-                       WatchAction::doWatch( Title::makeTitle( NS_USER, $target ), $performer, WatchedItem::IGNORE_USER_RIGHTS );
+                       WatchAction::doWatch(
+                               Title::makeTitle( NS_USER, $target ),
+                               $performer,
+                               WatchedItem::IGNORE_USER_RIGHTS
+                       );
                }
 
                # Block constructor sanitizes certain block options on insert
@@ -969,7 +975,3 @@ class SpecialBlock extends FormSpecialPage {
                return 'users';
        }
 }
-
-# BC @since 1.18
-class IPBlockForm extends SpecialBlock {
-}
index 4c9a682..9170e3e 100644 (file)
@@ -27,8 +27,9 @@
  * @ingroup SpecialPage
  */
 class SpecialBlockList extends SpecialPage {
+       protected $target;
 
-       protected $target, $options;
+       protected $options;
 
        function __construct() {
                parent::__construct( 'BlockList' );
@@ -203,7 +204,11 @@ class SpecialBlockList extends SpecialPage {
                        foreach ( $otherBlockLink as $link ) {
                                $list .= Html::rawElement( 'li', array(), $link ) . "\n";
                        }
-                       $out->addHTML( Html::rawElement( 'ul', array( 'class' => 'mw-ipblocklist-otherblocks' ), $list ) . "\n" );
+                       $out->addHTML( Html::rawElement(
+                               'ul',
+                               array( 'class' => 'mw-ipblocklist-otherblocks' ),
+                               $list
+                       ) . "\n" );
                }
        }
 
@@ -471,11 +476,15 @@ class HTMLBlockedUsersItemSelect extends HTMLSelectField {
                }
 
                // Let folks pick an explicit limit not from our list, as long as it's a real numbr.
-               if ( !in_array( $value, $this->mParams['options'] ) && $value == intval( $value ) && $value > 0 ) {
+               if ( !in_array( $value, $this->mParams['options'] )
+                       && $value == intval( $value )
+                       && $value > 0
+               ) {
                        // This adds the explicitly requested limit value to the drop-down,
                        // then makes sure it's sorted correctly so when we output the list
                        // later, the custom option doesn't just show up last.
-                       $this->mParams['options'][$this->mParent->getLanguage()->formatNum( $value )] = intval( $value );
+                       $this->mParams['options'][$this->mParent->getLanguage()->formatNum( $value )] =
+                               intval( $value );
                        asort( $this->mParams['options'] );
                }
 
index 79636b1..581619f 100644 (file)
@@ -30,7 +30,6 @@
  * @ingroup SpecialPage
  */
 class SpecialBookSources extends SpecialPage {
-
        /**
         * ISBN passed to the page, if any
         */
@@ -55,7 +54,10 @@ class SpecialBookSources extends SpecialPage {
                $this->getOutput()->addHTML( $this->makeForm() );
                if ( strlen( $this->isbn ) > 0 ) {
                        if ( !self::isValidISBN( $this->isbn ) ) {
-                               $this->getOutput()->wrapWikiMsg( "<div class=\"error\">\n$1\n</div>", 'booksources-invalid-isbn' );
+                               $this->getOutput()->wrapWikiMsg(
+                                       "<div class=\"error\">\n$1\n</div>",
+                                       'booksources-invalid-isbn'
+                               );
                        }
                        $this->showList();
                }
@@ -118,10 +120,21 @@ class SpecialBookSources extends SpecialPage {
                global $wgScript;
 
                $form = Html::openElement( 'fieldset' ) . "\n";
-               $form .= Html::element( 'legend', array(), $this->msg( 'booksources-search-legend' )->text() ) . "\n";
+               $form .= Html::element(
+                       'legend',
+                       array(),
+                       $this->msg( 'booksources-search-legend' )->text()
+               ) . "\n";
                $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n";
                $form .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . "\n";
-               $form .= '<p>' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn, array( 'autofocus' => true ) );
+               $form .= '<p>' . Xml::inputLabel(
+                       $this->msg( 'booksources-isbn' )->text(),
+                       'isbn',
+                       'isbn',
+                       20,
+                       $this->isbn,
+                       array( 'autofocus' => true )
+               );
                $form .= '&#160;' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . "</p>\n";
                $form .= Html::closeElement( 'form' ) . "\n";
                $form .= Html::closeElement( 'fieldset' ) . "\n";
index b2ddc22..1bbdbea 100644 (file)
@@ -28,7 +28,6 @@
  * @ingroup SpecialPage
  */
 class BrokenRedirectsPage extends QueryPage {
-
        function __construct( $name = 'BrokenRedirects' ) {
                parent::__construct( $name );
        }
@@ -148,7 +147,8 @@ class BrokenRedirectsPage extends QueryPage {
                        );
                }
 
-               $out .= $this->msg( 'parentheses' )->rawParams( $this->getLanguage()->pipeList( $links ) )->escaped();
+               $out .= $this->msg( 'parentheses' )->rawParams( $this->getLanguage()
+                       ->pipeList( $links ) )->escaped();
                $out .= " {$arr} {$to}";
 
                return $out;
index 7763166..cb9b07c 100644 (file)
@@ -38,7 +38,6 @@
  * @since 1.20
  */
 abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper {
-
        /**
         * CacheHelper object to which we forward the non-SpecialPage specific caching work.
         * Initialized in startCache.
@@ -142,7 +141,11 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper {
         * @param string|null $key
         */
        public function addCachedHTML( $computeFunction, $args = array(), $key = null ) {
-               $this->getOutput()->addHTML( $this->cacheHelper->getCachedValue( $computeFunction, $args, $key ) );
+               $this->getOutput()->addHTML( $this->cacheHelper->getCachedValue(
+                       $computeFunction,
+                       $args,
+                       $key
+               ) );
        }
 
        /**
@@ -158,7 +161,8 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper {
        }
 
        /**
-        * Sets the time to live for the cache, in seconds or a unix timestamp indicating the point of expiry.
+        * Sets the time to live for the cache, in seconds or a unix timestamp
+        * indicating the point of expiry.
         *
         * @since 1.20
         *
index 07a2a86..c57e33b 100644 (file)
@@ -27,7 +27,6 @@
  * @ingroup SpecialPage
  */
 class SpecialChangeEmail extends UnlistedSpecialPage {
-
        /**
         * Users password
         * @var string
@@ -233,13 +232,19 @@ class SpecialChangeEmail extends UnlistedSpecialPage {
                $throttleCount = LoginForm::incLoginThrottle( $user->getName() );
                if ( $throttleCount === true ) {
                        $lang = $this->getLanguage();
-                       $this->error( array( 'changeemail-throttled', $lang->formatDuration( $wgPasswordAttemptThrottle['seconds'] ) ) );
+                       $this->error( array(
+                               'changeemail-throttled',
+                               $lang->formatDuration( $wgPasswordAttemptThrottle['seconds'] )
+                       ) );
 
                        return false;
                }
 
                global $wgRequirePasswordforEmailChange;
-               if ( $wgRequirePasswordforEmailChange && !$user->checkTemporaryPassword( $pass ) && !$user->checkPassword( $pass ) ) {
+               if ( $wgRequirePasswordforEmailChange
+                       && !$user->checkTemporaryPassword( $pass )
+                       && !$user->checkPassword( $pass )
+               ) {
                        $this->error( 'wrongpassword' );
 
                        return false;
index 8afbf4b..f4ce882 100644 (file)
@@ -27,8 +27,8 @@
  * @ingroup SpecialPage
  */
 class SpecialChangePassword extends FormSpecialPage {
-
-       protected $mUserName, $mDomain;
+       protected $mUserName;
+       protected $mDomain;
 
        // Optional Wikitext Message to show above the password change form
        protected $mPreTextMessage = null;
@@ -178,7 +178,6 @@ class SpecialChangePassword extends FormSpecialPage {
                        return false;
                }
 
-
                if ( $request->getCheck( 'wpCancel' ) ) {
                        $titleObj = Title::newFromText( $request->getVal( 'returnto' ) );
                        if ( !$titleObj instanceof Title ) {
index 6a4467c..0571d0d 100644 (file)
@@ -1055,7 +1055,8 @@ class ContribsPager extends ReverseChronologicalPager {
                        # Show user names for /newbies as there may be different users.
                        # Note that we already excluded rows with hidden user names.
                        if ( $this->contribs == 'newbie' ) {
-                               $userlink = ' . . ' . $lang->getDirMark() . Linker::userLink( $rev->getUser(), $rev->getUserText() );
+                               $userlink = ' . . ' . $lang->getDirMark()
+                                       . Linker::userLink( $rev->getUser(), $rev->getUserText() );
                                $userlink .= ' ' . $this->msg( 'parentheses' )->rawParams(
                                        Linker::userTalkLink( $rev->getUser(), $rev->getUserText() ) )->escaped() . ' ';
                        } else {
index d781e6d..448637e 100644 (file)
  */
 class SpecialCreateAccount extends SpecialRedirectToSpecial {
        function __construct() {
-               parent::__construct( 'CreateAccount', 'Userlogin', 'signup', array( 'returnto', 'returntoquery', 'uselang' ) );
+               parent::__construct(
+                       'CreateAccount',
+                       'Userlogin',
+                       'signup',
+                       array( 'returnto', 'returntoquery', 'uselang' )
+               );
        }
 
        // No reason to hide this link on Special:Specialpages
index 0c860a5..ebbef17 100644 (file)
@@ -93,6 +93,14 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                                        $out->addReturnTo( SpecialPage::getTitleFor( 'Watchlist' ) );
                                }
                                break;
+                       case self::EDIT_CLEAR:
+                               $out->setPageTitle( $this->msg( 'watchlistedit-clear-title' ) );
+                               $form = $this->getClearForm();
+                               if ( $form->show() ) {
+                                       $out->addHTML( $this->successMessage );
+                                       $out->addReturnTo( SpecialPage::getTitleFor( 'Watchlist' ) );
+                               }
+                               break;
 
                        case self::EDIT_NORMAL:
                        default:
@@ -191,6 +199,18 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                return true;
        }
 
+       public function submitClear( $data ) {
+               $current = $this->getWatchlist();
+               $this->clearWatchlist();
+               $this->getUser()->invalidateCache();
+               $this->successMessage = $this->msg( 'watchlistedit-clear-done' )->parse();
+               $this->successMessage .= ' ' . $this->msg( 'watchlistedit-clear-removed' )
+                       ->numParams( count( $current ) )->parse();
+               $this->showTitles( $current, $this->successMessage );
+
+               return true;
+       }
+
        /**
         * Print out a list of linked titles
         *
@@ -204,6 +224,10 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                $talk = $this->msg( 'talkpagelinktext' )->escaped();
                // Do a batch existence check
                $batch = new LinkBatch();
+               if (count($titles) >= 100) {
+                       $output = wfMessage( 'watchlistedit-too-many' )->parse();
+                       return;
+               }
                foreach ( $titles as $title ) {
                        if ( !$title instanceof Title ) {
                                $title = Title::newFromText( $title );
@@ -538,7 +562,8 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                $context->setTitle( $this->getPageTitle() ); // Remove subpage
                $form = new EditWatchlistNormalHTMLForm( $fields, $context );
                $form->setSubmitTextMsg( 'watchlistedit-normal-submit' );
-               # Used message keys: 'accesskey-watchlistedit-normal-submit', 'tooltip-watchlistedit-normal-submit'
+               # Used message keys:
+               # 'accesskey-watchlistedit-normal-submit', 'tooltip-watchlistedit-normal-submit'
                $form->setSubmitTooltip( 'watchlistedit-normal-submit' );
                $form->setWrapperLegendMsg( 'watchlistedit-normal-legend' );
                $form->addHeaderText( $this->msg( 'watchlistedit-normal-explain' )->parse() );
@@ -579,7 +604,10 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                        );
                }
 
-               wfRunHooks( 'WatchlistEditorBuildRemoveLine', array( &$tools, $title, $title->isRedirect(), $this->getSkin() ) );
+               wfRunHooks(
+                       'WatchlistEditorBuildRemoveLine',
+                       array( &$tools, $title, $title->isRedirect(), $this->getSkin() )
+               );
 
                return $link . " (" . $this->getLanguage()->pipeList( $tools ) . ")";
        }
@@ -611,6 +639,25 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                return $form;
        }
 
+       /**
+        * Get a form for clearing the watchlist
+        *
+        * @return HTMLForm
+        */
+       protected function getClearForm() {
+               $context = new DerivativeContext( $this->getContext() );
+               $context->setTitle( $this->getPageTitle( 'clear' ) ); // Reset subpage
+               $form = new HTMLForm( array(), $context );
+               $form->setSubmitTextMsg( 'watchlistedit-clear-submit' );
+               # Used message keys: 'accesskey-watchlistedit-clear-submit', 'tooltip-watchlistedit-clear-submit'
+               $form->setSubmitTooltip( 'watchlistedit-clear-submit' );
+               $form->setWrapperLegendMsg( 'watchlistedit-clear-legend' );
+               $form->addHeaderText( $this->msg( 'watchlistedit-clear-explain' )->parse() );
+               $form->setSubmitCallback( array( $this, 'submitClear' ) );
+
+               return $form;
+       }
+
        /**
         * Determine whether we are editing the watchlist, and if so, what
         * kind of editing operation
@@ -625,6 +672,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                switch ( $mode ) {
                        case 'clear':
                        case self::EDIT_CLEAR:
+                               return self::EDIT_CLEAR;
                        case 'raw':
                        case self::EDIT_RAW:
                                return self::EDIT_RAW;
@@ -651,6 +699,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                        'view' => array( 'Watchlist', false ),
                        'edit' => array( 'EditWatchlist', false ),
                        'raw' => array( 'EditWatchlist', 'raw' ),
+                       'clear' => array( 'EditWatchlist', 'clear' ),
                );
 
                foreach ( $modes as $mode => $arr ) {
@@ -669,10 +718,6 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
        }
 }
 
-# B/C since 1.18
-class WatchlistEditor extends SpecialEditWatchlist {
-}
-
 /**
  * Extend HTMLForm purely so we can have a more sane way of getting the section headers
  */
index 487d979..bc8e728 100644 (file)
@@ -259,8 +259,14 @@ class SpecialExport extends SpecialPage {
                        ) . '<br />';
                }
 
-               // Enable this when we can do something useful exporting/importing image information. :)
-               //$form .= Xml::checkLabel( $this->msg( 'export-images' )->text(), 'images', 'wpExportImages', false ) . '<br />';
+               /* Enable this when we can do something useful exporting/importing image information.
+               $form .= Xml::checkLabel(
+                               $this->msg( 'export-images' )->text(),
+                               'images',
+                               'wpExportImages',
+                               false
+                       ) . '<br />';
+               */
                $form .= Xml::checkLabel(
                        $this->msg( 'export-download' )->text(),
                        'wpDownload',
@@ -510,7 +516,9 @@ class SpecialExport extends SpecialPage {
         * @return array
         */
        private function getPageLinks( $inputPages, $pageSet, $depth ) {
+               // @codingStandardsIgnoreStart Squiz.WhiteSpace.SemicolonSpacing.Incorrect
                for ( ; $depth > 0; --$depth ) {
+                       // @codingStandardsIgnoreEnd
                        $pageSet = $this->getLinks(
                                $inputPages, $pageSet, 'pagelinks',
                                array( 'namespace' => 'pl_namespace', 'title' => 'pl_title' ),
index 891962b..28e6479 100644 (file)
@@ -99,7 +99,9 @@ class SpecialImport extends SpecialPage {
                $sourceName = $request->getVal( "source" );
 
                $this->logcomment = $request->getText( 'log-comment' );
-               $this->pageLinkDepth = $wgExportMaxLinkDepth == 0 ? 0 : $request->getIntOrNull( 'pagelink-depth' );
+               $this->pageLinkDepth = $wgExportMaxLinkDepth == 0
+                       ? 0
+                       : $request->getIntOrNull( 'pagelink-depth' );
                $this->rootpage = $request->getText( 'rootpage' );
 
                $user = $this->getUser();
@@ -242,7 +244,10 @@ class SpecialImport extends SpecialPage {
                                </tr>
                                <tr>
                                        <td class='mw-label'>" .
-                                       Xml::label( $this->msg( 'import-interwiki-rootpage' )->text(), 'mw-interwiki-rootpage-upload' ) .
+                                       Xml::label(
+                                               $this->msg( 'import-interwiki-rootpage' )->text(),
+                                               'mw-interwiki-rootpage-upload'
+                                       ) .
                                        "</td>
                                        <td class='mw-input'>" .
                                        Xml::input( 'rootpage', 50, $this->rootpage,
@@ -434,7 +439,9 @@ class ImportReporter extends ContextSource {
        }
 
        function reportNotice( $msg, array $params ) {
-               $this->getOutput()->addHTML( Html::element( 'li', array(), $this->msg( $msg, $params )->text() ) );
+               $this->getOutput()->addHTML(
+                       Html::element( 'li', array(), $this->msg( $msg, $params )->text() )
+               );
        }
 
        function reportLogItem( /* ... */ ) {
@@ -475,7 +482,8 @@ class ImportReporter extends ContextSource {
                                $detail = $this->msg( 'import-logentry-upload-detail' )->numParams(
                                        $successCount )->inContentLanguage()->text();
                                if ( $this->reason ) {
-                                       $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->reason;
+                                       $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text()
+                                               . $this->reason;
                                }
                                $log->addEntry( 'upload', $title, $detail, array(), $this->getUser() );
                        } else {
@@ -484,7 +492,8 @@ class ImportReporter extends ContextSource {
                                $detail = $this->msg( 'import-logentry-interwiki-detail' )->numParams(
                                        $successCount )->params( $interwiki )->inContentLanguage()->text();
                                if ( $this->reason ) {
-                                       $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->reason;
+                                       $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text()
+                                               . $this->reason;
                                }
                                $log->addEntry( 'interwiki', $title, $detail, array(), $this->getUser() );
                        }
@@ -492,13 +501,23 @@ class ImportReporter extends ContextSource {
                        $comment = $detail; // quick
                        $dbw = wfGetDB( DB_MASTER );
                        $latest = $title->getLatestRevID();
-                       $nullRevision = Revision::newNullRevision( $dbw, $title->getArticleID(), $comment, true, $this->getUser() );
+                       $nullRevision = Revision::newNullRevision(
+                               $dbw,
+                               $title->getArticleID(),
+                               $comment,
+                               true,
+                               $this->getUser()
+                       );
+
                        if ( !is_null( $nullRevision ) ) {
                                $nullRevision->insertOn( $dbw );
                                $page = WikiPage::factory( $title );
                                # Update page record
                                $page->updateRevisionOn( $dbw, $nullRevision );
-                               wfRunHooks( 'NewRevisionFromEditComplete', array( $page, $nullRevision, $latest, $this->getUser() ) );
+                               wfRunHooks(
+                                       'NewRevisionFromEditComplete',
+                                       array( $page, $nullRevision, $latest, $this->getUser() )
+                               );
                        }
                } else {
                        $this->getOutput()->addHTML( "<li>" . Linker::linkKnown( $title ) . " " .
index 7982d5c..1c4f79f 100644 (file)
  * @ingroup SpecialPage
  */
 class SpecialJavaScriptTest extends SpecialPage {
-
        /**
-        * @var $frameworks Array: Mapping of framework ids and their initilizer methods
+        * @var array Mapping of framework ids and their initilizer methods
         * in this class. If a framework is requested but not in this array,
         * the 'unknownframework' error is served.
         */
-       static $frameworks = array(
+       private static $frameworks = array(
                'qunit' => 'initQUnitTesting',
        );
 
index f9caff6..6b54fe8 100644 (file)
@@ -68,14 +68,20 @@ class SpecialListFiles extends IncludableSpecialPage {
  * @ingroup SpecialPage Pager
  */
 class ImageListPager extends TablePager {
-       var $mFieldNames = null;
+       protected $mFieldNames = null;
+
        // Subclasses should override buildQueryConds instead of using $mQueryConds variable.
-       var $mQueryConds = array();
-       var $mUserName = null;
-       var $mSearch = '';
-       var $mIncluding = false;
-       var $mShowAll = false;
-       var $mTableName = 'image';
+       protected $mQueryConds = array();
+
+       protected $mUserName = null;
+
+       protected $mSearch = '';
+
+       protected $mIncluding = false;
+
+       protected $mShowAll = false;
+
+       protected $mTableName = 'image';
 
        function __construct( IContextSource $context, $userName = null, $search = '',
                $including = false, $showAll = false
@@ -298,7 +304,8 @@ class ImageListPager extends TablePager {
        function reallyDoQuery( $offset, $limit, $asc ) {
                $prevTableName = $this->mTableName;
                $this->mTableName = 'image';
-               list( $tables, $fields, $conds, $fname, $options, $join_conds ) = $this->buildQueryInfo( $offset, $limit, $asc );
+               list( $tables, $fields, $conds, $fname, $options, $join_conds ) =
+                       $this->buildQueryInfo( $offset, $limit, $asc );
                $imageRes = $this->mDb->select( $tables, $fields, $conds, $fname, $options, $join_conds );
                $this->mTableName = $prevTableName;
 
@@ -315,7 +322,8 @@ class ImageListPager extends TablePager {
                }
                $this->mIndexField = 'oi_' . substr( $this->mIndexField, 4 );
 
-               list( $tables, $fields, $conds, $fname, $options, $join_conds ) = $this->buildQueryInfo( $offset, $limit, $asc );
+               list( $tables, $fields, $conds, $fname, $options, $join_conds ) =
+                       $this->buildQueryInfo( $offset, $limit, $asc );
                $oldimageRes = $this->mDb->select( $tables, $fields, $conds, $fname, $options, $join_conds );
 
                $this->mTableName = $prevTableName;
@@ -360,11 +368,17 @@ class ImageListPager extends TablePager {
                                }
                        }
                }
+
+               // @codingStandardsIgnoreStart Squiz.WhiteSpace.SemicolonSpacing.Incorrect
                for ( ; $i < $limit && $topRes1; $i++ ) {
+                       // @codingStandardsIgnoreEnd
                        $resultArray[] = $topRes1;
                        $topRes1 = $res1->next();
                }
+
+               // @codingStandardsIgnoreStart Squiz.WhiteSpace.SemicolonSpacing.Incorrect
                for ( ; $i < $limit && $topRes2; $i++ ) {
+                       // @codingStandardsIgnoreEnd
                        $resultArray[] = $topRes2;
                        $topRes2 = $res2->next();
                }
index 31034f9..a77b70c 100644 (file)
@@ -29,9 +29,6 @@
  * @author Petr Kadlec <mormegil@centrum.cz>
  */
 class SpecialListGroupRights extends SpecialPage {
-       /**
-        * Constructor
-        */
        function __construct() {
                parent::__construct( 'Listgrouprights' );
        }
@@ -118,11 +115,12 @@ class SpecialListGroupRights extends SpecialPage {
                        $addgroups = isset( $wgAddGroups[$group] ) ? $wgAddGroups[$group] : array();
                        $removegroups = isset( $wgRemoveGroups[$group] ) ? $wgRemoveGroups[$group] : array();
                        $addgroupsSelf = isset( $wgGroupsAddToSelf[$group] ) ? $wgGroupsAddToSelf[$group] : array();
-                       $removegroupsSelf = isset( $wgGroupsRemoveFromSelf[$group] ) ? $wgGroupsRemoveFromSelf[$group] : array();
+                       $removegroupsSelf = isset( $wgGroupsRemoveFromSelf[$group] )
+                               ? $wgGroupsRemoveFromSelf[$group]
+                               : array();
 
                        $id = $group == '*' ? false : Sanitizer::escapeId( $group );
-                       $out->addHTML( Html::rawElement( 'tr', array( 'id' => $id ),
-                               "
+                       $out->addHTML( Html::rawElement( 'tr', array( 'id' => $id ), "
                                <td>$grouppage$grouplink</td>
                                        <td>" .
                                        $this->formatPermissions( $permissions, $revoke, $addgroups, $removegroups,
index 95ef951..3382405 100644 (file)
@@ -27,7 +27,7 @@
  * @ingroup SpecialPage
  */
 class SpecialLockdb extends FormSpecialPage {
-       var $reason = '';
+       protected $reason = '';
 
        public function __construct() {
                parent::__construct( 'Lockdb', 'siteadmin' );
index dd5ab93..6da6674 100644 (file)
@@ -80,7 +80,9 @@ class SpecialLog extends SpecialPage {
                $type = $opts->getValue( 'type' );
                if ( !LogPage::isLogType( $type ) ) {
                        $opts->setValue( 'type', '' );
-               } elseif ( isset( $wgLogRestrictions[$type] ) && !$this->getUser()->isAllowed( $wgLogRestrictions[$type] ) ) {
+               } elseif ( isset( $wgLogRestrictions[$type] )
+                       && !$this->getUser()->isAllowed( $wgLogRestrictions[$type] )
+               ) {
                        throw new PermissionsError( $wgLogRestrictions[$type] );
                }
 
index f799fc5..097f1b6 100644 (file)
  * @ingroup SpecialPage
  */
 class SpecialMergeHistory extends SpecialPage {
-       var $mAction, $mTarget, $mDest, $mTimestamp, $mTargetID, $mDestID, $mComment;
+       /** @var string */
+       protected $mAction;
 
-       /**
-        * @var Title
-        */
-       var $mTargetObj, $mDestObj;
+       /** @var string */
+       protected $mTarget;
+
+       /** @var string */
+       protected $mDest;
+
+       /** @var string */
+       protected $mTimestamp;
+
+       /** @var int */
+       protected $mTargetID;
+
+       /** @var int */
+       protected $mDestID;
+
+       /** @var string */
+       protected $mComment;
+
+       /** @var bool Was posted? */
+       protected $mMerge;
+
+       /** @var bool Was submitted? */
+       protected $mSubmitted;
+
+       /** @var Title */
+       protected $mTargetObj;
+
+       /** @var Title */
+       protected $mDestObj;
 
        public function __construct() {
                parent::__construct( 'MergeHistory', 'mergehistory' );
@@ -57,7 +83,9 @@ class SpecialMergeHistory extends SpecialPage {
                }
                $this->mComment = $request->getText( 'wpComment' );
 
-               $this->mMerge = $request->wasPosted() && $this->getUser()->matchEditToken( $request->getVal( 'wpEditToken' ) );
+               $this->mMerge = $request->wasPosted()
+                       && $this->getUser()->matchEditToken( $request->getVal( 'wpEditToken' ) );
+
                // target page
                if ( $this->mSubmitted ) {
                        $this->mTargetObj = Title::newFromURL( $this->mTarget );
@@ -203,7 +231,10 @@ class SpecialMergeHistory extends SpecialPage {
                                        <tr>
                                                <td>&#160;</td>
                                                <td class="mw-submit">' .
-                                       Xml::submitButton( $this->msg( 'mergehistory-submit' )->text(), array( 'name' => 'merge', 'id' => 'mw-merge-submit' ) ) .
+                                       Xml::submitButton(
+                                               $this->msg( 'mergehistory-submit' )->text(),
+                                               array( 'name' => 'merge', 'id' => 'mw-merge-submit' )
+                                       ) .
                                        '</td>
                                        </tr>' .
                                        Xml::closeElement( 'table' ) .
@@ -290,7 +321,8 @@ class SpecialMergeHistory extends SpecialPage {
                $comment = Linker::revComment( $rev );
 
                return Html::rawElement( 'li', array(),
-                       $this->msg( 'mergehistory-revisionrow' )->rawParams( $checkBox, $last, $pageLink, $userLink, $stxt, $comment )->escaped() );
+                       $this->msg( 'mergehistory-revisionrow' )
+                               ->rawParams( $checkBox, $last, $pageLink, $userLink, $stxt, $comment )->escaped() );
        }
 
        function merge() {
@@ -434,7 +466,11 @@ class SpecialMergeHistory extends SpecialPage {
 }
 
 class MergeHistoryPager extends ReverseChronologicalPager {
-       public $mForm, $mConds;
+       /** @var IContextSource */
+       public $mForm;
+
+       /** @var array */
+       public $mConds;
 
        function __construct( $form, $conds = array(), $source, $dest ) {
                $this->mForm = $form;
index 91ef797..dce5ad9 100644 (file)
  * @ingroup SpecialPage
  */
 class MovePageForm extends UnlistedSpecialPage {
-       /**
-        * Objects
-        * @var Title
-        */
-       var $oldTitle, $newTitle;
-       // Text input
-       var $reason;
+       /** @var Title */
+       protected $oldTitle;
+
+       /** @var Title */
+       protected $newTitle;
+
+
+       /** @var string Text input */
+       protected $reason;
+
        // Checks
-       var $moveTalk, $deleteAndMove, $moveSubpages, $fixRedirects, $leaveRedirect, $moveOverShared;
+
+       /** @var bool */
+       protected $moveTalk;
+
+       /** @var bool */
+       protected $deleteAndMove;
+
+       /** @var bool */
+       protected $moveSubpages;
+
+       /** @var bool */
+       protected $fixRedirects;
+
+       /** @var bool */
+       protected $leaveRedirect;
+
+       /** @var bool */
+       protected $moveOverShared;
 
        private $watch = false;
 
@@ -163,6 +183,11 @@ class MovePageForm extends UnlistedSpecialPage {
                                        "<div class=\"error mw-moveuserpage-warning\">\n$1\n</div>",
                                        'moveuserpage-warning'
                                );
+                       } elseif ( $this->oldTitle->getNamespace() == NS_CATEGORY ) {
+                               $out->wrapWikiMsg(
+                                       "<div class=\"error mw-movecategorypage-warning\">\n$1\n</div>",
+                                       'movecategorypage-warning'
+                               );
                        }
 
                        $out->addWikiMsg( $wgFixDoubleRedirects ?
@@ -680,17 +705,20 @@ class MovePageForm extends UnlistedSpecialPage {
                                        );
 
                                        $newLink = Linker::linkKnown( $newSubpage );
-                                       $extraOutput[] = $this->msg( 'movepage-page-moved' )->rawParams( $oldLink, $newLink )->escaped();
+                                       $extraOutput[] = $this->msg( 'movepage-page-moved' )
+                                               ->rawParams( $oldLink, $newLink )->escaped();
                                        ++$count;
 
                                        if ( $count >= $wgMaximumMovedPages ) {
-                                               $extraOutput[] = $this->msg( 'movepage-max-pages' )->numParams( $wgMaximumMovedPages )->escaped();
+                                               $extraOutput[] = $this->msg( 'movepage-max-pages' )
+                                                       ->numParams( $wgMaximumMovedPages )->escaped();
                                                break;
                                        }
                                } else {
                                        $oldLink = Linker::linkKnown( $oldSubpage );
                                        $newLink = Linker::link( $newSubpage );
-                                       $extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink, $newLink )->escaped();
+                                       $extraOutput[] = $this->msg( 'movepage-page-unmoved' )
+                                               ->rawParams( $oldLink, $newLink )->escaped();
                                }
                        }
                }
index 6891b16..147d176 100644 (file)
@@ -76,7 +76,7 @@ class NewFilesPager extends ReverseChronologicalPager {
        /**
         * @var ImageGallery
         */
-       var $gallery;
+       protected $gallery;
 
        function __construct( IContextSource $context, $par = null ) {
                $this->like = $context->getRequest()->getText( 'like' );
index 66ec693..505a1ec 100644 (file)
  * @ingroup SpecialPage
  */
 class SpecialNewpages extends IncludableSpecialPage {
-       // Stored objects
-
        /**
         * @var FormOptions
         */
        protected $opts;
        protected $customFilters;
 
-       // Some internal settings
        protected $showNavigation = false;
 
        public function __construct() {
@@ -394,7 +391,8 @@ class SpecialNewpages extends IncludableSpecialPage {
                        $oldTitleText = $this->msg( 'rc-old-title' )->params( $oldTitleText )->escaped();
                }
 
-               return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} {$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}</li>\n";
+               return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} "
+                       . "{$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}</li>\n";
        }
 
        /**
index 6edf2c0..7554e37 100644 (file)
@@ -27,7 +27,6 @@
  * @ingroup SpecialPage
  */
 class SpecialProtectedpages extends SpecialPage {
-
        protected $IdLevel = 'level';
        protected $IdType = 'type';
 
@@ -438,7 +437,11 @@ class ProtectedPagesPager extends TablePager {
                                        );
                                } else {
                                        $username = UserCache::singleton()->getProp( $value, 'name' );
-                                       if ( LogEventsList::userCanBitfield( $row->log_deleted, LogPage::DELETED_USER, $this->getUser() ) ) {
+                                       if ( LogEventsList::userCanBitfield(
+                                               $row->log_deleted,
+                                               LogPage::DELETED_USER,
+                                               $this->getUser()
+                                       ) ) {
                                                if ( $username === false ) {
                                                        $formatted = htmlspecialchars( $value );
                                                } else {
@@ -473,7 +476,11 @@ class ProtectedPagesPager extends TablePager {
                                                $this->msg( 'protectedpages-unknown-reason' )->escaped()
                                        );
                                } else {
-                                       if ( LogEventsList::userCanBitfield( $row->log_deleted, LogPage::DELETED_COMMENT, $this->getUser() ) ) {
+                                       if ( LogEventsList::userCanBitfield(
+                                               $row->log_deleted,
+                                               LogPage::DELETED_COMMENT,
+                                               $this->getUser()
+                                       ) ) {
                                                $formatted = Linker::formatComment( $value !== null ? $value : '' );
                                        } else {
                                                $formatted = $this->msg( 'rev-deleted-comment' )->escaped();
index 4edf33c..797f588 100644 (file)
@@ -55,7 +55,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
        /** @var array UI Labels about the current type */
        private $typeLabels;
 
-       /** @var RevDel_List RevDel_List object, storing the list of items to be deleted/undeleted */
+       /** @var RevDelList RevDelList object, storing the list of items to be deleted/undeleted */
        private $revDelList;
 
        /** @var bool Whether user is allowed to perform the action */
@@ -132,7 +132,9 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                // $this->ids = array_map( 'intval', $this->ids );
                $this->ids = array_unique( array_filter( $this->ids ) );
 
-               if ( $request->getVal( 'action' ) == 'historysubmit' || $request->getVal( 'action' ) == 'revisiondelete' ) {
+               if ( $request->getVal( 'action' ) == 'historysubmit'
+                       || $request->getVal( 'action' ) == 'revisiondelete'
+               ) {
                        // For show/hide form submission from history page
                        // Since we are access through index.php?title=XXX&action=historysubmit
                        // getFullTitle() will contain the target title and not our title
@@ -162,7 +164,11 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $this->mIsAllowed = $user->isAllowed( RevisionDeleter::getRestriction( $this->typeName ) );
 
                # Allow the list type to adjust the passed target
-               $this->targetObj = RevisionDeleter::suggestTarget( $this->typeName, $this->targetObj, $this->ids );
+               $this->targetObj = RevisionDeleter::suggestTarget(
+                       $this->typeName,
+                       $this->targetObj,
+                       $this->ids
+               );
 
                $this->otherReason = $request->getVal( 'wpReason' );
                # We need a target page!
@@ -277,7 +283,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
 
        /**
         * Show a deleted file version requested by the visitor.
-        * TODO Mostly copied from Special:Undelete. Refactor.
+        * @todo Mostly copied from Special:Undelete. Refactor.
         * @param string $archiveName
         */
        protected function tryShowFile( $archiveName ) {
@@ -326,7 +332,9 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                # a user without appropriate permissions can toddle off and
                # nab the image, and Squid will serve it
                $this->getRequest()->response()->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' );
-               $this->getRequest()->response()->header( 'Cache-Control: no-cache, no-store, max-age=0, must-revalidate' );
+               $this->getRequest()->response()->header(
+                       'Cache-Control: no-cache, no-store, max-age=0, must-revalidate'
+               );
                $this->getRequest()->response()->header( 'Pragma: no-cache' );
 
                $key = $oimage->getStorageKey();
@@ -336,7 +344,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
 
        /**
         * Get the list object for this request
-        * @return RevDel_List
+        * @return RevDelList
         */
        protected function getList() {
                if ( is_null( $this->revDelList ) ) {
@@ -364,14 +372,18 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $numRevisions = 0;
                // Live revisions...
                $list = $this->getList();
+               // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
                for ( $list->reset(); $list->current(); $list->next() ) {
+                       // @codingStandardsIgnoreEnd
                        $item = $list->current();
+
                        if ( !$item->canView() ) {
                                if ( !$this->submitClicked ) {
                                        throw new PermissionsError( 'suppressrevision' );
                                }
                                $userAllowed = false;
                        }
+
                        $numRevisions++;
                        $this->getOutput()->addHTML( $item->getHTML() );
                }
@@ -413,7 +425,12 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                                Xml::label( $this->msg( 'revdelete-otherreason' )->text(), 'wpReason' ) .
                                        '</td>' .
                                        '<td class="mw-input">' .
-                                               Xml::input( 'wpReason', 60, $this->otherReason, array( 'id' => 'wpReason', 'maxlength' => 100 ) ) .
+                                               Xml::input(
+                                                       'wpReason',
+                                                       60,
+                                                       $this->otherReason,
+                                                       array( 'id' => 'wpReason', 'maxlength' => 100 )
+                                               ) .
                                        '</td>' .
                                "</tr><tr>\n" .
                                        '<td></td>' .
@@ -454,10 +471,15 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
         */
        protected function addUsageText() {
                // Messages: revdelete-text-text, revdelete-text-file, logdelete-text
-               $this->getOutput()->wrapWikiMsg( "<strong>$1</strong>\n$2", $this->typeLabels['text'], 'revdelete-text-others' );
+               $this->getOutput()->wrapWikiMsg(
+                       "<strong>$1</strong>\n$2", $this->typeLabels['text'],
+                       'revdelete-text-others'
+               );
+
                if ( $this->getUser()->isAllowed( 'suppressrevision' ) ) {
                        $this->getOutput()->addWikiMsg( 'revdelete-suppress-text' );
                }
+
                if ( $this->mIsAllowed ) {
                        $this->getOutput()->addWikiMsg( 'revdelete-confirm' );
                }
@@ -473,26 +495,38 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                if ( $list->length() == 1 ) {
                        $list->reset();
                        $bitfield = $list->current()->getBits(); // existing field
+
                        if ( $this->submitClicked ) {
                                $bitfield = RevisionDeleter::extractBitfield( $this->extractBitParams(), $bitfield );
                        }
+
                        foreach ( $this->checks as $item ) {
                                // Messages: revdelete-hide-text, revdelete-hide-image, revdelete-hide-name,
                                // revdelete-hide-comment, revdelete-hide-user, revdelete-hide-restricted
                                list( $message, $name, $field ) = $item;
-                               $innerHTML = Xml::checkLabel( $this->msg( $message )->text(), $name, $name, $bitfield & $field );
+                               $innerHTML = Xml::checkLabel(
+                                       $this->msg( $message )->text(),
+                                       $name,
+                                       $name,
+                                       $bitfield & $field
+                               );
+
                                if ( $field == Revision::DELETED_RESTRICTED ) {
                                        $innerHTML = "<b>$innerHTML</b>";
                                }
+
                                $line = Xml::tags( 'td', array( 'class' => 'mw-input' ), $innerHTML );
                                $html .= "<tr>$line</tr>\n";
                        }
                } else {
                        // Otherwise, use tri-state radios
                        $html .= '<tr>';
-                       $html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-same' )->escaped() . '</th>';
-                       $html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-unset' )->escaped() . '</th>';
-                       $html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-set' )->escaped() . '</th>';
+                       $html .= '<th class="mw-revdel-checkbox">'
+                               . $this->msg( 'revdelete-radio-same' )->escaped() . '</th>';
+                       $html .= '<th class="mw-revdel-checkbox">'
+                               . $this->msg( 'revdelete-radio-unset' )->escaped() . '</th>';
+                       $html .= '<th class="mw-revdel-checkbox">'
+                               . $this->msg( 'revdelete-radio-set' )->escaped() . '</th>';
                        $html .= "<th></th></tr>\n";
                        foreach ( $this->checks as $item ) {
                                // Messages: revdelete-hide-text, revdelete-hide-image, revdelete-hide-name,
@@ -535,16 +569,20 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                        return false;
                }
                $bitParams = $this->extractBitParams();
-               $listReason = $this->getRequest()->getText( 'wpRevDeleteReasonList', 'other' ); // from dropdown
+               // from dropdown
+               $listReason = $this->getRequest()->getText( 'wpRevDeleteReasonList', 'other' );
                $comment = $listReason;
                if ( $comment != 'other' && $this->otherReason != '' ) {
                        // Entry from drop down menu + additional comment
-                       $comment .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->otherReason;
+                       $comment .= $this->msg( 'colon-separator' )->inContentLanguage()->text()
+                               . $this->otherReason;
                } elseif ( $comment == 'other' ) {
                        $comment = $this->otherReason;
                }
                # Can the user set this field?
-               if ( $bitParams[Revision::DELETED_RESTRICTED] == 1 && !$this->getUser()->isAllowed( 'suppressrevision' ) ) {
+               if ( $bitParams[Revision::DELETED_RESTRICTED] == 1
+                       && !$this->getUser()->isAllowed( 'suppressrevision' )
+               ) {
                        throw new PermissionsError( 'suppressrevision' );
                }
                # If the save went through, go to success message...
@@ -567,7 +605,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
        protected function success() {
                // Messages: revdelete-success, logdelete-success
                $this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) );
-               $this->getOutput()->wrapWikiMsg( "<span class=\"success\">\n$1\n</span>", $this->typeLabels['success'] );
+               $this->getOutput()->wrapWikiMsg(
+                       "<span class=\"success\">\n$1\n</span>",
+                       $this->typeLabels['success']
+               );
                $this->wasSaved = true;
                $this->revDelList->reloadFromMaster();
                $this->showForm();
@@ -606,7 +647,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
        }
 
        /**
-        * Do the write operations. Simple wrapper for RevDel_*List::setVisibility().
+        * Do the write operations. Simple wrapper for RevDel*List::setVisibility().
         * @param int $bitfield
         * @param string $reason
         * @param Title $title
index 10e7009..63eff36 100644 (file)
@@ -66,12 +66,13 @@ class SpecialRunJobs extends UnlistedSpecialPage {
 
                // Constant-time signature verification
                // http://www.emerose.com/timing-attacks-explained
-               // @todo: make a common method for this
+               // @todo Make a common method for this
                if ( !is_string( $rSig ) || strlen( $rSig ) !== strlen( $cSig ) ) {
                        $verified = false;
                } else {
                        $result = 0;
-                       for ( $i = 0; $i < strlen( $cSig ); $i++ ) {
+                       $cSigLength = strlen( $cSig );
+                       for ( $i = 0; $i < $cSigLength; $i++ ) {
                                $result |= ord( $cSig[$i] ) ^ ord( $rSig[$i] );
                        }
                        $verified = ( $result == 0 );
index c2b5f9b..2713a5f 100644 (file)
@@ -226,7 +226,11 @@ class SpecialSearch extends SpecialPage {
                                $out->addHTML(
                                        Xml::openElement( 'fieldset' ) .
                                        Xml::element( 'legend', null, $this->msg( 'search-external' )->text() ) .
-                                       Xml::element( 'p', array( 'class' => 'mw-searchdisabled' ), $this->msg( 'searchdisabled' )->text() ) .
+                                       Xml::element(
+                                               'p',
+                                               array( 'class' => 'mw-searchdisabled' ),
+                                               $this->msg( 'searchdisabled' )->text()
+                                       ) .
                                        $this->msg( 'googlesearch' )->rawParams(
                                                htmlspecialchars( $term ),
                                                'UTF-8',
@@ -284,7 +288,8 @@ class SpecialSearch extends SpecialPage {
                                $stParams
                        );
 
-                       $this->didYouMeanHtml = '<div class="searchdidyoumean">' . $this->msg( 'search-suggest' )->rawParams( $suggestLink )->text() . '</div>';
+                       $this->didYouMeanHtml = '<div class="searchdidyoumean">'
+                               . $this->msg( 'search-suggest' )->rawParams( $suggestLink )->text() . '</div>';
                }
 
                if ( !wfRunHooks( 'SpecialSearchResultsPrepend', array( $this, $out, $term ) ) ) {
@@ -363,7 +368,10 @@ class SpecialSearch extends SpecialPage {
                        // Show the create link ahead
                        $this->showCreateLink( $title, $num, $titleMatches, $textMatches );
                        if ( $totalRes > $this->limit || $this->offset ) {
-                               $prevnext = $this->getLanguage()->viewPrevNext( $this->getPageTitle(), $this->offset, $this->limit,
+                               $prevnext = $this->getLanguage()->viewPrevNext(
+                                       $this->getPageTitle(),
+                                       $this->offset,
+                                       $this->limit,
                                        $this->powerSearchOptions() + array( 'search' => $term ),
                                        max( $titleMatchesNum, $textMatchesNum ) < $this->limit
                                );
@@ -444,7 +452,11 @@ class SpecialSearch extends SpecialPage {
                } else {
                        $messageName = 'searchmenu-new-nocreate';
                }
-               $params = array( $messageName, wfEscapeWikiText( $title->getPrefixedText() ), Message::numParam( $num ) );
+               $params = array(
+                       $messageName,
+                       wfEscapeWikiText( $title->getPrefixedText() ),
+                       Message::numParam( $num )
+               );
                wfRunHooks( 'SpecialSearchCreateLink', array( $title, &$params ) );
 
                // Extensions using the hook might still return an empty $messageName
@@ -708,7 +720,8 @@ class SpecialSearch extends SpecialPage {
                        &$score, &$size, &$date, &$related,
                        &$html
                ) ) ) {
-                       $html = "<li><div class='mw-search-result-heading'>{$link} {$redirect} {$section} {$fileMatch}</div> {$extract}\n" .
+                       $html = "<li><div class='mw-search-result-heading'>" .
+                               "{$link} {$redirect} {$section} {$fileMatch}</div> {$extract}\n" .
                                "<div class='mw-search-result-data'>{$score}{$size} - {$date}{$related}</div>" .
                                "</li>\n";
                }
@@ -734,7 +747,8 @@ class SpecialSearch extends SpecialPage {
 
                // work out custom project captions
                $customCaptions = array();
-               $customLines = explode( "\n", $this->msg( 'search-interwiki-custom' )->text() ); // format per line <iwprefix>:<caption>
+               // format per line <iwprefix>:<caption>
+               $customLines = explode( "\n", $this->msg( 'search-interwiki-custom' )->text() );
                foreach ( $customLines as $line ) {
                        $parts = explode( ":", $line, 2 );
                        if ( count( $parts ) == 2 ) { // validate line
@@ -756,8 +770,7 @@ class SpecialSearch extends SpecialPage {
                        }
                }
 
-
-               // TODO: should support paging in a non-confusing way (not sure how though, maybe via ajax)..
+               // @todo Should support paging in a non-confusing way (not sure how though, maybe via ajax)..
                $out .= "</ul></div>\n";
 
                // convert the whole thing to desired language variant
index 4006e49..5ce2812 100644 (file)
@@ -435,7 +435,11 @@ class LoginForm extends SpecialPage {
 
                // Normalize the name so that silly things don't cause "invalid username"
                // errors. User::newFromName does some rather strict checking, rejecting
-               // e.g. leading/trailing/multiple spaces.
+               // e.g. leading/trailing/multiple spaces. But first we need to reject
+               // usernames that would be treated as titles with a fragment part.
+               if ( strpos( $this->mUsername, '#' ) !== false ) {
+                       return Status::newFatal( 'noname' );
+               }
                $title = Title::makeTitleSafe( NS_USER, $this->mUsername );
                if ( !is_object( $title ) ) {
                        return Status::newFatal( 'noname' );
index fc39ef5..490e81f 100644 (file)
@@ -50,6 +50,8 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                if ( $mode !== false ) {
                        if ( $mode === SpecialEditWatchlist::EDIT_RAW ) {
                                $title = SpecialPage::getTitleFor( 'EditWatchlist', 'raw' );
+                       } elseif ( $mode === SpecialEditWatchlist::EDIT_CLEAR ) {
+                               $title = SpecialPage::getTitleFor( 'EditWatchlist', 'clear' );
                        } else {
                                $title = SpecialPage::getTitleFor( 'EditWatchlist' );
                        }
index d5b8d8b..33b2400 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+// @codingStandardsIgnoreFile
 /**
  * Template used when there is no LocalSettings.php file.
  *
index 1c8bbd1..9118701 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+// @codingStandardsIgnoreFile
 /**
  * Html form for account creation (since 1.22 with VForm appearance).
  *
@@ -22,7 +23,6 @@
  */
 
 class UsercreateTemplate extends BaseTemplate {
-
        /**
         * Extensions (AntiSpoof and TitleBlacklist) call this in response to
         * UserCreateForm hook to add checkboxes to the create account form.
index 29908d7..0aad07d 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+// @codingStandardsIgnoreFile
 /**
  * Html form for user login (since 1.22 with VForm appearance).
  *
index 746c16d..bef80be 100644 (file)
@@ -44,7 +44,13 @@ abstract class UploadBase {
        protected $mBlackListedExtensions;
        protected $mJavaDetected, $mSVGNSError;
 
-       protected static $safeXmlEncodings = array( 'UTF-8', 'ISO-8859-1', 'ISO-8859-2', 'UTF-16', 'UTF-32' );
+       protected static $safeXmlEncodings = array(
+               'UTF-8',
+               'ISO-8859-1',
+               'ISO-8859-2',
+               'UTF-16',
+               'UTF-32'
+       );
 
        const SUCCESS = 0;
        const OK = 0;
@@ -120,11 +126,12 @@ abstract class UploadBase {
                                return $permission;
                        }
                }
+
                return true;
        }
 
        // Upload handlers. Should probably just be a global.
-       static $uploadHandlers = array( 'Stash', 'File', 'Url' );
+       private static $uploadHandlers = array( 'Stash', 'File', 'Url' );
 
        /**
         * Create a form of UploadBase depending on wpSourceType and initializes it
@@ -167,6 +174,7 @@ abstract class UploadBase {
                $handler = new $className;
 
                $handler->initializeFromRequest( $request );
+
                return $handler;
        }
 
@@ -179,7 +187,8 @@ abstract class UploadBase {
                return false;
        }
 
-       public function __construct() {}
+       public function __construct() {
+       }
 
        /**
         * Returns the upload type. Should be overridden by child classes
@@ -256,8 +265,9 @@ abstract class UploadBase {
                wfProfileIn( __METHOD__ );
                $repo = RepoGroup::singleton()->getLocalRepo();
                if ( $repo->isVirtualUrl( $srcPath ) ) {
-                       // @todo just make uploads work with storage paths
-                       // UploadFromStash loads files via virtual URLs
+                       /** @todo Just make uploads work with storage paths UploadFromStash
+                        *  loads files via virtual URLs.
+                        */
                        $tmpFile = $repo->getLocalCopy( $srcPath );
                        if ( $tmpFile ) {
                                $tmpFile->bind( $this ); // keep alive with $this
@@ -267,6 +277,7 @@ abstract class UploadBase {
                        $path = $srcPath;
                }
                wfProfileOut( __METHOD__ );
+
                return $path;
        }
 
@@ -282,6 +293,7 @@ abstract class UploadBase {
                 */
                if ( $this->isEmptyFile() ) {
                        wfProfileOut( __METHOD__ );
+
                        return array( 'status' => self::EMPTY_FILE );
                }
 
@@ -291,6 +303,7 @@ abstract class UploadBase {
                $maxSize = self::getMaxUploadSize( $this->getSourceType() );
                if ( $this->mFileSize > $maxSize ) {
                        wfProfileOut( __METHOD__ );
+
                        return array(
                                'status' => self::FILE_TOO_LARGE,
                                'max' => $maxSize,
@@ -305,6 +318,7 @@ abstract class UploadBase {
                $verification = $this->verifyFile();
                if ( $verification !== true ) {
                        wfProfileOut( __METHOD__ );
+
                        return array(
                                'status' => self::VERIFICATION_ERROR,
                                'details' => $verification
@@ -317,6 +331,7 @@ abstract class UploadBase {
                $result = $this->validateName();
                if ( $result !== true ) {
                        wfProfileOut( __METHOD__ );
+
                        return $result;
                }
 
@@ -325,10 +340,12 @@ abstract class UploadBase {
                        array( $this->mDestName, $this->mTempPath, &$error ) )
                ) {
                        wfProfileOut( __METHOD__ );
+
                        return array( 'status' => self::HOOK_ABORTED, 'error' => $error );
                }
 
                wfProfileOut( __METHOD__ );
+
                return array( 'status' => self::OK );
        }
 
@@ -351,6 +368,7 @@ abstract class UploadBase {
                                        $result['blacklistedExt'] = $this->mBlackListedExtensions;
                                }
                        }
+
                        return $result;
                }
                $this->mDestName = $this->getLocalFile()->getName();
@@ -374,6 +392,7 @@ abstract class UploadBase {
                        global $wgMimeTypeBlacklist;
                        if ( $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) {
                                wfProfileOut( __METHOD__ );
+
                                return array( 'filetype-badmime', $mime );
                        }
 
@@ -388,12 +407,14 @@ abstract class UploadBase {
                        foreach ( $ieTypes as $ieType ) {
                                if ( $this->checkFileExtension( $ieType, $wgMimeTypeBlacklist ) ) {
                                        wfProfileOut( __METHOD__ );
+
                                        return array( 'filetype-bad-ie-mime', $ieType );
                                }
                        }
                }
 
                wfProfileOut( __METHOD__ );
+
                return true;
        }
 
@@ -409,6 +430,7 @@ abstract class UploadBase {
                $status = $this->verifyPartialFile();
                if ( $status !== true ) {
                        wfProfileOut( __METHOD__ );
+
                        return $status;
                }
 
@@ -419,6 +441,7 @@ abstract class UploadBase {
                        # XXX: Missing extension will be caught by validateName() via getTitle()
                        if ( $this->mFinalExtension != '' && !$this->verifyExtension( $mime, $this->mFinalExtension ) ) {
                                wfProfileOut( __METHOD__ );
+
                                return array( 'filetype-mime-mismatch', $this->mFinalExtension, $mime );
                        }
                }
@@ -429,6 +452,7 @@ abstract class UploadBase {
                        if ( !$handlerStatus->isOK() ) {
                                $errors = $handlerStatus->getErrorsArray();
                                wfProfileOut( __METHOD__ );
+
                                return reset( $errors );
                        }
                }
@@ -436,11 +460,13 @@ abstract class UploadBase {
                wfRunHooks( 'UploadVerifyFile', array( $this, $mime, &$status ) );
                if ( $status !== true ) {
                        wfProfileOut( __METHOD__ );
+
                        return $status;
                }
 
                wfDebug( __METHOD__ . ": all clear; passing.\n" );
                wfProfileOut( __METHOD__ );
+
                return true;
        }
 
@@ -466,6 +492,7 @@ abstract class UploadBase {
                $status = $this->verifyMimeType( $mime );
                if ( $status !== true ) {
                        wfProfileOut( __METHOD__ );
+
                        return $status;
                }
 
@@ -473,12 +500,14 @@ abstract class UploadBase {
                if ( !$wgDisableUploadScriptChecks ) {
                        if ( self::detectScript( $this->mTempPath, $mime, $this->mFinalExtension ) ) {
                                wfProfileOut( __METHOD__ );
+
                                return array( 'uploadscripted' );
                        }
                        if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
                                $svgStatus = $this->detectScriptInSvg( $this->mTempPath );
                                if ( $svgStatus !== false ) {
                                        wfProfileOut( __METHOD__ );
+
                                        return $svgStatus;
                                }
                        }
@@ -495,11 +524,13 @@ abstract class UploadBase {
                                $error = reset( $errors );
                                if ( $error[0] !== 'zip-wrong-format' ) {
                                        wfProfileOut( __METHOD__ );
+
                                        return $error;
                                }
                        }
                        if ( $this->mJavaDetected ) {
                                wfProfileOut( __METHOD__ );
+
                                return array( 'uploadjava' );
                        }
                }
@@ -508,10 +539,12 @@ abstract class UploadBase {
                $virus = $this->detectVirus( $this->mTempPath );
                if ( $virus ) {
                        wfProfileOut( __METHOD__ );
+
                        return array( 'uploadvirus', $virus );
                }
 
                wfProfileOut( __METHOD__ );
+
                return true;
        }
 
@@ -541,8 +574,10 @@ abstract class UploadBase {
        }
 
        /**
-        * Alias for verifyTitlePermissions. The function was originally 'verifyPermissions'
-        * but that suggests it's checking the user, when it's really checking the title + user combination.
+        * Alias for verifyTitlePermissions. The function was originally
+        * 'verifyPermissions', but that suggests it's checking the user, when it's
+        * really checking the title + user combination.
+        *
         * @param User $user User object to verify the permissions against
         * @return mixed An array as returned by getUserPermissionsErrors or true
         *   in case the user has proper permissions.
@@ -581,6 +616,7 @@ abstract class UploadBase {
                if ( $permErrors || $permErrorsUpload || $permErrorsCreate ) {
                        $permErrors = array_merge( $permErrors, wfArrayDiff2( $permErrorsUpload, $permErrors ) );
                        $permErrors = array_merge( $permErrors, wfArrayDiff2( $permErrorsCreate, $permErrors ) );
+
                        return $permErrors;
                }
 
@@ -618,7 +654,8 @@ abstract class UploadBase {
                if ( $this->mDesiredDestName != $filename && $comparableName != $filename ) {
                        $warnings['badfilename'] = $filename;
                        // Debugging for bug 62241
-                       wfDebugLog( 'upload', "Filename: '$filename', mDesiredDestName: '$this->mDesiredDestName', comparableName: '$comparableName'" );
+                       wfDebugLog( 'upload', "Filename: '$filename', mDesiredDestName: "
+                               . "'$this->mDesiredDestName', comparableName: '$comparableName'" );
                }
 
                // Check whether the file extension is on the unwanted list
@@ -670,6 +707,7 @@ abstract class UploadBase {
                }
 
                wfProfileOut( __METHOD__ );
+
                return $warnings;
        }
 
@@ -699,12 +737,17 @@ abstract class UploadBase {
 
                if ( $status->isGood() ) {
                        if ( $watch ) {
-                               WatchAction::doWatch( $this->getLocalFile()->getTitle(), $user, WatchedItem::IGNORE_USER_RIGHTS );
+                               WatchAction::doWatch(
+                                       $this->getLocalFile()->getTitle(),
+                                       $user,
+                                       WatchedItem::IGNORE_USER_RIGHTS
+                               );
                        }
                        wfRunHooks( 'UploadComplete', array( &$this ) );
                }
 
                wfProfileOut( __METHOD__ );
+
                return $status;
        }
 
@@ -733,6 +776,7 @@ abstract class UploadBase {
                if ( strlen( $this->mFilteredName ) > 240 ) {
                        $this->mTitleError = self::FILENAME_TOO_LONG;
                        $this->mTitle = null;
+
                        return $this->mTitle;
                }
 
@@ -747,6 +791,7 @@ abstract class UploadBase {
                if ( is_null( $nt ) ) {
                        $this->mTitleError = self::ILLEGAL_FILENAME;
                        $this->mTitle = null;
+
                        return $this->mTitle;
                }
                $this->mFilteredName = $nt->getDBkey();
@@ -789,13 +834,16 @@ abstract class UploadBase {
                if ( $this->mFinalExtension == '' ) {
                        $this->mTitleError = self::FILETYPE_MISSING;
                        $this->mTitle = null;
+
                        return $this->mTitle;
                } elseif ( $blackListedExtensions ||
-                               ( $wgCheckFileExtensions && $wgStrictFileExtensions &&
-                                       !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) ) {
+                       ( $wgCheckFileExtensions && $wgStrictFileExtensions &&
+                               !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) )
+               ) {
                        $this->mBlackListedExtensions = $blackListedExtensions;
                        $this->mTitleError = self::FILETYPE_BADTYPE;
                        $this->mTitle = null;
+
                        return $this->mTitle;
                }
 
@@ -803,13 +851,15 @@ abstract class UploadBase {
                if ( wfIsWindows() && !preg_match( '/^[\x0-\x7f]*$/', $nt->getText() ) ) {
                        $this->mTitleError = self::WINDOWS_NONASCII_FILENAME;
                        $this->mTitle = null;
+
                        return $this->mTitle;
                }
 
                # If there was more than one "extension", reassemble the base
                # filename to prevent bogus complaints about length
                if ( count( $ext ) > 1 ) {
-                       for ( $i = 0; $i < count( $ext ) - 1; $i++ ) {
+                       $iterations = count( $ext ) - 1;
+                       for ( $i = 0; $i < $iterations; $i++ ) {
                                $partname .= '.' . $ext[$i];
                        }
                }
@@ -817,10 +867,12 @@ abstract class UploadBase {
                if ( strlen( $partname ) < 1 ) {
                        $this->mTitleError = self::MIN_LENGTH_PARTNAME;
                        $this->mTitle = null;
+
                        return $this->mTitle;
                }
 
                $this->mTitle = $nt;
+
                return $this->mTitle;
        }
 
@@ -834,17 +886,21 @@ abstract class UploadBase {
                        $nt = $this->getTitle();
                        $this->mLocalFile = is_null( $nt ) ? null : wfLocalFile( $nt );
                }
+
                return $this->mLocalFile;
        }
 
        /**
-        * If the user does not supply all necessary information in the first upload form submission (either by accident or
-        * by design) then we may want to stash the file temporarily, get more information, and publish the file later.
+        * If the user does not supply all necessary information in the first upload
+        * form submission (either by accident or by design) then we may want to
+        * stash the file temporarily, get more information, and publish the file
+        * later.
         *
-        * This method will stash a file in a temporary directory for later processing, and save the necessary descriptive info
-        * into the database.
-        * This method returns the file object, which also has a 'fileKey' property which can be passed through a form or
-        * API request to find this stashed file again.
+        * This method will stash a file in a temporary directory for later
+        * processing, and save the necessary descriptive info into the database.
+        * This method returns the file object, which also has a 'fileKey' property
+        * which can be passed through a form or API request to find this stashed
+        * file again.
         *
         * @param User $user
         * @return UploadStashFile Stashed file
@@ -858,11 +914,13 @@ abstract class UploadBase {
                $this->mLocalFile = $file;
 
                wfProfileOut( __METHOD__ );
+
                return $file;
        }
 
        /**
-        * Stash a file in a temporary directory, returning a key which can be used to find the file again. See stashFile().
+        * Stash a file in a temporary directory, returning a key which can be used
+        * to find the file again. See stashFile().
         *
         * @return string File key
         */
@@ -906,6 +964,7 @@ abstract class UploadBase {
        public static function splitExtensions( $filename ) {
                $bits = explode( '.', $filename );
                $basename = array_shift( $bits );
+
                return array( $basename, $bits );
        }
 
@@ -947,10 +1006,12 @@ abstract class UploadBase {
                        if ( !$magic->isRecognizableExtension( $extension ) ) {
                                wfDebug( __METHOD__ . ": passing file with unknown detected mime type; " .
                                        "unrecognized extension '$extension', can't verify\n" );
+
                                return true;
                        } else {
                                wfDebug( __METHOD__ . ": rejecting file with unknown detected mime type; " .
                                        "recognized extension '$extension', so probably invalid file\n" );
+
                                return false;
                        }
                }
@@ -960,19 +1021,22 @@ abstract class UploadBase {
                if ( $match === null ) {
                        if ( $magic->getTypesForExtension( $extension ) !== null ) {
                                wfDebug( __METHOD__ . ": No extension known for $mime, but we know a mime for $extension\n" );
+
                                return false;
                        } else {
                                wfDebug( __METHOD__ . ": no file extension known for mime type $mime, passing file\n" );
+
                                return true;
                        }
                } elseif ( $match === true ) {
                        wfDebug( __METHOD__ . ": mime type $mime matches extension $extension, passing file\n" );
 
-                       #TODO: if it's a bitmap, make sure PHP or ImageMagic resp. can handle it!
+                       /** @todo If it's a bitmap, make sure PHP or ImageMagick resp. can handle it! */
                        return true;
-
                } else {
-                       wfDebug( __METHOD__ . ": mime type $mime mismatches file extension $extension, rejecting file\n" );
+                       wfDebug( __METHOD__
+                               . ": mime type $mime mismatches file extension $extension, rejecting file\n" );
+
                        return false;
                }
        }
@@ -1007,6 +1071,7 @@ abstract class UploadBase {
 
                if ( !$chunk ) {
                        wfProfileOut( __METHOD__ );
+
                        return false;
                }
 
@@ -1025,12 +1090,13 @@ abstract class UploadBase {
 
                $chunk = trim( $chunk );
 
-               # @todo FIXME: Convert from UTF-16 if necessary!
+               /** @todo FIXME: Convert from UTF-16 if necessary! */
                wfDebug( __METHOD__ . ": checking for embedded scripts and HTML stuff\n" );
 
                # check for HTML doctype
                if ( preg_match( "/<!DOCTYPE *X?HTML/i", $chunk ) ) {
                        wfProfileOut( __METHOD__ );
+
                        return true;
                }
 
@@ -1039,6 +1105,7 @@ abstract class UploadBase {
                if ( $extension == 'svg' || strpos( $mime, 'image/svg' ) === 0 ) {
                        if ( self::checkXMLEncodingMissmatch( $file ) ) {
                                wfProfileOut( __METHOD__ );
+
                                return true;
                        }
                }
@@ -1062,7 +1129,7 @@ abstract class UploadBase {
                        '<a href',
                        '<body',
                        '<head',
-                       '<html',   #also in safari
+                       '<html', #also in safari
                        '<img',
                        '<pre',
                        '<script', #also in safari
@@ -1077,6 +1144,7 @@ abstract class UploadBase {
                        if ( false !== strpos( $chunk, $tag ) ) {
                                wfDebug( __METHOD__ . ": found something that may make it be mistaken for html: $tag\n" );
                                wfProfileOut( __METHOD__ );
+
                                return true;
                        }
                }
@@ -1092,6 +1160,7 @@ abstract class UploadBase {
                if ( preg_match( '!type\s*=\s*[\'"]?\s*(?:\w*/)?(?:ecma|java)!sim', $chunk ) ) {
                        wfDebug( __METHOD__ . ": found script types\n" );
                        wfProfileOut( __METHOD__ );
+
                        return true;
                }
 
@@ -1099,6 +1168,7 @@ abstract class UploadBase {
                if ( preg_match( '!(?:href|src|data)\s*=\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
                        wfDebug( __METHOD__ . ": found html-style script urls\n" );
                        wfProfileOut( __METHOD__ );
+
                        return true;
                }
 
@@ -1106,11 +1176,13 @@ abstract class UploadBase {
                if ( preg_match( '!url\s*\(\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
                        wfDebug( __METHOD__ . ": found css-style script urls\n" );
                        wfProfileOut( __METHOD__ );
+
                        return true;
                }
 
                wfDebug( __METHOD__ . ": no scripts found\n" );
                wfProfileOut( __METHOD__ );
+
                return false;
        }
 
@@ -1131,16 +1203,19 @@ abstract class UploadBase {
                                && !in_array( strtoupper( $encMatch[1] ), self::$safeXmlEncodings )
                        ) {
                                wfDebug( __METHOD__ . ": Found unsafe XML encoding '{$encMatch[1]}'\n" );
+
                                return true;
                        }
                } elseif ( preg_match( "!<\?xml\b!si", $contents ) ) {
                        // Start of XML declaration without an end in the first $wgSVGMetadataCutoff
                        // bytes. There shouldn't be a legitimate reason for this to happen.
                        wfDebug( __METHOD__ . ": Unmatched XML declaration start\n" );
+
                        return true;
                } elseif ( substr( $contents, 0, 4 ) == "\x4C\x6F\xA7\x94" ) {
                        // EBCDIC encoded XML
                        wfDebug( __METHOD__ . ": EBCDIC Encoded XML\n" );
+
                        return true;
                }
 
@@ -1151,17 +1226,19 @@ abstract class UploadBase {
                        wfSuppressWarnings();
                        $str = iconv( $encoding, 'UTF-8', $contents );
                        wfRestoreWarnings();
-                       if ( $str != '' && preg_match( "!<\?xml\b(.*?)\?>!si", $str, $matches ) ) {
+                       if ( $str != '' && preg_match( "!<\?xml\b(.*?)\?>!si", $str, $matches ) ) {
                                if ( preg_match( $encodingRegex, $matches[1], $encMatch )
                                        && !in_array( strtoupper( $encMatch[1] ), self::$safeXmlEncodings )
                                ) {
                                        wfDebug( __METHOD__ . ": Found unsafe XML encoding '{$encMatch[1]}'\n" );
+
                                        return true;
                                }
                        } elseif ( $str != '' && preg_match( "!<\?xml\b!si", $str ) ) {
                                // Start of XML declaration without an end in the first $wgSVGMetadataCutoff
                                // bytes. There shouldn't be a legitimate reason for this to happen.
                                wfDebug( __METHOD__ . ": Unmatched XML declaration start\n" );
+
                                return true;
                        }
                }
@@ -1188,8 +1265,10 @@ abstract class UploadBase {
                        if ( $this->mSVGNSError ) {
                                return array( 'uploadscriptednamespace', $this->mSVGNSError );
                        }
+
                        return array( 'uploadscripted' );
                }
+
                return false;
        }
 
@@ -1204,6 +1283,7 @@ abstract class UploadBase {
                if ( preg_match( '/xml-stylesheet/i', $target ) ) {
                        return true;
                }
+
                return false;
        }
 
@@ -1255,8 +1335,9 @@ abstract class UploadBase {
 
                if ( !in_array( $namespace, $validNamespaces ) ) {
                        wfDebug( __METHOD__ . ": Non-svg namespace '$namespace' in uploaded file.\n" );
-                       // @TODO return a status object to a closure in XmlTypeCheck, for MW1.21+
+                       /** @todo Return a status object to a closure in XmlTypeCheck, for MW1.21+ */
                        $this->mSVGNSError = $namespace;
+
                        return true;
                }
 
@@ -1265,24 +1346,29 @@ abstract class UploadBase {
                 */
                if ( $strippedElement == 'script' ) {
                        wfDebug( __METHOD__ . ": Found script element '$element' in uploaded file.\n" );
+
                        return true;
                }
 
-               # e.g., <svg xmlns="http://www.w3.org/2000/svg"> <handler xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="load">alert(1)</handler> </svg>
+               # e.g., <svg xmlns="http://www.w3.org/2000/svg">
+               #  <handler xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="load">alert(1)</handler> </svg>
                if ( $strippedElement == 'handler' ) {
                        wfDebug( __METHOD__ . ": Found scriptable element '$element' in uploaded file.\n" );
+
                        return true;
                }
 
                # SVG reported in Feb '12 that used xml:stylesheet to generate javascript block
                if ( $strippedElement == 'stylesheet' ) {
                        wfDebug( __METHOD__ . ": Found scriptable element '$element' in uploaded file.\n" );
+
                        return true;
                }
 
                # Block iframes, in case they pass the namespace check
                if ( $strippedElement == 'iframe' ) {
                        wfDebug( __METHOD__ . ": iframe in uploaded file.\n" );
+
                        return true;
                }
 
@@ -1291,69 +1377,105 @@ abstract class UploadBase {
                        $value = strtolower( $value );
 
                        if ( substr( $stripped, 0, 2 ) == 'on' ) {
-                               wfDebug( __METHOD__ . ": Found event-handler attribute '$attrib'='$value' in uploaded file.\n" );
+                               wfDebug( __METHOD__
+                                       . ": Found event-handler attribute '$attrib'='$value' in uploaded file.\n" );
+
                                return true;
                        }
 
                        # href with javascript target
                        if ( $stripped == 'href' && strpos( strtolower( $value ), 'javascript:' ) !== false ) {
-                               wfDebug( __METHOD__ . ": Found script in href attribute '$attrib'='$value' in uploaded file.\n" );
+                               wfDebug( __METHOD__
+                                       . ": Found script in href attribute '$attrib'='$value' in uploaded file.\n" );
+
                                return true;
                        }
 
                        # href with embedded svg as target
                        if ( $stripped == 'href' && preg_match( '!data:[^,]*image/svg[^,]*,!sim', $value ) ) {
-                               wfDebug( __METHOD__ . ": Found href to embedded svg \"<$strippedElement '$attrib'='$value'...\" in uploaded file.\n" );
+                               wfDebug( __METHOD__ . ": Found href to embedded svg "
+                                       . "\"<$strippedElement '$attrib'='$value'...\" in uploaded file.\n" );
+
                                return true;
                        }
 
                        # href with embedded (text/xml) svg as target
                        if ( $stripped == 'href' && preg_match( '!data:[^,]*text/xml[^,]*,!sim', $value ) ) {
-                               wfDebug( __METHOD__ . ": Found href to embedded svg \"<$strippedElement '$attrib'='$value'...\" in uploaded file.\n" );
+                               wfDebug( __METHOD__ . ": Found href to embedded svg "
+                                       . "\"<$strippedElement '$attrib'='$value'...\" in uploaded file.\n" );
+
                                return true;
                        }
 
                        # use set/animate to add event-handler attribute to parent
-                       if ( ( $strippedElement == 'set' || $strippedElement == 'animate' ) && $stripped == 'attributename' && substr( $value, 0, 2 ) == 'on' ) {
-                               wfDebug( __METHOD__ . ": Found svg setting event-handler attribute with \"<$strippedElement $stripped='$value'...\" in uploaded file.\n" );
+                       if ( ( $strippedElement == 'set' || $strippedElement == 'animate' )
+                               && $stripped == 'attributename'
+                               && substr( $value, 0, 2 ) == 'on'
+                       ) {
+                               wfDebug( __METHOD__ . ": Found svg setting event-handler attribute with "
+                                       . "\"<$strippedElement $stripped='$value'...\" in uploaded file.\n" );
+
                                return true;
                        }
 
                        # use set to add href attribute to parent element
-                       if ( $strippedElement == 'set' && $stripped == 'attributename' && strpos( $value, 'href' ) !== false ) {
+                       if ( $strippedElement == 'set'
+                               && $stripped == 'attributename'
+                               && strpos( $value, 'href' ) !== false
+                       ) {
                                wfDebug( __METHOD__ . ": Found svg setting href attribute '$value' in uploaded file.\n" );
+
                                return true;
                        }
 
                        # 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 attribute 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 ) ) {
-                               wfDebug( __METHOD__ . ": Found svg setting handler with remote/data/script '$attrib'='$value' in uploaded file.\n" );
+                               wfDebug( __METHOD__ . ": Found svg setting handler with remote/data/script "
+                                       . "'$attrib'='$value' in uploaded file.\n" );
+
                                return true;
                        }
 
                        # use CSS styles to bring in remote code
                        # catch url("http:..., url('http:..., url(http:..., but not url("#..., url('#..., url(#....
-                       if ( $stripped == 'style' && preg_match_all( '!((?:font|clip-path|fill|filter|marker|marker-end|marker-mid|marker-start|mask|stroke)\s*:\s*url\s*\(\s*["\']?\s*[^#]+.*?\))!sim', $value, $matches ) ) {
+                       $tagsList = "font|clip-path|fill|filter|marker|marker-end|marker-mid|marker-start|mask|stroke";
+                       if ( $stripped == 'style'
+                               && preg_match_all(
+                                       '!((?:' . $tagsList . ')\s*:\s*url\s*\(\s*["\']?\s*[^#]+.*?\))!sim',
+                                       $value,
+                                       $matches
+                               )
+                       ) {
                                foreach ( $matches[1] as $match ) {
-                                       if ( !preg_match( '!(?:font|clip-path|fill|filter|marker|marker-end|marker-mid|marker-start|mask|stroke)\s*:\s*url\s*\(\s*(#|\'#|"#)!sim', $match ) ) {
-                                               wfDebug( __METHOD__ . ": Found svg setting a style with remote url '$attrib'='$value' in uploaded file.\n" );
+                                       if ( !preg_match( '!(?:' . $tagsList . ')\s*:\s*url\s*\(\s*(#|\'#|"#)!sim', $match ) ) {
+                                               wfDebug( __METHOD__ . ": Found svg setting a style with "
+                                                       . "remote url '$attrib'='$value' in uploaded file.\n" );
+
                                                return true;
                                        }
                                }
                        }
 
                        # image filters can pull in url, which could be svg that executes scripts
-                       if ( $strippedElement == 'image' && $stripped == 'filter' && preg_match( '!url\s*\(!sim', $value ) ) {
-                               wfDebug( __METHOD__ . ": Found image filter with url: \"<$strippedElement $stripped='$value'...\" in uploaded file.\n" );
+                       if ( $strippedElement == 'image'
+                               && $stripped == 'filter'
+                               && preg_match( '!url\s*\(!sim', $value )
+                       ) {
+                               wfDebug( __METHOD__ . ": Found image filter with url: "
+                                       . "\"<$strippedElement $stripped='$value'...\" in uploaded file.\n" );
+
                                return true;
                        }
-
                }
 
                return false; //No scripts detected
@@ -1369,6 +1491,7 @@ abstract class UploadBase {
                $parts = explode( ':', strtolower( $element ) );
                $name = array_pop( $parts );
                $ns = implode( ':', $parts );
+
                return array( $ns, $name );
        }
 
@@ -1379,6 +1502,7 @@ abstract class UploadBase {
        private function stripXmlNamespace( $name ) {
                // 'http://www.w3.org/2000/svg:script' -> 'script'
                $parts = explode( ':', strtolower( $name ) );
+
                return array_pop( $parts );
        }
 
@@ -1399,6 +1523,7 @@ abstract class UploadBase {
                if ( !$wgAntivirus ) {
                        wfDebug( __METHOD__ . ": virus scanner disabled\n" );
                        wfProfileOut( __METHOD__ );
+
                        return null;
                }
 
@@ -1407,6 +1532,7 @@ abstract class UploadBase {
                        $wgOut->wrapWikiMsg( "<div class=\"error\">\n$1\n</div>",
                                array( 'virus-badscanner', $wgAntivirus ) );
                        wfProfileOut( __METHOD__ );
+
                        return wfMessage( 'virus-unknownscanner' )->text() . " $wgAntivirus";
                }
 
@@ -1451,7 +1577,9 @@ abstract class UploadBase {
                        # scan failed (code was mapped to false by $exitCodeMap)
                        wfDebug( __METHOD__ . ": failed to scan $file (code $exitCode).\n" );
 
-                       $output = $wgAntivirusRequired ? wfMessage( 'virus-scanfailed', array( $exitCode ) )->text() : null;
+                       $output = $wgAntivirusRequired
+                               ? wfMessage( 'virus-scanfailed', array( $exitCode ) )->text()
+                               : null;
                } elseif ( $mappedCode === AV_SCAN_ABORTED ) {
                        # scan failed because filetype is unknown (probably imune)
                        wfDebug( __METHOD__ . ": unsupported file type $file (code $exitCode).\n" );
@@ -1478,6 +1606,7 @@ abstract class UploadBase {
                }
 
                wfProfileOut( __METHOD__ );
+
                return $output;
        }
 
@@ -1589,7 +1718,7 @@ abstract class UploadBase {
 
                // Check for files with the same name but a different extension
                $similarFiles = RepoGroup::singleton()->getLocalRepo()->findFilesByPrefix(
-                               "{$partname}.", 1 );
+                       "{$partname}.", 1 );
                if ( count( $similarFiles ) ) {
                        return array(
                                'warning' => 'exists-normalized',
@@ -1600,7 +1729,10 @@ abstract class UploadBase {
 
                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 );
+                       $nt_thb = Title::newFromText(
+                               substr( $partname, strpos( $partname, '-' ) + 1 ) . '.' . $extension,
+                               NS_FILE
+                       );
                        $file_thb = wfLocalFile( $nt_thb );
                        if ( $file_thb->exists() ) {
                                return array(
@@ -1639,11 +1771,12 @@ abstract class UploadBase {
        public static function isThumbName( $filename ) {
                $n = strrpos( $filename, '.' );
                $partname = $n ? substr( $filename, 0, $n ) : $filename;
+
                return (
-                                       substr( $partname, 3, 3 ) == 'px-' ||
-                                       substr( $partname, 2, 3 ) == 'px-'
-                               ) &&
-                               preg_match( "/[0-9]{2}/", substr( $partname, 0, 2 ) );
+                       substr( $partname, 3, 3 ) == 'px-' ||
+                       substr( $partname, 2, 3 ) == 'px-'
+               ) &&
+               preg_match( "/[0-9]{2}/", substr( $partname, 0, 2 ) );
        }
 
        /**
@@ -1670,23 +1803,28 @@ abstract class UploadBase {
                                $blacklist[] = trim( $line );
                        }
                }
+
                return $blacklist;
        }
 
        /**
         * Gets image info about the file just uploaded.
         *
-        * Also has the effect of setting metadata to be an 'indexed tag name' in returned API result if
-        * 'metadata' was requested. Oddly, we have to pass the "result" object down just so it can do that
-        * with the appropriate format, presumably.
+        * Also has the effect of setting metadata to be an 'indexed tag name' in
+        * returned API result if 'metadata' was requested. Oddly, we have to pass
+        * the "result" object down just so it can do that with the appropriate
+        * format, presumably.
         *
         * @param ApiResult $result
         * @return array Image info
         */
        public function getImageInfo( $result ) {
                $file = $this->getLocalFile();
-               // TODO This cries out for refactoring. We really want to say $file->getAllInfo(); here.
-               // Perhaps "info" methods should be moved into files, and the API should just wrap them in queries.
+               /** @todo This cries out for refactoring.
+                *  We really want to say $file->getAllInfo(); here.
+                * Perhaps "info" methods should be moved into files, and the API should
+                * just wrap them in queries.
+                */
                if ( $file instanceof UploadStashFile ) {
                        $imParam = ApiQueryStashImageInfo::getPropertyNames();
                        $info = ApiQueryStashImageInfo::getInfo( $file, array_flip( $imParam ), $result );
@@ -1694,6 +1832,7 @@ abstract class UploadBase {
                        $imParam = ApiQueryImageInfo::getPropertyNames();
                        $info = ApiQueryImageInfo::getInfo( $file, array_flip( $imParam ), $result );
                }
+
                return $info;
        }
 
@@ -1704,6 +1843,7 @@ abstract class UploadBase {
        public function convertVerifyErrorToStatus( $error ) {
                $code = $error['status'];
                unset( $code['status'] );
+
                return Status::newFatal( $this->getVerificationErrorCode( $code ), $error );
        }
 
index d15ae43..6f90280 100644 (file)
@@ -87,6 +87,7 @@ class UploadFromChunks extends UploadFromFile {
 
                // Update db table to reflect initial "chunk" state
                $this->updateChunkStatus();
+
                return $this->mLocalFile;
        }
 
@@ -154,6 +155,7 @@ class UploadFromChunks extends UploadFromFile {
                if ( $ret['status'] !== UploadBase::OK ) {
                        wfDebugLog( 'fileconcatenate', "Verification failed for chunked upload" );
                        $status->fatal( $this->getVerificationErrorCode( $ret['status'] ) );
+
                        return $status;
                }
 
@@ -178,6 +180,7 @@ class UploadFromChunks extends UploadFromFile {
         */
        public function performUpload( $comment, $pageText, $watch, $user ) {
                $rv = parent::performUpload( $comment, $pageText, $watch, $user );
+
                return $rv;
        }
 
@@ -188,11 +191,11 @@ class UploadFromChunks extends UploadFromFile {
         */
        function getVirtualChunkLocation( $index ) {
                return $this->repo->getVirtualUrl( 'temp' ) .
-                               '/' .
-                               $this->repo->getHashPath(
-                                       $this->getChunkFileKey( $index )
-                               ) .
-                               $this->getChunkFileKey( $index );
+                       '/' .
+                       $this->repo->getHashPath(
+                               $this->getChunkFileKey( $index )
+                       ) .
+                       $this->getChunkFileKey( $index );
        }
 
        /**
@@ -234,6 +237,7 @@ class UploadFromChunks extends UploadFromFile {
                                $status = Status::newFatal( 'invalid-chunk-offset' );
                        }
                }
+
                return $status;
        }
 
@@ -242,7 +246,7 @@ class UploadFromChunks extends UploadFromFile {
         */
        private function updateChunkStatus() {
                wfDebug( __METHOD__ . " update chunk status for {$this->mFileKey} offset:" .
-                                       $this->getOffset() . ' inx:' . $this->getChunkIndex() . "\n" );
+                       $this->getOffset() . ' inx:' . $this->getChunkIndex() . "\n" );
 
                $dbw = $this->repo->getMasterDb();
                // Use a quick transaction since we will upload the full temp file into shared
@@ -294,6 +298,7 @@ class UploadFromChunks extends UploadFromFile {
                if ( $this->mChunkIndex !== null ) {
                        return $this->mChunkIndex;
                }
+
                return 0;
        }
 
@@ -305,6 +310,7 @@ class UploadFromChunks extends UploadFromFile {
                if ( $this->mOffset !== null ) {
                        return $this->mOffset;
                }
+
                return 0;
        }
 
@@ -325,19 +331,20 @@ class UploadFromChunks extends UploadFromFile {
                        $this->repo->getZonePath( 'temp' ) . "/{$hashPath}{$fileKey}" );
 
                // Check for error in stashing the chunk:
-               if ( ! $storeStatus->isOK() ) {
+               if ( !$storeStatus->isOK() ) {
                        $error = $storeStatus->getErrorsArray();
                        $error = reset( $error );
-                       if ( ! count( $error ) ) {
+                       if ( !count( $error ) ) {
                                $error = $storeStatus->getWarningsArray();
                                $error = reset( $error );
-                               if ( ! count( $error ) ) {
+                               if ( !count( $error ) ) {
                                        $error = array( 'unknown', 'no error recorded' );
                                }
                        }
                        throw new UploadChunkFileException( "Error storing file in '$chunkPath': " .
                                implode( '; ', $error ) );
                }
+
                return $storeStatus;
        }
 
@@ -345,6 +352,7 @@ class UploadFromChunks extends UploadFromFile {
                if ( $index === null ) {
                        $index = $this->getChunkIndex();
                }
+
                return $this->mFileKey . '.' . $index;
        }
 
index 5bc040c..3a1e8bd 100644 (file)
@@ -28,7 +28,6 @@
  * @author Bryan Tong Minh
  */
 class UploadFromFile extends UploadBase {
-
        /**
         * @var WebRequestUpload
         */
index a67fc57..b4e815f 100644 (file)
@@ -157,6 +157,7 @@ class UploadFromStash extends UploadBase {
                // replace mLocalFile with an instance of UploadStashFile, which adds some methods
                // that are useful for stashed files.
                $this->mLocalFile = parent::stashFile( $user );
+
                return $this->mLocalFile;
        }
 
@@ -187,6 +188,7 @@ class UploadFromStash extends UploadBase {
        public function performUpload( $comment, $pageText, $watch, $user ) {
                $rv = parent::performUpload( $comment, $pageText, $watch, $user );
                $this->unsaveUploadedFile();
+
                return $rv;
        }
 }
index 9ebd7a9..b605640 100644 (file)
@@ -49,6 +49,7 @@ class UploadFromUrl extends UploadBase {
                if ( !$user->isAllowed( 'upload_by_url' ) ) {
                        return 'upload_by_url';
                }
+
                return parent::isAllowed( $user );
        }
 
@@ -58,6 +59,7 @@ class UploadFromUrl extends UploadBase {
         */
        public static function isEnabled() {
                global $wgAllowCopyUploads;
+
                return $wgAllowCopyUploads && parent::isEnabled();
        }
 
@@ -103,6 +105,7 @@ class UploadFromUrl extends UploadBase {
                        }
                        */
                }
+
                return $valid;
        }
 
@@ -118,6 +121,7 @@ class UploadFromUrl extends UploadBase {
                        wfRunHooks( 'IsUploadAllowedFromUrl', array( $url, &$allowed ) );
                        self::$allowedUrls[$url] = $allowed;
                }
+
                return self::$allowedUrls[$url];
        }
 
@@ -169,6 +173,7 @@ class UploadFromUrl extends UploadBase {
                global $wgUser;
 
                $url = $request->getVal( 'wpUploadFileURL' );
+
                return !empty( $url )
                        && Http::isValidURI( $url )
                        && $wgUser->isAllowed( 'upload_by_url' );
@@ -202,6 +207,7 @@ class UploadFromUrl extends UploadBase {
                if ( !$this->mAsync ) {
                        return $this->reallyFetchFile( $httpOptions );
                }
+
                return Status::newGood();
        }
 
@@ -213,6 +219,7 @@ class UploadFromUrl extends UploadBase {
        protected function makeTemporaryFile() {
                $tmpFile = TempFSFile::factory( 'URL' );
                $tmpFile->bind( $this );
+
                return $tmpFile->getPath();
        }
 
@@ -259,12 +266,12 @@ class UploadFromUrl extends UploadBase {
                $this->mRemoveTempFile = true;
                $this->mFileSize = 0;
 
-               $options = $httpOptions + array(
-                       'followRedirects' => true,
-               );
+               $options = $httpOptions + array( 'followRedirects' => true );
+
                if ( $wgCopyUploadProxy !== false ) {
                        $options['proxy'] = $wgCopyUploadProxy;
                }
+
                if ( $wgCopyUploadTimeout && !isset( $options['timeout'] ) ) {
                        $options['timeout'] = $wgCopyUploadTimeout;
                }
@@ -297,6 +304,7 @@ class UploadFromUrl extends UploadBase {
                if ( $this->mAsync ) {
                        return array( 'status' => UploadBase::OK );
                }
+
                return parent::verifyUpload();
        }
 
@@ -308,8 +316,10 @@ class UploadFromUrl extends UploadBase {
        public function checkWarnings() {
                if ( $this->mAsync ) {
                        $this->mIgnoreWarnings = false;
+
                        return array();
                }
+
                return parent::checkWarnings();
        }
 
@@ -323,6 +333,7 @@ class UploadFromUrl extends UploadBase {
                if ( $this->mAsync ) {
                        return true;
                }
+
                return parent::verifyTitlePermissions( $user );
        }
 
@@ -367,7 +378,7 @@ class UploadFromUrl extends UploadBase {
                ) );
                $job->initializeSessionData();
                JobQueueGroup::singleton()->push( $job );
+
                return $sessionKey;
        }
-
 }
index 33cb0db..a7e7100 100644 (file)
 
 /**
  * UploadStash is intended to accomplish a few things:
- *   - enable applications to temporarily stash files without publishing them to the wiki.
- *      - Several parts of MediaWiki do this in similar ways: UploadBase, UploadWizard, and FirefoggChunkedExtension
- *        And there are several that reimplement stashing from scratch, in idiosyncratic ways. The idea is to unify them all here.
- *       Mostly all of them are the same except for storing some custom fields, which we subsume into the data array.
- *   - enable applications to find said files later, as long as the db table or temp files haven't been purged.
- *   - enable the uploading user (and *ONLY* the uploading user) to access said files, and thumbnails of said files, via a URL.
- *     We accomplish this using a database table, with ownership checking as you might expect. See SpecialUploadStash, which
- *     implements a web interface to some files stored this way.
+ *   - Enable applications to temporarily stash files without publishing them to
+ *     the wiki.
+ *      - Several parts of MediaWiki do this in similar ways: UploadBase,
+ *        UploadWizard, and FirefoggChunkedExtension.
+ *        And there are several that reimplement stashing from scratch, in
+ *        idiosyncratic ways. The idea is to unify them all here.
+ *        Mostly all of them are the same except for storing some custom fields,
+ *        which we subsume into the data array.
+ *   - Enable applications to find said files later, as long as the db table or
+ *     temp files haven't been purged.
+ *   - Enable the uploading user (and *ONLY* the uploading user) to access said
+ *     files, and thumbnails of said files, via a URL. We accomplish this using
+ *     a database table, with ownership checking as you might expect. See
+ *     SpecialUploadStash, which implements a web interface to some files stored
+ *     this way.
  *
- * UploadStash right now is *mostly* intended to show you one user's slice of the entire stash. The user parameter is only optional
- * because there are few cases where we clean out the stash from an automated script. In the future we might refactor this.
+ * UploadStash right now is *mostly* intended to show you one user's slice of
+ * the entire stash. The user parameter is only optional because there are few
+ * cases where we clean out the stash from an automated script. In the future we
+ * might refactor this.
  *
  * UploadStash represents the entire stash of temporary files.
  * UploadStashFile is a filestore for the actual physical disk files.
- * UploadFromStash extends UploadBase, and represents a single stashed file as it is moved from the stash to the regular file repository
+ * UploadFromStash extends UploadBase, and represents a single stashed file as
+ * it is moved from the stash to the regular file repository
  *
  * @ingroup Upload
  */
 class UploadStash {
-
        // Format of the key for files -- has to be suitable as a filename itself (e.g. ab12cd34ef.jpg)
        const KEY_FORMAT_REGEX = '/^[\w-\.]+\.\w*$/';
 
@@ -95,7 +104,8 @@ 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.
+        * The noAuth param is a bit janky but is required for automated scripts
+        * which clean out the stash.
         *
         * @param string $key Key under which file information is stored
         * @param bool $noAuth (optional) Don't check authentication. Used by maintenance scripts.
@@ -106,7 +116,7 @@ class UploadStash {
         * @return UploadStashFile
         */
        public function getFile( $key, $noAuth = false ) {
-               if ( ! preg_match( self::KEY_FORMAT_REGEX, $key ) ) {
+               if ( !preg_match( self::KEY_FORMAT_REGEX, $key ) ) {
                        throw new UploadStashBadPathException( "key '$key' is not in a proper format" );
                }
 
@@ -117,7 +127,8 @@ class UploadStash {
 
                if ( !isset( $this->fileMetadata[$key] ) ) {
                        if ( !$this->fetchFileMetadata( $key ) ) {
-                               // If nothing was received, it's likely due to replication lag.  Check the master to see if the record is there.
+                               // If nothing was received, it's likely due to replication lag.
+                               // Check the master to see if the record is there.
                                $this->fetchFileMetadata( $key, DB_MASTER );
                        }
 
@@ -138,14 +149,15 @@ class UploadStash {
                        }
                }
 
-               if ( ! $this->files[$key]->exists() ) {
+               if ( !$this->files[$key]->exists() ) {
                        wfDebug( __METHOD__ . " tried to get file at $key, but it doesn't exist\n" );
                        throw new UploadStashBadPathException( "path doesn't exist" );
                }
 
                if ( !$noAuth ) {
                        if ( $this->fileMetadata[$key]['us_user'] != $this->userId ) {
-                               throw new UploadStashWrongOwnerException( "This file ($key) doesn't belong to the current user." );
+                               throw new UploadStashWrongOwnerException( "This file ($key) doesn't "
+                                       . "belong to the current user." );
                        }
                }
 
@@ -160,6 +172,7 @@ class UploadStash {
         */
        public function getMetadata( $key ) {
                $this->getFile( $key );
+
                return $this->fileMetadata[$key];
        }
 
@@ -171,14 +184,17 @@ class UploadStash {
         */
        public function getFileProps( $key ) {
                $this->getFile( $key );
+
                return $this->fileProps[$key];
        }
 
        /**
-        * Stash a file in a temp directory and record that we did this in the database, along with other metadata.
+        * Stash a file in a temp directory and record that we did this in the
+        * database, along with other metadata.
         *
         * @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)
+        * @param string $sourceType The type of upload that generated this file
+        *   (currently, I believe, 'file' or null)
         * @throws UploadStashBadPathException
         * @throws UploadStashFileException
         * @throws UploadStashNotLoggedInException
@@ -201,10 +217,11 @@ class UploadStash {
                        $pathWithGoodExtension = $path;
                }
 
-               // If no key was supplied, make one.  a mysql insertid would be totally reasonable here, except
-               // that for historical reasons, the key is this random thing instead.  At least it's not guessable.
+               // If no key was supplied, make one.  a mysql insertid would be totally
+               // reasonable here, except that for historical reasons, the key is this
+               // random thing instead.  At least it's not guessable.
                //
-               // some things that when combined will make a suitably unique key.
+               // Some things that when combined will make a suitably unique key.
                // see: http://www.jwz.org/doc/mid.html
                list( $usec, $sec ) = explode( ' ', microtime() );
                $usec = substr( $usec, 2 );
@@ -215,7 +232,7 @@ class UploadStash {
 
                $this->fileProps[$key] = $fileProps;
 
-               if ( ! preg_match( self::KEY_FORMAT_REGEX, $key ) ) {
+               if ( !preg_match( self::KEY_FORMAT_REGEX, $key ) ) {
                        throw new UploadStashBadPathException( "key '$key' is not in a proper format" );
                }
 
@@ -224,30 +241,36 @@ class UploadStash {
                // if not already in a temporary area, put it there
                $storeStatus = $this->repo->storeTemp( basename( $pathWithGoodExtension ), $path );
 
-               if ( ! $storeStatus->isOK() ) {
-                       // It is a convention in MediaWiki to only return one error per API exception, even if multiple errors
-                       // are available. We use reset() to pick the "first" thing that was wrong, preferring errors to warnings.
-                       // This is a bit lame, as we may have more info in the $storeStatus and we're throwing it away, but to fix it means
+               if ( !$storeStatus->isOK() ) {
+                       // It is a convention in MediaWiki to only return one error per API
+                       // exception, even if multiple errors are available. We use reset()
+                       // to pick the "first" thing that was wrong, preferring errors to
+                       // warnings. This is a bit lame, as we may have more info in the
+                       // $storeStatus and we're throwing it away, but to fix it means
                        // redesigning API errors significantly.
-                       // $storeStatus->value just contains the virtual URL (if anything) which is probably useless to the caller
+                       // $storeStatus->value just contains the virtual URL (if anything)
+                       // which is probably useless to the caller.
                        $error = $storeStatus->getErrorsArray();
                        $error = reset( $error );
-                       if ( ! count( $error ) ) {
+                       if ( !count( $error ) ) {
                                $error = $storeStatus->getWarningsArray();
                                $error = reset( $error );
-                               if ( ! count( $error ) ) {
+                               if ( !count( $error ) ) {
                                        $error = array( 'unknown', 'no error recorded' );
                                }
                        }
-                       // at this point, $error should contain the single "most important" error, plus any parameters.
+                       // At this point, $error should contain the single "most important"
+                       // error, plus any parameters.
                        $errorMsg = array_shift( $error );
-                       throw new UploadStashFileException( "Error storing file in '$path': " . wfMessage( $errorMsg, $error )->text() );
+                       throw new UploadStashFileException( "Error storing file in '$path': "
+                               . wfMessage( $errorMsg, $error )->text() );
                }
                $stashPath = $storeStatus->value;
 
                // fetch the current user ID
                if ( !$this->isLoggedIn ) {
-                       throw new UploadStashNotLoggedInException( __METHOD__ . ' No user is logged in, files must belong to users' );
+                       throw new UploadStashNotLoggedInException( __METHOD__
+                               . ' No user is logged in, files must belong to users' );
                }
 
                // insert the file metadata into the db.
@@ -279,7 +302,8 @@ class UploadStash {
                        __METHOD__
                );
 
-               // store the insertid in the class variable so immediate retrieval (possibly laggy) isn't necesary.
+               // store the insertid in the class variable so immediate retrieval
+               // (possibly laggy) isn't necesary.
                $this->fileMetadata[$key]['us_id'] = $dbw->insertId();
 
                # create the UploadStashFile object for this file.
@@ -297,7 +321,8 @@ class UploadStash {
         */
        public function clear() {
                if ( !$this->isLoggedIn ) {
-                       throw new UploadStashNotLoggedInException( __METHOD__ . ' No user is logged in, files must belong to users' );
+                       throw new UploadStashNotLoggedInException( __METHOD__
+                               . ' No user is logged in, files must belong to users' );
                }
 
                wfDebug( __METHOD__ . ' clearing all rows for user ' . $this->userId . "\n" );
@@ -319,18 +344,20 @@ class UploadStash {
         * Remove a particular file from the stash.  Also removes it from the repo.
         *
         * @param string $key
-        * @throws UploadStashNoSuchKeyException|UploadStashNotLoggedInException|UploadStashWrongOwnerException
+        * @throws UploadStashNoSuchKeyException|UploadStashNotLoggedInException
+        * @throws UploadStashWrongOwnerException
         * @return bool Success
         */
        public function removeFile( $key ) {
                if ( !$this->isLoggedIn ) {
-                       throw new UploadStashNotLoggedInException( __METHOD__ . ' No user is logged in, files must belong to users' );
+                       throw new UploadStashNotLoggedInException( __METHOD__
+                               . ' No user is logged in, files must belong to users' );
                }
 
                $dbw = $this->repo->getMasterDb();
 
-               // this is a cheap query. it runs on the master so that this function still works when there's lag.
-               // it won't be called all that often.
+               // this is a cheap query. it runs on the master so that this function
+               // still works when there's lag. It won't be called all that often.
                $row = $dbw->selectRow(
                        'uploadstash',
                        'us_user',
@@ -343,7 +370,8 @@ class UploadStash {
                }
 
                if ( $row->us_user != $this->userId ) {
-                       throw new UploadStashWrongOwnerException( "Can't delete: the file ($key) doesn't belong to this user." );
+                       throw new UploadStashWrongOwnerException( "Can't delete: "
+                               . "the file ($key) doesn't belong to this user." );
                }
 
                return $this->removeFileNoAuth( $key );
@@ -369,8 +397,9 @@ class UploadStash {
                        __METHOD__
                );
 
-               // TODO: look into UnregisteredLocalFile and find out why the rv here is sometimes wrong (false when file was removed)
-               // for now, ignore.
+               /** @todo Look into UnregisteredLocalFile and find out why the rv here is
+                *  sometimes wrong (false when file was removed). For now, ignore.
+                */
                $this->files[$key]->remove();
 
                unset( $this->files[$key] );
@@ -387,7 +416,8 @@ class UploadStash {
         */
        public function listFiles() {
                if ( !$this->isLoggedIn ) {
-                       throw new UploadStashNotLoggedInException( __METHOD__ . ' No user is logged in, files must belong to users' );
+                       throw new UploadStashNotLoggedInException( __METHOD__
+                               . ' No user is logged in, files must belong to users' );
                }
 
                $dbr = $this->repo->getSlaveDb();
@@ -451,6 +481,7 @@ class UploadStash {
                        // put it in a web accesible directory.
                        return '';
                }
+
                return $extension;
        }
 
@@ -502,6 +533,7 @@ class UploadStash {
                        throw new UploadStashZeroLengthFileException( "File is zero length" );
                }
                $this->files[$key] = $file;
+
                return true;
        }
 }
@@ -512,8 +544,10 @@ class UploadStashFile extends UnregisteredLocalFile {
        protected $url;
 
        /**
-        * A LocalFile wrapper around a file that has been temporarily stashed, so we can do things like create thumbnails for it
-        * Arguably UnregisteredLocalFile should be handling its own file repo but that class is a bit retarded currently
+        * A LocalFile wrapper around a file that has been temporarily stashed,
+        * so we can do things like create thumbnails for it. Arguably
+        * UnregisteredLocalFile should be handling its own file repo but that
+        * class is a bit retarded currently.
         *
         * @param FileRepo $repo Repository where we should find the path
         * @param string $path Path to file
@@ -528,18 +562,21 @@ class UploadStashFile extends UnregisteredLocalFile {
                if ( $repo->isVirtualUrl( $path ) ) {
                        $path = $repo->resolveVirtualUrl( $path );
                } else {
-
-                       // check if path appears to be sane, no parent traversals, and is in this repo's temp zone.
+                       // check if path appears to be sane, no parent traversals,
+                       // and is in this repo's temp zone.
                        $repoTempPath = $repo->getZonePath( 'temp' );
-                       if ( ( ! $repo->validateFilename( $path ) ) ||
-                                       ( strpos( $path, $repoTempPath ) !== 0 ) ) {
-                               wfDebug( "UploadStash: tried to construct an UploadStashFile from a file that should already exist at '$path', but path is not valid\n" );
+                       if ( ( !$repo->validateFilename( $path ) ) ||
+                               ( strpos( $path, $repoTempPath ) !== 0 )
+                       ) {
+                               wfDebug( "UploadStash: tried to construct an UploadStashFile "
+                                       . "from a file that should already exist at '$path', but path is not valid\n" );
                                throw new UploadStashBadPathException( 'path is not valid' );
                        }
 
                        // check if path exists! and is a plain file.
-                       if ( ! $repo->fileExists( $path ) ) {
-                               wfDebug( "UploadStash: tried to construct an UploadStashFile from a file that should already exist at '$path', but path is not found\n" );
+                       if ( !$repo->fileExists( $path ) ) {
+                               wfDebug( "UploadStash: tried to construct an UploadStashFile from "
+                                       . "a file that should already exist at '$path', but path is not found\n" );
                                throw new UploadStashFileNotFoundException( 'cannot find path, or not a plain file' );
                        }
                }
@@ -552,8 +589,8 @@ class UploadStashFile extends UnregisteredLocalFile {
        /**
         * A method needed by the file transforming and scaling routines in File.php
         * We do not necessarily care about doing the description at this point
-        * However, we also can't return the empty string, as the rest of MediaWiki demands this (and calls to imagemagick
-        * convert require it to be there)
+        * However, we also can't return the empty string, as the rest of MediaWiki
+        * demands this (and calls to imagemagick convert require it to be there)
         *
         * @return string Dummy value
         */
@@ -566,14 +603,17 @@ 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 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
+        * @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 ) {
                $path = dirname( $this->path );
                if ( $thumbName !== false ) {
                        $path .= "/$thumbName";
                }
+
                return $path;
        }
 
@@ -591,7 +631,8 @@ class UploadStashFile extends UnregisteredLocalFile {
        }
 
        /**
-        * Helper function -- given a 'subpage', return the local URL e.g. /wiki/Special:UploadStash/subpage
+        * Helper function -- given a 'subpage', return the local URL,
+        * e.g. /wiki/Special:UploadStash/subpage
         * @param string $subPage
         * @return string Local URL for this subpage in the Special:UploadStash space.
         */
@@ -602,14 +643,16 @@ class UploadStashFile extends UnregisteredLocalFile {
        /**
         * Get a URL to access the thumbnail
         * This is required because the model of how files work requires that
-        * the thumbnail urls be predictable. However, in our model the URL is not based on the filename
-        * (that's hidden in the db)
+        * the thumbnail urls be predictable. However, in our model the URL is
+        * not based on the filename (that's hidden in the db)
         *
-        * @param string $thumbName 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 ) {
                wfDebug( __METHOD__ . " getting for $thumbName \n" );
+
                return $this->getSpecialUrl( 'thumb/' . $this->getUrlName() . '/' . $thumbName );
        }
 
@@ -620,9 +663,10 @@ class UploadStashFile extends UnregisteredLocalFile {
         * @return string Base url name, like '120px-123456.jpg'
         */
        public function getUrlName() {
-               if ( ! $this->urlName ) {
+               if ( !$this->urlName ) {
                        $this->urlName = $this->fileKey;
                }
+
                return $this->urlName;
        }
 
@@ -636,12 +680,14 @@ class UploadStashFile extends UnregisteredLocalFile {
                if ( !isset( $this->url ) ) {
                        $this->url = $this->getSpecialUrl( 'file/' . $this->getUrlName() );
                }
+
                return $this->url;
        }
 
        /**
-        * Parent classes use this method, for no obvious reason, to return the path (relative to wiki root, I assume).
-        * But with this class, the URL is unrelated to the path.
+        * Parent classes use this method, for no obvious reason, to return the path
+        * (relative to wiki root, I assume). But with this class, the URL is
+        * unrelated to the path.
         *
         * @return string Url
         */
@@ -650,7 +696,8 @@ class UploadStashFile extends UnregisteredLocalFile {
        }
 
        /**
-        * Getter for file key (the unique id by which this file's location & metadata is stored in the db)
+        * Getter for file key (the unique id by which this file's location &
+        * metadata is stored in the db)
         *
         * @return string File key
         */
@@ -674,15 +721,32 @@ class UploadStashFile extends UnregisteredLocalFile {
        public function exists() {
                return $this->repo->fileExists( $this->path );
        }
+}
+
+class UploadStashException extends MWException {
+}
+
+class UploadStashNotAvailableException extends UploadStashException {
+}
+
+class UploadStashFileNotFoundException extends UploadStashException {
+}
+
+class UploadStashBadPathException extends UploadStashException {
+}
+
+class UploadStashFileException extends UploadStashException {
+}
+
+class UploadStashZeroLengthFileException extends UploadStashException {
+}
+
+class UploadStashNotLoggedInException extends UploadStashException {
+}
+
+class UploadStashWrongOwnerException extends UploadStashException {
+}
 
+class UploadStashNoSuchKeyException extends UploadStashException {
 }
 
-class UploadStashException extends MWException {};
-class UploadStashNotAvailableException extends UploadStashException {};
-class UploadStashFileNotFoundException extends UploadStashException {};
-class UploadStashBadPathException extends UploadStashException {};
-class UploadStashFileException extends UploadStashException {};
-class UploadStashZeroLengthFileException extends UploadStashException {};
-class UploadStashNotLoggedInException extends UploadStashException {};
-class UploadStashWrongOwnerException extends UploadStashException {};
-class UploadStashNoSuchKeyException extends UploadStashException {};
index c178ffe..baba580 100644 (file)
@@ -101,28 +101,28 @@ class CdbFunctions {
  */
 class CdbReaderPHP extends CdbReader {
        /** The filename */
-       var $fileName;
+       protected $fileName;
 
        /* number of hash slots searched under this key */
-       var $loop;
+       protected $loop;
 
        /* initialized if loop is nonzero */
-       var $khash;
+       protected $khash;
 
        /* initialized if loop is nonzero */
-       var $kpos;
+       protected $kpos;
 
        /* initialized if loop is nonzero */
-       var $hpos;
+       protected $hpos;
 
        /* initialized if loop is nonzero */
-       var $hslots;
+       protected $hslots;
 
        /* initialized if findNext() returns true */
-       var $dpos;
+       protected $dpos;
 
        /* initialized if cdb_findnext() returns 1 */
-       var $dlen;
+       protected $dlen;
 
        /**
         * @param $fileName string
@@ -288,8 +288,11 @@ class CdbReaderPHP extends CdbReader {
  * CDB writer class
  */
 class CdbWriterPHP extends CdbWriter {
-       var $hplist;
-       var $numentries, $pos;
+       protected $hplist;
+
+       protected $numentries;
+
+       protected $pos;
 
        /**
         * @param $fileName string
diff --git a/includes/utils/ConfEditor.php b/includes/utils/ConfEditor.php
deleted file mode 100644 (file)
index a2fe507..0000000
+++ /dev/null
@@ -1,1125 +0,0 @@
-<?php
-/**
- * Configuration file editor.
- *
- * 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
- */
-
-/**
- * This is a state machine style parser with two internal stacks:
- *   * A next state stack, which determines the state the machine will progress to next
- *   * A path stack, which keeps track of the logical location in the file.
- *
- * Reference grammar:
- *
- * file = T_OPEN_TAG *statement
- * statement = T_VARIABLE "=" expression ";"
- * expression = array / scalar / T_VARIABLE
- * array = T_ARRAY "(" [ element *( "," element ) [ "," ] ] ")"
- * element = assoc-element / expression
- * assoc-element = scalar T_DOUBLE_ARROW expression
- * scalar = T_LNUMBER / T_DNUMBER / T_STRING / T_CONSTANT_ENCAPSED_STRING
- */
-class ConfEditor {
-       /** The text to parse */
-       var $text;
-
-       /** The token array from token_get_all() */
-       var $tokens;
-
-       /** The current position in the token array */
-       var $pos;
-
-       /** The current 1-based line number */
-       var $lineNum;
-
-       /** The current 1-based column number */
-       var $colNum;
-
-       /** The current 0-based byte number */
-       var $byteNum;
-
-       /** The current ConfEditorToken object */
-       var $currentToken;
-
-       /** The previous ConfEditorToken object */
-       var $prevToken;
-
-       /**
-        * The state machine stack. This is an array of strings where the topmost
-        * element will be popped off and become the next parser state.
-        */
-       var $stateStack;
-
-       /**
-        * The path stack is a stack of associative arrays with the following elements:
-        *    name              The name of top level of the path
-        *    level             The level (number of elements) of the path
-        *    startByte         The byte offset of the start of the path
-        *    startToken        The token offset of the start
-        *    endByte           The byte offset of thee
-        *    endToken          The token offset of the end, plus one
-        *    valueStartToken   The start token offset of the value part
-        *    valueStartByte    The start byte offset of the value part
-        *    valueEndToken     The end token offset of the value part, plus one
-        *    valueEndByte      The end byte offset of the value part, plus one
-        *    nextArrayIndex    The next numeric array index at this level
-        *    hasComma          True if the array element ends with a comma
-        *    arrowByte         The byte offset of the "=>", or false if there isn't one
-        */
-       var $pathStack;
-
-       /**
-        * The elements of the top of the pathStack for every path encountered, indexed
-        * by slash-separated path.
-        */
-       var $pathInfo;
-
-       /**
-        * Next serial number for whitespace placeholder paths (\@extra-N)
-        */
-       var $serial;
-
-       /**
-        * Editor state. This consists of the internal copy/insert operations which
-        * are applied to the source string to obtain the destination string.
-        */
-       var $edits;
-
-       /**
-        * Simple entry point for command-line testing
-        *
-        * @param $text string
-        *
-        * @return string
-        */
-       static function test( $text ) {
-               try {
-                       $ce = new self( $text );
-                       $ce->parse();
-               } catch ( ConfEditorParseError $e ) {
-                       return $e->getMessage() . "\n" . $e->highlight( $text );
-               }
-
-               return "OK";
-       }
-
-       /**
-        * Construct a new parser
-        */
-       public function __construct( $text ) {
-               $this->text = $text;
-       }
-
-       /**
-        * Edit the text. Returns the edited text.
-        * @param array $ops of operations.
-        *
-        * Operations are given as an associative array, with members:
-        *    type:     One of delete, set, append or insert (required)
-        *    path:     The path to operate on (required)
-        *    key:      The array key to insert/append, with PHP quotes
-        *    value:    The value, with PHP quotes
-        *
-        * delete
-        *    Deletes an array element or statement with the specified path.
-        *    e.g.
-        *        array('type' => 'delete', 'path' => '$foo/bar/baz' )
-        *    is equivalent to the runtime PHP code:
-        *        unset( $foo['bar']['baz'] );
-        *
-        * set
-        *    Sets the value of an array element. If the element doesn't exist, it
-        *    is appended to the array. If it does exist, the value is set, with
-        *    comments and indenting preserved.
-        *
-        * append
-        *    Appends a new element to the end of the array. Adds a trailing comma.
-        *    e.g.
-        *        array( 'type' => 'append', 'path', '$foo/bar',
-        *            'key' => 'baz', 'value' => "'x'" )
-        *    is like the PHP code:
-        *        $foo['bar']['baz'] = 'x';
-        *
-        * insert
-        *    Insert a new element at the start of the array.
-        *
-        * @throws MWException
-        * @return string
-        */
-       public function edit( $ops ) {
-               $this->parse();
-
-               $this->edits = array(
-                       array( 'copy', 0, strlen( $this->text ) )
-               );
-               foreach ( $ops as $op ) {
-                       $type = $op['type'];
-                       $path = $op['path'];
-                       $value = isset( $op['value'] ) ? $op['value'] : null;
-                       $key = isset( $op['key'] ) ? $op['key'] : null;
-
-                       switch ( $type ) {
-                               case 'delete':
-                                       list( $start, $end ) = $this->findDeletionRegion( $path );
-                                       $this->replaceSourceRegion( $start, $end, false );
-                                       break;
-                               case 'set':
-                                       if ( isset( $this->pathInfo[$path] ) ) {
-                                               list( $start, $end ) = $this->findValueRegion( $path );
-                                               $encValue = $value; // var_export( $value, true );
-                                               $this->replaceSourceRegion( $start, $end, $encValue );
-                                               break;
-                                       }
-                                       // No existing path, fall through to append
-                                       $slashPos = strrpos( $path, '/' );
-                                       $key = var_export( substr( $path, $slashPos + 1 ), true );
-                                       $path = substr( $path, 0, $slashPos );
-                                       // Fall through
-                               case 'append':
-                                       // Find the last array element
-                                       $lastEltPath = $this->findLastArrayElement( $path );
-                                       if ( $lastEltPath === false ) {
-                                               throw new MWException( "Can't find any element of array \"$path\"" );
-                                       }
-                                       $lastEltInfo = $this->pathInfo[$lastEltPath];
-
-                                       // Has it got a comma already?
-                                       if ( strpos( $lastEltPath, '@extra' ) === false && !$lastEltInfo['hasComma'] ) {
-                                               // No comma, insert one after the value region
-                                               list( , $end ) = $this->findValueRegion( $lastEltPath );
-                                               $this->replaceSourceRegion( $end - 1, $end - 1, ',' );
-                                       }
-
-                                       // Make the text to insert
-                                       list( $start, $end ) = $this->findDeletionRegion( $lastEltPath );
-
-                                       if ( $key === null ) {
-                                               list( $indent, ) = $this->getIndent( $start );
-                                               $textToInsert = "$indent$value,";
-                                       } else {
-                                               list( $indent, $arrowIndent ) =
-                                                       $this->getIndent( $start, $key, $lastEltInfo['arrowByte'] );
-                                               $textToInsert = "$indent$key$arrowIndent=> $value,";
-                                       }
-                                       $textToInsert .= ( $indent === false ? ' ' : "\n" );
-
-                                       // Insert the item
-                                       $this->replaceSourceRegion( $end, $end, $textToInsert );
-                                       break;
-                               case 'insert':
-                                       // Find first array element
-                                       $firstEltPath = $this->findFirstArrayElement( $path );
-                                       if ( $firstEltPath === false ) {
-                                               throw new MWException( "Can't find array element of \"$path\"" );
-                                       }
-                                       list( $start, ) = $this->findDeletionRegion( $firstEltPath );
-                                       $info = $this->pathInfo[$firstEltPath];
-
-                                       // Make the text to insert
-                                       if ( $key === null ) {
-                                               list( $indent, ) = $this->getIndent( $start );
-                                               $textToInsert = "$indent$value,";
-                                       } else {
-                                               list( $indent, $arrowIndent ) =
-                                                       $this->getIndent( $start, $key, $info['arrowByte'] );
-                                               $textToInsert = "$indent$key$arrowIndent=> $value,";
-                                       }
-                                       $textToInsert .= ( $indent === false ? ' ' : "\n" );
-
-                                       // Insert the item
-                                       $this->replaceSourceRegion( $start, $start, $textToInsert );
-                                       break;
-                               default:
-                                       throw new MWException( "Unrecognised operation: \"$type\"" );
-                       }
-               }
-
-               // Do the edits
-               $out = '';
-               foreach ( $this->edits as $edit ) {
-                       if ( $edit[0] == 'copy' ) {
-                               $out .= substr( $this->text, $edit[1], $edit[2] - $edit[1] );
-                       } else { // if ( $edit[0] == 'insert' )
-                               $out .= $edit[1];
-                       }
-               }
-
-               // Do a second parse as a sanity check
-               $this->text = $out;
-               try {
-                       $this->parse();
-               } catch ( ConfEditorParseError $e ) {
-                       throw new MWException(
-                               "Sorry, ConfEditor broke the file during editing and it won't parse anymore: " .
-                               $e->getMessage() );
-               }
-
-               return $out;
-       }
-
-       /**
-        * Get the variables defined in the text
-        * @return array( varname => value )
-        */
-       function getVars() {
-               $vars = array();
-               $this->parse();
-               foreach ( $this->pathInfo as $path => $data ) {
-                       if ( $path[0] != '$' ) {
-                               continue;
-                       }
-                       $trimmedPath = substr( $path, 1 );
-                       $name = $data['name'];
-                       if ( $name[0] == '@' ) {
-                               continue;
-                       }
-                       if ( $name[0] == '$' ) {
-                               $name = substr( $name, 1 );
-                       }
-                       $parentPath = substr( $trimmedPath, 0,
-                               strlen( $trimmedPath ) - strlen( $name ) );
-                       if ( substr( $parentPath, -1 ) == '/' ) {
-                               $parentPath = substr( $parentPath, 0, -1 );
-                       }
-
-                       $value = substr( $this->text, $data['valueStartByte'],
-                               $data['valueEndByte'] - $data['valueStartByte']
-                       );
-                       $this->setVar( $vars, $parentPath, $name,
-                               $this->parseScalar( $value ) );
-               }
-
-               return $vars;
-       }
-
-       /**
-        * Set a value in an array, unless it's set already. For instance,
-        * setVar( $arr, 'foo/bar', 'baz', 3 ); will set
-        * $arr['foo']['bar']['baz'] = 3;
-        * @param $array array
-        * @param string $path slash-delimited path
-        * @param $key mixed Key
-        * @param $value mixed Value
-        */
-       function setVar( &$array, $path, $key, $value ) {
-               $pathArr = explode( '/', $path );
-               $target =& $array;
-               if ( $path !== '' ) {
-                       foreach ( $pathArr as $p ) {
-                               if ( !isset( $target[$p] ) ) {
-                                       $target[$p] = array();
-                               }
-                               $target =& $target[$p];
-                       }
-               }
-               if ( !isset( $target[$key] ) ) {
-                       $target[$key] = $value;
-               }
-       }
-
-       /**
-        * Parse a scalar value in PHP
-        * @return mixed Parsed value
-        */
-       function parseScalar( $str ) {
-               if ( $str !== '' && $str[0] == '\'' ) {
-                       // Single-quoted string
-                       // @todo FIXME: trim() call is due to mystery bug where whitespace gets
-                       // appended to the token; without it we ended up reading in the
-                       // extra quote on the end!
-                       return strtr( substr( trim( $str ), 1, -1 ),
-                               array( '\\\'' => '\'', '\\\\' => '\\' ) );
-               }
-               if ( $str !== '' && $str[0] == '"' ) {
-                       // Double-quoted string
-                       // @todo FIXME: trim() call is due to mystery bug where whitespace gets
-                       // appended to the token; without it we ended up reading in the
-                       // extra quote on the end!
-                       return stripcslashes( substr( trim( $str ), 1, -1 ) );
-               }
-               if ( substr( $str, 0, 4 ) == 'true' ) {
-                       return true;
-               }
-               if ( substr( $str, 0, 5 ) == 'false' ) {
-                       return false;
-               }
-               if ( substr( $str, 0, 4 ) == 'null' ) {
-                       return null;
-               }
-
-               // Must be some kind of numeric value, so let PHP's weak typing
-               // be useful for a change
-               return $str;
-       }
-
-       /**
-        * Replace the byte offset region of the source with $newText.
-        * Works by adding elements to the $this->edits array.
-        */
-       function replaceSourceRegion( $start, $end, $newText = false ) {
-               // Split all copy operations with a source corresponding to the region
-               // in question.
-               $newEdits = array();
-               foreach ( $this->edits as $edit ) {
-                       if ( $edit[0] !== 'copy' ) {
-                               $newEdits[] = $edit;
-                               continue;
-                       }
-                       $copyStart = $edit[1];
-                       $copyEnd = $edit[2];
-                       if ( $start >= $copyEnd || $end <= $copyStart ) {
-                               // Outside this region
-                               $newEdits[] = $edit;
-                               continue;
-                       }
-                       if ( ( $start < $copyStart && $end > $copyStart )
-                               || ( $start < $copyEnd && $end > $copyEnd )
-                       ) {
-                               throw new MWException( "Overlapping regions found, can't do the edit" );
-                       }
-                       // Split the copy
-                       $newEdits[] = array( 'copy', $copyStart, $start );
-                       if ( $newText !== false ) {
-                               $newEdits[] = array( 'insert', $newText );
-                       }
-                       $newEdits[] = array( 'copy', $end, $copyEnd );
-               }
-               $this->edits = $newEdits;
-       }
-
-       /**
-        * Finds the source byte region which you would want to delete, if $pathName
-        * was to be deleted. Includes the leading spaces and tabs, the trailing line
-        * break, and any comments in between.
-        * @param $pathName
-        * @throws MWException
-        * @return array
-        */
-       function findDeletionRegion( $pathName ) {
-               if ( !isset( $this->pathInfo[$pathName] ) ) {
-                       throw new MWException( "Can't find path \"$pathName\"" );
-               }
-               $path = $this->pathInfo[$pathName];
-               // Find the start
-               $this->firstToken();
-               while ( $this->pos != $path['startToken'] ) {
-                       $this->nextToken();
-               }
-               $regionStart = $path['startByte'];
-               for ( $offset = -1; $offset >= -$this->pos; $offset-- ) {
-                       $token = $this->getTokenAhead( $offset );
-                       if ( !$token->isSkip() ) {
-                               // If there is other content on the same line, don't move the start point
-                               // back, because that will cause the regions to overlap.
-                               $regionStart = $path['startByte'];
-                               break;
-                       }
-                       $lfPos = strrpos( $token->text, "\n" );
-                       if ( $lfPos === false ) {
-                               $regionStart -= strlen( $token->text );
-                       } else {
-                               // The line start does not include the LF
-                               $regionStart -= strlen( $token->text ) - $lfPos - 1;
-                               break;
-                       }
-               }
-               // Find the end
-               while ( $this->pos != $path['endToken'] ) {
-                       $this->nextToken();
-               }
-               $regionEnd = $path['endByte']; // past the end
-               $count = count( $this->tokens );
-               for ( $offset = 0; $offset < $count - $this->pos; $offset++ ) {
-                       $token = $this->getTokenAhead( $offset );
-                       if ( !$token->isSkip() ) {
-                               break;
-                       }
-                       $lfPos = strpos( $token->text, "\n" );
-                       if ( $lfPos === false ) {
-                               $regionEnd += strlen( $token->text );
-                       } else {
-                               // This should point past the LF
-                               $regionEnd += $lfPos + 1;
-                               break;
-                       }
-               }
-
-               return array( $regionStart, $regionEnd );
-       }
-
-       /**
-        * Find the byte region in the source corresponding to the value part.
-        * This includes the quotes, but does not include the trailing comma
-        * or semicolon.
-        *
-        * The end position is the past-the-end (end + 1) value as per convention.
-        * @param $pathName
-        * @throws MWException
-        * @return array
-        */
-       function findValueRegion( $pathName ) {
-               if ( !isset( $this->pathInfo[$pathName] ) ) {
-                       throw new MWException( "Can't find path \"$pathName\"" );
-               }
-               $path = $this->pathInfo[$pathName];
-               if ( $path['valueStartByte'] === false || $path['valueEndByte'] === false ) {
-                       throw new MWException( "Can't find value region for path \"$pathName\"" );
-               }
-
-               return array( $path['valueStartByte'], $path['valueEndByte'] );
-       }
-
-       /**
-        * Find the path name of the last element in the array.
-        * If the array is empty, this will return the \@extra interstitial element.
-        * If the specified path is not found or is not an array, it will return false.
-        * @return bool|int|string
-        */
-       function findLastArrayElement( $path ) {
-               // Try for a real element
-               $lastEltPath = false;
-               foreach ( $this->pathInfo as $candidatePath => $info ) {
-                       $part1 = substr( $candidatePath, 0, strlen( $path ) + 1 );
-                       $part2 = substr( $candidatePath, strlen( $path ) + 1, 1 );
-                       if ( $part2 == '@' ) {
-                               // Do nothing
-                       } elseif ( $part1 == "$path/" ) {
-                               $lastEltPath = $candidatePath;
-                       } elseif ( $lastEltPath !== false ) {
-                               break;
-                       }
-               }
-               if ( $lastEltPath !== false ) {
-                       return $lastEltPath;
-               }
-
-               // Try for an interstitial element
-               $extraPath = false;
-               foreach ( $this->pathInfo as $candidatePath => $info ) {
-                       $part1 = substr( $candidatePath, 0, strlen( $path ) + 1 );
-                       if ( $part1 == "$path/" ) {
-                               $extraPath = $candidatePath;
-                       } elseif ( $extraPath !== false ) {
-                               break;
-                       }
-               }
-
-               return $extraPath;
-       }
-
-       /**
-        * Find the path name of first element in the array.
-        * If the array is empty, this will return the \@extra interstitial element.
-        * If the specified path is not found or is not an array, it will return false.
-        * @return bool|int|string
-        */
-       function findFirstArrayElement( $path ) {
-               // Try for an ordinary element
-               foreach ( $this->pathInfo as $candidatePath => $info ) {
-                       $part1 = substr( $candidatePath, 0, strlen( $path ) + 1 );
-                       $part2 = substr( $candidatePath, strlen( $path ) + 1, 1 );
-                       if ( $part1 == "$path/" && $part2 != '@' ) {
-                               return $candidatePath;
-                       }
-               }
-
-               // Try for an interstitial element
-               foreach ( $this->pathInfo as $candidatePath => $info ) {
-                       $part1 = substr( $candidatePath, 0, strlen( $path ) + 1 );
-                       if ( $part1 == "$path/" ) {
-                               return $candidatePath;
-                       }
-               }
-
-               return false;
-       }
-
-       /**
-        * Get the indent string which sits after a given start position.
-        * Returns false if the position is not at the start of the line.
-        * @return array
-        */
-       function getIndent( $pos, $key = false, $arrowPos = false ) {
-               $arrowIndent = ' ';
-               if ( $pos == 0 || $this->text[$pos - 1] == "\n" ) {
-                       $indentLength = strspn( $this->text, " \t", $pos );
-                       $indent = substr( $this->text, $pos, $indentLength );
-               } else {
-                       $indent = false;
-               }
-               if ( $indent !== false && $arrowPos !== false ) {
-                       $arrowIndentLength = $arrowPos - $pos - $indentLength - strlen( $key );
-                       if ( $arrowIndentLength > 0 ) {
-                               $arrowIndent = str_repeat( ' ', $arrowIndentLength );
-                       }
-               }
-
-               return array( $indent, $arrowIndent );
-       }
-
-       /**
-        * Run the parser on the text. Throws an exception if the string does not
-        * match our defined subset of PHP syntax.
-        */
-       public function parse() {
-               $this->initParse();
-               $this->pushState( 'file' );
-               $this->pushPath( '@extra-' . ( $this->serial++ ) );
-               $token = $this->firstToken();
-
-               while ( !$token->isEnd() ) {
-                       $state = $this->popState();
-                       if ( !$state ) {
-                               $this->error( 'internal error: empty state stack' );
-                       }
-
-                       switch ( $state ) {
-                               case 'file':
-                                       $this->expect( T_OPEN_TAG );
-                                       $token = $this->skipSpace();
-                                       if ( $token->isEnd() ) {
-                                               break 2;
-                                       }
-                                       $this->pushState( 'statement', 'file 2' );
-                                       break;
-                               case 'file 2':
-                                       $token = $this->skipSpace();
-                                       if ( $token->isEnd() ) {
-                                               break 2;
-                                       }
-                                       $this->pushState( 'statement', 'file 2' );
-                                       break;
-                               case 'statement':
-                                       $token = $this->skipSpace();
-                                       if ( !$this->validatePath( $token->text ) ) {
-                                               $this->error( "Invalid variable name \"{$token->text}\"" );
-                                       }
-                                       $this->nextPath( $token->text );
-                                       $this->expect( T_VARIABLE );
-                                       $this->skipSpace();
-                                       $arrayAssign = false;
-                                       if ( $this->currentToken()->type == '[' ) {
-                                               $this->nextToken();
-                                               $token = $this->skipSpace();
-                                               if ( !$token->isScalar() ) {
-                                                       $this->error( "expected a string or number for the array key" );
-                                               }
-                                               if ( $token->type == T_CONSTANT_ENCAPSED_STRING ) {
-                                                       $text = $this->parseScalar( $token->text );
-                                               } else {
-                                                       $text = $token->text;
-                                               }
-                                               if ( !$this->validatePath( $text ) ) {
-                                                       $this->error( "Invalid associative array name \"$text\"" );
-                                               }
-                                               $this->pushPath( $text );
-                                               $this->nextToken();
-                                               $this->skipSpace();
-                                               $this->expect( ']' );
-                                               $this->skipSpace();
-                                               $arrayAssign = true;
-                                       }
-                                       $this->expect( '=' );
-                                       $this->skipSpace();
-                                       $this->startPathValue();
-                                       if ( $arrayAssign ) {
-                                               $this->pushState( 'expression', 'array assign end' );
-                                       } else {
-                                               $this->pushState( 'expression', 'statement end' );
-                                       }
-                                       break;
-                               case 'array assign end':
-                               case 'statement end':
-                                       $this->endPathValue();
-                                       if ( $state == 'array assign end' ) {
-                                               $this->popPath();
-                                       }
-                                       $this->skipSpace();
-                                       $this->expect( ';' );
-                                       $this->nextPath( '@extra-' . ( $this->serial++ ) );
-                                       break;
-                               case 'expression':
-                                       $token = $this->skipSpace();
-                                       if ( $token->type == T_ARRAY ) {
-                                               $this->pushState( 'array' );
-                                       } elseif ( $token->isScalar() ) {
-                                               $this->nextToken();
-                                       } elseif ( $token->type == T_VARIABLE ) {
-                                               $this->nextToken();
-                                       } else {
-                                               $this->error( "expected simple expression" );
-                                       }
-                                       break;
-                               case 'array':
-                                       $this->skipSpace();
-                                       $this->expect( T_ARRAY );
-                                       $this->skipSpace();
-                                       $this->expect( '(' );
-                                       $this->skipSpace();
-                                       $this->pushPath( '@extra-' . ( $this->serial++ ) );
-                                       if ( $this->isAhead( ')' ) ) {
-                                               // Empty array
-                                               $this->pushState( 'array end' );
-                                       } else {
-                                               $this->pushState( 'element', 'array end' );
-                                       }
-                                       break;
-                               case 'array end':
-                                       $this->skipSpace();
-                                       $this->popPath();
-                                       $this->expect( ')' );
-                                       break;
-                               case 'element':
-                                       $token = $this->skipSpace();
-                                       // Look ahead to find the double arrow
-                                       if ( $token->isScalar() && $this->isAhead( T_DOUBLE_ARROW, 1 ) ) {
-                                               // Found associative element
-                                               $this->pushState( 'assoc-element', 'element end' );
-                                       } else {
-                                               // Not associative
-                                               $this->nextPath( '@next' );
-                                               $this->startPathValue();
-                                               $this->pushState( 'expression', 'element end' );
-                                       }
-                                       break;
-                               case 'element end':
-                                       $token = $this->skipSpace();
-                                       if ( $token->type == ',' ) {
-                                               $this->endPathValue();
-                                               $this->markComma();
-                                               $this->nextToken();
-                                               $this->nextPath( '@extra-' . ( $this->serial++ ) );
-                                               // Look ahead to find ending bracket
-                                               if ( $this->isAhead( ")" ) ) {
-                                                       // Found ending bracket, no continuation
-                                                       $this->skipSpace();
-                                               } else {
-                                                       // No ending bracket, continue to next element
-                                                       $this->pushState( 'element' );
-                                               }
-                                       } elseif ( $token->type == ')' ) {
-                                               // End array
-                                               $this->endPathValue();
-                                       } else {
-                                               $this->error( "expected the next array element or the end of the array" );
-                                       }
-                                       break;
-                               case 'assoc-element':
-                                       $token = $this->skipSpace();
-                                       if ( !$token->isScalar() ) {
-                                               $this->error( "expected a string or number for the array key" );
-                                       }
-                                       if ( $token->type == T_CONSTANT_ENCAPSED_STRING ) {
-                                               $text = $this->parseScalar( $token->text );
-                                       } else {
-                                               $text = $token->text;
-                                       }
-                                       if ( !$this->validatePath( $text ) ) {
-                                               $this->error( "Invalid associative array name \"$text\"" );
-                                       }
-                                       $this->nextPath( $text );
-                                       $this->nextToken();
-                                       $this->skipSpace();
-                                       $this->markArrow();
-                                       $this->expect( T_DOUBLE_ARROW );
-                                       $this->skipSpace();
-                                       $this->startPathValue();
-                                       $this->pushState( 'expression' );
-                                       break;
-                       }
-               }
-               if ( count( $this->stateStack ) ) {
-                       $this->error( 'unexpected end of file' );
-               }
-               $this->popPath();
-       }
-
-       /**
-        * Initialise a parse.
-        */
-       protected function initParse() {
-               $this->tokens = token_get_all( $this->text );
-               $this->stateStack = array();
-               $this->pathStack = array();
-               $this->firstToken();
-               $this->pathInfo = array();
-               $this->serial = 1;
-       }
-
-       /**
-        * Set the parse position. Do not call this except from firstToken() and
-        * nextToken(), there is more to update than just the position.
-        */
-       protected function setPos( $pos ) {
-               $this->pos = $pos;
-               if ( $this->pos >= count( $this->tokens ) ) {
-                       $this->currentToken = ConfEditorToken::newEnd();
-               } else {
-                       $this->currentToken = $this->newTokenObj( $this->tokens[$this->pos] );
-               }
-
-               return $this->currentToken;
-       }
-
-       /**
-        * Create a ConfEditorToken from an element of token_get_all()
-        * @return ConfEditorToken
-        */
-       function newTokenObj( $internalToken ) {
-               if ( is_array( $internalToken ) ) {
-                       return new ConfEditorToken( $internalToken[0], $internalToken[1] );
-               } else {
-                       return new ConfEditorToken( $internalToken, $internalToken );
-               }
-       }
-
-       /**
-        * Reset the parse position
-        */
-       function firstToken() {
-               $this->setPos( 0 );
-               $this->prevToken = ConfEditorToken::newEnd();
-               $this->lineNum = 1;
-               $this->colNum = 1;
-               $this->byteNum = 0;
-
-               return $this->currentToken;
-       }
-
-       /**
-        * Get the current token
-        */
-       function currentToken() {
-               return $this->currentToken;
-       }
-
-       /**
-        * Advance the current position and return the resulting next token
-        */
-       function nextToken() {
-               if ( $this->currentToken ) {
-                       $text = $this->currentToken->text;
-                       $lfCount = substr_count( $text, "\n" );
-                       if ( $lfCount ) {
-                               $this->lineNum += $lfCount;
-                               $this->colNum = strlen( $text ) - strrpos( $text, "\n" );
-                       } else {
-                               $this->colNum += strlen( $text );
-                       }
-                       $this->byteNum += strlen( $text );
-               }
-               $this->prevToken = $this->currentToken;
-               $this->setPos( $this->pos + 1 );
-
-               return $this->currentToken;
-       }
-
-       /**
-        * Get the token $offset steps ahead of the current position.
-        * $offset may be negative, to get tokens behind the current position.
-        * @return ConfEditorToken
-        */
-       function getTokenAhead( $offset ) {
-               $pos = $this->pos + $offset;
-               if ( $pos >= count( $this->tokens ) || $pos < 0 ) {
-                       return ConfEditorToken::newEnd();
-               } else {
-                       return $this->newTokenObj( $this->tokens[$pos] );
-               }
-       }
-
-       /**
-        * Advances the current position past any whitespace or comments
-        */
-       function skipSpace() {
-               while ( $this->currentToken && $this->currentToken->isSkip() ) {
-                       $this->nextToken();
-               }
-
-               return $this->currentToken;
-       }
-
-       /**
-        * Throws an error if the current token is not of the given type, and
-        * then advances to the next position.
-        */
-       function expect( $type ) {
-               if ( $this->currentToken && $this->currentToken->type == $type ) {
-                       return $this->nextToken();
-               } else {
-                       $this->error( "expected " . $this->getTypeName( $type ) .
-                               ", got " . $this->getTypeName( $this->currentToken->type ) );
-               }
-       }
-
-       /**
-        * Push a state or two on to the state stack.
-        */
-       function pushState( $nextState, $stateAfterThat = null ) {
-               if ( $stateAfterThat !== null ) {
-                       $this->stateStack[] = $stateAfterThat;
-               }
-               $this->stateStack[] = $nextState;
-       }
-
-       /**
-        * Pop a state from the state stack.
-        * @return mixed
-        */
-       function popState() {
-               return array_pop( $this->stateStack );
-       }
-
-       /**
-        * Returns true if the user input path is valid.
-        * This exists to allow "/" and "@" to be reserved for string path keys
-        * @return bool
-        */
-       function validatePath( $path ) {
-               return strpos( $path, '/' ) === false && substr( $path, 0, 1 ) != '@';
-       }
-
-       /**
-        * Internal function to update some things at the end of a path region. Do
-        * not call except from popPath() or nextPath().
-        */
-       function endPath() {
-               $key = '';
-               foreach ( $this->pathStack as $pathInfo ) {
-                       if ( $key !== '' ) {
-                               $key .= '/';
-                       }
-                       $key .= $pathInfo['name'];
-               }
-               $pathInfo['endByte'] = $this->byteNum;
-               $pathInfo['endToken'] = $this->pos;
-               $this->pathInfo[$key] = $pathInfo;
-       }
-
-       /**
-        * Go up to a new path level, for example at the start of an array.
-        */
-       function pushPath( $path ) {
-               $this->pathStack[] = array(
-                       'name' => $path,
-                       'level' => count( $this->pathStack ) + 1,
-                       'startByte' => $this->byteNum,
-                       'startToken' => $this->pos,
-                       'valueStartToken' => false,
-                       'valueStartByte' => false,
-                       'valueEndToken' => false,
-                       'valueEndByte' => false,
-                       'nextArrayIndex' => 0,
-                       'hasComma' => false,
-                       'arrowByte' => false
-               );
-       }
-
-       /**
-        * Go down a path level, for example at the end of an array.
-        */
-       function popPath() {
-               $this->endPath();
-               array_pop( $this->pathStack );
-       }
-
-       /**
-        * Go to the next path on the same level. This ends the current path and
-        * starts a new one. If $path is \@next, the new path is set to the next
-        * numeric array element.
-        */
-       function nextPath( $path ) {
-               $this->endPath();
-               $i = count( $this->pathStack ) - 1;
-               if ( $path == '@next' ) {
-                       $nextArrayIndex =& $this->pathStack[$i]['nextArrayIndex'];
-                       $this->pathStack[$i]['name'] = $nextArrayIndex;
-                       $nextArrayIndex++;
-               } else {
-                       $this->pathStack[$i]['name'] = $path;
-               }
-               $this->pathStack[$i] =
-                       array(
-                               'startByte' => $this->byteNum,
-                               'startToken' => $this->pos,
-                               'valueStartToken' => false,
-                               'valueStartByte' => false,
-                               'valueEndToken' => false,
-                               'valueEndByte' => false,
-                               'hasComma' => false,
-                               'arrowByte' => false,
-                       ) + $this->pathStack[$i];
-       }
-
-       /**
-        * Mark the start of the value part of a path.
-        */
-       function startPathValue() {
-               $path =& $this->pathStack[count( $this->pathStack ) - 1];
-               $path['valueStartToken'] = $this->pos;
-               $path['valueStartByte'] = $this->byteNum;
-       }
-
-       /**
-        * Mark the end of the value part of a path.
-        */
-       function endPathValue() {
-               $path =& $this->pathStack[count( $this->pathStack ) - 1];
-               $path['valueEndToken'] = $this->pos;
-               $path['valueEndByte'] = $this->byteNum;
-       }
-
-       /**
-        * Mark the comma separator in an array element
-        */
-       function markComma() {
-               $path =& $this->pathStack[count( $this->pathStack ) - 1];
-               $path['hasComma'] = true;
-       }
-
-       /**
-        * Mark the arrow separator in an associative array element
-        */
-       function markArrow() {
-               $path =& $this->pathStack[count( $this->pathStack ) - 1];
-               $path['arrowByte'] = $this->byteNum;
-       }
-
-       /**
-        * Generate a parse error
-        */
-       function error( $msg ) {
-               throw new ConfEditorParseError( $this, $msg );
-       }
-
-       /**
-        * Get a readable name for the given token type.
-        * @return string
-        */
-       function getTypeName( $type ) {
-               if ( is_int( $type ) ) {
-                       return token_name( $type );
-               } else {
-                       return "\"$type\"";
-               }
-       }
-
-       /**
-        * Looks ahead to see if the given type is the next token type, starting
-        * from the current position plus the given offset. Skips any intervening
-        * whitespace.
-        * @return bool
-        */
-       function isAhead( $type, $offset = 0 ) {
-               $ahead = $offset;
-               $token = $this->getTokenAhead( $offset );
-               while ( !$token->isEnd() ) {
-                       if ( $token->isSkip() ) {
-                               $ahead++;
-                               $token = $this->getTokenAhead( $ahead );
-                               continue;
-                       } elseif ( $token->type == $type ) {
-                               // Found the type
-                               return true;
-                       } else {
-                               // Not found
-                               return false;
-                       }
-               }
-
-               return false;
-       }
-
-       /**
-        * Get the previous token object
-        */
-       function prevToken() {
-               return $this->prevToken;
-       }
-
-       /**
-        * Echo a reasonably readable representation of the tokenizer array.
-        */
-       function dumpTokens() {
-               $out = '';
-               foreach ( $this->tokens as $token ) {
-                       $obj = $this->newTokenObj( $token );
-                       $out .= sprintf( "%-28s %s\n",
-                               $this->getTypeName( $obj->type ),
-                               addcslashes( $obj->text, "\0..\37" ) );
-               }
-               echo "<pre>" . htmlspecialchars( $out ) . "</pre>";
-       }
-}
-
-/**
- * Exception class for parse errors
- */
-class ConfEditorParseError extends MWException {
-       var $lineNum, $colNum;
-
-       function __construct( $editor, $msg ) {
-               $this->lineNum = $editor->lineNum;
-               $this->colNum = $editor->colNum;
-               parent::__construct( "Parse error on line {$editor->lineNum} " .
-                       "col {$editor->colNum}: $msg" );
-       }
-
-       function highlight( $text ) {
-               $lines = StringUtils::explode( "\n", $text );
-               foreach ( $lines as $lineNum => $line ) {
-                       if ( $lineNum == $this->lineNum - 1 ) {
-                               return "$line\n" . str_repeat( ' ', $this->colNum - 1 ) . "^\n";
-                       }
-               }
-
-               return '';
-       }
-}
-
-/**
- * Class to wrap a token from the tokenizer.
- */
-class ConfEditorToken {
-       var $type, $text;
-
-       static $scalarTypes = array( T_LNUMBER, T_DNUMBER, T_STRING, T_CONSTANT_ENCAPSED_STRING );
-       static $skipTypes = array( T_WHITESPACE, T_COMMENT, T_DOC_COMMENT );
-
-       static function newEnd() {
-               return new self( 'END', '' );
-       }
-
-       function __construct( $type, $text ) {
-               $this->type = $type;
-               $this->text = $text;
-       }
-
-       function isSkip() {
-               return in_array( $this->type, self::$skipTypes );
-       }
-
-       function isScalar() {
-               return in_array( $this->type, self::$scalarTypes );
-       }
-
-       function isEnd() {
-               return $this->type == 'END';
-       }
-}
index 964cd9f..38d3af5 100644 (file)
@@ -1908,12 +1908,9 @@ class Language {
                        $data[0] = 'Offset';
                }
 
-               $minDiff = 0;
                if ( $data[0] == 'System' || $tz == '' ) {
-                       #  Global offset in minutes.
-                       if ( isset( $wgLocalTZoffset ) ) {
-                               $minDiff = $wgLocalTZoffset;
-                       }
+                       # Global offset in minutes.
+                       $minDiff = $wgLocalTZoffset;
                } elseif ( $data[0] == 'Offset' ) {
                        $minDiff = intval( $data[1] );
                } else {
index 98938b2..65d74e9 100644 (file)
@@ -754,6 +754,9 @@ class LanguageConverter {
                global $wgDisableLangConversion, $wgDisableTitleConversion, $wgRequest;
                $isredir = $wgRequest->getText( 'redirect', 'yes' );
                $action = $wgRequest->getText( 'action' );
+               if ( $action == 'edit' && $wgRequest->getBool( 'redlink' ) ) {
+                       $action = 'view';
+               }
                $linkconvert = $wgRequest->getText( 'linkconvert', 'yes' );
                $disableLinkConversion = $wgDisableLangConversion
                        || $wgDisableTitleConversion;
index 64e08a2..fafd360 100644 (file)
@@ -5,7 +5,8 @@
                        "Csisc",
                        "Kuwaity26",
                        "Malekbr",
-                       "아라"
+                       "아라",
+                       "Aħmedbaɛl"
                ]
        },
        "tog-underline": "ضع خطا تحت الوصلات:",
        "watchlistall2": "الكل",
        "namespacesall": "الكل",
        "monthsall": "الكل",
+       "watchlistedit-clear-explain": "Elɛanawin lkol bech yetnaħaw mel'lista mteɛek",
+       "watchlistedit-clear-titles": "Elɛanawin",
+       "watchlistedit-too-many": "Famma barcha pajet w'manajmouch nħotouhom lkol lahné",
        "watchlisttools-view": "اعرض التغييرات المرتبطة",
        "watchlisttools-edit": "اعرض قائمة المراقبة وعدلها",
        "watchlisttools-raw": "عدل قائمة المراقبة الخام",
index 9696fce..b7bf121 100644 (file)
        "accmailtext": "[[User talk:$1|$1]]-ৰ কাৰণে যাদৃচ্ছিকভাৱে উৎপন্ন কৰা গুপ্তশব্দ $2লৈ পঠোৱা হ'ল । \nএই নতুন একাউন্টত প্ৰৱেশ কৰি ''[[Special:ChangePassword|গুপ্তশব্দ সলনি কৰক]]'' পৃষ্ঠাখনত শব্দতো সলনি কৰি ল’ব পাৰিব ।",
        "newarticle": "(নতুন)",
        "newarticletext": "আপুনি বিচৰা প্ৰবন্ধটো বিচাৰি পোৱা নগ'ল।\n\nইচ্ছা কৰিলে আপুনিয়েই এই প্ৰবন্ধটো লিখা আৰম্ভ কৰিব পাৰে। [$1 ইয়াত] সহায় পাব।\n\nআপুনি যদি ইয়ালৈ ভুলতে আহিছে, তেনেহলে আপোনাৰ ব্ৰাওজাৰৰ '''BACK''' বুটামত টিপা মাৰক।",
-       "anontalkpagetext": "----''à¦\8fà¦\87à¦\96ন à¦\86লà§\8bà¦\9aনা à¦ªà§\83ষà§\8dঠা à¦¬à§\87নামà§\80 à¦¸à¦¦à¦¸à§\8dযৰ à¦¬à¦¾à¦¬à§\87, à¦¯à¦¿à¦¯à¦¼à§\87 à¦¨à¦¿à¦\9cা à¦\8fà¦\95াà¦\89নà§\8dà¦\9f  à¦¸à§\83ষà§\8dà¦\9fি à¦\95ৰা à¦¨à¦¾à¦\87 à¦¬à¦¾ à¦¯à¦¿à¦¯à¦¼à§\87 à¦¸à§\87à¦\87 à¦\8fà¦\95াà¦\89নà§\8dà¦\9f à¦¬à§\8dযৱহাৰ à¦¨à¦\95ৰà§\87 à¥¤\nà¦\8fতà§\87à¦\95à§\87 à¦\86মি à¦¤à§\87à¦\96à§\87তসà¦\95লà¦\95 à¦\86à¦\87-পি à¦ à¦¿à¦\95নাৰà§\87 à¦\9aিনাà¦\95à§\8dত à¦\95ৰিবলà§\88 à¦¬à¦¾à¦§à§\8dয à¥¤\nসà§\87à¦\87 à¦\8fà¦\95à§\87à¦\87 à¦\86à¦\87-পি à¦ à¦¿à¦\95না à¦\85নà§\87à¦\95à§\87à¦\87 à¦¬à§\8dযৱহাৰ à¦\95ৰিব à¦ªà¦¾à§°à§\87 ।\nআপুনি যদি এজন বেনামী সদস্য আৰু যদি আপুনি অনুভৱ কৰে যে আপোনাৰ প্ৰতি অপ্ৰাসঙ্গিক মন্তব্য কৰা হৈছে, তেনেহলে আন বেনামী সদস্যৰ পৰা পৃথক কৰিবলৈ \n[[Special:UserLogin/signup|একাউন্ট সৃষ্টি কৰক]] বা [[Special:UserLogin|প্ৰৱেশ কৰক]] ।''",
+       "anontalkpagetext": "----''à¦\8fà¦\87à¦\96ন à¦\86লà§\8bà¦\9aনা à¦ªà§\83ষà§\8dঠা à¦¬à§\87নামà§\80 à¦¸à¦¦à¦¸à§\8dযৰ à¦¬à¦¾à¦¬à§\87, à¦¯à¦¿à¦¯à¦¼à§\87 à¦¨à¦¿à¦\9cা à¦\8fà¦\95াà¦\89ণà§\8dà¦\9f  à¦¸à§\83ষà§\8dà¦\9fি à¦\95ৰা à¦¨à¦¾à¦\87 à¦¬à¦¾ à¦¯à¦¿à¦¯à¦¼à§\87 à¦¸à§\87à¦\87 à¦\8fà¦\95াà¦\89ণà§\8dà¦\9f à¦¬à§\8dযৱহাৰ à¦¨à¦\95ৰà§\87।\nà¦\8fতà§\87à¦\95à§\87 à¦\86মি à¦¤à§\87à¦\96à§\87তসà¦\95লà¦\95 à¦\86à¦\87-পি à¦ à¦¿à¦\95নাৰà§\87 à¦\9aিনাà¦\95à§\8dত à¦\95ৰিবলà§\88 à¦¬à¦¾à¦§à§\8dয।\nসà§\87à¦\87 à¦\8fà¦\95à§\87à¦\87 à¦\86à¦\87-পি à¦ à¦¿à¦\95না à¦\85নà§\87à¦\95à§\87à¦\87 à¦¬à§\8dযৱহাৰ à¦\95ৰিব à¦ªà¦¾à§°à§\87।\nআপুনি যদি এজন বেনামী সদস্য আৰু যদি আপুনি অনুভৱ কৰে যে আপোনাৰ প্ৰতি অপ্ৰাসঙ্গিক মন্তব্য কৰা হৈছে, তেনেহলে আন বেনামী সদস্যৰ পৰা পৃথক কৰিবলৈ \n[[Special:UserLogin/signup|একাউন্ট সৃষ্টি কৰক]] বা [[Special:UserLogin|প্ৰৱেশ কৰক]] ।''",
        "noarticletext": "এই পৃষ্ঠাত বৰ্তমান কোনো পাঠ্য নাই ।\nআপুনি আন পৃষ্ঠাত [[Special:Search/{{PAGENAME}}| এই শিৰোনামা অনুসন্ধান কৰিব পাৰে]],\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} সম্পৰ্কীয় অভিলেখ অনুসন্ধান কৰিব পাৰে],\nবা [{{fullurl:{{FULLPAGENAME}}|action=edit}} এই পৃষ্ঠা সম্পাদনা কৰিব পাৰে]</span>",
        "noarticletext-nopermission": "এই পৃষ্ঠাত বৰ্তমান কোনো পাঠ্য নাই।\nআপুনি আন পৃষ্ঠাত [[Special:Search/{{PAGENAME}}|এই শিৰোনামা অনুসন্ধান কৰিব পাৰে]],\nবা <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} সম্পৰ্কীয় অভিলেখ অনুসন্ধান কৰিব পাৰে]</span>, কিন্তু এই পৃষ্ঠা সৃষ্টি কৰিবলৈ আপোনাৰ অনুমতি নাই।",
        "missing-revision": "\"{{FULLPAGENAME}}\" নামৰ পৃষ্ঠাৰ #$1 সংশোধনৰ অস্তিত্ব নাই।\n\nসাধাৰণতে বিলোপ কৰা এখন পৃষ্ঠাৰ পুৰণা ইতিহাস লিংক অনুসৰণ কৰিলে এনে হয়।\n[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} বিলোপন ল'গ]ত অধিক তথ্য পাব।",
        "action-edit": "এই পৃষ্ঠা সম্পাদনা কৰক",
        "action-createpage": "পৃষ্ঠা সৃষ্টি কৰক",
        "action-createtalk": "কথাবতৰা পৃষ্ঠা সৃষ্টি কৰক",
-       "action-createaccount": "à¦\8fà¦\87 à¦¸à¦¦à¦¸à§\8dয à¦\8fà¦\95াà¦\89নà§\8dà¦\9f  সৃষ্টি কৰক",
+       "action-createaccount": "à¦\8fà¦\87 à¦¸à¦¦à¦¸à§\8dয à¦\8fà¦\95াà¦\89ণà§\8dà¦\9f সৃষ্টি কৰক",
        "action-minoredit": "সম্পাদনা অগুৰুত্বপূৰ্ণ বুলি চিহ্নিত কৰক",
        "action-move": "এই পৃষ্ঠা স্থানান্তৰ কৰক",
        "action-move-subpages": "এই পৃষ্ঠা আৰু ইয়াৰ উপপৃষ্ঠাসমূহ আঁতৰাওক",
        "blocklogtext": "এই অভিলেখ অৱৰোধ কৰা আৰু অৱৰোধ আঁতৰ কৰা সদস্য সম্পৰ্কীয়।\nস্বয়ংক্ৰিয়ভাৱে প্ৰতিবন্ধক পোৱা আই.পি. ঠিকনাবোৰ ইয়াত তালিকাভুক্ত কৰা হোৱা নাই।\nসাম্প্ৰতিক কাৰ্যৰত নিষেধ আৰু প্ৰতিবন্ধকৰ বাবে [[Special:BlockList|প্ৰতিবন্ধক তালিকা]] চাওক।",
        "unblocklogentry": "$1 বাৰণ উঠাই লোৱা হ’ল",
        "block-log-flags-anononly": "কেৱল বেনামী সদস্য",
-       "block-log-flags-nocreate": "à¦\8fà¦\95াà¦\89ন্ট সৃষ্টি নিষ্ক্ৰিয় কৰা হৈছে",
+       "block-log-flags-nocreate": "à¦\8fà¦\95াà¦\89ণ্ট সৃষ্টি নিষ্ক্ৰিয় কৰা হৈছে",
        "block-log-flags-noautoblock": "স্বয়ংক্ৰিয়-প্ৰতিবন্ধক নিষ্ক্ৰিয় কৰা হৈছে",
        "block-log-flags-noemail": "ই-মেইল অৱৰোধ কৰা হৈছে",
        "block-log-flags-nousertalk": "নিজৰ কথা-বতৰা পৃষ্ঠা সম্পাদনা কৰিব নোৱাৰি",
        "block-log-flags-angry-autoblock": "বৰ্ধিত স্বয়ংক্ৰিয়-প্ৰতিবন্ধক সক্ৰিয় কৰা হৈছে",
        "block-log-flags-hiddenname": "সদস্যনাম গোপন কৰা হ’ল",
-       "range_block_disabled": "প্ৰশাসকৰ পৰিসীমা প্ৰতিবন্ধক সৃষ্টি কৰিব পৰা ক্ষমতা নিষ্ক্ৰিয় কৰা হৈছে ।",
+       "range_block_disabled": "প্ৰশাসকৰ পৰিসীমা প্ৰতিবন্ধক সৃষ্টি কৰিব পৰা ক্ষমতা নিষ্ক্ৰিয় কৰা হৈছে।",
        "ipb_expiry_invalid": "অবৈধ ম্যাদ উকলা সময়",
        "ipb_expiry_temp": "গুপ্ত সদস্যনাম অৱৰোধ স্থায়ী হ’ব লাগিব ।",
        "ipb_hide_invalid": "এই বিষয়বস্তু নিবাৰণ কৰিব পৰা নগ’ল; ইয়াত {{PLURAL:$1|এটা সম্পাদনা|$1টা সম্পাদনা}} আছে ।",
index a4f1919..0ffe669 100644 (file)
        "badtitle": "Няслушная назва",
        "badtitletext": "Запытаная назва старонкі няслушная ці пустая, альбо няслушна ўказаная міжмоўная ці інтэрвікі-назва. Яна можа ўтрымліваць сымбалі, якія нельга ўжываць у назвах.",
        "perfcached": "Наступныя зьвесткі кэшаваныя і могуць быць састарэлымі. У кэшы {{PLURAL:$1|даступны|даступныя}} ня больш за $1 {{PLURAL:$1|вынік|вынікі|вынікаў}}.",
-       "perfcachedts": "Наступныя зьвесткі кэшаваныя і апошні раз былі абноўленыя $1. У кэшы {{PLURAL:$4|даступны|даступныя}} ня больш за $4 {{PLURAL:$4|вынік|вынікаў|вынікі}}.",
+       "perfcachedts": "Наступныя зьвесткі кэшаваныя і апошні раз былі абноўленыя $1. У кэшы {{PLURAL:$4|даступны|даступныя}} ня больш за $4 {{PLURAL:$4|вынік|вынікі|вынікаў}}.",
        "querypage-no-updates": "Абнаўленьні гэтай старонкі цяпер адключаныя. Зьвесткі ня будуць абнаўляцца.",
        "viewsource": "Паказаць крыніцу",
        "viewsource-title": "Прагляд крыніцы для $1",
        "right-move": "перанос старонак",
        "right-move-subpages": "перанос старонак разам зь іх падстаронкамі",
        "right-move-rootuserpages": "Перанос карэнных старонак удзельнікаў",
+       "right-move-categorypages": "перанос старонак катэгорыяў",
        "right-movefile": "перайменаваньне файлаў",
        "right-suppressredirect": "не ствараць перанакіраваньне са старой назвы пасьля пераносу старонкі",
        "right-upload": "загрузка файлаў",
        "action-move": "перанос гэтай старонкі",
        "action-move-subpages": "перанос гэтай старонкі і яе падстаронак",
        "action-move-rootuserpages": "перанос карэнных старонак удзельнікаў",
+       "action-move-categorypages": "перанос старонак катэгорыяў",
        "action-movefile": "перайменаваць гэты файл",
        "action-upload": "загрузку гэтага файла",
        "action-reupload": "перазапіс гэтага файла",
        "post-expand-template-argument-category-desc": "Пасьля раскрыцьця аргумэнту шаблёну (нешта ў трайных дужках, напрыклад, <code>{{{Foo}}}</code>), старонка перавышае памер <code>$wgMaxArticleSize</code>.",
        "expensive-parserfunction-category-desc": "На старонцы ўжываецца зашмат рэсурсаёмістых функцыяў парсэру (такіх, як <code>#ifexist</code>). Глядзіце [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgExpensiveParserFunctionLimit Manual:$wgExpensiveParserFunctionLimit].",
        "broken-file-category-desc": "Катэгорыя дадаецца, калі старонка ўтрымлівае няслушную спасылку на файл (спасылку на файл, які не існуе).",
+       "hidden-category-category-desc": "Гэта катэгорыя з дададзенай меткай <code><nowiki>__HIDDENCAT__</nowiki></code> у ёй, што па змоўчаньні не адлюстроўвае яе на старонках у сьпісе катэгорыяў.",
        "mailnologin": "Няма адрасу атрымальніка",
        "mailnologintext": "Вам неабходна [[Special:UserLogin|ўвайсьці ў сыстэму]] і мець пацьверджаны адрас электроннай пошты ў Вашых [[Special:Preferences|наладах]], каб дасылаць лісты іншым удзельнікам.",
        "emailuser": "Даслаць ліст",
index 4c1ab8e..95a41a3 100644 (file)
        "edit-gone-missing": "পাতাটি হালনাগাদ হয়নি।\nসম্ভবতঃ পাতাটি মুছে ফেলা হয়েছে।",
        "edit-conflict": "সম্পাদনা সংঘাত।",
        "edit-no-change": "আপনার সম্পাদনাটি উপেক্ষা করা হয়েছে, কারণ লেখাতে কোনো পরিবর্তন করা হয়নি।",
+       "postedit-confirmation-created": "পাতাটি তৈরি হয়েছে।",
+       "postedit-confirmation-restored": "পাতাটি পুনরুদ্ধার করা হয়েছে।",
        "postedit-confirmation-saved": "আপনার সম্পাদনা সংরক্ষিত হয়েছে।",
        "edit-already-exists": "নতুন পাতা সৃষ্টি করা যায়নি।\nপাতাটি ইতিমধ্যেই বিদ্যমান।",
        "defaultmessagetext": "আদি টেক্সট",
index a5c7557..6052d7d 100644 (file)
        "sp-contributions-blocklog": "Registre de bloquejos",
        "sp-contributions-suppresslog": "contribucions suprimides de l'usuari",
        "sp-contributions-deleted": "contribucions d'usuari esborrades",
-       "sp-contributions-uploads": "pujades",
+       "sp-contributions-uploads": "càrregues",
        "sp-contributions-logs": "registres",
        "sp-contributions-talk": "discussió",
        "sp-contributions-userrights": "gestió de drets d'usuari",
index 85b9dfd..d92253f 100644 (file)
        "listingcontinuesabbrev": "(кхин дlа)",
        "index-category": "Меттигтерахьйо агlонаш",
        "noindex-category": "ДӀахьушйоцу агӀонаш",
-       "broken-file-category": "{{#switch:{{NAMESPACE}}\n |{{ns:0}}=Ð\91олÑ\85 Ñ\86абеÑ\88 Ñ\84айлийн Ñ\85Ñ\8cажоÑ\80агаÑ\88 Ð¹Ð¾Ð»Ñ\83 Ð°Ð³Ó\80онаÑ\88}}",
+       "broken-file-category": "{{#switch:{{NAMESPACE}}\n |{{ns:0}}=Болх цабеш файлийн хьажоргаш йолу агӀонаш}}",
        "about": "Цуьнах лаьцна",
        "article": "Яззам",
        "newwindow": "(керлачу корехь)",
        "rows": "МогӀанаш:",
        "columns": "БӀогӀамаш:",
        "searchresultshead": "Лаха",
-       "stub-threshold": "Ð\9aеÑ\87 Ñ\8fÑ\80ан Ð´Ð¾Ð·Ð° <a href=\"#\" class=\"stub\">коÑ\8cÑ\80Ñ\82амогÓ\80амна Ñ\85Ñ\8cажоÑ\80агаÑ\88</a> (байÑ\82аÑ\88каÑ\85):",
+       "stub-threshold": "Кеч яран доза <a href=\"#\" class=\"stub\">коьртамогӀамна хьажоргаш</a> (байташках):",
        "stub-threshold-disabled": "ДӀадайина",
        "recentchangesdays": "Керла нисдар гайта динахь:",
        "recentchangesdays-max": "Къезиг $1 {{PLURAL:$1|дена}}",
        "brokenredirectstext": "Лахара дӀасахьажийнарш ю йоцучу агӀонийн тӀе хьажийна:",
        "brokenredirects-edit": "нисъе",
        "brokenredirects-delete": "дӀаяккха",
-       "withoutinterwiki": "ЮкÑ\8aаÑ\80вики-Ñ\85Ñ\8cажоÑ\80агаÑ\88 Ð¹Ð¾Ñ\86Ñ\83 Ð°Ð³Ó\80онаÑ\88",
+       "withoutinterwiki": "Юкъарвики-хьажоргаш йоцу агӀонаш",
        "withoutinterwiki-summary": "Лахара агӀонийн юкъарвики-хьажоргаш яц:",
        "withoutinterwiki-submit": "Гайта",
        "fewestrevisions": "ЧIогIа кIезиг башхонаш йолу агIонаш",
        "whatlinkshere-hideredirs": "$1 дӀасахьажорш",
        "whatlinkshere-hidetrans": "$1 латораш",
        "whatlinkshere-hidelinks": "$1 хьажоргаш",
-       "whatlinkshere-hideimages": "$1 Ñ\84айлийн Ñ\85Ñ\8cажоÑ\80агаÑ\88",
+       "whatlinkshere-hideimages": "$1 файлийн хьажоргаш",
        "whatlinkshere-filters": "Литтарш",
        "autoblockid": "Ша блоккхетар #$1",
        "block": "Декъашхочун блоктохар",
index ddf1b72..0f786c4 100644 (file)
        "protectedpages": "پەڕە پارێزراوەکان",
        "protectedpages-indef": "تەنیا پاراستنە بێسنوورەکان",
        "protectedpages-cascade": "تەنیا پاراستنە زنجیرییەکان",
+       "protectedpages-noredirect": "ڕەوانەکەرەکان بشارەوە",
        "protectedpagesempty": "هیچ لاپەڕەیک ئێستا بەم دیاریکراوانە نەپارێزراوە.",
        "protectedpages-page": "پەڕە",
+       "protectedpages-params": "پارامەترەکانی پاراستن",
+       "protectedpages-reason": "ھۆکار",
        "protectedtitles": "سەرناوە پارێزراوەکان",
        "protectedtitlesempty": "ھیچ سەرناوێک بەم سنوورانەوە ئێستا نەپارێزراوە.",
        "listusers": "پێرستی بەکارھێنەران",
index 7a1d270..42671bb 100644 (file)
        "whatlinkshere-links": "$1 ligami",
        "whatlinkshere-hidetrans": "inclusione",
        "whatlinkshere-hidelinks": "$1 ligami",
-       "ipadressorusername": "Adrizzu IP o nome di cuntributore",
+       "ipaddressorusername": "Adrizzu IP o nome di cuntributore",
        "ipbreason": "Mutivu:",
        "ipboptions": "2 ore:2 hours,1 ghjornu:1 day,3 ghjorni:3 days,1 sittimana:1 week,2 sittimane:2 weeks,1 mese:1 month,3 mesi:3 months,6 mesi:6 months,1 annu:1 year,infinitu:infinite",
        "ipblocklist": "Cuntributori bluccati",
        "file-nohires": "Una diversione incù una risoluzione più alta ùn hè micca dispunibile.",
        "show-big-image": "Schedariu originale",
        "show-big-image-other": "{{PLURAL:$2|Altra risuluzione|Altre risuluzioni}}: $1.",
-       "showhidebots": "($1 boti)",
        "noimages": "Nulla da vede.",
        "ilsubmit": "Ricerca",
        "bydate": "per data",
        "table_pager_limit_label": "Risultati per pagina:",
        "table_pager_limit_submit": "Invià",
        "table_pager_empty": "Micca risultati",
+       "autosumm-replace": "Pagina sustituita incù '$1'",
        "autoredircomment": "Reindirizzamentu à [[$1]]",
        "autosumm-new": "Pagina nova: $1",
        "watchlistedit-raw-titles": "Pagine:",
        "tags-edit": "mudificà",
        "logentry-delete-delete": "$1 ha cancellatu a pagina $3",
        "logentry-move-move": "$1 {{GENDER:$2|hà spustatu}} a pagina $3 à $4",
+       "logentry-newusers-create": "U participante $3 hè statu creatu da $1",
        "rightsnone": "(nessunu)",
        "expand_templates_output": "Risultatu"
 }
index 99d8414..36e77f8 100644 (file)
        "right-move": "Seiten verschieben",
        "right-move-subpages": "Seiten inklusive Unterseiten verschieben",
        "right-move-rootuserpages": "Haupt-Benutzerseiten verschieben",
+       "right-move-categorypages": "Kategorieseiten verschieben",
        "right-movefile": "Dateien verschieben",
        "right-suppressredirect": "Beim Verschieben die Erstellung einer Weiterleitung unterdrücken",
        "right-upload": "Dateien hochladen",
        "action-move": "die Seite zu verschieben",
        "action-move-subpages": "diese Seite und zugehörige Unterseiten zu verschieben",
        "action-move-rootuserpages": "Haupt-Benutzerseiten zu verschieben",
+       "action-move-categorypages": "Kategorieseiten zu verschieben",
        "action-movefile": "Diese Datei verschieben",
        "action-upload": "Dateien hochzuladen",
        "action-reupload": "die vorhandene Datei zu überschreiben",
        "movepagetalktext": "Die dazugehörige Diskussionsseite wird, sofern vorhanden, mitverschoben, '''es sei denn:'''\n*Es existiert bereits eine Diskussionsseite mit diesem Namen, oder\n*du wählst die unten stehende Option ab.\n\nIn diesen Fällen musst du, falls gewünscht, den Inhalt der Seite von Hand verschieben oder zusammenführen.\n\nBitte den '''neuen''' Titel unter '''Ziel''' eintragen, darunter die Umbenennung bitte '''begründen.'''",
        "movearticle": "Seite verschieben:",
        "moveuserpage-warning": "'''Warnung:''' Du bist dabei, eine Benutzerseite zu verschieben. Bitte bedenke, dass dadurch nur die Benutzerseite verschoben, '''nicht''' aber der Benutzer umbenannt wird.",
+       "movecategorypage-warning": "<strong>Warnung:</strong> Du bist gerade dabei, eine Kategorieseite zu verschieben. Bitte sei dir bewusst, dass nur die Seite verschoben wird. Alle Seiten in der alten Kategorie werden <em>nicht</em> neu kategorisiert.",
        "movenologintext": "Du musst ein registrierter Benutzer und [[Special:UserLogin|angemeldet]] sein, um eine Seite zu verschieben.",
        "movenotallowed": "Du hast nicht die erforderliche Berechtigung, um Seiten verschieben zu können.",
        "movenotallowedfile": "Du hast nicht die erforderliche Berechtigung, um Dateien verschieben zu können.",
        "cant-move-user-page": "Du hast nicht die erforderliche Berechtigung, Benutzerhauptseiten verschieben zu können.",
        "cant-move-to-user-page": "Du hast nicht die Berechtigung, Seiten auf eine Benutzerseite zu verschieben (mit Ausnahme von Benutzerunterseiten).",
+       "cant-move-category-page": "Du hast keine Berechtigung, um Kategorieseiten zu verschieben.",
+       "cant-move-to-category-page": "Du hast keine Berechtigung, um eine Seite zu einer Kategorieseite zu verschieben.",
        "newtitle": "Ziel:",
        "move-watch": "Quell- und Zielseite beobachten",
        "movepagebtn": "Seite verschieben",
        "watchlistedit-raw-done": "Deine Beobachtungsliste wurde gespeichert.",
        "watchlistedit-raw-added": "{{PLURAL:$1|Ein Eintrag wurde|$1 Einträge wurden}} hinzugefügt:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|Ein Eintrag wurde|$1 Einträge wurden}} entfernt:",
+       "watchlistedit-clear-title": "Beobachtungsliste leeren",
+       "watchlistedit-clear-legend": "Beobachtungsliste leeren",
+       "watchlistedit-clear-explain": "Alle Seitennamen werden von deiner Beobachtungsliste entfernt.",
+       "watchlistedit-clear-titles": "Seitennamen:",
+       "watchlistedit-clear-submit": "Beobachtungsliste leeren (Dies ist dauerhaft!)",
+       "watchlistedit-clear-done": "Deine Beobachtungsliste wurde geleert.",
+       "watchlistedit-clear-removed": "{{PLURAL:$1|Ein Seitenname wurde|$1 Seitennamen wurden}} entfernt:",
+       "watchlistedit-too-many": "Es gibt hier zu viele Seiten zum Anzeigen.",
+       "watchlisttools-clear": "Beobachtungsliste leeren",
        "watchlisttools-view": "Beobachtungsliste: Änderungen",
        "watchlisttools-edit": "normal bearbeiten",
        "watchlisttools-raw": "im Listenformat bearbeiten (Import/Export)",
index 7bc9a9d..e8a7fee 100644 (file)
        "overwroteimage": "Newi versiyona resim da \"[[$1]]\"i bar biya",
        "uploaddisabled": "bar kerdişî iptal biyo",
        "copyuploaddisabled": "URL bar kerdiş kefiliyeyo.",
-       "uploaddisabledtext": "Barkerdışa dosyaya dewre ra veta.",
+       "uploaddisabledtext": "Barkerdışê dosya dewre ra veta.",
        "php-uploaddisabledtext": "barkerdışê dosyayê PHP nıka çino. kerem kere eyarê file_uploads korol bıkerê.",
        "uploadscripted": "Ena dosya de yew HTML ya zi kodê scriptî este ke belki browserê webî fam nikeno.",
        "uploadinvalidxml": "Dosyaya barkerdiye de XML nêgureniya.",
        "withoutinterwiki-submit": "Bımocne",
        "fewestrevisions": "Pelê be senık çımraviyarnayışi",
        "nbytes": "$1 {{PLURAL:$1|bayt|bayti}}",
-       "ncategories": "$1 {{PLURAL:$1|Kategori|Kategoriy}}",
+       "ncategories": "$1 {{PLURAL:$1|Kategoriye|Kategoriy}}",
        "ninterwikis": "$1 {{PLURAL:$1|interwiki|interwikiy}}",
        "nlinks": "$1 {{PLURAL:$1|link|linkî}}",
        "nmembers": "$1 {{PLURAL:$1|eza|ezayan}}",
        "move": "Bere",
        "movethispage": "Ena pele bere",
        "unusedimagestext": "Enê dosyey estê, feqet zerrey yew pele de wedardey niyê.\nXo vira mekerê ke, sıteyê webiê bini şenê direkt ebe URLi yew dosya ra gırê bê, u wına şenê verba gurênayışo feal de tiya hewna lista bê.",
-       "unusedcategoriestext": "kategoriyê ke cêrdeyê estê lakin qet ju wesiqa yana kategori de nexebtênê.",
+       "unusedcategoriestext": "Kategoriyê ke cêr derê, nê bıbê zi, terefê qet madeyan ya zi kategoriyan ra nêgureniyenê.",
        "notargettitle": "Hedef çini yo",
        "notargettext": "qey xebıtnayişê ney fonksiyoni şıma yew hedef nişane nêkerd.",
        "nopagetitle": "wina yew pelê hedefi çin o.",
        "listgrouprights-addgroup-self-all": "şıma eşkeni hesabê xo re heme gruban têare bıkerî",
        "listgrouprights-removegroup-self-all": "şıma hesabê xo ra eşkeni heme gruban bıveci",
        "listgrouprights-namespaceprotection-namespace": "Caynami",
-       "trackingcategories": "Kategoriye taqiban",
-       "trackingcategories-msg": "Kategoriya taqibi",
+       "trackingcategories": "Kategoriyê teqibi",
+       "trackingcategories-msg": "Kategoriya teqibi",
        "trackingcategories-name": "Namey mesaci",
        "trackingcategories-desc": "Kriterê definayışê kategoriye",
        "trackingcategories-disabled": "Kategoriya feal niya",
        "nowatchlist": "listeya temaşa kerdıişê şıma de yew madde zi çina.",
        "watchlistanontext": "qey vurnayişê maddeya listeya temaşakerdişi $1.",
        "watchnologin": "Şıma cıkewtış nêvıraşto",
-       "addwatch": "Listeyê seyri deke",
+       "addwatch": "Lista seyrkerdışi ke",
        "addedwatchtext": "Ma pele \"[[:$1]]\" zerri [[Special:Watchlist|watchlist]]ê tı kerd de.\nEna deme ra, ma qe vurnayışan ser ena pele tı haberdar keni.",
-       "removewatch": "Listedê mınê seyr kerdışi ra hewad",
+       "removewatch": "Lista seyrkerdışi ra wedare",
        "removedwatchtext": "Ena pela \"[[:$1]]\" biya wedariya [[Special:Watchlist|listeyê seyr-kerdışi şıma]].",
        "watch": "Seyr ke",
        "watchthispage": "Ena pele seyr ke",
        "tooltip-compareselectedversions": "Ena per de ferqê rewziyonan de dı weçinaya bıvinê",
        "tooltip-watch": "Ena pele lista xoya seyrkerdışi ke",
        "tooltip-watchlistedit-normal-submit": "Sernuşteyan wedare",
-       "tooltip-watchlistedit-raw-submit": "Listeyê seyri newen ke",
+       "tooltip-watchlistedit-raw-submit": "Lista seyrkerdışi newe ke",
        "tooltip-recreate": "pel hewn a bışiyo zi tepiya biya",
        "tooltip-upload": "Sergen de bari be",
        "tooltip-rollback": "\"Peyser bia\" be yew tık pela iştıraq(an)ê peyên|i(an) peyser ano.",
        "pageinfo-recent-edits": "Amariya vurnayışan ($1 ra nata)",
        "pageinfo-recent-authors": "Amarina nuştekaran pêro",
        "pageinfo-magic-words": "{{PLURAL:$1|Çekuya|Çekuyê}} ($1) sihırini",
-       "pageinfo-hidden-categories": "($1) {{PLURAL:$1|Kategoriyer|Kategoriyan}} bınımne",
+       "pageinfo-hidden-categories": "{{PLURAL:$1|Kategoriya nımıtiye|Kategoriyê nımıtey}} ($1)",
        "pageinfo-templates": "{{PLURAL:$1|Şablono|Şablonê}} ke mocniyenê ($1)",
        "pageinfo-transclusions": "{{PLURAL:$1|1 Pele|$1 Pelan}} de bestiya pıra",
        "pageinfo-toolboxlink": "Melumatê pele",
        "exif-languagecode": "Zıwan",
        "exif-iimversion": "Verqaydê IIM",
        "exif-iimcategory": "Kategoriye",
-       "exif-iimsupplementalcategory": "Kategoriyê temam kerdışi",
+       "exif-iimsupplementalcategory": "Kategoriyê temamkerdışi",
        "exif-datetimeexpires": "No peyra mekarênê",
        "exif-datetimereleased": "Bıroşe",
        "exif-originaltransmissionref": "Oricinal pusula da kodê açarnayışi",
        "bitrate-yottabits": "$1Ybps",
        "lag-warn-normal": "Vurnayîşî ke {{PLURAL:$1|seniye|seniyeyî}} ra newiyerî belki inan nimucneno.",
        "lag-warn-high": "Eka serverê databaseyî zaf hebitiyeno, ayra vurnayîşî ke {{PLURAL:$1|seniye|seniyeyî}} ra newiyerî belki inan nimucneno.",
-       "watchlistedit-normal-title": "Listeyê seyirkerdişi bivurne",
-       "watchlistedit-normal-legend": "Listeya seyri ra sername wedarne.",
+       "watchlistedit-normal-title": "Lista seyrkerdışi bıvurne",
+       "watchlistedit-normal-legend": "Lista seyrkerdışi ra sernameyan wedare",
        "watchlistedit-normal-explain": "Listeyê seyr kerdîşî ti de serogî cor de mucnayiyo.\nEka ti wazeno seroğ biwedarne, kuti ke kistê de, ay işaret bike u \"{{int:Watchlistedit-normal-submit}}\" klik bike.\nTi hem zi eşkeno [[Special:EditWatchlist/raw|edit the raw list]].",
        "watchlistedit-normal-submit": "Sernuşteyan wedare",
        "watchlistedit-normal-done": "{{PLURAL:$1|1 seroğ|$1 seroğî}} seyr kerdişê tu ra wedarno.",
-       "watchlistedit-raw-title": "Listeyê seyirkerdişi ye hami bivurne",
-       "watchlistedit-raw-legend": "Listeyê seyirkerdişi ye hami bivurne",
+       "watchlistedit-raw-title": "Lista seyrkerdışia xame bıvurne",
+       "watchlistedit-raw-legend": "Lista seyrkerdışia xame bıvurne",
        "watchlistedit-raw-explain": "Listeyê seyr kerdîşî ti de serogî cor de mucnayiyo u ti eşkeno pê dekerdiş u wedarnayîş liste bivurne.\nEka vurnayîşê ti qediyo, Listeyê Seyr Kerdişî Rocaniye Bike \"{{int:Watchlistedit-raw-submit}}\" klik bike.\nTi hem zi eşkeno [[Special:EditWatchlist|use the standard editor]].",
        "watchlistedit-raw-titles": "Seroğî:",
-       "watchlistedit-raw-submit": "Listeyê seyri newen ke",
+       "watchlistedit-raw-submit": "Lista seyrkerdışi newe ke",
        "watchlistedit-raw-done": "Listeyê tuyê seyrkerdişi rocaniye biyo",
        "watchlistedit-raw-added": "{{PLURAL:$1|1 seroğ|$1 seroğî}} de kerd:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|1 seroğ|$1 seroği}} besteriyaye:",
-       "watchlisttools-view": "vurnayışanê eleqadari bıvin",
-       "watchlisttools-edit": "Lista seyrkerdışi bıvênên u bıvurnên",
-       "watchlisttools-raw": "Listeyê seyr-kerdışi bıvin",
+       "watchlisttools-view": "Vurnayışanê elaqedaran bıvêne",
+       "watchlisttools-edit": "Lista seyrkerdışi bıvêne û bıvurne",
+       "watchlisttools-raw": "Lista seyrkerdışia xame bıvurne",
        "iranian-calendar-m1": "Farvardin",
        "iranian-calendar-m2": "Ordibeheşt",
        "iranian-calendar-m3": "Xordad",
index 28fd2ae..fa66e75 100644 (file)
        "right-move": "Move pages",
        "right-move-subpages": "Move pages with their subpages",
        "right-move-rootuserpages": "Move root user pages",
+       "right-move-categorypages": "Move category pages",
        "right-movefile": "Move files",
        "right-suppressredirect": "Not create redirects from source pages when moving pages",
        "right-upload": "Upload files",
        "action-move": "move this page",
        "action-move-subpages": "move this page, and its subpages",
        "action-move-rootuserpages": "move root user pages",
+       "action-move-categorypages": "move category pages",
        "action-movefile": "move this file",
        "action-upload": "upload this file",
        "action-reupload": "overwrite this existing file",
        "showhideselectedlogentries": "Change visibility of selected log entries",
        "allpages": "All pages",
        "allpages-summary": "",
-       "alphaindexline": "$1 to $2",
        "nextpage": "Next page ($1)",
        "prevpage": "Previous page ($1)",
        "allpagesfrom": "Display pages starting at:",
        "movepagetalktext": "The associated talk page will be automatically moved along with it <strong>unless:</strong>\n*A non-empty talk page already exists under the new name, or\n*You uncheck the box below.\n\nIn those cases, you will have to move or merge the page manually if desired.",
        "movearticle": "Move page:",
        "moveuserpage-warning": "<strong>Warning:</strong> You are about to move a user page. Please note that only the page will be moved and the user will <em>not</em> be renamed.",
+       "movecategorypage-warning": "<strong>Warning:</strong> You are about to move a category page. Please note that only the page will be moved and any pages in the old category will <em>not</em> be recategorized into the new one.",
        "movenologintext": "You must be a registered user and [[Special:UserLogin|logged in]] to move a page.",
        "movenotallowed": "You do not have permission to move pages.",
        "movenotallowedfile": "You do not have permission to move files.",
        "cant-move-user-page": "You do not have permission to move user pages (apart from subpages).",
        "cant-move-to-user-page": "You do not have permission to move a page to a user page (except to a user subpage).",
+       "cant-move-category-page": "You do not have permission to move category pages.",
+       "cant-move-to-category-page": "You do not have permission to move a page to a category page.",
        "newtitle": "To new title:",
        "move-watch": "Watch source page and target page",
        "movepagebtn": "Move page",
        "movenosubpage": "This page has no subpages.",
        "movereason": "Reason:",
        "move-redirect-text": "",
+       "category-move-redirect-override": "-",
        "revertmove": "revert",
        "delete_and_move": "Delete and move",
        "delete_and_move_text": "== Deletion required ==\nThe destination page \"[[:$1]]\" already exists.\nDo you want to delete it to make way for the move?",
        "variantname-shi-tfng": "shi-Tfng",
        "variantname-shi-latn": "shi-Latn",
        "variantname-shi": "shi",
+       "variantname-uz": "uz",
+       "variantname-uz-latn": "uz-Latn",
+       "variantname-uz-cyrl": "uz-Cyrl",
        "metadata": "Metadata",
        "metadata-help": "This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.\nIf the file has been modified from its original state, some details may not fully reflect the modified file.",
        "metadata-expand": "Show extended details",
        "watchlistedit-normal-submit": "Remove titles",
        "watchlistedit-normal-done": "{{PLURAL:$1|1 title was|$1 titles were}} removed from your watchlist:",
        "watchlistedit-raw-title": "Edit raw watchlist",
-       "watchlistedit-raw-legend": "Edit raw watchlist",
+        "watchlistedit-raw-legend": "Edit raw watchlist",
        "watchlistedit-raw-explain": "Titles on your watchlist are shown below, and can be edited by adding to and removing from the list;\none title per line.\nWhen finished, click \"{{int:Watchlistedit-raw-submit}}\".\nYou can also [[Special:EditWatchlist|use the standard editor]].",
-       "watchlistedit-raw-titles": "Titles:",
-       "watchlistedit-raw-submit": "Update watchlist",
-       "watchlistedit-raw-done": "Your watchlist has been updated.",
-       "watchlistedit-raw-added": "{{PLURAL:$1|1 title was|$1 titles were}} added:",
-       "watchlistedit-raw-removed": "{{PLURAL:$1|1 title was|$1 titles were}} removed:",
+        "watchlistedit-raw-titles": "Titles:",
+        "watchlistedit-raw-submit": "Update watchlist",
+        "watchlistedit-raw-done": "Your watchlist has been updated.",
+        "watchlistedit-raw-added": "{{PLURAL:$1|1 title was|$1 titles were}} added:",
+        "watchlistedit-raw-removed": "{{PLURAL:$1|1 title was|$1 titles were}} removed:",
+       "watchlistedit-clear-title": "Cleared watchlist",
+       "watchlistedit-clear-legend": "Clear watchlist",
+       "watchlistedit-clear-explain": "All of the titles will be removed from your watchlist",
+       "watchlistedit-clear-titles": "Titles:",
+       "watchlistedit-clear-submit": "Clear the watchlist (This is permanent!)",
+       "watchlistedit-clear-done": "Your watchlist has been cleared.",
+       "watchlistedit-clear-removed": "{{PLURAL:$1|1 title was|$1 titles were}} removed:",
+       "watchlistedit-too-many": "There are too many pages to display here.",
+       "watchlisttools-clear": "Clear the watchlist",
        "watchlisttools-view": "View relevant changes",
        "watchlisttools-edit": "View and edit watchlist",
        "watchlisttools-raw": "Edit raw watchlist",
index 60e2ead..26e8cc7 100644 (file)
        "tog-watchlisthideliu": "Ocultar las ediciones de los usuarios registrados en la lista de seguimiento",
        "tog-watchlisthideanons": "Ocultar las ediciones de los usuarios anónimos en la lista de seguimiento",
        "tog-watchlisthidepatrolled": "Ocultar las ediciones patrulladas en la lista de seguimiento",
-       "tog-ccmeonemails": "Recibir copias de los correos que envío a otros usuarios",
+       "tog-ccmeonemails": "Recibir copias de los mensajes que envíe a otros usuarios",
        "tog-diffonly": "No mostrar bajo las ''diferencias'' el contenido de la página",
        "tog-showhiddencats": "Mostrar las categorías escondidas",
        "tog-norollbackdiff": "Omitir la diferencia después de revertir",
        "nospecialpagetext": "<strong>Ha solicitado una página especial inexistente.</strong>\n\nPuedes ver una lista de las páginas especiales en [[Special:SpecialPages|{{int:specialpages}}]].",
        "error": "Error",
        "databaseerror": "Error de la base de datos",
-       "databaseerror-text": "Se ha producido un error en la base de datos.\nEsto puede indicar un bug en el software.",
+       "databaseerror-text": "Ocurrió un error de consulta de la base de datos.\nEsto puede indicar un fallo en el software.",
        "databaseerror-textcl": "Se ha producido un error en la base de datos.",
        "databaseerror-query": "Consulta: $1",
        "databaseerror-function": "Función: $1",
        "viewsourcetext": "Puedes ver y copiar el código fuente de esta página:",
        "viewyourtext": "Puedes ver y copiar el código de '''tus ediciones''' a esta página:",
        "protectedinterface": "Esta página proporciona el texto de la interfaz del software en este wiki, y está protegida para prevenir el abuso.\nPara agregar o cambiar las traducciones para todos los wikis, por favor, usa [//translatewiki.net/ translatewiki.net], el proyecto de localización de MediaWiki.",
-       "editinginterface": "'''Aviso:''' Estás editando una página usada para proporcionar el texto de la interfaz para el software. \nLos cambios en esta página afectarán a la apariencia de la interfaz para los demás usuarios de este wiki. \nPara añadir o cambiar las traducciones, por favor considera usar [//translatewiki.net/ translatewiki.net], el proyecto de localización de MediaWiki.",
+       "editinginterface": "<strong>Aviso:</strong> Estás editando una página usada para proporcionar el texto de la interfaz para el software. \nLos cambios en esta página afectarán la apariencia de la interfaz para los demás usuarios de este wiki. \nPara añadir o cambiar las traducciones utiliza [//translatewiki.net/ translatewiki.net], el proyecto de localización de MediaWiki.",
        "cascadeprotected": "Esta página ha sido protegida para su edición, porque está incluida en {{PLURAL:$1|la siguiente página|las siguientes páginas}}, que están protegidas con la opción de «cascada»:\n$2",
        "namespaceprotected": "No tienes permiso para editar las páginas del espacio de nombres '''$1'''.",
        "customcssprotected": "No tienes permiso para editar esta página CSS, porque contiene configuraciones personales de otro usuario.",
        "mycustomjsprotected": "No tienes permiso para editar esta página JavaScript.",
        "myprivateinfoprotected": "No tienes permiso para editar tu información privada.",
        "mypreferencesprotected": "No tienes permiso para editar tus preferencias.",
-       "ns-specialprotected": "Las páginas especiales no se pueden editar",
+       "ns-specialprotected": "No se pueden editar las páginas especiales.",
        "titleprotected": "Esta página ha sido protegida contra creación por [[User:$1|$1]].\nEl motivo dado fue: \"''$2''\".",
        "filereadonlyerror": "No se puede modificar el archivo \"$1\" porque el repositorio de archivos \"$2\" está en modo de sólo lectura.\nEl administrador que lo ha bloqueado ofrece esta explicación: \"$3\".",
        "invalidtitle-knownnamespace": "Título no válido con el espacio de nombres \"$2\" y el texto \"$3\"",
        "exception-nologin": "No has iniciado sesión",
        "exception-nologin-text": "[[Special:Userlogin|Inicia sesión]] para acceder a esta página o acción.",
        "exception-nologin-text-manual": "Necesitas $1 para acceder a esta página o acción.",
-       "virus-badscanner": "Error de configuración: Antivirus desconocido: ''$1''",
+       "virus-badscanner": "Configuración incorrecta: antivirus desconocido: <em>$1</em>",
        "virus-scanfailed": "falló el análisis (código $1)",
        "virus-unknownscanner": "antivirus desconocido:",
-       "logouttext": "\"'Usted está ahora desconectado.\"'\nTenga en cuenta que algunas páginas pueden continuar mostrándose como si todavía estuviera conectado, hasta que borres la caché de tu navegador.",
+       "logouttext": "<strong>Ha finalizado tu sesión.</strong>\n\nPuede que algunas páginas continúen mostrándose como si la sesión estuviera iniciada hasta que vacíes la memoria caché del navegador.",
        "welcomeuser": "¡Te damos la bienvenida, $1!",
        "welcomecreation-msg": "Se ha creado tu cuenta.\nNo olvides personalizar tus [[Special:Preferences|preferencias de {{SITENAME}}]].",
        "yourname": "Nombre de usuario:",
        "remembermypassword": "Mantenerme conectado en este navegador (hasta $1 {{PLURAL:$1|día|días}})",
        "userlogin-remembermypassword": "Mantener mi sesión iniciada",
        "userlogin-signwithsecure": "Usar conexión segura",
-       "yourdomainname": "Dominio",
+       "yourdomainname": "Tu dominio:",
        "password-change-forbidden": "No puedes cambiar las contraseñas de este wiki.",
        "externaldberror": "Hubo un error de autenticación externa de la base de datos o bien no tienes autorización para actualizar tu cuenta externa.",
        "login": "Acceder",
        "login-userblocked": "Este usuario está bloqueado. Inicio de sesión no permitido.",
        "wrongpassword": "La contraseña indicada es incorrecta.\nInténtalo de nuevo.",
        "wrongpasswordempty": "No has escrito una contraseña.\nInténtalo de nuevo.",
-       "passwordtooshort": "Las contraseñas deben tener al menos {{PLURAL:$1|1 caracter|$1 caracteres}}.",
+       "passwordtooshort": "Las contraseñas deben tener al menos {{PLURAL:$1|1 carácter|$1 caracteres}}.",
        "password-name-match": "Tu contraseña debe ser diferente de tu nombre de usuario.",
        "password-login-forbidden": "El uso de este nombre de usuario y contraseña han sido prohibidos.",
        "mailmypassword": "Restablecer la contraseña",
        "loginlanguagelabel": "Idioma: $1",
        "suspicious-userlogout": "Tu solicitud de desconexión ha sido denegada, pues parece haber sido enviada desde un navegador defectuoso o un proxy caché.",
        "createacct-another-realname-tip": "El nombre real es opcional.\nSi se proporciona, se usará para dar al usuario la atribución de su trabajo.",
-       "pt-login": "Iniciar sesión",
-       "pt-login-button": "Iniciar sesión",
+       "pt-login": "Acceder",
+       "pt-login-button": "Acceder",
        "pt-createaccount": "Crear una cuenta",
-       "pt-userlogout": "Cerrar sesión",
+       "pt-userlogout": "Salir",
        "php-mail-error-unknown": "Error desconocido en la función mail() de PHP.",
        "user-mail-no-addy": "Se ha intentado enviar correo electrónico sin una dirección de correo electrónico.",
        "user-mail-no-body": "Trató de enviar un correo electrónico con un cuerpo vacío o excesivamente corto.",
        "resetpass-submit-loggedin": "Cambiar contraseña",
        "resetpass-submit-cancel": "Cancelar",
        "resetpass-wrong-oldpass": "La contraseña antigua no es correcta.\nPuede que ya hayas cambiado la contraseña o que hayas pedido una temporal.",
-       "resetpass-recycled": "Por favor, restablece tu contraseña a algo distinto de tu contraseña actual.",
+       "resetpass-recycled": "Restablece tu contraseña a algo distinto de tu contraseña actual.",
        "resetpass-temp-emailed": "Has iniciado sesión con un código temporal por correo electrónico.\nPara terminar la sesión, debes establecer una nueva contraseña aquí:",
        "resetpass-temp-password": "Contraseña temporal:",
        "resetpass-abort-generic": "Una extensión ha cancelado el cambio de la contraseña.",
        "right-move": "Trasladar páginas",
        "right-move-subpages": "Trasladar páginas con sus subpáginas",
        "right-move-rootuserpages": "Trasladar páginas de usuario raíz",
+       "right-move-categorypages": "Trasladar páginas de categoría",
        "right-movefile": "Trasladar archivos",
        "right-suppressredirect": "No crear redirecciones de las páginas fuente  al trasladar páginas",
        "right-upload": "Subir archivos",
        "action-move": "trasladar esta página",
        "action-move-subpages": "trasladar esta página y sus subpáginas",
        "action-move-rootuserpages": "trasladar páginas de usuario raíz",
+       "action-move-categorypages": "trasladar páginas de categoría",
        "action-movefile": "trasladar este archivo",
        "action-upload": "subir este archivo",
        "action-reupload": "reemplazar este archivo existente",
        "trackingcategories-disabled": "La categoría está desactivada",
        "mailnologin": "Ninguna dirección de envio",
        "mailnologintext": "Debes [[Special:UserLogin|iniciar sesión]] y tener una dirección electrónica válida en tus [[Special:Preferences|preferencias]] para enviar un correo electrónico a otros usuarios.",
-       "emailuser": "Enviar un correo electrónico a {{GENDER:{{BASEPAGENAME}}|este usuario|esta usuaria}}",
-       "emailuser-title-target": "Enviar un correo electrónico a {{GENDER:$1|este usuario|esta usuaria}}",
+       "emailuser": "Enviar un mensaje de correo a {{GENDER:{{BASEPAGENAME}}|este usuario|esta usuaria}}",
+       "emailuser-title-target": "Enviar un mensaje a {{GENDER:$1|este usuario|esta usuaria}}",
        "emailuser-title-notarget": "Enviar un correo electrónico al usuario",
-       "emailpage": "Enviar un correo electrónico a un usuario",
+       "emailpage": "Enviar mensaje al usuario",
        "emailpagetext": "Puedes usar el formulario de abajo para enviar un correo electrónico a {{GENDER:$1|este usuario|esta usuaria}}.\nLa dirección de correo electrónico que indicaste en [[Special:Preferences|tus preferencias de usuario]] aparecerá en el campo \"Remitente\" o \"De\" para que el destinatario pueda responderte.",
        "defemailsubject": "Correo electrónico enviado por el usuario «$1» desde {{SITENAME}}",
        "usermaildisabled": "Correo electrónico del usuario deshabilitado",
        "specialpages-note": "* Páginas especiales normales\n* <span class=\"mw-specialpagerestricted\">Páginas especiales restringidas.</span>\n* <span class=\"mw-specialpagecached\">Páginas especiales en caché (podrían ser obsoletas).</span>",
        "specialpages-group-maintenance": "Reportes de mantenimiento",
        "specialpages-group-other": "Otras páginas especiales",
-       "specialpages-group-login": "Iniciar sesión / Crear cuenta",
+       "specialpages-group-login": "Acceder/crear cuenta",
        "specialpages-group-changes": "Cambios recientes y registros",
        "specialpages-group-media": "Páginas sobre archivos",
        "specialpages-group-users": "Usuarios y permisos",
index 577e89a..154799f 100644 (file)
        "searchbutton": "Bilatu",
        "go": "Joan",
        "searcharticle": "Joan",
-       "history": "Orrialdearen historia",
+       "history": "Orriaren historia",
        "history_short": "Historia",
        "updatedmarker": "nire azkeneko bisitaz geroztik eguneratuta",
        "printableversion": "Inprimatzeko bertsioa",
        "pagemerge-logentry": "[[$1]] [[$2]](r)ekin batu da ($3(e)raino berrikuspenak)",
        "revertmerge": "Bereiztu",
        "mergelogpagetext": "Jarraian dagoen zerrendak orrialde baten historiatik beste batera egindako azken bateratzeak erakusten ditu.",
-       "history-title": "«$1» orrialdearen historia berrikuspena",
+       "history-title": "«$1» orriaren historia berrikuspena",
        "difference-title": "«$1»: berrikuspenen arteko aldeak",
        "difference-title-multipage": "«$1» eta «$2» orrien arteko aldeak",
        "difference-multipage": "(Orrien arteko aldeak)",
index dc04621..500e9f6 100644 (file)
        "edit": "Muokkaa",
        "edit-local": "Muokkaa paikallista kuvausta",
        "create": "Luo sivu",
-       "create-local": "Lisää paikallinen kuvaus",
+       "create-local": "Luo paikallinen kuvaus",
        "editthispage": "Muokkaa tätä sivua",
        "create-this-page": "Luo tämä sivu",
        "delete": "Poista",
        "hiddencategories": "Tämä sivu kuuluu {{PLURAL:$1|seuraavaan piilotettuun luokkaan|seuraaviin piilotettuihin luokkiin}}:",
        "edittools": "<!-- Tässä oleva teksti näytetään muokkauskentän alla. -->",
        "nocreatetext": "Et voi luoda uusia sivuja. Voit muokata olemassa olevia sivuja tai [[Special:UserLogin|luoda käyttäjätunnuksen]].",
-       "nocreate-loggedin": "Sinulla ei ole oikeuksia luoda uusia sivuja.",
+       "nocreate-loggedin": "Sinulla ei ole oikeutta luoda uusia sivuja.",
        "sectioneditnotsupported-title": "Osioiden muokkaamista ei tueta.",
        "sectioneditnotsupported-text": "Osioiden muokkaamista ei tueta tällä sivulla.",
        "permissionserrors": "Puutteelliset oikeudet",
        "right-move": "Siirtää sivuja",
        "right-move-subpages": "Siirtää sivuja alasivuineen",
        "right-move-rootuserpages": "Siirtää käyttäjäsivuja",
+       "right-move-categorypages": "Siirtää luokkasivuja",
        "right-movefile": "Siirtää tiedostoja",
        "right-suppressredirect": "Siirtää sivuja luomatta automaattisia ohjauksia",
        "right-upload": "Tallentaa tiedostoja",
-       "right-reupload": "Korvata olemassa olevia tiedostoja uudella",
+       "right-reupload": "Tallentaa olemassa olevien tiedostojen tilalle uusia",
        "right-reupload-own": "Korvata itsetallennettu tiedosto uudella tiedostolla",
-       "right-reupload-shared": "Korvata jaettuun mediavarastoon tallennettuja tiedostoja paikallisesti",
+       "right-reupload-shared": "Korvata yhteiseen mediavarastoon tallennettuja tiedostoja paikallisesti",
        "right-upload_by_url": "Tallentaa tiedostoja verkko-osoitteella",
        "right-purge": "Tyhjentää sivuston välimuisti ilman varmennussivua",
        "right-autoconfirmed": "IP-pohjaiset nopeusrajoitukset eivät ole voimassa",
        "action-move": "siirtää tätä sivua",
        "action-move-subpages": "siirtää tätä sivua eikä sen alasivuja",
        "action-move-rootuserpages": "siirtää käyttäjäsivuja",
+       "action-move-categorypages": "siirtää luokkasivuja",
        "action-movefile": "siirtää tätä tiedostoa",
        "action-upload": "tallentaa tätä tiedostoa",
-       "action-reupload": "korvata tätä olemassa olevaa tiedostoa",
-       "action-reupload-shared": "korvata tätä jaetun mediavaraston tiedostoa",
+       "action-reupload": "tallentaa tämän tiedoston tilalle uutta",
+       "action-reupload-shared": "korvata tätä yhteisen mediavaraston tiedostoa",
        "action-upload_by_url": "tallentaa tätä tiedostoa URL-osoitteesta",
        "action-writeapi": "käyttää kirjoitus-APIa",
        "action-delete": "poistaa tätä sivua",
        "fileexists-extension": "Tiedosto, jolla on samankaltainen nimi, on jo olemassa: [[$2|thumb]]\n* Tallennetun tiedoston nimi: <strong>[[:$1]]</strong>\n* Olemassa olevan tiedoston nimi: <strong>[[:$2]]</strong>\nValitse toinen tiedostonimi.",
        "fileexists-thumbnail-yes": "Tiedosto näyttäisi olevan pienennetty kuva ''(pienoiskuva)''. [[$1|thumb]]\nTarkista tiedosto <strong>[[:$1]]</strong>.\nJos yllä oleva tiedosto on alkuperäisversio samasta kuvasta, ei sille tarvitse tallentaa pienoiskuvaa.",
        "file-thumbnail-no": "Tiedostonimi alkaa merkkijonolla <strong>$1</strong>. Tiedosto näyttäisi olevan pienennetty kuva.\nJos sinulla on tämän kuvan alkuperäinen versio, tallenna se. Muussa tapauksessa nimeä tiedosto uudelleen.",
-       "fileexists-forbidden": "Samanniminen tiedosto on jo olemassa, eikä sitä voi korvata. Tallenna tiedosto jollakin toisella nimellä. Nykyinen tiedosto: [[File:$1|thumb|center|$1]]",
+       "fileexists-forbidden": "Samanniminen tiedosto on jo olemassa, eikä sen tilalle voi tallentaa uutta. \nJos kuitenkin haluat tallentaa tiedostosi, palaa takaisin ja käytä jotain toista nimeä. \n[[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Samanniminen tiedosto on jo olemassa jaetussa mediavarastossa. Tallenna tiedosto jollakin toisella nimellä. [[File:$1|thumb|center|$1]]",
        "file-exists-duplicate": "Tämä tiedosto on kaksoiskappale {{PLURAL:$1|seuraavasta tiedostosta|seuraavista tiedostoista}}:",
        "file-deleted-duplicate": "Tiedosto, joka on identtinen tämän tiedoston kanssa ([[:$1]]) on aiemmin poistettu. Katso kyseisen tiedoston poistoloki ennen kuin jatkat uudelleentallentamista.",
        "filedelete-maintenance-title": "Tiedostoa ei voi poistaa",
        "mimesearch": "MIME-haku",
        "mimesearch-summary": "Tällä sivulla voit etsiä tiedostoja niiden MIME-tyypin perusteella.\nSyöte: sisältötyyppi/alatyyppi, esimerkiksi <code>image/jpeg</code>.",
-       "mimetype": "MIME-tyyppi",
+       "mimetype": "MIME-tyyppi:",
        "download": "lataa",
        "unwatchedpages": "Tarkkailemattomat sivut",
        "listredirects": "Ohjaukset",
        "protect-text": "Voit tarkastella ja muuttaa sivun '''$1''' suojaustasoa.",
        "protect-locked-blocked": "Et voi muuttaa sivun suojauksia, koska sinut on estetty. Alla on sivun ”'''$1'''” nykyiset suojaukset:",
        "protect-locked-dblock": "Sivun suojauksia ei voi muuttaa, koska tietokanta on lukittu. Alla on sivun ”'''$1'''” nykyiset suojaukset:",
-       "protect-locked-access": "Sinulla ei ole tarvittavia oikeuksia sivujen suojauksen muuttamiseen. Alla on sivun ”'''$1'''” nykyiset suojaukset:",
+       "protect-locked-access": "Sinun käyttäjätunnuksellasi ei ole oikeutta muuttaa sivujen suojauksia. \nTässä ovat nykyiset suojausasetukset sivulla <strong>$1</strong>:",
        "protect-cascadeon": "Tämä sivu on suojauksen kohteena, koska se on sisällytetty alla {{PLURAL:$1|olevaan suojattuun sivuun, jossa|oleviin suojattuihin sivuihin, joissa}} on kytketty tarttuva suojaus päälle.\n\nTämän sivun suojaustasoon tehdyillä muutoksilla ei ole vaikutusta sivuun muualta tarttuneeseen suojaukseen.",
        "protect-default": "Salli kaikki käyttäjät",
        "protect-fallback": "Salli vain käyttäjät, joilla on oikeus $1",
        "movepagetalktext": "Sivuun mahdollisesti liittyvä keskustelusivu siirtyy automaattisesti mukana, '''paitsi:'''\n*jos siirron kohdesivulla on olemassa keskustelusivu, joka ei ole tyhjä, tai\n*jos otat pois rastin alla olevasta ruudusta.\n\nNäissä tapauksissa sivu täytyy siirtää tai yhdistää käsin, jos se on tarpeen.",
        "movearticle": "Siirrettävä sivu:",
        "moveuserpage-warning": "'''Varoitus:''' Olet siirtämässä käyttäjäsivua. Huomaa, että vain sivu siirretään ja käyttäjää ''ei'' nimetä uudelleen.",
+       "movecategorypage-warning": "<strong>Varoitus:</strong> Olet siirtämässä luokkasivua. Ota huomioon, että ainoastaan luokan sivu siirretään ja tämä toiminto <em>ei</em> luokittele vanhassa luokassa olevia sivuja uuteen luokkaan.",
        "movenologintext": "Sinun pitää olla rekisteröitynyt käyttäjä ja [[Special:UserLogin|kirjautua sisään]], jotta voisit siirtää sivun.",
        "movenotallowed": "Sinulla ei ole oikeutta siirtää sivuja.",
        "movenotallowedfile": "Sinulla ei ole oikeutta siirtää tiedostoja.",
        "cant-move-user-page": "Sinulla ei ole oikeutta siirtää käyttäjäsivuja (lukuun ottamatta alasivuja).",
        "cant-move-to-user-page": "Sinulla ei ole oikeutta siirtää sivua käyttäjäsivuksi (paitsi käyttäjän alasivuksi).",
+       "cant-move-category-page": "Sinulla ei ole oikeutta siirtää luokkien sivuja.",
+       "cant-move-to-category-page": "Sinulla ei ole oikeutta siirtää sivua luokkasivuksi.",
        "newtitle": "Uusi nimi sivulle:",
        "move-watch": "Tarkkaile tätä sivua",
        "movepagebtn": "Siirrä sivu",
        "newimages": "Uudet tiedostot",
        "imagelisttext": "Alla on {{PLURAL:$1|1 tiedosto|$1 tiedostoa}} lajiteltuna <strong>$2</strong>.",
        "newimages-summary": "Tällä toimintosivulla on viimeisimmät tallennetut tiedostot.",
-       "newimages-legend": "Suodin",
+       "newimages-legend": "Suodatin",
        "newimages-label": "Tiedostonimi (tai osa siitä)",
        "newimages-showbots": "Näytä bottien tekemät tallennukset",
        "noimages": "Ei uusia tiedostoja.",
        "watchlistedit-raw-done": "Tarkkailulistasi on päivitetty.",
        "watchlistedit-raw-added": "{{PLURAL:$1|Yksi sivu|$1 sivua}} lisättiin:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|Yksi sivu|$1 sivua}} poistettiin:",
+       "watchlistedit-clear-title": "Tyhjä tarkkailulista",
+       "watchlistedit-clear-legend": "Tyhjennä tarkkailulista",
+       "watchlistedit-clear-explain": "Kaikki sivut poistetaan tarkkailulistaltasi",
+       "watchlistedit-clear-titles": "Sivujen nimet:",
+       "watchlistedit-clear-submit": "Tyhjennä tarkkailulista (pysyvästi ja peruuttamattomasti!)",
+       "watchlistedit-clear-done": "Tarkkailulistasi on tyhjennetty.",
+       "watchlistedit-clear-removed": "{{PLURAL:$1|Yksi sivu|$1 sivua}} on poistettu:",
+       "watchlistedit-too-many": "Luettelossa on liikaa sivuja näytettäväksi tässä.",
+       "watchlisttools-clear": "Tyhjennä tarkkailulista",
        "watchlisttools-view": "Näytä tarkkaillut muutokset",
        "watchlisttools-edit": "Katso ja muokkaa tarkkailulistaa",
        "watchlisttools-raw": "Muokkaa listaa raakamuodossa",
index f798e1d..767f063 100644 (file)
        "right-move": "Renommer des pages",
        "right-move-subpages": "Renommer des pages avec leurs sous-pages",
        "right-move-rootuserpages": "Renommer la page principale d'un utilisateur",
+       "right-move-categorypages": "Renommer des pages de catégorie",
        "right-movefile": "Renommer des fichiers",
        "right-suppressredirect": "Ne pas créer de redirection depuis le titre d'origine en renommant une page",
        "right-upload": "Importer des fichiers",
        "action-move": "renommer cette page",
        "action-move-subpages": "renommer cette page et ses sous-pages",
        "action-move-rootuserpages": "renommer la page principale d'un utilisateur",
+       "action-move-categorypages": "renommer des pages de catégorie",
        "action-movefile": "renommer ce fichier",
        "action-upload": "importer ce fichier",
        "action-reupload": "écraser ce fichier existant",
        "movepagetalktext": "La page de discussion associée, si présente, sera automatiquement renommée '''sauf si :'''\n* vous déplacez la page vers un autre espace de noms, ou\n* une page de discussion non vide existe déjà sous le nouveau nom, ou\n* vous décochez la case ci-dessous.\n\nDans ces cas-là, vous devrez renommer ou fusionner cette page de discussion manuellement si vous le désirez.",
        "movearticle": "Renommer la page :",
        "moveuserpage-warning": "'''Attention :''' Vous êtes sur le point de renommer une page d’utilisateur. Veuillez noter que seule la page sera renommée et que l’utilisateur '''ne''' sera '''pas''' renommé.",
+       "movecategorypage-warning": "<strong>Avertissement :</strong> Vous êtes sur le point de renommer une page de catégorie. Veuillez noter que seul la page sera renommée et que toutes les pages dans l'ancienne catégorie ne seront <em>pas</em> transférées dans la nouvelle.",
        "movenologintext": "Pour pouvoir renommer une page, vous devez être [[Special:UserLogin|identifié{{GENDER:||e|(e)}}]] avec un compte utilisateur enregistré et d'ancienneté suffisante.",
        "movenotallowed": "Vous n'avez pas la permission de renommer les pages.",
        "movenotallowedfile": "Vous n'avez pas la permission de renommer les fichiers.",
        "cant-move-user-page": "Vous n’avez pas la permission de renommer les pages principales d’utilisateurs.",
        "cant-move-to-user-page": "Vous n’avez pas la permission de renommer une page vers une page utilisateur (à l’exception d’une sous-page).",
+       "cant-move-category-page": "Vous n'avez pas la permis de renommer les pages de catégorie.",
+       "cant-move-to-category-page": "Vous n'avez pas la permission de renommer une page vers une page de catégorie.",
        "newtitle": "Vers le nouveau titre :",
        "move-watch": "Suivre les pages originale et nouvelle",
        "movepagebtn": "Renommer la page",
        "newimages-summary": "Cette page spéciale affiche les derniers fichiers importés.",
        "newimages-legend": "Nom du fichier",
        "newimages-label": "Nom du fichier (ou une partie de celui-ci) :",
+       "newimages-showbots": "Afficher les imports par des robots",
        "noimages": "Aucune image à afficher.",
        "ilsubmit": "Rechercher",
        "bydate": "par date",
        "watchlistedit-raw-done": "Votre liste de suivi a été mise à jour.",
        "watchlistedit-raw-added": "{{PLURAL:$1|Un titre a été ajouté|$1 titres ont été ajoutés}} :",
        "watchlistedit-raw-removed": "{{PLURAL:$1|Un titre a été retiré|$1 titres ont été retirés}} :",
+       "watchlistedit-clear-title": "Liste de suivi vidée",
+       "watchlistedit-clear-legend": "Effacer la liste de suivi",
+       "watchlistedit-clear-explain": "Tous les titres seront supprimés de votre liste de suivi",
+       "watchlistedit-clear-titles": "Titres :",
+       "watchlistedit-clear-submit": "Effacer la liste de suivi (ceci est permanent !)",
+       "watchlistedit-clear-done": "Votre liste de suivi a été effacée.",
+       "watchlistedit-clear-removed": "{{PLURAL:$1|Un titre a été|$1 titres ont été}} retirés :",
+       "watchlistedit-too-many": "Il y a trop de pages à afficher ici.",
+       "watchlisttools-clear": "Effacer la liste de suivi",
        "watchlisttools-view": "Liste de suivi",
        "watchlisttools-edit": "Voir et modifier la liste de suivi",
        "watchlisttools-raw": "Modifier la liste de suivi en mode brut",
index 6842c20..1869bae 100644 (file)
        "right-move": "העברת דפים",
        "right-move-subpages": "העברת דפים עם דפי המשנה שלהם",
        "right-move-rootuserpages": "העברת דפי משתמש שאינם דפי משנה",
+       "right-move-categorypages": "העברת דפי קטגוריה",
        "right-movefile": "העברת קבצים",
        "right-suppressredirect": "הימנעות מיצירת הפניות מדפי המקור בעת העברת דפים",
        "right-upload": "העלאת קבצים",
        "action-move": "להעביר דף זה",
        "action-move-subpages": "להעביר דף זה יחד עם דפי המשנה שלו",
        "action-move-rootuserpages": "להעביר דפי משתמש שאינם דפי משנה",
+       "action-move-categorypages": "להעביר דפי קטגוריה",
        "action-movefile": "להעביר קובץ זה",
        "action-upload": "להעלות קובץ זה",
        "action-reupload": "לדרוס את הקובץ הקיים הזה",
        "movepagetalktext": "דף השיחה של דף זה יועבר אוטומטית, אלא אם:\n* קיים דף שיחה שאינו ריק תחת השם החדש אליו מועבר הדף, או\n* הסרתם את הסימון בתיבה שלהלן.\n\nבמקרים אלו, תצטרכו להעביר או לשלב את הדפים באופן ידני, אם תרצו.",
        "movearticle": "העברת דף:",
        "moveuserpage-warning": "'''אזהרה:''' אתם עומדים להעביר דף משתמש. שימו לב שרק הדף יועבר וששם המשתמש '''לא''' ישתנה.",
+       "movecategorypage-warning": "<strong>אזהרה:</strong> אתם עומדים להעביר דף קטגוריה. שימו לב שרק הדף יועבר ושכל הדפים בקטגוריה הישנה <strong>לא</strong> יסווגו לקטגוריה החדשה.",
        "movenologintext": "עליכם [[Special:UserLogin|להיכנס לחשבון]] כדי להעביר דפים.",
        "movenotallowed": "אינכם מורשים להעביר דפים.",
        "movenotallowedfile": "אינכם מורשים להעביר קבצים.",
        "cant-move-user-page": "אינכם מורשים להעביר דפי משתמש (למעט דפי משנה).",
        "cant-move-to-user-page": "אינכם מורשים להעביר דף לדף משתמש (למעט לדף משנה של דף משתמש).",
+       "cant-move-category-page": "אינכם מורשים להעביר דפי קטגוריה.",
+       "cant-move-to-category-page": "אינכם מורשים להעביר דף לדף קטגוריה.",
        "newtitle": "לשם החדש:",
        "move-watch": "מעקב אחר דף המקור ואחר דף היעד",
        "movepagebtn": "העברה",
        "watchlistedit-raw-done": "רשימת המעקב עודכנה.",
        "watchlistedit-raw-added": "{{PLURAL:$1|כותרת אחת נוספה|$1 כותרות נוספו}}:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|כותרת אחת הוסרה|$1 כותרות הוסרו}}:",
+       "watchlistedit-clear-title": "רשימת המעקב נמחקה",
+       "watchlistedit-clear-legend": "מחיקת רשימת המעקב",
+       "watchlistedit-clear-explain": "כל הכותרות של הדפים שיוסרו מרשימת המעקב",
+       "watchlistedit-clear-titles": "כותרות:",
+       "watchlistedit-clear-submit": "מחיקת רשימת המעקב (לצמיתות!)",
+       "watchlistedit-clear-done": "רשימת המעקב שלך נמחקה.",
+       "watchlistedit-clear-removed": "{{PLURAL:$1|כותרת אחת הוסרה|$1 כותרות הוסרו}}:",
+       "watchlistedit-too-many": "יש יותר מדי דפים ולא ניתן להציגם כאן.",
+       "watchlisttools-clear": "מחיקת רשימת המעקב",
        "watchlisttools-view": "הצגת השינויים הרלוונטיים",
        "watchlisttools-edit": "הצגה ועריכה של רשימת המעקב",
        "watchlisttools-raw": "עריכת הרשימה הגולמית",
index 81a3c5b..226cf38 100644 (file)
        "gotaccountlink": "Bejelentkezés",
        "userlogin-resetlink": "Elfelejtetted a bejelentkezési adataidat?",
        "userlogin-resetpassword-link": "Elfelejtetted a jelszavad?",
+       "userlogin-helplink2": "Segítség a bejelentkezéshez",
        "userlogin-loggedin": "Már be vagy jelentkezve mint {{GENDER:$1|$1}}. Ha más néven akarsz belépni, alább megteheted.",
        "userlogin-createanother": "Felhasználói fiók létrehozása",
        "createacct-emailrequired": "E-mail cím",
        "resetpass-abort-generic": "A jelszómódosítást megszakította egy kiterjesztés.",
        "resetpass-expired": "A jelszavad lejárt. Adjál meg egy új jelszót a bejelentkezéshez!",
        "resetpass-expired-soft": "A jelszavad lejárt, ezért újat kell beállítanod. Válassz most egy új jelszót, vagy kattints a {{int:resetpass-submit-cancel}} gombra, ha később akarod csak beállítani.",
+       "resetpass-validity-soft": "Adj meg egy új jelszót most, vagy kattints a \"{{int:resetpass-submit-cancel}}\" gombra, ha később akarod megadni.",
        "passwordreset": "Jelszó törlése",
        "passwordreset-text-one": "A jelszavad alaphelyzetbe állításához töltsd ki az űrlapot.",
        "passwordreset-text-many": "{{PLURAL:$1|Az átmeneti jelszó elküldéséhez töltsd ki az alábbi mezők egyikét.}}",
        "search-section": "($1 szakasz)",
        "search-suggest": "Keresési javaslat: $1",
        "search-interwiki-caption": "Társlapok",
-       "search-interwiki-default": "$1 találat",
+       "search-interwiki-default": "$1 találatok:",
        "search-interwiki-more": "(több)",
        "search-relatedarticle": "Kapcsolódó",
        "searcheverything-enable": "Keresés az összes névtérben",
index 56297c7..148a531 100644 (file)
        "movenotallowedfile": "Non si dispone dei permessi necessari per spostare i file.",
        "cant-move-user-page": "Non si dispone dei permessi necessari per spostare le pagine utente (escluse le sottopagine).",
        "cant-move-to-user-page": "Non si dispone dei permessi necessari per spostare la pagina su una pagina utente (escluse le sottopagine utente).",
+       "cant-move-category-page": "Non si dispone dei permessi necessari per spostare categorie.",
        "newtitle": "Nuovo titolo:",
        "move-watch": "Aggiungi la pagina agli osservati speciali",
        "movepagebtn": "Sposta la pagina",
        "newimages-summary": "Questa pagina speciale mostra i file caricati più di recente.",
        "newimages-legend": "Filtra",
        "newimages-label": "Nome file (o una parte di esso):",
+       "newimages-showbots": "Mostra caricamenti di bot",
        "noimages": "Non c'è nulla da vedere.",
        "ilsubmit": "Ricerca",
        "bydate": "per data",
        "compare-submit": "Confronta",
        "compare-invalid-title": "Il titolo che hai specificato non è valido.",
        "compare-title-not-exists": "Il titolo che hai specificato non esiste.",
-       "compare-revision-not-exists": "La revisione che hai specificato non esiste.",
+       "compare-revision-not-exists": "La versione che hai specificato non esiste.",
        "dberr-problems": "Questo sito sta avendo dei problemi tecnici.",
        "dberr-again": "Prova ad attendere qualche minuto e ricaricare.",
        "dberr-info": "(Impossibile contattare il server del database: $1)",
index 4572762..a4ab9ef 100644 (file)
        "right-move": "ページを移動",
        "right-move-subpages": "下位ページを含めてページを移動",
        "right-move-rootuserpages": "利用者ページ本体を移動",
+       "right-move-categorypages": "カテゴリのページを移動",
        "right-movefile": "ファイルを移動",
        "right-suppressredirect": "転送ページを作成せずにページを移動",
        "right-upload": "ファイルをアップロード",
        "action-move": "このページの移動",
        "action-move-subpages": "このページとその下位ページの移動",
        "action-move-rootuserpages": "利用者ページ本体の移動",
+       "action-move-categorypages": "カテゴリのページの移動",
        "action-movefile": "このファイルの移動",
        "action-upload": "このファイルのアップロード",
        "action-reupload": "この既存のファイルへの上書き",
        "movepagetalktext": "関連付けられたトークページも一緒に、自動的に移動されます。ただし、<strong>以下の場合を除きます:</strong>\n* 移動先に、空ではないトークページが既に存在する場合\n* 下のボックスのチェックを消した場合\n\nこれらの場合、必要に応じて、トークページを移動または統合する必要があります。",
        "movearticle": "移動するページ:",
        "moveuserpage-warning": "<strong>警告:</strong> 利用者ページを移動しようとしています。この操作ではページのみが移動され、利用者名は<em>変更されない</em>点に注意してください。",
+       "movecategorypage-warning": "<strong>警告:</strong> カテゴリのページを移動させようとしています。カテゴリのページのみが移動するため、元のカテゴリに属していたどのページも新しいカテゴリには移動 <em>しない</em> ことにご注意ください。",
        "movenologintext": "ページを移動するためには、登録利用者でありかつ、[[Special:UserLogin|ログイン]]している必要があります。",
        "movenotallowed": "ページを移動する権限がありません。",
        "movenotallowedfile": "ファイルを移動する権限がありません。",
        "cant-move-user-page": "利用者ページを移動させる権限がありません (下位ページ内を除く)。",
        "cant-move-to-user-page": "利用者下位ページ以外の利用者ページに、ページを移動させる権限がありません。",
+       "cant-move-category-page": "カテゴリのページを移動させる権限がありません。",
+       "cant-move-to-category-page": "ページをカテゴリのページに移動させる権限がありません。",
        "newtitle": "新しいページ名:",
        "move-watch": "移動元と移動先ページをウォッチ",
        "movepagebtn": "ページを移動",
        "watchlistedit-raw-done": "ウォッチリストを更新しました。",
        "watchlistedit-raw-added": "{{PLURAL:$1|$1 ページ}}を追加しました:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|$1 ページ}}を除去しました:",
+       "watchlistedit-clear-explain": "ウォッチリストに追加されたページ名がすべて除去されます",
+       "watchlistedit-clear-titles": "ページ名:",
+       "watchlistedit-clear-removed": "{{PLURAL:$1|$1 件のページ}}を除去しました:",
+       "watchlistedit-too-many": "ページ数が多すぎるため表示できません。",
        "watchlisttools-view": "関連する変更を閲覧",
        "watchlisttools-edit": "ウォッチリストの閲覧と編集",
        "watchlisttools-raw": "ウォッチリストをテキストで編集",
index ff89ccf..538f4d5 100644 (file)
        "blocklog-showsuppresslog": "Бұл қатысушы ұдайы жасырылып және бұғатталып отырған.\nДерек үшін төменде жасыру журналы берілген:",
        "blocklogentry": "[[$1]] дегенді $2 мерзімге бұғаттады $3",
        "blocklogtext": "Бұл қатысушыларды бұғаттау және бұғаттауынан босату әрекеттерінің журналы.\nӨздіктік бұғатталған IP мекенжайлар тізімделмеген.\nҚазіргі уақыттағы белсенді тиымдар мен бұғаттауларды [[Special:BlockList|бұғаттау тізімінен]] қараңыз.",
-       "unblocklogentry": "$1 бұғаттауынан босатты",
+       "unblocklogentry": "$1 ÐµÑ\81Ñ\96мдÑ\96 Ò\9bаÑ\82Ñ\8bÑ\81Ñ\83Ñ\88Ñ\8bнÑ\8b Ð±Ò±Ò\93аÑ\82Ñ\82аÑ\83Ñ\8bнан Ð±Ð¾Ñ\81аÑ\82Ñ\82Ñ\8b",
        "block-log-flags-anononly": "тек аноним қатысушылар",
        "block-log-flags-nocreate": "тіркелу өшірілген",
        "block-log-flags-noautoblock": "автобұғаттау өшірілген",
        "pageinfo-length": "Бет ұзындығы (байтпен)",
        "pageinfo-article-id": "Бет ID-і",
        "pageinfo-language": "Бет мәлімет тілі",
-       "pageinfo-content-model": "Бет мағұлымат қалпы",
+       "pageinfo-content-model": "Бет мағлұмат қалпы",
        "pageinfo-robot-policy": "Индекстеуді робот жүргізеді",
        "pageinfo-robot-index": "Рұқсат берілген",
        "pageinfo-robot-noindex": "Рұқсат етілмеген",
        "logentry-delete-event": "$1 $3 бетіндегі {{PLURAL:$5|журнал оқиғасы|$5 журнал оқиғасы}} көрінісін {{GENDER:$2|өзгертті}}: $4",
        "logentry-delete-revision": "$1 $3 бетіндегі {{PLURAL:$5|нұсқа|$5 нұсқа}} көрінісін {{GENDER:$2|өзгертті}}: $4",
        "logentry-suppress-event": "$1 $3 бетіндегі {{PLURAL:$5|журнал оқиғасы|$5 журнал оқиғасы}} көрінісін құпия түрде {{GENDER:$2|өзгертті}}: $4",
-       "revdelete-content-hid": "мағұлымат жасырылған",
+       "revdelete-content-hid": "мағлұмат жасырылған",
        "revdelete-summary-hid": "өңдеу түйіндемесі жасырылған",
        "revdelete-uname-hid": "қатысушы есімі жасырылған",
        "revdelete-content-unhid": "мағлұматы жасырылмаған",
index e93a97c..25294bd 100644 (file)
        "username": "{{GENDER:$1|사용자 이름}}:",
        "uid": "{{GENDER:$1|사용자}} ID:",
        "prefs-memberingroups": "{{GENDER:$2|소속}} {{PLURAL:$1|그룹}}:",
-       "prefs-registration": "ë\93±ë¡\9d ì\9d¼ì\8b\9c:",
+       "prefs-registration": "ë\93±ë¡\9d ì\8b\9cê°\84:",
        "yourrealname": "실명:",
        "yourlanguage": "언어:",
        "yourvariant": "언어 변종:",
        "right-move": "문서 옮기기",
        "right-move-subpages": "문서와 하위 문서 옮기기",
        "right-move-rootuserpages": "최상위 사용자 문서 옮기기",
+       "right-move-categorypages": "분류 문서 옮기기",
        "right-movefile": "파일 옮기기",
        "right-suppressredirect": "문서을 옮길 때 원래 문서 이름으로 된 넘겨주기를 만들지 않기",
        "right-upload": "파일 올리기",
        "action-move": "이 문서 옮기기",
        "action-move-subpages": "이 문서와 하위 문서를 함께 옮기기",
        "action-move-rootuserpages": "최상위 사용자 문서를 이동할",
+       "action-move-categorypages": "분류 문서 옮기기",
        "action-movefile": "이 파일을 옮기기",
        "action-upload": "이 파일을 올리기",
        "action-reupload": "이미 존재하는 파일 덮어쓰기",
        "empty-file": "올린 파일이 비어 있습니다.",
        "file-too-large": "올리려는 파일이 너무 큽니다.",
        "filename-tooshort": "파일 이름이 너무 짧습니다.",
-       "filetype-banned": "이러한 종류의 파일은 금지되어 있습니다.",
+       "filetype-banned": "이 파일의 형식은 금지되어 있습니다.",
        "verification-error": "이 파일은 파일 확인 절차를 통과하지 않았습니다.",
        "hookaborted": "수정하려고 한 것이 확장 기능 훅에 의해 중지되었습니다.",
        "illegal-filename": "이 파일 이름은 허용되지 않습니다.",
        "movepagetalktext": "딸린 토론 문서도 자동으로 이동합니다. 하지만 다음의 경우는 '''이동하지 않습니다''':\n* 이동할 이름으로 된 문서가 이미 있는 경우\n* 아래의 선택을 해제하는 경우\n\n이 경우에는 문서를 직접 이동하거나 두 문서를 합쳐야 합니다.",
        "movearticle": "문서 옮기기:",
        "moveuserpage-warning": "'''경고:''' 사용자 문서를 옮기려 하고 있습니다. 사용자 문서만 이동되며 사용자 이름이 바뀌지 '''않는다'''는 점을 참고하세요.",
+       "movecategorypage-warning": "<strong>경고:</strong> 분류 문서를 옮기려고 합니다. 해당 문서만 옮겨지고 옛 분류에 있는 문서는 새 분류 안에 다시 분류되지 <em>않음</em>을 참고하세요.",
        "movenologintext": "문서를 이동하려면 [[Special:UserLogin|로그인]]해야 합니다.",
        "movenotallowed": "문서를 옮길 권한이 없습니다.",
        "movenotallowedfile": "파일을 옮길 권한이 없습니다.",
-       "cant-move-user-page": "사용자 문서를 옮길 권한이 없습니다(하위 문서는 예외).",
-       "cant-move-to-user-page": "문서를 사용자 문서로 옮길 권한이 없습니다(하위 문서는 예외).",
+       "cant-move-user-page": "사용자 문서를 옮길 권한이 없습니다 (하위 문서는 예외).",
+       "cant-move-to-user-page": "문서를 사용자 문서로 옮길 권한이 없습니다 (하위 문서는 예외).",
+       "cant-move-category-page": "분류 문서를 옮길 권한이 없습니다.",
+       "cant-move-to-category-page": "문서를 분류 문서로 옮길 권한이 없습니다.",
        "newtitle": "새 제목:",
        "move-watch": "원래 문서와 대상 문서를 주시하기",
        "movepagebtn": "문서 옮기기",
        "newimages-summary": "이 특수 문서는 최근에 올라온 파일을 나열하고 있습니다.",
        "newimages-legend": "필터",
        "newimages-label": "파일 이름 (또는 그 일부분):",
+       "newimages-showbots": "봇이 올린 것 보기",
        "noimages": "그림이 없습니다.",
        "ilsubmit": "검색",
        "bydate": "날짜",
        "api-error-fileexists-shared-forbidden": "\"$1\" 이름으로 된 파일이 이미 공용 저장소에 존재하며 덮어쓸 수 없습니다.",
        "api-error-file-too-large": "올리려는 파일이 너무 큽니다.",
        "api-error-filename-tooshort": "파일 이름이 너무 짧습니다.",
-       "api-error-filetype-banned": "이런 파일 형식은 올릴 수 없습니다.",
+       "api-error-filetype-banned": "이 파일의 형식은 금지되어 있습니다.",
        "api-error-filetype-banned-type": "$1 {{PLURAL:$4|파일 형식은 올릴 수 없습니다}}. $2 {{PLURAL:$3|파일 형식만 사용할 수 있습니다}}.",
        "api-error-filetype-missing": "파일 이름에 확장자가 없습니다.",
        "api-error-hookaborted": "수정하려고 한 것이 확장 기능에 의해 중지되었습니다.",
index 039f4c9..7f529b5 100644 (file)
        "changeemail-password": "«{{SITENAME}}» проектде паролугъуз:",
        "changeemail-submit": "Адресни тюрлендир",
        "changeemail-cancel": "Ызына алыу",
+       "resettokens": "Токенлени джибер",
        "resettokens-tokens": "Токенле:",
        "bold_sample": "Къалын джазыу",
        "bold_tip": "Къалын джазыу",
        "fewestrevisions": "Эм аз версиясы болгъан бетле",
        "nbytes": "$1 {{PLURAL:$1|байт}}",
        "ncategories": "$1 {{PLURAL:$1|категория}}",
+       "ninterwikis": "$1 {{PLURAL:$1|интервики}}",
        "nlinks": "$1 {{PLURAL:$1|джибериу}}",
        "nmembers": "$1 {{PLURAL:$1|объект}}",
+       "nmemberschanged": "$1 → $2 {{PLURAL:$2|объект}}",
        "nrevisions": "$1 {{PLURAL:$1|версия}}",
        "nviews": "$1 {{PLURAL:$1|къарау}}",
        "nimagelinks": "$1 {{PLURAL:$1|бетде}} хайырланады",
        "othercontribs": "$1 джанындан этилген ишге тамалланады.",
        "others": "башхала",
        "siteusers": "{{SITENAME}} {{PLURAL:$2|1=къошулуучу|къошулуучула}} $1",
-       "anonusers": "{{SITENAME}} аноним {{PLURAL:$2|1=къошулуучу|къошулуучула}} $1",
+       "anonusers": "{{SITENAME}} аноним {{PLURAL:$2|къошулуучусу|къошулуучулары}} $1",
        "creditspage": "Бетни кредитлери",
        "nocredits": "Бу къошулуучу ючюн кредит билги джокъду.",
        "spamprotectiontitle": "Спамгъа къаршчы фильтр",
        "pageinfo-article-id": "Бетни идентификатору",
        "pageinfo-language": "Бетни ичиндегисини тили",
        "pageinfo-content-model": "Батни ичиндегисини модели",
-       "pageinfo-robot-policy": "Излеу къуллукъла бла индексация",
+       "pageinfo-robot-policy": "Излеу роботла бла индексация",
        "pageinfo-robot-index": "Эркинлик берилгенди",
        "pageinfo-robot-noindex": "Эркинлик берилмегенди",
        "pageinfo-views": "Къарауланы саны",
        "htmlform-no": "Огъай",
        "htmlform-yes": "Хоу",
        "htmlform-chosen-placeholder": "Вариантны сайлагъыз",
+       "htmlform-cloner-create": "Энтда къош",
+       "htmlform-cloner-delete": "Кетер",
        "sqlite-has-fts": "$1 толу текст излеуню хайырландыргъан",
        "sqlite-no-fts": "$1 толу текст излеуню хайырландыра билмеген",
        "logentry-delete-delete": "$3 бетни $1 {{GENDER:$2|кетерди}}",
index 504c102..307a827 100644 (file)
        "gotaccountlink": "Enlogge",
        "userlogin-resetlink": "Häß De Ding Daate för et Enlogge verjäße?",
        "userlogin-resetpassword-link": "Paßwoot verjäße?",
-       "userlogin-loggedin": "Do bes ald als {{GENDER:$1|dä Metmaacher|de Metmaacherėn|dä Metmaacher|de Metmaacherėn|däMetmaacher}} [[User:$1|$1]] enjelogg. Met heh dämm Fommolaa kanns De jäz ävver onger enem andere Nahme enlogge.",
+       "userlogin-helplink2": "Hölp mem Enlogge",
+       "userlogin-loggedin": "Do bes ald als {{GENDER:$1|dä Metmaacher|de Metmaacherėn|dä Metmaacher|de Metmaacherėn|dä Metmaacher}} [[User:$1|$1]] enjelogg. Met heh dämm Fommolaa kanns De jäz ävver onger enem andere Nahme enlogge.",
        "userlogin-createanother": "Donn ene zohsäzlejje Zohjang aanlääje",
        "createacct-emailrequired": "Ding Addräß för de <i lang=\"en\">e-mail</i>",
        "createacct-emailoptional": "Ding Addräß för de <i lang=\"en\">e-mail</i>, kann fott bliive",
        "resetpass-abort-generic": "E Zohsazprojramm häd_et nit zohjelohße, et Paßwoot ze ändere.",
        "resetpass-expired": "Di Paßwood es afjeloufe. Donn jetz e neu Passwoot för et Enlogg faßlääje.",
        "resetpass-expired-soft": "Ding Paßwood es afjeloufe un moß neu jesaz wääde. Bes esu jood_un donn e neu Paßwoot ußsöhke, udder jangk op {{int:resetpass-submit-cancel}}, öm et schpääder ze säze.",
+       "resetpass-validity-soft": "Ding Kännwood es nit johd: $1\n\nSöhk Der e neu Kännwood us, udder jangg_op <em>{{int:resetpass-submit-cancel}}</em>, öm dat schpääder ze donn.",
        "passwordreset": "Et Paßwoot zeröck säze",
        "passwordreset-text-one": "Föll dat Fommolaa uß, öm Ding Paßwoot ze ändere.",
        "passwordreset-text-many": "{{PLURAL:$1|Föll ei vun dä Fälder en heh däm Fommolaa uß, öm e Zwesche_Paßwoot ze krijje.}}",
        "edit-gone-missing": "Kunnt di Sigg nit änndere. Se schingk verschwunde un weed fottjeschemeße woode sin.",
        "edit-conflict": "Dubbelt beärbeit.",
        "edit-no-change": "Do häs ja nix aan dä Sigg jeändert, do dom_mer och nix domet.",
+       "postedit-confirmation-created": "Di Sigg es aanjelaat.",
+       "postedit-confirmation-restored": "Der ahle Zohschtand es widder zeröck jehollt.",
        "postedit-confirmation-saved": "Ding Änderunge sin nit faßjehallde.",
        "edit-already-exists": "Kunnt kei neu Sigg aanlääje. Di Sigg jidd_et ald.",
        "defaultmessagetext": "Dä standaadmäßije Tex",
        "revdelete-no-file": "De aanjejovve Dattei jidd_et nit.",
        "revdelete-show-file-confirm": "Beß De sescher, dat De de fottjeschmeße Version vun dä Dattei „<nowiki>$1</nowiki>“ vum $2 oö $3 Uhr aanloore wells?",
        "revdelete-show-file-submit": "Lohß Jonn!",
+       "revdelete-selected-text": "Di ußjesöhk Väsjohn{{PLURAL:$1||e|}} vun [[:$2]]:",
+       "revdelete-selected-file": "Di ußjesöhk Väsjohn{{PLURAL:$1||e|}} vun dä Dattei [[:$2]]:",
        "logdelete-selected": "{{PLURAL:$1|Dä ußjewählte Logboch-Endrach|De Ußjewählte Logboch-Endrähsch}}:",
+       "revdelete-text-text": "Fottjeschmeße Väsjohne blieve en dä Leß met de vörrije Väsjohne, ävver zom Deil kann de Öffentleschkeit nit mieh drop zohjriehfe.",
+       "revdelete-text-file": "Fottjeschmeße Väsjohne vun Datteije blieve en dä Leß met de vörrije Väsjohne, ävver zom Deil kann de Öffentleschkeit nit mieh drop zohjriehfe.",
+       "logdelete-text": "Fottjeschmeße Endrääsch en de Logbööscher blieve en dä Leß met de vörrije Väsjohne, ävver zom Deil kann de Öffentleschkeit nit mieh drop zohjriehfe.",
+       "revdelete-text-others": "De Wiki_Kööbeße künne emmer noch drop zohjriefe un künne och wider för alle seeschbaa maache, wat jäz verschtoche es, esu lang kein äxtra Beschränkonge jemaat woodte.",
        "revdelete-confirm": "Bes esu joot un doon dat beschtääteje, un donn domet ongerschriive, dat De dat donn wells, dat De weiß, wat dobei eruß kütt, un dat De dat och noh de [[{{MediaWiki:Policy-url}}|Rääjelle]] deihß.",
        "revdelete-suppress-text": "Dat sullt '''blooß''' jedonn wäde för:\n* onjesäzlesche Aanjaabe\n* unjenehmesch persöhnlesch Daate\n*: ''Aanschreffte, Tellefoon- un ander Nummere, <span lang=\"en\" xml:lang=\"en\">e-mail</span> Adräß, uew.''",
        "revdelete-legend": "Dä öffentlije Zojang enschränke",
        "search-file-match": "(en dä Dattei dren)",
        "search-suggest": "Häß De „$1“ jemeint?",
        "search-interwiki-caption": "Schwesterprojekte",
-       "search-interwiki-default": "$1 hät heh di Träffer jefonge:",
+       "search-interwiki-default": "Op $1 woodte heh di Träffer jefonge:",
        "search-interwiki-more": "(mieh)",
        "search-relatedarticle": "Ähnlesch",
        "searcheverything-enable": "En alle Appachtemangs söhke",
        "right-move": "Sigge ömnenne",
        "right-move-subpages": "Sigge, un ier Ungersigge, zosamme ömnenne",
        "right-move-rootuserpages": "(Houp)-Metmaacher-Sigg Ömnänne",
+       "right-move-categorypages": "Sigge vun Saachjroppe ömbenänne",
        "right-movefile": "Dateie ömnenne",
        "right-suppressredirect": "Kein automatesche Ömleidong aanlääje beim Ömnenne",
        "right-upload": "Dateie huhlade",
        "action-createpage": "di Sigg aanzeläje",
        "action-createtalk": "Klaafsigge aanzeläje",
        "action-createaccount": "hee dä neue Metmaacher aanzemelde",
+       "action-history": "de Leß met de fröhjere Väsohne vun heh dä Sigg ze belohre",
        "action-minoredit": "hee di Änderung als klein „mini“ ze makkeere",
        "action-move": "di Sigg ömzebenänne",
        "action-move-subpages": "hee di Sigg un ier Ongersigge ömzebenänne",
        "action-move-rootuserpages": "enem Metmaacher sing (Houp)-Metmaacher-Sigg ömzenänne",
+       "action-move-categorypages": "Sigge vun Saachjroppe ömzebenänne",
        "action-movefile": "Die Datei ömnenne",
        "action-upload": "hee di Datei huhzelade",
        "action-reupload": "hee di Datei, di et ald jitt, ußzetuusche",
        "unwatchedpages": "Sigge, wo keiner drop oppass",
        "listredirects": "Ömleitunge",
        "listduplicatedfiles": "Leß met dubbelte Datteije",
+       "listduplicatedfiles-entry": "Zoh dä Dattei [[:File:$1|$1]] ham_mer [[$3|{{PLURAL:$2|a Dubbel|$2 Dubbelte|kein Dubbelte}}]] jefonge.",
        "unusedtemplates": "Schablone oder Baustein, die nit jebruch wääde",
        "unusedtemplatestext": "Hee sin all de Schablone opjeliss, die em Appachtemeng „{{ns:template}}“ sin, die nit en\nander Sigge enjefüg wääde. Ih De jet dovun fottschmieß, denk dran, se künnte och op en ander Aat jebruch\nwääde, un luur Der der iehr ander Links aan!",
        "unusedtemplateswlh": "ander Links",
index ba9ce95..7d7f3d8 100644 (file)
        "watchlistedit-raw-done": "Är Iwwerwaachungslëscht gouf aktualiséiert.",
        "watchlistedit-raw-added": "{{PLURAL:$1|1 Säit gouf|$1 Säite goufen}} derbäigesat:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|1 Säit gouf|$1 Säite goufen}} erausgeholl:",
+       "watchlistedit-clear-legend": "Iwwerwaachungslëscht eidelmaachen",
        "watchlisttools-view": "Iwwerwaachungslëscht: Ännerungen",
        "watchlisttools-edit": "Iwwerwaachungslëscht weisen an änneren",
        "watchlisttools-raw": "Net-formatéiert Iwwerwaachungslëscht änneren",
index d88dd13..d9cf161 100644 (file)
        "watchthis": "И ччин гуьзетун",
        "savearticle": "Ччин хуьн",
        "preview": "Сифтедин килигун",
-       "showpreview": "СиÑ\84Ñ\82един ÐºÐ¸Ð»Ð¸Ð³Ñ\83н ÐºÑ\8aалÑ\83Ñ\80ун",
+       "showpreview": "Ð\92иликамаз ÐºÐ¸Ð»Ð¸Ð³ун",
        "showdiff": "МасакIавилер къалурун",
        "anoneditwarning": "'''Дикъет:''' Куьне системадиз жув вуж ятIа лагьанвач. Куь IP-адрес и ччинин масакIавилерин тарихдиз  кхьида.",
        "summary-preview": "Сифте килигун паталди:",
index d4b423a..56602be 100644 (file)
        "previewnote": "'''Имајте предвид дека ова е само преглед.'''\nПромените сè уште не се зачувани!",
        "continue-editing": "Оди на полето за уредување",
        "previewconflict": "Овој преглед прикажува како ќе изгледа текстот внесен во горниот дел откако ќе се зачува страницата.",
-       "session_fail_preview": "'''Жалиме! Не можевме да го обработиме вашето уредување поради загуба на сесиски податоци.'''\nОбидете се повторно.\nАко сè уште не функционира, обидете се да се [[Special:UserLogout|одјавите]] и повторно да се најавите.",
-       "session_fail_preview_html": "'''Ð\96алиме, Ð½Ð¾ Ð\92аÑ\88еÑ\82о Ñ\83Ñ\80едÑ\83ваÑ\9aе Ð½Ðµ Ð¼Ð¾Ð¶ÐµÑ\88е Ð´Ð° Ñ\81е Ð¾Ð±Ñ\80абоÑ\82и Ð¿Ð¾Ñ\80ади Ð³Ñ\83беÑ\9aе Ð½Ð° Ñ\81еÑ\81иÑ\81киÑ\82е Ð¿Ð¾Ð´Ð°Ñ\82оÑ\86и.'''\n\n''{{SITENAME}} има овозможено чист HTML, па прегледот е скриен како мерка за заштита од JavaScript-напади.''\n\n'''Ако ова е разумен обид за уредување, тогаш обидете се повторно.'''\nАко и ова не го реши проблемот, обидете се со [[Special:UserLogout|одјавување]] и повторно најавување.",
+       "session_fail_preview": "'''Жалиме! Не можевме да го обработиме вашето уредување поради загуба на податоци од седницата.'''\nОбидете се повторно.\nАко сè уште не функционира, обидете се да се [[Special:UserLogout|одјавите]] и повторно да се најавите.",
+       "session_fail_preview_html": "'''Ð\96алиме, Ð½Ð¾ Ð\92аÑ\88еÑ\82о Ñ\83Ñ\80едÑ\83ваÑ\9aе Ð½Ðµ Ð¼Ð¾Ð¶ÐµÑ\88е Ð´Ð° Ñ\81е Ð¾Ð±Ñ\80абоÑ\82и Ð¿Ð¾Ñ\80ади Ð·Ð°Ð³Ñ\83ва Ð½Ð° Ð¿Ð¾Ð´Ð°Ñ\82оÑ\86иÑ\82е Ð¾Ð´ Ñ\81едниÑ\86аÑ\82а.'''\n\n''{{SITENAME}} има овозможено чист HTML, па прегледот е скриен како мерка за заштита од JavaScript-напади.''\n\n'''Ако ова е разумен обид за уредување, тогаш обидете се повторно.'''\nАко и ова не го реши проблемот, обидете се со [[Special:UserLogout|одјавување]] и повторно најавување.",
        "token_suffix_mismatch": "'''Вашето уредување е одбиено затоа што вашиот пребарувач направил проблеми со интерпукциските знаци во шифрата на уредувањето.\nУредувањето не е прифатено за да се спречи несакана промена на текстот на страницата.\nОва понекогаш се случува кога користите неисправна мрежна анонимна застапничка (proxy) служба.'''",
        "edit_form_incomplete": "'''Некои делови од образецот за уредување не стасаа до опслужувачот. Внимателно проверете дали уреденото не е пореметено и обидете се поввторно.'''",
        "editing": "Уредување на $1",
        "right-move": "Преместување страници",
        "right-move-subpages": "Преместување на страници со нивните потстраници",
        "right-move-rootuserpages": "Преместување на основна корисничка страница",
+       "right-move-categorypages": "Преместување на категориски страници",
        "right-movefile": "Преместување на податотеки",
        "right-suppressredirect": "Не прави пренасочување од старото име при преместување на страница",
        "right-upload": "Подигни податотеки",
        "action-move": "преместување на оваа страница",
        "action-move-subpages": "преместување на оваа страница и нејзините потстраници",
        "action-move-rootuserpages": "преместување на основна корисничка страница",
+       "action-move-categorypages": "преместување на категориски страници",
        "action-movefile": "премести ја оваа податотека",
        "action-upload": "подигни ја податотекава",
        "action-reupload": "заменување на оваа постоечка податотека",
        "emailccme": "Испрати ми копија на пораката по е-пошта.",
        "emailccsubject": "Копија од вашата порака до $1: $2",
        "emailsent": "Писмото е испратено",
-       "emailsenttext": "Ð\92аÑ\88аÑ\82а Ðµ-поÑ\88Ñ\82а Ðµ Ð¿Ñ\80аÑ\82ена.",
+       "emailsenttext": "Ð\9fиÑ\81моÑ\82о Ðµ Ð¸Ñ\81пÑ\80аÑ\82ено.",
        "emailuserfooter": "Оваа е-порака беше пратена од $1 до $2 со помош на функцијата Е-пошта на {{SITENAME}}.",
        "usermessage-summary": "Оставете системска порака.",
        "usermessage-editor": "Системски гласник",
        "revertpage": "Отстрането уредувањето на [[Special:Contributions/$2|$2]] ([[User talk:$2|разговор]]), вратено на последната верзија на [[User:$1|$1]]",
        "revertpage-nouser": "Вратени уредувања од скриен корисник на последната преработка на {{GENDER:$1|[[User:$1|$1]]}}",
        "rollback-success": "Откажани уредувањата на $1; вратено на последната верзија на $2.",
-       "sessionfailure-title": "Сесијата не успеа",
-       "sessionfailure": "Има проблем со вашата сесија;\nоваа дејство е откажано како превентива против преземање сесии.\nПритиснете го копчето „назад“ и повторно вчитајте ја страницата од која дојдовте и обидете се повторно.",
+       "sessionfailure-title": "Седницата не успеа",
+       "sessionfailure": "Има проблем со вашата седница;\nоваа дејство е откажано како превентива против преземање седници.\nПритиснете го копчето „назад“ и повторно вчитајте ја страницата од која дојдовте и обидете се повторно.",
        "protectlogpage": "Дневник на заштитувања",
        "protectlogtext": "Подолу има список на измените во заштитата на страницата.\nМоментално заштитените страници ќе ги најдете [[Special:ProtectedPages|овој список]].",
        "protectedarticle": "заштитена „[[$1]]“",
        "movepagetalktext": "Соодветната страница за разговор, доколку постои, ќе биде автоматски преместена заедно со неа, освен ако:\n*Веќе постои страница за разговор за новиот наслов, или\n*Долното поле е неозначено.\n\nВо овие случаи, ќе треба рачно да се премести или спои ако има потреба.",
        "movearticle": "Премести страница:",
        "moveuserpage-warning": "'''Предупредување:''' На пат сте да преместите корисничка страница. Имајте предвид дека само страницата ќе биде преместена, а самиот корисник ''нема'' да биде преименуван.",
+       "movecategorypage-warning": "<strong>Предупредување:</strong> Преместувате категориска страница. Имајте предвид дека ќе се премести само страницата, а страниците во старата категорија <em>нема</em> да се прекатегоризираат во новата.",
        "movenologintext": "Мора да бидете регистриран корисник и да сте [[Special:UserLogin|најавени]] за да можете да преместувате страници.",
        "movenotallowed": "Немате доволно привилегии за преместување на страници.",
        "movenotallowedfile": "Немате дозвола за преместување податотеки.",
        "cant-move-user-page": "Немате дозвола за преместување на основни кориснички страници (освен потстраници).",
        "cant-move-to-user-page": "Немате дозвола за преместување на страница во ваша корисничка страница (освен во корисничка потстраница)",
+       "cant-move-category-page": "Немате дозвола да преместувате категориски страници.",
+       "cant-move-to-category-page": "Немате дозвола да преместувате страници во категориски страници.",
        "newtitle": "Кон новиот наслов:",
        "move-watch": "Набљудувај ја страницава",
        "movepagebtn": "Премести страница",
        "import-nonewrevisions": "Не увезов ниедна преработка (сите се веќе присутни или изоставени поради грешки)",
        "xml-error-string": "$1 во ред $2, колона $3 (бајт $4): $5",
        "import-upload": "Подигни XML податоци",
-       "import-token-mismatch": "Ð\93Ñ\83беÑ\9aе Ð½Ð° Ñ\81еÑ\81иÑ\81киÑ\82е Ð¿Ð¾Ð´Ð°Ñ\82оÑ\86и. Обидете се повторно.",
+       "import-token-mismatch": "Ð\97агÑ\83бени Ð½Ð° Ð¿Ð¾Ð´Ð°Ñ\82оÑ\86иÑ\82е Ð¾Ð´ Ñ\81едниÑ\86аÑ\82а. Обидете се повторно.",
        "import-invalid-interwiki": "Не можам да увезам од наведеното вики.",
        "import-error-edit": "Страницата „$1“ не е увезена бидејќи не ви е дозволено да ја уредувате.",
        "import-error-create": "Страницата „$1“ не е увезена бидејќи не ви е дозволено да ја создадете.",
        "exif-subsectime": "Дел од секундата во кој е сликано",
        "exif-subsectimeoriginal": "Дел од секундата во кој е фотографирано",
        "exif-subsectimedigitized": "Дел од секундата во кој е дигитализирано",
-       "exif-exposuretime": "Ð\95кÑ\81позиÑ\86иÑ\98а",
+       "exif-exposuretime": "Ð\92Ñ\80еме Ð½Ð° Ð¸Ð·Ð»Ð¾Ð¶ÐµÐ½Ð¾Ñ\81Ñ\82",
        "exif-exposuretime-format": "$1 сек ($2)",
        "exif-fnumber": "F-бр.",
        "exif-fnumber-format": "f/$1",
-       "exif-exposureprogram": "Режим Ð½Ð° ÐµÐºÑ\81позиÑ\86иÑ\98а",
+       "exif-exposureprogram": "Ð\9fÑ\80огÑ\80ам Ð½Ð° Ð¸Ð·Ð»Ð¾Ð¶Ñ\83ваÑ\9aе",
        "exif-spectralsensitivity": "Спектрална осетливост",
        "exif-isospeedratings": "Светлоосетливост по ISO",
        "exif-shutterspeedvalue": "APEX-брзина на затворачот",
        "exif-aperturevalue": "APEX-oтвор",
        "exif-brightnessvalue": "APEX-светлост",
-       "exif-exposurebiasvalue": "Ð\9dадомеÑ\81Ñ\82ок Ð½Ð° ÐµÐºÑ\81позиÑ\86иÑ\98аÑ\82а",
+       "exif-exposurebiasvalue": "Ð\9dадомеÑ\81Ñ\82ок Ð½Ð° Ð¸Ð·Ð»Ð¾Ð¶Ñ\83ваÑ\9aеÑ\82о",
        "exif-maxaperturevalue": "Макс. отвореност на блендата",
        "exif-subjectdistance": "Оддалеченост до објектот",
        "exif-meteringmode": "Режим на мерачот",
        "exif-focalplaneyresolution": "Разложеност на жаришната рамнина Y",
        "exif-focalplaneresolutionunit": "Единица за разложеност на жаришната рамнина",
        "exif-subjectlocation": "Положба на субјектот",
-       "exif-exposureindex": "Ð\98ндекÑ\81 Ð½Ð° ÐµÐºÑ\81позиÑ\86иÑ\98аÑ\82а",
+       "exif-exposureindex": "Ð\9fоказаÑ\82ел Ð½Ð° Ð¸Ð·Ð»Ð¾Ð¶Ñ\83ваÑ\9aеÑ\82о",
        "exif-sensingmethod": "Метод на сензорот",
        "exif-filesource": "Извор на податотеката",
        "exif-scenetype": "Тип на сцена",
        "exif-customrendered": "Дополнитела обработка на сликата",
-       "exif-exposuremode": "Режим Ð½Ð° ÐµÐºÑ\81позиÑ\86иÑ\98а",
+       "exif-exposuremode": "Режим Ð½Ð° Ð¸Ð·Ð»Ð¾Ð¶Ñ\83ваÑ\9aе",
        "exif-whitebalance": "Рамнотежа на бело",
        "exif-digitalzoomratio": "Сооднос на дигиталното приближување (зум)",
        "exif-focallengthin35mmfilm": "Жаришно растојание кај 35 мм филм",
        "exif-scenetype-1": "Директно фотографирана слика",
        "exif-customrendered-0": "Нормален процес",
        "exif-customrendered-1": "Нестандарден процес",
-       "exif-exposuremode-0": "Ð\90вÑ\82омаÑ\82Ñ\81ка ÐµÐºÑ\81позиÑ\86иÑ\98а",
-       "exif-exposuremode-1": "РаÑ\87на ÐµÐºÑ\81позиÑ\86иÑ\98а",
+       "exif-exposuremode-0": "Ð\90вÑ\82омаÑ\82Ñ\81ко Ð¸Ð·Ð»Ð¾Ð¶Ñ\83ваÑ\9aе",
+       "exif-exposuremode-1": "РаÑ\87но Ð¸Ð·Ð»Ð¾Ð¶Ñ\83ваÑ\9aе",
        "exif-exposuremode-2": "Автоматски со зададен распон",
        "exif-whitebalance-0": "Автоматска рамнотежа на бело",
        "exif-whitebalance-1": "Рачна рамнотежа на бело",
        "watchlistedit-raw-submit": "Поднови го списокот",
        "watchlistedit-raw-done": "Вашиот список на набљудувања е подновен.",
        "watchlistedit-raw-added": "{{PLURAL:$1|1 наслов беше|$1 наслови беа}} додадени:",
-       "watchlistedit-raw-removed": "{{PLURAL:$1|1 наслов беше избришан|$1 наслови беа избришани}}:",
+       "watchlistedit-raw-removed": "{{PLURAL:$1|Избришан е еден наслов|Избришани се $1 наслови}}:",
+       "watchlistedit-clear-title": "Исчистен списокот на набљудувања",
+       "watchlistedit-clear-legend": "Исчисти набљудувани",
+       "watchlistedit-clear-explain": "Сите наслови ќе бидат отстранети од списокот на набљудувања",
+       "watchlistedit-clear-titles": "Наслови:",
+       "watchlistedit-clear-submit": "Исчисти ги набљудуваните (Ова е трајно!)",
+       "watchlistedit-clear-done": "Вашиот список на набљудувања е исчистен.",
+       "watchlistedit-clear-removed": "{{PLURAL:$1|Избришан е еден наслов|Избришани се $1 наслови}}:",
+       "watchlistedit-too-many": "Има премногу страници за да можат тука да се прикажат.",
+       "watchlisttools-clear": "Исчисти ги набљудуваните",
        "watchlisttools-view": "Преглед на релевантни промени",
        "watchlisttools-edit": "Погледај и уреди список на набљудувања",
        "watchlisttools-raw": "Напредно уредување на списокот на набљудувања",
index 13846cb..059cdf5 100644 (file)
        "jumptonavigation": "വഴികാട്ടി",
        "jumptosearch": "തിരയൂ",
        "view-pool-error": "ക്ഷമിക്കണം, ഈ നിമിഷം സെർവറുകൾ അമിതഭാരം കൈകാര്യം ചെയ്യുകയാണ്.\nധാരാളം ഉപയോക്താക്കൾ ഈ താൾ കാണുവാൻ ശ്രമിച്ചുകൊണ്ടിരിക്കുകയാണ്.\nഇനിയും താൾ ലഭ്യമാക്കുവാൻ താങ്കൾ ശ്രമിക്കുന്നതിന് മുൻപ് ദയവായി അല്പസമയം കാത്തിരിക്കുക.\n\n$1",
+       "generic-pool-error": "ക്ഷമിക്കണം, ഈ നിമിഷം സെർവറുകൾ അമിതഭാരം കൈകാര്യം ചെയ്യുകയാണ്.\nധാരാളം ഉപയോക്താക്കൾ ഈ സ്രോതസ്സുകൾ കാണുവാൻ ശ്രമിച്ചുകൊണ്ടിരിക്കുകയാണ്.\nഇനിയും ഇത് ലഭ്യമാക്കുവാൻ താങ്കൾ ശ്രമിക്കുന്നതിന് മുൻപ് ദയവായി അല്പസമയം കാത്തിരിക്കുക.",
        "pool-timeout": "പൂട്ട് മാറാനുള്ള കാത്തിരിപ്പ് സമയം",
        "pool-queuefull": "പൂൾ ക്യൂ നിറഞ്ഞിരിക്കുന്നു",
        "pool-errorunknown": "അപരിചിതമായ പിഴവ്",
index 477a9e0..75603b5 100644 (file)
        "rev-suppressed-text-unhide": "यस पृष्ठको पुनरावलोकन '''दबाइएकोछ'''।\nयसको पूर्ण विवरण [{{fullurl:{{#Special:Log}}/delete|पृष्ठ={{FULLPAGENAMEE}}}}को दबाइएको लगमा पाउन सकिन्छ]।\nयदि चाहनु भयो भनें प्रबन्धकको हैसियतमा [यो पुनरावलोकन $1] हेर्न सक्नुहुन्छ।",
        "rev-deleted-text-view": "यस पृष्ठको संशोधन '''मेटिएकोछ'''।\nतपाईंले हेर्न सक्नुहुन्छ; [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} मेटिएको लगमा विवरण पाउन सकिन्छ]।",
        "rev-suppressed-text-view": "यस पृष्ठको पुनरावलोकन '''दबिएकोछ'''।\nप्रबन्धकको हैसियतमा हेर्न सक्नुहुन्छ; [{{fullurl:{{#Special:Log}}/delete|पृष्ठ={{FULLPAGENAMEE}}}}को दबिएको लगमा विवरण पाउन सकिन्छ]",
-       "rev-deleted-no-diff": "तपाईंले यसको भिन्नता पाउन सक्नुहुन्न किन भनें यस पृष्ठको पुनरावलोकन '''मेटाइएकोछ'''।\nयसको विवरण [{{fullurl:{{#Special:Log}}/delete|पृष्ठ={{FULLPAGENAMEE}}}}को मेटाइएको लगमा पाउन सक्नुहुन्छ]।",
+       "rev-deleted-no-diff": "तपाईंले यसको भिन्नता पाउन सक्नुहुन्न किनभने यस पृष्ठको पुनरावलोकन '''मेटाइएको छ'''।\nयसको विवरण [{{fullurl:{{#Special:Log}}/delete|पृष्ठ={{FULLPAGENAMEE}}}}को मेटाइएको लगमा पाउन सक्नुहुन्छ]।",
        "rev-suppressed-no-diff": "तपाईं यसको भिन्नता हेर्न सक्नुहुन्न किनभनें यसको एउटा संशोधन '''मेटाइएको'''छ।",
        "rev-deleted-unhide-diff": "यस पृष्ठको पुनरावलोकनहरु मध्ये एउटा भिन्नता '''मेटाइएकोछ'''।\nयसको पूर्ण विवरण [{{fullurl:{{#Special:Log}}/delete|पृष्ठ={{FULLPAGENAMEE}}}}को मेटाइएको लगमा पाउन सकिन्छ]।\nयदि चाहनु भयो भनें प्रबन्धकको हैसियतमा [यो भिन्नता $1] हेर्न सक्नुहुन्छ।",
        "rev-suppressed-unhide-diff": "यस पृष्ठको पुनरावलोकनहरु मध्ये एउटा भिन्नता '''दबिएकोछ'''।\nयसको पूर्ण विवरण [{{fullurl:{{#Special:Log}}/suppress|पृष्ठ={{FULLPAGENAMEE}}}}को दबिएको लगमा पाउन सकिन्छ]।\nयदि चाहनु भयो भनें प्रबन्धकको हैसियतमा [यो भिन्नता $1] हेर्न सक्नुहुन्छ।",
        "revertmerge": "नमिलाउने",
        "mergelogpagetext": "एउटा पृष्ठको इतिहास अर्कोमा भर्खरै मिलाइएको सूची तल दिइन्छ।",
        "history-title": "\"$1\" को पुनरावृत्ति इतिहास",
-       "difference-multipage": "(पà¥\83षà¥\8dठहरà¥\81मा भिन्नता)",
+       "difference-multipage": "(पà¥\83षà¥\8dठहरà¥\82मा भिन्नता)",
        "lineno": "पंक्ति $1:",
        "compareselectedversions": "छानिएका संस्करणहरू दाँज्नुहोस्",
        "showhideselectedversions": "छानिएका पुनरावलोकनहरु देखाउने/लुकाउने",
        "recentchanges-feed-description": "यो फिडमा रहेको विकीको सवैभन्दा अन्तिम परिवर्तनहरुको जानकारी राख्नुहोस्",
        "recentchanges-label-newpage": "यो सम्पादनले नयाँ पृष्ठ निर्माण गरेको छ",
        "recentchanges-label-minor": "यो साधारण सम्पादन हो",
-       "recentchanges-label-bot": "यो सम्पादन बोट द्वारा गरिएको थियो",
+       "recentchanges-label-bot": "यो सम्पादन बोटद्वारा गरिएको थियो",
        "recentchanges-label-unpatrolled": "यो सम्पादन अहिले सम्म पट्रोल गरिएको छैन",
        "recentchanges-legend-newpage": "([[Special:NewPages|list of new pages]] यो पनि हेर्नुहोस्)",
        "recentchanges-legend-plusminus": "(''±१२३'')",
index f95a916..044e8aa 100644 (file)
        "emailuser": "Enviar-lhe um e-mail",
        "emailuser-title-target": "Enviar e-mail para {{GENDER:$1|este usuário|esta usuária}}",
        "emailuser-title-notarget": "Enviar e-mail",
-       "emailpage": "Contactar usuário",
+       "emailpage": "Enviar e-mail ao usuário",
        "emailpagetext": "Você pode usar o formulário a seguir para enviar um e-mail para {{GENDER:$1|este usuário|esta usuária}}.\nO endereço de e-mail que você inseriu em [[Special:Preferences|suas preferências de usuário]] irá aparecer como o endereço do remetente da mensagem, com o destinatário podendo responder diretamente para você.",
        "defemailsubject": "E-mail do usuário \"$1\" da {{SITENAME}}",
        "usermaildisabled": "O e-mail do usuário foi desativado",
        "emailccsubject": "Cópia de sua mensagem para $1: $2",
        "emailsent": "E-mail enviado",
        "emailsenttext": "Sua mensagem foi enviada.",
-       "emailuserfooter": "Este e-mail foi enviado por $1 para $2 através da opção de \"contactar usuário\" da {{SITENAME}}.",
+       "emailuserfooter": "Este e-mail foi enviado por $1 para $2 através da opção de \"enviar e-mail ao usuário\" da {{SITENAME}}.",
        "usermessage-summary": "Deixar mensagem de sistema.",
        "usermessage-editor": "Mensagens de sistema",
        "watchlist": "Páginas vigiadas",
        "compare-revision-not-exists": "A revisão que você especificou não existe.",
        "dberr-problems": "Desculpe! Este sítio está passando por dificuldades técnicas.",
        "dberr-again": "Experimente esperar alguns minutos e atualizar.",
-       "dberr-info": "(Não foi possível contactar o servidor de base de dados: $1)",
+       "dberr-info": "(Não foi possível contatar o servidor de base de dados: $1)",
        "dberr-info-hidden": "(Não foi possível contatar o banco de dados do servidor)",
        "dberr-usegoogle": "Você pode tentar pesquisar no Google entretanto.",
        "dberr-outofdate": "Note que os seus índices relativos ao nosso conteúdo podem estar desatualizados.",
index 259ed09..704ee53 100644 (file)
        "nstab-help": "Ajuda",
        "nstab-category": "Categoria",
        "nosuchaction": "Operação não existe",
-       "nosuchactiontext": "A operação especificada pela URL é inválida.\nÉ possível que tenha escrito mal a URL ou seguido um link incorreto.\nIsto pode também indicar um defeito no software da {{SITENAME}}.",
+       "nosuchactiontext": "A operação especificada pela URL é inválida.\nÉ possível que tenha escrito mal a URL ou seguido uma ligação incorreta.\nIsto pode também indicar um defeito no software da {{SITENAME}}.",
        "nosuchspecialpage": "Esta página especial não existe",
        "nospecialpagetext": "<strong>Solicitou uma página especial inválida.</strong>\n\nEncontra uma lista das páginas especiais válidas em [[Special:SpecialPages|{{int:specialpages}}]].",
        "error": "Erro",
        "readonly": "Base de dados bloqueada (limitada a leituras)",
        "enterlockreason": "Introduza um motivo para bloquear, incluindo uma estimativa de quando será desbloqueada",
        "readonlytext": "A base de dados está bloqueada para impedir a inserção e modificação de dados, provavelmente para uma manutenção de rotina, após a qual a situação será normalizada.\n\nO administrador que a bloqueou deu a seguinte explicação: $1",
-       "missing-article": "A base de dados não encontrou o texto de uma página que deveria ter encontrado, com o nome \"$1\" $2.\n\nGeralmente, esta situação ocorre ao clicar um link para diferenças desatualizado ou para o histórico de uma página que tenha sido removida.\n\nSe nenhuma destas situações se verifica, pode ter encontrado um defeito no programa.\nAnote a URL e reporte este incidente a um [[Special:ListUsers/sysop|administrador]], por favor.",
+       "missing-article": "A base de dados não encontrou o texto de uma página que deveria ter encontrado, com o nome \"$1\" $2.\n\nGeralmente, esta situação ocorre ao clicar numa ligação para diferenças desatualizada ou para o histórico de uma página que tenha sido removida.\n\nSe nenhuma destas situações se verifica, pode ter encontrado um defeito no programa.\nAnote a URL e reporte este incidente a um [[Special:ListUsers/sysop|administrador]], por favor.",
        "missingarticle-rev": "(revisão#: $1)",
        "missingarticle-diff": "(Dif.: $1, $2)",
        "readonly_lag": "A base de dados foi automaticamente bloqueada enquanto os servidores secundários se sincronizam com o primário",
        "delete-hook-aborted": "A eliminação foi cancelada por um \"hook\".\nNão foi dada nenhuma explicação.",
        "no-null-revision": "Não foi possível criar uma nova revisão nula para a página \"$1\"",
        "badtitle": "Título inválido",
-       "badtitletext": "O título de página solicitado era inválido, vazio, ou um link interlínguas ou interwikis incorrecto.\nTalvez contenha um ou mais caracteres que não podem ser usados em títulos.",
+       "badtitletext": "O título de página solicitado era inválido, vazio, ou a ligação interlínguas estava incorreta.\nTalvez contenha um ou mais caracteres que não podem ser usados em títulos.",
        "perfcached": "Os seguintes dados encontram-se armazenados na ''cache'' e podem não estar atualizados. No máximo {{PLURAL:$1|um resultado é disponível|$1 resultados são disponíveis}} na ''cache''.",
        "perfcachedts": "Os seguintes dados encontram-se armazenados na ''cache'' e foram atualizados pela última vez a $1. No máximo {{PLURAL:$4|um resultado está disponível|$4 resultados estão disponíveis}} na ''cache''.",
        "querypage-no-updates": "As atualizações estão presentemente desativadas para esta página.\nPor enquanto, os dados aqui presentes não poderão ser atualizados.",
        "passwordremindertitle": "Nova palavra-chave temporária na {{SITENAME}}",
        "passwordremindertext": "Alguém (provavelmente você, a partir do endereço IP $1) solicitou uma palavra-chave nova para a sua conta na {{SITENAME}} ($4).\nFoi criada a palavra-chave temporária \"$3\" para o utilizador \"$2\".\nSe o pedido foi feito por si, entre agora na sua conta e escolha uma palavra-chave nova.\nA palavra-chave temporária expira após {{PLURAL:$5|um dia|$5 dias}}.\n\nCaso outra pessoa tenha feito o pedido, ou se entretanto se recordou da sua palavra-chave e já não deseja alterá-la, ignore esta mensagem e continue a utilizar a palavra-chave antiga.",
        "noemail": "Não foi registado um endereço de correio eletrónico para o utilizador \"$1\".",
-       "noemailcreate": "Tem de fornecer um endereço de correio eletrónico válido",
+       "noemailcreate": "Tem de fornecer um endereço de correio eletrónico válido.",
        "passwordsent": "Foi enviada uma palavra-chave nova para o endereço de correio eletrónico do utilizador \"$1\".\nVolte a autenticar-se após recebê-la, por favor.",
        "blocked-mailpassword": "O seu endereço IP foi bloqueado e, portanto, não será possível utilizar a função de recuperação da palavra-chave, para prevenir o uso abusivo.",
        "eauthentsent": "Foi enviada uma mensagem de confirmação para o endereço de correio eletrónico que especificou.\nAntes que seja enviada qualquer outra mensagem para a conta, terá de seguir as instruções na mensagem enviada, de modo a confirmar que a conta lhe pertence.",
        "changeemail-text": "Preencha este formulário para alterar o endereço de correio eletrónico. Para confirmar esta alteração terá de introduzir a sua palavra-chave.",
        "changeemail-no-info": "Tem de autenticar-se para aceder diretamente a esta página.",
        "changeemail-oldemail": "Correio eletrónico atual:",
-       "changeemail-newemail": "Correio eletrónico novo:",
+       "changeemail-newemail": "Novo endereço de correio eletrónico:",
        "changeemail-none": "(nenhum)",
        "changeemail-password": "A sua senha na wiki {{SITENAME}}:",
        "changeemail-submit": "Alterar correio eletrónico",
        "bold_tip": "Texto a negrito",
        "italic_sample": "Texto em itálico",
        "italic_tip": "Texto em itálico",
-       "link_sample": "Título do link",
-       "link_tip": "Link interno",
-       "extlink_sample": "http://www.example.com link externo",
-       "extlink_tip": "Link externo (lembre-se do prefixo http://)",
+       "link_sample": "Título da ligação",
+       "link_tip": "Ligação interna",
+       "extlink_sample": "http://www.example.com ligação externa",
+       "extlink_tip": "Ligação externa (lembre-se do prefixo http://)",
        "headline_sample": "Texto do cabeçalho",
        "headline_tip": "Seção de nível 2",
        "nowiki_sample": "Inserir texto não-formatado aqui",
        "image_sample": "Exemplo.jpg",
        "image_tip": "Ficheiro incorporado",
        "media_sample": "Exemplo.ogg",
-       "media_tip": "Link para ficheiro",
+       "media_tip": "Ligação para ficheiro",
        "sig_tip": "A sua assinatura, com hora e data",
        "hr_tip": "Linha horizontal (utilize moderadamente)",
        "summary": "Resumo:",
        "accmailtitle": "Palavra-chave enviada.",
        "accmailtext": "Uma palavra-chave gerada aleatoriamente para [[User talk:$1|$1]] foi enviada para $2.\n\nEla pode ser alterada na página [[Special:ChangePassword|de alteração da palavra-chave]] após autenticação.",
        "newarticle": "(Nova)",
-       "newarticletext": "Seguiu um link para uma página que ainda não existe.\nPara criá-la, escreva o seu conteúdo na caixa abaixo (consulte a [$1 página de ajuda] para mais detalhes).\nSe chegou aqui por engano, clique o botão '''voltar''' (ou ''back'') do seu browser.",
+       "newarticletext": "Seguiu uma ligação para uma página que ainda não existe.\nPara criá-la, escreva o seu conteúdo na caixa abaixo (consulte a [$1 página de ajuda] para mais detalhes).\nSe chegou aqui por engano, clique o botão '''voltar''' (ou ''back'') do seu navegador.",
        "anontalkpagetext": "----''Esta é a página de discussão de um utilizador anónimo que ainda não criou uma conta ou não a utiliza, pelo que temos de utilizar o endereço IP para identificá-lo(a).\nUm endereço IP pode ser partilhado por vários utilizadores.\nSe é um utilizador anónimo e sente que lhe foram direccionados comentários irrelevantes, por favor [[Special:UserLogin/signup|crie uma conta]] ou [[Special:UserLogin|autentique-se]] para evitar futuras confusões com outros utilizadores anónimos.''",
        "noarticletext": "Ainda não existe texto nesta página.\nPode [[Special:Search/{{PAGENAME}}|pesquisar o título desta página]] noutras páginas,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} procurar registos relacionados]\nou [{{fullurl:{{FULLPAGENAME}}|action=edit}} editar esta página]</span>.",
        "noarticletext-nopermission": "Ainda não existe texto nesta página.\nPode [[Special:Search/{{PAGENAME}}|pesquisar o título desta página]] noutras páginas, ou <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} procurar nos registos relacionados]</span>, mas não tem permissão para criar esta página.",
-       "missing-revision": "A revisão #$1 da página denominada \"{{FULLPAGENAME}}\" não existe.\n\nIsto é geralmente causado por seguir um link de histórico desatualizado para uma página que foi eliminada.\nOs detalhes podem ser encontrados no [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} registo de eliminação].",
+       "missing-revision": "A revisão #$1 da página denominada \"{{FULLPAGENAME}}\" não existe.\n\nIsto é geralmente causado por seguir uma ligação de histórico desatualizada para uma página que foi eliminada.\nOs detalhes podem ser encontrados no [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} registo de eliminação].",
        "userpage-userdoesnotexist": "A conta \"<nowiki>$1</nowiki>\" não se encontra registada.\nVerifique se deseja realmente criar ou editar esta página, por favor.",
        "userpage-userdoesnotexist-view": "A conta de utilizador \"$1\" não está registada.",
        "blocked-notice-logextract": "Este utilizador está bloqueado.\nPara referência, o último registo de bloqueio é apresentado abaixo:",
        "mergehistory-from": "Página de origem:",
        "mergehistory-into": "Página de destino:",
        "mergehistory-list": "Histórico de edições fundíveis",
-       "mergehistory-merge": "As seguintes edições de [[:$1]] podem ser fundidas em [[:$2]].\nUsando os botões de opção, pode escolher fundir apenas as edições até àquela que marcar.\nNote que, se usar os links de navegação, os botões de opção voltarão aos valores originais.",
+       "mergehistory-merge": "As seguintes edições de [[:$1]] podem ser fundidas em [[:$2]].\nUsando os botões de opção, pode escolher fundir apenas as edições até àquela que marcar.\nNote que, se usar as ligações de navegação, os botões de opção voltarão aos valores originais.",
        "mergehistory-go": "Mostrar edições que podem ser fundidas",
        "mergehistory-submit": "Fundir edições",
        "mergehistory-empty": "Não existem revisões fundíveis.",
        "diff-multi-sameuser": "(Há {{PLURAL:$1|uma edição intermédia|$1 edições intermédias}} do mesmo utilizador que não estão a ser apresentadas)",
        "diff-multi-otherusers": "(Há {{PLURAL:$1|uma revisão intermédia|$1 revisões intermédias}} de {{PLURAL:$2|outro utilizador|$2 utilizadores}} que não {{PLURAL:$1|está a ser apresentada|estão a ser apresentadas}})",
        "diff-multi-manyusers": "({{PLURAL:$1|Uma edição intermédia|$1 edições intermédias}} de mais de {{PLURAL:$2|um utilizador|$2 utilizadores}} não {{PLURAL:$1|apresentada|apresentadas}})",
-       "difference-missing-revision": "{{PLURAL:$2|Uma revisão|$2 revisões}} desta diferença ($1) não {{PLURAL:$2|foi encontrada|foram encontradas}}.\n\nIsto é geralmente causado por seguir um link de histórico desatualizado para uma página que foi eliminada.\nOs detalhes podem ser encontrados no [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} registo de eliminação].",
+       "difference-missing-revision": "{{PLURAL:$2|Uma revisão|$2 revisões}} desta diferença ($1) não {{PLURAL:$2|foi encontrada|foram encontradas}}.\n\nIsto é geralmente causado por seguir uma ligação de histórico desatualizada para uma página que foi eliminada.\nOs detalhes podem ser encontrados no [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} registo de eliminação].",
        "searchresults": "Resultados da pesquisa",
        "searchresults-title": "Resultados da pesquisa de \"$1\"",
        "toomanymatches": "Foram devolvidos demasiados resultados; tente outro termo de pesquisa, por favor",
        "rows": "Linhas:",
        "columns": "Colunas:",
        "searchresultshead": "Pesquisar",
-       "stub-threshold": "Links para páginas curtas terão <a href=\"#\" class=\"stub\">este formato</a> se elas ocuparem menos de (bytes):",
+       "stub-threshold": "Ligações para páginas curtas terão <a href=\"#\" class=\"stub\">este formato</a> se ocuparem menos de (bytes):",
        "stub-threshold-disabled": "Desativado",
        "recentchangesdays": "Dias a apresentar nas mudanças recentes:",
        "recentchangesdays-max": "Máximo: $1 {{PLURAL:$1|dia|dias}}",
        "email": "Correio eletrónico",
        "prefs-help-realname": "O fornecimento do nome verdadeiro é opcional.\nSe optar por revelá-lo, ele será utilizado para atribuir-lhe crédito pelo seu trabalho.",
        "prefs-help-email": "Opcional: o endereço de correio eletrónico é opcional, mas será necessário para redefinir a palavra-chave caso esqueça a antiga.",
-       "prefs-help-email-others": "Também pode optar por permitir que outros entrem em contacto consigo por correio eletrónico, através de um link nas suas páginas de utilizador ou de discussão, sem revelar o seu endereço de correio eletrónico.",
+       "prefs-help-email-others": "Também pode optar por permitir que outros entrem em contacto consigo por correio eletrónico, através de uma ligação nas suas páginas de utilizador ou de discussão, sem revelar o seu endereço de correio eletrónico.",
        "prefs-help-email-required": "É necessário o endereço de correio eletrónico.",
        "prefs-info": "Informações básicas",
        "prefs-i18n": "Internacionalização",
        "recentchangeslinked-feed": "Alterações relacionadas",
        "recentchangeslinked-toolbox": "Alterações relacionadas",
        "recentchangeslinked-title": "Alterações relacionadas com \"$1\"",
-       "recentchangeslinked-summary": "Lista das mudanças recentes a todas as páginas para as quais a página fornecida contém links (ou de todas as que pertencem à categoria fornecida).\nAs suas [[Special:Watchlist|páginas vigiadas]] aparecem a '''negrito'''.",
+       "recentchangeslinked-summary": "Lista das mudanças recentes a todas as páginas para as quais a página fornecida contém ligações (ou de todas as que pertencem à categoria fornecida).\nAs suas [[Special:Watchlist|páginas vigiadas]] aparecem a '''negrito'''.",
        "recentchangeslinked-page": "Nome da página:",
-       "recentchangeslinked-to": "Inversamente, mostrar mudanças às páginas que contêm links para esta",
+       "recentchangeslinked-to": "Inversamente, mostrar mudanças às páginas que contêm ligações para esta",
        "upload": "Carregar ficheiro",
        "uploadbtn": "Carregar ficheiro",
        "reuploaddesc": "Cancelar o envio e voltar ao formulário de carregamento",
        "upload_directory_read_only": "O servidor de internet não possui permissão de escrita no diretório de carregamento de ficheiros ($1).",
        "uploaderror": "Erro ao carregar",
        "upload-recreate-warning": "'''Aviso: Um ficheiro com esse nome foi eliminado ou movido.'''\n\nPara sua conveniência, é apresentado de seguida o registo de eliminação e de movimento da página:",
-       "uploadtext": "Utilize o formulário abaixo para fazer upload de ficheiros novos.\nPara ver ou pesquisar ficheiros anteriormente enviados, consulte a [[Special:FileList|lista de ficheiros]].\nOs reenvios de um ficheiro são também registados no [[Special:Log/upload|registo de uploads]] e as eliminações no [[Special:Log/delete|registo de eliminações]].\n\nPara utilizar um ficheiro numa página, depois de ter feito o upload, insira um link com um dos seguintes formatos:\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:ficheiro.jpg]]</nowiki></code>''' para mostrar uma imagem nas suas dimensões originais;\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:ficheiro.png|200px|thumb|left|texto]]</nowiki></code>''' para mostrar uma imagem com a dimensão horizontal de 200 pixels, dentro de uma caixa, na margem esquerda, contendo 'texto' como descrição (pode usar subconjuntos destas características);\n* '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:ficheiro.ogg]]</nowiki></code>''' para apresentar um link direto para o ficheiro em vez de mostrá-lo, quer este tenha por conteúdo uma imagem ou outros dados.",
+       "uploadtext": "Utilize o formulário abaixo para fazer o carregamento de novos ficheiros.\nPara ver ou pesquisar ficheiros anteriormente enviados, consulte a [[Special:FileList|lista de ficheiros]].\nOs reenvios de um ficheiro são também registados no [[Special:Log/upload|registo de carregamentos]] e as eliminações no [[Special:Log/delete|registo de eliminações]].\n\nPara utilizar um ficheiro numa página, depois de ter feito o upload, insira uma ligação com um dos seguintes formatos:\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:ficheiro.jpg]]</nowiki></code>''' para mostrar uma imagem nas suas dimensões originais;\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:ficheiro.png|200px|thumb|left|texto]]</nowiki></code>''' para mostrar uma imagem com a dimensão horizontal de 200 pixels, dentro de uma caixa, na margem esquerda, contendo 'texto' como descrição (pode usar subconjuntos destas características);\n* '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:ficheiro.ogg]]</nowiki></code>''' para apresentar uma ligação direta para o ficheiro em vez de mostrá-lo, quer este tenha por conteúdo uma imagem ou outros dados.",
        "upload-permitted": "Tipos de ficheiro permitidos: $1.",
        "upload-preferred": "Tipos de ficheiro preferidos: $1.",
        "upload-prohibited": "Tipos de ficheiro proibidos: $1.",
        "filehist-filesize": "Tamanho do ficheiro",
        "filehist-comment": "Comentário",
        "imagelinks": "Uso do ficheiro",
-       "linkstoimage": "{{PLURAL:$1|A seguinte página contém|As seguintes $1 páginas contêm}} links para este ficheiro:",
-       "linkstoimage-more": "Mais de {{PLURAL:$1|uma página contém|$1 páginas contêm}} links para este ficheiro.\nA lista abaixo apresenta apenas {{PLURAL:$1|a primeira página|as primeiras $1 páginas}}.\nEncontra-se disponível uma [[Special:WhatLinksHere/$2|lista completa]].",
-       "nolinkstoimage": "Nenhuma página contém links para este ficheiro.",
-       "morelinkstoimage": "Ver a [[Special:WhatLinksHere/$1|lista completa]] de páginas que contêm links para este ficheiro.",
+       "linkstoimage": "{{PLURAL:$1|A seguinte página contém ligação|As seguintes $1 páginas contêm ligações}} para este ficheiro:",
+       "linkstoimage-more": "Mais de {{PLURAL:$1|uma página contém ligação|$1 páginas contêm ligações}} para este ficheiro.\nA lista abaixo apresenta apenas {{PLURAL:$1|a primeira página|as primeiras $1 páginas}}.\nEncontra-se disponível uma [[Special:WhatLinksHere/$2|lista completa]].",
+       "nolinkstoimage": "Nenhuma página contém ligação para este ficheiro.",
+       "morelinkstoimage": "Ver a [[Special:WhatLinksHere/$1|lista completa]] de páginas que contêm ligações para este ficheiro.",
        "linkstoimage-redirect": "$1 (redirecionamento de ficheiro) $2",
        "duplicatesoffile": "{{PLURAL:$1|O seguinte ficheiro é duplicado|Os seguintes $1 ficheiros são duplicados}} deste ficheiro ([[Special:FileDuplicateSearch/$2|mais detalhes]]):",
        "sharedupload": "Este ficheiro provém de $1 e pode ser usado por outros projetos.",
        "listduplicatedfiles-summary": "Esta é uma lista de ficheiros cuja suas versões mais recentes são duplicatas da versão mais recente de outros ficheiros. Somente os ficheiros locais são considerados.",
        "listduplicatedfiles-entry": "[[:File:$1|$1]] possui [[$3|{{PLURAL:$2|uma duplicata|$2 duplicatas}}]].",
        "unusedtemplates": "Predefinições não utilizadas",
-       "unusedtemplatestext": "Esta página lista todas as páginas no espaço nominal {{ns:template}} que não são incluídas em nenhuma outra página. Lembre-se de verificar a existência de outros links para as predefinições, antes de eliminá-las.",
-       "unusedtemplateswlh": "outros links",
+       "unusedtemplatestext": "Esta página lista todas as páginas no espaço nominal {{ns:template}} que não são incluídas em nenhuma outra página. Lembre-se de verificar a existência de outras ligações para as predefinições, antes de eliminá-las.",
+       "unusedtemplateswlh": "outras ligações",
        "randompage": "Página aleatória",
        "randompage-nopages": "Não há páginas {{PLURAL:$2|no seguinte espaço nominal|nos seguintes espaços nominais}}: $1.",
        "randomincategory": "Página aleatória na categoria",
        "pageswithprop-prophidden-long": "foi ocultado o valor da propriedade por ser um texto muito longo ($1)",
        "pageswithprop-prophidden-binary": "foi ocultado o valor da propriedade por ser binário ($1)",
        "doubleredirects": "Redirecionamentos duplos",
-       "doubleredirectstext": "Esta página lista todas as páginas que redirecionam para outras páginas de redirecionamento.\nCada linha contém links para o primeiro e segundo redirecionamentos, bem como o destino do segundo redirecionamento, geralmente contendo a verdadeira página de destino, que devia ser o destino do primeiro redirecionamento.\n<del>Entradas cortadas</del> já foram solucionadas.",
+       "doubleredirectstext": "Esta página lista todas as páginas que redirecionam para outras páginas de redirecionamento.\nCada linha contém ligações para o primeiro e segundo redirecionamentos, bem como o destino do segundo redirecionamento, geralmente contendo a verdadeira página de destino, que devia ser o destino do primeiro redirecionamento.\n<del>Entradas cortadas</del> já foram solucionadas.",
        "double-redirect-fixed-move": "[[$1]] foi movida.\nEla foi actualizada automaticamente e agora redirecciona para [[$2]].",
        "double-redirect-fixed-maintenance": "A corrigir automaticamente o redirecionamento duplo de [[$1]] para [[$2]], em um trabalho de manutenção.",
        "double-redirect-fixer": "Corretor de redirecionamentos",
        "brokenredirects": "Redirecionamentos quebrados",
-       "brokenredirectstext": "Os seguintes redirecionamentos ligam para páginas inexistentes:",
+       "brokenredirectstext": "Os seguintes redirecionamentos contêm ligações para páginas inexistentes:",
        "brokenredirects-edit": "editar",
        "brokenredirects-delete": "eliminar",
-       "withoutinterwiki": "Páginas sem links interlínguas",
-       "withoutinterwiki-summary": "As seguintes páginas não têm ligação para versões noutras línguas.",
+       "withoutinterwiki": "Páginas sem ligações interlínguas",
+       "withoutinterwiki-summary": "As seguintes páginas não têm ligação para versões noutros idiomas.",
        "withoutinterwiki-legend": "Prefixo",
        "withoutinterwiki-submit": "Mostrar",
        "fewestrevisions": "Páginas com menos revisões",
        "ntransclusions": "usada {{PLURAL:$1|numa página|em $1 páginas}}",
        "specialpage-empty": "Não existem dados para apresentar.",
        "lonelypages": "Páginas órfãs",
-       "lonelypagestext": "As seguintes páginas não são destino de links nem são transcluídas a partir de outras páginas na {{SITENAME}}.",
+       "lonelypagestext": "As seguintes páginas não são destino de ligação nem são transcluídas a partir de outras páginas na {{SITENAME}}.",
        "uncategorizedpages": "Páginas não categorizadas",
        "uncategorizedcategories": "Categorias não categorizadas",
        "uncategorizedimages": "Ficheiros não categorizados",
        "shortpages": "Páginas curtas",
        "longpages": "Páginas longas",
        "deadendpages": "Páginas sem saída",
-       "deadendpagestext": "As seguintes páginas não contêm links para outras páginas na {{SITENAME}}.",
+       "deadendpagestext": "As seguintes páginas não contêm ligações para outras páginas em {{SITENAME}}.",
        "protectedpages": "Páginas protegidas",
        "protectedpages-indef": "Apenas proteções indefinidas",
        "protectedpages-summary": "Esta página lista páginas existentes que estão protegidas. Para ver os títulos cuja criação está impossibilitada, consulte [[{{#special:ProtectedTitles}}|{{int:protectedtitles}}]].",
        "ancientpages": "Páginas mais antigas",
        "move": "Mover",
        "movethispage": "Mover esta página",
-       "unusedimagestext": "Os seguintes ficheiros existem mas não são usados na wiki.\nNo entanto, outros sites na internet podem ter links para um ficheiro através de uma URL direta e, por isso, podem estar listados ficheiros que estão a ser ativamente usados por entidades externas.",
+       "unusedimagestext": "Os seguintes ficheiros existem mas não são usados na wiki.\nNo entanto, outros sítios na Internet podem ter ligação para um ficheiro através de uma URL direta e, por isso, podem estar listados ficheiros que estão a ser ativamente usados por entidades externas.",
        "unusedcategoriestext": "As seguintes categorias existem, embora nenhuma página ou categoria faça uso delas.",
        "notargettitle": "Sem alvo",
        "notargettext": "Especifique sobre que página alvo ou utilizador pretende executar esta função.",
        "booksources": "Fontes bibliográficas",
        "booksources-search-legend": "Pesquisar referências bibliográficas",
        "booksources-go": "Prosseguir",
-       "booksources-text": "É apresentada abaixo uma lista de links para outros sites na internet que vendem livros novos e usados e talvez possuam informações adicionais sobre os livros que procura:",
+       "booksources-text": "É apresentada abaixo uma lista de ligações para outros sítios na Internet que vendem livros novos e usados e talvez possuam informações adicionais sobre os livros que procura:",
        "booksources-invalid-isbn": "O número ISBN fornecido não parece ser válido; verifique a existência de erros ao copiar da fonte original.",
        "specialloguserlabel": "Executante:",
        "speciallogtitlelabel": "Alvo (página ou utilizador):",
        "linksearch-ns": "Espaço nominal:",
        "linksearch-ok": "Prosseguir",
        "linksearch-text": "É possível usar caracteres de substituição ''(wildcards)'', tais como \"*.wikipedia.org\".\nÉ necessário, pelo menos, um domínio de topo, por exemplo \"*.org\".<br />\n{{PLURAL:$2|Protocolo suportado|Protocolos suportados}}: <code>$1</code> (será utilizado http:// se não for especificado um protocolo).",
-       "linksearch-line": "Link para $1 na página $2",
+       "linksearch-line": "Ligação para $1 na página $2",
        "linksearch-error": "Caracteres de substituição ''(wildcards)'' só podem ser usados no início do endereço.",
        "listusersfrom": "Mostrar utilizadores começando por:",
        "listusers-submit": "Mostrar",
        "undeleterevdel": "O restauro não será efetuado se resulta na remoção parcial da versão mais recente da página ou ficheiro.\nNestes casos, deverá desmarcar ou revelar a versão eliminada mais recente.",
        "undeletehistorynoadmin": "Esta página foi eliminada. O motivo de eliminação é apresentado no sumário abaixo, junto dos detalhes do utilizador que editou esta página antes de eliminar. O texto atual destas edições eliminadas encontra-se agora apenas disponível para administradores.",
        "undelete-revision": "Edição eliminada da página $1 (das $5 de $4), por $3:",
-       "undeleterevision-missing": "Edição inválida ou não encontrada.\nPode ter usado um link incorreto ou talvez a revisão tenha sido restaurada ou removida do arquivo.",
+       "undeleterevision-missing": "Edição inválida ou não encontrada.\nPode ter usado uma ligação incorreta ou talvez a revisão tenha sido restaurada ou removida do arquivo.",
        "undelete-nodiff": "Não foram encontradas edições anteriores.",
        "undeletebtn": "Restaurar",
        "undeletelink": "ver/restaurar",
        "sp-contributions-newonly": "Mostrar só edições que são criações de páginas",
        "sp-contributions-submit": "Pesquisar",
        "whatlinkshere": "Páginas afluentes",
-       "whatlinkshere-title": "Páginas que têm links para \"$1\"",
+       "whatlinkshere-title": "Páginas que têm ligações para \"$1\"",
        "whatlinkshere-page": "Página:",
        "linkshere": "As seguintes páginas têm ligação a '''[[:$1]]''':",
        "nolinkshere": "Não existem afluentes para '''[[:$1]]''' com as condições especificadas.",
-       "nolinkshere-ns": "Não existem links para '''[[:$1]]''' no espaço nominal selecionado.",
+       "nolinkshere-ns": "Não existem ligações para '''[[:$1]]''' no espaço nominal selecionado.",
        "isredirect": "página de redirecionamento",
        "istemplate": "inclusão",
-       "isimage": "link para o ficheiro",
+       "isimage": "ligação para ficheiro",
        "whatlinkshere-prev": "{{PLURAL:$1|anterior|$1 anteriores}}",
        "whatlinkshere-next": "{{PLURAL:$1|próximo|próximos $1}}",
-       "whatlinkshere-links": "← links",
+       "whatlinkshere-links": "← ligações",
        "whatlinkshere-hideredirs": "$1 redirecionamentos",
        "whatlinkshere-hidetrans": "$1 transclusões",
-       "whatlinkshere-hidelinks": "$1 links",
-       "whatlinkshere-hideimages": "$1 links para ficheiros",
+       "whatlinkshere-hidelinks": "$1 ligações",
+       "whatlinkshere-hideimages": "$1 ligações para ficheiros",
        "whatlinkshere-filters": "Filtros",
        "autoblockid": "Bloqueio automático nº$1",
        "block": "Bloquear utilizador",
        "ipaddressorusername": "Endereço IP ou nome de utilizador:",
        "ipbexpiry": "Expiração:",
        "ipbreason": "Motivo:",
-       "ipbreason-dropdown": "*Razões comuns para um bloqueio\n** Inserção de informações falsas\n** Remoção de conteúdos de páginas\n** Inserção de \"spam\" para sites externos\n** Inserção de conteúdo sem sentido/incompreensível nas páginas\n** Comportamento intimidador/inoportuno\n** Uso abusivo de contas múltiplas\n** Nome de utilizador inaceitável",
+       "ipbreason-dropdown": "*Razões comuns para um bloqueio\n** Inserção de informações falsas\n** Remoção de conteúdos de páginas\n** Inserção de \"spam\" para sítios externos\n** Inserção de conteúdo sem sentido/incompreensível nas páginas\n** Comportamento intimidador/inoportuno\n** Uso abusivo de contas múltiplas\n** Nome de utilizador inaceitável",
        "ipb-hardblock": "Impedir que utilizadores autenticados editem a partir deste endereço IP",
        "ipbcreateaccount": "Impedir criação de contas de utilizador",
        "ipbemailban": "Impedir utilizador de enviar correio eletrónico",
        "anononlyblock": "apenas anón.",
        "noautoblockblock": "bloqueio automático desativado",
        "createaccountblock": "criação de conta bloqueada",
-       "emailblock": "correio eletrónico bloqueado",
+       "emailblock": "correio electrónico desactivado",
        "blocklist-nousertalk": "impedido de editar a própria página de discussão",
        "ipblocklist-empty": "A lista de bloqueios encontra-se vazia.",
        "ipblocklist-no-results": "O endereço IP ou nome de utilizador procurado não se encontra bloqueado.",
        "block-log-flags-anononly": "apenas utilizadores anónimos",
        "block-log-flags-nocreate": "criação de contas impossibilitada",
        "block-log-flags-noautoblock": "bloqueio automático desativado",
-       "block-log-flags-noemail": "correio eletrónico bloqueado",
+       "block-log-flags-noemail": "correio electrónico desactivado",
        "block-log-flags-nousertalk": "impossibilitado de editar a própria página de discussão",
        "block-log-flags-angry-autoblock": "ativado o bloqueio automático melhorado",
        "block-log-flags-hiddenname": "nome de usuário ocultado",
        "lockedbyandtime": "(por $1 em $2 às $3)",
        "move-page": "Mover $1",
        "move-page-legend": "Mover página",
-       "movepagetext": "Usando o formulário abaixo pode mover esta página e todo o seu histórico de edições para uma página nova com outro nome.\nA página original será transformada num redirecionamento para a página nova.\nPode corrigir de forma automática os redirecionamentos existentes que apontam para a página original.\nCaso escolha não o fazer, após a operação certifique-se de que dela não resultaram  [[Special:DoubleRedirects|redirecionamentos duplos]] ou [[Special:BrokenRedirects|quebrados]].\nÉ da sua responsabilidade verificar que os links continuam a apontar para onde é suposto que apontem.\n\nNote que a página '''não''' será movida se já existir uma página com o novo título, a menos que esta última seja um redirecionamento sem qualquer histórico de edições.\nIsto significa que pode mover uma página de volta para o seu nome original se a tiver movido por engano e que não pode mover uma página para cima de outra já existente.\n\n'''CUIDADO!'''\nNuma página popular esta operação pode representar uma mudança drástica e inesperada;\ncertifique-se de que compreende as consequências da mudança antes de prosseguir, por favor.",
-       "movepagetext-noredirectfixer": "Usando o formulário abaixo, pode alterar o nome de uma página e mover todo o histórico desta para o nome novo.\nA página antiga é transformada numa página de redirecionamento para a nova.\nVerifique a existência de [[Special:DoubleRedirects|redirecionamentos duplos]] ou [[Special:BrokenRedirects|quebrados]].\nÉ da sua responsabilidade certificar-se de que os links continuam a apontar para onde é suposto.\n\nNote que a página '''não''' será movida se já existir uma página com o nome novo, a menos que esta página já existente esteja vazia ou seja uma página de redirecionamento e não tenha um histórico de edições.\nIsto também significa que, se se tiver enganado, pode alterar o nome da página movida de volta para o seu nome original; e que não pode sobrescrever o conteúdo de uma página existente.\n\n'''Aviso!'''\nPara páginas populares, esta operação pode representar uma mudança drástica e inesperada;\ncertifique-se de que compreende as consequências da operação antes de continuar.",
+       "movepagetext": "Usando o formulário abaixo pode mover esta página e todo o seu histórico de edições para uma página nova com outro nome.\nA página original será transformada num redirecionamento para a página nova.\nPode corrigir de forma automática os redirecionamentos existentes que apontam para a página original.\nCaso escolha não o fazer, após a operação certifique-se de que dela não resultaram  [[Special:DoubleRedirects|redirecionamentos duplos]] ou [[Special:BrokenRedirects|quebrados]].\nÉ da sua responsabilidade verificar que as ligações continuam a apontar para onde é suposto que apontem.\n\nNote que a página '''não''' será movida se já existir uma página com o novo título, a menos que esta última seja um redirecionamento sem qualquer histórico de edições.\nIsto significa que pode mover uma página de volta para o seu nome original se a tiver movido por engano e que não pode mover uma página para cima de outra já existente.\n\n'''CUIDADO!'''\nNuma página popular esta operação pode representar uma mudança drástica e inesperada;\ncertifique-se de que compreende as consequências da mudança antes de prosseguir, por favor.",
+       "movepagetext-noredirectfixer": "Usando o formulário abaixo, pode alterar o nome de uma página e mover todo o histórico desta para o nome novo.\nA página antiga é transformada numa página de redirecionamento para a nova.\nVerifique a existência de [[Special:DoubleRedirects|redirecionamentos duplos]] ou [[Special:BrokenRedirects|quebrados]].\nÉ da sua responsabilidade certificar-se de que as ligações continuam a apontar para onde é suposto.\n\nNote que a página '''não''' será movida se já existir uma página com o nome novo, a menos que esta página já existente esteja vazia ou seja uma página de redirecionamento e não tenha um histórico de edições.\nIsto também significa que, se se tiver enganado, pode alterar o nome da página movida de volta para o seu nome original; e que não pode sobrescrever o conteúdo de uma página existente.\n\n'''Aviso!'''\nPara páginas populares, esta operação pode representar uma mudança drástica e inesperada;\ncertifique-se de que compreende as consequências da operação antes de continuar.",
        "movepagetalktext": "Se existir uma página de discussão associada, ela será automaticamente movida, '''a não ser que:'''\n*já exista uma página de discussão com o novo título que não esteja vazia, ou\n*desmarque a correspondente caixa de seleção abaixo.\n\nNestes casos, terá de mover a página de discussão manualmente, ou fundi-la com a existente, se assim desejar.",
        "movearticle": "Mover página",
        "moveuserpage-warning": "'''Aviso:''' Está prestes a mover uma página de utilizador. Note que a página será apenas movida, ''sem'' alterar o nome do utilizador.",
        "selfmove": "Os títulos de origem e destino são iguais;\nnão é possível mover uma página para ela mesma.",
        "immobile-source-namespace": "Não é possível mover páginas no espaço nominal \"$1\"",
        "immobile-target-namespace": "Não é possível mover páginas para o espaço nominal \"$1\"",
-       "immobile-target-namespace-iw": "Um link interwikis não é um destino válido para uma movimentação de página.",
+       "immobile-target-namespace-iw": "Uma ligação interlíngua não é um destino válido para uma movimentação de página.",
        "immobile-source-page": "Esta página não pode ser movida.",
        "immobile-target-page": "Não é possível mover para esse título de destino.",
        "bad-target-model": "O destino pretendido usa um modelo de conteúdo diferente. Não é possível converter de $1 para $2.",
        "importfailed": "A importação falhou: $1",
        "importunknownsource": "Tipo da fonte de importação desconhecido",
        "importcantopen": "Não foi possível abrir o ficheiro a importar",
-       "importbadinterwiki": "Link interwikis incorrecto",
+       "importbadinterwiki": "Ligação interlíngua incorreta",
        "importsuccess": "Importação completa!",
        "importnosources": "Não foram definidas fontes de importação transwikis e o carregamento direto de históricos encontra-se desativado.",
        "importnofile": "Nenhum ficheiro de importação foi carregado.",
        "import-invalid-interwiki": "Não é possível importar da wiki especificada.",
        "import-error-edit": "A página \"$1\" não foi importada porque você não tem permissão para editá-la.",
        "import-error-create": "A página \"$1\" não foi importada porque você não tem permissão para criá-la.",
-       "import-error-interwiki": "A página \"$1\" não pode ser importada pois seu nome está reservado para um link externo (interwiki).",
+       "import-error-interwiki": "A página \"$1\" não pode ser importada pois o seu nome está reservado para um ligação externa (interlíngua).",
        "import-error-special": "A página \"$1\" não pode ser importada porque ela pertence a um espaço nominal especial que não permite páginas.",
        "import-error-invalid": "A página \"$1\" não pode ser importada porque seu nome é inválido.",
        "import-error-unserialize": "Revisão $2 da página \"$1\" não pode ser desserializada. Foi relatado que a revisão usava o modelo de conteúdo $3 serializado como $4.",
        "tooltip-n-recentchanges": "A lista de mudanças recentes nesta wiki.",
        "tooltip-n-randompage": "Carregar página aleatória",
        "tooltip-n-help": "Um local reservado para auxílio.",
-       "tooltip-t-whatlinkshere": "Lista de todas as páginas que contêm links para esta",
-       "tooltip-t-recentchangeslinked": "Mudanças recentes nas páginas para as quais esta contém links",
+       "tooltip-t-whatlinkshere": "Lista de todas as páginas que contêm ligações para esta",
+       "tooltip-t-recentchangeslinked": "Mudanças recentes nas páginas para as quais esta contém ligação",
        "tooltip-feed-rss": "''Feed'' RSS desta página",
        "tooltip-feed-atom": "''Feed'' Atom desta página",
        "tooltip-t-contributions": "Ver as contribuições deste utilizador",
        "tooltip-t-upload": "Upload de ficheiros",
        "tooltip-t-specialpages": "Lista de páginas especiais",
        "tooltip-t-print": "Versão para impressão desta página",
-       "tooltip-t-permalink": "Link permanente para esta versão desta página",
+       "tooltip-t-permalink": "Ligação permanente para esta versão desta página",
        "tooltip-ca-nstab-main": "Ver a página de conteúdo",
        "tooltip-ca-nstab-user": "Ver a página de utilizador",
        "tooltip-ca-nstab-media": "Ver a página de multimédia",
        "creditspage": "Créditos da página",
        "nocredits": "Não há informação disponível sobre os créditos desta página.",
        "spamprotectiontitle": "Filtro de proteção contra spam",
-       "spamprotectiontext": "A página que deseja gravar foi bloqueada pelo filtro de ''spam''.\nEste bloqueio foi provavelmente causado por um link para um site externo que consta da lista negra.",
+       "spamprotectiontext": "A página que deseja gravar foi bloqueada pelo filtro de ''spam''.\nEste bloqueio foi provavelmente causado por uma ligação para um sítio externo que consta da lista negra.",
        "spamprotectionmatch": "O seguinte texto activou o filtro de spam: $1",
        "spambot_username": "MediaWiki limpeza de spam",
-       "spam_reverting": "A reverter para a última revisão que não contém links para $1",
-       "spam_blanking": "Todas as revisões continham links para $1; a esvaziar",
-       "spam_deleting": "Todas as revisões continham links para $1; a eliminar",
+       "spam_reverting": "A reverter para a última revisão que não contém ligação para $1",
+       "spam_blanking": "Todas as revisões continham ligações para $1; a esvaziar",
+       "spam_deleting": "Todas as revisões continham ligações para $1; a eliminar",
        "simpleantispam-label": "Verificação contra spam.\n<strong>NÃO</strong> preencha isto!",
        "pageinfo-title": "Informações sobre \"$1\"",
        "pageinfo-not-current": "Desculpe, é impossível fornecer esta informação para revisões antigas.",
        "newimages-summary": "Esta página especial mostra os ficheiros mais recentemente enviados.",
        "newimages-legend": "Filtrar",
        "newimages-label": "Nome de ficheiro (ou parte dele):",
+       "newimages-showbots": "Mostrar carregamentos feitos por robôs",
        "noimages": "Nada para ver.",
        "ilsubmit": "Pesquisar",
        "bydate": "por data",
        "saturday-at": "Sábado às $1",
        "sunday-at": "Domingo às $1",
        "yesterday-at": "Ontem às $1",
-       "bad_image_list": "O formato é o seguinte:\n\nSó são reconhecidos elementos na forma de lista (linhas começadas por *).\nO primeiro link em cada linha deve apontar para o ficheiro que se pretende bloquear.\nQuaisquer outros links nessa mesma linha são considerados excepções (ou seja, páginas de onde se pode aceder ao ficheiro).",
+       "bad_image_list": "O formato é o seguinte:\n\nSó são reconhecidos elementos na forma de lista (linhas começadas por *).\nO primeiro link em cada linha deve apontar para o ficheiro que se pretende bloquear.\nQuaisquer outras ligações nessa mesma linha são considerados excepções (ou seja, páginas de onde se pode aceder ao ficheiro).",
        "metadata": "Metadados",
        "metadata-help": "Este ficheiro contém informação adicional, provavelmente acrescentada pela câmara digital ou pelo digitalizador usados para criá-lo.\nCaso o ficheiro tenha sido modificado a partir do seu estado original, alguns detalhes poderão não refletir completamente as mudanças efetuadas.",
        "metadata-expand": "Mostrar detalhes adicionais",
        "exif-originaldocumentid": "Identificação exclusiva do documento original",
        "exif-licenseurl": "URL da licença",
        "exif-morepermissionsurl": "Informações para licenciamento alternativo",
-       "exif-attributionurl": "Ao reutilizar esta obra, coloque um link para",
+       "exif-attributionurl": "Ao reutilizar esta obra, faça a atribuição a",
        "exif-preferredattributionname": "Ao reutilizar esta obra, faça a atribuição a",
        "exif-pngfilecomment": "Comentário de ficheiro PNG",
        "exif-disclaimer": "Exoneração de responsabilidade",
        "monthsall": "todos",
        "confirmemail": "Confirmar endereço de correio eletrónico",
        "confirmemail_noemail": "Não tem um endereço de correio eletrónico válido nas suas [[Special:Preferences|preferências de utilizador]].",
-       "confirmemail_text": "A {{SITENAME}} requer que valide o seu endereço de correio eletrónico antes de usar as funcionalidades de correio.\nClique o botão abaixo para enviar uma mensagem de confirmação para o seu endereço.\nA mensagem incluirá uma URL que contém um código;\ninsira a URL no seu browser para confirmar que o seu endereço de correio eletrónico é válido.",
+       "confirmemail_text": "{{SITENAME}} requer que valide o seu endereço de correio eletrónico antes de usar as funcionalidades de correio.\nClique o botão abaixo para enviar uma mensagem de confirmação para o seu endereço.\nA mensagem incluirá uma URL que contém um código;\ninsira a URL no seu navegador para confirmar que o seu endereço de correio eletrónico é válido.",
        "confirmemail_pending": "Um código de confirmação já lhe foi enviado;\ncaso tenha criado a conta recentemente, é recomendado que aguarde alguns minutos até o receber antes de tentar pedir um novo código.",
        "confirmemail_send": "Enviar código de confirmação",
        "confirmemail_sent": "Correio de confirmação enviado.",
        "confirmemail_success": "O seu endereço de correio eletrónico foi confirmado.\nPode agora [[Special:UserLogin|autenticar-se]] e desfrutar da wiki.",
        "confirmemail_loggedin": "O seu endereço de correio eletrónico foi confirmado.",
        "confirmemail_subject": "Confirmação de endereço de correio eletrónico da {{SITENAME}}",
-       "confirmemail_body": "Alguém, provavelmente você a partir do endereço IP $1,\nregistou uma conta \"$2\" com este endereço de correio eletrónico na {{SITENAME}}.\n\nPara confirmar que esta conta é realmente sua e ativar\nas funcionalidades de correio eletrónico na {{SITENAME}},\nabra o seguinte link no seu browser:\n\n$3\n\nSe a conta *não* é sua, abra o seguinte link para cancelar\na confirmação do endereço de correio eletrónico:\n\n$5\n\nEste código de confirmação expira a $4.",
-       "confirmemail_body_changed": "Alguém, provavelmente você a partir do endereço IP $1,\nalterou o endereço de correio eletrónico da conta \"$2\" para este na {{SITENAME}}.\n\nPara confirmar que esta conta é realmente sua e reativar\nas funcionalidades de correio eletrónico na {{SITENAME}},\nabra o seguinte link no seu browser:\n\n$3\n\nCaso a conta *não* lhe pertença, abra o seguinte link\npara cancelar a confirmação do endereço de correio eletrónico:\n\n$5\n\nEste código de confirmação expira a $4.",
-       "confirmemail_body_set": "Alguém, provavelmente você a partir do endereço IP $1,\ndefiniu o seu endereço de correio eletrónico como correio da conta \"$2\" na {{SITENAME}}.\n\nPara confirmar que esta conta é realmente sua e reativar\nas funcionalidades de correio eletrónico na {{SITENAME}},\nabra o seguinte link no seu browser:\n\n$3\n\nCaso a conta *não* lhe pertença, abra o seguinte link\npara cancelar a confirmação do endereço de correio eletrónico:\n\n$5\n\nEste código de confirmação expira a $4.",
+       "confirmemail_body": "Alguém, provavelmente você a partir do endereço IP $1,\nregistou uma conta \"$2\" com este endereço de correio electrónico em {{SITENAME}}.\n\nPara confirmar que esta conta é realmente sua e activar\nas funcionalidades de correio electrónico em {{SITENAME}}, abra a seguinte ligação no seu navegador:\n\n$3\n\nSe a conta *não* é sua, abra a seguinte ligação para cancelar a confirmação do endereço de correio electrónico:\n\n$5\n\nEste código de confirmação expira a $4.",
+       "confirmemail_body_changed": "Alguém, provavelmente você a partir do endereço IP $1,\nalterou o endereço de correio eletrónico da conta \"$2\" para este em {{SITENAME}}.\n\nPara confirmar que esta conta é realmente sua e reativar\nas funcionalidades de correio eletrónico em {{SITENAME}},\nabra o seguinte ligação no seu navegador:\n\n$3\n\nCaso a conta *não* lhe pertença, abra a seguinte ligação\npara cancelar a confirmação do endereço de correio eletrónico:\n\n$5\n\nEste código de confirmação expira a $4.",
+       "confirmemail_body_set": "Alguém, provavelmente você a partir do endereço IP $1,\ndefiniu o seu endereço de correio eletrónico como correio da conta \"$2\" em {{SITENAME}}.\n\nPara confirmar que esta conta é realmente sua e reativar\nas funcionalidades de correio eletrónico em {{SITENAME}},\nabra a seguinte ligação no seu navegador:\n\n$3\n\nCaso a conta *não* lhe pertença, abra a seguinte ligação\npara cancelar a confirmação do endereço de correio eletrónico:\n\n$5\n\nEste código de confirmação expira a $4.",
        "confirmemail_invalidated": "Confirmação de endereço de correio eletrónico cancelada",
        "invalidateemail": "Cancelar confirmação do correio eletrónico",
        "scarytranscludedisabled": "[Transclusão interwikis foi impossibilitada]",
        "watchlistedit-raw-done": "A sua lista de páginas vigiadas foi atualizada.",
        "watchlistedit-raw-added": "{{PLURAL:$1|Foi adicionada uma página|Foram adicionadas $1 páginas}}:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|Foi removida uma página|Foram removidas $1 páginas}}:",
+       "watchlistedit-clear-title": "Lista de páginas vigiadas limpa",
+       "watchlistedit-clear-legend": "Limpar lista de páginas vigiadas",
+       "watchlistedit-clear-explain": "Todos os títulos serão removidos da sua lista de páginas vigiadas.",
+       "watchlistedit-clear-titles": "Páginas:",
+       "watchlistedit-clear-submit": "Limpar páginas vigiadas (isto é permanente!)",
+       "watchlistedit-clear-done": "A sua lista de páginas vigiadas foi limpa.",
+       "watchlistedit-clear-removed": "{{PLURAL:$1|1 página foi removida|$1 páginas foram removidas}}:",
+       "watchlistedit-too-many": "Existem demasiadas páginas para exibir.",
+       "watchlisttools-clear": "Limpar lista de páginas vigiadas",
        "watchlisttools-view": "Ver alterações relevantes",
        "watchlisttools-edit": "Ver e editar a lista de páginas vigiadas",
        "watchlisttools-raw": "Editar a lista de páginas vigiadas em forma de texto",
        "specialpages-group-spam": "Ferramentas anti-spam",
        "blankpage": "Página em branco",
        "intentionallyblankpage": "Esta página foi intencionalmente deixada em branco",
-       "external_image_whitelist": " # Deixe esta linha exatamente como ela está<pre>\n# Coloque fragmentos de expressões regulares (apenas a parte entre //) abaixo\n# Estas serão comparadas com as URLs das imagens externas (com link direto)\n# As que corresponderem serão apresentadas como imagens, caso contrário apenas será apresentado um link para a imagem\n# As linhas que começam com um símbolo de cardinal (#) são tratadas como comentários\n# Esta lista não distingue maiúsculas de minúsculas\n\n# Coloque todos os fragmentos de expressões regulares (regex) acima desta linha. Deixe esta linha exatamente como ela está</pre>",
+       "external_image_whitelist": " # Deixe esta linha exatamente como ela está<pre>\n# Coloque fragmentos de expressões regulares (apenas a parte entre //) abaixo\n# Estas serão comparadas com as URL das imagens externas (com ligação direta)\n# As que corresponderem serão apresentadas como imagens, caso contrário apenas será apresentado um link para a imagem\n# As linhas que começam com um símbolo de cardinal (#) são tratadas como comentários\n# Esta lista não distingue maiúsculas de minúsculas\n\n# Coloque todos os fragmentos de expressões regulares (regex) acima desta linha. Deixe esta linha exatamente como ela está</pre>",
        "tags": "Etiquetas de modificação válidas",
        "tag-filter": "Filtro de [[Special:Tags|etiquetas]]:",
        "tag-filter-submit": "Filtrar",
index adf6044..648cb80 100644 (file)
        "right-move": "{{doc-right|move}}\nThe right to move any page that is not protected from moving.\n{{Identical|Move page}}",
        "right-move-subpages": "{{doc-right|move-subpages}}",
        "right-move-rootuserpages": "{{doc-right|move-rootuserpages}}",
+       "right-move-categorypages": "{{doc-right|move-categorypages}}",
        "right-movefile": "{{doc-right|movefile}}",
        "right-suppressredirect": "{{doc-right|suppressredirect}}",
        "right-upload": "{{doc-right|upload}}\nThe right to [[Special:Upload|upload]] a file (this includes images, media, audio, ...).\n{{Identical|Upload file}}",
        "action-move": "{{Doc-action|move}}",
        "action-move-subpages": "{{Doc-action|move-subpages}}",
        "action-move-rootuserpages": "{{Doc-action|move-rootuserpages}}",
+       "action-move-categorypages": "{{Doc-action|move-categorypages}}",
        "action-movefile": "{{doc-action|movefile}}",
        "action-upload": "{{Doc-action|upload}}",
        "action-reupload": "{{Doc-action|reupload}}",
        "movepagetalktext": "Text on the special 'Move page'. This text only appears if the talk page is not empty.",
        "movearticle": "The text before the name of the page that you are moving. Can be translated as \"Page that is going to be moved\". Used in [[Special:MovePage]].\n\nSee also:\n* {{msg-mw|move-page-legend|legend for the form}}\n* {{msg-mw|newtitle|label for new title}}\n* {{msg-mw|movereason|label for textarea}}\n* {{msg-mw|movetalk|label for checkbox}}\n* {{msg-mw|move-leave-redirect|label for checkbox}}\n* {{msg-mw|fix-double-redirects|label for checkbox}}\n* {{msg-mw|move-subpages|label for checkbox}}\n* {{msg-mw|move-talk-subpages|label for checkbox}}\n* {{msg-mw|move-watch|label for checkbox}}\n{{Identical|Move page}}",
        "moveuserpage-warning": "Used as warning in [[Special:MovePage]], when moving a user page.",
-       "movenologintext": "Text of message on special page 'Permissions Errors', which appears when somebody tries to move a page without being logged in.\n\nSee also:\n* {{msg-mw|cant-move-user-page}}\n* {{msg-mw|cant-move-to-user-page}}\n* {{msg-mw|movenotallowedfile}}\n* {{msg-mw|movenotallowed}}",
-       "movenotallowed": "Used as error message.\n\nSee also:\n* {{msg-mw|cant-move-user-page}}\n* {{msg-mw|cant-move-to-user-page}}\n* {{msg-mw|movenotallowedfile}}\n* {{msg-mw|movenologintext}}",
-       "movenotallowedfile": "Used as error message.\n\nSee also:\n* {{msg-mw|cant-move-user-page}}\n* {{msg-mw|cant-move-to-user-page}}\n* {{msg-mw|movenotallowed}}\n* {{msg-mw|movenologintext}}",
-       "cant-move-user-page": "Used as error message.\n\nSee also:\n* {{msg-mw|cant-move-to-user-page}}\n* {{msg-mw|movenotallowedfile}}\n* {{msg-mw|movenotallowed}}\n* {{msg-mw|movenologintext}}",
-       "cant-move-to-user-page": "Used as error message.\n\nSee also:\n* {{msg-mw|cant-move-user-page}}\n* {{msg-mw|movenotallowedfile}}\n* {{msg-mw|movenotallowed}}\n* {{msg-mw|movenologintext}}",
+       "movecategorypage-warning": "Used as warning in [[Special:MovePage]], when moving a category page.",
+       "movenologintext": "Text of message on special page 'Permissions Errors', which appears when somebody tries to move a page without being logged in.\n\nSee also:\n* {{msg-mw|cant-move-user-page}}\n* {{msg-mw|cant-move-to-user-page}}\n* {{msg-mw|cant-move-category-page}}\n* {{msg-mw|cant-move-to-category-page}}\n* {{msg-mw|movenotallowedfile}}\n* {{msg-mw|movenotallowed}}",
+       "movenotallowed": "Used as error message.\n\nSee also:\n* {{msg-mw|cant-move-user-page}}\n* {{msg-mw|cant-move-to-user-page}}\n* {{msg-mw|cant-move-category-page}}\n* {{msg-mw|cant-move-to-category-page}}\n* {{msg-mw|movenotallowedfile}}\n* {{msg-mw|movenologintext}}",
+       "movenotallowedfile": "Used as error message.\n\nSee also:\n* {{msg-mw|cant-move-user-page}}\n* {{msg-mw|cant-move-to-user-page}}\n* {{msg-mw|cant-move-category-page}}\n* {{msg-mw|cant-move-to-category-page}}\n* {{msg-mw|movenotallowed}}\n* {{msg-mw|movenologintext}}",
+       "cant-move-user-page": "Used as error message.\n\nSee also:\n* {{msg-mw|cant-move-to-user-page}}\n* {{msg-mw|cant-move-category-page}}\n* {{msg-mw|cant-move-to-category-page}}\n* {{msg-mw|movenotallowedfile}}\n* {{msg-mw|movenotallowed}}\n* {{msg-mw|movenologintext}}",
+       "cant-move-to-user-page": "Used as error message.\n\nSee also:\n* {{msg-mw|cant-move-user-page}}\n* {{msg-mw|cant-move-category-page}}\n* {{msg-mw|cant-move-to-category-page}}\n* {{msg-mw|movenotallowedfile}}\n* {{msg-mw|movenotallowed}}\n* {{msg-mw|movenologintext}}",
+       "cant-move-category-page": "Used as error message.\n\nSee also:\n* {{msg-mw|cant-move-user-page}}\n* {{msg-mw|cant-move-to-user-page}}\n* {{msg-mw|cant-move-to-category-page}}\n* {{msg-mw|movenotallowedfile}}\n* {{msg-mw|movenotallowed}}\n* {{msg-mw|movenologintext}}",
+       "cant-move-to-category-page": "Used as error message.\n\nSee also:\n* {{msg-mw|cant-move-user-page}}\n* {{msg-mw|cant-move-to-user-page}}\n* {{msg-mw|cant-move-category-page}}\n* {{msg-mw|movenotallowedfile}}\n* {{msg-mw|movenotallowed}}\n* {{msg-mw|movenologintext}}",
        "newtitle": "Used in the special page \"[[Special:MovePage]]\". The text for the inputbox to give the new page title.\n\nSee also:\n* {{msg-mw|Move-page-legend|legend for the form}}\n* {{msg-mw|Movearticle|label for old title}}\n* {{msg-mw|Movereason|label for textarea}}\n* {{msg-mw|Movetalk|label for checkbox}}\n* {{msg-mw|Move-leave-redirect|label for checkbox}}\n* {{msg-mw|Fix-double-redirects|label for checkbox}}\n* {{msg-mw|Move-subpages|label for checkbox}}\n* {{msg-mw|Move-talk-subpages|label for checkbox}}\n* {{msg-mw|Move-watch|label for checkbox}}",
        "move-watch": "The text of the checkbox to watch the pages you are moving from and to. If checked, both the destination page and the original page will be added to the watchlist, even if you decide not to leave a redirect behind.\n\nSee also:\n* {{msg-mw|Move-page-legend|legend for the form}}\n* {{msg-mw|Movearticle|label for old title}}\n* {{msg-mw|Newtitle|label for new title}}\n* {{msg-mw|Movereason|label for textarea}}\n* {{msg-mw|Movetalk|label for checkbox}}\n* {{msg-mw|Move-leave-redirect|label for checkbox}}\n* {{msg-mw|Fix-double-redirects|label for checkbox}}\n* {{msg-mw|Move-subpages|label for checkbox}}\n* {{msg-mw|Move-talk-subpages|label for checkbox}}",
        "movepagebtn": "Button label on the special 'Move page'.\n\n{{Identical|Move page}}",
        "movenosubpage": "See also:\n* {{msg-mw|movesubpage|section header}}\n* {{msg-mw|movenosubpage|without subpage}}\n* {{msg-mw|movesubpagetext|with subpages}}",
        "movereason": "Used in [[Special:MovePage]]. The text for the inputbox to give a reason for the page move.\n\nSee also:\n* {{msg-mw|Move-page-legend|legend for the form}}\n* {{msg-mw|Movearticle|label for old title}}\n* {{msg-mw|Newtitle|label for new title}}\n* {{msg-mw|Movetalk|label for checkbox}}\n* {{msg-mw|Move-leave-redirect|label for checkbox}}\n* {{msg-mw|Fix-double-redirects|label for checkbox}}\n* {{msg-mw|Move-subpages|label for checkbox}}\n* {{msg-mw|Move-talk-subpages|label for checkbox}}\n* {{msg-mw|Move-watch|label for checkbox}}\n{{Identical|Reason}}",
        "move-redirect-text": "{{ignored}}The text that's added to a redirected page when that redirect is created.",
+       "category-move-redirect-override": "{{ignored}}The text that's added to a redirected category page when that redirect is created.",
        "revertmove": "{{Identical|Revert}}",
        "delete_and_move": "Button text on the move page when the target page already exists.",
        "delete_and_move_text": "Used when moving a page, but the destination page already exists and needs deletion.\n\nThis message is to confirm that you really want to delete the page.\n\nParameters:\n* $1 - the destination page title\n\nSee also:\n* {{msg-mw|Delete and move confirm}}",
        "variantname-shi-tfng": "{{optional}}",
        "variantname-shi-latn": "{{optional}}",
        "variantname-shi": "{{optional}}",
+       "variantname-uz": "{{optional}}",
+       "variantname-uz-latn": "{{optional}}",
+       "variantname-uz-cyrl": "{{optional}}",
        "metadata": "The title of a section on an image description page, with information and data about the image. For example of message in use see [[commons:File:Titan-crystal_bar.JPG|Commons]].\n{{Identical|Metadata}}",
        "metadata-help": "This message is followed by a table with metadata.",
        "metadata-expand": "On an image description page, there is mostly a table containing data (metadata) about the image. The most important data are shown, but if you click on this link, you can see more data and information. For the link to hide back the less important data, see {{msg-mw|Metadata-collapse}}.",
        "exif-gpsdifferential": "Label for EXIF information. Indicates whether differential correction is applied to the GPS receiver.",
        "exif-coordinate-format": "{{optional}}\nFor formatting GPS latitude coordinates. Parameters:\n* $1 - degrees\n* $2 - minutes\n* $3 - seconds (up to two decimal places)\n* $4 - direction (N, S, W, or E)\n* $5 - (Unused) coordinate as a single positive or negative real number",
        "exif-jpegfilecomment": "This is not a true exif tag, but the contents of the JPEG COM segment. This often contains a file source, but can potentially contain any comment about the file. This is similar to {{msg-mw|exif-usercomment}}, {{msg-mw|exif-pngfilecomment}}, and {{msg-mw|exif-giffilecomment}}.",
-       "exif-keywords": "List of keywords for the photograph (or other media).\n\nThis can come from IPTC-iim 2:25 keyword field, or XMP's dc:subject field.",
+       "exif-keywords": "List of keywords for the photograph (or other media).\n\nThis can come from IPTC-iim 2:25 keyword field, or XMP's dc:subject field.\n{{Identical|Keyword}}",
        "exif-worldregioncreated": "The world region (generally that means continent, but could also include 'World' as a whole) where the media was created.",
        "exif-countrycreated": "Country that the picture was taken in. Note this is where it was taken, not what country is depicted in the picture.",
        "exif-countrycodecreated": "ISO Code for the country that the picture was taken in. Note this is where it was taken, not what country is depicted in the picture.",
        "descending_abbrev": "Abbreviation of descending order.\nSee also:\n* {{msg-mw|Ascending abbrev}}\n* {{msg-mw|Descending abbrev}}",
        "table_pager_next": "Used as image button text of pager. See [[Support|example]] (the bottom of the page).\n{{Identical|Next page}}",
        "table_pager_prev": "Used as image button text of pager. See [[Support|example]] (the bottom of the page).\n{{Identical|Previous page}}",
-       "table_pager_first": "Used as image button text of pager. See [[Support|example]] (the bottom of the page).",
-       "table_pager_last": "Used as image button text of pager. See [[Support|example]] (the bottom of the page).",
+       "table_pager_first": "Used as image button text of pager. See [[Support|example]] (the bottom of the page).\n{{Identical|First page}}",
+       "table_pager_last": "Used as image button text of pager. See [[Support|example]] (the bottom of the page).\n{{Identical|Last page}}",
        "table_pager_limit": "Do not use PLURAL in this message, because ''$1'' is not the actual number. ''$1'' is a limit selector drop-down list.",
        "table_pager_limit_label": "Used as label for input field.",
        "table_pager_limit_submit": "{{Identical|Go}}",
        "watchlistedit-raw-done": "A message which appears after the raw watchlist has been updated using [[Special:Watchlist/raw]].",
        "watchlistedit-raw-added": "Message on [[Special:EditWatchlist/raw]].\n\nThe message appears after at least 1 message is added to the raw watchlist.\n\nFollowed by list of page titles which are added.\n\nParameters:\n* $1 - number of page titles which are added\nSee also:\n* {{msg-mw|Watchlistedit-normal-done}}\n* {{msg-mw|Watchlistedit-raw-removed}}",
        "watchlistedit-raw-removed": "Message on [[Special:EditWatchlist/raw]].\n\nThe message appears after at least 1 message is deleted from the raw watchlist.\n\nFollowed by list of page titles which are removed.\n\nParameters:\n* $1 - number of page titles which are removed\nSee also:\n* {{msg-mw|Watchlistedit-normal-done}}\n* {{msg-mw|Watchlistedit-raw-added}}",
+       "watchlistedit-clear-title": "Used as page title in [[Special:Watchlist/clear]].",
+       "watchlistedit-clear-legend": "Heading of dialog box on [[Special:Watchlist/clear]].\n{{Identical|Clear watchlist}}",
+       "watchlistedit-clear-explain": "Used as intro text on [[Special:Watchlist/clear]].\n\nPreceded by the fieldset label {{msg-mw|Watchlistedit-clear-legend}}.\n\nFollowed by the button {{msg-mw|Watchlistedit-clear-submit}}.",
+       "watchlistedit-clear-titles": "Text above edit box containing items being watched on [[Special:Watchlist/clear]].\n{{Identical|Title}}",
+       "watchlistedit-clear-submit": "Text of submit button on [[Special:Watchlist/clear]].\n{{Identical|Clear watchlist}}",
+       "watchlistedit-clear-done": "A message which appears after the watchlist has been cleared using [[Special:Watchlist/clear]].",
+       "watchlistedit-clear-removed": "Message on [[Special:EditWatchlist/clear]].\n\nThe message appears once the watchlist has been cleared.",
+       "watchlistedit-too-many": "Message on [[Special:EditWatchlist]] that is used when there are too many titles to display.\n\nShown instead of list of the pages.",
+       "watchlisttools-clear": "[[Special:Watchlist]]: Navigation link under the title.\n{{Identical|Clear watchlist}}",
        "watchlisttools-view": "[[Special:Watchlist]]: Navigation link under the title.\n\nSee also:\n* {{msg-mw|watchlisttools-edit}}\n* {{msg-mw|watchlisttools-raw}}",
        "watchlisttools-edit": "[[Special:Watchlist]]: Navigation link under the title.\n\nSee also:\n* {{msg-mw|Watchlisttools-view}}\n* {{msg-mw|Watchlisttools-raw}}",
        "watchlisttools-raw": "[[Special:Watchlist]]: Navigation link under the title.\n\nSee also:\n* {{msg-mw|watchlisttools-view}}\n* {{msg-mw|watchlisttools-edit}}\n{{Identical|Edit raw watchlist}}",
index 5098f2e..22ea287 100644 (file)
@@ -8,7 +8,8 @@
                        "Reedy",
                        "The Evil IP address",
                        "לערי ריינהארט",
-                       "아라"
+                       "아라",
+                       "Fitoschido"
                ]
        },
        "tog-underline": "T'inkikunata uranpi sikwiy",
        "pagemerge-logentry": "[[$1]]-ta [[$2]]-man huñusqa (llamk'apusqakuna $3-kama)",
        "revertmerge": "Huñusqata kutichiy",
        "mergelogpagetext": "Kay qatiqpiqa aswan ñaqha huk p'anqa wiñay kawsaymanta huk p'anqa wiñay kawsayman huñusqakunatam rikunki.",
-       "history-title": "\"$1\" p'anqata hukchasqakunap wiñay kawsaynin",
+       "history-title": "«$1» p’anqata hukchasqakunap wiñay kawsaynin",
        "difference-title": "$1 nisqapaq musuqchasqapura wakin kaynin",
        "difference-title-multipage": "$1, $2 sutiyuq willañiqipura wakin kaynin",
        "difference-multipage": "(P'anqakunaqa manam kaqllachu)",
index f685a32..fe40125 100644 (file)
        "right-move": "переименование страниц",
        "right-move-subpages": "переименование страниц с их подстраницами",
        "right-move-rootuserpages": "переименование корневых страниц участников",
+       "right-move-categorypages": "Переименование страниц категорий",
        "right-movefile": "переименование файлов",
        "right-suppressredirect": "не создавать перенаправление со старого имени при переименовании страницы",
        "right-upload": "загрузка файлов",
        "action-move": "переименование этой страницы",
        "action-move-subpages": "переименование этой страницы со всеми её подстраницами",
        "action-move-rootuserpages": "переименование корневых страниц участников",
+       "action-move-categorypages": "переименование страниц категорий",
        "action-movefile": "переименовать этот файл",
        "action-upload": "загрузку этого файла",
        "action-reupload": "перезапись существующего файла",
        "movenotallowedfile": "У вас нет разрешения переименовывать файлы.",
        "cant-move-user-page": "У вас нет разрешения переименовывать основные страницы участников.",
        "cant-move-to-user-page": "У вас нет прав переименовывать страницу в страницу участника (можно переименовать в подстраницу).",
+       "cant-move-category-page": "У вас нет разрешения переименовывать страницы категорий.",
+       "cant-move-to-category-page": "У вас нет разрешения переименовывание страницы в страницу категории.",
        "newtitle": "Новое название",
        "move-watch": "Включить эту страницу в список наблюдения",
        "movepagebtn": "Переименовать страницу",
        "watchlistedit-raw-done": "Ваш список наблюдения сохранён.",
        "watchlistedit-raw-added": "{{PLURAL:$1|Была добавлена|Было добавлено|Были добавлены}} $1 {{PLURAL:$1|запись|записей|записи}}:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|Была удалена|Было удалено|Были удалены}} $1 {{PLURAL:$1|запись|записей|записи}}:",
+       "watchlistedit-clear-title": "Очищенный список наблюдения",
+       "watchlistedit-clear-legend": "Очистить список наблюдения",
+       "watchlistedit-clear-explain": "Все записи будут удалены из вашего списка наблюдения",
+       "watchlistedit-clear-titles": "Заголовок:",
+       "watchlistedit-clear-submit": "Очистить список наблюдения (это необратимо!)",
+       "watchlistedit-clear-done": "Ваш список наблюдения очищен.",
+       "watchlistedit-clear-removed": "{{PLURAL:$1|Была удалена|Было удалено|Были удалены}} $1 {{PLURAL:$1|запись|записей|записи}}:",
+       "watchlistedit-too-many": "Слишком много страниц для того, чтобы показать их здесь.",
+       "watchlisttools-clear": "Очистить список наблюдения",
        "watchlisttools-view": "Изменения на страницах из списка",
        "watchlisttools-edit": "Смотреть и редактировать список",
        "watchlisttools-raw": "Редактировать как обычный текст",
index c52f4df..60dee60 100644 (file)
        "jumptonavigation": "सञ्चरणं",
        "jumptosearch": "अन्वेषणम्",
        "view-pool-error": "क्षम्यताम् ! सद्यः वितरकस्य (server) उपरि बहु कार्यभारः अस्ति । \nबहवः जनाः एतत् पृष्ठं पश्यन्तः सन्ति । \nएतत् पृष्ठं पुनर्द्रष्टुं पतिक्षा क्रियताम् । $1",
+       "generic-pool-error": "क्षम्यताम् ! सद्यः वितरकस्य (server) उपरि बहु कार्यभारः अस्ति । \nबहवः जनाः एतत् पृष्ठं पश्यन्तः सन्ति । \nएतत् पृष्ठं पुनर्द्रष्टुं पतिक्षा क्रियताम् ।",
        "pool-timeout": "संरक्षणार्थं कालावधिः समाप्ता",
        "pool-queuefull": "Pool इति पङ्कतिः पूर्णा अस्ति ।",
        "pool-errorunknown": "अज्ञातदोषः",
        "diff-multi-sameuser": "(अनेन योजकेनैव {{PLURAL:$1|कृतम् एकं संस्करणं न प्रदर्श्यते|क्रितानि $1 संस्करणानि न प्रदर्श्यन्ते}})",
        "diff-multi-otherusers": "({{PLURAL:$2|एकेन अन्ययोजकेन|$2 योजकैः}} {{PLURAL:$1|कृतम् एकं संस्करणं न प्रदर्श्यते|क्रितानि $1 संस्करणानि न प्रदर्श्यन्ते}})",
        "diff-multi-manyusers": "{{PLURAL:$2|एकेन योजकेन कृतं|$2 योजकैः कृतानि}} ({{PLURAL:$1|मध्यस्थम् एकं संस्करणं न प्रदर्शितम् ।|मध्यस्थानि $1 परिवर्तनानि न प्रदर्शितानि ।}})",
-       "difference-missing-revision": "{{PLURAL:$2|One revision|$2 पुनरावृत्तेः }} व्यत्यासः ($1) {{PLURAL:$2|was|were}} न दृष्टः ।\nकारणम् अत्र दृश्यते । [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].",
+       "difference-missing-revision": "एतस्य भेदस्य {{PLURAL:$2|एकं संस्करणं|$2 संस्करणानि}} ($1) न {{PLURAL:$2|प्राप्तम्|प्राप्तानि}} ।\n\nअपाकृतानां पृष्ठानां संस्करणानाम् अन्वेषणकाले प्रायशः एतादृशं भवति । अधिकं ज्ञातुं [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} अपाकृतानाम् आवलि)] पश्यतु ।",
        "searchresults": "अन्वेषणपरिणामाः",
        "searchresults-title": "\"$1\" कृते अन्वेषणपरिणामाः",
        "toomanymatches": "बहवः परिणामाः प्राप्ताः, कृपया शब्दं परिवर्त्य पुनः अन्विष्यताम्",
        "gender-male": "सः विकि-पृष्ठानि सम्पादयति",
        "gender-female": "सा विकि-पृष्ठानि सम्पादयति",
        "prefs-help-gender": "एतत् विवरणम् ऐच्छिकम् अस्ति । एतस्मिन् तन्त्रांशे\nलिङ्गाधारेण भवतः/भवत्याः सम्बोधनार्थम् अस्योपयोगः भवति ।\nएतत् विवरणं सार्वजनिकं भविष्यति ।",
-       "email": "ईपत्रम्",
-       "prefs-help-realname": "निà¤\9cनामधà¥\87यसà¥\8dय à¤\89लà¥\8dलà¥\87à¤\96à¤\83 à¤\86वशà¥\8dयà¤\95à¤\83 à¤¨à¤¾à¤¸à¥\8dति à¥¤ \nयदि à¤¦à¤¦à¤¾à¤¤à¤¿ à¤¤à¤°à¥\8dहि à¤\85सà¥\8dय à¤ªà¥\8dरयà¥\8bà¤\97à¤\83 à¤­à¤µà¤¤à¤\83 à¤¯à¥\8bà¤\97दानारà¥\8dथà¤\82 à¤­à¤µà¤¤à¥\87 à¤¶à¥\8dरà¥\87यà¤\82 à¤¦à¤¾à¤¤à¥\81मà¥\8d à¤\89पयà¥\81à¤\95à¥\8dतà¤\83 à¤­à¤µति ।",
+       "email": "ई-पत्रम्",
+       "prefs-help-realname": "वासà¥\8dतविà¤\95नाम à¤\90à¤\9aà¥\8dà¤\9bà¤\95मà¥\8d à¤\85सà¥\8dति à¥¤ à¤­à¤µà¤¾à¤¨à¥\8d/भवतà¥\80 à¤\8fनà¤\82 à¤µà¤¿à¤\95लà¥\8dपà¤\82 à¤¸à¤®à¤°à¥\8dथयति à¤\9aà¥\87तà¥\8d, à¤­à¤µà¤¤à¤\83/भवतà¥\8dयाà¤\83 à¤¯à¥\8bà¤\97दानशà¥\8dरà¥\87यसà¥\8dय à¤\89लà¥\8dलà¥\87à¤\96समयà¥\87 à¤\85सà¥\8dय à¤\89पयà¥\8bà¤\97à¤\83 à¤­à¤µà¤¿à¤·à¥\8dयति ।",
        "prefs-help-email": "ई-पत्रसङ्केतः अनिवार्यः नास्ति । किन्तु कूटशब्दः विस्मर्यते चेत् तस्य परिवर्तनाय आवश्यकः भवति ।",
        "prefs-help-email-others": "योजकपृष्ठ-सम्भाषणपृष्ठयोः माध्यमेन,  ई-पत्रमाध्यमेन वा अन्ये योजकाः भवतः/भवत्याः सम्पर्कं कर्तुं शक्नुयुः ।\nसम्पर्केऽस्मिन् भवतः/भवत्याः ई-पत्रसङ्केतम् अन्ययोजकाः ज्ञातुं न प्रभवतन्ति ।",
-       "prefs-help-email-required": "विदà¥\8dयà¥\81नà¥\8dमानपतà¥\8dरसà¤\99à¥\8dà¤\95à¥\87तà¤\83 à¤\86वशà¥\8dयà¤\95ः ।",
+       "prefs-help-email-required": "à¤\88-पतà¥\8dरसà¤\99à¥\8dà¤\95à¥\87तà¤\83 à¤\85निवारà¥\8dयः ।",
        "prefs-info": "मूलसूचनाः",
-       "prefs-i18n": "अन्ताराष्ट्रिकरणम् ।",
-       "prefs-signature": "हस्ताक्षर",
+       "prefs-i18n": "अन्ताराष्ट्रिकरणम्",
+       "prefs-signature": "हस्ताक्षरम्",
        "prefs-dateformat": "दिनाङ्कस्य प्रारूपः",
-       "prefs-timeoffset": "समयान्तरम् ।",
-       "prefs-advancedediting": "उन्नतविकल्पाः",
-       "prefs-advancedrc": "उन्नतविकल्पाः",
-       "prefs-advancedrendering": "उन्नतविकल्पाः",
-       "prefs-advancedsearchoptions": "उन्नतविकल्पाः",
-       "prefs-advancedwatchlist": "उन्नतविकल्पाः",
-       "prefs-displayrc": "प्रदर्शनविकल्पाः",
-       "prefs-displaywatchlist": "प्रदर्शनविकल्पाः",
+       "prefs-timeoffset": "समयान्तरम्",
+       "prefs-advancedediting": "सामान्यविकल्पाः",
+       "prefs-editor": "योजकः",
+       "prefs-preview": "प्राग्दृश्यम्",
+       "prefs-advancedrc": "विशेषविकल्पाः",
+       "prefs-advancedrendering": "विशेषविकल्पाः",
+       "prefs-advancedsearchoptions": "विशेषविकल्पाः",
+       "prefs-advancedwatchlist": "विशेषविकल्पाः",
+       "prefs-displayrc": "प्रदर्शन-विकल्पाः",
+       "prefs-displaywatchlist": "प्रदर्शन-विकल्पाः",
+       "prefs-tokenwatchlist": "स्तोकम् (token)",
        "prefs-diffs": "अन्तरम्",
-       "email-address-validity-valid": "प्रयुक्तः विद्युन्मानपत्रसङ्केतः मानितः ।",
-       "email-address-validity-invalid": "मान्यः विद्युन्मानपत्रसङ्केतः योजनीयः ।",
-       "userrights": "योजकाधिकारस्य प्रबन्धनम् ।",
-       "userrights-lookup-user": "योजकसमूहं प्रबन्धयतु ।",
-       "userrights-user-editname": "योजकनाम योजयतु ।",
-       "editusergroup": "योजकसमूहं सम्पादयतु ।",
-       "editinguser": "'''[[User:$1|$1]]''' $2 इति योजकस्य योजकाधिकारः परिवर्त्यते ।",
-       "userrights-editusergroup": "योजकसमूहं सम्पादयतु ।",
-       "saveusergroups": "योजकसमूहं संरक्षतु ।",
-       "userrights-groupsmember": "अस्य सदस्यः  ।",
-       "userrights-groupsmember-auto": "अस्य निश्चितसदस्यः ।",
-       "userrights-groups-help": "अस्य सदस्यस्य समूहसदस्यत्वं परिवर्तयितुं शक्यते । \n* मञ्जूषा अङ्किता चेत् योजकः अस्य समूहस्य सदस्यः अस्ति ।\n* मञ्जूषा अनङ्किता चेत् योजकः अस्य समूहस्य सदस्यः न \n* कदाचित् भवता समूहः योजितः चेत् अपनेतुं नैव शक्नोति इति * चिह्नं सूचयति ।",
+       "prefs-help-prefershttps": "आगामिप्रेवेशकाले एतत् परिवर्तनं सक्रियं भवष्यति ।",
+       "prefs-tabs-navigation-hint": "परामर्शः : पट्टीकयोः (tabs) मध्ये गमनागमनं कर्तुं भवान्/भवती वामतीरकुड्मलस्य, दक्षिणतीरकुण्मलस्य च उपयोगं कर्तुं शक्नोति ।",
+       "email-address-validity-valid": "ई-पत्रसङ्केतः मान्यः अस्ति इति प्रतियते",
+       "email-address-validity-invalid": "मान्यः ई-पत्रसङ्केतः लिख्यताम्",
+       "userrights": "योजकाधिकारस्य प्रबन्धनम्",
+       "userrights-lookup-user": "योजकसमूहस्य प्रबन्धनं करोतु",
+       "userrights-user-editname": "प्रयोक्तृनाम दीयताम्",
+       "editusergroup": "योजकसमूहः सम्पाद्यताम्",
+       "editinguser": "'''[[User:$1|$1]]''' इत्यस्य योजकस्य योजकाधिकारः परिवर्त्यते । $2",
+       "userrights-editusergroup": "योजकसमूहः सम्पाद्यताम्",
+       "saveusergroups": "योजकसमूहः रक्ष्यताम्",
+       "userrights-groupsmember": "अस्य सदस्यः :",
+       "userrights-groupsmember-auto": "निम्न{{PLURAL:$1|समूहस्य|समूहानाम्}} अन्तर्निहिः सदस्यः :",
+       "userrights-groups-help": "अस्य सदस्यस्य समूहसदस्यत्वं परिवर्तयितुं शक्यते । \n* अङ्कनपेटिका (check box) अङ्किता चेत्, योजकः अस्य समूहस्य सदस्यः अस्ति ।\n* अङ्कनपेटिका अनङ्किता चेत्, योजकः अस्य समूहस्य सदस्यः नास्ति ।\n* एकवारं समूहः योजितः अपाकृतः वा चेत्, पुनः पूर्ववत् कर्तुं न शक्यते इति * चिह्नं सूचयति ।",
        "userrights-reason": "कारणम् :",
-       "userrights-no-interwiki": "अन्यविकिषु योजकाधिकारं सम्पादयितुं ते अनुमतिः नास्ति ।",
-       "userrights-nodatabase": "$1 मूलपाठाः न सन्ति अथवा स्थानीयाः ।",
-       "userrights-nologin": "[[Special:UserLogin|log in]] प्रशासकस्थानेन प्रविश्य योजकाधिकारान् निर्देष्टुं शक्नोति ।",
-       "userrights-notallowed": "योजकाधिकारान् अपनेतुं ते स्थानस्य अनुमतिः नास्ति ।",
-       "userrights-changeable-col": "परिवर्तनार्हाः समूहाः ।",
-       "userrights-unchangeable-col": "परिवर्तनार्हाः समूहाः ।",
+       "userrights-no-interwiki": "अन्यविकि-जालस्थानेषु योजकाधिकारं सम्पादयितुं ते अनुमतिः नास्ति ।",
+       "userrights-nodatabase": "$1 दत्तांशनिधिः न विद्यते । अथवा तु सः स्थानीयः नास्ति ।",
+       "userrights-nologin": "योजकान् अधिकारं दातुं प्रबन्धकत्वेन प्रवेशः आवश्यकः । [[Special:UserLogin|प्रविश्यताम्]]",
+       "userrights-notallowed": "योजकेभ्यः अधिकारं दातम्, अपाकर्तुं च ते अनुमतिः नास्ति ।",
+       "userrights-changeable-col": "परिवर्तनार्हाः समूहाः",
+       "userrights-unchangeable-col": "परिवर्तनम् अनर्हाः समूहाः",
+       "userrights-conflict": "सदस्याधिकारस्य परिवर्तनेषु अन्तर्विरोधः अस्ति ! कृपया स्वकृतानि परिवर्तनानि पुनरवलोक्य संरक्ष्यताम् ।",
+       "userrights-removed-self": "भवता/भवत्या सफलतया स्वाधिकाराः अपाकृताः । अतः भवान्/भवती एतत् पृष्ठं द्रष्टुं न प्रभवति ।",
        "group": "समूहः :",
-       "group-user": "योजकः",
-       "group-autoconfirmed": "स्वदृढितयोजकाः ।",
-       "group-bot": "सà¥\8dवयà¤\82 à¤¸à¤\95à¥\8dरियाà¤\83 à¥¤",
-       "group-sysop": "पà¥\8dरबà¤\82धकाः",
-       "group-bureaucrat": "सà¥\8dवयमà¥\8d à¤\85धिà¤\95ारिणà¤\83 à¥¤",
-       "group-suppress": "अलक्ष्यम् ।",
+       "group-user": "यà¥\8bà¤\9cà¤\95ाà¤\83",
+       "group-autoconfirmed": "स्वदृढितयोजकाः",
+       "group-bot": "बà¥\8bà¤\9fà¥\8dसà¥\8d",
+       "group-sysop": "पà¥\8dरबनà¥\8dधकाः",
+       "group-bureaucrat": "à¤\85धिà¤\95ारिणà¤\83",
+       "group-suppress": "अलक्ष्यम्",
        "group-all": "(सर्वे)",
        "group-user-member": "{{GENDER:$1|योजक}}",
-       "group-autoconfirmed-member": "{{GENDER:$1|सà¥\8dवसà¥\8dथानदà¥\83ढितà¤\83 योजकः}}",
-       "group-bot-member": "{{GENDER:$1|सà¥\8dवयà¤\82 à¤¸à¤\95à¥\8dरियà¤\83}}",
-       "group-sysop-member": "{{GENDER:$1|पà¥\8dरशासकः}}",
-       "group-bureaucrat-member": "{{GENDER:$1|सà¥\8dवयमà¥\8d à¤\85धिà¤\95ारà¥\80}}",
+       "group-autoconfirmed-member": "{{GENDER:$1|सà¥\8dवदà¥\83ढितयोजकः}}",
+       "group-bot-member": "{{GENDER:$1|बà¥\89à¤\9fà¥\8d}}",
+       "group-sysop-member": "{{GENDER:$1|पà¥\8dरबनà¥\8dधकः}}",
+       "group-bureaucrat-member": "{{GENDER:$1|अधिकारी}}",
        "group-suppress-member": "{{GENDER:$1|अलक्ष्यम्}}",
-       "grouppage-user": "{{ns:project}}:योजक",
-       "grouppage-autoconfirmed": "{{ns:project}}: स्वयंदृढितयोजकाः ।",
-       "grouppage-bot": "{{ns:project}}: स्वयंसक्रियाः।",
-       "grouppage-sysop": "{{ns:project}}:प्रचालकाः",
-       "grouppage-bureaucrat": "{{ns:project}}: स्वयम् अधिकारिणः ।",
-       "grouppage-suppress": "{{ns:project}}: अक्ष्यम् ।",
-       "right-read": "पुटानि पठतु ।",
-       "right-edit": "पुटसम्पादनं करोतु ।",
-       "right-createpage": "पुटनिर्माणं करोतु ।(यानि चर्च्यानि न सन्ति)",
-       "right-createtalk": "चर्च्यपुटानां निर्माणं करोतु ।",
-       "right-createaccount": "नूतनयोजकस्थानं निर्मातु ।",
-       "right-minoredit": "सम्पादनं लघुचिह्नया निर्दिशतु ।",
-       "right-move": "पुटं चालयतु ।",
-       "right-move-subpages": "उपपुटैः सह पुटं चालयतु ।",
-       "right-move-rootuserpages": "मूलयोजकपुटानि चालयतु ।",
-       "right-movefile": "सञ्चिकाः चालयतु ।",
-       "right-suppressredirect": "पुटचालनावसरे मूलपुटेभ्यः पुनर्निदेशं न सृजतु ।",
-       "right-upload": "सञ्चिकाः उत्तारयतु ।",
-       "right-reupload": "स्थितसञ्चिकाः पुनर्लिखतु ।",
-       "right-reupload-own": "एकेन उत्तारितसञ्चिकाः पुनर्लिखतु ।",
-       "right-reupload-shared": "विभक्तमाध्यमकोशगतसञ्चिकाः अतिसञ्चरतु ।",
-       "right-upload_by_url": "अन्तर्जालस्थानात् सञ्चिकाः उत्तारयतु ।",
-       "right-purge": "दृढतारहितपुटस्य क्षेत्राधारं पुनातु ।",
+       "grouppage-user": "{{ns:project}}:योजकाः",
+       "grouppage-autoconfirmed": "{{ns:project}}:स्वदृढितयोजकाः",
+       "grouppage-bot": "{{ns:project}}:बॉट्स्",
+       "grouppage-sysop": "{{ns:project}}:प्रबन्धकाः",
+       "grouppage-bureaucrat": "{{ns:project}}:अधिकारिणः",
+       "grouppage-suppress": "{{ns:project}}:अक्ष्यम्",
+       "right-read": "पृष्ठानि पठ्यताम्",
+       "right-edit": "पृष्ठानि सम्पाद्यताम्",
+       "right-createpage": "पृष्ठानि निर्मियताम् ।(येषां सम्भाषणपृष्ठं न स्यात् ।)",
+       "right-createtalk": "सम्भाषणपृष्ठानि निर्मियताम्",
+       "right-createaccount": "नूतनप्रयोक्तृवृत्तान्तं रच्यताम्",
+       "right-minoredit": "लघुसम्पादनत्वेन अङ्कितं करोतु",
+       "right-move": "पृष्ठं चाल्यताम्",
+       "right-move-subpages": "उपपृष्ठैः सह पृष्ठं चालयतु",
+       "right-move-rootuserpages": "मूलयोजकपुष्ठानि चाल्यताम्",
+       "right-move-categorypages": "वर्गपृष्ठानि चाल्यताम्",
+       "right-movefile": "सञ्चिकाः चाल्यताम्",
+       "right-suppressredirect": "पृष्ठं यदा चालयति, तदा मूलपृष्ठात् प्रतिप्रषणं मास्तु ।",
+       "right-upload": "उपारोहण(upload)सञ्चिकाः",
+       "right-reupload": "वर्तमानसञ्चिकाः नवीनसञ्चिकाभिः परिवर्त्यताम्",
+       "right-reupload-own": "अन्येन उपारोहिताः (upload) सञ्चिकाः नवीनसञ्चिकाभिः परिवर्त्यताम",
+       "right-reupload-shared": "विभक्तमाध्यमेन (shared media) स्थानिय-उपारोहिताः सञ्चिकाः नवीनसञ्चाकाभिः परिवर्त्यताम्",
+       "right-upload_by_url": "सर्वासङ्केतात् (URL) उपारोहिताः सञ्चिकाः",
+       "right-purge": "पृष्ठस्य उपस्मृतिं (cache) रिक्तीक्रियताम्",
        "right-autoconfirmed": "अल्परक्षितपुटनि सम्पादयतु ।",
-       "right-bot": "सà¥\8dवà¤\9aालितपà¥\8dरà¤\95à¥\8dरियाà¤\83 à¤\87व à¤\89पà¤\9aारितà¤\83 à¤­à¤µतु ।",
+       "right-bot": "à¤\8fताà¤\82 à¤¸à¥\8dवसà¤\9eà¥\8dà¤\9aालितपà¥\8dरणालितà¥\8dवà¥\87न à¤¸à¥\8dवà¥\80à¤\95रà¥\8bतु ।",
        "right-nominornewtalk": "चर्चापुटानां लघुसम्पादनं न भवतु । नूतनसन्देशान् चोदयतु ।",
        "right-apihighlimits": "API प्रश्नेषु उन्नतसीमम् उपयोजयतु ।",
        "right-writeapi": "श्वेतं API उपयोगः ।",
index d8450a7..3d00373 100644 (file)
        "uploadstash-refresh": "Refresh the leet o files",
        "invalid-chunk-offset": "Onvalid chunk affset",
        "img-auth-accessdenied": "Access denied.",
-       "img-auth-nopathinfo": "Missin PATH_INFO.\nYer server isna set up tae pass this information.\nIt micht be CGI-based n canna support img_auth.\nSee https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization.",
+       "img-auth-nopathinfo": "Missin PATH_INFO.\nYer server is no set up tae pass this information.\nIt micht be CGI-based n canna support img_auth.\nSee https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization.",
        "img-auth-notindir": "Requested path isna in the confeegured uplaid directerie.",
        "img-auth-badtitle": "Onable tae cræft ae valid title fae \"$1\".",
        "img-auth-nologinnWL": "Ye'r naw loggit in n \"$1\" isna in the whiteleet.",
        "enotif_lastvisited": "Hae ae leuk at $1 fer aa chynges sin yer laist veesit.",
        "enotif_lastdiff": "See $1 tae see this chynge.",
        "enotif_anon_editor": "anonymoos uiser $1",
-       "enotif_body": "Dear $WATCHINGUSERNAME,\n\n$PAGEINTRO $NEWPAGE\n\nEediter's ootline: $PAGESUMMARY $PAGEMINOREDIT\n\nContact the eediter:\nmail: $PAGEEDITOR_EMAIL\nwiki: $PAGEEDITOR_WIKI\n\nThaur'll be naw ither annooncemants in case o further acteevitie onless ye veesit this page while loggit in. Ye coud forby reset the annooncemant flags fer aw yer watched pages oan yer watchleet.\n\nYer freendlie {{SITENAME}} annooncemant system\n\n--\nTaae chynge yer wab-mail annooncemant settins, veesit\n{{canonicalurl:{{#special:Preferences}}}}\n\nTae chynge yer watchleet settins, veesit\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nTae delyte the page fae yer watchleet, veesit\n$UNWATCHURL\n\nFeedback n further asseestance:\n$HELPPAGE",
+       "enotif_body": "Dear $WATCHINGUSERNAME,\n\n$PAGEINTRO $NEWPAGE\n\nEediter's ootline: $PAGESUMMARY $PAGEMINOREDIT\n\nContact the eediter:\nmail: $PAGEEDITOR_EMAIL\nwiki: $PAGEEDITOR_WIKI\n\nThaur'll be naw ither annooncemants in case o further acteevitie onless ye veesit this page while loggit in. Ye coud forby reset the annooncemant flags fer aw yer watched pages oan yer watchleet.\n\nYer freendlie {{SITENAME}} annooncemant system\n\n--\nTae chynge yer wab-mail annooncemant settins, veesit\n{{canonicalurl:{{#special:Preferences}}}}\n\nTae chynge yer watchleet settins, veesit\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nTae delyte the page fae yer watchleet, veesit\n$UNWATCHURL\n\nFeedback n further asseestance:\n$HELPPAGE",
        "created": "cræftit",
        "changed": "chynged",
        "deletepage": "Delyte page",
index 3429490..c091cc0 100644 (file)
        "protectedpagetext": "Šėts poslapis īr ožrakints, saugont anū nū redagavėma.",
        "viewsourcetext": "Tomsta galėt veizietė ėr kopėjoutė poslapė kuoda:",
        "protectedinterface": "Šėtom poslapi īr pruogramėnės ironguos sasajuos teksts katros īr apsauguots, kū neprietelē anū nasogadėntu.",
-       "editinginterface": "'''Diemesė:''' Tamsta keitat poslapi, katros īr nauduojams programėnės irongas sōsajės tekstė. Pakeitėmā tamė poslapū tēpuogi pakeis nauduotuojė sōsajės ėšruoda ė kėtėims nauduotujams. Jēgo nuorėt pargoldītė, siūluom pasėnauduotė [//translatewiki.net/wiki/Main_Page?setlang=bat-smg „translatewiki.net“], „MediaWiki“ lokalėzacėjės pruojėktu.",
+       "editinginterface": "<strong>Diemesė:</strong> Tamsta keitat poslapi, katros īr nauduojams programėnės irongas sōsajės tekstė. Pakeitėmā tamė poslapū tēpuogi pakeis nauduotuojė sōsajės ėšruoda ė kėtėims nauduotujams. Jēgo nuorėt pargoldītė, siūluom pasėnauduotė [//translatewiki.net „translatewiki.net“], „MediaWiki“ lokalėzacėjės pruojėktu.",
        "namespaceprotected": "Tamsta netorėt teisiu keistė poslapiu '''$1''' srėtī.",
        "ns-specialprotected": "Specēlė̅ jė poslapē negal būtė keitamė.",
        "logouttext": "'''Daba Tamsta esat atsėjongės.'''\n\nGalat ė tuoliau nauduotė {{SITENAME}} anuonimėškā aba <span class='plainlinks'>[$1 prisėjonkat]</span> ėš naujė šėtuo patiu a kėto nauduotuojė vardu.\nPastebiejims: katruos nekatruos poslapiuos ė tuoliau gal ruodītė būktā būtomiet prisėjongės lėgė tuol, kumet ėšvalīsėt sava naršīklės dietovė (''cache'').",
        "recreate-moveddeleted-warn": "'''Parspiejėms: Tamsta ikeliat faila, katros onkstiau bova ėštrėnts.'''\n\nTamsta torietomiet nusprēstė, a īr naudėnga tuoliau ikeldinietė ta faila.\nTuo faila pašalinėma istuorėjė īr pateikta dielē patuogoma:",
        "moveddeleted-notice": "Tas poslapis bova ėštrėnts.\nĖštrėnta poslapė versėju sārašos īr pateikts paveiziejėmō žemiau.",
        "edit-conflict": "Redagavėma kuonflėktos",
-       "postedit-confirmation": "Tamstas padėrbts pakeitėms ėšsauguots īr.",
+       "postedit-confirmation-saved": "Tamstas padėrbts pakeitėms ėšsauguots īr.",
        "post-expand-template-inclusion-warning": "Perspiejėms: Šabluonu īterpėma dėdoms īr par dėdelis.\nKāp katrėi šabluonā nebus ītrauktė.",
        "post-expand-template-inclusion-category": "Poslapē, kur šabluonu īterpėma dėdoms viršėjams",
        "post-expand-template-argument-warning": "Perspiejėms: Tas poslapis tor nuors vėina šabluona argomenta, katros tor per dėdli ėšplietėma dėdoma.\nTė argomentā bova praleistė.",
        "blockip": "Ožblokoutė nauduotuoja",
        "blockip-legend": "Blokoutė nauduotuoja",
        "blockiptext": "Nauduokėt šėta fuorma noriedamė oždraustė redagavėma teises nuruodīto IP adreso a nauduotuojo. Tas torietu būt atlėikama tam, kū sostabdītomiet vandalėzma, ė vagol [[{{ns:project}}:Puolitėka|puolitėka]].\nŽemiau nuruodīkėt tėkslē prižastė.",
-       "ipadressorusername": "IP adresos a nauduotuojė vards",
+       "ipaddressorusername": "IP adresos a nauduotuojė vards",
        "ipbexpiry": "Galiuojėma čiesos",
        "ipbreason": "Prīžastis:",
        "ipbreason-dropdown": "*Dažniausės bluokavėma prižastīs\n** Melagėngas infuormacėjės rašīms\n** Torėnė trīnims ėš poslapiu\n** Spaminims\n** Zaunu/bikuo rašīms i poslapios\n** Gondinėmā/Pėktžuodiavėmā\n** Pėktnaudžiavėms paskėruomis\n** Netėnkams nauduotuojė vards",
        "newimages": "Naujausiu abruozdieliu galerėjė",
        "imagelisttext": "Žemiau īr '''$1''' failu sārašos, sorūšiouts $2.",
        "newimages-label": "Faila vards (ar anuo dalis):",
-       "showhidebots": "($1 robotos)",
        "ilsubmit": "Ėiškoutė",
        "bydate": "palē data",
        "sp-newimages-showfrom": "Ruodītė naujus abruozdielius pradedant nū $2, $1",
index 8c05695..1b559b4 100644 (file)
        "watchlistedit-raw-done": "ඔබගේ මුර-ලැයිස්තුව යාවත්කාලීන කරන ලදි.",
        "watchlistedit-raw-added": "{{PLURAL:$1|ශීර්ෂ 1 ක් |ශීර්ෂ  $1 ක් }} එක් කරන ලදි:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|ශීර්ෂ 1 ක්|ශීර්ෂ  $1 ක්}} ඉවත් කරන ලදි:",
+       "watchlistedit-clear-titles": "ශීර්ෂයන්:",
        "watchlisttools-view": "අදාල වෙනස්වීම් නරඹන්න",
        "watchlisttools-edit": "මුර ලැයිස්තුව නැරඹීම හා සංස්කරණය",
        "watchlisttools-raw": "නොනිමි මුර ලැයිස්තුව සංස්කරණය කරන්න",
index 8c4d412..f2514a8 100644 (file)
@@ -21,8 +21,8 @@
        "tog-showtoolbar": "Prikaži urejevalno orodno vrstico",
        "tog-editondblclick": "Omogoči urejanje strani z dvojnim klikom",
        "tog-editsectiononrightclick": "Omogoči urejanje razdelkov z desnim klikanjem njihovih naslovov",
-       "tog-watchcreations": "Vse ustvarjene strani in moje naložene datoteke dodaj na spisek nadzorov",
-       "tog-watchdefault": "Dodaj na spisek nadzorov vse članke in datoteke, ki sem jih spremenil/-a",
+       "tog-watchcreations": "Na spisek nadzorov dodaj vse ustvarjene strani in moje naložene datoteke",
+       "tog-watchdefault": "Na spisek nadzorov dodaj vse članke in datoteke, ki sem jih spremenil/-a",
        "tog-watchmoves": "Dodaj strani in datoteke, ki jih premaknem, na moj spisek nadzorov",
        "tog-watchdeletion": "Dodaj strani in datoteke, ki jih izbrišem, na moj spisek nadzorov",
        "tog-minordefault": "Vsa urejanja označi kot manjša",
@@ -40,8 +40,8 @@
        "tog-watchlisthideown": "Na spisku nadzorov skrij moja urejanja",
        "tog-watchlisthidebots": "Na spisku nadzorov skrij urejanja botov",
        "tog-watchlisthideminor": "Na spisku nadzorov skrij manjša urejanja",
-       "tog-watchlisthideliu": "Skrij urejanja prijavljenih uporabnikov na spisku nadzorov",
-       "tog-watchlisthideanons": "Skrij urejanja anonimnih uporabnikov na spisku nadzorov",
+       "tog-watchlisthideliu": "Na spisku nadzorov skrij urejanja prijavljenih uporabnikov",
+       "tog-watchlisthideanons": "Na spisku nadzorov skrij urejanja anonimnih uporabnikov",
        "tog-watchlisthidepatrolled": "Na spisku nadzorov skrij pregledana urejanja",
        "tog-ccmeonemails": "Pošlji mi kopijo e-pošt, ki jih pošljem drugim uporabnikom",
        "tog-diffonly": "Pod primerjavo ne prikaži vsebine strani",
        "recentchangescount": "Privzeto število prikazanih urejanj:",
        "prefs-help-recentchangescount": "Vključuje zadnje spremembe, zgodovine strani in dnevniške zapise.",
        "prefs-help-watchlist-token2": "To je skrivni ključ do spletnega vira vašega spiska nadzorov. Kdor ve zanj, lahko bere vaš spisek nadzorov, zato ključa ne delite. [[Special:ResetTokens|Kliknite tukaj, če ga želite ponastaviti]].",
-       "savedprefs": "Spremembe so uspešno shranjene.",
+       "savedprefs": "Spremembe smo uspešno shranili.",
        "timezonelegend": "Časovni pas",
        "localtime": "Krajevni čas:",
        "timezoneuseserverdefault": "Uporabi privzeti wiki čas ($1)",
        "right-move": "Premikanje strani",
        "right-move-subpages": "Premikanje strani s pripadajočimi podstranmi",
        "right-move-rootuserpages": "Premikanje korenskih uporabniških strani",
+       "right-move-categorypages": "Prestavljanje strani kategorij",
        "right-movefile": "Premikanje datotek",
        "right-suppressredirect": "Možnost izpuščanja preusmeritve pri premikanju strani",
        "right-upload": "Nalaganje datotek",
        "action-move": "premik te strani",
        "action-move-subpages": "premik te strani in njenih podstrani",
        "action-move-rootuserpages": "premik korenskih uporabniških strani",
+       "action-move-categorypages": "prestavljanje strani kategorij",
        "action-movefile": "premik te datoteke",
        "action-upload": "nalaganje te datoteke",
        "action-reupload": "prepis obstoječe datoteke",
        "movepagetalktext": "Če obstaja, bo samodejno prestavljena tudi pripadajoča pogovorna stran, '''razen kadar'''\n*pod novim imenom že obstaja neprazna pogovorna stran ali\n*ste odkljukali spodnji okvirček.\n\nČe je tako, boste morali pogovorno stran, če želite, prestaviti ali povezati ročno.",
        "movearticle": "Prestavi stran:",
        "moveuserpage-warning": "'''Opozorilo:''' Premikate uporabniško stran. To pomeni, da bo premaknjena samo stran in uporabnik ''ne'' bo preimenovan.",
+       "movecategorypage-warning": "<strong>Opozorilo:</strong> Prestavili boste stran kategorije. Pomnite, da boste prestavili samo stran; vse strani v stari kategoriji <em>ne</em> bomo prekategorizirali v novo kategorijo.",
        "movenologintext": "Za prestavljanje strani morate biti registrirani in [[Special:UserLogin|prijavljeni]].",
        "movenotallowed": "Za prestavljanje strani nimate dovoljenja.",
        "movenotallowedfile": "Nimate dovoljenja, da premikate datoteke.",
        "cant-move-user-page": "Nimate dovoljenja, da premikate uporabniške strani (razen podstrani).",
        "cant-move-to-user-page": "Nimate dovoljenja, da premikate strani na uporabniške strani (razen na uporabniške podstrani).",
+       "cant-move-category-page": "Nimate pravic za prestavljanje strani kategorij.",
+       "cant-move-to-category-page": "Nimate pravic za prestavljanje strani na stran kategorije.",
        "newtitle": "Na naslov:",
        "move-watch": "Opazuj to stran",
        "movepagebtn": "Prestavi stran",
        "watchlistedit-normal-explain": "Strani na vašem spisku nadzorov so prikazane spodaj.\nDa odstranite stran, označite kvadratek poleg nje in kliknite »{{int:Watchlistedit-normal-submit}}«.\nLahko tudi [[Special:EditWatchlist/raw|uredite gol spisek]].",
        "watchlistedit-normal-submit": "Odstrani strani",
        "watchlistedit-normal-done": "Z vašega spiska nadzorov {{PLURAL:$1|je bila odstranjena $1 stran|sta bili odstranjeni $1 strani|so bile odstranjene $1 strani|je bilo odstranjenih $1 strani}}:",
-       "watchlistedit-raw-title": "urejanje golega spiska nadzorov",
+       "watchlistedit-raw-title": "Urejanje golega spiska nadzorov",
        "watchlistedit-raw-legend": "Uredi gol spisek nadzorov",
        "watchlistedit-raw-explain": "Strani na vašem spisku nadzorov so prikazane spodaj in jih lahko urejate z dodajanjem in odstranjevanjem s seznama; vsak naslov je v svoji vrstici.\nKo končate, kliknite »{{int:Watchlistedit-raw-submit}}«.\nUporabite lahko tudi [[Special:EditWatchlist|standardni urejevalnik]].",
        "watchlistedit-raw-titles": "Strani:",
        "watchlistedit-raw-done": "Vaš spisek nadzorov je bil posodobljen.",
        "watchlistedit-raw-added": "{{PLURAL:$1|Dodana je bila $1 stran|Dodani sta bili $1 strani|Dodane so bile $1 strani|Dodanih je bilo $1 strani}}:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|Odstranjena je bila $1 stran|Odstranjeni sta bili 2 strani|Odstranjene so bile $1 strani|Odstranjenih je bilo $1 strani}}:",
-       "watchlisttools-view": "oglej si ustrezne spremembe",
-       "watchlisttools-edit": "prikaz in urejanje spiska nadzorov",
+       "watchlistedit-clear-title": "Čiščenje spiska nadzorov",
+       "watchlistedit-clear-legend": "Počistite spisek nadzorov",
+       "watchlistedit-clear-explain": "Vse naslove bomo odstranili z vašega spiska nadzorov",
+       "watchlistedit-clear-titles": "Naslovi:",
+       "watchlistedit-clear-submit": "Počisti spisek nadzorov (To je trajno!)",
+       "watchlistedit-clear-done": "Vaš spisek nadzorov smo počistili.",
+       "watchlistedit-clear-removed": "Odstranili smo $1 {{PLURAL:$1|naslov|naslova|naslove|naslovov}}:",
+       "watchlistedit-too-many": "Obstaja preveč strani, da bi jih tukaj prikazali.",
+       "watchlisttools-clear": "Počisti spisek nadzorov",
+       "watchlisttools-view": "Oglej si ustrezne spremembe",
+       "watchlisttools-edit": "Prikaz in urejanje spiska nadzorov",
        "watchlisttools-raw": "Uredi gol spisek nadzorov",
        "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|pogovor]])",
        "unknown_extension_tag": "Neznana razširitvena etiketa »$1«",
index aca2189..7b0d4d8 100644 (file)
        "grouppage-sysop": "{{ns:project}}:Maamulada",
        "right-read": "Akhri maqaalada",
        "right-edit": "Wax ka bedel bogyaalo",
+       "right-createpage": "Samaynta bogag (taasoo aan lahayn bogag wadahadal)",
+       "right-createtalk": "Samaynta bogagga wadahadalka",
+       "right-createaccount": "Samaynta akoon isticmaale cusub",
+       "right-minoredit": "Calaamaynta bedelka yar",
        "right-move": "Wareeji maqaalada",
        "right-upload": "Soo geli fayl",
+       "right-writeapi": "Adeegsiga API ee qorista",
        "right-delete": "Tirtir maqaalada",
        "right-bigdelete": "Tirtir maqaalada taariikhda dheer leh",
        "right-browsearchive": "Raadi maqaalada la tirtiray",
        "right-undelete": "Ha tirtirin bog",
+       "right-editmyusercss": "Bedel galalka CSS ee isticmaalaha laftiisa",
+       "right-editmyuserjs": "Bedel galalka JavaScript ee isticmaalaha laftiisa",
+       "right-viewmywatchlist": "Egista liiska waardiyaha",
+       "right-editmywatchlist": "Bedel liiska waardiyaha. Eeg qaybo ka mid ah dhaqdhaqaaqa in aan weli lagu kordhin haddi uusan jirin xitaa xaqaan.",
+       "right-viewmyprivateinfo": "Eegista macluumaadka gaarka ah (sida ciwaanka e-mail-ka, iyo magaca saxda ah)",
+       "right-editmyprivateinfo": "Bedel macluumaadka gaarka ah (sida. ciwaanka e-mail-ka , iyo magaca saxda ah)",
+       "right-editmyoptions": "Bedelka dooqyada",
        "newuserlogpage": "Gudagalaha Isticmaale sameeyay",
        "action-read": "akhri boggaan",
        "action-edit": "wax ka bedel boggaan",
        "action-createpage": "sameey bogyaalo",
+       "action-createtalk": "Samaynta bogagga wadahadalka",
        "action-upload": "soo geli file'kaan",
        "action-delete": "tirtir boggaan",
        "action-browsearchive": "Raadi maqaalada la tirtiray",
        "listusers-submit": "I'tus",
        "listusers-noresult": "Lama helin isticmaale.",
        "listusers-blocked": "(waa la mamnuucay)",
+       "listgrouprights": "Xuquuqaha koox isticmaalada",
+       "listgrouprights-summary": "Kani waa liiska koox isticmaale yaal ah ee la aqoonsaday wikigaan, in ay leeyihiin xuquuqdaan.\nWaxaa laga yaabaa in ay halkaan ku jiraan [[{{MediaWiki:Listgrouprights-helppage}}|macluumaad dheeraad ah]] ee ku saabsan xuquuqaha kala gadisan.",
+       "listgrouprights-key": "Ciwaanka:\n* <span class=\"listgrouprights-granted\">Xuquuq la siiyey</span>\n* <span class=\"listgrouprights-revoked\">Xuquuq laga qaaday</span>",
+       "listgrouprights-group": "Kooxda",
+       "listgrouprights-rights": "Xuquuqaha",
        "listgrouprights-members": "(Inta ka mid ah liiskooda)",
        "mailnologin": "Ma'jiro cinwaan wax lagu diro",
        "mailnologintext": "Waa in aad [[Special:UserLogin|gudaha ku jirtaa]]\nkuna haysatid E-boosto sax ah [[Special:Preferences|dooqyadaada]],\nsi aad ugu dirto E-boosto isticmaalayaasha kale.",
        "metadata-help": "Faylkaan wuxuu leeyahay  faah faahin dheeraad ah,waxaa laga yaabaa in lagu  isticmaalay digital kaamiro ama skanner oo lagu sameeyo sawir ama lagu digitilays gareeyay.\nHadii faylka wax laga badalay sida oo markiisa hore ahaa, waxaa laga yaabaa in ee  faah faahinta faylkaan eesan dhameestirneen.",
        "metadata-fields": "Sawirka qeybihiisa metadata oo ku tixan fariintaan waxaa lagu dari doonaa bogga sawirka meesha laga arko markii miiska metadata la qariyo.Kuwa kale waxaa loo qarinaa sida default.\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
        "exif-iimcategory": "Qeybta",
+       "exif-dc-rights": "Xuquuqaha",
        "watchlistall2": "dhamaan",
        "namespacesall": "dhamaan",
        "monthsall": "Dhamaan",
        "fileduplicatesearch-legend": "Raadi mid tusaale ah",
        "fileduplicatesearch-submit": "Raadi",
        "specialpages": "bogagga khaaska ah",
+       "specialpages-note-top": "Furaha",
        "specialpages-group-pages": "liiska maqaalada",
        "blankpage": "Bog masaxan",
        "tag-filter": "[[Special:Tags|Filtaraha]] tag:",
index 899dcec..bca9286 100644 (file)
        "watchlistanontext": "Морате бити $1 да бисте гледали и уређивали ставке на вашем списку надгледања.",
        "watchnologin": "Нисте пријављени",
        "addwatch": "Додај на списак надгледања",
-       "addedwatchtext": "Страница „[[:$1]]“ је додата на ваш [[Special:Watchlist|списак надгледања]].\nБудуће измене ове странице и њене странице за разговор биће наведене овде.",
+       "addedwatchtext": "Страница „[[:$1]]“ је додата на ваш [[Special:Watchlist|списак надгледања]].\nБудуће измене ове странице и њене странице за разговор биће наведене тамо.",
        "removewatch": "Уклони са списка надгледања",
        "removedwatchtext": "Страница „[[:$1]]“ је уклоњена с вашег [[Special:Watchlist|списка надгледања]].",
        "watch": "Надгледај",
index 4e50a07..98fd6e9 100644 (file)
        "watchlistanontext": "Morate biti $1 da biste gledali i uređivali stavke na vašem spisku nadgledanja.",
        "watchnologin": "Niste prijavljeni",
        "addwatch": "Dodaj na spisak nadgledanja",
-       "addedwatchtext": "Stranica „[[:$1]]“ je dodata na vaš [[Special:Watchlist|spisak nadgledanja]].\nBuduće izmene ove stranice i njene stranice za razgovor biće navedene ovde.",
+       "addedwatchtext": "Stranica „[[:$1]]“ je dodata na vaš [[Special:Watchlist|spisak nadgledanja]].\nBuduće izmene ove stranice i njene stranice za razgovor biće navedene tamo.",
        "removewatch": "Ukloni sa spiska nadgledanja",
        "removedwatchtext": "Stranica „[[:$1]]“ je uklonjena s vašeg [[Special:Watchlist|spiska nadgledanja]].",
        "watch": "Nadgledaj",
index 5360a0f..83543e3 100644 (file)
        "right-move": "Flytta sidor",
        "right-move-subpages": "Flytta sidor med deras undersidor",
        "right-move-rootuserpages": "Flytta root-användarsidor",
+       "right-move-categorypages": "Flytta kategorisidor",
        "right-movefile": "Flytta filer",
        "right-suppressredirect": "Skapa inte omdirigeringar från ursprungssidan vid sidflyttning",
        "right-upload": "Ladda upp filer",
        "action-move": "flytta denna sida",
        "action-move-subpages": "flytta denna sida, och dess undersidor",
        "action-move-rootuserpages": "flytta root-användarsidor",
+       "action-move-categorypages": "flytta kategorisidor",
        "action-movefile": "flytta den här filen",
        "action-upload": "ladda upp denna fil",
        "action-reupload": "skriva över denna existerade fil",
        "movepagetalktext": "Diskussionssidan kommer att även den automatiskt flyttas '''om inte''':\n*Det redan finns en diskussionssida som inte är tom med det nya namnet, eller\n*Du avmarkerar rutan nedan.\n\nI de fallen måste du flytta eller sammanfoga sidan manuellt, om det önskas.",
        "movearticle": "Flytta sidan:",
        "moveuserpage-warning": "'''Varning:''' Du håller på att flytta en användarsida. Observera att endast sidan kommer att flyttas och att användaren ''inte'' kommer att byta namn.",
+       "movecategorypage-warning": "<strong>Varning:</strong> Du är på väg att flytta ebn kategorisida. Observera att endast sidan kommer att flyttas och eventuella sidor i den gamla kategorin kommer <em>inte</em> att kategoriseras om till den nya kategorin.",
        "movenologintext": "För att flytta en sida måste du vara registrerad användare och [[Special:UserLogin|inloggad]].",
        "movenotallowed": "Du har inte behörighet att flytta sidor på den här wikin.",
        "movenotallowedfile": "Du har inte tillåtelse att flytta filer.",
        "cant-move-user-page": "Du har inte behörighet att flytta användarsidor (bortsett från undersidor).",
        "cant-move-to-user-page": "Du har inte behörighet att flytta en sida till en användarsida (förutom till en användarundersida).",
+       "cant-move-category-page": "Du har inte behörighet att flytta kategorisidor.",
+       "cant-move-to-category-page": "Du har inte behörighet att en sida till en kategorisida.",
        "newtitle": "Till nya titeln:",
        "move-watch": "Bevaka denna sida",
        "movepagebtn": "Flytta sidan",
        "watchlistedit-raw-done": "Din bevakningslista har uppdaterats.",
        "watchlistedit-raw-added": "{{PLURAL:$1|1 sida|$1 sidor}} lades till:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|1 sida|$1 sidor}} togs bort:",
+       "watchlistedit-clear-title": "Rensa bevakningslistan",
+       "watchlistedit-clear-legend": "Rensa bevakningslistan",
+       "watchlisttools-clear": "Rensa bevakningslistan",
        "watchlisttools-view": "Visa relevanta ändringar",
        "watchlisttools-edit": "Visa och redigera bevakningslistan",
        "watchlisttools-raw": "Redigera bevakningslistan i råformat",
index 3bce197..99e5728 100644 (file)
@@ -37,7 +37,7 @@
        "tog-watchdefault": "నేను మార్చే పేజీలను మరియు దస్త్రాలను నా వీక్షణ జాబితాకు చేర్చు",
        "tog-watchmoves": "నేను తరలించిన పేజీలను మరియు దస్త్రాలను నా వీక్షణ జాబితాకు చేర్చు",
        "tog-watchdeletion": "నేను తొలగించిన పేజీలను మరియు దస్త్రాలను నా వీక్షణ జాబితాకు చేర్చు",
-       "tog-minordefault": "డిఫాలà±\8dà°\9fà±\81గా నా మార్పులను చిన్న మార్పులుగా గుర్తించు",
+       "tog-minordefault": "à°\85à°ªà±\8dà°°à°®à±\87à°¯à°\82గా నా మార్పులను చిన్న మార్పులుగా గుర్తించు",
        "tog-previewontop": "వ్యాసం మార్పుల మునుచూపును ఎడిట్ పెట్టె పైన చూపు",
        "tog-previewonfirst": "మొదటి  దిద్దుబాటు చేసినపుడు వ్యాసపు మునుచూపు చూపించు",
        "tog-enotifwatchlistpages": "నా వీక్షణాజాబితా లోని పేజీ లేదా దస్త్రం మారినపుడు నాకు ఈ-మెయిలు పంపు",
@@ -63,7 +63,7 @@
        "tog-prefershttps": "లాగిన్ అయి ఉన్నప్పుడెల్లా భద్ర కనెక్షనునే వాడు",
        "underline-always": "ఎల్లప్పుడూ",
        "underline-never": "ఎప్పటికీ వద్దు",
-       "underline-default": "à°°à±\82à°ªà±\81 à°¯à±\8aà°\95à±\8dà°\95 à°²à±\87దా à°µà°¿à°¹à°¾à°°à°¿à°£à°¿ à°¯à±\8aà°\95à±\8dà°\95 అప్రమేయం",
+       "underline-default": "à°\85à°²à°\82à°\95ారపà±\81 à°²à±\87దా à°µà°¿à°¹à°¾à°°à°¿à°£à°¿ అప్రమేయం",
        "editfont-style": "దిద్దుబాటు పెట్టె ఫాంటు శైలి:",
        "editfont-default": "విహరిణి అప్రమేయం",
        "editfont-monospace": "మోనోస్పేస్‍డ్ ఫాంట్",
        "nocookiesnew": "ఖాతాని సృష్టించాం, కానీ మీరు ఇంకా లోనికి ప్రవేశించలేదు.\nవాడుకరుల ప్రవేశానికి {{SITENAME}} కూకీలను వాడుతుంది.\nమీరు కూకీలని అచేతనం చేసివున్నారు.\nదయచేసి వాటిని చేతనంచేసి, మీ కొత్త వాడుకరి పేరు మరియు సంకేతపదాలతో లోనికి ప్రవేశించండి.",
        "nocookieslogin": "వాడుకరుల ప్రవేశానికై {{SITENAME}} కూకీలను వాడుతుంది.\nమీరు కుకీలని అచేతనం చేసివున్నారు.\nవాటిని చేతనంచేసి ప్రయత్నించండి.",
        "nocookiesfornew": "మూలాన్ని కనుక్కోలేకపోయాం కాబట్టి, ఈ వాడుకరి ఖాతాను సృష్టించలేకపోయాం.\nమీ కంప్యూటర్లో కూకీలు చేతనమై ఉన్నాయని నిశ్చయించుకొని, ఈ పేజీని తిరిగి లోడు చేసి, మళ్ళీ ప్రయత్నించండి.",
-       "noname": "మీరు సరైన వాడుకరిపేరు ఇవ్వలేదు.",
+       "noname": "మీరు సరైన వాడుకరి పేరు ఇవ్వలేదు.",
        "loginsuccesstitle": "ప్రవేశం విజయవంతమైంది",
        "loginsuccess": "<strong>మీరు ఇప్పుడు {{SITENAME}}లోనికి \"$1\"గా ప్రవేశించారు.</strong>",
        "nosuchuser": "\"$1\" అనే పేరుతో వాడుకరులు లేరు.\nవాడుకరి పేర్లు కేస్ సెన్సిటివ్.\nఅక్షరక్రమం సరిచూసుకోండి, లేదా [[Special:UserLogin/signup|కొత్త ఖాతా సృష్టించుకోండి]].",
index 511f8db..10517d3 100644 (file)
        "portal-url": "Project:ศูนย์รวมชุมชน",
        "privacy": "นโยบายสิทธิส่วนบุคคล",
        "privacypage": "Project:นโยบายสิทธิส่วนบุคคล",
-       "badaccess": "มีข้อผิดพลาดในการใช้สิทธิ",
+       "badaccess": "มีข้อผิดพลาดในการใช้สิทธิ",
        "badaccess-group0": "คุณไม่ได้รับอนุญาตให้ดำเนินการตามที่ขอ",
        "badaccess-groups": "ปฏิบัติการที่คุณขอนี้สงวนไว้เฉพาะผู้ใช้ใน{{PLURAL:$2|กลุ่ม|กลุ่ม}}: $1",
        "versionrequired": "ต้องการมีเดียวิกิรุ่น $1",
        "noemail": "ไม่มีที่อยู่อีเมลบันทึกไว้สำหรับผู้ใช้ \"$1\"",
        "noemailcreate": "คุณจำต้องใส่ที่อยู่อีเมลให้ถูกต้อง",
        "passwordsent": "รหัสผ่านใหม่ถูกส่งไปยังที่อยู่อีเมลที่ลงทะเบียนไว้ของ \"$1\"\nกรุณาล็อกอินอีกครั้งหลังได้รับอีเมล",
-       "blocked-mailpassword": "à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88à¹\84อà¸\9eีà¸\82อà¸\87à¸\84ุà¸\93à¸\96ูà¸\81à¸\9aลà¹\87อà¸\81มิà¹\83หà¹\89à¹\81à¸\81à¹\89à¹\84à¸\82 à¸\89ะà¸\99ัà¹\89à¸\99 à¸\88ึà¸\87à¹\84มà¹\88à¹\84à¸\94à¹\89รัà¸\9aอà¸\99ุà¸\8dาà¸\95à¹\83หà¹\89à¹\83à¸\8aà¹\89à¸\9fัà¸\87à¸\81à¹\8cà¸\8aัà¸\99à¸\82อà¸\81ูà¹\89รหัสà¸\9cà¹\88าà¸\99à¹\80à¸\9eืà¹\88อà¸\9bà¹\89อà¸\87à¸\81ัà¸\99à¸\81ารà¸\81ระà¸\97ำผิด",
+       "blocked-mailpassword": "à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88à¹\84อà¸\9eีà¸\82อà¸\87à¸\84ุà¸\93à¸\96ูà¸\81à¸\9aลà¹\87อà¸\81มิà¹\83หà¹\89à¹\81à¸\81à¹\89à¹\84à¸\82 à¸\97ำà¹\83หà¹\89à¹\84มà¹\88สามารà¸\96à¸\97ำà¹\80รืà¹\88อà¸\87à¸\82อรหัสà¸\9cà¹\88าà¸\99à¹\83หมà¹\88à¹\84à¸\94à¹\89 à¹\80à¸\9eืà¹\88อà¸\9bà¹\89อà¸\87à¸\81ัà¸\99à¸\81ารà¹\83à¸\8aà¹\89à¹\83à¸\99à¸\97าà¸\87à¸\97ีà¹\88ผิด",
        "eauthentsent": "อีเมลยืนยันได้ถูกส่งไปที่อยู่อีเมลที่เสนอ ก่อนที่อีเมลจะถูกส่งไปที่ชื่อบัญชีนั้น คุณต้องปฏิบัติตามคำแนะนำในอีเมลเพื่อยืนยันว่าบัญชีนั้นเป็นของคุณจริง ๆ",
        "throttled-mailpassword": "อีเมลตั้งรหัสผ่านใหม่ถูกส่งไปแล้วใน $1 ชั่วโมงที่ผ่านมา \nอีเมลตั้งรหัสผ่านใหม่จะส่งไปหนึ่งครั้งต่อ $1 ชั่วโมงเท่านั้น เพื่อป้องกันการกระทำที่ไม่ถูกต้อง",
        "mailerror": "ข้อผิดพลาดในการส่งเมล: $1",
        "action-createpage": "สร้างหน้า",
        "action-createtalk": "สร้างหน้าอภิปราย",
        "action-createaccount": "สร้างบัญชีผู้ใช้นี้",
+       "action-history": "ดูประวัติของหน้านี้",
        "action-minoredit": "ทำเครื่องหมายการแก้ไขนี้เป็นการแก้ไขเล็กน้อย",
        "action-move": "ย้ายหน้านี้",
        "action-move-subpages": "ย้ายหน้านี้ รวมทั้งหน้าย่อย",
        "allinnamespace": "หน้าทุกหน้า (เนมสเปซ $1)",
        "allpagessubmit": "ดู",
        "allpagesprefix": "แสดงหน้าที่ขึ้นต้นด้วย:",
-       "allpagesbadtitle": "à¸\8aืà¹\88อà¹\80รืà¹\88อà¸\87à¸\99ีà¹\89à¹\84มà¹\88à¸\96ูà¸\81à¸\95à¹\89อà¸\87 à¸­à¸²à¸\88สะà¸\81à¸\94à¸\9cิà¸\94 à¸¥à¸´à¸\87à¸\81à¹\8cมาà¸\88าà¸\81ภาษาอืà¹\88à¸\99หรือวิà¸\81ิอืà¹\88à¸\99 หรือมีตัวอักษรที่ไม่สามารถใช้เป็นชื่อเรื่องได้",
+       "allpagesbadtitle": "à¸\8aืà¹\88อà¹\80รืà¹\88อà¸\87à¸\99ีà¹\89à¹\84มà¹\88à¸\96ูà¸\81à¸\95à¹\89อà¸\87 à¸­à¸²à¸\88สะà¸\81à¸\94à¸\9cิà¸\94 à¸«à¸£à¸·à¸­à¹\80à¸\9bà¹\87à¸\99ลิà¸\87à¸\81à¹\8cà¸\82à¹\89ามภาษา หรือมีตัวอักษรที่ไม่สามารถใช้เป็นชื่อเรื่องได้",
        "allpages-bad-ns": "{{SITENAME}} ไม่มีเนมสเปซ \"$1\"",
        "allpages-hide-redirects": "ซ่อนการเปลี่ยนทาง",
        "cachedspecial-viewing-cached-ttl": "คุณกำลังดูรุ่นที่เก็บหน่วยความจำแคชของหน้านี้ ซึ่งอาจมีอายุ $1",
        "spam_reverting": "ย้อนกลับไปรุ่นก่อนหน้าที่ไม่มีลิงก์ไปยังเว็บ $1",
        "spam_blanking": "รุ่นการปรับปรุงทุกรุ่นประกอบไปด้วยลิงก์ไปยังเว็บ $1 (ทำหน้าว่าง)",
        "spam_deleting": "ทุกรุ่นที่มีลิงก์ไปยัง $1 กำลังลบ",
+       "simpleantispam-label": "การตรวจสอบสแปม\n<strong>อย่า</strong>กรอกช่องนี้!",
        "pageinfo-title": "ข้อมูลสำหรับ \"$1\"",
        "pageinfo-not-current": "ขออภัย ไม่สามารถให้ข้อมูลนี้สำหรับรุ่นเก่าได้",
        "pageinfo-header-basic": "ข้อมูลเบื้องต้น",
        "newimages-summary": "หน้าพิเศษนี้แสดงไฟล์ที่ถูกอัปโหลดล่าสุด",
        "newimages-legend": "ตัวกรอง",
        "newimages-label": "ชื่อไฟล์ (หรือส่วนหนึ่งของชื่อ):",
+       "newimages-showbots": "แสดงไฟล์ที่บอตอัปโหลด",
        "noimages": "ไม่มีให้ดู",
        "ilsubmit": "สืบค้น",
        "bydate": "ตามวันที่",
        "confirmemail_send": "ส่งรหัสยืนยันทางอีเมล",
        "confirmemail_sent": "ส่งอีเมลสำหรับการยืนยันแล้ว",
        "confirmemail_oncreate": "รหัสยืนยันถูกส่งไปยังที่อยู่อีเมลของคุณ\nรหัสนี้ไม่กำหนดให้ต้องล็อกอิน แต่คุณต้องระบุรหัสก่อนเปิดใช้งานคุณลักษณะที่อาศัยอีเมลทั้งหมดในวิกินี้",
-       "confirmemail_sendfailed": "{{SITENAME}}à¹\84มà¹\88สามารà¸\96สà¹\88à¸\87อีà¹\80มลยืà¸\99ยัà¸\99à¹\84à¸\94à¹\89\nà¹\82à¸\9bรà¸\94à¸\95รวà¸\88สอà¸\9aà¸\97ีà¹\88อยูà¹\88อีà¹\80มลวà¹\88าà¹\84มà¹\88มีอัà¸\81à¸\82ระà¸\97ีà¹\88à¹\84มà¹\88ถูกต้อง\n\nข้อความตีกลับ: $1",
+       "confirmemail_sendfailed": "{{SITENAME}}à¹\84มà¹\88สามารà¸\96สà¹\88à¸\87อีà¹\80มลยืà¸\99ยัà¸\99à¹\84à¸\94à¹\89\nà¹\82à¸\9bรà¸\94à¸\95รวà¸\88สอà¸\9aà¸\97ีà¹\88อยูà¹\88อีà¹\80มลวà¹\88าอัà¸\81à¸\82ระà¸\97ัà¹\89à¸\87หมà¸\94ถูกต้อง\n\nข้อความตีกลับ: $1",
        "confirmemail_invalid": "รหัสยืนยันไม่ถูกต้อง \nรหัสอาจหมดอายุแล้ว",
        "confirmemail_needlogin": "คุณต้อง $1 เพื่อยืนยันที่อยู่อีเมลของคุณ",
        "confirmemail_success": "อีเมลคุณได้รับการยืนยันแล้ว\nคุณอาจ[[Special:UserLogin|ล็อกอิน]]ตอนนี้และสนุกกับการแก้ไขวิกิ",
index 4bfb2d8..e6a38ff 100644 (file)
        "edit-gone-missing": "Sayfa güncellenemiyor.\nSilinmiş görünüyor.",
        "edit-conflict": "Değişiklik çakışması.",
        "edit-no-change": "Değişikliğiniz yoksayıldı, çünkü metinde bir değişiklik yapılmadı.",
+       "postedit-confirmation-created": "Sayfa oluşturuldu.",
        "postedit-confirmation-saved": "Değişikliğiniz kaydedildi.",
        "edit-already-exists": "Yeni sayfa oluşturulamıyor.\nSayfa zaten mevcut.",
        "defaultmessagetext": "Varsayılan mesaj metni",
index 903e062..6ae2b30 100644 (file)
        "show-big-image": "Toʻliq hajmdagi tasvir",
        "noimages": "Tasvir mavjud emas.",
        "ilsubmit": "Qidirish",
+       "variantname-uz-latn": "lotincha",
+       "variantname-uz-cyrl": "кириллча",
        "metadata": "Metama’lumot",
        "metadata-expand": "Batafsil axborotni koʻrsatish",
        "metadata-collapse": "Batafsil axborotni yashirish",
index f793264..903d461 100644 (file)
        "recentchanges-legend-heading": "'''Chú giải:'''",
        "recentchanges-legend-newpage": "(xem thêm [[Special:NewPages|danh sách các trang mới]])",
        "recentchanges-legend-plusminus": "(''±123'')",
-       "rcnotefrom": "Thay đổi từ <strong>$2</strong> (hiển thị tối đa <strong>$1</strong> thay đổi).",
-       "rclistfrom": "Hiển thị các thay đổi từ $3 $2.",
+       "rcnotefrom": "Các thay đổi từ <strong>$2</strong> (hiển thị tối đa <strong>$1</strong> thay đổi).",
+       "rclistfrom": "Xem các thay đổi từ $2 $3 trở về sau",
        "rcshowhideminor": "$1 sửa đổi nhỏ",
        "rcshowhideminor-show": "Hiện",
        "rcshowhideminor-hide": "Ẩn",
        "noimages": "Chưa có hình.",
        "ilsubmit": "Tìm kiếm",
        "bydate": "theo ngày",
-       "sp-newimages-showfrom": "Trưng bày những tập tin mới, bắt đầu từ lúc $2, ngày $1",
+       "sp-newimages-showfrom": "Trưng bày các tập tin từ $2 $1 trở về sau",
        "video-dims": "$1, $2×$3",
        "seconds-abbrev": "$1 s",
        "minutes-abbrev": "$1 min",
index 7d843e3..4f22c2b 100644 (file)
        "right-move": "移动页面",
        "right-move-subpages": "移动页面及其子页面",
        "right-move-rootuserpages": "移动根用户页面",
+       "right-move-categorypages": "移动分类页面",
        "right-movefile": "移动文件",
        "right-suppressredirect": "移动页面时不创建来源页面的重定向",
        "right-upload": "上传文件",
        "action-move": "移动本页",
        "action-move-subpages": "移动本页及其子页面",
        "action-move-rootuserpages": "移动根用户页面",
+       "action-move-categorypages": "移动分类页面",
        "action-movefile": "移动本文件",
        "action-upload": "上传本文件",
        "action-reupload": "覆盖本文件",
        "movepagetalktext": "有关的讨论页将被自动与该页面一起移动,'''除非''':\n*新页面已经有一个包含内容的讨论页,或者\n*您不勾选下面的复选框。\n\n在这些情况下,您在必要时必须手工移动或合并页面。",
        "movearticle": "移动页面:",
        "moveuserpage-warning": "'''警告:'''你将移动一个用户页面。请注意,只有该页面会被移动,该用户''不''会被更名。",
+       "movecategorypage-warning": "<strong>警告:</strong>您将移动分类页面。请注意只有此页面将会移动,旧有分类的任何页面将<em>不会</em>同步移动。",
        "movenologintext": "您必须是一名登记用户并且[[Special:UserLogin|登录]]\n后才可移动一个页面。",
        "movenotallowed": "你没有权限移动页面。",
        "movenotallowedfile": "你没有权限移动文件。",
        "cant-move-user-page": "你没有权限移动用户页面(子页面除外)。",
        "cant-move-to-user-page": "你没有权限移动页面至用户页面(用户子页面除外)。",
+       "cant-move-category-page": "您没有权限移动分类页面。",
+       "cant-move-to-category-page": "您没有权限移动页面至分类页面。",
        "newtitle": "新标题:",
        "move-watch": "监视来源页面和目标页面",
        "movepagebtn": "移动页面",
        "newimages-summary": "本特殊页面展示最后上传的文件。",
        "newimages-legend": "过滤",
        "newimages-label": "文件名(或它的一部份):",
+       "newimages-showbots": "显示机器人上传",
        "noimages": "无可查看文件。",
        "ilsubmit": "搜索",
        "bydate": "按日期",
        "watchlistedit-raw-done": "您的监视列表已经更新。",
        "watchlistedit-raw-added": "$1个标题被添加:",
        "watchlistedit-raw-removed": "$1个标题被删除:",
+       "watchlistedit-clear-title": "清空的监视列表",
+       "watchlistedit-clear-legend": "清空监视列表",
+       "watchlistedit-clear-explain": "所有标题将从您的监视列表中移除",
+       "watchlistedit-clear-titles": "标题:",
+       "watchlistedit-clear-submit": "清空监视列表(永久!)",
+       "watchlistedit-clear-done": "您的监视列表已清空。",
+       "watchlistedit-clear-removed": "$1个标题已移除:",
+       "watchlistedit-too-many": "这里显示了太多页面。",
+       "watchlisttools-clear": "清空监视列表",
        "watchlisttools-view": "查看相关更改",
        "watchlisttools-edit": "查看并编辑监视列表",
        "watchlisttools-raw": "编辑原始监视列表",
index 36c3c14..439b831 100644 (file)
        "parser-unstrip-loop-warning": "檢測到迴圈",
        "parser-unstrip-recursion-limit": "遞歸超過限制 ($1)",
        "converter-manual-rule-error": "手動語言轉換規則中檢測到錯誤",
-       "undo-success": "該編輯可以被撤銷。請檢查以下對比以核實這正是您想做的,然後儲存以下更改以完成撤銷編輯。",
-       "undo-failure": "由於中途的編輯不一致,此編輯不能撤銷。",
+       "undo-success": "此編輯可以被還原。\n請檢查以下比較表,確認您是否要還原,然後儲存以下變更以完成編輯還原。",
+       "undo-failure": "由於編輯的修訂間有衝突,此編輯不能還原。",
        "undo-norev": "由於其修訂版本不存在或已刪除,此編輯不能撤銷。",
-       "undo-nochange": "æ\98¯æ¬¡ç·¨è¼¯ä¼¼ä¹\8eå·²ç¶\93被æ\92¤é\8a·。",
+       "undo-nochange": "此編輯å\8f¯è\83½å·²è¢«é\82\84å\8e\9f。",
        "undo-summary": "取消由 [[Special:Contributions/$2|$2]] ([[User talk:$2|對話]]) 所作出的修訂 $1",
        "undo-summary-username-hidden": "還原隱藏使用者的修訂 $1",
        "cantcreateaccounttitle": "無法建立帳號",
        "lineno": "行 $1:",
        "compareselectedversions": "比較已選擇的修訂",
        "showhideselectedversions": "顯示/隱藏已選擇的修訂",
-       "editundo": "原",
+       "editundo": "原",
        "diff-empty": "(無差異)",
        "diff-multi-sameuser": "(未顯示相同使用者於中間所作的 $1 次修訂)",
        "diff-multi-otherusers": "(未顯示由 $2 位使用者於中間所作的 $1 次修訂)",
        "prefs-rc": "最近變更",
        "prefs-watchlist": "監視列表",
        "prefs-watchlist-days": "監視列表中顯示的天數:",
-       "prefs-watchlist-days-max": "最多$1{{PLURAL:$1|天}}",
-       "prefs-watchlist-edits": "擴充監視列表中顯示變更次數的上限:",
+       "prefs-watchlist-days-max": "最多 $1 {{PLURAL:$1|天}}",
+       "prefs-watchlist-edits": "展開的監視列表中顯示變更次數上限:",
        "prefs-watchlist-edits-max": "最大數量:1000",
        "prefs-watchlist-token": "監視列表密鑰:",
        "prefs-misc": "雜項",
        "editinguser": "變更使用者 '''[[User:$1|$1]]''' 的使用者權限 $2",
        "userrights-editusergroup": "編輯使用者群組",
        "saveusergroups": "儲存使用者群組",
-       "userrights-groupsmember": "屬於:",
-       "userrights-groupsmember-auto": "固有屬於:",
-       "userrights-groups-help": "您可以更改此使用者所屬的群組:\n* 已勾選的核選方塊代表該使用者屬於該群組。\n* 勾選的核選方塊代表該使用者不屬於該群組。\n* 有 * 號標示代表一旦加入該群組後便不能移除,反之亦然。",
+       "userrights-groupsmember": "所屬群組:",
+       "userrights-groupsmember-auto": "所屬隱含群組:",
+       "userrights-groups-help": "您可以更改此使用者所屬的群組:\n* 已勾選的核選方塊代表該使用者屬於該群組。\n* 勾選的核選方塊代表該使用者不屬於該群組。\n* 有 * 號標示代表一旦加入該群組後便不能移除,反之亦然。",
        "userrights-reason": "原因:",
        "userrights-no-interwiki": "您沒有權限去編輯其它使用者在 Wiki 上的權限。",
        "userrights-nodatabase": "資料庫$1不存在或並非為本地的。",
        "userrights-nologin": "您必須 [[Special:UserLogin|登入]] 管理員帳號以指定使用者權限。",
        "userrights-notallowed": "你無權加入或刪除使用者權限。",
-       "userrights-changeable-col": "您可以更改的群組",
-       "userrights-unchangeable-col": "您不可以更改的群組",
+       "userrights-changeable-col": "您可變更的群組",
+       "userrights-unchangeable-col": "您不可變更的群組",
        "userrights-conflict": "使用者權限更改發生衝突!請重新檢視並確認你的更改。",
        "userrights-removed-self": "您已成功移除自己的權限,故此您沒法再次訪問此頁。",
        "group": "群組:",
        "right-createpage": "建立頁面 (不含討論頁面)",
        "right-createtalk": "建立討論頁面",
        "right-createaccount": "建立新的使用者帳號",
-       "right-minoredit": "標示編輯為小修訂",
+       "right-minoredit": "標示編輯為小修訂",
        "right-move": "移動頁面",
        "right-move-subpages": "移動頁面與其子頁面",
        "right-move-rootuserpages": "移動根使用者頁面",
+       "right-move-categorypages": "移動分類頁面",
        "right-movefile": "移動檔案",
        "right-suppressredirect": "移動頁面時不建立來源的重新導向頁面",
        "right-upload": "上傳檔案",
        "right-reupload-own": "覆蓋由同一位上載的檔案",
        "right-reupload-shared": "於本地無視共用媒體檔案庫上的檔案",
        "right-upload_by_url": "由一個URL上載檔案",
-       "right-purge": "不需要確認之下清除網站快取",
-       "right-autoconfirmed": "不受基於IP的頻率限制",
+       "right-purge": "不確認清除網站快取",
+       "right-autoconfirmed": "不受以 IP 為基礎的註冊頻率限制",
        "right-bot": "視為一個自動程序",
        "right-nominornewtalk": "若討論頁面為小修訂,則不顯示新訊息提示",
-       "right-apihighlimits": "在API查詢中使用更高的上限",
-       "right-writeapi": "使用API編寫",
+       "right-apihighlimits": "API 查詢中可使用較高上限值",
+       "right-writeapi": "使用寫入 API",
        "right-delete": "刪除頁面",
        "right-bigdelete": "刪除大量歷史之頁面",
        "right-deletelogentry": "刪除及恢復特定的日誌項目",
        "right-protect": "更改保護等級以及編輯被連鎖保護的頁面",
        "right-editprotected": "編輯保護層級為「{{int:protect-level-sysop}}」的頁面",
        "right-editsemiprotected": "編輯保護層級為「{{int:protect-level-autoconfirmed}}」的頁面",
-       "right-editinterface": "編輯使用者面",
+       "right-editinterface": "編輯使用者面",
        "right-editusercssjs": "編輯其他使用者的 CSS 和 JavaScript 檔案",
        "right-editusercss": "編輯其他使用者的 CSS 檔案",
        "right-edituserjs": "編輯其他使用者的 JavaScript 檔案",
        "action-move": "移動這個頁面",
        "action-move-subpages": "移動這個頁面跟它的子頁面",
        "action-move-rootuserpages": "移動使用者根頁面",
+       "action-move-categorypages": "移動分類頁面",
        "action-movefile": "移動這個檔案",
        "action-upload": "上載這個檔案",
        "action-reupload": "覆蓋這個現有的檔案",
        "listduplicatedfiles-summary": "以下列表中某檔案之最新版本與其他檔案之最新版本重複。進包含本地檔案",
        "listduplicatedfiles-entry": "檔案[[:File:$1|$1]]與[[$3|其他$2個重複]]。",
        "unusedtemplates": "未使用的樣版",
-       "unusedtemplatestext": "此頁列出所有於 {{ns:template}} 命名空間下未被其他頁面引用的頁面。\n請在刪除這些樣版前檢查其他使用該樣版的頁面。",
+       "unusedtemplatestext": "此頁面列出所有於 {{ns:template}} 命名空間下未被其他頁面引用的樣版。\n在刪除前,仍需檢查是否有連結這些樣版的其他頁面。",
        "unusedtemplateswlh": "其他連結",
        "randompage": "隨機頁面",
        "randompage-nopages": "在{{PLURAL:$2|命名空間}}中沒有任何頁面:$1。",
        "statistics-views-total-desc": "不存在頁面和特殊頁面的查看數未計入",
        "statistics-views-peredit": "每次編輯檢視數",
        "statistics-users": "已註冊的 [[Special:ListUsers|使用者]]",
-       "statistics-users-active": "活使用者",
+       "statistics-users-active": "活使用者",
        "statistics-users-active-desc": "在最近 $1 天操作過的使用者",
        "statistics-mostpopular": "被查閱次數最多的頁面",
        "pageswithprop": "擁有屬性的頁面",
        "brokenredirects-edit": "編輯",
        "brokenredirects-delete": "刪除",
        "withoutinterwiki": "未有語言連結的頁面",
-       "withoutinterwiki-summary": "以ä¸\8bç\9a\84é \81é\9d¢æ\98¯æ\9cªæ\9c\89èª\9eè¨\80é\80£çµ\90å\88°å\85¶å®\83èª\9eè¨\80ç\89\88æ\9c¬。",
+       "withoutinterwiki-summary": "ä¸\8bå\88\97æ\98¯æ²\92æ\9c\89é\80£çµ\90å\88°å\85¶å®\83èª\9eè¨\80ç\89\88æ\9c¬ç\9a\84é \81é\9d¢。",
        "withoutinterwiki-legend": "字首",
        "withoutinterwiki-submit": "顯示",
        "fewestrevisions": "最少修訂的頁面",
        "protectedtitlesempty": "在這些參數之下並無標題正在保護。",
        "listusers": "使用者清單",
        "listusers-editsonly": "只顯示有編輯的使用者",
-       "listusers-creationsort": "建立日期排序",
+       "listusers-creationsort": "建立日期排序",
        "listusers-desc": "使用降冪排序",
        "usereditcount": "$1 次{{PLURAL:$1|編輯}}",
        "usercreated": "於 $1 $2 {{GENDER:$3|建立}}",
        "ancientpages": "最舊頁面",
        "move": "移動",
        "movethispage": "移動本頁",
-       "unusedimagestext": "下列檔案未有嵌入任何頁面但它仍然存在。\n請注意其它網站可能直接透過 URL 連結此檔案,所以這裡列出的圖片有可能依然被使用。",
-       "unusedcategoriestext": "é\9b\96ç\84¶æ²\92æ\9c\89被å\85¶å®\83é \81é\9d¢æ\88\96è\80\85å\88\86é¡\9eæ\89\80æ\8e¡ç\94¨ï¼\8cä½\86å\88\97表中ç\9a\84å\88\86é¡\9eé \81ä¾\9dç\84¶å­\98å\9c¨ã\80\82",
+       "unusedimagestext": "下列為未被任何頁面使用的檔案。\n請注意,其它網站可能直接透過 URL 連結至檔案,所以這裡列出的檔案仍有可能被使用。",
+       "unusedcategoriestext": "ä¸\8bå\88\97å\88\86é¡\9eæ²\92æ\9c\89被å\85¶å®\83é \81é\9d¢æ\88\96è\80\85å\88\86é¡\9eæ\89\80使ç\94¨ã\80\82",
        "notargettitle": "無目標",
        "notargettext": "您尚未指定目標頁面或使用者以進行此項操作。",
        "nopagetitle": "無目標頁面",
        "pager-older-n": "較舊 $1 筆",
        "suppress": "監督",
        "querypage-disabled": "此特殊頁面基於效能的原因已經被停用。",
-       "booksources": "網路書源",
-       "booksources-search-legend": "尋找網路書源",
+       "booksources": "圖書資源",
+       "booksources-search-legend": "尋找圖書資源",
        "booksources-isbn": "國際標準書號:",
        "booksources-go": "送出",
        "booksources-text": "以下是一份銷售新書或二手書的列表,並可能有{{GENDER:|你|妳|你}}正尋找的書的進一步訊息:",
        "cachedspecial-viewing-cached-ts": "您正在閱讀此頁的緩存版本,這可能不是完整的版本。",
        "cachedspecial-refresh-now": "查看最新。",
        "categories": "頁面分類",
-       "categoriespagetext": "以ä¸\8bç\9a\84{{PLURAL:$1|å\88\86é¡\9e}}中å\8c\85å\90«äº\86é \81é\9d¢æ\88\96åª\92é«\94ã\80\82\n[[Special:UnusedCategories|æ\9cªç\94¨å\88\86é¡\9e]]ä¸\8dæ\9c\83å\9c¨é\80\99è£\8få\88\97示ã\80\82\nè«\8bå\90\8cæ\99\82å\8f\83é\96±[[Special:WantedCategories|需要的分類]]。",
+       "categoriespagetext": "ä¸\8bå\88\97ç\82ºå\8c\85å\90«é \81é\9d¢æ\88\96åª\92é«\94ç\9a\84{{PLURAL:$1|å\88\86é¡\9e}}ã\80\82\n[[Special:UnusedCategories|æ\9cªä½¿ç\94¨ç\9a\84å\88\86é¡\9e]] ä¸\8dæ\9c\83å\9c¨æ­¤é¡¯ç¤ºã\80\82\nè«\8bå\8f\83è\80\83 [[Special:WantedCategories|需要的分類]]。",
        "categoriesfrom": "顯示由此項起之分類:",
        "special-categories-sort-count": "按數量排列",
        "special-categories-sort-abc": "按字母排列",
        "listusers-submit": "顯示",
        "listusers-noresult": "查無使用者。",
        "listusers-blocked": "(已封鎖)",
-       "activeusers": "æ\9c\89æ´»å\8b\95ç\9a\84使ç\94¨è\80\85æ¸\85å\96®",
+       "activeusers": "活動的使用者清單",
        "activeusers-intro": "此清單為最近 $1 天有活動的使用者。",
-       "activeusers-count": "最近$3天內有$1次編輯",
+       "activeusers-count": "最近 $3 天內有 $1 次動作",
        "activeusers-from": "顯示使用者開始自:",
        "activeusers-hidebots": "隱藏機器人",
        "activeusers-hidesysops": "隱藏管理員",
        "activeusers-noresult": "查無使用者。",
        "listgrouprights": "使用者群組權限",
        "listgrouprights-summary": "以下為此 Wiki 的使用者群組清單,以及相關的存取權限。\n您可以在 [[{{MediaWiki:Listgrouprights-helppage}}|詳細資訊]] 找到有關個別權限的資訊。",
-       "listgrouprights-key": "* <span class=\"listgrouprights-granted\">已授予的權限</span>\n* <span class=\"listgrouprights-revoked\">被吊銷的權限</span>",
+       "listgrouprights-key": "說明:\n* <span class=\"listgrouprights-granted\">已授予的權限</span>\n* <span class=\"listgrouprights-revoked\">已撤銷的權限</span>",
        "listgrouprights-group": "群組",
        "listgrouprights-rights": "權限",
        "listgrouprights-helppage": "Help:群組權限",
        "unblocklink": "解除封鎖",
        "change-blocklink": "變更封鎖",
        "contribslink": "貢獻",
-       "emaillink": "傳送電郵",
+       "emaillink": "發送電子郵件",
        "autoblocker": "您的 IP 位址因最近被 [[User:$1|$1]] 使用過而被自動封鎖。\n封鎖 $1 的原因為 \"$2\"",
        "blocklogpage": "查封日誌",
        "blocklog-showlog": "此使用者先前被封鎖過。\n以下為封鎖紀錄以供參考:",
        "movepagetalktext": "相關的的對話頁面 (如果有的話) 會自動與該頁面一起移動,<strong>除非:</strong>\n*新的名稱已有一個存在的對話頁面,或\n*您未勾選此核選方塊。\n\n在上述情況下,若有必要您必須手動移動或合併已存在的頁面。",
        "movearticle": "移動頁面:",
        "moveuserpage-warning": "<strong>警告:</strong> 您正要移動使用者頁面,請注意只有使用者頁面會變更名稱,並<em>不會</em>重新命名使用者。",
+       "movecategorypage-warning": "<strong>警告:</strong>您將要移動分類頁面。請注意此操作只頁面,舊分類中的頁面將<em>不會</em>移動到新的分類。",
        "movenologintext": "您必須是已註冊的使用者並且 [[Special:UserLogin|登入]] 才可移動頁面。",
        "movenotallowed": "您並沒有許可權去移動頁面。",
        "movenotallowedfile": "您並沒有許可權去移動檔案。",
        "cant-move-user-page": "您沒有權限去移動使用者頁面 (除了它的子頁面)。",
        "cant-move-to-user-page": "您沒有權限去移動頁面至使用者頁面 (除了使用者子頁面)。",
+       "cant-move-category-page": "您沒有移動分類頁面的權限。",
+       "cant-move-to-category-page": "您沒有權限移動頁面去分類頁面。",
        "newtitle": "新標題:",
        "move-watch": "監視來源以及目標頁",
        "movepagebtn": "移動頁面",
        "tooltip-recreate": "重建該頁面,無論是否被刪除。",
        "tooltip-upload": "開始上傳",
        "tooltip-rollback": "點選 \"還原\" 還原至上位貢獻者對此頁面的編輯",
-       "tooltip-undo": "「復原」可以在編輯模式上開啟編輯表格以便恢復。它容許在摘要中加入原因。",
+       "tooltip-undo": "\"還原\" 可還原此編輯並以預覽模式開啟編輯表單,讓您可在摘要中加入原因。",
        "tooltip-preferences-save": "儲存偏好設定",
        "tooltip-summary": "輸入一個簡短的摘要",
        "interlanguage-link-title": "$1 – $2",
        "filedelete-old-unregistered": "所指定的檔案修訂「$1」在資料庫中不存在。",
        "filedelete-current-unregistered": "所指定的檔案「$1」在資料庫中不存在。",
        "filedelete-archive-read-only": "存檔目錄「$1」在網頁伺服器中不可寫。",
-       "previousdiff": "←上一版本",
-       "nextdiff": "下一版本→",
+       "previousdiff": "← 較舊編輯",
+       "nextdiff": "較新編輯 →",
        "mediawarning": "<strong>警告</strong>:此檔案類型可能包含惡意代碼。\n若執行可能對您的系統造成損害。",
        "imagemaxsize": "圖片大小限制:<br /><em>(用於檔案描述頁面)</em>",
        "thumbsize": "縮圖大小:",
        "newimages-summary": "此特殊頁面中顯示最新上傳的檔案。",
        "newimages-legend": "搜尋",
        "newimages-label": "檔案名稱 (或部份):",
+       "newimages-showbots": "顯示機械人上載",
        "noimages": "無可檢視圖片。",
        "ilsubmit": "搜尋",
        "bydate": "按日期",
        "comma-separator": "、",
        "colon-separator": ":",
        "word-separator": "",
-       "parentheses": "($1)",
+       "parentheses": " ($1)",
        "quotation-marks": "「$1」",
        "imgmultipageprev": "← 上一頁",
        "imgmultipagenext": "下一頁 →",
        "table_pager_first": "第一頁",
        "table_pager_last": "最末頁",
        "table_pager_limit": "每頁顯示 $1 筆記錄",
-       "table_pager_limit_label": "每頁項目數︰",
+       "table_pager_limit_label": "每頁數︰",
        "table_pager_limit_submit": "送出",
        "table_pager_empty": "沒有結果",
        "autosumm-blank": "清空頁面",
        "watchlistedit-raw-done": "您的監視列表已經更新。",
        "watchlistedit-raw-added": "已經加入了$1個標題:",
        "watchlistedit-raw-removed": "已經移除了$1個標題:",
+       "watchlistedit-clear-title": "已清除監視列表",
+       "watchlistedit-clear-legend": "清除監視列表",
+       "watchlistedit-clear-explain": "所有標題將會從你的監視列表中刪除",
+       "watchlistedit-clear-titles": "標題:",
+       "watchlistedit-clear-submit": "清除監視列表(這是永久!)",
+       "watchlistedit-clear-done": "您的監視列表已經清除。",
+       "watchlistedit-clear-removed": "已經移除了$1個標題:",
+       "watchlistedit-too-many": "有太多的頁面要在此處顯示。",
+       "watchlisttools-clear": "清除監視列表",
        "watchlisttools-view": "檢視相關更改",
        "watchlisttools-edit": "檢視並編輯監視列表",
        "watchlisttools-raw": "編輯原始監視列表",
        "unknown_extension_tag": "不明的擴展標籤「$1」",
        "duplicate-defaultsort": "警告: 預設的排序鍵「$2」覆蓋先前的預設排序鍵「$1」。",
        "version": "版本",
-       "version-extensions": "已經安裝的擴展",
+       "version-extensions": "已安裝的擴充套件",
        "version-specialpages": "特殊頁面",
-       "version-parserhooks": "èª\9eæ³\95é\88\8e",
+       "version-parserhooks": "èª\9eæ³\95é\80£çµ\90(Hook)",
        "version-variables": "變數",
-       "version-antispam": "垃圾防止",
+       "version-antispam": "垃圾訊息防止",
        "version-skins": "外觀",
        "version-other": "其他",
        "version-mediahandlers": "媒體處理器",
-       "version-hooks": "é\88\8e",
-       "version-parser-extensiontags": "èª\9eæ³\95æ\93´å±\95標籤",
-       "version-parser-function-hooks": "èª\9eæ³\95å\87½æ\95¸é\88\8e",
-       "version-hook-name": "é\88\8eå\90\8d",
-       "version-hook-subscribedby": "利用於",
+       "version-hooks": "é\80£çµ\90(Hooks)",
+       "version-parser-extensiontags": "èª\9eæ³\95æ\93´å\85\85標籤",
+       "version-parser-function-hooks": "èª\9eæ³\95å\87½æ\95¸é\80£çµ\90",
+       "version-hook-name": "é\80£çµ\90å\90\8d稱",
+       "version-hook-subscribedby": "署名",
        "version-version": "(版本 $1)",
-       "version-license": "MediaWiki許可證",
-       "version-ext-license": "授權",
-       "version-ext-colheader-name": "æ\93´å±\95",
+       "version-license": "MediaWiki 授權條款",
+       "version-ext-license": "授權條款",
+       "version-ext-colheader-name": "æ\93´å\85\85å¥\97件",
        "version-ext-colheader-version": "版本",
-       "version-ext-colheader-license": "許可證",
+       "version-ext-colheader-license": "授權條款",
        "version-ext-colheader-description": "說明",
        "version-ext-colheader-credits": "作者",
-       "version-license-title": "用於$1之許可證",
-       "version-license-not-found": "並無與此拓展相關之許可證資訊。",
-       "version-credits-title": "用於$1之信用",
-       "version-credits-not-found": "並無與此拓展相關之信用資訊。",
-       "version-poweredby-credits": "此維基由'''[https://www.mediawiki.org/ MediaWiki]'''驅動,版權所有 © 2001-$1 $2。",
+       "version-license-title": "$1 的授權條款",
+       "version-license-not-found": "查無此擴充套件的詳細授權條款資訊。",
+       "version-credits-title": "$1 的製作群",
+       "version-credits-not-found": "查無此擴充套件的詳細製作群資訊。",
+       "version-poweredby-credits": "此 Wiki 由 <strong>[https://www.mediawiki.org/ MediaWiki]</strong> 開發,版權所有 © 2001-$1 $2。",
        "version-poweredby-others": "其他",
-       "version-poweredby-translators": "translatewiki.net 上的翻譯者",
-       "version-credits-summary": "我們感謝以下人士為[[Special:Version|MediaWiki]]作出的貢獻。",
-       "version-license-info": "MediaWiki為自由軟件;您可依據自由軟件基金會所發表的GNU通用公共授權條款規定,就本程式再為發佈與/或修改;無論您依據的是本授權的第二版或(您自行選擇的)任一日後發行的版本。\n\nMediaWiki是基於使用目的而加以發佈,然而不負任何擔保責任;亦無對適售性或特定目的適用性所為的默示性擔保。詳情請參照GNU通用公共授權。\n\n您應已收到附隨於本程式的[{{SERVER}}{{SCRIPTPATH}}/COPYING GNU通用公共授權的副本];如果沒有,請寫信至自由軟件基金會:51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA,或[//www.gnu.org/licenses/old-licenses/gpl-2.0.html 線上閱讀]。",
-       "version-software": "已經安裝的軟",
+       "version-poweredby-translators": " translatewiki.net 翻譯人員",
+       "version-credits-summary": "我們感謝以下人士為 [[Special:Version|MediaWiki]] 作出的貢獻。",
+       "version-license-info": "MediaWiki 為自由軟體;您可依據自由軟體基金會所發表的 GNU 通用公共授權條款規定,將本程式重新發佈與/或修改;無論您依據的是本授權條款的第二版或 (您可自行選擇) 之後的任何版本。\n\n本程式發佈的目的是希望可以提供幫助,但不負任何擔保責任;亦無隱含對適售性或 特定用途的適用性的情形擔保。詳情請參照 GNU 通用公共授權。\n\n您應已隨本程式收到 [{{SERVER}}{{SCRIPTPATH}}/COPYING GNU 通用公共授權條款的副本];如果沒有,請信件通知自由軟體基金會,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA,或 [//www.gnu.org/licenses/old-licenses/gpl-2.0.html 線上閱讀]。",
+       "version-software": "已經安裝的軟",
        "version-software-product": "產品",
        "version-software-version": "版本",
-       "version-entrypoints": "入口URL",
-       "version-entrypoints-header-entrypoint": "入口",
+       "version-entrypoints": "入口 URL",
+       "version-entrypoints-header-entrypoint": "入口",
        "version-entrypoints-header-url": "URL",
        "version-entrypoints-articlepath": "[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgArticlePath 條目路徑]",
        "redirect": "依檔案、使用者、頁面或修訂 ID 重新導向",
        "redirect-lookup": "尋找:",
        "redirect-value": "值:",
        "redirect-user": "使用者 ID",
-       "redirect-page": "頁面ID",
-       "redirect-revision": "頁面修訂ID",
+       "redirect-page": "頁面 ID",
+       "redirect-revision": "頁面修訂 ID",
        "redirect-file": "檔案名稱",
        "redirect-not-exists": "找不到",
-       "fileduplicatesearch": "選擇重覆檔案",
-       "fileduplicatesearch-summary": "用重覆檔案的切細值去找出檔案是否重覆。",
-       "fileduplicatesearch-legend": "æ\89¾重覆",
+       "fileduplicatesearch": "搜尋重覆檔案",
+       "fileduplicatesearch-summary": "依據雜湊值(Hash)來搜尋重複的檔案。",
+       "fileduplicatesearch-legend": "æ\90\9cå°\8b重覆",
        "fileduplicatesearch-filename": "檔案名稱:",
        "fileduplicatesearch-submit": "搜尋",
        "fileduplicatesearch-info": "$1 × $2 像素<br />檔案大小:$3<br />MIME 類型:$4",
-       "fileduplicatesearch-result-1": "檔案「$1」無完全相同的重覆。",
-       "fileduplicatesearch-result-n": "檔案「$1」有$2項完全相同的重覆。",
-       "fileduplicatesearch-noresults": "æ²\92æ\9c\89ç\99¼ç\8f¾å\90\8dç\82ºã\80\8c$1ã\80\8dç\9a\84æ\96\87件。",
+       "fileduplicatesearch-result-1": "檔案 $1 無重覆的檔案。",
+       "fileduplicatesearch-result-n": "檔案 $1 有 $2 筆重覆的檔案。",
+       "fileduplicatesearch-noresults": "æ\9f¥ç\84¡å\90\8d稱ç\82º \"$1\" ç\9a\84æª\94æ¡\88。",
        "specialpages": "特殊頁面",
-       "specialpages-note-top": "圖例",
-       "specialpages-note": "* 標準特殊頁面。\n* <span class=\"mw-specialpagerestricted\">用於重新整理的特殊頁面(可能過時)。</span>",
-       "specialpages-group-maintenance": "維護報",
+       "specialpages-note-top": "說明",
+       "specialpages-note": "* 一般特殊頁面。\n* <span class=\"mw-specialpagerestricted\">受限制的特殊頁面。</span>",
+       "specialpages-group-maintenance": "維護報",
        "specialpages-group-other": "其它特殊頁面",
        "specialpages-group-login": "登入/建立新帳號",
        "specialpages-group-changes": "最近變更與日誌",
-       "specialpages-group-media": "媒體報告和上傳",
+       "specialpages-group-media": "媒體上傳與報表",
        "specialpages-group-users": "使用者與權限",
        "specialpages-group-highuse": "常用頁面",
        "specialpages-group-pages": "頁面清單",
        "specialpages-group-pagetools": "頁面工具",
        "specialpages-group-wiki": "資料和工具",
-       "specialpages-group-redirects": "重新導向特殊頁面",
-       "specialpages-group-spam": "反垃圾工具",
+       "specialpages-group-redirects": "重新導向相關特殊頁面",
+       "specialpages-group-spam": "反垃圾訊息工具",
        "blankpage": "空白頁面",
-       "intentionallyblankpage": "這個頁面是為空白",
+       "intentionallyblankpage": "此頁面被故意設為空白。",
        "external_image_whitelist": " #留下這行一樣的文字<pre>\n#在下面(//之中間部份)輸入正規表達式\n#這些將會跟外部(已超連結的)圖片配合\n#那些配合到出來的會顯示成圖片,否則就只會顯示成連結\n#有 # 開頭的行會當成註解\n#大小寫並無區分\n\n#在這行上面輸入所有的regex。留下這行一樣的文字</pre>",
-       "tags": "有效標籤",
-       "tag-filter": "[[Special:Tags|標籤]]過濾器:",
+       "tags": "有效變更標籤",
+       "tag-filter": "[[Special:Tags|標籤]]搜尋:",
        "tag-filter-submit": "搜尋",
        "tag-list-wrapper": "([[Special:Tags|標籤]]:$2)",
        "tags-title": "標籤",
        "tags-intro": "這個頁面列示出在軟件中已標示的編輯,以及它們的解釋。",
        "tags-tag": "標籤名稱",
        "tags-display-header": "在更改清單中的出現方式",
-       "tags-description-header": "解釋完整描述",
+       "tags-description-header": "完整含意說明",
        "tags-active-header": "存檔?",
        "tags-hitcount-header": "已加上標籤的更改",
        "tags-active-yes": "是",
        "tags-active-no": "否",
        "tags-edit": "編輯",
-       "tags-hitcount": "$1次更改",
+       "tags-hitcount": "$1 次變更",
        "comparepages": "比較頁面",
-       "compare-page1": "第1頁",
-       "compare-page2": "第2頁",
-       "compare-rev1": "修訂版本1",
-       "compare-rev2": "修訂版本2",
+       "compare-page1": "第 1 頁",
+       "compare-page2": "第 2 頁",
+       "compare-rev1": "修訂 1",
+       "compare-rev2": "修訂 2",
        "compare-submit": "比較",
        "compare-invalid-title": "所指定標題無效。",
        "compare-title-not-exists": "所指定的話題不存在。",
        "htmlform-int-toohigh": "您所指定的值高於最大值$1",
        "htmlform-required": "此值是必填項",
        "htmlform-submit": "提交",
-       "htmlform-reset": "撤銷更改",
+       "htmlform-reset": "還原更改",
        "htmlform-selectorother-other": "其他",
        "htmlform-no": "否",
        "htmlform-yes": "是",
        "duration-millennia": "$1 千年",
        "rotate-comment": "順時針旋轉圖像$1{{PLURAL:$1|度}}",
        "limitreport-title": "分析器分析資料:",
-       "limitreport-cputime": "CPU使用時間",
-       "limitreport-cputime-value": "$1秒",
+       "limitreport-cputime": "CPU 使用時間",
+       "limitreport-cputime-value": "$1 秒",
        "limitreport-walltime": "實際使用時間",
-       "limitreport-walltime-value": "$1秒",
-       "limitreport-ppvisitednodes": "預處理器訪問節點數",
-       "limitreport-ppgeneratednodes": "é \90è\99\95ç\90\86å\99¨ç\94\9fæ\88\90ç¯\80é»\9eè¨\88數",
-       "limitreport-postexpandincludesize": "展開後大小",
+       "limitreport-walltime-value": "$1 秒",
+       "limitreport-ppvisitednodes": "預處理器訪問節點數",
+       "limitreport-ppgeneratednodes": "é \90è\99\95ç\90\86å\99¨ç\94¢ç\94\9fç¯\80é»\9e次數",
+       "limitreport-postexpandincludesize": "展開後的引用大小",
        "limitreport-postexpandincludesize-value": "$1/$2 個{{PLURAL:$2|位元組}}",
        "limitreport-templateargumentsize": "樣版參數大小",
        "limitreport-templateargumentsize-value": "$1/$2 個{{PLURAL:$2|位元組}}",
        "limitreport-expansiondepth": "最高展開深度",
-       "limitreport-expensivefunctioncount": "高開銷分析函數數位",
+       "limitreport-expensivefunctioncount": "高分析函數次數",
        "expandtemplates": "展開樣版",
        "expand_templates_intro": "本特殊頁面會將文字中的樣版展開,可以包含支援的分析程式語法,如 <code><nowiki>{{</nowiki>#language:…}}</code> 與變數如 <code><nowiki>{{</nowiki>CURRENTDAY}}</code>。\n實際上,絕大部分在雙括號中的內容都會被展開。",
        "expand_templates_title": "上下文標題,用於 {{FULLPAGENAME}} 等:",
        "expand_templates_input": "輸入文字:",
        "expand_templates_output": "結果:",
-       "expand_templates_xml_output": "XML輸出",
-       "expand_templates_html_output": "原始HTML輸出",
+       "expand_templates_xml_output": "XML 輸出",
+       "expand_templates_html_output": "原始 HTML 輸出",
        "expand_templates_ok": "確定",
        "expand_templates_remove_comments": "移除評論",
        "expand_templates_remove_nowiki": "在結果中禁止顯示 <nowiki> 標籤",
-       "expand_templates_generate_xml": "顯示XML語法樹",
-       "expand_templates_generate_rawhtml": "顯示原始HTML",
+       "expand_templates_generate_xml": "顯示 XML 解析樹",
+       "expand_templates_generate_rawhtml": "顯示原始 HTML",
        "expand_templates_preview": "預覽"
 }
index 479030f..e316d9e 100644 (file)
@@ -731,7 +731,7 @@ abstract class Maintenance {
                        return;
                }
 
-               $screenWidth = 80; // TODO: Caculate this!
+               $screenWidth = 80; // TODO: Calculate this!
                $tab = "    ";
                $descWidth = $screenWidth - ( 2 * strlen( $tab ) );
 
index 7fe3bd9..83e731a 100644 (file)
@@ -36,17 +36,76 @@ class GenerateJsonI18n extends Maintenance {
        public function __construct() {
                parent::__construct();
                $this->mDescription = "Build JSON messages files from a PHP messages file";
-               $this->addArg( 'phpfile', 'PHP file defining a $messages array', true );
-               $this->addArg( 'jsondir', 'Directory to write JSON files to. ' .
-                       'Required unless <phpfile> exists and --shim-only is specified', false );
+
+               $this->addArg( 'phpfile', 'PHP file defining a $messages array', false );
+               $this->addArg( 'jsondir', 'Directory to write JSON files to', false );
                $this->addOption( 'langcode', 'Language code; only needed for converting core i18n files',
                        false, true );
+               $this->addOption( 'extension', 'Perform default conversion on an extension',
+                       false, true );
                $this->addOption( 'shim-only', 'Only create or update the backward-compatibility shim' );
+               $this->addOption( 'supplementary', 'Find supplementary i18n files in subdirs and convert those',
+                       false, false );
        }
 
        public function execute() {
+               global $IP;
+
                $phpfile = $this->getArg( 0 );
                $jsondir = $this->getArg( 1 );
+               $extension = $this->getOption( 'extension' );
+               $convertSupplementaryI18nFiles = $this->hasOption( 'supplementary' );
+
+               if ( $extension ) {
+                       if ( $phpfile ) {
+                               $this->error( "The phpfile is already specified, conflicts with --extension.\n", 1 );
+                       }
+                       $phpfile = "$IP/extensions/$extension/$extension.i18n.php";
+               }
+
+               if ( !$phpfile ) {
+                       $this->error( "I'm here for an argument!\n" );
+                       $this->maybeHelp( true );
+                       // dies.
+               }
+
+               if ( $convertSupplementaryI18nFiles ) {
+                       if ( is_readable( $phpfile ) ) {
+                               $this->transformI18nFile( $phpfile, $jsondir );
+                       } else {
+                               // This is non-fatal because we might want to continue searching for
+                               // i18n files in subdirs even if the extension does not include a
+                               // primary i18n.php.
+                               $this->error( "Warning: no primary i18n file was found." );
+                       }
+                       $this->output( "Searching for supplementary i18n files...\n" );
+                       $dir_iterator = new RecursiveDirectoryIterator( dirname( $phpfile ) );
+                       $iterator = new RecursiveIteratorIterator( $dir_iterator, RecursiveIteratorIterator::LEAVES_ONLY );
+                       foreach ( $iterator as $path => $fileObject ) {
+                               if ( fnmatch( "*.i18n.php", $fileObject->getFilename() ) ) {
+                                       $this->output( "Converting $path.\n" );
+                                       $this->transformI18nFile( $path );
+                               }
+                       }
+               } else {
+                       // Just convert the primary i18n file.
+                       $this->transformI18nFile( $phpfile, $jsondir );
+               }
+       }
+
+       public function transformI18nFile( $phpfile, $jsondir = null ) {
+               if ( !$jsondir ) {
+                       // Assume the json directory should be in the same directory as the
+                       // .i18n.php file.
+                       $jsondir = dirname( $phpfile ) . "/i18n";
+               }
+               if ( !is_dir( $jsondir ) ) {
+                       $this->output( "Creating directory $jsondir.\n" );
+                       $success = mkdir( $jsondir );
+                       if ( !$success ) {
+                               $this->error( "Could not create directory $jsondir\n", 1 );
+                       }
+               }
 
                if ( $this->hasOption( 'shim-only' ) ) {
                        $this->shimOnly( $phpfile, $jsondir );
index 20d6ad5..5a3e00c 100644 (file)
@@ -29,11 +29,14 @@ if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '
 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
 define( 'MEDIAWIKI_INSTALL', true );
 
-require_once dirname( __DIR__ ) . "/maintenance/Maintenance.php";
+require_once dirname( __DIR__ ) . '/maintenance/Maintenance.php';
 
 /**
  * Maintenance script to install and configure MediaWiki
  *
+ * Default values for the options are defined in DefaultSettings.php (see the mapping in CliInstaller.php)
+ * Default for --dbpath (SQLite-specific) is defined in SqliteInstaller::getGlobalDefaults
+ *
  * @ingroup Maintenance
  */
 class CommandLineInstaller extends Maintenance {
@@ -41,9 +44,12 @@ class CommandLineInstaller extends Maintenance {
                parent::__construct();
                global $IP;
 
-               $this->addArg( 'name', 'The name of the wiki', true );
+               $this->addDescription( "CLI-based MediaWiki installation and configuration.\n" .
+                       "Defaut options are indicated in parenthesis." );
+
+               $this->addArg( 'name', 'The name of the wiki (MediaWiki)', false );
 
-               $this->addArg( 'admin', 'The username of the wiki administrator (WikiSysop)', true );
+               $this->addArg( 'admin', 'The username of the wiki administrator.' );
                $this->addOption( 'pass', 'The password for the wiki administrator.', false, true );
                $this->addOption(
                        'passfile',
@@ -66,22 +72,22 @@ class CommandLineInstaller extends Maintenance {
                $this->addOption( 'dbserver', 'The database host (localhost)', false, true );
                $this->addOption( 'dbport', 'The database port; only for PostgreSQL (5432)', false, true );
                $this->addOption( 'dbname', 'The database name (my_wiki)', false, true );
-               $this->addOption( 'dbpath', 'The path for the SQLite DB (/var/data)', false, true );
+               $this->addOption( 'dbpath', 'The path for the SQLite DB ($IP/data)', false, true );
                $this->addOption( 'dbprefix', 'Optional database table name prefix', false, true );
                $this->addOption( 'installdbuser', 'The user to use for installing (root)', false, true );
-               $this->addOption( 'installdbpass', 'The pasword for the DB user to install as.', false, true );
+               $this->addOption( 'installdbpass', 'The password for the DB user to install as.', false, true );
                $this->addOption( 'dbuser', 'The user to use for normal operations (wikiuser)', false, true );
-               $this->addOption( 'dbpass', 'The pasword for the DB user for normal operations', false, true );
+               $this->addOption( 'dbpass', 'The password for the DB user for normal operations', false, true );
                $this->addOption(
                        'dbpassfile',
                        'An alternative way to provide dbpass option, as the contents of this file',
                        false,
                        true
                );
-               $this->addOption( 'confpath', "Path to write LocalSettings.php to, default $IP", false, true );
+               $this->addOption( 'confpath', "Path to write LocalSettings.php to ($IP)", false, true );
                /*
                $this->addOption( 'dbschema', 'The schema for the MediaWiki DB in pg (mediawiki)', false, true );
-               $this->addOption( 'namespace', 'The project namespace (same as the name)', false, true );
+               $this->addOption( 'namespace', 'The project namespace (same as the "name" argument)', false, true );
                */
                $this->addOption( 'env-checks', "Run environment checks only, don't change anything" );
        }
@@ -89,18 +95,17 @@ class CommandLineInstaller extends Maintenance {
        function execute() {
                global $IP;
 
-               // Will not be set if used with --env-checks
-               $siteName = isset( $this->mArgs[0] ) ? $this->mArgs[0] : "Don't care";
-               $adminName = isset( $this->mArgs[1] ) ? $this->mArgs[1] : null;
+               $siteName = $this->getArg( 0, 'MediaWiki' ); // Will not be set if used with --env-checks
+               $adminName = $this->getArg( 1 );
 
-               $dbpassfile = $this->getOption( 'dbpassfile', false );
-               if ( $dbpassfile !== false ) {
-                       if ( $this->getOption( 'dbpass', false ) !== false ) {
-                               $this->error( 'WARNING: You provide the options "dbpass" and "dbpassfile". '
-                                       . 'The content of "dbpassfile" overwrites "dbpass".' );
+               $dbpassfile = $this->getOption( 'dbpassfile' );
+               if ( $dbpassfile !== null ) {
+                       if ( $this->getOption( 'dbpass' ) !== null ) {
+                               $this->error( 'WARNING: You have provided the options "dbpass" and "dbpassfile". '
+                                       . 'The content of "dbpassfile" overrides "dbpass".' );
                        }
                        wfSuppressWarnings();
-                       $dbpass = file_get_contents( $dbpassfile );
+                       $dbpass = file_get_contents( $dbpassfile ); // returns false on failure
                        wfRestoreWarnings();
                        if ( $dbpass === false ) {
                                $this->error( "Couldn't open $dbpassfile", true );
@@ -108,25 +113,24 @@ class CommandLineInstaller extends Maintenance {
                        $this->mOptions['dbpass'] = trim( $dbpass, "\r\n" );
                }
 
-               $passfile = $this->getOption( 'passfile', false );
-               if ( $passfile !== false ) {
-                       if ( $this->getOption( 'pass', false ) !== false ) {
-                               $this->error( 'WARNING: You provide the options "pass" and "passfile". '
-                                       . 'The content of "passfile" overwrites "pass".' );
+               $passfile = $this->getOption( 'passfile' );
+               if ( $passfile !== null ) {
+                       if ( $this->getOption( 'pass' ) !== null ) {
+                               $this->error( 'WARNING: You have provided the options "pass" and "passfile". '
+                                       . 'The content of "passfile" overrides "pass".' );
                        }
                        wfSuppressWarnings();
-                       $pass = file_get_contents( $passfile );
+                       $pass = file_get_contents( $passfile ); // returns false on failure
                        wfRestoreWarnings();
                        if ( $pass === false ) {
                                $this->error( "Couldn't open $passfile", true );
                        }
-                       $this->mOptions['pass'] = str_replace( array( "\n", "\r" ), "", $pass );
-               } elseif ( $this->getOption( 'pass', false ) === false ) {
+                       $this->mOptions['pass'] = trim( $pass, "\r\n" );
+               } elseif ( $this->getOption( 'pass' ) === null ) {
                        $this->error( 'You need to provide the option "pass" or "passfile"', true );
                }
 
-               $installer =
-                       InstallerOverrides::getCliInstaller( $siteName, $adminName, $this->mOptions );
+               $installer = InstallerOverrides::getCliInstaller( $siteName, $adminName, $this->mOptions );
 
                $status = $installer->doEnvironmentChecks();
                if ( $status->isGood() ) {
@@ -149,6 +153,6 @@ class CommandLineInstaller extends Maintenance {
        }
 }
 
-$maintClass = "CommandLineInstaller";
+$maintClass = 'CommandLineInstaller';
 
 require_once RUN_MAINTENANCE_IF_MAIN;
index 9f73c80..10a3745 100644 (file)
@@ -271,6 +271,7 @@ $wgIgnoredMessages = array(
        'helplogin-url',
        'autocomment-prefix',
        'move-redirect-text',
+       'category-move-redirect-override',
        'interlanguage-link-title-langonly',
        'createaccount-hook-abort',
 );
index 62d1fa6..b53130b 100644 (file)
@@ -1201,6 +1201,7 @@ $wgMessageStructure = array(
                'right-move',
                'right-move-subpages',
                'right-move-rootuserpages',
+               'right-move-categorypages',
                'right-movefile',
                'right-suppressredirect',
                'right-upload',
@@ -1279,6 +1280,7 @@ $wgMessageStructure = array(
                'action-move',
                'action-move-subpages',
                'action-move-rootuserpages',
+               'action-move-categorypages',
                'action-movefile',
                'action-upload',
                'action-reupload',
@@ -2432,11 +2434,14 @@ $wgMessageStructure = array(
                'movepagetalktext',
                'movearticle',
                'moveuserpage-warning',
+               'movecategorypage-warning',
                'movenologintext',
                'movenotallowed',
                'movenotallowedfile',
                'cant-move-user-page',
                'cant-move-to-user-page',
+               'cant-move-category-page',
+               'cant-move-to-category-page',
                'newtitle',
                'move-watch',
                'movepagebtn',
@@ -2460,6 +2465,7 @@ $wgMessageStructure = array(
                'movenosubpage',
                'movereason',
                'move-redirect-text',
+               'category-move-redirect-override',
                'revertmove',
                'delete_and_move',
                'delete_and_move_text',
diff --git a/maintenance/oracle/archives/patch-page_links_updated.sql b/maintenance/oracle/archives/patch-page_links_updated.sql
new file mode 100644 (file)
index 0000000..5360329
--- /dev/null
@@ -0,0 +1,4 @@
+define mw_prefix='{$wgDBprefix}';
+
+ALTER TABLE &mw_prefix.page ADD page_links_updated TIMESTAMP(6) WITH TIME ZONE;
+
diff --git a/maintenance/oracle/archives/patch-rc_source.sql b/maintenance/oracle/archives/patch-rc_source.sql
new file mode 100644 (file)
index 0000000..0c80afa
--- /dev/null
@@ -0,0 +1,3 @@
+define mw_prefix='{$wgDBprefix}';
+
+ALTER TABLE &mw_prefix.recentchanges ADD rc_source VARCHAR2(16);
index 8e752da..824cc82 100644 (file)
@@ -1,3 +1,3 @@
 define mw_prefix='{$wgDBprefix}';
 
-ALTER TABLE &mw_prefix.mwuser ADD user_password_expires TIMESTAMP(6) WITH TIME ZONE NULL DEFAULT NULL;
+ALTER TABLE &mw_prefix.mwuser ADD user_password_expires TIMESTAMP(6) WITH TIME ZONE;
index f05c0cc..ff84858 100644 (file)
@@ -19,7 +19,7 @@ CREATE TABLE &mw_prefix.mwuser ( -- replace reserved word 'user'
   user_touched              TIMESTAMP(6) WITH TIME ZONE,
   user_registration         TIMESTAMP(6) WITH TIME ZONE,
   user_editcount            NUMBER,
-  user_password_expires     TIMESTAMP(6) WITH TIME ZONE NULL DEFAULT NULL
+  user_password_expires     TIMESTAMP(6) WITH TIME ZONE
 );
 ALTER TABLE &mw_prefix.mwuser ADD CONSTRAINT &mw_prefix.mwuser_pk PRIMARY KEY (user_id);
 CREATE UNIQUE INDEX &mw_prefix.mwuser_u01 ON &mw_prefix.mwuser (user_name);
@@ -28,7 +28,8 @@ CREATE INDEX &mw_prefix.mwuser_i02 ON &mw_prefix.mwuser (user_email, user_name);
 
 -- Create a dummy user to satisfy fk contraints especially with revisions
 INSERT INTO &mw_prefix.mwuser
-  VALUES (0,'Anonymous',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, '', current_timestamp, current_timestamp, 0);
+  (user_id, user_name, user_options, user_touched, user_registration, user_editcount)
+  VALUES (0,'Anonymous','', current_timestamp, current_timestamp,0);
 
 CREATE TABLE &mw_prefix.user_groups (
   ug_user   NUMBER      DEFAULT 0 NOT NULL,
@@ -73,6 +74,7 @@ CREATE TABLE &mw_prefix.page (
   page_is_new        CHAR(1)           DEFAULT '0' NOT NULL,
   page_random        NUMBER(15,14) NOT NULL,
   page_touched       TIMESTAMP(6) WITH TIME ZONE,
+  page_links_updated TIMESTAMP(6) WITH TIME ZONE,
   page_latest        NUMBER        DEFAULT 0 NOT NULL, -- FK?
   page_len           NUMBER        DEFAULT 0 NOT NULL,
   page_content_model VARCHAR2(32)
@@ -85,7 +87,7 @@ CREATE INDEX &mw_prefix.page_i03 ON &mw_prefix.page (page_is_redirect, page_name
 
 -- Create a dummy page to satisfy fk contraints especially with revisions
 INSERT INTO &mw_prefix.page
-  VALUES (0, 0, ' ', NULL, 0, 0, 0, 0, current_timestamp, 0, 0, NULL);
+  VALUES (0, 0, ' ', NULL, 0, 0, 0, 0, current_timestamp, NULL, 0, 0, NULL);
 
 /*$mw$*/
 CREATE TRIGGER &mw_prefix.page_set_random BEFORE INSERT ON &mw_prefix.page
@@ -403,7 +405,7 @@ CREATE SEQUENCE recentchanges_rc_id_seq;
 CREATE TABLE &mw_prefix.recentchanges (
   rc_id              NUMBER      NOT NULL,
   rc_timestamp       TIMESTAMP(6) WITH TIME ZONE  NOT NULL,
-  rc_cur_time        TIMESTAMP(6) WITH TIME ZONE  NOT NULL,
+  rc_cur_time        TIMESTAMP(6) WITH TIME ZONE,
   rc_user            NUMBER          DEFAULT 0 NOT NULL,
   rc_user_text       VARCHAR2(255)         NOT NULL,
   rc_namespace       NUMBER     DEFAULT 0 NOT NULL,
@@ -416,6 +418,7 @@ CREATE TABLE &mw_prefix.recentchanges (
   rc_this_oldid      NUMBER      DEFAULT 0 NOT NULL,
   rc_last_oldid      NUMBER      DEFAULT 0 NOT NULL,
   rc_type            CHAR(1)         DEFAULT '0' NOT NULL,
+  rc_source                                     VARCHAR2(16),
   rc_patrolled       CHAR(1)         DEFAULT '0' NOT NULL,
   rc_ip              VARCHAR2(15),
   rc_old_len         NUMBER,
diff --git a/maintenance/pageExists.php b/maintenance/pageExists.php
new file mode 100644 (file)
index 0000000..c4b208a
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+/**
+ * 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';
+
+/**
+ * @ingroup Maintenance
+ */
+class PageExists extends Maintenance {
+       public function __construct() {
+               parent::__construct();
+               $this->mDescription = "Report whether a specific page exists";
+               $this->addArg( 'title', 'Page title to check whether it exists' );
+       }
+
+       public function execute() {
+               $titleArg = $this->getArg();
+               $title = Title::newFromText( $titleArg );
+               $pageExists = $title && $title->exists();
+
+               $text = '';
+               $code = 0;
+               if ( $pageExists ) {
+                       $text = "{$title} exists.";
+               } else {
+                       $text = "{$title} doesn't exist.";
+                       $code = 1;
+               }
+               $this->output( $text );
+               $this->error( '', $code );
+       }
+}
+
+$maintClass = "PageExists";
+require_once RUN_MAINTENANCE_IF_MAIN;
+
index dfb3d22..18c66e9 100644 (file)
@@ -6,5 +6,7 @@
        },
        "ooui-dialog-action-close": "Джаб",
        "ooui-outline-control-move-down": "Элементни тюбюне кёчюр",
-       "ooui-outline-control-move-up": "Элементни башына кёчюр"
+       "ooui-outline-control-move-up": "Элементни башына кёчюр",
+       "ooui-outline-control-remove": "Пунктну кетер",
+       "ooui-toolbar-more": "Энтда"
 }
index b5f8824..495056f 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (7d2507b267)
+ * OOjs UI v0.1.0-pre (7b3672591f)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: Mon May 05 2014 14:13:13 GMT-0700 (PDT)
+ * Date: Fri May 09 2014 13:27:04 GMT+0200 (CEST)
  */
 ( function ( OO ) {
 
index 0c2cfaf..68d73d9 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (7d2507b267)
+ * OOjs UI v0.1.0-pre (7b3672591f)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: Mon May 05 2014 14:13:12 GMT-0700 (PDT)
+ * Date: Fri May 09 2014 13:27:04 GMT+0200 (CEST)
  */
 
 /* Textures */
index 22e8652..7d200ff 100644 (file)
@@ -535,15 +535,20 @@ $.fn.suggestions = function () {
                                                        if ( $result.get( 0 ) !== $other.get( 0 ) ) {
                                                                return;
                                                        }
-                                                       // do not interfere with non-left clicks or if modifier keys are pressed (e.g. ctrl-click)
+                                                       // Do not interfere with non-left clicks or if modifier keys are pressed (e.g. ctrl-click).
                                                        if ( !( e.which !== 1 || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey ) ) {
                                                                $.suggestions.highlight( context, $result, true );
-                                                               $.suggestions.hide( context );
                                                                if ( typeof context.config.result.select === 'function' ) {
                                                                        context.config.result.select.call( $result, context.data.$textbox );
                                                                }
+                                                               // This will hide the link we're just clicking on, which causes problems
+                                                               // when done synchronously in at least Firefox 3.6 (bug 62858).
+                                                               setTimeout( function () {
+                                                                       $.suggestions.hide( context );
+                                                               }, 0 );
                                                        }
-                                                       // but still restore focus to the textbox, so that the suggestions will be hidden properly
+                                                       // Always bring focus to the textbox, as that's probably where the user expects it
+                                                       // if they were just typing.
                                                        context.data.$textbox.focus();
                                                } )
                                )
@@ -563,14 +568,19 @@ $.fn.suggestions = function () {
                                                        if ( $special.get( 0 ) !== $other.get( 0 ) ) {
                                                                return;
                                                        }
-                                                       // do not interfere with non-left clicks or if modifier keys are pressed (e.g. ctrl-click)
+                                                       // Do not interfere with non-left clicks or if modifier keys are pressed (e.g. ctrl-click).
                                                        if ( !( e.which !== 1 || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey ) ) {
-                                                               $.suggestions.hide( context );
                                                                if ( typeof context.config.special.select === 'function' ) {
                                                                        context.config.special.select.call( $special, context.data.$textbox );
                                                                }
+                                                               // This will hide the link we're just clicking on, which causes problems
+                                                               // when done synchronously in at least Firefox 3.6 (bug 62858).
+                                                               setTimeout( function () {
+                                                                       $.suggestions.hide( context );
+                                                               }, 0 );
                                                        }
-                                                       // but still restore focus to the textbox, so that the suggestions will be hidden properly
+                                                       // Always bring focus to the textbox, as that's probably where the user expects it
+                                                       // if they were just typing.
                                                        context.data.$textbox.focus();
                                                } )
                                                .mousemove( function ( e ) {
index 9962534..6444d93 100644 (file)
 
                        // Return the Promise
                        return apiDeferred.promise( { abort: xhr.abort } ).fail( function ( code, details ) {
-                               mw.log( 'mw.Api error: ', code, details );
+                               if ( code !== 'abort' ) {
+                                       mw.log( 'mw.Api error: ', code, details );
+                               }
                        } );
                },
 
index aa33d86..af2dee1 100644 (file)
        function doWatchInternal( pages, ok, err, addParams ) {
                // XXX: Parameter addParams is undocumented because we inherit this
                // documentation in the public method...
-               var apiPromise = this.post(
+               var apiPromise = this.postWithToken( 'watch',
                        $.extend(
                                {
                                        action: 'watch',
                                        titles: $.isArray( pages ) ? pages.join( '|' ) : String( pages ),
-                                       token: mw.user.tokens.get( 'watchToken' ),
                                        uselang: mw.config.get( 'wgUserLanguage' )
                                },
                                addParams
index 4ec5ffa..eb7072c 100644 (file)
@@ -19,9 +19,6 @@
 table.mw-allpages-table-form, table.mw-allpages-table-chunk {
        width: 100%;
 }
-td.mw-allpages-alphaindexline {
-       text-align: right;
-}
 .mw-allpages-nav {
        text-align: right;
        margin-bottom: 1em;
index 4157b55..6bf01ae 100644 (file)
@@ -143,7 +143,7 @@ html .thumbimage {
 html .thumbcaption {
        border: none;
        line-height: 1.4em;
-       padding: 3px !important;
+       padding: 3px;
        font-size: 94%;
 }
 
index b64ceb0..a6d3b55 100644 (file)
@@ -104,16 +104,6 @@ img.thumbborder {
        border: 1px solid #dddddd;
 }
 
-/* table standards */
-table.rimage {
-       float: right;
-       width: 1pt;
-       position: relative;
-       margin-left: 1em;
-       margin-bottom: 1em;
-       text-align: center;
-}
-
 body {
        background: white;
        color: black;
@@ -277,7 +267,6 @@ span.texhtml {
 /* Galleries (see shared.css for more info) */
 li.gallerybox {
        vertical-align: top;
-       display: -moz-inline-box;
        display: inline-block;
 }
 
index ac7f407..a5612e2 100644 (file)
@@ -39,6 +39,12 @@ mark {
        color: black;
 }
 
+/* Helper for wbr element on IE 8+; in HTML5, but not supported by default as of IE 11. */
+/* Note canonical HTML5 styles recommend "content: \u200B", but this doesn't work as of IE 11. */
+wbr {
+       display: inline-block;
+}
+
 /* Input types that should follow user direction, like buttons */
 /* TODO: What about buttons in wikipage content ? */
 input[type="submit"],
index d30f554..fdfca0a 100644 (file)
@@ -157,11 +157,12 @@ mw.log.deprecate( win, 'jsMsg', function ( message ) {
  * @deprecated since 1.17 Use mediawiki.util instead
  */
 msg = 'Use mediawiki.util instead.';
-mw.log.deprecate( win, 'tooltipAccessKeyPrefix', 'alt-', msg );
-mw.log.deprecate( win, 'tooltipAccessKeyRegexp', /\[(alt-)?(.)\]$/, msg );
 mw.log.deprecate( win, 'updateTooltipAccessKeys', mw.util.updateTooltipAccessKeys, msg );
 mw.log.deprecate( win, 'addPortletLink', mw.util.addPortletLink, msg );
 mw.log.deprecate( win, 'appendCSS', mw.util.addCSS, msg );
+msg = 'Use jquery.accessKeyLabel instead.';
+mw.log.deprecate( win, 'tooltipAccessKeyPrefix', 'alt-', msg );
+mw.log.deprecate( win, 'tooltipAccessKeyRegexp', /\[(alt-)?(.)\]$/, msg );
 
 /**
  * Wikipage import methods
diff --git a/skins/vector/components/thumbnails.less b/skins/vector/components/thumbnails.less
new file mode 100644 (file)
index 0000000..afb5f2a
--- /dev/null
@@ -0,0 +1,32 @@
+// FIXME: Due to commonContent.css we have to use html tag to make sure these are more specific
+html .thumb {
+       &.tright {
+               padding: 1px 0 0 15px;
+       }
+
+       &.tleft {
+               padding: 1px 15px 0 0;
+       }
+
+       // these resets should be unnecessary
+       div.thumbinner {
+               border: none;
+               background: none;
+               font-size: 100%;
+       }
+
+       .thumbcaption {
+               line-height: @content-line-height;
+               font-size: .85em;
+               padding: 3px 0 0 0;
+               color: #333;
+       }
+
+       .magnify {
+               display: none;
+       }
+
+       .thumbimage {
+               border: none;
+       }
+}
index f7b374f..3e824f3 100644 (file)
@@ -8,3 +8,4 @@
 @import "components/footer.less";
 @import 'components/notifications.less';
 @import "components/externalLinks.less";
+@import "components/thumbnails.less";
index b4e903d..1875ac5 100644 (file)
@@ -763,6 +763,7 @@ class ParserTest {
 
                $settings = array(
                        'wgServer' => 'http://example.org',
+                       'wgServerName' => 'example.org',
                        'wgScript' => '/index.php',
                        'wgScriptPath' => '/',
                        'wgArticlePath' => '/wiki/$1',
index 49fdd48..350e83f 100644 (file)
@@ -36,7 +36,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
         * @covers MWNamespace::isMovable
         */
        public function testIsMovable() {
-               $this->assertFalse( MWNamespace::isMovable( NS_CATEGORY ) );
+               $this->assertFalse( MWNamespace::isMovable( NS_SPECIAL ) );
                # @todo FIXME: Write more tests!!
        }
 
index ecfcfa3..2add9f2 100644 (file)
@@ -491,4 +491,18 @@ class DummyContentForTesting extends AbstractContent {
        ) {
                return new ParserOutput( $this->getNativeData() );
        }
+
+       /**
+        * @see AbstractContent::fillParserOutput()
+        *
+        * @param Title $title Context title for parsing
+        * @param int|null $revId Revision ID (for {{REVISIONID}})
+        * @param ParserOptions|null $options Parser options
+        * @param bool $generateHtml Whether or not to generate HTML
+        * @param ParserOutput &$output The output object to fill (reference).
+        */
+       protected function fillParserOutput( Title $title, $revId,
+                       ParserOptions $options, $generateHtml, ParserOutput &$output ) {
+               $output = new ParserOutput( $this->getNativeData() );
+       }
 }
index bd6d41f..40484d3 100644 (file)
@@ -5,7 +5,7 @@
  * @group Database
  *        ^--- needed, because we do need the database to test link updates
  */
-class CssContentTest extends MediaWikiTestCase {
+class CssContentTest extends JavaScriptContentTest {
 
        protected function setUp() {
                parent::setUp();
index 253a035..03cbbc0 100644 (file)
@@ -7,14 +7,21 @@
  */
 class TextContentTest extends MediaWikiLangTestCase {
        protected $context;
+       protected $savedContentGetParserOutput;
 
        protected function setUp() {
+               global $wgHooks;
+
                parent::setUp();
 
                // Anon user
                $user = new User();
                $user->setName( '127.0.0.1' );
 
+               $this->context = new RequestContext( new FauxRequest() );
+               $this->context->setTitle( Title::newFromText( 'Test' ) );
+               $this->context->setUser( $user );
+
                $this->setMwGlobals( array(
                        'wgUser' => $user,
                        'wgTextModelsToParse' => array(
@@ -26,9 +33,22 @@ class TextContentTest extends MediaWikiLangTestCase {
                        'wgAlwaysUseTidy' => false,
                ) );
 
-               $this->context = new RequestContext( new FauxRequest() );
-               $this->context->setTitle( Title::newFromText( 'Test' ) );
-               $this->context->setUser( $user );
+               // bypass hooks that force custom rendering
+               if ( isset( $wgHooks['ContentGetParserOutput'] )  ) {
+                       $this->savedContentGetParserOutput = $wgHooks['ContentGetParserOutput'];
+                       unset( $wgHooks['ContentGetParserOutput'] );
+               }
+       }
+
+       public function teardown() {
+               global $wgHooks;
+
+               // restore hooks that force custom rendering
+               if ( $this->savedContentGetParserOutput !== null ) {
+                       $wgHooks['ContentGetParserOutput'] = $this->savedContentGetParserOutput;
+               }
+
+               parent::teardown();
        }
 
        public function newContent( $text ) {
index 66ed020..14bcac0 100644 (file)
@@ -65,6 +65,7 @@ class NewParserTest extends MediaWikiTestCase {
                $tmpGlobals['wgContLang'] = Language::factory( 'en' );
                $tmpGlobals['wgSitename'] = 'MediaWiki';
                $tmpGlobals['wgServer'] = 'http://example.org';
+               $tmpGlobals['wgServerName'] = 'example.org';
                $tmpGlobals['wgScript'] = '/index.php';
                $tmpGlobals['wgScriptPath'] = '/';
                $tmpGlobals['wgArticlePath'] = '/wiki/$1';
index 1f60293..022f998 100755 (executable)
@@ -20,7 +20,8 @@ else if ( has_binary pear ); then
     pear channel-discover components.ez.no
     pear channel-discover pear.symfony.com
     pear update-channels
-    pear install --alldeps phpunit/PHPUnit
+    #Temporary fix for 64597
+    pear install --alldeps phpunit/PHPUnit-3.7.35
 else if ( has_binary apt-get ); then
     echo Installing phpunit with apt-get
     apt-get install phpunit
index 59bf8dc..d7bf453 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -116,6 +116,10 @@ function wfStreamThumb( array $params ) {
                $params['width'] = $params['w'];
                unset( $params['w'] );
        }
+       if ( isset( $params['width'] ) && substr( $params['width'], -2 ) == 'px' ) {
+               // strip the px (pixel) suffix, if found
+               $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+       }
        if ( isset( $params['p'] ) ) {
                $params['page'] = $params['p'];
        }