Merge "Fixed E_STRICT notices in PostgresUpdater::renameIndex()."
authorIAlex <ialex.wiki@gmail.com>
Thu, 7 Feb 2013 11:22:35 +0000 (11:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 7 Feb 2013 11:22:35 +0000 (11:22 +0000)
330 files changed:
INSTALL
RELEASE-NOTES-1.21
bin/ulimit5.sh
composer.json [new file with mode: 0644]
img_auth.php
includes/ArrayUtils.php
includes/Article.php
includes/AutoLoader.php
includes/Block.php
includes/Category.php
includes/Categoryfinder.php
includes/Cdb.php
includes/Cdb_PHP.php
includes/ChangeTags.php
includes/ChangesFeed.php
includes/ChangesList.php
includes/Collation.php
includes/Cookie.php
includes/DefaultSettings.php
includes/Defines.php
includes/DeprecatedGlobal.php
includes/EditPage.php
includes/Exception.php
includes/Export.php
includes/ExternalUser.php
includes/FakeTitle.php
includes/Feed.php
includes/FeedUtils.php
includes/FileDeleteForm.php
includes/ForkController.php
includes/GlobalFunctions.php
includes/HTMLForm.php
includes/HistoryBlob.php
includes/Html.php
includes/HttpFunctions.php
includes/IP.php
includes/ImagePage.php
includes/Import.php
includes/LinkFilter.php
includes/Linker.php
includes/LinksUpdate.php
includes/MagicWord.php
includes/Message.php
includes/Metadata.php
includes/MimeMagic.php
includes/Namespace.php
includes/OutputPage.php
includes/Pager.php
includes/PathRouter.php
includes/Preferences.php
includes/PrefixSearch.php
includes/ProtectionForm.php
includes/ProxyTools.php
includes/RecentChange.php
includes/Revision.php
includes/Sanitizer.php
includes/Setup.php
includes/SiteConfiguration.php
includes/Skin.php
includes/SkinLegacy.php
includes/SkinTemplate.php
includes/SpecialPage.php
includes/SpecialPageFactory.php
includes/SquidPurgeClient.php
includes/Status.php
includes/StringUtils.php
includes/StubObject.php
includes/Title.php
includes/User.php
includes/UserMailer.php
includes/WatchedItem.php
includes/WebRequest.php
includes/WebResponse.php
includes/WebStart.php
includes/WikiFilePage.php
includes/WikiPage.php
includes/Xml.php
includes/ZipDirectoryReader.php
includes/actions/HistoryAction.php
includes/api/ApiBase.php
includes/api/ApiFileRevert.php
includes/api/ApiFormatXml.php
includes/api/ApiHelp.php
includes/api/ApiImport.php
includes/api/ApiMain.php
includes/api/ApiModuleManager.php [new file with mode: 0644]
includes/api/ApiPageSet.php
includes/api/ApiParamInfo.php
includes/api/ApiQuery.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryBlocks.php
includes/api/ApiQueryCategoryMembers.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryPageProps.php
includes/api/ApiQueryQueryPage.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiQueryUserContributions.php
includes/api/ApiQueryUsers.php
includes/api/ApiUpload.php
includes/cache/CacheDependency.php
includes/cache/HTMLFileCache.php
includes/cache/MessageCache.php
includes/content/AbstractContent.php
includes/content/ContentHandler.php
includes/content/WikitextContent.php
includes/db/CloneDatabase.php
includes/db/Database.php
includes/db/DatabaseError.php
includes/db/DatabaseIbm_db2.php
includes/db/DatabaseMssql.php
includes/db/DatabaseMysql.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/db/DatabaseSqlite.php
includes/db/DatabaseUtility.php
includes/db/LBFactory.php
includes/db/LBFactory_Multi.php
includes/db/LoadBalancer.php
includes/db/LoadMonitor.php
includes/diff/DairikiDiff.php
includes/diff/DifferenceEngine.php
includes/externalstore/ExternalStore.php
includes/externalstore/ExternalStoreDB.php
includes/filebackend/FSFile.php
includes/filebackend/FileBackend.php
includes/filebackend/FileBackendGroup.php
includes/filebackend/FileBackendMultiWrite.php
includes/filebackend/FileOp.php
includes/filebackend/SwiftFileBackend.php
includes/filerepo/FSRepo.php
includes/filerepo/FileRepo.php
includes/filerepo/ForeignAPIRepo.php
includes/filerepo/LocalRepo.php
includes/filerepo/RepoGroup.php
includes/filerepo/file/ArchivedFile.php
includes/filerepo/file/File.php
includes/filerepo/file/ForeignAPIFile.php
includes/filerepo/file/LocalFile.php
includes/filerepo/file/OldLocalFile.php
includes/filerepo/file/UnregisteredLocalFile.php
includes/installer/CliInstaller.php
includes/installer/DatabaseInstaller.php
includes/installer/DatabaseUpdater.php
includes/installer/Installer.i18n.php
includes/installer/Installer.php
includes/installer/MysqlInstaller.php
includes/installer/MysqlUpdater.php
includes/installer/OracleInstaller.php
includes/installer/OracleUpdater.php
includes/installer/PostgresUpdater.php
includes/installer/WebInstaller.php
includes/installer/WebInstallerOutput.php
includes/installer/WebInstallerPage.php
includes/job/JobQueue.php
includes/job/JobQueueDB.php
includes/job/JobQueueGroup.php
includes/logging/LogEventsList.php
includes/logging/LogFormatter.php
includes/logging/LogPage.php
includes/logging/LogPager.php
includes/media/BMP.php
includes/media/DjVu.php
includes/media/DjVuImage.php
includes/media/Exif.php
includes/media/ExifBitmap.php
includes/media/FormatMetadata.php
includes/media/GIF.php
includes/media/GIFMetadataExtractor.php
includes/media/IPTC.php
includes/media/ImageHandler.php
includes/media/Jpeg.php
includes/media/MediaHandler.php
includes/media/MediaTransformOutput.php
includes/media/PNG.php
includes/media/SVG.php
includes/media/SVGMetadataExtractor.php
includes/media/Tiff.php
includes/media/XCF.php
includes/media/XMP.php
includes/media/XMPInfo.php
includes/media/XMPValidate.php
includes/normal/RandomTest.php
includes/normal/Utf8CaseGenerate.php
includes/normal/Utf8Test.php
includes/normal/UtfNormal.php
includes/normal/UtfNormalBench.php
includes/normal/UtfNormalDefines.php
includes/normal/UtfNormalGenerate.php
includes/normal/UtfNormalMemStress.php
includes/normal/UtfNormalTest.php
includes/normal/UtfNormalTest2.php
includes/objectcache/EhcacheBagOStuff.php
includes/objectcache/MemcachedClient.php
includes/objectcache/SqlBagOStuff.php
includes/parser/CoreLinkFunctions.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_LinkHooks.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/parser/Preprocessor_HipHop.hphp [deleted file]
includes/parser/Tidy.php
includes/profiler/Profiler.php
includes/profiler/ProfilerSimple.php
includes/profiler/ProfilerSimpleText.php
includes/profiler/ProfilerSimpleTrace.php
includes/profiler/ProfilerSimpleUDP.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderWikiModule.php
includes/revisiondelete/RevisionDelete.php
includes/search/SearchEngine.php
includes/search/SearchIBM_DB2.php
includes/search/SearchMySQL.php
includes/search/SearchOracle.php
includes/search/SearchPostgres.php
includes/search/SearchSqlite.php
includes/search/SearchUpdate.php
includes/specials/SpecialAllpages.php
includes/specials/SpecialBlankpage.php
includes/specials/SpecialBlock.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialBooksources.php
includes/specials/SpecialCategories.php
includes/specials/SpecialChangePassword.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDisambiguations.php
includes/specials/SpecialExport.php
includes/specials/SpecialImport.php
includes/specials/SpecialLinkSearch.php
includes/specials/SpecialListfiles.php
includes/specials/SpecialListusers.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialProtectedtitles.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialRevisiondelete.php
includes/specials/SpecialSearch.php
includes/specials/SpecialSpecialpages.php
includes/specials/SpecialStatistics.php
includes/specials/SpecialUncategorizedcategories.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUpload.php
includes/specials/SpecialUserlogin.php
includes/specials/SpecialUserrights.php
includes/specials/SpecialVersion.php
includes/specials/SpecialWatchlist.php
includes/upload/UploadBase.php
includes/upload/UploadStash.php
languages/Language.php
languages/Names.php
languages/messages/MessagesAce.php
languages/messages/MessagesAr.php
languages/messages/MessagesArc.php
languages/messages/MessagesBho.php
languages/messages/MessagesCkb.php
languages/messages/MessagesCy.php
languages/messages/MessagesDe.php
languages/messages/MessagesEl.php
languages/messages/MessagesEn.php
languages/messages/MessagesEo.php
languages/messages/MessagesFi.php
languages/messages/MessagesFr.php
languages/messages/MessagesFrp.php
languages/messages/MessagesGa.php
languages/messages/MessagesGl.php
languages/messages/MessagesHe.php
languages/messages/MessagesHsb.php
languages/messages/MessagesIa.php
languages/messages/MessagesId.php
languages/messages/MessagesJa.php
languages/messages/MessagesKa.php
languages/messages/MessagesKn.php
languages/messages/MessagesKo.php
languages/messages/MessagesLb.php
languages/messages/MessagesMg.php
languages/messages/MessagesMin.php
languages/messages/MessagesMs.php
languages/messages/MessagesMt.php
languages/messages/MessagesNn.php
languages/messages/MessagesOr.php
languages/messages/MessagesPcd.php
languages/messages/MessagesPl.php
languages/messages/MessagesPt.php
languages/messages/MessagesPt_br.php
languages/messages/MessagesRoa_tara.php
languages/messages/MessagesRu.php
languages/messages/MessagesSa.php
languages/messages/MessagesSw.php
languages/messages/MessagesTh.php
languages/messages/MessagesTr.php
languages/messages/MessagesUg_arab.php
languages/messages/MessagesUk.php
languages/messages/MessagesZh_hant.php
maintenance/Maintenance.php
maintenance/backupPrefetch.inc
maintenance/changePassword.php
maintenance/dev/includes/router.php
maintenance/lag.php
maintenance/language/languages.inc
maintenance/locking/LockServerDaemon.php
maintenance/mwdocgen.php
maintenance/nextJobDB.php
maintenance/proxy_check.php
maintenance/purgeList.php
maintenance/refreshImageMetadata.php
maintenance/runJobs.php
maintenance/showStats.php
opensearch_desc.php
profileinfo.php
resources/jquery/jquery.tablesorter.js
skins/vector/images/border.png [deleted file]
skins/vector/images/page-base.png [deleted file]
skins/vector/images/preferences-base.png [deleted file]
skins/vector/images/preferences-edge.png [deleted file]
skins/vector/screen.css
tests/parser/parserTests.txt
tests/parser/preprocess/NestedTemplates.expected [new file with mode: 0644]
tests/parser/preprocess/NestedTemplates.txt [new file with mode: 0644]
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/ParserOptionsTest.php [deleted file]
tests/phpunit/includes/parser/PreprocessorTest.php
tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js

diff --git a/INSTALL b/INSTALL
index e393631..891be73 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -20,7 +20,8 @@ If your PHP is configured as a CGI plug-in rather than an Apache module you may
 experience problems, as this configuration is not well tested. safe_mode is also
 not tested and unlikely to work.
 
-If you want math support see the instructions in math/README
+Support for rendering mathematical formulas requires installing the Math extension,
+see http://www.mediawiki.org/wiki/Extension:Math
 
 Don't forget to check the RELEASE-NOTES file...
 
@@ -45,12 +46,15 @@ In-place web install
 
 Decompress the MediaWiki installation archive either on your server, or on your
 local machine and upload the directory tree. Rename it from "mediawiki-1.x.x" to
-something nice, like "wiki", since it'll be in your URL.
+something nice, like "wiki", since it will be appearing in your URL,
+ie. /wiki/index.php/Article.
 
   +--------------------------------------------------------------------------+
-  |  Hint: If you plan to use a fancy URL-rewriting scheme to prettify your  |
-  |  URLs, you should put the files in a *different* directory from the      |
-  |  virtual path where page names will appear.                              |
+  |  Note: If you plan to use a fancy URL-rewriting scheme to prettify your  |
+  |  URLs, such as http://www.example.com/wiki/Article, you should put the   |
+  |  files in a *different* directory from the virtual path where page names |
+  |  will appear. It is common in this case to use w as the folder name and  |
+  |  /wiki/ as the virtual article path where your articles pretend to be.   |
   |                                                                          |
   |    See: http://www.mediawiki.org/wiki/Manual:Short_URL                   |
   +--------------------------------------------------------------------------+
index 9852162..36e660e 100644 (file)
@@ -16,6 +16,8 @@ production.
   of page watchers required for the number to be accessible to users
   without the unwatchedpages permission.
 * $wgBug34832TransitionalRollback has been removed.
+* (bug 29472) $wgUseDynamicDates has been removed and its functionality
+  disabled.
 
 === New features in 1.21 ===
 * (bug 38110) Schema changes (adding or dropping tables, indicies and
@@ -89,6 +91,8 @@ production.
 * (bug 5346) Categories that are redirects will be displayed italic in
   the category links section at the bottom of a page.
 * (bug 43915) New maintenance script deleteEqualMessages.php.
+* New collation uppercase-sv, which is like uppercase, but adapted
+  to Swedish sort order.
 
 === Bug fixes in 1.21 ===
 * (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
@@ -194,11 +198,14 @@ production.
 * (bug 43849) ApiQueryImageInfo no longer throws exceptions with ForeignDBRepo
   redirects.
 * On error, any warnings generated before that error will be shown in the result.
+* action=help suports generalized submodules (modules=query+value), querymodules obsolete
 
 === API internal changes in 1.21 ===
 * For debugging only, a new global $wgDebugAPI removes many API restrictions when true.
   Never use on the production servers, as this flag introduces security holes.
   Whenever enabled, a warning will also be added to all output.
+* ApiModuleManager now handles all submodules (actions,props,lists) and instantiation
+* Query stores prop/list/meta as submodules
 
 === Languages updated in 1.21 ===
 
index fd8aae2..36c3176 100644 (file)
@@ -4,6 +4,15 @@ if [ "$1" -gt 0 ]; then
        ulimit -t "$1"
 fi
 if [ "$2" -gt 0 ]; then
+       if [ -e /sys/fs/cgroup/memory/mediawiki/job/ ]; then
+               mkdir -m 0700 /sys/fs/cgroup/memory/mediawiki/job/$$
+               echo $$ > /sys/fs/cgroup/memory/mediawiki/job/$$/tasks
+               echo "1" > /sys/fs/cgroup/memory/mediawiki/job/$$/notify_on_release
+               #memory
+               echo $(($2*1024)) > /sys/fs/cgroup/memory/mediawiki/job/$$/memory.limit_in_bytes
+               #memory+swap
+               echo $(($2*1024)) > /sys/fs/cgroup/memory/mediawiki/job/$$/memory.memsw.limit_in_bytes
+       fi
        ulimit -v "$2"
 fi
 if [ "$3" -gt 0 ]; then
diff --git a/composer.json b/composer.json
new file mode 100644 (file)
index 0000000..fa42c29
--- /dev/null
@@ -0,0 +1,36 @@
+{
+       "name": "mediawiki/core",
+       "description": "Free software wiki application developed by the Wikimedia Foundation and others",
+       "keywords": ["mediawiki", "wiki"],
+       "homepage": "https://www.mediawiki.org/",
+       "authors": [
+               {
+                       "name": "MediaWiki Community",
+                       "homepage": "https://www.mediawiki.org/wiki/Special:Version/Credits"
+               }
+       ],
+       "license": "GPL-2.0",
+       "repositories": [
+               {
+                       "type": "vcs",
+                       "url": "https://gerrit.wikimedia.org/r/p/mediawiki/core.git"
+               }
+       ],
+       "support": {
+               "issues": "https://bugzilla.wikimedia.org/",
+               "irc": "irc://irc.freenode.net/mediawiki",
+               "wiki": "https://www.mediawiki.org/"
+       },
+       "require": {
+               "php": ">=5.3.2"
+       },
+       "require-dev": {
+               "phpunit/phpunit": "*"
+       },
+       "suggest": {
+               "ext-fileinfo": "*",
+               "ext-mbstring": "*",
+               "ext-wikidiff2": "*",
+               "ext-apc": "*"
+       }
+}
index b04974b..2f7fb39 100644 (file)
@@ -106,7 +106,7 @@ function wfImageAuthMain() {
 
        // Check to see if the file exists
        if ( !$repo->fileExists( $filename ) ) {
-               wfForbidden( 'img-auth-accessdenied','img-auth-nofile', $filename );
+               wfForbidden( 'img-auth-accessdenied', 'img-auth-nofile', $filename );
                return;
        }
 
index 8d1884b..d1b72a0 100644 (file)
@@ -13,11 +13,11 @@ class ArrayUtils {
         * since the function call overhead dominates. So there's not much
         * justification for breaking compatibility with installations
         * compiled with ./configure --disable-hash.
-        * 
+        *
         * @param $array The array to sort
         * @param $key The string key
         * @param $separator A separator used to delimit the array elements and the
-        *     key. This can be chosen to provide backwards compatibility with 
+        *     key. This can be chosen to provide backwards compatibility with
         *     various consistent hash implementations that existed before this
         *     function was introduced.
         */
index 10cbac7..75008ce 100644 (file)
@@ -1122,7 +1122,7 @@ class Article extends Page {
 
                # Show delete and move logs
                LogEventsList::showLogExtract( $outputPage, array( 'delete', 'move' ), $this->getTitle(), '',
-                       array(  'lim' => 10,
+                       array( 'lim' => 10,
                                'conds' => array( "log_action != 'revision'" ),
                                'showIfEmpty' => false,
                                'msgKey' => array( 'moveddeleted-notice' ) )
@@ -1483,7 +1483,7 @@ class Article extends Page {
                                $reason = $this->generateReason( $hasHistory );
                        } catch ( MWException $e ) {
                                # if a page is horribly broken, we still want to be able to delete it. so be lenient about errors here.
-                               wfDebug("Error while building auto delete summary: $e");
+                               wfDebug( "Error while building auto delete summary: $e" );
                                $reason = '';
                        }
                }
index 8a886e9..209ed90 100644 (file)
@@ -256,6 +256,7 @@ $wgAutoloadLocalClasses = array(
        'UnlistedSpecialPage' => 'includes/SpecialPage.php',
        'UploadSourceAdapter' => 'includes/Import.php',
        'UppercaseCollation' => 'includes/Collation.php',
+       'UppercaseSvCollation' => 'includes/Collation.php',
        'User' => 'includes/User.php',
        'UserArray' => 'includes/UserArray.php',
        'UserArrayFromResult' => 'includes/UserArray.php',
@@ -363,6 +364,7 @@ $wgAutoloadLocalClasses = array(
        'ApiLogin' => 'includes/api/ApiLogin.php',
        'ApiLogout' => 'includes/api/ApiLogout.php',
        'ApiMain' => 'includes/api/ApiMain.php',
+       'ApiModuleManager' => 'includes/api/ApiModuleManager.php',
        'ApiMove' => 'includes/api/ApiMove.php',
        'ApiOpenSearch' => 'includes/api/ApiOpenSearch.php',
        'ApiOptions' => 'includes/api/ApiOptions.php',
@@ -775,35 +777,24 @@ $wgAutoloadLocalClasses = array(
        'MWTidyWrapper' => 'includes/parser/Tidy.php',
        'PPCustomFrame_DOM' => 'includes/parser/Preprocessor_DOM.php',
        'PPCustomFrame_Hash' => 'includes/parser/Preprocessor_Hash.php',
-       'PPCustomFrame_HipHop' => 'includes/parser/Preprocessor_HipHop.hphp',
        'PPDAccum_Hash' => 'includes/parser/Preprocessor_Hash.php',
-       'PPDAccum_HipHop' => 'includes/parser/Preprocessor_HipHop.hphp',
        'PPDPart' => 'includes/parser/Preprocessor_DOM.php',
        'PPDPart_Hash' => 'includes/parser/Preprocessor_Hash.php',
-       'PPDPart_HipHop' => 'includes/parser/Preprocessor_HipHop.hphp',
        'PPDStack' => 'includes/parser/Preprocessor_DOM.php',
        'PPDStackElement' => 'includes/parser/Preprocessor_DOM.php',
        'PPDStackElement_Hash' => 'includes/parser/Preprocessor_Hash.php',
-       'PPDStackElement_HipHop' => 'includes/parser/Preprocessor_HipHop.hphp',
        'PPDStack_Hash' => 'includes/parser/Preprocessor_Hash.php',
-       'PPDStack_HipHop' => 'includes/parser/Preprocessor_HipHop.hphp',
        'PPFrame' => 'includes/parser/Preprocessor.php',
        'PPFrame_DOM' => 'includes/parser/Preprocessor_DOM.php',
        'PPFrame_Hash' => 'includes/parser/Preprocessor_Hash.php',
-       'PPFrame_HipHop' => 'includes/parser/Preprocessor_HipHop.hphp',
        'PPNode' => 'includes/parser/Preprocessor.php',
        'PPNode_DOM' => 'includes/parser/Preprocessor_DOM.php',
        'PPNode_Hash_Array' => 'includes/parser/Preprocessor_Hash.php',
        'PPNode_Hash_Attr' => 'includes/parser/Preprocessor_Hash.php',
        'PPNode_Hash_Text' => 'includes/parser/Preprocessor_Hash.php',
        'PPNode_Hash_Tree' => 'includes/parser/Preprocessor_Hash.php',
-       'PPNode_HipHop_Array' => 'includes/parser/Preprocessor_HipHop.hphp',
-       'PPNode_HipHop_Attr' => 'includes/parser/Preprocessor_HipHop.hphp',
-       'PPNode_HipHop_Text' => 'includes/parser/Preprocessor_HipHop.hphp',
-       'PPNode_HipHop_Tree' => 'includes/parser/Preprocessor_HipHop.hphp',
        'PPTemplateFrame_DOM' => 'includes/parser/Preprocessor_DOM.php',
        'PPTemplateFrame_Hash' => 'includes/parser/Preprocessor_Hash.php',
-       'PPTemplateFrame_HipHop' => 'includes/parser/Preprocessor_HipHop.hphp',
        'Parser' => 'includes/parser/Parser.php',
        'ParserCache' => 'includes/parser/ParserCache.php',
        'ParserOptions' => 'includes/parser/ParserOptions.php',
@@ -813,7 +804,6 @@ $wgAutoloadLocalClasses = array(
        'Preprocessor' => 'includes/parser/Preprocessor.php',
        'Preprocessor_DOM' => 'includes/parser/Preprocessor_DOM.php',
        'Preprocessor_Hash' => 'includes/parser/Preprocessor_Hash.php',
-       'Preprocessor_HipHop' => 'includes/parser/Preprocessor_HipHop.hphp',
        'StripState' => 'includes/parser/StripState.php',
 
        # includes/profiler
@@ -1081,7 +1071,7 @@ $wgAutoloadLocalClasses = array(
        'wikiStatsOutput' => 'maintenance/language/StatOutputs.php',
 
        # maintenance/term
-       'AnsiTermColorer'  => 'maintenance/term/MWTerm.php',
+       'AnsiTermColorer' => 'maintenance/term/MWTerm.php',
        'DummyTermColorer' => 'maintenance/term/MWTerm.php',
 
        # mw-config
index fde5f07..1d1e2c0 100644 (file)
@@ -465,7 +465,7 @@ class Block {
                Block::purgeExpired();
 
                $row = $this->getDatabaseArray();
-               $row['ipb_id'] = $dbw->nextSequenceValue("ipblocks_ipb_id_seq");
+               $row['ipb_id'] = $dbw->nextSequenceValue( "ipblocks_ipb_id_seq" );
 
                $dbw->insert(
                        'ipblocks',
index b9c9609..53e44d7 100644 (file)
@@ -75,11 +75,11 @@ class Category {
                        # Okay, there were no contents.  Nothing to initialize.
                        if ( $this->mTitle ) {
                                # If there is a title object but no record in the category table, treat this as an empty category
-                               $this->mID      = false;
-                               $this->mName    = $this->mTitle->getDBkey();
-                               $this->mPages   = 0;
+                               $this->mID = false;
+                               $this->mName = $this->mTitle->getDBkey();
+                               $this->mPages = 0;
                                $this->mSubcats = 0;
-                               $this->mFiles   = 0;
+                               $this->mFiles = 0;
 
                                return true;
                        } else {
@@ -87,11 +87,11 @@ class Category {
                        }
                }
 
-               $this->mID      = $row->cat_id;
-               $this->mName    = $row->cat_title;
-               $this->mPages   = $row->cat_pages;
+               $this->mID = $row->cat_id;
+               $this->mName = $row->cat_title;
+               $this->mPages = $row->cat_pages;
                $this->mSubcats = $row->cat_subcats;
-               $this->mFiles   = $row->cat_files;
+               $this->mFiles = $row->cat_files;
 
                # (bug 13683) If the count is negative, then 1) it's obviously wrong
                # and should not be kept, and 2) we *probably* don't have to scan many
@@ -179,16 +179,16 @@ class Category {
                                $cat->mName = $title->getDBkey(); # if we have a title object, fetch the category name from there
                        }
 
-                       $cat->mID =   false;
+                       $cat->mID = false;
                        $cat->mSubcats = 0;
-                       $cat->mPages   = 0;
-                       $cat->mFiles   = 0;
+                       $cat->mPages = 0;
+                       $cat->mFiles = 0;
                } else {
-                       $cat->mName    = $row->cat_title;
-                       $cat->mID      = $row->cat_id;
+                       $cat->mName = $row->cat_title;
+                       $cat->mID = $row->cat_id;
                        $cat->mSubcats = $row->cat_subcats;
-                       $cat->mPages   = $row->cat_pages;
-                       $cat->mFiles   = $row->cat_files;
+                       $cat->mPages = $row->cat_pages;
+                       $cat->mFiles = $row->cat_files;
                }
 
                return $cat;
@@ -350,9 +350,9 @@ class Category {
                wfProfileOut( __METHOD__ );
 
                # Now we should update our local counts.
-               $this->mPages   = $result->pages;
+               $this->mPages = $result->pages;
                $this->mSubcats = $result->subcats;
-               $this->mFiles   = $result->files;
+               $this->mFiles = $result->files;
 
                return $ret;
        }
index 589950f..cb67aa8 100644 (file)
@@ -211,7 +211,7 @@ class Categoryfinder {
                        $res = $this->dbr->select(
                                /* FROM   */ 'page',
                                /* SELECT */ array( 'page_id', 'page_title' ),
-                               /* WHERE  */ array( 'page_namespace' => NS_CATEGORY , 'page_title' => $layer ),
+                               /* WHERE  */ array( 'page_namespace' => NS_CATEGORY, 'page_title' => $layer ),
                                __METHOD__ . '-2'
                        );
                        foreach ( $res as $o ) {
index 960e76a..1c4587a 100644 (file)
@@ -133,7 +133,7 @@ class CdbReader_DBA {
        }
 
        function close() {
-               if( isset($this->handle) ) {
+               if( isset( $this->handle ) ) {
                        dba_close( $this->handle );
                }
                unset( $this->handle );
@@ -165,7 +165,7 @@ class CdbWriter_DBA {
        }
 
        function close() {
-               if( isset($this->handle) ) {
+               if( isset( $this->handle ) ) {
                        dba_close( $this->handle );
                }
                if ( wfIsWindows() ) {
index f58e07e..71b55f8 100644 (file)
@@ -332,10 +332,10 @@ class CdbWriter_PHP extends CdbWriter {
         */
        public function close() {
                $this->finish();
-               if( isset($this->handle) ) {
+               if( isset( $this->handle ) ) {
                        fclose( $this->handle );
                }
-               if ( wfIsWindows() && file_exists($this->realFileName) ) {
+               if ( wfIsWindows() && file_exists( $this->realFileName ) ) {
                        unlink( $this->realFileName );
                }
                if ( !rename( $this->tmpFileName, $this->realFileName ) ) {
@@ -351,7 +351,7 @@ class CdbWriter_PHP extends CdbWriter {
        protected function write( $buf ) {
                $len = fwrite( $this->handle, $buf );
                if ( $len !== strlen( $buf ) ) {
-                       $this->throwException( 'Error writing to CDB file "'.$this->tmpFileName.'".' );
+                       $this->throwException( 'Error writing to CDB file "' . $this->tmpFileName . '".' );
                }
        }
 
@@ -363,7 +363,7 @@ class CdbWriter_PHP extends CdbWriter {
                $newpos = $this->pos + $len;
                if ( $newpos > 0x7fffffff ) {
                        $this->throwException(
-                               'A value in the CDB file "'.$this->tmpFileName.'" is too large.' );
+                               'A value in the CDB file "' . $this->tmpFileName . '" is too large.' );
                }
                $this->pos = $newpos;
        }
@@ -392,10 +392,10 @@ class CdbWriter_PHP extends CdbWriter {
         */
        protected function addbegin( $keylen, $datalen ) {
                if ( $keylen > 0x7fffffff ) {
-                       $this->throwException( 'Key length too long in file "'.$this->tmpFileName.'".' );
+                       $this->throwException( 'Key length too long in file "' . $this->tmpFileName . '".' );
                }
                if ( $datalen > 0x7fffffff ) {
-                       $this->throwException( 'Data length too long in file "'.$this->tmpFileName.'".' );
+                       $this->throwException( 'Data length too long in file "' . $this->tmpFileName . '".' );
                }
                $buf = pack( 'VV', $keylen, $datalen );
                $this->write( $buf );
@@ -470,7 +470,7 @@ class CdbWriter_PHP extends CdbWriter {
                // Write the pointer array at the start of the file
                rewind( $this->handle );
                if ( ftell( $this->handle ) != 0 ) {
-                       $this->throwException( 'Error rewinding to start of file "'.$this->tmpFileName.'".' );
+                       $this->throwException( 'Error rewinding to start of file "' . $this->tmpFileName . '".' );
                }
                $this->write( $final );
        }
index 18f425a..1dd9b59 100644 (file)
@@ -169,7 +169,7 @@ class ChangeTags {
         *
         * @throws MWException When unable to determine appropriate JOIN condition for tagging
         */
-       static function modifyDisplayQuery( &$tables, &$fields,  &$conds,
+       static function modifyDisplayQuery( &$tables, &$fields, &$conds,
                                                                                &$join_conds, &$options, $filter_tag = false ) {
                global $wgRequest, $wgUseTagFilter;
 
@@ -221,7 +221,7 @@ class ChangeTags {
         *        - if $fullForm is false: Array with
         *        - if $fullForm is true: String, html fragment
         */
-       public static function buildTagFilterSelector( $selected='', $fullForm = false, Title $title = null ) {
+       public static function buildTagFilterSelector( $selected = '', $fullForm = false, Title $title = null ) {
                global $wgUseTagFilter;
 
                if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) {
index ee4c2d6..ae30272 100644 (file)
@@ -135,7 +135,7 @@ class ChangesFeed {
                $feedLastmod = $messageMemc->get( $timekey );
 
                if( ( $wgFeedCacheTimeout > 0 ) && $feedLastmod ) {
-                   /**
+                       /**
                         * If the cached feed was rendered very recently, we may
                         * go ahead and use it even if there have been edits made
                         * since it was rendered. This keeps a swarm of requests
index 85fd8af..a9b9c31 100644 (file)
@@ -30,7 +30,7 @@
  */
 class RCCacheEntry extends RecentChange {
        var $secureName, $link;
-       var $curlink , $difflink, $lastlink, $usertalklink, $versionlink;
+       var $curlink, $difflink, $lastlink, $usertalklink, $versionlink;
        var $userlink, $timestamp, $watched;
 
        /**
@@ -217,7 +217,7 @@ class ChangesList extends ContextSource {
                $lang = $context->getLanguage();
                $code = $lang->getCode();
                static $fastCharDiff = array();
-               if ( !isset($fastCharDiff[$code]) ) {
+               if ( !isset( $fastCharDiff[$code] ) ) {
                        $fastCharDiff[$code] = $wgMiserMode || $context->msg( 'rc-change-size' )->plain() === '$1';
                }
 
@@ -328,7 +328,7 @@ class ChangesList extends ContextSource {
                } else {
                        $query = array(
                                'curid' => $rc->mAttribs['rc_cur_id'],
-                               'diff'  => $rc->mAttribs['rc_this_oldid'],
+                               'diff' => $rc->mAttribs['rc_this_oldid'],
                                'oldid' => $rc->mAttribs['rc_last_oldid']
                        );
 
@@ -387,7 +387,7 @@ class ChangesList extends ContextSource {
                $articlelink .= $this->getLanguage()->getDirMark();
 
                wfRunHooks( 'ChangesListInsertArticleLink',
-                       array(&$this, &$articlelink, &$s, &$rc, $unpatrolled, $watched) );
+                       array( &$this, &$articlelink, &$s, &$rc, $unpatrolled, $watched ) );
 
                $s .= " $articlelink";
        }
@@ -534,14 +534,14 @@ class ChangesList extends ContextSource {
                        $page = $rc->getTitle();
                        /** Check for rollback and edit permissions, disallow special pages, and only
                          * show a link on the top-most revision */
-                       if ( $this->getUser()->isAllowed('rollback') && $rc->mAttribs['page_latest'] == $rc->mAttribs['rc_this_oldid'] )
+                       if ( $this->getUser()->isAllowed( 'rollback' ) && $rc->mAttribs['page_latest'] == $rc->mAttribs['rc_this_oldid'] )
                        {
                                $rev = new Revision( array(
-                                       'title'     => $page,
-                                       'id'        => $rc->mAttribs['rc_this_oldid'],
-                                       'user'      => $rc->mAttribs['rc_user'],
+                                       'title' => $page,
+                                       'id' => $rc->mAttribs['rc_this_oldid'],
+                                       'user' => $rc->mAttribs['rc_user'],
                                        'user_text' => $rc->mAttribs['rc_user_text'],
-                                       'deleted'   => $rc->mAttribs['rc_deleted']
+                                       'deleted' => $rc->mAttribs['rc_deleted']
                                ) );
                                $s .= ' '.Linker::generateRollback( $rev, $this->getContext() );
                        }
@@ -554,10 +554,10 @@ class ChangesList extends ContextSource {
         * @param $classes
         */
        public function insertTags( &$s, &$rc, &$classes ) {
-               if ( empty($rc->mAttribs['ts_tags']) )
+               if ( empty( $rc->mAttribs['ts_tags'] ) )
                        return;
 
-               list($tagSummary, $newClasses) = ChangeTags::formatSummaryRow( $rc->mAttribs['ts_tags'], 'changeslist' );
+               list( $tagSummary, $newClasses ) = ChangeTags::formatSummaryRow( $rc->mAttribs['ts_tags'], 'changeslist' );
                $classes = array_merge( $classes, $newClasses );
                $s .= ' ' . $tagSummary;
        }
@@ -679,7 +679,7 @@ class OldChangesList extends ChangesList {
                }
 
                if( $this->watchlist ) {
-                       $classes[] = Sanitizer::escapeClass( 'watchlist-'.$rc->mAttribs['rc_namespace'].'-'.$rc->mAttribs['rc_title'] );
+                       $classes[] = Sanitizer::escapeClass( 'watchlist-' . $rc->mAttribs['rc_namespace'] . '-' . $rc->mAttribs['rc_title'] );
                }
 
                if ( !wfRunHooks( 'OldChangesListRecentChangesLine', array( &$this, &$s, $rc, &$classes ) ) ) {
@@ -688,7 +688,7 @@ class OldChangesList extends ChangesList {
                }
 
                wfProfileOut( __METHOD__ );
-               return "$dateheader<li class=\"".implode( ' ', $classes )."\">".$s."</li>\n";
+               return "$dateheader<li class=\"" . implode( ' ', $classes ) . "\">" . $s . "</li>\n";
        }
 }
 
@@ -822,7 +822,7 @@ class EnhancedChangesList extends ChangesList {
                        $lastLink = $this->message['last'];
                } else {
                        $lastLink = Linker::linkKnown( $rc->getTitle(), $this->message['last'],
-                               array(), $curIdEq + array('diff' => $thisOldid, 'oldid' => $lastOldid) + $rcIdQuery );
+                               array(), $curIdEq + array( 'diff' => $thisOldid, 'oldid' => $lastOldid ) + $rcIdQuery );
                }
 
                # Make user links
@@ -834,7 +834,7 @@ class EnhancedChangesList extends ChangesList {
                }
 
                $rc->lastlink = $lastLink;
-               $rc->curlink  = $curLink;
+               $rc->curlink = $curLink;
                $rc->difflink = $diffLink;
 
                # Put accumulated information into the cache, for later display
@@ -843,7 +843,7 @@ class EnhancedChangesList extends ChangesList {
                $secureName = $title->getPrefixedDBkey();
                if( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
                        # Use an @ character to prevent collision with page names
-                       $this->rc_cache['@@' . ($this->rcMoveIndex++)] = array($rc);
+                       $this->rc_cache['@@' . ($this->rcMoveIndex++)] = array( $rc );
                } else {
                        # Logs are grouped by type
                        if( $type == RC_LOG ) {
@@ -964,7 +964,7 @@ class EnhancedChangesList extends ChangesList {
                ) );
 
                # Timestamp
-               $r .= '&#160;'.$block[0]->timestamp.'&#160;</td><td>';
+               $r .= '&#160;' . $block[0]->timestamp . '&#160;</td><td>';
 
                # Article link
                if( $namehidden ) {
@@ -979,7 +979,7 @@ class EnhancedChangesList extends ChangesList {
 
                $queryParams['curid'] = $curId;
                # Changes message
-               $n = count($block);
+               $n = count( $block );
                static $nchanges = array();
                if ( !isset( $nchanges[$n] ) ) {
                        $nchanges[$n] = $this->msg( 'nchanges' )->numParams( $n )->escaped();
@@ -1034,7 +1034,7 @@ class EnhancedChangesList extends ChangesList {
                # Character difference (does not apply if only log items)
                if( $wgRCShowChangedSize && !$allLogs ) {
                        $last = 0;
-                       $first = count($block) - 1;
+                       $first = count( $block ) - 1;
                        # Some events (like logs) have an "empty" size, so we need to skip those...
                        while( $last < $first && $block[$last]->mAttribs['rc_new_len'] === null ) {
                                $last++;
@@ -1053,7 +1053,7 @@ class EnhancedChangesList extends ChangesList {
                }
 
                $r .= $users;
-               $r .= $this->numberofWatchingusers($block[0]->numberofWatchingusers);
+               $r .= $this->numberofWatchingusers( $block[0]->numberofWatchingusers );
 
                # Sub-entries
                foreach( $block as $rcObj ) {
@@ -1081,7 +1081,7 @@ class EnhancedChangesList extends ChangesList {
                                $link = $rcObj->timestamp;
                        # Revision link
                        } elseif( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
-                               $link = '<span class="history-deleted">'.$rcObj->timestamp.'</span> ';
+                               $link = '<span class="history-deleted">' . $rcObj->timestamp . '</span> ';
                        } else {
                                if ( $rcObj->unpatrolled && $type == RC_NEW) {
                                        $params['rcid'] = $rcObj->mAttribs['rc_id'];
@@ -1094,7 +1094,7 @@ class EnhancedChangesList extends ChangesList {
                                                $params
                                        );
                                if( $this->isDeleted( $rcObj, Revision::DELETED_TEXT ) ) {
-                                       $link = '<span class="history-deleted">'.$link.'</span> ';
+                                       $link = '<span class="history-deleted">' . $link . '</span> ';
                                }
                        }
                        $r .= $link . '</span>';
@@ -1144,7 +1144,7 @@ class EnhancedChangesList extends ChangesList {
         * @param $title String: text
         * @return String: HTML "<img>" tag
         */
-       protected function arrow( $dir, $alt='', $title='' ) {
+       protected function arrow( $dir, $alt = '', $title = '' ) {
                global $wgStylePath;
                $encUrl = htmlspecialchars( $wgStylePath . '/common/images/Arr_' . $dir . '.png' );
                $encAlt = htmlspecialchars( $alt );
@@ -1218,7 +1218,7 @@ class EnhancedChangesList extends ChangesList {
                                'bot' => $rcObj->mAttribs['rc_bot'],
                        ) );
                }
-               $r .= '&#160;'.$rcObj->timestamp.'&#160;</td><td>';
+               $r .= '&#160;' . $rcObj->timestamp . '&#160;</td><td>';
                # Article or log link
                if( $logType ) {
                        $logPage = new LogPage( $logType );
@@ -1250,7 +1250,7 @@ class EnhancedChangesList extends ChangesList {
                if ( $type == RC_LOG ) {
                        $r .= $this->insertLogEntry( $rcObj );
                } else {
-                       $r .= ' '.$rcObj->userlink . $rcObj->usertalklink;
+                       $r .= ' ' . $rcObj->userlink . $rcObj->usertalklink;
                        $r .= $this->insertComment( $rcObj );
                        $this->insertRollback( $r, $rcObj );
                }
@@ -1258,7 +1258,7 @@ class EnhancedChangesList extends ChangesList {
                # Tags
                $this->insertTags( $r, $rcObj, $classes );
                # Show how many people are watching this if enabled
-               $r .= $this->numberofWatchingusers($rcObj->numberofWatchingusers);
+               $r .= $this->numberofWatchingusers( $rcObj->numberofWatchingusers );
 
                $r .= "</td></tr></table>\n";
 
@@ -1291,7 +1291,7 @@ class EnhancedChangesList extends ChangesList {
 
                wfProfileOut( __METHOD__ );
 
-               return '<div>'.$blockOut.'</div>';
+               return '<div>' . $blockOut . '</div>';
        }
 
        /**
index f53ce02..7879ebe 100644 (file)
@@ -43,6 +43,8 @@ abstract class Collation {
                switch( $collationName ) {
                        case 'uppercase':
                                return new UppercaseCollation;
+                       case 'uppercase-sv':
+                               return new UppercaseSvCollation;
                        case 'identity':
                                return new IdentityCollation;
                        case 'uca-default':
@@ -121,6 +123,22 @@ class UppercaseCollation extends Collation {
        }
 }
 
+/**
+ * Like UppercaseCollation but swaps Ä and Æ.
+ *
+ * This provides an ordering suitable for Swedish.
+ * @author Lejonel
+ */
+class UppercaseSvCollation extends UppercaseCollation {
+
+       /* Unicode code point order is ÄÅÆÖ, Swedish order is ÅÄÖ and Æ is often sorted as Ä.
+        * Replacing Ä for Æ should give a better collation. */
+       function getSortKey( $string ) {
+               $uppercase = $this->lang->uc( $string );
+               return strtr( $uppercase, array( 'Ä' => 'Æ', 'Æ' => 'Ä' ) );
+       }
+}
+
 /**
  * Collation class that's essentially a no-op.
  *
@@ -374,4 +392,20 @@ class IcuCollation extends Collation {
                }
                return false;
        }
+
+       /**
+        * Return the version of ICU library used by PHP's intl extension,
+        * or false when the extension is not installed of the version
+        * can't be determined.
+        *
+        * The constant INTL_ICU_VERSION this function refers to isn't really
+        * documented. It is available since PHP 5.3.7 (see PHP bug 54561).
+        * This function will return false on older PHPs.
+        *
+        * @since 1.21
+        * @return string|false
+        */
+       static function getICUVersion() {
+               return defined( 'INTL_ICU_VERSION' ) ? INTL_ICU_VERSION : false;
+       }
 }
index 48216f0..a6eb79a 100644 (file)
@@ -113,7 +113,7 @@ class Cookie {
                }
 
                // Don't allow cookies for "co.uk" or "gov.uk", etc, but allow "supermarket.uk"
-               if ( strrpos( $domain, "." ) - strlen( $domain )  == -3 ) {
+               if ( strrpos( $domain, "." ) - strlen( $domain ) == -3 ) {
                        if ( ( count( $dc ) == 2 && strlen( $dc[0] ) <= 2 )
                                || ( count( $dc ) == 3 && strlen( $dc[0] ) == "" && strlen( $dc[1] ) <= 2 ) ) {
                                return false;
@@ -165,8 +165,8 @@ class Cookie {
        protected function canServeDomain( $domain ) {
                if ( $domain == $this->domain
                        || ( strlen( $domain ) > strlen( $this->domain )
-                                && substr( $this->domain, 0, 1 ) == '.'
-                                && substr_compare( $domain, $this->domain, -strlen( $this->domain ),
+                               && substr( $this->domain, 0, 1 ) == '.'
+                               && substr_compare( $domain, $this->domain, -strlen( $this->domain ),
                                                                        strlen( $this->domain ), true ) == 0 ) ) {
                        return true;
                }
index 0f49843..d0eb89c 100644 (file)
@@ -123,9 +123,9 @@ $wgScriptPath       = '/wiki';
  * redirect loops when "pretty URLs" are used.
  */
 $wgUsePathInfo =
-       ( strpos( php_sapi_name(), 'cgi' ) === false ) &&
-       ( strpos( php_sapi_name(), 'apache2filter' ) === false ) &&
-       ( strpos( php_sapi_name(), 'isapi' ) === false );
+       ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
+       ( strpos( PHP_SAPI, 'apache2filter' ) === false ) &&
+       ( strpos( PHP_SAPI, 'isapi' ) === false );
 
 /**
  * The extension to append to script names by default. This can either be .php
@@ -911,7 +911,7 @@ $wgMaxAnimatedGifArea = 1.25e7;
  *  $wgTiffThumbnailType = array( 'jpg', 'image/jpeg' );
  * @endcode
  */
- $wgTiffThumbnailType = false;
+$wgTiffThumbnailType = false;
 
 /**
  * If rendered thumbnail files are older than this timestamp, they
@@ -2352,11 +2352,6 @@ $wgBrowserBlackList = array(
  */
 $wgLegacySchemaConversion = false;
 
-/**
- * Enable to allow rewriting dates in page text.
- * DOES NOT FORMAT CORRECTLY FOR MOST LANGUAGES.
- */
-$wgUseDynamicDates  = false;
 /**
  * Enable dates like 'May 12' instead of '12 May', this only takes effect if
  * the interface is set to English.
@@ -3770,6 +3765,13 @@ $wgAllowPrefChange = array();
  */
 $wgSecureLogin = false;
 
+/**
+ * By default, keep users logged in via HTTPS when $wgSecureLogin is also
+ * true. Users opt-out of HTTPS when they login by de-selecting the checkbox.
+ * @since 1.21
+ */
+$wgSecureLoginDefaultHTTPS = true;
+
 /** @} */ # end user accounts }
 
 /************************************************************************//**
@@ -5058,8 +5060,8 @@ $wgUpgradeKey = false;
  * @since 1.20
  */
 $wgGitRepositoryViewers = array(
-    'https://gerrit.wikimedia.org/r/p/(.*)' => 'https://gerrit.wikimedia.org/r/gitweb?p=$1;h=%H',
-    'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' => 'https://gerrit.wikimedia.org/r/gitweb?p=$1;h=%H',
+       'https://gerrit.wikimedia.org/r/p/(.*)' => 'https://gerrit.wikimedia.org/r/gitweb?p=$1;h=%H',
+       'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' => 'https://gerrit.wikimedia.org/r/gitweb?p=$1;h=%H',
 );
 
 /** @} */ # End of maintenance }
index 882f318..46b0947 100644 (file)
@@ -227,7 +227,7 @@ define( 'MW_SUPPORTS_RESOURCE_MODULES', 1 );
 define( 'OT_HTML', 1 );
 define( 'OT_WIKI', 2 );
 define( 'OT_PREPROCESS', 3 );
-define( 'OT_MSG' , 3 );  // b/c alias for OT_PREPROCESS
+define( 'OT_MSG', 3 );  // b/c alias for OT_PREPROCESS
 define( 'OT_PLAIN', 4 );
 /**@}*/
 
index 4d7b968..d48bd0b 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 class DeprecatedGlobal extends StubObject {
-        // The m's are to stay consistent with parent class.
+       // The m's are to stay consistent with parent class.
        protected $mRealValue, $mVersion;
 
        function __construct( $name, $realValue, $version = false ) {
index 5b01ca5..80c091e 100644 (file)
@@ -546,8 +546,8 @@ class EditPage {
                        // Standard preference behaviour
                        return true;
                } elseif ( !$this->mTitle->exists() &&
-                 isset( $wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] ) &&
-                 $wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] )
+                       isset( $wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] ) &&
+                       $wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] )
                {
                        // Categories are special
                        return true;
@@ -2888,21 +2888,24 @@ HTML
                $dbr = wfGetDB( DB_SLAVE );
                $data = $dbr->selectRow(
                        array( 'logging', 'user' ),
-                       array( 'log_type',
-                                  'log_action',
-                                  'log_timestamp',
-                                  'log_user',
-                                  'log_namespace',
-                                  'log_title',
-                                  'log_comment',
-                                  'log_params',
-                                  'log_deleted',
-                                  'user_name' ),
-                       array( 'log_namespace' => $this->mTitle->getNamespace(),
-                                  'log_title' => $this->mTitle->getDBkey(),
-                                  'log_type' => 'delete',
-                                  'log_action' => 'delete',
-                                  'user_id=log_user' ),
+                       array(
+                               'log_type',
+                               'log_action',
+                               'log_timestamp',
+                               'log_user',
+                               'log_namespace',
+                               'log_title',
+                               'log_comment',
+                               'log_params',
+                               'log_deleted',
+                               'user_name'
+                       ), array(
+                               'log_namespace' => $this->mTitle->getNamespace(),
+                               'log_title' => $this->mTitle->getDBkey(),
+                               'log_type' => 'delete',
+                               'log_action' => 'delete',
+                               'user_id=log_user'
+                       ),
                        __METHOD__,
                        array( 'LIMIT' => 1, 'ORDER BY' => 'log_timestamp DESC' )
                );
@@ -2972,7 +2975,7 @@ HTML
                        $parserOptions = $this->mArticle->makeParserOptions( $this->mArticle->getContext() );
                        $parserOptions->setEditSection( false );
                        $parserOptions->setIsPreview( true );
-                       $parserOptions->setIsSectionPreview( !is_null($this->section) && $this->section !== '' );
+                       $parserOptions->setIsSectionPreview( !is_null( $this->section ) && $this->section !== '' );
 
                        # don't parse non-wikitext pages, show message about preview
                        if ( $this->mTitle->isCssJsSubpage() || $this->mTitle->isCssOrJsPage() ) {
@@ -2995,7 +2998,7 @@ HTML
                                # Used messages to make sure grep find them:
                                # Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview
                                if( $level && $format ) {
-                                       $note = "<div id='mw-{$level}{$format}preview'>" . wfMessage( "{$level}{$format}preview" )->text()  . "</div>";
+                                       $note = "<div id='mw-{$level}{$format}preview'>" . wfMessage( "{$level}{$format}preview" )->text() . "</div>";
                                }
                        }
 
@@ -3031,7 +3034,7 @@ HTML
                                }
                        }
                } catch ( MWContentSerializationException $ex ) {
-                       $m = wfMessage('content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() );
+                       $m = wfMessage( 'content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() );
                        $note .= "\n\n" . $m->parse();
                        $previewHTML = '';
                }
index 4cb946c..81d1a9b 100644 (file)
@@ -262,7 +262,7 @@ class MWException extends Exception {
                if ( defined( 'MW_API' ) ) {
                        // Unhandled API exception, we can't be sure that format printer is alive
                        header( 'MediaWiki-API-Error: internal_api_error_' . get_class( $this ) );
-                       wfHttpError(500, 'Internal Server Error', $this->getText() );
+                       wfHttpError( 500, 'Internal Server Error', $this->getText() );
                } elseif ( self::isCommandLine() ) {
                        MWExceptionHandler::printError( $this->getText() );
                } else {
@@ -536,7 +536,7 @@ class UserNotLoggedIn extends ErrorPageError {
         */
        public function __construct(
                $reasonMsg = 'exception-nologin-text',
-               $titleMsg  = 'exception-nologin',
+               $titleMsg = 'exception-nologin',
                $params = null
        ) {
                parent::__construct( $titleMsg, $reasonMsg, $params );
index 088a807..8893c6c 100644 (file)
@@ -87,10 +87,10 @@ class WikiExporter {
                        $buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) {
                $this->db = $db;
                $this->history = $history;
-               $this->buffer  = $buffer;
-               $this->writer  = new XmlDumpWriter();
-               $this->sink    = new DumpOutput();
-               $this->text    = $text;
+               $this->buffer = $buffer;
+               $this->writer = new XmlDumpWriter();
+               $this->sink = new DumpOutput();
+               $this->text = $text;
        }
 
        /**
@@ -226,7 +226,7 @@ class WikiExporter {
                foreach ( $res as $row ) {
                        $this->author_list .= "<contributor>" .
                                "<username>" .
-                               htmlentities( $row->rev_user_text )  .
+                               htmlentities( $row->rev_user_text ) .
                                "</username>" .
                                "<id>" .
                                $row->rev_user .
@@ -634,7 +634,7 @@ class XmlDumpWriter {
        function writeRevision( $row ) {
                wfProfileIn( __METHOD__ );
 
-               $out  = "    <revision>\n";
+               $out = "    <revision>\n";
                $out .= "      " . Xml::element( 'id', null, strval( $row->rev_id ) ) . "\n";
                if( isset( $row->rev_parent_id ) && $row->rev_parent_id ) {
                        $out .= "      " . Xml::element( 'parentid', null, strval( $row->rev_parent_id ) ) . "\n";
@@ -674,12 +674,12 @@ class XmlDumpWriter {
                }
 
                if ( isset( $row->rev_sha1 ) && $row->rev_sha1 && !( $row->rev_deleted & Revision::DELETED_TEXT ) ) {
-                       $out .= "      " . Xml::element('sha1', null, strval( $row->rev_sha1 ) ) . "\n";
+                       $out .= "      " . Xml::element( 'sha1', null, strval( $row->rev_sha1 ) ) . "\n";
                } else {
                        $out .= "      <sha1/>\n";
                }
 
-               if ( isset( $row->rev_content_model ) && !is_null( $row->rev_content_model )  ) {
+               if ( isset( $row->rev_content_model ) && !is_null( $row->rev_content_model ) ) {
                        $content_model = strval( $row->rev_content_model );
                } else {
                        // probably using $wgContentHandlerUseDB = false;
@@ -688,7 +688,7 @@ class XmlDumpWriter {
                        $content_model = ContentHandler::getDefaultModelFor( $title );
                }
 
-               $out .= "      " . Xml::element('model', null, strval( $content_model ) ) . "\n";
+               $out .= "      " . Xml::element( 'model', null, strval( $content_model ) ) . "\n";
 
                if ( isset( $row->rev_content_format ) && !is_null( $row->rev_content_format ) ) {
                        $content_format = strval( $row->rev_content_format );
@@ -699,7 +699,7 @@ class XmlDumpWriter {
                        $content_format = $content_handler->getDefaultFormat();
                }
 
-               $out .= "      " . Xml::element('format', null, strval( $content_format ) ) . "\n";
+               $out .= "      " . Xml::element( 'format', null, strval( $content_format ) ) . "\n";
 
                wfRunHooks( 'XmlDumpWriterWriteRevision', array( &$this, &$out, $row, $text ) );
 
@@ -720,7 +720,7 @@ class XmlDumpWriter {
        function writeLogItem( $row ) {
                wfProfileIn( __METHOD__ );
 
-               $out  = "  <logitem>\n";
+               $out = "  <logitem>\n";
                $out .= "    " . Xml::element( 'id', null, strval( $row->log_id ) ) . "\n";
 
                $out .= $this->writeTimestamp( $row->log_timestamp, "    " );
@@ -1009,7 +1009,7 @@ class DumpFileOutput extends DumpOutput {
         * @throws MWException
         */
        function renameOrException( $newname ) {
-                       if (rename( $this->filename, $newname ) ) {
+                       if ( !rename( $this->filename, $newname ) ) {
                                throw new MWException( __METHOD__ . ": rename of file {$this->filename} to $newname failed\n" );
                        }
        }
@@ -1072,7 +1072,7 @@ class DumpPipeOutput extends DumpFileOutput {
         */
        function __construct( $command, $file = null ) {
                if ( !is_null( $file ) ) {
-                       $command .=  " > " . wfEscapeShellArg( $file );
+                       $command .= " > " . wfEscapeShellArg( $file );
                }
 
                $this->startCommand( $command );
@@ -1128,7 +1128,7 @@ class DumpPipeOutput extends DumpFileOutput {
                        $this->renameOrException( $newname );
                        if ( $open ) {
                                $command = $this->command;
-                               $command .=  " > " . wfEscapeShellArg( $this->filename );
+                               $command .= " > " . wfEscapeShellArg( $this->filename );
                                $this->startCommand( $command );
                        }
                }
@@ -1361,7 +1361,7 @@ class DumpNamespaceFilter extends DumpFilter {
                        "NS_PROJECT_TALK"   => NS_PROJECT_TALK,
                        "NS_FILE"           => NS_FILE,
                        "NS_FILE_TALK"      => NS_FILE_TALK,
-                       "NS_IMAGE"          => NS_IMAGE,  // NS_IMAGE is an alias for NS_FILE
+                       "NS_IMAGE"          => NS_IMAGE, // NS_IMAGE is an alias for NS_FILE
                        "NS_IMAGE_TALK"     => NS_IMAGE_TALK,
                        "NS_MEDIAWIKI"      => NS_MEDIAWIKI,
                        "NS_MEDIAWIKI_TALK" => NS_MEDIAWIKI_TALK,
@@ -1529,7 +1529,7 @@ class DumpMultiWriter {
        function getFilenames() {
                $filenames = array();
                for ( $i = 0; $i < $this->count; $i++ ) {
-                       $filenames[] =  $this->sinks[$i]->getFilenames();
+                       $filenames[] = $this->sinks[$i]->getFilenames();
                }
                return $filenames;
        }
index 82fe196..8cf9c84 100644 (file)
@@ -285,7 +285,7 @@ abstract class ExternalUser {
                $dbw->replace( 'external_user',
                        array( 'eu_local_id', 'eu_external_id' ),
                        array( 'eu_local_id' => $id,
-                                  'eu_external_id' => $this->getId() ),
+                               'eu_external_id' => $this->getId() ),
                        __METHOD__ );
        }
 
index 60f7600..efa213f 100644 (file)
@@ -114,9 +114,9 @@ class FakeTitle extends Title {
        function getParentCategories() { $this->error(); }
        function getParentCategoryTree( $children = array() ) { $this->error(); }
        function pageCond() { $this->error(); }
-       function getPreviousRevisionID( $revId, $flags=0 ) { $this->error(); }
-       function getNextRevisionID( $revId, $flags=0 ) { $this->error(); }
-       function getFirstRevision( $flags=0 ) { $this->error(); }
+       function getPreviousRevisionID( $revId, $flags = 0 ) { $this->error(); }
+       function getNextRevisionID( $revId, $flags = 0 ) { $this->error(); }
+       function getFirstRevision( $flags = 0 ) { $this->error(); }
        function isNewPage() { $this->error(); }
        function getEarliestRevTime( $flags = 0 ) { $this->error(); }
        function countRevisionsBetween( $old, $new ) { $this->error(); }
index f9dbf5b..8e000ae 100644 (file)
@@ -243,9 +243,9 @@ abstract class ChannelFeed extends FeedItem {
         */
        function contentType() {
                global $wgRequest;
-               $ctype = $wgRequest->getVal('ctype','application/xml');
-               $allowedctypes = array('application/xml','text/xml','application/rss+xml','application/atom+xml');
-               return (in_array($ctype, $allowedctypes) ? $ctype : 'application/xml');
+               $ctype = $wgRequest->getVal( 'ctype', 'application/xml' );
+               $allowedctypes = array( 'application/xml', 'text/xml', 'application/rss+xml', 'application/atom+xml' );
+               return (in_array( $ctype, $allowedctypes ) ? $ctype : 'application/xml');
        }
 
        /**
index 82c6e4a..66f6275 100644 (file)
@@ -39,7 +39,7 @@ class FeedUtils {
        public static function checkPurge( $timekey, $key ) {
                global $wgRequest, $wgUser, $messageMemc;
                $purge = $wgRequest->getVal( 'action' ) === 'purge';
-               if ( $purge && $wgUser->isAllowed('purge') ) {
+               if ( $purge && $wgUser->isAllowed( 'purge' ) ) {
                        $messageMemc->delete( $timekey );
                        $messageMemc->delete( $key );
                }
@@ -102,7 +102,7 @@ class FeedUtils {
         * @param $actiontext String: 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__ );
 
index e2fcd9c..48073f7 100644 (file)
@@ -80,13 +80,13 @@ class FileDeleteForm {
                $this->oldimage = $wgRequest->getText( 'oldimage', false );
                $token = $wgRequest->getText( 'wpEditToken' );
                # Flag to hide all contents of the archived revisions
-               $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed('suppressrevision');
+               $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed( 'suppressrevision' );
 
                if( $this->oldimage ) {
                        $this->oldfile = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $this->title, $this->oldimage );
                }
 
-               if( !self::haveDeletableFile($this->file, $this->oldfile, $this->oldimage) ) {
+               if( !self::haveDeletableFile( $this->file, $this->oldfile, $this->oldimage ) ) {
                        $wgOut->addHTML( $this->prepareMessage( 'filedelete-nofile' ) );
                        $wgOut->addReturnTo( $this->title );
                        return;
@@ -344,7 +344,7 @@ class FileDeleteForm {
         *
         * @return bool
         */
-       public static function isValidOldSpec($oldimage) {
+       public static function isValidOldSpec( $oldimage ) {
                return strlen( $oldimage ) >= 16
                        && strpos( $oldimage, '/' ) === false
                        && strpos( $oldimage, '\\' ) === false;
@@ -360,7 +360,7 @@ class FileDeleteForm {
         * @param $oldimage File
         * @return bool
         */
-       public static function haveDeletableFile(&$file, &$oldfile, $oldimage) {
+       public static function haveDeletableFile( &$file, &$oldfile, $oldimage ) {
                return $oldimage
                        ? $oldfile && $oldfile->exists() && $oldfile->isLocal()
                        : $file && $file->exists() && $file->isLocal();
index 2a05411..89ad955 100644 (file)
@@ -53,7 +53,7 @@ class ForkController {
        const RESTART_ON_ERROR = 1;
 
        public function __construct( $numProcs, $flags = 0 ) {
-               if ( php_sapi_name() != 'cli' ) {
+               if ( PHP_SAPI != 'cli' ) {
                        throw new MWException( "ForkController cannot be used from the web." );
                }
                $this->procsToStart = $numProcs;
index 2292e31..90bc891 100644 (file)
@@ -50,7 +50,7 @@ if ( !function_exists( 'mb_substr' ) ) {
         * @codeCoverageIgnore
         * @return string
         */
-       function mb_substr( $str, $start, $count='end' ) {
+       function mb_substr( $str, $start, $count = 'end' ) {
                return Fallback::mb_substr( $str, $start, $count );
        }
 
@@ -392,7 +392,7 @@ function wfArrayToCgi( $array1, $array2 = null, $prefix = '' ) {
 
        $cgi = '';
        foreach ( $array1 as $key => $value ) {
-               if ( !is_null($value) && $value !== false ) {
+               if ( !is_null( $value ) && $value !== false ) {
                        if ( $cgi != '' ) {
                                $cgi .= '&';
                        }
@@ -2449,7 +2449,7 @@ function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) {
                $timestamp = new MWTimestamp( $ts );
                return $timestamp->getTimestamp( $outputtype );
        } catch( TimestampException $e ) {
-               wfDebug("wfTimestamp() fed bogus time value: TYPE=$outputtype; VALUE=$ts\n");
+               wfDebug( "wfTimestamp() fed bogus time value: TYPE=$outputtype; VALUE=$ts\n" );
                return false;
        }
 }
@@ -2622,12 +2622,14 @@ function wfPercent( $nr, $acc = 2, $round = true ) {
 /**
  * Find out whether or not a mixed variable exists in a string
  *
+ * @deprecated Just use str(i)pos
  * @param $needle String
  * @param $str String
  * @param $insensitive Boolean
  * @return Boolean
  */
 function in_string( $needle, $str, $insensitive = false ) {
+       wfDeprecated( __METHOD__, '1.21' );
        $func = 'strpos';
        if( $insensitive ) $func = 'stripos';
 
@@ -2681,8 +2683,7 @@ function wfDl( $extension, $fileName = null ) {
        }
 
        $canDl = false;
-       $sapi = php_sapi_name();
-       if( $sapi == 'cli' || $sapi == 'cgi' || $sapi == 'embed' ) {
+       if( PHP_SAPI == 'cli' || PHP_SAPI == 'cgi' || PHP_SAPI == 'embed' ) {
                $canDl = ( function_exists( 'dl' ) && is_callable( 'dl' )
                && wfIniGetBool( 'enable_dl' ) && !wfIniGetBool( 'safe_mode' ) );
        }
@@ -2824,7 +2825,7 @@ function wfShellExec( $cmd, &$retval = null, $environ = array(), $limits = array
        $cmd = $envcmd . $cmd;
 
        if ( php_uname( 's' ) == 'Linux' ) {
-               $time = intval ( isset($limits['time']) ? $limits['time'] : $wgMaxShellTime );
+               $time = intval ( isset( $limits['time'] ) ? $limits['time'] : $wgMaxShellTime );
                if ( isset( $limits['walltime'] ) ) {
                        $wallTime = intval( $limits['walltime'] );
                } elseif ( isset( $limits['time'] ) ) {
@@ -2832,8 +2833,8 @@ function wfShellExec( $cmd, &$retval = null, $environ = array(), $limits = array
                } else {
                        $wallTime = intval( $wgMaxShellWallClockTime );
                }
-               $mem = intval ( isset($limits['memory']) ? $limits['memory'] : $wgMaxShellMemory );
-               $filesize = intval ( isset($limits['filesize']) ? $limits['filesize'] : $wgMaxShellFileSize );
+               $mem = intval ( isset( $limits['memory'] ) ? $limits['memory'] : $wgMaxShellMemory );
+               $filesize = intval ( isset( $limits['filesize'] ) ? $limits['filesize'] : $wgMaxShellFileSize );
 
                if ( $time > 0 || $mem > 0 || $filesize > 0 || $wallTime > 0 ) {
                        $cmd = '/bin/bash ' . escapeshellarg( "$IP/bin/ulimit5.sh" ) .
index 952022f..86eb38d 100644 (file)
@@ -639,9 +639,9 @@ class HTMLForm extends ContextSource {
                        : 'application/x-www-form-urlencoded';
                # Attributes
                $attribs = array(
-                       'action'  => $this->mAction === false ? $this->getTitle()->getFullURL() : $this->mAction,
-                       'method'  => $this->mMethod,
-                       'class'   => 'visualClear',
+                       'action' => $this->mAction === false ? $this->getTitle()->getFullURL() : $this->mAction,
+                       'method' => $this->mMethod,
+                       'class' => 'visualClear',
                        'enctype' => $encType,
                );
                if ( !empty( $this->mId ) ) {
@@ -712,8 +712,8 @@ class HTMLForm extends ContextSource {
 
                foreach ( $this->mButtons as $button ) {
                        $attrs = array(
-                               'type'  => 'submit',
-                               'name'  => $button['name'],
+                               'type' => 'submit',
+                               'name' => $button['name'],
                                'value' => $button['value']
                        );
 
index 3de148b..5974173 100644 (file)
@@ -247,7 +247,7 @@ class HistoryBlobStub {
                                if ( !isset( $parts[1] ) || $parts[1] == '' ) {
                                        return false;
                                }
-                               $row->old_text = ExternalStore::fetchFromUrl($url);
+                               $row->old_text = ExternalStore::fetchFromUrl( $url );
 
                        }
                        if( !in_array( 'object', $flags ) ) {
@@ -395,7 +395,7 @@ class DiffHistoryBlob implements HistoryBlob {
         */
        function addItem( $text ) {
                if ( $this->mFrozen ) {
-                       throw new MWException( __METHOD__.": Cannot add more items after sleep/wakeup" );
+                       throw new MWException( __METHOD__ . ": Cannot add more items after sleep/wakeup" );
                }
 
                $this->mItems[] = $text;
@@ -535,11 +535,11 @@ class DiffHistoryBlob implements HistoryBlob {
                # Check the checksum if hash/mhash is available
                $ofp = $this->xdiffAdler32( $base );
                if ( $ofp !== false && $ofp !== substr( $diff, 0, 4 ) ) {
-                       wfDebug( __METHOD__. ": incorrect base checksum\n" );
+                       wfDebug( __METHOD__ . ": incorrect base checksum\n" );
                        return false;
                }
                if ( $header['csize'] != strlen( $base ) ) {
-                       wfDebug( __METHOD__. ": incorrect base length\n" );
+                       wfDebug( __METHOD__ . ": incorrect base length\n" );
                        return false;
                }
 
@@ -568,7 +568,7 @@ class DiffHistoryBlob implements HistoryBlob {
                                $out .= substr( $base, $x['off'], $x['csize'] );
                                break;
                        default:
-                               wfDebug( __METHOD__.": invalid op\n" );
+                               wfDebug( __METHOD__ . ": invalid op\n" );
                                return false;
                        }
                }
index 14456e4..cc9b54b 100644 (file)
@@ -465,8 +465,7 @@ class Html {
                        $key = strtolower( $key );
 
                        // Here we're blacklisting some HTML5-only attributes...
-                       if ( !$wgHtml5 && in_array( $key, self::$HTMLFiveOnlyAttribs )
-                        ) {
+                       if ( !$wgHtml5 && in_array( $key, self::$HTMLFiveOnlyAttribs ) ) {
                                continue;
                        }
 
@@ -738,7 +737,7 @@ class Html {
                        }
                }
 
-               if (substr($value, 0, 1) == "\n") {
+               if ( substr( $value, 0, 1 ) == "\n" ) {
                        // Workaround for bug 12130: browsers eat the initial newline
                        // assuming that it's just for show, but they do keep the later
                        // newlines, which we may want to preserve during editing.
@@ -930,7 +929,7 @@ class Html {
                        $icon = $wgStylePath.'/common/images/'.$icon;
                }
 
-               $s  = Html::openElement( 'div', array( 'class' => "mw-infobox $class") );
+               $s = Html::openElement( 'div', array( 'class' => "mw-infobox $class") );
 
                $s .= Html::openElement( 'div', array( 'class' => 'mw-infobox-left' ) ).
                                Html::element( 'img',
index 337beb4..9e9f0da 100644 (file)
@@ -244,7 +244,7 @@ class MWHttpRequest {
                }
 
                $members = array( "postData", "proxy", "noProxy", "sslVerifyHost", "caInfo",
-                                 "method", "followRedirects", "maxRedirects", "sslVerifyCert", "callback" );
+                               "method", "followRedirects", "maxRedirects", "sslVerifyCert", "callback" );
 
                foreach ( $members as $o ) {
                        if ( isset( $options[$o] ) ) {
@@ -284,7 +284,7 @@ class MWHttpRequest {
                        Http::$httpEngine = function_exists( 'curl_init' ) ? 'curl' : 'php';
                } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) {
                        throw new MWException( __METHOD__ . ': curl (http://php.net/curl) is not installed, but' .
-                                                                  ' Http::$httpEngine is set to "curl"' );
+                               ' Http::$httpEngine is set to "curl"' );
                }
 
                switch( Http::$httpEngine ) {
@@ -646,12 +646,12 @@ class MWHttpRequest {
                        $locations = $headers[ 'location' ];
                        $domain = '';
                        $foundRelativeURI = false;
-                       $countLocations = count($locations);
+                       $countLocations = count( $locations );
 
                        for ( $i = $countLocations - 1; $i >= 0; $i-- ) {
                                $url = parse_url( $locations[ $i ] );
 
-                               if ( isset($url[ 'host' ]) ) {
+                               if ( isset( $url['host'] ) ) {
                                        $domain = $url[ 'scheme' ] . '://' . $url[ 'host' ];
                                        break;  //found correct URI (with host)
                                } else {
index 1b40f4b..5c50c22 100644 (file)
@@ -714,7 +714,9 @@ class IP {
         * @return String: valid dotted quad IPv4 address or null
         */
        public static function canonicalize( $addr ) {
-               $addr = preg_replace( '/\%.*/','', $addr ); // remove zone info (bug 35738)
+               // remove zone info (bug 35738)
+               $addr = preg_replace( '/\%.*/', '', $addr );
+
                if ( self::isValid( $addr ) ) {
                        return $addr;
                }
index a54bd92..953b1f7 100644 (file)
@@ -156,7 +156,7 @@ class ImagePage extends Article {
                        $pageLang = $this->getTitle()->getPageViewLanguage();
                        $out->addHTML( Xml::openElement( 'div', array( 'id' => 'mw-imagepage-content',
                                'lang' => $pageLang->getHtmlCode(), 'dir' => $pageLang->getDir(),
-                               'class' => 'mw-content-'.$pageLang->getDir() ) ) );
+                               'class' => 'mw-content-' . $pageLang->getDir() ) ) );
 
                        parent::view();
 
@@ -369,12 +369,19 @@ class ImagePage extends Article {
                                                if ( $size[0] < $width_orig && $size[1] < $height_orig
                                                        && $size[0] != $width && $size[1] != $height )
                                                {
-                                                       $otherSizes[] = $this->makeSizeLink( $params, $size[0], $size[1] );
+                                                       $sizeLink = $this->makeSizeLink( $params, $size[0], $size[1] );
+                                                       if ( $sizeLink ) {
+                                                               $otherSizes[] = $sizeLink;
+                                                       }
                                                }
                                        }
-                                       $msgsmall = wfMessage( 'show-big-image-preview' )->
-                                               rawParams( $this->makeSizeLink( $params, $width, $height ) )->
-                                               parse();
+                                       $msgsmall = '';
+                                       $sizeLinkBigImagePreview = $this->makeSizeLink( $params, $width, $height );
+                                       if ( $sizeLinkBigImagePreview ) {
+                                               $msgsmall .= wfMessage( 'show-big-image-preview' )->
+                                                       rawParams( $sizeLinkBigImagePreview )->
+                                                       parse();
+                                       }
                                        if ( count( $otherSizes ) ) {
                                                $msgsmall .= ' ' .
                                                Html::rawElement( 'span', array( 'class' => 'mw-filepage-other-resolutions' ),
@@ -538,7 +545,7 @@ EOT
                                        array( 'delete', 'move' ),
                                        $this->getTitle()->getPrefixedText(),
                                        '',
-                                       array(  'lim' => 10,
+                                       array( 'lim' => 10,
                                                'conds' => array( "log_action != 'revision'" ),
                                                'showIfEmpty' => false,
                                                'msgKey' => array( 'moveddeleted-notice' )
@@ -630,7 +637,7 @@ EOT
                return $uploadTitle->getFullURL( array(
                        'wpDestFile' => $this->mPage->getFile()->getName(),
                        'wpForReUpload' => 1
-                ) );
+               ) );
        }
 
        /**
@@ -1044,9 +1051,9 @@ class ImageHistoryList extends ContextSource {
                                } else {
                                        list( $ts, ) = explode( '!', $img, 2 );
                                        $query = array(
-                                               'type'   => 'oldimage',
+                                               'type' => 'oldimage',
                                                'target' => $this->title->getPrefixedText(),
-                                               'ids'    => $ts,
+                                               'ids' => $ts,
                                        );
                                        $del = Linker::revDeleteLink( $query,
                                                $file->isDeleted( File::DELETED_RESTRICTED ), $canHide );
index d00002a..cc642e4 100644 (file)
@@ -400,7 +400,7 @@ class WikiImporter {
        /** Left in for debugging */
        private function dumpElement() {
                static $lookup = null;
-               if (!$lookup) {
+               if ( !$lookup ) {
                        $xmlReaderConstants = array(
                                "NONE",
                                "ELEMENT",
@@ -473,7 +473,7 @@ class WikiImporter {
                                $skip = true;
                        }
 
-                       if ($skip) {
+                       if ( $skip ) {
                                $keepReading = $this->reader->next();
                                $skip = false;
                                $this->debug( "Skip" );
@@ -897,7 +897,7 @@ class UploadSourceAdapter {
         * @return bool
         */
        function stream_open( $path, $mode, $options, &$opened_path ) {
-               $url = parse_url($path);
+               $url = parse_url( $path );
                $id = $url['host'];
 
                if ( !isset( self::$sourceRegistrations[$id] ) ) {
@@ -918,22 +918,22 @@ class UploadSourceAdapter {
                $leave = false;
 
                while ( !$leave && !$this->mSource->atEnd() &&
-                               strlen($this->mBuffer) < $count ) {
+                               strlen( $this->mBuffer ) < $count ) {
                        $read = $this->mSource->readChunk();
 
-                       if ( !strlen($read) ) {
+                       if ( !strlen( $read ) ) {
                                $leave = true;
                        }
 
                        $this->mBuffer .= $read;
                }
 
-               if ( strlen($this->mBuffer) ) {
+               if ( strlen( $this->mBuffer ) ) {
                        $return = substr( $this->mBuffer, 0, $count );
                        $this->mBuffer = substr( $this->mBuffer, $count );
                }
 
-               $this->mPosition += strlen($return);
+               $this->mPosition += strlen( $return );
 
                return $return;
        }
@@ -1390,7 +1390,7 @@ class WikiRevision {
                                array( 'rev_page' => $pageId,
                                        'rev_timestamp' => $dbw->timestamp( $this->timestamp ),
                                        'rev_user_text' => $userText,
-                                       'rev_comment'   => $this->getComment() ),
+                                       'rev_comment' => $this->getComment() ),
                                __METHOD__
                        );
                        if( $prior ) {
@@ -1405,15 +1405,15 @@ class WikiRevision {
                # @todo FIXME: Use original rev_id optionally (better for backups)
                # Insert the row
                $revision = new Revision( array(
-                       'title'      => $this->title,
-                       'page'       => $pageId,
-                       'content_model'  => $this->getModel(),
+                       'title' => $this->title,
+                       'page' => $pageId,
+                       'content_model' => $this->getModel(),
                        'content_format' => $this->getFormat(),
-                       'text'       => $this->getContent()->serialize( $this->getFormat() ), //XXX: just set 'content' => $this->getContent()?
-                       'comment'    => $this->getComment(),
-                       'user'       => $userId,
-                       'user_text'  => $userText,
-                       'timestamp'  => $this->timestamp,
+                       'text' => $this->getContent()->serialize( $this->getFormat() ), //XXX: just set 'content' => $this->getContent()?
+                       'comment' => $this->getComment(),
+                       'user' => $userId,
+                       'user_text' => $userText,
+                       'timestamp' => $this->timestamp,
                        'minor_edit' => $this->minor,
                        ) );
                $revision->insertOn( $dbw );
@@ -1442,13 +1442,13 @@ class WikiRevision {
                // @todo FIXME: Use original log ID (better for backups)
                $prior = $dbw->selectField( 'logging', '1',
                        array( 'log_type' => $this->getType(),
-                               'log_action'    => $this->getAction(),
+                               'log_action' => $this->getAction(),
                                'log_timestamp' => $dbw->timestamp( $this->timestamp ),
                                'log_namespace' => $this->getTitle()->getNamespace(),
-                               'log_title'     => $this->getTitle()->getDBkey(),
-                               'log_comment'   => $this->getComment(),
+                               'log_title' => $this->getTitle()->getDBkey(),
+                               'log_comment' => $this->getComment(),
                                #'log_user_text' => $this->user_text,
-                               'log_params'    => $this->params ),
+                               'log_params' => $this->params ),
                        __METHOD__
                );
                // @todo FIXME: This could fail slightly for multiple matches :P
index c2f6b1e..28379c7 100644 (file)
@@ -89,7 +89,7 @@ class LinkFilter {
         * @param $prot        String: protocol
         * @return Array to be passed to DatabaseBase::buildLike() or false on error
         */
-        public static function makeLikeArray( $filterEntry , $prot = 'http://' ) {
+       public static function makeLikeArray( $filterEntry, $prot = 'http://' ) {
                $db = wfGetDB( DB_MASTER );
                if ( substr( $filterEntry, 0, 2 ) == '*.' ) {
                        $subdomains = true;
@@ -118,7 +118,7 @@ class LinkFilter {
                }
                // Reverse the labels in the hostname, convert to lower case
                // For emails reverse domainpart only
-               if ( $prot == 'mailto:' && strpos($host, '@') ) {
+               if ( $prot == 'mailto:' && strpos( $host, '@' ) ) {
                        // complete email adress
                        $mailparts = explode( '@', $host );
                        $domainpart = strtolower( implode( '.', array_reverse( explode( '.', $mailparts[1] ) ) ) );
index bc0bb77..4555398 100644 (file)
@@ -33,7 +33,7 @@ class Linker {
         * Flags for userToolLinks()
         */
        const TOOL_LINKS_NOBLOCK = 1;
-       const TOOL_LINKS_EMAIL   = 2;
+       const TOOL_LINKS_EMAIL = 2;
 
        /**
         * Get the appropriate HTML attributes to add to the "a" element of an ex-
@@ -600,9 +600,9 @@ class Linker {
                $prefix = $postfix = '';
 
                if ( 'center' == $fp['align'] ) {
-                       $prefix  = '<div class="center">';
+                       $prefix = '<div class="center">';
                        $postfix = '</div>';
-                       $fp['align']   = 'none';
+                       $fp['align'] = 'none';
                }
                if ( $file && !isset( $hp['width'] ) ) {
                        if ( isset( $hp['height'] ) && $file->isVectorized() ) {
@@ -724,7 +724,7 @@ class Linker {
                                $extLinkAttrs = $parser->getExternalLinkAttribs( $frameParams['link-url'] );
                                foreach ( $extLinkAttrs as $name => $val ) {
                                        // Currently could include 'rel' and 'target'
-                                       $mtoParams['parser-extlink-'.$name] = $val;
+                                       $mtoParams['parser-extlink-' . $name] = $val;
                                }
                        }
                } elseif ( isset( $frameParams['link-title'] ) && $frameParams['link-title'] !== '' ) {
@@ -751,7 +751,7 @@ class Linker {
         * @return mixed
         */
        public static function makeThumbLinkObj( Title $title, $file, $label = '', $alt,
-               $align = 'right', $params = array(), $framed = false , $manualthumb = "" )
+               $align = 'right', $params = array(), $framed = false, $manualthumb = "" )
        {
                $frameParams = array(
                        'alt' => $alt,
@@ -1028,7 +1028,7 @@ class Linker {
                        $key = strtolower( $name );
                }
 
-               return self::linkKnown( SpecialPage::getTitleFor( $name ) , wfMessage( $key )->text() );
+               return self::linkKnown( SpecialPage::getTitleFor( $name ), wfMessage( $key )->text() );
        }
 
        /**
@@ -1672,11 +1672,10 @@ class Linker {
                $lang = wfGetLangObj( $lang );
                $title = wfMessage( 'toc' )->inLanguage( $lang )->escaped();
 
-               return
-                  '<table id="toc" class="toc"><tr><td>'
-                . '<div id="toctitle"><h2>' . $title . "</h2></div>\n"
-                . $toc
-                . "</ul>\n</td></tr></table>\n";
+               return '<table id="toc" class="toc"><tr><td>'
+                       . '<div id="toctitle"><h2>' . $title . "</h2></div>\n"
+                       . $toc
+                       . "</ul>\n</td></tr></table>\n";
        }
 
        /**
@@ -2075,7 +2074,7 @@ class Linker {
                        # Compatibility: formerly some tooltips had [alt-.] hardcoded
                        $tooltip = preg_replace( "/ ?\[alt-.\]$/", '', $tooltip );
                        # Message equal to '-' means suppress it.
-                       if (  $tooltip == '-' ) {
+                       if ( $tooltip == '-' ) {
                                $tooltip = false;
                        }
                }
@@ -2157,17 +2156,17 @@ class Linker {
                                // RevDelete links using revision ID are stable across
                                // page deletion and undeletion; use when possible.
                                $query = array(
-                                       'type'   => 'revision',
+                                       'type' => 'revision',
                                        'target' => $title->getPrefixedDBkey(),
-                                       'ids'    => $rev->getId()
+                                       'ids' => $rev->getId()
                                );
                        } else {
                                // Older deleted entries didn't save a revision ID.
                                // We have to refer to these by timestamp, ick!
                                $query = array(
-                                       'type'   => 'archive',
+                                       'type' => 'archive',
                                        'target' => $title->getPrefixedDBkey(),
-                                       'ids'    => $rev->getTimestamp()
+                                       'ids' => $rev->getTimestamp()
                                );
                        }
                        return Linker::revDeleteLink( $query,
@@ -2287,7 +2286,7 @@ class Linker {
         * @return string the a-element
         */
        static function makeKnownLinkObj(
-               $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = ''
+               $title, $text = '', $query = '', $trail = '', $prefix = '', $aprops = '', $style = ''
        ) {
                wfDeprecated( __METHOD__, '1.21' );
 
index cfd7413..83883b5 100644 (file)
@@ -213,14 +213,14 @@ class LinksUpdate extends SqlDataUpdate {
                $existing = $this->getExistingImages();
                $imageUpdates = array_diff_key( $existing, $this->mImages ) + array_diff_key( $this->mImages, $existing );
 
-               $this->dumbTableUpdate( 'pagelinks',     $this->getLinkInsertions(),     'pl_from' );
-               $this->dumbTableUpdate( 'imagelinks',    $this->getImageInsertions(),    'il_from' );
+               $this->dumbTableUpdate( 'pagelinks', $this->getLinkInsertions(), 'pl_from' );
+               $this->dumbTableUpdate( 'imagelinks', $this->getImageInsertions(), 'il_from' );
                $this->dumbTableUpdate( 'categorylinks', $this->getCategoryInsertions(), 'cl_from' );
                $this->dumbTableUpdate( 'templatelinks', $this->getTemplateInsertions(), 'tl_from' );
                $this->dumbTableUpdate( 'externallinks', $this->getExternalInsertions(), 'el_from' );
-               $this->dumbTableUpdate( 'langlinks',     $this->getInterlangInsertions(),'ll_from' );
-               $this->dumbTableUpdate( 'iwlinks',       $this->getInterwikiInsertions(),'iwl_from' );
-               $this->dumbTableUpdate( 'page_props',    $this->getPropertyInsertions(), 'pp_page' );
+               $this->dumbTableUpdate( 'langlinks', $this->getInterlangInsertions(), 'll_from' );
+               $this->dumbTableUpdate( 'iwlinks', $this->getInterwikiInsertions(), 'iwl_from' );
+               $this->dumbTableUpdate( 'page_props', $this->getPropertyInsertions(), 'pp_page' );
 
                # Update the cache of all the category pages and image description
                # pages which were changed, and fix the category table count
@@ -291,7 +291,7 @@ class LinksUpdate extends SqlDataUpdate {
                $this->mDb->delete( $table, array( $fromField => $this->mId ), __METHOD__ );
                if ( count( $insertions ) ) {
                        # The link array was constructed without FOR UPDATE, so there may
-                       # be collisions.  This may cause minor link table inconsistencies,
+                       # be collisions. This may cause minor link table inconsistencies,
                        # which is better than crippling the site with lock contention.
                        $this->mDb->insert( $table, $insertions, __METHOD__, array( 'IGNORE' ) );
                }
@@ -360,9 +360,9 @@ class LinksUpdate extends SqlDataUpdate {
                                : $dbkeys;
                        foreach ( $diffs as $dbk => $id ) {
                                $arr[] = array(
-                                       'pl_from'      => $this->mId,
+                                       'pl_from' => $this->mId,
                                        'pl_namespace' => $ns,
-                                       'pl_title'     => $dbk
+                                       'pl_title' => $dbk
                                );
                        }
                }
@@ -380,9 +380,9 @@ class LinksUpdate extends SqlDataUpdate {
                        $diffs = isset( $existing[$ns] ) ? array_diff_key( $dbkeys, $existing[$ns] ) : $dbkeys;
                        foreach ( $diffs as $dbk => $id ) {
                                $arr[] = array(
-                                       'tl_from'      => $this->mId,
+                                       'tl_from' => $this->mId,
                                        'tl_namespace' => $ns,
-                                       'tl_title'     => $dbk
+                                       'tl_title' => $dbk
                                );
                        }
                }
@@ -401,7 +401,7 @@ class LinksUpdate extends SqlDataUpdate {
                foreach( $diffs as $iname => $dummy ) {
                        $arr[] = array(
                                'il_from' => $this->mId,
-                               'il_to'   => $iname
+                               'il_to' => $iname
                        );
                }
                return $arr;
@@ -418,9 +418,9 @@ class LinksUpdate extends SqlDataUpdate {
                foreach( $diffs as $url => $dummy ) {
                        foreach( wfMakeUrlIndexes( $url ) as $index ) {
                                $arr[] = array(
-                                       'el_from'   => $this->mId,
-                                       'el_to'     => $url,
-                                       'el_index'  => $index,
+                                       'el_from' => $this->mId,
+                                       'el_to' => $url,
+                                       'el_index' => $index,
                                );
                        }
                }
@@ -459,8 +459,8 @@ class LinksUpdate extends SqlDataUpdate {
                                $this->mTitle->getCategorySortkey( $prefix ) );
 
                        $arr[] = array(
-                               'cl_from'    => $this->mId,
-                               'cl_to'      => $name,
+                               'cl_from' => $this->mId,
+                               'cl_to' => $name,
                                'cl_sortkey' => $sortkey,
                                'cl_timestamp' => $this->mDb->timestamp(),
                                'cl_sortkey_prefix' => $prefix,
@@ -483,8 +483,8 @@ class LinksUpdate extends SqlDataUpdate {
                $arr = array();
                foreach( $diffs as $lang => $title ) {
                        $arr[] = array(
-                               'll_from'  => $this->mId,
-                               'll_lang'  => $lang,
+                               'll_from' => $this->mId,
+                               'll_lang' => $lang,
                                'll_title' => $title
                        );
                }
@@ -501,9 +501,9 @@ class LinksUpdate extends SqlDataUpdate {
                $arr = array();
                foreach ( $diffs as $name => $value ) {
                        $arr[] = array(
-                               'pp_page'      => $this->mId,
-                               'pp_propname'  => $name,
-                               'pp_value'     => $value,
+                               'pp_page' => $this->mId,
+                               'pp_propname' => $name,
+                               'pp_value' => $value,
                        );
                }
                return $arr;
@@ -521,9 +521,9 @@ class LinksUpdate extends SqlDataUpdate {
                        $diffs = isset( $existing[$prefix] ) ? array_diff_key( $dbkeys, $existing[$prefix] ) : $dbkeys;
                        foreach ( $diffs as $dbk => $id ) {
                                $arr[] = array(
-                                       'iwl_from'   => $this->mId,
+                                       'iwl_from' => $this->mId,
                                        'iwl_prefix' => $prefix,
-                                       'iwl_title'  => $dbk
+                                       'iwl_title' => $dbk
                                );
                        }
                }
index d1f6a0f..257a46d 100644 (file)
@@ -217,7 +217,7 @@ class MagicWord {
 
        /**#@-*/
 
-       function __construct($id = 0, $syn = array(), $cs = false) {
+       function __construct( $id = 0, $syn = array(), $cs = false ) {
                $this->mId = $id;
                $this->mSynonyms = (array)$syn;
                $this->mCaseSensitive = $cs;
@@ -367,7 +367,7 @@ class MagicWord {
         * @return string
         */
        function getRegex() {
-               if ($this->mRegex == '' ) {
+               if ( $this->mRegex == '' ) {
                        $this->initRegex();
                }
                return $this->mRegex;
@@ -393,7 +393,7 @@ class MagicWord {
         * @return string
         */
        function getRegexStart() {
-               if ($this->mRegex == '' ) {
+               if ( $this->mRegex == '' ) {
                        $this->initRegex();
                }
                return $this->mRegexStart;
@@ -405,7 +405,7 @@ class MagicWord {
         * @return string
         */
        function getBaseRegex() {
-               if ($this->mRegex == '') {
+               if ( $this->mRegex == '' ) {
                        $this->initRegex();
                }
                return $this->mBaseRegex;
@@ -454,9 +454,9 @@ class MagicWord {
                        # blank elements and re-sort the indices.
                        # See also bug 6526
 
-                       $matches = array_values(array_filter($matches));
+                       $matches = array_values( array_filter( $matches ) );
 
-                       if ( count($matches) == 1 ) {
+                       if ( count( $matches ) == 1 ) {
                                return $matches[0];
                        } else {
                                return $matches[1];
@@ -618,7 +618,7 @@ class MagicWord {
        function addToArray( &$array, $value ) {
                global $wgContLang;
                foreach ( $this->mSynonyms as $syn ) {
-                       $array[$wgContLang->lc($syn)] = $value;
+                       $array[$wgContLang->lc( $syn )] = $value;
                }
        }
 
@@ -812,7 +812,7 @@ class MagicWordArray {
                        return array( $magicName, $paramValue );
                }
                // This shouldn't happen either
-               throw new MWException( __METHOD__.': parameter not found' );
+               throw new MWException( __METHOD__ . ': parameter not found' );
        }
 
        /**
index 5ea0277..8d8cdee 100644 (file)
@@ -252,9 +252,9 @@ class Message {
        public static function newFallbackSequence( /*...*/ ) {
                $keys = func_get_args();
                if ( func_num_args() == 1 ) {
-                       if ( is_array($keys[0]) ) {
+                       if ( is_array( $keys[0] ) ) {
                                // Allow an array to be passed as the first argument instead
-                               $keys = array_values($keys[0]);
+                               $keys = array_values( $keys[0] );
                        } else {
                                // Optimize a single string to not need special fallback handling
                                $keys = $keys[0];
@@ -431,7 +431,7 @@ class Message {
                $string = $this->fetchMessage();
 
                if ( $string === false ) {
-                       $key =  htmlspecialchars( is_array( $this->key ) ? $this->key[0] : $this->key );
+                       $key = htmlspecialchars( is_array( $this->key ) ? $this->key[0] : $this->key );
                        if ( $this->format === 'plain' ) {
                                return '<' . $key . '>';
                        }
@@ -474,7 +474,7 @@ class Message {
 
        /**
         * Magic method implementation of the above (for PHP >= 5.2.0), so we can do, eg:
-        *     $foo = Message::get($key);
+        *     $foo = Message::get( $key );
         *     $string = "<abbr>$foo</abbr>";
         * @since 1.18
         * @return String
index 9a4ddca..0b8014a 100644 (file)
@@ -82,10 +82,10 @@ abstract class RdfMetaData {
                print "\t\t<dc:{$name}>{$value}</dc:{$name}>\n";
        }
 
-       protected function date($timestamp) {
-               return substr($timestamp, 0, 4) . '-'
-                 . substr($timestamp, 4, 2) . '-'
-                 . substr($timestamp, 6, 2);
+       protected function date( $timestamp ) {
+               return substr( $timestamp, 0, 4 ) . '-'
+                       . substr( $timestamp, 4, 2 ) . '-'
+                       . substr( $timestamp, 6, 2 );
        }
 
        protected function pageOrString( $name, $page, $str ) {
@@ -110,7 +110,7 @@ abstract class RdfMetaData {
                $this->url( $name, $title->getFullUrl() );
        }
 
-       protected function url($name, $url) {
+       protected function url( $name, $url ) {
                $url = htmlspecialchars( $url );
                print "\t\t<dc:{$name} rdf:resource=\"{$url}\" />\n";
        }
@@ -166,23 +166,23 @@ abstract class RdfMetaData {
        }
 
        protected function getKnownLicenses() {
-               $ccLicenses = array('by', 'by-nd', 'by-nd-nc', 'by-nc',
-                                                       'by-nc-sa', 'by-sa');
-               $ccVersions = array('1.0', '2.0');
+               $ccLicenses = array( 'by', 'by-nd', 'by-nd-nc', 'by-nc',
+                                                       'by-nc-sa', 'by-sa' );
+               $ccVersions = array( '1.0', '2.0' );
                $knownLicenses = array();
 
-               foreach ($ccVersions as $version) {
-                       foreach ($ccLicenses as $license) {
-                               if( $version == '2.0' && substr( $license, 0, 2) != 'by' ) {
+               foreach ( $ccVersions as $version ) {
+                       foreach ( $ccLicenses as $license ) {
+                               if( $version == '2.0' && substr( $license, 0, 2 ) != 'by' ) {
                                        # 2.0 dropped the non-attribs licenses
                                        continue;
                                }
                                $lurl = "http://creativecommons.org/licenses/{$license}/{$version}/";
-                               $knownLicenses[$lurl] = explode('-', $license);
+                               $knownLicenses[$lurl] = explode( '-', $license );
                                $knownLicenses[$lurl][] = 're';
                                $knownLicenses[$lurl][] = 'di';
                                $knownLicenses[$lurl][] = 'no';
-                               if (!in_array('nd', $knownLicenses[$lurl])) {
+                               if ( !in_array( 'nd', $knownLicenses[$lurl] ) ) {
                                        $knownLicenses[$lurl][] = 'de';
                                }
                        }
@@ -191,11 +191,11 @@ abstract class RdfMetaData {
                /* Handle the GPL and LGPL, too. */
 
                $knownLicenses['http://creativecommons.org/licenses/GPL/2.0/'] =
-                 array('de', 're', 'di', 'no', 'sa', 'sc');
+                       array( 'de', 're', 'di', 'no', 'sa', 'sc' );
                $knownLicenses['http://creativecommons.org/licenses/LGPL/2.1/'] =
-                 array('de', 're', 'di', 'no', 'sa', 'sc');
+                       array( 'de', 're', 'di', 'no', 'sa', 'sc' );
                $knownLicenses['http://www.gnu.org/copyleft/fdl.html'] =
-                 array('de', 're', 'di', 'no', 'sa', 'sc');
+                       array( 'de', 're', 'di', 'no', 'sa', 'sc' );
 
                return $knownLicenses;
        }
index b2611c2..5b88480 100644 (file)
@@ -39,7 +39,7 @@
  * appending MM_WELL_KNOWN_MIME_TYPES behind $wgMimeTypeFile, but who knows
  * what will break? In practice this probably isn't a problem anyway -- Bryan)
  */
-define('MM_WELL_KNOWN_MIME_TYPES',<<<END_STRING
+define('MM_WELL_KNOWN_MIME_TYPES', <<<END_STRING
 application/ogg ogx ogg ogm ogv oga spx
 application/pdf pdf
 application/vnd.oasis.opendocument.chart odc
@@ -197,14 +197,14 @@ class MimeMagic {
 
                if ( $wgMimeTypeFile ) {
                        if ( is_file( $wgMimeTypeFile ) and is_readable( $wgMimeTypeFile ) ) {
-                               wfDebug( __METHOD__.": loading mime types from $wgMimeTypeFile\n" );
+                               wfDebug( __METHOD__ . ": loading mime types from $wgMimeTypeFile\n" );
                                $types .= "\n";
                                $types .= file_get_contents( $wgMimeTypeFile );
                        } else {
-                               wfDebug( __METHOD__.": can't load mime types from $wgMimeTypeFile\n" );
+                               wfDebug( __METHOD__ . ": can't load mime types from $wgMimeTypeFile\n" );
                        }
                } else {
-                       wfDebug( __METHOD__.": no mime types file defined, using build-ins only.\n" );
+                       wfDebug( __METHOD__ . ": no mime types file defined, using build-ins only.\n" );
                }
 
                $types = str_replace( array( "\r\n", "\n\r", "\n\n", "\r\r", "\r" ), "\n", $types );
@@ -213,7 +213,7 @@ class MimeMagic {
                $this->mMimeToExt = array();
                $this->mToMime = array();
 
-               $lines = explode( "\n",$types );
+               $lines = explode( "\n", $types );
                foreach ( $lines as $s ) {
                        $s = trim( $s );
                        if ( empty( $s ) ) {
@@ -231,7 +231,7 @@ class MimeMagic {
                        }
 
                        $mime = substr( $s, 0, $i );
-                       $ext = trim( substr($s, $i+1 ) );
+                       $ext = trim( substr( $s, $i+1 ) );
 
                        if ( empty( $ext ) ) {
                                continue;
@@ -272,17 +272,17 @@ class MimeMagic {
 
                if ( $wgMimeInfoFile ) {
                        if ( is_file( $wgMimeInfoFile ) and is_readable( $wgMimeInfoFile ) ) {
-                               wfDebug( __METHOD__.": loading mime info from $wgMimeInfoFile\n" );
+                               wfDebug( __METHOD__ . ": loading mime info from $wgMimeInfoFile\n" );
                                $info .= "\n";
                                $info .= file_get_contents( $wgMimeInfoFile );
                        } else {
-                               wfDebug(__METHOD__.": can't load mime info from $wgMimeInfoFile\n");
+                               wfDebug( __METHOD__ . ": can't load mime info from $wgMimeInfoFile\n" );
                        }
                } else {
-                       wfDebug(__METHOD__.": no mime info file defined, using build-ins only.\n");
+                       wfDebug( __METHOD__ . ": no mime info file defined, using build-ins only.\n" );
                }
 
-               $info = str_replace( array( "\r\n", "\n\r", "\n\n", "\r\r", "\r" ), "\n", $info);
+               $info = str_replace( array( "\r\n", "\n\r", "\n\n", "\r\r", "\r" ), "\n", $info );
                $info = str_replace( "\t", " ", $info );
 
                $this->mMimeTypeAliases = array();
@@ -332,7 +332,7 @@ class MimeMagic {
 
                        if ( count( $m ) > 1 ) {
                                $main = $m[0];
-                               for ( $i=1; $i<count($m); $i += 1 ) {
+                               for ( $i = 1; $i < count( $m ); $i += 1 ) {
                                        $mime = $m[$i];
                                        $this->mMimeTypeAliases[$mime] = $main;
                                }
@@ -511,7 +511,7 @@ class MimeMagic {
        public function improveTypeFromExtension( $mime, $ext ) {
                if ( $mime === 'unknown/unknown' ) {
                        if ( $this->isRecognizableExtension( $ext ) ) {
-                               wfDebug( __METHOD__. ': refusing to guess mime type for .' .
+                               wfDebug( __METHOD__ . ': refusing to guess mime type for .' .
                                        "$ext file, we should have recognized it\n" );
                        } else {
                                // Not something we can detect, so simply
@@ -525,7 +525,7 @@ class MimeMagic {
                                // find the proper mime type for that file extension
                                $mime = $this->guessTypesForExtension( $ext );
                        } else {
-                               wfDebug( __METHOD__. ": refusing to guess better type for $mime file, " .
+                               wfDebug( __METHOD__ . ": refusing to guess better type for $mime file, " .
                                        ".$ext is not a known OPC extension.\n" );
                                $mime = 'application/zip';
                        }
@@ -535,7 +535,7 @@ class MimeMagic {
                        $mime = $this->mMimeTypeAliases[$mime];
                }
 
-               wfDebug(__METHOD__.": improved mime type for .$ext: $mime\n");
+               wfDebug( __METHOD__ . ": improved mime type for .$ext: $mime\n" );
                return $mime;
        }
 
@@ -555,14 +555,14 @@ class MimeMagic {
         */
        public function guessMimeType( $file, $ext = true ) {
                if ( $ext ) { // TODO: make $ext default to false. Or better, remove it.
-                       wfDebug( __METHOD__.": WARNING: use of the \$ext parameter is deprecated. " .
+                       wfDebug( __METHOD__ . ": WARNING: use of the \$ext parameter is deprecated. " .
                                "Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
                }
 
                $mime = $this->doGuessMimeType( $file, $ext );
 
                if( !$mime ) {
-                       wfDebug( __METHOD__.": internal type detection failed for $file (.$ext)...\n" );
+                       wfDebug( __METHOD__ . ": internal type detection failed for $file (.$ext)...\n" );
                        $mime = $this->detectMimeType( $file, $ext );
                }
 
@@ -570,7 +570,7 @@ class MimeMagic {
                        $mime = $this->mMimeTypeAliases[$mime];
                }
 
-               wfDebug(__METHOD__.": guessed mime type of $file: $mime\n");
+               wfDebug( __METHOD__ . ": guessed mime type of $file: $mime\n" );
                return $mime;
        }
 
@@ -629,7 +629,7 @@ class MimeMagic {
                        $doctype = strpos( $head, "\x42\x82" );
                        if ( $doctype ) {
                                // Next byte is datasize, then data (sizes larger than 1 byte are very stupid muxers)
-                               $data = substr($head, $doctype+3, 8);
+                               $data = substr( $head, $doctype+3, 8 );
                                if ( strncmp( $data, "matroska", 8 ) == 0 ) {
                                        wfDebug( __METHOD__ . ": recognized file as video/x-matroska\n" );
                                        return "video/x-matroska";
@@ -661,12 +661,11 @@ class MimeMagic {
                 * strings like "<? ", but should it be axed completely?
                 */
                if ( ( strpos( $head, '<?php' ) !== false ) ||
-
-                   ( strpos( $head, "<\x00?\x00p\x00h\x00p" ) !== false ) ||
-                   ( strpos( $head, "<\x00?\x00 " ) !== false ) ||
-                   ( strpos( $head, "<\x00?\x00\n" ) !== false ) ||
-                   ( strpos( $head, "<\x00?\x00\t" ) !== false ) ||
-                   ( strpos( $head, "<\x00?\x00=" ) !== false ) ) {
+                       ( strpos( $head, "<\x00?\x00p\x00h\x00p" ) !== false ) ||
+                       ( strpos( $head, "<\x00?\x00 " ) !== false ) ||
+                       ( strpos( $head, "<\x00?\x00\n" ) !== false ) ||
+                       ( strpos( $head, "<\x00?\x00\t" ) !== false ) ||
+                       ( strpos( $head, "<\x00?\x00=" ) !== false ) ) {
 
                        wfDebug( __METHOD__ . ": recognized $file as application/x-php\n" );
                        return 'application/x-php';
@@ -698,7 +697,7 @@ class MimeMagic {
                } elseif ( substr( $head, 0, 7) == "\xfe\xff\x00#\x00!" ) {
                        $script_type = "UTF-16BE";
                } elseif ( substr( $head, 0, 7 ) == "\xff\xfe#\x00!" ) {
-                       $script_type= "UTF-16LE";
+                       $script_type = "UTF-16LE";
                }
 
                if ( $script_type ) {
@@ -720,14 +719,14 @@ class MimeMagic {
 
                        if ( preg_match( '%/?([^\s]+/)(\w+)%', $head, $match ) ) {
                                $mime = "application/x-{$match[2]}";
-                               wfDebug( __METHOD__.": shell script recognized as $mime\n" );
+                               wfDebug( __METHOD__ . ": shell script recognized as $mime\n" );
                                return $mime;
                        }
                }
 
                // Check for ZIP variants (before getimagesize)
                if ( strpos( $tail, "PK\x05\x06" ) !== false ) {
-                       wfDebug( __METHOD__.": ZIP header present in $file\n" );
+                       wfDebug( __METHOD__ . ": ZIP header present in $file\n" );
                        return $this->detectZipType( $head, $tail, $ext );
                }
 
@@ -737,14 +736,14 @@ class MimeMagic {
 
                if( $gis && isset( $gis['mime'] ) ) {
                        $mime = $gis['mime'];
-                       wfDebug( __METHOD__.": getimagesize detected $file as $mime\n" );
+                       wfDebug( __METHOD__ . ": getimagesize detected $file as $mime\n" );
                        return $mime;
                }
 
                // Also test DjVu
                $deja = new DjVuImage( $file );
                if( $deja->isValid() ) {
-                       wfDebug( __METHOD__.": detected $file as image/vnd.djvu\n" );
+                       wfDebug( __METHOD__ . ": detected $file as image/vnd.djvu\n" );
                        return 'image/vnd.djvu';
                }
 
@@ -766,7 +765,7 @@ class MimeMagic {
         */
        function detectZipType( $header, $tail = null, $ext = false ) {
                if( $ext ) { # TODO: remove $ext param
-                       wfDebug( __METHOD__.": WARNING: use of the \$ext parameter is deprecated. " .
+                       wfDebug( __METHOD__ . ": WARNING: use of the \$ext parameter is deprecated. " .
                                "Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
                }
 
@@ -797,7 +796,7 @@ class MimeMagic {
 
                if ( preg_match( $opendocRegex, substr( $header, 30 ), $matches ) ) {
                        $mime = $matches[1];
-                       wfDebug( __METHOD__.": detected $mime from ZIP archive\n" );
+                       wfDebug( __METHOD__ . ": detected $mime from ZIP archive\n" );
                } elseif ( preg_match( $openxmlRegex, substr( $header, 30 ) ) ) {
                        $mime = "application/x-opc+zip";
                        # TODO: remove the block below, as soon as improveTypeFromExtension is used everywhere
@@ -814,7 +813,7 @@ class MimeMagic {
                                        $mime = "application/zip";
                                }
                        }
-                       wfDebug( __METHOD__.": detected an Open Packaging Conventions archive: $mime\n" );
+                       wfDebug( __METHOD__ . ": detected an Open Packaging Conventions archive: $mime\n" );
                } elseif ( substr( $header, 0, 8 ) == "\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" &&
                                ($headerpos = strpos( $tail, "PK\x03\x04" ) ) !== false &&
                                preg_match( $openxmlRegex, substr( $tail, $headerpos + 30 ) ) ) {
@@ -843,9 +842,9 @@ class MimeMagic {
                                        break;
                        }
 
-                       wfDebug( __METHOD__.": detected a MS Office document with OPC trailer\n");
+                       wfDebug( __METHOD__ . ": detected a MS Office document with OPC trailer\n" );
                } else {
-                       wfDebug( __METHOD__.": unable to identify type of ZIP archive\n" );
+                       wfDebug( __METHOD__ . ": unable to identify type of ZIP archive\n" );
                }
                return $mime;
        }
@@ -872,7 +871,7 @@ class MimeMagic {
                global $wgMimeDetectorCommand;
 
                if ( $ext ) { # TODO:  make $ext default to false. Or better, remove it.
-                       wfDebug( __METHOD__.": WARNING: use of the \$ext parameter is deprecated. Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
+                       wfDebug( __METHOD__ . ": WARNING: use of the \$ext parameter is deprecated. Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
                }
 
                $m = null;
@@ -898,7 +897,7 @@ class MimeMagic {
                                $m = finfo_file( $mime_magic_resource, $file );
                                finfo_close( $mime_magic_resource );
                        } else {
-                               wfDebug( __METHOD__.": finfo_open failed on ".FILEINFO_MIME."!\n" );
+                               wfDebug( __METHOD__ . ": finfo_open failed on ".FILEINFO_MIME."!\n" );
                        }
                } elseif ( function_exists( "mime_content_type" ) ) {
 
@@ -911,9 +910,9 @@ class MimeMagic {
                        # Also note that this has been DEPRECATED in favor of the fileinfo extension by PECL, see above.
                        # see http://www.php.net/manual/en/ref.mime-magic.php for details.
 
-                       $m = mime_content_type($file);
+                       $m = mime_content_type( $file );
                } else {
-                       wfDebug( __METHOD__.": no magic mime detector found!\n" );
+                       wfDebug( __METHOD__ . ": no magic mime detector found!\n" );
                }
 
                if ( $m ) {
@@ -925,7 +924,7 @@ class MimeMagic {
                        if ( strpos( $m, 'unknown' ) !== false ) {
                                $m = null;
                        } else {
-                               wfDebug( __METHOD__.": magic mime type of $file: $m\n" );
+                               wfDebug( __METHOD__ . ": magic mime type of $file: $m\n" );
                                return $m;
                        }
                }
@@ -937,11 +936,11 @@ class MimeMagic {
                }
                if ( $ext ) {
                        if( $this->isRecognizableExtension( $ext ) ) {
-                               wfDebug( __METHOD__. ": refusing to guess mime type for .$ext file, we should have recognized it\n" );
+                               wfDebug( __METHOD__ . ": refusing to guess mime type for .$ext file, we should have recognized it\n" );
                        } else {
                                $m = $this->guessTypesForExtension( $ext );
                                if ( $m ) {
-                                       wfDebug( __METHOD__.": extension mime type of $file: $m\n" );
+                                       wfDebug( __METHOD__ . ": extension mime type of $file: $m\n" );
                                        return $m;
                                }
                        }
@@ -1066,7 +1065,7 @@ class MimeMagic {
 
                foreach ( $m as $mime ) {
                        foreach ( $this->mMediaTypes as $type => $codes ) {
-                               if ( in_array($mime, $codes, true ) ) {
+                               if ( in_array( $mime, $codes, true ) ) {
                                        return $type;
                                }
                        }
index 46af002..e35bf07 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 ) || $index == NS_CATEGORY );
 
                /**
                 * @since 1.20
@@ -290,9 +290,9 @@ class MWNamespace {
         * @param $index Int: namespace index
         * @return bool
         */
-        public static function canTalk( $index ) {
+       public static function canTalk( $index ) {
                return $index >= NS_MAIN;
-        }
+       }
 
        /**
         * Does this namespace contain content, for the purposes of calculating
index 968acf6..89d7c0b 100644 (file)
@@ -1275,7 +1275,7 @@ class OutputPage extends ContextSource {
         * @param  $level Int ResourceLoaderModule class constant
         */
        public function reduceAllowedModules( $type, $level ) {
-               $this->mAllowedModules[$type] = min( $this->getAllowedModules($type), $level );
+               $this->mAllowedModules[$type] = min( $this->getAllowedModules( $type ), $level );
        }
 
        /**
@@ -1873,7 +1873,7 @@ class OutputPage extends ContextSource {
                                        wfDebug( __METHOD__ . ": proxy caching with ESI; {$this->mLastModified} **\n", false );
                                        # 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
@@ -1883,7 +1883,7 @@ class OutputPage extends ContextSource {
                                        wfDebug( __METHOD__ . ": local proxy caching; {$this->mLastModified} **\n", false );
                                        # 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
@@ -1892,7 +1892,7 @@ class OutputPage extends ContextSource {
                                $response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' );
                                $response->header( "Cache-Control: private, must-revalidate, max-age=0" );
                        }
-                       if($this->mLastModified) {
+                       if( $this->mLastModified ) {
                                $response->header( "Last-Modified: {$this->mLastModified}" );
                        }
                } else {
@@ -2272,7 +2272,7 @@ class OutputPage extends ContextSource {
 
                        $pageLang = $this->getTitle()->getPageLanguage();
                        $params = array(
-                               'id'   => 'wpTextbox1',
+                               'id' => 'wpTextbox1',
                                'name' => 'wpTextbox1',
                                'cols' => $this->getUser()->getOption( 'cols' ),
                                'rows' => $this->getUser()->getOption( 'rows' ),
@@ -3066,7 +3066,7 @@ $templates
                                        'http-equiv' => 'Content-Type',
                                        'content' => "$wgMimeType; charset=UTF-8"
                                ) );
-                               $tags['meta-content-style-type'] = Html::element( 'meta', array(  // bug 15835
+                               $tags['meta-content-style-type'] = Html::element( 'meta', array( // bug 15835
                                        'http-equiv' => 'Content-Style-Type',
                                        'content' => 'text/css'
                                ) );
@@ -3095,7 +3095,7 @@ $templates
                        );
                        $tags['meta-keywords'] = Html::element( 'meta', array(
                                'name' => 'keywords',
-                               'content' =>  preg_replace(
+                               'content' => preg_replace(
                                        array_keys( $strip ),
                                        array_values( $strip ),
                                        implode( ',', $this->mKeywords )
@@ -3629,7 +3629,7 @@ $templates
                                                '1.20'
                                        );
                                }
-                       }  else {
+                       } else {
                                $args = array();
                                $name = $spec;
                        }
index 856b1b8..9e937e4 100644 (file)
@@ -866,7 +866,7 @@ abstract class ReverseChronologicalPager extends IndexPager {
                if ( $this->mMonth ) {
                        $month = $this->mMonth + 1;
                        // For December, we want January 1 of the next year
-                       if ($month > 12) {
+                       if ( $month > 12 ) {
                                $month = 1;
                                $year++;
                        }
index 2dbc7ec..3be504a 100644 (file)
@@ -293,7 +293,7 @@ class PathRouter {
                        foreach ( $m as $matchKey => $matchValue ) {
                                if ( preg_match( '/^par\d+$/u', $matchKey ) ) {
                                        $n = intval( substr( $matchKey, 3 ) );
-                                       $data['$'.$n] = rawurldecode( $matchValue );
+                                       $data['$' . $n] = rawurldecode( $matchValue );
                                }
                        }
                        // If present give our $data array a $key as well
index c15c5b5..1e4f85f 100644 (file)
@@ -891,7 +891,7 @@ class Preferences {
                        'max' => $watchlistdaysMax,
                        'section' => 'watchlist/displaywatchlist',
                        'help' => $context->msg( 'prefs-watchlist-days-max' )->numParams(
-                                                $watchlistdaysMax )->text(),
+                               $watchlistdaysMax )->text(),
                        'label-message' => 'prefs-watchlist-days',
                );
                $defaultPreferences['wllimit'] = array(
index 5d4b35c..7df6a50 100644 (file)
@@ -45,7 +45,7 @@ class PrefixSearch {
                // Find a Title which is not an interwiki and is in NS_MAIN
                $title = Title::newFromText( $search );
                if( $title && $title->getInterwiki() == '' ) {
-                       $ns = array($title->getNamespace());
+                       $ns = array( $title->getNamespace() );
                        if( $ns[0] == NS_MAIN ) {
                                $ns = $namespaces; // no explicit prefix, use default namespaces
                        }
index fe871b9..17e4372 100644 (file)
@@ -139,7 +139,7 @@ class ProtectionForm {
                                        if( !$wgUser->isAllowedAny( 'protect', 'editprotected' ) )
                                                continue;
                                } else {
-                                       if( !$wgUser->isAllowed($val) )
+                                       if( !$wgUser->isAllowed( $val ) )
                                                continue;
                                }
                                $this->mRestrictions[$action] = $val;
@@ -228,14 +228,14 @@ class ProtectionForm {
                }
 
                list( $cascadeSources, /* $restrictions */ ) = $this->mTitle->getCascadeProtectionSources();
-               if ( $cascadeSources && count($cascadeSources) > 0 ) {
+               if ( $cascadeSources && count( $cascadeSources ) > 0 ) {
                        $titles = '';
 
                        foreach ( $cascadeSources as $title ) {
                                $titles .= '* [[:' . $title->getPrefixedText() . "]]\n";
                        }
 
-                       $wgOut->wrapWikiMsg( "<div id=\"mw-protect-cascadeon\">\n$1\n" . $titles . "</div>", array( 'protect-cascadeon', count($cascadeSources) ) );
+                       $wgOut->wrapWikiMsg( "<div id=\"mw-protect-cascadeon\">\n$1\n" . $titles . "</div>", array( 'protect-cascadeon', count( $cascadeSources ) ) );
                }
 
                # Show an appropriate message if the user isn't allowed or able to change
@@ -284,7 +284,7 @@ class ProtectionForm {
                $expiry = array();
                foreach( $this->mApplicableTypes as $action ) {
                        $expiry[$action] = $this->getExpiry( $action );
-                       if( empty($this->mRestrictions[$action]) )
+                       if( empty( $this->mRestrictions[$action] ) )
                                continue; // unprotected
                        if ( !$expiry[$action] ) {
                                $this->show( array( 'protect_expiry_invalid' ) );
@@ -300,7 +300,7 @@ class ProtectionForm {
                #  to a semi-protected page.
                $edit_restriction = isset( $this->mRestrictions['edit'] ) ? $this->mRestrictions['edit'] : '';
                $this->mCascade = $wgRequest->getBool( 'mwProtect-cascade' );
-               if ($this->mCascade && ($edit_restriction != 'protect') &&
+               if ( $this->mCascade && ($edit_restriction != 'protect') &&
                        !User::groupHasPermission( $edit_restriction, 'protect' ) )
                        $this->mCascade = false;
 
@@ -412,14 +412,14 @@ class ProtectionForm {
                                wfMessage( 'protect-othertime-op' )->text(),
                                "othertime"
                        ) . "\n";
-                       foreach( explode(',', $scExpiryOptions) as $option ) {
-                               if ( strpos($option, ":") === false ) {
+                       foreach( explode( ',', $scExpiryOptions ) as $option ) {
+                               if ( strpos( $option, ":" ) === false ) {
                                        $show = $value = $option;
                                } else {
-                                       list($show, $value) = explode(":", $option);
+                                       list( $show, $value ) = explode( ":", $option );
                                }
-                               $show = htmlspecialchars($show);
-                               $value = htmlspecialchars($value);
+                               $show = htmlspecialchars( $show );
+                               $value = htmlspecialchars( $value );
                                $expiryFormOptions .= Xml::option( $show, $value, $this->mExpirySelection[$action] === $value ) . "\n";
                        }
                        # Add expiry dropdown
@@ -458,7 +458,7 @@ class ProtectionForm {
                        "</td></tr>";
                }
                # Give extensions a chance to add items to the form
-               wfRunHooks( 'ProtectionForm::buildForm', array($this->mArticle,&$out) );
+               wfRunHooks( 'ProtectionForm::buildForm', array( $this->mArticle, &$out ) );
 
                $out .= Xml::closeElement( 'tbody' ) . Xml::closeElement( 'table' );
 
@@ -569,7 +569,7 @@ class ProtectionForm {
                                if( !$wgUser->isAllowedAny( 'protect', 'editprotected' ) && !$this->disabled )
                                        continue;
                        } else {
-                               if( !$wgUser->isAllowed($key) && !$this->disabled )
+                               if( !$wgUser->isAllowed( $key ) && !$this->disabled )
                                        continue;
                        }
                        $levels[] = $key;
@@ -644,6 +644,6 @@ class ProtectionForm {
                $out->addHTML( Xml::element( 'h2', null, $protectLogPage->getName()->text() ) );
                LogEventsList::showLogExtract( $out, 'protect', $this->mTitle );
                # Let extensions add other relevant log extracts
-               wfRunHooks( 'ProtectionForm::showLogExtract', array($this->mArticle,$out) );
+               wfRunHooks( 'ProtectionForm::showLogExtract', array( $this->mArticle, $out ) );
        }
 }
index 349789f..1a147b1 100644 (file)
@@ -109,7 +109,7 @@ function wfProxyCheck() {
        if ( !$skip ) {
                $title = SpecialPage::getTitleFor( 'Blockme' );
                $iphash = md5( $ip . $wgProxyKey );
-               $url = wfExpandUrl( $title->getFullURL( 'ip='.$iphash ), PROTO_HTTP );
+               $url = wfExpandUrl( $title->getFullURL( 'ip=' . $iphash ), PROTO_HTTP );
 
                foreach ( $wgProxyPorts as $port ) {
                        $params = implode( ' ', array(
index 56df21e..0470426 100644 (file)
@@ -800,7 +800,7 @@ class RecentChange {
                # see http://www.irssi.org/documentation/formats for some colour codes. prefix is \003,
                # no colour (\003) switches back to the term default
                $fullString = "$titleString\0034 $flag\00310 " .
-                                         "\00302$url\003 \0035*\003 \00303$user\003 \0035*\003 $szdiff \00310$comment\003\n";
+                       "\00302$url\003 \0035*\003 \00303$user\003 \0035*\003 $szdiff \00310$comment\003\n";
 
                return $fullString;
        }
index 5f62e4d..4bdce87 100644 (file)
@@ -254,9 +254,11 @@ class Revision implements IDBAccessObject {
                        $matchId = 'page_latest';
                }
                return self::loadFromConds( $db,
-                       array( "rev_id=$matchId",
-                                  'page_namespace' => $title->getNamespace(),
-                                  'page_title'     => $title->getDBkey() )
+                       array(
+                               "rev_id=$matchId",
+                               'page_namespace' => $title->getNamespace(),
+                               'page_title'     => $title->getDBkey()
+                       )
                );
        }
 
@@ -272,9 +274,11 @@ class Revision implements IDBAccessObject {
         */
        public static function loadFromTimestamp( $db, $title, $timestamp ) {
                return self::loadFromConds( $db,
-                       array( 'rev_timestamp'  => $db->timestamp( $timestamp ),
-                                  'page_namespace' => $title->getNamespace(),
-                                  'page_title'     => $title->getDBkey() )
+                       array(
+                               'rev_timestamp'  => $db->timestamp( $timestamp ),
+                               'page_namespace' => $title->getNamespace(),
+                               'page_title'     => $title->getDBkey()
+                       )
                );
        }
 
@@ -330,9 +334,11 @@ class Revision implements IDBAccessObject {
        public static function fetchRevision( $title ) {
                return self::fetchFromConds(
                        wfGetDB( DB_SLAVE ),
-                       array( 'rev_id=page_latest',
-                                  'page_namespace' => $title->getNamespace(),
-                                  'page_title'     => $title->getDBkey() )
+                       array(
+                               'rev_id=page_latest',
+                               'page_namespace' => $title->getNamespace(),
+                               'page_title'     => $title->getDBkey()
+                       )
                );
        }
 
@@ -496,7 +502,7 @@ class Revision implements IDBAccessObject {
                        if ( !isset( $row->rev_parent_id ) ) {
                                $this->mParentId = null;
                        } else {
-                               $this->mParentId  = intval( $row->rev_parent_id );
+                               $this->mParentId = intval( $row->rev_parent_id );
                        }
 
                        if ( !isset( $row->rev_len ) ) {
@@ -532,7 +538,7 @@ class Revision implements IDBAccessObject {
                        }
 
                        // Lazy extraction...
-                       $this->mText      = null;
+                       $this->mText = null;
                        if( isset( $row->old_text ) ) {
                                $this->mTextRow = $row;
                        } else {
@@ -557,8 +563,8 @@ class Revision implements IDBAccessObject {
                        if ( !empty( $row['content'] ) ) {
                                //@todo: when is that set? test with external store setup! check out insertOn() [dk]
                                if ( !empty( $row['text_id'] ) ) {
-                                       throw new MWException( "Text already stored in external store (id {$row['text_id']}), "
-                                                                                       . "can't serialize content object" );
+                                       throw new MWException( "Text already stored in external store (id {$row['text_id']}), " .
+                                               "can't serialize content object" );
                                }
 
                                $row['content_model'] = $row['content']->getModel();
@@ -615,12 +621,12 @@ class Revision implements IDBAccessObject {
                                } elseif ( $this->mTitle->getArticleID() !== $this->mPage ) {
                                        // Got different page IDs. This may be legit (e.g. during undeletion),
                                        // but it seems worth mentioning it in the log.
-                                       wfDebug( "Page ID " . $this->mPage . " mismatches the ID "
-                                                       . $this->mTitle->getArticleID() . " provided by the Title object." );
+                                       wfDebug( "Page ID " . $this->mPage . " mismatches the ID " .
+                                               $this->mTitle->getArticleID() . " provided by the Title object." );
                                }
                        }
 
-                       $this->mCurrent   = false;
+                       $this->mCurrent = false;
 
                        // If we still have no length, see it we have the text to figure it out
                        if ( !$this->mSize ) {
@@ -718,7 +724,7 @@ class Revision implements IDBAccessObject {
                                array( 'page', 'revision' ),
                                self::selectPageFields(),
                                array( 'page_id=rev_page',
-                                          'rev_id' => $this->mId ),
+                                       'rev_id' => $this->mId ),
                                __METHOD__ );
                        if ( $row ) {
                                $this->mTitle = Title::newFromRow( $row );
index 9cac308..cf6c106 100644 (file)
@@ -381,7 +381,7 @@ class Sanitizer {
                                'h2', 'h3', 'h4', 'h5', 'h6', 'cite', 'code', 'em', 's',
                                'strike', 'strong', 'tt', 'var', 'div', 'center',
                                'blockquote', 'ol', 'ul', 'dl', 'table', 'caption', 'pre',
-                               'ruby', 'rt' , 'rb' , 'rp', 'p', 'span', 'abbr', 'dfn',
+                               'ruby', 'rt', 'rb', 'rp', 'p', 'span', 'abbr', 'dfn',
                                'kbd', 'samp'
                        );
                        if ( $wgHtml5 ) {
@@ -604,9 +604,9 @@ class Sanitizer {
         */
        static function removeHTMLcomments( $text ) {
                wfProfileIn( __METHOD__ );
-               while (($start = strpos($text, '<!--')) !== false) {
-                       $end = strpos($text, '-->', $start + 4);
-                       if ($end === false) {
+               while ( ($start = strpos( $text, '<!--' ) ) !== false ) {
+                       $end = strpos( $text, '-->', $start + 4 );
+                       if ( $end === false ) {
                                # Unterminated comment; bail out
                                break;
                        }
@@ -615,22 +615,22 @@ class Sanitizer {
 
                        # Trim space and newline if the comment is both
                        # preceded and followed by a newline
-                       $spaceStart = max($start - 1, 0);
+                       $spaceStart = max( $start - 1, 0 );
                        $spaceLen = $end - $spaceStart;
-                       while (substr($text, $spaceStart, 1) === ' ' && $spaceStart > 0) {
+                       while ( substr( $text, $spaceStart, 1 ) === ' ' && $spaceStart > 0 ) {
                                $spaceStart--;
                                $spaceLen++;
                        }
-                       while (substr($text, $spaceStart + $spaceLen, 1) === ' ')
+                       while ( substr( $text, $spaceStart + $spaceLen, 1 ) === ' ' )
                                $spaceLen++;
-                       if (substr($text, $spaceStart, 1) === "\n" and substr($text, $spaceStart + $spaceLen, 1) === "\n") {
+                       if ( substr( $text, $spaceStart, 1 ) === "\n" and substr( $text, $spaceStart + $spaceLen, 1 ) === "\n" ) {
                                # Remove the comment, leading and trailing
                                # spaces, and leave only one newline.
-                               $text = substr_replace($text, "\n", $spaceStart, $spaceLen + 1);
+                               $text = substr_replace( $text, "\n", $spaceStart, $spaceLen + 1 );
                        }
                        else {
                                # Remove just the comment.
-                               $text = substr_replace($text, '', $start, $end - $start);
+                               $text = substr_replace( $text, '', $start, $end - $start );
                        }
                }
                wfProfileOut( __METHOD__ );
index 53739fb..273d75b 100644 (file)
@@ -56,13 +56,13 @@ if ( $wgArticlePath === false ) {
        }
 }
 
-if ( !empty($wgActionPaths) && !isset($wgActionPaths['view']) ) {
+if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) {
        # 'view' is assumed the default action path everywhere in the code
        # but is rarely filled in $wgActionPaths
        $wgActionPaths['view'] = $wgArticlePath;
 }
 
-if ( !empty($wgActionPaths) && !isset($wgActionPaths['view']) ) {
+if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) {
        # 'view' is assumed the default action path everywhere in the code
        # but is rarely filled in $wgActionPaths
        $wgActionPaths['view'] = $wgArticlePath ;
@@ -353,9 +353,9 @@ if ( $wgAjaxUploadDestCheck ) {
 
 if ( $wgNewUserLog ) {
        # Add a new log type
-       $wgLogTypes[]                        = 'newusers';
-       $wgLogNames['newusers']              = 'newuserlogpage';
-       $wgLogHeaders['newusers']            = 'newuserlogpagetext';
+       $wgLogTypes[] = 'newusers';
+       $wgLogNames['newusers'] = 'newuserlogpage';
+       $wgLogHeaders['newusers'] = 'newuserlogpagetext';
        $wgLogActionsHandlers['newusers/newusers'] = 'NewUsersLogFormatter';
        $wgLogActionsHandlers['newusers/create'] = 'NewUsersLogFormatter';
        $wgLogActionsHandlers['newusers/create2'] = 'NewUsersLogFormatter';
index 4bbe9e1..7e96d45 100644 (file)
@@ -83,7 +83,7 @@
  * $conf->settings = array(
  *     'wgMergeSetting' = array(
  *             # Value that will be shared among all wikis:
- *             'default' => array(  NS_USER => true ),
+ *             'default' => array( NS_USER => true ),
  *
  *             # Leading '+' means merging the array of value with the defaults
  *             '+beta' => array( NS_HELP => true ),
@@ -205,7 +205,7 @@ class SiteConfiguration {
                                                        $retval = $thisSetting[$tag];
                                                }
                                                break 2;
-                                       } elseif( array_key_exists( "+$tag", $thisSetting ) && is_array($thisSetting["+$tag"]) ) {
+                                       } elseif( array_key_exists( "+$tag", $thisSetting ) && is_array( $thisSetting["+$tag"] ) ) {
                                                if( !isset( $retval ) ) {
                                                        $retval = array();
                                                }
@@ -216,7 +216,7 @@ class SiteConfiguration {
                                $suffix = $params['suffix'];
                                if( !is_null( $suffix ) ) {
                                        if( array_key_exists( $suffix, $thisSetting ) ) {
-                                               if ( isset($retval) && is_array($retval) && is_array($thisSetting[$suffix]) ) {
+                                               if ( isset( $retval ) && is_array( $retval ) && is_array( $thisSetting[$suffix] ) ) {
                                                        $retval = self::arrayMerge( $retval, $thisSetting[$suffix] );
                                                } else {
                                                        $retval = $thisSetting[$suffix];
@@ -509,9 +509,9 @@ class SiteConfiguration {
                $out = $array1;
                for( $i = 1; $i < func_num_args(); $i++ ) {
                        foreach( func_get_arg( $i ) as $key => $value ) {
-                               if ( isset($out[$key]) && is_array($out[$key]) && is_array($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) ) {
+                               } elseif ( !isset( $out[$key] ) || !$out[$key] && !is_numeric( $key ) ) {
                                        // Values that evaluate to true given precedence, for the primary purpose of merging permissions arrays.
                                        $out[$key] = $value;
                                } elseif ( is_numeric( $key ) ) {
index 4889863..723ede4 100644 (file)
@@ -262,7 +262,7 @@ abstract class Skin extends ContextSource {
         * @return Title
         */
        public function getRelevantTitle() {
-               if ( isset($this->mRelevantTitle) ) {
+               if ( isset( $this->mRelevantTitle ) ) {
                        return $this->mRelevantTitle;
                }
                return $this->getTitle();
@@ -286,7 +286,7 @@ abstract class Skin extends ContextSource {
         * @return User
         */
        public function getRelevantUser() {
-               if ( isset($this->mRelevantUser) ) {
+               if ( isset( $this->mRelevantUser ) ) {
                        return $this->mRelevantUser;
                }
                $title = $this->getRelevantTitle();
@@ -435,7 +435,7 @@ abstract class Skin extends ContextSource {
                $colon = $this->msg( 'colon-separator' )->escaped();
 
                if ( !empty( $allCats['normal'] ) ) {
-                       $t = $embed . implode( "{$pop}{$embed}" , $allCats['normal'] ) . $pop;
+                       $t = $embed . implode( "{$pop}{$embed}", $allCats['normal'] ) . $pop;
 
                        $msg = $this->msg( 'pagecategories' )->numParams( count( $allCats['normal'] ) )->escaped();
                        $linkPage = wfMessage( 'pagecategorieslink' )->inContentLanguage()->text();
@@ -456,7 +456,7 @@ abstract class Skin extends ContextSource {
 
                        $s .= "<div id=\"mw-hidden-catlinks\" class=\"mw-hidden-catlinks$class\">" .
                                $this->msg( 'hidden-categories' )->numParams( count( $allCats['hidden'] ) )->escaped() .
-                               $colon . '<ul>' . $embed . implode( "{$pop}{$embed}" , $allCats['hidden'] ) . $pop . '</ul>' .
+                               $colon . '<ul>' . $embed . implode( "{$pop}{$embed}", $allCats['hidden'] ) . $pop . '</ul>' .
                                '</div>';
                }
 
@@ -499,7 +499,7 @@ abstract class Skin extends ContextSource {
 
                        # add our current element to the list
                        $eltitle = Title::newFromText( $element );
-                       $return .=  Linker::link( $eltitle, htmlspecialchars( $eltitle->getText() ) );
+                       $return .= Linker::link( $eltitle, htmlspecialchars( $eltitle->getText() ) );
                }
 
                return $return;
@@ -860,7 +860,7 @@ abstract class Skin extends ContextSource {
                if ( is_string( $icon ) ) {
                        $html = $icon;
                } else { // Assuming array
-                       $url = isset($icon["url"]) ? $icon["url"] : null;
+                       $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
index 8642eca..c1c7219 100644 (file)
@@ -120,7 +120,7 @@ class LegacyTemplate extends BaseTemplate {
                }
 
                $s .= "\n<div id='content'>\n<div id='topbar'>\n" .
-                 "<table cellspacing='0' style='width: 100%;'>\n<tr>\n";
+                       "<table cellspacing='0' style='width: 100%;'>\n<tr>\n";
 
                if ( $this->getSkin()->qbSetting() == 0 ) {
                        $s .= "<td class='top' style='text-align: left; vertical-align: top;' rowspan='{$rows}'>\n" .
@@ -179,10 +179,10 @@ class LegacyTemplate extends BaseTemplate {
                $search = $wgRequest->getText( 'search' );
 
                $s = '<form id="searchform' . $this->searchboxes . '" name="search" class="inline" method="post" action="'
-                 . $this->getSkin()->escapeSearchLink() . "\">\n"
-                 . '<input type="text" id="searchInput' . $this->searchboxes . '" name="search" size="19" value="'
-                 . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />\n"
-                 . '<input type="submit" name="go" value="' . wfMessage( 'searcharticle' )->text() . '" />';
+                       . $this->getSkin()->escapeSearchLink() . "\">\n"
+                       . '<input type="text" id="searchInput' . $this->searchboxes . '" name="search" size="19" value="'
+                       . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />\n"
+                       . '<input type="submit" name="go" value="' . wfMessage( 'searcharticle' )->text() . '" />';
 
                if ( $wgUseTwoButtonsSearchForm ) {
                        $s .= '&#160;<input type="submit" name="fulltext" value="' . wfMessage( 'searchbutton' )->text() . "\" />\n";
@@ -263,7 +263,7 @@ class LegacyTemplate extends BaseTemplate {
                                }
                                $s = $wgLang->pipeList( array(
                                        $s,
-                                       '<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '" lang="' . $code . '" hreflang="' . $code .  '">' . htmlspecialchars( $varname ) . '</a>'
+                                       '<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '" lang="' . $code . '" hreflang="' . $code . '">' . htmlspecialchars( $varname ) . '</a>'
                                ) );
                        }
                }
index a673a65..86972ee 100644 (file)
@@ -219,7 +219,7 @@ class SkinTemplate extends Skin {
                if ( $subpagestr !== '' ) {
                        $subpagestr = '<span class="subpages">' . $subpagestr . '</span>';
                }
-               $tpl->set( 'subtitle',  $subpagestr . $out->getSubtitle() );
+               $tpl->set( 'subtitle', $subpagestr . $out->getSubtitle() );
 
                $undelete = $this->getUndeleteLink();
                if ( $undelete === '' ) {
@@ -403,7 +403,7 @@ class SkinTemplate extends Skin {
                        $pageLang = $title->getPageViewLanguage();
                        $realBodyAttribs['lang'] = $pageLang->getHtmlCode();
                        $realBodyAttribs['dir'] = $pageLang->getDir();
-                       $realBodyAttribs['class'] = 'mw-content-'.$pageLang->getDir();
+                       $realBodyAttribs['class'] = 'mw-content-' . $pageLang->getDir();
                }
 
                $out->mBodytext = Html::rawElement( 'div', $realBodyAttribs, $out->mBodytext );
@@ -1051,7 +1051,7 @@ class SkinTemplate extends Skin {
                }
 
                // Equiv to SkinTemplateContentActions
-               wfRunHooks( 'SkinTemplateNavigation::Universal', array( &$this,  &$content_navigation ) );
+               wfRunHooks( 'SkinTemplateNavigation::Universal', array( &$this, &$content_navigation ) );
 
                // Setup xml ids and tooltip info
                foreach ( $content_navigation as $section => &$links ) {
index 338b50d..3b3a5ee 100644 (file)
@@ -1278,7 +1278,7 @@ class SpecialMytalk extends RedirectSpecialArticle {
  */
 class SpecialMycontributions extends RedirectSpecialPage {
        function __construct() {
-               parent::__construct(  'Mycontributions' );
+               parent::__construct( 'Mycontributions' );
                $this->mAllowedRedirectParams = array( 'limit', 'namespace', 'tagfilter',
                        'offset', 'dir', 'year', 'month', 'feed' );
        }
index fd5d52c..add7efc 100644 (file)
@@ -95,7 +95,7 @@ class SpecialPageFactory {
                'Preferences'               => 'SpecialPreferences',
                'Contributions'             => 'SpecialContributions',
                'Listgrouprights'           => 'SpecialListGroupRights',
-               'Listusers'                 => 'SpecialListUsers' ,
+               'Listusers'                 => 'SpecialListUsers',
                'Listadmins'                => 'SpecialListAdmins',
                'Listbots'                  => 'SpecialListBots',
                'Activeusers'               => 'SpecialActiveUsers',
index 098fb0b..f5fd195 100644 (file)
@@ -318,7 +318,7 @@ class SquidPurgeClient {
                                return 'done';
                        }
                default:
-                       throw new MWException( __METHOD__.': unexpected state' );
+                       throw new MWException( __METHOD__ . ': unexpected state' );
                }
        }
 
@@ -373,7 +373,7 @@ class SquidPurgeClient {
         * @param $msg string
         */
        protected function log( $msg ) {
-               wfDebugLog( 'squid', __CLASS__." ($this->host): $msg\n" );
+               wfDebugLog( 'squid', __CLASS__ . " ($this->host): $msg\n" );
        }
 }
 
@@ -429,14 +429,14 @@ class SquidPurgeClientPool {
                        $numReady = socket_select( $readSockets, $writeSockets, $exceptSockets, $timeout );
                        wfRestoreWarnings();
                        if ( $numReady === false ) {
-                               wfDebugLog( 'squid', __METHOD__.': Error in stream_select: ' .
+                               wfDebugLog( 'squid', __METHOD__ . ': Error in stream_select: ' .
                                        socket_strerror( socket_last_error() ) . "\n" );
                                break;
                        }
                        // Check for timeout, use 1% tolerance since we aimed at having socket_select()
                        // exit at precisely the overall timeout
                        if ( microtime( true ) - $startTime > $this->timeout * 0.99 ) {
-                               wfDebugLog( 'squid', __CLASS__.": timeout ({$this->timeout}s)\n" );
+                               wfDebugLog( 'squid', __CLASS__ . ": timeout ({$this->timeout}s)\n" );
                                break;
                        } elseif ( !$numReady ) {
                                continue;
index 2553f54..4298aee 100644 (file)
@@ -176,10 +176,10 @@ class Status {
                if ( count( $this->errors ) == 0 ) {
                        if ( $this->ok ) {
                                $this->fatal( 'internalerror_info',
-                                       __METHOD__." called for a good result, this is incorrect\n" );
+                                       __METHOD__ . " called for a good result, this is incorrect\n" );
                        } else {
                                $this->fatal( 'internalerror_info',
-                                       __METHOD__.": Invalid result object: no error text but not OK\n" );
+                                       __METHOD__ . ": Invalid result object: no error text but not OK\n" );
                        }
                }
                if ( count( $this->errors ) == 1 ) {
@@ -190,7 +190,7 @@ class Status {
                                $s = wfMessage( $longContext, "* $s\n" )->plain();
                        }
                } else {
-                       $s = '* '. implode("\n* ",
+                       $s = '* '. implode( "\n* ",
                                $this->getErrorMessageArray( $this->errors ) ) . "\n";
                        if ( $longContext ) {
                                $s = wfMessage( $longContext, $s )->plain();
@@ -216,7 +216,7 @@ class Status {
                                $msg = $error['message'];
                        } elseif ( isset( $error['message'] ) && isset( $error['params'] ) ) {
                                $msg = wfMessage( $error['message'],
-                                       array_map( 'wfEscapeWikiText', $this->cleanParams( $error['params'] ) )  );
+                                       array_map( 'wfEscapeWikiText', $this->cleanParams( $error['params'] ) ) );
                        } else {
                                $msgName = array_shift( $error );
                                $msg = wfMessage( $msgName,
index 54a85dc..6647de4 100644 (file)
@@ -135,12 +135,12 @@ class StringUtils {
                $m = array();
 
                while ( $inputPos < strlen( $subject ) &&
-                 preg_match( "!($encStart)|($encEnd)!S$flags", $subject, $m, PREG_OFFSET_CAPTURE, $inputPos ) )
+                       preg_match( "!($encStart)|($encEnd)!S$flags", $subject, $m, PREG_OFFSET_CAPTURE, $inputPos ) )
                {
                        $tokenOffset = $m[0][1];
                        if ( $m[1][0] != '' ) {
                                if ( $foundStart &&
-                                 $strcmp( $endDelim, substr( $subject, $tokenOffset, $endLength ) ) == 0 )
+                                       $strcmp( $endDelim, substr( $subject, $tokenOffset, $endLength ) ) == 0 )
                                {
                                        # An end match is present at the same location
                                        $tokenType = 'end';
@@ -432,7 +432,7 @@ class ReplacementArray {
         * @param $from string
         */
        function removePair( $from ) {
-               unset($this->data[$from]);
+               unset( $this->data[$from] );
                $this->fss = false;
        }
 
index cc0adb7..8a1e758 100644 (file)
@@ -118,7 +118,7 @@ class StubObject {
                }
 
                if ( get_class( $GLOBALS[$this->mGlobal] ) != $this->mClass ) {
-                       $fname = __METHOD__.'-'.$this->mGlobal;
+                       $fname = __METHOD__ . '-' . $this->mGlobal;
                        wfProfileIn( $fname );
                        $caller = wfGetCaller( $level );
                        if ( ++$recursionLevel > 2 ) {
index 4271555..6aa4cd2 100644 (file)
@@ -1849,7 +1849,7 @@ class Title {
                        $ns = $this->mNamespace == NS_MAIN ?
                                wfMessage( 'nstab-main' )->text() : $this->getNsText();
                        $errors[] = $this->mNamespace == NS_MEDIAWIKI ?
-                               array( 'protectedinterface' ) : array( 'namespaceprotected',  $ns );
+                               array( 'protectedinterface' ) : array( 'namespaceprotected', $ns );
                }
 
                return $errors;
index 3e49cd0..a73414c 100644 (file)
@@ -1451,7 +1451,7 @@ class User {
                        // But this is a crappy hack and should die.
                        return false;
                }
-               return !$this->isAllowed('noratelimit');
+               return !$this->isAllowed( 'noratelimit' );
        }
 
        /**
@@ -2284,7 +2284,7 @@ class User {
         * @return Int User's current value for the option
         * @see getOption()
         */
-       public function getIntOption( $oname, $defaultOverride=0 ) {
+       public function getIntOption( $oname, $defaultOverride = 0 ) {
                $val = $this->getOption( $oname );
                if( $val == '' ) {
                        $val = $defaultOverride;
@@ -2620,7 +2620,7 @@ class User {
                        if( $this->getId() ) {
                                $dbw->insert( 'user_groups',
                                        array(
-                                               'ug_user'  => $this->getID(),
+                                               'ug_user' => $this->getID(),
                                                'ug_group' => $group,
                                        ),
                                        __METHOD__,
@@ -2645,13 +2645,13 @@ class User {
                        $dbw = wfGetDB( DB_MASTER );
                        $dbw->delete( 'user_groups',
                                array(
-                                       'ug_user'  => $this->getID(),
+                                       'ug_user' => $this->getID(),
                                        'ug_group' => $group,
                                ), __METHOD__ );
                        // Remember that the user was in this group
                        $dbw->insert( 'user_former_groups',
                                array(
-                                       'ufg_user'  => $this->getID(),
+                                       'ufg_user' => $this->getID(),
                                        'ufg_group' => $group,
                                ),
                                __METHOD__,
@@ -3264,7 +3264,7 @@ class User {
        public function getPageRenderingHash() {
                wfDeprecated( __METHOD__, '1.17' );
 
-               global $wgUseDynamicDates, $wgRenderHashAppend, $wgLang, $wgContLang;
+               global $wgRenderHashAppend, $wgLang, $wgContLang;
                if( $this->mHash ) {
                        return $this->mHash;
                }
@@ -3275,9 +3275,6 @@ class User {
 
                $confstr =        $this->getOption( 'math' );
                $confstr .= '!' . $this->getStubThreshold();
-               if ( $wgUseDynamicDates ) { # This is wrong (bug 24714)
-                       $confstr .= '!' . $this->getDatePreference();
-               }
                $confstr .= '!' . ( $this->getOption( 'numberheadings' ) ? '1' : '' );
                $confstr .= '!' . $wgLang->getCode();
                $confstr .= '!' . $this->getOption( 'thumbsize' );
@@ -4058,7 +4055,7 @@ class User {
                        $groups = array_merge_recursive(
                                $groups, $this->changeableByGroup( $addergroup )
                        );
-                       $groups['add']    = array_unique( $groups['add'] );
+                       $groups['add'] = array_unique( $groups['add'] );
                        $groups['remove'] = array_unique( $groups['remove'] );
                        $groups['add-self'] = array_unique( $groups['add-self'] );
                        $groups['remove-self'] = array_unique( $groups['remove-self'] );
index 324e7ce..7d11342 100644 (file)
@@ -136,10 +136,10 @@ class UserMailer {
                global $wgSMTP, $wgServer;
 
                $msgid = uniqid( wfWikiID() . ".", true ); /* true required for cygwin */
-               if ( is_array($wgSMTP) && isset($wgSMTP['IDHost']) && $wgSMTP['IDHost'] ) {
+               if ( is_array( $wgSMTP ) && isset( $wgSMTP['IDHost'] ) && $wgSMTP['IDHost'] ) {
                        $domain = $wgSMTP['IDHost'];
                } else {
-                       $url = wfParseUrl($wgServer);
+                       $url = wfParseUrl( $wgServer );
                        $domain = $url['host'];
                }
                return "<$msgid@$domain>";
@@ -340,7 +340,7 @@ class UserMailer {
                        #
                        # PHP mail()
                        #
-                       if( count($to) > 1 ) {
+                       if( count( $to ) > 1 ) {
                                $headers['To'] = 'undisclosed-recipients:;';
                        }
                        $headers = self::arrayToHeaderString( $headers, $endl );
@@ -517,9 +517,9 @@ class EmailNotification {
                                                        array( /* SET */
                                                                'wl_notificationtimestamp' => $dbw->timestamp( $timestamp )
                                                        ), array( /* WHERE */
-                                                               'wl_user'      => $watchers,
+                                                               'wl_user' => $watchers,
                                                                'wl_namespace' => $title->getNamespace(),
-                                                               'wl_title'     => $title->getDBkey(),
+                                                               'wl_title' => $title->getDBkey(),
                                                        ), $fname
                                                );
                                                $dbw->commit( $fname );
@@ -710,16 +710,16 @@ class EmailNotification {
                        if ( !$wgEnotifImpersonal ) {
                                // For personal mail, also show a link to the diff of all changes
                                // since last visited.
-                               $keys['$NEWPAGE'] .= "\n\n" .  wfMessage( 'enotif_lastvisited',
+                               $keys['$NEWPAGE'] .= "\n\n" . wfMessage( 'enotif_lastvisited',
                                        $this->title->getCanonicalUrl( 'diff=0&oldid=' . $this->oldid ) )
                                        ->inContentLanguage()->text();
                        }
-                       $keys['$OLDID']   = $this->oldid;
+                       $keys['$OLDID'] = $this->oldid;
                        // @deprecated Remove in MediaWiki 1.23.
                        $keys['$CHANGEDORCREATED'] = wfMessage( 'changed' )->inContentLanguage()->text();
                } else {
                        # clear $OLDID placeholder in the message template
-                       $keys['$OLDID']   = '';
+                       $keys['$OLDID'] = '';
                        $keys['$NEWPAGE'] = '';
                        // @deprecated Remove in MediaWiki 1.23.
                        $keys['$CHANGEDORCREATED'] = wfMessage( 'created' )->inContentLanguage()->text();
@@ -771,13 +771,13 @@ class EmailNotification {
                {
                        $editorAddress = new MailAddress( $this->editor );
                        if ( $wgEnotifFromEditor ) {
-                               $this->from    = $editorAddress;
+                               $this->from = $editorAddress;
                        } else {
-                               $this->from    = $adminAddress;
+                               $this->from = $adminAddress;
                                $this->replyto = $editorAddress;
                        }
                } else {
-                       $this->from    = $adminAddress;
+                       $this->from = $adminAddress;
                        $this->replyto = new MailAddress( $wgNoReplyAddress );
                }
        }
index ffdc285..240ebc7 100644 (file)
@@ -162,22 +162,22 @@ class WatchedItem {
                // if there's already an entry for this page
                $dbw = wfGetDB( DB_MASTER );
                $dbw->insert( 'watchlist',
-                 array(
-                       'wl_user' => $this->getUserId(),
-                       'wl_namespace' => MWNamespace::getSubject($this->getTitleNs()),
-                       'wl_title' => $this->getTitleDBkey(),
-                       'wl_notificationtimestamp' => null
-                 ), __METHOD__, 'IGNORE' );
+                       array(
+                               'wl_user' => $this->getUserId(),
+                               'wl_namespace' => MWNamespace::getSubject( $this->getTitleNs() ),
+                               'wl_title' => $this->getTitleDBkey(),
+                               'wl_notificationtimestamp' => null
+                       ), __METHOD__, 'IGNORE' );
 
                // Every single watched page needs now to be listed in watchlist;
                // namespace:page and namespace_talk:page need separate entries:
                $dbw->insert( 'watchlist',
-                 array(
-                       'wl_user' => $this->getUserId(),
-                       'wl_namespace' => MWNamespace::getTalk($this->getTitleNs()),
-                       'wl_title' => $this->getTitleDBkey(),
-                       'wl_notificationtimestamp' => null
-                 ), __METHOD__, 'IGNORE' );
+                       array(
+                               'wl_user' => $this->getUserId(),
+                               'wl_namespace' => MWNamespace::getTalk( $this->getTitleNs() ),
+                               'wl_title' => $this->getTitleDBkey(),
+                               'wl_notificationtimestamp' => null
+                       ), __METHOD__, 'IGNORE' );
 
                $this->watched = true;
 
@@ -197,7 +197,7 @@ class WatchedItem {
                $dbw->delete( 'watchlist',
                        array(
                                'wl_user' => $this->getUserId(),
-                               'wl_namespace' => MWNamespace::getSubject($this->getTitleNs()),
+                               'wl_namespace' => MWNamespace::getSubject( $this->getTitleNs() ),
                                'wl_title' => $this->getTitleDBkey(),
                        ), __METHOD__
                );
@@ -212,7 +212,7 @@ class WatchedItem {
                $dbw->delete( 'watchlist',
                        array(
                                'wl_user' => $this->getUserId(),
-                               'wl_namespace' => MWNamespace::getTalk($this->getTitleNs()),
+                               'wl_namespace' => MWNamespace::getTalk( $this->getTitleNs() ),
                                'wl_title' => $this->getTitleDBkey(),
                        ), __METHOD__
                );
index 594226b..4cc28c3 100644 (file)
@@ -565,9 +565,9 @@ class WebRequest {
         *
         * @return Array
         */
-        public function getQueryValues() {
+       public function getQueryValues() {
                return $_GET;
-        }
+       }
 
        /**
         * Get the HTTP method used for this request.
@@ -619,7 +619,7 @@ class WebRequest {
                        global $wgCookiePrefix;
                        $prefix = $wgCookiePrefix;
                }
-               return $this->getGPCVal( $_COOKIE, $prefix . $key , $default );
+               return $this->getGPCVal( $_COOKIE, $prefix . $key, $default );
        }
 
        /**
@@ -849,7 +849,7 @@ class WebRequest {
                } else {
                        foreach ( $_SERVER as $name => $value ) {
                                if ( substr( $name, 0, 5 ) === 'HTTP_' ) {
-                                       $name = str_replace( '_', '-',  substr( $name, 5 ) );
+                                       $name = str_replace( '_', '-', substr( $name, 5 ) );
                                        $this->headers[$name] = $value;
                                } elseif ( $name === 'CONTENT_LENGTH' ) {
                                        $this->headers['CONTENT-LENGTH'] = $value;
index f00e055..37dbef4 100644 (file)
@@ -52,7 +52,7 @@ class WebResponse {
         */
        public function setcookie( $name, $value, $expire = 0, $prefix = null, $domain = null, $forceSecure = null ) {
                global $wgCookiePath, $wgCookiePrefix, $wgCookieDomain;
-               global $wgCookieSecure,$wgCookieExpiration, $wgCookieHttpOnly;
+               global $wgCookieSecure, $wgCookieExpiration, $wgCookieHttpOnly;
                if ( $expire == 0 ) {
                        $expire = time() + $wgCookieExpiration;
                }
index f209097..28cc949 100644 (file)
@@ -62,7 +62,7 @@ if ( ini_get( 'register_globals' ) ) {
 # points and when $wgOut gets disabled or overridden.
 header( 'X-Content-Type-Options: nosniff' );
 
-$wgRequestTime = microtime(true);
+$wgRequestTime = microtime( true );
 # getrusage() does not exist on the Microsoft Windows platforms, catching this
 if ( function_exists ( 'getrusage' ) ) {
        $wgRUstart = getrusage();
@@ -123,7 +123,7 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
        MWFunction::call( MW_CONFIG_CALLBACK );
 } else {
        if ( !defined( 'MW_CONFIG_FILE' ) ) {
-               define('MW_CONFIG_FILE', MWInit::interpretedPath( 'LocalSettings.php' ) );
+               define( 'MW_CONFIG_FILE', MWInit::interpretedPath( 'LocalSettings.php' ) );
        }
 
        # LocalSettings.php is the per site customization file. If it does not exist
index 0114cce..fa23072 100644 (file)
@@ -42,7 +42,7 @@ class WikiFilePage extends WikiPage {
 
        public function getActionOverrides() {
                $overrides = parent::getActionOverrides();
-               $overrides[ 'revert' ] = 'RevertFileAction';
+               $overrides['revert'] = 'RevertFileAction';
                return $overrides;
        }
 
index fbe0820..57007eb 100644 (file)
@@ -3034,10 +3034,10 @@ class WikiPage extends Page implements IDBAccessObject {
                $removeFields = array( 'cat_pages = cat_pages - 1' );
 
                if ( $ns == NS_CATEGORY ) {
-                       $addFields[]    = 'cat_subcats = cat_subcats + 1';
+                       $addFields[] = 'cat_subcats = cat_subcats + 1';
                        $removeFields[] = 'cat_subcats = cat_subcats - 1';
                } elseif ( $ns == NS_FILE ) {
-                       $addFields[]    = 'cat_files = cat_files + 1';
+                       $addFields[] = 'cat_files = cat_files + 1';
                        $removeFields[] = 'cat_files = cat_files - 1';
                }
 
@@ -3315,7 +3315,7 @@ class PoolWorkArticleView extends PoolCounterWork {
         * @param $content Content|String: content to parse or null to load it; may also be given as a wikitext string, for BC
         */
        function __construct( Page $page, ParserOptions $parserOptions, $revid, $useParserCache, $content = null ) {
-               if ( is_string($content) ) { // BC: old style call
+               if ( is_string( $content ) ) { // BC: old style call
                        $modelId = $page->getRevision()->getContentModel();
                        $format = $page->getRevision()->getContentFormat();
                        $content = ContentHandler::makeContent( $content, $page->getTitle(), $modelId, $format );
index 7c451bb..59d4222 100644 (file)
@@ -192,7 +192,7 @@ class Xml {
                } elseif( $encMonth ) {
                        $thisMonth = intval( gmdate( 'n' ) );
                        $thisYear = intval( gmdate( 'Y' ) );
-                       if( intval($encMonth) > $thisMonth ) {
+                       if( intval( $encMonth ) > $thisMonth ) {
                                $thisYear--;
                        }
                        $encYear = $thisYear;
@@ -500,7 +500,7 @@ class Xml {
                                } elseif ( substr( $value, 0, 1) == '*' && substr( $value, 1, 1) != '*' ) {
                                        // A new group is starting ...
                                        $value = trim( substr( $value, 1 ) );
-                                       if( $optgroup ) $options .= self::closeElement('optgroup');
+                                       if( $optgroup ) $options .= self::closeElement( 'optgroup' );
                                        $options .= self::openElement( 'optgroup', array( 'label' => $value ) );
                                        $optgroup = true;
                                } elseif ( substr( $value, 0, 2) == '**' ) {
@@ -509,13 +509,13 @@ class Xml {
                                        $options .= self::option( $value, $value, $selected === $value );
                                } else {
                                        // groupless reason list
-                                       if( $optgroup ) $options .= self::closeElement('optgroup');
+                                       if( $optgroup ) $options .= self::closeElement( 'optgroup' );
                                        $options .= self::option( $value, $value, $selected === $value );
                                        $optgroup = false;
                                }
                        }
 
-                       if( $optgroup ) $options .= self::closeElement('optgroup');
+                       if( $optgroup ) $options .= self::closeElement( 'optgroup' );
 
                $attribs = array();
 
@@ -636,10 +636,10 @@ class Xml {
                } elseif ( is_null( $value ) ) {
                        $s = 'null';
                } elseif ( is_int( $value ) || is_float( $value ) ) {
-                       $s = strval($value);
+                       $s = strval( $value );
                } elseif ( is_array( $value ) && // Make sure it's not associative.
-                                       array_keys($value) === range( 0, count($value) - 1 ) ||
-                                       count($value) == 0
+                                       array_keys( $value ) === range( 0, count( $value ) - 1 ) ||
+                                       count( $value ) == 0
                                ) {
                        $s = '[';
                        foreach ( $value as $elt ) {
@@ -764,7 +764,7 @@ class Xml {
                foreach( $fields as $labelmsg => $input ) {
                        $id = "mw-$labelmsg";
                        $form .= Xml::openElement( 'tr', array( 'id' => $id ) );
-                       $form .= Xml::tags( 'td', array('class' => 'mw-label'), wfMessage( $labelmsg )->parse() );
+                       $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::closeElement( 'tr' );
                }
index ccdf2bb..fc36b1f 100644 (file)
@@ -181,7 +181,7 @@ class ZipDirectoryReader {
         * Throw an error, and log a debug message
         */
        function error( $code, $debugMessage ) {
-               wfDebug( __CLASS__.": Fatal error: $debugMessage\n" );
+               wfDebug( __CLASS__ . ": Fatal error: $debugMessage\n" );
                throw new ZipDirectoryReaderError( $code );
        }
 
@@ -220,7 +220,7 @@ class ZipDirectoryReader {
                if ( $structSize + $this->eocdr['file comment length'] != strlen( $block ) - $sigPos ) {
                        $this->error( 'zip-bad', 'trailing bytes after the end of the file comment' );
                }
-               if (   $this->eocdr['disk'] !== 0
+               if ( $this->eocdr['disk'] !== 0
                        || $this->eocdr['CD start disk'] !== 0 )
                {
                        $this->error( 'zip-unsupported', 'more than one disk (in EOCDR)' );
@@ -262,7 +262,7 @@ class ZipDirectoryReader {
         * may replace the regular "end of central directory record" in ZIP64 files.
         */
        function readZip64EndOfCentralDirectoryRecord() {
-               if (   $this->eocdr64Locator['eocdr64 start disk'] != 0
+               if ( $this->eocdr64Locator['eocdr64 start disk'] != 0
                        || $this->eocdr64Locator['number of disks'] != 0 )
                {
                        $this->error( 'zip-unsupported', 'more than one disk (in EOCDR64 locator)' );
@@ -286,7 +286,7 @@ class ZipDirectoryReader {
                if ( $data['signature'] !== "PK\x06\x06" ) {
                        $this->error( 'zip-bad', 'wrong signature on Zip64 end of central directory record' );
                }
-               if (   $data['disk'] !== 0
+               if ( $data['disk'] !== 0
                        || $data['CD start disk'] !== 0 )
                {
                        $this->error( 'zip-unsupported', 'more than one disk (in EOCDR64)' );
@@ -327,7 +327,7 @@ class ZipDirectoryReader {
                $offset = $this->eocdr['CD offset'];
                $numEntries = $this->eocdr['CD entries total'];
                $endPos = $this->eocdr['position'];
-               if (   $size == 0xffffffff
+               if ( $size == 0xffffffff
                        || $offset == 0xffffffff
                        || $numEntries == 0xffff )
                {
@@ -395,7 +395,7 @@ class ZipDirectoryReader {
                        $data += $this->unpack( $block, $variableInfo, $pos );
                        $pos += $this->getStructSize( $variableInfo );
 
-                       if (   $this->zip64 && (
+                       if ( $this->zip64 && (
                                   $data['compressed size'] == 0xffffffff
                                || $data['uncompressed size'] == 0xffffffff
                                || $data['local header offset'] == 0xffffffff ) )
@@ -618,7 +618,7 @@ class ZipDirectoryReader {
                                        $pos += $fieldSize;
                                        break;
                                default:
-                                       throw new MWException( __METHOD__.": invalid type \"$typeName\"" );
+                                       throw new MWException( __METHOD__ . ": invalid type \"$typeName\"" );
                                }
                        } else {
                                // Unsigned little-endian integer
index a1d1c3a..d26228a 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 /**
- * This class handles printing the history page for an article.  In order to
+ * This class handles printing the history page for an article. In order to
  * be efficient, it uses timestamps rather than offsets for paging, to avoid
  * costly LIMIT,offset queries.
  *
@@ -132,7 +132,7 @@ class HistoryAction extends FormlessAction {
                                array( 'delete', 'move' ),
                                $this->getTitle(),
                                '',
-                               array(  'lim' => 10,
+                               array( 'lim' => 10,
                                        'conds' => array( "log_action != 'revision'" ),
                                        'showIfEmpty' => false,
                                        'msgKey' => array( 'moveddeleted-notice' )
@@ -515,7 +515,7 @@ class HistoryPager extends ReverseChronologicalPager {
        function submitButton( $message, $attributes = array() ) {
                # Disable submit button if history has 1 revision only
                if ( $this->getNumRows() > 1 ) {
-                       return Xml::submitButton( $message , $attributes );
+                       return Xml::submitButton( $message, $attributes );
                } else {
                        return '';
                }
@@ -609,7 +609,7 @@ class HistoryPager extends ReverseChronologicalPager {
                                ? $this->parentLens[$row->rev_parent_id]
                                : 0;
                        $sDiff = ChangesList::showCharacterDifference( $prevSize, $rev->getSize() );
-                       $fSize = Linker::formatRevisionSize($rev->getSize());
+                       $fSize = Linker::formatRevisionSize( $rev->getSize() );
                        $s .= ' <span class="mw-changeslist-separator">. .</span> ' . "$fSize $sDiff";
                }
 
@@ -617,7 +617,7 @@ class HistoryPager extends ReverseChronologicalPager {
                $s2 = Linker::revComment( $rev, false, true );
 
                if ( $notificationtimestamp && ( $row->rev_timestamp >= $notificationtimestamp ) ) {
-                       $s2 .= ' <span class="updatedmarker">' .  $this->msg( 'updatedmarker' )->escaped() . '</span>';
+                       $s2 .= ' <span class="updatedmarker">' . $this->msg( 'updatedmarker' )->escaped() . '</span>';
                        $classes[] = 'mw-history-line-updated';
                }
 
@@ -671,7 +671,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        $s .= ' <span class="mw-changeslist-separator">. .</span> ' . $s2;
                }
 
-               wfRunHooks( 'PageHistoryLineEnding', array( $this, &$row , &$s, &$classes ) );
+               wfRunHooks( 'PageHistoryLineEnding', array( $this, &$row, &$s, &$classes ) );
 
                $attribs = array();
                if ( $classes ) {
index 5621b7c..743fef0 100644 (file)
@@ -127,6 +127,16 @@ abstract class ApiBase extends ContextSource {
                return $this->mModuleName;
        }
 
+
+       /**
+        * Get the module manager, or null if this module has no sub-modules
+        * @since 1.21
+        * @return ApiModuleManager
+        */
+       public function getModuleManager() {
+               return null;
+       }
+
        /**
         * Get parameter prefix (usually two letters or an empty string).
         * @return string
@@ -258,6 +268,8 @@ abstract class ApiBase extends ContextSource {
                        }
                        $msg = $lnPrfx . implode( $lnPrfx, $msg ) . "\n";
 
+                       $msg .= $this->makeHelpArrayToString( $lnPrfx, false, $this->getHelpUrls() );
+
                        if ( $this->isReadMode() ) {
                                $msg .= "\nThis module requires read rights";
                        }
@@ -301,8 +313,6 @@ abstract class ApiBase extends ContextSource {
                                        }
                                }
                        }
-
-                       $msg .= $this->makeHelpArrayToString( $lnPrfx, "Help page", $this->getHelpUrls() );
                }
 
                return $msg;
@@ -1303,8 +1313,8 @@ abstract class ApiBase extends ContextSource {
                // uploadMsgs
                'invalid-file-key' => array( 'code' => 'invalid-file-key', 'info' => 'Not a valid file key' ),
                'nouploadmodule' => array( 'code' => 'nouploadmodule', 'info' => 'No upload module set' ),
-               'uploaddisabled' => array( 'code' => 'uploaddisabled', 'info' => 'Uploads are not enabled.  Make sure $wgEnableUploads is set to true in LocalSettings.php and the PHP ini setting file_uploads is true' ),
-               'copyuploaddisabled' => array( 'code' => 'copyuploaddisabled', 'info' => 'Uploads by URL is not enabled.  Make sure $wgAllowCopyUploads is set to true in LocalSettings.php.' ),
+               'uploaddisabled' => array( 'code' => 'uploaddisabled', 'info' => 'Uploads are not enabled. Make sure $wgEnableUploads is set to true in LocalSettings.php and the PHP ini setting file_uploads is true' ),
+               'copyuploaddisabled' => array( 'code' => 'copyuploaddisabled', 'info' => 'Uploads by URL is not enabled. Make sure $wgAllowCopyUploads is set to true in LocalSettings.php.' ),
                'copyuploadbaddomain' => array( 'code' => 'copyuploadbaddomain', 'info' => 'Uploads by URL are not allowed from this domain.' ),
 
                'filename-tooshort' => array( 'code' => 'filename-tooshort', 'info' => 'The filename is too short' ),
index 91ab499..9520dc7 100644 (file)
@@ -69,8 +69,8 @@ class ApiFileRevert extends ApiBase {
        protected function checkPermissions( $user ) {
                $title = $this->file->getTitle();
                $permissionErrors = array_merge(
-                       $title->getUserPermissionsErrors( 'edit' , $user ),
-                       $title->getUserPermissionsErrors( 'upload' , $user )
+                       $title->getUserPermissionsErrors( 'edit', $user ),
+                       $title->getUserPermissionsErrors( 'upload', $user )
                );
 
                if ( $permissionErrors ) {
index 6ad7ccd..b4e8e33 100644 (file)
@@ -88,7 +88,7 @@ class ApiFormatXml extends ApiFormatBase {
         *
         * @par Example:
         * @verbatim
-        * name='root',  value = array( '_element'=>'page', 'x', 'y', 'z')
+        * name='root', value = array( '_element'=>'page', 'x', 'y', 'z')
         * @endverbatim
         * creates:
         * @verbatim
@@ -101,7 +101,7 @@ class ApiFormatXml extends ApiFormatBase {
         *
         * @par Example:
         * @verbatim
-        * name='root',  value = array( '*'=>'text', 'lang'=>'en', 'id'=>10)
+        * name='root', value = array( '*'=>'text', 'lang'=>'en', 'id'=>10)
         * @endverbatim
         * creates:
         * @verbatim
index 86f8112..9cafc5b 100644 (file)
@@ -43,43 +43,62 @@ class ApiHelp extends ApiBase {
                }
 
                $this->getMain()->setHelp();
-
                $result = $this->getResult();
-               $queryObj = new ApiQuery( $this->getMain(), 'query' );
-               $r = array();
-               if ( is_array( $params['modules'] ) ) {
-                       $modArr = $this->getMain()->getModules();
-
-                       foreach ( $params['modules'] as $m ) {
-                               if ( !isset( $modArr[$m] ) ) {
-                                       $r[] = array( 'name' => $m, 'missing' => '' );
-                                       continue;
-                               }
-                               $module = new $modArr[$m]( $this->getMain(), $m );
 
-                               $r[] = $this->buildModuleHelp( $module, 'action' );
-                       }
+               if ( is_array( $params['modules'] ) ) {
+                       $modules = $params['modules'];
+               } else {
+                       $modules = array();
                }
 
                if ( is_array( $params['querymodules'] ) ) {
-                       $qmodArr = $queryObj->getModules();
+                       $queryModules = $params['querymodules'];
+                       foreach ( $queryModules as $m ) {
+                               $modules[] = 'query+' . $m;
+                       }
+               } else {
+                       $queryModules = array();
+               }
 
-                       foreach ( $params['querymodules'] as $qm ) {
-                               if ( !isset( $qmodArr[$qm] ) ) {
-                                       $r[] = array( 'name' => $qm, 'missing' => '' );
-                                       continue;
+               $r = array();
+               foreach ( $modules as $m ) {
+                       // sub-modules could be given in the form of "name[+name[+name...]]"
+                       $subNames = explode( '+', $m );
+                       if ( count( $subNames ) === 1 ) {
+                               // In case the '+' was typed into URL, it resolves as a space
+                               $subNames = explode( ' ', $m );
+                       }
+                       $module = $this->getMain();
+                       for ( $i = 0; $i < count( $subNames ); $i++ ) {
+                               $subs = $module->getModuleManager();
+                               if ( $subs === null ) {
+                                       $module = null;
+                               } else {
+                                       $module = $subs->getModule( $subNames[$i] );
                                }
-                               $module = new $qmodArr[$qm]( $this, $qm );
-                               $type = $queryObj->getModuleType( $qm );
-
-                               if ( $type === null ) {
-                                       $r[] = array( 'name' => $qm, 'missing' => '' );
-                                       continue;
+                               if ( $module === null ) {
+                                       if ( count( $subNames ) === 2
+                                                       && $i === 1
+                                                       && $subNames[0] === 'query'
+                                                       && in_array( $subNames[1], $queryModules )
+                                       ) {
+                                               // Legacy: This is one of the renamed 'querymodule=...' parameters,
+                                               // do not use '+' notation in the output, use submodule's name instead.
+                                               $name = $subNames[1];
+                                       } else {
+                                               $name = implode( '+', array_slice( $subNames, 0, $i + 1 ) );
+                                       }
+                                       $r[] = array( 'name' => $name, 'missing' => '' );
+                                       break;
+                               } else {
+                                       $type = $subs->getModuleGroup( $subNames[$i] );
                                }
-
+                       }
+                       if ( $module !== null ) {
                                $r[] = $this->buildModuleHelp( $module, $type );
                        }
                }
+
                $result->setIndexedTagName( $r, 'module' );
                $result->addValue( null, $this->getModuleName(), $r );
        }
@@ -114,15 +133,16 @@ class ApiHelp extends ApiBase {
                                ApiBase::PARAM_ISMULTI => true
                        ),
                        'querymodules' => array(
-                               ApiBase::PARAM_ISMULTI => true
+                               ApiBase::PARAM_ISMULTI => true,
+                               ApiBase::PARAM_DEPRECATED => true
                        ),
                );
        }
 
        public function getParamDescription() {
                return array(
-                       'modules' => 'List of module names (value of the action= parameter)',
-                       'querymodules' => 'List of query module names (value of prop=, meta= or list= parameter)',
+                       'modules' => 'List of module names (value of the action= parameter). Can specify submodules with a \'+\'',
+                       'querymodules' => 'Use modules=query+value instead. List of query module names (value of prop=, meta= or list= parameter)',
                );
        }
 
@@ -134,9 +154,8 @@ class ApiHelp extends ApiBase {
                return array(
                        'api.php?action=help' => 'Whole help page',
                        'api.php?action=help&modules=protect' => 'Module (action) help page',
-                       'api.php?action=help&querymodules=categorymembers' => 'Query (list) modules help page',
-                       'api.php?action=help&querymodules=info' => 'Query (prop) modules help page',
-                       'api.php?action=help&querymodules=siteinfo' => 'Query (meta) modules help page',
+                       'api.php?action=help&modules=query+categorymembers' => 'Help for the query/categorymembers module',
+                       'api.php?action=help&modules=login|query+info' => 'Help for the login and query/info modules',
                );
        }
 
index 9657e12..408805e 100644 (file)
@@ -146,7 +146,7 @@ class ApiImport extends ApiBase {
 
        public function getDescription() {
                return array(
-                       'Import a page from another wiki, or an XML file.' ,
+                       'Import a page from another wiki, or an XML file.',
                        'Note that the HTTP POST must be done as a file upload (i.e. using multipart/form-data) when',
                        'sending a file for the "xml" parameter.'
                );
index 70c31c1..3535cd0 100644 (file)
@@ -131,8 +131,9 @@ class ApiMain extends ApiBase {
         */
        private $mPrinter;
 
-       private $mModules, $mModuleNames, $mFormats, $mFormatNames;
-       private $mResult, $mAction, $mEnableWrite;
+       private $mModuleMgr, $mResult;
+       private $mAction;
+       private $mEnableWrite;
        private $mInternalMode, $mSquidMaxage, $mModule;
 
        private $mCacheMode = 'private';
@@ -180,12 +181,11 @@ class ApiMain extends ApiBase {
                        }
                }
 
-               global $wgAPIModules; // extension modules
-               $this->mModules = $wgAPIModules + self::$Modules;
-
-               $this->mModuleNames = array_keys( $this->mModules );
-               $this->mFormats = self::$Formats;
-               $this->mFormatNames = array_keys( $this->mFormats );
+               global $wgAPIModules;
+               $this->mModuleMgr = new ApiModuleManager( $this );
+               $this->mModuleMgr->addModules( self::$Modules, 'action' );
+               $this->mModuleMgr->addModules( $wgAPIModules, 'action' );
+               $this->mModuleMgr->addModules( self::$Formats, 'format' );
 
                $this->mResult = new ApiResult( $this );
                $this->mEnableWrite = $enableWrite;
@@ -332,10 +332,11 @@ class ApiMain extends ApiBase {
         * @return ApiFormatBase
         */
        public function createPrinterByName( $format ) {
-               if ( !isset( $this->mFormats[$format] ) ) {
+               $printer = $this->mModuleMgr->getModule( $format, 'format' );
+               if ( $printer === null ) {
                        $this->dieUsage( "Unrecognized format: {$format}", 'unknown_format' );
                }
-               return new $this->mFormats[$format] ( $this, $format );
+               return $printer;
        }
 
        /**
@@ -604,7 +605,7 @@ class ApiMain extends ApiBase {
                if ( !isset ( $this->mPrinter ) ) {
                        // The printer has not been created yet. Try to manually get formatter value.
                        $value = $this->getRequest()->getVal( 'format', self::API_DEFAULT_FORMAT );
-                       if ( !in_array( $value, $this->mFormatNames ) ) {
+                       if ( !$this->mModuleMgr->isDefined( $value, 'format' ) ) {
                                $value = self::API_DEFAULT_FORMAT;
                        }
 
@@ -700,9 +701,10 @@ class ApiMain extends ApiBase {
         */
        protected function setupModule() {
                // Instantiate the module requested by the user
-               $module = new $this->mModules[$this->mAction] ( $this, $this->mAction );
-               $this->mModule = $module;
-
+               $module = $this->mModuleMgr->getModule( $this->mAction, 'action' );
+               if ( $module === null ) {
+                       $this->dieUsage( 'The API requires a valid action parameter', 'unknown_action' );
+               }
                $moduleParams = $module->extractRequestParams();
 
                // Die if token required, but not provided (unless there is a gettoken parameter)
@@ -814,6 +816,7 @@ class ApiMain extends ApiBase {
        protected function executeAction() {
                $params = $this->setupExecuteAction();
                $module = $this->setupModule();
+               $this->mModule = $module;
 
                $this->checkExecutePermissions( $module );
 
@@ -971,11 +974,11 @@ class ApiMain extends ApiBase {
                return array(
                        'format' => array(
                                ApiBase::PARAM_DFLT => ApiMain::API_DEFAULT_FORMAT,
-                               ApiBase::PARAM_TYPE => $this->mFormatNames
+                               ApiBase::PARAM_TYPE => $this->mModuleMgr->getNames( 'format' )
                        ),
                        'action' => array(
                                ApiBase::PARAM_DFLT => 'help',
-                               ApiBase::PARAM_TYPE => $this->mModuleNames
+                               ApiBase::PARAM_TYPE => $this->mModuleMgr->getNames( 'action' )
                        ),
                        'maxlag'  => array(
                                ApiBase::PARAM_TYPE => 'integer'
@@ -1092,7 +1095,7 @@ class ApiMain extends ApiBase {
                        '    Victor Vasiliev - vasilvv at gee mail dot com',
                        '    Bryan Tong Minh - bryan . tongminh @ gmail . com',
                        '    Sam Reed - sam @ reedyboy . net',
-                       '    Yuri Astrakhan "<Firstname><Lastname>@gmail.com" (creator, lead developer Sep 2006-Sep 2007)',
+                       '    Yuri Astrakhan "<Firstname><Lastname>@gmail.com" (creator, lead developer Sep 2006-Sep 2007, 2012)',
                        '',
                        'Please send your comments, suggestions and questions to mediawiki-api@lists.wikimedia.org',
                        'or file a bug report at https://bugzilla.wikimedia.org/'
@@ -1143,8 +1146,9 @@ class ApiMain extends ApiBase {
 
                $astriks = str_repeat( '*** ', 14 );
                $msg .= "\n\n$astriks Modules  $astriks\n\n";
-               foreach ( array_keys( $this->mModules ) as $moduleName ) {
-                       $module = new $this->mModules[$moduleName] ( $this, $moduleName );
+
+               foreach ( $this->mModuleMgr->getNames( 'action' ) as $name ) {
+                       $module = $this->mModuleMgr->getModule( $name );
                        $msg .= self::makeHelpMsgHeader( $module, 'action' );
 
                        $msg2 = $module->makeHelpMsg();
@@ -1162,8 +1166,8 @@ class ApiMain extends ApiBase {
                }
 
                $msg .= "\n$astriks Formats  $astriks\n\n";
-               foreach ( array_keys( $this->mFormats ) as $formatName ) {
-                       $module = $this->createPrinterByName( $formatName );
+               foreach ( $this->mModuleMgr->getNames( 'format' ) as $name ) {
+                       $module = $this->mModuleMgr->getModule( $name );
                        $msg .= self::makeHelpMsgHeader( $module, 'format' );
                        $msg2 = $module->makeHelpMsg();
                        if ( $msg2 !== false ) {
@@ -1215,45 +1219,57 @@ class ApiMain extends ApiBase {
                return false;
        }
 
+       /**
+        * Overrides to return this instance's module manager.
+        * @return ApiModuleManager
+        */
+       public function getModuleManager() {
+               return $this->mModuleMgr;
+       }
+
        /**
         * Add or overwrite a module in this ApiMain instance. Intended for use by extending
         * classes who wish to add their own modules to their lexicon or override the
         * behavior of inherent ones.
         *
-        * @param $mdlName String The identifier for this module.
-        * @param $mdlClass String The class where this module is implemented.
+        * @deprecated since 1.21, Use getModuleManager()->addModule() instead.
+        * @param $name string The identifier for this module.
+        * @param $class ApiBase The class where this module is implemented.
         */
-       protected function addModule( $mdlName, $mdlClass ) {
-               $this->mModules[$mdlName] = $mdlClass;
+       protected function addModule( $name, $class ) {
+               $this->getModuleManager()->addModule( $name, 'action', $class );
        }
 
        /**
         * Add or overwrite an output format for this ApiMain. Intended for use by extending
         * classes who wish to add to or modify current formatters.
         *
-        * @param $fmtName string The identifier for this format.
-        * @param $fmtClass ApiFormatBase The class implementing this format.
+        * @deprecated since 1.21, Use getModuleManager()->addModule() instead.
+        * @param $name string The identifier for this format.
+        * @param $class ApiFormatBase The class implementing this format.
         */
-       protected function addFormat( $fmtName, $fmtClass ) {
-               $this->mFormats[$fmtName] = $fmtClass;
+       protected function addFormat( $name, $class ) {
+               $this->getModuleManager->addModule( $name, 'format', $class );
        }
 
        /**
         * Get the array mapping module names to class names
+        * @deprecated since 1.21, Use getModuleManager()'s methods instead.
         * @return array
         */
        function getModules() {
-               return $this->mModules;
+               return $this->getModuleManager()->getNamesWithClasses( 'action' );
        }
 
        /**
         * Returns the list of supported formats in form ( 'format' => 'ClassName' )
         *
         * @since 1.18
+        * @deprecated since 1.21, Use getModuleManager()'s methods instead.
         * @return array
         */
        public function getFormats() {
-               return $this->mFormats;
+               return $this->getModuleManager()->getNamesWithClasses( 'format' );
        }
 }
 
diff --git a/includes/api/ApiModuleManager.php b/includes/api/ApiModuleManager.php
new file mode 100644 (file)
index 0000000..db1d36d
--- /dev/null
@@ -0,0 +1,171 @@
+<?php
+/**
+ *
+ *
+ * Created on Dec 27, 2012
+ *
+ * Copyright © 2012 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
+ *
+ * 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
+ * @since 1.21
+ */
+
+/**
+ * This class holds a list of modules and handles instantiation
+ *
+ * @since 1.21
+ * @ingroup API
+ */
+class ApiModuleManager extends ContextSource {
+
+       private $mParent;
+       private $mInstances = array();
+       private $mGroups = array();
+       private $mModules = array();
+
+       /**
+        * Construct new module manager
+        * @param ApiBase $parentModule Parent module instance will be used during instantiation
+        */
+       public function __construct( ApiBase $parentModule ) {
+               $this->mParent = $parentModule;
+       }
+
+       /**
+        * Add a list of modules to the manager
+        * @param array $modules A map of ModuleName => ModuleClass
+        * @param string $group Which group modules belong to (action,format,...)
+        */
+       public function addModules( array $modules, $group ) {
+               foreach ( $modules as $name => $class ) {
+                       $this->addModule( $name, $group, $class );
+               }
+       }
+
+       /**
+        * Add or overwrite a module in this ApiMain instance. Intended for use by extending
+        * classes who wish to add their own modules to their lexicon or override the
+        * behavior of inherent ones.
+        *
+        * @param $group string Name of the module group
+        * @param $name string The identifier for this module.
+        * @param $class string The class where this module is implemented.
+        */
+       public function addModule( $name, $group, $class ) {
+               $this->mGroups[$group] = null;
+               $this->mModules[$name] = array( $group, $class );
+       }
+
+       /**
+        * Get module instance by name, or instantiate it if it does not exist
+        * @param $moduleName string module name
+        * @param $group string optionally validate that the module is in a specific group
+        * @param $ignoreCache bool if true, force-creates a new instance and does not cache it
+        * @return mixed the new module instance, or null if failed
+        */
+       public function getModule( $moduleName, $group = null, $ignoreCache = false ) {
+               if ( !isset( $this->mModules[$moduleName] ) ) {
+                       return null;
+               }
+               $grpCls = $this->mModules[$moduleName];
+               if ( $group !== null && $grpCls[0] !== $group ) {
+                       return null;
+               }
+               if ( !$ignoreCache && isset( $this->mInstances[$moduleName] ) ) {
+                       // already exists
+                       return $this->mInstances[$moduleName];
+               } else {
+                       // new instance
+                       $class = $grpCls[1];
+                       $instance = new $class ( $this->mParent, $moduleName );
+                       if ( !$ignoreCache ) {
+                               // cache this instance in case it is needed later
+                               $this->mInstances[$moduleName] = $instance;
+                       }
+                       return $instance;
+               }
+       }
+
+       /**
+        * Get an array of modules in a specific group or all if no group is set.
+        * @param string $group optional group filter
+        * @return array list of module names
+        */
+       public function getNames( $group = null ) {
+               if ( $group === null ) {
+                       return array_keys( $this->mModules );
+               }
+               $result = array();
+               foreach ( $this->mModules as $name => $grpCls ) {
+                       if ( $grpCls[0] === $group ) {
+                               $result[] = $name;
+                       }
+               }
+               return $result;
+       }
+
+       /**
+        * Create an array of (moduleName => moduleClass) for a specific group or for all.
+        * @param string $group name of the group to get or null for all
+        * @return array name=>class map
+        */
+       public function getNamesWithClasses( $group = null ) {
+               $result = array();
+               foreach ( $this->mModules as $name => $grpCls ) {
+                       if ( $group === null || $grpCls[0] === $group ) {
+                               $result[$name] = $grpCls[1];
+                       }
+               }
+               return $result;
+       }
+
+       /**
+        * Returns true if the specific module is defined at all or in a specific group.
+        * @param string $moduleName module name
+        * @param string $group group name to check against, or null to check all groups,
+        * @return boolean true if defined
+        */
+       public function isDefined( $moduleName, $group = null ) {
+               if ( isset( $this->mModules[$moduleName] ) ) {
+                       return $group === null || $this->mModules[$moduleName][0] === $group;
+               } else {
+                       return false;
+               }
+       }
+
+       /**
+        * Returns the group name for the given module
+        * @param string $moduleName
+        * @return string group name or null if missing
+        */
+       public function getModuleGroup( $moduleName ) {
+               if ( isset( $this->mModules[$moduleName] ) ) {
+                       return $this->mModules[$moduleName][0];
+               } else {
+                       return null;
+               }
+       }
+
+       /**
+        * Get a list of groups this manager contains.
+        * @return array
+        */
+       public function getGroups() {
+               return array_keys( $this->mGroups );
+       }
+}
index e2f4dae..4dbccc6 100644 (file)
@@ -562,7 +562,7 @@ class ApiPageSet extends ApiQueryBase {
 
                        // Get pageIDs data from the `page` table
                        $this->profileDBIn();
-                       $res = $db->select( $tables, $fields, $where,  __METHOD__ );
+                       $res = $db->select( $tables, $fields, $where, __METHOD__ );
                        foreach ( $res as $row ) {
                                $revid = intval( $row->rev_id );
                                $pageid = intval( $row->rev_page );
index 42c490e..c3112d0 100644 (file)
@@ -42,42 +42,13 @@ class ApiParamInfo extends ApiBase {
        public function execute() {
                // Get parameters
                $params = $this->extractRequestParams();
-               $result = $this->getResult();
+               $resultObj = $this->getResult();
 
                $res = array();
-               if ( is_array( $params['modules'] ) ) {
-                       $modules = $this->getMain()->getModules();
-                       $res['modules'] = array();
-                       foreach ( $params['modules'] as $mod ) {
-                               if ( !isset( $modules[$mod] ) ) {
-                                       $res['modules'][] = array( 'name' => $mod, 'missing' => '' );
-                                       continue;
-                               }
-                               $obj = new $modules[$mod]( $this->getMain(), $mod );
 
-                               $item = $this->getClassInfo( $obj );
-                               $item['name'] = $mod;
-                               $res['modules'][] = $item;
-                       }
-                       $result->setIndexedTagName( $res['modules'], 'module' );
-               }
+               $this->addModulesInfo( $params, 'modules', $res, $resultObj );
 
-               if ( is_array( $params['querymodules'] ) ) {
-                       $queryModules = $this->queryObj->getModules();
-                       $res['querymodules'] = array();
-                       foreach ( $params['querymodules'] as $qm ) {
-                               if ( !isset( $queryModules[$qm] ) ) {
-                                       $res['querymodules'][] = array( 'name' => $qm, 'missing' => '' );
-                                       continue;
-                               }
-                               $obj = new $queryModules[$qm]( $this, $qm );
-                               $item = $this->getClassInfo( $obj );
-                               $item['name'] = $qm;
-                               $item['querytype'] = $this->queryObj->getModuleType( $qm );
-                               $res['querymodules'][] = $item;
-                       }
-                       $result->setIndexedTagName( $res['querymodules'], 'module' );
-               }
+               $this->addModulesInfo( $params, 'querymodules', $res, $resultObj );
 
                if ( $params['mainmodule'] ) {
                        $res['mainmodule'] = $this->getClassInfo( $this->getMain() );
@@ -88,29 +59,50 @@ class ApiParamInfo extends ApiBase {
                        $res['pagesetmodule'] = $this->getClassInfo( $pageSet );
                }
 
-               if ( is_array( $params['formatmodules'] ) ) {
-                       $formats = $this->getMain()->getFormats();
-                       $res['formatmodules'] = array();
-                       foreach ( $params['formatmodules'] as $f ) {
-                               if ( !isset( $formats[$f] ) ) {
-                                       $res['formatmodules'][] = array( 'name' => $f, 'missing' => '' );
-                                       continue;
-                               }
-                               $obj = new $formats[$f]( $this, $f );
-                               $item = $this->getClassInfo( $obj );
-                               $item['name'] = $f;
-                               $res['formatmodules'][] = $item;
+               $this->addModulesInfo( $params, 'formatmodules', $res, $resultObj );
+
+               $resultObj->addValue( null, $this->getModuleName(), $res );
+       }
+
+       /**
+        * If the type is requested in parameters, adds a section to res with module info.
+        * @param array $params user parameters array
+        * @param string $type parameter name
+        * @param array $res store results in this array
+        * @param array $resultObj results object to set indexed tag.
+        */
+       private function addModulesInfo( $params, $type, &$res, $resultObj ) {
+               if ( !is_array( $params[$type] ) ) {
+                       return;
+               }
+               $isQuery = ( $type === 'querymodules' );
+               if ( $isQuery ) {
+                       $mgr = $this->queryObj->getModuleManager();
+               } else {
+                       $mgr = $this->getMain()->getModuleManager();
+               }
+               $res[$type] = array();
+               foreach ( $params[$type] as $mod ) {
+                       if ( !$mgr->isDefined( $mod ) ) {
+                               $res[$type][] = array( 'name' => $mod, 'missing' => '' );
+                               continue;
+                       }
+                       $obj = $mgr->getModule( $mod );
+                       $item = $this->getClassInfo( $obj );
+                       $item['name'] = $mod;
+                       if ( $isQuery ) {
+                               $item['querytype'] = $mgr->getModuleGroup( $mod );
                        }
-                       $result->setIndexedTagName( $res['formatmodules'], 'module' );
+                       $res[$type][] = $item;
                }
-               $result->addValue( null, $this->getModuleName(), $res );
+               $resultObj->setIndexedTagName( $res[$type], 'module' );
        }
 
        /**
         * @param $obj ApiBase
         * @return ApiResult
         */
-       function getClassInfo( $obj ) {
+       private function getClassInfo( $obj ) {
                $result = $this->getResult();
                $retval['classname'] = get_class( $obj );
                $retval['description'] = implode( "\n", (array)$obj->getFinalDescription() );
@@ -150,7 +142,7 @@ class ApiParamInfo extends ApiBase {
                        if ( is_string( $examples ) ) {
                                $examples = array( $examples );
                        }
-                       foreach( $examples as $k => $v ) {
+                       foreach ( $examples as $k => $v ) {
                                if ( strlen( $retval['examples'] ) ) {
                                        $retval['examples'] .= ' ';
                                }
@@ -181,7 +173,7 @@ class ApiParamInfo extends ApiBase {
                        }
 
                        //handle shorthand
-                       if( !is_array( $p ) ) {
+                       if ( !is_array( $p ) ) {
                                $p = array(
                                        ApiBase::PARAM_DFLT => $p,
                                );
@@ -208,11 +200,11 @@ class ApiParamInfo extends ApiBase {
 
                        if ( isset( $p[ApiBase::PARAM_DFLT] ) ) {
                                $type = $p[ApiBase::PARAM_TYPE];
-                               if( $type === 'boolean' ) {
+                               if ( $type === 'boolean' ) {
                                        $a['default'] = ( $p[ApiBase::PARAM_DFLT] ? 'true' : 'false' );
-                               } elseif( $type === 'string' ) {
+                               } elseif ( $type === 'string' ) {
                                        $a['default'] = strval( $p[ApiBase::PARAM_DFLT] );
-                               } elseif( $type === 'integer' ) {
+                               } elseif ( $type === 'integer' ) {
                                        $a['default'] = intval( $p[ApiBase::PARAM_DFLT] );
                                } else {
                                        $a['default'] = $p[ApiBase::PARAM_DFLT];
@@ -319,11 +311,11 @@ class ApiParamInfo extends ApiBase {
        }
 
        public function getAllowedParams() {
-               $modules = array_keys( $this->getMain()->getModules() );
+               $modules = $this->getMain()->getModuleManager()->getNames( 'action' );
                sort( $modules );
-               $querymodules = array_keys( $this->queryObj->getModules() );
+               $querymodules = $this->queryObj->getModuleManager()->getNames();
                sort( $querymodules );
-               $formatmodules = array_keys( $this->getMain()->getFormats() );
+               $formatmodules = $this->getMain()->getModuleManager()->getNames( 'format' );
                sort( $formatmodules );
                return array(
                        'modules' => array(
index e5e6ca4..35dd695 100644 (file)
  */
 class ApiQuery extends ApiBase {
 
-       private $mPropModuleNames, $mListModuleNames, $mMetaModuleNames;
-
-       /**
-        * @var ApiPageSet
-        */
-       private $mPageSet;
-
-       private $params, $redirects, $convertTitles, $iwUrl;
-
        /**
         * List of Api Query prop modules
         * @var array
         */
-       private $mQueryPropModules = array(
+       private static $QueryPropModules = array(
                'categories' => 'ApiQueryCategories',
                'categoryinfo' => 'ApiQueryCategoryInfo',
                'duplicatefiles' => 'ApiQueryDuplicateFiles',
@@ -71,7 +62,7 @@ class ApiQuery extends ApiBase {
         * List of Api Query list modules
         * @var array
         */
-       private $mQueryListModules = array(
+       private static $QueryListModules = array(
                'allcategories' => 'ApiQueryAllCategories',
                'allimages' => 'ApiQueryAllImages',
                'alllinks' => 'ApiQueryAllLinks',
@@ -105,7 +96,7 @@ class ApiQuery extends ApiBase {
         * List of Api Query meta modules
         * @var array
         */
-       private $mQueryMetaModules = array(
+       private static $QueryMetaModules = array(
                'allmessages' => 'ApiQueryAllMessages',
                'siteinfo' => 'ApiQuerySiteinfo',
                'userinfo' => 'ApiQueryUserInfo',
@@ -144,8 +135,15 @@ class ApiQuery extends ApiBase {
                'watchlistraw' => 'ApiQueryWatchlistRaw',
        );
 
+       /**
+        * @var ApiPageSet
+        */
+       private $mPageSet;
+
+       private $params, $redirects, $convertTitles, $iwUrl;
        private $mSlaveDB = null;
        private $mNamedDB = array();
+       private $mModuleMgr;
 
        protected $mAllowedGenerators;
 
@@ -156,30 +154,32 @@ class ApiQuery extends ApiBase {
        public function __construct( $main, $action ) {
                parent::__construct( $main, $action );
 
+               $this->mModuleMgr = new ApiModuleManager( $this );
+
                // Allow custom modules to be added in LocalSettings.php
-               global $wgAPIPropModules, $wgAPIListModules, $wgAPIMetaModules, $wgAPIGeneratorModules;
-               self::appendUserModules( $this->mQueryPropModules, $wgAPIPropModules );
-               self::appendUserModules( $this->mQueryListModules, $wgAPIListModules );
-               self::appendUserModules( $this->mQueryMetaModules, $wgAPIMetaModules );
-               self::appendUserModules( $this->mQueryGenerators, $wgAPIGeneratorModules );
-
-               $this->mPropModuleNames = array_keys( $this->mQueryPropModules );
-               $this->mListModuleNames = array_keys( $this->mQueryListModules );
-               $this->mMetaModuleNames = array_keys( $this->mQueryMetaModules );
+               global $wgAPIPropModules, $wgAPIListModules, $wgAPIMetaModules;
+               $this->mModuleMgr->addModules( self::$QueryPropModules, 'prop' );
+               $this->mModuleMgr->addModules( $wgAPIPropModules, 'prop' );
+               $this->mModuleMgr->addModules( self::$QueryListModules, 'list' );
+               $this->mModuleMgr->addModules( $wgAPIListModules, 'list' );
+               $this->mModuleMgr->addModules( self::$QueryMetaModules, 'meta' );
+               $this->mModuleMgr->addModules( $wgAPIMetaModules, 'meta' );
+
+               global $wgAPIGeneratorModules;
+               if ( is_array( $wgAPIGeneratorModules ) ) {
+                       foreach ( $wgAPIGeneratorModules as $moduleName => $moduleClass ) {
+                               $this->mQueryGenerators[$moduleName] = $moduleClass;
+                       }
+               }
                $this->mAllowedGenerators = array_keys( $this->mQueryGenerators );
        }
 
        /**
-        * Helper function to append any add-in modules to the list
-        * @param $modules array Module array
-        * @param $newModules array Module array to add to $modules
+        * Overrides to return this instance's module manager.
+        * @return ApiModuleManager
         */
-       private static function appendUserModules( &$modules, $newModules ) {
-               if ( is_array( $newModules ) ) {
-                       foreach ( $newModules as $moduleName => $moduleClass ) {
-                               $modules[$moduleName] = $moduleClass;
-                       }
-               }
+       public function getModuleManager() {
+               return $this->mModuleMgr;
        }
 
        /**
@@ -224,10 +224,11 @@ class ApiQuery extends ApiBase {
 
        /**
         * Get the array mapping module names to class names
+        * @deprecated since 1.21, use getModuleManager()'s methods instead
         * @return array array(modulename => classname)
         */
        public function getModules() {
-               return array_merge( $this->mQueryPropModules, $this->mQueryListModules, $this->mQueryMetaModules );
+               return $this->getModuleManager()->getNamesWithClasses();
        }
 
        /**
@@ -240,23 +241,12 @@ class ApiQuery extends ApiBase {
 
        /**
         * Get whether the specified module is a prop, list or a meta query module
+        * @deprecated since 1.21, use getModuleManager()->getModuleGroup()
         * @param $moduleName string Name of the module to find type for
         * @return mixed string or null
         */
        function getModuleType( $moduleName ) {
-               if ( isset( $this->mQueryPropModules[$moduleName] ) ) {
-                       return 'prop';
-               }
-
-               if ( isset( $this->mQueryListModules[$moduleName] ) ) {
-                       return 'list';
-               }
-
-               if ( isset( $this->mQueryMetaModules[$moduleName] ) ) {
-                       return 'meta';
-               }
-
-               return null;
+               return $this->getModuleManager()->getModuleGroup( $moduleName );
        }
 
        /**
@@ -295,9 +285,9 @@ class ApiQuery extends ApiBase {
 
                // Instantiate requested modules
                $modules = array();
-               $this->instantiateModules( $modules, 'prop', $this->mQueryPropModules );
-               $this->instantiateModules( $modules, 'list', $this->mQueryListModules );
-               $this->instantiateModules( $modules, 'meta', $this->mQueryMetaModules );
+               $this->instantiateModules( $modules, 'prop' );
+               $this->instantiateModules( $modules, 'list' );
+               $this->instantiateModules( $modules, 'meta' );
 
                $cacheMode = 'public';
 
@@ -378,12 +368,11 @@ class ApiQuery extends ApiBase {
         * Create instances of all modules requested by the client
         * @param $modules Array to append instantiated modules to
         * @param $param string Parameter name to read modules from
-        * @param $moduleList Array array(modulename => classname)
         */
-       private function instantiateModules( &$modules, $param, $moduleList ) {
+       private function instantiateModules( &$modules, $param ) {
                if ( isset( $this->params[$param] ) ) {
                        foreach ( $this->params[$param] as $moduleName ) {
-                               $modules[] = new $moduleList[$moduleName] ( $this, $moduleName );
+                               $modules[] = $this->mModuleMgr->getModule( $moduleName );
                        }
                }
        }
@@ -594,15 +583,10 @@ class ApiQuery extends ApiBase {
         * @return ApiQueryGeneratorBase
         */
        public function newGenerator( $generatorName ) {
-               // Find class that implements requested generator
-               if ( isset( $this->mQueryListModules[$generatorName] ) ) {
-                       $className = $this->mQueryListModules[$generatorName];
-               } elseif ( isset( $this->mQueryPropModules[$generatorName] ) ) {
-                       $className = $this->mQueryPropModules[$generatorName];
-               } else {
-                       ApiBase::dieDebug( __METHOD__, "Unknown generator=$generatorName" );
+               $generator = $this->mModuleMgr->getModule( $generatorName, null, true );
+               if ( $generator === null ) {
+                       $this->dieUsage( "Unknown generator=$generatorName", 'badgenerator' );
                }
-               $generator = new $className ( $this, $generatorName );
                if ( !$generator instanceof ApiQueryGeneratorBase ) {
                        $this->dieUsage( "Module $generatorName cannot be used as a generator", 'badgenerator' );
                }
@@ -642,15 +626,15 @@ class ApiQuery extends ApiBase {
                return array(
                        'prop' => array(
                                ApiBase::PARAM_ISMULTI => true,
-                               ApiBase::PARAM_TYPE => $this->mPropModuleNames
+                               ApiBase::PARAM_TYPE => $this->mModuleMgr->getNames( 'prop' )
                        ),
                        'list' => array(
                                ApiBase::PARAM_ISMULTI => true,
-                               ApiBase::PARAM_TYPE => $this->mListModuleNames
+                               ApiBase::PARAM_TYPE => $this->mModuleMgr->getNames( 'list' )
                        ),
                        'meta' => array(
                                ApiBase::PARAM_ISMULTI => true,
-                               ApiBase::PARAM_TYPE => $this->mMetaModuleNames
+                               ApiBase::PARAM_TYPE => $this->mModuleMgr->getNames( 'meta' )
                        ),
                        'generator' => array(
                                ApiBase::PARAM_TYPE => $this->mAllowedGenerators
@@ -676,11 +660,11 @@ class ApiQuery extends ApiBase {
                $querySeparator = str_repeat( '--- ', 12 );
                $moduleSeparator = str_repeat( '*** ', 14 );
                $msg = "\n$querySeparator Query: Prop  $querySeparator\n\n";
-               $msg .= $this->makeHelpMsgHelper( $this->mQueryPropModules, 'prop' );
+               $msg .= $this->makeHelpMsgHelper( 'prop' );
                $msg .= "\n$querySeparator Query: List  $querySeparator\n\n";
-               $msg .= $this->makeHelpMsgHelper( $this->mQueryListModules, 'list' );
+               $msg .= $this->makeHelpMsgHelper( 'list' );
                $msg .= "\n$querySeparator Query: Meta  $querySeparator\n\n";
-               $msg .= $this->makeHelpMsgHelper( $this->mQueryMetaModules, 'meta' );
+               $msg .= $this->makeHelpMsgHelper( 'meta' );
                $msg .= "\n\n$moduleSeparator Modules: continuation  $moduleSeparator\n\n";
 
                // Use parent to make default message for the query module
@@ -690,21 +674,22 @@ class ApiQuery extends ApiBase {
        }
 
        /**
-        * For all modules in $moduleList, generate help messages and join them together
-        * @param $moduleList Array array(modulename => classname)
-        * @param $paramName string Parameter name
+        * For all modules of a given group, generate help messages and join them together
+        * @param $group string Module group
         * @return string
         */
-       private function makeHelpMsgHelper( $moduleList, $paramName ) {
+       private function makeHelpMsgHelper( $group ) {
                $moduleDescriptions = array();
 
-               foreach ( $moduleList as $moduleName => $moduleClass ) {
+               $moduleNames = $this->mModuleMgr->getNames( $group );
+               sort( $moduleNames );
+               foreach ( $moduleNames as $name ) {
                        /**
                         * @var $module ApiQueryBase
                         */
-                       $module = new $moduleClass( $this, $moduleName, null );
+                       $module = $this->mModuleMgr->getModule( $name );
 
-                       $msg = ApiMain::makeHelpMsgHeader( $module, $paramName );
+                       $msg = ApiMain::makeHelpMsgHeader( $module, $group );
                        $msg2 = $module->makeHelpMsg();
                        if ( $msg2 !== false ) {
                                $msg .= $msg2;
index 2a8645f..addcf07 100644 (file)
@@ -351,7 +351,7 @@ abstract class ApiQueryBase extends ApiBase {
                }
                $result = $this->getResult();
                $fit = $result->addValue( array( 'query', 'pages', $pageId,
-                                        $this->getModuleName() ), null, $item );
+                       $this->getModuleName() ), null, $item );
                if ( !$fit ) {
                        return false;
                }
index 0d2fa0d..d9be9f2 100644 (file)
@@ -132,10 +132,10 @@ class ApiQueryBlocks extends ApiQueryBase {
                        $this->addWhereIf( 'ipb_user != 0', isset( $show['account'] ) );
                        $this->addWhereIf( 'ipb_user != 0 OR ipb_range_end > ipb_range_start', isset( $show['!ip'] ) );
                        $this->addWhereIf( 'ipb_user = 0 AND ipb_range_end = ipb_range_start', isset( $show['ip'] ) );
-                       $this->addWhereIf( 'ipb_expiry =  '.$db->addQuotes($db->getInfinity()), isset( $show['!temp'] ) );
-                       $this->addWhereIf( 'ipb_expiry != '.$db->addQuotes($db->getInfinity()), isset( $show['temp'] ) );
-                       $this->addWhereIf( "ipb_range_end = ipb_range_start", isset( $show['!range'] ) );
-                       $this->addWhereIf( "ipb_range_end > ipb_range_start", isset( $show['range'] ) );
+                       $this->addWhereIf( 'ipb_expiry = ' . $db->addQuotes( $db->getInfinity() ), isset( $show['!temp'] ) );
+                       $this->addWhereIf( 'ipb_expiry != ' . $db->addQuotes( $db->getInfinity() ), isset( $show['temp'] ) );
+                       $this->addWhereIf( 'ipb_range_end = ipb_range_start', isset( $show['!range'] ) );
+                       $this->addWhereIf( 'ipb_range_end > ipb_range_start', isset( $show['range'] ) );
                }
 
                if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
index 6a392bd..fd9d4c5 100644 (file)
@@ -243,7 +243,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
 
                if ( is_null( $resultPageSet ) ) {
                        $result->setIndexedTagName_internal(
-                                        array( 'query', $this->getModuleName() ), 'cm' );
+                               array( 'query', $this->getModuleName() ), 'cm' );
                }
        }
 
index b368af8..4b9bc98 100644 (file)
@@ -435,7 +435,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
         */
        protected function getContinueStr( $img ) {
                return $img->getOriginalTitle()->getText() .
-                       '|' .  $img->getTimestamp();
+                       '|' . $img->getTimestamp();
        }
 
        public function getAllowedParams() {
@@ -539,7 +539,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                return array(
                        'prop' => self::getPropertyDescriptions( array(), $p ),
                        'urlwidth' => array( "If {$p}prop=url is set, a URL to an image scaled to this width will be returned.",
-                                           'Only the current version of the image can be scaled' ),
+                                               'Only the current version of the image can be scaled' ),
                        'urlheight' => "Similar to {$p}urlwidth. Cannot be used without {$p}urlwidth",
                        'urlparam' => array( "A handler specific parameter string. For example, pdf's ",
                                "might use 'page15-100px'. {$p}urlwidth must be used and be consistent with {$p}urlparam" ),
index 189e15a..9dd2c6a 100644 (file)
@@ -49,7 +49,7 @@ class ApiQueryPageProps extends ApiQueryBase {
 
                $this->addTables( 'page_props' );
                $this->addFields( array( 'pp_page', 'pp_propname', 'pp_value' ) );
-               $this->addWhereFld( 'pp_page',  array_keys( $pages ) );
+               $this->addWhereFld( 'pp_page', array_keys( $pages ) );
 
                if ( $this->params['continue'] ) {
                        $this->addWhere( 'pp_page >=' . intval( $this->params['continue'] ) );
index 182bc2c..1c9deb7 100644 (file)
@@ -211,7 +211,7 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase {
 
        public function getPossibleErrors() {
                return array_merge( parent::getPossibleErrors(), array(
-                        array( 'specialpage-cantexecute' )
+                       array( 'specialpage-cantexecute' )
                ) );
        }
 
index f7a22bd..6acca67 100644 (file)
@@ -234,7 +234,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                        $this->addFieldsIf( 'rc_comment', $this->fld_comment || $this->fld_parsedcomment );
                        $this->addFieldsIf( 'rc_user', $this->fld_user );
                        $this->addFieldsIf( 'rc_user_text', $this->fld_user || $this->fld_userid );
-                       $this->addFieldsIf( array( 'rc_minor', 'rc_type', 'rc_bot' ) , $this->fld_flags );
+                       $this->addFieldsIf( array( 'rc_minor', 'rc_type', 'rc_bot' ), $this->fld_flags );
                        $this->addFieldsIf( array( 'rc_old_len', 'rc_new_len' ), $this->fld_sizes );
                        $this->addFieldsIf( 'rc_patrolled', $this->fld_patrolled );
                        $this->addFieldsIf( array( 'rc_logid', 'rc_log_type', 'rc_log_action', 'rc_params' ), $this->fld_loginfo );
@@ -260,7 +260,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                if ( !is_null( $params['tag'] ) ) {
                        $this->addTables( 'change_tag' );
                        $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'rc_id=ct_rc_id' ) ) ) );
-                       $this->addWhereFld( 'ct_tag' , $params['tag'] );
+                       $this->addWhereFld( 'ct_tag', $params['tag'] );
                        global $wgOldChangeTagsIndex;
                        $index['change_tag'] = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id';
                }
index 27ea6be..9b54ee5 100644 (file)
@@ -189,7 +189,7 @@ class ApiQueryRevisions extends ApiQueryBase {
                if ( !is_null( $params['tag'] ) ) {
                        $this->addTables( 'change_tag' );
                        $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'rev_id=ct_rev_id' ) ) ) );
-                       $this->addWhereFld( 'ct_tag' , $params['tag'] );
+                       $this->addWhereFld( 'ct_tag', $params['tag'] );
                        global $wgOldChangeTagsIndex;
                        $index['change_tag'] = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id';
                }
index 2fef68a..3b4220c 100644 (file)
@@ -120,7 +120,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $data['sitename'] = $GLOBALS['wgSitename'];
                $data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}";
                $data['phpversion'] = phpversion();
-               $data['phpsapi'] = php_sapi_name();
+               $data['phpsapi'] = PHP_SAPI;
                $data['dbtype'] = $GLOBALS['wgDBtype'];
                $data['dbversion'] = $this->getDB()->getServerVersion();
 
@@ -462,7 +462,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                }
                                if ( isset( $ext['author'] ) ) {
                                        $ret['author'] = is_array( $ext['author'] ) ?
-                                               implode( ', ', $ext['author' ] ) : $ext['author'];
+                                               implode( ', ', $ext['author'] ) : $ext['author'];
                                }
                                if ( isset( $ext['url'] ) ) {
                                        $ret['url'] = $ext['url'];
index 4d1edf1..2410f05 100644 (file)
@@ -220,7 +220,7 @@ class ApiQueryContributions extends ApiQueryBase {
                ) );
 
                if ( isset( $show['patrolled'] ) || isset( $show['!patrolled'] ) ||
-                                $this->fld_patrolled ) {
+                               $this->fld_patrolled ) {
                        if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) {
                                $this->dieUsage( 'You need the patrol right to request the patrolled flag', 'permissiondenied' );
                        }
index 03a0b79..50ea587 100644 (file)
@@ -161,7 +161,7 @@ class ApiQueryUsers extends ApiQueryBase {
                                }
 
                                if ( isset( $this->prop['implicitgroups'] ) ) {
-                                       $data[$name]['implicitgroups'] =  $user->getAutomaticGroups();
+                                       $data[$name]['implicitgroups'] = $user->getAutomaticGroups();
                                }
 
                                if ( isset( $this->prop['rights'] ) ) {
index 03c10d0..2627396 100644 (file)
@@ -194,7 +194,7 @@ class ApiUpload extends ApiBase {
                $request = $this->getMain()->getRequest();
                $chunkPath = $request->getFileTempname( 'chunk' );
                $chunkSize = $request->getUpload( 'chunk' )->getSize();
-               if ($this->mParams['offset'] == 0) {
+               if ( $this->mParams['offset'] == 0 ) {
                        $result['filekey'] = $this->performStash();
                } else {
                        $status = $this->mUpload->addChunk(
@@ -246,7 +246,7 @@ class ApiUpload extends ApiBase {
                                        }
 
                                        // We have a new filekey for the fully concatenated file.
-                                       $result['filekey'] =  $this->mUpload->getLocalFile()->getFileKey();
+                                       $result['filekey'] = $this->mUpload->getLocalFile()->getFileKey();
 
                                        // Remove chunk from stash. (Checks against user ownership of chunks.)
                                        $this->mUpload->stash->removeFile( $this->mParams['filekey'] );
@@ -519,7 +519,7 @@ class ApiUpload extends ApiBase {
                                break;
                        default:
                                $this->dieUsage( 'An unknown error occurred', 'unknown-error',
-                                               0, array( 'code' =>  $verification['status'] ) );
+                                               0, array( 'code' => $verification['status'] ) );
                                break;
                }
        }
@@ -791,7 +791,7 @@ class ApiUpload extends ApiBase {
                        ' * Have the MediaWiki server fetch a file from a URL, using the "url" parameter',
                        ' * Complete an earlier upload that failed due to warnings, using the "filekey" parameter',
                        'Note that the HTTP POST must be done as a file upload (i.e. using multipart/form-data) when',
-                       'sending the "file".  Also you must get and send an edit token before doing any upload stuff'
+                       'sending the "file". Also you must get and send an edit token before doing any upload stuff'
                );
        }
 
index 5cdc867..c67b655 100644 (file)
@@ -404,7 +404,7 @@ class GlobalDependency extends CacheDependency {
         * @return bool
         */
        function isExpired() {
-               if( !isset($GLOBALS[$this->name]) ) {
+               if( !isset( $GLOBALS[$this->name] ) ) {
                        return true;
                }
                return $GLOBALS[$this->name] != $this->value;
index fca071a..6476646 100644 (file)
@@ -168,10 +168,10 @@ class HTMLFileCache extends FileCacheBase {
                $now = wfTimestampNow();
                if ( $this->useGzip() ) {
                        $text = str_replace(
-                               '</html>', '<!-- Cached/compressed '.$now." -->\n</html>", $text );
+                               '</html>', '<!-- Cached/compressed ' . $now . " -->\n</html>", $text );
                } else {
                        $text = str_replace(
-                               '</html>', '<!-- Cached '.$now." -->\n</html>", $text );
+                               '</html>', '<!-- Cached ' . $now . " -->\n</html>", $text );
                }
 
                // Store text to FS...
index e2cf1b4..bd4ce22 100644 (file)
@@ -545,7 +545,7 @@ class MessageCache {
                        $serialized = serialize( $cache );
                        $hash = md5( $serialized );
                        $this->mMemc->set( wfMemcKey( 'messages', $code, 'hash' ), $hash, $this->mExpiry );
-                       if ($wgLocalMessageCacheSerialized) {
+                       if ( $wgLocalMessageCacheSerialized ) {
                                $this->saveToLocal( $serialized, $hash, $code );
                        } else {
                                $this->saveToScript( $cache, $hash, $code );
index 926dea7..7341602 100644 (file)
@@ -75,7 +75,7 @@ abstract class AbstractContent implements Content {
                if ( $modelId !== $this->model_id ) {
                        throw new MWException(
                                "Bad content model: " .
-                               "expected {$this->model_id}  " .
+                               "expected {$this->model_id} " .
                                "but got $modelId."
                        );
                }
index b493715..5e0447f 100644 (file)
@@ -1074,7 +1074,7 @@ abstract class ContentHandler {
 
                        wfRestoreWarnings();
 
-                       wfWarn( "Using obsolete hook $event via ContentHandler::runLegacyHooks()! Handlers: " . implode(', ', $handlerInfo), 2 );
+                       wfWarn( "Using obsolete hook $event via ContentHandler::runLegacyHooks()! Handlers: " . implode( ', ', $handlerInfo ), 2 );
                }
 
                // convert Content objects to text
index 8d778f5..89aac20 100644 (file)
@@ -241,7 +241,7 @@ class WikitextContent extends TextContent {
                        case 'any':
                                return true;
                        case 'comma':
-                               return strpos( $text,  ',' ) !== false;
+                               return strpos( $text, ',' ) !== false;
                        case 'link':
                                if ( $hasLinks === null ) { # not known, find out
                                        if ( !$title ) {
index 4ff7913..56717b6 100644 (file)
@@ -100,12 +100,12 @@ class CloneDatabase {
 
                        if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) ) ) {
                                $this->db->dropTable( $tbl, __METHOD__ );
-                               wfDebug( __METHOD__." dropping {$newTableName}\n", true);
+                               wfDebug( __METHOD__ . " dropping {$newTableName}\n", true );
                                //Dropping the oldTable because the prefix was changed
                        }
 
                        # Create new table
-                       wfDebug( __METHOD__." duplicating $oldTableName to $newTableName\n", true );
+                       wfDebug( __METHOD__ . " duplicating $oldTableName to $newTableName\n", true );
                        $this->db->duplicateTableStructure( $oldTableName, $newTableName, $this->useTemporaryTables );
                }
        }
index 97e2fe2..7e865c1 100644 (file)
@@ -112,8 +112,8 @@ interface DatabaseType {
         * The value inserted should be fetched from nextSequenceValue()
         *
         * Example:
-        * $id = $dbw->nextSequenceValue('page_page_id_seq');
-        * $dbw->insert('page',array('page_id' => $id));
+        * $id = $dbw->nextSequenceValue( 'page_page_id_seq' );
+        * $dbw->insert( 'page', array( 'page_id' => $id ) );
         * $id = $dbw->insertId();
         *
         * @return int
@@ -393,7 +393,7 @@ abstract class DatabaseBase implements DatabaseType {
                return wfSetVar( $this->mTablePrefix, $prefix );
        }
 
-       /**
+       /**
         * Set the filehandle to copy write statements to.
         *
         * @param $fh filehandle
@@ -584,7 +584,7 @@ abstract class DatabaseBase implements DatabaseType {
                global $wgDebugDBTransactions;
                $this->mFlags |= $flag;
                if ( ( $flag & DBO_TRX) & $wgDebugDBTransactions ) {
-                       wfDebug("Implicit transactions are now  disabled.\n");
+                       wfDebug( "Implicit transactions are now  disabled.\n" );
                }
        }
 
@@ -597,7 +597,7 @@ abstract class DatabaseBase implements DatabaseType {
                global $wgDebugDBTransactions;
                $this->mFlags &= ~$flag;
                if ( ( $flag & DBO_TRX ) && $wgDebugDBTransactions ) {
-                       wfDebug("Implicit transactions are now disabled.\n");
+                       wfDebug( "Implicit transactions are now disabled.\n" );
                }
        }
 
@@ -671,12 +671,12 @@ abstract class DatabaseBase implements DatabaseType {
                        if ( $wgCommandLineMode ) {
                                $this->mFlags &= ~DBO_TRX;
                                if ( $wgDebugDBTransactions ) {
-                                       wfDebug("Implicit transaction open disabled.\n");
+                                       wfDebug( "Implicit transaction open disabled.\n" );
                                }
                        } else {
                                $this->mFlags |= DBO_TRX;
                                if ( $wgDebugDBTransactions ) {
-                                       wfDebug("Implicit transaction open enabled.\n");
+                                       wfDebug( "Implicit transaction open enabled.\n" );
                                }
                        }
                }
@@ -772,7 +772,7 @@ abstract class DatabaseBase implements DatabaseType {
         * @param $errno
         * @param $errstr
         */
-       protected function connectionErrorHandler( $errno,  $errstr ) {
+       protected function connectionErrorHandler( $errno, $errstr ) {
                $this->mPHPError = $errstr;
        }
 
@@ -921,7 +921,7 @@ abstract class DatabaseBase implements DatabaseType {
                        if ( strpos( $sqlstart, "SHOW " ) !== 0 && strpos( $sqlstart, "SET " ) !== 0 ) {
                                global $wgDebugDBTransactions;
                                if ( $wgDebugDBTransactions ) {
-                                       wfDebug("Implicit transaction start.\n");
+                                       wfDebug( "Implicit transaction start.\n" );
                                }
                                $this->begin( __METHOD__ . " ($fname)" );
                                $this->mTrxAutomatic = true;
@@ -1096,7 +1096,7 @@ abstract class DatabaseBase implements DatabaseType {
                        case '\\&': return '&';
                }
 
-               list( /* $n */ , $arg ) = each( $this->preparedArgs );
+               list( /* $n */, $arg ) = each( $this->preparedArgs );
 
                switch( $matches[1] ) {
                        case '?': return $this->addQuotes( $arg );
@@ -1419,7 +1419,7 @@ abstract class DatabaseBase implements DatabaseType {
         * join, the second is an SQL fragment giving the join condition for that
         * table. For example:
         *
-        *    array( 'page' => array('LEFT JOIN','page_latest=rev_id') )
+        *    array( 'page' => array( 'LEFT JOIN', 'page_latest=rev_id' ) )
         *
         * @return ResultWrapper. If the query returned no rows, a ResultWrapper
         *   with no rows in it will be returned. If there was a query error, a
@@ -2097,7 +2097,7 @@ abstract class DatabaseBase implements DatabaseType {
         * This is handy when you need to construct SQL for joins
         *
         * Example:
-        * extract($dbr->tableNames('user','watchlist'));
+        * extract( $dbr->tableNames( 'user', 'watchlist' ) );
         * $sql = "SELECT wl_namespace,wl_title FROM $watchlist,$user
         *         WHERE wl_user=user_id AND wl_user=$nameWithQuotes";
         *
@@ -2119,7 +2119,7 @@ abstract class DatabaseBase implements DatabaseType {
         * This is handy when you need to construct SQL for joins
         *
         * Example:
-        * list( $user, $watchlist ) = $dbr->tableNamesN('user','watchlist');
+        * list( $user, $watchlist ) = $dbr->tableNamesN( 'user', 'watchlist' );
         * $sql = "SELECT wl_namespace,wl_title FROM $watchlist,$user
         *         WHERE wl_user=user_id AND wl_user=$nameWithQuotes";
         *
@@ -2671,7 +2671,7 @@ abstract class DatabaseBase implements DatabaseType {
                list( $startOpts, $useIndex, $tailOpts ) = $this->makeSelectOptions( $selectOptions );
 
                if ( is_array( $srcTable ) ) {
-                       $srcTable =  implode( ',', array_map( array( &$this, 'tableName' ), $srcTable ) );
+                       $srcTable = implode( ',', array_map( array( &$this, 'tableName' ), $srcTable ) );
                } else {
                        $srcTable = $this->tableName( $srcTable );
                }
@@ -3466,7 +3466,7 @@ abstract class DatabaseBase implements DatabaseType {
                        // replace `{$var}`
                        $ins = str_replace( '`{$' . $var . '}`', $this->addIdentifierQuotes( $value ), $ins );
                        // replace /*$var*/
-                       $ins = str_replace( '/*$' . $var . '*/', $this->strencode( $value ) , $ins );
+                       $ins = str_replace( '/*$' . $var . '*/', $this->strencode( $value ), $ins );
                }
                return $ins;
        }
index b6d0d00..18b2733 100644 (file)
@@ -289,10 +289,10 @@ class DBQueryError extends DBError {
         * @param $fname string
         */
        function __construct( DatabaseBase &$db, $error, $errno, $sql, $fname ) {
-               $message = "A database error has occurred.  Did you forget to run maintenance/update.php after upgrading?  See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script\n" .
-                 "Query: $sql\n" .
-                 "Function: $fname\n" .
-                 "Error: $errno $error\n";
+               $message = "A database error has occurred. Did you forget to run maintenance/update.php after upgrading?  See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script\n" .
+                       "Query: $sql\n" .
+                       "Function: $fname\n" .
+                       "Error: $errno $error\n";
                parent::__construct( $db, $message );
 
                $this->error = $error;
index 03c1f9b..57fc7b9 100644 (file)
@@ -787,8 +787,8 @@ class DatabaseIbm_db2 extends DatabaseBase {
                // Wide characters are evil -- some of them look like '
                $s = utf8_encode( $s );
                // Fix its stupidity
-               $from = array(  "\\\\", "\\'",  '\\n',  '\\t',  '\\"',  '\\r' );
-               $to = array(            "\\",           "''",           "\n",           "\t",           '"',            "\r" );
+               $from = array( "\\\\", "\\'", '\\n', '\\t', '\\"', '\\r' );
+               $to = array( "\\", "''", "\n", "\t", '"', "\r" );
                $s = str_replace( $from, $to, $s ); // DB2 expects '', not \' escaping
                return $s;
        }
@@ -1115,10 +1115,10 @@ class DatabaseIbm_db2 extends DatabaseBase {
 
                // find out the primary keys
                $keyres = $this->doQuery( "SELECT NAME FROM SYSIBM.SYSCOLUMNS WHERE TBNAME = '"
-                 . strtoupper( $table )
-                 . "' AND TBCREATOR = '"
-                 . strtoupper( $schema )
-                 . "' AND KEYSEQ > 0" );
+                       . strtoupper( $table )
+                       . "' AND TBCREATOR = '"
+                       . strtoupper( $schema )
+                       . "' AND KEYSEQ > 0" );
 
                $keys = array();
                for (
index 8796a48..57ffd4f 100644 (file)
@@ -156,7 +156,7 @@ class DatabaseMssql extends DatabaseBase {
                // perform query
                $stmt = sqlsrv_query( $this->mConn, $sql );
                if ( $stmt == false ) {
-                       $message = "A database error has occurred.  Did you forget to run maintenance/update.php after upgrading?  See: http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script\n" .
+                       $message = "A database error has occurred. Did you forget to run maintenance/update.php after upgrading?  See: http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script\n" .
                                "Query: " . htmlentities( $sql ) . "\n" .
                                "Function: " . __METHOD__ . "\n";
                        // process each error (our driver will give us an array of errors unlike other providers)
@@ -319,7 +319,7 @@ class DatabaseMssql extends DatabaseBase {
                if ( isset( $options['EXPLAIN'] ) ) {
                        unset( $options['EXPLAIN'] );
                }
-               return parent::selectSQLText(  $table, $vars, $conds, $fname, $options, $join_conds );
+               return parent::selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds );
        }
 
        /**
@@ -484,7 +484,7 @@ class DatabaseMssql extends DatabaseBase {
                                } elseif ( is_array( $value ) || is_object( $value ) ) {
                                        if ( is_object( $value ) && strtolower( get_class( $value ) ) == 'blob' ) {
                                                $sql .= $this->addQuotes( $value );
-                                       }  else {
+                                       } else {
                                                $sql .= $this->addQuotes( serialize( $value ) );
                                        }
                                } else {
@@ -608,9 +608,9 @@ class DatabaseMssql extends DatabaseBase {
                } else {
                        $sql = '
                                SELECT * FROM (
-                                 SELECT sub2.*, ROW_NUMBER() OVER(ORDER BY sub2.line2) AS line3 FROM (
-                                       SELECT 1 AS line2, sub1.* FROM (' . $sql . ') AS sub1
-                                 ) as sub2
+                                       SELECT sub2.*, ROW_NUMBER() OVER(ORDER BY sub2.line2) AS line3 FROM (
+                                               SELECT 1 AS line2, sub1.* FROM (' . $sql . ') AS sub1
+                                       ) as sub2
                                ) AS sub3
                                WHERE line3 BETWEEN ' . ( $offset + 1 ) . ' AND ' . ( $offset + $limit );
                        return $sql;
@@ -770,17 +770,17 @@ class DatabaseMssql extends DatabaseBase {
                $newUser = $this->escapeIdentifier( $newUser );
                $loginPassword = $this->addQuotes( $loginPassword );
 
-               $this->doQuery("CREATE DATABASE $dbName;");
-               $this->doQuery("USE $dbName;");
-               $this->doQuery("CREATE SCHEMA $dbName;");
-               $this->doQuery("
+               $this->doQuery( "CREATE DATABASE $dbName;" );
+               $this->doQuery( "USE $dbName;" );
+               $this->doQuery( "CREATE SCHEMA $dbName;" );
+               $this->doQuery( "
                                                CREATE
                                                        LOGIN $newUser
                                                WITH
                                                        PASSWORD=$loginPassword
                                                ;
-                                       ");
-               $this->doQuery("
+                                       " );
+               $this->doQuery( "
                                                CREATE
                                                        USER $newUser
                                                FOR
@@ -788,8 +788,8 @@ class DatabaseMssql extends DatabaseBase {
                                                WITH
                                                        DEFAULT_SCHEMA=$dbName
                                                ;
-                                       ");
-               $this->doQuery("
+                                       " );
+               $this->doQuery( "
                                                GRANT
                                                        BACKUP DATABASE,
                                                        BACKUP LOG,
@@ -804,15 +804,15 @@ class DatabaseMssql extends DatabaseBase {
                                                        DATABASE::$dbName
                                                TO $newUser
                                                ;
-                                       ");
-               $this->doQuery("
+                                       " );
+               $this->doQuery( "
                                                GRANT
                                                        CONTROL
                                                ON
                                                        SCHEMA::$dbName
                                                TO $newUser
                                                ;
-                                       ");
+                                       " );
 
 
        }
@@ -917,7 +917,7 @@ class DatabaseMssql extends DatabaseBase {
                }
 
                // we want this to be compatible with the output of parent::makeSelectOptions()
-               return array( $startOpts, '' , $tailOpts, '' );
+               return array( $startOpts, '', $tailOpts, '' );
        }
 
        /**
index 04c22f1..c5100b5 100644 (file)
@@ -361,7 +361,7 @@ class DatabaseMysql extends DatabaseBase {
         * @param $options string|array
         * @return int
         */
-       public function estimateRowCount( $table, $vars='*', $conds='', $fname = 'DatabaseMysql::estimateRowCount', $options = array() ) {
+       public function estimateRowCount( $table, $vars = '*', $conds = '', $fname = 'DatabaseMysql::estimateRowCount', $options = array() ) {
                $options['EXPLAIN'] = true;
                $res = $this->select( $table, $vars, $conds, $fname, $options );
                if ( $res === false ) {
@@ -393,7 +393,7 @@ class DatabaseMysql extends DatabaseBase {
                for( $i = 0; $i < $n; $i++ ) {
                        $meta = mysql_fetch_field( $res->result, $i );
                        if( $field == $meta->name ) {
-                               return new MySQLField($meta);
+                               return new MySQLField( $meta );
                        }
                }
                return false;
@@ -449,7 +449,7 @@ class DatabaseMysql extends DatabaseBase {
        function strencode( $s ) {
                $sQuoted = mysql_real_escape_string( $s, $this->mConn );
 
-               if($sQuoted === false) {
+               if( $sQuoted === false ) {
                        $this->ping();
                        $sQuoted = mysql_real_escape_string( $s, $this->mConn );
                }
@@ -685,7 +685,7 @@ class DatabaseMysql extends DatabaseBase {
 
        public function streamStatementEnd( &$sql, &$newLine ) {
                if ( strtoupper( substr( $newLine, 0, 9 ) ) == 'DELIMITER' ) {
-                       preg_match( '/^DELIMITER\s+(\S+)/' , $newLine, $m );
+                       preg_match( '/^DELIMITER\s+(\S+)/', $newLine, $m );
                        $this->delimiter = $m[1];
                        $newLine = '';
                }
@@ -721,7 +721,7 @@ class DatabaseMysql extends DatabaseBase {
                if( $row->lockstatus == 1 ) {
                        return true;
                } else {
-                       wfDebug( __METHOD__." failed to acquire lock\n" );
+                       wfDebug( __METHOD__ . " failed to acquire lock\n" );
                        return false;
                }
        }
@@ -899,7 +899,7 @@ class DatabaseMysql extends DatabaseBase {
                $endArray = array();
 
                foreach( $result as $table ) {
-                       $vars = get_object_vars($table);
+                       $vars = get_object_vars( $table );
                        $table = array_pop( $vars );
 
                        if( !$prefix || strpos( $table, $prefix ) === 0 ) {
index ed9f324..5195a83 100644 (file)
@@ -23,7 +23,7 @@
 
 /**
  * The oci8 extension is fairly weak and doesn't support oci_num_rows, among
- * other things.  We use a wrapper class to handle that and other
+ * other things. We use a wrapper class to handle that and other
  * Oracle-specific bits, like converting column names back to lowercase.
  * @ingroup Database
  */
@@ -69,7 +69,7 @@ class ORAResult {
                        $this->nrows = count( $this->rows );
                }
 
-               if ($this->nrows > 0) {
+               if ( $this->nrows > 0 ) {
                        foreach ( $this->rows[0] as $k => $v ) {
                                $this->columns[$k] = strtolower( oci_field_name( $stmt, $k + 1 ) );
                        }
@@ -80,7 +80,7 @@ class ORAResult {
        }
 
        public function free() {
-               unset($this->db);
+               unset( $this->db );
        }
 
        public function seek( $row ) {
@@ -92,7 +92,7 @@ class ORAResult {
        }
 
        public function numFields() {
-               return count($this->columns);
+               return count( $this->columns );
        }
 
        public function fetchObject() {
@@ -633,7 +633,7 @@ class DatabaseOracle extends DatabaseBase {
                }
                list( $startOpts, $useIndex, $tailOpts ) = $this->makeSelectOptions( $selectOptions );
                if ( is_array( $srcTable ) ) {
-                       $srcTable =  implode( ',', array_map( array( &$this, 'tableName' ), $srcTable ) );
+                       $srcTable = implode( ',', array_map( array( &$this, 'tableName' ), $srcTable ) );
                } else {
                        $srcTable = $this->tableName( $srcTable );
                }
@@ -778,8 +778,8 @@ class DatabaseOracle extends DatabaseBase {
 
        function listTables( $prefix = null, $fname = 'DatabaseOracle::listTables' ) {
                $listWhere = '';
-               if (!empty($prefix)) {
-                       $listWhere = ' AND table_name LIKE \''.strtoupper($prefix).'%\'';
+               if ( !empty( $prefix ) ) {
+                       $listWhere = ' AND table_name LIKE \'' . strtoupper( $prefix ) . '%\'';
                }
 
                $owner = strtoupper( $this->mDBname );
@@ -787,12 +787,12 @@ class DatabaseOracle extends DatabaseBase {
 
                // dirty code ... i know
                $endArray = array();
-               $endArray[] = strtoupper($prefix.'MWUSER');
-               $endArray[] = strtoupper($prefix.'PAGE');
-               $endArray[] = strtoupper($prefix.'IMAGE');
+               $endArray[] = strtoupper( $prefix . 'MWUSER' );
+               $endArray[] = strtoupper( $prefix . 'PAGE' );
+               $endArray[] = strtoupper( $prefix . 'IMAGE' );
                $fixedOrderTabs = $endArray;
-               while (($row = $result->fetchRow()) !== false) {
-                       if (!in_array($row['table_name'], $fixedOrderTabs))
+               while ( ($row = $result->fetchRow()) !== false ) {
+                       if ( !in_array( $row['table_name'], $fixedOrderTabs ) )
                                $endArray[] = $row['table_name'];
                }
 
@@ -800,7 +800,7 @@ class DatabaseOracle extends DatabaseBase {
        }
 
        public function dropTable( $tableName, $fName = 'DatabaseOracle::dropTable' ) {
-               $tableName = $this->tableName($tableName);
+               $tableName = $this->tableName( $tableName );
                if( !$this->tableExists( $tableName ) ) {
                        return false;
                }
@@ -846,7 +846,7 @@ class DatabaseOracle extends DatabaseBase {
        function getServerVersion() {
                //better version number, fallback on driver
                $rset = $this->doQuery( 'SELECT version FROM product_component_version WHERE UPPER(product) LIKE \'ORACLE DATABASE%\'' );
-               if ( !( $row =  $rset->fetchRow() ) ) {
+               if ( !( $row = $rset->fetchRow() ) ) {
                        return oci_server_version( $this->mConn );
                }
                return $row['version'];
@@ -907,7 +907,7 @@ class DatabaseOracle extends DatabaseBase {
                        $table = array_map( array( &$this, 'tableNameInternal' ), $table );
                        $tableWhere = 'IN (';
                        foreach( $table as &$singleTable ) {
-                               $singleTable = $this->removeIdentifierQuotes($singleTable);
+                               $singleTable = $this->removeIdentifierQuotes( $singleTable );
                                if ( isset( $this->mFieldInfoCache["$singleTable.$field"] ) ) {
                                        return $this->mFieldInfoCache["$singleTable.$field"];
                                }
@@ -915,14 +915,14 @@ class DatabaseOracle extends DatabaseBase {
                        }
                        $tableWhere = rtrim( $tableWhere, ',' ) . ')';
                } else {
-                       $table = $this->removeIdentifierQuotes(  $this->tableNameInternal( $table ) );
+                       $table = $this->removeIdentifierQuotes( $this->tableNameInternal( $table ) );
                        if ( isset( $this->mFieldInfoCache["$table.$field"] ) ) {
                                return $this->mFieldInfoCache["$table.$field"];
                        }
                        $tableWhere = '= \''.$table.'\'';
                }
 
-               $fieldInfoStmt = oci_parse( $this->mConn, 'SELECT * FROM wiki_field_info_full WHERE table_name '.$tableWhere.' and column_name = \''.$field.'\'' );
+               $fieldInfoStmt = oci_parse( $this->mConn, 'SELECT * FROM wiki_field_info_full WHERE table_name ' . $tableWhere . ' and column_name = \'' . $field . '\'' );
                if ( oci_execute( $fieldInfoStmt, $this->execFlags() ) === false ) {
                        $e = oci_error( $fieldInfoStmt );
                        $this->reportQueryError( $e['message'], $e['code'], 'fieldInfo QUERY', __METHOD__ );
@@ -957,7 +957,7 @@ class DatabaseOracle extends DatabaseBase {
                if ( is_array( $table ) ) {
                        throw new DBUnexpectedError( $this, 'DatabaseOracle::fieldInfo called with table array!' );
                }
-               return $this->fieldInfoMulti ($table, $field);
+               return $this->fieldInfoMulti( $table, $field );
        }
 
        protected function doBegin( $fname = 'DatabaseOracle::begin' ) {
@@ -1066,7 +1066,7 @@ class DatabaseOracle extends DatabaseBase {
                if ( $db == null || $db == $this->mUser ) {
                        return true;
                }
-               $sql = 'ALTER SESSION SET CURRENT_SCHEMA=' . strtoupper($db);
+               $sql = 'ALTER SESSION SET CURRENT_SCHEMA=' . strtoupper( $db );
                $stmt = oci_parse( $this->mConn, $sql );
                wfSuppressWarnings();
                $success = oci_execute( $stmt );
@@ -1101,11 +1101,11 @@ class DatabaseOracle extends DatabaseBase {
        }
 
        public function removeIdentifierQuotes( $s ) {
-               return strpos($s, '/*Q*/') === FALSE ? $s : substr($s, 5);
+               return strpos( $s, '/*Q*/' ) === FALSE ? $s : substr( $s, 5 );
        }
 
        public function isQuotedIdentifier( $s ) {
-               return strpos($s, '/*Q*/') !== FALSE;
+               return strpos( $s, '/*Q*/' ) !== FALSE;
        }
 
        private function wrapFieldForWhere( $table, &$col, &$val ) {
@@ -1139,7 +1139,7 @@ class DatabaseOracle extends DatabaseBase {
        }
 
        function selectRow( $table, $vars, $conds, $fname = 'DatabaseOracle::selectRow', $options = array(), $join_conds = array() ) {
-               if ( is_array($conds) ) {
+               if ( is_array( $conds ) ) {
                        $conds = $this->wrapConditionsForWhere( $table, $conds );
                }
                return parent::selectRow( $table, $vars, $conds, $fname, $options, $join_conds );
@@ -1186,15 +1186,15 @@ class DatabaseOracle extends DatabaseBase {
 
                return array( $startOpts, $useIndex, $preLimitTail, $postLimitTail );
        }
-       
+
        public function delete( $table, $conds, $fname = 'DatabaseOracle::delete' ) {
-               if ( is_array($conds) ) {
+               if ( is_array( $conds ) ) {
                        $conds = $this->wrapConditionsForWhere( $table, $conds );
                }
                // a hack for deleting pages, users and images (which have non-nullable FKs)
                // all deletions on these tables have transactions so final failure rollbacks these updates
                $table = $this->tableName( $table );
-               if ( $table == $this->tableName( 'user' )  ) {
+               if ( $table == $this->tableName( 'user' ) ) {
                                $this->update( 'archive', array( 'ar_user' => 0 ), array( 'ar_user' => $conds['user_id'] ), $fname );
                                $this->update( 'ipblocks', array( 'ipb_user' => 0 ), array( 'ipb_user' => $conds['user_id'] ), $fname );
                                $this->update( 'image', array( 'img_user' => 0 ), array( 'img_user' => $conds['user_id'] ), $fname );
@@ -1204,7 +1204,7 @@ class DatabaseOracle extends DatabaseBase {
                                $this->update( 'uploadstash', array( 'us_user' => 0 ), array( 'us_user' => $conds['user_id'] ), $fname );
                                $this->update( 'recentchanges', array( 'rc_user' => 0 ), array( 'rc_user' => $conds['user_id'] ), $fname );
                                $this->update( 'logging', array( 'log_user' => 0 ), array( 'log_user' => $conds['user_id'] ), $fname );
-               } elseif ( $table == $this->tableName( 'image' )  ) {
+               } elseif ( $table == $this->tableName( 'image' ) ) {
                                $this->update( 'oldimage', array( 'oi_name' => 0 ), array( 'oi_name' => $conds['img_name'] ), $fname );
                }
                return parent::delete( $table, $conds, $fname );
index 8d02cee..86b8e8a 100644 (file)
@@ -176,8 +176,8 @@ class PostgresTransactionState {
                                $old = reset( $this->mCurrentState );
                                $new = reset( $this->mNewState );
                                foreach ( self::$WATCHED as $watched ) {
-                                       if ($old !== $new) {
-                                               $this->log_changed($old, $new, $watched);
+                                       if ( $old !== $new ) {
+                                               $this->log_changed( $old, $new, $watched );
                                        }
                                        $old = next( $this->mCurrentState );
                                        $new = next( $this->mNewState );
@@ -197,11 +197,11 @@ class PostgresTransactionState {
        }
 
        protected function log_changed( $old, $new, $watched ) {
-               wfDebug(sprintf($watched["desc"],
+               wfDebug( sprintf( $watched["desc"],
                        $this->mConn,
                        $this->describe_changed( $old, $watched["states"] ),
-                       $this->describe_changed( $new, $watched["states"] ))
-               );
+                       $this->describe_changed( $new, $watched["states"] )
+               ) );
        }
 }
 
@@ -218,7 +218,7 @@ class SavepointPostgres {
        protected $id;
        protected $didbegin;
 
-       public function __construct ($dbw, $id) {
+       public function __construct ( $dbw, $id ) {
                $this->dbw = $dbw;
                $this->id = $id;
                $this->didbegin = false;
@@ -247,29 +247,29 @@ class SavepointPostgres {
                global $wgDebugDBTransactions;
                if ( $this->dbw->doQuery( $keyword . " " . $this->id ) !== false ) {
                        if ( $wgDebugDBTransactions ) {
-                               wfDebug( sprintf ($msg_ok, $this->id ) );
+                               wfDebug( sprintf ( $msg_ok, $this->id ) );
                        }
                } else {
-                       wfDebug( sprintf ($msg_failed, $this->id ) );
+                       wfDebug( sprintf ( $msg_failed, $this->id ) );
                }
        }
 
        public function savepoint() {
-               $this->query("SAVEPOINT",
+               $this->query( "SAVEPOINT",
                        "Transaction state: savepoint \"%s\" established.\n",
                        "Transaction state: establishment of savepoint \"%s\" FAILED.\n"
                );
        }
 
        public function release() {
-               $this->query("RELEASE",
+               $this->query( "RELEASE",
                        "Transaction state: savepoint \"%s\" released.\n",
                        "Transaction state: release of savepoint \"%s\" FAILED.\n"
                );
        }
 
        public function rollback() {
-               $this->query("ROLLBACK TO",
+               $this->query( "ROLLBACK TO",
                        "Transaction state: savepoint \"%s\" rolled back.\n",
                        "Transaction state: rollback of savepoint \"%s\" FAILED.\n"
                );
@@ -606,7 +606,7 @@ class DatabasePostgres extends DatabaseBase {
         * Takes same arguments as Database::select()
         * @return int
         */
-       function estimateRowCount( $table, $vars = '*', $conds='', $fname = 'DatabasePostgres::estimateRowCount', $options = array() ) {
+       function estimateRowCount( $table, $vars = '*', $conds = '', $fname = 'DatabasePostgres::estimateRowCount', $options = array() ) {
                $options['EXPLAIN'] = true;
                $res = $this->select( $table, $vars, $conds, $fname, $options );
                $rows = -1;
@@ -684,7 +684,7 @@ class DatabasePostgres extends DatabaseBase {
                                        AND     i.indclass[s.g] = opcls.oid
                                        AND     pg_am.oid = opcls.opcmethod
 __INDEXATTR__;
-               $res = $this->query($sql, __METHOD__);
+               $res = $this->query( $sql, __METHOD__ );
                $a = array();
                if ( $res ) {
                        foreach ( $res as $row ) {
@@ -692,7 +692,7 @@ __INDEXATTR__;
                                        $row->attname,
                                        $row->opcname,
                                        $row->amname,
-                                       $row->option);
+                                       $row->option );
                        }
                } else {
                        return null;
@@ -735,7 +735,7 @@ __INDEXATTR__;
                }
 
                $table = $this->tableName( $table );
-               if (isset( $this->numeric_version ) ) {
+               if ( !isset( $this->numeric_version ) ) {
                        $this->getServerVersion();
                }
 
@@ -987,7 +987,7 @@ __INDEXATTR__;
                $endArray = array();
 
                foreach( $result as $table ) {
-                       $vars = get_object_vars($table);
+                       $vars = get_object_vars( $table );
                        $table = array_pop( $vars );
                        if( !$prefix || strpos( $table, $prefix ) === 0 ) {
                                $endArray[] = $table;
@@ -1068,7 +1068,7 @@ __INDEXATTR__;
         * @return string return default schema for the current session
         */
        function getCurrentSchema() {
-               $res = $this->query( "SELECT current_schema()", __METHOD__);
+               $res = $this->query( "SELECT current_schema()", __METHOD__ );
                $row = $this->fetchRow( $res );
                return $row[0];
        }
@@ -1084,11 +1084,11 @@ __INDEXATTR__;
         * @return array list of actual schemas for the current sesson
         */
        function getSchemas() {
-               $res = $this->query( "SELECT current_schemas(false)", __METHOD__);
+               $res = $this->query( "SELECT current_schemas(false)", __METHOD__ );
                $row = $this->fetchRow( $res );
                $schemas = array();
                /* PHP pgsql support does not support array type, "{a,b}" string is returned */
-               return $this->pg_array_parse($row[0], $schemas);
+               return $this->pg_array_parse( $row[0], $schemas );
        }
 
        /**
@@ -1101,10 +1101,10 @@ __INDEXATTR__;
         * @return array how to search for table names schemas for the current user
         */
        function getSearchPath() {
-               $res = $this->query( "SHOW search_path", __METHOD__);
+               $res = $this->query( "SHOW search_path", __METHOD__ );
                $row = $this->fetchRow( $res );
                /* PostgreSQL returns SHOW values as strings */
-               return explode(",", $row[0]);
+               return explode( ",", $row[0] );
        }
 
        /**
@@ -1115,7 +1115,7 @@ __INDEXATTR__;
         * @param $search_path array list of schemas to be searched by default
         */
        function setSearchPath( $search_path ) {
-               $this->query( "SET search_path = " . implode(", ", $search_path) );
+               $this->query( "SET search_path = " . implode( ", ", $search_path ) );
        }
 
        /**
@@ -1136,7 +1136,7 @@ __INDEXATTR__;
                if ( $this->schemaExists( $desired_schema ) ) {
                        if ( in_array( $desired_schema, $this->getSchemas() ) ) {
                                $this->mCoreSchema = $desired_schema;
-                               wfDebug("Schema \"" . $desired_schema . "\" already in the search path\n");
+                               wfDebug( "Schema \"" . $desired_schema . "\" already in the search path\n" );
                        } else {
                                /**
                                 * Prepend our schema (e.g. 'mediawiki') in front
@@ -1148,11 +1148,11 @@ __INDEXATTR__;
                                        $this->addIdentifierQuotes( $desired_schema ));
                                $this->setSearchPath( $search_path );
                                $this->mCoreSchema = $desired_schema;
-                               wfDebug("Schema \"" . $desired_schema . "\" added to the search path\n");
+                               wfDebug( "Schema \"" . $desired_schema . "\" added to the search path\n" );
                        }
                } else {
                        $this->mCoreSchema = $this->getCurrentSchema();
-                       wfDebug("Schema \"" . $desired_schema . "\" not found, using current \"". $this->mCoreSchema ."\"\n");
+                       wfDebug( "Schema \"" . $desired_schema . "\" not found, using current \"" . $this->mCoreSchema . "\"\n" );
                }
                /* Commit SET otherwise it will be rollbacked on error or IGNORE SELECT */
                $this->commit( __METHOD__ );
@@ -1258,8 +1258,8 @@ SQL;
        }
 
        function constraintExists( $table, $constraint ) {
-               $SQL = sprintf( "SELECT 1 FROM information_schema.table_constraints ".
-                          "WHERE constraint_schema = %s AND table_name = %s AND constraint_name = %s",
+               $SQL = sprintf( "SELECT 1 FROM information_schema.table_constraints " .
+                               "WHERE constraint_schema = %s AND table_name = %s AND constraint_name = %s",
                        $this->addQuotes( $this->getCoreSchema() ),
                        $this->addQuotes( $table ),
                        $this->addQuotes( $constraint )
index 7e95fd3..9120c28 100644 (file)
@@ -163,7 +163,7 @@ class DatabaseSqlite extends DatabaseBase {
                        $res = $this->query( "SELECT sql FROM sqlite_master WHERE tbl_name = '$table'", __METHOD__ );
                        if ( $res ) {
                                $row = $res->fetchRow();
-                               self::$fulltextEnabled = stristr($row['sql'], 'fts' ) !== false;
+                               self::$fulltextEnabled = stristr( $row['sql'], 'fts' ) !== false;
                        }
                }
                return self::$fulltextEnabled;
@@ -850,7 +850,7 @@ class DatabaseSqlite extends DatabaseBase {
                $endArray = array();
 
                foreach( $result as $table ) {
-                       $vars = get_object_vars($table);
+                       $vars = get_object_vars( $table );
                        $table = array_pop( $vars );
 
                        if( !$prefix || strpos( $table, $prefix ) === 0 ) {
index 064bc41..5e11076 100644 (file)
@@ -138,7 +138,7 @@ class ResultWrapper implements Iterator {
 
        /**
         * Fetch the next row from the given result object, in associative array
-        * form.  Fields are retrieved with $row['fieldname'].
+        * form. Fields are retrieved with $row['fieldname'].
         *
         * @return Array
         * @throws DBUnexpectedError Thrown if the database returns an error
index e82c54b..cc7f133 100644 (file)
@@ -240,7 +240,7 @@ class LBFactory_Simple extends LBFactory {
        function newExternalLB( $cluster, $wiki = false ) {
                global $wgExternalServers;
                if ( !isset( $wgExternalServers[$cluster] ) ) {
-                       throw new MWException( __METHOD__.": Unknown cluster \"$cluster\"" );
+                       throw new MWException( __METHOD__ . ": Unknown cluster \"$cluster\"" );
                }
                return new LoadBalancer( array(
                        'servers' => $wgExternalServers[$cluster]
@@ -345,7 +345,7 @@ class ChronologyProtector {
                if ( $lb->getServerCount() > 1 && !empty( $this->startupPos[$masterName] ) ) {
                        $info = $lb->parentInfo();
                        $pos = $this->startupPos[$masterName];
-                       wfDebug( __METHOD__.": LB " . $info['id'] . " waiting for master pos $pos\n" );
+                       wfDebug( __METHOD__ . ": LB " . $info['id'] . " waiting for master pos $pos\n" );
                        $lb->waitFor( $this->startupPos[$masterName] );
                }
        }
@@ -370,11 +370,11 @@ class ChronologyProtector {
                $db = $lb->getAnyOpenConnection( 0 );
                $info = $lb->parentInfo();
                if ( !$db || !$db->doneWrites() ) {
-                       wfDebug( __METHOD__.": LB {$info['id']}, no writes done\n" );
+                       wfDebug( __METHOD__ . ": LB {$info['id']}, no writes done\n" );
                        return;
                }
                $pos = $db->getMasterPos();
-               wfDebug( __METHOD__.": LB {$info['id']} has master pos $pos\n" );
+               wfDebug( __METHOD__ . ": LB {$info['id']} has master pos $pos\n" );
                $this->shutdownPos[$masterName] = $pos;
        }
 
@@ -384,7 +384,7 @@ class ChronologyProtector {
         */
        function shutdown() {
                if ( session_id() != '' && count( $this->shutdownPos ) ) {
-                       wfDebug( __METHOD__.": saving master pos for " .
+                       wfDebug( __METHOD__ . ": saving master pos for " .
                                count( $this->shutdownPos ) . " master(s)\n" );
                        $_SESSION[__CLASS__] = $this->shutdownPos;
                }
index 9b468a7..88b7500 100644 (file)
@@ -83,7 +83,7 @@ class LBFactory_Multi extends LBFactory {
 
                foreach ( $required as $key ) {
                        if ( !isset( $conf[$key] ) ) {
-                               throw new MWException( __CLASS__.": $key is required in configuration" );
+                               throw new MWException( __CLASS__ . ": $key is required in configuration" );
                        }
                        $this->$key = $conf[$key];
                }
@@ -161,7 +161,7 @@ class LBFactory_Multi extends LBFactory {
         */
        function newExternalLB( $cluster, $wiki = false ) {
                if ( !isset( $this->externalLoads[$cluster] ) ) {
-                       throw new MWException( __METHOD__.": Unknown cluster \"$cluster\"" );
+                       throw new MWException( __METHOD__ . ": Unknown cluster \"$cluster\"" );
                }
                $template = $this->serverTemplate;
                if ( isset( $this->externalTemplateOverrides ) ) {
index 2a0c50f..d42a152 100644 (file)
@@ -45,7 +45,7 @@ class LoadBalancer {
         */
        function __construct( $params ) {
                if ( !isset( $params['servers'] ) ) {
-                       throw new MWException( __CLASS__.': missing servers parameter' );
+                       throw new MWException( __CLASS__ . ': missing servers parameter' );
                }
                $this->mServers = $params['servers'];
 
@@ -205,7 +205,7 @@ class LoadBalancer {
                global $wgReadOnly, $wgDBClusterTimeout, $wgDBAvgStatusPoll, $wgDBtype;
 
                # @todo FIXME: For now, only go through all this for mysql databases
-               if ($wgDBtype != 'mysql') {
+               if ( $wgDBtype != 'mysql' ) {
                        return $this->getWriterIndex();
                }
 
@@ -230,7 +230,7 @@ class LoadBalancer {
                                $nonErrorLoads = $this->mGroupLoads[$group];
                        } else {
                                # No loads for this group, return false and the caller can use some other group
-                               wfDebug( __METHOD__.": no loads for group $group\n" );
+                               wfDebug( __METHOD__ . ": no loads for group $group\n" );
                                wfProfileOut( __METHOD__ );
                                return false;
                        }
@@ -272,16 +272,16 @@ class LoadBalancer {
                                        # pickRandom() returned false
                                        # This is permanent and means the configuration or the load monitor
                                        # wants us to return false.
-                                       wfDebugLog( 'connect', __METHOD__.": pickRandom() returned false\n" );
+                                       wfDebugLog( 'connect', __METHOD__ . ": pickRandom() returned false\n" );
                                        wfProfileOut( __METHOD__ );
                                        return false;
                                }
 
-                               wfDebugLog( 'connect', __METHOD__.": Using reader #$i: {$this->mServers[$i]['host']}...\n" );
+                               wfDebugLog( 'connect', __METHOD__ . ": Using reader #$i: {$this->mServers[$i]['host']}...\n" );
                                $conn = $this->openConnection( $i, $wiki );
 
                                if ( !$conn ) {
-                                       wfDebugLog( 'connect', __METHOD__.": Failed connecting to $i/$wiki\n" );
+                                       wfDebugLog( 'connect', __METHOD__ . ": Failed connecting to $i/$wiki\n" );
                                        unset( $nonErrorLoads[$i] );
                                        unset( $currentLoads[$i] );
                                        continue;
@@ -320,7 +320,7 @@ class LoadBalancer {
 
                        # Some servers must have been overloaded
                        if ( $overloadedServers == 0 ) {
-                               throw new MWException( __METHOD__.": unexpectedly found no overloaded servers" );
+                               throw new MWException( __METHOD__ . ": unexpectedly found no overloaded servers" );
                        }
                        # Back off for a while
                        # Scale the sleep time by the number of connected threads, to produce a
@@ -358,7 +358,7 @@ class LoadBalancer {
         */
        function sleep( $t ) {
                wfProfileIn( __METHOD__ );
-               wfDebug( __METHOD__.": waiting $t us\n" );
+               wfDebug( __METHOD__ . ": waiting $t us\n" );
                usleep( $t );
                wfProfileOut( __METHOD__ );
                return $t;
@@ -435,15 +435,15 @@ class LoadBalancer {
                        }
                }
 
-               wfDebug( __METHOD__.": Waiting for slave #$index to catch up...\n" );
+               wfDebug( __METHOD__ . ": Waiting for slave #$index to catch up...\n" );
                $result = $conn->masterPosWait( $this->mWaitForPos, $this->mWaitTimeout );
 
                if ( $result == -1 || is_null( $result ) ) {
                        # Timed out waiting for slave, use master instead
-                       wfDebug( __METHOD__.": Timed out waiting for slave #$index pos {$this->mWaitForPos}\n" );
+                       wfDebug( __METHOD__ . ": Timed out waiting for slave #$index pos {$this->mWaitForPos}\n" );
                        return false;
                } else {
-                       wfDebug( __METHOD__.": Done\n" );
+                       wfDebug( __METHOD__ . ": Done\n" );
                        return true;
                }
        }
@@ -479,7 +479,7 @@ class LoadBalancer {
                        $groupIndex = $this->getReaderIndex( $groups, $wiki );
                        if ( $groupIndex !== false ) {
                                $serverName = $this->getServerName( $groupIndex );
-                               wfDebug( __METHOD__.": using server $serverName for group $groups\n" );
+                               wfDebug( __METHOD__ . ": using server $serverName for group $groups\n" );
                                $i = $groupIndex;
                        }
                } else {
@@ -487,7 +487,7 @@ class LoadBalancer {
                                $groupIndex = $this->getReaderIndex( $group, $wiki );
                                if ( $groupIndex !== false ) {
                                        $serverName = $this->getServerName( $groupIndex );
-                                       wfDebug( __METHOD__.": using server $serverName for group $group\n" );
+                                       wfDebug( __METHOD__ . ": using server $serverName for group $group\n" );
                                        $i = $groupIndex;
                                        break;
                                }
@@ -525,8 +525,8 @@ class LoadBalancer {
         * @throws MWException
         */
        public function reuseConnection( $conn ) {
-               $serverIndex = $conn->getLBInfo('serverIndex');
-               $refCount = $conn->getLBInfo('foreignPoolRefCount');
+               $serverIndex = $conn->getLBInfo( 'serverIndex' );
+               $refCount = $conn->getLBInfo( 'foreignPoolRefCount' );
                $dbName = $conn->getDBname();
                $prefix = $conn->tablePrefix();
                if ( strval( $prefix ) !== '' ) {
@@ -535,7 +535,7 @@ class LoadBalancer {
                        $wiki = $dbName;
                }
                if ( $serverIndex === null || $refCount === null ) {
-                       wfDebug( __METHOD__.": this connection was not opened as a foreign connection\n" );
+                       wfDebug( __METHOD__ . ": this connection was not opened as a foreign connection\n" );
                        /**
                         * This can happen in code like:
                         *   foreach ( $dbs as $db ) {
@@ -549,15 +549,15 @@ class LoadBalancer {
                        return;
                }
                if ( $this->mConns['foreignUsed'][$serverIndex][$wiki] !== $conn ) {
-                       throw new MWException( __METHOD__.": connection not found, has the connection been freed already?" );
+                       throw new MWException( __METHOD__ . ": connection not found, has the connection been freed already?" );
                }
                $conn->setLBInfo( 'foreignPoolRefCount', --$refCount );
                if ( $refCount <= 0 ) {
                        $this->mConns['foreignFree'][$serverIndex][$wiki] = $conn;
                        unset( $this->mConns['foreignUsed'][$serverIndex][$wiki] );
-                       wfDebug( __METHOD__.": freed connection $serverIndex/$wiki\n" );
+                       wfDebug( __METHOD__ . ": freed connection $serverIndex/$wiki\n" );
                } else {
-                       wfDebug( __METHOD__.": reference count for $serverIndex/$wiki reduced to $refCount\n" );
+                       wfDebug( __METHOD__ . ": reference count for $serverIndex/$wiki reduced to $refCount\n" );
                }
        }
 
@@ -620,18 +620,18 @@ class LoadBalancer {
         * @return DatabaseBase
         */
        function openForeignConnection( $i, $wiki ) {
-               wfProfileIn(__METHOD__);
+               wfProfileIn( __METHOD__ );
                list( $dbName, $prefix ) = wfSplitWikiID( $wiki );
                if ( isset( $this->mConns['foreignUsed'][$i][$wiki] ) ) {
                        // Reuse an already-used connection
                        $conn = $this->mConns['foreignUsed'][$i][$wiki];
-                       wfDebug( __METHOD__.": reusing connection $i/$wiki\n" );
+                       wfDebug( __METHOD__ . ": reusing connection $i/$wiki\n" );
                } elseif ( isset( $this->mConns['foreignFree'][$i][$wiki] ) ) {
                        // Reuse a free connection for the same wiki
                        $conn = $this->mConns['foreignFree'][$i][$wiki];
                        unset( $this->mConns['foreignFree'][$i][$wiki] );
                        $this->mConns['foreignUsed'][$i][$wiki] = $conn;
-                       wfDebug( __METHOD__.": reusing free connection $i/$wiki\n" );
+                       wfDebug( __METHOD__ . ": reusing free connection $i/$wiki\n" );
                } elseif ( !empty( $this->mConns['foreignFree'][$i] ) ) {
                        // Reuse a connection from another wiki
                        $conn = reset( $this->mConns['foreignFree'][$i] );
@@ -646,7 +646,7 @@ class LoadBalancer {
                                $conn->tablePrefix( $prefix );
                                unset( $this->mConns['foreignFree'][$i][$oldWiki] );
                                $this->mConns['foreignUsed'][$i][$wiki] = $conn;
-                               wfDebug( __METHOD__.": reusing free connection from $oldWiki for $wiki\n" );
+                               wfDebug( __METHOD__ . ": reusing free connection from $oldWiki for $wiki\n" );
                        }
                } else {
                        // Open a new connection
@@ -655,13 +655,13 @@ class LoadBalancer {
                        $server['foreignPoolRefCount'] = 0;
                        $conn = $this->reallyOpenConnection( $server, $dbName );
                        if ( !$conn->isOpen() ) {
-                               wfDebug( __METHOD__.": error opening connection for $i/$wiki\n" );
+                               wfDebug( __METHOD__ . ": error opening connection for $i/$wiki\n" );
                                $this->mErrorConnection = $conn;
                                $conn = false;
                        } else {
                                $conn->tablePrefix( $prefix );
                                $this->mConns['foreignUsed'][$i][$wiki] = $conn;
-                               wfDebug( __METHOD__.": opened new connection for $i/$wiki\n" );
+                               wfDebug( __METHOD__ . ": opened new connection for $i/$wiki\n" );
                        }
                }
 
@@ -670,7 +670,7 @@ class LoadBalancer {
                        $refCount = $conn->getLBInfo( 'foreignPoolRefCount' );
                        $conn->setLBInfo( 'foreignPoolRefCount', $refCount + 1 );
                }
-               wfProfileOut(__METHOD__);
+               wfProfileOut( __METHOD__ );
                return $conn;
        }
 
index 22938aa..cb3376f 100644 (file)
@@ -159,7 +159,7 @@ class LoadMonitor_MySQL implements LoadMonitor {
 
                $times = array();
                foreach ( $serverIndexes as $i ) {
-                       if ($i == 0) { # Master
+                       if ( $i == 0 ) { # Master
                                $times[$i] = 0;
                        } elseif ( false !== ( $conn = $this->parent->getAnyOpenConnection( $i ) ) ) {
                                $times[$i] = $conn->getLag();
@@ -173,7 +173,7 @@ class LoadMonitor_MySQL implements LoadMonitor {
                $wgMemc->set( $memcKey, $times, $expiry );
 
                # But don't give the timestamp to the caller
-               unset($times['timestamp']);
+               unset( $times['timestamp'] );
                $lagTimes = $times;
 
                wfProfileOut( __METHOD__ );
@@ -189,7 +189,7 @@ class LoadMonitor_MySQL implements LoadMonitor {
                if ( !$threshold ) {
                        return 0;
                }
-               $status = $conn->getMysqlStatus("Thread%");
+               $status = $conn->getMysqlStatus( "Thread%" );
                if ( $status['Threads_running'] > $threshold ) {
                        $server = $conn->getProperty( 'mServer' );
                        wfLogDBError( "LB backoff from $server - Threads_running = {$status['Threads_running']}\n" );
index 46a3398..6ef5fcb 100644 (file)
@@ -167,7 +167,7 @@ class _DiffOp_Change extends _DiffOp {
  */
 class _DiffEngine {
 
-       const MAX_XREF_LENGTH =  10000;
+       const MAX_XREF_LENGTH = 10000;
 
        protected $xchanged, $ychanged;
 
@@ -491,8 +491,7 @@ class _DiffEngine {
                        // $nchunks = sqrt(min($xlim - $xoff, $ylim - $yoff) / 2.5);
                        // $nchunks = max(2,min(8,(int)$nchunks));
                        $nchunks = min( 7, $xlim - $xoff, $ylim - $yoff ) + 1;
-                       list ( $lcs, $seps )
-                       = $this->_diag( $xoff, $xlim, $yoff, $ylim, $nchunks );
+                       list ( $lcs, $seps ) = $this->_diag( $xoff, $xlim, $yoff, $ylim, $nchunks );
                }
 
                if ( $lcs == 0 ) {
@@ -1365,7 +1364,7 @@ class TableDiffFormatter extends DiffFormatter {
         */
        function _block_header( $xbeg, $xlen, $ybeg, $ylen ) {
                $r = '<tr><td colspan="2" class="diff-lineno"><!--LINE ' . $xbeg . "--></td>\n" .
-                 '<td colspan="2" class="diff-lineno"><!--LINE ' . $ybeg . "--></td></tr>\n";
+                       '<td colspan="2" class="diff-lineno"><!--LINE ' . $ybeg . "--></td></tr>\n";
                return $r;
        }
 
index 97553e6..a3239a3 100644 (file)
@@ -152,7 +152,7 @@ class DifferenceEngine extends ContextSource {
        function deletedLink( $id ) {
                if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
                        $dbr = wfGetDB( DB_SLAVE );
-                       $row = $dbr->selectRow('archive', '*',
+                       $row = $dbr->selectRow( 'archive', '*',
                                array( 'ar_rev_id' => $id ),
                                __METHOD__ );
                        if ( $row ) {
index 8bf1ca9..5dd49d7 100644 (file)
@@ -138,7 +138,7 @@ class ExternalStore {
                while ( count( $tryStores ) > 0 ) {
                        $index = mt_rand( 0, count( $tryStores ) - 1 );
                        $storeUrl = $tryStores[$index];
-                       wfDebug( __METHOD__.": trying $storeUrl\n" );
+                       wfDebug( __METHOD__ . ": trying $storeUrl\n" );
                        list( $proto, $path ) = explode( '://', $storeUrl, 2 );
                        $store = self::getStoreObject( $proto, $params );
                        if ( $store === false ) {
index 8e05cfe..3857771 100644 (file)
@@ -79,7 +79,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
         * @return LoadBalancer object
         */
        function &getLoadBalancer( $cluster ) {
-               $wiki = isset($this->params['wiki']) ? $this->params['wiki'] : false;
+               $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
 
                return wfGetLBFactory()->getExternalLB( $cluster, $wiki );
        }
@@ -93,12 +93,12 @@ class ExternalStoreDB extends ExternalStoreMedium {
        function &getSlave( $cluster ) {
                global $wgDefaultExternalStore;
 
-               $wiki = isset($this->params['wiki']) ? $this->params['wiki'] : false;
+               $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
                $lb =& $this->getLoadBalancer( $cluster );
 
                if ( !in_array( "DB://" . $cluster, (array)$wgDefaultExternalStore ) ) {
                        wfDebug( "read only external store" );
-                       $lb->allowLagged(true);
+                       $lb->allowLagged( true );
                } else {
                        wfDebug( "writable external store" );
                }
@@ -113,7 +113,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
         * @return DatabaseBase object
         */
        function &getMaster( $cluster ) {
-               $wiki = isset($this->params['wiki']) ? $this->params['wiki'] : false;
+               $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
                $lb =& $this->getLoadBalancer( $cluster );
                return $lb->getConnection( DB_MASTER, array(), $wiki );
        }
index 5141ec5..acbc4a9 100644 (file)
@@ -104,7 +104,7 @@ class FSFile {
         */
        public function getProps( $ext = true ) {
                wfProfileIn( __METHOD__ );
-               wfDebug( __METHOD__.": Getting file info for $this->path\n" );
+               wfDebug( __METHOD__ . ": Getting file info for $this->path\n" );
 
                $info = self::placeholderProps();
                $info['fileExists'] = $this->exists();
@@ -140,9 +140,9 @@ class FSFile {
                        }
                        $info['sha1'] = $this->getSha1Base36();
 
-                       wfDebug(__METHOD__.": $this->path loaded, {$info['size']} bytes, {$info['mime']}.\n");
+                       wfDebug( __METHOD__ . ": $this->path loaded, {$info['size']} bytes, {$info['mime']}.\n" );
                } else {
-                       wfDebug(__METHOD__.": $this->path NOT FOUND!\n");
+                       wfDebug( __METHOD__ . ": $this->path NOT FOUND!\n" );
                }
 
                wfProfileOut( __METHOD__ );
index 0e61d0c..c282a07 100644 (file)
  * Outside callers can assume that all backends will have these functions.
  *
  * All "storage paths" are of the format "mwstore://<backend>/<container>/<path>".
- * The "<path>" portion is a relative path that uses UNIX file system (FS)
- * notation, though any particular backend may not actually be using a local
- * filesystem. Therefore, the relative paths are only virtual.
+ * The "backend" portion is unique name for MediaWiki to refer to a backend, while
+ * the "container" portion is a top-level directory of the backend. The "path" portion
+ * is a relative path that uses UNIX file system (FS) notation, though any particular
+ * backend may not actually be using a local filesystem. Therefore, the relative paths
+ * are only virtual.
  *
  * Backend contents are stored under wiki-specific container names by default.
- * For legacy reasons, this has no effect for the FS backend class, and per-wiki
- * segregation must be done by setting the container paths appropriately.
+ * Global (qualified) backends are achieved by configuring the "wiki ID" to a constant.
+ * For legacy reasons, the FSFileBackend class allows manually setting the paths of
+ * containers to ones that do not respect the "wiki ID".
  *
+ * In key/value stores, the container is the only hierarchy (the rest is emulated).
  * FS-based backends are somewhat more restrictive due to the existence of real
  * directory files; a regular file cannot have the same name as a directory. Other
  * backends with virtual directories may not have this limitation. Callers should
@@ -75,10 +79,13 @@ abstract class FileBackend {
         * $config includes:
         *   - name        : The unique name of this backend.
         *                   This should consist of alphanumberic, '-', and '_' characters.
-        *                   This name should not be changed after use.
-        *   - wikiId      : Prefix to container names that is unique to this wiki.
+        *                   This name should not be changed after use (e.g. with journaling).
+        *                   Note that the name is *not* used in actual container names.
+        *   - wikiId      : Prefix to container names that is unique to this backend.
         *                   If not provided, this defaults to the current wiki ID.
         *                   It should only consist of alphanumberic, '-', and '_' characters.
+        *                   This ID is what avoids collisions if multiple logical backends
+        *                   use the same storage system, so this should be set carefully.
         *   - lockManager : Registered name of a file lock manager to use.
         *   - fileJournal : File journal configuration; see FileJournal::factory().
         *                   Journals simply log changes to files stored in the backend.
@@ -314,6 +321,7 @@ abstract class FileBackend {
                if ( empty( $opts['force'] ) ) { // sanity
                        unset( $opts['nonLocking'] );
                }
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doOperationsInternal( $ops, $opts );
        }
 
@@ -544,6 +552,7 @@ abstract class FileBackend {
                foreach ( $ops as &$op ) {
                        $op['overwrite'] = true; // avoids RTTs in key/value stores
                }
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doQuickOperationsInternal( $ops );
        }
 
@@ -687,6 +696,7 @@ abstract class FileBackend {
                if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
                        return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
                }
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doPrepare( $params );
        }
 
@@ -714,6 +724,7 @@ abstract class FileBackend {
                if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
                        return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
                }
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doSecure( $params );
        }
 
@@ -742,6 +753,7 @@ abstract class FileBackend {
                if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
                        return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
                }
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doPublish( $params );
        }
 
@@ -766,6 +778,7 @@ abstract class FileBackend {
                if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
                        return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
                }
+               $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doClean( $params );
        }
 
@@ -774,6 +787,21 @@ abstract class FileBackend {
         */
        abstract protected function doClean( array $params );
 
+       /**
+        * Enter file operation scope.
+        * This just makes PHP ignore user aborts/disconnects until the return
+        * value leaves scope. This returns null and does nothing in CLI mode.
+        *
+        * @return ScopedCallback|null
+        */
+       final protected function getScopedPHPBehaviorForOps() {
+               if ( php_sapi_name() != 'cli' ) { // http://bugs.php.net/bug.php?id=47540
+                       $old = ignore_user_abort( true ); // avoid half-finished operations
+                       return new ScopedCallback( function() use ( $old ) { ignore_user_abort( $old ); } );
+               }
+               return null;
+       }
+
        /**
         * Check if a file exists at a storage path in the backend.
         * This returns false if only a directory exists at the path.
index 5327204..0bf5279 100644 (file)
@@ -87,6 +87,9 @@ class FileBackendGroup {
                        $thumbDir = isset( $info['thumbDir'] )
                                ? $info['thumbDir']
                                : "{$directory}/thumb";
+                       $transcodedDir = isset( $info['transcodedDir'] )
+                               ? $info['transcodedDir']
+                               : "{$directory}/transcoded";
                        $fileMode = isset( $info['fileMode'] )
                                ? $info['fileMode']
                                : 0644;
@@ -98,6 +101,7 @@ class FileBackendGroup {
                                'containerPaths' => array(
                                        "{$repoName}-public"  => "{$directory}",
                                        "{$repoName}-thumb"   => $thumbDir,
+                                       "{$repoName}-transcoded"   => $transcodedDir,
                                        "{$repoName}-deleted" => $deletedDir,
                                        "{$repoName}-temp"    => "{$directory}/temp"
                                ),
index a443a3a..a5f5073 100644 (file)
@@ -62,7 +62,7 @@ class FileBackendMultiWrite extends FileBackend {
         * Additional $config params include:
         *   - backends       : Array of backend config and multi-backend settings.
         *                      Each value is the config used in the constructor of a
-        *                          FileBackendStore class, but with these additional settings:
+        *                      FileBackendStore class, but with these additional settings:
         *                        - class         : The name of the backend class
         *                        - isMultiMaster : This must be set for one backend.
         *                        - template:     : If given a backend name, this will use
index 7952bcb..28f5b73 100644 (file)
@@ -167,7 +167,7 @@ abstract class FileOp {
         * @return Array
         */
        final public function applyDependencies( array $deps ) {
-               $deps['read']  += array_fill_keys( $this->storagePathsRead(), 1 );
+               $deps['read'] += array_fill_keys( $this->storagePathsRead(), 1 );
                $deps['write'] += array_fill_keys( $this->storagePathsChanged(), 1 );
                return $deps;
        }
index 3c097a1..d825d04 100644 (file)
@@ -148,7 +148,7 @@ class SwiftFileBackend extends FileBackendStore {
                $this->connContainerCache = new ProcessCacheLRU( 300 );
                // Cache auth token information to avoid RTTs
                if ( !empty( $config['cacheAuthInfo'] ) ) {
-                       if ( php_sapi_name() === 'cli' ) {
+                       if ( PHP_SAPI === 'cli' ) {
                                $this->srvCache = wfGetMainCache(); // preferrably memcached
                        } else {
                                try { // look for APC, XCache, WinCache, ect...
index 635cb95..e49f37d 100644 (file)
@@ -46,6 +46,9 @@ class FSRepo extends FileRepo {
                        $thumbDir = isset( $info['thumbDir'] )
                                ? $info['thumbDir']
                                : "{$directory}/thumb";
+                       $transcodedDir = isset( $info['transcodedDir'] )
+                               ? $info['transcodedDir']
+                               : "{$directory}/transcoded";
                        $fileMode = isset( $info['fileMode'] )
                                ? $info['fileMode']
                                : 0644;
@@ -59,6 +62,7 @@ class FSRepo extends FileRepo {
                                        "{$repoName}-public"  => "{$directory}",
                                        "{$repoName}-temp"    => "{$directory}/temp",
                                        "{$repoName}-thumb"   => $thumbDir,
+                                       "{$repoName}-transcoded"   => $transcodedDir,
                                        "{$repoName}-deleted" => $deletedDir
                                ),
                                'fileMode'       => $fileMode,
index 4cc4fde..05e71d4 100644 (file)
@@ -120,7 +120,7 @@ class FileRepo {
                $this->isPrivate = !empty( $info['isPrivate'] );
                // Give defaults for the basic zones...
                $this->zones = isset( $info['zones'] ) ? $info['zones'] : array();
-               foreach ( array( 'public', 'thumb', 'temp', 'deleted' ) as $zone ) {
+               foreach ( array( 'public', 'thumb', 'transcoded', 'temp', 'deleted' ) as $zone ) {
                        if ( !isset( $this->zones[$zone]['container'] ) ) {
                                $this->zones[$zone]['container'] = "{$this->name}-{$zone}";
                        }
@@ -204,7 +204,7 @@ class FileRepo {
         * @return String or false
         */
        public function getZoneUrl( $zone, $ext = null ) {
-               if ( in_array( $zone, array( 'public', 'temp', 'thumb' ) ) ) { // standard public zones
+               if ( in_array( $zone, array( 'public', 'temp', 'thumb', 'transcoded' ) ) ) { // standard public zones
                        if ( $ext !== null && isset( $this->zones[$zone]['urlsByExt'][$ext] ) ) {
                                return $this->zones[$zone]['urlsByExt'][$ext]; // custom URL for extension/zone
                        } elseif ( isset( $this->zones[$zone]['url'] ) ) {
@@ -220,6 +220,8 @@ class FileRepo {
                                return false; // no public URL
                        case 'thumb':
                                return $this->thumbUrl;
+                       case 'transcoded':
+                               return "{$this->url}/transcoded";
                        default:
                                return false;
                }
@@ -240,7 +242,7 @@ class FileRepo {
         */
        public function getZoneHandlerUrl( $zone ) {
                if ( isset( $this->zones[$zone]['handlerUrl'] )
-                       && in_array( $zone, array( 'public', 'temp', 'thumb' ) ) )
+                       && in_array( $zone, array( 'public', 'temp', 'thumb', 'transcoded' ) ) )
                {
                        return $this->zones[$zone]['handlerUrl'];
                }
@@ -955,7 +957,7 @@ class FileRepo {
                $hashPath   = $this->getHashPath( $originalName );
                $dstRel     = "{$hashPath}{$date}!{$originalName}";
                $dstUrlRel  = $hashPath . $date . '!' . rawurlencode( $originalName );
-               $virtualUrl = $this->getVirtualUrl( 'temp' )  . '/' . $dstUrlRel;
+               $virtualUrl = $this->getVirtualUrl( 'temp' ) . '/' . $dstUrlRel;
 
                $result = $this->quickImport( $srcPath, $virtualUrl );
                $result->value = $virtualUrl;
@@ -1105,7 +1107,7 @@ class FileRepo {
                        if ( !$this->initDirectory( $dstDir )->isOK() ) {
                                return $this->newFatal( 'directorycreateerror', $dstDir );
                        }
-                       if ( !$this->initDirectory($archiveDir )->isOK() ) {
+                       if ( !$this->initDirectory( $archiveDir )->isOK() ) {
                                return $this->newFatal( 'directorycreateerror', $archiveDir );
                        }
 
@@ -1670,10 +1672,17 @@ class FileRepo {
                                        'directory' => ( $this->zones['thumb']['directory'] == '' )
                                                ? 'temp'
                                                : $this->zones['thumb']['directory'] . '/temp'
+                               ),
+                               'transcoded'  => array(
+                                       'container' => $this->zones['transcoded']['container'],
+                                       'directory' => ( $this->zones['transcoded']['directory'] == '' )
+                                               ? 'temp'
+                                               : $this->zones['transcoded']['directory'] . '/temp'
                                )
                        ),
                        'url'        => $this->getZoneUrl( 'temp' ),
                        'thumbUrl'   => $this->getZoneUrl( 'thumb' ) . '/temp',
+                       'transcodedUrl'   => $this->getZoneUrl( 'transcoded' ) . '/temp',
                        'hashLevels' => $this->hashLevels // performance
                ) );
        }
index 7697e4e..e1ecb96 100644 (file)
@@ -267,7 +267,7 @@ class ForeignAPIRepo extends FileRepo {
                $sizekey = "$width:$height:$params";
 
                /* Get the array of urls that we already know */
-               $knownThumbUrls = $wgMemc->get($key);
+               $knownThumbUrls = $wgMemc->get( $key );
                if( !$knownThumbUrls ) {
                        /* No knownThumbUrls for this file */
                        $knownThumbUrls = array();
@@ -294,9 +294,9 @@ class ForeignAPIRepo extends FileRepo {
                        wfDebug( __METHOD__ . " The deduced filename $fileName is not safe\n" );
                        return false;
                }
-               $localPath =  $this->getZonePath( 'thumb' ) . "/" . $this->getHashPath( $name ) . $name;
+               $localPath = $this->getZonePath( 'thumb' ) . "/" . $this->getHashPath( $name ) . $name;
                $localFilename = $localPath . "/" . $fileName;
-               $localUrl =  $this->getZoneUrl( 'thumb' ) . "/" . $this->getHashPath( $name ) . rawurlencode( $name ) . "/" . rawurlencode( $fileName );
+               $localUrl = $this->getZoneUrl( 'thumb' ) . "/" . $this->getHashPath( $name ) . rawurlencode( $name ) . "/" . rawurlencode( $fileName );
 
                if( $backend->fileExists( array( 'src' => $localFilename ) )
                        && isset( $metadata['timestamp'] ) )
index 89a458b..0fbaeef 100644 (file)
@@ -212,8 +212,8 @@ class LocalRepo extends FileRepo {
                $dbr = $this->getSlaveDB();
                $id = $dbr->selectField(
                        'page', // Table
-                       'page_id',  //Field
-                       array(  //Conditions
+                       'page_id', //Field
+                       array( //Conditions
                                'page_namespace' => $title->getNamespace(),
                                'page_title' => $title->getDBkey(),
                        ),
index f9e5759..1f5ae91 100644 (file)
@@ -131,7 +131,7 @@ class RepoGroup {
                        $time = isset( $options['time'] ) ? $options['time'] : '';
                        $dbkey = $title->getDBkey();
                        if ( isset( $this->cache[$dbkey][$time] ) ) {
-                               wfDebug( __METHOD__.": got File:$dbkey from process cache\n" );
+                               wfDebug( __METHOD__ . ": got File:$dbkey from process cache\n" );
                                # Move it to the end of the list so that we can delete the LRU entry later
                                $this->pingCache( $dbkey );
                                # Return the entry
@@ -388,12 +388,12 @@ class RepoGroup {
         */
        function splitVirtualUrl( $url ) {
                if ( substr( $url, 0, 9 ) != 'mwrepo://' ) {
-                       throw new MWException( __METHOD__.': unknown protocol' );
+                       throw new MWException( __METHOD__ . ': unknown protocol' );
                }
 
                $bits = explode( '/', substr( $url, 9 ), 3 );
                if ( count( $bits ) != 3 ) {
-                       throw new MWException( __METHOD__.": invalid mwrepo URL: $url" );
+                       throw new MWException( __METHOD__ . ": invalid mwrepo URL: $url" );
                }
                return $bits;
        }
@@ -433,7 +433,7 @@ class RepoGroup {
                while ( count( $this->cache ) >= self::MAX_CACHE_SIZE ) {
                        reset( $this->cache );
                        $key = key( $this->cache );
-                       wfDebug( __METHOD__.": evicting $key\n" );
+                       wfDebug( __METHOD__ . ": evicting $key\n" );
                        unset( $this->cache[$key] );
                }
        }
index e1a8547..b02d92b 100644 (file)
@@ -68,7 +68,7 @@ class ArchivedFile {
         * @param int $id
         * @param string $key
         */
-       function __construct( $title, $id=0, $key='' ) {
+       function __construct( $title, $id = 0, $key = '' ) {
                $this->id = -1;
                $this->title = false;
                $this->name = false;
@@ -95,11 +95,11 @@ class ArchivedFile {
                        $this->name = $title->getDBkey();
                }
 
-               if ($id) {
+               if ( $id ) {
                        $this->id = $id;
                }
 
-               if ($key) {
+               if ( $key ) {
                        $this->key = $key;
                }
 
@@ -130,7 +130,7 @@ class ArchivedFile {
                        $conds['fa_name'] = $this->title->getDBkey();
                }
 
-               if( !count($conds)) {
+               if( !count( $conds ) ) {
                        throw new MWException( "No specific information for retrieving archived file" );
                }
 
@@ -197,7 +197,7 @@ class ArchivedFile {
         * @since 1.21
         */
        public function loadFromRow( $row ) {
-               $this->id = intval($row->fa_id);
+               $this->id = intval( $row->fa_id );
                $this->name = $row->fa_name;
                $this->archive_name = $row->fa_archive_name;
                $this->group = $row->fa_storage_group;
index e4e49f5..f371115 100644 (file)
@@ -40,7 +40,7 @@
  * never name a file class explictly outside of the repo class. Instead use the
  * repo's factory functions to generate file objects, for example:
  *
- * RepoGroup::singleton()->getLocalRepo()->newFile($title);
+ * RepoGroup::singleton()->getLocalRepo()->newFile( $title );
  *
  * The convenience functions wfLocalFile() and wfFindFile() should be sufficient
  * in most cases.
@@ -54,7 +54,7 @@ abstract class File {
        const DELETED_RESTRICTED = 8;
 
        /** Force rendering in the current process */
-       const RENDER_NOW   = 1;
+       const RENDER_NOW = 1;
        /**
         * Force rendering even if thumbnail already exist and using RENDER_NOW
         * I.e. you have to pass both flags: File::RENDER_NOW | File::RENDER_FORCE
@@ -348,7 +348,7 @@ abstract class File {
                        if ( $this->canRender() ) {
                                return $this->createThumb( $this->getWidth() );
                        } else {
-                               wfDebug( __METHOD__.': supposed to render ' . $this->getName() .
+                               wfDebug( __METHOD__ . ': supposed to render ' . $this->getName() .
                                        ' (' . $this->getMimeType() . "), but can't!\n" );
                                return $this->getURL(); #hm... return NULL?
                        }
@@ -663,13 +663,13 @@ abstract class File {
                if ( $this->allowInlineDisplay() ) {
                        return true;
                }
-               if ($this->isTrustedFile()) {
+               if ( $this->isTrustedFile() ) {
                        return true;
                }
 
                $type = $this->getMediaType();
                $mime = $this->getMimeType();
-               #wfDebug("LocalFile::isSafeFile: type= $type, mime= $mime\n");
+               #wfDebug( "LocalFile::isSafeFile: type= $type, mime= $mime\n" );
 
                if ( !$type || $type === MEDIATYPE_UNKNOWN ) {
                        return false; #unknown type, not trusted
@@ -903,7 +903,7 @@ abstract class File {
                                // Clean up broken thumbnails as needed
                                $this->migrateThumbFile( $thumbName );
                                // Check if an up-to-date thumbnail already exists...
-                               wfDebug( __METHOD__.": Doing stat for $thumbPath\n" );
+                               wfDebug( __METHOD__ . ": Doing stat for $thumbPath\n" );
                                if ( !( $flags & self::RENDER_FORCE ) && $this->repo->fileExists( $thumbPath ) ) {
                                        $timestamp = $this->repo->getFileTimestamp( $thumbPath );
                                        if ( $timestamp !== false && $timestamp >= $wgThumbnailEpoch ) {
@@ -1247,6 +1247,18 @@ abstract class File {
                return $this->repo->getZonePath( 'thumb' ) . '/' . $this->getThumbRel( $suffix );
        }
 
+       /**
+        * Get the path of the transcoded directory, or a particular file if $suffix is specified
+        *
+        * @param $suffix bool|string if not false, the name of a media file
+        *
+        * @return string
+        */
+       function getTranscodedPath( $suffix = false ) {
+               $this->assertRepoDefined();
+               return $this->repo->getZonePath( 'transcoded' ) . '/' . $this->getThumbRel( $suffix );
+       }
+
        /**
         * Get the URL of the archive directory, or a particular file if $suffix is specified
         *
@@ -1288,22 +1300,45 @@ abstract class File {
        }
 
        /**
-        * Get the URL of the thumbnail directory, or a particular file if $suffix is specified
+        * Get the URL of the zone directory, or a particular file if $suffix is specified
         *
-        * @param $suffix bool|string if not false, the name of a thumbnail file
+        * @param $zone string name of requested zone
+        * @param $suffix bool|string if not false, the name of a file in zone
         *
         * @return string path
         */
-       function getThumbUrl( $suffix = false ) {
+       function getZoneUrl( $zone, $suffix = false ) {
                $this->assertRepoDefined();
                $ext = $this->getExtension();
-               $path = $this->repo->getZoneUrl( 'thumb', $ext ) . '/' . $this->getUrlRel();
+               $path = $this->repo->getZoneUrl( $zone, $ext ) . '/' . $this->getUrlRel();
                if ( $suffix !== false ) {
                        $path .= '/' . rawurlencode( $suffix );
                }
                return $path;
        }
 
+       /**
+        * Get the URL of the thumbnail directory, or a particular file if $suffix is specified
+        *
+        * @param $suffix bool|string if not false, the name of a thumbnail file
+        *
+        * @return string path
+        */
+       function getThumbUrl( $suffix = false ) {
+               return $this->getZoneUrl( 'thumb', $suffix );
+       }
+
+       /**
+        * Get the URL of the transcoded directory, or a particular file if $suffix is specified
+        *
+        * @param $suffix bool|string if not false, the name of a media file
+        *
+        * @return string path
+        */
+       function getTranscodedUrl( $suffix = false ) {
+               return $this->getZoneUrl( 'transcoded', $suffix );
+       }
+
        /**
         * Get the public zone virtual URL for a current version source file
         *
@@ -1366,7 +1401,7 @@ abstract class File {
         * @throws MWException
         */
        function readOnlyError() {
-               throw new MWException( get_class($this) . ': write operations are not supported' );
+               throw new MWException( get_class( $this ) . ': write operations are not supported' );
        }
 
        /**
@@ -1500,9 +1535,9 @@ abstract class File {
         * @param $target Title New file name
         * @return FileRepoStatus object.
         */
-        function move( $target ) {
+       function move( $target ) {
                $this->readOnlyError();
-        }
+       }
 
        /**
         * Delete all versions of the file.
@@ -1627,15 +1662,15 @@ abstract class File {
                $renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $wgLang->getCode() );
                if ( $renderUrl ) {
                        if ( $this->repo->descriptionCacheExpiry > 0 ) {
-                               wfDebug("Attempting to get the description from cache...");
+                               wfDebug( "Attempting to get the description from cache..." );
                                $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', $wgLang->getCode(),
                                                                        $this->getName() );
-                               $obj = $wgMemc->get($key);
-                               if ($obj) {
-                                       wfDebug("success!\n");
+                               $obj = $wgMemc->get( $key );
+                               if ( $obj ) {
+                                       wfDebug( "success!\n" );
                                        return $obj;
                                }
-                               wfDebug("miss\n");
+                               wfDebug( "miss\n" );
                        }
                        wfDebug( "Fetching shared description from $renderUrl\n" );
                        $res = Http::get( $renderUrl );
@@ -1721,7 +1756,7 @@ abstract class File {
         * @return array
         */
        static function getPropsFromPath( $path, $ext = true ) {
-               wfDebug( __METHOD__.": Getting file info for $path\n" );
+               wfDebug( __METHOD__ . ": Getting file info for $path\n" );
                wfDeprecated( __METHOD__, '1.19' );
 
                $fsFile = new FSFile( $path );
index 5648261..84e0df6 100644 (file)
@@ -189,7 +189,7 @@ class ForeignAPIFile extends File {
         * @param string $method
         * @return int|null|string
         */
-       public function getUser( $method='text' ) {
+       public function getUser( $method = 'text' ) {
                return isset( $this->mInfo['user'] ) ? strval( $this->mInfo['user'] ) : null;
        }
 
@@ -256,7 +256,7 @@ class ForeignAPIFile extends File {
         */
        function getThumbPath( $suffix = '' ) {
                if ( $this->repo->canCacheThumbs() ) {
-                       $path = $this->repo->getZonePath('thumb') . '/' . $this->getHashPath( $this->getName() );
+                       $path = $this->repo->getZonePath( 'thumb' ) . '/' . $this->getHashPath( $this->getName() );
                        if ( $suffix ) {
                                $path = $path . $suffix . '/';
                        }
@@ -293,7 +293,7 @@ class ForeignAPIFile extends File {
                global $wgMemc, $wgContLang;
 
                $url = $this->repo->getDescriptionRenderUrl( $this->getName(), $wgContLang->getCode() );
-               $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', md5($url) );
+               $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', md5( $url ) );
 
                $wgMemc->delete( $key );
        }
index c08d192..0ddebc9 100644 (file)
@@ -36,7 +36,7 @@ define( 'MW_FILE_VERSION', 9 );
  * never name a file class explictly outside of the repo class. Instead use the
  * repo's factory functions to generate file objects, for example:
  *
- * RepoGroup::singleton()->getLocalRepo()->newFile($title);
+ * RepoGroup::singleton()->getLocalRepo()->newFile( $title );
  *
  * The convenience functions wfLocalFile() and wfFindFile() should be sufficient
  * in most cases.
@@ -398,7 +398,7 @@ class LocalFile extends File {
 
                // Sanity check prefix once
                if ( substr( key( $array ), 0, $prefixLength ) !== $prefix ) {
-                       throw new MWException( __METHOD__ .  ': incorrect $prefix parameter' );
+                       throw new MWException( __METHOD__ . ': incorrect $prefix parameter' );
                }
 
                $decoded = array();
@@ -901,7 +901,7 @@ class LocalFile extends File {
        protected function purgeThumbList( $dir, $files ) {
                $fileListDebug = strtr(
                        var_export( $files, true ),
-                       array("\n"=>'')
+                       array( "\n" => '' )
                );
                wfDebug( __METHOD__ . ": $fileListDebug\n" );
 
@@ -1285,7 +1285,7 @@ class LocalFile extends File {
                                $log->getRcComment(),
                                false
                        );
-                       if (!is_null($nullRevision)) {
+                       if ( !is_null( $nullRevision ) ) {
                                $nullRevision->insertOn( $dbw );
 
                                wfRunHooks( 'NewRevisionFromEditComplete', array( $wikiPage, $nullRevision, $latest, $user ) );
index 3180835..4f27c8d 100644 (file)
@@ -42,7 +42,7 @@ class OldLocalFile extends LocalFile {
        static function newFromTitle( $title, $repo, $time = null ) {
                # The null default value is only here to avoid an E_STRICT
                if ( $time === null ) {
-                       throw new MWException( __METHOD__.' got null for $time parameter' );
+                       throw new MWException( __METHOD__ . ' got null for $time parameter' );
                }
                return new self( $title, $repo, $time, null );
        }
@@ -132,7 +132,7 @@ class OldLocalFile extends LocalFile {
                $this->requestedTime = $time;
                $this->archive_name = $archiveName;
                if ( is_null( $time ) && is_null( $archiveName ) ) {
-                       throw new MWException( __METHOD__.': must specify at least one of $time or $archiveName' );
+                       throw new MWException( __METHOD__ . ': must specify at least one of $time or $archiveName' );
                }
        }
 
@@ -164,7 +164,7 @@ class OldLocalFile extends LocalFile {
         * @return bool
         */
        function isVisible() {
-               return $this->exists() && !$this->isDeleted(File::DELETED_FILE);
+               return $this->exists() && !$this->isDeleted( File::DELETED_FILE );
        }
 
        function loadFromDB() {
@@ -255,7 +255,7 @@ class OldLocalFile extends LocalFile {
 
                # Don't destroy file info of missing files
                if ( !$this->fileExists ) {
-                       wfDebug( __METHOD__.": file does not exist, aborting\n" );
+                       wfDebug( __METHOD__ . ": file does not exist, aborting\n" );
                        wfProfileOut( __METHOD__ );
                        return;
                }
@@ -263,7 +263,7 @@ class OldLocalFile extends LocalFile {
                $dbw = $this->repo->getMasterDB();
                list( $major, $minor ) = self::splitMime( $this->mime );
 
-               wfDebug(__METHOD__.': upgrading '.$this->archive_name." to the current schema\n");
+               wfDebug( __METHOD__ . ': upgrading ' . $this->archive_name . " to the current schema\n" );
                $dbw->update( 'oldimage',
                        array(
                                'oi_size'       => $this->size, // sanity
index 698d1eb..9a7f653 100644 (file)
@@ -71,7 +71,7 @@ class UnregisteredLocalFile extends File {
         */
        function __construct( $title = false, $repo = false, $path = false, $mime = false ) {
                if ( !( $title && $repo ) && !$path ) {
-                       throw new MWException( __METHOD__.': not enough parameters, must specify title and repo, or a full path' );
+                       throw new MWException( __METHOD__ . ': not enough parameters, must specify title and repo, or a full path' );
                }
                if ( $title instanceof Title ) {
                        $this->title = File::normalizeTitle( $title, 'exception' );
index 38b4a82..75e55f1 100644 (file)
@@ -193,7 +193,7 @@ class CliInstaller extends Installer {
 
        public function envCheckPath( ) {
                if ( !$this->specifiedScriptPath ) {
-                       $this->showMessage( 'config-no-cli-uri', $this->getVar("wgScriptPath") );
+                       $this->showMessage( 'config-no-cli-uri', $this->getVar( "wgScriptPath" ) );
                }
                return parent::envCheckPath();
        }
index f27165d..10d23fb 100644 (file)
@@ -240,7 +240,7 @@ abstract class DatabaseInstaller {
                if ( $status->isOK() ) {
                        $status->value->setSchemaVars( $this->getSchemaVars() );
                } else {
-                       throw new MWException( __METHOD__.': unexpected DB connection error' );
+                       throw new MWException( __METHOD__ . ': unexpected DB connection error' );
                }
        }
 
@@ -252,7 +252,7 @@ abstract class DatabaseInstaller {
        public function enableLB() {
                $status = $this->getConnection();
                if ( !$status->isOK() ) {
-                       throw new MWException( __METHOD__.': unexpected DB connection error' );
+                       throw new MWException( __METHOD__ . ': unexpected DB connection error' );
                }
                LBFactory::setInstance( new LBFactory_Single( array(
                        'connection' => $status->value ) ) );
index 9caf168..746cd12 100644 (file)
@@ -451,7 +451,7 @@ abstract class DatabaseUpdater {
                $key = "updatelist-$version-" . time();
                $this->db->insert( 'updatelog',
                        array( 'ul_key' => $key, 'ul_value' => serialize( $updates ) ),
-                        __METHOD__ );
+                       __METHOD__ );
                $this->db->setFlag( DBO_DDLMODE );
        }
 
@@ -633,7 +633,7 @@ abstract class DatabaseUpdater {
                } else {
                        $this->db->sourceFile( $path );
                }
-               $this->output( "done.\n" );
+               $this->output( "done.\n" );
                return true;
        }
 
index b837061..2366495 100644 (file)
@@ -19833,6 +19833,7 @@ $messages['zea'] = array(
  * @author PhiLiP
  * @author Xiaomingyan
  * @author Yfdyh000
+ * @author 乌拉跨氪
  * @author 阿pp
  * @author 아라
  */
@@ -20018,7 +20019,7 @@ $1
        'config-support-postgres' => '* $1是一种流行的开源数据库系统,可作为MySQL的替代([http://www.php.net/manual/en/pgsql.installation.php 如何将对PostgreSQL的支持编译进PHP中])。本程序中可能依然存在一些小而明显的错误,因此并不建议在生产环境中使用该数据库系统。',
        'config-support-sqlite' => '* $1是一种轻量级的数据库系统,能被良好地支持。([http://www.php.net/manual/en/pdo.installation.php 如何将对SQLite的支持编译进PHP中],须使用PDO)',
        'config-support-oracle' => '* $1是一种商用企业级的数据库。([http://www.php.net/manual/en/oci8.installation.php 如何将对OCI8的支持编译进PHP中])',
-       'config-support-ibm_db2' => '* $1是一种商用企业级数据库。', # Fuzzy
+       'config-support-ibm_db2' => '* $1是一种商用企业级数据库。([http://www.php.net/manual/en/ibm-db2.installation.php 如何编译支持IBM DB2的PHP])',
        'config-header-mysql' => 'MySQL设置',
        'config-header-postgres' => 'PostgreSQL设置',
        'config-header-sqlite' => 'SQLite设置',
index da351ca..325f894 100644 (file)
@@ -488,7 +488,7 @@ abstract class Installer {
                if( !$_lsExists ) {
                        return false;
                }
-               unset($_lsExists);
+               unset( $_lsExists );
 
                require( "$IP/includes/DefaultSettings.php" );
                require( "$IP/LocalSettings.php" );
@@ -1073,18 +1073,18 @@ abstract class Installer {
         * @return string
         */
        protected function unicodeChar( $c ) {
-               $c = hexdec($c);
-               if ($c <= 0x7F) {
-                       return chr($c);
-               } elseif ($c <= 0x7FF) {
-                       return chr(0xC0 | $c >> 6) . chr(0x80 | $c & 0x3F);
-               } elseif ($c <= 0xFFFF) {
-                       return chr(0xE0 | $c >> 12) . chr(0x80 | $c >> 6 & 0x3F)
-                               . chr(0x80 | $c & 0x3F);
-               } elseif ($c <= 0x10FFFF) {
-                       return chr(0xF0 | $c >> 18) . chr(0x80 | $c >> 12 & 0x3F)
-                               . chr(0x80 | $c >> 6 & 0x3F)
-                               . chr(0x80 | $c & 0x3F);
+               $c = hexdec( $c );
+               if ( $c <= 0x7F ) {
+                       return chr( $c );
+               } elseif ( $c <= 0x7FF ) {
+                       return chr( 0xC0 | $c >> 6 ) . chr( 0x80 | $c & 0x3F );
+               } elseif ( $c <= 0xFFFF ) {
+                       return chr( 0xE0 | $c >> 12 ) . chr( 0x80 | $c >> 6 & 0x3F )
+                               . chr( 0x80 | $c & 0x3F );
+               } elseif ( $c <= 0x10FFFF ) {
+                       return chr( 0xF0 | $c >> 18 ) . chr( 0x80 | $c >> 12 & 0x3F )
+                               . chr( 0x80 | $c >> 6 & 0x3F )
+                               . chr( 0x80 | $c & 0x3F );
                } else {
                        return false;
                }
@@ -1105,8 +1105,8 @@ abstract class Installer {
                 * Note that we use the hex representation to create the code
                 * points in order to avoid any Unicode-destroying during transit.
                 */
-               $not_normal_c = $this->unicodeChar("FA6C");
-               $normal_c = $this->unicodeChar("242EE");
+               $not_normal_c = $this->unicodeChar( "FA6C" );
+               $normal_c = $this->unicodeChar( "242EE" );
 
                $useNormalizer = 'php';
                $needsUpdate = false;
index 94c38c4..4eb2d39 100644 (file)
@@ -516,7 +516,8 @@ class MysqlInstaller extends DatabaseInstaller {
                }
 
                if( $tryToCreate ) {
-                       $createHostList = array($server,
+                       $createHostList = array(
+                               $server,
                                'localhost',
                                'localhost.localdomain',
                                '%'
index da638de..a19637e 100644 (file)
@@ -329,7 +329,7 @@ class MysqlUpdater extends DatabaseUpdater {
                }
 
                if( $this->applyPatch( 'patch-fix-il_from.sql', false, "Fixing ancient broken imagelinks table." ) ) {
-                       $this->output("NOTE: you will have to run maintenance/refreshLinks.php after this." );
+                       $this->output( "NOTE: you will have to run maintenance/refreshLinks.php after this." );
                }
        }
 
index 845816e..4c72a8f 100644 (file)
@@ -119,7 +119,7 @@ class OracleInstaller extends DatabaseInstaller {
                                        return $status;
                                }
                                if ( !$this->getVar( '_CreateDBAccount' ) ) {
-                                       $status->fatal('config-db-sys-create-oracle');
+                                       $status->fatal( 'config-db-sys-create-oracle' );
                                }
                        } else {
                                return $status;
@@ -241,7 +241,7 @@ class OracleInstaller extends DatabaseInstaller {
                        $status->fatal( 'config-db-sys-user-exists-oracle', $this->getVar( 'wgDBuser' ) );
                }
 
-               if ($status->isOK()) {
+               if ( $status->isOK() ) {
                        // user created or already existing, switching back to a normal connection
                        // as the new user has all needed privileges to setup the rest of the schema
                        // i will be using that user as _InstallUser from this point on
index 8f43a6d..cafe8cd 100644 (file)
@@ -163,7 +163,7 @@ class OracleUpdater extends DatabaseUpdater {
         * converted to NULL in Oracle
         */
        protected function doRemoveNotNullEmptyDefaults() {
-               $meta = $this->db->fieldInfo( 'categorylinks' , 'cl_sortkey_prefix' );
+               $meta = $this->db->fieldInfo( 'categorylinks', 'cl_sortkey_prefix' );
                if ( $meta->isNullable() ) {
                        return;
                }
@@ -171,7 +171,7 @@ class OracleUpdater extends DatabaseUpdater {
        }
 
        protected function doRemoveNotNullEmptyDefaults2() {
-               $meta = $this->db->fieldInfo( 'ipblocks' , 'ipb_by_text' );
+               $meta = $this->db->fieldInfo( 'ipblocks', 'ipb_by_text' );
                if ( $meta->isNullable() ) {
                        return;
                }
index a1c5a22..ff9e271 100644 (file)
@@ -239,62 +239,62 @@ class PostgresUpdater extends DatabaseUpdater {
                        array( 'addPgIndex', 'filearchive',   'fa_sha1',                '(fa_sha1)' ),
 
                        array( 'checkIndex', 'pagelink_unique', array(
-                               array('pl_from', 'int4_ops', 'btree', 0),
-                               array('pl_namespace', 'int2_ops', 'btree', 0),
-                               array('pl_title', 'text_ops', 'btree', 0),
+                               array( 'pl_from', 'int4_ops', 'btree', 0 ),
+                               array( 'pl_namespace', 'int2_ops', 'btree', 0 ),
+                               array( 'pl_title', 'text_ops', 'btree', 0 ),
                        ),
                        'CREATE UNIQUE INDEX pagelink_unique ON pagelinks (pl_from,pl_namespace,pl_title)' ),
                        array( 'checkIndex', 'cl_sortkey', array(
-                               array('cl_to', 'text_ops', 'btree', 0),
-                               array('cl_sortkey', 'text_ops', 'btree', 0),
-                               array('cl_from', 'int4_ops', 'btree', 0),
+                               array( 'cl_to', 'text_ops', 'btree', 0 ),
+                               array( 'cl_sortkey', 'text_ops', 'btree', 0 ),
+                               array( 'cl_from', 'int4_ops', 'btree', 0 ),
                        ),
                        'CREATE INDEX cl_sortkey ON "categorylinks" USING "btree" ("cl_to", "cl_sortkey", "cl_from")' ),
                        array( 'checkIndex', 'logging_times', array(
-                               array('log_timestamp', 'timestamptz_ops', 'btree', 0),
+                               array( 'log_timestamp', 'timestamptz_ops', 'btree', 0 ),
                        ),
                        'CREATE INDEX "logging_times" ON "logging" USING "btree" ("log_timestamp")' ),
                        array( 'dropIndex', 'oldimage', 'oi_name' ),
                        array( 'checkIndex', 'oi_name_archive_name', array(
-                               array('oi_name', 'text_ops', 'btree', 0),
-                               array('oi_archive_name', 'text_ops', 'btree', 0),
+                               array( 'oi_name', 'text_ops', 'btree', 0 ),
+                               array( 'oi_archive_name', 'text_ops', 'btree', 0 ),
                        ),
                        'CREATE INDEX "oi_name_archive_name" ON "oldimage" USING "btree" ("oi_name", "oi_archive_name")' ),
                        array( 'checkIndex', 'oi_name_timestamp', array(
-                               array('oi_name', 'text_ops', 'btree', 0),
-                               array('oi_timestamp', 'timestamptz_ops', 'btree', 0),
+                               array( 'oi_name', 'text_ops', 'btree', 0 ),
+                               array( 'oi_timestamp', 'timestamptz_ops', 'btree', 0 ),
                        ),
                        'CREATE INDEX "oi_name_timestamp" ON "oldimage" USING "btree" ("oi_name", "oi_timestamp")' ),
                        array( 'checkIndex', 'page_main_title', array(
-                               array('page_title', 'text_pattern_ops', 'btree', 0),
+                               array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
                        ),
                        'CREATE INDEX "page_main_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 0)' ),
                        array( 'checkIndex', 'page_mediawiki_title', array(
-                               array('page_title', 'text_pattern_ops', 'btree', 0),
+                               array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
                        ),
                        'CREATE INDEX "page_mediawiki_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 8)' ),
                        array( 'checkIndex', 'page_project_title', array(
-                               array('page_title', 'text_pattern_ops', 'btree', 0),
+                               array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
                        ),
                        'CREATE INDEX "page_project_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 4)' ),
                        array( 'checkIndex', 'page_talk_title', array(
-                               array('page_title', 'text_pattern_ops', 'btree', 0),
+                               array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
                        ),
                        'CREATE INDEX "page_talk_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 1)' ),
                        array( 'checkIndex', 'page_user_title', array(
-                               array('page_title', 'text_pattern_ops', 'btree', 0),
+                               array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
                        ),
                        'CREATE INDEX "page_user_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 2)' ),
                        array( 'checkIndex', 'page_utalk_title', array(
-                               array('page_title', 'text_pattern_ops', 'btree', 0),
+                               array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
                        ),
                        'CREATE INDEX "page_utalk_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 3)' ),
                        array( 'checkIndex', 'ts2_page_text', array(
-                               array('textvector', 'tsvector_ops', 'gist', 0),
+                               array( 'textvector', 'tsvector_ops', 'gist', 0 ),
                        ),
                        'CREATE INDEX "ts2_page_text" ON "pagecontent" USING "gist" ("textvector")' ),
                        array( 'checkIndex', 'ts2_page_title', array(
-                               array('titlevector', 'tsvector_ops', 'gist', 0),
+                               array( 'titlevector', 'tsvector_ops', 'gist', 0 ),
                        ),
                        'CREATE INDEX "ts2_page_title" ON "page" USING "gist" ("titlevector")' ),
 
@@ -303,10 +303,10 @@ class PostgresUpdater extends DatabaseUpdater {
                        array( 'checkRevUserFkey' ),
                        array( 'dropIndex', 'ipblocks', 'ipb_address'),
                        array( 'checkIndex', 'ipb_address_unique', array(
-                               array('ipb_address', 'text_ops', 'btree', 0),
-                               array('ipb_user',    'int4_ops', 'btree', 0),
-                               array('ipb_auto',    'int2_ops', 'btree', 0),
-                               array('ipb_anon_only', 'int2_ops', 'btree', 0),
+                               array( 'ipb_address', 'text_ops', 'btree', 0 ),
+                               array( 'ipb_user',    'int4_ops', 'btree', 0 ),
+                               array( 'ipb_auto',    'int2_ops', 'btree', 0 ),
+                               array( 'ipb_anon_only', 'int2_ops', 'btree', 0 ),
                        ),
                        'CREATE UNIQUE INDEX ipb_address_unique ON ipblocks (ipb_address,ipb_user,ipb_auto,ipb_anon_only)' ),
 
@@ -509,7 +509,7 @@ END;
                        $this->output( "Creating sequence $ns\n" );
                        $this->db->query( "CREATE SEQUENCE $ns" );
                        if( $pkey !== false ) {
-                               $this->setDefault( $table,  $pkey, '"nextval"(\'"' . $ns . '"\'::"regclass")' );
+                               $this->setDefault( $table, $pkey, '"nextval"(\'"' . $ns . '"\'::"regclass")' );
                        }
                }
        }
index 8cee4b2..c080871 100644 (file)
@@ -933,7 +933,7 @@ class WebInstaller extends Installer {
         * @return string
         */
        public function getRadioSet( $params ) {
-               if ( !isset( $params['controlName']  ) ) {
+               if ( !isset( $params['controlName'] ) ) {
                        $params['controlName'] = 'config_' . $params['var'];
                }
 
@@ -1096,7 +1096,7 @@ class WebInstaller extends Installer {
                } elseif ( !empty( $_SERVER['SCRIPT_NAME'] ) ) {
                        $path = $_SERVER['SCRIPT_NAME'];
                }
-               if ($path !== false) {
+               if ( $path !== false ) {
                        $uri = preg_replace( '{^(.*)/(mw-)?config.*$}', '$1', $path );
                        $this->setVar( 'wgScriptPath', $uri );
                } else {
index f3166c2..42f451f 100644 (file)
@@ -219,7 +219,7 @@ class WebInstallerOutput {
                $dbTypes = $this->parent->getDBTypes();
 
                $this->parent->request->response()->header( 'Content-Type: text/html; charset=utf-8' );
-               if (!$this->allowFrames) {
+               if ( !$this->allowFrames ) {
                        $this->parent->request->response()->header( 'X-Frame-Options: DENY' );
                }
                if ( $this->redirectTarget ) {
@@ -239,7 +239,7 @@ class WebInstallerOutput {
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
        <title><?php $this->outputTitle(); ?></title>
        <?php echo $this->getCssUrl() . "\n"; ?>
-       <?php echo Html::inlineScript(  "var dbTypes = " . Xml::encodeJsVar( $dbTypes ) ) . "\n"; ?>
+       <?php echo Html::inlineScript( "var dbTypes = " . Xml::encodeJsVar( $dbTypes ) ) . "\n"; ?>
        <?php echo $this->getJQuery() . "\n"; ?>
        <?php echo Html::linkedScript( '../skins/common/config.js' ) . "\n"; ?>
 </head>
index 572360a..07047f2 100644 (file)
@@ -369,7 +369,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage {
 
                // Set the relevant variables from LocalSettings.php
                $requiredVars = array( 'wgDBtype' );
-               $status = $this->importVariables( $requiredVars , $vars );
+               $status = $this->importVariables( $requiredVars, $vars );
                $installer = $this->parent->getDBInstaller();
                $status->merge( $this->importVariables( $installer->getGlobalNames(), $vars ) );
                if ( !$status->isOK() ) {
@@ -645,7 +645,7 @@ class WebInstaller_Name extends WebInstallerPage {
                        $this->parent->getTextBox( array(
                                'var' => 'wgSitename',
                                'label' => 'config-site-name',
-                         'help' => $this->parent->getHelpBox( 'config-site-name-help' )
+                               'help' => $this->parent->getHelpBox( 'config-site-name-help' )
                        ) ) .
                        $this->parent->getRadioSet( array(
                                'var' => '_NamespaceType',
@@ -955,7 +955,7 @@ class WebInstaller_Options extends WebInstallerPage {
 
                // We'll hide/show this on demand when the value changes, see config.js.
                $cacheval = $this->getVar( 'wgMainCacheType' );
-               if (!$cacheval) {
+               if ( !$cacheval ) {
                        // We need to set a default here; but don't hardcode it
                        // or we lose it every time we reload the page for validation
                        // or going back!
@@ -1025,7 +1025,7 @@ class WebInstaller_Options extends WebInstallerPage {
                } else {
                        $iframeAttribs['src'] = $this->getCCPartnerUrl();
                }
-               $wrapperStyle = ($this->getVar('_LicenseCode') == 'cc-choose') ? '' : 'display: none';
+               $wrapperStyle = ($this->getVar( '_LicenseCode' ) == 'cc-choose') ? '' : 'display: none';
 
                return
                        "<div class=\"config-cc-wrapper\" id=\"config-cc-wrapper\" style=\"$wrapperStyle\">\n" .
@@ -1155,12 +1155,12 @@ class WebInstaller_Install extends WebInstallerPage {
                        return 'continue';
                } elseif( $this->parent->request->wasPosted() ) {
                        $this->startForm();
-                       $this->addHTML("<ul>");
+                       $this->addHTML( "<ul>" );
                        $results = $this->parent->performInstallation(
                                array( $this, 'startStage'),
                                array( $this, 'endStage' )
                        );
-                       $this->addHTML("</ul>");
+                       $this->addHTML( "</ul>" );
                        // PerformInstallation bails on a fatal, so make sure the last item
                        // completed before giving 'next.' Likewise, only provide back on failure
                        $lastStep = end( $results );
@@ -1287,8 +1287,8 @@ class WebInstaller_ReleaseNotes extends WebInstaller_Document {
        protected function getFileName() {
                global $wgVersion;
 
-               if(preg_match( '/^(\d+)\.(\d+).*/i', $wgVersion, $result ) ) {
-                       throw new MWException('Variable $wgVersion has an invalid value.');
+               if( !preg_match( '/^(\d+)\.(\d+).*/i', $wgVersion, $result ) ) {
+                       throw new MWException( 'Variable $wgVersion has an invalid value.' );
                }
 
                return 'RELEASE-NOTES-' . $result[1] . '.' . $result[2];
index 92beb2c..4e0acd2 100644 (file)
@@ -324,4 +324,32 @@ abstract class JobQueue {
         * @return void
         */
        protected function doWaitForBackups() {}
+
+       /**
+        * Return a map of task names to task definition maps.
+        * A "task" is a fast periodic queue maintenance action.
+        * Mutually exclusive tasks must implement their own locking in the callback.
+        *
+        * Each task value is an associative array with:
+        *   - name     : the name of the task
+        *   - callback : a PHP callable that performs the task
+        *   - period   : the period in seconds corresponding to the task frequency
+        *
+        * @return Array
+        */
+       final public function getPeriodicTasks() {
+               $tasks = $this->doGetPeriodicTasks();
+               foreach ( $tasks as $name => &$def ) {
+                       $def['name'] = $name;
+               }
+               return $tasks;
+       }
+
+       /**
+        * @see JobQueue::getPeriodicTasks()
+        * @return Array
+        */
+       protected function doGetPeriodicTasks() {
+               return array();
+       }
 }
index 99a517e..4df5c07 100644 (file)
@@ -28,6 +28,7 @@
  * @since 1.21
  */
 class JobQueueDB extends JobQueue {
+       const ROOTJOB_TTL     = 1209600; // integer; seconds to remember root jobs (14 days)
        const CACHE_TTL_SHORT = 30; // integer; seconds to cache info without re-validating
        const CACHE_TTL_LONG  = 300; // integer; seconds to cache info that is kept up to date
        const MAX_AGE_PRUNE   = 604800; // integer; seconds a job can live once claimed
@@ -114,7 +115,7 @@ class JobQueueDB extends JobQueue {
 
                list( $dbr, $scope ) = $this->getSlaveDB();
                $count = (int)$dbr->selectField( 'job', 'COUNT(*)',
-                       array( 'job_cmd' => $this->type, "job_token !={$dbr->addQuotes('')}" ),
+                       array( 'job_cmd' => $this->type, "job_token != {$dbr->addQuotes( '' )}" ),
                        __METHOD__
                );
                $wgMemc->set( $key, $count, self::CACHE_TTL_SHORT );
@@ -215,10 +216,6 @@ class JobQueueDB extends JobQueue {
 
                $uuid = wfRandomString( 32 ); // pop attempt
                $job = false; // job popped off
-               // Occasionally recycle jobs back into the queue that have been claimed too long
-               if ( mt_rand( 0, 99 ) == 0 ) {
-                       $this->recycleStaleJobs();
-               }
                do { // retry when our row is invalid or deleted as a duplicate
                        // Try to reserve a row in the DB...
                        if ( in_array( $this->order, array( 'fifo', 'timestamp' ) ) ) {
@@ -401,8 +398,10 @@ class JobQueueDB extends JobQueue {
         *
         * @return integer Number of jobs recycled/deleted
         */
-       protected function recycleStaleJobs() {
-               $now   = time();
+       public function recycleAndDeleteStaleJobs() {
+               global $wgMemc;
+
+               $now = time();
                list( $dbw, $scope ) = $this->getMasterDB();
                $count = 0; // affected rows
 
@@ -439,6 +438,7 @@ class JobQueueDB extends JobQueue {
                                );
                                $count += $dbw->affectedRows();
                                wfIncrStats( 'job-recycle', $dbw->affectedRows() );
+                               $wgMemc->set( $this->getCacheKey( 'empty' ), 'false', self::CACHE_TTL_LONG );
                        }
                }
 
@@ -516,7 +516,7 @@ class JobQueueDB extends JobQueue {
                        }
 
                        // Update the timestamp of the last root job started at the location...
-                       return $wgMemc->set( $key, $params['rootJobTimestamp'], 14*86400 ); // 2 weeks
+                       return $wgMemc->set( $key, $params['rootJobTimestamp'], JobQueueDB::ROOTJOB_TTL );
                } );
 
                return true;
@@ -554,6 +554,18 @@ class JobQueueDB extends JobQueue {
                wfWaitForSlaves();
        }
 
+       /**
+        * @return Array
+        */
+       protected function doGetPeriodicTasks() {
+               return array(
+                       'recycleAndDeleteStaleJobs' => array(
+                               'callback' => array( $this, 'recycleAndDeleteStaleJobs' ),
+                               'period'   => ceil( $this->claimTTL / 2 )
+                       )
+               );
+       }
+
        /**
         * @return Array (DatabaseBase, ScopedCallback)
         */
index cf0215b..6d9d590 100644 (file)
@@ -228,4 +228,58 @@ class JobQueueGroup {
                }
                return $types;
        }
+
+       /**
+        * Execute any due periodic queue maintenance tasks for all queues.
+        *
+        * A task is "due" if the time ellapsed since the last run is greater than
+        * the defined run period. Concurrent calls to this function will cause tasks
+        * to be attempted twice, so they may need their own methods of mutual exclusion.
+        *
+        * @return integer Number of tasks run
+        */
+       public function executeReadyPeriodicTasks() {
+               global $wgMemc;
+
+               list( $db, $prefix ) = wfSplitWikiID( $this->wiki );
+               $key = wfForeignMemcKey( $db, $prefix, 'jobqueuegroup', 'taskruns', 'v1' );
+               $lastRuns = $wgMemc->get( $key ); // (queue => task => UNIX timestamp)
+
+               $count = 0;
+               $tasksRun = array(); // (queue => task => UNIX timestamp)
+               foreach ( $this->getQueueTypes() as $type ) {
+                       $queue = $this->get( $type );
+                       foreach ( $queue->getPeriodicTasks() as $task => $definition ) {
+                               if ( $definition['period'] <= 0 ) {
+                                       continue; // disabled
+                               } elseif ( !isset( $lastRuns[$type][$task] )
+                                       || $lastRuns[$type][$task] < ( time() - $definition['period'] ) )
+                               {
+                                       if ( call_user_func( $definition['callback'] ) !== null ) {
+                                               $tasksRun[$type][$task] = time();
+                                               ++$count;
+                                       }
+                               }
+                       }
+               }
+
+               $wgMemc->merge( $key, function( $cache, $key, $lastRuns ) use ( $tasksRun ) {
+                       if ( is_array( $lastRuns ) ) {
+                               foreach ( $tasksRun as $type => $tasks ) {
+                                       foreach ( $tasks as $task => $timestamp ) {
+                                               if ( !isset( $lastRuns[$type][$task] )
+                                                       || $timestamp > $lastRuns[$type][$task] )
+                                               {
+                                                       $lastRuns[$type][$task] = $timestamp;
+                                               }
+                                       }
+                               }
+                       } else {
+                               $lastRuns = $tasksRun;
+                       }
+                       return $lastRuns;
+               } );
+
+               return $count;
+       }
 }
index 03d5276..d34bf6e 100644 (file)
@@ -74,7 +74,7 @@ class LogEventsList extends ContextSource {
        public function showHeader( $type ) {
                wfDeprecated( __METHOD__, '1.19' );
                // If only one log type is used, then show a special message...
-               $headerType = (count($type) == 1) ? $type[0] : '';
+               $headerType = (count( $type ) == 1) ? $type[0] : '';
                $out = $this->getOutput();
                if( LogPage::isLogType( $headerType ) ) {
                        $page = new LogPage( $headerType );
@@ -97,8 +97,8 @@ class LogEventsList extends ContextSource {
         * @param $filter: array
         * @param $tagFilter: array?
         */
-       public function showOptions( $types=array(), $user='', $page='', $pattern='', $year='',
-               $month = '', $filter = null, $tagFilter='' ) {
+       public function showOptions( $types=array(), $user = '', $page = '', $pattern = '', $year = '',
+               $month = '', $filter = null, $tagFilter = '' ) {
                global $wgScript, $wgMiserMode;
 
                $title = SpecialPage::getTitleFor( 'Log' );
@@ -117,7 +117,7 @@ class LogEventsList extends ContextSource {
                $html .= $this->getExtraInputs( $types ) . "\n";
 
                // Title pattern, if allowed
-               if (!$wgMiserMode) {
+               if ( !$wgMiserMode ) {
                        $html .= $this->getTitlePattern( $pattern ) . "\n";
                }
 
@@ -125,12 +125,12 @@ class LogEventsList extends ContextSource {
                $html .= Xml::tags( 'p', null, Xml::dateMenu( $year, $month ) );
 
                // Tag filter
-               if ($tagSelector) {
+               if ( $tagSelector ) {
                        $html .= Xml::tags( 'p', null, implode( '&#160;', $tagSelector ) );
                }
 
                // Filter links
-               if ($filter) {
+               if ( $filter ) {
                        $html .= Xml::tags( 'p', null, $this->getFilterLinks( $filter ) );
                }
 
@@ -162,7 +162,7 @@ class LogEventsList extends ContextSource {
                        $query = $this->getDefaultQuery();
                        $queryKey = "hide_{$type}_log";
 
-                       $hideVal = 1 - intval($val);
+                       $hideVal = 1 - intval( $val );
                        $query[$queryKey] = $hideVal;
 
                        $link = Linker::linkKnown(
@@ -176,7 +176,7 @@ class LogEventsList extends ContextSource {
                        $hiddens .= Html::hidden( "hide_{$type}_log", $val ) . "\n";
                }
                // Build links
-               return '<small>'.$this->getLanguage()->pipeList( $links ) . '</small>' . $hiddens;
+               return '<small>' . $this->getLanguage()->pipeList( $links ) . '</small>' . $hiddens;
        }
 
        private function getDefaultQuery() {
@@ -198,7 +198,7 @@ class LogEventsList extends ContextSource {
         * @return String: Formatted HTML
         */
        private function getTypeMenu( $queryTypes ) {
-               $queryType = count($queryTypes) == 1 ? $queryTypes[0] : '';
+               $queryType = count( $queryTypes ) == 1 ? $queryTypes[0] : '';
                $selector = $this->getTypeSelector();
                $selector->setDefault( $queryType );
                return $selector->getHtml();
@@ -212,7 +212,7 @@ class LogEventsList extends ContextSource {
        public function getTypeSelector() {
                $typesByName = array(); // Temporary array
                // First pass to load the log names
-               foreach(  LogPage::validTypes() as $type ) {
+               foreach( LogPage::validTypes() as $type ) {
                        $page = new LogPage( $type );
                        $restriction = $page->getRestriction();
                        if ( $this->getUser()->isAllowed( $restriction ) ) {
@@ -221,7 +221,7 @@ class LogEventsList extends ContextSource {
                }
 
                // Second pass to sort by name
-               asort($typesByName);
+               asort( $typesByName );
 
                // Always put "All public logs" on top
                $public = $typesByName[''];
@@ -273,10 +273,10 @@ class LogEventsList extends ContextSource {
        private function getExtraInputs( $types ) {
                $offender = $this->getRequest()->getVal( 'offender' );
                $user = User::newFromName( $offender, false );
-               if( !$user || ($user->getId() == 0 && !IP::isIPAddress($offender) ) ) {
+               if( !$user || ( $user->getId() == 0 && !IP::isIPAddress( $offender ) ) ) {
                        $offender = ''; // Blank field if invalid
                }
-               if( count($types) == 1 && $types[0] == 'suppress' ) {
+               if( count( $types ) == 1 && $types[0] == 'suppress' ) {
                        return Xml::inputLabel( $this->msg( 'revdelete-offender' )->text(), 'offender',
                                'mw-log-offender', 20, $offender );
                }
@@ -383,8 +383,8 @@ class LogEventsList extends ContextSource {
         * @param $right string
         * @return Boolean
         */
-       public static function typeAction( $row, $type, $action, $right='' ) {
-               $match = is_array($type) ?
+       public static function typeAction( $row, $type, $action, $right = '' ) {
+               $match = is_array( $type ) ?
                        in_array( $row->log_type, $type ) : $row->log_type == $type;
                if( $match ) {
                        $match = is_array( $action ) ?
@@ -468,13 +468,13 @@ class LogEventsList extends ContextSource {
         * @return Integer Number of total log items (not limited by $lim)
         */
        public static function showLogExtract(
-               &$out, $types=array(), $page='', $user='', $param = array()
+               &$out, $types=array(), $page = '', $user = '', $param = array()
        ) {
                $defaultParameters = array(
                        'lim' => 25,
                        'conds' => array(),
                        'showIfEmpty' => true,
-                       'msgKey' => array(''),
+                       'msgKey' => array( '' ),
                        'wrap' => "$1",
                        'flags' => 0
                );
@@ -520,8 +520,8 @@ class LogEventsList extends ContextSource {
                                }
                        }
                        $s .= $loglist->beginLogEventsList() .
-                                $logBody .
-                                $loglist->endLogEventsList();
+                               $logBody .
+                               $loglist->endLogEventsList();
                } else {
                        if ( $showIfEmpty ) {
                                $s = Html::rawElement( 'div', array( 'class' => 'mw-warning-logempty' ),
@@ -602,4 +602,4 @@ class LogEventsList extends ContextSource {
                }
                return false;
        }
- }
+}
index ce5b053..5ff0434 100644 (file)
@@ -198,12 +198,12 @@ class LogFormatter {
                        case 'move':
                                switch( $entry->getSubtype() ) {
                                        case 'move':
-                                               $movesource =  $parameters['4::target'];
+                                               $movesource = $parameters['4::target'];
                                                $text = wfMessage( '1movedto2' )
                                                        ->rawParams( $target, $movesource )->inContentLanguage()->escaped();
                                                break;
                                        case 'move_redir':
-                                               $movesource =  $parameters['4::target'];
+                                               $movesource = $parameters['4::target'];
                                                $text = wfMessage( '1movedto2_redir' )
                                                        ->rawParams( $target, $movesource )->inContentLanguage()->escaped();
                                                break;
@@ -588,7 +588,7 @@ class LogFormatter {
                        return $this->msg( $message )->text();
                }
 
-               $content =  $this->msg( $message )->escaped();
+               $content = $this->msg( $message )->escaped();
                $attribs = array( 'class' => 'history-deleted' );
                return Html::rawElement( 'span', $attribs, $content );
        }
@@ -713,7 +713,7 @@ class LegacyLogFormatter extends LogFormatter {
 
                $performer = $this->getPerformerElement();
                if ( !$this->irctext ) {
-                       $action = $performer .  $this->msg( 'word-separator' )->text() . $action;
+                       $action = $performer . $this->msg( 'word-separator' )->text() . $action;
                }
 
                return $action;
@@ -913,7 +913,7 @@ class DeleteLogFormatter extends LogFormatter {
                                foreach ( $extra as $v ) {
                                        $changes[] = $this->msg( $v )->plain();
                                }
-                               $changeText =  $this->context->getLanguage()->listToText( $changes );
+                               $changeText = $this->context->getLanguage()->listToText( $changes );
 
 
                                $newParams = array_slice( $params, 0, 3 );
@@ -957,7 +957,7 @@ class DeleteLogFormatter extends LogFormatter {
                                $this->msg( $message )->escaped(),
                                array(),
                                array( 'target' => $this->entry->getTarget()->getPrefixedDBkey() )
-                        );
+                       );
                        return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();
 
                case 'revision': // If an edit was hidden from a page give a review link to the history
index 5854e99..9778f27 100644 (file)
@@ -271,7 +271,7 @@ class LogPage {
                                                $params[2] = isset( $params[2] ) ?
                                                        self::formatBlockFlags( $params[2], $langObj ) : '';
                                        // Page protections
-                                       } elseif ( $type == 'protect' && count($params) == 3 ) {
+                                       } elseif ( $type == 'protect' && count( $params ) == 3 ) {
                                                // Restrictions and expiries
                                                if( $skin ) {
                                                        $details .= $wgLang->getDirMark() . htmlspecialchars( " {$params[1]}" );
index af62ce3..fad1058 100644 (file)
@@ -71,7 +71,7 @@ class LogPager extends ReverseChronologicalPager {
        public function getFilterParams() {
                global $wgFilterLogTypes;
                $filters = array();
-               if( count($this->types) ) {
+               if( count( $this->types ) ) {
                        return $filters;
                }
                foreach( $wgFilterLogTypes as $type => $default ) {
@@ -122,10 +122,10 @@ class LogPager extends ReverseChronologicalPager {
                if( $hideLogs !== false ) {
                        $this->mConds[] = $hideLogs;
                }
-               if( count($types) ) {
+               if( count( $types ) ) {
                        $this->mConds['log_type'] = $types;
                        // Set typeCGI; used in url param for paging
-                       if( count($types) == 1 ) $this->typeCGI = $types[0];
+                       if( count( $types ) == 1 ) $this->typeCGI = $types[0];
                }
        }
 
@@ -140,7 +140,7 @@ class LogPager extends ReverseChronologicalPager {
                        return false;
                }
                $usertitle = Title::makeTitleSafe( NS_USER, $name );
-               if( is_null($usertitle) ) {
+               if( is_null( $usertitle ) ) {
                        return false;
                }
                /* Fetch userid at first, if known, provides awesome query plan afterwards */
@@ -154,9 +154,9 @@ class LogPager extends ReverseChronologicalPager {
                        // Paranoia: avoid brute force searches (bug 17342)
                        $user = $this->getUser();
                        if( !$user->isAllowed( 'deletedhistory' ) ) {
-                               $this->mConds[] = $this->mDb->bitAnd('log_deleted', LogPage::DELETED_USER) . ' = 0';
+                               $this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::DELETED_USER ) . ' = 0';
                        } elseif( !$user->isAllowed( 'suppressrevision' ) ) {
-                               $this->mConds[] = $this->mDb->bitAnd('log_deleted', LogPage::SUPPRESSED_USER) .
+                               $this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::SUPPRESSED_USER ) .
                                        ' != ' . LogPage::SUPPRESSED_USER;
                        }
                        $this->performer = $usertitle->getText();
@@ -209,9 +209,9 @@ class LogPager extends ReverseChronologicalPager {
                // Paranoia: avoid brute force searches (bug 17342)
                $user = $this->getUser();
                if( !$user->isAllowed( 'deletedhistory' ) ) {
-                       $this->mConds[] = $db->bitAnd('log_deleted', LogPage::DELETED_ACTION) . ' = 0';
+                       $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::DELETED_ACTION) . ' = 0';
                } elseif( !$user->isAllowed( 'suppressrevision' ) ) {
-                       $this->mConds[] = $db->bitAnd('log_deleted', LogPage::SUPPRESSED_ACTION) .
+                       $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::SUPPRESSED_ACTION) .
                                ' != ' . LogPage::SUPPRESSED_ACTION;
                }
        }
@@ -251,10 +251,10 @@ class LogPager extends ReverseChronologicalPager {
                # avoids site-breaking filesorts.
                } elseif( $this->title || $this->pattern || $this->performer ) {
                        $index['logging'] = array( 'page_time', 'user_time' );
-                       if( count($this->types) == 1 ) {
+                       if( count( $this->types ) == 1 ) {
                                $index['logging'][] = 'log_user_type_time';
                        }
-               } elseif( count($this->types) == 1 ) {
+               } elseif( count( $this->types ) == 1 ) {
                        $index['logging'] = 'type_time';
                } else {
                        $index['logging'] = 'times';
index a515c63..46d1b95 100644 (file)
@@ -62,7 +62,7 @@ class BmpHandler extends BitmapHandler {
                        return false;
                }
                $header = fread( $f, 54 );
-               fclose($f);
+               fclose( $f );
 
                // Extract binary form of width and height from the header
                $w = substr( $header, 18, 4);
index cd8a044..0a39a2c 100644 (file)
@@ -183,7 +183,7 @@ class DjVuHandler extends ImageHandler {
                if ( $wgDjvuPostProcessor ) {
                        $cmd .= " | {$wgDjvuPostProcessor}";
                }
-               $cmd .= ' > ' . wfEscapeShellArg($dstPath) . ') 2>&1';
+               $cmd .= ' > ' . wfEscapeShellArg( $dstPath ) . ') 2>&1';
                wfProfileIn( 'ddjvu' );
                wfDebug( __METHOD__.": $cmd\n" );
                $retval = '';
@@ -194,7 +194,7 @@ class DjVuHandler extends ImageHandler {
                if ( $retval != 0 || $removed ) {
                        wfDebugLog( 'thumbnail',
                                sprintf( 'thumbnail failed on %s: error %d "%s" from "%s"',
-                                       wfHostname(), $retval, trim($err), $cmd ) );
+                                       wfHostname(), $retval, trim( $err ), $cmd ) );
                        return new MediaTransformError( 'thumbnail_error', $width, $height, $err );
                } else {
                        $params = array(
@@ -228,7 +228,7 @@ class DjVuHandler extends ImageHandler {
         * @param $gettext Boolean: DOCUMENT (Default: false)
         * @return bool
         */
-       function getMetaTree( $image , $gettext = false ) {
+       function getMetaTree( $image, $gettext = false ) {
                if ( isset( $image->dejaMetaTree ) ) {
                        return $image->dejaMetaTree;
                }
index cad9c1b..5300947 100644 (file)
@@ -43,9 +43,9 @@ class DjVuImage {
                $this->mFilename = $filename;
        }
 
-        /**
-         * @const DJVUTXT_MEMORY_LIMIT Memory limit for the DjVu description software
-         */
+       /**
+        * @const DJVUTXT_MEMORY_LIMIT Memory limit for the DjVu description software
+        */
        const DJVUTXT_MEMORY_LIMIT = 300000;
 
        /**
@@ -260,7 +260,7 @@ class DjVuImage {
                if ( isset( $wgDjvuTxt ) ) {
                        wfProfileIn( 'djvutxt' );
                        $cmd = wfEscapeShellArg( $wgDjvuTxt ) . ' --detail=page ' . wfEscapeShellArg( $this->mFilename ) ;
-                       wfDebug( __METHOD__.": $cmd\n" );
+                       wfDebug( __METHOD__ . ": $cmd\n" );
                        $retval = '';
                        $txt = wfShellExec( $cmd, $retval, array(), array( 'memory' => self::DJVUTXT_MEMORY_LIMIT ) );
                        wfProfileOut( 'djvutxt' );
index f0b4536..63b2122 100644 (file)
@@ -290,8 +290,8 @@ class Exif {
                        // Only give a warning for b/c, since originally we didn't
                        // require this. The number of things affected by this is
                        // rather small.
-                       wfWarn( 'Exif class did not have byte order specified. '
-                        . 'Some properties may be decoded incorrectly.' );
+                       wfWarn( 'Exif class did not have byte order specified. ' .
+                               'Some properties may be decoded incorrectly.' );
                        $this->byteOrder = 'BE'; // BE seems about twice as popular as LE in jpg's.
                }
 
@@ -322,7 +322,7 @@ class Exif {
 
                foreach ( array_keys( $this->mRawExifData ) as $section ) {
                        if ( !in_array( $section, array_keys( $this->mExifTags ) ) ) {
-                               $this->debug( $section , __FUNCTION__, "'$section' is not a valid Exif section" );
+                               $this->debug( $section, __FUNCTION__, "'$section' is not a valid Exif section" );
                                continue;
                        }
 
@@ -396,8 +396,8 @@ class Exif {
                if ( isset ( $this->mFilteredExifData['ComponentsConfiguration'] ) ) {
                        $val = $this->mFilteredExifData['ComponentsConfiguration'];
                        $ccVals = array();
-                       for ($i = 0; $i < strlen($val); $i++) {
-                               $ccVals[$i] = ord( substr($val, $i, 1) );
+                       for ( $i = 0; $i < strlen( $val ); $i++ ) {
+                               $ccVals[$i] = ord( substr( $val, $i, 1 ) );
                        }
                        $ccVals['_type'] = 'ol'; //this is for formatting later.
                        $this->mFilteredExifData['ComponentsConfiguration'] = $ccVals;
@@ -413,11 +413,11 @@ class Exif {
                if ( isset ( $this->mFilteredExifData['GPSVersion'] ) ) {
                        $val = $this->mFilteredExifData['GPSVersion'];
                        $newVal = '';
-                       for ($i = 0; $i < strlen($val); $i++) {
+                       for ( $i = 0; $i < strlen( $val ); $i++ ) {
                                if ( $i !== 0 ) {
                                        $newVal .= '.';
                                }
-                               $newVal .= ord( substr($val, $i, 1) );
+                               $newVal .= ord( substr( $val, $i, 1 ) );
                        }
                        if ( $this->byteOrder === 'LE' ) {
                                // Need to reverse the string
@@ -442,17 +442,17 @@ class Exif {
        private function charCodeString ( $prop ) {
                if ( isset( $this->mFilteredExifData[$prop] ) ) {
 
-                       if ( strlen($this->mFilteredExifData[$prop]) <= 8 ) {
+                       if ( strlen( $this->mFilteredExifData[$prop] ) <= 8 ) {
                                //invalid. Must be at least 9 bytes long.
 
-                               $this->debug( $this->mFilteredExifData[$prop] , __FUNCTION__, false );
-                               unset($this->mFilteredExifData[$prop]);
+                               $this->debug( $this->mFilteredExifData[$prop], __FUNCTION__, false );
+                               unset( $this->mFilteredExifData[$prop] );
                                return;
                        }
-                       $charCode = substr( $this->mFilteredExifData[$prop], 0, 8);
-                       $val = substr( $this->mFilteredExifData[$prop], 8);
+                       $charCode = substr( $this->mFilteredExifData[$prop], 0, 8 );
+                       $val = substr( $this->mFilteredExifData[$prop], 8 );
 
-                       switch ($charCode) {
+                       switch ( $charCode ) {
                                case "\x4A\x49\x53\x00\x00\x00\x00\x00":
                                        //JIS
                                        $charset = "Shift-JIS";
@@ -466,9 +466,9 @@ class Exif {
                        }
                        // This could possibly check to see if iconv is really installed
                        // or if we're using the compatibility wrapper in globalFunctions.php
-                       if ($charset) {
+                       if ( $charset ) {
                                wfSuppressWarnings();
-                               $val = iconv($charset, 'UTF-8//IGNORE', $val);
+                               $val = iconv( $charset, 'UTF-8//IGNORE', $val );
                                wfRestoreWarnings();
                        } else {
                                // if valid utf-8, assume that, otherwise assume windows-1252
@@ -476,17 +476,17 @@ class Exif {
                                UtfNormal::quickIsNFCVerify( $valCopy ); //validates $valCopy.
                                if ( $valCopy !== $val ) {
                                        wfSuppressWarnings();
-                                       $val = iconv('Windows-1252', 'UTF-8//IGNORE', $val);
+                                       $val = iconv( 'Windows-1252', 'UTF-8//IGNORE', $val );
                                        wfRestoreWarnings();
                                }
                        }
 
                        //trim and check to make sure not only whitespace.
-                       $val = trim($val);
+                       $val = trim( $val );
                        if ( strlen( $val ) === 0 ) {
                                //only whitespace.
-                               $this->debug( $this->mFilteredExifData[$prop] , __FUNCTION__, "$prop: Is only whitespace" );
-                               unset($this->mFilteredExifData[$prop]);
+                               $this->debug( $this->mFilteredExifData[$prop], __FUNCTION__, "$prop: Is only whitespace" );
+                               unset( $this->mFilteredExifData[$prop] );
                                return;
                        }
 
@@ -580,7 +580,7 @@ class Exif {
         */
        function getFormattedData() {
                wfDeprecated( __METHOD__, '1.18' );
-               if (!$this->mFormattedExifData) {
+               if ( !$this->mFormattedExifData ) {
                        $this->makeFormattedData();
                }
                return $this->mFormattedExifData;
@@ -612,7 +612,7 @@ class Exif {
         * @return bool
         */
        private function isByte( $in ) {
-               if ( !is_array( $in ) && sprintf('%d', $in) == $in && $in >= 0 && $in <= 255 ) {
+               if ( !is_array( $in ) && sprintf( '%d', $in ) == $in && $in >= 0 && $in <= 255 ) {
                        $this->debug( $in, __FUNCTION__, true );
                        return true;
                } else {
@@ -648,7 +648,7 @@ class Exif {
         * @return bool
         */
        private function isShort( $in ) {
-               if ( !is_array( $in ) && sprintf('%d', $in) == $in && $in >= 0 && $in <= 65536 ) {
+               if ( !is_array( $in ) && sprintf( '%d', $in ) == $in && $in >= 0 && $in <= 65536 ) {
                        $this->debug( $in, __FUNCTION__, true );
                        return true;
                } else {
@@ -662,7 +662,7 @@ class Exif {
         * @return bool
         */
        private function isLong( $in ) {
-               if ( !is_array( $in ) && sprintf('%d', $in) == $in && $in >= 0 && $in <= 4294967296 ) {
+               if ( !is_array( $in ) && sprintf( '%d', $in ) == $in && $in >= 0 && $in <= 4294967296 ) {
                        $this->debug( $in, __FUNCTION__, true );
                        return true;
                } else {
index cd7ec19..c34e67b 100644 (file)
@@ -34,8 +34,8 @@ class ExifBitmapHandler extends BitmapHandler {
 
        function convertMetadataVersion( $metadata, $version = 1 ) {
                // basically flattens arrays.
-               $version = explode(';', $version, 2);
-               $version = intval($version[0]);
+               $version = explode( ';', $version, 2 );
+               $version = intval( $version[0] );
                if ( $version < 1 || $version >= 2 ) {
                        return $metadata;
                }
@@ -56,7 +56,7 @@ class ExifBitmapHandler extends BitmapHandler {
                        && is_array( $metadata['Software'][0])
                        && isset( $metadata['Software'][0][0] )
                        && isset( $metadata['Software'][0][1])
-                ) {
+               ) {
                        $metadata['Software'] = $metadata['Software'][0][0] . ' (Version '
                                . $metadata['Software'][0][1] . ')';
                }
@@ -102,11 +102,11 @@ class ExifBitmapHandler extends BitmapHandler {
                                $exif['MEDIAWIKI_EXIF_VERSION'] == 1 )
                        {
                                //back-compatible but old
-                               wfDebug( __METHOD__.": back-compat version\n" );
+                               wfDebug( __METHOD__ . ": back-compat version\n" );
                                return self::METADATA_COMPATIBLE;
                        }
                        # Wrong (non-compatible) version
-                       wfDebug( __METHOD__.": wrong version\n" );
+                       wfDebug( __METHOD__ . ": wrong version\n" );
                        return self::METADATA_BAD;
                }
                return self::METADATA_GOOD;
@@ -163,7 +163,7 @@ class ExifBitmapHandler extends BitmapHandler {
                        $rotation = 0;
                }
 
-               if ($rotation == 90 || $rotation == 270) {
+               if ( $rotation == 90 || $rotation == 270 ) {
                        $width = $gis[0];
                        $gis[0] = $gis[1];
                        $gis[1] = $width;
index d44dfd1..7109f42 100644 (file)
@@ -80,20 +80,20 @@ class FormatMetadata {
                        }
 
                        //This is done differently as the tag is an array.
-                       if ($tag == 'GPSTimeStamp' && count($vals) === 3) {
+                       if ( $tag == 'GPSTimeStamp' && count( $vals ) === 3) {
                                //hour min sec array
 
-                               $h = explode('/', $vals[0]);
-                               $m = explode('/', $vals[1]);
-                               $s = explode('/', $vals[2]);
+                               $h = explode( '/', $vals[0] );
+                               $m = explode( '/', $vals[1] );
+                               $s = explode( '/', $vals[2] );
 
                                // this should already be validated
                                // when loaded from file, but it could
                                // come from a foreign repo, so be
                                // paranoid.
-                               if ( !isset($h[1])
-                                       || !isset($m[1])
-                                       || !isset($s[1])
+                               if ( !isset( $h[1] )
+                                       || !isset( $m[1] )
+                                       || !isset( $s[1] )
                                        || $h[1] == 0
                                        || $m[1] == 0
                                        || $s[1] == 0
@@ -631,7 +631,7 @@ class FormatMetadata {
                                case 'MaxApertureValue':
                                        if ( strpos( $val, '/' ) !== false ) {
                                                // need to expand this earlier to calculate fNumber
-                                               list($n, $d) = explode('/', $val);
+                                               list( $n, $d ) = explode( '/', $val );
                                                if ( is_numeric( $n ) && is_numeric( $d ) ) {
                                                        $val = $n / $d;
                                                }
@@ -809,7 +809,7 @@ class FormatMetadata {
 
                                case 'LanguageCode':
                                        $lang = Language::fetchLanguageName( strtolower( $val ), $wgLang->getCode() );
-                                       if ($lang) {
+                                       if ( $lang ) {
                                                $val = htmlspecialchars( $lang );
                                        } else {
                                                $val = htmlspecialchars( $val );
@@ -850,7 +850,7 @@ class FormatMetadata {
                }
 
                if ( !is_array( $vals ) ) {
-                        return $vals; // do nothing if not an array;
+                       return $vals; // do nothing if not an array;
                }
                elseif ( count( $vals ) === 1 && $type !== 'lang' ) {
                        return $vals[0];
@@ -899,7 +899,7 @@ class FormatMetadata {
                                        }
                                        $content .= self::langItem(
                                                $vals[$cLang], $cLang,
-                                                $isDefault, $noHtml );
+                                               $isDefault, $noHtml );
 
                                        unset( $vals[$cLang] );
                                }
@@ -915,8 +915,8 @@ class FormatMetadata {
                                }
                                if ( $defaultItem !== false ) {
                                        $content = self::langItem( $defaultItem,
-                                               $defaultLang, true, $noHtml )
-                                                . $content;
+                                               $defaultLang, true, $noHtml ) .
+                                               $content;
                                }
                                if ( $noHtml ) {
                                        return $content;
@@ -951,8 +951,8 @@ class FormatMetadata {
         */
        private static function langItem( $value, $lang, $default = false, $noHtml = false ) {
                if ( $lang === false && $default === false) {
-                       throw new MWException('$lang and $default cannot both '
-                               . 'be false.');
+                       throw new MWException( '$lang and $default cannot both '
+                               . 'be false.' );
                }
 
                if ( $noHtml ) {
@@ -1017,7 +1017,7 @@ class FormatMetadata {
        static function msg( $tag, $val, $arg = null, $arg2 = null ) {
                global $wgContLang;
 
-               if ($val === '')
+               if ( $val === '' )
                        $val = 'value';
                return wfMessage( $wgContLang->lc( "exif-$tag-$val" ), $arg, $arg2 )->text();
        }
@@ -1033,10 +1033,10 @@ class FormatMetadata {
        static function formatNum( $num, $round = false ) {
                global $wgLang;
                $m = array();
-               if( is_array($num) ) {
+               if( is_array( $num ) ) {
                        $out = array();
                        foreach( $num as $number ) {
-                               $out[] = self::formatNum($number);
+                               $out[] = self::formatNum( $number );
                        }
                        return $wgLang->commaList( $out );
                }
@@ -1126,7 +1126,7 @@ class FormatMetadata {
                        return $val;
                }
                $cat = '';
-               switch( substr( $val , 0, 2 ) ) {
+               switch( substr( $val, 0, 2 ) ) {
                        case '01':
                                $cat = 'ace';
                                break;
@@ -1238,7 +1238,7 @@ class FormatMetadata {
         * @return String of html-ish looking wikitext
         */
        public static function collapseContactInfo( $vals ) {
-               if( ! ( isset( $vals['CiAdrExtadr'] )
+               if( !( isset( $vals['CiAdrExtadr'] )
                        || isset( $vals['CiAdrCity'] )
                        || isset( $vals['CiAdrCtry'] )
                        || isset( $vals['CiEmailWork'] )
index da8fc6f..2e532fe 100644 (file)
@@ -39,7 +39,7 @@ class GIFHandler extends BitmapHandler {
                        return self::BROKEN_FILE;
                }
 
-               return serialize($parsedGIFMetadata);
+               return serialize( $parsedGIFMetadata );
        }
 
        /**
@@ -53,7 +53,7 @@ class GIFHandler extends BitmapHandler {
                        return false;
                }
                $meta = unserialize( $meta );
-                if ( !isset( $meta['metadata'] ) || count( $meta['metadata'] ) <= 1 ) {
+               if ( !isset( $meta['metadata'] ) || count( $meta['metadata'] ) <= 1 ) {
                        return false;
                }
 
@@ -85,7 +85,7 @@ class GIFHandler extends BitmapHandler {
        function isAnimatedImage( $image ) {
                $ser = $image->getMetadata();
                if ( $ser ) {
-                       $metadata = unserialize($ser);
+                       $metadata = unserialize( $ser );
                        if( $metadata['frameCount'] > 1 ) {
                                return true;
                        }
@@ -119,13 +119,13 @@ class GIFHandler extends BitmapHandler {
                wfRestoreWarnings();
 
                if ( !$data || !is_array( $data ) ) {
-                       wfDebug(__METHOD__ . ' invalid GIF metadata' );
+                       wfDebug( __METHOD__ . ' invalid GIF metadata' );
                        return self::METADATA_BAD;
                }
 
                if ( !isset( $data['metadata']['_MW_GIF_VERSION'] )
                        || $data['metadata']['_MW_GIF_VERSION'] != GIFMetadataExtractor::VERSION ) {
-                       wfDebug(__METHOD__ . ' old but compatible GIF metadata' );
+                       wfDebug( __METHOD__ . ' old but compatible GIF metadata' );
                        return self::METADATA_COMPATIBLE;
                }
                return self::METADATA_GOOD;
@@ -141,10 +141,10 @@ class GIFHandler extends BitmapHandler {
                $original = parent::getLongDesc( $image );
 
                wfSuppressWarnings();
-               $metadata = unserialize($image->getMetadata());
+               $metadata = unserialize( $image->getMetadata() );
                wfRestoreWarnings();
 
-               if (!$metadata || $metadata['frameCount'] <=  1) {
+               if ( !$metadata || $metadata['frameCount'] <= 1 ) {
                        return $original;
                }
 
index 7a162c3..8b44585 100644 (file)
@@ -49,9 +49,9 @@ class GIFMetadataExtractor {
         * @return array
         */
        static function getMetadata( $filename ) {
-               self::$gif_frame_sep = pack( "C", ord("," ) );
-               self::$gif_extension_sep = pack( "C", ord("!" ) );
-               self::$gif_term = pack( "C", ord(";" ) );
+               self::$gif_frame_sep = pack( "C", ord( "," ) );
+               self::$gif_extension_sep = pack( "C", ord( "!" ) );
+               self::$gif_term = pack( "C", ord( ";" ) );
 
                $frameCount = 0;
                $duration = 0.0;
@@ -73,7 +73,7 @@ class GIFMetadataExtractor {
 
                // Check for the GIF header
                $buf = fread( $fh, 6 );
-               if ( !($buf == 'GIF87a' || $buf == 'GIF89a') ) {
+               if ( !( $buf == 'GIF87a' || $buf == 'GIF89a' ) ) {
                        throw new Exception( "Not a valid GIF file; header: $buf" );
                }
 
@@ -93,7 +93,7 @@ class GIFMetadataExtractor {
                while( !feof( $fh ) ) {
                        $buf = fread( $fh, 1 );
 
-                       if ($buf == self::$gif_frame_sep) {
+                       if ( $buf == self::$gif_frame_sep ) {
                                // Found a frame
                                $frameCount++;
 
@@ -114,7 +114,7 @@ class GIFMetadataExtractor {
                                $extension_code = unpack( 'C', $buf );
                                $extension_code = $extension_code[1];
 
-                               if ($extension_code == 0xF9) {
+                               if ( $extension_code == 0xF9 ) {
                                        // Graphics Control Extension.
                                        fread( $fh, 1 ); // Block size
 
@@ -132,10 +132,10 @@ class GIFMetadataExtractor {
                                        if ( strlen( $term ) < 1 ) throw new Exception( "Ran out of input" );
                                        $term = unpack( 'C', $term );
                                        $term = $term[1];
-                                       if ($term != 0 ) {
+                                       if ( $term != 0 ) {
                                                throw new Exception( "Malformed Graphics Control Extension block" );
                                        }
-                               } elseif ($extension_code == 0xFE) {
+                               } elseif ( $extension_code == 0xFE ) {
                                        // Comment block(s).
                                        $data = self::readBlock( $fh );
                                        if ( $data === "" ) {
@@ -164,7 +164,7 @@ class GIFMetadataExtractor {
                                                // is identical to the last, only extract once.
                                                $comment[] = $data;
                                        }
-                               } elseif ($extension_code == 0xFF) {
+                               } elseif ( $extension_code == 0xFF ) {
                                        // Application extension (Netscape info about the animated gif)
                                        // or XMP (or theoretically any other type of extension block)
                                        $blockLength = fread( $fh, 1 );
@@ -173,7 +173,7 @@ class GIFMetadataExtractor {
                                        $blockLength = $blockLength[1];
                                        $data = fread( $fh, $blockLength );
 
-                                       if ($blockLength != 11 ) {
+                                       if ( $blockLength != 11 ) {
                                                wfDebug( __METHOD__ . ' GIF application block with wrong length' );
                                                fseek( $fh, -($blockLength + 1), SEEK_CUR );
                                                self::skipBlock( $fh );
@@ -184,7 +184,7 @@ class GIFMetadataExtractor {
                                        if ( $data == 'NETSCAPE2.0' ) {
                                                $data = fread( $fh, 2 ); // Block length and introduction, should be 03 01
 
-                                               if ($data != "\x03\x01") {
+                                               if ( $data != "\x03\x01" ) {
                                                        throw new Exception( "Expected \x03\x01, got $data" );
                                                }
 
@@ -194,7 +194,7 @@ class GIFMetadataExtractor {
                                                $loopData = unpack( 'v', $loopData );
                                                $loopCount = $loopData[1];
 
-                                               if ($loopCount != 1) {
+                                               if ( $loopCount != 1 ) {
                                                        $isLooped = true;
                                                }
 
@@ -231,7 +231,7 @@ class GIFMetadataExtractor {
                                if ( strlen( $buf ) < 1 ) throw new Exception( "Ran out of input" );
                                $byte = unpack( 'C', $buf );
                                $byte = $byte[1];
-                               throw new Exception( "At position: ".ftell($fh). ", Unknown byte ".$byte );
+                               throw new Exception( "At position: " . ftell( $fh ) . ", Unknown byte " . $byte );
                        }
                }
 
@@ -284,7 +284,7 @@ class GIFMetadataExtractor {
                        if ( strlen( $buf ) < 1 ) throw new Exception( "Ran out of input" );
                        $block_len = unpack( 'C', $buf );
                        $block_len = $block_len[1];
-                       if ($block_len == 0) {
+                       if ( $block_len == 0 ) {
                                return;
                        }
                        fread( $fh, $block_len );
index 8fd3552..3ae59ad 100644 (file)
@@ -41,15 +41,15 @@ class IPTC {
        static function parse( $rawData ) {
                $parsed = iptcparse( $rawData );
                $data = Array();
-               if (!is_array($parsed)) {
+               if ( !is_array( $parsed ) ) {
                                return $data;
                }
 
                $c = '';
                //charset info contained in tag 1:90.
-               if (isset($parsed['1#090']) && isset($parsed['1#090'][0])) {
-                       $c = self::getCharset($parsed['1#090'][0]);
-                       if ($c === false) {
+               if ( isset( $parsed['1#090'] ) && isset( $parsed['1#090'][0] ) ) {
+                       $c = self::getCharset( $parsed['1#090'][0] );
+                       if ( $c === false ) {
                                //Unknown charset. refuse to parse.
                                //note: There is a different between
                                //unknown and no charset specified.
@@ -59,8 +59,8 @@ class IPTC {
                }
 
                foreach ( $parsed as $tag => $val ) {
-                       if ( isset( $val[0] ) && trim($val[0]) == '' ) {
-                               wfDebugLog('iptc', "IPTC tag $tag had only whitespace as its value.");
+                       if ( isset( $val[0] ) && trim( $val[0] ) == '' ) {
+                               wfDebugLog( 'iptc', "IPTC tag $tag had only whitespace as its value." );
                                continue;
                        }
                        switch( $tag ) {
@@ -175,7 +175,7 @@ class IPTC {
                                        if ( isset( $parsed['2#070'] ) ) {
                                                //if a version is set for the software.
                                                $softwareVersion = self::convIPTC( $parsed['2#070'], $c );
-                                               unset($parsed['2#070']);
+                                               unset( $parsed['2#070'] );
                                                $data['Software'] = array( array( $software[0], $softwareVersion[0] ) );
                                        } else {
                                                $data['Software'] = $software;
@@ -227,8 +227,8 @@ class IPTC {
                                        } else {
                                                $time = Array();
                                        }
-                                       $timestamp =  self::timeHelper( $val, $time, $c );
-                                       if ($timestamp) {
+                                       $timestamp = self::timeHelper( $val, $time, $c );
+                                       if ( $timestamp ) {
                                                $data['DateTimeOriginal'] = $timestamp;
                                        }
                                        break;
@@ -241,8 +241,8 @@ class IPTC {
                                        } else {
                                                $time = Array();
                                        }
-                                       $timestamp =  self::timeHelper( $val, $time, $c );
-                                       if ($timestamp) {
+                                       $timestamp = self::timeHelper( $val, $time, $c );
+                                       if ( $timestamp ) {
                                                $data['DateTimeDigitized'] = $timestamp;
                                        }
                                        break;
@@ -254,8 +254,8 @@ class IPTC {
                                        } else {
                                                $time = Array();
                                        }
-                                       $timestamp =  self::timeHelper( $val, $time, $c );
-                                       if ($timestamp) {
+                                       $timestamp = self::timeHelper( $val, $time, $c );
+                                       if ( $timestamp ) {
                                                $data['DateTimeReleased'] = $timestamp;
                                        }
                                        break;
@@ -267,8 +267,8 @@ class IPTC {
                                        } else {
                                                $time = Array();
                                        }
-                                       $timestamp =  self::timeHelper( $val, $time, $c );
-                                       if ($timestamp) {
+                                       $timestamp = self::timeHelper( $val, $time, $c );
+                                       if ( $timestamp ) {
                                                $data['DateTimeExpires'] = $timestamp;
                                        }
                                        break;
@@ -313,7 +313,7 @@ class IPTC {
                                        // describing the subject matter of the content.
                                        $codes = self::convIPTC( $val, $c );
                                        foreach ( $codes as $ic ) {
-                                               $fields = explode(':', $ic, 3 );
+                                               $fields = explode( ':', $ic, 3 );
 
                                                if ( count( $fields ) < 2 ||
                                                        $fields[0] !== 'IPTC' )
@@ -362,25 +362,25 @@ class IPTC {
                if ( count( $date ) === 1 ) {
                        //the standard says this should always be 1
                        //just double checking.
-                       list($date) = self::convIPTC( $date, $c );
+                       list( $date ) = self::convIPTC( $date, $c );
                } else {
                        return null;
                }
 
                if ( count( $time ) === 1 ) {
-                       list($time) = self::convIPTC( $time, $c );
+                       list( $time ) = self::convIPTC( $time, $c );
                        $dateOnly = false;
                } else {
                        $time = '000000+0000'; //placeholder
                        $dateOnly = true;
                }
 
-               if ( ! ( preg_match('/\d\d\d\d\d\d[-+]\d\d\d\d/', $time)
+               if ( !( preg_match('/\d\d\d\d\d\d[-+]\d\d\d\d/', $time)
                        && preg_match('/\d\d\d\d\d\d\d\d/', $date)
-                       && substr($date, 0, 4) !== '0000'
-                       && substr($date, 4, 2) !== '00'
-                       && substr($date, 6, 2) !== '00'
-                ) ) {
+                       && substr( $date, 0, 4 ) !== '0000'
+                       && substr( $date, 4, 2 ) !== '00'
+                       && substr( $date, 6, 2 ) !== '00'
+               ) ) {
                        //something wrong.
                        // Note, this rejects some valid dates according to iptc spec
                        // for example: the date 00000400 means the photo was taken in
@@ -425,7 +425,7 @@ class IPTC {
        */
        private static function convIPTC ( $data, $charset ) {
                if ( is_array( $data ) ) {
-                       foreach ($data as &$val) {
+                       foreach ( $data as &$val ) {
                                $val = self::convIPTCHelper( $val, $charset );
                        }
                } else {
@@ -444,18 +444,18 @@ class IPTC {
        private static function convIPTCHelper ( $data, $charset ) {
                if ( $charset ) {
                        wfSuppressWarnings();
-                       $data = iconv($charset, "UTF-8//IGNORE", $data);
+                       $data = iconv( $charset, "UTF-8//IGNORE", $data );
                        wfRestoreWarnings();
-                       if ($data === false) {
+                       if ( $data === false ) {
                                $data = "";
-                               wfDebugLog('iptc', __METHOD__ . " Error converting iptc data charset $charset to utf-8");
+                               wfDebugLog( 'iptc', __METHOD__ . " Error converting iptc data charset $charset to utf-8" );
                        }
                } else {
                        //treat as utf-8 if is valid utf-8. otherwise pretend its windows-1252
                        // most of the time if there is no 1:90 tag, it is either ascii, latin1, or utf-8
                        $oldData = $data;
                        UtfNormal::quickIsNFCVerify( $data ); //make $data valid utf-8
-                       if ($data === $oldData) {
+                       if ( $data === $oldData ) {
                                return $data; //if validation didn't change $data
                        } else {
                                return self::convIPTCHelper( $oldData, 'Windows-1252' );
@@ -472,7 +472,7 @@ class IPTC {
        * all iso 2022 escape codes. In practise, the code for utf-8 is the
        * only code that seems to have wide use. It does detect that code.
        */
-       static function getCharset($tag) {
+       static function getCharset( $tag ) {
 
                //According to iim standard, charset is defined by the tag 1:90.
                //in which there are iso 2022 escape sequences to specify the character set.
@@ -590,7 +590,7 @@ class IPTC {
                                $c = 'CSN_369103';
                                break;
                        default:
-                               wfDebugLog('iptc', __METHOD__ . 'Unknown charset in iptc 1:90: ' . bin2hex( $tag ) );
+                               wfDebugLog( 'iptc', __METHOD__ . 'Unknown charset in iptc 1:90: ' . bin2hex( $tag ) );
                                //at this point just give up and refuse to parse iptc?
                                $c = false;
                }
index d1de0ae..472372c 100644 (file)
@@ -162,11 +162,11 @@ abstract class ImageHandler extends MediaHandler {
 
                # Sanity check $width
                if( $width <= 0) {
-                       wfDebug( __METHOD__.": Invalid destination width: $width\n" );
+                       wfDebug( __METHOD__ . ": Invalid destination width: $width\n" );
                        return false;
                }
                if ( $srcWidth <= 0 ) {
-                       wfDebug( __METHOD__.": Invalid source width: $srcWidth\n" );
+                       wfDebug( __METHOD__ . ": Invalid source width: $srcWidth\n" );
                        return false;
                }
 
index 86f5030..5ea30f2 100644 (file)
@@ -37,7 +37,7 @@ class JpegHandler extends ExifBitmapHandler {
                        $meta = BitmapMetadataHandler::Jpeg( $filename );
                        if ( !is_array( $meta ) ) {
                                // This should never happen, but doesn't hurt to be paranoid.
-                               throw new MWException('Metadata array is not an array');
+                               throw new MWException( 'Metadata array is not an array' );
                        }
                        $meta['MEDIAWIKI_EXIF_VERSION'] = Exif::version();
                        return serialize( $meta );
index dd764e9..fb305db 100644 (file)
@@ -135,9 +135,9 @@ abstract class MediaHandler {
        */
        static function getMetadataVersion () {
                $version = Array( '2' ); // core metadata version
-               wfRunHooks('GetMetadataVersion', Array(&$version));
+               wfRunHooks( 'GetMetadataVersion', Array( &$version ) );
                return implode( ';', $version);
-        }
+       }
 
        /**
        * Convert metadata version.
@@ -365,7 +365,7 @@ abstract class MediaHandler {
         * @return array for use displaying metadata.
         */
        function formatMetadataHelper( $metadataArray ) {
-                $result = array(
+               $result = array(
                        'visible' => array(),
                        'collapsed' => array()
                );
index 110c659..1fbe029 100644 (file)
@@ -198,10 +198,10 @@ abstract class MediaTransformOutput {
        public function getDescLinkAttribs( $title = null, $params = '' ) {
                $query = '';
                if ( $this->page && $this->page !== 1 ) {
-                         $query = 'page=' . urlencode( $this->page );
+                       $query = 'page=' . urlencode( $this->page );
                }
                if( $params ) {
-                       $query .= $query ? '&'.$params : $params;
+                       $query .= $query ? '&' . $params : $params;
                }
                $attribs = array(
                        'href' => $this->file->getTitle()->getLocalURL( $query ),
@@ -301,7 +301,7 @@ class ThumbnailImage extends MediaTransformOutput {
 
                $alt = empty( $options['alt'] ) ? '' : $options['alt'];
 
-               $query = empty( $options['desc-query'] )  ? '' : $options['desc-query'];
+               $query = empty( $options['desc-query'] ) ? '' : $options['desc-query'];
 
                if ( !empty( $options['custom-url-link'] ) ) {
                        $linkAttribs = array( 'href' => $options['custom-url-link'] );
@@ -404,7 +404,7 @@ class MediaTransformError extends MediaTransformOutput {
 class TransformParameterError extends MediaTransformError {
        function __construct( $params ) {
                parent::__construct( 'thumbnail_error',
-                       max( isset( $params['width']  ) ? $params['width']  : 0, 120 ),
+                       max( isset( $params['width'] ) ? $params['width'] : 0, 120 ),
                        max( isset( $params['height'] ) ? $params['height'] : 0, 120 ),
                        wfMessage( 'thumbnail_invalid_params' )->text() );
        }
index a23821f..b8a5b40 100644 (file)
@@ -44,7 +44,7 @@ class PNGHandler extends BitmapHandler {
                        return self::BROKEN_FILE;
                }
 
-               return serialize($metadata);
+               return serialize( $metadata );
        }
 
        /**
@@ -74,8 +74,8 @@ class PNGHandler extends BitmapHandler {
         */
        function isAnimatedImage( $image ) {
                $ser = $image->getMetadata();
-               if ($ser) {
-                       $metadata = unserialize($ser);
+               if ( $ser ) {
+                       $metadata = unserialize( $ser );
                        if( $metadata['frameCount'] > 1 ) return true;
                }
                return false;
@@ -105,13 +105,13 @@ class PNGHandler extends BitmapHandler {
                wfRestoreWarnings();
 
                if ( !$data || !is_array( $data ) ) {
-                       wfDebug(__METHOD__ . ' invalid png metadata' );
+                       wfDebug( __METHOD__ . ' invalid png metadata' );
                        return self::METADATA_BAD;
                }
 
                if ( !isset( $data['metadata']['_MW_PNG_VERSION'] )
                        || $data['metadata']['_MW_PNG_VERSION'] != PNGMetadataExtractor::VERSION ) {
-                       wfDebug(__METHOD__ . ' old but compatible png metadata' );
+                       wfDebug( __METHOD__ . ' old but compatible png metadata' );
                        return self::METADATA_COMPATIBLE;
                }
                return self::METADATA_GOOD;
@@ -126,7 +126,7 @@ class PNGHandler extends BitmapHandler {
                $original = parent::getLongDesc( $image );
 
                wfSuppressWarnings();
-               $metadata = unserialize($image->getMetadata());
+               $metadata = unserialize( $image->getMetadata() );
                wfRestoreWarnings();
 
                if( !$metadata || $metadata['frameCount'] <= 0 )
index f7e988f..cddab51 100644 (file)
@@ -170,14 +170,14 @@ class SvgHandler extends ImageHandler {
                                $cmd = str_replace(
                                        array( '$path/', '$width', '$height', '$input', '$output' ),
                                        array( $wgSVGConverterPath ? wfEscapeShellArg( "$wgSVGConverterPath/" ) : "",
-                                                  intval( $width ),
-                                                  intval( $height ),
-                                                  wfEscapeShellArg( $srcPath ),
-                                                  wfEscapeShellArg( $dstPath ) ),
+                                               intval( $width ),
+                                               intval( $height ),
+                                               wfEscapeShellArg( $srcPath ),
+                                               wfEscapeShellArg( $dstPath ) ),
                                        $wgSVGConverters[$wgSVGConverter]
                                ) . " 2>&1";
                                wfProfileIn( 'rsvg' );
-                               wfDebug( __METHOD__.": $cmd\n" );
+                               wfDebug( __METHOD__ . ": $cmd\n" );
                                $err = wfShellExec( $cmd, $retval );
                                wfProfileOut( 'rsvg' );
                        }
@@ -185,7 +185,7 @@ class SvgHandler extends ImageHandler {
                $removed = $this->removeBadFile( $dstPath, $retval );
                if ( $retval != 0 || $removed ) {
                        wfDebugLog( 'thumbnail', sprintf( 'thumbnail failed on %s: error %d "%s" from "%s"',
-                                       wfHostname(), $retval, trim($err), $cmd ) );
+                                       wfHostname(), $retval, trim( $err ), $cmd ) );
                        return new MediaTransformError( 'thumbnail_error', $width, $height, $err );
                }
                return true;
index d6624ee..e4235a7 100644 (file)
@@ -67,7 +67,7 @@ class SVGReader {
                if ( $size > $wgSVGMetadataCutoff ) {
                        $this->debug( "SVG is $size bytes, which is bigger than $wgSVGMetadataCutoff. Truncating." );
                        $contents = file_get_contents( $source, false, null, -1, $wgSVGMetadataCutoff );
-                       if ($contents === false) {
+                       if ( $contents === false ) {
                                throw new MWException( 'Error reading SVG file.' );
                        }
                        $this->reader->XML( $contents, null, LIBXML_NOERROR | LIBXML_NOWARNING );
@@ -132,7 +132,7 @@ class SVGReader {
                $this->debug( "<svg> tag is correct." );
                $this->handleSVGAttribs();
 
-               $exitDepth =  $this->reader->depth;
+               $exitDepth = $this->reader->depth;
                $keepReading = $this->reader->read();
                while ( $keepReading ) {
                        $tag = $this->reader->localName;
@@ -227,7 +227,7 @@ class SVGReader {
                if ( $this->reader->isEmptyElement ) {
                        return;
                }
-               $exitDepth =  $this->reader->depth;
+               $exitDepth = $this->reader->depth;
                $keepReading = $this->reader->read();
                while( $keepReading ) {
                        if( $this->reader->localName == $name && $this->reader->depth <= $exitDepth
@@ -285,9 +285,9 @@ class SVGReader {
                $width = null;
                $height = null;
 
-               if( $this->reader->getAttribute('viewBox') ) {
+               if( $this->reader->getAttribute( 'viewBox' ) ) {
                        // min-x min-y width height
-                       $viewBox = preg_split( '/\s+/', trim( $this->reader->getAttribute('viewBox') ) );
+                       $viewBox = preg_split( '/\s+/', trim( $this->reader->getAttribute( 'viewBox' ) ) );
                        if( count( $viewBox ) == 4 ) {
                                $viewWidth = $this->scaleSVGUnit( $viewBox[2] );
                                $viewHeight = $this->scaleSVGUnit( $viewBox[3] );
@@ -297,12 +297,12 @@ class SVGReader {
                                }
                        }
                }
-               if( $this->reader->getAttribute('width') ) {
-                       $width = $this->scaleSVGUnit( $this->reader->getAttribute('width'), $defaultWidth );
+               if( $this->reader->getAttribute( 'width' ) ) {
+                       $width = $this->scaleSVGUnit( $this->reader->getAttribute( 'width' ), $defaultWidth );
                        $this->metadata['originalWidth'] = $this->reader->getAttribute( 'width' );
                }
-               if( $this->reader->getAttribute('height') ) {
-                       $height = $this->scaleSVGUnit( $this->reader->getAttribute('height'), $defaultHeight );
+               if( $this->reader->getAttribute( 'height' ) ) {
+                       $height = $this->scaleSVGUnit( $this->reader->getAttribute( 'height' ), $defaultHeight );
                        $this->metadata['originalHeight'] = $this->reader->getAttribute( 'height' );
                }
 
@@ -329,7 +329,7 @@ class SVGReader {
         * @param $viewportSize: Float optional scale for percentage units...
         * @return float: length in pixels
         */
-       static function scaleSVGUnit( $length, $viewportSize=512 ) {
+       static function scaleSVGUnit( $length, $viewportSize = 512 ) {
                static $unitLength = array(
                        'px' => 1.0,
                        'pt' => 1.25,
index 55dff77..0042208 100644 (file)
@@ -82,7 +82,7 @@ class TiffHandler extends ExifBitmapHandler {
                                $meta = BitmapMetadataHandler::Tiff( $filename );
                                if ( !is_array( $meta ) ) {
                                        // This should never happen, but doesn't hurt to be paranoid.
-                                       throw new MWException('Metadata array is not an array');
+                                       throw new MWException( 'Metadata array is not an array' );
                                }
                                $meta['MEDIAWIKI_EXIF_VERSION'] = Exif::version();
                                return serialize( $meta );
index 555fa1f..ba0d419 100644 (file)
@@ -84,7 +84,7 @@ class XCFHandler extends BitmapHandler {
                # The image structure always starts at offset 0 in the XCF file.
                # So we just read it :-)
                $binaryHeader = fread( $f, 26 );
-               fclose($f);
+               fclose( $f );
 
                # Master image structure:
                #
index c5743d7..e4833fc 100644 (file)
@@ -114,7 +114,7 @@ class XMPReader {
        */
        private function resetXMLParser() {
 
-               if ($this->xmlParser) {
+               if ( $this->xmlParser ) {
                        //is this needed?
                        xml_parser_free( $this->xmlParser );
                }
@@ -156,7 +156,7 @@ class XMPReader {
 
                $data = $this->results;
 
-               wfRunHooks('XMPGetResults', Array(&$data));
+               wfRunHooks( 'XMPGetResults', Array( &$data ) );
 
                if ( isset( $data['xmp-special']['AuthorsPosition'] )
                        && is_string( $data['xmp-special']['AuthorsPosition'] )
@@ -201,7 +201,7 @@ class XMPReader {
                                        // To avoid copying over the _type meta-fields.
                                        continue;
                                }
-                               foreach(  $loc as $field => $val ) {
+                               foreach( $loc as $field => $val ) {
                                        $data['xmp-general'][$field . 'Created'][] = $val;
                                }
                        }
@@ -255,7 +255,7 @@ class XMPReader {
                        if ( !$this->charset ) {
                                $bom = array();
                                if ( preg_match( '/\xEF\xBB\xBF|\xFE\xFF|\x00\x00\xFE\xFF|\xFF\xFE\x00\x00|\xFF\xFE/',
-                                        $content, $bom )
+                                       $content, $bom )
                                ) {
                                        switch ( $bom[0] ) {
                                                case "\xFE\xFF":
@@ -275,7 +275,7 @@ class XMPReader {
                                                        break;
                                                default:
                                                        //this should be impossible to get to
-                                                       throw new MWException("Invalid BOM");
+                                                       throw new MWException( "Invalid BOM" );
                                                        break;
 
                                        }
@@ -324,13 +324,13 @@ class XMPReader {
                $guid = substr( $content, 0, 32 );
                if ( !isset( $this->results['xmp-special']['HasExtendedXMP'] )
                        || $this->results['xmp-special']['HasExtendedXMP'] !== $guid ) {
-                       wfDebugLog('XMP', __METHOD__ . " Ignoring XMPExtended block due to wrong guid (guid= '$guid' )");
+                       wfDebugLog( 'XMP', __METHOD__ . " Ignoring XMPExtended block due to wrong guid (guid= '$guid')" );
                        return false;
                }
-               $len  = unpack( 'Nlength/Noffset', substr( $content, 32, 8 ) );
+               $len = unpack( 'Nlength/Noffset', substr( $content, 32, 8 ) );
 
-               if (!$len || $len['length'] < 4 || $len['offset'] < 0 || $len['offset'] > $len['length'] ) {
-                       wfDebugLog('XMP', __METHOD__ . 'Error reading extended XMP block, invalid length or offset.');
+               if ( !$len || $len['length'] < 4 || $len['offset'] < 0 || $len['offset'] > $len['length'] ) {
+                       wfDebugLog( 'XMP', __METHOD__ . 'Error reading extended XMP block, invalid length or offset.' );
                        return false;
                }
 
@@ -345,8 +345,8 @@ class XMPReader {
                // so the probability that it will have > 128k, and be in the wrong order is very low...
 
                if ( $len['offset'] !== $this->extendedXMPOffset ) {
-                       wfDebugLog('XMP', __METHOD__ . 'Ignoring XMPExtended block due to wrong order. (Offset was '
-                               . $len['offset'] . ' but expected ' . $this->extendedXMPOffset . ')');
+                       wfDebugLog( 'XMP', __METHOD__ . 'Ignoring XMPExtended block due to wrong order. (Offset was '
+                               . $len['offset'] . ' but expected ' . $this->extendedXMPOffset . ')' );
                        return false;
                }
 
@@ -366,7 +366,7 @@ class XMPReader {
                        $atEnd = false;
                }
 
-               wfDebugLog('XMP', __METHOD__ . 'Parsing a XMPExtended block');
+               wfDebugLog( 'XMP', __METHOD__ . 'Parsing a XMPExtended block' );
                return $this->parse( $actualContent, $atEnd );
        }
 
@@ -488,7 +488,7 @@ class XMPReader {
                if ( $this->curItem[0] !== $elm
                        && !( $elm === self::NS_RDF . ' Description'
                                && $this->mode[0] === self::MODE_STRUCT )
-                ) {
+               ) {
                        throw new MWException( "nesting mismatch. got a </$elm> but expected a </" . $this->curItem[0] . '>' );
                }
 
index aa411df..a4ba741 100644 (file)
@@ -35,7 +35,7 @@ class XMPInfo {
                if( !self::$ranHooks ) {
                        // This is for if someone makes a custom metadata extension.
                        // For example, a medical wiki might want to decode DICOM xmp properties.
-                       wfRunHooks('XMPGetInfo', Array(&self::$items));
+                       wfRunHooks( 'XMPGetInfo', Array( &self::$items ) );
                        self::$ranHooks = true; // Only want to do this once.
                }
                return self::$items;
@@ -260,7 +260,7 @@ class XMPInfo {
                                'mode'      => XMPReader::MODE_SIMPLE,
                                'validate'  => 'validateDate',
                        ),
-                       'DateTimeDigitized' => array(  /* xmp:CreateDate */
+                       'DateTimeDigitized' => array( /* xmp:CreateDate */
                                'map_group' => 'exif',
                                'mode'      => XMPReader::MODE_SIMPLE,
                                'validate'  => 'validateDate',
@@ -552,12 +552,12 @@ class XMPInfo {
                                'map_group' => 'exif',
                                'mode'      => XMPReader::MODE_LANG,
                        ),
-                       'DateTime'          => array(  /* proper prop is xmp:ModifyDate */
+                       'DateTime'          => array( /* proper prop is xmp:ModifyDate */
                                'map_group' => 'exif',
                                'mode'      => XMPReader::MODE_SIMPLE,
                                'validate'  => 'validateDate',
                        ),
-                       'ImageDescription'  => array(  /* proper one is dc:description */
+                       'ImageDescription'  => array( /* proper one is dc:description */
                                'map_group' => 'exif',
                                'mode'      => XMPReader::MODE_LANG,
                        ),
@@ -622,7 +622,7 @@ class XMPInfo {
                                'mode'      => XMPReader::MODE_SIMPLE,
                                'validate'  => 'validateInteger',
                        ),
-                       'Software'          => array(  /* see xmp:CreatorTool */
+                       'Software'          => array( /* see xmp:CreatorTool */
                                'map_group' => 'exif',
                                'mode'      => XMPReader::MODE_SIMPLE,
                        ),
index e3fd59f..59547e5 100644 (file)
@@ -95,8 +95,8 @@ class XMPValidate {
                        return;
                }
                if ( !preg_match( '/^[-+]?\d*(?:\.?\d*)$/D', $val )
-                       || !is_numeric($val)
-                ) {
+                       || !is_numeric( $val )
+               ) {
                        wfDebugLog( 'XMP', __METHOD__ . " Expected rating but got $val" );
                        $val = null;
                        return;
@@ -247,8 +247,8 @@ class XMPValidate {
                $res = array();
                if ( !preg_match(
                        /* ahh! scary regex... */
-                       '/^([0-3]\d{3})(?:-([01]\d)(?:-([0-3]\d)(?:T([0-2]\d):([0-6]\d)(?::([0-6]\d)(?:\.\d+)?)?([-+]\d{2}:\d{2}|Z)?)?)?)?$/D'
-                       , $val, $res)
+                       '/^([0-3]\d{3})(?:-([01]\d)(?:-([0-3]\d)(?:T([0-2]\d):([0-6]\d)(?::([0-6]\d)(?:\.\d+)?)?([-+]\d{2}:\d{2}|Z)?)?)?)?$/D',
+                       $val, $res )
                ) {
                        wfDebugLog( 'XMP', __METHOD__ . " Expected date but got $val" );
                        $val = null;
index 23471e9..9dc1c86 100644 (file)
@@ -26,7 +26,7 @@
  * @ingroup UtfNormal
  */
 
-if( php_sapi_name() != 'cli' ) {
+if( PHP_SAPI != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
 
index d9deb3c..eaa2304 100644 (file)
@@ -25,7 +25,7 @@
  * @ingroup UtfNormal
  */
 
-if( php_sapi_name() != 'cli' ) {
+if( PHP_SAPI != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
 
index 6eae6e7..904a27f 100644 (file)
@@ -34,7 +34,7 @@ mb_internal_encoding( "utf-8" );
 
 $verbose = false;
 #$verbose = true;
-if( php_sapi_name() != 'cli' ) {
+if( PHP_SAPI != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
 
index 64d9618..f5b698a 100644 (file)
@@ -627,8 +627,8 @@ class UtfNormal {
                $lastHangul = 0;
                $startChar = '';
                $combining = '';
-               $x1 = ord(substr(UTF8_HANGUL_VBASE,0,1));
-               $x2 = ord(substr(UTF8_HANGUL_TEND,0,1));
+               $x1 = ord(substr(UTF8_HANGUL_VBASE, 0, 1));
+               $x2 = ord(substr(UTF8_HANGUL_TEND, 0, 1));
                for( $i = 0; $i < $len; $i++ ) {
                        $c = $string[$i];
                        $n = ord( $c );
index 9a05b81..392ba2b 100644 (file)
@@ -34,7 +34,7 @@ require_once 'UtfNormal.php';
 
 define( 'BENCH_CYCLES', 5 );
 
-if( php_sapi_name() != 'cli' ) {
+if( PHP_SAPI != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
 
index 64624b8..b07e339 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 define( 'UNICODE_HANGUL_FIRST', 0xac00 );
-define( 'UNICODE_HANGUL_LAST',  0xd7a3 );
+define( 'UNICODE_HANGUL_LAST', 0xd7a3 );
 
 define( 'UNICODE_HANGUL_LBASE', 0x1100 );
 define( 'UNICODE_HANGUL_VBASE', 0x1161 );
index 11d06d4..f392df5 100644 (file)
@@ -25,7 +25,7 @@
  * @ingroup UtfNormal
  */
 
-if( php_sapi_name() != 'cli' ) {
+if( PHP_SAPI != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
 
index 7162a8b..257e105 100644 (file)
@@ -38,7 +38,7 @@ define( 'BENCH_CYCLES', 1 );
 define( 'BIGSIZE', 1024 * 1024 * 10); // 10m
 ini_set('memory_limit', BIGSIZE + 120 * 1024 * 1024);
 
-if( php_sapi_name() != 'cli' ) {
+if( PHP_SAPI != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
 
index 5872ec3..22e6471 100644 (file)
@@ -54,7 +54,7 @@ require_once 'UtfNormalDefines.php';
 require_once 'UtfNormalUtil.php';
 require_once 'UtfNormal.php';
 
-if( php_sapi_name() != 'cli' ) {
+if( PHP_SAPI != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
 
index 691bfaa..f4a8379 100644 (file)
@@ -22,7 +22,7 @@
  * @ingroup UtfNormal
  */
 
-if( php_sapi_name() != 'cli' ) {
+if( PHP_SAPI != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
 
index b8a1bc2..960668f 100644 (file)
@@ -39,13 +39,13 @@ class EhcacheBagOStuff extends BagOStuff {
         */
        function __construct( $params ) {
                if ( !defined( 'CURLOPT_TIMEOUT_MS' ) ) {
-                       throw new MWException( __CLASS__.' requires curl version 7.16.2 or later.' );
+                       throw new MWException( __CLASS__ . ' requires curl version 7.16.2 or later.' );
                }
                if ( !extension_loaded( 'zlib' ) ) {
-                       throw new MWException( __CLASS__.' requires the zlib extension' );
+                       throw new MWException( __CLASS__ . ' requires the zlib extension' );
                }
                if ( !isset( $params['servers'] ) ) {
-                       throw new MWException( __METHOD__.': servers parameter is required' );
+                       throw new MWException( __METHOD__ . ': servers parameter is required' );
                }
                $this->servers = $params['servers'];
                $this->cacheName = isset( $params['cache'] ) ? $params['cache'] : 'mw';
@@ -76,7 +76,7 @@ class EhcacheBagOStuff extends BagOStuff {
                        return false;
                }
                if ( $response['http_code'] >= 300 ) {
-                       wfDebug( __METHOD__.": GET failure, got HTTP {$response['http_code']}\n" );
+                       wfDebug( __METHOD__ . ": GET failure, got HTTP {$response['http_code']}\n" );
                        wfProfileOut( __METHOD__ );
                        return false;
                }
@@ -85,7 +85,7 @@ class EhcacheBagOStuff extends BagOStuff {
                if ( $type == 'application/vnd.php.serialized+deflate' ) {
                        $body = gzinflate( $body );
                        if ( !$body ) {
-                               wfDebug( __METHOD__.": error inflating $key\n" );
+                               wfDebug( __METHOD__ . ": error inflating $key\n" );
                                wfProfileOut( __METHOD__ );
                                return false;
                        }
@@ -93,7 +93,7 @@ class EhcacheBagOStuff extends BagOStuff {
                } elseif ( $type == 'application/vnd.php.serialized' ) {
                        $data = unserialize( $body );
                } else {
-                       wfDebug( __METHOD__.": unknown content type \"$type\"\n" );
+                       wfDebug( __METHOD__ . ": unknown content type \"$type\"\n" );
                        wfProfileOut( __METHOD__ );
                        return false;
                }
@@ -127,7 +127,7 @@ class EhcacheBagOStuff extends BagOStuff {
                if ( $code == 404 ) {
                        // Maybe the cache does not exist yet, let's try creating it
                        if ( !$this->createCache( $key ) ) {
-                               wfDebug( __METHOD__.": cache creation failed\n" );
+                               wfDebug( __METHOD__ . ": cache creation failed\n" );
                                wfProfileOut( __METHOD__ );
                                return false;
                        }
@@ -136,9 +136,9 @@ class EhcacheBagOStuff extends BagOStuff {
 
                $result = false;
                if ( !$code ) {
-                       wfDebug( __METHOD__.": PUT failure for key $key\n" );
+                       wfDebug( __METHOD__ . ": PUT failure for key $key\n" );
                } elseif ( $code >= 300 ) {
-                       wfDebug( __METHOD__.": PUT failure for key $key: HTTP $code\n" );
+                       wfDebug( __METHOD__ . ": PUT failure for key $key: HTTP $code\n" );
                } else {
                        $result = true;
                }
@@ -172,7 +172,7 @@ class EhcacheBagOStuff extends BagOStuff {
                        array( CURLOPT_CUSTOMREQUEST => 'DELETE' ) );
                $code = isset( $response['http_code'] ) ? $response['http_code'] : 0;
                if ( !$response || ( $code != 404 && $code >= 300 ) ) {
-                       wfDebug( __METHOD__.": DELETE failure for key $key\n" );
+                       wfDebug( __METHOD__ . ": DELETE failure for key $key\n" );
                        $result = false;
                } else {
                        $result = true;
@@ -256,7 +256,7 @@ class EhcacheBagOStuff extends BagOStuff {
         * @return bool
         */
        protected function createCache( $key ) {
-               wfDebug( __METHOD__.": creating cache for $key\n" );
+               wfDebug( __METHOD__ . ": creating cache for $key\n" );
                $response = $this->doCacheRequest( $key,
                        array(
                                CURLOPT_POST => 1,
@@ -264,7 +264,7 @@ class EhcacheBagOStuff extends BagOStuff {
                                CURLOPT_POSTFIELDS => '',
                        ) );
                if ( !$response ) {
-                       wfDebug( __CLASS__.": failed to create cache for $key\n" );
+                       wfDebug( __CLASS__ . ": failed to create cache for $key\n" );
                        return false;
                }
                return ( $response['http_code'] == 201 /* created */
@@ -304,7 +304,7 @@ class EhcacheBagOStuff extends BagOStuff {
        protected function doRequest( $curl, $url, $curlOptions = array() ) {
                if ( array_diff_key( $curlOptions, $this->curlOptions ) ) {
                        // var_dump( array_diff_key( $curlOptions, $this->curlOptions ) );
-                       throw new MWException( __METHOD__.": to prevent options set in one doRequest() " .
+                       throw new MWException( __METHOD__ . ": to prevent options set in one doRequest() " .
                                "call from affecting subsequent doRequest() calls, only options listed " .
                                "in \$this->curlOptions may be specified in the \$curlOptions parameter." );
                }
@@ -314,7 +314,7 @@ class EhcacheBagOStuff extends BagOStuff {
                curl_setopt_array( $curl, $curlOptions );
                $result = curl_exec( $curl );
                if ( $result === false ) {
-                       wfDebug( __CLASS__.": curl error: " . curl_error( $curl ) . "\n" );
+                       wfDebug( __CLASS__ . ": curl error: " . curl_error( $curl ) . "\n" );
                        return false;
                }
                $info = curl_getinfo( $curl );
index faa676d..2342d63 100644 (file)
@@ -991,7 +991,7 @@ class MWMemcached {
                $len = strlen( $val );
 
                if ( $this->_have_zlib && $this->_compress_enable &&
-                        $this->_compress_threshold && $len >= $this->_compress_threshold )
+                       $this->_compress_threshold && $len >= $this->_compress_threshold )
                {
                        $c_val = gzcompress( $val, 9 );
                        $c_len = strlen( $c_val );
index 0fc117a..bae1b75 100644 (file)
@@ -127,7 +127,7 @@ class SqlBagOStuff extends BagOStuff {
                                $info = $this->serverInfos[$serverIndex];
                                $type = isset( $info['type'] ) ? $info['type'] : 'mysql';
                                $host = isset( $info['host'] ) ? $info['host'] : '[unknown]';
-                               wfDebug( __CLASS__.": connecting to $host\n" );
+                               wfDebug( __CLASS__ . ": connecting to $host\n" );
                                $db = DatabaseBase::factory( $type, $info );
                                $db->clearFlag( DBO_TRX );
                        } else {
@@ -659,12 +659,12 @@ class SqlBagOStuff extends BagOStuff {
                                unset( $this->connFailureTimes[$serverIndex] );
                                unset( $this->connFailureErrors[$serverIndex] );
                        } else {
-                               wfDebug( __METHOD__.": Server #$serverIndex already down\n" );
+                               wfDebug( __METHOD__ . ": Server #$serverIndex already down\n" );
                                return;
                        }
                }
                $now = time();
-               wfDebug( __METHOD__.": Server #$serverIndex down until " . ( $now + 60 ) . "\n" );
+               wfDebug( __METHOD__ . ": Server #$serverIndex down until " . ( $now + 60 ) . "\n" );
                $this->connFailureTimes[$serverIndex] = $now;
                $this->connFailureErrors[$serverIndex] = $exception;
        }
index 4bfa9d3..1cabf76 100644 (file)
@@ -47,15 +47,15 @@ class CoreLinkFunctions {
         */
        static function defaultLinkHook( $parser, $holders, $markers,
                        Title $title, $titleText, &$displayText = null, &$leadingColon = false ) {
-               if( isset($displayText) && $markers->findMarker( $displayText ) ) {
+               if( isset( $displayText ) && $markers->findMarker( $displayText ) ) {
                        # There are links inside of the displayText
                        # For backwards compatibility the deepest links are dominant so this
                        # link should not be handled
-                       $displayText = $markers->expand($displayText);
+                       $displayText = $markers->expand( $displayText );
                        # Return false so that this link is reverted back to WikiText
                        return false;
                }
-               return $holders->makeHolder( $title, isset($displayText) ? $displayText : $titleText, array(), '', '' );
+               return $holders->makeHolder( $title, isset( $displayText ) ? $displayText : $titleText, array(), '', '' );
        }
 
        /**
@@ -73,15 +73,15 @@ class CoreLinkFunctions {
                global $wgContLang;
                # When a category link starts with a : treat it as a normal link
                if( $leadingColon ) return true;
-               if( isset($sortText) && $markers->findMarker( $sortText ) ) {
+               if( isset( $sortText ) && $markers->findMarker( $sortText ) ) {
                        # There are links inside of the sortText
                        # For backwards compatibility the deepest links are dominant so this
                        # link should not be handled
-                       $sortText = $markers->expand($sortText);
+                       $sortText = $markers->expand( $sortText );
                        # Return false so that this link is reverted back to WikiText
                        return false;
                }
-               if( !isset($sortText) ) $sortText = $parser->getDefaultSort();
+               if( !isset( $sortText ) ) $sortText = $parser->getDefaultSort();
                $sortText = Sanitizer::decodeCharReferences( $sortText );
                $sortText = str_replace( "\n", '', $sortText );
                $sortText = $wgContLang->convertCategoryKey( $sortText );
index b77309b..b2a72a4 100644 (file)
@@ -422,7 +422,7 @@ class CoreParserFunctions {
                return self::formatRaw( SiteStats::images(), $raw );
        }
        static function numberofadmins( $parser, $raw = null ) {
-               return self::formatRaw( SiteStats::numberingroup('sysop'), $raw );
+               return self::formatRaw( SiteStats::numberingroup( 'sysop' ), $raw );
        }
        static function numberofedits( $parser, $raw = null ) {
                return self::formatRaw( SiteStats::edits(), $raw );
@@ -800,7 +800,7 @@ 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}}
-       public static function filepath( $parser, $name='', $argA='', $argB='' ) {
+       public static function filepath( $parser, $name = '', $argA = '', $argB = '' ) {
                $file = wfFindFile( $name );
 
                if( $argA == 'nowiki' ) {
index 0f22675..88d68a7 100644 (file)
@@ -102,11 +102,11 @@ class DateFormatter {
 
                # Rules
                #            pref    source       target
-               $this->rules[self::DMY][self::MD]       = self::DM;
-               $this->rules[self::ALL][self::MD]       = self::MD;
-               $this->rules[self::MDY][self::DM]       = self::MD;
-               $this->rules[self::ALL][self::DM]       = self::DM;
-               $this->rules[self::NONE][self::ISO2]    = self::ISO1;
+               $this->rules[self::DMY][self::MD] = self::DM;
+               $this->rules[self::ALL][self::MD] = self::MD;
+               $this->rules[self::MDY][self::DM] = self::MD;
+               $this->rules[self::ALL][self::DM] = self::DM;
+               $this->rules[self::NONE][self::ISO2] = self::ISO1;
 
                $this->preferences = array(
                        'default' => self::NONE,
@@ -145,7 +145,7 @@ class DateFormatter {
         * @param $options Array: can contain 'linked' and/or 'match-whole'
         * @return mixed|String
         */
-       function reformat( $preference, $text, $options = array('linked') ) {
+       function reformat( $preference, $text, $options = array( 'linked' ) ) {
                $linked = in_array( 'linked', $options );
                $match_whole = in_array( 'match-whole', $options );
 
@@ -172,21 +172,21 @@ class DateFormatter {
                        $regex = $this->regexes[$i];
 
                        // Horrible hack
-                       if (!$linked) {
+                       if ( !$linked ) {
                                $regex = str_replace( array( '\[\[', '\]\]' ), '', $regex );
                        }
 
-                       if ($match_whole) {
+                       if ( $match_whole ) {
                                // Let's hope this works
                                $regex = preg_replace( '!^/!', '/^', $regex );
                                $regex = str_replace( $this->regexTrail,
-                                       '$'.$this->regexTrail, $regex );
+                                       '$' . $this->regexTrail, $regex );
                        }
 
                        // Another horrible hack
                        $this->mLinked = $linked;
                        $text = preg_replace_callback( $regex, array( &$this, 'replace' ), $text );
-                       unset($this->mLinked);
+                       unset( $this->mLinked );
                }
                return $text;
        }
@@ -203,7 +203,7 @@ class DateFormatter {
 
                $bits = array();
                $key = $this->keys[$this->mSource];
-               for ( $p=0; $p < strlen($key); $p++ ) {
+               for ( $p=0; $p < strlen( $key ); $p++ ) {
                        if ( $key[$p] != ' ' ) {
                                $bits[$key[$p]] = $matches[$p+1];
                        }
@@ -220,7 +220,7 @@ class DateFormatter {
        function formatDate( $bits, $link = true ) {
                $format = $this->targets[$this->mTarget];
 
-               if (!$link) {
+               if ( !$link ) {
                        // strip piped links
                        $format = preg_replace( '/\[\[[^|]+\|([^\]]+)\]\]/', '$1', $format );
                        // strip remaining links
@@ -246,7 +246,7 @@ class DateFormatter {
                        }
                }
 
-               if ( !isset($bits['d']) ) {
+               if ( !isset( $bits['d'] ) ) {
                        $bits['d'] = sprintf( '%02d', $bits['j'] );
                }
 
@@ -263,7 +263,7 @@ class DateFormatter {
                                        $text .= $bits['y'];
                                        break;
                                case 'j': # ordinary day of month
-                                       if ( !isset($bits['j']) ) {
+                                       if ( !isset( $bits['j'] ) ) {
                                                $text .= intval( $bits['d'] );
                                        } else {
                                                $text .= $bits['j'];
@@ -271,7 +271,7 @@ class DateFormatter {
                                        break;
                                case 'F': # long month
                                        if ( !isset( $bits['F'] ) ) {
-                                               $m = intval($bits['m']);
+                                               $m = intval( $bits['m'] );
                                                if ( $m > 12 || $m < 1 ) {
                                                        $fail = true;
                                                } else {
@@ -293,7 +293,7 @@ class DateFormatter {
                }
 
                $isoBits = array();
-               if ( isset($bits['y']) )
+               if ( isset( $bits['y'] ) )
                        $isoBits[] = $bits['y'];
                $isoBits[] = $bits['m'];
                $isoBits[] = $bits['d'];
index 0c05a51..5e93466 100644 (file)
@@ -217,7 +217,7 @@ class LinkHolderArray {
         */
        function makeHolder( $nt, $text = '', $query = array(), $trail = '', $prefix = ''  ) {
                wfProfileIn( __METHOD__ );
-               if ( ! is_object($nt) ) {
+               if ( !is_object( $nt ) ) {
                        # Fail gracefully
                        $retVal = "<!-- ERROR -->{$prefix}{$text}{$trail}";
                } else {
@@ -226,7 +226,7 @@ class LinkHolderArray {
 
                        $entry = array(
                                'title' => $nt,
-                               'text' => $prefix.$text.$inside,
+                               'text' => $prefix . $text . $inside,
                                'pdbk' => $nt->getPrefixedDBkey(),
                        );
                        if ( $query !== array() ) {
@@ -281,7 +281,7 @@ class LinkHolderArray {
                $linkCache = LinkCache::singleton();
                $output = $this->parent->getOutput();
 
-               wfProfileIn( __METHOD__.'-check' );
+               wfProfileIn( __METHOD__ . '-check' );
                $dbr = wfGetDB( DB_SLAVE );
                $threshold = $this->parent->getOptions()->getStubThreshold();
 
@@ -355,19 +355,19 @@ class LinkHolderArray {
                        }
                        unset( $res );
                }
-               if ( count($linkcolour_ids) ) {
+               if ( count( $linkcolour_ids ) ) {
                        //pass an array of page_ids to an extension
                        wfRunHooks( 'GetLinkColours', array( $linkcolour_ids, &$colours ) );
                }
-               wfProfileOut( __METHOD__.'-check' );
+               wfProfileOut( __METHOD__ . '-check' );
 
                # Do a second query for different language variants of links and categories
-               if($wgContLang->hasVariants()) {
+               if( $wgContLang->hasVariants() ) {
                        $this->doVariants( $colours );
                }
 
                # Construct search and replace arrays
-               wfProfileIn( __METHOD__.'-construct' );
+               wfProfileIn( __METHOD__ . '-construct' );
                $replacePairs = array();
                foreach ( $this->internals as $ns => $entries ) {
                        foreach ( $entries as $index => $entry ) {
@@ -399,16 +399,16 @@ class LinkHolderArray {
                        }
                }
                $replacer = new HashtableReplacer( $replacePairs, 1 );
-               wfProfileOut( __METHOD__.'-construct' );
+               wfProfileOut( __METHOD__ . '-construct' );
 
                # Do the thing
-               wfProfileIn( __METHOD__.'-replace' );
+               wfProfileIn( __METHOD__ . '-replace' );
                $text = preg_replace_callback(
                        '/(<!--LINK .*?-->)/',
                        $replacer->cb(),
                        $text);
 
-               wfProfileOut( __METHOD__.'-replace' );
+               wfProfileOut( __METHOD__ . '-replace' );
                wfProfileOut( __METHOD__ );
        }
 
index 5923a38..d434e30 100644 (file)
@@ -62,7 +62,6 @@
  * $wgAllowSpecialInclusion
  * $wgInterwikiMagic
  * $wgMaxArticleSize
- * $wgUseDynamicDates
  *
  * @ingroup Parser
  */
@@ -1165,10 +1164,6 @@ class Parser {
                $text = $this->doDoubleUnderscore( $text );
 
                $text = $this->doHeadings( $text );
-               if ( $this->mOptions->getUseDynamicDates() ) {
-                       $df = DateFormatter::getInstance();
-                       $text = $df->reformat( $this->mOptions->getDateFormat(), $text );
-               }
                $text = $this->replaceInternalLinks( $text );
                $text = $this->doAllQuotes( $text );
                $text = $this->replaceExternalLinks( $text );
@@ -1859,7 +1854,7 @@ class Parser {
                                # fix up urlencoded title texts
                                if ( strpos( $m[1], '%' ) !== false ) {
                                        # Should anchors '#' also be rejected?
-                                       $m[1] = str_replace( array('<', '>'), array('&lt;', '&gt;'), rawurldecode( $m[1] ) );
+                                       $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
@@ -3715,7 +3710,7 @@ class Parser {
                global $wgEnableScaryTranscluding;
 
                if ( !$wgEnableScaryTranscluding ) {
-                       return wfMessage('scarytranscludedisabled')->inContentLanguage()->text();
+                       return wfMessage( 'scarytranscludedisabled' )->inContentLanguage()->text();
                }
 
                $url = $title->getFullUrl( "action=$action" );
@@ -3734,7 +3729,7 @@ class Parser {
                global $wgTranscludeCacheExpiry;
                $dbr = wfGetDB( DB_SLAVE );
                $tsCond = $dbr->timestamp( time() - $wgTranscludeCacheExpiry );
-               $obj = $dbr->selectRow( 'transcache', array('tc_time', 'tc_contents' ),
+               $obj = $dbr->selectRow( 'transcache', array( 'tc_time', 'tc_contents' ),
                                array( 'tc_url' => $url, "tc_time >= " . $dbr->addQuotes( $tsCond ) ) );
                if ( $obj ) {
                        return $obj->tc_contents;
@@ -3751,7 +3746,7 @@ class Parser {
                }
 
                $dbw = wfGetDB( DB_MASTER );
-               $dbw->replace( 'transcache', array('tc_url'), array(
+               $dbw->replace( 'transcache', array( 'tc_url' ), array(
                        'tc_url' => $url,
                        'tc_time' => $dbw->timestamp( time() ),
                        'tc_contents' => $text)
@@ -3777,7 +3772,7 @@ class Parser {
                $argName = trim( $nameWithSpaces );
                $object = false;
                $text = $frame->getArgument( $argName );
-               if (  $text === false && $parts->getLength() > 0
+               if ( $text === false && $parts->getLength() > 0
                  && (
                        $this->ot['html']
                        || $this->ot['pre']
@@ -3830,7 +3825,7 @@ class Parser {
                $content = !isset( $params['inner'] ) ? null : $frame->expand( $params['inner'] );
                $marker = "{$this->mUniqPrefix}-$name-" . sprintf( '%08X', $this->mMarkerIndex++ ) . self::MARKER_SUFFIX;
 
-               $isFunctionTag = isset( $this->mFunctionTagHooks[strtolower($name)] ) &&
+               $isFunctionTag = isset( $this->mFunctionTagHooks[strtolower( $name )] ) &&
                        ( $this->ot['html'] || $this->ot['pre'] );
                if ( $isFunctionTag ) {
                        $markerType = 'none';
@@ -4201,7 +4196,7 @@ class Parser {
                        # 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( '',                          '<$1>' ),
+                               array( '', '<$1>' ),
                                $safeHeadline
                        );
                        $tocline = trim( $tocline );
@@ -4322,9 +4317,9 @@ class Parser {
                                // 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]) . '"';
-                               if ( isset($editlinkArgs[2]) ) {
+                               $editlink = '<mw:editsection page="' . htmlspecialchars( $editlinkArgs[0] );
+                               $editlink .= '" section="' . htmlspecialchars( $editlinkArgs[1] ) . '"';
+                               if ( isset( $editlinkArgs[2] ) ) {
                                        $editlink .= '>' . $editlinkArgs[2] . '</mw:editsection>';
                                } else {
                                        $editlink .= '/>';
@@ -4976,7 +4971,7 @@ class Parser {
                                // is defined for images in galleries
 
                                $matches[3] = $this->recursiveTagParse( trim( $matches[3] ) );
-                               $parameterMatches = StringUtils::explode('|', $matches[3]);
+                               $parameterMatches = StringUtils::explode( '|', $matches[3] );
                                $magicWordAlt = MagicWord::get( 'img_alt' );
                                $magicWordLink = MagicWord::get( 'img_link' );
 
@@ -5022,7 +5017,7 @@ class Parser {
                } else {
                        $handlerClass = '';
                }
-               if ( !isset( $this->mImageParams[$handlerClass]  ) ) {
+               if ( !isset( $this->mImageParams[$handlerClass] ) ) {
                        # Initialise static lists
                        static $internalParamNames = array(
                                'horizAlign' => array( 'left', 'right', 'center', 'none' ),
@@ -5386,7 +5381,7 @@ class Parser {
         * @return String: for "get", the extracted section text.
         *                 for "replace", the whole page with the section replaced.
         */
-       private function extractSections( $text, $section, $mode, $newText='' ) {
+       private function extractSections( $text, $section, $mode, $newText = '' ) {
                global $wgTitle; # not generally used but removes an ugly failure mode
                $this->startParse( $wgTitle, new ParserOptions, self::OT_PLAIN, true );
                $outText = '';
@@ -5507,7 +5502,7 @@ class Parser {
         * @param $deftext String: default to return if section is not found
         * @return string text of the requested section
         */
-       public function getSection( $text, $section, $deftext='' ) {
+       public function getSection( $text, $section, $deftext = '' ) {
                return $this->extractSections( $text, $section, "get", $deftext );
        }
 
index d419621..0faa40a 100644 (file)
@@ -67,7 +67,7 @@ class ParserCache {
 
                // idhash seem to mean 'page id' + 'rendering hash' (r3710)
                $pageid = $article->getID();
-               $renderkey = (int)($wgRequest->getVal('action') == 'render');
+               $renderkey = (int)($wgRequest->getVal( 'action' ) == 'render');
 
                $key = wfMemcKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}" );
                return $key;
index 064182e..4774de4 100644 (file)
  */
 class ParserOptions {
 
-       /**
-        * Use DateFormatter to format dates
-        */
-       var $mUseDynamicDates;
-
        /**
         * Interlanguage links are removed and returned in an array
         */
@@ -220,7 +215,6 @@ class ParserOptions {
         */
        protected $onAccessCallback = null;
 
-       function getUseDynamicDates()               { return $this->mUseDynamicDates; }
        function getInterwikiMagic()                { return $this->mInterwikiMagic; }
        function getAllowExternalImages()           { return $this->mAllowExternalImages; }
        function getAllowExternalImagesFrom()       { return $this->mAllowExternalImagesFrom; }
@@ -308,7 +302,6 @@ class ParserOptions {
                return $this->getUserLangObj()->getCode();
        }
 
-       function setUseDynamicDates( $x )           { return wfSetVar( $this->mUseDynamicDates, $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 ); }
@@ -422,7 +415,7 @@ class ParserOptions {
         * @param $lang Language object
         */
        private function initialiseFromUser( $user, $lang ) {
-               global $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages,
+               global $wgInterwikiMagic, $wgAllowExternalImages,
                        $wgAllowExternalImagesFrom, $wgEnableImageWhitelist, $wgAllowSpecialInclusion,
                        $wgMaxArticleSize, $wgMaxPPNodeCount, $wgMaxTemplateDepth, $wgMaxPPExpandDepth,
                        $wgCleanSignatures, $wgExternalLinkTarget, $wgExpensiveParserFunctionLimit,
@@ -430,7 +423,6 @@ class ParserOptions {
 
                wfProfileIn( __METHOD__ );
 
-               $this->mUseDynamicDates = $wgUseDynamicDates;
                $this->mInterwikiMagic = $wgInterwikiMagic;
                $this->mAllowExternalImages = $wgAllowExternalImages;
                $this->mAllowExternalImagesFrom = $wgAllowExternalImagesFrom;
@@ -481,12 +473,7 @@ class ParserOptions {
         * @return array
         */
        public static function legacyOptions() {
-               global $wgUseDynamicDates;
-               $legacyOpts = array( 'math', 'stubthreshold', 'numberheadings', 'userlang', 'thumbsize', 'editsection', 'printable' );
-               if ( $wgUseDynamicDates ) {
-                       $legacyOpts[] = 'dateformat';
-               }
-               return $legacyOpts;
+               return array( 'math', 'stubthreshold', 'numberheadings', 'userlang', 'thumbsize', 'editsection', 'printable' );
        }
 
        /**
index 53b6293..27b75ac 100644 (file)
@@ -83,13 +83,13 @@ class ParserOutput extends CacheTime {
        function replaceEditSectionLinksCallback( $m ) {
                global $wgOut, $wgLang;
                $args = array(
-                       htmlspecialchars_decode($m[1]),
-                       htmlspecialchars_decode($m[2]),
-                       isset($m[4]) ? $m[3] : null,
+                       htmlspecialchars_decode( $m[1] ),
+                       htmlspecialchars_decode( $m[2] ),
+                       isset( $m[4] ) ? $m[3] : null,
                );
                $args[0] = Title::newFromText( $args[0] );
-               if ( !is_object($args[0]) ) {
-                       throw new MWException("Bad parser output text.");
+               if ( !is_object( $args[0] ) ) {
+                       throw new MWException( "Bad parser output text." );
                }
                $args[] = $wgLang->getCode();
                $skin = $wgOut->getSkin();
@@ -261,7 +261,7 @@ class ParserOutput extends CacheTime {
                if( $prefix == '' ) {
                        throw new MWException( 'Non-interwiki link passed, internal parser error.' );
                }
-               if (!isset($this->mInterwikiLinks[$prefix])) {
+               if ( !isset( $this->mInterwikiLinks[$prefix] ) ) {
                        $this->mInterwikiLinks[$prefix] = array();
                }
                $this->mInterwikiLinks[$prefix][$title->getDBkey()] = 1;
index d1ca8aa..f6da6c7 100644 (file)
@@ -105,9 +105,9 @@ class Parser_LinkHooks extends Parser {
         */
        public function setLinkHook( $ns, $callback, $flags = 0 ) {
                if( $flags & SLH_PATTERN && !is_string($ns) )
-                       throw new MWException( __METHOD__.'() expecting a regex string pattern.' );
-               elseif( $flags | ~SLH_PATTERN && !is_int($ns) )
-                       throw new MWException( __METHOD__.'() expecting a namespace index.' );
+                       throw new MWException( __METHOD__ . '() expecting a regex string pattern.' );
+               elseif( $flags | ~SLH_PATTERN && !is_int( $ns ) )
+                       throw new MWException( __METHOD__ . '() expecting a namespace index.' );
                $oldVal = isset( $this->mLinkHooks[$ns] ) ? $this->mLinkHooks[$ns][0] : null;
                $this->mLinkHooks[$ns] = array( $callback, $flags );
                return $oldVal;
@@ -133,8 +133,8 @@ class Parser_LinkHooks extends Parser {
        function replaceInternalLinks2( &$s ) {
                wfProfileIn( __METHOD__ );
 
-               wfProfileIn( __METHOD__.'-setup' );
-               static $tc = FALSE, $titleRegex;//$e1, $e1_img;
+               wfProfileIn( __METHOD__ . '-setup' );
+               static $tc = FALSE, $titleRegex; //$e1, $e1_img;
                if( !$tc ) {
                        # the % is needed to support urlencoded titles as well
                        $tc = Title::legalChars() . '#%';
@@ -149,12 +149,12 @@ class Parser_LinkHooks extends Parser {
                $holders = new LinkHolderArray( $this );
 
                if( is_null( $this->mTitle ) ) {
-                       wfProfileOut( __METHOD__.'-setup' );
+                       wfProfileOut( __METHOD__ . '-setup' );
                        wfProfileOut( __METHOD__ );
-                       throw new MWException( __METHOD__.": \$this->mTitle is null\n" );
+                       throw new MWException( __METHOD__ . ": \$this->mTitle is null\n" );
                }
 
-               wfProfileOut( __METHOD__.'-setup' );
+               wfProfileOut( __METHOD__ . '-setup' );
 
                $offset = 0;
                $offsetStack = array();
@@ -167,7 +167,7 @@ class Parser_LinkHooks extends Parser {
                        # Determine if the bracket is a starting or ending bracket
                        # When we find both, use the first one
                        elseif( $startBracketOffset !== false && $endBracketOffset !== false )
-                            $isStart = $startBracketOffset <= $endBracketOffset;
+                               $isStart = $startBracketOffset <= $endBracketOffset;
                        # When we only found one, check which it is
                        else $isStart = $startBracketOffset !== false;
                        $bracketOffset = $isStart ? $startBracketOffset : $endBracketOffset;
@@ -178,26 +178,26 @@ class Parser_LinkHooks extends Parser {
                        } else {
                                /** Closing bracket **/
                                # Pop the start pos for our current link zone off the stack
-                               $startBracketOffset = array_pop($offsetStack);
+                               $startBracketOffset = array_pop( $offsetStack );
                                # Just to clean up the code, lets place offsets on the outer ends
                                $endBracketOffset += 2;
 
                                # Only do logic if we actually have a opening bracket for this
-                               if( isset($startBracketOffset) ) {
+                               if( isset( $startBracketOffset ) ) {
                                        # Extract text inside the link
-                                       @list( $titleText, $paramText ) = explode('|',
-                                               substr($s, $startBracketOffset+2, $endBracketOffset-$startBracketOffset-4), 2);
+                                       @list( $titleText, $paramText ) = explode( '|',
+                                               substr( $s, $startBracketOffset + 2, $endBracketOffset - $startBracketOffset - 4 ), 2 );
                                        # Create markers only for valid links
                                        if( preg_match( $titleRegex, $titleText ) ) {
                                                # Store the text for the marker
-                                               $marker = $markers->addMarker($titleText, $paramText);
+                                               $marker = $markers->addMarker( $titleText, $paramText );
                                                # Replace the current link with the marker
-                                               $s = substr($s,0,$startBracketOffset).
-                                                       $marker.
-                                                       substr($s, $endBracketOffset);
+                                               $s = substr( $s, 0, $startBracketOffset ) .
+                                                       $marker .
+                                                       substr( $s, $endBracketOffset );
                                                # We have modified $s, because of this we need to set the
                                                # offset manually since the end position is different now
-                                               $offset = $startBracketOffset+strlen($marker);
+                                               $offset = $startBracketOffset+strlen( $marker );
                                                continue;
                                        }
                                        # ToDo: Some LinkHooks may allow recursive links inside of
@@ -212,9 +212,9 @@ class Parser_LinkHooks extends Parser {
                }
 
                # Now expand our tree
-               wfProfileIn( __METHOD__.'-expand' );
+               wfProfileIn( __METHOD__ . '-expand' );
                $s = $markers->expand( $s );
-               wfProfileOut( __METHOD__.'-expand' );
+               wfProfileOut( __METHOD__ . '-expand' );
 
                wfProfileOut( __METHOD__ );
                return $holders;
@@ -222,14 +222,14 @@ class Parser_LinkHooks extends Parser {
 
        function replaceInternalLinksCallback( $parser, $holders, $markers, $titleText, $paramText ) {
                wfProfileIn( __METHOD__ );
-               $wt = isset($paramText) ? "[[$titleText|$paramText]]" : "[[$titleText]]";
-               wfProfileIn( __METHOD__."-misc" );
+               $wt = isset( $paramText ) ? "[[$titleText|$paramText]]" : "[[$titleText]]";
+               wfProfileIn( __METHOD__ . "-misc" );
 
                # Don't allow internal links to pages containing
                # PROTO: where PROTO is a valid URL protocol; these
                # should be external links.
-               if( preg_match('/^\b(?i:' . wfUrlProtocols() . ')/', $titleText) ) {
-                       wfProfileOut( __METHOD__."-misc" );
+               if( preg_match( '/^\b(?i:' . wfUrlProtocols() . ')/', $titleText ) ) {
+                       wfProfileOut( __METHOD__ . "-misc" );
                        wfProfileOut( __METHOD__ );
                        return $wt;
                }
@@ -243,17 +243,17 @@ class Parser_LinkHooks extends Parser {
                $leadingColon = $titleText[0] == ':';
                if( $leadingColon ) $titleText = substr( $titleText, 1 );
 
-               wfProfileOut( __METHOD__."-misc" );
+               wfProfileOut( __METHOD__ . "-misc" );
                # Make title object
-               wfProfileIn( __METHOD__."-title" );
+               wfProfileIn( __METHOD__ . "-title" );
                $title = Title::newFromText( $this->mStripState->unstripNoWiki( $titleText ) );
                if( !$title ) {
-                       wfProfileOut( __METHOD__."-title" );
+                       wfProfileOut( __METHOD__ . "-title" );
                        wfProfileOut( __METHOD__ );
                        return $wt;
                }
                $ns = $title->getNamespace();
-               wfProfileOut( __METHOD__."-title" );
+               wfProfileOut( __METHOD__ . "-title" );
 
                # Default for Namespaces is a default link
                # ToDo: Default for patterns is plain wikitext
@@ -279,7 +279,7 @@ class Parser_LinkHooks extends Parser {
                if( $return === false ) {
                        # False (no link) was returned, output plain wikitext
                        # Build it again as the hook is allowed to modify $paramText
-                       $return = isset($paramText) ? "[[$titleText|$paramText]]" : "[[$titleText]]";
+                       $return = isset( $paramText ) ? "[[$titleText|$paramText]]" : "[[$titleText]]";
                }
                # Content was returned, return it
                wfProfileOut( __METHOD__ );
@@ -300,14 +300,14 @@ class LinkMarkerReplacer {
                $this->callback = $callback;
        }
 
-       function addMarker($titleText, $paramText) {
+       function addMarker( $titleText, $paramText ) {
                $id = $this->nextId++;
                $this->markers[$id] = array( $titleText, $paramText );
                return "<!-- LINKMARKER $id -->";
        }
 
        function findMarker( $string ) {
-               return (bool) preg_match('/<!-- LINKMARKER [0-9]+ -->/', $string );
+               return (bool) preg_match( '/<!-- LINKMARKER [0-9]+ -->/', $string );
        }
 
        function expand( $string ) {
@@ -315,8 +315,8 @@ class LinkMarkerReplacer {
        }
 
        function callback( $m ) {
-               $id = intval($m[1]);
-               if( !array_key_exists($id, $this->markers) ) return $m[0];
+               $id = intval( $m[1] );
+               if( !array_key_exists( $id, $this->markers ) ) return $m[0];
                $args = $this->markers[$id];
                array_unshift( $args, $this );
                array_unshift( $args, $this->holders );
index 53f3feb..468802d 100644 (file)
@@ -137,9 +137,9 @@ class Preprocessor_DOM implements Preprocessor {
                $cacheable = ( $wgPreprocessorCacheThreshold !== false
                        && strlen( $text ) > $wgPreprocessorCacheThreshold );
                if ( $cacheable ) {
-                       wfProfileIn( __METHOD__.'-cacheable' );
+                       wfProfileIn( __METHOD__ . '-cacheable' );
 
-                       $cacheKey = wfMemcKey( 'preprocess-xml', md5($text), $flags );
+                       $cacheKey = wfMemcKey( 'preprocess-xml', md5( $text ), $flags );
                        $cacheValue = $wgMemc->get( $cacheKey );
                        if ( $cacheValue ) {
                                $version = substr( $cacheValue, 0, 8 );
@@ -152,11 +152,11 @@ class Preprocessor_DOM implements Preprocessor {
                }
                if ( $xml === false ) {
                        if ( $cacheable ) {
-                               wfProfileIn( __METHOD__.'-cache-miss' );
+                               wfProfileIn( __METHOD__ . '-cache-miss' );
                                $xml = $this->preprocessToXml( $text, $flags );
                                $cacheValue = sprintf( "%08d", self::CACHE_VERSION ) . $xml;
                                $wgMemc->set( $cacheKey, $cacheValue, 86400 );
-                               wfProfileOut( __METHOD__.'-cache-miss' );
+                               wfProfileOut( __METHOD__ . '-cache-miss' );
                                wfDebugLog( "Preprocessor", "Saved preprocessor XML to memcached (key $cacheKey)" );
                        } else {
                                $xml = $this->preprocessToXml( $text, $flags );
@@ -169,10 +169,10 @@ class Preprocessor_DOM implements Preprocessor {
                $this->parser->mGeneratedPPNodeCount += substr_count( $xml, '<' );
                $max = $this->parser->mOptions->getMaxGeneratedPPNodeCount();
                if ( $this->parser->mGeneratedPPNodeCount > $max ) {
-                       throw new MWException( __METHOD__.': generated node count limit exceeded' );
+                       throw new MWException( __METHOD__ . ': generated node count limit exceeded' );
                }
 
-               wfProfileIn( __METHOD__.'-loadXML' );
+               wfProfileIn( __METHOD__ . '-loadXML' );
                $dom = new DOMDocument;
                wfSuppressWarnings();
                $result = $dom->loadXML( $xml );
@@ -183,13 +183,13 @@ class Preprocessor_DOM implements Preprocessor {
                        // 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 ) {
-                               throw new MWException( __METHOD__.' generated invalid XML' );
+                               throw new MWException( __METHOD__ . ' generated invalid XML' );
                        }
                }
                $obj = new PPNode_DOM( $dom->documentElement );
-               wfProfileOut( __METHOD__.'-loadXML' );
+               wfProfileOut( __METHOD__ . '-loadXML' );
                if ( $cacheable ) {
-                       wfProfileOut( __METHOD__.'-cacheable' );
+                       wfProfileOut( __METHOD__ . '-cacheable' );
                }
                wfProfileOut( __METHOD__ );
                return $obj;
@@ -397,7 +397,7 @@ class Preprocessor_DOM implements Preprocessor {
 
                                                if ( $stack->top ) {
                                                        $part = $stack->top->getCurrentPart();
-                                                       if ( ! (isset( $part->commentEnd ) && $part->commentEnd == $wsStart - 1 )) {
+                                                       if ( !(isset( $part->commentEnd ) && $part->commentEnd == $wsStart - 1 )) {
                                                                $part->visualEnd = $wsStart;
                                                        }
                                                        // Else comments abutting, no change in visual end
@@ -658,19 +658,13 @@ class Preprocessor_DOM implements Preprocessor {
                                        $piece->parts = array( new PPDPart );
                                        $piece->count -= $matchingCount;
                                        # do we still qualify for any callback with remaining count?
-                                       $names = $rules[$piece->open]['names'];
-                                       $skippedBraces = 0;
-                                       $enclosingAccum =& $accum;
-                                       while ( $piece->count ) {
-                                               if ( array_key_exists( $piece->count, $names ) ) {
-                                                       $stack->push( $piece );
-                                                       $accum =& $stack->getAccum();
-                                                       break;
-                                               }
-                                               --$piece->count;
-                                               $skippedBraces ++;
+                                       $min = $rules[$piece->open]['min'];
+                                       if ( $piece->count >= $min ) {
+                                               $stack->push( $piece );
+                                               $accum =& $stack->getAccum();
+                                       } else {
+                                               $accum .= str_repeat( $piece->open, $piece->count );
                                        }
-                                       $enclosingAccum .= str_repeat( $piece->open, $skippedBraces );
                                }
                                $flags = $stack->getFlags();
                                extract( $flags );
@@ -758,7 +752,7 @@ class PPDStack {
 
        function pop() {
                if ( !count( $this->stack ) ) {
-                       throw new MWException( __METHOD__.': no elements remaining' );
+                       throw new MWException( __METHOD__ . ': no elements remaining' );
                }
                $temp = array_pop( $this->stack );
 
@@ -815,7 +809,7 @@ class PPDStackElement {
        }
 
        function &getAccum() {
-               return $this->parts[count($this->parts) - 1]->out;
+               return $this->parts[count( $this->parts ) - 1]->out;
        }
 
        function addPart( $s = '' ) {
@@ -824,7 +818,7 @@ class PPDStackElement {
        }
 
        function getCurrentPart() {
-               return $this->parts[count($this->parts) - 1];
+               return $this->parts[count( $this->parts ) - 1];
        }
 
        /**
@@ -1118,7 +1112,7 @@ class PPFrame_DOM implements PPFrame {
                                        }
                                        # 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
-                                       elseif ( $this->parser->ot['wiki'] && ! ( $flags & PPFrame::RECOVER_COMMENTS ) ) {
+                                       elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
                                                $out .= $this->parser->insertStripItem( $contextNode->textContent );
                                        }
                                        # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
@@ -1175,7 +1169,7 @@ class PPFrame_DOM implements PPFrame {
                                }
                        } else {
                                wfProfileOut( __METHOD__ );
-                               throw new MWException( __METHOD__.': Invalid parameter type' );
+                               throw new MWException( __METHOD__ . ': Invalid parameter type' );
                        }
 
                        if ( $newIterator !== false ) {
@@ -1459,25 +1453,25 @@ class PPTemplateFrame_DOM extends PPFrame_DOM {
        function getArguments() {
                $arguments = array();
                foreach ( array_merge(
-                               array_keys($this->numberedArgs),
-                               array_keys($this->namedArgs)) as $key ) {
-                       $arguments[$key] = $this->getArgument($key);
+                               array_keys( $this->numberedArgs ),
+                               array_keys( $this->namedArgs ) ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
                }
                return $arguments;
        }
 
        function getNumberedArguments() {
                $arguments = array();
-               foreach ( array_keys($this->numberedArgs) as $key ) {
-                       $arguments[$key] = $this->getArgument($key);
+               foreach ( array_keys( $this->numberedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
                }
                return $arguments;
        }
 
        function getNamedArguments() {
                $arguments = array();
-               foreach ( array_keys($this->namedArgs) as $key ) {
-                       $arguments[$key] = $this->getArgument($key);
+               foreach ( array_keys( $this->namedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
                }
                return $arguments;
        }
index a4e408e..c22da64 100644 (file)
@@ -116,9 +116,9 @@ class Preprocessor_Hash implements Preprocessor {
 
                $cacheable = $wgPreprocessorCacheThreshold !== false && strlen( $text ) > $wgPreprocessorCacheThreshold;
                if ( $cacheable ) {
-                       wfProfileIn( __METHOD__.'-cacheable' );
+                       wfProfileIn( __METHOD__ . '-cacheable' );
 
-                       $cacheKey = wfMemcKey( 'preprocess-hash', md5($text), $flags );
+                       $cacheKey = wfMemcKey( 'preprocess-hash', md5( $text ), $flags );
                        $cacheValue = $wgMemc->get( $cacheKey );
                        if ( $cacheValue ) {
                                $version = substr( $cacheValue, 0, 8 );
@@ -127,12 +127,12 @@ class Preprocessor_Hash implements Preprocessor {
                                        // From the cache
                                        wfDebugLog( "Preprocessor",
                                                "Loaded preprocessor hash from memcached (key $cacheKey)" );
-                                       wfProfileOut( __METHOD__.'-cacheable' );
+                                       wfProfileOut( __METHOD__ . '-cacheable' );
                                        wfProfileOut( __METHOD__ );
                                        return $hash;
                                }
                        }
-                       wfProfileIn( __METHOD__.'-cache-miss' );
+                       wfProfileIn( __METHOD__ . '-cache-miss' );
                }
 
                $rules = array(
@@ -332,7 +332,7 @@ class Preprocessor_Hash implements Preprocessor {
 
                                                if ( $stack->top ) {
                                                        $part = $stack->top->getCurrentPart();
-                                                       if ( ! (isset( $part->commentEnd ) && $part->commentEnd == $wsStart - 1 )) {
+                                                       if ( !(isset( $part->commentEnd ) && $part->commentEnd == $wsStart - 1 )) {
                                                                $part->visualEnd = $wsStart;
                                                        }
                                                        // Else comments abutting, no change in visual end
@@ -391,7 +391,7 @@ class Preprocessor_Hash implements Preprocessor {
                                }
                                // <includeonly> and <noinclude> just become <ignore> tags
                                if ( in_array( $lowerName, $ignoredElements ) ) {
-                                       $accum->addNodeWithText(  'ignore', substr( $text, $tagStartPos, $i - $tagStartPos ) );
+                                       $accum->addNodeWithText( 'ignore', substr( $text, $tagStartPos, $i - $tagStartPos ) );
                                        continue;
                                }
 
@@ -549,7 +549,7 @@ class Preprocessor_Hash implements Preprocessor {
                                        }
                                }
 
-                               if ($matchingCount <= 0) {
+                               if ( $matchingCount <= 0 ) {
                                        # No matching element found in callback array
                                        # Output a literal closing brace and continue
                                        $accum->addLiteral( str_repeat( $curChar, $count ) );
@@ -591,10 +591,10 @@ class Preprocessor_Hash implements Preprocessor {
                                                                $lastNode = $node;
                                                        }
                                                        if ( !$node ) {
-                                                               throw new MWException( __METHOD__. ': eqpos not found' );
+                                                               throw new MWException( __METHOD__ . ': eqpos not found' );
                                                        }
                                                        if ( $node->name !== 'equals' ) {
-                                                               throw new MWException( __METHOD__ .': eqpos is not equals' );
+                                                               throw new MWException( __METHOD__ . ': eqpos is not equals' );
                                                        }
                                                        $equalsNode = $node;
 
@@ -639,23 +639,17 @@ class Preprocessor_Hash implements Preprocessor {
                                $accum =& $stack->getAccum();
 
                                # Re-add the old stack element if it still has unmatched opening characters remaining
-                               if ($matchingCount < $piece->count) {
+                               if ( $matchingCount < $piece->count ) {
                                        $piece->parts = array( new PPDPart_Hash );
                                        $piece->count -= $matchingCount;
                                        # do we still qualify for any callback with remaining count?
-                                       $names = $rules[$piece->open]['names'];
-                                       $skippedBraces = 0;
-                                       $enclosingAccum =& $accum;
-                                       while ( $piece->count ) {
-                                               if ( array_key_exists( $piece->count, $names ) ) {
-                                                       $stack->push( $piece );
-                                                       $accum =& $stack->getAccum();
-                                                       break;
-                                               }
-                                               --$piece->count;
-                                               $skippedBraces ++;
+                                       $min = $rules[$piece->open]['min'];
+                                       if ( $piece->count >= $min ) {
+                                               $stack->push( $piece );
+                                               $accum =& $stack->getAccum();
+                                       } else {
+                                               $accum->addLiteral( str_repeat( $piece->open, $piece->count ) );
                                        }
-                                       $enclosingAccum->addLiteral( str_repeat( $piece->open, $skippedBraces ) );
                                }
 
                                extract( $stack->getFlags() );
@@ -696,11 +690,11 @@ class Preprocessor_Hash implements Preprocessor {
                $rootNode->lastChild = $stack->rootAccum->lastNode;
 
                // Cache
-               if ($cacheable) {
+               if ( $cacheable ) {
                        $cacheValue = sprintf( "%08d", self::CACHE_VERSION ) . serialize( $rootNode );
                        $wgMemc->set( $cacheKey, $cacheValue, 86400 );
-                       wfProfileOut( __METHOD__.'-cache-miss' );
-                       wfProfileOut( __METHOD__.'-cacheable' );
+                       wfProfileOut( __METHOD__ . '-cache-miss' );
+                       wfProfileOut( __METHOD__ . '-cacheable' );
                        wfDebugLog( "Preprocessor", "Saved preprocessor Hash to memcached (key $cacheKey)" );
                }
 
@@ -1038,7 +1032,7 @@ class PPFrame_Hash implements PPFrame {
                                        }
                                        # 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
-                                       elseif ( $this->parser->ot['wiki'] && ! ( $flags & PPFrame::RECOVER_COMMENTS ) ) {
+                                       elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
                                                $out .= $this->parser->insertStripItem( $contextNode->firstChild->value );
                                        }
                                        # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
@@ -1085,7 +1079,7 @@ class PPFrame_Hash implements PPFrame {
                                        $newIterator = $contextNode->getChildren();
                                }
                        } else {
-                               throw new MWException( __METHOD__.': Invalid parameter type' );
+                               throw new MWException( __METHOD__ . ': Invalid parameter type' );
                        }
 
                        if ( $newIterator !== false ) {
@@ -1374,9 +1368,9 @@ class PPTemplateFrame_Hash extends PPFrame_Hash {
        function getArguments() {
                $arguments = array();
                foreach ( array_merge(
-                               array_keys($this->numberedArgs),
-                               array_keys($this->namedArgs)) as $key ) {
-                       $arguments[$key] = $this->getArgument($key);
+                               array_keys( $this->numberedArgs ),
+                               array_keys( $this->namedArgs ) ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
                }
                return $arguments;
        }
@@ -1386,8 +1380,8 @@ class PPTemplateFrame_Hash extends PPFrame_Hash {
         */
        function getNumberedArguments() {
                $arguments = array();
-               foreach ( array_keys($this->numberedArgs) as $key ) {
-                       $arguments[$key] = $this->getArgument($key);
+               foreach ( array_keys( $this->numberedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
                }
                return $arguments;
        }
@@ -1397,8 +1391,8 @@ class PPTemplateFrame_Hash extends PPFrame_Hash {
         */
        function getNamedArguments() {
                $arguments = array();
-               foreach ( array_keys($this->namedArgs) as $key ) {
-                       $arguments[$key] = $this->getArgument($key);
+               foreach ( array_keys( $this->namedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
                }
                return $arguments;
        }
diff --git a/includes/parser/Preprocessor_HipHop.hphp b/includes/parser/Preprocessor_HipHop.hphp
deleted file mode 100644 (file)
index 8059e35..0000000
+++ /dev/null
@@ -1,2014 +0,0 @@
-<?php
-/**
- * A preprocessor optimised for HipHop, using HipHop-specific syntax.
- * vim: ft=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 Parser
- */
-
-/**
- * @ingroup Parser
- */
-class Preprocessor_HipHop implements Preprocessor {
-       /**
-        * @var Parser
-        */
-       var $parser;
-
-       const CACHE_VERSION = 1;
-
-       /**
-        * @param $parser Parser
-        */
-       function __construct( $parser ) {
-               $this->parser = $parser;
-       }
-
-       /**
-        * @return PPFrame_HipHop
-        */
-       function newFrame() {
-               return new PPFrame_HipHop( $this );
-       }
-
-       /**
-        * @param $args array
-        * @return PPCustomFrame_HipHop
-        */
-       function newCustomFrame( $args ) {
-               return new PPCustomFrame_HipHop( $this, $args );
-       }
-
-       /**
-        * @param $values array
-        * @return PPNode_HipHop_Array
-        */
-       function newPartNodeArray( $values ) {
-               $list = array();
-
-               foreach ( $values as $k => $val ) {
-                       $partNode = new PPNode_HipHop_Tree( 'part' );
-                       $nameNode = new PPNode_HipHop_Tree( 'name' );
-
-                       if ( is_int( $k ) ) {
-                               $nameNode->addChild( new PPNode_HipHop_Attr( 'index', $k ) );
-                               $partNode->addChild( $nameNode );
-                       } else {
-                               $nameNode->addChild( new PPNode_HipHop_Text( $k ) );
-                               $partNode->addChild( $nameNode );
-                               $partNode->addChild( new PPNode_HipHop_Text( '=' ) );
-                       }
-
-                       $valueNode = new PPNode_HipHop_Tree( 'value' );
-                       $valueNode->addChild( new PPNode_HipHop_Text( $val ) );
-                       $partNode->addChild( $valueNode );
-
-                       $list[] = $partNode;
-               }
-
-               $node = new PPNode_HipHop_Array( $list );
-               return $node;
-       }
-
-       /**
-        * Preprocess some wikitext and return the document tree.
-        * This is the ghost of Parser::replace_variables().
-        *
-        * @param $text String: the text to parse
-        * @param $flags Integer: bitwise combination of:
-        *          Parser::PTD_FOR_INCLUSION    Handle <noinclude>/<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.
-        *
-        * Any flag added to the $flags parameter here, or any other parameter liable to cause a
-        * change in the DOM tree for a given text, must be passed through the section identifier
-        * in the section edit link and thus back to extractSections().
-        *
-        * The output of this function is currently only cached in process memory, but a persistent
-        * cache may be implemented at a later date which takes further advantage of these strict
-        * dependency requirements.
-        *
-        * @throws MWException
-        * @return PPNode_HipHop_Tree
-        */
-       function preprocessToObj( $text, $flags = 0 ) {
-               wfProfileIn( __METHOD__ );
-
-               // Check cache.
-               global $wgMemc, $wgPreprocessorCacheThreshold;
-
-               $lengthText = strlen( $text );
-
-               $cacheable = ($wgPreprocessorCacheThreshold !== false && $lengthText > $wgPreprocessorCacheThreshold);
-               if ( $cacheable ) {
-                       wfProfileIn( __METHOD__.'-cacheable' );
-
-                       $cacheKey = strval( wfMemcKey( 'preprocess-hash', md5($text), $flags ) );
-                       $cacheValue = strval( $wgMemc->get( $cacheKey ) );
-                       if ( $cacheValue !== '' ) {
-                               $version = substr( $cacheValue, 0, 8 );
-                               if ( intval( $version ) == self::CACHE_VERSION ) {
-                                       $hash = unserialize( substr( $cacheValue, 8 ) );
-                                       // From the cache
-                                       wfDebugLog( "Preprocessor",
-                                               "Loaded preprocessor hash from memcached (key $cacheKey)" );
-                                       wfProfileOut( __METHOD__.'-cacheable' );
-                                       wfProfileOut( __METHOD__ );
-                                       return $hash;
-                               }
-                       }
-                       wfProfileIn( __METHOD__.'-cache-miss' );
-               }
-
-               $rules = array(
-                       '{' => array(
-                               'end' => '}',
-                               'names' => array(
-                                       2 => 'template',
-                                       3 => 'tplarg',
-                               ),
-                               'min' => 2,
-                               'max' => 3,
-                       ),
-                       '[' => array(
-                               'end' => ']',
-                               'names' => array( 2 => 'LITERAL' ),
-                               'min' => 2,
-                               'max' => 2,
-                       )
-               );
-
-               $forInclusion = (bool)( $flags & Parser::PTD_FOR_INCLUSION );
-
-               $xmlishElements = (array)$this->parser->getStripList();
-               $enableOnlyinclude = false;
-               if ( $forInclusion ) {
-                       $ignoredTags = array( 'includeonly', '/includeonly' );
-                       $ignoredElements = array( 'noinclude' );
-                       $xmlishElements[] = 'noinclude';
-                       if ( strpos( $text, '<onlyinclude>' ) !== false && strpos( $text, '</onlyinclude>' ) !== false ) {
-                               $enableOnlyinclude = true;
-                       }
-               } else if ( $this->parser->ot['wiki'] ) {
-                       $ignoredTags = array( 'noinclude', '/noinclude', 'onlyinclude', '/onlyinclude', 'includeonly', '/includeonly' );
-                       $ignoredElements = array();
-               } else {
-                       $ignoredTags = array( 'noinclude', '/noinclude', 'onlyinclude', '/onlyinclude' );
-                       $ignoredElements = array( 'includeonly' );
-                       $xmlishElements[] = 'includeonly';
-               }
-               $xmlishRegex = implode( '|', array_merge( $xmlishElements, $ignoredTags ) );
-
-               // Use "A" modifier (anchored) instead of "^", because ^ doesn't work with an offset
-               $elementsRegex = "~($xmlishRegex)(?:\s|\/>|>)|(!--)~iA";
-
-               $stack = new PPDStack_HipHop;
-
-               $searchBase = "[{<\n";
-               $revText = strrev( $text ); // For fast reverse searches
-
-               $i = 0;                     # Input pointer, starts out pointing to a pseudo-newline before the start
-               $accum = $stack->getAccum();   # Current accumulator
-               $headingIndex = 1;
-               $stackFlags = array(
-                       'findPipe' => false, # True to take notice of pipe characters
-                       'findEquals' => false, # True to find equals signs in arguments
-                       '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
-
-               while ( true ) {
-                       //$this->memCheck();
-
-                       if ( $findOnlyinclude ) {
-                               // Ignore all input up to the next <onlyinclude>
-                               $variantStartPos = strpos( $text, '<onlyinclude>', $i );
-                               if ( $variantStartPos === false ) {
-                                       // Ignored section runs to the end
-                                       $accum->addNodeWithText( 'ignore', strval( substr( $text, $i ) ) );
-                                       break;
-                               }
-                               $startPos1 = intval( $variantStartPos );
-                               $tagEndPos = $startPos1 + strlen( '<onlyinclude>' ); // past-the-end
-                               $accum->addNodeWithText( 'ignore', strval( substr( $text, $i, $tagEndPos - $i ) ) );
-                               $i = $tagEndPos;
-                               $findOnlyinclude = false;
-                       }
-
-                       if ( $fakeLineStart ) {
-                               $found = 'line-start';
-                               $curChar = '';
-                       } else {
-                               # Find next opening brace, closing brace or pipe
-                               $search = $searchBase;
-                               if ( $stack->top === false ) {
-                                       $currentClosing = '';
-                               } else {
-                                       $currentClosing = strval( $stack->getTop()->close );
-                                       $search .= $currentClosing;
-                               }
-                               if ( $stackFlags['findPipe'] ) {
-                                       $search .= '|';
-                               }
-                               if ( $stackFlags['findEquals'] ) {
-                                       // First equals will be for the template
-                                       $search .= '=';
-                               }
-                               $rule = null;
-                               # Output literal section, advance input counter
-                               $literalLength = intval( strcspn( $text, $search, $i ) );
-                               if ( $literalLength > 0 ) {
-                                       $accum->addLiteral( strval( substr( $text, $i, $literalLength ) ) );
-                                       $i += $literalLength;
-                               }
-                               if ( $i >= $lengthText ) {
-                                       if ( $currentClosing === "\n" ) {
-                                               // Do a past-the-end run to finish off the heading
-                                               $curChar = '';
-                                               $found = 'line-end';
-                                       } else {
-                                               # All done
-                                               break;
-                                       }
-                               } else {
-                                       $curChar = $text[$i];
-                                       if ( $curChar === '|' ) {
-                                               $found = 'pipe';
-                                       } elseif ( $curChar === '=' ) {
-                                               $found = 'equals';
-                                       } elseif ( $curChar === '<' ) {
-                                               $found = 'angle';
-                                       } elseif ( $curChar === "\n" ) {
-                                               if ( $stackFlags['inHeading'] ) {
-                                                       $found = 'line-end';
-                                               } else {
-                                                       $found = 'line-start';
-                                               }
-                                       } elseif ( $curChar === $currentClosing ) {
-                                               $found = 'close';
-                                       } elseif ( isset( $rules[$curChar] ) ) {
-                                               $found = 'open';
-                                               $rule = $rules[$curChar];
-                                       } else {
-                                               # Some versions of PHP have a strcspn which stops on null characters
-                                               # Ignore and continue
-                                               ++$i;
-                                               continue;
-                                       }
-                               }
-                       }
-
-                       if ( $found === 'angle' ) {
-                               $matches = false;
-                               // Handle </onlyinclude>
-                               if ( $enableOnlyinclude
-                                       && substr( $text, $i, strlen( '</onlyinclude>' ) ) === '</onlyinclude>' )
-                               {
-                                       $findOnlyinclude = true;
-                                       continue;
-                               }
-
-                               // Determine element name
-                               if ( !preg_match( $elementsRegex, $text, $matches, 0, $i + 1 ) ) {
-                                       // Element name missing or not listed
-                                       $accum->addLiteral( '<' );
-                                       ++$i;
-                                       continue;
-                               }
-                               // Handle comments
-                               if ( isset( $matches[2] ) && $matches[2] === '!--' ) {
-                                       // To avoid leaving blank lines, when a comment is both preceded
-                                       // and followed by a newline (ignoring spaces), trim leading and
-                                       // trailing spaces and one of the newlines.
-
-                                       // Find the end
-                                       $variantEndPos = strpos( $text, '-->', $i + 4 );
-                                       if ( $variantEndPos === false ) {
-                                               // Unclosed comment in input, runs to end
-                                               $inner = strval( substr( $text, $i ) );
-                                               $accum->addNodeWithText( 'comment', $inner );
-                                               $i = $lengthText;
-                                       } else {
-                                               $endPos = intval( $variantEndPos );
-                                               // Search backwards for leading whitespace
-                                               if ( $i ) {
-                                                       $wsStart = $i - intval( strspn( $revText, ' ', $lengthText - $i ) );
-                                               } else {
-                                                       $wsStart = 0;
-                                               }
-                                               // Search forwards for trailing whitespace
-                                               // $wsEnd will be the position of the last space (or the '>' if there's none)
-                                               $wsEnd = $endPos + 2 + intval( strspn( $text, ' ', $endPos + 3 ) );
-                                               // Eat the line if possible
-                                               // TODO: This could theoretically be done if $wsStart == 0, i.e. for comments at
-                                               // the overall start. That's not how Sanitizer::removeHTMLcomments() did it, but
-                                               // it's a possible beneficial b/c break.
-                                               if ( $wsStart > 0 && substr( $text, $wsStart - 1, 1 ) === "\n"
-                                                       && substr( $text, $wsEnd + 1, 1 ) === "\n" )
-                                               {
-                                                       $startPos2 = $wsStart;
-                                                       $endPos = $wsEnd + 1;
-                                                       // Remove leading whitespace from the end of the accumulator
-                                                       // Sanity check first though
-                                                       $wsLength = $i - $wsStart;
-                                                       if ( $wsLength > 0
-                                                               && $accum->lastNode instanceof PPNode_HipHop_Text
-                                                               && substr( $accum->lastNode->value, -$wsLength ) === str_repeat( ' ', $wsLength ) )
-                                                       {
-                                                               $accum->lastNode->value = strval( substr( $accum->lastNode->value, 0, -$wsLength ) );
-                                                       }
-                                                       // Do a line-start run next time to look for headings after the comment
-                                                       $fakeLineStart = true;
-                                               } else {
-                                                       // No line to eat, just take the comment itself
-                                                       $startPos2 = $i;
-                                                       $endPos += 2;
-                                               }
-
-                                               if ( $stack->top ) {
-                                                       $part = $stack->getTop()->getCurrentPart();
-                                                       if ( ! (isset( $part->commentEnd ) && $part->commentEnd == $wsStart - 1 )) {
-                                                               $part->visualEnd = $wsStart;
-                                                       }
-                                                       // Else comments abutting, no change in visual end
-                                                       $part->commentEnd = $endPos;
-                                               }
-                                               $i = $endPos + 1;
-                                               $inner = strval( substr( $text, $startPos2, $endPos - $startPos2 + 1 ) );
-                                               $accum->addNodeWithText( 'comment', $inner );
-                                       }
-                                       continue;
-                               }
-                               $name = strval( $matches[1] );
-                               $lowerName = strtolower( $name );
-                               $attrStart = $i + strlen( $name ) + 1;
-
-                               // Find end of tag
-                               $variantTagEndPos = $noMoreGT ? false : strpos( $text, '>', $attrStart );
-                               if ( $variantTagEndPos === false ) {
-                                       // Infinite backtrack
-                                       // Disable tag search to prevent worst-case O(N^2) performance
-                                       $noMoreGT = true;
-                                       $accum->addLiteral( '<' );
-                                       ++$i;
-                                       continue;
-                               }
-                               $tagEndPos = intval( $variantTagEndPos );
-
-                               // Handle ignored tags
-                               if ( in_array( $lowerName, $ignoredTags ) ) {
-                                       $accum->addNodeWithText( 'ignore', strval( substr( $text, $i, $tagEndPos - $i + 1 ) ) );
-                                       $i = $tagEndPos + 1;
-                                       continue;
-                               }
-
-                               $tagStartPos = $i;
-                               $close = '';
-                               if ( $text[$tagEndPos-1] === '/' ) {
-                                       // Short end tag
-                                       $attrEnd = $tagEndPos - 1;
-                                       $shortEnd = true;
-                                       $inner = '';
-                                       $i = $tagEndPos + 1;
-                                       $haveClose = false;
-                               } else {
-                                       $attrEnd = $tagEndPos;
-                                       $shortEnd = false;
-                                       // Find closing tag
-                                       if ( preg_match( "/<\/" . preg_quote( $name, '/' ) . "\s*>/i",
-                                                       $text, $matches, PREG_OFFSET_CAPTURE, $tagEndPos + 1 ) )
-                                       {
-                                               $inner = strval( substr( $text, $tagEndPos + 1, $matches[0][1] - $tagEndPos - 1 ) );
-                                               $i = intval( $matches[0][1] ) + strlen( $matches[0][0] );
-                                               $close = strval( $matches[0][0] );
-                                               $haveClose = true;
-                                       } else {
-                                               // No end tag -- let it run out to the end of the text.
-                                               $inner = strval( substr( $text, $tagEndPos + 1 ) );
-                                               $i = $lengthText;
-                                               $haveClose = false;
-                                       }
-                               }
-                               // <includeonly> and <noinclude> just become <ignore> tags
-                               if ( in_array( $lowerName, $ignoredElements ) ) {
-                                       $accum->addNodeWithText(  'ignore', strval( substr( $text, $tagStartPos, $i - $tagStartPos ) ) );
-                                       continue;
-                               }
-
-                               if ( $attrEnd <= $attrStart ) {
-                                       $attr = '';
-                               } else {
-                                       // Note that the attr element contains the whitespace between name and attribute,
-                                       // this is necessary for precise reconstruction during pre-save transform.
-                                       $attr = strval( substr( $text, $attrStart, $attrEnd - $attrStart ) );
-                               }
-
-                               $extNode = new PPNode_HipHop_Tree( 'ext' );
-                               $extNode->addChild( PPNode_HipHop_Tree::newWithText( 'name', $name ) );
-                               $extNode->addChild( PPNode_HipHop_Tree::newWithText( 'attr', $attr ) );
-                               if ( !$shortEnd ) {
-                                       $extNode->addChild( PPNode_HipHop_Tree::newWithText( 'inner', $inner ) );
-                               }
-                               if ( $haveClose ) {
-                                       $extNode->addChild( PPNode_HipHop_Tree::newWithText( 'close', $close ) );
-                               }
-                               $accum->addNode( $extNode );
-                       }
-
-                       elseif ( $found === 'line-start' ) {
-                               // Is this the start of a heading?
-                               // Line break belongs before the heading element in any case
-                               if ( $fakeLineStart ) {
-                                       $fakeLineStart = false;
-                               } else {
-                                       $accum->addLiteral( $curChar );
-                                       $i++;
-                               }
-
-                               $count = intval( strspn( $text, '=', $i, 6 ) );
-                               if ( $count == 1 && $stackFlags['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.
-                               } elseif ( $count > 0 ) {
-                                       $partData = array(
-                                               'open' => "\n",
-                                               'close' => "\n",
-                                               'parts' => array( new PPDPart_HipHop( str_repeat( '=', $count ) ) ),
-                                               'startPos' => $i,
-                                               'count' => $count );
-                                       $stack->push( $partData );
-                                       $accum = $stack->getAccum();
-                                       $stackFlags = $stack->getFlags();
-                                       $i += $count;
-                               }
-                       } elseif ( $found === 'line-end' ) {
-                               $piece = $stack->getTop();
-                               // A heading must be open, otherwise \n wouldn't have been in the search list
-                               assert( $piece->open === "\n" ); // Passing the assert condition directly instead of string, as
-                                                                // HPHP /compiler/ chokes on strings when ASSERT_ACTIVE != 0.
-                               $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
-                               $wsLength = intval( strspn( $revText, " \t", $lengthText - $i ) );
-                               $searchStart = $i - $wsLength;
-                               if ( isset( $part->commentEnd ) && $searchStart - 1 == $part->commentEnd ) {
-                                       // Comment found at line end
-                                       // Search for equals signs before the comment
-                                       $searchStart = intval( $part->visualEnd );
-                                       $searchStart -= intval( strspn( $revText, " \t", $lengthText - $searchStart ) );
-                               }
-                               $count = intval( $piece->count );
-                               $equalsLength = intval( strspn( $revText, '=', $lengthText - $searchStart ) );
-                               $isTreeNode = false;
-                               $resultAccum = $accum;
-                               if ( $equalsLength > 0 ) {
-                                       if ( $searchStart - $equalsLength == $piece->startPos ) {
-                                               // This is just a single string of equals signs on its own line
-                                               // Replicate the doHeadings behaviour /={count}(.+)={count}/
-                                               // First find out how many equals signs there really are (don't stop at 6)
-                                               $count = $equalsLength;
-                                               if ( $count < 3 ) {
-                                                       $count = 0;
-                                               } else {
-                                                       $count = intval( ( $count - 1 ) / 2 );
-                                                       if ( $count > 6 ) {
-                                                               $count = 6;
-                                                       }
-                                               }
-                                       } else {
-                                               if ( $count > $equalsLength ) {
-                                                       $count = $equalsLength;
-                                               }
-                                       }
-                                       if ( $count > 0 ) {
-                                               // Normal match, output <h>
-                                               $tree = new PPNode_HipHop_Tree( 'possible-h' );
-                                               $tree->addChild( new PPNode_HipHop_Attr( 'level', $count ) );
-                                               $tree->addChild( new PPNode_HipHop_Attr( 'i', $headingIndex++ ) );
-                                               $tree->lastChild->nextSibling = $accum->firstNode;
-                                               $tree->lastChild = $accum->lastNode;
-                                               $isTreeNode = true;
-                                       } else {
-                                               // Single equals sign on its own line, count=0
-                                               // Output $resultAccum
-                                       }
-                               } else {
-                                       // No match, no <h>, just pass down the inner text
-                                       // Output $resultAccum
-                               }
-                               // Unwind the stack
-                               $stack->pop();
-                               $accum = $stack->getAccum();
-                               $stackFlags = $stack->getFlags();
-
-                               // Append the result to the enclosing accumulator
-                               if ( $isTreeNode ) {
-                                       $accum->addNode( $tree );
-                               } else {
-                                       $accum->addAccum( $resultAccum );
-                               }
-                               // Note that we do NOT increment the input pointer.
-                               // This is because the closing linebreak could be the opening linebreak of
-                               // another heading. Infinite loops are avoided because the next iteration MUST
-                               // hit the heading open case above, which unconditionally increments the
-                               // input pointer.
-                       } elseif ( $found === 'open' ) {
-                               # count opening brace characters
-                               $count = intval( strspn( $text, $curChar, $i ) );
-
-                               # we need to add to stack only if opening brace count is enough for one of the rules
-                               if ( $count >= $rule['min'] ) {
-                                       # Add it to the stack
-                                       $partData = array(
-                                               'open' => $curChar,
-                                               'close' => $rule['end'],
-                                               'count' => $count,
-                                               'lineStart' => ($i == 0 || $text[$i-1] === "\n"),
-                                       );
-
-                                       $stack->push( $partData );
-                                       $accum = $stack->getAccum();
-                                       $stackFlags = $stack->getFlags();
-                               } else {
-                                       # Add literal brace(s)
-                                       $accum->addLiteral( str_repeat( $curChar, $count ) );
-                               }
-                               $i += $count;
-                       } elseif ( $found === 'close' ) {
-                               $piece = $stack->getTop();
-                               # lets check if there are enough characters for closing brace
-                               $maxCount = intval( $piece->count );
-                               $count = intval( strspn( $text, $curChar, $i, $maxCount ) );
-
-                               # check for maximum matching characters (if there are 5 closing
-                               # characters, we will probably need only 3 - depending on the rules)
-                               $rule = $rules[$piece->open];
-                               if ( $count > $rule['max'] ) {
-                                       # The specified maximum exists in the callback array, unless the caller
-                                       # has made an error
-                                       $matchingCount = intval( $rule['max'] );
-                               } else {
-                                       # Count is less than the maximum
-                                       # Skip any gaps in the callback array to find the true largest match
-                                       # Need to use array_key_exists not isset because the callback can be null
-                                       $matchingCount = $count;
-                                       while ( $matchingCount > 0 && !array_key_exists( $matchingCount, $rule['names'] ) ) {
-                                               --$matchingCount;
-                                       }
-                               }
-
-                               if ($matchingCount <= 0) {
-                                       # No matching element found in callback array
-                                       # Output a literal closing brace and continue
-                                       $accum->addLiteral( str_repeat( $curChar, $count ) );
-                                       $i += $count;
-                                       continue;
-                               }
-                               $name = strval( $rule['names'][$matchingCount] );
-                               $isTreeNode = false;
-                               if ( $name === 'LITERAL' ) {
-                                       // No element, just literal text
-                                       $resultAccum = $piece->breakSyntax( $matchingCount );
-                                       $resultAccum->addLiteral( str_repeat( $rule['end'], $matchingCount ) );
-                               } else {
-                                       # Create XML element
-                                       # Note: $parts is already XML, does not need to be encoded further
-                                       $isTreeNode = true;
-                                       $parts = $piece->parts;
-                                       $titleAccum = PPDAccum_HipHop::cast( $parts[0]->out );
-                                       unset( $parts[0] );
-
-                                       $tree = new PPNode_HipHop_Tree( $name );
-
-                                       # The invocation is at the start of the line if lineStart is set in
-                                       # the stack, and all opening brackets are used up.
-                                       if ( $maxCount == $matchingCount && !empty( $piece->lineStart ) ) {
-                                               $tree->addChild( new PPNode_HipHop_Attr( 'lineStart', 1 ) );
-                                       }
-                                       $titleNode = new PPNode_HipHop_Tree( 'title' );
-                                       $titleNode->firstChild = $titleAccum->firstNode;
-                                       $titleNode->lastChild = $titleAccum->lastNode;
-                                       $tree->addChild( $titleNode );
-                                       $argIndex = 1;
-                                       foreach ( $parts as $variantPart ) {
-                                               $part = PPDPart_HipHop::cast( $variantPart );
-                                               if ( isset( $part->eqpos ) ) {
-                                                       // Find equals
-                                                       $lastNode = false;
-                                                       for ( $node = $part->out->firstNode; $node; $node = $node->nextSibling ) {
-                                                               if ( $node === $part->eqpos ) {
-                                                                       break;
-                                                               }
-                                                               $lastNode = $node;
-                                                       }
-                                                       if ( !$node ) {
-                                                               throw new MWException( __METHOD__. ': eqpos not found' );
-                                                       }
-                                                       if ( $node->name !== 'equals' ) {
-                                                               throw new MWException( __METHOD__ .': eqpos is not equals' );
-                                                       }
-                                                       $equalsNode = $node;
-
-                                                       // Construct name node
-                                                       $nameNode = new PPNode_HipHop_Tree( 'name' );
-                                                       if ( $lastNode !== false ) {
-                                                               $lastNode->nextSibling = false;
-                                                               $nameNode->firstChild = $part->out->firstNode;
-                                                               $nameNode->lastChild = $lastNode;
-                                                       }
-
-                                                       // Construct value node
-                                                       $valueNode = new PPNode_HipHop_Tree( 'value' );
-                                                       if ( $equalsNode->nextSibling !== false ) {
-                                                               $valueNode->firstChild = $equalsNode->nextSibling;
-                                                               $valueNode->lastChild = $part->out->lastNode;
-                                                       }
-                                                       $partNode = new PPNode_HipHop_Tree( 'part' );
-                                                       $partNode->addChild( $nameNode );
-                                                       $partNode->addChild( $equalsNode->firstChild );
-                                                       $partNode->addChild( $valueNode );
-                                                       $tree->addChild( $partNode );
-                                               } else {
-                                                       $partNode = new PPNode_HipHop_Tree( 'part' );
-                                                       $nameNode = new PPNode_HipHop_Tree( 'name' );
-                                                       $nameNode->addChild( new PPNode_HipHop_Attr( 'index', $argIndex++ ) );
-                                                       $valueNode = new PPNode_HipHop_Tree( 'value' );
-                                                       $valueNode->firstChild = $part->out->firstNode;
-                                                       $valueNode->lastChild = $part->out->lastNode;
-                                                       $partNode->addChild( $nameNode );
-                                                       $partNode->addChild( $valueNode );
-                                                       $tree->addChild( $partNode );
-                                               }
-                                       }
-                               }
-
-                               # Advance input pointer
-                               $i += $matchingCount;
-
-                               # Unwind the stack
-                               $stack->pop();
-                               $accum = $stack->getAccum();
-
-                               # Re-add the old stack element if it still has unmatched opening characters remaining
-                               if ($matchingCount < $piece->count) {
-                                       $piece->parts = array( new PPDPart_HipHop );
-                                       $piece->count -= $matchingCount;
-                                       # do we still qualify for any callback with remaining count?
-                                       $names = $rules[$piece->open]['names'];
-                                       $skippedBraces = 0;
-                                       $enclosingAccum = $accum;
-                                       while ( $piece->count ) {
-                                               if ( array_key_exists( $piece->count, $names ) ) {
-                                                       $stack->push( $piece );
-                                                       $accum = $stack->getAccum();
-                                                       break;
-                                               }
-                                               --$piece->count;
-                                               $skippedBraces ++;
-                                       }
-                                       $enclosingAccum->addLiteral( str_repeat( $piece->open, $skippedBraces ) );
-                               }
-
-                               $stackFlags = $stack->getFlags();
-
-                               # Add XML element to the enclosing accumulator
-                               if ( $isTreeNode ) {
-                                       $accum->addNode( $tree );
-                               } else {
-                                       $accum->addAccum( $resultAccum );
-                               }
-                       } elseif ( $found === 'pipe' ) {
-                               $stackFlags['findEquals'] = true; // shortcut for getFlags()
-                               $stack->addPart();
-                               $accum = $stack->getAccum();
-                               ++$i;
-                       } elseif ( $found === 'equals' ) {
-                               $stackFlags['findEquals'] = false; // shortcut for getFlags()
-                               $accum->addNodeWithText( 'equals', '=' );
-                               $stack->getCurrentPart()->eqpos = $accum->lastNode;
-                               ++$i;
-                       }
-               }
-
-               # Output any remaining unclosed brackets
-               foreach ( $stack->stack as $variantPiece ) {
-                       $piece = PPDStackElement_HipHop::cast( $variantPiece );
-                       $stack->rootAccum->addAccum( $piece->breakSyntax() );
-               }
-
-               # Enable top-level headings
-               for ( $node = $stack->rootAccum->firstNode; $node; $node = $node->nextSibling ) {
-                       if ( isset( $node->name ) && $node->name === 'possible-h' ) {
-                               $node->name = 'h';
-                       }
-               }
-
-               $rootNode = new PPNode_HipHop_Tree( 'root' );
-               $rootNode->firstChild = $stack->rootAccum->firstNode;
-               $rootNode->lastChild = $stack->rootAccum->lastNode;
-
-               // Cache
-               if ($cacheable) {
-                       $cacheValue = sprintf( "%08d", self::CACHE_VERSION ) . serialize( $rootNode );
-                       $wgMemc->set( $cacheKey, $cacheValue, 86400 );
-                       wfProfileOut( __METHOD__.'-cache-miss' );
-                       wfProfileOut( __METHOD__.'-cacheable' );
-                       wfDebugLog( "Preprocessor", "Saved preprocessor Hash to memcached (key $cacheKey)" );
-               }
-
-               wfProfileOut( __METHOD__ );
-               return $rootNode;
-       }
-}
-
-
-
-/**
- * Stack class to help Preprocessor::preprocessToObj()
- * @ingroup Parser
- */
-class PPDStack_HipHop {
-       var $stack, $rootAccum;
-
-       /**
-        * @var PPDStack
-        */
-       var $top;
-       var $out;
-
-       static $false = false;
-
-       function __construct() {
-               $this->stack = array();
-               $this->top = false;
-               $this->rootAccum = new PPDAccum_HipHop;
-               $this->accum = $this->rootAccum;
-       }
-
-       /**
-        * @return int
-        */
-       function count() {
-               return count( $this->stack );
-       }
-
-       function getAccum() {
-               return PPDAccum_HipHop::cast( $this->accum );
-       }
-
-       function getCurrentPart() {
-               return $this->getTop()->getCurrentPart();
-       }
-
-       function getTop() {
-               return PPDStackElement_HipHop::cast( $this->top );
-       }
-
-       function push( $data ) {
-               if ( $data instanceof PPDStackElement_HipHop ) {
-                       $this->stack[] = $data;
-               } else {
-                       $this->stack[] = new PPDStackElement_HipHop( $data );
-               }
-               $this->top = $this->stack[ count( $this->stack ) - 1 ];
-               $this->accum = $this->top->getAccum();
-       }
-
-       function pop() {
-               if ( !count( $this->stack ) ) {
-                       throw new MWException( __METHOD__.': no elements remaining' );
-               }
-               $temp = array_pop( $this->stack );
-
-               if ( count( $this->stack ) ) {
-                       $this->top = $this->stack[ count( $this->stack ) - 1 ];
-                       $this->accum = $this->top->getAccum();
-               } else {
-                       $this->top = self::$false;
-                       $this->accum = $this->rootAccum;
-               }
-               return $temp;
-       }
-
-       function addPart( $s = '' ) {
-               $this->top->addPart( $s );
-               $this->accum = $this->top->getAccum();
-       }
-
-       /**
-        * @return array
-        */
-       function getFlags() {
-               if ( !count( $this->stack ) ) {
-                       return array(
-                               'findEquals' => false,
-                               'findPipe' => false,
-                               'inHeading' => false,
-                       );
-               } else {
-                       return $this->top->getFlags();
-               }
-       }
-}
-
-/**
- * @ingroup Parser
- */
-class PPDStackElement_HipHop {
-       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.
-
-       /**
-        * @param $obj PPDStackElement_HipHop
-        * @return PPDStackElement_HipHop
-        */
-       static function cast( PPDStackElement_HipHop $obj ) {
-               return $obj;
-       }
-
-       /**
-        * @param $data array
-        */
-       function __construct( $data = array() ) {
-               $this->parts = array( new PPDPart_HipHop );
-
-               foreach ( $data as $name => $value ) {
-                       $this->$name = $value;
-               }
-       }
-
-       /**
-        * @return PPDAccum_HipHop
-        */
-       function getAccum() {
-               return PPDAccum_HipHop::cast( $this->parts[count($this->parts) - 1]->out );
-       }
-
-       /**
-        * @param $s string
-        */
-       function addPart( $s = '' ) {
-               $this->parts[] = new PPDPart_HipHop( $s );
-       }
-
-       /**
-        * @return PPDPart_HipHop
-        */
-       function getCurrentPart() {
-               return PPDPart_HipHop::cast( $this->parts[count($this->parts) - 1] );
-       }
-
-       /**
-        * @return array
-        */
-       function getFlags() {
-               $partCount = count( $this->parts );
-               $findPipe = $this->open !== "\n" && $this->open !== '[';
-               return array(
-                       'findPipe' => $findPipe,
-                       'findEquals' => $findPipe && $partCount > 1 && !isset( $this->parts[$partCount - 1]->eqpos ),
-                       'inHeading' => $this->open === "\n",
-               );
-       }
-
-       /**
-        * Get the accumulator that would result if the close is not found.
-        *
-        * @param $openingCount bool
-        * @return PPDAccum_HipHop
-        */
-       function breakSyntax( $openingCount = false ) {
-               if ( $this->open === "\n" ) {
-                       $accum = PPDAccum_HipHop::cast( $this->parts[0]->out );
-               } else {
-                       if ( $openingCount === false ) {
-                               $openingCount = $this->count;
-                       }
-                       $accum = new PPDAccum_HipHop;
-                       $accum->addLiteral( str_repeat( $this->open, $openingCount ) );
-                       $first = true;
-                       foreach ( $this->parts as $part ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $accum->addLiteral( '|' );
-                               }
-                               $accum->addAccum( $part->out );
-                       }
-               }
-               return $accum;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-class PPDPart_HipHop {
-       var $out; // Output accumulator object
-
-       // Optional member variables:
-       //   eqpos        Position of equals sign in output accumulator
-       //   commentEnd   Past-the-end input pointer for the last comment encountered
-       //   visualEnd    Past-the-end input pointer for the end of the accumulator minus comments
-
-       function __construct( $out = '' ) {
-               $this->out = new PPDAccum_HipHop;
-               if ( $out !== '' ) {
-                       $this->out->addLiteral( $out );
-               }
-       }
-
-       static function cast( PPDPart_HipHop $obj ) {
-               return $obj;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-class PPDAccum_HipHop {
-       var $firstNode, $lastNode;
-
-       function __construct() {
-               $this->firstNode = $this->lastNode = false;
-       }
-
-       static function cast( PPDAccum_HipHop $obj ) {
-               return $obj;
-       }
-
-       /**
-        * Append a string literal
-        */
-       function addLiteral( string $s ) {
-               if ( $this->lastNode === false ) {
-                       $this->firstNode = $this->lastNode = new PPNode_HipHop_Text( $s );
-               } elseif ( $this->lastNode instanceof PPNode_HipHop_Text ) {
-                       $this->lastNode->value .= $s;
-               } else {
-                       $this->lastNode->nextSibling = new PPNode_HipHop_Text( $s );
-                       $this->lastNode = $this->lastNode->nextSibling;
-               }
-       }
-
-       /**
-        * Append a PPNode
-        */
-       function addNode( PPNode $node ) {
-               if ( $this->lastNode === false ) {
-                       $this->firstNode = $this->lastNode = $node;
-               } else {
-                       $this->lastNode->nextSibling = $node;
-                       $this->lastNode = $node;
-               }
-       }
-
-       /**
-        * Append a tree node with text contents
-        */
-       function addNodeWithText( string $name, string $value ) {
-               $node = PPNode_HipHop_Tree::newWithText( $name, $value );
-               $this->addNode( $node );
-       }
-
-       /**
-        * Append a PPDAccum_HipHop
-        * Takes over ownership of the nodes in the source argument. These nodes may
-        * subsequently be modified, especially nextSibling.
-        */
-       function addAccum( PPDAccum_HipHop $accum ) {
-               if ( $accum->lastNode === false ) {
-                       // nothing to add
-               } elseif ( $this->lastNode === false ) {
-                       $this->firstNode = $accum->firstNode;
-                       $this->lastNode = $accum->lastNode;
-               } else {
-                       $this->lastNode->nextSibling = $accum->firstNode;
-                       $this->lastNode = $accum->lastNode;
-               }
-       }
-}
-
-/**
- * An expansion frame, used as a context to expand the result of preprocessToObj()
- * @ingroup Parser
- */
-class PPFrame_HipHop implements PPFrame {
-
-       /**
-        * @var Parser
-        */
-       var $parser;
-
-       /**
-        * @var Preprocessor
-        */
-       var $preprocessor;
-
-       /**
-        * @var Title
-        */
-       var $title;
-       var $titleCache;
-
-       /**
-        * Hashtable listing templates which are disallowed for expansion in this frame,
-        * having been encountered previously in parent frames.
-        */
-       var $loopCheckHash;
-
-       /**
-        * Recursion depth of this frame, top = 0
-        * Note that this is NOT the same as expansion depth in expand()
-        */
-       var $depth;
-
-       /**
-        * Construct a new preprocessor frame.
-        * @param $preprocessor Preprocessor: the parent preprocessor
-        */
-       function __construct( $preprocessor ) {
-               $this->preprocessor = $preprocessor;
-               $this->parser = $preprocessor->parser;
-               $this->title = $this->parser->mTitle;
-               $this->titleCache = array( $this->title ? $this->title->getPrefixedDBkey() : false );
-               $this->loopCheckHash = array();
-               $this->depth = 0;
-       }
-
-       /**
-        * Create a new child frame
-        * $args is optionally a multi-root PPNode or array containing the template arguments
-        *
-        * @param $args PPNode_HipHop_Array|array|bool
-        * @param $title Title|bool
-        * @param $indexOffset A number subtracted from the index attributes of the arguments
-        *
-        * @throws MWException
-        * @return PPTemplateFrame_HipHop
-        */
-       function newChild( $args = false, $title = false, $indexOffset = 0 ) {
-               $namedArgs = array();
-               $numberedArgs = array();
-               if ( $title === false ) {
-                       $title = $this->title;
-               }
-               if ( $args !== false ) {
-                       if ( $args instanceof PPNode_HipHop_Array ) {
-                               $args = $args->value;
-                       } elseif ( !is_array( $args ) ) {
-                               throw new MWException( __METHOD__ . ': $args must be array or PPNode_HipHop_Array' );
-                       }
-                       foreach ( $args as $arg ) {
-                               $bits = $arg->splitArg();
-                               if ( $bits['index'] !== '' ) {
-                                       // Numbered parameter
-                                       $numberedArgs[$bits['index']] = $bits['value'];
-                                       unset( $namedArgs[$bits['index']] );
-                               } else {
-                                       // Named parameter
-                                       $name = trim( $this->expand( $bits['name'], PPFrame::STRIP_COMMENTS ) );
-                                       $namedArgs[$name] = $bits['value'];
-                                       unset( $numberedArgs[$name] );
-                               }
-                       }
-               }
-               return new PPTemplateFrame_HipHop( $this->preprocessor, $this, $numberedArgs, $namedArgs, $title );
-       }
-
-       /**
-        * @throws MWException
-        * @param $root
-        * @param $flags int
-        * @return string
-        */
-       function expand( $root, $flags = 0 ) {
-               static $expansionDepth = 0;
-               if ( is_string( $root ) ) {
-                       return $root;
-               }
-
-               if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
-                       $this->parser->limitationWarn( 'node-count-exceeded',
-                                       $this->parser->mPPNodeCount,
-                                       $this->parser->mOptions->getMaxPPNodeCount()
-                       );
-                       return '<span class="error">Node-count limit exceeded</span>';
-               }
-               if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
-                       $this->parser->limitationWarn( 'expansion-depth-exceeded',
-                                       $expansionDepth,
-                                       $this->parser->mOptions->getMaxPPExpandDepth()
-                       );
-                       return '<span class="error">Expansion depth limit exceeded</span>';
-               }
-               ++$expansionDepth;
-               if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
-                       $this->parser->mHighestExpansionDepth = $expansionDepth;
-               }
-
-               $outStack = array( '', '' );
-               $iteratorStack = array( false, $root );
-               $indexStack = array( 0, 0 );
-
-               while ( count( $iteratorStack ) > 1 ) {
-                       $level = count( $outStack ) - 1;
-                       $iteratorNode =& $iteratorStack[ $level ];
-                       $out =& $outStack[$level];
-                       $index =& $indexStack[$level];
-
-                       if ( is_array( $iteratorNode ) ) {
-                               if ( $index >= count( $iteratorNode ) ) {
-                                       // All done with this iterator
-                                       $iteratorStack[$level] = false;
-                                       $contextNode = false;
-                               } else {
-                                       $contextNode = $iteratorNode[$index];
-                                       $index++;
-                               }
-                       } elseif ( $iteratorNode instanceof PPNode_HipHop_Array ) {
-                               if ( $index >= $iteratorNode->getLength() ) {
-                                       // All done with this iterator
-                                       $iteratorStack[$level] = false;
-                                       $contextNode = false;
-                               } else {
-                                       $contextNode = $iteratorNode->item( $index );
-                                       $index++;
-                               }
-                       } else {
-                               // Copy to $contextNode and then delete from iterator stack,
-                               // because this is not an iterator but we do have to execute it once
-                               $contextNode = $iteratorStack[$level];
-                               $iteratorStack[$level] = false;
-                       }
-
-                       $newIterator = false;
-
-                       if ( $contextNode === false ) {
-                               // nothing to do
-                       } elseif ( is_string( $contextNode ) ) {
-                               $out .= $contextNode;
-                       } elseif ( is_array( $contextNode ) || $contextNode instanceof PPNode_HipHop_Array ) {
-                               $newIterator = $contextNode;
-                       } elseif ( $contextNode instanceof PPNode_HipHop_Attr ) {
-                               // No output
-                       } elseif ( $contextNode instanceof PPNode_HipHop_Text ) {
-                               $out .= $contextNode->value;
-                       } elseif ( $contextNode instanceof PPNode_HipHop_Tree ) {
-                               if ( $contextNode->name === 'template' ) {
-                                       # Double-brace expansion
-                                       $bits = $contextNode->splitTemplate();
-                                       if ( $flags & PPFrame::NO_TEMPLATES ) {
-                                               $newIterator = $this->virtualBracketedImplode( '{{', '|', '}}', $bits['title'], $bits['parts'] );
-                                       } else {
-                                               $ret = $this->parser->braceSubstitution( $bits, $this );
-                                               if ( isset( $ret['object'] ) ) {
-                                                       $newIterator = $ret['object'];
-                                               } else {
-                                                       $out .= $ret['text'];
-                                               }
-                                       }
-                               } elseif ( $contextNode->name === 'tplarg' ) {
-                                       # Triple-brace expansion
-                                       $bits = $contextNode->splitTemplate();
-                                       if ( $flags & PPFrame::NO_ARGS ) {
-                                               $newIterator = $this->virtualBracketedImplode( '{{{', '|', '}}}', $bits['title'], $bits['parts'] );
-                                       } else {
-                                               $ret = $this->parser->argSubstitution( $bits, $this );
-                                               if ( isset( $ret['object'] ) ) {
-                                                       $newIterator = $ret['object'];
-                                               } else {
-                                                       $out .= $ret['text'];
-                                               }
-                                       }
-                               } elseif ( $contextNode->name === 'comment' ) {
-                                       # HTML-style comment
-                                       # Remove it in HTML, pre+remove and STRIP_COMMENTS modes
-                                       if ( $this->parser->ot['html']
-                                               || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() )
-                                               || ( $flags & PPFrame::STRIP_COMMENTS ) )
-                                       {
-                                               $out .= '';
-                                       }
-                                       # 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
-                                       elseif ( $this->parser->ot['wiki'] && ! ( $flags & PPFrame::RECOVER_COMMENTS ) ) {
-                                               $out .= $this->parser->insertStripItem( $contextNode->firstChild->value );
-                                       }
-                                       # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
-                                       else {
-                                               $out .= $contextNode->firstChild->value;
-                                       }
-                               } elseif ( $contextNode->name === 'ignore' ) {
-                                       # Output suppression used by <includeonly> etc.
-                                       # 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 ) ) {
-                                               $out .= $contextNode->firstChild->value;
-                                       } else {
-                                               //$out .= '';
-                                       }
-                               } elseif ( $contextNode->name === 'ext' ) {
-                                       # Extension tag
-                                       $bits = $contextNode->splitExt() + array( 'attr' => null, 'inner' => null, 'close' => null );
-                                       $out .= $this->parser->extensionSubstitution( $bits, $this );
-                               } elseif ( $contextNode->name === 'h' ) {
-                                       # Heading
-                                       if ( $this->parser->ot['html'] ) {
-                                               # Expand immediately and insert heading index marker
-                                               $s = '';
-                                               for ( $node = $contextNode->firstChild; $node; $node = $node->nextSibling ) {
-                                                       $s .= $this->expand( $node, $flags );
-                                               }
-
-                                               $bits = $contextNode->splitHeading();
-                                               $titleText = $this->title->getPrefixedDBkey();
-                                               $this->parser->mHeadings[] = array( $titleText, $bits['i'] );
-                                               $serial = count( $this->parser->mHeadings ) - 1;
-                                               $marker = "{$this->parser->mUniqPrefix}-h-$serial-" . Parser::MARKER_SUFFIX;
-                                               $s = substr( $s, 0, $bits['level'] ) . $marker . substr( $s, $bits['level'] );
-                                               $this->parser->mStripState->addGeneral( $marker, '' );
-                                               $out .= $s;
-                                       } else {
-                                               # Expand in virtual stack
-                                               $newIterator = $contextNode->getChildren();
-                                       }
-                               } else {
-                                       # Generic recursive expansion
-                                       $newIterator = $contextNode->getChildren();
-                               }
-                       } else {
-                               throw new MWException( __METHOD__.': Invalid parameter type' );
-                       }
-
-                       if ( $newIterator !== false ) {
-                               $outStack[] = '';
-                               $iteratorStack[] = $newIterator;
-                               $indexStack[] = 0;
-                       } elseif ( $iteratorStack[$level] === false ) {
-                               // Return accumulated value to parent
-                               // With tail recursion
-                               while ( $iteratorStack[$level] === false && $level > 0 ) {
-                                       $outStack[$level - 1] .= $out;
-                                       array_pop( $outStack );
-                                       array_pop( $iteratorStack );
-                                       array_pop( $indexStack );
-                                       $level--;
-                               }
-                       }
-               }
-               --$expansionDepth;
-               return $outStack[0];
-       }
-
-       /**
-        * @param $sep
-        * @param $flags
-        * @return string
-        */
-       function implodeWithFlags( $sep, $flags /*, ... */ ) {
-               $args = array_slice( func_get_args(), 2 );
-
-               $first = true;
-               $s = '';
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_HipHop_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = array( $root );
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= $sep;
-                               }
-                               $s .= $this->expand( $node, $flags );
-                       }
-               }
-               return $s;
-       }
-
-       /**
-        * Implode with no flags specified
-        * This previously called implodeWithFlags but has now been inlined to reduce stack depth
-        * @param $sep
-        * @return string
-        */
-       function implode( $sep /*, ... */ ) {
-               $args = array_slice( func_get_args(), 1 );
-
-               $first = true;
-               $s = '';
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_HipHop_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = array( $root );
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= $sep;
-                               }
-                               $s .= $this->expand( $node );
-                       }
-               }
-               return $s;
-       }
-
-       /**
-        * Makes an object that, when expand()ed, will be the same as one obtained
-        * with implode()
-        *
-        * @param $sep
-        * @return PPNode_HipHop_Array
-        */
-       function virtualImplode( $sep /*, ... */ ) {
-               $args = array_slice( func_get_args(), 1 );
-               $out = array();
-               $first = true;
-
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_HipHop_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = array( $root );
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $out[] = $sep;
-                               }
-                               $out[] = $node;
-                       }
-               }
-               return new PPNode_HipHop_Array( $out );
-       }
-
-       /**
-        * Virtual implode with brackets
-        *
-        * @param $start
-        * @param $sep
-        * @param $end
-        * @return PPNode_HipHop_Array
-        */
-       function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {
-               $args = array_slice( func_get_args(), 3 );
-               $out = array( $start );
-               $first = true;
-
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_HipHop_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = array( $root );
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $out[] = $sep;
-                               }
-                               $out[] = $node;
-                       }
-               }
-               $out[] = $end;
-               return new PPNode_HipHop_Array( $out );
-       }
-
-       function __toString() {
-               return 'frame{}';
-       }
-
-       /**
-        * @param $level bool
-        * @return array|bool|String
-        */
-       function getPDBK( $level = false ) {
-               if ( $level === false ) {
-                       return $this->title->getPrefixedDBkey();
-               } else {
-                       return isset( $this->titleCache[$level] ) ? $this->titleCache[$level] : false;
-               }
-       }
-
-       /**
-        * @return array
-        */
-       function getArguments() {
-               return array();
-       }
-
-       /**
-        * @return array
-        */
-       function getNumberedArguments() {
-               return array();
-       }
-
-       /**
-        * @return array
-        */
-       function getNamedArguments() {
-               return array();
-       }
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       function isEmpty() {
-               return true;
-       }
-
-       /**
-        * @param $name
-        * @return bool
-        */
-       function getArgument( $name ) {
-               return false;
-       }
-
-       /**
-        * Returns true if the infinite loop check is OK, false if a loop is detected
-        *
-        * @param $title Title
-        *
-        * @return bool
-        */
-       function loopCheck( $title ) {
-               return !isset( $this->loopCheckHash[$title->getPrefixedDBkey()] );
-       }
-
-       /**
-        * Return true if the frame is a template frame
-        *
-        * @return bool
-        */
-       function isTemplate() {
-               return false;
-       }
-
-       /**
-        * Get a title of frame
-        *
-        * @return Title
-        */
-       function getTitle() {
-               return $this->title;
-       }
-}
-
-/**
- * Expansion frame with template arguments
- * @ingroup Parser
- */
-class PPTemplateFrame_HipHop extends PPFrame_HipHop {
-       var $numberedArgs, $namedArgs, $parent;
-       var $numberedExpansionCache, $namedExpansionCache;
-
-       /**
-        * @param $preprocessor Preprocessor_HipHop
-        * @param $parent bool
-        * @param $numberedArgs array
-        * @param $namedArgs array
-        * @param $title Title|bool
-        */
-       function __construct( $preprocessor, $parent = false, $numberedArgs = array(), $namedArgs = array(), $title = false ) {
-               parent::__construct( $preprocessor );
-
-               $this->parent = $parent;
-               $this->numberedArgs = $numberedArgs;
-               $this->namedArgs = $namedArgs;
-               $this->title = $title;
-               $pdbk = $title ? $title->getPrefixedDBkey() : false;
-               $this->titleCache = $parent->titleCache;
-               $this->titleCache[] = $pdbk;
-               $this->loopCheckHash = /*clone*/ $parent->loopCheckHash;
-               if ( $pdbk !== false ) {
-                       $this->loopCheckHash[$pdbk] = true;
-               }
-               $this->depth = $parent->depth + 1;
-               $this->numberedExpansionCache = $this->namedExpansionCache = array();
-       }
-
-       function __toString() {
-               $s = 'tplframe{';
-               $first = true;
-               $args = $this->numberedArgs + $this->namedArgs;
-               foreach ( $args as $name => $value ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= "\"$name\":\"" .
-                               str_replace( '"', '\\"', $value->__toString() ) . '"';
-               }
-               $s .= '}';
-               return $s;
-       }
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       function isEmpty() {
-               return !count( $this->numberedArgs ) && !count( $this->namedArgs );
-       }
-
-       /**
-        * @return array
-        */
-       function getArguments() {
-               $arguments = array();
-               foreach ( array_merge(
-                               array_keys($this->numberedArgs),
-                               array_keys($this->namedArgs)) as $key ) {
-                       $arguments[$key] = $this->getArgument($key);
-               }
-               return $arguments;
-       }
-
-       /**
-        * @return array
-        */
-       function getNumberedArguments() {
-               $arguments = array();
-               foreach ( array_keys($this->numberedArgs) as $key ) {
-                       $arguments[$key] = $this->getArgument($key);
-               }
-               return $arguments;
-       }
-
-       /**
-        * @return array
-        */
-       function getNamedArguments() {
-               $arguments = array();
-               foreach ( array_keys($this->namedArgs) as $key ) {
-                       $arguments[$key] = $this->getArgument($key);
-               }
-               return $arguments;
-       }
-
-       /**
-        * @param $index
-        * @return array|bool
-        */
-       function getNumberedArgument( $index ) {
-               if ( !isset( $this->numberedArgs[$index] ) ) {
-                       return false;
-               }
-               if ( !isset( $this->numberedExpansionCache[$index] ) ) {
-                       # No trimming for unnamed arguments
-                       $this->numberedExpansionCache[$index] = $this->parent->expand( $this->numberedArgs[$index], PPFrame::STRIP_COMMENTS );
-               }
-               return $this->numberedExpansionCache[$index];
-       }
-
-       /**
-        * @param $name
-        * @return bool
-        */
-       function getNamedArgument( $name ) {
-               if ( !isset( $this->namedArgs[$name] ) ) {
-                       return false;
-               }
-               if ( !isset( $this->namedExpansionCache[$name] ) ) {
-                       # Trim named arguments post-expand, for backwards compatibility
-                       $this->namedExpansionCache[$name] = trim(
-                               $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) );
-               }
-               return $this->namedExpansionCache[$name];
-       }
-
-       /**
-        * @param $name
-        * @return array|bool
-        */
-       function getArgument( $name ) {
-               $text = $this->getNumberedArgument( $name );
-               if ( $text === false ) {
-                       $text = $this->getNamedArgument( $name );
-               }
-               return $text;
-       }
-
-       /**
-        * Return true if the frame is a template frame
-        *
-        * @return bool
-        */
-       function isTemplate() {
-               return true;
-       }
-}
-
-/**
- * Expansion frame with custom arguments
- * @ingroup Parser
- */
-class PPCustomFrame_HipHop extends PPFrame_HipHop {
-       var $args;
-
-       function __construct( $preprocessor, $args ) {
-               parent::__construct( $preprocessor );
-               $this->args = $args;
-       }
-
-       function __toString() {
-               $s = 'cstmframe{';
-               $first = true;
-               foreach ( $this->args as $name => $value ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= "\"$name\":\"" .
-                               str_replace( '"', '\\"', $value->__toString() ) . '"';
-               }
-               $s .= '}';
-               return $s;
-       }
-
-       /**
-        * @return bool
-        */
-       function isEmpty() {
-               return !count( $this->args );
-       }
-
-       /**
-        * @param $index
-        * @return bool
-        */
-       function getArgument( $index ) {
-               if ( !isset( $this->args[$index] ) ) {
-                       return false;
-               }
-               return $this->args[$index];
-       }
-}
-
-/**
- * @ingroup Parser
- */
-class PPNode_HipHop_Tree implements PPNode {
-       var $name, $firstChild, $lastChild, $nextSibling;
-
-       function __construct( $name ) {
-               $this->name = $name;
-               $this->firstChild = $this->lastChild = $this->nextSibling = false;
-       }
-
-       function __toString() {
-               $inner = '';
-               $attribs = '';
-               for ( $node = $this->firstChild; $node; $node = $node->nextSibling ) {
-                       if ( $node instanceof PPNode_HipHop_Attr ) {
-                               $attribs .= ' ' . $node->name . '="' . htmlspecialchars( $node->value ) . '"';
-                       } else {
-                               $inner .= $node->__toString();
-                       }
-               }
-               if ( $inner === '' ) {
-                       return "<{$this->name}$attribs/>";
-               } else {
-                       return "<{$this->name}$attribs>$inner</{$this->name}>";
-               }
-       }
-
-       /**
-        * @param $name
-        * @param $text
-        * @return PPNode_HipHop_Tree
-        */
-       static function newWithText( $name, $text ) {
-               $obj = new self( $name );
-               $obj->addChild( new PPNode_HipHop_Text( $text ) );
-               return $obj;
-       }
-
-       function addChild( $node ) {
-               if ( $this->lastChild === false ) {
-                       $this->firstChild = $this->lastChild = $node;
-               } else {
-                       $this->lastChild->nextSibling = $node;
-                       $this->lastChild = $node;
-               }
-       }
-
-       /**
-        * @return PPNode_HipHop_Array
-        */
-       function getChildren() {
-               $children = array();
-               for ( $child = $this->firstChild; $child; $child = $child->nextSibling ) {
-                       $children[] = $child;
-               }
-               return new PPNode_HipHop_Array( $children );
-       }
-
-       function getFirstChild() {
-               return $this->firstChild;
-       }
-
-       function getNextSibling() {
-               return $this->nextSibling;
-       }
-
-       /**
-        * @param $name string
-        * @return array
-        */
-       function getChildrenOfType( $name ) {
-               $children = array();
-               for ( $child = $this->firstChild; $child; $child = $child->nextSibling ) {
-                       if ( isset( $child->name ) && $child->name === $name ) {
-                               $children[] = $child;
-                       }
-               }
-               return $children;
-       }
-
-       /**
-        * @return bool
-        */
-       function getLength() {
-               return false;
-       }
-
-       /**
-        * @param  $i
-        * @return bool
-        */
-       function item( $i ) {
-               return false;
-       }
-
-       /**
-        * @return string
-        */
-       function getName() {
-               return $this->name;
-       }
-
-       /**
-        * Split a <part> node into an associative array containing:
-        *    name          PPNode name
-        *    index         String index
-        *    value         PPNode value
-        *
-        * @throws MWException
-        * @return array
-        */
-       function splitArg() {
-               $bits = array();
-               for ( $child = $this->firstChild; $child; $child = $child->nextSibling ) {
-                       if ( !isset( $child->name ) ) {
-                               continue;
-                       }
-                       if ( $child->name === 'name' ) {
-                               $bits['name'] = $child;
-                               if ( $child->firstChild instanceof PPNode_HipHop_Attr
-                                       && $child->firstChild->name === 'index' )
-                               {
-                                       $bits['index'] = $child->firstChild->value;
-                               }
-                       } elseif ( $child->name === 'value' ) {
-                               $bits['value'] = $child;
-                       }
-               }
-
-               if ( !isset( $bits['name'] ) ) {
-                       throw new MWException( 'Invalid brace node passed to ' . __METHOD__ );
-               }
-               if ( !isset( $bits['index'] ) ) {
-                       $bits['index'] = '';
-               }
-               return $bits;
-       }
-
-       /**
-        * Split an <ext> node into an associative array containing name, attr, inner and close
-        * All values in the resulting array are PPNodes. Inner and close are optional.
-        *
-        * @throws MWException
-        * @return array
-        */
-       function splitExt() {
-               $bits = array();
-               for ( $child = $this->firstChild; $child; $child = $child->nextSibling ) {
-                       if ( !isset( $child->name ) ) {
-                               continue;
-                       }
-                       if ( $child->name === 'name' ) {
-                               $bits['name'] = $child;
-                       } elseif ( $child->name === 'attr' ) {
-                               $bits['attr'] = $child;
-                       } elseif ( $child->name === 'inner' ) {
-                               $bits['inner'] = $child;
-                       } elseif ( $child->name === 'close' ) {
-                               $bits['close'] = $child;
-                       }
-               }
-               if ( !isset( $bits['name'] ) ) {
-                       throw new MWException( 'Invalid ext node passed to ' . __METHOD__ );
-               }
-               return $bits;
-       }
-
-       /**
-        * Split an <h> node
-        *
-        * @throws MWException
-        * @return array
-        */
-       function splitHeading() {
-               if ( $this->name !== 'h' ) {
-                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
-               }
-               $bits = array();
-               for ( $child = $this->firstChild; $child; $child = $child->nextSibling ) {
-                       if ( !isset( $child->name ) ) {
-                               continue;
-                       }
-                       if ( $child->name === 'i' ) {
-                               $bits['i'] = $child->value;
-                       } elseif ( $child->name === 'level' ) {
-                               $bits['level'] = $child->value;
-                       }
-               }
-               if ( !isset( $bits['i'] ) ) {
-                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
-               }
-               return $bits;
-       }
-
-       /**
-        * Split a <template> or <tplarg> node
-        *
-        * @throws MWException
-        * @return array
-        */
-       function splitTemplate() {
-               $parts = array();
-               $bits = array( 'lineStart' => '' );
-               for ( $child = $this->firstChild; $child; $child = $child->nextSibling ) {
-                       if ( !isset( $child->name ) ) {
-                               continue;
-                       }
-                       if ( $child->name === 'title' ) {
-                               $bits['title'] = $child;
-                       }
-                       if ( $child->name === 'part' ) {
-                               $parts[] = $child;
-                       }
-                       if ( $child->name === 'lineStart' ) {
-                               $bits['lineStart'] = '1';
-                       }
-               }
-               if ( !isset( $bits['title'] ) ) {
-                       throw new MWException( 'Invalid node passed to ' . __METHOD__ );
-               }
-               $bits['parts'] = new PPNode_HipHop_Array( $parts );
-               return $bits;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-class PPNode_HipHop_Text implements PPNode {
-       var $value, $nextSibling;
-
-       function __construct( $value ) {
-               if ( is_object( $value ) ) {
-                       throw new MWException( __CLASS__ . ' given object instead of string' );
-               }
-               $this->value = $value;
-       }
-
-       function __toString() {
-               return htmlspecialchars( $this->value );
-       }
-
-       function getNextSibling() {
-               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' ); }
-}
-
-/**
- * @ingroup Parser
- */
-class PPNode_HipHop_Array implements PPNode {
-       var $value, $nextSibling;
-
-       function __construct( $value ) {
-               $this->value = $value;
-       }
-
-       function __toString() {
-               return var_export( $this, true );
-       }
-
-       function getLength() {
-               return count( $this->value );
-       }
-
-       function item( $i ) {
-               return $this->value[$i];
-       }
-
-       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' ); }
-}
-
-/**
- * @ingroup Parser
- */
-class PPNode_HipHop_Attr implements PPNode {
-       var $name, $value, $nextSibling;
-
-       function __construct( $name, $value ) {
-               $this->name = $name;
-               $this->value = $value;
-       }
-
-       function __toString() {
-               return "<@{$this->name}>" . htmlspecialchars( $this->value ) . "</@{$this->name}>";
-       }
-
-       function getName() {
-               return $this->name;
-       }
-
-       function getNextSibling() {
-               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' ); }
-}
index dd7e965..4994d3e 100644 (file)
@@ -68,9 +68,9 @@ class MWTidyWrapper {
                $wrappedtext = preg_replace( '!<(link|meta)([^>]*?)(/{0,1}>)!', '<html-$1$2$3', $wrappedtext );
 
                // Wrap the whole thing in a doctype and body for Tidy.
-               $wrappedtext = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'.
-                       ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>'.
-                       '<head><title>test</title></head><body>'.$wrappedtext.'</body></html>';
+               $wrappedtext = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"' .
+                       ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>' .
+                       '<head><title>test</title></head><body>' . $wrappedtext . '</body></html>';
 
                return $wrappedtext;
        }
index b30b031..1ead836 100644 (file)
@@ -178,10 +178,10 @@ class Profiler {
                        $this->debug( str_repeat( ' ', count( $this->mWorkStack ) - 1 ) . 'Exiting ' . $functionname . "\n" );
                }
 
-               $bit = array_pop($this->mWorkStack);
+               $bit = array_pop( $this->mWorkStack );
 
-               if (!$bit) {
-                       $this->debug("Profiling error, !\$bit: $functionname\n");
+               if ( !$bit ) {
+                       $this->debug( "Profiling error, !\$bit: $functionname\n" );
                } else {
                        //if( $wgDebugProfiling ) {
                                if( $functionname == 'close' ) {
@@ -293,9 +293,9 @@ class Profiler {
         * @return string
         */
        function getCallTreeLine( $entry ) {
-               list( $fname, $level, $start, /* $x */, $end = $entry;
+               list( $fname, $level, $start, /* $x */, $end ) = $entry;
                $delta = $end - $start;
-               $space = str_repeat(' ', $level);
+               $space = str_repeat( ' ', $level );
                # The ugly double sprintf is to work around a PHP bug,
                # which has been fixed in recent releases.
                return sprintf( "%10s %s %s\n", trim( sprintf( "%7.3f", $delta * 1000.0 ) ), $space, $fname );
@@ -386,7 +386,7 @@ class Profiler {
                $this->mMemory = array();
 
                # Estimate profiling overhead
-               $profileCount = count($this->mStack);
+               $profileCount = count( $this->mStack );
                self::calculateOverhead( $profileCount );
 
                # First, subtract the overhead!
@@ -441,8 +441,8 @@ class Profiler {
                        $this->mCollated[$fname] += $elapsed;
                        $this->mCalls[$fname]++;
                        $this->mMemory[$fname] += $memory;
-                       $this->mMin[$fname] = min($this->mMin[$fname], $elapsed);
-                       $this->mMax[$fname] = max($this->mMax[$fname], $elapsed);
+                       $this->mMin[$fname] = min( $this->mMin[$fname], $elapsed );
+                       $this->mMax[$fname] = max( $this->mMax[$fname], $elapsed );
                        $this->mOverhead[$fname] += $subcalls;
                }
 
@@ -499,10 +499,10 @@ class Profiler {
         * @return Integer
         * @private
         */
-       function calltreeCount($stack, $start) {
+       function calltreeCount( $stack, $start ) {
                $level = $stack[$start][1];
                $count = 0;
-               for ($i = $start -1; $i >= 0 && $stack[$i][1] > $level; $i --) {
+               for ( $i = $start -1; $i >= 0 && $stack[$i][1] > $level; $i-- ) {
                        $count ++;
                }
                return $count;
@@ -557,9 +557,9 @@ class Profiler {
 
                                $rc = $dbw->affectedRows();
                                if ( $rc == 0 ) {
-                                       $dbw->insert('profiling', array ('pf_name' => $name, 'pf_count' => $eventCount,
+                                       $dbw->insert( 'profiling', array ( 'pf_name' => $name, 'pf_count' => $eventCount,
                                                'pf_time' => $timeSum, 'pf_memory' => $memorySum, 'pf_server' => $pfhost ),
-                                               __METHOD__, array ('IGNORE'));
+                                               __METHOD__, array ( 'IGNORE' ) );
                                }
                                // When we upgrade to mysql 4.1, the insert+update
                                // can be merged into just a insert with this construct added:
index d1d1c5d..1322e47 100644 (file)
@@ -29,7 +29,7 @@
 class ProfilerSimple extends Profiler {
        var $mMinimumTime = 0;
 
-       var $zeroEntry = array('cpu'=> 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0);
+       var $zeroEntry = array( 'cpu'=> 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0 );
        var $errorEntry;
 
        public function isPersistent() {
@@ -57,33 +57,33 @@ class ProfilerSimple extends Profiler {
                $this->mMinimumTime = $min;
        }
 
-       function profileIn($functionname) {
+       function profileIn( $functionname ) {
                global $wgDebugFunctionEntry;
-               if ($wgDebugFunctionEntry) {
-                       $this->debug(str_repeat(' ', count($this->mWorkStack)).'Entering '.$functionname."\n");
+               if ( $wgDebugFunctionEntry ) {
+                       $this->debug( str_repeat( ' ', count( $this->mWorkStack ) ) . 'Entering ' . $functionname . "\n" );
                }
                $this->mWorkStack[] = array( $functionname, count( $this->mWorkStack ), $this->getTime(), $this->getTime( 'cpu' ) );
        }
 
-       function profileOut($functionname) {
+       function profileOut( $functionname ) {
                global $wgDebugFunctionEntry;
 
-               if ($wgDebugFunctionEntry) {
-                       $this->debug(str_repeat(' ', count($this->mWorkStack) - 1).'Exiting '.$functionname."\n");
+               if ( $wgDebugFunctionEntry ) {
+                       $this->debug( str_repeat( ' ', count( $this->mWorkStack ) - 1 ) . 'Exiting ' . $functionname . "\n" );
                }
 
-               list($ofname, /* $ocount */ ,$ortime,$octime) = array_pop($this->mWorkStack);
+               list( $ofname, /* $ocount */, $ortime, $octime ) = array_pop( $this->mWorkStack );
 
-               if (!$ofname) {
-                       $this->debug("Profiling error: $functionname\n");
+               if ( !$ofname ) {
+                       $this->debug( "Profiling error: $functionname\n" );
                } else {
-                       if ($functionname == 'close') {
+                       if ( $functionname == 'close' ) {
                                $message = "Profile section ended by close(): {$ofname}";
                                $functionname = $ofname;
                                $this->debug( "$message\n" );
                                $this->mCollated[$message] = $this->errorEntry;
                        }
-                       elseif ($ofname != $functionname) {
+                       elseif ( $ofname != $functionname ) {
                                $message = "Profiling error: in({$ofname}), out($functionname)";
                                $this->debug( "$message\n" );
                                $this->mCollated[$message] = $this->errorEntry;
@@ -91,7 +91,7 @@ class ProfilerSimple extends Profiler {
                        $entry =& $this->mCollated[$functionname];
                        $elapsedcpu = $this->getTime( 'cpu' ) - $octime;
                        $elapsedreal = $this->getTime() - $ortime;
-                       if (!is_array($entry)) {
+                       if ( !is_array( $entry ) ) {
                                $entry = $this->zeroEntry;
                                $this->mCollated[$functionname] =& $entry;
                        }
index e62622f..37350bf 100644 (file)
@@ -48,9 +48,9 @@ class ProfilerSimpleText extends ProfilerSimple {
                        $totalReal = isset( $this->mCollated['-total'] )
                                ? $this->mCollated['-total']['real']
                                : 0; // profiling mismatch error?
-                       uasort( $this->mCollated, array('self','sort') );
-                       array_walk( $this->mCollated, array('self','format'), $totalReal );
-                       if ( php_sapi_name() === 'cli' ) {
+                       uasort( $this->mCollated, array( 'self', 'sort' ) );
+                       array_walk( $this->mCollated, array( 'self', 'format' ), $totalReal );
+                       if ( PHP_SAPI === 'cli' ) {
                                print "<!--\n".self::$out."\n-->\n";
                        } elseif ( $this->getContentType() === 'text/html' ) {
                                if ( $this->visible ) {
index 017e135..d44dfe1 100644 (file)
@@ -32,18 +32,18 @@ class ProfilerSimpleTrace extends ProfilerSimple {
 
        function profileIn( $functionname ) {
                parent::profileIn( $functionname );
-               $this->trace .= "         " . sprintf("%6.1f",$this->memoryDiff()) .
-                               str_repeat( " ", count($this->mWorkStack)) . " > " . $functionname . "\n";
+               $this->trace .= "         " . sprintf( "%6.1f", $this->memoryDiff() ) .
+                               str_repeat( " ", count( $this->mWorkStack ) ) . " > " . $functionname . "\n";
        }
 
-       function profileOut($functionname) {
+       function profileOut( $functionname ) {
                global $wgDebugFunctionEntry;
 
                if ( $wgDebugFunctionEntry ) {
-                       $this->debug(str_repeat(' ', count($this->mWorkStack) - 1).'Exiting '.$functionname."\n");
+                       $this->debug( str_repeat( ' ', count( $this->mWorkStack ) - 1 ) . 'Exiting ' . $functionname . "\n" );
                }
 
-               list( $ofname, /* $ocount */ , $ortime ) = array_pop( $this->mWorkStack );
+               list( $ofname, /* $ocount */, $ortime ) = array_pop( $this->mWorkStack );
 
                if ( !$ofname ) {
                        $this->trace .= "Profiling error: $functionname\n";
@@ -58,7 +58,7 @@ class ProfilerSimpleTrace extends ProfilerSimple {
                        }
                        $elapsedreal = $this->getTime() - $ortime;
                        $this->trace .= sprintf( "%03.6f %6.1f", $elapsedreal, $this->memoryDiff() ) .
-                                       str_repeat(" ", count( $this->mWorkStack ) + 1 ) . " < " . $functionname . "\n";
+                                       str_repeat( " ", count( $this->mWorkStack ) + 1 ) . " < " . $functionname . "\n";
                }
        }
 
@@ -69,7 +69,7 @@ class ProfilerSimpleTrace extends ProfilerSimple {
        }
 
        function logData() {
-               if ( php_sapi_name() === 'cli' ) {
+               if ( PHP_SAPI === 'cli' ) {
                        print "<!-- \n {$this->trace} \n -->";
                } elseif ( $this->getContentType() === 'text/html' ) {
                        print "<!-- \n {$this->trace} \n -->";
index a95ccb0..abefa81 100644 (file)
@@ -50,7 +50,7 @@ class ProfilerSimpleUDP extends ProfilerSimple {
                $plength = 0;
                $packet = "";
                foreach ( $this->mCollated as $entry => $pfdata ) {
-                       if( !isset($pfdata['count'])
+                       if( !isset( $pfdata['count'] )
                                || !isset( $pfdata['cpu'] )
                                || !isset( $pfdata['cpu_sq'] )
                                || !isset( $pfdata['real'] )
index fad0027..9904107 100644 (file)
@@ -441,9 +441,9 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                        return $this->modifiedTime[$context->getHash()] = 1;
                }
 
-               wfProfileIn( __METHOD__.'-filemtime' );
+               wfProfileIn( __METHOD__ . '-filemtime' );
                $filesMtime = max( array_map( array( __CLASS__, 'safeFilemtime' ), $files ) );
-               wfProfileOut( __METHOD__.'-filemtime' );
+               wfProfileOut( __METHOD__ . '-filemtime' );
                $this->modifiedTime[$context->getHash()] = max(
                        $filesMtime,
                        $this->getMsgBlobMtime( $context->getLanguage() ) );
@@ -571,7 +571,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                foreach ( array_unique( $scripts ) as $fileName ) {
                        $localPath = $this->getLocalPath( $fileName );
                        if ( !file_exists( $localPath ) ) {
-                               throw new MWException( __METHOD__.": script file not found: \"$localPath\"" );
+                               throw new MWException( __METHOD__ . ": script file not found: \"$localPath\"" );
                        }
                        $contents = file_get_contents( $localPath );
                        if ( $wgResourceLoaderValidateStaticJS ) {
@@ -628,7 +628,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        protected function readStyleFile( $path, $flip ) {
                $localPath = $this->getLocalPath( $path );
                if ( !file_exists( $localPath ) ) {
-                       $msg = __METHOD__.": style file not found: \"$localPath\"";
+                       $msg = __METHOD__ . ": style file not found: \"$localPath\"";
                        wfDebugLog( 'resourceloader', $msg );
                        throw new MWException( $msg );
                }
index b85da16..4ea9f4e 100644 (file)
@@ -147,7 +147,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
                                continue;
                        }
                        $title = Title::newFromText( $titleText );
-                       if ( !$title || $title->isRedirect()  ) {
+                       if ( !$title || $title->isRedirect() ) {
                                continue;
                        }
                        $media = isset( $options['media'] ) ? $options['media'] : 'all';
index 6ceadff..5340cb9 100644 (file)
@@ -424,7 +424,7 @@ class RevDel_ArchivedRevisionItem extends RevDel_ArchiveItem {
                $dbw->update( 'archive',
                        array( 'ar_deleted' => $bits ),
                        array( 'ar_rev_id' => $this->row->ar_rev_id,
-                                  'ar_deleted' => $this->getBits()
+                               'ar_deleted' => $this->getBits()
                        ),
                        __METHOD__ );
                return (bool)$dbw->affectedRows();
@@ -899,7 +899,7 @@ class RevDel_LogItem extends RevDel_Item {
                $action = $formatter->getActionText();
                // Comment
                $comment = $this->list->getLanguage()->getDirMark() . Linker::commentBlock( $this->row->log_comment );
-               if( LogEventsList::isDeleted($this->row,LogPage::DELETED_COMMENT) ) {
+               if( LogEventsList::isDeleted( $this->row, LogPage::DELETED_COMMENT ) ) {
                        $comment = '<span class="history-deleted">' . $comment . '</span>';
                }
 
index e10b642..5e5755c 100644 (file)
@@ -45,7 +45,7 @@ class SearchEngine {
         */
        protected $db;
 
-       function __construct($db = null) {
+       function __construct( $db = null ) {
                if ( $db ) {
                        $this->db = $db;
                } else {
@@ -1142,8 +1142,8 @@ class SearchHighlighter {
                                // add more lines
                                $add = $index + 1;
                                while ( $len < $targetchars - 20
-                                          && array_key_exists( $add, $all )
-                                          && !array_key_exists( $add, $snippets ) ) {
+                                               && array_key_exists( $add, $all )
+                                               && !array_key_exists( $add, $snippets ) ) {
                                        $offsets[$add] = 0;
                                        $tt = "\n" . $this->extract( $all[$add], 0, $targetchars - $len, $offsets[$add] );
                                        $extended[$add] = $tt;
@@ -1153,7 +1153,7 @@ class SearchHighlighter {
                        }
                }
 
-               // $snippets = array_map('htmlspecialchars', $extended);
+               // $snippets = array_map( 'htmlspecialchars', $extended );
                $snippets = $extended;
                $last = - 1;
                $extract = '';
@@ -1332,12 +1332,12 @@ class SearchHighlighter {
                $fname = __METHOD__;
                wfProfileIn( $fname );
 
-               // $text = preg_replace("/'{2,5}/", "", $text);
-               // $text = preg_replace("/\[[a-z]+:\/\/[^ ]+ ([^]]+)\]/", "\\2", $text);
-               // $text = preg_replace("/\[\[([^]|]+)\]\]/", "\\1", $text);
-               // $text = preg_replace("/\[\[([^]]+\|)?([^|]]+)\]\]/", "\\2", $text);
-               // $text = preg_replace("/\\{\\|(.*?)\\|\\}/", "", $text);
-               // $text = preg_replace("/\\[\\[[A-Za-z_-]+:([^|]+?)\\]\\]/", "", $text);
+               // $text = preg_replace( "/'{2,5}/", "", $text );
+               // $text = preg_replace( "/\[[a-z]+:\/\/[^ ]+ ([^]]+)\]/", "\\2", $text );
+               // $text = preg_replace( "/\[\[([^]|]+)\]\]/", "\\1", $text );
+               // $text = preg_replace( "/\[\[([^]]+\|)?([^|]]+)\]\]/", "\\2", $text );
+               // $text = preg_replace( "/\\{\\|(.*?)\\|\\}/", "", $text );
+               // $text = preg_replace( "/\\[\\[[A-Za-z_-]+:([^|]+?)\\]\\]/", "", $text );
                $text = preg_replace( "/\\{\\{([^|]+?)\\}\\}/", "", $text );
                $text = preg_replace( "/\\{\\{([^|]+\\|)(.*?)\\}\\}/", "\\2", $text );
                $text = preg_replace( "/\\[\\[([^|]+?)\\]\\]/", "\\1", $text );
index 368d900..ebc9d5a 100644 (file)
@@ -34,7 +34,7 @@ class SearchIBM_DB2 extends SearchEngine {
         * Creates an instance of this class
         * @param $db DatabaseIbm_db2: database object
         */
-       function __construct($db) {
+       function __construct( $db ) {
                parent::__construct( $db );
        }
 
@@ -45,8 +45,8 @@ class SearchIBM_DB2 extends SearchEngine {
         * @return SqlSearchResultSet
         */
        function searchText( $term ) {
-               $resultSet = $this->db->resultObject($this->db->query($this->getQuery($this->filter($term), true)));
-               return new SqlSearchResultSet($resultSet, $this->searchTerms);
+               $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), true ) ) );
+               return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
        /**
@@ -55,9 +55,9 @@ class SearchIBM_DB2 extends SearchEngine {
         * @param $term String: taw search term
         * @return SqlSearchResultSet
         */
-       function searchTitle($term) {
-               $resultSet = $this->db->resultObject($this->db->query($this->getQuery($this->filter($term), false)));
-               return new SqlSearchResultSet($resultSet, $this->searchTerms);
+       function searchTitle( $term ) {
+               $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), false ) ) );
+               return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
 
@@ -66,7 +66,7 @@ class SearchIBM_DB2 extends SearchEngine {
         * @return String
         */
        function queryRedirect() {
-               if ($this->showRedirects) {
+               if ( $this->showRedirects ) {
                        return '';
                } else {
                        return 'AND page_is_redirect=0';
@@ -78,10 +78,10 @@ class SearchIBM_DB2 extends SearchEngine {
         * @return String
         */
        function queryNamespaces() {
-               if( is_null($this->namespaces) )
+               if( is_null( $this->namespaces ) )
                        return '';
-               $namespaces = implode(',', $this->namespaces);
-               if ($namespaces == '') {
+               $namespaces = implode( ',', $this->namespaces );
+               if ( $namespaces == '' ) {
                        $namespaces = '0';
                }
                return 'AND page_namespace IN (' . $namespaces . ')';
@@ -92,7 +92,7 @@ class SearchIBM_DB2 extends SearchEngine {
         * @return String
         */
        function queryLimit( $sql ) {
-               return $this->db->limitResult($sql, $this->limit, $this->offset);
+               return $this->db->limitResult( $sql, $this->limit, $this->offset );
        }
 
        /**
@@ -100,7 +100,7 @@ class SearchIBM_DB2 extends SearchEngine {
         * subclasses may define this though
         * @return String
         */
-       function queryRanking($filteredTerm, $fulltext) {
+       function queryRanking( $filteredTerm, $fulltext ) {
                // requires Net Search Extender or equivalent
                // return ' ORDER BY score(1)';
                return '';
@@ -114,10 +114,10 @@ class SearchIBM_DB2 extends SearchEngine {
         * @return String
         */
        function getQuery( $filteredTerm, $fulltext ) {
-               return $this->queryLimit($this->queryMain($filteredTerm, $fulltext) . ' ' .
+               return $this->queryLimit( $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
                        $this->queryRedirect() . ' ' .
                        $this->queryNamespaces() . ' ' .
-                       $this->queryRanking( $filteredTerm, $fulltext ) . ' ');
+                       $this->queryRanking( $filteredTerm, $fulltext ) . ' ' );
        }
 
 
@@ -126,7 +126,7 @@ class SearchIBM_DB2 extends SearchEngine {
         * @param $fulltext Boolean
         * @return String
         */
-       function getIndexField($fulltext) {
+       function getIndexField( $fulltext ) {
                return $fulltext ? 'si_text' : 'si_title';
        }
 
@@ -138,9 +138,9 @@ class SearchIBM_DB2 extends SearchEngine {
         * @return String
         */
        function queryMain( $filteredTerm, $fulltext ) {
-               $match = $this->parseQuery($filteredTerm, $fulltext);
-               $page        = $this->db->tableName('page');
-               $searchindex = $this->db->tableName('searchindex');
+               $match = $this->parseQuery( $filteredTerm, $fulltext );
+               $page = $this->db->tableName( 'page' );
+               $searchindex = $this->db->tableName( 'searchindex' );
                return 'SELECT page_id, page_namespace, page_title ' .
                        "FROM $page,$searchindex " .
                        'WHERE page_id=si_page AND ' . $match;
@@ -149,7 +149,7 @@ class SearchIBM_DB2 extends SearchEngine {
        /** @todo document
         * @return string
         */
-       function parseQuery($filteredText, $fulltext) {
+       function parseQuery( $filteredText, $fulltext ) {
                global $wgContLang;
                $lc = SearchEngine::legalSearchChars();
                $this->searchTerms = array();
@@ -158,9 +158,9 @@ class SearchIBM_DB2 extends SearchEngine {
                $m = array();
                $q = array();
 
-               if (preg_match_all('/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
-                         $filteredText, $m, PREG_SET_ORDER)) {
-                       foreach($m as $terms) {
+               if ( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
+                               $filteredText, $m, PREG_SET_ORDER ) ) {
+                       foreach( $m as $terms ) {
 
                                // Search terms in all variant forms, only
                                // apply on wiki with LanguageConverter
@@ -173,19 +173,19 @@ class SearchIBM_DB2 extends SearchEngine {
                                else
                                        $q[] = $terms[1] . $wgContLang->normalizeForSearch( $terms[2] );
 
-                               if (!empty($terms[3])) {
+                               if ( !empty( $terms[3] ) ) {
                                        $regexp = preg_quote( $terms[3], '/' );
-                                       if ($terms[4])
+                                       if ( $terms[4] )
                                                $regexp .= "[0-9A-Za-z_]+";
                                } else {
-                                       $regexp = preg_quote(str_replace('"', '', $terms[2]), '/');
+                                       $regexp = preg_quote(str_replace( '"', '', $terms[2]), '/' );
                                }
                                $this->searchTerms[] = $regexp;
                        }
                }
 
-               $searchon = $this->db->strencode(join(',', $q));
-               $field = $this->getIndexField($fulltext);
+               $searchon = $this->db->strencode( join( ',', $q ) );
+               $field = $this->getIndexField( $fulltext );
 
                // requires Net Search Extender or equivalent
                //return " CONTAINS($field, '$searchon') > 0 ";
@@ -201,18 +201,18 @@ class SearchIBM_DB2 extends SearchEngine {
         * @param $title String
         * @param $text String
         */
-       function update($id, $title, $text) {
-               $dbw = wfGetDB(DB_MASTER);
-               $dbw->replace('searchindex',
-                       array('si_page'),
+       function update( $id, $title, $text ) {
+               $dbw = wfGetDB( DB_MASTER );
+               $dbw->replace( 'searchindex',
+                       array( 'si_page' ),
                        array(
                                'si_page' => $id,
                                'si_title' => $title,
                                'si_text' => $text
                        ), 'SearchIBM_DB2::update' );
                // ?
-               //$dbw->query("CALL ctx_ddl.sync_index('si_text_idx')");
-               //$dbw->query("CALL ctx_ddl.sync_index('si_title_idx')");
+               //$dbw->query( "CALL ctx_ddl.sync_index('si_text_idx')" );
+               //$dbw->query( "CALL ctx_ddl.sync_index('si_title_idx')" );
        }
 
        /**
@@ -222,13 +222,13 @@ class SearchIBM_DB2 extends SearchEngine {
         * @param $id Integer
         * @param $title String
         */
-       function updateTitle($id, $title) {
-               $dbw = wfGetDB(DB_MASTER);
+       function updateTitle( $id, $title ) {
+               $dbw = wfGetDB( DB_MASTER );
 
-               $dbw->update('searchindex',
-                       array('si_title' => $title),
-                       array('si_page'  => $id),
+               $dbw->update( 'searchindex',
+                       array( 'si_title' => $title ),
+                       array( 'si_page'  => $id ),
                        'SearchIBM_DB2::updateTitle',
-                       array());
+                       array() );
        }
 }
index 5cee03e..a76662b 100644 (file)
@@ -58,7 +58,7 @@ class SearchMySQL extends SearchEngine {
                # @todo FIXME: This doesn't handle parenthetical expressions.
                $m = array();
                if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
-                         $filteredText, $m, PREG_SET_ORDER ) ) {
+                               $filteredText, $m, PREG_SET_ORDER ) ) {
                        foreach( $m as $bits ) {
                                @list( /* all */, $modifier, $term, $nonQuoted, $wildcard ) = $bits;
 
@@ -221,7 +221,7 @@ class SearchMySQL extends SearchEngine {
         */
        protected function queryFeatures( &$query ) {
                foreach ( $this->features as $feature => $value ) {
-                       if ( $feature ===  'list-redirects' && !$value ) {
+                       if ( $feature === 'list-redirects' && !$value ) {
                                $query['conds']['page_is_redirect'] = 0;
                        } elseif( $feature === 'title-suffix-filter' && $value ) {
                                $query['conds'][] = 'page_title' . $this->db->buildLike( $this->db->anyString(), $value );
index 29070e1..009502b 100644 (file)
@@ -61,7 +61,7 @@ class SearchOracle extends SearchEngine {
         * Creates an instance of this class
         * @param $db DatabasePostgres: database object
         */
-       function __construct($db) {
+       function __construct( $db ) {
                parent::__construct( $db );
        }
 
@@ -72,11 +72,11 @@ class SearchOracle extends SearchEngine {
         * @return SqlSearchResultSet
         */
        function searchText( $term ) {
-               if ($term == '')
-                       return new SqlSearchResultSet(false, '');
+               if ( $term == '' )
+                       return new SqlSearchResultSet( false, '' );
 
-               $resultSet = $this->db->resultObject($this->db->query($this->getQuery($this->filter($term), true)));
-               return new SqlSearchResultSet($resultSet, $this->searchTerms);
+               $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), true ) ) );
+               return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
        /**
@@ -85,12 +85,12 @@ class SearchOracle extends SearchEngine {
         * @param $term String: raw search term
         * @return SqlSearchResultSet
         */
-       function searchTitle($term) {
-               if ($term == '')
-                       return new SqlSearchResultSet(false, '');
+       function searchTitle( $term ) {
+               if ( $term == '' )
+                       return new SqlSearchResultSet( false, '' );
 
-               $resultSet = $this->db->resultObject($this->db->query($this->getQuery($this->filter($term), false)));
-               return new MySQLSearchResultSet($resultSet, $this->searchTerms);
+               $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), false ) ) );
+               return new MySQLSearchResultSet( $resultSet, $this->searchTerms );
        }
 
 
@@ -99,7 +99,7 @@ class SearchOracle extends SearchEngine {
         * @return String
         */
        function queryRedirect() {
-               if ($this->showRedirects) {
+               if ( $this->showRedirects ) {
                        return '';
                } else {
                        return 'AND page_is_redirect=0';
@@ -111,7 +111,7 @@ class SearchOracle extends SearchEngine {
         * @return String
         */
        function queryNamespaces() {
-               if( is_null($this->namespaces) )
+               if( is_null( $this->namespaces ) )
                        return '';
                if ( !count( $this->namespaces ) ) {
                        $namespaces = '0';
@@ -129,7 +129,7 @@ class SearchOracle extends SearchEngine {
         * @return String
         */
        function queryLimit( $sql ) {
-               return $this->db->limitResult($sql, $this->limit, $this->offset);
+               return $this->db->limitResult( $sql, $this->limit, $this->offset );
        }
 
        /**
@@ -150,10 +150,10 @@ class SearchOracle extends SearchEngine {
         * @return String
         */
        function getQuery( $filteredTerm, $fulltext ) {
-               return $this->queryLimit($this->queryMain($filteredTerm, $fulltext) . ' ' .
+               return $this->queryLimit( $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
                        $this->queryRedirect() . ' ' .
                        $this->queryNamespaces() . ' ' .
-                       $this->queryRanking( $filteredTerm, $fulltext ) . ' ');
+                       $this->queryRanking( $filteredTerm, $fulltext ) . ' ' );
        }
 
 
@@ -162,7 +162,7 @@ class SearchOracle extends SearchEngine {
         * @param $fulltext Boolean
         * @return String
         */
-       function getIndexField($fulltext) {
+       function getIndexField( $fulltext ) {
                return $fulltext ? 'si_text' : 'si_title';
        }
 
@@ -174,9 +174,9 @@ class SearchOracle extends SearchEngine {
         * @return String
         */
        function queryMain( $filteredTerm, $fulltext ) {
-               $match = $this->parseQuery($filteredTerm, $fulltext);
-               $page        = $this->db->tableName('page');
-               $searchindex = $this->db->tableName('searchindex');
+               $match = $this->parseQuery( $filteredTerm, $fulltext );
+               $page = $this->db->tableName( 'page' );
+               $searchindex = $this->db->tableName( 'searchindex' );
                return 'SELECT page_id, page_namespace, page_title ' .
                        "FROM $page,$searchindex " .
                        'WHERE page_id=si_page AND ' . $match;
@@ -187,7 +187,7 @@ class SearchOracle extends SearchEngine {
         * as part of a WHERE clause
         * @return string
         */
-       function parseQuery($filteredText, $fulltext) {
+       function parseQuery( $filteredText, $fulltext ) {
                global $wgContLang;
                $lc = SearchEngine::legalSearchChars();
                $this->searchTerms = array();
@@ -195,9 +195,9 @@ class SearchOracle extends SearchEngine {
                # @todo FIXME: This doesn't handle parenthetical expressions.
                $m = array();
                $searchon = '';
-               if (preg_match_all('/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
-                         $filteredText, $m, PREG_SET_ORDER)) {
-                       foreach($m as $terms) {
+               if ( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
+                               $filteredText, $m, PREG_SET_ORDER ) ) {
+                       foreach( $m as $terms ) {
                                // Search terms in all variant forms, only
                                // apply on wiki with LanguageConverter
                                $temp_terms = $wgContLang->autoConvertToAllVariants( $terms[2] );
@@ -210,27 +210,27 @@ class SearchOracle extends SearchEngine {
                                else {
                                        $searchon .= ($terms[1] == '-' ? ' ~' : ' & ') . $this->escapeTerm( $terms[2] );
                                }
-                               if (!empty($terms[3])) {
+                               if ( !empty( $terms[3] ) ) {
                                        $regexp = preg_quote( $terms[3], '/' );
-                                       if ($terms[4])
+                                       if ( $terms[4] )
                                                $regexp .= "[0-9A-Za-z_]+";
                                } else {
-                                       $regexp = preg_quote(str_replace('"', '', $terms[2]), '/');
+                                       $regexp = preg_quote( str_replace( '"', '', $terms[2] ), '/' );
                                }
                                $this->searchTerms[] = $regexp;
                        }
                }
 
 
-               $searchon = $this->db->addQuotes(ltrim($searchon, ' &'));
-               $field = $this->getIndexField($fulltext);
+               $searchon = $this->db->addQuotes( ltrim( $searchon, ' &' ) );
+               $field = $this->getIndexField( $fulltext );
                return " CONTAINS($field, $searchon, 1) > 0 ";
        }
 
-       private function escapeTerm($t) {
+       private function escapeTerm( $t ) {
                global $wgContLang;
-               $t = $wgContLang->normalizeForSearch($t);
-               $t = isset($this->reservedWords[strtoupper($t)]) ? '{'.$t.'}' : $t;
+               $t = $wgContLang->normalizeForSearch( $t );
+               $t = isset( $this->reservedWords[strtoupper( $t )] ) ? '{'.$t.'}' : $t;
                $t = preg_replace('/^"(.*)"$/', '($1)', $t);
                $t = preg_replace('/([-&|])/', '\\\\$1', $t);
                return $t;
@@ -243,10 +243,10 @@ class SearchOracle extends SearchEngine {
         * @param $title String
         * @param $text String
         */
-       function update($id, $title, $text) {
-               $dbw = wfGetDB(DB_MASTER);
-               $dbw->replace('searchindex',
-                       array('si_page'),
+       function update( $id, $title, $text ) {
+               $dbw = wfGetDB( DB_MASTER );
+               $dbw->replace( 'searchindex',
+                       array( 'si_page' ),
                        array(
                                'si_page' => $id,
                                'si_title' => $title,
@@ -271,14 +271,14 @@ class SearchOracle extends SearchEngine {
         * @param $id Integer
         * @param $title String
         */
-       function updateTitle($id, $title) {
-               $dbw = wfGetDB(DB_MASTER);
+       function updateTitle( $id, $title ) {
+               $dbw = wfGetDB( DB_MASTER );
 
-               $dbw->update('searchindex',
-                       array('si_title' => $title),
-                       array('si_page'  => $id),
+               $dbw->update( 'searchindex',
+                       array( 'si_title' => $title ),
+                       array( 'si_page'  => $id ),
                        'SearchOracle::updateTitle',
-                       array());
+                       array() );
        }
 
 
index 9c89c3d..727cc16 100644 (file)
@@ -66,8 +66,8 @@ class SearchPostgres extends SearchEngine {
                $q = $this->searchQuery( $term, 'textvector', 'old_text' );
                $olderror = error_reporting(E_ERROR);
                $resultSet = $this->db->resultObject( $this->db->query( $q, 'SearchPostgres', true ) );
-               error_reporting($olderror);
-               if (!$resultSet) {
+               error_reporting( $olderror );
+               if ( !$resultSet ) {
                        return new SearchResultTooMany();
                }
                return new PostgresSearchResultSet( $resultSet, $this->searchTerms );
@@ -99,16 +99,16 @@ class SearchPostgres extends SearchEngine {
                $m = array();
                if( preg_match_all('/([-!]?)(\S+)\s*/', $term, $m, PREG_SET_ORDER ) ) {
                        foreach( $m as $terms ) {
-                               if (strlen($terms[1])) {
+                               if ( strlen( $terms[1] ) ) {
                                        $searchstring .= ' & !';
                                }
-                               if (strtolower($terms[2]) === 'and') {
+                               if ( strtolower( $terms[2] ) === 'and' ) {
                                        $searchstring .= ' & ';
                                }
-                               elseif (strtolower($terms[2]) === 'or' or $terms[2] === '|') {
+                               elseif ( strtolower( $terms[2] ) === 'or' or $terms[2] === '|' ) {
                                        $searchstring .= ' | ';
                                }
-                               elseif (strtolower($terms[2]) === 'not') {
+                               elseif ( strtolower( $terms[2] ) === 'not' ) {
                                        $searchstring .= ' & !';
                                }
                                else {
@@ -133,7 +133,7 @@ class SearchPostgres extends SearchEngine {
                $searchstring = preg_replace('/^[\'"](.*)[\'"]$/', "$1", $searchstring);
 
                ## Quote the whole thing
-               $searchstring = $this->db->addQuotes($searchstring);
+               $searchstring = $this->db->addQuotes( $searchstring );
 
                wfDebug( "parseQuery returned: $searchstring \n" );
 
@@ -154,15 +154,15 @@ class SearchPostgres extends SearchEngine {
 
                ## We need a separate query here so gin does not complain about empty searches
                $SQL = "SELECT to_tsquery($searchstring)";
-               $res = $this->db->query($SQL);
-               if (!$res) {
+               $res = $this->db->query( $SQL );
+               if ( !$res ) {
                        ## TODO: Better output (example to catch: one 'two)
-                       die ("Sorry, that was not a valid search string. Please go back and try again");
+                       die( "Sorry, that was not a valid search string. Please go back and try again" );
                }
                $top = $res->fetchRow();
                $top = $top[0];
 
-               if ($top === "") { ## e.g. if only stopwords are used XXX return something better
+               if ( $top === "" ) { ## e.g. if only stopwords are used XXX return something better
                        $query = "SELECT page_id, page_namespace, page_title, 0 AS score ".
                                "FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id " .
                                "AND r.rev_text_id = c.old_id AND 1=0";
@@ -182,7 +182,7 @@ class SearchPostgres extends SearchEngine {
                }
 
                ## Redirects
-               if (! $this->showRedirects)
+               if ( !$this->showRedirects )
                        $query .= ' AND page_is_redirect = 0';
 
                ## Namespaces - defaults to 0
@@ -226,7 +226,7 @@ class SearchPostgres extends SearchEngine {
  */
 class PostgresSearchResult extends SearchResult {
        function __construct( $row ) {
-               parent::__construct($row);
+               parent::__construct( $row );
                $this->score = $row->score;
        }
        function getScore() {
index e52e4fe..f91399a 100644 (file)
@@ -62,7 +62,7 @@ class SearchSqlite extends SearchEngine {
 
                $m = array();
                if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
-                         $filteredText, $m, PREG_SET_ORDER ) ) {
+                               $filteredText, $m, PREG_SET_ORDER ) ) {
                        foreach( $m as $bits ) {
                                @list( /* all */, $modifier, $term, $nonQuoted, $wildcard ) = $bits;
 
@@ -214,7 +214,7 @@ class SearchSqlite extends SearchEngine {
         * @return String
         */
        function queryNamespaces() {
-               if( is_null($this->namespaces) )
+               if( is_null( $this->namespaces ) )
                        return '';  # search all
                if ( !count( $this->namespaces ) ) {
                        $namespaces = '0';
@@ -266,7 +266,7 @@ class SearchSqlite extends SearchEngine {
         */
        function queryMain( $filteredTerm, $fulltext ) {
                $match = $this->parseQuery( $filteredTerm, $fulltext );
-               $page        = $this->db->tableName( 'page' );
+               $page = $this->db->tableName( 'page' );
                $searchindex = $this->db->tableName( 'searchindex' );
                return "SELECT $searchindex.rowid, page_namespace, page_title " .
                        "FROM $page,$searchindex " .
@@ -317,7 +317,7 @@ class SearchSqlite extends SearchEngine {
         * @param $id Integer
         * @param $title String
         */
-    function updateTitle( $id, $title ) {
+       function updateTitle( $id, $title ) {
                if ( !$this->fulltextSearchSupported() ) {
                        return;
                }
index 389c317..eabcda3 100644 (file)
@@ -79,7 +79,7 @@ class SearchUpdate implements DeferrableUpdate {
                $text = preg_replace( "/<\\/?\\s*[A-Za-z][^>]*?>/",
                        ' ', $wgContLang->lc( " " . $text . " " ) ); # Strip HTML markup
                $text = preg_replace( "/(^|\\n)==\\s*([^\\n]+)\\s*==(\\s)/sD",
-                 "\\1\\2 \\2 \\2\\3", $text ); # Emphasize headings
+                       "\\1\\2 \\2 \\2\\3", $text ); # Emphasize headings
 
                # Strip external URLs
                $uc = "A-Za-z0-9_\\/:.,~%\\-+&;#?!=()@\\x80-\\xFF";
@@ -97,7 +97,7 @@ class SearchUpdate implements DeferrableUpdate {
                $text = preg_replace( $pat2, " \\1 \\3", $text );
 
                $text = preg_replace( "/([^{$lc}])([{$lc}]+)]]([a-z]+)/",
-                 "\\1\\2 \\2\\3", $text ); # Handle [[game]]s
+                       "\\1\\2 \\2\\3", $text ); # Handle [[game]]s
 
                # Strip all remaining non-search characters
                $text = preg_replace( "/[^{$lc}]+/", " ", $text );
@@ -127,7 +127,7 @@ class SearchUpdate implements DeferrableUpdate {
                wfRunHooks( 'SearchUpdate', array( $this->mId, $this->mNamespace, $this->mTitle, &$text ) );
 
                # Perform the actual update
-               $search->update($this->mId, $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ),
+               $search->update( $this->mId, $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ),
                                $search->normalizeText( $text ) );
 
                wfProfileOut( __METHOD__ );
index 401e65d..eeda739 100644 (file)
@@ -180,7 +180,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                $where = array( 'page_namespace' => $namespace );
 
                if ( $hideredirects ) {
-                       $where[ 'page_is_redirect' ] = 0;
+                       $where['page_is_redirect'] = 0;
                }
 
                $from = Title::makeTitleSafe( $namespace, $from );
@@ -250,7 +250,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                // 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) ) {
+                       if( !empty( $lines ) ) {
                                $this->showChunk( $namespace, $from, $to, $hideredirects );
                        } else {
                                $output->addHTML( $this->namespaceForm( $namespace, $from, $to, $hideredirects ) );
@@ -312,7 +312,7 @@ class SpecialAllpages extends IncludableSpecialPage {
 
                $queryhideredirects = array();
                if ( $hideredirects ) {
-                       $queryhideredirects[ 'hideredirects' ] = 1;
+                       $queryhideredirects['hideredirects'] = 1;
                }
 
                $special = $this->getTitle();
@@ -357,7 +357,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                        );
 
                        if ( $hideredirects ) {
-                               $conds[ 'page_is_redirect' ] = 0;
+                               $conds['page_is_redirect'] = 0;
                        }
 
                        if( $toKey !== "" ) {
index 42d3377..bfa2f95 100644 (file)
@@ -33,6 +33,6 @@ class SpecialBlankpage extends UnlistedSpecialPage {
        }
        public function execute( $par ) {
                $this->setHeaders();
-               $this->getOutput()->addWikiMsg('intentionallyblankpage');
+               $this->getOutput()->addWikiMsg( 'intentionallyblankpage' );
        }
 }
index b71588d..ac05f67 100644 (file)
@@ -62,7 +62,7 @@ class SpecialBlock extends FormSpecialPage {
         * @throws ErrorPageError
         */
        protected function checkExecutePermissions( User $user ) {
-                parent::checkExecutePermissions( $user );
+               parent::checkExecutePermissions( $user );
 
                # bug 15810: blocked admins should have limited access here
                $status = self::checkUnblockSelf( $this->target, $user );
@@ -134,6 +134,7 @@ class SpecialBlock extends FormSpecialPage {
                                'tabindex' => '1',
                                'id' => 'mw-bi-target',
                                'size' => '45',
+                               'autofocus' => true,
                                'required' => true,
                                'validation-callback' => array( __CLASS__, 'validateTargetField' ),
                        ),
@@ -239,7 +240,7 @@ class SpecialBlock extends FormSpecialPage {
 
                if ( $block instanceof Block && !$block->mAuto # The block exists and isn't an autoblock
                        && ( $this->type != Block::TYPE_RANGE # The block isn't a rangeblock
-                         || $block->getTarget() == $this->target ) # or if it is, the range is what we're about to block
+                               || $block->getTarget() == $this->target ) # or if it is, the range is what we're about to block
                        )
                {
                        $fields['HardBlock']['default'] = $block->isHardblock();
@@ -769,7 +770,7 @@ class SpecialBlock extends FormSpecialPage {
                        $logParams
                );
                # Relate log ID to block IDs (bug 25763)
-               $blockIds = array_merge( array( $status['id'] ), $status['autoIds']  );
+               $blockIds = array_merge( array( $status['id'] ), $status['autoIds'] );
                $log->addRelations( 'ipb_id', $blockIds, $log_id );
 
                # Report to the user
index d1afe58..56b9b00 100644 (file)
@@ -472,7 +472,7 @@ class HTMLBlockedUsersItemSelect extends HTMLSelectField {
                        // 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 6d27c1b..255b1b6 100644 (file)
@@ -62,7 +62,7 @@ class SpecialBookSources extends SpecialPage {
        }
 
        /**
-        * Returns whether a given ISBN (10 or 13) is valid.  True indicates validity.
+        * Returns whether a given ISBN (10 or 13) is valid. True indicates validity.
         * @param $isbn string ISBN passed for check
         * @return bool
         */
@@ -71,7 +71,7 @@ class SpecialBookSources extends SpecialPage {
                $sum = 0;
                if( strlen( $isbn ) == 13 ) {
                        for( $i = 0; $i < 12; $i++ ) {
-                               if($i % 2 == 0) {
+                               if( $i % 2 == 0 ) {
                                        $sum += $isbn[$i];
                                } else {
                                        $sum += 3 * $isbn[$i];
@@ -79,19 +79,19 @@ class SpecialBookSources extends SpecialPage {
                        }
 
                        $check = (10 - ($sum % 10)) % 10;
-                       if ($check == $isbn[12]) {
+                       if ( $check == $isbn[12] ) {
                                return true;
                        }
                } elseif( strlen( $isbn ) == 10 ) {
-                       for($i = 0; $i < 9; $i++) {
+                       for( $i = 0; $i < 9; $i++ ) {
                                $sum += $isbn[$i] * ($i + 1);
                        }
 
                        $check = $sum % 11;
-                       if($check == 10) {
+                       if( $check == 10 ) {
                                $check = "X";
                        }
-                       if($check == $isbn[9]) {
+                       if( $check == $isbn[9] ) {
                                return true;
                        }
                }
index 1232e3f..44388c4 100644 (file)
@@ -72,7 +72,7 @@ class CategoryPager extends AlphabeticPager {
        function getQueryInfo() {
                return array(
                        'tables' => array( 'category' ),
-                       'fields' => array( 'cat_title','cat_pages' ),
+                       'fields' => array( 'cat_title', 'cat_pages' ),
                        'conds' => array( 'cat_pages > 0' ),
                        'options' => array( 'USE INDEX' => 'cat_title' ),
                );
@@ -112,7 +112,7 @@ class CategoryPager extends AlphabeticPager {
                return parent::getBody();
        }
 
-       function formatRow($result) {
+       function formatRow( $result ) {
                $title = Title::makeTitle( NS_CATEGORY, $result->cat_title );
                $titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) );
                $count = $this->msg( 'nmembers' )->numParams( $result->cat_pages )->escaped();
index 6280eb4..fba2bf0 100644 (file)
@@ -73,8 +73,10 @@ class SpecialChangePassword extends UnlistedSpecialPage {
                                }
 
                                $this->attemptReset( $this->mNewpass, $this->mRetype );
-                               $this->getOutput()->addWikiMsg( 'resetpass_success' );
-                               if( !$user->isLoggedIn() ) {
+
+                               if( $user->isLoggedIn() ) {
+                                       $this->doReturnTo();
+                               } else {
                                        LoginForm::setLoginToken();
                                        $token = LoginForm::getLoginToken();
                                        $data = array(
@@ -82,7 +84,7 @@ class SpecialChangePassword extends UnlistedSpecialPage {
                                                'wpName'       => $this->mUserName,
                                                'wpDomain'     => $this->mDomain,
                                                'wpLoginToken' => $token,
-                                               'wpPassword'   => $this->mNewpass,
+                                               'wpPassword'   => $request->getVal( 'wpNewPassword' ),
                                                'returnto'     => $request->getVal( 'returnto' ),
                                        );
                                        if( $request->getCheck( 'wpRemember' ) ) {
@@ -92,7 +94,7 @@ class SpecialChangePassword extends UnlistedSpecialPage {
                                        $login->setContext( $this->getContext() );
                                        $login->execute( null );
                                }
-                               $this->doReturnTo();
+                               return;
                        } catch( PasswordError $e ) {
                                $this->error( $e->getMessage() );
                        }
@@ -216,7 +218,13 @@ class SpecialChangePassword extends UnlistedSpecialPage {
         * @throws PasswordError when cannot set the new password because requirements not met.
         */
        protected function attemptReset( $newpass, $retype ) {
-               $user = User::newFromName( $this->mUserName );
+               $isSelf = ( $this->mUserName === $this->getUser()->getName() );
+               if ( $isSelf ) {
+                       $user = $this->getUser();
+               } else {
+                       $user = User::newFromName( $this->mUserName );
+               }
+
                if( !$user || $user->isAnon() ) {
                        throw new PasswordError( $this->msg( 'nosuchusershort', $this->mUserName )->text() );
                }
@@ -250,7 +258,12 @@ class SpecialChangePassword extends UnlistedSpecialPage {
                        throw new PasswordError( $e->getMessage() );
                }
 
-               $user->setCookies();
+               if ( $isSelf ) {
+                       // This is needed to keep the user connected since
+                       // changing the password also modifies the user's token.
+                       $user->setCookies();
+               }
+
                $user->saveSettings();
        }
 }
index 54ec07d..af4d4fb 100644 (file)
@@ -360,7 +360,7 @@ class SpecialContributions extends SpecialPage {
                if ( !isset( $this->opts['target'] ) ) {
                        $this->opts['target'] = '';
                } else {
-                       $this->opts['target'] = str_replace( '_' , ' ' , $this->opts['target'] );
+                       $this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );
                }
 
                if ( !isset( $this->opts['namespace'] ) ) {
@@ -424,7 +424,7 @@ class SpecialContributions extends SpecialPage {
                        Xml::radioLabel(
                                $this->msg( 'sp-contributions-newbies' )->text(),
                                'contribs',
-                               'newbie' ,
+                               'newbie',
                                'newbie',
                                $this->opts['contribs'] == 'newbie',
                                array( 'class' => 'mw-input' )
index 48180a7..a9c554a 100644 (file)
@@ -59,20 +59,20 @@ class DisambiguationsPage extends QueryPage {
                        if( $dp->getNamespace() != NS_TEMPLATE ) {
                                # @todo FIXME: We assume the disambiguation message is a template but
                                # the page can potentially be from another namespace :/
-                               wfDebug("Mediawiki:disambiguationspage message does not refer to a template!\n");
+                               wfDebug( "Mediawiki:disambiguationspage message does not refer to a template!\n" );
                        }
                        $linkBatch->addObj( $dp );
                } else {
                                # Get all the templates linked from the Mediawiki:Disambiguationspage
                                $disPageObj = Title::makeTitleSafe( NS_MEDIAWIKI, 'disambiguationspage' );
                                $res = $dbr->select(
-                                       array('pagelinks', 'page'),
+                                       array( 'pagelinks', 'page' ),
                                        'pl_title',
-                                       array('page_id = pl_from',
+                                       array( 'page_id = pl_from',
                                                'pl_namespace' => NS_TEMPLATE,
                                                'page_namespace' => $disPageObj->getNamespace(),
-                                               'page_title' => $disPageObj->getDBkey()),
-                                       __METHOD__ );
+                                               'page_title' => $disPageObj->getDBkey()
+                                       ), __METHOD__ );
 
                                foreach ( $res as $row ) {
                                        $linkBatch->addObj( Title::makeTitle( NS_TEMPLATE, $row->pl_title ));
index 18dde20..9eb555a 100644 (file)
@@ -124,7 +124,7 @@ class SpecialExport extends SpecialPage {
                        if ( $this->curonly ) {
                                $history = WikiExporter::CURRENT;
                        } elseif ( !$historyCheck ) {
-                               if ( $limit > 0 && ($wgExportMaxHistory == 0 || $limit < $wgExportMaxHistory ) ) {
+                               if ( $limit > 0 && ( $wgExportMaxHistory == 0 || $limit < $wgExportMaxHistory ) ) {
                                        $history['limit'] = $limit;
                                }
                                if ( !is_null( $offset ) ) {
@@ -339,7 +339,7 @@ class SpecialExport extends SpecialPage {
 
                        // This might take a while... :D
                        wfSuppressWarnings();
-                       set_time_limit(0);
+                       set_time_limit( 0 );
                        wfRestoreWarnings();
                }
 
@@ -405,7 +405,7 @@ class SpecialExport extends SpecialPage {
 
                foreach ( $res as $row ) {
                        $n = $row->page_title;
-                       if ($row->page_namespace) {
+                       if ( $row->page_namespace ) {
                                $ns = $wgContLang->getNsText( $row->page_namespace );
                                $n = $ns . ':' . $n;
                        }
index 9fb0f9e..16772ec 100644 (file)
@@ -353,7 +353,7 @@ class ImportReporter extends ContextSource {
        private $mOriginalPageOutCallback = null;
        private $mLogItemCount = 0;
 
-       function __construct( $importer, $upload, $interwiki , $reason=false ) {
+       function __construct( $importer, $upload, $interwiki, $reason = false ) {
                $this->mOriginalPageOutCallback =
                                $importer->setPageOutCallback( array( $this, 'reportPage' ) );
                $this->mOriginalLogCallback =
index 9a224b6..f5fa697 100644 (file)
@@ -64,15 +64,15 @@ class LinkSearchPage extends QueryPage {
 
                $target2 = $target;
                $protocol = '';
-               $pr_sl = strpos($target2, '//' );
-               $pr_cl = strpos($target2, ':' );
+               $pr_sl = strpos( $target2, '//' );
+               $pr_cl = strpos( $target2, ':' );
                if ( $pr_sl ) {
                        // For protocols with '//'
-                       $protocol = substr( $target2, 0 , $pr_sl+2 );
-                       $target2 = substr( $target2, $pr_sl+2 );
+                       $protocol = substr( $target2, 0, $pr_sl + 2 );
+                       $target2 = substr( $target2, $pr_sl + 2 );
                } elseif ( !$pr_sl && $pr_cl ) {
                        // For protocols without '//' like 'mailto:'
-                       $protocol = substr( $target2, 0 , $pr_cl+1 );
+                       $protocol = substr( $target2, 0, $pr_cl + 1 );
                        $target2 = substr( $target2, $pr_cl+1 );
                } elseif ( $protocol == '' && $target2 != '' ) {
                        // default
@@ -138,10 +138,10 @@ class LinkSearchPage extends QueryPage {
         */
        static function mungeQuery( $query, $prot ) {
                $field = 'el_index';
-               $rv = LinkFilter::makeLikeArray( $query , $prot );
+               $rv = LinkFilter::makeLikeArray( $query, $prot );
                if ( $rv === false ) {
                        // LinkFilter doesn't handle wildcard in IP, so we'll have to munge here.
-                       if (preg_match('/^(:?[0-9]{1,3}\.)+\*\s*$|^(:?[0-9]{1,3}\.){3}[0-9]{1,3}:[0-9]*\*\s*$/', $query)) {
+                       if ( preg_match( '/^(:?[0-9]{1,3}\.)+\*\s*$|^(:?[0-9]{1,3}\.){3}[0-9]{1,3}:[0-9]*\*\s*$/', $query ) ) {
                                $dbr = wfGetDB( DB_SLAVE );
                                $rv = array( $prot . rtrim( $query, " \t*" ), $dbr->anyString() );
                                $field = 'el_to';
@@ -201,7 +201,7 @@ class LinkSearchPage extends QueryPage {
         * Override to check query validity.
         */
        function doQuery( $offset = false, $limit = false ) {
-               list( $this->mMungedQuery,  ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt );
+               list( $this->mMungedQuery, ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt );
                if( $this->mMungedQuery === false ) {
                        $this->getOutput()->addWikiMsg( 'linksearch-error' );
                } else {
index ef68302..661db7b 100644 (file)
@@ -137,7 +137,7 @@ class ImageListPager extends TablePager {
                $tables = array( 'image' );
                $fields = array_keys( $this->getFieldNames() );
                $fields[] = 'img_user';
-               $fields[array_search('thumb', $fields)] = 'img_name AS thumb';
+               $fields[array_search( 'thumb', $fields )] = 'img_name AS thumb';
                $options = $join_conds = array();
 
                # Depends on $wgMiserMode
index ea598c3..06e3261 100644 (file)
@@ -212,17 +212,26 @@ class UsersPager extends AlphabeticPager {
                list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() );
 
                # Form tag
-               $out  = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' ) ) .
+               $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' ) ) .
                        Xml::fieldset( $this->msg( 'listusers' )->text() ) .
                        Html::hidden( 'title', $self );
 
                # Username field
                $out .= Xml::label( $this->msg( 'listusersfrom' )->text(), 'offset' ) . ' ' .
-                       Xml::input( 'username', 20, $this->requestedUser, array( 'id' => 'offset' ) ) . ' ';
+                       Html::input(
+                               'username',
+                               $this->requestedUser,
+                               'text',
+                               array(
+                                       'id' => 'offset',
+                                       'size' => 20,
+                                       'autofocus' => $this->requestedUser === ''
+                               )
+                       ) . ' ';
 
                # Group drop-down list
                $out .= Xml::label( $this->msg( 'group' )->text(), 'group' ) . ' ' .
-                       Xml::openElement('select',  array( 'name' => 'group', 'id' => 'group' ) ) .
+                       Xml::openElement( 'select', array( 'name' => 'group', 'id' => 'group' ) ) .
                        Xml::option( $this->msg( 'group-all' )->text(), '' );
                foreach( $this->getAllGroups() as $group => $groupText )
                        $out .= Xml::option( $groupText, $group, $group == $this->requestedGroup );
index 66fd918..bf93ef2 100644 (file)
@@ -152,7 +152,7 @@ class MovePageForm extends UnlistedSpecialPage {
                                </tr>";
                        $err = array();
                } else {
-                       if ($this->oldTitle->getNamespace() == NS_USER && !$this->oldTitle->isSubpage() ) {
+                       if ( $this->oldTitle->getNamespace() == NS_USER && !$this->oldTitle->isSubpage() ) {
                                $out->wrapWikiMsg( "<div class=\"error mw-moveuserpage-warning\">\n$1\n</div>", 'moveuserpage-warning' );
                        }
                        $out->addWikiMsg( $wgFixDoubleRedirects ? 'movepagetext' :
@@ -189,7 +189,7 @@ class MovePageForm extends UnlistedSpecialPage {
                                array(
                                        'rd_namespace' => $this->oldTitle->getNamespace(),
                                        'rd_title' => $this->oldTitle->getDBkey(),
-                               ) , __METHOD__ );
+                               ), __METHOD__ );
                } else {
                        $hasRedirects = false;
                }
@@ -257,11 +257,11 @@ class MovePageForm extends UnlistedSpecialPage {
                $handler = ContentHandler::getForTitle( $this->oldTitle );
 
                $out->addHTML(
-                        Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) .
-                        Xml::openElement( 'fieldset' ) .
-                        Xml::element( 'legend', null, $this->msg( 'move-page-legend' )->text() ) .
-                        Xml::openElement( 'table', array( 'id' => 'mw-movepage-table' ) ) .
-                        "<tr>
+                       Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) .
+                       Xml::openElement( 'fieldset' ) .
+                       Xml::element( 'legend', null, $this->msg( 'move-page-legend' )->text() ) .
+                       Xml::openElement( 'table', array( 'id' => 'mw-movepage-table' ) ) .
+                       "<tr>
                                <td class='mw-label'>" .
                                        $this->msg( 'movearticle' )->escaped() .
                                "</td>
@@ -344,7 +344,7 @@ class MovePageForm extends UnlistedSpecialPage {
                                        'wpMovesubpages',
                                        # Don't check the box if we only have talk subpages to
                                        # move and we aren't moving the talk page.
-                                       $this->moveSubpages && ($this->oldTitle->hasSubpages() || $this->moveTalk),
+                                       $this->moveSubpages && ( $this->oldTitle->hasSubpages() || $this->moveTalk ),
                                        array( 'id' => 'wpMovesubpages' )
                                ) . '&#160;' .
                                Xml::tags( 'label', array( 'for' => 'wpMovesubpages' ),
@@ -359,7 +359,7 @@ class MovePageForm extends UnlistedSpecialPage {
                        );
                }
 
-               $watchChecked = $user->isLoggedIn() && ($this->watch || $user->getBoolOption( 'watchmoves' )
+               $watchChecked = $user->isLoggedIn() && ( $this->watch || $user->getBoolOption( 'watchmoves' )
                        || $user->isWatched( $this->oldTitle ) );
                # Don't allow watching if user is not logged in
                if( $user->isLoggedIn() ) {
@@ -538,10 +538,10 @@ class MovePageForm extends UnlistedSpecialPage {
                        );
                        $conds['page_namespace'] = array();
                        if( MWNamespace::hasSubpages( $nt->getNamespace() ) ) {
-                               $conds['page_namespace'] []= $ot->getNamespace();
+                               $conds['page_namespace'][] = $ot->getNamespace();
                        }
                        if( $this->moveTalk && MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() ) ) {
-                               $conds['page_namespace'] []= $ot->getTalkPage()->getNamespace();
+                               $conds['page_namespace'][] = $ot->getTalkPage()->getNamespace();
                        }
                } elseif( $this->moveTalk ) {
                        $conds = array(
@@ -587,7 +587,7 @@ class MovePageForm extends UnlistedSpecialPage {
                        $newSubpage = Title::makeTitleSafe( $newNs, $newPageName );
                        if( !$newSubpage ) {
                                $oldLink = Linker::linkKnown( $oldSubpage );
-                               $extraOutput []= $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink
+                               $extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink
                                        )->params( Title::makeName( $newNs, $newPageName ) )->escaped();
                                continue;
                        }
@@ -595,7 +595,7 @@ class MovePageForm extends UnlistedSpecialPage {
                        # This was copy-pasted from Renameuser, bleh.
                        if ( $newSubpage->exists() && !$oldSubpage->isValidMoveTarget( $newSubpage ) ) {
                                $link = Linker::linkKnown( $newSubpage );
-                               $extraOutput []= $this->msg( 'movepage-page-exists' )->rawParams( $link )->escaped();
+                               $extraOutput[] = $this->msg( 'movepage-page-exists' )->rawParams( $link )->escaped();
                        } else {
                                $success = $oldSubpage->moveTo( $newSubpage, true, $this->reason, $createRedirect );
                                if( $success === true ) {
@@ -609,16 +609,16 @@ class MovePageForm extends UnlistedSpecialPage {
                                                array( 'redirect' => 'no' )
                                        );
                                        $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 053c015..cc301a5 100644 (file)
@@ -296,11 +296,11 @@ class SpecialNewpages extends IncludableSpecialPage {
 
                # Revision deletion works on revisions, so we should cast one
                $row = array(
-                                         'comment' => $result->rc_comment,
-                                         'deleted' => $result->rc_deleted,
-                                         'user_text' => $result->rc_user_text,
-                                         'user' => $result->rc_user,
-                                       );
+                       'comment' => $result->rc_comment,
+                       'deleted' => $result->rc_deleted,
+                       'user_text' => $result->rc_user_text,
+                       'user' => $result->rc_user,
+               );
                $rev = new Revision( $row );
                $rev->setTitle( $title );
 
index aceac3f..d580d62 100644 (file)
@@ -51,7 +51,7 @@ class SpecialProtectedpages extends SpecialPage {
                $size = $request->getIntOrNull( 'size' );
                $NS = $request->getIntOrNull( 'namespace' );
                $indefOnly = $request->getBool( 'indefonly' ) ? 1 : 0;
-               $cascadeOnly = $request->getBool('cascadeonly') ? 1 : 0;
+               $cascadeOnly = $request->getBool( 'cascadeonly' ) ? 1 : 0;
 
                $pager = new ProtectedPagesPager( $this, array(), $type, $level, $NS, $sizetype, $size, $indefOnly, $cascadeOnly );
 
@@ -109,7 +109,7 @@ class SpecialProtectedpages extends SpecialPage {
                        )->escaped();
                }
 
-               if(!is_null($size = $row->page_len)) {
+               if( !is_null( $size = $row->page_len ) ) {
                        $stxt = $lang->getDirMark() . ' ' . Linker::formatRevisionSize( $size );
                }
 
@@ -154,7 +154,7 @@ class SpecialProtectedpages extends SpecialPage {
         * @param $cascadeOnly Boolean: only cascading protection
         * @return String: input form
         */
-       protected function showOptions( $namespace, $type='edit', $level, $sizetype, $size, $indefOnly, $cascadeOnly ) {
+       protected function showOptions( $namespace, $type = 'edit', $level, $sizetype, $size, $indefOnly, $cascadeOnly ) {
                global $wgScript;
                $title = $this->getTitle();
                return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
@@ -272,7 +272,7 @@ class SpecialProtectedpages extends SpecialPage {
                // First pass to load the log names
                foreach( $wgRestrictionLevels as $type ) {
                        // Messages used can be 'restriction-level-sysop' and 'restriction-level-autoconfirmed'
-                       if( $type !='' && $type !='*') {
+                       if( $type != '' && $type != '*' ) {
                                $text = $this->msg( "restriction-level-$type" )->text();
                                $m[$text] = $type;
                        }
@@ -300,7 +300,7 @@ class ProtectedPagesPager extends AlphabeticPager {
        public $mForm, $mConds;
        private $type, $level, $namespace, $sizetype, $size, $indefonly;
 
-       function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype='', $size=0,
+       function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype = '', $size = 0,
                $indefonly = false, $cascadeonly = false )
        {
                $this->mForm = $form;
@@ -309,7 +309,7 @@ class ProtectedPagesPager extends AlphabeticPager {
                $this->level = $level;
                $this->namespace = $namespace;
                $this->sizetype = $sizetype;
-               $this->size = intval($size);
+               $this->size = intval( $size );
                $this->indefonly = (bool)$indefonly;
                $this->cascadeonly = (bool)$cascadeonly;
                parent::__construct( $form->getContext() );
@@ -336,9 +336,9 @@ class ProtectedPagesPager extends AlphabeticPager {
                $conds[] = 'page_id=pr_page';
                $conds[] = 'pr_type=' . $this->mDb->addQuotes( $this->type );
 
-               if( $this->sizetype=='min' ) {
+               if( $this->sizetype == 'min' ) {
                        $conds[] = 'page_len>=' . $this->size;
-               } elseif( $this->sizetype=='max' ) {
+               } elseif( $this->sizetype == 'max' ) {
                        $conds[] = 'page_len<=' . $this->size;
                }
 
@@ -351,7 +351,7 @@ class ProtectedPagesPager extends AlphabeticPager {
 
                if( $this->level )
                        $conds[] = 'pr_level=' . $this->mDb->addQuotes( $this->level );
-               if( !is_null($this->namespace) )
+               if( !is_null( $this->namespace ) )
                        $conds[] = 'page_namespace=' . $this->mDb->addQuotes( $this->namespace );
                return array(
                        'tables' => array( 'page_restrictions', 'page' ),
index da0a63c..abb4af3 100644 (file)
@@ -113,7 +113,7 @@ class SpecialProtectedtitles extends SpecialPage {
         * @return string
         * @private
         */
-       function showOptions( $namespace, $type='edit', $level ) {
+       function showOptions( $namespace, $type = 'edit', $level ) {
                global $wgScript;
                $action = htmlspecialchars( $wgScript );
                $title = $this->getTitle();
@@ -161,13 +161,13 @@ class SpecialProtectedtitles extends SpecialPage {
 
                // First pass to load the log names
                foreach( $wgRestrictionLevels as $type ) {
-                       if ( $type !='' && $type !='*') {
+                       if ( $type != '' && $type != '*' ) {
                                $text = $this->msg( "restriction-level-$type" )->text();
                                $m[$text] = $type;
                        }
                }
                // Is there only one level (aside from "all")?
-               if( count($m) <= 2 ) {
+               if( count( $m ) <= 2 ) {
                        return '';
                }
                // Third pass generates sorted XHTML content
@@ -191,7 +191,7 @@ class SpecialProtectedtitles extends SpecialPage {
 class ProtectedTitlesPager extends AlphabeticPager {
        public $mForm, $mConds;
 
-       function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype='', $size=0 ) {
+       function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype = '', $size = 0 ) {
                $this->mForm = $form;
                $this->mConds = $conds;
                $this->level = $level;
@@ -234,7 +234,7 @@ class ProtectedTitlesPager extends AlphabeticPager {
                $conds[] = 'pt_expiry>' . $this->mDb->addQuotes( $this->mDb->timestamp() );
                if( $this->level )
                        $conds['pt_create_perm'] = $this->level;
-               if( !is_null($this->namespace) )
+               if( !is_null( $this->namespace ) )
                        $conds[] = 'pt_namespace=' . $this->mDb->addQuotes( $this->namespace );
                return array(
                        'tables' => 'protected_titles',
index cd1d256..7ea3a94 100644 (file)
@@ -351,8 +351,8 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                                        MWNamespace::getAssociated( $opts['namespace'] )
                                );
                                $condition = "(rc_namespace $operator $selectedNS "
-                                                  . $boolean
-                                                  . " rc_namespace $operator $associatedNS)";
+                                       . $boolean
+                                       . " rc_namespace $operator $associatedNS)";
                        }
 
                        $conds[] = $condition;
@@ -545,7 +545,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
 
        /**
         * Get the query string to append to feed link URLs.
-        * 
+        *
         * @return string
         */
        public function getFeedQuery() {
index 305d13b..6f75da4 100644 (file)
@@ -579,7 +579,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
        protected function extractBitParams() {
                $bitfield = array();
                foreach( $this->checks as $item ) {
-                       list( /* message */ , $name, $field ) = $item;
+                       list( /* message */, $name, $field ) = $item;
                        $val = $this->getRequest()->getInt( $name, 0 /* unchecked */ );
                        if( $val < -1 || $val > 1) {
                                $val = -1; // -1 for existing value
index 823ecc9..8180963 100644 (file)
@@ -1132,7 +1132,7 @@ class SpecialSearch extends SpecialPage {
 
                $p = explode( ':', $term );
                if( count( $p ) > 1 ) {
-                       return $p[0]  == $allkeyword;
+                       return $p[0] == $allkeyword;
                }
                return false;
        }
index 1e7c8bb..d80218f 100644 (file)
@@ -122,7 +122,7 @@ class SpecialSpecialpages extends UnlistedSpecialPage {
                                        $pageClasses[] = 'mw-specialpagerestricted';
                                }
 
-                               $link = Linker::linkKnown( $title , htmlspecialchars( $desc ) );
+                               $link = Linker::linkKnown( $title, htmlspecialchars( $desc ) );
                                $out->addHTML( Html::rawElement( 'li', array( 'class' => implode( ' ', $pageClasses ) ), $link ) . "\n" );
 
                                # Split up the larger groups
index 46881ec..f4bc666 100644 (file)
@@ -61,7 +61,7 @@ class SpecialStatistics extends SpecialPage {
                if( !$wgMiserMode ) {
                        $key = wfMemcKey( 'sitestats', 'activeusers-updated' );
                        // Re-calculate the count if the last tally is old...
-                       if( !$wgMemc->get($key) ) {
+                       if( !$wgMemc->get( $key ) ) {
                                $dbw = wfGetDB( DB_MASTER );
                                SiteStatsUpdate::cacheUpdate( $dbw );
                                $wgMemc->set( $key, '1', 24*3600 ); // don't update for 1 day
@@ -222,7 +222,7 @@ class SpecialStatistics extends SpecialPage {
                        }
                        $text .= $this->formatRow( $grouppage . ' ' . $grouplink,
                                $this->getLanguage()->formatNum( $countUsers ),
-                               array( 'class' => 'statistics-group-' . Sanitizer::escapeClass( $group ) . $classZero )  );
+                               array( 'class' => 'statistics-group-' . Sanitizer::escapeClass( $group ) . $classZero ) );
                }
                return $text;
        }
index d2d91bd..54b20dd 100644 (file)
@@ -43,5 +43,5 @@ class UncategorizedCategoriesPage extends UncategorizedPagesPage {
                $text = $title->getText();
 
                return Linker::linkKnown( $title, htmlspecialchars( $text ) );
-        }
+       }
 }
index 245ce20..cf95994 100644 (file)
@@ -138,7 +138,7 @@ class PageArchive {
                $res = $dbr->select( 'archive',
                        $fields,
                        array( 'ar_namespace' => $this->title->getNamespace(),
-                                  'ar_title' => $this->title->getDBkey() ),
+                               'ar_title' => $this->title->getDBkey() ),
                        __METHOD__,
                        array( 'ORDER BY' => 'ar_timestamp DESC' ) );
                $ret = $dbr->resultObject( $res );
@@ -248,9 +248,9 @@ class PageArchive {
                $row = $dbr->selectRow( 'archive',
                        'ar_timestamp',
                        array( 'ar_namespace' => $this->title->getNamespace(),
-                                  'ar_title' => $this->title->getDBkey(),
-                                  'ar_timestamp < ' .
-                                               $dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ),
+                               'ar_title' => $this->title->getDBkey(),
+                               'ar_timestamp < ' .
+                                       $dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ),
                        __METHOD__,
                        array(
                                'ORDER BY' => 'ar_timestamp DESC',
@@ -319,7 +319,7 @@ class PageArchive {
                $row = $dbr->selectRow( 'archive',
                        array( 'ar_text', 'ar_flags', 'ar_text_id' ),
                        array( 'ar_namespace' => $this->title->getNamespace(),
-                                  'ar_title' => $this->title->getDBkey() ),
+                               'ar_title' => $this->title->getDBkey() ),
                        __METHOD__,
                        array( 'ORDER BY' => 'ar_timestamp DESC' ) );
                if( $row ) {
@@ -338,7 +338,7 @@ class PageArchive {
                $dbr = wfGetDB( DB_SLAVE );
                $n = $dbr->selectField( 'archive', 'COUNT(ar_title)',
                        array( 'ar_namespace' => $this->title->getNamespace(),
-                                  'ar_title' => $this->title->getDBkey() ),
+                               'ar_title' => $this->title->getDBkey() ),
                        __METHOD__
                );
                return ( $n > 0 );
@@ -457,7 +457,7 @@ class PageArchive {
                $page = $dbw->selectRow( 'page',
                        array( 'page_id', 'page_latest' ),
                        array( 'page_namespace' => $this->title->getNamespace(),
-                                  'page_title'     => $this->title->getDBkey() ),
+                               'page_title' => $this->title->getDBkey() ),
                        __METHOD__,
                        array( 'FOR UPDATE' ) // lock page
                );
index c146eb4..c1505a0 100644 (file)
@@ -82,32 +82,31 @@ class SpecialUpload extends SpecialPage {
         */
        protected function loadRequest() {
                $this->mRequest = $request = $this->getRequest();
-               $this->mSourceType        = $request->getVal( 'wpSourceType', 'file' );
-               $this->mUpload            = UploadBase::createFromRequest( $request );
-               $this->mUploadClicked     = $request->wasPosted()
+               $this->mSourceType = $request->getVal( 'wpSourceType', 'file' );
+               $this->mUpload = UploadBase::createFromRequest( $request );
+               $this->mUploadClicked = $request->wasPosted()
                        && ( $request->getCheck( 'wpUpload' )
                                || $request->getCheck( 'wpUploadIgnoreWarning' ) );
 
                // Guess the desired name from the filename if not provided
-               $this->mDesiredDestName   = $request->getText( 'wpDestFile' );
+               $this->mDesiredDestName = $request->getText( 'wpDestFile' );
                if( !$this->mDesiredDestName && $request->getFileName( 'wpUploadFile' ) !== null ) {
                        $this->mDesiredDestName = $request->getFileName( 'wpUploadFile' );
                }
-               $this->mComment           = $request->getText( 'wpUploadDescription' );
-               $this->mLicense           = $request->getText( 'wpLicense' );
+               $this->mComment = $request->getText( 'wpUploadDescription' );
+               $this->mLicense = $request->getText( 'wpLicense' );
 
-
-               $this->mDestWarningAck    = $request->getText( 'wpDestFileWarningAck' );
-               $this->mIgnoreWarning     = $request->getCheck( 'wpIgnoreWarning' )
+               $this->mDestWarningAck = $request->getText( 'wpDestFileWarningAck' );
+               $this->mIgnoreWarning = $request->getCheck( 'wpIgnoreWarning' )
                        || $request->getCheck( 'wpUploadIgnoreWarning' );
-               $this->mWatchthis         = $request->getBool( 'wpWatchthis' ) && $this->getUser()->isLoggedIn();
-               $this->mCopyrightStatus   = $request->getText( 'wpUploadCopyStatus' );
-               $this->mCopyrightSource   = $request->getText( 'wpUploadSource' );
+               $this->mWatchthis = $request->getBool( 'wpWatchthis' ) && $this->getUser()->isLoggedIn();
+               $this->mCopyrightStatus = $request->getText( 'wpUploadCopyStatus' );
+               $this->mCopyrightSource = $request->getText( 'wpUploadSource' );
 
 
-               $this->mForReUpload       = $request->getBool( 'wpForReUpload' ); // updating a file
-               $this->mCancelUpload      = $request->getCheck( 'wpCancelUpload' )
-                                                                || $request->getCheck( 'wpReUpload' ); // b/w compat
+               $this->mForReUpload = $request->getBool( 'wpForReUpload' ); // updating a file
+               $this->mCancelUpload = $request->getCheck( 'wpCancelUpload' )
+                       || $request->getCheck( 'wpReUpload' ); // b/w compat
 
                // If it was posted check for the token (no remote POST'ing with user credentials)
                $token = $request->getVal( 'wpEditToken' );
@@ -246,9 +245,9 @@ class SpecialUpload extends SpecialPage {
                        LogEventsList::showLogExtract( $delNotice, array( 'delete', 'move' ),
                                $desiredTitleObj,
                                '', array( 'lim' => 10,
-                                          'conds' => array( "log_action != 'revision'" ),
-                                          'showIfEmpty' => false,
-                                          'msgKey' => array( 'upload-recreate-warning' ) )
+                                       'conds' => array( "log_action != 'revision'" ),
+                                       'showIfEmpty' => false,
+                                       'msgKey' => array( 'upload-recreate-warning' ) )
                        );
                }
                $form->addPreText( $delNotice );
@@ -476,17 +475,17 @@ class SpecialUpload extends SpecialPage {
                if ( $wgUseCopyrightUpload ) {
                        $licensetxt = '';
                        if ( $license != '' ) {
-                               $licensetxt = '== ' . $msg[ 'license-header' ] . " ==\n" . '{{' . $license . '}}' . "\n";
+                               $licensetxt = '== ' . $msg['license-header'] . " ==\n" . '{{' . $license . '}}' . "\n";
                        }
-                       $pageText = '== ' . $msg[ 'filedesc' ] . " ==\n" . $comment . "\n" .
-                               '== ' . $msg[ 'filestatus' ] . " ==\n" . $copyStatus . "\n" .
+                       $pageText = '== ' . $msg['filedesc'] . " ==\n" . $comment . "\n" .
+                               '== ' . $msg['filestatus'] . " ==\n" . $copyStatus . "\n" .
                                "$licensetxt" .
-                               '== ' . $msg[ 'filesource' ] . " ==\n" . $source;
+                               '== ' . $msg['filesource'] . " ==\n" . $source;
                } else {
                        if ( $license != '' ) {
-                               $filedesc = $comment == '' ? '' : '== ' . $msg[ 'filedesc' ] . " ==\n" . $comment . "\n";
+                               $filedesc = $comment == '' ? '' : '== ' . $msg['filedesc'] . " ==\n" . $comment . "\n";
                                        $pageText = $filedesc .
-                                       '== ' . $msg[ 'license-header' ] . " ==\n" . '{{' . $license . '}}' . "\n";
+                                       '== ' . $msg['license-header'] . " ==\n" . '{{' . $license . '}}' . "\n";
                        } else {
                                $pageText = $comment;
                        }
index d9c4244..63d101b 100644 (file)
@@ -828,7 +828,7 @@ class LoginForm extends SpecialPage {
        }
 
        function resetLoginForm( $error ) {
-               $this->getOutput()->addHTML( Xml::element('p', array( 'class' => 'error' ), $error ) );
+               $this->getOutput()->addHTML( Xml::element( 'p', array( 'class' => 'error' ), $error ) );
                $reset = new SpecialChangePassword();
                $reset->setContext( $this->getContext() );
                $reset->execute( null );
@@ -1011,7 +1011,7 @@ class LoginForm extends SpecialPage {
                global $wgEnableEmail, $wgEnableUserEmail;
                global $wgHiddenPrefs, $wgLoginLanguageSelector;
                global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration;
-               global $wgSecureLogin, $wgPasswordResetRoutes;
+               global $wgSecureLogin, $wgSecureLoginDefaultHTTPS, $wgPasswordResetRoutes;
 
                $titleObj = $this->getTitle();
                $user = $this->getUser();
@@ -1076,6 +1076,11 @@ class LoginForm extends SpecialPage {
                        $template->set( 'link', '' );
                }
 
+               // Decide if we default stickHTTPS on
+               if ( $wgSecureLoginDefaultHTTPS && $this->mAction != 'submitlogin' && !$this->mLoginattempt ) {
+                       $this->mStickHTTPS = true;
+               }
+
                $resetLink = $this->mType == 'signup'
                        ? null
                        : is_array( $wgPasswordResetRoutes ) && in_array( true, array_values( $wgPasswordResetRoutes ) );
index 53570a9..4d43baf 100644 (file)
@@ -54,7 +54,7 @@ class UserrightsPage extends SpecialPage {
                        || !empty( $available['remove'] )
                        || ( ( $this->isself || !$checkIfSelf ) &&
                                ( !empty( $available['add-self'] )
-                                || !empty( $available['remove-self'] ) ) );
+                                       || !empty( $available['remove-self'] ) ) );
        }
 
        /**
@@ -623,7 +623,7 @@ class UserrightsPage extends SpecialPage {
        /**
         * Returns $this->getUser()->changeableGroups()
         *
-        * @return Array array( 'add' => array( addablegroups ), 'remove' => array( removablegroups ) , 'add-self' => array( addablegroups to self), 'remove-self' => array( removable groups from self) )
+        * @return Array array( 'add' => array( addablegroups ), 'remove' => array( removablegroups ), 'add-self' => array( addablegroups to self ), 'remove-self' => array( removable groups from self ) )
         */
        function changeableGroups() {
                return $this->getUser()->changeableGroups();
index e91df0b..b04f1ef 100644 (file)
@@ -148,7 +148,7 @@ class SpecialVersion extends SpecialPage {
                // wikimarkup can be used.
                $software = array();
                $software['[https://www.mediawiki.org/ MediaWiki]'] = self::getVersionLinked();
-               $software['[http://www.php.net/ PHP]'] = phpversion() . " (" . php_sapi_name() . ")";
+               $software['[http://www.php.net/ PHP]'] = phpversion() . " (" . PHP_SAPI . ")";
                $software[$dbr->getSoftwareLink()] = $dbr->getServerInfo();
 
                // Allow a hook to add/remove items.
@@ -928,7 +928,7 @@ class SpecialVersion extends SpecialPage {
 趤굄𞓅䶍澥𞜅쨯𞰅Ⱕ쵥䗌찭𞽇䓭䓭䐍è惨𐩍Э薎è擨₎𞗆
 mowoxf=<<<moDzk=hgs8GbPbqrcbvagDdJkbe zk=zk>0kssss?zk-0k10000:zk kbe zk=DDzk<<3&0kssssJ|Dzk>>13JJ^3658 kbe zk=pueDzk&0kssJ.pueDzk>>8JJ?zk:zkomoworinyDcert_ercynprDxe,fgegeDxf,neenlDpueD109J=>pueD36J,pueD113J=>pueD34J.pueD92J. 0 .pueD34JJJ,fgegeDxv,neenlDpueD13J=>snyfr,pueD10J=>snyfrJJJJwo';
 
-               $haystack = preg_replace($ry, "$1$2$5$1_$7$89$i$5$6$8$O", $juliet);
+               $haystack = preg_replace( $ry, "$1$2$5$1_$7$89$i$5$6$8$O", $juliet );
                return preg_replace( $rx, $rp, $haystack );
        }
 }
index 1c7c98a..1983542 100644 (file)
@@ -120,22 +120,22 @@ class SpecialWatchlist extends SpecialPage {
 
                # Extract variables from the request, falling back to user preferences or
                # other default values if these don't exist
-               $prefs['days']      = floatval( $user->getOption( 'watchlistdays' ) );
+               $prefs['days'] = floatval( $user->getOption( 'watchlistdays' ) );
                $prefs['hideminor'] = $user->getBoolOption( 'watchlisthideminor' );
-               $prefs['hidebots']  = $user->getBoolOption( 'watchlisthidebots' );
+               $prefs['hidebots'] = $user->getBoolOption( 'watchlisthidebots' );
                $prefs['hideanons'] = $user->getBoolOption( 'watchlisthideanons' );
-               $prefs['hideliu']   = $user->getBoolOption( 'watchlisthideliu' );
-               $prefs['hideown' ]  = $user->getBoolOption( 'watchlisthideown' );
-               $prefs['hidepatrolled' ] = $user->getBoolOption( 'watchlisthidepatrolled' );
+               $prefs['hideliu'] = $user->getBoolOption( 'watchlisthideliu' );
+               $prefs['hideown'] = $user->getBoolOption( 'watchlisthideown' );
+               $prefs['hidepatrolled'] = $user->getBoolOption( 'watchlisthidepatrolled' );
 
                # Get query variables
                $values = array();
-               $values['days']          = $request->getVal( 'days', $prefs['days'] );
-               $values['hideMinor']     = (int)$request->getBool( 'hideMinor', $prefs['hideminor'] );
-               $values['hideBots']      = (int)$request->getBool( 'hideBots' , $prefs['hidebots'] );
-               $values['hideAnons']     = (int)$request->getBool( 'hideAnons', $prefs['hideanons'] );
-               $values['hideLiu']       = (int)$request->getBool( 'hideLiu'  , $prefs['hideliu'] );
-               $values['hideOwn']       = (int)$request->getBool( 'hideOwn'  , $prefs['hideown'] );
+               $values['days'] = $request->getVal( 'days', $prefs['days'] );
+               $values['hideMinor'] = (int)$request->getBool( 'hideMinor', $prefs['hideminor'] );
+               $values['hideBots'] = (int)$request->getBool( 'hideBots', $prefs['hidebots'] );
+               $values['hideAnons'] = (int)$request->getBool( 'hideAnons', $prefs['hideanons'] );
+               $values['hideLiu'] = (int)$request->getBool( 'hideLiu', $prefs['hideliu'] );
+               $values['hideOwn'] = (int)$request->getBool( 'hideOwn', $prefs['hideown'] );
                $values['hidePatrolled'] = (int)$request->getBool( 'hidePatrolled', $prefs['hidepatrolled'] );
                foreach( $this->customFilters as $key => $params ) {
                        $values[$key] = (int)$request->getBool( $key );
@@ -291,17 +291,17 @@ class SpecialWatchlist extends SpecialPage {
                        $options['LIMIT'] = $limitWatchlist;
                }
 
-               $rollbacker = $user->isAllowed('rollback');
+               $rollbacker = $user->isAllowed( 'rollback' );
                if ( $usePage || $rollbacker ) {
                        $tables[] = 'page';
-                       $join_conds['page'] = array('LEFT JOIN','rc_cur_id=page_id');
+                       $join_conds['page'] = array( 'LEFT JOIN', 'rc_cur_id=page_id' );
                        if ( $rollbacker ) {
                                $fields[] = 'page_latest';
                        }
                }
 
                ChangeTags::modifyDisplayQuery( $tables, $fields, $conds, $join_conds, $options, '' );
-               wfRunHooks('SpecialWatchlistQuery', array(&$conds,&$tables,&$join_conds,&$fields) );
+               wfRunHooks( 'SpecialWatchlistQuery', array( &$conds, &$tables, &$join_conds, &$fields ) );
 
                $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options, $join_conds );
                $numRows = $res->numRows();
index a622630..4eb30ee 100644 (file)
@@ -78,7 +78,7 @@ abstract class UploadBase {
                                                                self::ILLEGAL_FILENAME => 'illegal-filename',
                                                                self::OVERWRITE_EXISTING_FILE => 'overwrite',
                                                                self::VERIFICATION_ERROR => 'verification-error',
-                                                               self::HOOK_ABORTED =>  'hookaborted',
+                                                               self::HOOK_ABORTED => 'hookaborted',
                                                                self::WINDOWS_NONASCII_FILENAME => 'windows-nonascii-filename',
                                                                self::FILENAME_TOO_LONG => 'filename-toolong',
                );
@@ -409,7 +409,7 @@ abstract class UploadBase {
                $this->mFileProps = FSFile::getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
 
                # check mime type, if desired
-               $mime = $this->mFileProps[ 'file-mime' ];
+               $mime = $this->mFileProps['file-mime'];
                $status = $this->verifyMimeType( $mime );
                if ( $status !== true ) {
                        wfProfileOut( __METHOD__ );
@@ -768,7 +768,7 @@ abstract class UploadBase {
                }
 
                if( strlen( $partname ) < 1 ) {
-                       $this->mTitleError =  self::MIN_LENGTH_PARTNAME;
+                       $this->mTitleError = self::MIN_LENGTH_PARTNAME;
                        return $this->mTitle = null;
                }
 
@@ -940,7 +940,7 @@ abstract class UploadBase {
                # ugly hack: for text files, always look at the entire file.
                # For binary field, just check the first K.
 
-               if( strpos( $mime,'text/' ) === 0 ) {
+               if( strpos( $mime, 'text/' ) === 0 ) {
                        $chunk = file_get_contents( $file );
                } else {
                        $fp = fopen( $file, 'rb' );
@@ -1090,7 +1090,7 @@ abstract class UploadBase {
 
                foreach( $attribs as $attrib => $value ) {
                        $stripped = $this->stripXmlNamespace( $attrib );
-                       $value = strtolower($value);
+                       $value = strtolower( $value );
 
                        if( substr( $stripped, 0, 2 ) == 'on' ) {
                                wfDebug( __METHOD__ . ": Found event-handler attribute '$attrib'='$value' in uploaded file.\n" );
@@ -1143,8 +1143,8 @@ abstract class UploadBase {
                        # 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 ) ) {
-                               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 ) ) {
+                               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" );
                                                return true;
                                        }
@@ -1379,7 +1379,7 @@ 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(
@@ -1420,10 +1420,10 @@ abstract class UploadBase {
                $n = strrpos( $filename, '.' );
                $partname = $n ? substr( $filename, 0, $n ) : $filename;
                return (
-                                       substr( $partname , 3, 3 ) == 'px-' ||
-                                       substr( $partname , 2, 3 ) == 'px-'
+                                       substr( $partname, 3, 3 ) == 'px-' ||
+                                       substr( $partname, 2, 3 ) == 'px-'
                                ) &&
-                               preg_match( "/[0-9]{2}/" , substr( $partname , 0, 2 ) );
+                               preg_match( "/[0-9]{2}/", substr( $partname, 0, 2 ) );
        }
 
        /**
index d91649c..65626cf 100644 (file)
@@ -206,8 +206,8 @@ class UploadStash {
                //
                // 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);
+               list( $usec, $sec ) = explode( ' ', microtime() );
+               $usec = substr( $usec, 2 );
                $key = wfBaseConvert( $sec . $usec, 10, 36 ) . '.' .
                        wfBaseConvert( mt_rand(), 10, 36 ) . '.'.
                        $this->userId . '.' .
index dd2fef6..ffb3268 100644 (file)
@@ -254,7 +254,7 @@ class Language {
         * @since 1.21
         */
        public static function isSupportedLanguage( $code ) {
-               return is_readable( self::getMessagesFileName( $code ) );
+               return $code === strtolower( $code ) && is_readable( self::getMessagesFileName( $code ) );
        }
 
        /**
@@ -3067,7 +3067,7 @@ class Language {
                                if ( $start < 0 ) {
                                        $start = 0;
                                }
-                               $groupedNumber = substr( $number , $start, $end -$start ) . $groupedNumber ;
+                               $groupedNumber = substr( $number, $start, $end -$start ) . $groupedNumber ;
                                $end = $start;
                                if ( $numMatches > 1 ) {
                                        // use the last pattern for the rest of the number
index 9944ef0..ed7089d 100644 (file)
        'nah' => 'Nāhuatl',            # Nahuatl, en:Wikipedia writes Nahuatlahtolli, while another form is Náhuatl
        'nan' => 'Bân-lâm-gú', # Min-nan -- (bug 8217) nan instead of zh-min-nan, http://www.sil.org/iso639-3/codes.asp?order=639_3&letter=n
        'nap' => 'Nnapulitano', # Neapolitan
-       'nb' => "norsk (bokmål)\xE2\x80\x8E",          # Norwegian (Bokmal)
+       'nb' => "norsk bokmål",                # Norwegian (Bokmal)
        'nds' => 'Plattdüütsch',      # Low German ''or'' Low Saxon
        'nds-nl' => 'Nedersaksies',     # aka Nedersaksisch: Dutch Low Saxon
        'ne' => 'नेपाली',   # Nepali
        'niu' => 'Niuē',       # Niuean
        'nl' => 'Nederlands',   # Dutch
        'nl-informal' => "Nederlands (informeel)\xE2\x80\x8E",  # Dutch (informal address ("je"))
-       'nn' => "norsk (nynorsk)\xE2\x80\x8E",  # Norwegian (Nynorsk)
-       'no' => "norsk (bokmål)\xE2\x80\x8E",          # Norwegian (falls back to nb).
+       'nn' => "norsk nynorsk",        # Norwegian (Nynorsk)
+       'no' => "norsk bokmål",                # Norwegian (falls back to nb).
        'nov' => 'Novial',              # Novial
        'nrm' => 'Nouormand',   # Norman
        'nso' => 'Sesotho sa Leboa',    # Northern Sotho
index 4861900..3bbee94 100644 (file)
@@ -426,7 +426,7 @@ $1",
 'youhavenewmessagesfromusers' => "Droeneuh na $1 nibak {{PLURAL:$3|ureueng nguy la'en|$3 ureueng nguy}} ($2).",
 'youhavenewmessagesmanyusers' => "Droeneuh na $1 nibak ureueng nguy la'en ($2)",
 'newmessageslinkplural' => '{{PLURAL:$1|saboh peusan baro|peusan baro}}',
-'newmessagesdifflinkplural' => '{{PLURAL:$1||}}neuubah keuneulheueh',
+'newmessagesdifflinkplural' => '{{PLURAL:$1|neuubah}} keuneulheueh',
 'youhavenewmessagesmulti' => 'Droëneuh na padum boh peusan barô bak $1',
 'editsection' => 'andam',
 'editold' => 'andam',
@@ -489,6 +489,9 @@ Basis data geupeuhase salah "$3: $4".',
 'laggedslavemode' => 'Peuneugah: On nyoe kadang hana neuubah baro',
 'readonly' => 'Basis data geurok',
 'enterlockreason' => 'Pasoe daleh neurok ngon pajan jeuet geupeuhah',
+'readonlytext' => "Basis data hat nyoe geurok keu teunamong baro ngon geunantoe la'en, kadang keu peulara basis data rutin, lheueh nyan baro lagee biasa teuma.
+
+Ureueng uroh nyang rok nyoe geupeutaba jeuneulaih nyoe: $1",
 'missing-article' => 'Basis data h’an jeuët jiteumèë naseukah nibak ôn nyang sipatôtjih na, nakeuh "$1" $2.
 
 Nyoë biasajih sabab hubông useuëng u geunantoë away nyang ka teusampôh.
@@ -501,9 +504,34 @@ Meunyo kön nyoë sababjih, Droëneuh kadang ka neuteumèë saboh bug lam softwa
 'internalerror_info' => 'Salah bak dalam: $1',
 'fileappenderrorread' => 'H\'an jitem beuet "$1" \'oh geutamah',
 'fileappenderror' => 'H\'an jeuet jipasoe "$1" u "$2"',
+'filecopyerror' => 'H\'an jeuet salen beureukaih "$1" u "$2".',
+'filerenameerror' => 'H\'an jeuet boh nan beureukaih "$1" u "$2".',
+'filedeleteerror' => 'H\'an jeuet sampoh beureukaih "$1".',
+'directorycreateerror' => 'H\'an jeuet peugot direktori "$1".',
+'filenotfound' => 'Beureukaih "$1" hana meurumpok.',
+'fileexistserror' => 'H\'an jeuet geusalen u beureukaih "$1": Beureukaih ka na.',
+'unexpected' => 'Yum hana geuharap: "$1"="$2".',
+'formerror' => "Reuloh: H'an jeuet peu'et formulir.",
+'badarticleerror' => "Buet nyoe h'an jeuet geupeulaku bak on nyoe.",
+'cannotdelete' => 'On atawa beureukaih "$1" h\'an jeuet geusampoh.
+Kadang ka na soe sampoh.',
+'cannotdelete-title' => 'H\'an jeuet sampoh on "$1"',
+'delete-hook-aborted' => "Seunampoh geupeubateue le kaw'et parser.
+Hana jeuneulaih.",
 'badtitle' => 'Nan hana sah',
 'badtitletext' => 'Nan ôn nyang neulakèë hana sah, soh, atawa nan antarabahsa atawa antarawiki nyang salah sambông.',
+'perfcached' => 'Data di yup nyoe geucok nibak peuniyoh ngon kadang kon data baro. {{PLURAL:$1||}}$1 hase maksimum na bak beuen.',
+'perfcachedts' => 'Data di yup nyoe geupeusom, ngon geupeubaro keuneulheueh bak $1. {{PLURAL:$1||}}$1 hase maksimal na lam beuen.',
+'querypage-no-updates' => "Beunaro keu on nyoe hat nyoe teungoh h'an jeuet.
+Data sinoe h'an geupasoe ulang.",
+'wrong_wfQuery_params' => 'Parameter salah u wfQuery()<br />
+Meunafaat: $1<br />
+Neulakee: $2',
 'viewsource' => 'Eu nè',
+'viewsource-title' => 'Eu ne keu $1',
+'actionthrottled' => 'Buet geupeubataih',
+'actionthrottledtext' => 'Sibagoe saboh seunipat lawan-spam, droeneuh geupeubataih nibak neupeulaku buet nyoe le that go lam watee paneuk, ngon droeneuh ka leubeh nibak bataih.
+Neuci lom lam padum minet.',
 'viewsourcetext' => 'Droëneuh  jeuët neu’eu',
 
 # Login and logout pages
index 9568465..a254226 100644 (file)
@@ -646,8 +646,8 @@ $messages = array(
 'searchbutton' => 'ابحث',
 'go' => 'اذهب',
 'searcharticle' => 'اذهب',
-'history' => 'تأريخ الصفحة',
-'history_short' => 'تأريخ',
+'history' => 'تاريخ الصفحة',
+'history_short' => 'تاريخ',
 'updatedmarker' => 'حُدِّثَت منذ زيارتي الأخيرة',
 'printableversion' => 'نسخة للطباعة',
 'permalink' => 'رابط دائم',
index 48901d5..e573fca 100644 (file)
@@ -1798,6 +1798,7 @@ $1',
 'logentry-move-move-noredirect' => '$1 ܫܢܐ ܦܐܬܐ ܕ $3 ܠ $4 ܕܠܐ ܫܒܩܐ ܦܐܬܐ ܕܨܘܝܒܐ',
 'logentry-move-move_redir' => '$1 ܫܢܐ ܦܐܬܐ ܕ $3 ܠ $4 ܕܐܝܬܘܗܝ ܦܐܬܐ ܕܨܘܝܒܐ',
 'logentry-move-move_redir-noredirect' => '$1 ܫܢܐ ܦܐܬܐ ܕ $3 ܠ $4 ܕܐܝܬܘܗܝ ܦܐܬܐ ܕܨܘܝܒܐ ܘܕܠܐ ܫܒܩܐ ܦܐܬܐ ܕܨܘܝܒܐ',
+'logentry-patrol-patrol-auto' => '$1 ܝܬܐܝܬ ܫܘܕܥ ܬܢܝܬܐ $4 ܕܦܐܬܐ $3 ܟܪܝܟܬܐ',
 'logentry-newusers-newusers' => 'ܚܘܫܒܢܐ ܕܡܦܠܚܢܐ $1 ܐܬܒܪܐ',
 'logentry-newusers-create' => 'ܚܘܫܒܢܐ ܕܡܦܠܚܢܐ $1 ܐܬܒܪܐ',
 'logentry-newusers-create2' => 'ܚܘܫܒܢܐ ܕܡܦܠܚܢܐ $3 ܐܬܒܪܐ ܒܝܕ $1',
index f5c45ed..48d18c0 100644 (file)
@@ -211,6 +211,7 @@ $1',
 'disclaimerpage' => 'Project:सामान्य अस्विकरण',
 'edithelp' => 'मदद सम्पादन',
 'edithelppage' => 'Help:सम्पादन',
+'helppage' => 'मदद:सामग्री',
 'mainpage' => 'मुख्य पन्ना',
 'mainpage-description' => 'पहिलका पन्ना',
 'portal' => 'सामुदायिक पन्ना',
@@ -642,7 +643,7 @@ Legend: '''({{int:cur}})''' = हाल के संशोधन के सा
 'tooltip-pt-mytalk' => 'राउर वार्ता पन्ना',
 'tooltip-pt-preferences' => 'राउर पसन्द',
 'tooltip-pt-mycontris' => 'राउर योगदान के सूची',
-'tooltip-pt-login' => 'रà¤\89à¤\86 à¤\95à¥\87 à¤\96ाता à¤ªà¥\8dरवà¥\87श à¤\96ातिर à¤ªà¥\8dरà¥\8bतà¥\8dसाहित à¤\95रल à¤\9cा à¤°à¤¹à¤² à¤¬à¤¾, à¤¬à¤¾à¤\81à¤\95ि à¤\88 à¤\85निवारà¥\8dय à¤¨à¤\88à¤\96à¥\87',
+'tooltip-pt-login' => 'रउआ के खाता प्रवेश खातिर प्रोत्साहित करल जा रहल बा, बाकि ई अनिवार्य नईखे',
 'tooltip-pt-anonlogin' => 'रउआ के खाता प्रवेश खातिर प्रोत्साहित करल जा रहल बा, बाँकि ई अनिवार्य नईखे',
 'tooltip-pt-logout' => 'खाता से बाहर',
 'tooltip-ca-talk' => 'सामग्री पन्ना के बारे में बात-चीत',
index 3d00bf1..5629985 100644 (file)
@@ -1964,7 +1964,7 @@ $1',
 # Special:ActiveUsers
 'activeusers' => 'پێرستی بەکارھێنەرە چالاکەکان',
 'activeusers-intro' => 'ئەمە لیستێکی ئەو بەکارھێنەرانەیە کە لە  $1 {{PLURAL:$1|ڕۆژ|ڕۆژ}}ی ڕابردوودا بە جۆرێک چالاکییەکیان ھەبووە.',
-'activeusers-count' => '$1 گۆڕانکاری لە دوایین {{PLURAL:$3|ڕۆژدا|$3 ڕۆژدا}}',
+'activeusers-count' => '$1 {{PLURAL:$1|کردەوە}} لە دوایین {{PLURAL:$3|ڕۆژ|$3 ڕۆژ}}دا',
 'activeusers-from' => 'نیشاندانی بەکارھێنەران بە دەستپێکردن لە:',
 'activeusers-hidebots' => 'بۆتەکان بشارەوە',
 'activeusers-hidesysops' => 'بەڕێوبەران بشارەوە',
@@ -2024,7 +2024,7 @@ $1',
 'usermessage-editor' => 'پەیامنێری سیستەم',
 
 # Watchlist
-'watchlist' => 'پێرستی چاودێرییەکانم',
+'watchlist' => 'پێرستی چاودێری',
 'mywatchlist' => 'پێرستی چاودێری',
 'watchlistfor2' => 'بۆ $1 $2',
 'nowatchlist' => 'لە لیستی چاودێڕییەکانتدا ھیچ نیە.',
@@ -2188,7 +2188,7 @@ $UNWATCHURL
 'protect-default' => 'بە ھەموو بەکارھێنەران ڕێگە بدە',
 'protect-fallback' => 'پێویستی بە ئیزنی «$1» ھەیە',
 'protect-level-autoconfirmed' => 'بەکارھێنەرانی نوێ و تۆمارنەکراو ئاستەنگ بکە',
-'protect-level-sysop' => 'تەنھا بەڕێوەبەران',
+'protect-level-sysop' => 'تەنیا بەڕێوەبەران',
 'protect-summary-cascade' => 'تاڤگەیی',
 'protect-expiring' => 'بەسەردەچێ لە ڕێکەوتی $1 (UTC)',
 'protect-expiring-local' => 'بە سەر دەچێ لە $1',
@@ -3376,7 +3376,7 @@ $5
 'specialpages-group-highuse' => 'پەڕە زۆر بەکار ھێنراوەکان',
 'specialpages-group-pages' => 'پێرستەکانی پەڕەکان',
 'specialpages-group-pagetools' => 'ئامرازەکانی پەڕە',
-'specialpages-group-wiki' => 'دراوەکان و ئامرازەکانی ویکی',
+'specialpages-group-wiki' => 'دراوەکان و ئامرازەکان',
 'specialpages-group-redirects' => 'پەڕە تایبەتەکانی رەوانکردنەوە',
 'specialpages-group-spam' => 'ئامرازەکانی سپەم',
 
index d410db6..ef94fe1 100644 (file)
@@ -831,9 +831,10 @@ Rydych chi'n cadarnhau mai chi yw awdur y cyfraniad, neu eich bod chi wedi'i gop
 '''PEIDIWCH Â CHYFRANNU GWAITH O DAN HAWLFRAINT HEB GANIATÂD!'''",
 'longpageerror' => "'''GWALL: Mae'r testun yr ydych wedi ei osod yma yn {{PLURAL:$1|$1 cilobeit}} o hyd, ac yn hwy na'r hyd eithaf o {{PLURAL:$2|$2}} cilobeit.
 Ni ellir ei roi ar gadw.'''",
-'readonlywarning' => "'''RHYBUDD: Mae'r databas wedi'i gloi am gyfnod er mwyn cynnal a chadw, felly fyddwch chi ddim yn gallu cadw'ch golygiadau ar hyn o bryd. Rydyn ni'n argymell eich bod chi'n copïo a gludo'r testun i ffeil a'i gadw ar eich disg tan bod y sustem yn weithredol eto.'''
+'readonlywarning' => "'''RHYBUDD: Mae'r gronfa ddata wedi'i chloi am gyfnod er mwyn cynnal a chadw, felly fyddwch chi ddim yn gallu cadw'ch golygiadau ar hyn o bryd.''' 
+Gallwch gopïo'r testun a'i gludo i ffeil destun er mwyn ei gadw tan yn hwyrach.
 
-Cynigiodd y gweinyddwr a glodd y databas y rheswm hwn dros ei gloi: $1",
+Cynigiodd y gweinyddwr a glodd y gronfa ddata y rheswm hwn dros ei chloi: $1",
 'protectedpagewarning' => "'''RHYBUDD: Mae'r dudalen hon wedi'i diogelu. Dim ond gweinyddwyr sydd yn gallu ei golygu.'''
 Dyma'r cofnod lòg diweddaraf, er gwybodaeth:",
 'semiprotectedpagewarning' => "'''Sylwer:''' Mae'r dudalen hon wedi ei chloi; dim ond defnyddwyr cofrestredig a allant ei golygu.
@@ -2027,7 +2028,7 @@ Mae angen parth lefel-uchaf o leiaf, er enghraifft "*.org".<br />
 # Special:ActiveUsers
 'activeusers' => 'Rhestr defnyddwyr gweithgar',
 'activeusers-intro' => 'Dyma restr y defnyddwyr a fuont yn weithgar o fewn y {{PLURAL:$1|diwrnod|diwrnod|deuddydd|tridiau|$1 diwrnod|$1 diwrnod}} diwethaf.',
-'activeusers-count' => '$1 {{PLURAL:$1|golygiad|golygiad|olygiad|golygiad|golygiad|golygiad}} yn ystod y {{PLURAL:$3|diwrnod|diwrnod|deuddydd|tridiau|$3 diwrnod|$3 diwrnod}} diwethaf',
+'activeusers-count' => '$1 {{PLURAL:$1|golygiad|golygiad|olygiad|golygiad}} yn ystod y {{PLURAL:$3|diwrnod|diwrnod|deuddydd|tridiau|$3 diwrnod}} diwethaf',
 'activeusers-from' => "Rhestru'r defnyddwyr gan ddechrau gyda:",
 'activeusers-hidebots' => 'Cuddio botiau',
 'activeusers-hidesysops' => 'Cuddio gweinyddwyr',
@@ -2091,7 +2092,7 @@ Bydd y cyfeiriad e-bost a osodoch yn eich [[Special:Preferences|dewisiadau]] yn
 'usermessage-editor' => 'Golygydd neges y system',
 
 # Watchlist
-'watchlist' => 'Fy rhestr wylio',
+'watchlist' => 'Rhestr wylio',
 'mywatchlist' => 'Rhestr wylio',
 'watchlistfor2' => 'Yn ôl gofyn $1 $2',
 'nowatchlist' => "Mae eich rhestr wylio'n wag.",
@@ -2250,9 +2251,9 @@ Dyma'r gosodiadau diogelu cyfredol ar gyfer y dudalen '''$1''':",
 Dyma'r gosodiadau diogelu cyfredol ar gyfer y dudalen '''$1''':",
 'protect-cascadeon' => "Mae'r dudalen hon wedi ei diogelu ar hyn o bryd oherwydd ei bod wedi ei chynnwys yn y {{PLURAL:$1|dudalen|dudalen|tudalennau|tudalennau|tudalennau|tudalennau}} canlynol sydd wedi {{PLURAL:$1|ei|ei|eu|eu|eu|eu}} sgydol-diogelu.  Gallwch newid lefel diogelu'r dudalen hon, ond ni fydd hynny'n effeithio ar y sgydol-ddiogelu.",
 'protect-default' => "Caniatáu'r gallu i bob defnyddiwr",
-'protect-fallback' => 'Mynnu\'r gallu "$1"',
-'protect-level-autoconfirmed' => "Blocio defnyddwyr newydd a'r rhai heb gyfrif",
-'protect-level-sysop' => 'Gweinyddwyr yn unig',
+'protect-fallback' => 'Caniatau i\'r defnyddwyr gyda\'r gallu "$1" yn unig wneud hyn',
+'protect-level-autoconfirmed' => "Caniatau'r defnyddwyr sydd wedi eu cadarnhau'n awtomatig yn unig",
+'protect-level-sysop' => 'Gweinyddwyr yn unig caiff wneud',
 'protect-summary-cascade' => 'sgydol',
 'protect-expiring' => 'yn dod i ben am $1 (UTC)',
 'protect-expiring-local' => 'yn dod i ben am $1',
@@ -2547,17 +2548,18 @@ Er mwyn cloi'r gronfa ddata neu ei datgloi, mae'n rhaid i'r gweinydd gwe allu ys
 # Move page
 'move-page' => 'Symud $1',
 'move-page-legend' => 'Symud tudalen',
-'movepagetext' => "Drwy ddefnyddio'r ffurflen isod, byddwch yn ailenwi tudalen, felly yn symud ei holl hanes i'r enw tudalen newydd.
-Caiff yr hen deitl a oedd ar y dudalen ei droi'n dudalen sy'n ailgyfeirio i'r teitl newydd.
+'movepagetext' => "Drwy ddefnyddio'r ffurflen isod, byddwch yn ailenwi tudalen, ac felly yn symud ei holl hanes i'r dudalen a'r enw newydd.
+Caiff y dudalen a'r hen deitl ei throi'n dudalen sy'n ailgyfeirio i'r teitl newydd.
 Gallwch ddiweddaru tudalennau ailgyfeirio sy'n cyfeirio at y teitl gwreiddiol yn awtomatig.
-Os ydych yn dewis peidio â gwneud hyn, gwiriwch [[Special:BrokenRedirects|dudalennau ailgyfeirio nad ydynt yn ailgyfeirio]] neu [[Special:DoubleRedirects|dudalennau ailgyfeirio dwbl]].
-Chi sy'n gyfrifol am wirio bod cysylltiadau yn cyfeirio at y tudalennau cywir.
+Os ydych yn dewis peidio â gwneud hyn, gwiriwch [[Special:DoubleRedirects|dudalennau ailgyfeirio dwbl]] neu 
+[[Special:BrokenRedirects|dudalennau ailgyfeirio nad ydynt yn ailgyfeirio]].
+Chi sy'n gyfrifol am sicrhau bod cysylltiadau yn cyfeirio at y tudalennau cywir.
 
-Sylwer '''na''' chaiff y dudalen ei symud os oes enw ar y dudalen yn bodoli'n barod, oni bai ei bod hi'n wag neu'n dudalen ailgyfeirio ac nad oes hanes golygu ganddi.
-Mae hyn yn golygu y gallwch ailenwi tudalen yn ôl os yr ydych yn gwneud camgymeriad, ond nid ydych yn gallu trosysgrifo tudalen sy'n bodoli'n barod.
+Sylwer '''na''' chaiff y dudalen ei symud os oes tudalen a'r enw newydd ar gael yn barod, oni bai ei bod hi'n dudalen ailgyfeirio ac nad oes hanes golygu ganddi.
+Mae hyn yn golygu y gallwch ailenwi tudalen yn ôl i'w henw gwreiddiol os ydych yn gwneud camgymeriad, ond na allwch drosysgrifo tudalen sy'n bodoli'n barod.
 
 '''Rhybudd!'''
-Gall hwn greu newid annisgwyl a chryf i dudalen boblogaidd;
+Gall hwn fod yn newid mawr ac annisgwyl i dudalen boblogaidd;
 gwnewch yn siŵr eich bod yn deall canlyniadau'r broses hon cyn i chi barhau.",
 'movepagetext-noredirectfixer' => "Wrth ddefnyddio'r ffurflen isod byddwch yn ail-enwi tudalen, gan symud ei hanes gyfan i'r enw newydd.
 Bydd yr hen deitl yn troi'n dudalen ailgyfeirio i'r teitl newydd.
@@ -3614,7 +3616,7 @@ Dangosir delweddau ar eu maint llawn, dechreuir ffeiliau o fathau eraill yn unio
 'specialpages-group-highuse' => 'Tudalennau aml eu defnydd',
 'specialpages-group-pages' => 'Rhestrau tudalennau',
 'specialpages-group-pagetools' => 'Offer trin tudalennau',
-'specialpages-group-wiki' => 'Data ac offer y wici',
+'specialpages-group-wiki' => 'Data ac offer',
 'specialpages-group-redirects' => 'Tudalennau arbennig ailgyfeirio',
 'specialpages-group-spam' => 'Offer sbam',
 
index ff2e770..53e87ee 100644 (file)
@@ -781,7 +781,7 @@ Die Daten werden bis auf Weiteres nicht erneuert.',
 Funktion: $1<br />
 Abfrage: $2',
 'viewsource' => 'Quelltext anzeigen',
-'viewsource-title' => 'Quelltext von Seite $1 ansehen',
+'viewsource-title' => 'Quelltext der Seite $1',
 'actionthrottled' => 'Aktionsanzahl limitiert',
 'actionthrottledtext' => 'Im Rahmen einer Anti-Spam-Maßnahme kann diese Aktion in einem kurzen Zeitabstand nur begrenzt oft ausgeführt werden. Diese Grenze hast du überschritten.
 Bitte versuche es in ein paar Minuten erneut.',
index 6e4a92f..8da6463 100644 (file)
@@ -3904,13 +3904,13 @@ $5
 'tags-hitcount' => '$1 {{PLURAL:$1|αλλαγή|αλλαγές}}',
 
 # Special:ComparePages
-'comparepages' => 'ΣÏ\85γκÏ\81ίνεÏ\84ε Ï\84ιÏ\82 Ï\83ελίδεÏ\82',
+'comparepages' => 'ΣÏ\8dγκÏ\81ιÏ\83η Ï\83ελίδÏ\89ν',
 'compare-selector' => 'Συγκρίνετε τις αναθεωρήσεις των σελίδων',
 'compare-page1' => 'Σελίδα 1',
 'compare-page2' => 'Σελίδα 2',
 'compare-rev1' => 'Αναθεώρηση 1',
 'compare-rev2' => 'Αναθεώρηση 2',
-'compare-submit' => 'ΣÏ\85γκÏ\81ίνεÏ\84ε',
+'compare-submit' => 'ΣÏ\8dγκÏ\81ιÏ\83η',
 'compare-invalid-title' => 'Ο τίτλος που καθορίσατε δεν είναι έγκυρος.',
 'compare-title-not-exists' => 'Ο τίτλος που καθορίσατε δεν υπάρχει.',
 'compare-revision-not-exists' => 'Η αναθεώρηση που καθορίσατε δεν υπάρχει.',
index 7ed6123..c7ceb47 100644 (file)
@@ -3336,7 +3336,7 @@ You can update redirects that point to the original title automatically.
 If you choose not to, be sure to check for [[Special:DoubleRedirects|double]] or [[Special:BrokenRedirects|broken redirects]].
 You are responsible for making sure that links continue to point where they are supposed to go.
 
-Note that the page will '''not''' be moved if there is already a page at the new title, unless it is a redirect and has no past edit history.
+Note that the page will '''not''' be moved if there is already a page at the new title, unless the latter is a redirect and has no past edit history.
 This means that you can rename a page back to where it was renamed from if you make a mistake, and you cannot overwrite an existing page.
 
 '''Warning!'''
index 1916ec3..a0f8627 100644 (file)
@@ -3955,7 +3955,7 @@ Bildoj montriĝas en plena distingivo, aliaj dosiertipoj estas malfermataj rekte
 'specialpages-group-highuse' => 'Plej uzitaj paĝoj',
 'specialpages-group-pages' => 'Listoj de paĝoj',
 'specialpages-group-pagetools' => 'Paĝaj iloj',
-'specialpages-group-wiki' => 'Vikidatenoj kaj iloj',
+'specialpages-group-wiki' => 'Datenoj kaj iloj',
 'specialpages-group-redirects' => 'Alidirektantaj specialaj paĝoj',
 'specialpages-group-spam' => 'Kontraŭspamiloj',
 
index 09a5ee6..4730f0e 100644 (file)
@@ -2708,7 +2708,7 @@ Voit päivittää sivuun viittaavat ohjaukset automaattisesti ohjaamaan uudelle
 Jos et halua tätä tehtävän automaattisesti, muista tehdä tarkistukset [[Special:DoubleRedirects|kaksinkertaisten]] tai [[Special:BrokenRedirects|rikkinäisten]] ohjausten varalta.
 Olet vastuussa siitä, että linkit osoittavat sinne, mihin niiden on tarkoituskin osoittaa.
 
-Huomaa, että sivua '''ei''' siirretä mikäli uusi otsikko on olemassa olevan sivun käytössä, paitsi milloin kyseessä on ohjaus, jolla ei ole muokkaushistoriaa.
+Huomaa, että sivua '''ei''' siirretä mikäli uusi otsikko on olemassa olevan sivun käytössä, paitsi jos jälkimmäinen on ohjaus, jolla ei ole muokkaushistoriaa.
 Tämä tarkoittaa sitä, että voit siirtää sivun takaisin vanhalle nimelleen mikäli teit virheen, mutta et voi kirjoittaa olemassa olevan sivun päälle.
 
 Tämä saattaa olla suuri ja odottamaton muutos suositulle sivulle. Varmista, että tiedät seuraukset ennen kuin siirrät sivun.",
@@ -2716,7 +2716,8 @@ Tämä saattaa olla suuri ja odottamaton muutos suositulle sivulle. Varmista, et
 
 Tarkasta sivuun viittaavat ohjaukset [[Special:DoubleRedirects|kaksinkertaisten]] tai [[Special:BrokenRedirects|rikkinäisten]] ohjausten varalta. Olet vastuussa siitä, että linkit osoittavat sinne, mihin niiden on tarkoituskin osoittaa.
 
-Huomaa, että sivua '''ei''' siirretä mikäli uusi otsikko on olemassa olevan sivun käytössä, paitsi milloin kyseessä on tyhjä sivu tai ohjaus, jolla ei ole muokkaushistoriaa. Tämä tarkoittaa sitä, että voit siirtää sivun takaisin vanhalle nimelleen mikäli teit virheen, mutta et voi kirjoittaa olemassa olevan sivun päälle.
+Huomaa, että sivua '''ei''' siirretä mikäli uusi otsikko on olemassa olevan sivun käytössä, paitsi jos jälkimmäinen on ohjaus, jolla ei ole muokkaushistoriaa.
+Tämä tarkoittaa sitä, että voit siirtää sivun takaisin vanhalle nimelleen mikäli teit virheen, mutta et voi kirjoittaa olemassa olevan sivun päälle.
 
 Tämä saattaa olla suuri ja odottamaton muutos suositulle sivulle. Varmista, että tiedät seuraukset ennen kuin siirrät sivun.",
 'movepagetalktext' => "Sivuun mahdollisesti kytketty keskustelusivu siirretään automaattisesti, '''paitsi jos''':
@@ -3909,6 +3910,7 @@ Kuvat näytetään täysikokoisina. Muut tiedostot avataan niille määritetyss
 'logentry-newusers-newusers' => 'Käyttäjätunnus $1 luotiin',
 'logentry-newusers-create' => 'Käyttäjätunnus $1 luotiin',
 'logentry-newusers-create2' => '$1 loi käyttäjätunnuksen $3',
+'logentry-newusers-byemail' => '$1 loi käyttäjätunnuksen $3 ja salasana lähetettiin sähköpostitse',
 'logentry-newusers-autocreate' => 'Käyttäjätunnus $1 luotiin automaattisesti',
 'logentry-rights-rights' => '$1 muutti käyttäjän $3 oikeudet ryhmistä $4 ryhmiin $5',
 'logentry-rights-rights-legacy' => '$1 muutti käyttäjän $3 jäsenyyttä ryhmässä',
index bba2eef..f9917f2 100644 (file)
@@ -495,7 +495,7 @@ $messages = array(
 'dec' => 'déc',
 
 # Categories related messages
-'pagecategories' => 'Catégorie{{PLURAL:$1||s}}',
+'pagecategories' => '{{PLURAL:$1|Catégorie|Catégories}}',
 'category_header' => 'Pages dans la catégorie « $1 »',
 'subcategories' => 'Sous-catégories',
 'category-media-header' => 'Fichiers multimédias dans la catégorie « $1 »',
@@ -2851,7 +2851,7 @@ Pour bloquer ou débloquer la base de données, il doit être accessible par le
 'move-page-legend' => 'Renommer une page',
 'movepagetext' => "Utilisez le formulaire ci-dessous pour renommer une page, en déplaçant tout son historique vers le nouveau nom. L'ancien titre deviendra une page de redirection vers le nouveau titre. Vous pouvez mettre à jour automatiquement les redirections actuelles qui pointent vers le titre original. Si vous choisissez de ne pas le faire, assurez-vous de vérifier toute [[Special:DoubleRedirects|double redirection]] ou [[Special:BrokenRedirects|redirection cassée]]. Vous avez la responsabilité de vous assurer que les liens continuent de pointer vers leur destination supposée.
 
-Notez que la page ne sera '''pas''' renommée s'il existe déjà une page avec le nouveau titre, sauf si cette dernière a un historique de modifications vierge et est une simple redirection. Ceci permet de renommer une page vers sa position d'origine si le déplacement s'avère erroné.
+Notez que la page ne sera '''pas''' renommée s'il existe déjà une page avec le nouveau titre, sauf si cette dernière est une simple redirection avec un historique de modifications vierge. Ceci permet de renommer une page vers sa position d'origine si le déplacement s'avère erroné.
 
 '''Attention !'''
 Ceci peut provoquer un changement radical et imprévu pour une page souvent consultée ; assurez-vous d'en avoir compris les conséquences avant de continuer.",
index 49cc53c..fac9678 100644 (file)
@@ -342,7 +342,7 @@ $messages = array(
 'tog-externaldiff' => 'Empleyér per dèfôt un comparator de defôr (solament por los utilisators avanciês, il at fôta d’una configuracion spèciâla sur voutron ordenator. [//www.mediawiki.org/wiki/Manual:External_editors Més d’enformacions.])',
 'tog-showjumplinks' => 'Activar los lims d’accèssibilitât « {{int:jumpto}} »',
 'tog-uselivepreview' => 'Empleyér l’apèrçu rapido (il at fôta de JavaScript) (èxpèrimentâl)',
-'tog-forceeditsummary' => 'M’avèrtir quand j’é pas buchiê de rèsumâ de changement',
+'tog-forceeditsummary' => 'Mè balyér na semonce quand j’é pas buchiê de rèsumâ de changement',
 'tog-watchlisthideown' => 'Cachiér los mins changements dedens la lista de siuvu',
 'tog-watchlisthidebots' => 'Cachiér los changements fêts per des robots dedens la lista de siuvu',
 'tog-watchlisthideminor' => 'Cachiér los petiôts changements dedens la lista de siuvu',
@@ -548,8 +548,8 @@ $1',
 'copyrightpage' => '{{ns:project}}:Drêts d’ôtor',
 'currentevents' => 'Novèles',
 'currentevents-url' => 'Project:Novèles',
-'disclaimers' => 'Avèrtissements',
-'disclaimerpage' => 'Project:Avèrtissements g·ènèrals',
+'disclaimers' => 'Semonces',
+'disclaimerpage' => 'Project:Semonces g·ènèrales',
 'edithelp' => 'Éde',
 'edithelppage' => 'Help:Coment changiér na pâge',
 'helppage' => 'Help:Somèro',
@@ -657,20 +657,20 @@ Se vos plét, signalâd-la a un [[Special:ListUsers/sysop|administrator]] sen ou
 'readonly_lag' => 'La bâsa de donâs est étâye vèrrolyêe ôtomaticament pendent que los sèrviors secondèros ratrapont lor retârd sur lo sèrvior principâl.',
 'internalerror' => 'Fôta de dedens',
 'internalerror_info' => 'Fôta de dedens : $1',
-'fileappenderrorread' => 'Empossiblo de liére « $1 » pendent l’aponsa.',
-'fileappenderror' => 'Empossiblo d’apondre « $1 » a « $2 ».',
-'filecopyerror' => 'Empossiblo de copiyér lo fichiér « $1 » vers « $2 ».',
-'filerenameerror' => 'Empossiblo de renomar lo fichiér « $1 » en « $2 ».',
-'filedeleteerror' => 'Empossiblo de suprimar lo fichiér « $1 ».',
-'directorycreateerror' => 'Empossiblo de fâre lo dossiér « $1 ».',
-'filenotfound' => 'Empossiblo de trovar lo fichiér « $1 ».',
-'fileexistserror' => 'Empossiblo d’ècrire lo fichiér « $1 » : lo fichiér ègziste.',
+'fileappenderrorread' => 'Y at pas moyen de liére « $1 » pendent l’aponsa.',
+'fileappenderror' => 'Y at pas moyen d’apondre « $1 » a « $2 ».',
+'filecopyerror' => 'Y at pas moyen de copiyér lo fichiér « $1 » vers « $2 ».',
+'filerenameerror' => 'Y at pas moyen de renomar lo fichiér « $1 » en « $2 ».',
+'filedeleteerror' => 'Y at pas moyen de suprimar lo fichiér « $1 ».',
+'directorycreateerror' => 'Y at pas moyen de fâre lo rèpèrtouèro « $1 ».',
+'filenotfound' => 'Y at pas moyen de trovar lo fichiér « $1 ».',
+'fileexistserror' => 'Y at pas moyen d’ècrire lo fichiér « $1 » : lo fichiér ègziste.',
 'unexpected' => 'Valor emprèvua : « $1 » = « $2 ».',
-'formerror' => 'Fôta : empossiblo de mandar lo formulèro.',
+'formerror' => 'Fôta : y at pas moyen de mandar lo formulèro.',
 'badarticleerror' => 'Cel’accion pôt pas étre fêta sur ceta pâge.',
-'cannotdelete' => 'Empossiblo de suprimar la pâge lo fichiér « $1 ».
+'cannotdelete' => 'Y at pas moyen de suprimar la pâge lo fichiér « $1 ».
 Pôt-étre la suprèssion est ja étâye fêta per un ôtro.',
-'cannotdelete-title' => 'Empossiblo de suprimar la pâge « $1 »',
+'cannotdelete-title' => 'Y at pas moyen de suprimar la pâge « $1 »',
 'delete-hook-aborted' => 'Suprèssion anulâye per un grèfon.
 Nion’èxplicacion est étâye balyêe.',
 'badtitle' => 'Crouyo titro',
@@ -705,7 +705,7 @@ $2',
 'ns-specialprotected' => 'Les pâges spèciâles pôvont pas étre changiêes.',
 'titleprotected' => "Cél titro est étâ protègiê a la crèacion per [[User:$1|$1]].
 La rêson balyêe est « ''$2'' ».",
-'filereadonlyerror' => 'Empossiblo de changiér lo fichiér « $1 » perce que lo dèpôt de fichiérs « $2 » est justo en lèctura.
+'filereadonlyerror' => 'Y at pas moyen de changiér lo fichiér « $1 » perce que lo dèpôt de fichiérs « $2 » est justo en lèctura.
 
 L’administrator que l’at vèrrolyê at balyê cet’èxplicacion : « $3 ».',
 'invalidtitle-knownnamespace' => 'Titro pas justo avouéc l’èspâço de noms « $2 » et lo tèxto « $3 »',
@@ -754,7 +754,7 @@ Oubliâd pas de changiér voutres [[Special:Preferences|prèferences dessus {{SI
 'userexists' => 'Lo nom d’utilisator buchiê est ja empleyê.
 Se vos plét, chouèsésséd-nen un ôtro.',
 'loginerror' => 'Fôta de branchement',
-'createaccounterror' => 'Empossiblo de fâre lo compto : $1',
+'createaccounterror' => 'Y at pas moyen de fâre lo compto : $1',
 'nocookiesnew' => "Lo compto utilisator est étâ fêt, mas vos éte pas branchiê{{GENDER:||e|(e)}}.
 {{SITENAME}} emplèye des tèmouens (''cookies'') por lo branchement mas vos los éd dèsactivâs.
 Se vos plét, activâd-los et pués tornâd-vos branchiér avouéc lo mémo nom et lo mémo contresegno.",
@@ -973,7 +973,7 @@ Se vos plét, entrebetâd tôs los dètalys ce-dessus dedens na sé-quinta deman
 'whitelistedittext' => 'Vos vos dête $1 por povêr changiér les pâges.',
 'confirmedittext' => 'Vos dête confirmar voutron adrèce èlèctronica devant que changiér les pâges.
 Se vos plét, buchiéd et pués validâd voutron adrèce èlèctronica dens voutres [[Special:Preferences|prèferences]].',
-'nosuchsectiontitle' => 'Empossiblo de trovar la sèccion',
+'nosuchsectiontitle' => 'Y at pas moyen de trovar la sèccion',
 'nosuchsectiontext' => 'Vos éd tâchiê de changiér na sèccion qu’ègziste pas.
 Pôt-étre el est étâye dèplaciêe ou ben ôtâye dês que vos éd liesu cela pâge.',
 'loginreqtitle' => 'Branchement nècèssèro',
@@ -1104,11 +1104,11 @@ Por refèrence, lo jornal de les suprèssions et des dèplacements de cela pâge
 'log-fulllog' => 'Vêre lo jornal complèt',
 'edit-hook-aborted' => 'Changement anulâ per un grèfon.
 Nion’èxplicacion est étâye balyêe.',
-'edit-gone-missing' => 'Empossiblo de betar a jorn la pâge.
+'edit-gone-missing' => 'Y at pas moyen de betar a jorn la pâge.
 Semble que seye étâye suprimâye.',
 'edit-conflict' => 'Conflit de changement.',
 'edit-no-change' => 'Voutron changement est étâ ignorâ, nion changement est étâ fêt u tèxto.',
-'edit-already-exists' => 'Empossiblo de fâre na pâge novèla.
+'edit-already-exists' => 'Y at pas moyen de fâre na pâge novèla.
 Ègziste ja.',
 'defaultmessagetext' => 'Mèssâjo per dèfôt',
 'content-failed-to-parse' => 'Falyita de l’analisa du contegnu de $2 por lo modèlo $1 : $3',
@@ -1151,7 +1151,7 @@ Se vos plét, controlâd la comparèson ce-desot por vos assurar qu’o est fran
 'undo-summary' => 'Dèfêta du changement $1 de [[Special:Contributions/$2|$2]] ([[User talk:$2|discutar]])',
 
 # Account creation failure
-'cantcreateaccounttitle' => 'Empossiblo de fâre lo compto',
+'cantcreateaccounttitle' => 'Y at pas moyen de fâre lo compto',
 'cantcreateaccount-text' => "La crèacion de compto dês cet’adrèce IP ('''$1''') est étâye blocâye per [[User:$3|$3]].
 
 La rêson balyêe per $3 ére ''$2''.",
@@ -1306,7 +1306,7 @@ Notâd que l’usâjo des lims de navigacion remetrat a zérô cela colona.',
 'mergehistory-submit' => 'Fusionar les vèrsions',
 'mergehistory-empty' => 'Niona vèrsion pôt étre fusionâye.',
 'mergehistory-success' => '$3 vèrsion{{PLURAL:$3||s}} de [[:$1]] fusionâye{{PLURAL:$3||s}} avouéc reusséta dedens [[:$2]].',
-'mergehistory-fail' => 'Empossiblo de fâre la fusion des historicos, se vos plét tornâd chouèsir la pâge et pués los paramètros de dâta.',
+'mergehistory-fail' => 'Y at pas moyen de fâre la fusion des historicos, se vos plét tornâd chouèsir la pâge et pués los paramètros de dâta.',
 'mergehistory-no-source' => 'La pâge d’origina $1 ègziste pas.',
 'mergehistory-no-destination' => 'La pâge de dèstinacion $1 ègziste pas.',
 'mergehistory-invalid-source' => 'La pâge d’origina dêt avêr un titro justo.',
@@ -1396,8 +1396,8 @@ Vos pouede trovar més de dètalys dedens lo [{{fullurl:{{#Special:Log}}/delete|
 'powersearch-redir' => 'Listar les redirèccions',
 'powersearch-field' => 'Rechèrchiér',
 'powersearch-togglelabel' => 'Chouèsir :',
-'powersearch-toggleall' => 'Tot',
-'powersearch-togglenone' => 'Nion',
+'powersearch-toggleall' => 'Tôs',
+'powersearch-togglenone' => 'Pas yon',
 'search-external' => 'Rechèrche de defôr',
 'searchdisabled' => 'La rechèrche dessus {{SITENAME}} est dèsactivâye.
 Pendent cél temps, vos pouede fâre na rechèrche avouéc Google.
@@ -1768,8 +1768,8 @@ Vêde la [[Special:NewFiles|galerie des novéls fichiérs]] por un apèrçu ples
 'filestatus' => 'Statut du drêt d’ôtor :',
 'filesource' => 'Sôrsa :',
 'uploadedfiles' => 'Fichiérs tèlèchargiês',
-'ignorewarning' => 'Ignorar l’avèrtissement et pués encartar lo fichiér dens tôs los câs',
-'ignorewarnings' => 'Ignorar tôs los avèrtissements',
+'ignorewarning' => 'Ignorar la semonce et pués encartar lo fichiér dens tôs los câs',
+'ignorewarnings' => 'Ignorar totes les semonces',
 'minlength1' => 'Los noms de fichiérs dêvont contegnir por lo muens na lètra.',
 'illegalfilename' => 'Lo nom de fichiér « $1 » contint des caractèros dèfendus dedens los titros de pâges.
 Se vos plét, renomâd-lo et pués tornâd-lo tèlèchargiér.',
@@ -1792,7 +1792,7 @@ Se vos plét, renomâd-lo et pués tornâd-lo tèlèchargiér.',
 'illegal-filename' => 'Lo nom du fichiér est pas ôtorisâ.',
 'overwrite' => 'Ècllafar un fichiér ègzistent est pas ôtorisâ.',
 'unknown-error' => 'Na fôta encognua est arrevâ.',
-'tmp-create-error' => 'Empossiblo de fâre lo fichiér temporèro.',
+'tmp-create-error' => 'Y at pas moyen de fâre lo fichiér temporèro.',
 'tmp-write-error' => 'Fôta d’ècritura du fichiér temporèro.',
 'large-file' => 'O est recomandâ que los fichiérs seyont pas ples grôs que $1 ;
 cél fichiér fât $2.',
@@ -1827,7 +1827,7 @@ Se vos voléd adés tèlèchargiér voutron fichiér, se vos plét tornâd arri
 'file-exists-duplicate' => 'Cél fichiér est un doblo {{PLURAL:$1|de ceti fichiér|de cetos fichiérs}} :',
 'file-deleted-duplicate' => 'Un fichiér pariér a ceti ([[:$1]]) est ja étâ suprimâ.
 Vos devriâd controlar lo jornal de les suprèssions de cél fichiér devant que lo tornar tèlèchargiér.',
-'uploadwarning' => 'Avèrtissement pendent lo tèlèchargement',
+'uploadwarning' => 'Semonce pendent lo tèlèchargement',
 'uploadwarning-text' => 'Se vos plét, changiéd la dèscripcion du fichiér ce-desot et pués tornâd èprovar.',
 'savefile' => 'Encartar lo fichiér',
 'uploadedimage' => 'at tèlèchargiê « [[$1]] »',
@@ -1838,22 +1838,23 @@ Vos devriâd controlar lo jornal de les suprèssions de cél fichiér devant que
 'uploaddisabledtext' => 'Los tèlèchargements de fichiérs sont dèsactivâs.',
 'php-uploaddisabledtext' => 'Los tèlèchargements de fichiérs sont dèsactivâs dedens PHP.
 Se vos plét, controlâd la configuracion de « file_uploads ».',
-'uploadscripted' => 'Cél fichiér contint de code HTML ou ben un scripte que porrêt étre entèrprètâ de façon fôssa per un navigator vouèbe.',
-'uploadvirus' => 'Cél fichiér contint un virus ! Por més de dètalys, vêde : $1',
-'uploadjava' => 'O est un fichiér ZIP que contint un fichiér Java .class.
-Lo tèlèchargement de fichiérs Java est pas ôtorisâ, perce que pôvont entrênar des rèstriccions de sècuritât.',
+'uploadscripted' => 'Cél fichiér contint de code HTML ou ben un scripte que porrêt étre entèrprètâ a tôrt per un navigator Vouèbe.',
+'uploadvirus' => 'Cél fichiér contint un virus !
+Dètalys : $1',
+'uploadjava' => 'O est un fichiér ZIP que contint un fichiér Java « .class ».
+Lo tèlèchargement de fichiérs Java est pas ôtorisâ, pôvont èvitar des rèstriccions de sècuritât.',
 'upload-source' => 'Fichiér sôrsa',
 'sourcefilename' => 'Nom du fichiér sôrsa :',
 'sourceurl' => 'URL sôrsa :',
 'destfilename' => 'Nom du fichiér de dèstinacion :',
-'upload-maxfilesize' => 'Talye la ples granta du fichiér : $1',
+'upload-maxfilesize' => 'Talye maximon du fichiér : $1',
 'upload-description' => 'Dèscripcion du fichiér',
 'upload-options' => 'Chouèx de tèlèchargement',
 'watchthisupload' => 'Siuvre ceti fichiér',
-'filewasdeleted' => 'Un fichiér avouéc cél nom at ja étâ tèlèchargiê, et pués suprimâ.
+'filewasdeleted' => 'Un fichiér avouéc cél nom est ja étâ tèlèchargiê et pués suprimâ.
 Vos devriâd controlar lo $1 devant que lo tornar tèlèchargiér.',
-'filename-bad-prefix' => "Lo nom du fichiér que vos tèlèchargiéd comence per '''« $1 »''' qu’est tipicament un nom balyê ôtomaticament per los aparèlys-fotô numericos.
-Volyéd chouèsir un nom de fichiér dèscriptif.",
+'filename-bad-prefix' => "Lo nom du fichiér que vos tèlèchargiéd comence per '''« $1 »''' qu’est en g·ènèral un nom pas dèscriptif balyê ôtomaticament per los aparèlys-fotô numericos.
+Se vos plét, chouèsésséd un nom ples dèscriptif por voutron fichiér.",
 'filename-prefix-blacklist' => ' #<!-- lèssiéd ceta legne justo d’ense --> <pre>
 # La sintaxa est ceta :
 #  * Tot tèxto que siut un « # » tant qu’a la fin de la legne est un comentèro.
@@ -1870,143 +1871,143 @@ PICT # de totes sôrtes
  #</pre> <!-- lèssiéd ceta legne justo d’ense -->',
 'upload-success-subj' => 'Tèlèchargement fêt avouéc reusséta',
 'upload-success-msg' => 'Voutron tèlèchargement dês [$2] at reussi. Il est disponiblo ique : [[:{{ns:file}}:$1]]',
-'upload-failure-subj' => 'Problèmo de tèlèchargement',
+'upload-failure-subj' => 'Problèmo pendent lo tèlèchargement',
 'upload-failure-msg' => 'Y at avu un problèmo avouéc voutron tèlèchargement dês [$2] :
 
 $1',
-'upload-warning-subj' => 'Avèrtissement pendent lo tèlèchargement',
-'upload-warning-msg' => 'Un problèmo est arrevâ pendent voutron tèlèchargement dês [$2]. Vos pouede tornar u [[Special:Upload/stash/$1|formulèro de tèlèchargement]] por trovar la solucion.',
+'upload-warning-subj' => 'Semonce pendent lo tèlèchargement',
+'upload-warning-msg' => 'Y at avu un problèmo avouéc voutron tèlèchargement dês [$2]. Vos pouede tornar u [[Special:Upload/stash/$1|formulèro de tèlèchargement]] por trovar la sina solucion.',
 
 'upload-proto-error' => 'Protocolo fôx',
-'upload-proto-error-text' => 'Lo tèlèchargement a distance at fôta des URLs que començont per <code>http://</code> ou ben <code>ftp://</code>.',
-'upload-file-error' => 'Èrror de dedens',
-'upload-file-error-text' => 'Una èrror de dedens est arrevâ en volent fâre un fichiér temporèro sur lo sèrvor.
-Vos volyéd veriér vers un [[Special:ListUsers/sysop|administrator]].',
-'upload-misc-error' => 'Èrror encognua pendent lo tèlèchargement',
-'upload-misc-error-text' => 'Una èrror encognua est arrevâ pendent lo tèlèchargement.
-Volyéd controlar que l’URL est valida et accèssibla, et pués tornâd èprovar.
+'upload-proto-error-text' => 'Lo tèlèchargement a distance at fôta dURLs que començont per <code>http://</code> ou ben <code>ftp://</code>.',
+'upload-file-error' => 'Fôta de dedens',
+'upload-file-error-text' => 'Na fôta de dedens est arrevâye en volent fâre un fichiér temporèro sur lo sèrvior.
+Se vos plét, veriéd-vos vers un [[Special:ListUsers/sysop|administrator]].',
+'upload-misc-error' => 'Fôta encognua pendent lo tèlèchargement',
+'upload-misc-error-text' => 'Na fôta encognua est arrevâye pendent lo tèlèchargement.
+Se vos plét, controlâd que l’URL est justa et accèssibla, et pués tornâd èprovar.
 Se lo problèmo continue, veriéd-vos vers un [[Special:ListUsers/sysop|administrator]].',
 'upload-too-many-redirects' => 'L’URL contint trop de redirèccions',
 'upload-unknown-size' => 'Talye encognua',
-'upload-http-error' => 'Una èrror HTTP est arrevâ : $1',
-'upload-copy-upload-invalid-domain' => 'La copia des tèlèchargements est pas disponibla dês ceti domêno.',
+'upload-http-error' => 'Na fôta HTTP est arrevâye : $1',
+'upload-copy-upload-invalid-domain' => 'Los tèlèchargements de copies sont pas disponiblos dês ceti domêno.',
 
 # File backend
-'backend-fail-stream' => 'Empossiblo de liére lo fichiér $1.',
-'backend-fail-backup' => 'Empossiblo de sôvar lo fichiér $1.',
+'backend-fail-stream' => 'Y at pas moyen de tramandar lo fichiér « $1 ».',
+'backend-fail-backup' => 'Y at pas moyen d’encartar lo fichiér « $1 ».',
 'backend-fail-notexists' => 'Lo fichiér $1 ègziste pas.',
-'backend-fail-hashes' => 'Empossiblo d’avêr los chaplâjos du fichiér por comparèson.',
-'backend-fail-notsame' => 'Un fichiér difèrent ègziste ja por $1 .',
-'backend-fail-invalidpath' => '$1 est pas un chemin de stocâjo valido.',
-'backend-fail-delete' => 'Empossiblo de suprimar lo fichiér $1.',
-'backend-fail-describe' => 'Empossiblo de changiér les mètadonâs du fichiér « $1 ».',
-'backend-fail-alreadyexists' => 'Lo fichiér $1 ègziste ja.',
-'backend-fail-store' => 'Empossiblo de stocar lo fichiér $1 en $2.',
-'backend-fail-copy' => 'Empossiblo de copiyér lo fichiér $1 vers $2.',
-'backend-fail-move' => 'Empossiblo de dèplaciér lo fichiér $1 vers $2.',
-'backend-fail-opentemp' => 'Empossiblo d’uvrir lo fichiér temporèro.',
-'backend-fail-writetemp' => 'Empossiblo d’ècrire dedens lo fichiér temporèro.',
-'backend-fail-closetemp' => 'Empossiblo de cllôre lo fichiér temporèro.',
-'backend-fail-read' => 'Empossiblo de liére lo fichiér $1.',
-'backend-fail-create' => 'Empossiblo d’ècrire lo fichiér $1.',
-'backend-fail-maxsize' => 'Empossiblo d’ècrire lo fichiér « $1 » perce qu’il est ples grant que {{PLURAL:$2|yon octèt|$2 octèts}}.',
-'backend-fail-readonly' => "Ora lo sistèmo de stocâjo « $1 » est en lèctura solèta. La rêson balyêye est : « ''$2'' »",
+'backend-fail-hashes' => 'Y at pas moyen d’avêr los chaplâjos du fichiér por comparèson.',
+'backend-fail-notsame' => 'Un fichiér pas pariér ègziste ja a « $1 ».',
+'backend-fail-invalidpath' => '« $1 » est pas un chemin de stocâjo justo.',
+'backend-fail-delete' => 'Y at pas moyen de suprimar lo fichiér « $1 ».',
+'backend-fail-describe' => 'Y at pas moyen de changiér les mètadonâs du fichiér « $1 ».',
+'backend-fail-alreadyexists' => 'Lo fichiér « $1 » ègziste ja.',
+'backend-fail-store' => 'Y at pas moyen de stocar lo fichiér « $1 » dedens « $2 ».',
+'backend-fail-copy' => 'Y at pas moyen de copiyér lo fichiér « $1 » vers « $2 ».',
+'backend-fail-move' => 'Y at pas moyen de dèplaciér lo fichiér « $1 » vers « $2 ».',
+'backend-fail-opentemp' => 'Y at pas moyen d’uvrir lo fichiér temporèro.',
+'backend-fail-writetemp' => 'Y at pas moyen d’ècrire dedens lo fichiér temporèro.',
+'backend-fail-closetemp' => 'Y at pas moyen de cllôre lo fichiér temporèro.',
+'backend-fail-read' => 'Y at pas moyen de liére lo fichiér « $1 ».',
+'backend-fail-create' => 'Y at pas moyen d’ècrire lo fichiér « $1 ».',
+'backend-fail-maxsize' => 'Y at pas moyen d’ècrire lo fichiér « $1 » perce qu’il est ples grôs {{PLURAL:$2|qu’un octèt|que $2 octèts}}.',
+'backend-fail-readonly' => "Ora lo sistèmo de stocâjo « $1 » est justo en lèctura. La rêson balyêe est : « ''$2'' »",
 'backend-fail-synced' => 'Lo fichiér « $1 » est dens un ètat dèsordonâ dedens los sistèmos de stocâjo de dedens',
-'backend-fail-connect' => 'Empossiblo de sè branchiér u sistèmo de stocâjo « $1 ».',
+'backend-fail-connect' => 'Y at pas moyen de sè branchiér u sistèmo de stocâjo « $1 ».',
 'backend-fail-internal' => 'Na fôta encognua est arrevâye dedens lo sistèmo de stocâjo « $1 ».',
-'backend-fail-contenttype' => 'Empossiblo de dètèrmenar lo tipo de contegnu du fichiér a stocar en « $1 ».',
+'backend-fail-contenttype' => 'Y at pas moyen de dètèrmenar lo tipo de contegnu du fichiér a stocar dedens « $1 ».',
 'backend-fail-batchsize' => 'Lo sistèmo de stocâjo at balyê na pârt de $1 {{PLURAL:$1|opèracion|opèracions}} de fichiér ; la limita est $2 {{PLURAL:$2|opèracion|opèracions}}.',
-'backend-fail-usable' => 'Empossiblo de liére ou ben d’ècrire lo fichiér « $1 » a côsa de pèrmissions ensufisentes ou ben de rèpèrtouèros / conteniors manquents.',
+'backend-fail-usable' => 'Y at pas moyen de liére d’ècrire lo fichiér « $1 » a côsa de pèrmissions ensufisentes ou ben de rèpèrtouèros / conteniors manquents.',
 
 # File journal errors
-'filejournal-fail-dbconnect' => 'Empossiblo de sè branchiér a la bâsa de donâs du jornal por lo sistèmo de stocâjo « $1 ».',
-'filejournal-fail-dbquery' => 'Empossiblo de betar a jorn la bâsa de donâs du jornal por lo sistèmo de stocâjo « $1 ».',
+'filejournal-fail-dbconnect' => 'Y at pas moyen de sè branchiér a la bâsa de donâs du jornal por lo sistèmo de stocâjo « $1 ».',
+'filejournal-fail-dbquery' => 'Y at pas moyen de betar a jorn la bâsa de donâs du jornal por lo sistèmo de stocâjo « $1 ».',
 
 # Lock manager
-'lockmanager-notlocked' => 'Empossiblo de dèvèrrolyér « $1 » ; el est pas vèrrolyê.',
-'lockmanager-fail-closelock' => 'Empossiblo de cllôre lo fichiér de vèrroly por « $1 ».',
-'lockmanager-fail-deletelock' => 'Empossiblo de suprimar lo fichiér de vèrroly por « $1 ».',
-'lockmanager-fail-acquirelock' => 'Empossiblo d’avêr lo vèrroly por « $1 ».',
-'lockmanager-fail-openlock' => 'Empossiblo d’uvrir lo fichiér de vèrroly por « $1 ».',
-'lockmanager-fail-releaselock' => 'Empossiblo de relâchiér lo vèrroly por « $1 ».',
-'lockmanager-fail-db-bucket' => 'Empossiblo de sè veriér vers prod de bâses de balyês de vèrrolyâjo dedens lo godèt $1.',
-'lockmanager-fail-db-release' => 'Empossiblo de relâchiér los vèrrolys sur la bâsa de balyês $1.',
-'lockmanager-fail-svr-acquire' => 'Empossiblo d’avêr des vèrrolys sur lo sèrvior $1.',
-'lockmanager-fail-svr-release' => 'Empossiblo de relâchiér los vèrrolys sur lo sèrvior $1.',
+'lockmanager-notlocked' => 'Y at pas moyen de dèvèrrolyér « $1 » ; il est pas vèrrolyê.',
+'lockmanager-fail-closelock' => 'Y at pas moyen de cllôre lo fichiér de vèrroly por « $1 ».',
+'lockmanager-fail-deletelock' => 'Y at pas moyen de suprimar lo fichiér de vèrroly por « $1 ».',
+'lockmanager-fail-acquirelock' => 'Y at pas moyen d’avêr lo vèrroly por « $1 ».',
+'lockmanager-fail-openlock' => 'Y at pas moyen d’uvrir lo fichiér de vèrroly por « $1 ».',
+'lockmanager-fail-releaselock' => 'Y at pas moyen de relâchiér lo vèrroly por « $1 ».',
+'lockmanager-fail-db-bucket' => 'Y at pas moyen de sè veriér vers prod de bâses de donâs de vèrroly dedens la sèlye $1.',
+'lockmanager-fail-db-release' => 'Y at pas moyen de relâchiér los vèrrolys sur la bâsa de donâs $1.',
+'lockmanager-fail-svr-acquire' => 'Y at pas moyen d’avêr des vèrrolys sur lo sèrvior $1.',
+'lockmanager-fail-svr-release' => 'Y at pas moyen de relâchiér los vèrrolys sur lo sèrvior $1.',
 
 # ZipDirectoryReader
-'zip-file-open-error' => 'Una èrror est arrevâ pendent l’uvèrtura du fichiér ZIP por contrôlo.',
-'zip-wrong-format' => 'Lo fichiér spècefiâ est pas un fichiér ZIP.',
-'zip-bad' => 'Lo fichiér est un fichiér ZIP corrompu ou ben iliésiblo.
-Pôt pas étre controlâ tot drêt por la sècuritât.',
-'zip-unsupported' => 'Lo fichiér est un fichiér ZIP qu’utilise ZIP pas recognues per MediaWiki.
-Pôt pas étre controlâ tot drêt por la sècuritât.',
+'zip-file-open-error' => 'Na fôta est arrevâye pendent l’uvèrtura du fichiér por los contrôlos ZIP.',
+'zip-wrong-format' => 'Lo fichiér spècifiâ est pas un fichiér ZIP.',
+'zip-bad' => 'Lo fichiér est un fichiér ZIP corrompu ou ben ôtrament iliésiblo.
+Pôt pas étre controlâ coment fôt por la sècuritât.',
+'zip-unsupported' => 'Lo fichiér est un fichiér ZIP qu’emplèye des fonccionalitâts ZIP pas recognues per MediaWiki.
+Pôt pas étre controlâ coment fôt por la sècuritât.',
 
 # Special:UploadStash
-'uploadstash' => 'Cache d’importacion',
-'uploadstash-summary' => 'Ceta pâge balye accès ux fichiérs que sont importâs (ou ben en cors d’importacion), mas sont p’oncor publeyês dens lo vouiqui. Celos fichiérs sont p’oncor visiblos, solament por l’usanciér que los at importâs.',
-'uploadstash-clear' => 'Èfaciér los fichiérs en cache d’importacion',
-'uploadstash-nofiles' => 'Vos avéd gins de fichiér en cache d’importacion.',
-'uploadstash-badtoken' => 'L’ègzécucion de cela accion at pas reussia, pôt-étre perce que voutres enformacions de branchement ont èxpirâs. Tornâd èprovar.',
+'uploadstash' => 'Cacho de tèlèchargement',
+'uploadstash-summary' => 'Ceta pâge balye accès ux fichiérs que sont tèlèchargiês ou ben en cors de tèlèchargement, mas sont p’oncor publeyês dedens lo vouiqui. Celos fichiérs sont p’oncor visiblos, solament por l’utilisator que los at tèlèchargiês.',
+'uploadstash-clear' => 'Èfaciér los fichiérs en cacho',
+'uploadstash-nofiles' => 'Vos éd gins de fichiér en cacho.',
+'uploadstash-badtoken' => 'L’ègzécucion de cel’accion at pas reussi, pôt-étre perce que voutros identifients de changement ont èxpirâ. Tornâd èprovar.',
 'uploadstash-errclear' => 'L’èfacement des fichiérs at pas reussi.',
 'uploadstash-refresh' => 'Rafrèchir la lista des fichiérs',
-'invalid-chunk-offset' => 'Comencement de bocon envalido',
+'invalid-chunk-offset' => 'Dèplacement de bocon pas justo',
 
 # img_auth script messages
 'img-auth-accessdenied' => 'Accès refusâ',
-'img-auth-nopathinfo' => 'PATH_INFO manquent.
-Voutron sèrvor est pas dèfeni por passar cela enformacion.
-Fonccione pôt-étre en CGI et pués recognêt pas img_auth.
+'img-auth-nopathinfo' => 'PATH_INFO manquenta.
+Voutron sèrvior est pas configurâ por passar cel’enformacion.
+Pôt étre bâsâye sur CGI et vêr pas recognetre « img_auth ».
 Vêde https://www.mediawiki.org/wiki/Manual:Image_Authorization.',
 'img-auth-notindir' => 'Lo chemin demandâ est pas lo rèpèrtouèro de tèlèchargement configurâ.',
-'img-auth-badtitle' => 'Empossiblo de construire un titro valido dês « $1 ».',
-'img-auth-nologinnWL' => 'Vos éte pas branchiê et pués « $1 » est pas dens la lista blanche.',
+'img-auth-badtitle' => 'Y at pas moyen de construire un titro justo dês « $1 ».',
+'img-auth-nologinnWL' => 'Vos éte pas branchiê et pués « $1 » est pas dedens la lista blanche.',
 'img-auth-nofile' => 'Lo fichiér « $1 » ègziste pas.',
 'img-auth-isdir' => 'Vos tâchiéd d’arrevar u rèpèrtouèro « $1 ».
 Solament l’accès ux fichiérs est pèrmês.',
 'img-auth-streaming' => 'Lèctura en continu de « $1 ».',
-'img-auth-public' => 'La fonccion de img_auth.php est de fâre vêre des fichiérs d’un vouiqui privâ.
+'img-auth-public' => 'La fonccion de img_auth.php est de sortir des fichiérs d’un vouiqui privâ.
 Ceti vouiqui est configurâ coment un vouiqui publico.
-Por una sècuritât parfèta, img_auth.php est dèsactivâ.',
-'img-auth-noread' => 'L’usanciér at pas lo drêt en lèctura dessus « $1 ».',
-'img-auth-bad-query-string' => 'L’URL at una chêna de requéta envalida.',
+Por na sècuritât pèrfèta, img_auth.php est dèsactivâ.',
+'img-auth-noread' => 'L’utilisator at pas accès a la lèctura de « $1 ».',
+'img-auth-bad-query-string' => 'L’URL at na chêna de demanda pas justa.',
 
 # HTTP errors
-'http-invalid-url' => 'URL fôssa : $1',
+'http-invalid-url' => 'URL pas justa : $1',
 'http-invalid-scheme' => 'Les URLs avouéc lo plan « $1 » sont pas recognues.',
-'http-request-error' => 'Èrror encognua pendent l’èxpèdicion de la requéta.',
-'http-read-error' => 'Èrror de lèctura HTTP.',
-'http-timed-out' => 'La requéta HTTP at èxpirâ.',
-'http-curl-error' => 'Èrror pendent la rècupèracion de l’URL : $1',
-'http-host-unreachable' => 'URL pas juentâbla.',
-'http-bad-status' => 'Y at avu un problèmo pendent la requéta HTTP : $1 $2',
+'http-request-error' => 'La demanda HTTP at pas reussi a côsa d’una fôta encognua.',
+'http-read-error' => 'Fôta de lèctura HTTP.',
+'http-timed-out' => 'La demanda HTTP at èxpirâ.',
+'http-curl-error' => 'Fôta pendent la rècupèracion de l’URL : $1',
+'http-host-unreachable' => 'Y at pas moyen d’avengiér l’URL.',
+'http-bad-status' => 'Y at avu un problèmo pendent la demanda HTTP : $1 $2',
 
 # Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
-'upload-curl-error6' => 'URL pas juentâbla',
-'upload-curl-error6-text' => 'L’URL balyê pôt pas étre juenta.
-Volyéd controlar que l’URL est justa et que lo seto est en legne.',
-'upload-curl-error28' => 'Dèpassement du dèlê pendent lo tèlèchargement',
-'upload-curl-error28-text' => 'Lo seto at betâ trop grant-temps a rèpondre.
-Volyéd controlar que lo seto est en legne, atendre un pou et pués tornar èprovar.
-Vos pouede asse-ben tornar èprovar a una hora de muendra afluence.',
+'upload-curl-error6' => 'Y at pas moyen d’avengiér l’URL',
+'upload-curl-error6-text' => 'L’URL balyêe pôt pas étre avengiêe.
+Se vos plét, tornâd controlar que l’URL est justa et pués que lo seto est en legne.',
+'upload-curl-error28' => 'Dèlê dèpassâ pendent lo tèlèchargement',
+'upload-curl-error28-text' => 'Lo seto at tardâ bien a rèpondre.
+Se vos plét, controlâd que lo seto est en legne, atende un pou et pués tornâd èprovar.
+Vos pouede asse-ben èprovar a n’hora de muendra afluence.',
 
 'license' => 'Licence :',
 'license-header' => 'Licence',
-'nolicense' => 'Gins de licence chouèsia',
-'license-nopreview' => '(Prèvisualisacion pas disponibla)',
-'upload_source_url' => '  (una URL valida et accèssibla publicament)',
-'upload_source_file' => '  (un fichiér sur voutron ordenator)',
+'nolicense' => 'Pas yona chouèsia',
+'license-nopreview' => '(Apèrçu pas disponiblo)',
+'upload_source_url' => ' (n’URL justa et accèssibla publicament)',
+'upload_source_file' => ' (un fichiér sur voutron ordenator)',
 
 # Special:ListFiles
 'listfiles-summary' => 'Ceta pâge spèciâla montre tôs los fichiérs tèlèchargiês.
-Quand el est filtrâ per usanciér, solament los fichiérs que la vèrsion la ples novèla at étâ importâ per cél usanciér sont montrâs.',
-'listfiles_search_for' => 'Rechèrchiér un nom de mèdia :',
+Quand el est filtrâye per utilisator, solament los fichiérs que la vèrsion la ples novèla est étâye tèlèchargiêe per cél utilisator sont montrâs.',
+'listfiles_search_for' => 'Rechèrchiér un nom de fichiér mèdia :',
 'imgfile' => 'fichiér',
-'listfiles' => 'Lista des fichiérs',
+'listfiles' => 'Lista de fichiérs',
 'listfiles_thumb' => 'Figura',
 'listfiles_date' => 'Dâta',
 'listfiles_name' => 'Nom',
-'listfiles_user' => 'Usanciér',
+'listfiles_user' => 'Utilisator',
 'listfiles_size' => 'Talye',
 'listfiles_description' => 'Dèscripcion',
 'listfiles_count' => 'Vèrsions',
@@ -2014,49 +2015,54 @@ Quand el est filtrâ per usanciér, solament los fichiérs que la vèrsion la pl
 # File description page
 'file-anchor-link' => 'Fichiér',
 'filehist' => 'Historico du fichiér',
-'filehist-help' => 'Clicar sur na dâta et hora por vêre lo fichiér coment il ére a cél moment.',
+'filehist-help' => 'Clicar sur na dâta / hora por vêre lo fichiér coment il ére a cél moment.',
 'filehist-deleteall' => 'suprimar tot',
 'filehist-deleteone' => 'suprimar',
-'filehist-revert' => 'rètablir',
-'filehist-current' => 'ora',
-'filehist-datetime' => 'Dâta et hora',
+'filehist-revert' => 'rèvocar',
+'filehist-current' => 'd’ora',
+'filehist-datetime' => 'Dâta / hora',
 'filehist-thumb' => 'Figura',
-'filehist-thumbtext' => 'Figura por la vèrsion du $1',
-'filehist-nothumb' => 'Gins de figura',
-'filehist-user' => 'Usanciér',
+'filehist-thumbtext' => 'Figura por la vèrsion du $2 a $3',
+'filehist-nothumb' => 'Niona figura',
+'filehist-user' => 'Utilisator',
 'filehist-dimensions' => 'Dimensions',
 'filehist-filesize' => 'Talye du fichiér',
 'filehist-comment' => 'Comentèro',
 'filehist-missing' => 'Fichiér manquent',
 'imagelinks' => 'Usâjo du fichiér',
-'linkstoimage' => '{{PLURAL:$1|Ceta pâge utilise|Cetes $1 pâges utilisont}} ceti fichiér :',
-'linkstoimage-more' => 'Més de {{PLURAL:$1|yona pâge utilise|$1 pâges utilisont}} ceti fichiér.
-Ceta lista montre ren que {{PLURAL:$1|la premiére pâge qu’utilise|les $1 premiéres pâges qu’utilisont}} ceti fichiér.
-Una [[Special:WhatLinksHere/$2|lista complèta]] est disponibla.',
-'nolinkstoimage' => 'Niona pâge utilise ceti fichiér.',
+'linkstoimage' => '{{PLURAL:$1|Cela pâge-que emplèye|Celes $1 pâges-que emplèyont}} ceti fichiér :',
+'linkstoimage-more' => 'Més {{PLURAL:$1|d’una pâge emplèye|de $1 pâges emplèyont}} ceti fichiér.
+Ceta lista montre ren que {{PLURAL:$1|la premiére pâge qu’emplèye|les $1 premiéres pâges qu’emplèyont}} ceti fichiér.
+Na [[Special:WhatLinksHere/$2|lista complèta]] est disponibla.',
+'nolinkstoimage' => 'Niona pâge emplèye ceti fichiér.',
 'morelinkstoimage' => 'Vêde [[Special:WhatLinksHere/$1|més de lims]] de vers ceti fichiér.',
 'linkstoimage-redirect' => '$1 (redirèccion de fichiér) $2',
-'duplicatesoffile' => '{{PLURAL:$1|Ceti fichiér est un doblo|Cetos fichiérs sont des doblos}} de ceti ([[Special:FileDuplicateSearch/$2|més de dètalys]]) :',
-'sharedupload' => 'Ceti fichiér vint de $1 et pôt étre utilisâ per d’ôtros projèts.',
-'sharedupload-desc-there' => 'Ceti fichiér vint de $1 et pôt étre utilisâ per d’ôtros projèts.
-Vêde sa [$2 pâge de dèscripcion] por més d’enformacions.',
-'sharedupload-desc-here' => 'Ceti fichiér vint de $1 et pôt étre utilisâ per d’ôtros projèts.
-La dèscripcion de sa [$2 pâge de dèscripcion] est montrâ ce-desot.',
+'duplicatesoffile' => '{{PLURAL:$1|Cél fichiér-que est un doblo|Celos $1 fichiérs-que sont des doblos}} de ceti ([[Special:FileDuplicateSearch/$2|més de dètalys]]) :',
+'sharedupload' => 'Ceti fichiér vint de $1 et pôt étre empleyê per d’ôtros projèts.',
+'sharedupload-desc-there' => 'Ceti fichiér vint de $1 et pôt étre empleyê per d’ôtros projèts.
+Se vos plét, vêde la sina [$2 pâge de dèscripcion] por més d’enformacions.',
+'sharedupload-desc-here' => 'Ceti fichiér vint de $1 et pôt étre empleyê per d’ôtros projèts.
+La dèscripcion de la sina [$2 pâge de dèscripcion] est montrâye ce-desot.',
+'sharedupload-desc-edit' => 'Ceti fichiér vint de $1 et pôt étre empleyê per d’ôtros projèts.
+Pôt-étre vos voléd changiér la dèscripcion sur la sina [$2 pâge de dèscripcion].',
+'sharedupload-desc-create' => 'Ceti fichiér vint de $1 et pôt étre empleyê per d’ôtros projèts.
+Pôt-étre vos voléd changiér la dèscripcion sur la sina [$2 pâge de dèscripcion].',
 'filepage-nofile' => 'Nion fichiér de cél nom ègziste.',
 'filepage-nofile-link' => 'Nion fichiér de cél nom ègziste, mas vos en pouede [$1 tèlèchargiér yon].',
-'uploadnewversion-linktext' => 'Tèlèchargiér una novèla vèrsion de ceti fichiér',
-'shared-repo-from' => 'de $1',
+'uploadnewversion-linktext' => 'Tèlèchargiér na novèla vèrsion de ceti fichiér',
+'shared-repo-from' => 'de $1',
 'shared-repo' => 'un dèpôt partagiê',
 'filepage.css' => '/* Lo code CSS betâ ique est encllu dens la pâge de dèscripcion du fichiér, et pués dens los vouiquis cliants ètrangiérs. */',
+'upload-disallowed-here' => 'Vos pouede pas ècllafar ceti fichiér.',
 
 # File reversion
-'filerevert' => 'Rètablir $1',
-'filerevert-legend' => 'Rètablir lo fichiér',
-'filerevert-intro' => "Vos éte prèst a rètablir lo fichiér '''[[Media:$1|$1]]''' a la [$4 vèrsion du $2 a $3].",
+'filerevert' => 'Rèvocar $1',
+'filerevert-legend' => 'Rèvocar lo fichiér',
+'filerevert-intro' => "Vos éte prèst a rèvocar lo fichiér '''[[Media:$1|$1]]''' a la [$4 vèrsion du $2 a $3].",
 'filerevert-comment' => 'Rêson :',
-'filerevert-defaultcomment' => 'Vèrsion du $1 a $2 rètablia',
-'filerevert-submit' => 'Rètablir',
-'filerevert-success' => "'''[[Media:$1|$1]]''' at étâ rètabli a la [$4 vèrsion du $2 a $3].",
+'filerevert-defaultcomment' => 'Rèvocâ a la vèrsion du $1 a $2',
+'filerevert-submit' => 'Rèvocar',
+'filerevert-success' => "'''[[Media:$1|$1]]''' est étâ rèvocâ a la [$4 vèrsion du $2 a $3].",
 'filerevert-badversion' => 'Y at gins de vèrsion ples vielye du fichiér avouéc la dâta balyê.',
 
 # File deletion
index ba39b45..d0f4166 100644 (file)
@@ -496,6 +496,7 @@ Tabhair faoi deara go taispeáinfear roinnt leathanaigh mar atá tú logáilte i
 'createaccount' => 'Cruthaigh cuntas nua',
 'gotaccount' => "An bhfuil cuntas agat cheana féin? '''$1'''.",
 'gotaccountlink' => 'Logáil isteach',
+'userlogin-resetlink' => 'Sonraí logála isteach dearmadta agat?',
 'createaccountmail' => 'le ríomhphost',
 'createaccountreason' => 'Fáth:',
 'badretype' => "D'iontráil tú dhá fhocal faire difriúla.",
@@ -782,17 +783,22 @@ Treoir: (rth) = difríocht ón leagan reatha, (rmh) = difríocht ón leagan roim
 'notextmatches' => 'Ní bhfuarthas an téacs ar leathanach ar bith',
 'prevn' => 'na {{PLURAL:$1|$1}} cinn roimhe seo',
 'nextn' => 'an {{PLURAL:$1|$1}} i ndiadh',
+'shown-title' => 'Taispeáin $1 {{PLURAL:$1|thoradh|torthaí}} an leathanach',
 'viewprevnext' => 'Taispeáin ($1 {{int:pipe-separator}} $2) ($3).',
 'searchmenu-legend' => 'Sainroghanna cuardaithe',
 'searchmenu-new' => "'''Cruthaigh an leathanach \"[[:\$1]]\" ar an vicí seo!'''",
 'searchhelp-url' => 'Help:Clár_ábhair',
+'searchprofile-articles' => 'Leathanaigh ábhair',
 'searchprofile-project' => 'Leathanaigh thionscadail agus cabhair',
 'searchprofile-images' => 'Ilmheáin',
 'searchprofile-everything' => 'Gach rud',
+'searchprofile-advanced' => 'Casta',
 'searchprofile-articles-tooltip' => 'Cuardaigh i $1',
 'searchprofile-project-tooltip' => 'Cuardaigh i $1',
 'searchprofile-images-tooltip' => 'Cuardaigh le comhaid',
-'search-result-size' => '$1 ({{PLURAL:$2|focal amháin|$2 focail}})',
+'searchprofile-everything-tooltip' => 'Cuardaigh an t-ábhar ar fad (leathanaigh plé san áireamh)',
+'searchprofile-advanced-tooltip' => 'Cuardaigh in ainmspásanna saincheaptha',
+'search-result-size' => '$1 ({{PLURAL:$2|fhocal amháin|$2 focail}})',
 'search-redirect' => '(athsheoladh $1)',
 'search-section' => '(gearradh $1)',
 'search-suggest' => 'An raibh $1 á lorg agat?',
@@ -899,7 +905,7 @@ Beidh an t-eolas seo poiblí.',
 'email' => 'Ríomhphost',
 'prefs-help-realname' => '* <strong>Fíorainm</strong> (roghnach): má toghaíonn tú é sin a chur ar fáil, úsáidfear é chun
 do chuid dreachtaí a chur i leith tusa.',
-'prefs-help-email' => '<strong>Ríomhphost</strong> (roghnach): Leis an tréith seo is féidir teagmháil a dhéanamh leat tríd do leathanach úsáideora nó leathanach phlé gan do sheoladh ríomhphost a thaispeáint.',
+'prefs-help-email' => 'Is roghnach seoladh ríomhphoist a thabhairt, ach is riachtanach é chun focal faire a athshocrú, má dhéanann tú dearmad air.',
 'prefs-help-email-required' => 'Ní foláir seoladh ríomhpoist a thabhairt.',
 'prefs-info' => 'Buneolas',
 'prefs-i18n' => 'Logánú',
@@ -965,6 +971,7 @@ do chuid dreachtaí a chur i leith tusa.',
 'recentchanges-legend' => 'Roghanna do na hathruithe is déanaí',
 'recentchanges-summary' => 'Déan faire ar na hathruithe is déanaí sa vicí ar an leathanach seo.',
 'recentchanges-feed-description' => 'Rianaigh na n-athruite vicí is déanaí sa fotha seo.',
+'recentchanges-label-minor' => 'Mionathrú é seo',
 'recentchanges-label-bot' => 'Chomhlíon róbó an t-athrú seo',
 'rcnote' => "Is {{PLURAL:$1|é seo a leanas <strong>an t-athrú amháin</strong>|iad seo a leanas na <strong>$1</strong> athruithe is déanaí}} {{PLURAL:$2|ar feadh an lae dheireanaigh|ar feadh na '''$2''' lá deireanacha}}, as $5, $4.",
 'rcnotefrom' => 'Is iad seo a leanas na hathruithe ó <b>$2</b> (go dti <b>$1</b> taispeánaithe).',
@@ -1202,7 +1209,7 @@ chun an gníomh seo a dhéanamh ar.',
 # Special:Log
 'specialloguserlabel' => 'Úsáideoir:',
 'speciallogtitlelabel' => 'Teideal:',
-'log' => 'Loganna',
+'log' => 'Logaí',
 'all-logs-page' => 'Gach loga poiblí',
 'alllogstext' => 'Bailiúchán cuimsitheach de gach loga {{SITENAME}}.
 Is féidir leat an méid ar taispeáint a chúngú trí roghnú an saghas loga, an t-ainm úsáideora (cásíogair), nó an leathanach (cásíogair freisin) atá i gceist agat.',
@@ -1270,7 +1277,7 @@ Beidh do seoladh ríomhphoist a d\'iontráil tú i [[Special:Preferences|do chui
 'emailsenttext' => 'Seoladh do theachtaireacht ríomhphoist go ráthúil.',
 
 # Watchlist
-'watchlist' => 'Mo liosta faire',
+'watchlist' => 'Liosta faire',
 'mywatchlist' => 'Liosta faire',
 'watchlistfor2' => 'Do $1 ($2)',
 'nowatchlist' => 'Níl aon rud ar do liosta faire.',
@@ -1370,6 +1377,7 @@ Féach ar $2 chun cuntas na scriosiadh deireanacha a fháil.',
 'rollback' => 'Athruithe a rolladh siar',
 'rollback_short' => 'Roll siar',
 'rollbacklink' => 'roll siar',
+'rollbacklinkcount' => 'Roll siar $1 {{PLURAL:$1|athrú|athruithe}}',
 'rollbackfailed' => 'Theip an rolladh siar',
 'cantrollback' => 'Ní féidir an athrú a athúsáid; ba é údar an ailt an t-aon duine a rinne athrú dó.',
 'alreadyrolled' => "Ní féidir eagrán níos luaí an leathanaigh [[:$1]] le [[User:$2|$2]] ([[User talk:$2|Plé]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) a athúsáid; d'athraigh duine eile é cheana fein, nó d'athúsáid duine eile eagrán níos luaí cheana féin.
@@ -1453,7 +1461,7 @@ Is an téacs as na leagan scriosta seo ar fáil do riarthóirí amháin.',
 'blanknamespace' => '(Gnáth)',
 
 # Contributions
-'contributions' => 'Dréachtaí úsáideora',
+'contributions' => 'Dréachtaí {{GENDER:$1|úsáideora}}',
 'contributions-title' => 'Dréachtaí úsáideora do $1',
 'mycontris' => 'Dréachtaí',
 'contribsub2' => 'Do $1 ($2)',
@@ -1467,6 +1475,8 @@ Is an téacs as na leagan scriosta seo ar fáil do riarthóirí amháin.',
 'sp-contributions-newbies-title' => 'Dréachtaí úsáideora do chuntasaí nua',
 'sp-contributions-blocklog' => 'Log coisc',
 'sp-contributions-deleted' => 'dréachtaí úsáideora scriosta',
+'sp-contributions-uploads' => 'uaslódálacha',
+'sp-contributions-logs' => 'logaí',
 'sp-contributions-talk' => 'plé',
 'sp-contributions-userrights' => 'bainistíocht cearta úsáideora',
 'sp-contributions-search' => 'Cuardaigh dréachtaí',
@@ -1713,7 +1723,7 @@ ní féidir uaslódála staire díreacha a dhéanamh faoi láthair.",
 'tooltip-n-mainpage-description' => 'Tabhair cuairt ar an bpríomhleathanach',
 'tooltip-n-portal' => 'Maidir leis an tionscadal, cad is féidir leat a dhéanamh, conas achmhainní a fháil',
 'tooltip-n-currentevents' => 'Faigh eolas cúlrach maidir le chursaí reatha',
-'tooltip-n-recentchanges' => 'Liosta de na hathruithe is déanaí sa vicí.',
+'tooltip-n-recentchanges' => 'Liosta de na hathruithe is déanaí sa vicí',
 'tooltip-n-randompage' => 'Lódáil leathanach fánach',
 'tooltip-n-help' => 'An áit chun cabhair a fháil.',
 'tooltip-t-whatlinkshere' => 'Liosta de gach leathanach sa vicí ina bhfuil nasc chuig an leathanach seo',
@@ -1742,7 +1752,9 @@ ní féidir uaslódála staire díreacha a dhéanamh faoi láthair.",
 'tooltip-diff' => 'Taispeáin na difríochtaí áirithe a rinne tú don téacs',
 'tooltip-compareselectedversions' => 'Féach na difríochtaí idir an dhá leagain roghnaithe den leathanach seo.',
 'tooltip-watch' => 'Cuir an leathanach seo le do liosta faire',
+'tooltip-rollback' => 'Fill ar leagan an leathanaigh seo roimh athruithe an eagarthóra dheireanaigh in aon chlic amháin',
 'tooltip-undo' => 'Cuirtear "Cealaigh" an t-athrú seo ar cheal agus osclaítear an fhoirm eagair i mód réamhamhairc. Is féidir cúis na hathruithe a chur san achoimre.',
+'tooltip-summary' => 'Cuir isteach achoimre ghearr',
 
 # Stylesheets
 'monobook.css' => '/* athraigh an comhad seo chun an craiceann MonoBook a athrú don suíomh ar fad */',
@@ -1820,11 +1832,11 @@ B'fheidir go gcuirfear do chóras i gcontúirt dá rithfeá é.",
 'sp-newimages-showfrom' => 'Taispeáin íomhánna nua as $2, $1',
 
 # Bad image list
-'bad_image_list' => 'An formáid ná a leanas:
+'bad_image_list' => 'Is é seo a leanas an formáid:
 
-Míreanna liosta amháin (líonta a tosú le *) atá eisithe.
-Tá ar an chead nasc ar líne, naiscthe le drochchomhad.
-Aon naisc a leanas ar an líne céanna atá eisithe mar eisceachtaí; leathanaigh ina tarlaigh an comhad inlíne.',
+Níl ach míreanna liosta amháin (línte ag tosú le *) san áireamh.
+Is riachtanach gur nasc do dhrochchomhad é an chéad nasc ar líne.
+Is eisceachtaí iad na naisc eile ar an líne céanna, .i. leathanaigh gur féidir an comhad a bheith orthu go hinlíne.',
 
 # Metadata
 'metadata' => 'Meiteasonraí',
@@ -1832,7 +1844,7 @@ Aon naisc a leanas ar an líne céanna atá eisithe mar eisceachtaí; leathanaig
 Má tá an comhad mionathraithe as an bunleagan, b'fhéidir nach mbeidh ceann de na sonraí fágtha sa comhad atá athruithe.",
 'metadata-expand' => 'Taispeáin sonraí síneadh',
 'metadata-collapse' => 'Folaigh sonraí síneadh',
-'metadata-fields' => 'Beidh meiteasonraí EXIF atá liosta sa teachtaireacht seo san áireamh ar an leathanach íomhá nuair ata an clár meiteasonraí ceilte.
+'metadata-fields' => 'Beidh na meiteasonraí EXIF seo a leanas dá dtaispeáint ar an leathanach íomhá nuair atá an clár meiteasonraí ceilte.
 Beidh na cinn eile ceilte de réir réamhshocraithe.
 * make
 * model
index 59adbfd..94eca4f 100644 (file)
@@ -2751,24 +2751,24 @@ Lembre [[Special:UnlockDB|eliminar o bloqueo]] unha vez completado o seu manteme
 # Move page
 'move-page' => 'Mover "$1"',
 'move-page-legend' => 'Mover páxina',
-'movepagetext' => "Ao usar o formulario de embaixo vai cambiar o nome da páxina, movendo todo o seu historial ao novo nome.
+'movepagetext' => "Ao usar o formulario inferior vai cambiar o nome da páxina, movendo todo o seu historial ao novo nome.
 O título vello vaise converter nunha páxina de redirección ao novo título.
 Pode actualizar automaticamente as redireccións que van dar ao título orixinal.
 Se escolle non facelo, asegúrese de verificar que non hai redireccións [[Special:DoubleRedirects|dobres]] ou [[Special:BrokenRedirects|crebadas]].
 Vostede é responsábel de asegurarse de que as ligazóns continúan a apuntar cara a onde se supón que deberían.
 
-Teña en conta que a páxina '''non''' será movida se xa existe unha páxina co novo título, a menos que sexa unha redirección e non teña historial de edicións.
+Teña en conta que a páxina '''non''' será trasladada se xa existe unha páxina co novo título, a menos que esta última sexa unha redirección e non teña historial de edicións.
 Isto significa que pode volver renomear unha páxina ao seu nome antigo se comete un erro, e que non pode sobrescribir unha páxina que xa existe.
 
 '''Atención!'''
 Este cambio nunha páxina popular pode ser drástico e inesperado;
 por favor, asegúrese de que entende as consecuencias disto antes de proseguir.",
-'movepagetext-noredirectfixer' => "Ao usar o formulario de embaixo vai cambiar o nome da páxina, movendo todo o seu historial ao novo nome.
+'movepagetext-noredirectfixer' => "Ao usar o formulario inferior vai cambiar o nome da páxina, movendo todo o seu historial ao novo nome.
 O título vello vaise converter nunha páxina de redirección ao novo título.
 Asegúrese de verificar que non hai redireccións [[Special:DoubleRedirects|dobres]] ou [[Special:BrokenRedirects|crebadas]].
 Vostede é responsábel de asegurarse de que as ligazóns continúan a apuntar cara a onde se supón que deberían.
 
-Teña en conta que a páxina '''non''' será movida se xa existe unha páxina co novo título, a menos que sexa unha redirección e non teña historial de edicións.
+Teña en conta que a páxina '''non''' será trasladada se xa existe unha páxina co novo título, a menos que esta última sexa unha redirección e non teña historial de edicións.
 Isto significa que pode volver renomear unha páxina ao seu nome antigo se comete un erro, e que non pode sobrescribir unha páxina que xa existe.
 
 '''Atención!'''
index 2f1ab98..21f9a35 100644 (file)
@@ -2846,7 +2846,7 @@ $1',
 אם תבחרו לא לעשות זאת, אנא ודאו שאין [[Special:DoubleRedirects|הפניות כפולות]] או [[Special:BrokenRedirects|שבורות]].
 אתם אחראים לוודא שכל הקישורים ימשיכו להצביע למקום שאליו הם אמורים להצביע.
 
-ש×\99×\9e×\95 ×\9c×\91: ×\94×\93×£ '''×\9c×\90''' ×\99×\95×¢×\91ר ×\90×\9d ×\9b×\91ר ×\99ש ×\93×£ ×ª×\97ת ×\94ש×\9d ×\94×\97×\93ש, ×\90×\9c×\90 ×\90×\9d ×\94×\93×£ ×\94×\96×\94 הוא הפניה ואין לו היסטוריית עריכות קודמות.
+ש×\99×\9e×\95 ×\9c×\91: ×\94×\93×£ '''×\9c×\90''' ×\99×\95×¢×\91ר ×\90×\9d ×\9b×\91ר ×\99ש ×\93×£ ×ª×\97ת ×\94ש×\9d ×\94×\97×\93ש, ×\90×\9c×\90 ×\90×\9d ×\94×\93×£ ×\94שנ×\99 הוא הפניה ואין לו היסטוריית עריכות קודמות.
 פירוש הדבר שאפשר לשנות חזרה את שמו של דף לשם המקורי אם נעשתה טעות, ושלא ניתן לדרוס דף קיים.
 
 '''אזהרה!'''
index 1cc7e16..806fe08 100644 (file)
@@ -947,7 +947,7 @@ Přičina za blokowanje, podata wot $3, je: ''$2''",
 'nohistory' => 'Njeje žanych staršich wersijow strony.',
 'currentrev' => 'Aktualna wersija',
 'currentrev-asof' => 'Aktualna wersija wot $1',
-'revisionasof' => 'Wersija z $1',
+'revisionasof' => 'Wersija wot $1',
 'revision-info' => 'Wersija wot $1 wužiwarja $2',
 'previousrevision' => '← Starša wersija',
 'nextrevision' => 'Nowša wersija →',
@@ -1105,7 +1105,7 @@ Zawěsć, zo tuta změna stawiznisku kontinuitu strony wobchowuje.',
 
 # Diffs
 'history-title' => '$1: Wersijowe stawizny',
-'difference-title' => '$1: Rozdźěl mjez wersijemi',
+'difference-title' => '$1: Rozdźěl mjez wersijomaj',
 'difference-title-multipage' => '$1 a $2: Rozdźěl mjez stronami',
 'difference-multipage' => '(Rozdźěl mjez stronami)',
 'lineno' => 'Rjadka $1:',
index e2284cc..aafbd4c 100644 (file)
@@ -276,6 +276,7 @@ $messages = array(
 'newwindow' => '(se aperi in un nove fenestra)',
 'cancel' => 'Cancellar',
 'moredotdotdot' => 'Plus...',
+'morenotlisted' => 'Alteres non listate…',
 'mypage' => 'Pagina',
 'mytalk' => 'Discussion',
 'anontalk' => 'Discussion pro iste adresse IP',
@@ -579,7 +580,7 @@ Non oblida personalisar tu [[Special:Preferences|preferentias in {{SITENAME}}]].
 'gotaccount' => "Tu jam ha un conto? '''$1'''.",
 'gotaccountlink' => 'Aperir session',
 'userlogin-resetlink' => 'Datos de authentication oblidate?',
-'createaccountmail' => 'per e-mail',
+'createaccountmail' => 'Usar un contrasigno aleatori temporari e inviar lo al adresse de e-mail specificate hic infra',
 'createaccountreason' => 'Motivo:',
 'badretype' => 'Le duo contrasignos que tu scribeva non es identic.',
 'userexists' => 'Iste nomine de usator es jam in uso.
@@ -660,6 +661,7 @@ Per favor attende ante de probar lo novemente.',
 # E-mail sending
 'php-mail-error-unknown' => 'Error incognite in le function mail() de PHP',
 'user-mail-no-addy' => 'Tentava inviar e-mail sin adresse de e-mail.',
+'user-mail-no-body' => 'Tentava inviar e-mail con texto vacue o multo curte.',
 
 # Change password dialog
 'resetpass' => 'Cambiar contrasigno',
@@ -727,6 +729,7 @@ Contrasigno temporari: $2',
 'changeemail-oldemail' => 'Adresse de e-mail actual:',
 'changeemail-newemail' => 'Adresse de e-mail nove:',
 'changeemail-none' => '(nulle)',
+'changeemail-password' => 'Contrasigno de {{SITENAME}}:',
 'changeemail-submit' => 'Cambiar e-mail',
 'changeemail-cancel' => 'Cancellar',
 
@@ -1320,9 +1323,9 @@ Le operation non pote esser disfacite.',
 'prefs-emailconfirm-label' => 'Confirmation del e-mail:',
 'prefs-textboxsize' => 'Dimension del fenestra de modification',
 'youremail' => 'E-mail:',
-'username' => 'Nomine de usator:',
-'uid' => 'ID del usator:',
-'prefs-memberingroups' => 'Membro de {{PLURAL:$1|gruppo|gruppos}}:',
+'username' => '{{GENDER:$1|Nomine de usator}}:',
+'uid' => 'ID del {{GENDER:$1|usator}}:',
+'prefs-memberingroups' => '{{GENDER:$2|Membro}} de {{PLURAL:$1|gruppo|gruppos}}:',
 'prefs-registration' => 'Data de registration:',
 'yourrealname' => 'Nomine real:',
 'yourlanguage' => 'Lingua:',
@@ -2117,7 +2120,7 @@ Vide etiam le [[Special:WantedCategories|categorias desirate]].',
 'linksearch-ok' => 'Cercar',
 'linksearch-text' => 'Es possibile usar metacharacteres como in "*.wikipedia.org".
 Isto necessita specificar al minus le dominio de nivello superior, per exemplo "*.org".<br />
-Protocollos supportate: <code>$1</code> (http:// es assumite si nulle protocollo es specificate).',
+{{PLURAL:$2|Le protocollo|Protocollos}} supportate: <code>$1</code> (http:// es assumite si nulle protocollo es specificate).',
 'linksearch-line' => '$1 ligate ab $2',
 'linksearch-error' => 'Le metacharacteres pote apparer solmente al initio del nomine de host.',
 
@@ -2234,6 +2237,11 @@ Le modificationes futur in iste pagina e in le pagina de discussion associate es
 'enotif_mailer' => 'Systema de notification via e-mail de {{SITENAME}}',
 'enotif_reset' => 'Marcar tote le paginas como visitate',
 'enotif_impersonal_salutation' => 'Usator de {{SITENAME}}',
+'enotif_subject_deleted' => 'Le pagina $1 de {{SITENAME}} ha essite {{GENDER:$2|delite}} per $2',
+'enotif_subject_created' => 'Le pagina $1 de {{SITENAME}} ha essite {{GENDER:$2|create}} per $2',
+'enotif_subject_moved' => 'Le pagina $1 de {{SITENAME}} ha essite {{GENDER:$2|renominate}} per $2',
+'enotif_subject_restored' => 'Le pagina $1 de {{SITENAME}} ha essite {{GENDER:$2|restaurate}} per $2',
+'enotif_subject_changed' => 'Le pagina $1 de {{SITENAME}} ha essite {{GENDER:$2|modificate}} per $2',
 'enotif_lastvisited' => 'Vide $1 pro tote le modificationes depost tu ultime visita.',
 'enotif_lastdiff' => 'Vide $1 pro revider iste modification.',
 'enotif_anon_editor' => 'usator anonyme $1',
index aa49965..86daedd 100644 (file)
@@ -1142,7 +1142,7 @@ Beberapa templat akan diabaikan.',
 'undo-success' => 'Suntingan ini dapat dibatalkan. Tolong cek perbandingan di bawah untuk meyakinkan bahwa benar itu yang Anda ingin lakukan, lalu simpan perubahan tersebut untuk menyelesaikan pembatalan suntingan.',
 'undo-failure' => 'Suntingan ini tidak dapat dibatalkan karena konflik penyuntingan antara.',
 'undo-norev' => 'Suntingan ini tidak dapat dibatalkan karena halaman tidak ditemukan atau telah dihapuskan.',
-'undo-summary' => 'Membatalkan revisi $1 oleh [[Special:Contributions/$2|$2]] ([[User talk:$2|talk]])',
+'undo-summary' => 'Membatalkan revisi $1 oleh [[Special:Contributions/$2|$2]] ([[User talk:$2|bicara]])',
 
 # Account creation failure
 'cantcreateaccounttitle' => 'Akun tak dapat dibuat',
@@ -1403,7 +1403,7 @@ Perlu diingat bahwa indeks Google untuk konten {{SITENAME}} mungkin belum mencak
 
 # Preferences page
 'preferences' => 'Preferensi',
-'mypreferences' => 'Pengaturan',
+'mypreferences' => 'Preferensi',
 'prefs-edits' => 'Jumlah suntingan:',
 'prefsnologin' => 'Belum masuk log',
 'prefsnologintext' => 'Anda harus <span class="plainlinks">[{{fullurl:{{#Special:UserLogin}}|returnto=$1}} masuk log]</span> untuk mengeset preferensi Anda.',
@@ -2199,7 +2199,7 @@ Harap perhatikan bahwa situs web lain mungkin memiliki pranala ke suatu berkas d
 'nopagetitle' => 'Halaman tujuan tidak ditemukan',
 'nopagetext' => 'Halaman yang Anda tuju tidak ditemukan.',
 'pager-newer-n' => '{{PLURAL:$1|1 lebih baru|$1 lebih baru}}',
-'pager-older-n' => '{{PLURAL:$1|$1 lebih lama}}',
+'pager-older-n' => '{{PLURAL:$1|1 lebih lama|$1 lebih lama}}',
 'suppress' => 'Pengawas',
 'querypage-disabled' => 'Halaman istimewa ini dinonaktifkan demi alasan kinerja.',
 
@@ -2279,7 +2279,7 @@ Perlu sedikitnya satu domain tingkat atas, misalnya "*.org".<br />
 # Special:ActiveUsers
 'activeusers' => 'Daftar pengguna aktif',
 'activeusers-intro' => 'Berikut adalah daftar pengguna yang memiliki suatu bentuk aktivitas selama paling tidak $1 {{PLURAL:$1|hari|hari}} terakhir.',
-'activeusers-count' => '$1 {{PLURAL:$1|aktivitas|aktivitas}} dalam {{PLURAL:$3|hari|$3 hari}} terakhir',
+'activeusers-count' => '$1 {{PLURAL:$1|aktivitas|aktivitas}} dalam {{PLURAL:$3|hari|$3 hari}} terakhir',
 'activeusers-from' => 'Tampilkan pengguna mulai dari:',
 'activeusers-hidebots' => 'Sembunyikan bot',
 'activeusers-hidesysops' => 'Sembunyikan pengurus',
@@ -3268,7 +3268,7 @@ Jika dijalankan, sistem Anda akan berisiko terserang.",
 # Video information, used by Language::formatTimePeriod() to format lengths in the above messages
 'video-dims' => '$1, $2 × $3',
 'seconds-abbrev' => '$1 d',
-'minutes-abbrev' => '$1 m',
+'minutes-abbrev' => '$1 mnt',
 'hours-abbrev' => '$1 j',
 'days-abbrev' => '$1 h',
 'seconds' => '{{PLURAL:$1|$1 detik|$1 detik}}',
@@ -3338,6 +3338,8 @@ Data lain akan disembunyikan secara bawaan.
 * gpslatitude
 * gpslongitude
 * gpsaltitude',
+'metadata-langitem' => "'''$2:''' $1",
+'metadata-langitem-default' => '$1',
 
 # EXIF tags
 'exif-imagewidth' => 'Lebar',
@@ -3385,6 +3387,7 @@ Data lain akan disembunyikan secara bawaan.
 'exif-exposuretime' => 'Waktu pajanan',
 'exif-exposuretime-format' => '$1 detik ($2)',
 'exif-fnumber' => 'Nilai F',
+'exif-fnumber-format' => 'f/$1',
 'exif-exposureprogram' => 'Program pajanan',
 'exif-spectralsensitivity' => 'Sensitivitas spektral',
 'exif-isospeedratings' => 'Rating kecepatan ISO',
@@ -3398,6 +3401,7 @@ Data lain akan disembunyikan secara bawaan.
 'exif-lightsource' => 'Sumber cahaya',
 'exif-flash' => 'Kilas',
 'exif-focallength' => 'Jarak fokus lensa',
+'exif-focallength-format' => '$1 mm',
 'exif-subjectarea' => 'Wilayah subjek',
 'exif-flashenergy' => 'Energi kilas',
 'exif-focalplanexresolution' => 'Resolusi bidang fokus X',
@@ -3452,6 +3456,7 @@ Data lain akan disembunyikan secara bawaan.
 'exif-gpsareainformation' => 'Nama wilayah GPS',
 'exif-gpsdatestamp' => 'Tanggal GPS',
 'exif-gpsdifferential' => 'Koreksi diferensial GPS',
+'exif-coordinate-format' => '$1° $2′ $3″ $4',
 'exif-jpegfilecomment' => 'Komentar berkas JPEG',
 'exif-keywords' => 'Kata kunci',
 'exif-worldregioncreated' => 'Wilayah dunia tempat pengambilan gambar',
@@ -3517,15 +3522,37 @@ Data lain akan disembunyikan secara bawaan.
 'exif-originalimageheight' => 'Tinggi gambar sebelum dipotong',
 'exif-originalimagewidth' => 'Lebar gambar sebelum dipotong',
 
+# Make & model, can be wikified in order to link to the camera and model name
+'exif-contact-value' => '$1
+
+$2
+<div class="adr">
+$3
+
+$4, $5 - $6, $7
+</div>
+$8',
+'exif-subjectnewscode-value' => '$2 ($1)',
+
 # EXIF attributes
 'exif-compression-1' => 'Tak terkompresi',
 'exif-compression-2' => 'CCITT Group 3 1-Dimensional Modified Huffman RLE',
 'exif-compression-3' => 'CCITT Group 3 fax encoding',
 'exif-compression-4' => 'CCITT Group 4 fax encoding',
+'exif-compression-5' => 'LZW',
+'exif-compression-6' => 'JPEG (lama)',
+'exif-compression-7' => 'JPEG',
+'exif-compression-8' => 'Turunan (Adobe)',
+'exif-compression-32773' => 'PackBits (Macintosh RLE)',
+'exif-compression-32946' => 'Turunan (PKZIP)',
+'exif-compression-34712' => 'JPEG2000',
 
 'exif-copyrighted-true' => 'Berhak cipta',
 'exif-copyrighted-false' => 'Domain publik',
 
+'exif-photometricinterpretation-2' => 'RGB',
+'exif-photometricinterpretation-6' => 'YCbCr',
+
 'exif-unknowndate' => 'Tanggal tak diketahui',
 
 'exif-orientation-1' => 'Normal',
@@ -3540,9 +3567,19 @@ Data lain akan disembunyikan secara bawaan.
 'exif-planarconfiguration-1' => 'format chunky',
 'exif-planarconfiguration-2' => 'format planar',
 
+'exif-xyresolution-i' => '$1 dpi',
+'exif-xyresolution-c' => '$1 dpc',
+
+'exif-colorspace-1' => 'sRGB',
 'exif-colorspace-65535' => 'Tidak dikalibrasi',
 
 'exif-componentsconfiguration-0' => 'tak tersedia',
+'exif-componentsconfiguration-1' => 'Y',
+'exif-componentsconfiguration-2' => 'Cb',
+'exif-componentsconfiguration-3' => 'Cr',
+'exif-componentsconfiguration-4' => 'R',
+'exif-componentsconfiguration-5' => 'G',
+'exif-componentsconfiguration-6' => 'B',
 
 'exif-exposureprogram-0' => 'Tak terdefinisi',
 'exif-exposureprogram-1' => 'Manual',
@@ -3580,6 +3617,10 @@ Data lain akan disembunyikan secara bawaan.
 'exif-lightsource-17' => 'Cahaya standar A',
 'exif-lightsource-18' => 'Cahaya standar B',
 'exif-lightsource-19' => 'Cahaya standar C',
+'exif-lightsource-20' => 'D55',
+'exif-lightsource-21' => 'D65',
+'exif-lightsource-22' => 'D75',
+'exif-lightsource-23' => 'D50',
 'exif-lightsource-24' => 'studio ISO tungsten',
 'exif-lightsource-255' => 'Sumber cahaya lain',
 
@@ -3705,6 +3746,8 @@ Data lain akan disembunyikan secara bawaan.
 
 'exif-isospeedratings-overflow' => 'Lebih dari 65535',
 
+'exif-maxaperturevalue-value' => '$1 APEX (f/$2)',
+
 'exif-iimcategory-ace' => 'Seni, budaya, dan hiburan',
 'exif-iimcategory-clj' => 'Kejahatan dan hukum',
 'exif-iimcategory-dis' => 'Bencana dan kecelakaan',
@@ -3816,6 +3859,8 @@ Silakan konfirmasi jika Anda ingin membuat ulang halaman ini.",
 'confirmrecreate-noreason' => 'Pengguna [[User:$1|$1]] ([[User talk:$1|bicara]]) telah menghapus halaman ini setelah Anda mulai menyunting. Harap konfirmasikan bahwa Anda ingin membuat ulang halaman ini.',
 'recreate' => 'Buat ulang',
 
+'unit-pixel' => 'px',
+
 # action=purge
 'confirm_purge_button' => 'OK',
 'confirm-purge-top' => 'Hapus singgahan halaman ini?',
@@ -3827,6 +3872,15 @@ Silakan konfirmasi jika Anda ingin membuat ulang halaman ini.",
 'confirm-unwatch-button' => 'OK',
 'confirm-unwatch-top' => 'Hapus halaman ini dari daftar pantauan Anda?',
 
+# Separators for various lists, etc.
+'semicolon-separator' => ';&#32;',
+'comma-separator' => ',&#32;',
+'colon-separator' => ':&#32;',
+'autocomment-prefix' => '-&#32;',
+'pipe-separator' => '&#32;|&#32;',
+'word-separator' => '&#32;',
+'ellipsis' => '...',
+
 # Multipage image navigation
 'imgmultipageprev' => '&larr; halaman sebelumnya',
 'imgmultipagenext' => 'halaman selanjutnya &rarr;',
@@ -3932,6 +3986,7 @@ Anda juga dapat [[Special:EditWatchlist|menggunakan penyunting standar Anda]].',
 
 # Signatures
 'signature' => '[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|bicara]])',
+'timezone-utc' => 'UTC',
 
 # Core parser functions
 'unknown_extension_tag' => 'Tag ekstensi tidak dikenal "$1"',
@@ -3945,6 +4000,7 @@ Anda juga dapat [[Special:EditWatchlist|menggunakan penyunting standar Anda]].',
 'version-variables' => 'Variabel',
 'version-antispam' => 'Pencegahan spam',
 'version-skins' => 'Kulit',
+'version-api' => 'API',
 'version-other' => 'Lain-lain',
 'version-mediahandlers' => 'Penanganan media',
 'version-hooks' => 'Kait',
@@ -3954,6 +4010,7 @@ Anda juga dapat [[Special:EditWatchlist|menggunakan penyunting standar Anda]].',
 'version-hook-name' => 'Nama kait',
 'version-hook-subscribedby' => 'Dilanggani oleh',
 'version-version' => '(Versi $1)',
+'version-svn-revision' => '(r$2)',
 'version-license' => 'Lisensi',
 'version-poweredby-credits' => "Wiki ini didukung oleh '''[//www.mediawiki.org/ MediaWiki]''', hak cipta © 2001-$1 $2.",
 'version-poweredby-others' => 'lainnya',
@@ -3969,6 +4026,8 @@ Anda seharusnya telah menerima [{{SERVER}}{{SCRIPTPATH}}/COPYING salinan Lisensi
 'version-entrypoints' => 'URL titik entri',
 'version-entrypoints-header-entrypoint' => 'Titik entri',
 'version-entrypoints-header-url' => 'URL',
+'version-entrypoints-articlepath' => '[https://www.mediawiki.org/wiki/Manual:$wgArticlePath Artikel path]',
+'version-entrypoints-scriptpath' => '[https://www.mediawiki.org/wiki/Manual:$wgScriptPath Skrip path]',
 
 # Special:FilePath
 'filepath' => 'Lokasi berkas',
index cafb07c..8080a03 100644 (file)
@@ -2922,10 +2922,12 @@ $1 のブロックの理由は「''$2''」です。",
 [[Special:DoubleRedirects|二重転送]]や[[Special:BrokenRedirects|迷子のリダイレクト]]を確認する必要があります。
 リンクを正しく維持するのは移動した人の責任です。
 
-移動先が既に存在する場合は、そのページが転送ページであり、かつ過去の版を持たない場合を除いて移動'''できません'''。つまり、間違えてページ名を変更した場合には元に戻せます。また移動によって既存のページを上書きしてしまうことはありません。
+移動先のページが既に存在する場合は、その移動先が転送ページであり、かつ過去の版を持たない場合以外は移動'''できません'''。
+つまり、間違えてページ名を変更した場合には元に戻せます。また移動によって既存のページを上書きしてしまうことはありません。
 
-'''注意!'''
-よく閲覧されるページや、他の多くのページからリンクされているページを移動すると予期しない結果が起こるかもしれません。ページの移動に伴う影響をよく考えてから踏み切るようにしてください。",
+'''注意!'''
+よく閲覧されるページや、他の多くのページからリンクされているページを移動すると予期しない結果が起こるかもしれません。
+ページの移動に伴う影響をよく考えてから踏み切るようにしてください。",
 'movepagetext-noredirectfixer' => "下のフォームを使用すると、ページ名を変更でき、そのページの履歴も変更先に移動できます。
 移動元のページは移動先への転送ページになります。
 自動的な修正を選択しない場合は、[[Special:DoubleRedirects|二重転送]]や[[Special:BrokenRedirects|迷子のリダイレクト]]を確認する必要があります。
index 8859f3a..6caa6cd 100644 (file)
@@ -1382,10 +1382,10 @@ $1",
 # User rights
 'userrights' => 'მომხმარებელთა უფლებების მართვა',
 'userrights-lookup-user' => 'მომხმარებელთა ჯგუფების მართვა',
-'userrights-user-editname' => 'á\83\9bá\83\9dá\83\9bá\83®á\83\9bá\83\90á\83 á\83\94á\83\91á\83\9aá\83\98á\83¡ á\83¡á\83\90á\83®á\83\94á\83\9aá\83\98á\83¡ á\83¨á\83\94á\83¢á\83\90á\83\9cá\83\90:',
+'userrights-user-editname' => 'á\83¨á\83\94á\83\98á\83¢á\83\90á\83\9cá\83\94á\83\97 á\83\9bá\83\9dá\83\9bá\83®á\83\9bá\83\90á\83 á\83\94á\83\91á\83\9aá\83\98á\83¡ á\83¡á\83\90á\83®á\83\94á\83\9aá\83\98:',
 'editusergroup' => 'მომხმარებელთა ჯგუფების რედაქტირება',
-'editinguser' => "á\83\9bá\83\9dá\83\9bá\83®á\83\9bá\83\90á\83 á\83\94á\83\91á\83\9aá\83\98á\83¡ á\83£á\83¤á\83\9aá\83\94á\83\91á\83\94á\83\91á\83\98á\83¡ á\83¨á\83\94á\83ªá\83\95á\83\9aá\83\90 á\83\9bá\83\9dá\83\9bá\83®á\83\9bá\83\90á\83 á\83\94á\83\91á\83\9aá\83\98á\83¡á\83\97á\83\95á\83\98á\83¡ '''[[User:$1|$1]]''' $2",
-'userrights-editusergroup' => 'á\83 á\83\94á\83\93á\83\90á\83¥á\83¢á\83\98á\83 á\83\94á\83\91á\83\90 á\83\92á\83\90á\83£á\83\99á\83\94á\83\97á\83\94á\83\97 á\83\9bá\83\9dá\83\9bá\83®á\83\9bá\83\90á\83 á\83\94á\83\91á\83\94á\83\9aá\83\97á\83\90 á\83¯á\83\92á\83£á\83¤á\83\94á\83\91á\83¡',
+'editinguser' => "á\83£á\83¤á\83\9aá\83\94á\83\91á\83\94á\83\91á\83\98á\83¡ á\83¨á\83\94á\83ªá\83\95á\83\9aá\83\90 á\83\9bá\83\9dá\83\9bá\83®á\83\9bá\83\90á\83 á\83\94á\83\91á\83\9aá\83\98á\83¡á\83\97á\83\95á\83\98á\83¡: '''[[User:$1|$1]]''' $2",
+'userrights-editusergroup' => 'á\83\93á\83\90á\83\90á\83 á\83\94á\83\93á\83\90á\83¥á\83¢á\83\98á\83 á\83\94á\83\97 á\83\9bá\83\9dá\83\9bá\83®á\83\9bá\83\90á\83 á\83\94á\83\91á\83\94á\83\9aá\83\97á\83\90 á\83¯á\83\92á\83£á\83¤á\83\94á\83\91á\83\98',
 'saveusergroups' => 'მომხმარებელთა ჯგუფების შენახვა',
 'userrights-groupsmember' => 'ჯგუფის წევრი:',
 'userrights-groupsmember-auto' => 'ნაგულისხმევი წევრი:',
@@ -1394,7 +1394,7 @@ $1",
 * თუ ჯგუფის სახელწოდებასთან გაკეთებულია ნიშნული, ე.ი მომხმარებელი შედის ამ ჯგუფში.
 * თუ ნიშნული არ არის – მომხმარებელი არ განეკუთვნება არსებულ ჯგუფს.
 * ნიშანი * ნიშნავს, რომ თქვენ არ შეგიძლიათ მომხმარებლის ჯგუფიდან წაშლა, თუ დაამატებთ მას იქ ან პირიქით.',
-'userrights-reason' => 'მიზეზი:',
+'userrights-reason' => 'á\83¨á\83\94á\83ªá\83\95á\83\9aá\83\98á\83¡ á\83\9bá\83\98á\83\96á\83\94á\83\96á\83\98:',
 'userrights-no-interwiki' => 'თქვენ არ გაქვთ მომხმარებლის უფლებების რედაქტირების უფლება სხვა ვიკი-ებში.',
 'userrights-nodatabase' => 'მონაცემთა ბაზა $1 არ არსებობს, ან არ არის ლოკალური.',
 'userrights-nologin' => 'თქვენ უნდა [[Special:UserLogin|წარადგინოთ თავი სისტემისადმი]] ადმინისისტრატორის ანგარიშით იმისთვის, რომ გასცეთ მომხმარებელთა უფლებები.',
index b50820f..76c8e2a 100644 (file)
@@ -1628,7 +1628,7 @@ $2',
 'whatlinkshere-hideredirs' => '$1 ಪುನರ್ನಿರ್ದೇಶನಗಳು',
 'whatlinkshere-hidetrans' => '$1 ಸೇರಿಸುವಿಕೆಗಳು',
 'whatlinkshere-hidelinks' => '$1 ಕೊಂಡಿಗಳು',
-'whatlinkshere-hideimages' => '$1 ಚಿತ್ರ ಕೊಂಡಿಗಳು',
+'whatlinkshere-hideimages' => '$1 ಚಿತ್ರ ಕೊಂಡಿಗಳು',
 'whatlinkshere-filters' => 'ಶೋಧಕಗಳು',
 
 # Block/unblock
index 29771eb..162d147 100644 (file)
@@ -1780,9 +1780,9 @@ HTML 태그를 확인하세요.',
 [[Special:FileList|파일 목록]]에서 이전에 올라온 파일을 찾을 수 있습니다. [[Special:Log/upload|올리기 기록]]에는 파일이 올라온 기록이 남습니다. 삭제 기록은 [[Special:Log/delete|삭제 기록]]에서 볼 수 있습니다.
 
 문서에 파일을 넣으려면 아래 방법 중 하나를 사용하세요.
-* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:File.jpg]]</nowiki></code>''' 파일의 온전한 모양을 사용하고자 할 때.
-* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:File.png|200픽셀|섬네일|왼쪽|설명]]</nowiki></code>''' 파일의 넓이를 200픽셀로 하고 왼쪽 정렬하며 '설명' 이라는 주석을 파일 밑에 달 때.
-* '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:File.ogg]]</nowiki></code>''' 파일을 직접 보여주지 않고 파일로 바로 링크할때.",
+* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:File.jpg]]</nowiki></code>''' 파일의 온전한 모양을 사용하고자 할 때
+* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:File.png|200픽셀|섬네일|왼쪽|설명]]</nowiki></code>''' 파일의 넓이를 200픽셀로 하고 왼쪽 정렬하며 '설명' 이라는 주석을 파일 밑에 달 때
+* '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:File.ogg]]</nowiki></code>''' 파일을 직접 보여주지 않고 파일로 바로 링크할 때",
 'upload-permitted' => '허용하는 파일 확장자: $1',
 'upload-preferred' => '권장하는 파일 확장자: $1',
 'upload-prohibited' => '금지하는 파일 확장자: $1',
@@ -1839,14 +1839,14 @@ $2 형식만 사용할 수 있습니다.',
 'fileexists-extension' => '비슷한 이름의 파일이 존재합니다: [[$2|thumb]]
 * 올리려는 파일 이름: <strong>[[:$1]]</strong>
 * 존재하는 파일 이름: <strong>[[:$2]]</strong>
\8b¤ë¥¸ ì\9d´ë¦\84ì\9c¼ë¡\9c ì\8b\9cë\8f\84í\95´ ì£¼세요.',
\8b¤ë¥¸ ì\9d´ë¦\84ì\9c¼ë¡\9c ì\84 í\83\9dí\95\98세요.',
 'fileexists-thumbnail-yes' => '이 파일은 원본 그림이 아닌, 다른 그림의 크기를 줄인 섬네일 파일인 것 같습니다.
 [[$1|thumb]]
-<strong>[[:$1]]</strong> í\8c\8cì\9d¼ì\9d\84 í\99\95ì\9d¸í\95´ì£¼세요.
-해당 파일이 현재 올리려는 파일과 같다면, 더 작은 크기의 그림을 올릴 필요는 없습니다.',
+<strong>[[:$1]]</strong> í\8c\8cì\9d¼ì\9d\84 í\99\95ì\9d¸í\95\98세요.
+해당 파일이 현재 올리려는 파일과 같다면 더 작은 크기의 그림을 올릴 필요는 없습니다.',
 'file-thumbnail-no' => '파일 이름이 <strong>$1</strong>으로 시작합니다.
 이 파일은 원본 그림이 아닌, 다른 그림의 크기를 줄인 섬네일 파일인 것 같습니다.
\8d\94 í\95´ì\83\81ë\8f\84ê°\80 ì¢\8bì\9d\80 í\8c\8cì\9d¼ì\9d´ ì\9e\88ë\8b¤ë©´ ê·¸ í\8c\8cì\9d¼ì\9d\84 ì\98¬ë ¤ì£¼ì\84¸ì\9a\94. ì\95\84ë\8b\88ë©´ ì\98¬ë¦¬ë ¤ë\8a\94 í\8c\8cì\9d¼ ì\9d´ë¦\84ì\9d\84 ë°\94꾸ì\96´ ì£¼세요.',
\8d\94 í\95´ì\83\81ë\8f\84ê°\80 ì¢\8bì\9d\80 í\8c\8cì\9d¼ì\9d´ ì\9e\88ë\8b¤ë©´ ê·¸ í\8c\8cì\9d¼ì\9d\84 ì\98¬ë¦¬ê±°ë\82\98 ì\95\84ë\8b\88ë©´ ì\98¬ë¦¬ë ¤ë\8a\94 í\8c\8cì\9d¼ ì\9d´ë¦\84ì\9d\84 ë°\94꾸세요.',
 'fileexists-forbidden' => '같은 이름의 파일이 이미 있고, 덮어쓸 수 없습니다.
 그래도 파일을 올리시려면, 뒤로 돌아가서 다른 이름으로 시도해 주시기 바랍니다.
 [[File:$1|thumb|center|$1]]',
@@ -3232,7 +3232,7 @@ $1 사용자가 차단된 이유는 다음과 같습니다: "$2"',
 'pageinfo-robot-policy' => '검색 엔진 통계',
 'pageinfo-robot-index' => '색인 가능',
 'pageinfo-robot-noindex' => '색인 불가능',
-'pageinfo-views' => '읽힌 횟수',
+'pageinfo-views' => '읽은 수',
 'pageinfo-watchers' => '문서를 주시하는 사용자 수',
 'pageinfo-redirects-name' => '이 문서로 넘겨주기',
 'pageinfo-redirects-value' => '$1개',
@@ -3261,7 +3261,7 @@ $1 사용자가 차단된 이유는 다음과 같습니다: "$2"',
 'pageinfo-category-info' => '분류 정보',
 'pageinfo-category-pages' => '문서 수',
 'pageinfo-category-subcats' => '하위 분류 수',
-'pageinfo-category-files' => '파일 수',
+'pageinfo-category-files' => '파일 수',
 
 # Skin names
 'skinname-standard' => '클래식',
index a579d53..ce16b53 100644 (file)
@@ -2511,8 +2511,8 @@ Kuckt d'[[Special:BlockList|Spär-Lëscht]] fir all Spären nozekucken.",
 'unblocked' => "D'Spär fir de [[User:$1|Benotzer $1]] gouf opgehuewen",
 'unblocked-range' => "D'Spär vum $1 gouf opgehuewen",
 'unblocked-id' => "D'Spär $1 gouf opgehuewen",
-'blocklist' => 'Gespaarte Benotzer',
-'ipblocklist' => 'Gespaarte Benotzer',
+'blocklist' => 'Gespaart Benotzer',
+'ipblocklist' => 'Gespaart Benotzer',
 'ipblocklist-legend' => 'No engem gespaarte Benotzer sichen',
 'blocklist-userblocks' => 'Benotzerspäre verstoppen',
 'blocklist-tempblocks' => 'Temporär Späre verstoppen',
index cdddf43..c3010e0 100644 (file)
@@ -1988,7 +1988,7 @@ Aza manadino manamarina raha tsy misy rohy makany amin'ny endrika hafa alohan'ny
 'listusers-creationsort' => "Afantina amin'ny daty fanokafana",
 'usereditcount' => 'fanovana $1 {{PLURAL:}}',
 'usercreated' => "Noforonina ny {{GENDER:$3}} $1 tamin'ny $2",
-'newpages' => 'pejy Vaovao',
+'newpages' => 'Pejy vaovao',
 'newpages-username' => 'Solonanarana:',
 'ancientpages' => 'Ireo pejy tranainy indrindra',
 'move' => 'Hamindra azy toerana',
index fde5c91..7a92fb0 100644 (file)
@@ -25,32 +25,32 @@ $namespaceNames = array(
 
 $messages = array(
 # User preference toggles
-'tog-underline' => 'Garih bawahi link:',
+'tog-underline' => 'Garih bawahi tautan:',
 'tog-justify' => 'Ratokan paragraf',
 'tog-hideminor' => 'Suruakkan suntingan ketek di parubahan tabaru',
 'tog-hidepatrolled' => 'Suruakkan suntingan nan lah dijago di parubahan tabaru',
-'tog-newpageshidepatrolled' => 'Suruakkan halaman nan lah dijago dari senarai halaman baru',
-'tog-extendwatchlist' => 'Kambangkan senarai pantauan untuak malihek sado parubahan, indak nan baru se',
-'tog-usenewrc' => 'Kalompok parubahan dek laman dalam parubahan tabaru jo daftar pantauan (paralu JavaScript)',
+'tog-newpageshidepatrolled' => 'Suruakkan laman nan lah dijago dari dafta laman baru',
+'tog-extendwatchlist' => 'Kambangkan dafta pantauan untuak malihek sado parubahan, indak nan baru se',
+'tog-usenewrc' => 'Gunokan tampilan parubahan tingkek lanjuik (paralu JavaScript)',
 'tog-numberheadings' => 'Agiah nomor judua sacaro otomatis',
 'tog-showtoolbar' => 'Tampilkan bilah suntiang (paralu JavaScript)',
-'tog-editondblclick' => 'Suntiang laman jo klik ganda (JavaScript)',
-'tog-editsection' => 'Fungsikan penyuntingan subbagian malalui [sunting] pranala',
-'tog-editsectiononrightclick' => 'Hiduikan bagian panyuntiangan jo mangklik kanan pado judul bagian (JavaScript)',
-'tog-showtoc' => 'Caliakkan dafta isi (untuak laman nan mampunyoi labiah dari 3 subbagian)',
-'tog-rememberpassword' => 'Kana log masuak denai di peramban ko (salamo $1 {{PLURAL:$1|hari|hari}})',
-'tog-watchcreations' => 'Tambahkan laman nan den buek jo gambar nan den unggah ka daftar pantauan',
-'tog-watchdefault' => 'Tambahkan laman jo gambar nan den suntiang ka daftar pantauan',
-'tog-watchmoves' => 'Tambahkan laman jo gambar nan den pindah ka daftar pantauan',
-'tog-watchdeletion' => 'Tambahkan laman jo gambar nan den hapuih ka daftar pantauan',
+'tog-editondblclick' => 'Suntiang laman jo klik duo kali (paralu JavaScript)',
+'tog-editsection' => 'Fungsikan penyuntiangan subbagian malalui [sunting] tautan',
+'tog-editsectiononrightclick' => 'Hiduikkan bagian panyuntiangan jo mangklik kanan pado judul bagian (paralu JavaScript)',
+'tog-showtoc' => 'Tunjuakkan dafta isi (untuak laman nan labiah dari 3 subbagian)',
+'tog-rememberpassword' => 'Ingek log masuak denai di paramban ko (salamo $1 {{PLURAL:$1|hari}})',
+'tog-watchcreations' => 'Tambahkan laman nan den buek jo gambar nan den unggah ka dafta pantauan',
+'tog-watchdefault' => 'Tambahkan laman jo gambar nan den suntiang ka dafta pantauan',
+'tog-watchmoves' => 'Tambahkan laman jo gambar nan den pindah ka dafta pantauan',
+'tog-watchdeletion' => 'Tambahkan laman jo gambar nan den hapuih ka dafta pantauan',
 'tog-minordefault' => 'Tandoi sadoalah suntiangan sabagai suntiangan ketek sacaro baku',
 'tog-previewontop' => 'Tampilkan pratonton sabalun kotak suntiang',
-'tog-previewonfirst' => 'Caliakkan pratayang pado suntiangan patamo',
-'tog-nocache' => 'Matikan panyinggahan laman peramban',
-'tog-enotifwatchlistpages' => 'Kirimkan surel kalau laman atau gambar pado daftar pantauan lah barubah',
-'tog-enotifusertalkpages' => 'E-mail ambo jiko laman barundiang denai lah barubah',
+'tog-previewonfirst' => 'Tunjuakkan pratonton pado suntiangan patamo',
+'tog-nocache' => 'Matikan panyinggahan laman paramban',
+'tog-enotifwatchlistpages' => 'Kirimkan surel, kalau laman atau gambar pado daftar pantauan den lah barubah',
+'tog-enotifusertalkpages' => "Kirimkan denai surel ko' laman diskusi den lah barubah",
 'tog-enotifminoredits' => 'Kirimkan surel juo untuk saketek suntingan pado laman jo gambar',
-'tog-enotifrevealaddr' => 'Cogokan alamaik e-mail den pado e-mail notifikasi',
+'tog-enotifrevealaddr' => 'Tunjuakkan alamaik surel ambo pado pambaritauan surel',
 'tog-shownumberswatching' => 'Tunjuakkan jumlah pamantau',
 'tog-oldsig' => 'Tando tangan kini:',
 'tog-fancysig' => 'Palakuan tando tangan sabagai teks wiki (tanpa suatu tautan otomatis)',
@@ -178,7 +178,7 @@ $messages = array(
 'vector-action-addsection' => 'Bagian baru',
 'vector-action-delete' => 'Hapuih',
 'vector-action-move' => 'Pindahkan',
-'vector-action-protect' => 'Lindungi',
+'vector-action-protect' => 'Linduangkan',
 'vector-action-undelete' => 'Pambatalan panghapusan',
 'vector-action-unprotect' => 'Tuka palinduangan',
 'vector-simplesearch-preference' => 'Aktifkan kotak pancarian sadarano (hanyo kulik Vector)',
@@ -215,7 +215,7 @@ $messages = array(
 'deletethispage' => 'Hapuih laman iko',
 'undelete_short' => 'Batal hapuih $1 {{PLURAL:$1|suntiangan|suntiangan}}',
 'viewdeleted_short' => 'Liek {{PLURAL:$1|ciek suntiangan|$1 suntiangan}} nan dihapuih',
-'protect' => 'Lindungi',
+'protect' => 'Linduangkan',
 'protect_change' => 'ubah',
 'protectthispage' => 'Lindungi laman iko',
 'unprotect' => 'Tuka palinduangan',
@@ -287,7 +287,7 @@ $1',
 'retrievedfrom' => 'Didapek dari "$1"',
 'youhavenewmessages' => 'Awak punyo $1 ($2).',
 'newmessageslink' => 'pasan baru',
-'newmessagesdifflink' => 'parubahan terakhir',
+'newmessagesdifflink' => 'parubahan tarakhia',
 'youhavenewmessagesfromusers' => 'Sanak mandapek $1 dari {{PLURAL:$3|another user|$3 users}} ($2)',
 'youhavenewmessagesmanyusers' => 'Sanak mandapek $1 dari banyak pangguno ($2)',
 'newmessageslinkplural' => '{{PLURAL:$1|sabuah pasan baru|pasan baru}}',
@@ -448,8 +448,8 @@ Parhatian bahawa bara laman mungkin masih taruih manunjukkan bahawa Sanak masih
 'notloggedin' => 'Alun masuak log',
 'nologin' => "Alun mampunyoi akun? '''$1'''.",
 'nologinlink' => 'Buek akun baru',
-'createaccount' => 'Buek akun baharu',
-'gotaccount' => "Alah tadaftar sabagai pangguno? '''$1'''.",
+'createaccount' => 'Buek akun',
+'gotaccount' => "Alah tadafta sabagai pangguno? '''$1'''.",
 'gotaccountlink' => 'Masuak log',
 'userlogin-resetlink' => 'Lupo rincian info masuak Sanak?',
 'createaccountmail' => 'Pakai kato sandi sumbarang samantaro, lalu kirim ka alamaik surel nan di bawah ko',
@@ -709,7 +709,7 @@ Pratayang iko alun disimpan!'''",
 'userinvalidcssjstitle' => "'''Paringatan:''' Kulik \"\$1\" indak ditamuan. Harap diingek bahawa laman .css dan .js manggunokan huruf kecil, contoh {{ns:user}}:Foo/vector.css dan bukannyo {{ns:user}}:Foo/Vector.css.",
 'updated' => '(Dipabaharui)',
 'note' => "'''Catatan:'''",
-'previewnote' => "'''Ingek bahasonyo iko hanyo pratonton'''
+'previewnote' => "'''Ingek ko hanyo pratonton'''
 Parubahan Sanak alun disimpan!",
 'continue-editing' => 'Pai ka area mangedit.',
 'previewconflict' => 'Pratayang iko mancaminan teks pado bagian ateh kotak suntiangan teks sabagaimano akan taliek bilo Sanak manyimpannyo.',
@@ -774,11 +774,11 @@ Sanak dapek baliak dan manyuntiang laman nan alah ado, atau sila [[Special:UserL
 'sectioneditnotsupported-text' => 'Panyuntiangan bagian indak didukuang di laman suntiang iko.',
 'permissionserrors' => 'Kasalahan Hak Akses',
 'permissionserrorstext' => 'Sanak ndak mampunyoi hak untuak malakuan hal itu karano {{PLURAL:$1|alasan|alasan-alasan}} barikuik:',
-'permissionserrorstext-withaction' => 'Awak indak punyo hak akses untuak $2, karano {{PLURAL:$1|alasan|alasan}} berikut:',
-'recreate-moveddeleted-warn' => "'''Paringatan: Sanak mambuek ulang suatu laman nan alah parnah dihapuih.'''
+'permissionserrorstext-withaction' => 'Awak indak punyo hak akses untuak $2, karano {{PLURAL:$1|alasan}} barikuik:',
+'recreate-moveddeleted-warn' => "'''Ingek: Sanak mambuek ulang suatu laman nan alah dihapuih.'''
 
-Harap patimbangan apokah layak untuak malanjutan suntiangan Sanak.
-Barikuik adolah log panghapuihan dan pamindahan dari laman iko:",
+Harap ditimbang apo rancak malanjuikan suntiangan Sanak.
+Barikuik ko log panghapuihan jo pamindahan dari laman ko:",
 'moveddeleted-notice' => 'Laman ko alah dihapuih.
 Sabagai referensi, barikuik adolah log panghapuihan dan pamindahannyo.',
 'log-fulllog' => 'Liek saluruah log',
@@ -844,8 +844,8 @@ Alasan nan diagiah jo $3 adolah ''$2''",
 'revisionasof' => 'Pabaikkan per $1',
 'revision-info' => 'Revisi sajak $1 dek $2',
 'previousrevision' => '← Pabaikkan sabalunnyo',
-'nextrevision' => 'Revisi selanjutnyo →',
-'currentrevisionlink' => 'Revisi terkini',
+'nextrevision' => 'Revisi selanjuiknyo →',
+'currentrevisionlink' => 'Revisi tabaru',
 'cur' => 'kini',
 'next' => 'lanjuik',
 'last' => 'sabalun',
@@ -908,7 +908,7 @@ Rinciannyo mungkin ado di [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAME
 'lineno' => 'Barih $1:',
 'compareselectedversions' => 'Bandiangan versi tapiliah',
 'editundo' => 'batal',
-'diff-multi' => '({{PLURAL:$1|ciek |$1 revisi antaro}} oleh {{PLURAL:$2|ciek|$2 pangguno}} indak ditampilkan)',
+'diff-multi' => '({{PLURAL:$1|$1 revisi antaro}} oleh {{PLURAL:$2|$2 pangguno}} indak ditampilkan)',
 
 # Search results
 'searchresults' => 'Hasil pancarian',
@@ -938,7 +938,7 @@ Rinciannyo mungkin ado di [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAME
 'searchprofile-everything-tooltip' => 'Cari sadoalahnyo (tamasuak laman maota)',
 'searchprofile-advanced-tooltip' => 'Pacarian di ruang namo tatantu',
 'search-result-size' => '$1 ({{PLURAL:$2|1 kato|$2 kato}})',
-'search-result-category-size' => '{{PLURAL:$1|1 anggota|$1 anggota}} ({{PLURAL:$2|1 subkategori|$2 subkategori}}, {{PLURAL:$3|1 berkas|$3 berkas}})',
+'search-result-category-size' => '{{PLURAL:$1|$1 anggota}} ({{PLURAL:$2|$2 subkategori}}, {{PLURAL:$3|$3 berkas}})',
 'search-result-score' => 'Relevansi: $1%',
 'search-redirect' => '(pangaliahan $1)',
 'search-section' => '(bagian $1)',
@@ -998,9 +998,9 @@ Cubo awali permintaan awak tu jo ''all:'' untuak mancari sado kandungan (tamasua
 'youremail' => 'Surel:',
 'username' => '{{GENDER:$1|Namo pangguno}}:',
 'yourrealname' => 'Namo sabananyo:',
-'prefs-help-email' => 'Alamaik surek elektronik ko hanyo tambahan se, namun paralu untuak maulang kato kunci, jiko awak ang lupo kato kunci.',
-'prefs-help-email-others' => 'Awak ang juo dapek mamiliah untuak mangizinkan urang lain manghubungi awak ang jo surek elektronik malalui laman pangguno atau laman ota.
-Alamaik surek elektronik awak ang tu indak kan katahuan dek urang lain nan manghubungi awak ang tu.',
+'prefs-help-email' => 'Alamaik surel ko hanyo tambahan se, namun paralu untuak maulang kato kunci, jikok Sanak lupo kato kunci.',
+'prefs-help-email-others' => 'Sanak dapek mamiliah untuak mangizinkan urang lain manghubungi jo surel malalui laman pangguno atau laman diskusi.
+Alamaik surel tu indakkan tau dek urang nan manghubungi sanak tu.',
 'prefs-signature' => 'Tando tangan',
 
 # Groups
@@ -1018,7 +1018,7 @@ Alamaik surek elektronik awak ang tu indak kan katahuan dek urang lain nan mangh
 'action-edit' => 'suntiang laman ko',
 
 # Recent changes
-'nchanges' => '$1 {{PLURAL:$1|parubahan|parubahan}}',
+'nchanges' => '$1 {{PLURAL:$1|parubahan}}',
 'recentchanges' => 'Parubahan baru',
 'recentchanges-legend' => 'Pilihan parubahan baru',
 'recentchanges-summary' => 'Manjajak parubahan terbaru dalam wiki di laman ko.',
@@ -1027,8 +1027,8 @@ Alamaik surek elektronik awak ang tu indak kan katahuan dek urang lain nan mangh
 'recentchanges-label-minor' => 'Iko suntiangan ketek',
 'recentchanges-label-bot' => 'Suntiang ko dibuek dek bot',
 'recentchanges-label-unpatrolled' => 'Suntiangan ko alun dipatroli',
-'rcnote' => "Berikut ko {{PLURAL:$1|'''1'''|'''$1'''}} parubahan dalam {{PLURAL:$2|hari|'''$2''' hari}} terakhir, sampai $5, pukul $4.",
-'rcnotefrom' => "Di bawah ko ado parubahan sejak '''$2''' (sampai '''$1''' parubahan).",
+'rcnote' => "Berikuik ko {{PLURAL:$1|'''$1'''}} parubahan dalam {{PLURAL:$2|'''$2''' hari}} tarakhia, sampai $4, pukul $5.",
+'rcnotefrom' => "Di bawah ko ado parubahan mulai dari '''$2''' (sampai '''$1''' parubahan).",
 'rclistfrom' => 'Tampilkan parubahan baru mulai dari $1',
 'rcshowhideminor' => '$1 suntingan ketek',
 'rcshowhidebots' => '$1 bot',
@@ -1061,7 +1061,7 @@ Laman pado [[Special:Watchlist|pantauan Sanak]] ditandoi jo '''cetak taba'''.",
 'upload' => 'Muek berkas',
 'uploadlogpage' => 'Log unggah',
 'filedesc' => 'Ringkasan',
-'uploadedimage' => 'unggah "[[$1]]"',
+'uploadedimage' => 'muek "[[$1]]"',
 
 'license' => 'Lisensi:',
 'license-header' => 'Lisensi',
@@ -1070,7 +1070,7 @@ Laman pado [[Special:Watchlist|pantauan Sanak]] ditandoi jo '''cetak taba'''.",
 'file-anchor-link' => 'Berkas',
 'filehist' => 'Riwayaik berkas',
 'filehist-help' => 'Klik pado tanggal/waktu untuak malihek berkas pado maso tu',
-'filehist-revert' => 'kembalikan',
+'filehist-revert' => 'baliakkan',
 'filehist-current' => 'kini ko',
 'filehist-datetime' => 'Tanggal/Waktu',
 'filehist-thumb' => 'Miniatur',
@@ -1079,7 +1079,7 @@ Laman pado [[Special:Watchlist|pantauan Sanak]] ditandoi jo '''cetak taba'''.",
 'filehist-dimensions' => 'Dimensi',
 'filehist-comment' => 'Komen',
 'imagelinks' => 'Panggunoan berkas',
-'linkstoimage' => 'Barikuik ko {{PLURAL:$1|laman nan takaik|$1 laman nan takaik}} jo berkas:',
+'linkstoimage' => 'Barikuik ko {{PLURAL:$1|$1 laman nan takaik}} jo berkas:',
 'nolinkstoimage' => 'Indak ado laman nan batauik ka berkas ko.',
 'sharedupload' => 'Berkas ko barasal dari $1 dan mungkin digunoan oleh berbagai proyek lain.',
 'sharedupload-desc-here' => 'Berkas ko dari $1 dan mungkin digunoan untuak proyek-proyek lain.
@@ -1097,7 +1097,7 @@ Katarangan dari [$2 laman kataranagn berkas] ditampilkan di bawah.',
 # Miscellaneous special pages
 'nbytes' => '$1 {{PLURAL:$1|bita}}',
 'nmembers' => '$1 {{PLURAL:$1|anggota}}',
-'prefixindex' => 'Semua laman jo awalan',
+'prefixindex' => 'Sado laman jo awalan',
 'usercreated' => '{{GENDER:$3|Dibuek}} pado $1 pukua $2',
 'newpages' => 'Laman baru',
 'move' => 'Pindah',
@@ -1130,10 +1130,10 @@ Katarangan dari [$2 laman kataranagn berkas] ditampilkan di bawah.',
 'linksearch-line' => '$1 tapauik dari $2',
 
 # Special:ListGroupRights
-'listgrouprights-members' => '(senarai anggota)',
+'listgrouprights-members' => '(dafta anggota)',
 
 # E-mail user
-'emailuser' => 'E-mail pangguno',
+'emailuser' => 'Kirim surel pangguno ko',
 
 # Watchlist
 'watchlist' => 'Daftapantau',
@@ -1145,9 +1145,9 @@ Parubahan laman ko tamasuak laman otanyo akan ditampilkan dalam '''cetak taba'''
 'watch' => 'Pantau',
 'watchthispage' => 'Pantau laman ko',
 'unwatch' => 'Batal pantau',
-'watchlist-details' => '{{PLURAL:$1|$1 laman|$1 laman}} dalam senarai pantauan awak, indak tamasuak laman ota.',
-'wlshowlast' => 'Tampilkan $1 jam $2 hari terakhir $3',
-'watchlist-options' => 'Pilihan senarai pantauan',
+'watchlist-details' => '{{PLURAL:$1|$1 laman}} dalam daftapantau awak, indak tamasuak laman diskusi.',
+'wlshowlast' => 'Tampilkan $1 jam $2 hari tarakhia $3',
+'watchlist-options' => 'Piliahan daftapantau',
 
 # Displayed when you click the "watch" button and it is in the process of watching
 'watching' => 'Mamantau...',
@@ -1171,7 +1171,7 @@ Caliak $2 untuak rakam jajak laman nan lah dihapuih.',
 
 # Protect
 'protectlogpage' => 'Log palinduangan',
-'protectedarticle' => 'melindungi "[[$1]]"',
+'protectedarticle' => 'malinduangkan "[[$1]]"',
 'modifiedarticleprotection' => 'maubah tingkek perlindungan "[[$1]]"',
 'protectcomment' => 'Alasan:',
 'protectexpiry' => 'Kadaluwarsa:',
@@ -1214,7 +1214,7 @@ Awak dapek maubah tingkek perlindungannyo, walaupun indak pangaruah pado perlind
 'month' => 'Dari bulan (dan sabalunnyo):',
 'year' => 'Dari taun (dan sabalunnyo):',
 
-'sp-contributions-newbies' => 'Tampilkan jariah pangguno baru',
+'sp-contributions-newbies' => 'Tampilkan jariah pangguno baru sajo',
 'sp-contributions-blocklog' => 'log pamblokiran',
 'sp-contributions-deleted' => 'kontribusi pangguno nan lah batiadoan',
 'sp-contributions-uploads' => 'muek',
@@ -1222,7 +1222,7 @@ Awak dapek maubah tingkek perlindungannyo, walaupun indak pangaruah pado perlind
 'sp-contributions-talk' => 'diskusi',
 'sp-contributions-search' => 'Cari jariah',
 'sp-contributions-username' => 'Alamat IP atau namo pangguno:',
-'sp-contributions-toponly' => 'Hanyo manampilan suntiangan nan taakhia',
+'sp-contributions-toponly' => 'Hanyo manampilan suntiangan nan tarakhia',
 'sp-contributions-submit' => 'Cari',
 
 # What links here
@@ -1251,10 +1251,10 @@ Awak dapek maubah tingkek perlindungannyo, walaupun indak pangaruah pado perlind
 'unblocklink' => 'hilangkan blokir',
 'change-blocklink' => 'ubah balokir',
 'contribslink' => 'jariah',
-'blocklogpage' => 'Log pambalokiran',
-'blocklogentry' => 'memblokir [[$1]] dalam maso berlaku $2 $3',
+'blocklogpage' => 'Log pamblokiran',
+'blocklogentry' => 'mamblokir [[$1]] dalam maso $2 $3',
 'unblocklogentry' => 'mahilangkan blokir $1',
-'block-log-flags-nocreate' => 'cipta akun dimatikan',
+'block-log-flags-nocreate' => 'mambuek akun dimatikan',
 
 # Move page
 'movepagetext' => "Formulir di bawah ko digunoan untuak maubah namo suatu laman dan mamindahkan semua data riwayat ka namo baru. Judul lamo tu akan manjadi laman peralihan manuju judul yang baru. Pranala ka judul lamo indak akan baubah. Pastikan diperiksa laman yang [[Special:DoubleRedirects|peralihan ganda]] atau [[Special:BrokenRedirects|peralihan rusak]]. Awak bertanggungjawab untuak memastikan bahwa pranala tu terus manyambuang ka laman yang seharusnyo.
@@ -1328,7 +1328,7 @@ Sanak hanyo buliah mancaliak sumbernyo sajo',
 'tooltip-feed-rss' => 'Umpan RSS untuak laman ko',
 'tooltip-feed-atom' => 'Umpan Atom untuak laman ko',
 'tooltip-t-contributions' => 'Caliak dafta jariah pangguno ko',
-'tooltip-t-emailuser' => 'Kirimkan e-mail ka pangguno ko',
+'tooltip-t-emailuser' => 'Kirim surel ka pangguno ko',
 'tooltip-t-upload' => 'Muek berkas',
 'tooltip-t-specialpages' => 'Dafta dari sado laman istimewa',
 'tooltip-t-print' => 'Versi cetak dari laman ko',
@@ -1402,6 +1402,27 @@ Variants for Chinese language
 'variantname-zh-hans' => 'hans',
 'variantname-zh-hant' => 'hant',
 'variantname-zh-cn' => 'cn',
+'variantname-zh-tw' => 'tw',
+'variantname-zh-hk' => 'hk',
+'variantname-zh-mo' => 'mo',
+'variantname-zh-sg' => 'sg',
+'variantname-zh-my' => 'my',
+'variantname-zh' => 'zh',
+
+# Variants for Gan language
+'variantname-gan-hans' => 'hans',
+'variantname-gan-hant' => 'hant',
+'variantname-gan' => 'gan',
+
+# Variants for Serbian language
+'variantname-sr-ec' => 'sr-ec',
+'variantname-sr-el' => 'sr-el',
+'variantname-sr' => 'sr',
+
+# Variants for Kazakh language
+'variantname-kk-kz' => 'kk-kz',
+'variantname-kk-tr' => 'kk-tr',
+'variantname-kk-cn' => 'kk-cn',
 
 # Metadata
 'metadata' => 'Metadata',
@@ -1429,17 +1450,21 @@ Nan lainnyo akan tasuruak sacaro default.
 'edit-externally-help' => '(Caliak [//www.mediawiki.org/wiki/Manual:External_editors instruksi pangaturan] untuak informasi lanjuiknyo)',
 
 # 'all' in various places, this might be different for inflected languages
-'watchlistall2' => 'semua',
+'watchlistall2' => 'kasadonyo',
 'namespacesall' => 'sadonyo',
 'monthsall' => 'sadonyo',
 
 # Watchlist editing tools
 'watchlisttools-view' => 'Tampilkan parubahan takaik',
-'watchlisttools-edit' => 'Tampilkan dan suntiang senarai pantauan',
-'watchlisttools-raw' => 'Suntiang senarai pantauan mentah',
+'watchlisttools-edit' => 'Tampilkan sarato suntiang daftapantau',
+'watchlisttools-raw' => 'Suntiang pantauan mantah',
 
 # Core parser functions
-'duplicate-defaultsort' => '\'\'\'Peringatan:\'\'\' Kunci panguruitan default "$2" sabalunnyo maabaikan kunci panguruitan default "$1".',
+'duplicate-defaultsort' => '\'\'\'Peringatan:\'\'\' Kunci panguruitan default "$2" sabalunnyo mangabaikan kunci panguruitan default "$1".',
+
+# Special:Version
+'version-entrypoints-articlepath' => '[https://www.mediawiki.org/wiki/Manual:$wgArticlePath Artikel path]',
+'version-entrypoints-scriptpath' => '[https://www.mediawiki.org/wiki/Manual:$wgScriptPath Skrip path]',
 
 # Special:FileDuplicateSearch
 'fileduplicatesearch-result-n' => 'Berkas "$1" punyo {{PLURAL:$2|1 duplikat identik|$2 duplikat identik}}.',
index 83607c2..cc1a869 100644 (file)
@@ -629,7 +629,7 @@ Jangan lupa untuk mengubah [[Special:Preferences|keutamaan anda di {{SITENAME}}]
 'gotaccount' => "Sudah mempunyai akaun? '''$1'''.",
 'gotaccountlink' => 'Log masuk',
 'userlogin-resetlink' => 'Lupa nama pengguna/kata laluan anda?',
-'createaccountmail' => 'melalui e-mel',
+'createaccountmail' => 'Gunakan kata laluan rawak yang sementara dan hantarnya ke alamat e-mel yang dinyatakan di bawah',
 'createaccountreason' => 'Sebab:',
 'badretype' => 'Sila ulangi kata laluan dengan betul.',
 'userexists' => 'Nama pengguna yang diisikan telah pun digunakan.
@@ -914,10 +914,10 @@ disalin daripada domain awam atau mana-mana sumber bebas lain (lihat $1 untuk bu
 '''JANGAN KIRIM KARYA HAK CIPTA ORANG LAIN TANPA KEBENARAN!'''",
 'longpageerror' => "'''Ralat: Teks yang anda serahkan itu panjangnya {{PLURAL:$1|1|$1}} kilobait, iaitu lebih panjang daripada had maksimum {{PLURAL:$2|1|$2}} kilobait.'''
 Oleh itu, ia tidak boleh disimpan.",
-'readonlywarning' => "'''AMARAN: Pangkalan data telah dikunci untuk penyenggaraan. Justeru, anda tidak boleh menyimpan suntingan anda pada masa sekarang.
-Anda boleh menyalin teks anda ke dalam komputer anda terlebih dahulu dan simpan teks tersebut di sini pada masa akan datang.'''
+'readonlywarning' => "'''Amaran: Pangkalan data ini dikunci untuk tujuan penyelenggaraan , maka anda tidak akan dapat menyimpan suntingan anda buat sekarang.'''
+Anda boleh menyalin tampal teks anda pada fail teks dan menyimpannya untuk lain kali.
 
-Yang berikut ialah penjelasan yang diberikan: $1",
+Penyelia yang menguncinya memberikan penjelasan ini: $1",
 'protectedpagewarning' => "'''Amaran: Laman ini telah dikunci supaya hanya mereka yang mempunyai keistimewaan penyelia boleh menyuntingnya.'''
 Masukan log terakhir ditunjukkan di bawah untuk rujukan:",
 'semiprotectedpagewarning' => "'''Nota:''' Laman ini telah dikunci agar hanya pengguna berdaftar sahaja boleh menyuntingnya.
@@ -2121,7 +2121,7 @@ Memerlukan sekurang-kurangnya satu domain peringkat tinggi, cth. "*.org".<br />
 # Special:ActiveUsers
 'activeusers' => 'Senarai pengguna aktif',
 'activeusers-intro' => 'Yang berikut ialah senarai pengguna yang bergiat sejak {{PLURAL:$1|semalam|$1 hari lalu}}.',
-'activeusers-count' => '$1 {{PLURAL:$1|suntingan|suntingan}} sejak {{PLURAL:$3|semalam|$3 hari lalu}}',
+'activeusers-count' => '$1 tindakan sejak {{PLURAL:$3|semalam|$3 hari lalu}}',
 'activeusers-from' => 'Tunjukkan pengguna bermula pada:',
 'activeusers-hidebots' => 'Sorokkan bot',
 'activeusers-hidesysops' => 'Sorokkan pentadbir',
@@ -2351,9 +2351,9 @@ Ini adalah tetapan semasa bagi laman '''$1''':",
 Ini adalah tetapan semasa bagi laman '''$1''':",
 'protect-cascadeon' => 'Laman ini dilindungi kerana ia terkandung dalam {{PLURAL:$1|laman|laman-laman}} berikut, yang dilindungi secara melata. Anda boleh menukar peringkat perlindunan laman ini, akan tetapi ia tidak akan menjejaskan perlindungan melata tersebut.',
 'protect-default' => 'Benarkan semua pengguna',
-'protect-fallback' => 'Perlukan keizinan "$1"',
-'protect-level-autoconfirmed' => 'Sekat pengguna baru dan pengguna tidak berdaftar',
-'protect-level-sysop' => 'Pentadbir sahaja',
+'protect-fallback' => 'Benarkan pengguna yang berizin "$1" sahaja',
+'protect-level-autoconfirmed' => 'Benarkan pengguna yang diautosahkan sahaja',
+'protect-level-sysop' => 'Benarkan pentadbir sahaja',
 'protect-summary-cascade' => 'melata',
 'protect-expiring' => 'sehingga $1 (UTC)',
 'protect-expiring-local' => 'luput $1',
@@ -2652,13 +2652,17 @@ sahkan bahawa anda betul-betul mahu melakukan tindakan ini.',
 # Move page
 'move-page' => 'Pindahkan $1',
 'move-page-legend' => 'Pindahkan laman',
-'movepagetext' => "Gunakan borang di bawah untuk menukar nama laman dan memindahkan semua maklumat sejarahnya ke nama baru. Tajuk yang lama akan dijadikan lencongan ke tajuk yang baru. Anda juga boleh mengemaskinikan semua lencongan yang menuju ke tajuk asal supaya menuju ke tajuk baru. Sebaliknya, anda boleh menyemak sekiranya terdapat [[Special:DoubleRedirects|lencongan berganda]] atau [[Special:BrokenRedirects|lencongan rosak]]. Anda bertanggungjawab memastikan semua pautan bersambung ke laman yang sepatutnya.
+'movepagetext' => "Menggunakan borang di bawah akan menukar nama halaman dan memindahkan segala sejarahnya kepada nama baru itu.
+Tajuk yang lama akan menjadi halaman lencongan kepada tajuk baru.
+Anda boleh mengemaskinikan lencongan yang menghala ke tajuk asal secara automatik.
+Jika anda memilih untuk tidak berbuat demikian, tolong semak untuk mencari lencongan [[Special:DoubleRedirects|berganda]] atau [[Special:BrokenRedirects|terputus]].
+Anda dipertanggungjawabkan untuk memastikan agar semua pautan tetap menghala ke tempat yang sepatutnya.
 
-Sila ambil perhatian bahawa laman tersebut '''tidak''' akan dipindahkan sekiranya laman dengan tajuk yang baru tadi telah wujud, melainkan apabila
-laman tersebut kosong atau merupakan laman lencongan dan tidak mempunyai sejarah penyuntingan. Ini bermakna anda boleh menukar semula nama sesebuah
-laman kepada nama yang asal jika anda telah melakukan kesilapan, dan anda tidak boleh menulis ganti laman yang telah wujud.
+Sila ingat bahasa halaman '''tidak''' akan dipindahkan jika tajuk barunya sudah diambil oleh halaman yang sedia ada, melainkan ia merupakan lencongan tanpa sebarang sejarah suntingan.
+Ertinya, anda boleh menukar kembali nama halaman ke nama yang sebelumnya jika anda terbuat silap, tetapi anda tidak boleh menulis ganti halaman yang sedia ada.
 
-'''AMARAN!''' Tindakan ini boleh menjadi perubahan yang tidak dijangka dan drastik bagi laman popular. Oleh itu, sila pastikan anda faham akibat yang mungkin timbul sebelum meneruskannya.",
+'''Amaran!'''
+Tindakan ini boleh mendatangkan perubahan yang drastik dan tidak dijangka untuk halaman yang popular; sila pasti bahawa anda memahami akibatnya sebelum meneruskan.",
 'movepagetext-noredirectfixer' => "Borang di bawah akan menamakan semula sesebuah laman, memindahkan kesemua sejarahnya ke nama baru.
 Nama lamanya akan menjadi sebuah laman lencongan ke laman baru tadi.
 Pastikan [[Special:DoubleRedirects|lencongan berganda]] atau [[Special:BrokenRedirects|rosak]] sudah diperiksa.
@@ -3762,7 +3766,7 @@ Imej ditunjuk dalam leraian penuh, jenis fail yang lain dibuka dengan atur cara
 'specialpages-group-highuse' => 'Laman popular',
 'specialpages-group-pages' => 'Senarai laman',
 'specialpages-group-pagetools' => 'Alatan laman',
-'specialpages-group-wiki' => 'Data dan alatan wiki',
+'specialpages-group-wiki' => 'Data dan peralatan',
 'specialpages-group-redirects' => 'Laman khas yang melencong',
 'specialpages-group-spam' => 'Alatan spam',
 
@@ -3859,6 +3863,7 @@ Imej ditunjuk dalam leraian penuh, jenis fail yang lain dibuka dengan atur cara
 'logentry-newusers-newusers' => 'Akaun pengguna $1 dibuka',
 'logentry-newusers-create' => 'Akaun pengguna $1 dibuka',
 'logentry-newusers-create2' => 'Akaun pengguna $3 dibuka oleh $1',
+'logentry-newusers-byemail' => 'Akaun pengguna $3 dibuka oleh $1 dan kata laluannya dihantar melalui e-mel',
 'logentry-newusers-autocreate' => 'Akaun $1 dibuka secara automatik',
 'logentry-rights-rights' => '$1 menukar keahlian kumpulan untuk $3 dari $4 ke $5',
 'logentry-rights-rights-legacy' => '$1 menukar keahlian kumpulan untuk $3',
@@ -3917,6 +3922,7 @@ Ataupun, anda boleh menggunakan borang yang mudah di bawah. Ulasan anda akan dic
 'api-error-ok-but-empty' => 'Ralat dalaman: tiada gerak balas dari pelayan.',
 'api-error-overwrite' => 'Menulis ganti fail yang telah wujud adalah tidak dibenarkan.',
 'api-error-stashfailed' => 'Ralat dalaman: pelayan tidak dapat menyimpan fail sementara.',
+'api-error-publishfailed' => 'Ralat dalaman: Pelayan tidak dapat menerbitkan fail sementara.',
 'api-error-timeout' => 'Pelayan tidak bergerak balas dalam tempoh yang diharapkan.',
 'api-error-unclassified' => 'Berlakunya ralat yang tidak diketahui',
 'api-error-unknown-code' => 'Ralat tidak diketahui: "$1"',
index 1294e51..448f4d3 100644 (file)
@@ -3708,7 +3708,7 @@ Stampi huwa mogħrija b'risoluzzjoni sħiħa, tipi tal-fajl oħrajn jibdew bil-p
 * Paġni speċjali normali.
 * <span class="mw-specialpagerestricted">Paġni speċjali riservati.</span>
 * <span class="mw-specialpagecached">Paġni speċjali disponibbli f\'verżjoni cache (jistgħu jkunu skaduti).</span>',
-'specialpages-group-maintenance' => 'Rapporti tal-manteniment',
+'specialpages-group-maintenance' => "Rapporti ta' manutenzjoni",
 'specialpages-group-other' => 'Paġni speċjali oħrajn',
 'specialpages-group-login' => 'Idħol / oħloq kont',
 'specialpages-group-changes' => 'L-Aħħar modifiki u reġistri',
index d96f7ad..ae406b6 100644 (file)
@@ -434,9 +434,9 @@ $messages = array(
 'category-subcat-count' => 'Kategorien har {{PLURAL:$2|berre denne underkategorien|{{PLURAL:$1|denne underkategorien|desse $1 underkategoriane}}, av totalt $2}}.',
 'category-subcat-count-limited' => 'Kategorien har {{PLURAL:$1|denne underkategorien|desse $1 underkategoriane}}.',
 'category-article-count' => 'Kategorien inneheld {{PLURAL:$2|berre denne sida|{{PLURAL:$1|denne sida|desse $1 sidene}}, av totalt $2}}.',
-'category-article-count-limited' => 'Følgjande {{PLURAL:$1|side|$1 sider}} er i denne kategorien.',
+'category-article-count-limited' => '{{PLURAL:$1|Denne sida|Desse $1 sidene}} er i kategorien.',
 'category-file-count' => 'Kategorien inneheld {{PLURAL:$2|berre den følgjande fila|dei følgjande {{PLURAL:$1|fil|$1 filene}}, av totalt $2}}.',
-'category-file-count-limited' => 'Følgjande {{PLURAL:$1|fil|$1 filer}} er i denne kategorien.',
+'category-file-count-limited' => '{{PLURAL:$1|Denne fila|Desse $1 filene}} er i kategorien.',
 'listingcontinuesabbrev' => 'vidare',
 'index-category' => 'Indekserte sider',
 'noindex-category' => 'Ikkje-indekserte sider',
@@ -2051,7 +2051,7 @@ Ei side vert handsama som ei fleirtydingsside om ho nyttar ein mal som er lenkja
 'double-redirect-fixer' => 'Omdirigeringsfiksar',
 
 'brokenredirects' => 'Blindvegsomdirigeringar',
-'brokenredirectstext' => 'Dei følgjande omdirigeringane viser til ei side som ikkje finst:',
+'brokenredirectstext' => 'Desse omdirigeringane viser til sider som ikkje finst:',
 'brokenredirects-edit' => 'endre',
 'brokenredirects-delete' => 'slett',
 
@@ -2214,7 +2214,7 @@ Det er påkravt med eit toppnivådomene, til dømes «*.org».<br />
 
 # Special:ListGroupRights
 'listgrouprights' => 'Rettar for brukargrupper',
-'listgrouprights-summary' => 'Følgjande liste viser brukargruppene som er definert på denne wikien, og kvar rettar dei har. Meir informasjon om dei ulike rettane ein kan ha finn ein [[{{MediaWiki:Listgrouprights-helppage}}|her]].',
+'listgrouprights-summary' => 'Detter ei liste som viser brukargruppene som er definerte på wikien, og kva rettar dei har. Det kan finnast [[{{MediaWiki:Listgrouprights-helppage}}|meir informasjon]]  om dei ulike rettane.',
 'listgrouprights-key' => '* <span class="listgrouprights-granted">Innvilga rettar</span>
 * <span class="listgrouprights-granted">Tilbaketrukne rettar</span>',
 'listgrouprights-group' => 'Gruppe',
@@ -2465,7 +2465,7 @@ Her er dei noverande innstillingane for sida '''$1''':",
 # Undelete
 'undelete' => 'Sletta sider',
 'undeletepage' => 'Sletta sider',
-'undeletepagetitle' => "'''Følgjande innhald er sletta versjonar av [[:$1]]'''.",
+'undeletepagetitle' => "'''Dette innhaldet er sletta versjonar av [[:$1]]'''.",
 'viewdeletedpage' => 'Sjå sletta sider',
 'undeletepagetext' => '{{PLURAL:$1|Den følgjande sida er sletta, men ho|Dei følgjande $1 sidene er sletta, men dei}} finst enno i arkivet og kan attopprettast. Arkivet blir periodevis sletta.',
 'undelete-fieldset-title' => 'Attenderull endringar',
@@ -2713,7 +2713,7 @@ Den gamle tittelen vil verta ei omdirigeringsside til den nye.
 Du kan oppdatera omdirigeringar som peikar til den opphavlege tittelen automatisk.
 Vel du å ikkje gjera dette, pass på å sjå etter [[Special:DoubleRedirects|doble]] eller [[Special:BrokenRedirects|øydelagde omdirigeringar]].
 
-Merk at sida '''ikkje''' vert flytt dersom det alt finst ei side med den nye tittelen, minder ho er ei omdirigering og ikkje har nokon endringshistorikk. Detter tyder at du kan omdøypa ei side attende til der ho vart omdøypt frå om du gjorde eit mistak, og du kan ikkje skriva over sider som finst.
+Merk at sida '''ikkje''' vert flytt dersom det alt finst ei side med den nye tittelen, minder målsida er ei omdirigering og ikkje har nokon endringshistorikk. Detter tyder at du kan omdøypa ei side attende til der ho vart omdøypt frå om du gjorde eit mistak, og du kan ikkje skriva over sider som finst.
 
 '''ÅTVARING!'''
 Dette kan vera ei drastisk og uventa endring for ei populær side; ver viss på at du skjøner konsekvensane av dette før du held fram.",
index ed778b7..57bd350 100644 (file)
@@ -517,12 +517,12 @@ $1',
 
 'ok' => 'ଠିକ ଅଛି',
 'retrievedfrom' => '"$1" ରୁ ଅଣାଯାଇଅଛି',
-'youhavenewmessages' => 'ଆପଣଙ୍କର $1 ($2).',
-'newmessageslink' => 'ନà­\82à¬\86 à¬®à­\87ସà­\87à¬\9c',
+'youhavenewmessages' => 'ଆପଣଙ୍କ ପାଇଁ $1 ($2)।',
+'newmessageslink' => 'ନà­\82à¬\86 à¬¸à¬¨à­\8dଦà­\87ଶ',
 'newmessagesdifflink' => 'ଶେଷ ବଦଳ',
 'youhavenewmessagesfromusers' => 'ଆପଣଙ୍କର {{PLURAL:$3|another user|$3 users}} ($2)ରୁ $1 ଅଛି ।',
 'youhavenewmessagesmanyusers' => 'ଆପଣଙ୍କର ବହୁତ ବ୍ୟବହାରକାରୀ($2)ମାନଙ୍କଠାରୁ $1 ଅଛି ।',
-'newmessageslinkplural' => '{{PLURAL:$1|a new message|ନୂଆ ମେସେଜ}}',
+'newmessageslinkplural' => '{{PLURAL:$1|ଏକ ନୂଆ ସନ୍ଦେଶ|ନୂଆ ସନ୍ଦେଶ}}',
 'newmessagesdifflinkplural' => 'ଶେଷ{{PLURAL:$1|change|changes}}',
 'youhavenewmessagesmulti' => '$1 ତାରିଖରେ ନୂଆ ଚିଠିଟିଏ ଆସିଛି',
 'editsection' => 'ସମ୍ପାଦନା',
@@ -691,7 +691,7 @@ $2',
 'gotaccount' => 'ଆଗରୁ ଖାତାଟିଏ ଅଛି କି? $1.',
 'gotaccountlink' => 'ଲଗ ଇନ',
 'userlogin-resetlink' => 'ଲଗଇନ ତଥ୍ୟ ସବୁ ଭୁଲିଗେଲେକି?',
-'createaccountmail' => 'à¬\87-ମà­\87ଲ à¬°ୁ',
+'createaccountmail' => 'à¬\97à­\8bà¬\9fିà¬\8f à¬¸à¬¾à¬®à­\9fିà¬\95 à¬\9cାହିତାହି à¬ªà¬¾à¬¸à­±à¬¾à¬°à­\8dଡ à¬¬à­\8dà­\9fବହାର à¬\95ରନà­\8dତà­\81 à¬\8fବà¬\82 à¬\8fହାà¬\95à­\81 à¬¤à¬³à­\87 à¬¦à¬¿à¬\86ଯାà¬\87ଥିବା à¬\87-ମà­\87ଲ à¬ à¬¿à¬\95ଣାà¬\95à­\81 à¬ªà¬ à­\87à¬\87 à¬¦à¬¿à¬\85ନà­\8dତୁ',
 'createaccountreason' => 'କାରଣ:',
 'badretype' => 'ଆପଣ ଦେଇଥିବା ପାସବାର୍ଡ଼ଟି ମେଳଖାଉନାହିଁ ।',
 'userexists' => 'ଆପଣ ଦେଇଥିବା ଇଉଜର ନାମ ଆଗରୁ ଅଛି ।
@@ -1009,8 +1009,8 @@ $1 ଦ୍ଵାରା ପ୍ରତିରୋଧ କରାଯାଇଛି
 '''ଅନୁମତି ବିନା ସତ୍ଵାଧିକାର ଥିବା କାମ ଏଠାରେ ଦିଅନ୍ତୁ ନାହିଁ !'''",
 'longpageerror' => "'''ଭୁଲ: ଆପଣ ଦେଇଥିବା ଲେଖାଟି {{PLURAL:$1|କିଲୋବାଇଟ|$1 କିଲୋବାଇଟ}} ଲମ୍ବା, ଯାହାକି ସବୁଠାରୁ ଅଧିକ {{PLURAL:$2|କିଲୋବାଇଟ|$2 କିଲୋବାଇଟ}} ଠାରୁ ବି ଅଧିକ ।'''
 ଏହା ସାଇତାଯାଇପାରିବ ନାହିଁ ।",
-'readonlywarning' => "'''ସୂଚନା: ଏହି ଡାଟାବେସଟି ରକ୍ଷଣାବେକ୍ଷଣା ପାଇଁ କିଳାଯାଇଛି । ତେଣୁ ଆପଣ ଆପଣା ସମ୍ପାଦନା ଏବେ ସାଇତି ପାରିବେ ନାହିଁ ।'''
-à¬\86ପଣ à¬²à­\87à¬\96ାସବà­\81 à¬\8fà¬\95 à¬\9fà­\87à¬\95à­\8dସà¬\9f à¬«à¬¾à¬\87ଲରà­\87 à¬¨à¬\95ଲ à¬\95ରି ପେଷ୍ଟ କରି ଆଗକୁ ବ୍ୟବହାର କରିବା ପାଇଁ ସାଇତି ପାରିବେ ।
+'readonlywarning' => "ସୂଚନା: ଏହି ଡାଟାବେସଟି ରକ୍ଷଣାବେକ୍ଷଣା ପାଇଁ କିଳାଯାଇଛି । ତେଣୁ ଆପଣ ଆପଣା ସମ୍ପାଦନା ଏବେ ସାଇତି ପାରିବେ ନାହିଁ ।'''
+à¬\86ପଣ à¬²à­\87à¬\96ାସବà­\81 à¬\8fà¬\95 à¬\9fà­\87à¬\95à­\8dସà¬\9f à¬«à¬¾à¬\87ଲରà­\87 à¬¨à¬\95ଲ à¬\8fବà¬\82 ପେଷ୍ଟ କରି ଆଗକୁ ବ୍ୟବହାର କରିବା ପାଇଁ ସାଇତି ପାରିବେ ।
 
 ଏହାକୁ କିଳିଥିବା ପରିଛା ଏହି କଇଫତ ଦେଇଛନ୍ତି: $1",
 'protectedpagewarning' => "'''ଚେତାବନୀ: ଏହି ପୃଷ୍ଠାଟିକୁ କିଳାଯାଇଅଛି ଯାହା ଫଳରେ କେବଳ ପରିଛାମାନେ ହିଁ ଏହାକୁ ବଦଳାଇ ପାରିବେ ।'''
@@ -2229,7 +2229,7 @@ URLଟି ଠିକ ଅଚିକି କି ନାଁ ଓ ସାଇଟଟି ସ
 # Special:ActiveUsers
 'activeusers' => 'ସଚଳ ସଭ୍ୟଙ୍କ ତାଲିକା',
 'activeusers-intro' => 'ବିଗତ $1 {{PLURAL:$1|ଦିନ|ଦିନ}} ଭିତରେ କିଛି ପ୍ରକାରର କାମ କରିଥିବା ସଭ୍ୟମାନଙ୍କର ତାଲିକା ।',
-'activeusers-count' => 'ବିଗତ {{PLURAL:$3|ଦିନ|$3 ଦିନରେ}}ରେ $1ଟି {{PLURAL:$1|ସମ୍ପାଦନା|ସମ୍ପାଦନା}}',
+'activeusers-count' => 'ବିଗତ {{PLURAL:$3|ଦିନ|$3 ଦିନରେ}}ରେ $1ଟି {{PLURAL:$1|ସମ୍ପାଦନା|ସମ୍ପାଦନାଗୁଡିକ}}',
 'activeusers-from' => 'ଏହି ନାମରେ ଆରମ୍ଭ ହେଉଥିବା ସଭ୍ୟମାନଙ୍କୁ ଦେଖାଇବେ:',
 'activeusers-hidebots' => 'ଆପେଆପେ ଚାଳିତ ସଭ୍ୟମାନଙ୍କୁ ଲୁଚାନ୍ତୁ',
 'activeusers-hidesysops' => 'ପରିଚାଳକମାନଙ୍କୁ ଲୁଚାଇବେ',
@@ -2292,7 +2292,7 @@ URLଟି ଠିକ ଅଚିକି କି ନାଁ ଓ ସାଇଟଟି ସ
 'usermessage-editor' => 'ସିଷ୍ଟମ ଦୂତ',
 
 # Watchlist
-'watchlist' => 'ଦେଖାତାଲିକା',
+'watchlist' => 'ଦà­\87à¬\96ଣାତାଲିà¬\95ା',
 'mywatchlist' => 'ଦେଖଣାତାଲିକା',
 'watchlistfor2' => '$1 $2 ପାଇଁ',
 'nowatchlist' => 'ଆପଣଙ୍କ ଦେଖଣା ତାଲିକାରେ କିଛି ବି ଜିନିଷ ନାହିଁ ।',
@@ -2457,9 +2457,9 @@ $2ଙ୍କ ଦେଇ ଶେଷଥର ହୋଇଥିବା ସଂସ୍କର
 'protect-cascadeon' => 'ଏହି ପୃଷ୍ଠାଟି ଏବେ ପାଇଁ କିଳାଯାଇଛି {{PLURAL:$1|ପୃଷ୍ଠା, ଯେଉଁଥିରେ|ପୃଷ୍ଠମାନ, ଯେଉଁସବୁରେ}} କାସକେଡ଼କରା ସୁରକ୍ଷା ସଚଳ ଥିଲା ।
 ଆପଣ ପୃଷ୍ଠାଟିର ପ୍ରତିରକ୍ଷା ସ୍ତର ବଦଳାଇ ପାରିବେ, କିନ୍ତୁ ଏହା କାସକେଡ଼ ପ୍ରତିରକ୍ଷାକୁ ପ୍ରଭାବିତ କରିନଥାଏ ।',
 'protect-default' => 'ସବୁ ଇଉଜରଙ୍କୁ ଅନୁମତି ଦିଅନ୍ତୁ',
-'protect-fallback' => '"$1" ବାଲା ଅନୁମତି ଦରକାର',
-'protect-level-autoconfirmed' => 'ନà­\81à¬\86 à¬\93 à¬¨à¬¾à¬\86à¬\81 à¬²à­\87à¬\96ାà¬\87 à¬¨ à¬¥à¬¿à¬¬à¬¾ à¬\87à¬\89à¬\9cରମାନà¬\95à­\81 à¬\85à¬\9fà¬\95ାà¬\81ତà­\81',
-'protect-level-sysop' => 'à¬\95à­\87ବଳ à¬ªà¬°à¬¿à¬\9bାମାନà¬\81à¬\95 à¬ªà¬¾à¬\87à¬\81',
+'protect-fallback' => 'କେବଳ "$1" ଅନୁମତି ଥିବା ବ୍ୟବହାରକାରୀ ମାନଙ୍କୁ ଛାଡିବେ',
+'protect-level-autoconfirmed' => 'à¬\95à­\87ବଳ à¬\86ପà­\87 à¬\86ପà­\87 à¬¸à¬¹à¬®à¬¤ à¬¹à­\8bà¬\87ଥିବା à¬¬à­\8dà­\9fବହାରà¬\95ାରà­\80 à¬®à¬¾à¬¨à¬\99à­\8dà¬\95à­\81 à¬\9bାଡିବà­\87',
+'protect-level-sysop' => 'à¬\95à­\87ବଳ à¬ªà¬°à¬¿à¬\9bାମାନà¬\99à­\8dà¬\95à­\81 à¬\9bାଡିବà­\87',
 'protect-summary-cascade' => 'କାସକେଡ଼ ହୋଇଥିବା',
 'protect-expiring' => '$1 (ଇଉଟିସି)ରେ ଅଚଳ ହୋଇଯିବ',
 'protect-expiring-local' => '$1ରେ ଅଚଳ ହୋଇଯିବ',
@@ -2768,7 +2768,7 @@ $1ର ଅଟକ ପାଇଁ ଦିଆଯାଇଥିବା କାରଣଟି 
 
 ଲିଙ୍କସବୁ କେଉଁଠିକୁ ଯାଉଛି ତାହା ପାଇଁ ଆପଣ ଦାୟୀ ନୁହନ୍ତି ।
 
-ମନà­\87 à¬°à¬\96ନà­\8dତà­\81, à¬\86à¬\97ରà­\81 à¬\8fହି à¬\8fà¬\95ା à¬¨à¬¾à¬\86à¬\81ରà­\87 à¬ªà­\83ଷà­\8dଠାà¬\9fିà¬\8f à¬¥à¬¿à¬²à­\87 à¬\8fହି à¬ªà­\83ଷà­\8dଠାà¬\9fି '''à¬\98à­\81à¬\9eà­\8dà¬\9aିବ à¬¨à¬¾à¬¹à¬¿à¬\81''' à¬¯à­\87ତà­\87 à¬¯à¬¾à¬\8fà¬\81 à¬¤à¬¾à¬¹à¬¾ à¬\96ାଲି à¬¨à¬¾à¬¹à¬¿à¬\81 à¬¬à¬¾ à¬\86à¬\97 à¬ªà­\83ଷà­\8dଠାà¬\9fିର à¬\95à­\8cଣସି à¬¬à¬¦à¬³ à¬\87ତିହାସ à¬¨à¬¾à¬¹à¬¿à¬\81 à¬¸à­\87ତà­\87 à¬¬à­\87ଳ à¬¯à¬¾à¬\8fà¬\81 à¬\8fହା à¬\8fମିତି à¬°à¬¹à¬¿à¬¬ à¥¤ à¬\8fହାର à¬®à¬¾à¬¨à­\87 à¬¹à­\87à¬\89à¬\9bି, à¬\86ପଣ à¬\97à­\8bà¬\9fିà¬\8f à¬ªà­\83ଷà­\8dଠାର à¬¨à¬¾à¬\86à¬\81à¬\95à­\81 à¬¤à¬¾à¬° à¬ªà­\81ରà­\81ଣା à¬¨à¬¾à¬\86à¬\81 à¬¦à­\87à¬\87ପାରିବà­\87, à¬\95ିନà­\8dତà­\81 à¬\86à¬\97ରà­\81 à¬¥à¬¿à¬¬à¬¾ à¬ªà­\83ଷà­\8dଠାà¬\9fି à¬\89ପରà­\87 à¬¨à­\82à¬\86 à¬ªà­\83ଷà­\8dଠାà¬\9fିà¬\8f à¬\9aାପି à¬¦à­\87à¬\87ପାରିବà­\87 à¬¨à¬¾à¬¹à¬¿à¬\81 à¥¤
+ମନେ ରଖନ୍ତୁ, ଆଗରୁ ଏହି ଏକା ନାଆଁରେ ପୃଷ୍ଠାଟିଏ ଥିଲେ ଏହି ପୃଷ୍ଠାଟି '''ଘୁଞ୍ଚିବ ନାହିଁ''' ଯେତେ ଯାଏଁ ଆଗ ପୃଷ୍ଠାଟିର କୌଣସି ବଦଳ ଇତିହାସ ନାହିଁ ସେତେ ବେଳ ଯାଏଁ ଏହା ଏମିତି ରହିବ । ଏହାର ମାନେ ହେଉଛି, ଆପଣ ଗୋଟିଏ ପୃଷ୍ଠାର ନାଆଁକୁ ତାର ପୁରୁଣା ନାଆଁ ଦେଇପାରିବେ, କିନ୍ତୁ ଆଗରୁ ଥିବା ପୃଷ୍ଠାଟି ଉପରେ ନୂଆ ପୃଷ୍ଠାଟିଏ ଚାପି ଦେଇପାରିବେ ନାହିଁ ।
 
 '''ଜାଣି ରଖନ୍ତୁ!'''
 ଏହା ଏକ ଜଣାଶୁଣା ପୃଷ୍ଠାରେ ଆମୂଳଚୂଳ ଓ ଅଜଣା ବଦଳ କରିପାରେ;
@@ -3849,7 +3849,7 @@ MediaWiki ଉପଯୋଗୀ ହେବା ଲକ୍ଷରେ ବଣ୍ଟାଯ
 'specialpages-group-highuse' => 'ଅଧିକ ବ୍ୟବହାର ହେଉଥିବା ପୃଷ୍ଠା',
 'specialpages-group-pages' => 'ପୃଷ୍ଠାମାନଙ୍କର ତାଲିକା',
 'specialpages-group-pagetools' => 'ପୃଷ୍ଠା ଉପକରଣ',
-'specialpages-group-wiki' => 'à¬\89à¬\87à¬\95ି à¬¡à¬¾à¬\9fା ଓ ଉପକରଣ',
+'specialpages-group-wiki' => 'ତଥà­\8dà­\9f ଓ ଉପକରଣ',
 'specialpages-group-redirects' => 'ବିଶେଷ ପୃଷ୍ଠାକୁ ପୁନପ୍ରେରଣ କରିବା',
 'specialpages-group-spam' => 'ଅଯଥା ଉପକରଣ',
 
@@ -3947,6 +3947,7 @@ MediaWiki ଉପଯୋଗୀ ହେବା ଲକ୍ଷରେ ବଣ୍ଟାଯ
 'logentry-newusers-newusers' => 'ସଭ୍ୟ ଖାତା $1 ତିଆରି କରାଗଲା',
 'logentry-newusers-create' => 'ସଭ୍ୟ ଖାତା $1 ତିଆରି କରାଗଲା',
 'logentry-newusers-create2' => 'ସଭ୍ୟ ଖାତା $3ଟି $1 ଦ୍ଵାରା ତିଆରି କରାଗଲା',
+'logentry-newusers-byemail' => '$1ଙ୍କ ଦ୍ଵାରା $3 ବ୍ୟବହାରକାରୀ ଖାତାଟି ଖୋଳାଗଲା ଏବଂ ପାସୱାର୍ଡଟି ଇ-ମେଲ ଦ୍ଵାରା ପଠାଗଲା',
 'logentry-newusers-autocreate' => '$1 ଖାତାଟି ଆପେଆପେ ତିଆରିହେଲା',
 'logentry-rights-rights' => '$1, $3 ପାଇଁ $4ରୁ $5କୁ ସଭ୍ୟପଦ ବଦଳାଇଲେ',
 'logentry-rights-rights-legacy' => '$1, $3 ପାଇଁ ଗୋଷ୍ଠୀ ସଭ୍ୟପଦ ବଦଳାଇଛି',
@@ -4006,6 +4007,7 @@ MediaWiki ଉପଯୋଗୀ ହେବା ଲକ୍ଷରେ ବଣ୍ଟାଯ
 'api-error-ok-but-empty' => 'ଭିତର ଅସୁବିଧା: ସର୍ଭର ଠାରୁ କିଛି ଖବର ନାହିଁ ।',
 'api-error-overwrite' => 'ଆଗରୁଥିବା ଏକ ଫାଇଲ ଉପରେ ମଡ଼ାଇବା ଅନୁମୋଦିତ ନୁହେଁ ।',
 'api-error-stashfailed' => 'ଭିତର ଅସୁବିଧା: ସର୍ଭର ଅସ୍ଥାୟୀ ଫାଇଲକୁ ସାଇତି ପାରିଲା ନାହିଁ ।',
+'api-error-publishfailed' => 'ଭିତର ଅସୁବିଧା: ସର୍ଭର ଅସ୍ଥାୟୀ ଫାଇଲକୁ ପ୍ରକାଶ କରିପାରିଲା ନାହିଁ ।',
 'api-error-timeout' => 'ସର୍ଭର ଏକ ସୀମିତ କାଳ ଭିତରେ ଉତ୍ତର ଦେଲାନାହିଁ ।',
 'api-error-unclassified' => 'ଏକ ଅଜଣା ଅସୁବିଧା ଘଟିଲା ।',
 'api-error-unknown-code' => 'ଅଜଣା ତୃଟି: "$1"',
index e22c428..8b58dcb 100644 (file)
@@ -774,7 +774,7 @@ Vir apré ([$2 pache]).",
 # Delete
 'deletepage' => "Défacer l'pache",
 'confirmdeletetext' => "Vos alez défacer eune pache ou un fichié aveuc toutes chés antieusses vérchons.<br /> Confreumer éq ch'est cho éq vos voulez foaire, éq vos conprindez chés consécanches et pi éq ch'est bin s'lon el [[{{MediaWiki:Policy-url}}|politique éd MédiaWiki]].",
-'actioncomplete' => 'Plònne acchon',
+'actioncomplete' => 'Accion toute piéte',
 'actionfailed' => "L’action n'a poin réussi",
 'deletedtext' => "« $1 » o té défacé.
 Vir $2 pou eune lisse d'chés darinnes défachons.",
index 7c9cbe6..240a281 100644 (file)
@@ -2719,7 +2719,7 @@ Przyczyna blokady $1 to: „$2”',
 'blocklogpage' => 'Historia blokad',
 'blocklog-showlog' => '{{GENDER:$1|Ten użytkownik był|Ta użytkowniczka była}} już wcześniej {{GENDER:$1|blokowany|blokowana}}. Poniżej znajduje się rejestr blokad:',
 'blocklog-showsuppresslog' => '{{GENDER:$1|Ten użytkownik był|Ta użytkowniczka była}} już wcześniej {{GENDER:$1|blokowany oraz ukrywany|blokowana oraz ukrywana}}. Poniżej znajduje się rejestr ukrywania:',
-'blocklogentry' => 'blokuje [[$1]], czas blokady: $2 $3',
+'blocklogentry' => '{{GENDER:$2|zablokował|zablokowała}} [[$1]], czas blokady: $2 $3',
 'reblock-logentry' => 'zmienia ustawienia blokady dla [[$1]], czas blokady: $2 $3',
 'blocklogtext' => 'Poniżej znajduje się lista blokad założonych i zdjętych z poszczególnych adresów IP.
 Na liście nie znajdą się adresy IP, które zablokowano w sposób automatyczny.
index 87e1b04..2947ca4 100644 (file)
@@ -2627,7 +2627,7 @@ Para referência é apresentado abaixo o último registo de bloqueio:',
 'whatlinkshere-title' => 'Páginas que têm links para "$1"',
 'whatlinkshere-page' => 'Página:',
 'linkshere' => "As seguintes páginas têm links para '''[[:$1]]''':",
-'nolinkshere' => "Não existem links para '''[[:$1]]'''.",
+'nolinkshere' => "Não existem afluentes para '''[[:$1]]'''.",
 'nolinkshere-ns' => "Não existem links para '''[[:$1]]''' no espaço nominal seleccionado.",
 'isredirect' => 'página de redireccionamento',
 'istemplate' => 'inclusão',
@@ -3158,6 +3158,10 @@ Este bloqueio foi provavelmente causado por um link para um site externo que con
 'pageinfo-contentpage' => 'Contada como página de conteúdo',
 'pageinfo-contentpage-yes' => 'Sim',
 'pageinfo-protect-cascading-yes' => 'Sim',
+'pageinfo-category-info' => 'Informações da categoria',
+'pageinfo-category-pages' => 'Número de páginas',
+'pageinfo-category-subcats' => 'Número de subcategorias',
+'pageinfo-category-files' => 'Número de ficheiros',
 
 # Skin names
 'skinname-standard' => 'Clássico',
@@ -4005,6 +4009,7 @@ Imagens serão apresentadas pelo browser na resolução máxima; ficheiros de ou
 'logentry-newusers-create2' => 'A conta de utilizador $3 foi criada por $1',
 'logentry-newusers-autocreate' => 'A conta $1 foi criada automaticamente',
 'logentry-rights-rights' => '$1 modificou os privilégios do utilizador  $3  de  $4  para $5',
+'logentry-rights-autopromote' => '$1 foi automaticamente {{GENDER:$2|promovido|promovida}} de $4 a $5',
 'rightsnone' => '(nenhum)',
 
 # Feedback
index 7846686..3267388 100644 (file)
@@ -2637,7 +2637,7 @@ Segue, para referência, a entrada mais recente no registro de bloqueios:',
 'whatlinkshere-title' => 'Páginas que têm links para "$1"',
 'whatlinkshere-page' => 'Página:',
 'linkshere' => "As seguintes páginas possuem links para '''[[:$1]]''':",
-'nolinkshere' => "Não há links para '''[[:$1]]'''.",
+'nolinkshere' => "Não há afluentes para '''[[:$1]]''' com as condições especificadas.",
 'nolinkshere-ns' => "Não há links para '''[[:$1]]''' no espaço nominal selecionado.",
 'isredirect' => 'página de redirecionamento',
 'istemplate' => 'transclusão',
index 3bec703..a01b87d 100644 (file)
@@ -2580,7 +2580,7 @@ Tu puè aggiornà 'u ridirezionamende ca apponde a 'u titole origgenale automati
 Ce tu no ste scacchie, sta secure de condrollà [[Special:DoubleRedirects|doppie ridirezionaminde]] o [[Special:BrokenRedirects|ridirezionaminde scuasciate]].
 Tu si 'u responsabbile de quidde ca cumbine, assicurate ca 'u collegamende condinue a appondà addò avessa scè.
 
-Vide Bbuene ca 'a pàgene '''non''' g'avene spustate ce esiste n'otra pàgene cu 'u titole nuéve, a mene ca jè vacande o jè 'na pàgene de ridirezionamende senza storie.
+Vide Bbuene ca 'a pàgene '''non''' g'avène spustate ce esiste n'otra pàgene cu 'u titole nuéve, a mene ca jè vacande o jè 'na pàgene de ridirezionamende senza storie.
 Quieste significhe ca tu puè fà turnà 'u vecchie nome 'a pàgene ce jedde ha state renomenate e t'è rese conde ca è fatte 'na studecarije sovrascrevènne 'na pàgene esistende.
 
 '''ATTENZIONE!'''
index 3c96260..48d8dbe 100644 (file)
@@ -839,7 +839,7 @@ $2',
 'gotaccount' => "Вы уже зарегистрированы? '''$1'''.",
 'gotaccountlink' => 'Представьтесь',
 'userlogin-resetlink' => 'Забыли данные для входа?',
-'createaccountmail' => 'Ð\92Ñ\8bÑ\81лаÑ\82Ñ\8c Ð¿Ð°Ñ\80олÑ\8c Ð¿Ð¾ Ñ\8dл. Ð¿Ð¾Ñ\87Ñ\82е',
+'createaccountmail' => 'Ð\98Ñ\81полÑ\8cзоваÑ\82Ñ\8c Ñ\81генеÑ\80иÑ\80ованнÑ\8bй Ñ\81лÑ\83Ñ\87айнÑ\8bм Ð¾Ð±Ñ\80азом Ð²Ñ\80еменнÑ\8bй Ð¿Ð°Ñ\80олÑ\8c Ð¸ Ð²Ñ\8bÑ\81лаÑ\82Ñ\8c Ð¼Ð½Ðµ ÐµÐ³Ð¾ Ð½Ð° Ñ\83казаннÑ\8bй Ð½Ð¸Ð¶Ðµ Ð°Ð´Ñ\80еÑ\81 Ñ\8dлекÑ\82Ñ\80онной Ð¿Ð¾Ñ\87Ñ\82Ñ\8b:',
 'createaccountreason' => 'Причина:',
 'badretype' => 'Введённые вами пароли не совпадают.',
 'userexists' => 'Введённое имя участника уже используется.
@@ -2360,7 +2360,7 @@ $1',
 # Special:ActiveUsers
 'activeusers' => 'Список активных участников',
 'activeusers-intro' => 'Это список участников, совершавших какие-либо действия за {{PLURAL:$1|последний $1 день|последние $1 дня|последние $1 дней}}.',
-'activeusers-count' => '$1 {{PLURAL:$1|правка|правки|правок}} за {{PLURAL:$3|последний $3 день|последние $3 дня|последние $3 дней}}',
+'activeusers-count' => '$1 {{PLURAL:$1|правка|правки|правок}} за {{PLURAL:$3|$3 последний день|последние $3 дня|последние $3 дней}}',
 'activeusers-from' => 'Показать участников, начиная с:',
 'activeusers-hidebots' => 'Скрыть ботов',
 'activeusers-hidesysops' => 'Скрыть администраторов',
@@ -4104,7 +4104,7 @@ MediaWiki распространяется в надежде, что она бу
 'specialpages-group-highuse' => 'Интенсивно используемые страницы',
 'specialpages-group-pages' => 'Списки страниц',
 'specialpages-group-pagetools' => 'Инструменты для страниц',
-'specialpages-group-wiki' => 'Ð\92ики-данные и инструменты',
+'specialpages-group-wiki' => 'Ð\94анные и инструменты',
 'specialpages-group-redirects' => 'Перенаправляющие служебные страницы',
 'specialpages-group-spam' => 'Инструменты против спама',
 
index cc11021..67b8110 100644 (file)
@@ -2293,7 +2293,32 @@ See https://www.mediawiki.org/wiki/Manual:Image_Authorization.',
 'enotif_lastvisited' => 'भवतः पूवसन्दर्शनस्य पश्चात् सवृत्तपरिवर्तनार्थं $1 पश्यतु ।',
 'enotif_lastdiff' => 'एतत्परिवर्तनं दृष्टुं $1 पश्यतु ।',
 'enotif_anon_editor' => 'अनामकः योजकः $1',
-'enotif_body' => 'आत्मीय $ अवलोकनबन्धो',
+'enotif_body' => 'Dear $WATCHINGUSERNAME,
+
+$PAGEINTRO $NEWPAGE
+
+Editor\'s summary: $PAGESUMMARY $PAGEMINOREDIT
+
+Contact the editor:
+mail: $PAGEEDITOR_EMAIL
+wiki: $PAGEEDITOR_WIKI
+
+There will be no other notifications in case of further activity unless you visit this page. You could also reset the notification flags for all your watched pages on your watchlist.
+
+                        Your friendly {{SITENAME}} notification system
+
+--
+To change your e-mail notification settings, visit
+{{canonicalurl:{{#special:Preferences}}}}
+
+To change your watchlist settings, visit
+{{canonicalurl:{{#special:EditWatchlist}}}}
+
+To delete the page from your watchlist, visit
+$UNWATCHURL
+
+Feedback and further assistance:
+{{canonicalurl:{{MediaWiki:Helppage}}}}',
 'created' => 'सृष्टम् ।',
 'changed' => 'परिवर्तितम् ।',
 
index 227ae41..2761d58 100644 (file)
@@ -1981,7 +1981,7 @@ Anwani yako ya barua pepe ulioitaja katika [[Special:Preferences|mapendekezo yak
 'usermessage-editor' => 'Jumbe za mfumo',
 
 # Watchlist
-'watchlist' => 'Maangalizi yangu',
+'watchlist' => 'Maangalizi',
 'mywatchlist' => 'Maangalizi',
 'watchlistfor2' => 'Kwa ajili ya $1 $2',
 'nowatchlist' => 'Hamna vitu katika maangalizi yako.',
@@ -2200,7 +2200,7 @@ $1',
 'blanknamespace' => '(Kuu)',
 
 # Contributions
-'contributions' => 'Michango ya mtumiaji',
+'contributions' => 'Michango ya {{GENDER:$1|mtumiaji}}',
 'contributions-title' => 'Michango ya mtumiaji $1',
 'mycontris' => 'Michango',
 'contribsub2' => 'Kwa $1 ($2)',
@@ -2243,7 +2243,7 @@ Rejea kumbukumbu ya uzuio ya mwisho inayoandikwa chini:',
 'whatlinkshere-hideredirs' => '$1 maelekezo',
 'whatlinkshere-hidetrans' => '$1 majumuisho',
 'whatlinkshere-hidelinks' => '$1 viungo',
-'whatlinkshere-hideimages' => '$1 viungo vya picha',
+'whatlinkshere-hideimages' => 'viungo $1 vya faili',
 'whatlinkshere-filters' => 'Machujio',
 
 # Block/unblock
index 60be724..67c8e48 100644 (file)
@@ -348,7 +348,7 @@ $messages = array(
 'faqpage' => 'Project:คำถามถามบ่อย',
 
 # Vector skin
-'vector-action-addsection' => 'à¹\80à¸\9eิà¹\88มสà¹\88วà¸\99ใหม่',
+'vector-action-addsection' => 'à¹\80à¸\9eิà¹\88มหัวà¸\82à¹\89อใหม่',
 'vector-action-delete' => 'ลบ',
 'vector-action-move' => 'เปลี่ยนชื่อ',
 'vector-action-protect' => 'ป้องกัน',
@@ -392,7 +392,7 @@ $messages = array(
 'protect_change' => 'เปลี่ยน',
 'protectthispage' => 'ล็อกหน้านี้',
 'unprotect' => 'เปลี่ยนค่าการป้องกัน',
-'unprotectthispage' => 'à¹\81à¸\81à¹\89à¹\84à¸\82การป้องกันหน้านี้',
+'unprotectthispage' => 'à¹\80à¸\9bลีà¹\88ยà¸\99การป้องกันหน้านี้',
 'newpage' => 'หน้าใหม่',
 'talkpage' => 'อภิปรายหน้านี้',
 'talkpagelinktext' => 'พูดคุย',
@@ -509,7 +509,7 @@ $1',
 คุณอาจกรอกยูอาร์แอลผิด หรือมาตามลิงก์ที่ไม่ถูกต้อง
 หรืออาจเกิดจากข้อผิดพลาดในซอฟต์แวร์ซึ่ง {{SITENAME}} ใช้อยู่',
 'nosuchspecialpage' => 'ไม่มีหน้าพิเศษดังกล่าว',
-'nospecialpagetext' => '<strong>à¸\84ุà¸\93รà¹\89อà¸\87à¸\82อหà¸\99à¹\89าà¸\9eิà¹\80ศษà¹\84มà¹\88à¸\96ูà¸\81à¸\95à¹\89อà¸\87</strong>
+'nospecialpagetext' => '<strong>คุณขอหน้าพิเศษไม่ถูกต้อง</strong>
 
 รายการหน้าพิเศษที่ถูกต้องดูได้ที่ [[Special:SpecialPages|รายการหน้าพิเศษ]]',
 
@@ -537,7 +537,7 @@ $1',
 
 สาเหตุมักเกิดจากการเปรียบเทียบที่ล้าสมัย หรือการเชื่อมโยงประวัติไปยังหน้านั้นได้ถูกลบแล้ว
 
-หากไม่ใช่กรณีดังกล่าว คุณอาจพบบั๊กในซอฟต์แวร์ กรุณารายงานต่อ[[Special:ListUsers/sysop|ผู้ดูแลระบบ]] พร้อมระบุ URL',
+หากไม่ใช่กรณีดังกล่าว คุณอาจพบบั๊กในซอฟต์แวร์ กรุณารายงานต่อ[[Special:ListUsers/sysop|ผู้ดูแลระบบ]] พร้อมระบุยูอาร์แอล',
 'missingarticle-rev' => '(รุ่น#: $1)',
 'missingarticle-diff' => '(ต่าง: $1, $2)',
 'readonly_lag' => 'ฐานข้อมูลถูกล็อกอัตโนมัติขณะที่เซิร์ฟเวอร์ฐานข้อมูลรองกำลังปรับปรุงตามฐานข้อมูลหลัก',
@@ -560,7 +560,8 @@ $1',
 'delete-hook-aborted' => 'การลบถูกฮุกยกเลิก
 ไม่มีคำอธิบายสำหรับการยกเลิกนี้',
 'badtitle' => 'ชื่อไม่เหมาะสม',
-'badtitletext' => 'ชื่อหน้าที่ร้องขอไม่ถูกต้อง เป็นชื่อว่าง หรือชื่อที่ผิดพลาดเนื่องจากลิงก์ข้ามมาจากภาษาอื่น ชื่อที่ใช้อาจมีตัวอักษรที่ไม่สามารถปรากฏในชื่อได้',
+'badtitletext' => 'ชื่อของหน้าที่ร้องขอไม่ถูกต้อง อาจเป็นชื่อว่าง หรือชื่อที่ผิดพลาดเนื่องจากลิงก์ข้ามมาจากภาษาอื่น
+หรือไม่ชื่อที่ใช้อาจมีตัวอักษรที่ไม่สามารถปรากฏในชื่อก็ได้',
 'perfcached' => 'ข้อมูลต่อไปนี้ถูกเก็บไว้ในแคช และอาจล้าสมัย มีผลการค้นหาสูงสุด $1 รายการในแคช',
 'perfcachedts' => 'ข้อมูลต่อไปนี้ถูกเก็บไว้ในหน่วยความจำแคช และได้รับการปรับล่าสุดเมื่อ $1 ค่าสูงสุด $4 ผลลัพธ์สามารถเก็บไว้ในหน่วยความจำแคชได้',
 'querypage-no-updates' => 'ขณะนี้การปรับปรุงหน้านี้ถูกระงับ ข้อมูลในที่นี่จะไม่รีเฟรชเป็นปัจจุบัน',
@@ -585,8 +586,8 @@ $1',
 'customcssprotected' => 'คุณไม่มีสิทธิแก้ไขหน้าสไตล์ CSS นี้ เนื่องจากหน้านี้มีการตั้งค่าส่วนบุคคลของผู้ใช้อื่น',
 'customjsprotected' => 'คุณไม่มีสิทธิแก้ไขหน้าจาวาสคริปต์นี้ เนื่องจากหน้านี้มีการตั้งค่าส่วนบุคคลของผู้ใช้อื่น',
 'ns-specialprotected' => 'หน้าพิเศษไม่สามารถแก้ไขได้',
-'titleprotected' => "หัวเรื่องนี้ถูกป้องกันมิให้สร้างโดย [[User:$1|$1]] 
-เหตุผลที่ให้ไว้ คือ ''$2''",
+'titleprotected' => "à¸\8aืà¹\88อเรื่องนี้ถูกป้องกันมิให้สร้างโดย [[User:$1|$1]] 
+เหตุผลที่ให้ไว้คือ ''$2''",
 'invalidtitle-knownnamespace' => 'ชื่อที่มีเนมสเปซ "$2" กับข้อความ "$3" ไม่ถูกต้อง',
 'invalidtitle-unknownnamespace' => 'ชื่อที่ไม่ทราบเนมสเปซหมายเลข $1 กับข้อความ "$2" ไม่ถูกต้อง',
 'exception-nologin' => 'ไม่ได้ล็อกอิน',
@@ -648,8 +649,8 @@ $1',
 'login-userblocked' => 'ผู้ใช้นี้ถูกบล็อก ไม่อนุญาตให้ล็อกอิน',
 'wrongpassword' => 'รหัสผ่านที่ใส่ไม่ถูกต้อง โปรดลองอีกครั้ง',
 'wrongpasswordempty' => 'ยังไม่ได้ระบุรหัสผ่าน โปรดลองอีกครั้ง',
-'passwordtooshort' => 'รหัสà¸\9cà¹\88าà¸\99à¸\95à¹\89อà¸\87มีà¸\84วามยาวอยà¹\88าà¸\87à¸\99à¹\89อย $1 à¸\95ัวอัà¸\81ษร',
-'password-name-match' => 'รหัสà¸\9cà¹\88าà¸\99à¸\82อà¸\87à¸\84ุà¸\93à¸\95à¹\89อà¸\87à¸\95à¹\88าà¸\87à¸\88าà¸\81à¸\8aืà¹\88อà¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\82อà¸\87à¸\84ุà¸\93',
+'passwordtooshort' => 'รหัสà¸\9cà¹\88าà¸\99à¸\95à¹\89อà¸\87มีà¸\84วามยาวอยà¹\88าà¸\87à¸\99à¹\89อย $1 à¸­à¸±à¸\81à¸\82ระ',
+'password-name-match' => 'รหัสà¸\9cà¹\88าà¸\99à¸\95à¹\89อà¸\87à¸\95à¹\88าà¸\87à¸\88าà¸\81à¸\8aืà¹\88อà¸\9cูà¹\89à¹\83à¸\8aà¹\89',
 'password-login-forbidden' => 'ห้ามใช้ชื่อผู้ใช้และรหัสผ่านนี้',
 'mailmypassword' => 'อีเมลรหัสผ่านใหม่',
 'passwordremindertitle' => 'รหัสผ่านชั่วคราวใหม่สำหรับ {{SITENAME}}',
@@ -666,18 +667,19 @@ $1',
 'mailerror' => 'ไม่สามารถส่งอีเมลเนื่องจาก $1',
 'acct_creation_throttle_hit' => 'ผู้เข้าชมที่ใช้หมายเลขไอพีของคุณในวิกินี้ ได้สร้างชื่อบัญชีแล้ว $1 บัญชีในวันที่ผ่านมา ซึ่งเป็นจำนวนมากที่สุดที่อนุญาตในช่วงเวลาดังกล่าว
 จึงส่งผลให้ผู้เข้าชมที่ใช้หมายเลขไอพีนี้ ไม่สามารถสร้างบัญชีได้อีกในขณะนี้',
-'emailauthenticated' => 'อีเมลของคุณได้รับการรับรอง ณ วันที่ $2 เวลา $3',
-'emailnotauthenticated' => 'อีเมลของคุณยังไม่ได้ถูกยืนยัน ดังนั้นคำสั่งพิเศษที่ใช้งานผ่านอีเมลยังไม่เปิดใช้งาน',
+'emailauthenticated' => 'อีเมลของคุณได้รับการยืนยันเมื่อวันที่ $2 เวลา $3',
+'emailnotauthenticated' => 'ที่อยู่อีเมลของคุณยังไม่ได้รับการยืนยัน 
+ไม่มีการส่งอีเมลสำหรับคุณลักษณะใด ๆ ต่อไปนี้',
 'noemailprefs' => 'ระบุที่อยู่อีเมลในการตั้งค่าของคุณเพื่อให้คุณลักษณะเหล่านี้ทำงานได้',
 'emailconfirmlink' => 'ยืนยันอีเมลของคุณ',
 'invalidemailaddress' => 'ไม่สามารถรับที่อยู่อีเมลได้ เพราะดูมีรูปแบบไม่ถูกต้อง
 โปรดใส่ที่อยู่ให้มีรูปแบบถูกต้อง หรือเว้นช่องนั้น',
 'cannotchangeemail' => 'ไม่สามารถเปลี่ยนที่อยู่อีเมลบนวิกินี้',
 'emaildisabled' => 'เว็บไซต์นี้ไม่สามารถส่งอีเมล',
-'accountcreated' => 'à¸\8aืà¹\88อà¸\9aัà¸\8dà¸\8aีà¹\84à¸\94à¹\89ถูกสร้างขึ้น',
-'accountcreatedtext' => 'à¸\8aืà¹\88อà¸\9aัà¸\8dà¸\8aีสำหรัà¸\9a $1 à¹\84à¸\94à¹\89ถูกสร้างขึ้นแล้ว',
+'accountcreated' => 'à¸\9aัà¸\8dà¸\8aีถูกสร้างขึ้น',
+'accountcreatedtext' => 'à¸\9aัà¸\8dà¸\8aีà¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\82อà¸\87 $1 ถูกสร้างขึ้นแล้ว',
 'createaccount-title' => 'สร้างบัญชีสำหรับ {{SITENAME}}',
-'createaccount-text' => 'มีà¸\9aาà¸\87à¸\84à¸\99สรà¹\89าà¸\87à¸\9aัà¸\8dà¸\8aีสำหรัà¸\9aà¸\97ีà¹\88อยูà¹\88อีà¹\80มลà¸\82อà¸\87à¸\84ุà¸\93à¹\84วà¹\89à¸\9aà¸\99 {{SITENAME}} ($4) à¹\82à¸\94ยà¹\83à¸\8aà¹\89à¸\8aืà¹\88อà¸\9aัà¸\8dà¸\8aีà¸\9cูà¹\89à¹\83à¸\8aà¹\89 "$2" และรหัสผ่าน "$3" คุณควรล็อกอินเพื่อเปลี่ยนรหัสผ่านทันที
+'createaccount-text' => 'มีà¸\9aาà¸\87à¸\84à¸\99สรà¹\89าà¸\87à¸\9aัà¸\8dà¸\8aีà¹\82à¸\94ยà¹\83à¸\8aà¹\89à¸\97ีà¹\88อยูà¹\88อีà¹\80มลà¸\82อà¸\87à¸\84ุà¸\93à¸\9aà¸\99 {{SITENAME}} ($4) à¹\82à¸\94ยà¹\83à¸\8aà¹\89à¸\8aืà¹\88อ "$2" และรหัสผ่าน "$3" คุณควรล็อกอินเพื่อเปลี่ยนรหัสผ่านทันที
 
 คุณอาจเพิกเฉยข้อความนี้ หากการสร้างบัญชีนี้เกิดจากความผิดพลาด',
 'usernamehasherror' => 'ในชื่อผู้ใช้ต้องไม่มีตัวอักษร "#"',
@@ -730,14 +732,14 @@ $1',
 'changeemail-oldemail' => 'ที่อยู่อีเมลปัจจุบัน:',
 'changeemail-newemail' => 'ที่อยู่อีเมลใหม่:',
 'changeemail-none' => '(ไม่มี)',
-'changeemail-password' => 'รหัสผ่าน{{SITENAME}}ของคุณ:',
+'changeemail-password' => 'รหัสผ่าน {{SITENAME}} ของคุณ:',
 'changeemail-submit' => 'เปลี่ยนอีเมล',
 'changeemail-cancel' => 'ยกเลิก',
 
 # Edit page toolbar
-'bold_sample' => 'à¸\97ำตัวหนา',
+'bold_sample' => 'à¸\82à¹\89อà¸\84วามตัวหนา',
 'bold_tip' => 'ทำตัวหนา',
-'italic_sample' => 'à¸\95ัวหà¸\99ัà¸\87สือà¸\97ีà¹\88à¹\80à¸\9bà¹\87à¸\99ตัวเอน',
+'italic_sample' => 'à¸\82à¹\89อà¸\84วามตัวเอน',
 'italic_tip' => 'ทำตัวเอน',
 'link_sample' => 'ลิงก์เชื่อมโยง',
 'link_tip' => 'ลิงก์ภายในเว็บ',
@@ -745,8 +747,8 @@ $1',
 'extlink_tip' => 'ลิงก์ภายนอก (อย่าลืมใส่ http:// นำหน้าเสมอ)',
 'headline_sample' => 'หัวข้อ',
 'headline_tip' => 'หัวข้อ',
-'nowiki_sample' => 'à¹\83สà¹\88à¸\82à¹\89อà¸\84วามà¸\97ีà¹\88à¹\84มà¹\88à¸\88ัà¸\94รูà¸\9bà¹\81à¸\9aà¸\9a',
-'nowiki_tip' => 'à¸\82à¹\89ามการจัดรูปแบบวิกิ',
+'nowiki_sample' => 'à¹\81à¸\97รà¸\81à¸\82à¹\89อà¸\84วามà¸\97ีà¹\88à¹\84มà¹\88à¸\88ัà¸\94รูà¸\9bà¹\81à¸\9aà¸\9aà¸\97ีà¹\88à¸\99ีà¹\88',
+'nowiki_tip' => 'à¹\84มà¹\88สà¸\99à¹\83à¸\88การจัดรูปแบบวิกิ',
 'image_sample' => 'ตัวอย่าง.jpg',
 'image_tip' => 'ใส่ไฟล์',
 'media_sample' => 'ตัวอย่าง.ogg',
@@ -766,40 +768,40 @@ $1',
 'showdiff' => 'แสดงความเปลี่ยนแปลง',
 'anoneditwarning' => "'''คำเตือน:''' คุณมิได้ล็อกอิน ที่อยู่ไอพีของคุณจะถูกบันทึกไว้ในประวัติการแก้ไขของหน้านี้",
 'anonpreviewwarning' => "'''คุณมิได้ล็อกอิน การบันทึกจะเก็บที่อยู่ไอพีของคุณในประวัติการแก้ไขของหน้านี้'''",
-'missingsummary' => "'''อย่าลืม:''' คุณยังไม่ได้ระบุคำอธิบายการแก้ไขครั้งนี้ ถ้าคุณกดบันทึกไปส่วนคำอธิบายการแก้ไขนั้นจะว่างและไม่แสดงผล",
+'missingsummary' => "'''อย่าลืม:''' คุณยังไม่ได้ระบุคำอธิบายการแก้ไข ถ้าคุณกด \"บันทึก\" อีกครั้ง การแก้ไขของคุณจะถูกบันทึกโดยไม่มีคำอธิบายการแก้ไข",
 'missingcommenttext' => 'กรุณาใส่ความเห็นด้านล่าง',
 'missingcommentheader' => "'''ประกาศเตือน:''' คุณยังไม่ได้ใส่หัวข้อ/จ่าหัวสำหรับความเห็นนี้ ถ้าคุณกด \"{{int:savearticle}}\" อีกครั้ง การแก้ไขของคุณจะถูกบันทึกโดยไม่มีหัวข้อ",
 'summary-preview' => 'ตัวอย่างคำอธิบายการแก้ไข:',
 'subject-preview' => 'ตัวอย่างหัวข้อ:',
 'blockedtitle' => 'ผู้ใช้ถูกบล็อก',
-'blockedtext' => "'''à¸\8aืà¹\88อà¸\9cูà¹\89à¹\83à¸\8aà¹\89หรือหมายà¹\80ลà¸\82à¹\84อà¸\9eีà¸\96ูà¸\81à¸\82อà¸\87à¸\84ุà¸\93à¸\96ูà¸\81à¸\9aลà¹\87อà¸\81'''
+'blockedtext' => "'''ชื่อผู้ใช้หรือหมายเลขไอพีของคุณถูกบล็อก'''
 
-$1 เป็นผู้ดำเนินการบล็อก 
¹\82à¸\94ยà¹\83หà¹\89à¹\80หà¸\95ุà¸\9cลว่า ''$2''
+การบล็อกนี้ดำเนินการโดย $1
¸\8bึà¹\88à¸\87ระà¸\9aุà¹\80หà¸\95ุà¸\9cลà¹\84วà¹\89ว่า ''$2''
 
 * เริ่มการบล็อก: $8
 * หมดเขตการบล็อก: $6
 * ผู้ถูกบล็อก: $7
 
-à¸\84ุà¸\93สามารà¸\96à¸\95ิà¸\94à¸\95à¹\88อ $1 à¸«à¸£à¸·à¸­[[{{MediaWiki:Grouppage-sysop}}|à¸\9cูà¹\89à¸\94ูà¹\81ลระà¸\9aà¸\9a]]à¸\84à¸\99อืà¹\88à¸\99à¹\80à¸\9eืà¹\88อหารือà¹\80à¸\81ีà¹\88ยวà¸\81ัà¸\9aà¸\81ารà¸\9aลà¹\87อà¸\81à¸\99ีà¹\89 
-คุณไม่สามารถใช้คุณลักษณะ 'ส่งอีเมลหาผู้ใช้รายนี้ได้' จนกว่าจะระบุที่อยู่อีเมลที่ถูกต้องใน[[Special:Preferences|การตั้งค่าบัญชี]]ของคุณ และคุณมิได้ถูกบล็อกมิให้ใช
-
¸«à¸¡à¸²à¸¢à¹\80ลà¸\82à¹\84อà¸\9eีà¸\9bัà¸\88à¸\88ุà¸\9aัà¸\99à¸\82อà¸\87à¸\84ุà¸\93à¸\84ือ $3 à¹\81ละหมายà¹\80ลà¸\82à¸\81ารà¸\9aลà¹\87อà¸\81à¸\84ือ #$5 à¸\81รุà¸\93าระà¸\9aุหมายà¹\80ลà¸\82à¹\80หลà¹\88าà¸\99ีà¹\89à¹\83à¸\99à¸\81ารà¸\95ิà¸\94à¸\95à¹\88อà¹\83à¸\94 à¹\86",
-'autoblockedtext' => 'หมายเลขไอพีของคุณถูกบล็อกโดยอัตโนมัติ เนื่องจากมีผู้ใช้อื่นใช้งานผ่านหมายเลขไอพีนี้มาก่อน ซึ่งถูกบล็อกโดย $1
+à¸\84ุà¸\93สามารà¸\96à¸\95ิà¸\94à¸\95à¹\88อ $1 à¸«à¸£à¸·à¸­[[{{MediaWiki:Grouppage-sysop}}|à¸\9cูà¹\89à¸\94ูà¹\81ลระà¸\9aà¸\9a]]à¸\84à¸\99อืà¹\88à¸\99à¹\80à¸\9eืà¹\88ออภิà¸\9bรายà¸\81ารà¸\9aลà¹\87อà¸\81à¸\99ีà¹\89à¹\84à¸\94à¹\89
+คุณไม่สามารถใช้ 'ส่งอีเมลหาผู้ใช้รายนี้ได้' จนกว่าจะระบุที่อยู่อีเมลให้ถูกต้องใน[[Special:Preferences|การตั้งค่าบัญชี]]ของคุณ และคุณมิได้ถูกบล็อกไม่ให้ใช้ความสามารถนี
+เลขที่อยู่ไอพีปัจจุบันของคุณคือ $3 และหมายเลขการบล็อกคือ #$5 
¹\82à¸\9bรà¸\94à¹\81สà¸\94à¸\87รายละà¹\80อียà¸\94à¸\82à¹\89าà¸\87à¸\95à¹\89à¸\99à¸\97ัà¹\89à¸\87หมà¸\94à¸\99ีà¹\89à¹\83à¸\99à¸\81ารอภิà¸\9bรายà¹\80à¸\81ีà¹\88ยวà¸\81ัà¸\9aà¸\81ารà¸\9aลà¹\87อà¸\81à¸\82อà¸\87à¸\84ุà¸\93à¸\94à¹\89วย",
+'autoblockedtext' => "เลขที่อยู่ไอพีของคุณถูกบล็อกอัตโนมัติ เพราะมีผู้ใช้อื่นมาก่อน ซึ่งถูกบล็อกโดย $1
 เหตุผลที่ให้ไว้ในการบล็อกคือ:
 
-:\'\'$2\'\'
+:''$2''
 
 * เริ่มการบล็อก: $8
 * สิ้นสุดการบล็อก: $6
 * ผู้ถูกบล็อกโดยเจตนา: $7
 
-คุณอาจติดต่อ $1 หรือ[[{{MediaWiki:Grouppage-sysop}}|ผู้ดูแลระบบ]]คนอื่นเพื่อหารือเกี่ยวกับการบล็อกนี้
-
-โปรดทราบว่าคุณอาจไม่สามารถใช้คำสั่ง "อีเมลหาผู้ใช้นี้" หากคุณไม่มีที่อยู่อีเมลที่ถูกต้อง ดังที่ลงทะเบียนไว้ใน[[Special:Preferences|การตั้งค่าผู้ใช้]] และไม่ถูกบล็อกจากการใช้คำสั่งนี้
+คุณอาจติดต่อ $1 หรือ[[{{MediaWiki:Grouppage-sysop}}|ผู้ดูแลระบบ]]คนอื่นเพื่อหารือการบล็อกนี้
 
-หมายเลขไอพีปัจจุบันของคุณคือ $3 หมายเลขการบล็อกคือ #$5
-กรุณาระบุรายละเอียดทั้งหมดข้างต้นในการร้องขอใดๆ ที่คุณกระทำ',
+คุณสามารถติดต่อ $1 หรือ[[{{MediaWiki:Grouppage-sysop}}|ผู้ดูแลระบบ]]คนอื่นเพื่อหารือการบล็อกนี้ 
+คุณไม่สามารถใช้คุณลักษณะ 'ส่งอีเมลหาผู้ใช้รายนี้ได้' จนกว่าจะระบุที่อยู่อีเมลที่ถูกต้องใน[[Special:Preferences|การตั้งค่าบัญชี]]ของคุณ และคุณมิได้ถูกบล็อกไม่ให้
+เลขที่อยู่ไอพีปัจจุบันของคุณคือ $3 และหมายเลขการบล็อกคือ #$5 
+โปรดรวมรายละเอียดข้างต้นทั้งหมดในการสอบถามใด ๆ",
 'blockednoreason' => 'ไม่ได้ให้เหตุผลไว้',
 'whitelistedittext' => 'คุณต้อง$1เพื่อทำการแก้ไขหน้า',
 'confirmedittext' => 'คุณต้องยืนยันที่อยู่อีเมลของคุณก่อนแก้ไขหน้า โปรดกำหนดที่อยู่อีเมลของคุณและทำให้ถูกต้องผ่าน[[Special:Preferences|การตั้งค่าผู้ใช้]]',
@@ -932,6 +934,7 @@ $1 เป็นผู้ดำเนินการบล็อก
 'defaultmessagetext' => 'ข้อความสารโดยปริยาย',
 
 # Content models
+'content-model-wikitext' => 'ข้อความวิกิ',
 'content-model-text' => 'ข้อความธรรมดา',
 'content-model-javascript' => 'จาวาสคริปต์',
 'content-model-css' => 'CSS',
@@ -1112,8 +1115,8 @@ $1",
 'mergehistory-fail' => 'ไม่สามารถรวมประวัติการแก้ไขได้ โปรดตรวจสอบค่าตัวแปรหน้าและเวลาอีกครั้ง',
 'mergehistory-no-source' => 'ไม่มีหน้าต้นทาง $1 อยู่ในสารบบ',
 'mergehistory-no-destination' => 'ไม่มีหน้าปลายทาง $1 อยู่ในสารบบ',
-'mergehistory-invalid-source' => 'หัวà¹\80รืà¹\88อà¸\87à¸\82อà¸\87หà¸\99à¹\89าà¸\95à¹\89à¸\99à¸\97าà¸\87à¸\95à¹\89อà¸\87à¸\95รà¸\87à¸\95ามà¸\82à¹\89อà¸\81ำหà¸\99à¸\94 (à¹\80à¸\8aà¹\88à¸\99 à¹\84มà¹\88มีà¸\95ัวอัà¸\81ษรà¸\97ีà¹\88à¹\84มà¹\88สามารà¸\96à¹\83à¸\8aà¹\89à¹\83à¸\99หัวà¹\80รืà¹\88อà¸\87à¹\84à¸\94à¹\89)',
-'mergehistory-invalid-destination' => 'หัวà¹\80รืà¹\88อà¸\87à¸\82อà¸\87หà¸\99à¹\89าà¸\9bลายà¸\97าà¸\87à¸\95à¹\89อà¸\87à¸\95รà¸\87à¸\95ามà¸\82à¹\89อà¸\81ำหà¸\99à¸\94 (à¹\80à¸\8aà¹\88à¸\99 à¹\84มà¹\88มีà¸\95ัวอัà¸\81ษรà¸\97ีà¹\88à¹\84มà¹\88สามารà¸\96à¹\83à¸\8aà¹\89à¹\83à¸\99หัวà¹\80รืà¹\88อà¸\87à¹\84à¸\94à¹\89)',
+'mergehistory-invalid-source' => 'หัวà¹\80รืà¹\88อà¸\87à¸\82อà¸\87หà¸\99à¹\89าà¸\95à¹\89à¸\99à¸\97าà¸\87à¸\95à¹\89อà¸\87สมà¹\80หà¸\95ุสมà¸\9cล',
+'mergehistory-invalid-destination' => 'à¸\8aืà¹\88อà¹\80รืà¹\88อà¸\87à¸\82อà¸\87หà¸\99à¹\89าà¸\9bลายà¸\97าà¸\87à¸\95à¹\89อà¸\87สมà¹\80หà¸\95ุสมà¸\9cล',
 'mergehistory-autocomment' => 'ย้าย [[:$1]] ไปยัง [[:$2]]',
 'mergehistory-comment' => 'ย้าย [[:$1]] ไปยัง [[:$2]]: $3',
 'mergehistory-same-destination' => 'หน้าต้นทางและปลายทางเป็นหน้าเดียวกันไม่ได้',
@@ -1144,8 +1147,8 @@ $1",
 'searchsubtitle' => 'คุณได้สืบค้นหา \'\'\'[[:$1]]\'\'\' ([[Special:Prefixindex/$1|ทุกหน้าที่ขึ้นต้นด้วย "$1"]]{{int:pipe-separator}}[[Special:WhatLinksHere/$1|ทุกหน้าที่โยงมาที่ "$1"]])',
 'searchsubtitleinvalid' => "ค้นหาเกี่ยวกับ '''$1'''",
 'toomanymatches' => 'พบตรงกันมากเกินไป กรุณาใช้คำค้นหาอื่น',
-'titlematches' => 'à¸\9eà¸\9aà¸\8aืà¹\88อหัวà¸\82à¹\89อà¸\99ีà¹\89',
-'notitlematches' => 'à¹\84มà¹\88à¸\9eà¸\9aà¸\8aืà¹\88อหัวà¸\82à¹\89อà¸\99ีà¹\89',
+'titlematches' => 'à¸\9eà¸\9aà¸\8aืà¹\88อà¹\80รืà¹\88อà¸\87หà¸\99à¹\89าà¸\95รà¸\87à¸\81ัà¸\99',
+'notitlematches' => 'à¹\84มà¹\88à¸\9eà¸\9aà¸\8aืà¹\88อà¹\80รืà¹\88อà¸\87หà¸\99à¹\89าà¸\95รà¸\87à¸\81ัà¸\99',
 'textmatches' => 'พบคำนี้ในหน้า',
 'notextmatches' => 'ไม่พบข้อความในหน้า',
 'prevn' => 'ก่อนหน้า $1',
@@ -1511,7 +1514,7 @@ $1",
 'rc_categories' => 'จำกัดเฉพาะหมวดหมู่ (แยกด้วย "|")',
 'rc_categories_any' => 'ใด ๆ',
 'rc-change-size-new' => '$1 ไบต์หลังปรับปรุง',
-'newsectionsummary' => '/* $1 */ à¸ªà¹\88วà¸\99ใหม่',
+'newsectionsummary' => '/* $1 */ à¸«à¸±à¸§à¸\82à¹\89อใหม่',
 'rc-enhanced-expand' => 'แสดงรายละเอียด (ต้องใช้จาวาสคริปต์)',
 'rc-enhanced-hide' => 'ซ่อนรายละเอียด',
 'rc-old-title' => 'เดิมถูกสร้างในชื่อ "$1"',
@@ -1924,8 +1927,8 @@ $1',
 'protectedpages-cascade' => 'การล็อกแบบสืบทอดเท่านั้น',
 'protectedpagestext' => 'หน้าต่อไปนี้ถูกล็อกห้ามแก้ไขหรือเปลี่ยนชื่อ',
 'protectedpagesempty' => 'ไม่มีหน้าใดที่ถูกล็อกตามค่าที่เลือก',
-'protectedtitles' => 'หัวà¹\80รืà¹\88อà¸\87à¸\97ีà¹\88à¹\84à¸\94à¹\89รัà¸\9aà¸\81ารป้องกัน',
-'protectedtitlestext' => 'หัวà¹\80รืà¹\88อà¸\87à¸\95à¹\88อà¹\84à¸\9bà¸\99ีà¹\89à¹\84à¸\94à¹\89รัà¸\9aà¸\81ารป้องกันมิให้สร้าง',
+'protectedtitles' => 'à¸\8aืà¹\88อà¹\80รืà¹\88อà¸\87à¸\97ีà¹\88à¸\96ูà¸\81ป้องกัน',
+'protectedtitlestext' => 'à¸\8aืà¹\88อà¹\80รืà¹\88อà¸\87à¸\95à¹\88อà¹\84à¸\9bà¸\99ีà¹\89à¸\96ูà¸\81ป้องกันมิให้สร้าง',
 'protectedtitlesempty' => 'ปัจจุบันไม่มีหัวเรื่องที่ได้รับการป้องกันด้วยค่าต่อไปนี้',
 'listusers' => 'รายนามผู้ใช้',
 'listusers-editsonly' => 'แสดงเฉพาะผู้ใช้ที่มีการแก้ไข',
@@ -2236,7 +2239,7 @@ $UNWATCHURL
 'protect-summary-cascade' => 'สืบทอด',
 'protect-expiring' => 'หมดอายุ $1 (UTC)',
 'protect-expiring-local' => 'หมดอายุ $1',
-'protect-expiry-indefinite' => 'à¸\95ลอà¸\94à¸\81าล',
+'protect-expiry-indefinite' => 'à¹\84มà¹\88มีà¸\81ำหà¸\99à¸\94',
 'protect-cascade' => 'ล็อกหน้าที่เป็นส่วนหนึ่งของหน้านี้ (ล็อกแบบสืบทอด)',
 'protect-cantedit' => 'คุณไม่สามารถเปลี่ยนระดับการป้องกันของหน้านี้ เนื่องจากคุณไม่ได้รับสิทธิในการแก้ไขสิ่งนั้น',
 'protect-othertime' => 'ระยะเวลาอื่น:',
@@ -2250,7 +2253,7 @@ $UNWATCHURL
 ** สงครามการแก้ไขที่ไม่สร้างสรรค์
 ** หน้าที่มีการเข้าชมมาก',
 'protect-edit-reasonlist' => 'สาเหตุการป้องกันการแก้ไข',
-'protect-expiry-options' => '1 à¸\8aัà¹\88วà¹\82มà¸\87:1 hour,1 à¸§à¸±à¸\99:1 day,1 à¸ªà¸±à¸\9bà¸\94าหà¹\8c:1 week,2 à¸ªà¸±à¸\9bà¸\94าหà¹\8c:2 weeks,1 à¹\80à¸\94ือà¸\99:1 month,3 à¹\80à¸\94ือà¸\99:3 months,6 à¹\80à¸\94ือà¸\99:6 months,1 à¸\9bี:1 year,à¸\95ลอà¸\94à¸\81าล:infinite',
+'protect-expiry-options' => '1 à¸\8aัà¹\88วà¹\82มà¸\87:1 hour,1 à¸§à¸±à¸\99:1 day,1 à¸ªà¸±à¸\9bà¸\94าหà¹\8c:1 week,2 à¸ªà¸±à¸\9bà¸\94าหà¹\8c:2 weeks,1 à¹\80à¸\94ือà¸\99:1 month,3 à¹\80à¸\94ือà¸\99:3 months,6 à¹\80à¸\94ือà¸\99:6 months,1 à¸\9bี:1 year,à¹\84มà¹\88มีà¸\81ำหà¸\99à¸\94:infinite',
 'restriction-type' => 'อนุญาต',
 'restriction-level' => 'ระดับการล็อก',
 'minimum-size' => 'ขนาดอย่างน้อย',
@@ -2350,7 +2353,7 @@ $1',
 'sp-contributions-blocked-notice-anon' => 'ปัจจุบันเลขที่อยู่ไอพีนี้ถูกบล็อก
 ปูมการบล็อกล่าสุดแสดงด้านล่างนี้เพื่อการอ้างอิง:',
 'sp-contributions-search' => 'ค้นหาการแก้ไข',
-'sp-contributions-username' => 'หมายà¹\80ลà¸\82ไอพีหรือชื่อผู้ใช้:',
+'sp-contributions-username' => 'à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีหรือชื่อผู้ใช้:',
 'sp-contributions-toponly' => 'แสดงเฉพาะการแก้ไขรุ่นล่าสุด',
 'sp-contributions-submit' => 'สืบค้น',
 
@@ -2380,9 +2383,9 @@ $1',
 'blockip' => 'บล็อกผู้ใช้',
 'blockip-title' => 'ระงับผู้ใช้',
 'blockip-legend' => 'บล็อกผู้ใช้',
-'blockiptext' => 'à¹\83à¸\8aà¹\89à¹\81à¸\9aà¸\9aà¸\94à¹\89าà¸\99ลà¹\88าà¸\87à¹\80à¸\9eืà¹\88อà¸\9aลà¹\87อà¸\81สิà¸\97à¸\98ิà¹\80à¸\82à¹\89าà¸\96ึà¸\87à¸\81ารà¹\80à¸\82ียà¸\99à¸\82อà¸\87หมายà¹\80ลà¸\82ไอพีหรือชื่อผู้ใช้โดยเจาะจง การบล็อกนี้ควรดำเนินการเพื่อป้องกันการก่อกวนเท่านั้น และให้สอดคล้องกับ[[{{MediaWiki:Policy-url}}|นโยบาย]]
+'blockiptext' => 'à¹\83à¸\8aà¹\89à¹\81à¸\9aà¸\9aà¸\94à¹\89าà¸\99ลà¹\88าà¸\87à¹\80à¸\9eืà¹\88อà¸\9aลà¹\87อà¸\81สิà¸\97à¸\98ิà¹\80à¸\82à¹\89าà¸\96ึà¸\87à¸\81ารà¹\80à¸\82ียà¸\99à¸\82อà¸\87à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีหรือชื่อผู้ใช้โดยเจาะจง การบล็อกนี้ควรดำเนินการเพื่อป้องกันการก่อกวนเท่านั้น และให้สอดคล้องกับ[[{{MediaWiki:Policy-url}}|นโยบาย]]
 กรอกเหตุผลโดยเจาะจงด้านล่าง (เช่น อ้างถึงหน้าที่ถูกก่อกวน)',
-'ipadressorusername' => 'หมายà¹\80ลà¸\82ไอพีหรือชื่อผู้ใช้',
+'ipadressorusername' => 'à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีหรือชื่อผู้ใช้',
 'ipbexpiry' => 'หมดอายุ',
 'ipbreason' => 'เหตุผล:',
 'ipbreasonotherlist' => 'เลือกสาเหตุ',
@@ -2394,32 +2397,32 @@ $1',
 ** คุกคามผู้อื่น
 ** ก่อกวนผู้อื่น
 ** ชื่อผู้ใช้ที่ไม่สุภาพหรือไม่ควรใช้',
-'ipb-hardblock' => 'à¸\9bà¹\89อà¸\87à¸\81ัà¸\99à¹\84มà¹\88à¹\83หà¹\89à¸\9cูà¹\89à¹\83à¸\8aà¹\89ลà¹\87อà¸\81อิà¸\99à¹\81à¸\81à¹\89à¹\84à¸\82à¸\88าà¸\81หมายà¹\80ลà¸\82ไอพีนี้',
+'ipb-hardblock' => 'à¸\9bà¹\89อà¸\87à¸\81ัà¸\99à¹\84มà¹\88à¹\83หà¹\89à¸\9cูà¹\89à¹\83à¸\8aà¹\89ลà¹\87อà¸\81อิà¸\99à¹\81à¸\81à¹\89à¹\84à¸\82à¸\88าà¸\81à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีนี้',
 'ipbcreateaccount' => 'ป้องกันการสร้างบัญชี',
 'ipbemailban' => 'ป้องกันมิให้ผู้ใช้ส่งอีเมล',
-'ipbenableautoblock' => 'à¸\9aลà¹\87อà¸\81หมายà¹\80ลà¸\82à¹\84อà¸\9eีลà¹\88าสุà¸\94à¸\97ีà¹\88à¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\99ีà¹\89à¹\83à¸\8aà¹\89 à¸\97ัà¹\89à¸\87à¸\97ุà¸\81หมายà¹\80ลà¸\82ไอพีที่ผู้นั้นพยายามใช้แก้ไขโดยอัตโนมัติ',
+'ipbenableautoblock' => 'à¸\9aลà¹\87อà¸\81à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88à¹\84อà¸\9eีลà¹\88าสุà¸\94à¸\97ีà¹\88à¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\99ีà¹\89à¹\83à¸\8aà¹\89 à¸\97ัà¹\89à¸\87à¸\97ุà¸\81à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีที่ผู้นั้นพยายามใช้แก้ไขโดยอัตโนมัติ',
 'ipbsubmit' => 'บล็อกผู้ใช้นี้',
 'ipbother' => 'เวลาอื่น',
-'ipboptions' => '2 à¸\8aัà¹\88วà¹\82มà¸\87:2 hours,1 à¸§à¸±à¸\99:1 day,3 à¸§à¸±à¸\99:3 days,1 à¸ªà¸±à¸\9bà¸\94าหà¹\8c:1 week,2 à¸ªà¸±à¸\9bà¸\94าหà¹\8c:2 weeks,1 à¹\80à¸\94ือà¸\99:1 month,3 à¹\80à¸\94ือà¸\99:3 months,6 à¹\80à¸\94ือà¸\99:6 months,1 à¸\9bี:1 year,à¸\95ลอà¸\94à¸\81าล:infinite',
+'ipboptions' => '2 à¸\8aัà¹\88วà¹\82มà¸\87:2 hours,1 à¸§à¸±à¸\99:1 day,3 à¸§à¸±à¸\99:3 days,1 à¸ªà¸±à¸\9bà¸\94าหà¹\8c:1 week,2 à¸ªà¸±à¸\9bà¸\94าหà¹\8c:2 weeks,1 à¹\80à¸\94ือà¸\99:1 month,3 à¹\80à¸\94ือà¸\99:3 months,6 à¹\80à¸\94ือà¸\99:6 months,1 à¸\9bี:1 year,à¹\84มà¹\88มีà¸\81ำหà¸\99à¸\94:infinite',
 'ipbotheroption' => 'เลือกเวลา',
 'ipbotherreason' => 'เหตุผลอื่น',
 'ipbhidename' => 'ซ่อนผู้ใช้จากปูมการบล็อก และรายการผู้ที่ถูกบล็อก',
 'ipbwatchuser' => 'เฝ้าดูหน้าผู้ใช้และหน้าคุยกับผู้ใช้ของผู้ใช้รายนี้',
-'ipb-disableusertalk' => 'à¸\9bà¹\89อà¸\87à¸\81ัà¸\99à¹\84มà¹\88à¹\83หà¹\89à¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\99ีà¹\89à¹\81à¸\81à¹\89à¹\84à¸\82หà¸\99à¹\89าà¸\9eูà¸\94à¸\84ุยของตัวเองขณะถูกบล็อก',
+'ipb-disableusertalk' => 'à¸\9bà¹\89อà¸\87à¸\81ัà¸\99à¹\84มà¹\88à¹\83หà¹\89à¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\99ีà¹\89à¹\81à¸\81à¹\89à¹\84à¸\82หà¸\99à¹\89าà¸\84ุยà¸\81ัà¸\9aà¸\9cูà¹\89à¹\83à¸\8aà¹\89ของตัวเองขณะถูกบล็อก',
 'ipb-change-block' => 'บล็อกผู้ใช้อีกครั้งด้วยการตั้งค่าเหล่านี้',
 'ipb-confirm' => 'ยืนยันการบล็อก',
-'badipaddress' => 'หมายà¹\80ลà¸\82ไอพีไม่ถูกต้อง',
+'badipaddress' => 'à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีไม่ถูกต้อง',
 'blockipsuccesssub' => 'บล็อกสำเร็จ',
 'blockipsuccesstext' => '[[Special:Contributions/$1|$1]] ถูกบล็อก<br />
 ดู[[Special:BlockList|รายการบล็อก]]เพื่อทบทวนการบล็อก',
-'ipb-blockingself' => 'à¸\84ุà¸\93à¸\81ำลัà¸\87à¸\97ำà¸\81ารà¸\9aลà¹\87อà¸\81à¸\95ัวà¸\84ุà¸\93à¹\80อà¸\87 à¸\84ุà¸\93à¹\81à¸\99à¹\88à¹\83à¸\88à¹\81ลà¹\89วหรือวà¹\88าà¸\95à¹\89อà¸\87à¸\81ารà¸\97ำà¹\80à¸\8aà¹\88à¸\99นั้น',
+'ipb-blockingself' => 'à¸\84ุà¸\93à¸\81ำลัà¸\87à¸\9aลà¹\87อà¸\81à¸\95ัวà¹\80อà¸\87! à¹\81à¸\99à¹\88à¹\83à¸\88à¹\81ลà¹\89วหรือวà¹\88าà¸\95à¹\89อà¸\87à¸\81ารà¸\97ำอยà¹\88าà¸\87นั้น',
 'ipb-edit-dropdown' => 'แก้ไขสาเหตุการบล็อก',
 'ipb-unblock-addr' => 'เลิกบล็อก $1',
-'ipb-unblock' => 'à¹\80ลิà¸\81à¸\9aลà¹\87อà¸\81à¸\9cูà¹\89à¹\83à¸\8aà¹\89หรือหมายà¹\80ลà¸\82ไอพี',
+'ipb-unblock' => 'à¹\80ลิà¸\81à¸\9aลà¹\87อà¸\81à¸\9cูà¹\89à¹\83à¸\8aà¹\89หรือà¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพี',
 'ipb-blocklist' => 'ดูการบล็อกปัจจุบัน',
 'ipb-blocklist-contribs' => 'ผลงานเขียนโดย $1',
 'unblockip' => 'ปลดบล็อกผู้ใช้',
-'unblockiptext' => 'à¹\83à¸\8aà¹\89à¹\81à¸\9aà¸\9aà¸\94à¹\89าà¸\99ลà¹\88าà¸\87สำหรัà¸\9aà¸\84ืà¸\99สิà¸\97à¸\98ิà¸\81ารà¹\80à¸\82à¹\89าà¸\96ึà¸\87à¸\81ารà¹\80à¸\82ียà¸\99à¹\81à¸\81à¹\88หมายà¹\80ลà¸\82ไอพี หรือชื่อผู้ใช้ที่เคยถูกบล็อก',
+'unblockiptext' => 'à¹\83à¸\8aà¹\89à¹\81à¸\9aà¸\9aà¸\94à¹\89าà¸\99ลà¹\88าà¸\87สำหรัà¸\9aà¸\84ืà¸\99สิà¸\97à¸\98ิà¸\81ารà¹\80à¸\82à¹\89าà¸\96ึà¸\87à¸\81ารà¹\80à¸\82ียà¸\99à¹\81à¸\81à¹\88à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพี หรือชื่อผู้ใช้ที่เคยถูกบล็อก',
 'ipusubmit' => 'ยกเลิกการบล็อกนี้',
 'unblocked' => '[[User:$1|$1]] ถูกบล็อก',
 'unblocked-range' => '$1 ถูกปลดบล็อกแล้ว',
@@ -2439,7 +2442,7 @@ $1',
 'ipblocklist-submit' => 'สืบค้น',
 'ipblocklist-localblock' => 'การสกัดกั้นภายในวิกินี้',
 'ipblocklist-otherblocks' => '{{PLURAL:$1|การสกัดกั้น}}อื่นๆ',
-'infiniteblock' => 'à¸\95ลอà¸\94à¸\81าล',
+'infiniteblock' => 'à¹\84มà¹\88มีà¸\81ำหà¸\99à¸\94',
 'expiringblock' => 'หมดอายุ $1 เวลา $2',
 'anononlyblock' => 'ไม่ล็อกอินเท่านั้น',
 'noautoblockblock' => 'ยกเลิกการบล็อกอัตโนมัติ',
@@ -2447,13 +2450,13 @@ $1',
 'emailblock' => 'บล็อกการส่งอีเมล',
 'blocklist-nousertalk' => 'ไม่สามารถแก้ไขหน้าอภิปรายของตนเอง',
 'ipblocklist-empty' => 'รายการบล็อกว่าง',
-'ipblocklist-no-results' => 'หมายà¹\80ลà¸\82ไอพีหรือชื่อผู้ใช้ที่ต้องการไม่ได้ถูกบล็อก',
+'ipblocklist-no-results' => 'à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีหรือชื่อผู้ใช้ที่ต้องการไม่ได้ถูกบล็อก',
 'blocklink' => 'บล็อก',
 'unblocklink' => 'เลิกบล็อก',
 'change-blocklink' => 'เปลี่ยนการบล็อก',
 'contribslink' => 'เรื่องที่เขียน',
 'emaillink' => 'ส่งอีเมล',
-'autoblocker' => 'à¸\96ูà¸\81à¸\9aลà¹\87อà¸\81อัà¸\95à¹\82à¸\99มัà¸\95ิà¹\80à¸\99ืà¹\88อà¸\87à¸\88าà¸\81หมายà¹\80ลà¸\82ไอพีของคุณล่าสุดถูกใช้โดย "[[User:$1|$1]]" เหตุผลที่ให้แก่การบล็อก $1 คือ: "$2"',
+'autoblocker' => 'à¸\96ูà¸\81à¸\9aลà¹\87อà¸\81อัà¸\95à¹\82à¸\99มัà¸\95ิà¹\80à¸\99ืà¹\88อà¸\87à¸\88าà¸\81à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีของคุณล่าสุดถูกใช้โดย "[[User:$1|$1]]" เหตุผลที่ให้แก่การบล็อก $1 คือ: "$2"',
 'blocklogpage' => 'ปูมการบล็อก',
 'blocklog-showlog' => 'ผู้ใช้นี้ถูกสกัดกั้นมาก่อน
 ปูมการสกัดกั้นแสดงไว้ด้านล่างนี้เพื่อการอ้างอิง:',
@@ -2481,16 +2484,16 @@ $1',
 'ipb-otherblocks-header' => '{{PLURAL:$1|การบล็อก}}อื่น ๆ',
 'unblock-hideuser' => 'คุณไม่สามารถยกเลิกการบล็อคผู้ใช้งานรายนี้ได้, เนื่องจากชื่อผู้ใช้ของผู้ใช้งานถูกซ่อนอยู่',
 'ipb_cant_unblock' => 'ปัญหา: หมายเลขบล็อก $1 ไม่พบ อาจเกิดจากได้ถูกยกเลิกการบล็อกแล้ว',
-'ipb_blocked_as_range' => 'มีà¸\82à¹\89อà¸\9cิà¸\94à¸\9eลาà¸\94: à¸«à¸¡à¸²à¸¢à¹\80ลà¸\82à¹\84อà¸\9eี $1 à¹\84มà¹\88à¹\84à¸\94à¹\89à¸\96ูà¸\81ระà¸\87ัà¸\9aà¹\82à¸\94ยà¸\95รà¸\87à¹\81ละà¹\84มà¹\88สามารà¸\96ยà¸\81à¹\80ลิà¸\81à¸\81ารระà¸\87ัà¸\9aà¹\82à¸\94ยà¸\95รà¸\87à¹\84à¸\94à¹\89.  à¸­à¸¢à¹\88าà¸\87à¹\84รà¸\81à¹\87à¸\95าม à¹\84อà¸\9eีà¸\99ีà¹\89à¸\96ูà¸\81ระà¸\87ัà¸\9aà¹\83à¸\99à¸\90าà¸\99ะà¸\97ีà¹\88à¹\80à¸\9bà¹\87à¸\99สà¹\88วà¸\99หà¸\99ึà¹\88à¸\87à¸\82อà¸\87หมายà¹\80ลà¸\82à¹\84อà¸\9eีà¹\83à¸\99à¸\8aà¹\88วà¸\87 $2 ซึ่งสามารถยกเลิกการระงับได้',
-'ip_range_invalid' => 'à¸\8aà¹\88วà¸\87ไอพีไม่ถูกต้อง',
+'ipb_blocked_as_range' => 'มีà¸\82à¹\89อà¸\9cิà¸\94à¸\9eลาà¸\94: à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88à¹\84อà¸\9eี $1 à¹\84มà¹\88à¹\84à¸\94à¹\89à¸\96ูà¸\81ระà¸\87ัà¸\9aà¹\82à¸\94ยà¸\95รà¸\87à¹\81ละà¹\84มà¹\88สามารà¸\96ยà¸\81à¹\80ลิà¸\81à¸\81ารระà¸\87ัà¸\9aà¹\82à¸\94ยà¸\95รà¸\87à¹\84à¸\94à¹\89.  à¸­à¸¢à¹\88าà¸\87à¹\84รà¸\81à¹\87à¸\95าม à¹\84อà¸\9eีà¸\99ีà¹\89à¸\96ูà¸\81ระà¸\87ัà¸\9aà¹\83à¸\99à¸\90าà¸\99ะà¸\97ีà¹\88à¹\80à¸\9bà¹\87à¸\99สà¹\88วà¸\99หà¸\99ึà¹\88à¸\87à¸\82อà¸\87à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88à¹\84อà¸\9eีà¹\83à¸\99à¸\9eิสัย $2 ซึ่งสามารถยกเลิกการระงับได้',
+'ip_range_invalid' => 'à¸\9eิสัยไอพีไม่ถูกต้อง',
 'ip_range_toolarge' => 'ขนาดบล็อกมีขนาดใหญ่กว่า / $1 จะไม่ได้รับอนุญาต',
 'blockme' => 'บล็อกฉัน',
 'proxyblocker' => 'บล็อกพร็อกซี',
 'proxyblocker-disabled' => 'ฟังก์ชั่นนี้ไม่สามารถใช้ได้',
-'proxyblockreason' => 'หมายà¹\80ลà¸\82ไอพีของคุณถูกบล็อกเนื่องจากเป็นพร็อกซีเปิด กรุณาติดต่อผู้ให้บริการอินเทอร์เน็ตที่คุณใช้งานอยู่เกี่ยวกับปัญหานี้',
+'proxyblockreason' => 'à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีของคุณถูกบล็อกเนื่องจากเป็นพร็อกซีเปิด กรุณาติดต่อผู้ให้บริการอินเทอร์เน็ตที่คุณใช้งานอยู่เกี่ยวกับปัญหานี้',
 'proxyblocksuccess' => 'บล็อกสำเร็จ',
-'sorbsreason' => 'หมายà¹\80ลà¸\82ไอพีของคุณอยู่ในพร็อกซีเปิดในส่วน DNSBL ที่ถูกใช้งานในเว็บไซต์',
-'sorbs_create_account_reason' => 'หมายà¹\80ลà¸\82ไอพีของคุณอยู่ในพร็อกซีเปิดในส่วน DNSBL ที่ถูกใช้งานในเว็บไซต์ ดังนั้นคุณไม่สามารถสร้างชื่อบัญชีผู้ใช้ได้',
+'sorbsreason' => 'à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีของคุณอยู่ในพร็อกซีเปิดในส่วน DNSBL ที่ถูกใช้งานในเว็บไซต์',
+'sorbs_create_account_reason' => 'à¹\80ลà¸\82à¸\97ีà¹\88อยูà¹\88ไอพีของคุณอยู่ในพร็อกซีเปิดในส่วน DNSBL ที่ถูกใช้งานในเว็บไซต์ ดังนั้นคุณไม่สามารถสร้างชื่อบัญชีผู้ใช้ได้',
 'cant-block-while-blocked' => 'คุณไม่สามารถบล็อกผู้ใช้อื่นในขณะที่คุณกำลังถูกบล็อก',
 'cant-see-hidden-user' => 'ผู้ใช้ที่คุณกำลังพยายามระงับนั้นได้ถูกระงับหรือซ่อนเดิมอยู่แล้ว เนื่องจากคุณไม่มีสิทธิซ่อนผู้ใช้ คุณจึงไม่สามารถดูหรือแก้ไขการระงับผู้ใช้ได้',
 'ipbblocked' => 'คุณไม่สามารถบล็อกหรือปลดบล็อกผู้ใช้คนอื่น เนื่องจากคุณกำลังถูกบล็อก',
@@ -2607,9 +2610,9 @@ $1',
 
 # Export
 'export' => 'ส่งออกหน้า',
-'exporttext' => 'คุณสามารถส่งออก (export) ข้อความต้นฉบับและประวัติการแก้ไขของหน้าใดๆ มากกว่าหนึ่งหน้าในคราวเดียว ออกมาในรูปแบบ XML ซึ่งสามารถนำไปใส่เข้าไว้ในเว็บไซต์วิกิแห่งอื่นที่ใช้ซอฟต์แวร์มีเดียวิกิได้ ผ่านทางคำสั่ง[[Special:Import|การนำเข้าหน้า]]
+'exporttext' => 'คุณสามารถส่งออกข้อความและประวัติการแก้ไขของหน้าใด ๆ หรือชุดหน้าในคราวเดียว ออกมาในรูปแบบ XML ซึ่งสามารถนำไปใส่เข้าไว้ในวิกิแห่งอื่นที่ใช้ซอฟต์แวร์มีเดียวิกิได้ ผ่านคำสั่ง[[Special:Import|การนำเข้าหน้า]]
 
-à¸\81ารà¸\88ะสà¹\88à¸\87ออà¸\81หà¸\99à¹\89าà¸\99ัà¹\89à¸\99สามารà¸\96à¸\97ำà¹\84à¸\94à¹\89à¹\82à¸\94ยà¹\83สà¹\88à¸\8aืà¹\88อหัวà¹\80รืà¹\88อà¸\87à¸\82อà¸\87หà¸\99à¹\89าà¸\97ีà¹\88à¸\95à¹\89อà¸\87à¸\81าร à¸¥à¸\87à¹\83à¸\99à¸\81ลà¹\88อà¸\87à¸\82à¹\89อà¸\84วามà¸\94à¹\89าà¸\99ลà¹\88าà¸\87 à¸«à¸\99ึà¹\88à¸\87à¸\8aืà¹\88อà¸\95à¹\88อหà¸\99ึà¹\88à¸\87à¸\9aรรà¸\97ัà¸\94 à¸\88าà¸\81à¸\99ัà¹\89à¸\99à¹\80ลือà¸\81วà¹\88าà¸\95à¹\89อà¸\87à¸\81ารà¸\97ัà¹\89à¸\87รุà¹\88à¸\99à¸\9bัà¸\88à¸\88ุà¸\9aัà¸\99à¹\81ละรุà¹\88à¸\99à¹\80à¸\81à¹\88าà¹\86 à¸\97ัà¹\89à¸\87หมà¸\94à¸\9eรà¹\89อมà¸\81ัà¸\9aà¸\9bระวัà¸\95ิà¸\82อà¸\87หà¸\99à¹\89าà¸\99ัà¹\89à¸\99 à¸«à¸£à¸·à¸­à¸\95à¹\89อà¸\87à¸\81ารà¹\80à¸\9eียà¸\87à¹\81à¸\95à¹\88à¹\80à¸\99ืà¹\89อหารุà¹\88à¸\99à¸\9bัà¸\88à¸\88ุà¸\9aัà¸\99à¸\9eรà¹\89อมà¸\81ัà¸\9aรายละà¹\80อียà¸\94à¸\82อà¸\87รุà¹\88à¸\99à¸\99ัà¹\89à¸\99เท่านั้น
+à¸\81ารà¸\88ะสà¹\88à¸\87ออà¸\81หà¸\99à¹\89าà¸\99ัà¹\89à¸\99สามารà¸\96à¸\97ำà¹\84à¸\94à¹\89à¹\82à¸\94ยà¹\83สà¹\88à¸\8aืà¹\88อà¹\80รืà¹\88อà¸\87หà¸\99à¹\89าà¸\97ีà¹\88à¸\95à¹\89อà¸\87à¸\81าร à¸¥à¸\87à¹\83à¸\99à¸\81ลà¹\88อà¸\87à¸\82à¹\89อà¸\84วามà¸\94à¹\89าà¸\99ลà¹\88าà¸\87 à¸«à¸\99ึà¹\88à¸\87à¸\8aืà¹\88อà¸\95à¹\88อหà¸\99ึà¹\88à¸\87à¸\9aรรà¸\97ัà¸\94 à¸\88าà¸\81à¸\99ัà¹\89à¸\99à¹\80ลือà¸\81วà¹\88าà¸\95à¹\89อà¸\87à¸\81ารà¸\97ัà¹\89à¸\87รุà¹\88à¸\99à¸\9bัà¸\88à¸\88ุà¸\9aัà¸\99à¹\81ละรุà¹\88à¸\99à¹\80à¸\81à¹\88าà¸\97ัà¹\89à¸\87หมà¸\94à¸\9eรà¹\89อมà¸\81ัà¸\9aà¸\9bระวัà¸\95ิà¸\82อà¸\87หà¸\99à¹\89าà¸\99ัà¹\89à¸\99 à¸«à¸£à¸·à¸­à¸\95à¹\89อà¸\87à¸\81ารà¹\80à¸\9eียà¸\87à¹\80à¸\99ืà¹\89อหารุà¹\88à¸\99à¸\9bัà¸\88à¸\88ุà¸\9aัà¸\99à¸\9eรà¹\89อมà¸\81ัà¸\9aสารสà¸\99à¹\80à¸\97ศà¸\82อà¸\87à¸\81ารà¹\81à¸\81à¹\89à¹\84à¸\82à¸\84รัà¹\89à¸\87สุà¸\94à¸\97à¹\89ายเท่านั้น
 
 ในกรณีที่ต้องการเฉพาะรุ่นปัจจุบัน คุณสามารถใช้ในรูปแบบของลิงก์ เช่น [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]] สำหรับหน้า "[[{{MediaWiki:Mainpage}}]]"',
 'exportall' => 'ส่งออกข้อมูลทุกหน้า',
@@ -2895,7 +2898,7 @@ $1',
 
 # Patrol log
 'patrol-log-page' => 'ปูมการตรวจสอบ',
-'patrol-log-header' => 'หà¸\99à¹\89าà¸\99ีà¹\89à¸\84ือà¸\9aัà¸\99à¸\97ึà¸\81รุ่นการแก้ไขที่กำหนดว่าตรวจสอบแล้ว',
+'patrol-log-header' => 'หà¸\99à¹\89าà¸\99ีà¹\89à¸\84ือà¸\9bูมรุ่นการแก้ไขที่กำหนดว่าตรวจสอบแล้ว',
 'log-show-hide-patrol' => '$1 ปูมการตรวจสอบ',
 
 # Image deletion
index 20d4160..d190e10 100644 (file)
@@ -776,7 +776,7 @@ Tarayıcınızın önbelleğini temizleyene kadar bazı sayfalar sanki hâlâ ot
 'gotaccount' => "Çoktan kayıt oldunuz mu? '''$1'''.",
 'gotaccountlink' => 'Oturum açın',
 'userlogin-resetlink' => 'Giriş bilgilerinizi mi unuttunuz?',
-'createaccountmail' => 'e-posta ile',
+'createaccountmail' => 'Geçici bir rastgele şifre kullan ve şifreyi aşağıda belirtilen e-posta adresine gönder',
 'createaccountreason' => 'Sebep:',
 'badretype' => 'Girdiğiniz şifreler birbirleriyle uyuşmuyor.',
 'userexists' => 'Girdiğiniz kullanıcı adı zaten kullanımda.
@@ -907,6 +907,7 @@ Geçici şifre: $2',
 'changeemail-oldemail' => 'Mevcut E-posta adresi:',
 'changeemail-newemail' => 'Yeni E-posta adresi:',
 'changeemail-none' => '(yok)',
+'changeemail-password' => '{{SITENAME}} parolanız:',
 'changeemail-submit' => "E-posta'yı değiştir",
 'changeemail-cancel' => 'İptal',
 
@@ -1058,9 +1059,10 @@ Ayrıca buraya katkıda bulunarak, bu katkının kendiniz tarafından yazıldı
 Ayrıca bu ekleyeceğiniz yazıyı sizin yazdığınızı ya da serbest kopyalama izni veren bir kaynaktan kopyaladığınızı bize taahhüt etmektesiniz (ayrıntılar için referans: $1).',
 'longpageerror' => "'''Hata: Girdiğiniz metnin uzunluğu kabul edilebilir en fazla uzunluk olan {{PLURAL:$2|bir kilobayt|$2 kilobayt}}tan fazladır ve {{PLURAL:$1|bir kilobayt|$1 kilobayt}} büyüklüğündedir.'''
 Değişikliğiniz kaydedilemez.",
-'readonlywarning' => "'''DİKKAT: Bakım nedeni ile veritabanı şu anda kilitlidir. Bu sebeple değişiklikleriniz şu anda kaydedilememektedir. Yazdıklarınızı başka bir editöre alıp saklayabilir ve daha sonra tekrar buraya getirip kaydedebilirsiniz'''
+'readonlywarning' => "'''Uyarı: Bakım nedeniyle veritabanı şu anda kilitlenmiştir. Bu yüzden şu anda düzenlemelerinizi kaydetmek mümkün değildir.''' 
+Yaptığınız düzenlemeleri daha sonra kaydetmek isterseniz, yaptığınız düzenlemeleri bir metin dosyasına ya da herhangi bir şeye kopyala yapıştır yaparak saklayınız.
 
-Kilitleyen hizmetli şu açıklamayı eklemiştir: $1",
+Kilitlemeyi yapan yetkili şu açıklamayı eklemiştir: $1",
 'protectedpagewarning' => "'''Uyarı: Bu sayfa koruma altına alınmıştır ve yalnızca hizmetli olanlar tarafından değiştirilebilir.'''
 Son günlük girdisi referans amaçlı aşağıda verilmiştir:",
 'semiprotectedpagewarning' => "'''Not:''' Bu sayfa sadece kayıtlı kullanıcı olanlar tarafından değiştirilebilir.
@@ -2218,7 +2220,7 @@ Desteklenen iletişim kuralları: <code>$1</code> (bunların hiçbirini aramanı
 # Special:ActiveUsers
 'activeusers' => 'Aktif kullanıcı listesi',
 'activeusers-intro' => 'Bu, son $1 {{PLURAL:$1|günde|günde}} bir çeşit etkinlik göstermiş kullanıcıların listesidir.',
-'activeusers-count' => 'Son {{PLURAL:$3|günde|$3 günde}} $1 {{PLURAL:$1|değişiklik|değişiklik}}',
+'activeusers-count' => 'Son {{PLURAL:$3|günde|$3 günde}} $1 {{PLURAL:$1|eylem|eylem}}',
 'activeusers-from' => 'Şununla başlayan kullanıcıları görüntüle:',
 'activeusers-hidebots' => 'Botları gizle',
 'activeusers-hidesysops' => 'Yöneticileri gizle',
@@ -2250,8 +2252,8 @@ Bireysel haklarla ilgili [[{{MediaWiki:Listgrouprights-helppage}}|daha fazla bil
 'emailuser-title-target' => 'Bu {{GENDER:$1|kullanıcıya}} e-posta gönder',
 'emailuser-title-notarget' => 'Kullanıcı e-posta',
 'emailpage' => 'Kullanıcıya e-posta gönder',
-'emailpagetext' => 'Bu kullanıcıya e-posta mesajı göndermek için aşağıdaki formu kullanabilirsiniz.
-[[Special:Preferences|Kullanıcı tercihlerinizde]] girdiğiniz e-posta adresiniz, e-postanın "From (Kimden)" adresinde görünecektir, bu yüzden alıcı size direk cevap verebilecektir.',
+'emailpagetext' => 'Bu {{GENDER:$1|kullanıcıya}} e-posta iletisi göndermek için aşağıdaki formu kullanabilirsiniz.
+[[Special:Preferences|Kullanıcı tercihlerinizde]] girdiğiniz e-posta adresiniz, e-postanın "From (Kimden)" adresinde görünecektir, bu yüzden alıcı size doğrudan yanıt verebilecektir.',
 'usermailererror' => 'E-posta hizmeti hata verdi:',
 'defemailsubject' => '"$1" kullanıcısından {{SITENAME}} e-postası',
 'usermaildisabled' => 'Kullanıcı e-postası devre dışı',
@@ -2281,7 +2283,7 @@ Bireysel haklarla ilgili [[{{MediaWiki:Listgrouprights-helppage}}|daha fazla bil
 'usermessage-editor' => 'Sistem habercisi',
 
 # Watchlist
-'watchlist' => 'İzleme listem',
+'watchlist' => 'İzleme listesi',
 'mywatchlist' => 'İzleme listesi',
 'watchlistfor2' => '$1 için $2',
 'nowatchlist' => 'İzleme listesinde hiçbir madde bulunmuyor.',
@@ -2289,13 +2291,8 @@ Bireysel haklarla ilgili [[{{MediaWiki:Listgrouprights-helppage}}|daha fazla bil
 'watchnologin' => 'Oturum açık değil.',
 'watchnologintext' => 'İzleme listenizi değiştirebilmek için [[Special:UserLogin|oturum açmalısınız]].',
 'addwatch' => 'İzleme listesine ekle',
-'addedwatchtext' => '"<nowiki>$1</nowiki>" adlı sayfa [[Special:Watchlist|izleme listenize]] kaydedildi.
-
-Gelecekte, bu sayfaya ve ilgili tartışma sayfasına yapılacak değişiklikler burada listelenecektir.
-
-Kolayca seçilebilmeleri için de [[Special:RecentChanges|son değişiklikler listesi]] başlığı altında koyu harflerle listeleneceklerdir.
-
-Sayfayı izleme listenizden çıkarmak istediğinizde "sayfayı izlemeyi durdur" bağlantısına tıklayabilirsiniz.',
+'addedwatchtext' => '"[[:$1]]" sayfası [[Special:Watchlist|izleme listenize]] eklenmiştir.
+Bundan sonra, bu sayfaya ve ilgili tartışma sayfasına yapılacak değişiklikler burada listelenecek.',
 'removewatch' => 'İzleme listesinden kaldır',
 'removedwatchtext' => '"[[:$1]]" sayfası [[Special:Watchlist|izleme listenizden]] silinmiştir.',
 'watch' => 'İzle',
@@ -2324,30 +2321,41 @@ Sayfayı izleme listenizden çıkarmak istediğinizde "sayfayı izlemeyi durdur"
 'enotif_mailer' => '{{SITENAME}} Bildirim Postası',
 'enotif_reset' => 'Tüm sayfaları ziyaret edilmiş olarak işaretle',
 'enotif_impersonal_salutation' => '{{SITENAME}} kullanıcı',
+'enotif_subject_deleted' => '{{SITENAME}} sayfası $1, $2 tarafından {{GENDER:$2|silindi}}.',
+'enotif_subject_created' => '{{SITENAME}} sayfası $1, $2 tarafından {{GENDER:$2|açıldı}}.',
+'enotif_subject_moved' => '{{SITENAME}} sayfası $1, $2 tarafından {{GENDER:$2|taşındı}}.',
+'enotif_subject_restored' => '{{SITENAME}} sayfası $1, $2 tarafından {{GENDER:$2|geri getirildi}}.',
+'enotif_subject_changed' => '{{SITENAME}} sayfası $1, $2 tarafından {{GENDER:$2|değiştirildi}}.',
+'enotif_body_intro_deleted' => '{{SITENAME}} sayfası $1, $2 tarafından $PAGEEDITDATE tarihinde {{GENDER:$2|silindi}}, bakınız: $3.',
+'enotif_body_intro_created' => '{{SITENAME}} sayfası $1, $2 tarafından $PAGEEDITDATE tarihinde {{GENDER:$2|açıldı}}, mevcut revizyon için bakınız: $3.',
+'enotif_body_intro_moved' => '{{SITENAME}} sayfası $1, $2 tarafından $PAGEEDITDATE tarihinde {{GENDER:$2|taşındı}}, mevcut revizyon için bakınız: $3.',
+'enotif_body_intro_restored' => '{{SITENAME}} sayfası $1, $2 tarafından $PAGEEDITDATE tarihinde {{GENDER:$2|geri getirildi}}, mevcut revizyon için bakınız: $3.',
+'enotif_body_intro_changed' => '{{SITENAME}} sayfası $1, $2 tarafından $PAGEEDITDATE tarihinde {{GENDER:$2|değiştirildi}}, mevcut revizyon için bakınız: $3.',
 'enotif_lastvisited' => "Son ziyaretinizden bu yana olan tüm değişiklikleri görmek için $1'e bakın.",
 'enotif_lastdiff' => 'Bu değişikliği görmek için, $1 sayfasına bakınız.',
 'enotif_anon_editor' => 'anonim kullanıcı $1',
 'enotif_body' => 'Sayın $WATCHINGUSERNAME,
 
-{{SITENAME}} bünyesindeki $PAGETITLE başlıklı sayfa $PAGEEDITDATE tarihinde $PAGEEDITOR tarafından $CHANGEDORCREATED. Sayfanın son haline $PAGETITLE_URL adresinden ulaşabilirsiniz.
+$PAGEINTRO $NEWPAGE
 
-$NEWPAGE
+Editörün girdiği özet: $PAGESUMMARY $PAGEMINOREDIT
 
-Değişikliği yapan kullanıcının açıklaması: $PAGESUMMARY $PAGEMINOREDIT
+Editörün iletişim bilgileri:
+e-posta: $PAGEEDITOR_EMAIL
+viki: $PAGEEDITOR_WIKI
 
-Sayfayı değiştiren kullanıcıya erişim bilgileri:
-E-posta: $PAGEEDITOR_EMAIL
-Viki: $PAGEEDITOR_WIKI
+Bahsi geçen sayfayı ziyaret edinceye kadar sayfayla ilgili başka bildirim gönderilmeyecektir. Ayrıca izleme listenizdeki tüm sayfaların bildirim durumlarını sıfırlayabilirsiniz.
 
-Bahsi geçen sayfayı ziyaret edinceye kadar sayfayla ilgili başka değişiklik bildirimi gönderilmeyecektir. İzleme listenizdeki tüm sayfalar bildirim durumlarını sıfırlayabilirsiniz.
-
-              {{SITENAME}} sitesinin uyarı sistemi.
+{{SITENAME}} bildirim sistemi
 
 --
-İzleme listesi ayarlarınızı değiştirmek için:
+E-posta bildirim ayarlarınızı değiştirmek için aşağıdaki sayfayı ziyaret ediniz:
+{{canonicalurl:{{#special:Preferences}}}}
+
+İzleme listesi ayarlarınızı değiştirmek için aşağıdaki sayfayı ziyaret ediniz:
 {{canonicalurl:{{#special:EditWatchlist}}}}
 
-Sayfayı izleme listenizden silmek için:
+Sayfayı izleme listenizden silmek için aşağıdaki sayfayı ziyaret ediniz:
 $UNWATCHURL
 
 Geri bildirim ve daha fazla yardım için:
@@ -2393,6 +2401,7 @@ dikkatle devam edin.',
 'rollback' => 'değişiklikleri geri al',
 'rollback_short' => 'geri al',
 'rollbacklink' => 'geridöndür',
+'rollbacklinkcount' => '$1 {{PLURAL:$1|değişikliği|değişikliği}} geri döndür',
 'rollbackfailed' => 'geri alma işlemi başarısız',
 'cantrollback' => 'Sayfaya son katkıda bulunan kullanıcı, sayfaya katkıda bulunmuş tek kişi olduğu için, değişiklikler geri alınamıyor.',
 'alreadyrolled' => '[[User:$2|$2]] ([[User talk:$2|Talk]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) tarafından [[:$1]] sayfasında yapılmış son değişiklik geriye alınamıyor;
@@ -2440,8 +2449,8 @@ Lütfen "geri" gidin ve geldiğiniz sayfayı yeniden yükleyin, sonra tekrar den
 Bu sayfanın koruma seviyesini değiştirebilirsiniz; ancak bu kademeli korumaya etki etmeyecektir.',
 'protect-default' => 'Tüm kullanıcılara izin ver',
 'protect-fallback' => '"$1" izni gerektir',
-'protect-level-autoconfirmed' => 'Yeni ve kayıtlı olmayan kullanıcıları engelle',
-'protect-level-sysop' => 'sadece hizmetliler',
+'protect-level-autoconfirmed' => 'Yalnızca otomatik onaylanmış kullanıcılara izin verilir',
+'protect-level-sysop' => 'Yalnızca hizmetlilere izin verilir',
 'protect-summary-cascade' => 'kademeli',
 'protect-expiring' => 'bitiş tarihi $1 (UTC)',
 'protect-expiring-local' => '$1 tarihinde bitiyor',
@@ -2920,6 +2929,8 @@ Geçici dosya kayıp.',
 # JavaScriptTest
 'javascripttest' => 'JavaScript denemesi',
 'javascripttest-title' => '$1 testleri çalışıyor',
+'javascripttest-qunit-intro' => 'mediawiki.org üzerinden [$1 deneme belgelerine] bakınız.',
+'javascripttest-qunit-heading' => 'MediaWiki JavaScript QUnit deneme paketi',
 
 # Tooltip help for the actions
 'tooltip-pt-userpage' => 'Kullanıcı sayfanız',
@@ -3059,6 +3070,8 @@ Geçici dosya kayıp.',
 'pageinfo-protect-cascading-from' => 'Korumalar üzerinden geçiş',
 'pageinfo-category-info' => 'Kategori bilgileri',
 'pageinfo-category-pages' => 'Sayfa sayısı',
+'pageinfo-category-subcats' => 'Alt kategori sayısı',
+'pageinfo-category-files' => 'Dosya sayısı',
 
 # Skin names
 'skinname-standard' => 'Klasik',
@@ -3109,6 +3122,7 @@ Bunu çalıştırmak, sisteminizi tehlikeye atabilir.",
 'file-info-size-pages' => '$1 × $2 piksel, dosya boyutu: $3, MIME tipi: $4, $5 {{PLURAL:$5|sayfa|sayfa}}',
 'file-nohires' => 'Daha yüksek çözünürlük yok.',
 'svg-long-desc' => 'SVG dosyası, sözde $1 × $2 piksel, dosya boyutu: $3',
+'svg-long-desc-animated' => 'Hareketli SVG dosyası, sözde $1 × $2 piksel, dosya boyutu: $3',
 'svg-long-error' => 'Geçersiz SVG dosyası: $1',
 'show-big-image' => 'Tam çözünürlük',
 'show-big-image-preview' => 'Ön izleme boyutu: $1.',
@@ -3141,6 +3155,8 @@ Bunu çalıştırmak, sisteminizi tehlikeye atabilir.",
 'minutes' => '{{PLURAL:$1|$1 dakika|$1 dakika}}',
 'hours' => '{{PLURAL:$1|$1 saat|$1 saat}}',
 'days' => '{{PLURAL:$1|$1 gün|$1 gün}}',
+'months' => '{{PLURAL:$1|$1 ay|$1 ay}}',
+'years' => '{{PLURAL:$1|$1 yıl|$1 yıl}}',
 'ago' => '$1 önce',
 'just-now' => 'Hemen şimdi',
 
@@ -3297,6 +3313,7 @@ Diğerleri varsayılan olarak gizlenecektir.
 'exif-worldregiondest' => 'Gösterilen bölge',
 'exif-countrydest' => 'Gösterilen ülke',
 'exif-countrycodedest' => 'Gösterilen ülke kodu',
+'exif-provinceorstatedest' => 'Gösterilen il ya da devlet/eyalet',
 'exif-citydest' => 'Gösterilen Şehir',
 'exif-objectname' => 'Kısa başlık',
 'exif-specialinstructions' => 'Özel talimatlar',
@@ -3805,7 +3822,7 @@ Resimler tam çözünürlükte görüntülenir, diğer dosya tipleri ilgili prog
 'specialpages-group-highuse' => 'Çok kullanılan sayfalar',
 'specialpages-group-pages' => 'Sayfaların listeleri',
 'specialpages-group-pagetools' => 'Sayfa araçları',
-'specialpages-group-wiki' => 'Viki bilgiler ve araçlar',
+'specialpages-group-wiki' => 'Veri ve araçlar',
 'specialpages-group-redirects' => 'Yönlendirmeli özel sayfalar',
 'specialpages-group-spam' => 'Spam araçları',
 
index ce69a2b..152b92d 100644 (file)
@@ -9,6 +9,7 @@
  *
  * @author Alfredie
  * @author Arlin
+ * @author Calak
  * @author Kaganer
  * @author Reedy
  * @author Sahran
index 06ac565..06926bf 100644 (file)
@@ -2860,7 +2860,7 @@ $1',
 Якщо ви цього не зробите, будь ласка, перевірте наявність [[Special:DoubleRedirects|подвійних]] чи [[Special:BrokenRedirects|розірваних]] перенаправлень.
 Ви відповідаєте за те, щоб посилання і надалі вказували туди, куди припускалося.
 
\97веÑ\80нÑ\96Ñ\82Ñ\8c Ñ\83вагÑ\83, Ñ\89о Ñ\81Ñ\82оÑ\80Ñ\96нка '''не''' Ð±Ñ\83де Ð¿ÐµÑ\80ейменована, Ñ\8fкÑ\89о Ñ\81Ñ\82оÑ\80Ñ\96нка Ð· Ð½Ð¾Ð²Ð¾Ñ\8e Ð½Ð°Ð·Ð²Ð¾Ñ\8e Ð²Ð¶Ðµ Ñ\96Ñ\81нÑ\83Ñ\94, Ð¾ÐºÑ\80Ñ\96м Ð²Ð¸Ð¿Ð°Ð´ÐºÑ\96в, ÐºÐ¾Ð»Ð¸ Ð²Ð¾Ð½Ð° порожня або є перенаправленням, а журнал її редагувань порожній.
\97веÑ\80нÑ\96Ñ\82Ñ\8c Ñ\83вагÑ\83, Ñ\89о Ñ\81Ñ\82оÑ\80Ñ\96нка '''не''' Ð±Ñ\83де Ð¿ÐµÑ\80ейменована, Ñ\8fкÑ\89о Ñ\81Ñ\82оÑ\80Ñ\96нка Ð· Ð½Ð¾Ð²Ð¾Ñ\8e Ð½Ð°Ð·Ð²Ð¾Ñ\8e Ð²Ð¶Ðµ Ñ\96Ñ\81нÑ\83Ñ\94, Ð¾ÐºÑ\80Ñ\96м Ð²Ð¸Ð¿Ð°Ð´ÐºÑ\96в, ÐºÐ¾Ð»Ð¸ Ð¾Ñ\81Ñ\82аннÑ\8f порожня або є перенаправленням, а журнал її редагувань порожній.
 Це означає, що ви можете повернути сторінці стару назву, якщо ви перейменували її помилково, але ви не можете затерти існуючу сторінку.
 
 '''ПОПЕРЕДЖЕННЯ!'''
index 3775fa6..e70a72e 100644 (file)
@@ -518,7 +518,7 @@ $1',
 'youhavenewmessages' => '您有$1($2)。',
 'newmessageslink' => '新訊息',
 'newmessagesdifflink' => '最後更改',
-'youhavenewmessagesfromusers' => '你有來自{{PLURAL:$3| 另一位用戶| $3位用戶}}的$1 ( $2 )。',
+'youhavenewmessagesfromusers' => '你有來自{{PLURAL:$3|另一位用戶|$3位用戶}}的$1($2)。',
 'youhavenewmessagesmanyusers' => '你有來自多位用戶的$1( $2 )。',
 'newmessageslinkplural' => '{{PLURAL:$1|一項新訊息|新訊息}}',
 'newmessagesdifflinkplural' => '最新{{PLURAL:$1|更改|更改}}',
@@ -2674,10 +2674,8 @@ $1被封禁的理由是“$2”',
 如果您選擇不去做的話,請檢查[[Special:DoubleRedirects|雙重]]或[[Special:BrokenRedirects|損壞重定向]]連結。
 您應當負責確定所有連結依然會連到指定的頁面。
 
-注意如果新頁面已經有內容的話,頁面將'''不會'''被移動,
-除非新頁面是重定向頁,而且沒有修訂歷史。
-這意味著您再必要時可以在移動到新頁面後再移回老的頁面,
-同時您也無法覆蓋現有頁面。
+注意如果新頁面已經有內容的話,頁面將'''不會'''被移動,除非新頁面是重定向頁,而且沒有修訂歷史。
+這意味著您再必要時可以在移動到新頁面後再移回老的頁面,同時您也無法覆蓋現有頁面。
 
 '''警告!'''
 對一個經常被訪問的頁面而言這可能是一個重大與唐突的更改;
index c320695..b2bbf9b 100644 (file)
@@ -342,7 +342,7 @@ abstract class Maintenance {
         */
        protected function error( $err, $die = 0 ) {
                $this->outputChanneled( false );
-               if ( php_sapi_name() == 'cli' ) {
+               if ( PHP_SAPI == 'cli' ) {
                        fwrite( STDERR, $err . "\n" );
                } else {
                        print $err;
@@ -920,7 +920,7 @@ abstract class Maintenance {
                if ( !is_readable( $settingsFile ) ) {
                        $this->error( "A copy of your installation's LocalSettings.php\n" .
                                                "must exist and be readable in the source directory.\n" .
-                                               "Use --conf to specify it." , true );
+                                               "Use --conf to specify it.", true );
                }
                $wgCommandLineMode = true;
                return $settingsFile;
index 0e12a1c..cc0a7e1 100644 (file)
@@ -48,9 +48,9 @@ class BaseDump {
        var $infiles = null;
 
        function BaseDump( $infile ) {
-               $this->infiles = explode(';',$infile);
+               $this->infiles = explode( ';', $infile );
                $this->reader = new XMLReader();
-               $infile = array_shift($this->infiles);
+               $infile = array_shift( $this->infiles );
                if (defined( 'LIBXML_PARSEHUGE' ) ) {
                        $this->reader->open( $infile, null, LIBXML_PARSEHUGE );
                }
index f276fc1..861610b 100644 (file)
@@ -46,7 +46,7 @@ class ChangePassword extends Maintenance {
                } elseif ( $this->hasOption( "userid" ) ) {
                        $user = User::newFromId( $this->getOption( 'userid' ) );
                } else {
-                       $this->error( "A \"user\" or \"userid\" must be set to change the password for" , true );
+                       $this->error( "A \"user\" or \"userid\" must be set to change the password for", true );
                }
                if ( !$user || !$user->getId() ) {
                        $this->error( "No such user: " . $this->getOption( 'user' ), true );
index ac96f45..1d5070b 100644 (file)
@@ -21,7 +21,7 @@
  * @file
  */
 
-if ( php_sapi_name() != 'cli-server' ) {
+if ( PHP_SAPI != 'cli-server' ) {
        die( "This script can only be run by php's cli-server sapi." );
 }
 
index 3ad0864..3df1169 100644 (file)
@@ -51,7 +51,7 @@ class DatabaseLag extends Maintenance {
                                unset( $lags[0] );
                                echo gmdate( 'H:i:s' ) . ' ';
                                foreach ( $lags as $lag ) {
-                                       printf( "%-12s " , $lag === false ? 'false' : $lag );
+                                       printf( "%-12s ", $lag === false ? 'false' : $lag );
                                }
                                echo "\n";
                                sleep( 5 );
@@ -61,7 +61,7 @@ class DatabaseLag extends Maintenance {
                        $lags = $lb->getLagTimes();
                        foreach ( $lags as $i => $lag ) {
                                $name = $lb->getServerName( $i );
-                               $this->output( sprintf( "%-20s %s\n" , $name, $lag === false ? 'false' : $lag ) );
+                               $this->output( sprintf( "%-20s %s\n", $name, $lag === false ? 'false' : $lag ) );
                        }
                }
        }
index b1c16ad..420e842 100644 (file)
@@ -508,7 +508,7 @@ class languages {
 
 
                        if ( isset( $messages[$key] ) ) {
-                               $messages[$key] = implode( $messages[$key],", " );
+                               $messages[$key] = implode( $messages[$key], ", " );
                        }
                }
                return $messages;
index 0ba9bfe..01fbac7 100644 (file)
@@ -23,7 +23,7 @@
  * @ingroup LockManager Maintenance
  */
 
-if ( php_sapi_name() !== 'cli' ) {
+if ( PHP_SAPI !== 'cli' ) {
        die( "This is not a valid entry point.\n" );
 }
 error_reporting( E_ALL );
index 6e01291..5e505eb 100644 (file)
@@ -43,7 +43,7 @@
 # Variables / Configuration
 #
 
-if ( php_sapi_name() != 'cli' ) {
+if ( PHP_SAPI != 'cli' ) {
        echo 'Run "' . __FILE__ . '" from the command line.';
        die( -1 );
 }
@@ -131,7 +131,7 @@ function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath,
        );
        $tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template );
        $tmpFileName = tempnam( wfTempDir(), 'mwdocgen-' );
-       file_put_contents( $tmpFileName , $tmpCfg ) or die( "Could not write doxygen configuration to file $tmpFileName\n" );
+       file_put_contents( $tmpFileName, $tmpCfg ) or die( "Could not write doxygen configuration to file $tmpFileName\n" );
 
        return $tmpFileName;
 }
index 032d6f9..fc38938 100644 (file)
@@ -48,6 +48,9 @@ class nextJobDB extends Maintenance {
                        $types = JobQueueGroup::singleton()->getDefaultQueueTypes();
                }
 
+               // Handle any required periodic queue maintenance
+               $this->executeReadyPeriodicTasks();
+
                $memcKey = 'jobqueue:dbs:v3';
                $pendingDbInfo = $wgMemc->get( $memcKey );
 
@@ -156,14 +159,36 @@ class nextJobDB extends Maintenance {
 
                $pendingDBs = array(); // (job type => (db list))
                foreach ( $wgLocalDatabases as $db ) {
-                       $types = JobQueueGroup::singleton( $db )->getQueuesWithJobs();
-                       foreach ( $types as $type ) {
+                       foreach ( JobQueueGroup::singleton( $db )->getQueuesWithJobs() as $type ) {
                                $pendingDBs[$type][] = $db;
                        }
                }
 
                return $pendingDBs;
        }
+
+       /**
+        * Do all ready periodic jobs for all databases every 5 minutes (and .1% of the time)
+        * @return integer
+        */
+       private function executeReadyPeriodicTasks() {
+               global $wgLocalDatabases, $wgMemc;
+
+               $count = 0;
+               $memcKey = 'jobqueue:periodic:lasttime';
+               $timestamp = (int)$wgMemc->get( $memcKey ); // UNIX timestamp or 0
+               if ( ( time() - $timestamp ) > 300 || mt_rand( 0, 999 ) == 0 ) { // 5 minutes
+                       if ( $wgMemc->add( "$memcKey:rebuild", 1, 1800 ) ) { // lock
+                               foreach ( $wgLocalDatabases as $db ) {
+                                       $count += JobQueueGroup::singleton( $db )->executeReadyPeriodicTasks();
+                               }
+                               $wgMemc->set( $memcKey, time() );
+                               $wgMemc->delete( "$memcKey:rebuild" ); // unlock
+                       }
+               }
+
+               return $count;
+       }
 }
 
 $maintClass = "nextJobDb";
index 10892c4..2ccf703 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup Maintenance
  */
 
-if( php_sapi_name() != 'cli' ) {
+if( PHP_SAPI != 'cli' ) {
        die( 1 );
 }
 
index 58fe880..850d032 100644 (file)
@@ -32,7 +32,7 @@ class PurgeList extends Maintenance {
        public function __construct() {
                parent::__construct();
                $this->mDescription = "Send purge requests for listed pages to squid";
-               $this->addOption( 'purge', 'Whether to update page_touched.' , false, false );
+               $this->addOption( 'purge', 'Whether to update page_touched.', false, false );
                $this->addOption( 'namespace', 'Namespace number', false, true );
                $this->setBatchSize( 100 );
        }
index 12da7a8..55f5b4a 100644 (file)
@@ -53,7 +53,7 @@ class RefreshImageMetadata extends Maintenance {
                $this->addOption( 'start', 'Name of file to start with', false, true );
                $this->addOption( 'end', 'Name of file to end with', false, true );
 
-               $this->addOption( 'mime', '(Inefficient!) Only refresh files with this mime type. Can accept wild-card image/*' , false, true );
+               $this->addOption( 'mime', '(Inefficient!) Only refresh files with this mime type. Can accept wild-card image/*', false, true );
                $this->addOption( 'metadata-contains', '(Inefficient!) Only refresh files where the img_metadata field contains this string. Can be used if its known a specific property was being extracted incorrectly.', false, true );
 
        }
index 0cf0217..a78acd5 100644 (file)
@@ -76,6 +76,12 @@ class RunJobs extends Maintenance {
                $n = 0;
 
                $group = JobQueueGroup::singleton();
+               // Handle any required periodic queue maintenance
+               $count = $group->executeReadyPeriodicTasks();
+               if ( $count > 0 ) {
+                       $this->runJobsLog( "Executed $count periodic queue task(s)." );
+               }
+
                do {
                        $job = ( $type === false )
                                ? $group->pop( JobQueueGroup::TYPE_DEFAULT, JobQueueGroup::USE_CACHE )
index 657c056..3036406 100644 (file)
@@ -59,7 +59,7 @@ class ShowStats extends Maintenance {
                $max_length_value = $max_length_desc = 0;
                foreach ( $fields as $field => $desc ) {
                        $max_length_value = max( $max_length_value, strlen( $stats->$field ) );
-                       $max_length_desc  = max( $max_length_desc , strlen( $desc ) ) ;
+                       $max_length_desc  = max( $max_length_desc strlen( $desc ) ) ;
                }
 
                // Show them
index 95f028a..4e8a1a2 100644 (file)
@@ -65,7 +65,7 @@ print Xml::element( 'Image',
                'height' => 16,
                'width' => 16,
                'type' => 'image/x-icon' ),
-       wfExpandUrl( $wgFavicon , PROTO_CURRENT ) );
+       wfExpandUrl( $wgFavicon, PROTO_CURRENT ) );
 
 $urls = array();
 
index cbbf2ab..885a9e9 100644 (file)
@@ -221,9 +221,9 @@ class profile_point {
                <td class="mw-profileinfo-count"><?php echo $this->count(); ?></td>
                <td class="mw-profileinfo-cpr"><?php echo round( sprintf( '%.2f', $this->callsPerRequest() ), 2 ); ?></td>
                <td class="mw-profileinfo-tpc"><?php echo round( sprintf( '%.2f', $this->timePerCall() ), 2 ); ?></td>
-               <td class="mw-profileinfo-mpc"><?php echo round( sprintf( '%.2f' ,$this->memoryPerCall() / 1024 ), 2 ); ?></td>
+               <td class="mw-profileinfo-mpc"><?php echo round( sprintf( '%.2f'$this->memoryPerCall() / 1024 ), 2 ); ?></td>
                <td class="mw-profileinfo-tpr"><?php echo @round( sprintf( '%.2f', $this->time() / self::$totalcount ), 2 ); ?></td>
-               <td class="mw-profileinfo-mpr"><?php echo @round( sprintf( '%.2f' ,$this->memory() / self::$totalcount / 1024 ), 2 ); ?></td>
+               <td class="mw-profileinfo-mpr"><?php echo @round( sprintf( '%.2f'$this->memory() / self::$totalcount / 1024 ), 2 ); ?></td>
                </tr>
                <?php
                if ( $ex ) {
index 6297f9a..8320304 100644 (file)
@@ -86,7 +86,7 @@
                return false;
        }
 
-       function getElementText( node ) {
+       function getElementSortKey( node ) {
                var $node = $( node ),
                        // Use data-sort-value attribute.
                        // Use data() instead of attr() so that live value changes
                        // like charAt, toLowerCase and split are expected.
                        return String( data );
                } else {
-                       return $node.text();
+                       if ( node.tagName.toLowerCase() === 'img' ) {
+                               return $node.attr( 'alt' ) || ''; // handle undefined alt
+                       } else {
+                               return $.map( $.makeArray( node.childNodes ), function( elem ) {
+                                       // 1 is for document.ELEMENT_NODE (the constant is undefined on old browsers)
+                                       if ( elem.nodeType === 1 ) {
+                                               return getElementSortKey( elem );
+                                       } else {
+                                               return $.text( elem );
+                                       }
+                               } ).join( '' );
+                       }
                }
        }
 
        function getTextFromRowAndCellIndex( rows, rowIndex, cellIndex ) {
                if ( rows[rowIndex] && rows[rowIndex].cells[cellIndex] ) {
-                       return $.trim( getElementText( rows[rowIndex].cells[cellIndex] ) );
+                       return $.trim( getElementSortKey( rows[rowIndex].cells[cellIndex] ) );
                } else {
                        return '';
                }
                        cache.row.push( $row );
 
                        for ( var j = 0; j < totalCells; ++j ) {
-                               cols.push( parsers[j].format( getElementText( $row[0].cells[j] ), table, $row[0].cells[j] ) );
+                               cols.push( parsers[j].format( getElementSortKey( $row[0].cells[j] ), table, $row[0].cells[j] ) );
                        }
 
                        cols.push( cache.normalized.length ); // add position for rowCache
diff --git a/skins/vector/images/border.png b/skins/vector/images/border.png
deleted file mode 100644 (file)
index f9ca8cc..0000000
Binary files a/skins/vector/images/border.png and /dev/null differ
diff --git a/skins/vector/images/page-base.png b/skins/vector/images/page-base.png
deleted file mode 100644 (file)
index b3ecd30..0000000
Binary files a/skins/vector/images/page-base.png and /dev/null differ
diff --git a/skins/vector/images/preferences-base.png b/skins/vector/images/preferences-base.png
deleted file mode 100644 (file)
index 8e0082b..0000000
Binary files a/skins/vector/images/preferences-base.png and /dev/null differ
diff --git a/skins/vector/images/preferences-edge.png b/skins/vector/images/preferences-edge.png
deleted file mode 100644 (file)
index 411a1aa..0000000
Binary files a/skins/vector/images/preferences-edge.png and /dev/null differ
index 26967a5..2e09ee1 100644 (file)
@@ -21,18 +21,17 @@ body {
        font-size: 1em;
 }
 body {
-       background-color: #f3f3f3;
-       /* @embed */
-       background-image: url(images/page-base.png);
+       background-color: #f6f6f6;
 }
 /* Content */
 div#content {
        margin-left: 10em;
        padding: 1em;
-       /* @embed */
-       background-image: url(images/border.png);
-       background-position: top left;
-       background-repeat: repeat-y;
+       /* Border on top, left, and bottom side */
+       border: 1px solid #a7d7f9;
+       border-right-width: 0;
+       /* Merge the border with tabs' one (in their background image) */
+       margin-top: -1px;
        background-color: white;
        color: black;
        direction: ltr;
@@ -55,10 +54,6 @@ div#content {
        margin-top: -5em;
        margin-left: 10em;
        height: 5em;
-       /* @embed */
-       background-image: url(images/border.png);
-       background-position: bottom left;
-       background-repeat: repeat-x;
 }
 div#mw-head {
        position: absolute;
@@ -528,10 +523,6 @@ div#footer {
        margin-left: 10em;
        margin-top: 0;
        padding: 0.75em;
-       /* @embed */
-       background-image: url(images/border.png);
-       background-position: top left;
-       background-repeat: repeat-x;
        direction: ltr;
 }
 div#footer ul {
@@ -654,9 +645,7 @@ div#footer #footer-places li {
        margin-top: -2px;
        clear: both;
        border: solid 1px #ccc;
-       background-color: #f9f9f9;
-       /* @embed */
-       background-image: url(images/preferences-base.png);
+       background-color: #fafafa;
 }
 #preferences fieldset {
        border: none;
index c25f158..1f84aae 100644 (file)
@@ -11806,17 +11806,6 @@ Multibyte character in padright
 </p>
 !! end
 
-!! test
-Formatted date
-!! config
-wgUseDynamicDates=1
-!! input
-[[2009-03-24]]
-!! result
-<p><span class="mw-formatted-date" title="2009-03-24"><a href="/index.php?title=2009&amp;action=edit&amp;redlink=1" class="new" title="2009 (page does not exist)">2009</a>-<a href="/index.php?title=March_24&amp;action=edit&amp;redlink=1" class="new" title="March 24 (page does not exist)">03-24</a></span>
-</p>
-!!end
-
 !!test
 formatdate parser function
 !!input
@@ -11835,17 +11824,6 @@ formatdate parser function, with default format
 </p>
 !! end
 
-!! test
-Linked date with autoformatting disabled
-!! config
-wgUseDynamicDates=false
-!! input
-[[2009-03-24]]
-!! result
-<p><a href="/index.php?title=2009-03-24&amp;action=edit&amp;redlink=1" class="new" title="2009-03-24 (page does not exist)">2009-03-24</a>
-</p>
-!! end
-
 !! test
 Spacing of numbers in formatted dates
 !! input
@@ -11855,17 +11833,6 @@ Spacing of numbers in formatted dates
 </p>
 !! end
 
-!! test
-Spacing of numbers in formatted dates (linked)
-!! config
-wgUseDynamicDates=true
-!! input
-[[January 15]]
-!! result
-<p><span class="mw-formatted-date" title="01-15"><a href="/index.php?title=January_15&amp;action=edit&amp;redlink=1" class="new" title="January 15 (page does not exist)">January 15</a></span>
-</p>
-!! end
-
 !! test
 formatdate parser function, with default format and on a page of which the content language is always English and different from the wiki content language
 !! options
diff --git a/tests/parser/preprocess/NestedTemplates.expected b/tests/parser/preprocess/NestedTemplates.expected
new file mode 100644 (file)
index 0000000..645626d
--- /dev/null
@@ -0,0 +1,90 @@
+<root><template><title>vorlage</title></template>
+
+<tplarg lineStart="1"><title>argument</title></tplarg>
+
+Nach [[:meta:Help:Expansion#XML parse tree]]
+{<tplarg><title>vorlagenname</title></tplarg>}
+<template lineStart="1"><title> <template><title>vorlagenname</title></template></title></template>
+<template lineStart="1"><title><template><title>vorlagenname</title></template> </title></template>
+<template lineStart="1"><title><template><title>vorlagenname</title></template>erweiterung</title></template>
+
+<template lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg></title></template>
+<tplarg lineStart="1"><title> <template><title>vorlagenname</title></template></title></tplarg>
+<template lineStart="1"><title> <tplarg><title>vorlagenname</title></tplarg></title></template>
+<tplarg lineStart="1"><title><template><title>vorlagenname</title></template> </title></tplarg>
+<template lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg> </title></template>
+
+nur etwas erweitert
+<tplarg lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg></title></tplarg>
+<tplarg lineStart="1"><title> <tplarg><title>vorlagenname</title></tplarg></title></tplarg>
+<tplarg lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg> </title></tplarg>
+<template lineStart="1"><title> {<tplarg><title>vorlagenname</title></tplarg></title></template>}
+{<tplarg><title> <template><title>vorlagenname</title></template></title></tplarg>}
+<template lineStart="1"><title> <template><title> <template><title>vorlagenname</title></template></title></template></title></template>
+{<tplarg><title> <template><title>vorlagenname</title></template>} </title></tplarg>
+{<template><title><tplarg><title>vorlagenname</title></tplarg>} </title></template>
+{<tplarg><title><template><title>vorlagenname</title></template> </title></tplarg>}
+<template lineStart="1"><title> <template><title><template><title>vorlagenname</title></template> </title></template></title></template>
+<tplarg lineStart="1"><title> {<template><title>vorlagenname</title></template> </title></tplarg>}
+
+{<tplarg><title><tplarg><title> </title></tplarg></title></tplarg>}
+
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg></title></tplarg></title></template>
+<tplarg lineStart="1"><title><tplarg><title><template><title> </title></template> </title></tplarg></title></tplarg>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg> </title></tplarg></title></template>
+{{<tplarg><title><tplarg><title> </title></tplarg>} </title></tplarg>}
+<tplarg lineStart="1"><title><template><title><tplarg><title> </title></tplarg></title></template> </title></tplarg>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg></title></tplarg> </title></template>
+{<tplarg><title><template><title><template><title> </title></template> </title></template> </title></tplarg>}
+{<template><title><tplarg><title><template><title> </title></template> </title></tplarg>} </title></template>
+{<template><title><template><title><tplarg><title> </title></tplarg>} </title></template> </title></template>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg> </title></tplarg> </title></template>
+<tplarg lineStart="1"><title><template><title><tplarg><title> </title></tplarg> </title></template> </title></tplarg>
+<tplarg lineStart="1"><title><tplarg><title><template><title> </title></template> </title></tplarg> </title></tplarg>
+<template lineStart="1"><title><template><title><template><title><template><title> </title></template> </title></template> </title></template> </title></template>
+
+<template lineStart="1"><title>vorlage</title></template>
+
+<tplarg lineStart="1"><title>argument</title></tplarg>
+
+Nach [[:meta:Help:Expansion#XML parse tree]]
+{<tplarg><title>vorlagenname</title></tplarg>}
+<template lineStart="1"><title> <template><title>vorlagenname</title></template></title></template>
+<template lineStart="1"><title><template><title>vorlagenname</title></template> </title></template>
+<template lineStart="1"><title><template><title>vorlagenname</title></template>erweiterung</title></template>
+
+<template lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg></title></template>
+<tplarg lineStart="1"><title> <template><title>vorlagenname</title></template></title></tplarg>
+<template lineStart="1"><title> <tplarg><title>vorlagenname</title></tplarg></title></template>
+<tplarg lineStart="1"><title><template><title>vorlagenname</title></template> </title></tplarg>
+<template lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg> </title></template>
+
+nur etwas erweitert
+<tplarg lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg></title></tplarg>
+<tplarg lineStart="1"><title> <tplarg><title>vorlagenname</title></tplarg></title></tplarg>
+<tplarg lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg> </title></tplarg>
+<template lineStart="1"><title> {<tplarg><title>vorlagenname</title></tplarg></title></template>}
+{<tplarg><title> <template><title>vorlagenname</title></template></title></tplarg>}
+<template lineStart="1"><title> <template><title> <template><title>vorlagenname</title></template></title></template></title></template>
+{<tplarg><title> <template><title>vorlagenname</title></template>} </title></tplarg>
+{<template><title><tplarg><title>vorlagenname</title></tplarg>} </title></template>
+{<tplarg><title><template><title>vorlagenname</title></template> </title></tplarg>}
+<template lineStart="1"><title> <template><title><template><title>vorlagenname</title></template> </title></template></title></template>
+<tplarg lineStart="1"><title> {<template><title>vorlagenname</title></template> </title></tplarg>}
+
+{<tplarg><title><tplarg><title> </title></tplarg></title></tplarg>}
+
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg></title></tplarg></title></template>
+<tplarg lineStart="1"><title><tplarg><title><template><title> </title></template> </title></tplarg></title></tplarg>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg> </title></tplarg></title></template>
+{{<tplarg><title><tplarg><title> </title></tplarg>} </title></tplarg>}
+<tplarg lineStart="1"><title><template><title><tplarg><title> </title></tplarg></title></template> </title></tplarg>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg></title></tplarg> </title></template>
+{<tplarg><title><template><title><template><title> </title></template> </title></template> </title></tplarg>}
+{<template><title><tplarg><title><template><title> </title></template> </title></tplarg>} </title></template>
+{<template><title><template><title><tplarg><title> </title></tplarg>} </title></template> </title></template>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg> </title></tplarg> </title></template>
+<tplarg lineStart="1"><title><template><title><tplarg><title> </title></tplarg> </title></template> </title></tplarg>
+<tplarg lineStart="1"><title><tplarg><title><template><title> </title></template> </title></tplarg> </title></tplarg>
+<template lineStart="1"><title><template><title><template><title><template><title> </title></template> </title></template> </title></template> </title></template>
+</root>
\ No newline at end of file
diff --git a/tests/parser/preprocess/NestedTemplates.txt b/tests/parser/preprocess/NestedTemplates.txt
new file mode 100644 (file)
index 0000000..aa9a472
--- /dev/null
@@ -0,0 +1,89 @@
+{{vorlage}}
+
+{{{argument}}}
+
+Nach [[:meta:Help:Expansion#XML parse tree]]
+{{{{vorlagenname}}}}
+{{ {{vorlagenname}}}}
+{{{{vorlagenname}} }}
+{{{{vorlagenname}}erweiterung}}
+
+{{{{{vorlagenname}}}}}
+{{{ {{vorlagenname}}}}}
+{{ {{{vorlagenname}}}}}
+{{{{{vorlagenname}} }}}
+{{{{{vorlagenname}}} }}
+
+nur etwas erweitert
+{{{{{{vorlagenname}}}}}}
+{{{ {{{vorlagenname}}}}}}
+{{{{{{vorlagenname}}} }}}
+{{ {{{{vorlagenname}}}}}}
+{{{{ {{vorlagenname}}}}}}
+{{ {{ {{vorlagenname}}}}}}
+{{{{ {{vorlagenname}}} }}}
+{{{{{{vorlagenname}}}} }}
+{{{{{{vorlagenname}} }}}}
+{{ {{{{vorlagenname}} }}}}
+{{{ {{{vorlagenname}} }}}}
+
+{{{{{{{ }}}}}}}
+
+{{{{{{{{ }}}}}}}}
+{{{{{{{{ }} }}}}}}
+{{{{{{{{ }}} }}}}}
+{{{{{{{{ }}}} }}}}
+{{{{{{{{ }}}}} }}}
+{{{{{{{{ }}}}}} }}
+{{{{{{{{ }} }} }}}}
+{{{{{{{{ }} }}}} }}
+{{{{{{{{ }}}} }} }}
+{{{{{{{{ }}} }}} }}
+{{{{{{{{ }}} }} }}}
+{{{{{{{{ }} }}} }}}
+{{{{{{{{ }} }} }} }}
+
+{{vorlage}}
+
+{{{argument}}}
+
+Nach [[:meta:Help:Expansion#XML parse tree]]
+{{{{vorlagenname}}}}
+{{ {{vorlagenname}}}}
+{{{{vorlagenname}} }}
+{{{{vorlagenname}}erweiterung}}
+
+{{{{{vorlagenname}}}}}
+{{{ {{vorlagenname}}}}}
+{{ {{{vorlagenname}}}}}
+{{{{{vorlagenname}} }}}
+{{{{{vorlagenname}}} }}
+
+nur etwas erweitert
+{{{{{{vorlagenname}}}}}}
+{{{ {{{vorlagenname}}}}}}
+{{{{{{vorlagenname}}} }}}
+{{ {{{{vorlagenname}}}}}}
+{{{{ {{vorlagenname}}}}}}
+{{ {{ {{vorlagenname}}}}}}
+{{{{ {{vorlagenname}}} }}}
+{{{{{{vorlagenname}}}} }}
+{{{{{{vorlagenname}} }}}}
+{{ {{{{vorlagenname}} }}}}
+{{{ {{{vorlagenname}} }}}}
+
+{{{{{{{ }}}}}}}
+
+{{{{{{{{ }}}}}}}}
+{{{{{{{{ }} }}}}}}
+{{{{{{{{ }}} }}}}}
+{{{{{{{{ }}}} }}}}
+{{{{{{{{ }}}}} }}}
+{{{{{{{{ }}}}}} }}
+{{{{{{{{ }} }} }}}}
+{{{{{{{{ }} }}}} }}
+{{{{{{{{ }}}} }} }}
+{{{{{{{{ }}} }}} }}
+{{{{{{{{ }}} }} }}}
+{{{{{{{{ }} }}} }}}
+{{{{{{{{ }} }} }} }}
index 105ce6d..1219d43 100644 (file)
@@ -425,15 +425,6 @@ class GlobalTest extends MediaWikiTestCase {
 
        }
 
-
-       function testInStringTest() {
-       
-               $this->assertTrue( in_string( 'foo', 'foobar' ), 'foo is in foobar' );
-               $this->assertFalse( in_string( 'Bar', 'foobar' ), 'Case-sensitive by default' );
-               $this->assertTrue( in_string( 'Foo', 'foobar', true ), 'Case-insensitive when asked' );
-       
-       }
-
        /**
         * test @see wfShorthandToInteger()
         * @dataProvider provideShorthand
diff --git a/tests/phpunit/includes/ParserOptionsTest.php b/tests/phpunit/includes/ParserOptionsTest.php
deleted file mode 100644 (file)
index 5b2adaf..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-class ParserOptionsTest extends MediaWikiTestCase {
-
-       private $popts;
-       private $pcache;
-
-       protected function setUp() {
-               global $wgLanguageCode, $wgUser;
-               parent::setUp();
-
-               $langObj = Language::factory( $wgLanguageCode );
-
-               $this->setMwGlobals( array(
-                       'wgContLang' => $langObj,
-                       'wgUseDynamicDates' => true,
-               ) );
-
-               $this->popts = ParserOptions::newFromUserAndLang( $wgUser, $langObj );
-               $this->pcache = ParserCache::singleton();
-       }
-
-       /**
-        * ParserOptions::optionsHash was not giving consistent results when $wgUseDynamicDates was set
-        * @group Database
-        */
-       function testGetParserCacheKeyWithDynamicDates() {
-               $title = Title::newFromText( "Some test article" );
-               $page = WikiPage::factory( $title );
-
-               $pcacheKeyBefore = $this->pcache->getKey( $page, $this->popts );
-               $this->assertNotNull( $this->popts->getDateFormat() );
-
-               $pcacheKeyAfter = $this->pcache->getKey( $page, $this->popts );
-               $this->assertEquals( $pcacheKeyBefore, $pcacheKeyAfter );
-       }
-}
index c3a251f..4b1f519 100644 (file)
@@ -154,6 +154,7 @@ class PreprocessorTest extends MediaWikiTestCase {
                        array( "Factorial" ), # http://en.wikipedia.org/w/index.php?title=Template:Factorial&oldid=98548758 GFDL + CC-BY-SA by Polonium
                        array( "All_system_messages" ), # http://tl.wiktionary.org/w/index.php?title=Suleras:All_system_messages&oldid=2765 GPL text generated by MediaWiki
                        array( "Fundraising" ), # http://tl.wiktionary.org/w/index.php?title=MediaWiki:Sitenotice&oldid=5716 GFDL + CC-BY-SA, copied there by Sky Harbor.
+                       array( "NestedTemplates" ), # bug 27936
                );
        }
 
index 0000f0c..b8d816e 100644 (file)
                }
        );
 
+QUnit.test( 'Sorting images using alt text', function ( assert ) {
+       var $table = $(
+               '<table class="sortable">' +
+               '<tr><th>THEAD</th></tr>' +
+               '<tr><td><img alt="2"/></td></tr>' +
+               '<tr><td>1</td></tr>' +
+               '</table>'
+       );
+       $table.tablesorter().find( '.headerSort:eq(0)' ).click();
+
+       assert.equal(
+               $table.find( 'td' ).first().text(),
+               '1',
+               'Applied correct sorting order'
+       );
+} );
+
+QUnit.test( 'Sorting images using alt text (complex)', function ( assert ) {
+       var $table = $(
+               '<table class="sortable">' +
+               '<tr><th>THEAD</th></tr>' +
+               '<tr><td><img alt="D" />A</td></tr>' +
+               '<tr><td>CC</td></tr>' +
+               '<tr><td><a><img alt="A" /></a>F</tr>' +
+               '<tr><td><img alt="A" /><strong>E</strong></tr>' +
+               '<tr><td><strong><img alt="A" />D</strong></tr>' +
+               '<tr><td><img alt="A" />C</tr>' +
+               '</table>'
+       );
+       $table.tablesorter().find( '.headerSort:eq(0)' ).click();
+
+       assert.equal(
+               $table.find( 'td' ).text(),
+               'CDEFCCA',
+               'Applied correct sorting order'
+       );
+} );
+
+QUnit.test( 'Sorting images using alt text (with format autodetection)', function ( assert ) {
+       var $table = $(
+               '<table class="sortable">' +
+               '<tr><th>THEAD</th></tr>' +
+               '<tr><td><img alt="1" />7</td></tr>' +
+               '<tr><td>1<img alt="6" /></td></tr>' +
+               '<tr><td>5</td></tr>' +
+               '<tr><td>4</td></tr>' +
+               '</table>'
+       );
+       $table.tablesorter().find( '.headerSort:eq(0)' ).click();
+
+       assert.equal(
+               $table.find( 'td' ).text(),
+               '4517',
+               'Applied correct sorting order'
+       );
+} );
+
 }( jQuery, mediaWiki ) );