Merge "Per 5a4a33a, remove support for magic quotes gpc"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 24 Sep 2014 17:26:56 +0000 (17:26 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 24 Sep 2014 17:26:56 +0000 (17:26 +0000)
91 files changed:
RELEASE-NOTES-1.24
RELEASE-NOTES-1.25
composer.json
docs/kss/Makefile
includes/AutoLoader.php
includes/GlobalFunctions.php
includes/Linker.php
includes/Message.php
includes/MovePage.php
includes/OutputPage.php
includes/Setup.php
includes/Title.php
includes/User.php
includes/api/ApiBase.php
includes/api/ApiFormatBase.php
includes/cache/bloom/BloomCacheRedis.php
includes/context/RequestContext.php
includes/db/LoadBalancer.php
includes/db/LoadMonitor.php
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLMultiSelectField.php
includes/installer/i18n/ia.json
includes/installer/i18n/ksh.json
includes/jobqueue/Job.php
includes/jobqueue/JobQueueGroup.php
includes/jobqueue/JobRunner.php
includes/libs/CSSJanus.php
includes/libs/CSSMin.php
includes/media/PNG.php
includes/parser/Parser.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderUserCSSPrefsModule.php
includes/resourceloader/ResourceLoaderWikiModule.php
includes/skins/BaseTemplate.php [new file with mode: 0644]
includes/skins/MediaWikiI18N.php [new file with mode: 0644]
includes/skins/QuickTemplate.php [new file with mode: 0644]
includes/skins/SkinApi.php [new file with mode: 0644]
includes/skins/SkinApiTemplate.php [new file with mode: 0644]
includes/skins/SkinTemplate.php
includes/specials/SpecialActiveusers.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialBooksources.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialListfiles.php
includes/specials/SpecialListgrouprights.php
languages/Language.php
languages/i18n/be-tarask.json
languages/i18n/ckb.json
languages/i18n/de.json
languages/i18n/en.json
languages/i18n/fa.json
languages/i18n/fr.json
languages/i18n/gd.json
languages/i18n/ia.json
languages/i18n/id.json
languages/i18n/ja.json
languages/i18n/lb.json
languages/i18n/lrc.json
languages/i18n/nap.json
languages/i18n/qqq.json
languages/i18n/sl.json
languages/i18n/zh-hans.json
languages/i18n/zh-hant.json
maintenance/mwdoc-filter.php
resources/Resources.php
resources/lib/oojs-ui/i18n/sr-el.json
resources/lib/oojs-ui/i18n/zh-hant.json
resources/lib/oojs-ui/oojs-ui-apex.css
resources/lib/oojs-ui/oojs-ui-minerva.css
resources/lib/oojs-ui/oojs-ui.js
resources/lib/oojs-ui/oojs-ui.svg.css
resources/src/mediawiki.api/mediawiki.api.js
resources/src/mediawiki.less/mediawiki.mixins.less
resources/src/mediawiki.ui/components/checkbox.less
resources/src/mediawiki.ui/components/icons.less [new file with mode: 0644]
resources/src/mediawiki.ui/components/images/ok.png [new file with mode: 0644]
resources/src/mediawiki.ui/components/images/ok.svg [new file with mode: 0644]
resources/src/mediawiki.ui/components/inputs.less
tests/parserTests.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/data/less/module/styles.css
tests/phpunit/includes/HttpTest.php
tests/phpunit/includes/MessageTest.php
tests/phpunit/includes/MovePageTest.php [new file with mode: 0644]
tests/phpunit/includes/jobqueue/JobTest.php [new file with mode: 0644]
tests/phpunit/includes/libs/CSSJanusTest.php
tests/phpunit/includes/libs/CSSMinTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
tests/phpunit/includes/search/SearchEngineTest.php
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js

index 8733f94..43e0ae5 100644 (file)
@@ -350,6 +350,12 @@ production.
   * ApiFormatWddx
   * ApiFormatYaml
   * ApiTokens
+* The following class constants have been deprecated and may be removed in a
+  future release:
+  * ApiBase::PROP_ROOT
+  * ApiBase::PROP_LIST
+  * ApiBase::PROP_TYPE
+  * ApiBase::PROP_NULLABLE
 
 === Languages updated in 1.24 ===
 
index c8bea32..9dbf896 100644 (file)
@@ -14,7 +14,11 @@ production.
 
 === Bug fixes in 1.25 ===
 
-=== Web API changes in 1.25 ===
+=== Action API changes in 1.25 ===
+* (bug 65403) XML tag highlighting is now only performed for formats
+  "xmlfm" and "wddxfm".
+
+=== Action API internal changes in 1.25 ===
 
 === Languages updated in 1.25 ===
 
@@ -25,7 +29,7 @@ changes to languages because of Bugzilla reports.
 === Other changes in 1.25 ===
 * The skin autodiscovery mechanism, deprecated in MediaWiki 1.23, has been
   removed. See https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery for
-  migration guide for creators and users of custom skins that relied on it. 
+  migration guide for creators and users of custom skins that relied on it.
 * Javascript variable 'wgFileCanRotate' now only available on Special:Upload.
 * (bug 56257) Set site logo url in ResourceLoaderSiteModule instead of inline
   styles in the HTML output.
index 8389f00..3b18933 100644 (file)
                "ext-wikidiff2": "*",
                "ext-apc": "*",
                "monolog/monolog": "*"
+       },
+       "autoload": {
+               "psr-0": {
+                       "ComposerHookHandler": "includes/composer"
+               }
+       },
+       "scripts": {
+               "pre-update-cmd": "ComposerHookHandler::onPreUpdate",
+               "pre-install-cmd": "ComposerHookHandler::onPreInstall"
        }
 }
index a7b0c47..dfee610 100644 (file)
@@ -6,7 +6,7 @@ kss: kssnodecheck
        $(eval KSS_RL_TMP := $(shell mktemp /tmp/tmp.XXXXXXXXXX))
 # Keep module names in strict alphabetical order, so CSS loads in the same order as ResourceLoader's addModuleStyles does; this can affect rendering.
 # See OutputPage::makeResourceLoaderLink.
-       @curl -sG "${MEDIAWIKI_LOAD_URL}?modules=mediawiki.legacy.commonPrint|mediawiki.legacy.shared|mediawiki.ui|mediawiki.ui.anchor|mediawiki.ui.button|mediawiki.ui.checkbox|mediawiki.ui.input&only=styles" > $(KSS_RL_TMP)
+       @curl -sG "${MEDIAWIKI_LOAD_URL}?modules=mediawiki.legacy.commonPrint|mediawiki.legacy.shared|mediawiki.ui|mediawiki.ui.anchor|mediawiki.ui.button|mediawiki.ui.checkbox|mediawiki.ui.icon|mediawiki.ui.input&only=styles" > $(KSS_RL_TMP)
        @node_modules/.bin/kss-node ../../resources/src/mediawiki.ui static/ --css $(KSS_RL_TMP) -t styleguide-template
        @rm $(KSS_RL_TMP)
 
index 6b0daa1..3e36712 100644 (file)
@@ -945,10 +945,12 @@ $wgAutoloadLocalClasses = array(
        'SiteStore' => 'includes/site/SiteStore.php',
 
        # includes/skins
-       'BaseTemplate' => 'includes/skins/SkinTemplate.php',
-       'MediaWikiI18N' => 'includes/skins/SkinTemplate.php',
-       'QuickTemplate' => 'includes/skins/SkinTemplate.php',
+       'BaseTemplate' => 'includes/skins/BaseTemplate.php',
+       'MediaWikiI18N' => 'includes/skins/MediaWikiI18N.php',
+       'QuickTemplate' => 'includes/skins/QuickTemplate.php',
        'Skin' => 'includes/skins/Skin.php',
+       'SkinApi' => 'includes/skins/SkinApi.php',
+       'SkinApiTemplate' => 'includes/skins/SkinApiTemplate.php',
        'SkinException' => 'includes/skins/SkinException.php',
        'SkinFactory' => 'includes/skins/SkinFactory.php',
        'SkinFallback' => 'includes/skins/SkinFallback.php',
index 490df24..3306acd 100644 (file)
@@ -3761,11 +3761,18 @@ function wfGetNull() {
  * @param float|null $ifWritesSince Only wait if writes were done since this UNIX timestamp
  * @param string|bool $wiki Wiki identifier accepted by wfGetLB
  * @param string|bool $cluster Cluster name accepted by LBFactory. Default: false.
+ * @param int|null $timeout Max wait time. Default: 1 day (cli), ~10 seconds (web)
  * @return bool Success (able to connect and no timeouts reached)
  */
-function wfWaitForSlaves( $ifWritesSince = false, $wiki = false, $cluster = false ) {
+function wfWaitForSlaves(
+       $ifWritesSince = null, $wiki = false, $cluster = false, $timeout = null
+) {
        // B/C: first argument used to be "max seconds of lag"; ignore such values
-       $ifWritesSince = ( $ifWritesSince > 1e9 ) ? $ifWritesSince : false;
+       $ifWritesSince = ( $ifWritesSince > 1e9 ) ? $ifWritesSince : null;
+
+       if ( $timeout === null ) {
+               $timeout = ( PHP_SAPI === 'cli' ) ? 86400 : 10;
+       }
 
        if ( $cluster !== false ) {
                $lb = wfGetLBFactory()->getExternalLB( $cluster );
@@ -3787,7 +3794,7 @@ function wfWaitForSlaves( $ifWritesSince = false, $wiki = false, $cluster = fals
                // The DBMS may not support getMasterPos() or the whole
                // load balancer might be fake (e.g. $wgAllDBsAreLocalhost).
                if ( $pos !== false ) {
-                       return $lb->waitForAll( $pos, PHP_SAPI === 'cli' ? 86400 : null );
+                       return $lb->waitForAll( $pos, $timeout );
                }
        }
 
index be850d0..1d327be 100644 (file)
@@ -193,7 +193,7 @@ class Linker {
                $target, $html = null, $customAttribs = array(), $query = array(), $options = array()
        ) {
                if ( !$target instanceof Title ) {
-                       wfWarn( __METHOD__ . ': Requires $target to be a Title object.' );
+                       wfWarn( __METHOD__ . ': Requires $target to be a Title object.', 2 );
                        return "<!-- ERROR -->$html";
                }
                wfProfileIn( __METHOD__ );
index 4df0d80..59c5120 100644 (file)
@@ -674,11 +674,10 @@ class Message {
                $string = $this->fetchMessage();
 
                if ( $string === false ) {
-                       $key = htmlspecialchars( $this->key );
-                       if ( $this->format === 'plain' ) {
-                               return '<' . $key . '>';
+                       if ( $this->format === 'plain' || $this->format === 'text' ) {
+                               return '<' . $this->key . '>';
                        }
-                       return '&lt;' . $key . '&gt;';
+                       return '&lt;' . htmlspecialchars( $this->key ) . '&gt;';
                }
 
                # Replace $* with a list of parameters for &uselang=qqx.
@@ -735,10 +734,10 @@ class Message {
                                // Doh! Cause a fatal error after all?
                        }
 
-                       if ( $this->format === 'plain' ) {
+                       if ( $this->format === 'plain' || $this->format === 'text' ) {
                                return '<' . $this->key . '>';
                        }
-                       return '&lt;' . $this->key . '&gt;';
+                       return '&lt;' . htmlspecialchars( $this->key ) . '&gt;';
                }
        }
 
index fdece8d..cea91d2 100644 (file)
@@ -42,6 +42,90 @@ class MovePage {
                $this->newTitle = $newTitle;
        }
 
+       /**
+        * Does various sanity checks that the move is
+        * valid. Only things based on the two titles
+        * should be checked here.
+        *
+        * @return Status
+        */
+       public function isValidMove() {
+               global $wgContentHandlerUseDB;
+               $status = new Status();
+
+               if ( $this->oldTitle->equals( $this->newTitle ) ) {
+                       $status->fatal( 'selfmove' );
+               }
+               if ( !$this->oldTitle->isMovable() ) {
+                       $status->fatal( 'immobile-source-namespace', $this->oldTitle->getNsText() );
+               }
+               if ( $this->newTitle->isExternal() ) {
+                       $status->fatal( 'immobile-target-namespace-iw' );
+               }
+               if ( !$this->newTitle->isMovable() ) {
+                       $status->fatal( 'immobile-target-namespace', $this->newTitle->getNsText() );
+               }
+
+               $oldid = $this->oldTitle->getArticleID();
+
+               if ( strlen( $this->newTitle->getDBkey() ) < 1 ) {
+                       $errors[] = array( 'articleexists' );
+               }
+               if (
+                       ( $this->oldTitle->getDBkey() == '' ) ||
+                       ( !$oldid ) ||
+                       ( $this->newTitle->getDBkey() == '' )
+               ) {
+                       $errors[] = array( 'badarticleerror' );
+               }
+
+               // Content model checks
+               if ( !$wgContentHandlerUseDB &&
+                       $this->oldTitle->getContentModel() !== $this->newTitle->getContentModel() ) {
+                       // can't move a page if that would change the page's content model
+                       $status->fatal(
+                               'bad-target-model',
+                               ContentHandler::getLocalizedName( $this->oldTitle->getContentModel() ),
+                               ContentHandler::getLocalizedName( $this->newTitle->getContentModel() )
+                       );
+               }
+
+               // Image-specific checks
+               if ( $this->oldTitle->inNamespace( NS_FILE ) ) {
+                       $status->merge( $this->isValidFileMove() );
+               }
+
+               if ( $this->newTitle->inNamespace( NS_FILE ) && !$this->oldTitle->inNamespace( NS_FILE ) ) {
+                       $status->fatal( 'nonfile-cannot-move-to-file' );
+               }
+
+               return $status;
+       }
+
+       /**
+        * Sanity checks for when a file is being moved
+        *
+        * @return Status
+        */
+       protected function isValidFileMove() {
+               $status = new Status();
+               $file = wfLocalFile( $this->oldTitle );
+               if ( $file->exists() ) {
+                       if ( $this->newTitle->getText() != wfStripIllegalFilenameChars( $this->newTitle->getText() ) ) {
+                               $status->fatal( 'imageinvalidfilename' );
+                       }
+                       if ( !File::checkExtensionCompatibility( $file, $this->newTitle->getDBkey() ) ) {
+                               $status->fatal( 'imagetypemismatch' );
+                       }
+               }
+
+               if ( !$this->newTitle->inNamespace( NS_FILE ) ) {
+                       $status->fatal( 'imagenocrossnamespace' );
+               }
+
+               return $status;
+       }
+
        /**
         * @param User $user
         * @param string $reason
index 22a6012..3321747 100644 (file)
@@ -3520,8 +3520,6 @@ $templates
                if ( $flip === 'flip' && $this->getLanguage()->isRTL() ) {
                        # If wanted, and the interface is right-to-left, flip the CSS
                        $style_css = CSSJanus::transform( $style_css, true, false );
-               } else {
-                       $style_css = CSSJanus::nullTransform( $style_css );
                }
                $this->mInlineStyles .= Html::inlineStyle( $style_css ) . "\n";
        }
@@ -3572,8 +3570,6 @@ $templates
                        $previewedCSS = $this->getRequest()->getText( 'wpTextbox1' );
                        if ( $this->getLanguage()->getDir() !== $wgContLang->getDir() ) {
                                $previewedCSS = CSSJanus::transform( $previewedCSS, true, false );
-                       } else {
-                               $previewedCSS = CSSJanus::nullTransform( $previewedCSS );
                        }
                        $otherTags .= Html::inlineStyle( $previewedCSS ) . "\n";
                } else {
index 7a89c7a..743936e 100644 (file)
@@ -289,8 +289,13 @@ call_user_func( function () use ( $wgValidSkinNames ) {
        $factory->register( 'fallback', 'Fallback', function () {
                return new SkinFallback;
        } );
+       // Register a hidden skin for api output
+       $factory->register( 'apioutput', 'ApiOutput', function () {
+               return new SkinApi;
+       } );
 } );
 $wgSkipSkins[] = 'fallback';
+$wgSkipSkins[] = 'apioutput';
 
 if ( $wgLocalInterwiki ) {
        array_unshift( $wgLocalInterwikis, $wgLocalInterwiki );
index 74d78ba..e8cda85 100644 (file)
@@ -3589,7 +3589,7 @@ class Title {
         * Check whether a given move operation would be valid.
         * Returns true if ok, or a getUserPermissionsErrors()-like array otherwise
         *
-        * @todo move this into MovePage
+        * @todo finish moving this into MovePage
         * @param Title $nt The new title
         * @param bool $auth Indicates whether $wgUser's permissions
         *  should be checked
@@ -3597,60 +3597,18 @@ class Title {
         * @return array|bool True on success, getUserPermissionsErrors()-like array on failure
         */
        public function isValidMoveOperation( &$nt, $auth = true, $reason = '' ) {
-               global $wgUser, $wgContentHandlerUseDB;
+               global $wgUser;
 
-               $errors = array();
-               if ( !$nt ) {
+               if ( !( $nt instanceof Title ) ) {
                        // Normally we'd add this to $errors, but we'll get
                        // lots of syntax errors if $nt is not an object
                        return array( array( 'badtitletext' ) );
                }
-               if ( $this->equals( $nt ) ) {
-                       $errors[] = array( 'selfmove' );
-               }
-               if ( !$this->isMovable() ) {
-                       $errors[] = array( 'immobile-source-namespace', $this->getNsText() );
-               }
-               if ( $nt->isExternal() ) {
-                       $errors[] = array( 'immobile-target-namespace-iw' );
-               }
-               if ( !$nt->isMovable() ) {
-                       $errors[] = array( 'immobile-target-namespace', $nt->getNsText() );
-               }
-
-               $oldid = $this->getArticleID();
-               $newid = $nt->getArticleID();
-
-               if ( strlen( $nt->getDBkey() ) < 1 ) {
-                       $errors[] = array( 'articleexists' );
-               }
-               if (
-                       ( $this->getDBkey() == '' ) ||
-                       ( !$oldid ) ||
-                       ( $nt->getDBkey() == '' )
-               ) {
-                       $errors[] = array( 'badarticleerror' );
-               }
-
-               // Content model checks
-               if ( !$wgContentHandlerUseDB &&
-                               $this->getContentModel() !== $nt->getContentModel() ) {
-                       // can't move a page if that would change the page's content model
-                       $errors[] = array(
-                               'bad-target-model',
-                               ContentHandler::getLocalizedName( $this->getContentModel() ),
-                               ContentHandler::getLocalizedName( $nt->getContentModel() )
-                       );
-               }
 
-               // Image-specific checks
-               if ( $this->getNamespace() == NS_FILE ) {
-                       $errors = array_merge( $errors, $this->validateFileMoveOperation( $nt ) );
-               }
+               $mp = new MovePage( $this, $nt );
+               $errors = $mp->isValidMove()->getErrorsArray();
 
-               if ( $nt->getNamespace() == NS_FILE && $this->getNamespace() != NS_FILE ) {
-                       $errors[] = array( 'nonfile-cannot-move-to-file' );
-               }
+               $newid = $nt->getArticleID();
 
                if ( $auth ) {
                        $errors = wfMergeErrorArrays( $errors,
@@ -3700,6 +3658,7 @@ class Title {
 
        /**
         * Check if the requested move target is a valid file move target
+        * @todo move this to MovePage
         * @param Title $nt Target title
         * @return array List of errors
         */
@@ -3708,27 +3667,6 @@ class Title {
 
                $errors = array();
 
-               // wfFindFile( $nt ) / wfLocalFile( $nt ) is not allowed until below
-
-               $file = wfLocalFile( $this );
-               if ( $file->exists() ) {
-                       if ( $nt->getText() != wfStripIllegalFilenameChars( $nt->getText() ) ) {
-                               $errors[] = array( 'imageinvalidfilename' );
-                       }
-                       if ( !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) {
-                               $errors[] = array( 'imagetypemismatch' );
-                       }
-               }
-
-               if ( $nt->getNamespace() != NS_FILE ) {
-                       $errors[] = array( 'imagenocrossnamespace' );
-                       // From here we want to do checks on a file object, so if we can't
-                       // create one, we must return.
-                       return $errors;
-               }
-
-               // wfFindFile( $nt ) / wfLocalFile( $nt ) is allowed below here
-
                $destFile = wfLocalFile( $nt );
                if ( !$wgUser->isAllowed( 'reupload-shared' ) && !$destFile->exists() && wfFindFile( $nt ) ) {
                        $errors[] = array( 'file-exists-sharedrepo' );
@@ -3899,6 +3837,7 @@ class Title {
         * Checks if $this can be moved to a given Title
         * - Selects for update, so don't call it unless you mean business
         *
+        * @todo move to MovePage
         * @param Title $nt The new title to check
         * @return bool
         */
index 635b1e9..9897013 100644 (file)
@@ -357,21 +357,14 @@ class User implements IDBAccessObject {
         * @return bool False if the ID does not exist, true otherwise
         */
        public function loadFromId() {
-               global $wgMemc;
                if ( $this->mId == 0 ) {
                        $this->loadDefaults();
                        return false;
                }
 
                // Try cache
-               $key = wfMemcKey( 'user', 'id', $this->mId );
-               $data = $wgMemc->get( $key );
-               if ( !is_array( $data ) || $data['mVersion'] != self::VERSION ) {
-                       // Object is expired, load from DB
-                       $data = false;
-               }
-
-               if ( !$data ) {
+               $cache = $this->loadFromCache();
+               if ( !$cache ) {
                        wfDebug( "User: cache miss for user {$this->mId}\n" );
                        // Load from DB
                        if ( !$this->loadFromDatabase() ) {
@@ -379,12 +372,6 @@ class User implements IDBAccessObject {
                                return false;
                        }
                        $this->saveToCache();
-               } else {
-                       wfDebug( "User: got user {$this->mId} from cache\n" );
-                       // Restore from cache
-                       foreach ( self::$mCacheVars as $name ) {
-                               $this->$name = $data[$name];
-                       }
                }
 
                $this->mLoadedItems = true;
@@ -392,6 +379,37 @@ class User implements IDBAccessObject {
                return true;
        }
 
+       /**
+        * Load user data from shared cache, given mId has already been set.
+        *
+        * @return bool false if the ID does not exist or data is invalid, true otherwise
+        * @since 1.25
+        */
+       public function loadFromCache() {
+               global $wgMemc;
+
+               if ( $this->mId == 0 ) {
+                       $this->loadDefaults();
+                       return false;
+               }
+
+               $key = wfMemcKey( 'user', 'id', $this->mId );
+               $data = $wgMemc->get( $key );
+               if ( !is_array( $data ) || $data['mVersion'] < self::VERSION ) {
+                       // Object is expired
+                       return false;
+               }
+
+               wfDebug( "User: got user {$this->mId} from cache\n" );
+
+               // Restore from cache
+               foreach ( self::$mCacheVars as $name ) {
+                       $this->$name = $data[$name];
+               }
+
+               return true;
+       }
+
        /**
         * Save user data to the shared cache
         */
index eafa9cc..7bc3f71 100644 (file)
@@ -65,16 +65,6 @@ abstract class ApiBase extends ContextSource {
        // Only applies if TYPE='integer' Use with extreme caution
        const PARAM_RANGE_ENFORCE = 9;
 
-       // Name of property group that is on the root element of the result,
-       // i.e. not part of a list
-       const PROP_ROOT = 'ROOT';
-       // Boolean, is the result multiple items? Defaults to true for query modules,
-       // to false for other modules
-       const PROP_LIST = 'LIST';
-       const PROP_TYPE = 0; // Type of the property, uses same format as PARAM_TYPE
-       // Boolean, can the property be not included in the result? Defaults to false
-       const PROP_NULLABLE = 1;
-
        const LIMIT_BIG1 = 500; // Fast query, std user limit
        const LIMIT_BIG2 = 5000; // Fast query, bot/sysop limit
        const LIMIT_SML1 = 50; // Slow query, std user limit
@@ -2245,6 +2235,15 @@ abstract class ApiBase extends ContextSource {
         * @{
         */
 
+       /// @deprecated since 1.24
+       const PROP_ROOT = 'ROOT';
+       /// @deprecated since 1.24
+       const PROP_LIST = 'LIST';
+       /// @deprecated since 1.24
+       const PROP_TYPE = 0;
+       /// @deprecated since 1.24
+       const PROP_NULLABLE = 1;
+
        /**
         * Formerly returned a string that identifies the version of the extending
         * class. Typically included the class name, the svn revision, timestamp,
index 9165ce8..2a57688 100644 (file)
@@ -278,9 +278,12 @@ See the <a href='https://www.mediawiki.org/wiki/API'>complete documentation</a>,
        protected function formatHTML( $text ) {
                // Escape everything first for full coverage
                $text = htmlspecialchars( $text );
-               // encode all comments or tags as safe blue strings
-               $text = str_replace( '&lt;', '<span style="color:blue;">&lt;', $text );
-               $text = str_replace( '&gt;', '&gt;</span>', $text );
+
+               if ( $this->mFormat === 'XML' || $this->mFormat === 'WDDX' ) {
+                       // encode all comments or tags as safe blue strings
+                       $text = str_replace( '&lt;', '<span style="color:blue;">&lt;', $text );
+                       $text = str_replace( '&gt;', '&gt;</span>', $text );
+               }
 
                // identify requests to api.php
                $text = preg_replace( '#^(\s*)(api\.php\?[^ <\n\t]+)$#m', '\1<a href="\2">\2</a>', $text );
index 212e5e8..583556f 100644 (file)
@@ -328,7 +328,7 @@ LUA;
        }
 
        /**
-        * $param string $to (master/slave)
+        * @param string $to (master/slave)
         * @return RedisConnRef|bool Returns false on failure
         */
        protected function getConnection( $to ) {
@@ -354,6 +354,7 @@ LUA;
                                        return $conn;
                                }
                                unset( $servers[$index] ); // skip next time
+                               $servers = array_values( $servers ); // reindex
                        }
                }
 
index ede10fe..952af8c 100644 (file)
@@ -140,6 +140,7 @@ class RequestContext implements IContextSource {
                if ( $this->title === null ) {
                        global $wgTitle; # fallback to $wg till we can improve this
                        $this->title = $wgTitle;
+                       wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetCaller() . ' with no title set.' );
                }
 
                return $this->title;
index e517a02..f79fde0 100644 (file)
@@ -1128,7 +1128,7 @@ class LoadBalancer {
         * Results are cached for a short time in memcached, and indefinitely in the process cache
         *
         * @param string|bool $wiki
-        * @return array
+        * @return array Map of (server index => seconds)
         */
        function getLagTimes( $wiki = false ) {
                # Try process cache
index 7281485..b694a6f 100644 (file)
@@ -48,7 +48,7 @@ interface LoadMonitor {
         * @param array $serverIndexes
         * @param string $wiki
         *
-        * @return array
+        * @return array Map of (server index => seconds)
         */
        public function getLagTimes( $serverIndexes, $wiki );
 }
index d582da3..4b8b5a0 100644 (file)
@@ -1051,6 +1051,14 @@ class HTMLForm extends ContextSource {
                $this->mSubmitModifierClass = 'mw-ui-destructive';
        }
 
+       /**
+        * Identify that the submit button in the form has a progressive action
+        *
+        */
+       public function setSubmitProgressive() {
+               $this->mSubmitModifierClass = 'mw-ui-progressive';
+       }
+
        /**
         * Set the text for the submit button to a message
         * @since 1.19
index 1b71ab9..30310a2 100644 (file)
@@ -59,6 +59,12 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
                                        $label
                                );
 
+                               $checkbox = Html::rawElement(
+                                       'div',
+                                       array( 'class' => 'mw-ui-checkbox' ),
+                                       $checkbox
+                               );
+
                                $html .= ' ' . Html::rawElement(
                                        'div',
                                        array( 'class' => 'mw-htmlform-flatlist-item' ),
index 62afb44..0e8f597 100644 (file)
@@ -47,6 +47,7 @@
        "config-env-good": "Le ambiente ha essite verificate.\nTu pote installar MediaWiki.",
        "config-env-bad": "Le ambiente ha essite verificate.\nTu non pote installar MediaWiki.",
        "config-env-php": "PHP $1 es installate.",
+       "config-env-hhvm": "HHVM $1 es installate.",
        "config-unicode-using-utf8": "utf8_normalize.so per Brion Vibber es usate pro le normalisation Unicode.",
        "config-unicode-using-intl": "Le [http://pecl.php.net/intl extension PECL intl] es usate pro le normalisation Unicode.",
        "config-unicode-pure-php-warning": "'''Aviso''': Le [http://pecl.php.net/intl extension PECL intl] non es disponibile pro exequer le normalisation Unicode; le systema recurre al implementation lente in PHP pur.\nSi tu sito ha un alte volumine de traffico, tu deberea informar te un poco super le [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations normalisation Unicode].",
@@ -55,6 +56,7 @@
        "config-outdated-sqlite": "'''Attention''': tu ha SQLite $1, que es inferior al version minimal requirite, $2. SQLite essera indisponibile.",
        "config-no-fts3": "'''Attention''': SQLite es compilate sin [//sqlite.org/fts3.html modulo FTS3]; functionalitate de recerca non essera disponibile in iste back-end.",
        "config-register-globals-error": "<strong>Error: Le option <code>[http://php.net/register_globals register_globals]</code> de PHP es active.\nIllo debe esser disactivate pro continuar le installation.</strong>\nVide [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals] pro obtener adjuta sur como facer lo.",
+       "config-magic-quotes-gpc": "<strong>Fatal: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc] es active!</strong>\nIste option corrumpe le datos entrate de maniera imprevisibile.\nTu non pote installar o usar MediaWiki si iste option non es disactivate.",
        "config-magic-quotes-runtime": "'''Fatal: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_runtime] es active!'''\nIste option corrumpe le entrata de datos imprevisibilemente.\nTu non pote installar o usar MediaWiki si iste option non es disactivate.",
        "config-magic-quotes-sybase": "'''Fatal: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybase] es active!'''\nIste option corrumpe le entrata de datos imprevisibilemente.\nTu non pote installar o usar MediaWiki si iste option non es disactivate.",
        "config-mbstring": "'''Fatal: [http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload] es active!'''\nIste option causa errores e pote corrumper datos imprevisibilemente.\nTu non pote installar o usar MediaWiki si iste option non es disactivate.",
@@ -65,6 +67,7 @@
        "config-memory-raised": "Le <code>memory_limit</code> de PHP es $1, elevate a $2.",
        "config-memory-bad": "'''Aviso:''' Le <code>memory_limit</code> de PHP es $1.\nIsto es probabilemente troppo basse.\nLe installation pote faller!",
        "config-ctype": "'''Fatal''': PHP debe esser compilate con supporto pro le [http://www.php.net/manual/en/ctype.installation.php extension Ctype].",
+       "config-iconv": "<strong>Fatal:</strong> PHP debe esser compilate con supporto pro le [http://www.php.net/manual/en/iconv.installation.php extension iconv].",
        "config-json": "'''Fatal:''' PHP ha essite compilate sin supporto de JSON.\nTu debe installar le extension JSON de PHP o le extension [http://pecl.php.net/package/jsonc PECL jsonc] extension ante de installar MediaWiki.\n* Le extension de PHP es includite in Red Hat Enterprise Linux (CentOS) 5 e 6, ma debe esser activate in <code>/etc/php.ini</code> o <code>/etc/php.d/json.ini</code>.\n* Alcun distributiones de Linux liberate post maio 2013 omitte iste extension de PHP, forniente in su loco le extension PECL como <code>php5-json</code> o <code>php-pecl-jsonc</code>.",
        "config-xcache": "[http://xcache.lighttpd.net/ XCache] es installate",
        "config-apc": "[http://www.php.net/apc APC] es installate",
        "config-license-gfdl": "Licentia GNU pro Documentation Libere 1.3 o plus recente",
        "config-license-pd": "Dominio public",
        "config-license-cc-choose": "Seliger un licentia Creative Commons personalisate",
-       "config-license-help": "Multe wikis public pone tote le contributiones sub un [http://freedomdefined.org/Definition/Ia?uselang=ia licentia libere].\nIsto adjuta a crear un senso de proprietate communitari e incoragia le contribution in longe termino.\nIsto non es generalmente necessari pro un wiki private o de interprisa.\n\nSi tu vole poter usar texto de Wikipedia, e si tu vole que Wikipedia pote acceptar texto copiate de tu wiki, tu debe seliger '''Creative Commons Attribution Share Alike'''.\n\nWikipedia usava anteriormente le Licentia GNU pro Documentation Libere (GFDL).\nIste es un licentia valide, ma es difficile a comprender.\nIl es anque difficile reusar le contento licentiate sub GFDL.",
+       "config-license-help": "Multe wikis public pone tote le contributiones sub un [http://freedomdefined.org/Definition/Ia?uselang=ia licentia libere].\nIsto adjuta a crear un senso de proprietate communitari e incoragia le contribution in longe termino.\nIsto non es generalmente necessari pro un wiki private o de interprisa.\n\nSi tu vole poter usar texto de Wikipedia, e si tu vole que Wikipedia pote acceptar texto copiate de tu wiki, tu debe seliger <strong>{{int:config-license-cc-by-sa}}</strong>.\n\nWikipedia usava anteriormente le Licentia GNU pro Documentation Libere (GFDL).\nIste es un licentia valide, ma es difficile a comprender.\nIl es anque difficile reusar le contento licentiate sub GFDL.",
        "config-email-settings": "Configuration de e-mail",
        "config-enable-email": "Activar le e-mail sortiente",
        "config-enable-email-help": "Si tu vole que e-mail functiona, [http://www.php.net/manual/en/mail.configuration.php le optiones de e-mail de PHP] debe esser configurate correctemente.\nSi tu non vole functiones de e-mail, tu pote disactivar los hic.",
        "config-memcache-badport": "Le numeros de porto de Memcached debe esser inter $1 e $2",
        "config-extensions": "Extensiones",
        "config-extensions-help": "Le extensiones listate hic supra esseva detegite in tu directorio <code>./extensions</code>.\n\nIstes pote requirer additional configuration, ma tu pote activar los ora.",
+       "config-skins": "Apparentias",
+       "config-skins-help": "Hic supra es le lista de apparentias detegite in tu directorio <code>./skins</code>. Tu debe activar al minus un de illos e seliger le predefinite.",
+       "config-skins-use-as-default": "Usar iste apparentia como predefinite",
+       "config-skins-missing": "Nulle apparentia ha essite trovate; MediaWiki usara un apparentia de reserva usque tu installa alcun apparentia complete.",
+       "config-skins-must-enable-some": "Tu debe seliger al minus un apparentia a activar.",
+       "config-skins-must-enable-default": "Le apparentia seligite como predefinite debe esser activate.",
        "config-install-alreadydone": "'''Aviso:''' Il pare que tu ha jam installate MediaWiki e tenta installar lo de novo.\nPer favor continua al proxime pagina.",
        "config-install-begin": "Un clic sur \"{{int:config-continue}}\" comencia le installation de MediaWiki.\nPro facer alterationes, clicca sur \"{{int:config-back}}\".",
        "config-install-step-done": "finite",
        "config-install-stats": "Initialisation del statisticas",
        "config-install-keys": "Generation de claves secrete",
        "config-insecure-keys": "'''Attention:''' {{PLURAL:$2|Un clave|Alcun claves}} secur ($1) generate durante le installation non es completemente secur. Considera cambiar {{PLURAL:$2|lo|los}} manualmente.",
+       "config-install-updates": "Impedir le execution de actualisationes innecessari",
+       "config-install-updates-failed": "<strong>Error:</strong> Le insertion de claves de actualisation in le tabellas ha fallite con le error sequente: $1",
        "config-install-sysop": "Crea conto de usator pro administrator",
        "config-install-subscribe-fail": "Impossibile subscriber a mediawiki-announce: $1",
        "config-install-subscribe-notpossible": "cURL non es installate e <code>allow_url_fopen</code> non es disponibile.",
index 785b2b5..c97dc46 100644 (file)
@@ -48,7 +48,7 @@
        "config-env-good": "De Ömjävung es jeprööf.\nDo kanns MediaWiki opsäze.",
        "config-env-bad": "De Ömjävung es jeprööf.\nDo kanns MediaWiki nit opsäze.",
        "config-env-php": "PHP $1 es doh.",
-       "config-env-php-toolow": "PHP $1 es enshtalleert.\nÄvver MediaWiki bruch PHP $2 udder hühter.",
+       "config-env-hhvm": "HHVM $1 es enschtalleerd.",
        "config-unicode-using-utf8": "För et <i lang=\"en\">Unicode</i>-Nommaliseere dom_mer däm <i lang=\"en\">Brion Vibber</i> sing Projramm <code lang=\"en\">utf8_normalize.so</code> nämme.",
        "config-unicode-using-intl": "För et <i lang=\"en\">Unicode</i>-Nommaliseere dom_mer dä [http://pecl.php.net/intl Zohsaz <code lang=\"en\">intl</code> uss em <code lang=\"en\">PECL</code>] nämme.",
        "config-unicode-pure-php-warning": "'''Opjepaß:''' Mer kunnte dä [http://pecl.php.net/intl Zohsaz <code lang=\"en\">intl</code> uss em <code lang=\"en\">PECL</code>] för et <i lang=\"en\">Unicode</i>-Nommaliseere nit fenge. Dröm nämme mer dat eijfache, ävver ärsh lahme, <i lang=\"en\">PHP</i>-Projrammshtöck doför.\nFör jruuße Wikis met vill Metmaachere doht Üsch die Sigg övver et [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations <i lang=\"en\">Unicode</i>-Nommaliseere] (es op Änglesch) aanloore.",
@@ -56,7 +56,8 @@
        "config-no-db": "Mer kunnte kei zopaß Daatebangk-Driiverprojamm fenge.\nMer bruche e Daatebangk-Driiverprojamm för PHP. Dat moß enjeresht wääde.\nMer künne met heh dä Daatebangke ömjonn: $1.\n\nWann De nit om eijene Rääshner bes, moß De Dinge <i lang=\"en\">provider</i> bedde, dat hä Der ene zopaß Driiver enresht.\nWann de PHP sellver övversaz häs, donn e Zohjangsprojramm för en Daatebangk enbenge, för e Beishpell met: <code  lang=\"en\">./configure --with-mysql</code>.\nWann De PHP uss enem <i lang=\"en\">Debian</i> udder <i lang=\"en\">Ubuntu</i> Pakätt enjeresht häs, moß De dann och noch et <code lang=\"en\">php5-mysql</code> op Dinge Räschner bränge.",
        "config-outdated-sqlite": "'''Opjepaß:''' <i lang=\"en\">SQLite</i> $1 es enschtaleert. Avver MediaWiki bruch <i lang=\"en\">SQLite</i> $2 udder hühter. <i lang=\"en\">SQLite</i> kann dröm nit enjesaz wääde.",
        "config-no-fts3": "'''Opjepaß:''' De Projramme vum <i lang=\"en\">SQLite</i> sin der ohne et [//sqlite.org/fts3.html FTS3-Modul] övversaz, dröm wääde de Funxjohne för et Söhke fähle.",
-       "config-register-globals": "'''Opjepaß:''' dem PHP singe Schallder <code lang=\"en\">[http://php.net/register_globals register_globals]</code> es enjeschalldt.\n'''Donn dä ußmaache, wann De kann.'''\nMediaWiki löp och esu, dä künnt ävver Sesherheitslöcke opmaache, di mer noch nit jefonge un eruß jemaat hät.",
+       "config-register-globals-error": "<strong>Fähler: dem PHP sing Enschtällong <code>[http://php.net/register_globals register_globals]</code> es aanjeschalldt.\nSe moß ußjeschalldt sin, domet mer heh wigger maache kann.</strong>\nLoor op dä Sigg [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals] wi mer se ußschallde kann.",
+       "config-magic-quotes-gpc": "'''Dä!''' Dem PHP singe Schallder <code lang=\"en\">[http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc]</code> es enjeschalldt.\nDä määt enjejovve Daate kapott, un doh draan kam_mer dann nix mieh repareere.\nDomet kam_mer MediaWiki nit ennreeshte un och nit loufe lohße.\nDat heiß, mer moß en affschallde, söns jeiht nix.",
        "config-magic-quotes-runtime": "'''Dä!''' Dem PHP singe Schallder <code lang=\"en\">[http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_runtime]</code> es enjeschalldt.\nDä määt enjejovve Daate kapott, un doh draan kam_mer dann nix mieh repareere.\nDomet kam_mer MediaWiki nit ennreeshte un och nit loufe lohße.\nDat heiß, mer moß en affschallde, söns jeiht nix.",
        "config-magic-quotes-sybase": "'''Dä!''' Dem PHP singe Schallder <code lang=\"en\">[http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybase]</code> es enjeschalldt.\nDä määt enjejovve Daate kapott, un doh draan kam_mer dann nix mieh repareere.\nDomet kam_mer MediaWiki nit ennreeshte un och nit loufe lohße.\nDat heiß, mer moß en affschallde, söns jeiht nix.",
        "config-mbstring": "'''Dä!''' Dem PHP singe Schallder <code lang=\"en\">[http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload]</code> es enjeschalldt.\nDat sorresch för Fähler un kann enjejovve Daate esu kapott maach, dat doh draan nix mieh ze repareere es.\nDomet kam_mer MediaWiki nit ennreeshte un och nit loufe lohße.\nDat heiß, mer moß en affschallde, söns jeiht nix.",
@@ -67,6 +68,7 @@
        "config-memory-raised": "Der jrühzte zohjelasse Shpeisherbedarf vum PHP, et <code lang=\"en\">memory_limit</code>, shtund op $1 un es op $2 erop jesaz woode.",
        "config-memory-bad": "'''Opjepaß:''' Dem PHP singe Parameeter <code lang=\"en\">memory_limit</code> es $1.\nDat es wall ze winnisch.\nEt Enreeschte kunnt doh draan kappott jon!",
        "config-ctype": "'''Fähler:''' <i lang=\"en\">PHP</i> moß met dä Ongerschtözong för der [http://www.php.net/manual/en/ctype.installation.php <code lang=\"en\">Ctype</code> Zohsaz] övversaz woode sin.",
+       "config-iconv": "'''Fähler:''' <i lang=\"en\">PHP</i> moß met dä Ongerschtözong för der [http://www.php.net/manual/en/iconv.installation.php <code lang=\"en\">iconv</code> Zohsaz] övversaz woode sin.",
        "config-json": "'''Dä!:''' PHP wood der ohne <i lang=\"en\" xml:lang=\"en\">JSON</i> övversaz.\nJäz moß de äntweeder dä PHP-<i lang=\"en\" xml:lang=\"en\">JSON</i>-Zohsaz enschtallere udder der <i lang=\"en\" xml:lang=\"en\">[http://pecl.php.net/package/jsonc PECL jsonc]</i>-Zohsaz, ih dat de MedijaWikki enschtallere kanns.\n* Dä PHP-Zohsaz es em <i lang=\"en\" xml:lang=\"en\">Red Hat Enterprise Linux (CentOS)</i> 5 un 6 änthallde, moß ävver en de <code lang=\"en\" xml:lang=\"en\">/etc/php.ini</code> udder <code lang=\"en\" xml:lang=\"en\">/etc/php.d/json.ini</code> enjeschalldt wääde.\n* E paa Linux Destrebuzjohne lohß zigg_em Mai 2013 dä PHP-Zohsaz fott un packe doför der PECL-Zohsaz als <code lang=\"en\" xml:lang=\"en\">php5-json</code> udder <code lang=\"en\" xml:lang=\"en\">php-pecl-jsonc</code> med ein.",
        "config-xcache": "Dä <code lang=\"en\">[http://xcache.lighttpd.net/ XCache]</code> es ennjeresht.",
        "config-apc": "Dä <code lang=\"en\">[http://www.php.net/apc APC]</code> es ennjeresht.",
        "config-license-gfdl": "De <i lang=\"en\">GNU</i>-Lizänz för frei Dokemäntazjuhne, Version 1.3 udder en späädere",
        "config-license-pd": "Allmende (jemeinfrei, <i lang=\"en\">public domain</i>)",
        "config-license-cc-choose": "En <i lang=\"en\">Creative Commons</i> Lizänz, sellver ußjesöhk:",
-       "config-license-help": "Ättlijje öffentleje Wikis donn iehr Beidrääsh onger en [http://freedomdefined.org/Definition frei Lizänz] shtelle.\nDat hellef, e Jeföhl vun Jemeinsamkeid opzeboue, un op lange Seesh emmer wider Beidrääsch ze krijje.\nDat es nit onbedengk nüüdesh för e Jeschäffs- udder Privaat_Wiki.\n\nWä Stöcke uß de Wikipedia bruche well, un han well, dat de Wikipedia uss_em eije Wiki jät övvernämme kann, sullt „'''<i lang=\"en\">Creative Commons</i>, dem Schriever singe Name moß jenannt wääde, un Wiggerjävve zoh dersellve Bedengunge es zohjelohße'''“ ußwähle.\n\nDe su jenannte '''<i lang=\"en\">GNU Free Documentation License</i>''' (de freije Lizänz för Dokemäntazjuhne vun dä GNU) sen de ahle Lizänzbedenonge vun de Wikipedia. Se es emmer noch in Odenong un jöltesch, ävver se es schwer ze vershtonn un et Wiggerjävve un widder Verwände es manshmool schwieeresch domet.",
+       "config-license-help": "Ättlijje öffentleje Wikis donn iehr Beidrääsch onger en [http://freedomdefined.org/Definition freije Lizänz] schtelle.\nDat hellef, e Jeföhl vun Jemeinsamkeid opzeboue, un op lange Seesch emmer wider Beidrääsch ze krijje.\nDat es nit onbedengk nüüdesh för e Jeschäffs- udder Privaat_Wiki.\n\nWä Stöcke uß de Wikipedia bruche well, un dröm han well, dat mer för Wikipedia uss_em eije Wiki jät övvernämme kann, sullt „'''<i lang=\"en\">Creative Commons</i>, dem Schriever singe Name moß jenannt wääde, un Wiggerjävve zoh dersellve Bedengunge es zohjelohße'''“ ußwähle.\n\nDe su jenannte '''<i lang=\"en\">GNU Free Documentation License</i>''' (de freije Lizänz för Dokemäntazjuhne vun dä GNU) sen de ahle Lizänzbedenonge vun de Wikipedia. Se es emmer noch in Odenong un jöltesch, ävver se es schwer ze verschtonn un et Wiggerjävve un widder Bruche es ens schwieerejer domet.",
        "config-email-settings": "Enschtellunge för de <i lang=\"en\">e-mail</i>",
        "config-enable-email": "De <i lang=\"en\">e-mail</i> noh druße zohlohße",
        "config-enable-email-help": "Sulle <i lang=\"en\">e-mails</i> zohjelohße sin, moß mer, domet et noher flupp, de [http://www.php.net/manual/en/mail.configuration.php Enschtellunge em PHP för de <i lang=\"en\">e-mails</i>] zopaß jemaat han.\nWann kein <i lang=\"en\">e-mails</i> nüüdesch sin, kam_mer se heh afschallde.",
        "config-memcache-badport": "Dem <code lang=\"en\">memcached</code> ẞööver singe Pooz (<code lang=\"en\">port</code>) Nommere sullte zwesche $1 un $2 sin.",
        "config-extensions": "Projramm-Zohsäz (<i lang=\"en\">Extensions</i>)",
        "config-extensions-help": "Di bovve opjeleß Zohsazprojramme för et MediaWiki sin em Verzeischneß <code lang=\"en\">./extensions</code> ald ze fenge.\n\nDo kann se heh un jez aanschallde, ävver se künnte noch zohsäzlesch Enshtellunge bruche.",
+       "config-skins": "Bedeenbovverfläsche",
+       "config-skins-help": "De opjeleß Beddenbovverfläsche sin en Dingem Verzeischnesß <code>./skins</code> dre. Do moß winneschßdens eine enschallde, un eine för der Schtandatt ußsöhke.",
+       "config-skins-use-as-default": "Donn heh di Bovverfläsch als der Schtandatt nämme.",
+       "config-skins-missing": "Mer han kein bedeebovverfläsche jevonge un nämme dröm der Schtandatt, bes De wälsche enjeresch häß.",
+       "config-skins-must-enable-some": "Do moß winneschßtens ein Beddenbovverfläsch ußsöhke zum aanschallde.",
+       "config-skins-must-enable-default": "De Schtadatt-Beddenbovverfläsch moß och enjeschalldt sin.",
        "config-install-alreadydone": "'''Opjepaß:'''\nEt sühd esu uß, wi wann De MediaWiki ald enshtalleet hätß, un wöhrs aam Versöhke, dat norr_ens ze donn.\nJang wigger op de näähßte Sigg.",
        "config-install-begin": "Wann De op „{{int:config-continue}}“ klecks, jeiht de Enshtallazjuhn vum MediaWiki loßß.\nWann De noch Änderonge maache wells, dann kleck op „{{int:config-back}}“.",
        "config-install-step-done": "jedonn",
        "config-install-stats": "De Shtatestek-Zahle wääde op Aanfang jeshtallt.",
        "config-install-keys": "Jeheime Schlößel wääde opjebout.",
        "config-insecure-keys": "'''Opjepaß:''' {{PLURAL:$2|Ene jeheime Schlößel|Jeheim Schlößele|Keine jeheime Schlößel}} ($1) {{PLURAL:$2|es|sin|es}} automattesch aanjelaat woode. {{PLURAL:$2|Dä es|Di sin|Hä es}} ävver nit onbedengk janz sescher. Övverlääsch Der, {{PLURAL:$2|dä|di|en}} norr_ens vun Hand ze ändere.",
+       "config-install-updates": "Donn kein onnühdeje Änderonge maache.",
+       "config-install-updates-failed": "<strong>Dä:</strong> Schlößßelle för et Ändere en Tabälle  bränge es donävve jajange. Jemäldt wood: $1",
        "config-install-sysop": "Dä Zohjang för der Wiki-Köbes weed aanjelaat.",
        "config-install-subscribe-fail": "Mer künne de <i lang=\"en\">e-mail</i>-Leß <code lang=\"en\">mediawiki-announce</code> nit abonneere: $1",
        "config-install-subscribe-notpossible": "<code lang=\"en\">cURL</code> es nit enstalleed un <code lang=\"en\">allow_url_fopen</code>es nit doh.",
        "config-install-done": "'''Jlöckwonsch!'''\nMediaWiki es jetz enstalleet.\n\nEt Projramm zom Enreeschte hät en Dattei <code lang=\"en\">LocalSettings.php</code> aanjelaat.\nDoh sin de Enstellunge vum Wiki dren.\n\nDo weeß se eronge laade möße un dann en dem Wiki sing Aanfangsverzeishnes donn möße, et sellve Verzeisneß, woh di Dattei <code lang=\"en\">index.php</code> dren litt. Dat Erongerlaade sullt automattesch aanjefange han.\n\nWann domet jet nit jeflupp hät, udder De di Dattei norr_ens han wells, donn op dä Lengk heh dronger klecke:\n\n$3\n\n'''Opjepaß''': Wann De dat jez nit deihß, es alles verschött, wat De bes jöz enjejovve häs, weil di Dattei fott es en däm Momang, woh heh dat Projamm aam Engk es.\n\nWann De mem Ronger- un widder Huhlaade fäädesh bes, kanns De '''[$2 en Ding Wiki jonn]'''.",
        "config-download-localsettings": "Donn di Dattei <code lang=\"en\">LocalSettings.php</code> eronger laade",
        "config-help": "Hölp",
+       "config-help-tooltip": "Donn Hölp heh aan däm Plaaz enblände.",
        "config-nofile": "De Dattei „$1“ ham_mer nit jefonge. Es di fottjeschmeße?",
        "config-extension-link": "Häs De jewoß, dat et Wiki [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions Zohsazprojramme] hann kann?\n\nDo kanns [//www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category Zohsazprojramme noh Saachjroppe] söhke udder en de [//www.mediawiki.org/wiki/Extension_Matrix Tabäll met de Zohsazprojramme] kike, öm de kumplätte Leß met de Zohsazprojramme ze krijje.",
        "mainpagetext": "'''MediaWiki es jäz enschtalleht.'''",
index ee3f2c2..d89c5d2 100644 (file)
@@ -87,7 +87,7 @@ abstract class Job implements IJobSpecification {
         * This may add duplicate at insert time, but they will be
         * removed later on, when the first one is popped.
         *
-        * @param array $jobs Array of Job objects
+        * @param Job[] $jobs Array of Job objects
         * @return bool
         * @deprecated since 1.21
         */
@@ -103,7 +103,7 @@ abstract class Job implements IJobSpecification {
         * be rolled-back as part of a larger transaction. However,
         * large batches of jobs can cause slave lag.
         *
-        * @param array $jobs Array of Job objects
+        * @param Job[] $jobs Array of Job objects
         * @return bool
         * @deprecated since 1.21
         */
@@ -143,7 +143,7 @@ abstract class Job implements IJobSpecification {
        /**
         * @param string $command
         * @param Title $title
-        * @param array|bool $params
+        * @param array|bool $params Can not be === true
         */
        public function __construct( $command, $title, $params = false ) {
                $this->command = $command;
index 98a78c5..b0b35e9 100644 (file)
@@ -104,7 +104,7 @@ class JobQueueGroup {
         * This inserts the jobs into the queue specified by $wgJobTypeConf
         * and updates the aggregate job queue information cache as needed.
         *
-        * @param Job|array $jobs A single Job or a list of Jobs
+        * @param Job|Job[] $jobs A single Job or a list of Jobs
         * @throws MWException
         * @return void
         */
index 8ccceda..e38aa5f 100644 (file)
@@ -76,6 +76,14 @@ class JobRunner {
                        $this->runJobsLog( "Executed $count periodic queue task(s)." );
                }
 
+               // Bail out if there is too much DB lag
+               // @note: getLagTimes() has better caching than getMaxLag()
+               $maxLag = max( wfGetLBFactory()->getMainLB( wfWikiID() )->getLagTimes() );
+               if ( $maxLag >= 5 ) {
+                       $response['reached'] = 'slave-lag-limit';
+                       return $response;
+               }
+
                // Flush any pending DB writes for sanity
                wfGetLBFactory()->commitMasterChanges();
 
@@ -87,8 +95,10 @@ class JobRunner {
                $jobsRun = 0;
                $timeMsTotal = 0;
                $flags = JobQueueGroup::USE_CACHE;
+               $checkPeriod = 5.0; // seconds
+               $checkPhase = mt_rand( 0, 1000 * $checkPeriod ) / 1000; // avoid stampedes
                $startTime = microtime( true ); // time since jobs started running
-               $lastTime = microtime( true ); // time since last slave check
+               $lastTime = microtime( true ) - $checkPhase; // time since last slave check
                do {
                        // Sync the persistent backoffs with concurrent runners
                        $backoffs = $this->syncBackoffDeltas( $backoffs, $backoffDeltas, $wait );
@@ -172,10 +182,15 @@ class JobRunner {
                                        break;
                                }
 
-                               // Don't let any of the main DB slaves get backed up
+                               // Don't let any of the main DB slaves get backed up.
+                               // This only waits for so long before exiting and letting
+                               // other wikis in the farm (on different masters) get a chance.
                                $timePassed = microtime( true ) - $lastTime;
                                if ( $timePassed >= 5 || $timePassed < 0 ) {
-                                       wfWaitForSlaves( $lastTime );
+                                       if ( !wfWaitForSlaves( $lastTime, wfWikiID(), false, 5 ) ) {
+                                               $response['reached'] = 'slave-lag-limit';
+                                               break;
+                                       }
                                        $lastTime = microtime( true );
                                }
                                // Don't let any queue slaves/backups fall behind
index 7b7b407..4cfc9b7 100644 (file)
@@ -174,22 +174,6 @@ class CSSJanus {
                $css = $noFlipClass->detokenize( $css );
                $css = $noFlipSingle->detokenize( $css );
 
-               // Remove remaining /* @noflip */ annotations, they won't be needed anymore
-               // and can interfere with other code (bug 69698).
-               $css = self::nullTransform( $css );
-
-               return $css;
-       }
-
-       /**
-        * Remove @noflip annotations, but don't do any other transforms.
-        * @param string $css stylesheet to transform
-        * @return string Transformed stylesheet
-        */
-       public static function nullTransform( $css ) {
-               $patt = self::$patterns['noflip_annotation'];
-               $css = preg_replace( "/($patt)\\s*/i", '', $css );
-
                return $css;
        }
 
index dcaa685..c69e79f 100644 (file)
@@ -200,10 +200,9 @@ class CSSMin {
                        $remote = substr( $remote, 0, -1 );
                }
 
-               // Replace all comments by a placeholder so they will not interfere
-               // with the remapping
-               // Warning: This will also catch on anything looking like the start of
-               // a comment between quotation marks (e.g. "foo /* bar").
+               // Replace all comments by a placeholder so they will not interfere with the remapping.
+               // Warning: This will also catch on anything looking like the start of a comment between
+               // quotation marks (e.g. "foo /* bar").
                $comments = array();
                $placeholder = uniqid( '', true );
 
@@ -226,12 +225,13 @@ class CSSMin {
 
                $source = preg_replace_callback(
                        $pattern,
-                       function ( $matchOuter ) use ( $local, $remote, $embedData ) {
+                       function ( $matchOuter ) use ( $local, $remote, $embedData, $placeholder ) {
                                $rule = $matchOuter[0];
 
-                               // Check for global @embed comment and remove it
+                               // Check for global @embed comment and remove it. Allow other comments to be present
+                               // before @embed (they have been replaced with placeholders at this point).
                                $embedAll = false;
-                               $rule = preg_replace( '/^(\s*)' . CSSMin::EMBED_REGEX . '\s*/', '$1', $rule, 1, $embedAll );
+                               $rule = preg_replace( '/^((?:\s+|' . $placeholder . '(\d+)x)*)' . CSSMin::EMBED_REGEX . '\s*/', '$1', $rule, 1, $embedAll );
 
                                // Build two versions of current rule: with remapped URLs
                                // and with embedded data: URIs (where possible).
index 7b3ddb5..3cf8488 100644 (file)
@@ -174,7 +174,10 @@ class PNGHandler extends BitmapHandler {
                return $wgLang->commaList( $info );
        }
 
+       // PNGs should be easy to support, but it will need some sharpening applied
+       // and another user test to check if the perceived quality change is noticeable
+
        public function supportsBucketing() {
-               return true;
+               return false;
        }
 }
index 84bb224..8bd96b5 100644 (file)
@@ -258,6 +258,21 @@ class Parser {
         */
        public function __clone() {
                $this->mInParse = false;
+
+               // Bug 56226: When you create a reference "to" an object field, that
+               // makes the object field itself be a reference too (until the other
+               // reference goes out of scope). When cloning, any field that's a
+               // reference is copied as a reference in the new object. Both of these
+               // are defined PHP5 behaviors, as inconvenient as it is for us when old
+               // hooks from PHP4 days are passing fields by reference.
+               foreach ( array( 'mStripState', 'mVarCache' ) as $k ) {
+                       // Make a non-reference copy of the field, then rebind the field to
+                       // reference the new copy.
+                       $tmp = $this->$k;
+                       $this->$k =& $tmp;
+                       unset( $tmp );
+               }
+
                wfRunHooks( 'ParserCloned', array( $this ) );
        }
 
index 4f1414b..57deb00 100644 (file)
@@ -35,22 +35,32 @@ class ResourceLoader {
        /** @var bool */
        protected static $debugMode = null;
 
-       /** @var array Module name/ResourceLoaderModule object pairs */
+       /**
+        * Module name/ResourceLoaderModule object pairs
+        * @var array
+        */
        protected $modules = array();
 
-       /** @var array Associative array mapping module name to info associative array */
+       /**
+        * Associative array mapping module name to info associative array
+        * @var array
+        */
        protected $moduleInfos = array();
 
        /** @var Config $config */
        private $config;
 
        /**
-        * @var array Associative array mapping framework ids to a list of names of test suite modules
-        *      like array( 'qunit' => array( 'mediawiki.tests.qunit.suites', 'ext.foo.tests', .. ), .. )
+        * Associative array mapping framework ids to a list of names of test suite modules
+        * like array( 'qunit' => array( 'mediawiki.tests.qunit.suites', 'ext.foo.tests', .. ), .. )
+        * @var array
         */
        protected $testModuleNames = array();
 
-       /** @var array E.g. array( 'source-id' => 'http://.../load.php' ) */
+       /**
+        * E.g. array( 'source-id' => 'http://.../load.php' )
+        * @var array
+        */
        protected $sources = array();
 
        /** @var bool */
index 137ff62..dc8b14a 100644 (file)
@@ -870,8 +870,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
 
                if ( $flip ) {
                        $style = CSSJanus::transform( $style, true, false );
-               } else {
-                       $style = CSSJanus::nullTransform( $style );
                }
                $localDir = dirname( $localPath );
                $remoteDir = dirname( $remotePath );
index 7abecc7..40274c6 100644 (file)
@@ -83,8 +83,6 @@ class ResourceLoaderUserCSSPrefsModule extends ResourceLoaderModule {
                $style = implode( "\n", $rules );
                if ( $this->getFlip( $context ) ) {
                        $style = CSSJanus::transform( $style, true, false );
-               } else {
-                       $style = CSSJanus::nullTransform( $style );
                }
                return array( 'all' => $style );
        }
index 2eaca67..99a8739 100644 (file)
@@ -81,9 +81,15 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
         * @return null|string
         */
        protected function getContent( $title ) {
-               if ( !$title->isCssJsSubpage() && !$title->isCssOrJsPage() ) {
+               $handler = ContentHandler::getForTitle( $title );
+               if ( $handler->isSupportedFormat( CONTENT_FORMAT_CSS ) ) {
+                       $format = CONTENT_FORMAT_CSS;
+               } elseif ( $handler->isSupportedFormat( CONTENT_FORMAT_JAVASCRIPT ) ) {
+                       $format = CONTENT_FORMAT_JAVASCRIPT;
+               } else {
                        return null;
                }
+
                $revision = Revision::newFromTitle( $title, false, Revision::READ_NORMAL );
                if ( !$revision ) {
                        return null;
@@ -96,14 +102,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
                        return null;
                }
 
-               if ( $content->isSupportedFormat( CONTENT_FORMAT_JAVASCRIPT ) ) {
-                       return $content->serialize( CONTENT_FORMAT_JAVASCRIPT );
-               } elseif ( $content->isSupportedFormat( CONTENT_FORMAT_CSS ) ) {
-                       return $content->serialize( CONTENT_FORMAT_CSS );
-               } else {
-                       wfDebugLog( 'resourceloader', __METHOD__ . ": bad content model {$content->getModel()} for JS/CSS page!" );
-                       return null;
-               }
+               return $content->serialize( $format );
        }
 
        /* Methods */
@@ -152,8 +151,6 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
                        }
                        if ( $this->getFlip( $context ) ) {
                                $style = CSSJanus::transform( $style, true, false );
-                       } else {
-                               $style = CSSJanus::nullTransform( $style );
                        }
                        $style = CSSMin::remap( $style, false, $this->getConfig()->get( 'ScriptPath' ), true );
                        if ( !isset( $styles[$media] ) ) {
diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php
new file mode 100644 (file)
index 0000000..6dc33ac
--- /dev/null
@@ -0,0 +1,614 @@
+<?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
+ */
+
+/**
+ * New base template for a skin's template extended from QuickTemplate
+ * this class features helper methods that provide common ways of interacting
+ * with the data stored in the QuickTemplate
+ */
+abstract class BaseTemplate extends QuickTemplate {
+
+       /**
+        * Get a Message object with its context set
+        *
+        * @param string $name Message name
+        * @return Message
+        */
+       public function getMsg( $name ) {
+               return $this->getSkin()->msg( $name );
+       }
+
+       function msg( $str ) {
+               echo $this->getMsg( $str )->escaped();
+       }
+
+       function msgHtml( $str ) {
+               echo $this->getMsg( $str )->text();
+       }
+
+       function msgWiki( $str ) {
+               echo $this->getMsg( $str )->parseAsBlock();
+       }
+
+       /**
+        * Create an array of common toolbox items from the data in the quicktemplate
+        * stored by SkinTemplate.
+        * The resulting array is built according to a format intended to be passed
+        * through makeListItem to generate the html.
+        * @return array
+        */
+       function getToolbox() {
+               wfProfileIn( __METHOD__ );
+
+               $toolbox = array();
+               if ( isset( $this->data['nav_urls']['whatlinkshere'] )
+                       && $this->data['nav_urls']['whatlinkshere']
+               ) {
+                       $toolbox['whatlinkshere'] = $this->data['nav_urls']['whatlinkshere'];
+                       $toolbox['whatlinkshere']['id'] = 't-whatlinkshere';
+               }
+               if ( isset( $this->data['nav_urls']['recentchangeslinked'] )
+                       && $this->data['nav_urls']['recentchangeslinked']
+               ) {
+                       $toolbox['recentchangeslinked'] = $this->data['nav_urls']['recentchangeslinked'];
+                       $toolbox['recentchangeslinked']['msg'] = 'recentchangeslinked-toolbox';
+                       $toolbox['recentchangeslinked']['id'] = 't-recentchangeslinked';
+               }
+               if ( isset( $this->data['feeds'] ) && $this->data['feeds'] ) {
+                       $toolbox['feeds']['id'] = 'feedlinks';
+                       $toolbox['feeds']['links'] = array();
+                       foreach ( $this->data['feeds'] as $key => $feed ) {
+                               $toolbox['feeds']['links'][$key] = $feed;
+                               $toolbox['feeds']['links'][$key]['id'] = "feed-$key";
+                               $toolbox['feeds']['links'][$key]['rel'] = 'alternate';
+                               $toolbox['feeds']['links'][$key]['type'] = "application/{$key}+xml";
+                               $toolbox['feeds']['links'][$key]['class'] = 'feedlink';
+                       }
+               }
+               foreach ( array( 'contributions', 'log', 'blockip', 'emailuser',
+                       'userrights', 'upload', 'specialpages' ) as $special
+               ) {
+                       if ( isset( $this->data['nav_urls'][$special] ) && $this->data['nav_urls'][$special] ) {
+                               $toolbox[$special] = $this->data['nav_urls'][$special];
+                               $toolbox[$special]['id'] = "t-$special";
+                       }
+               }
+               if ( isset( $this->data['nav_urls']['print'] ) && $this->data['nav_urls']['print'] ) {
+                       $toolbox['print'] = $this->data['nav_urls']['print'];
+                       $toolbox['print']['id'] = 't-print';
+                       $toolbox['print']['rel'] = 'alternate';
+                       $toolbox['print']['msg'] = 'printableversion';
+               }
+               if ( isset( $this->data['nav_urls']['permalink'] ) && $this->data['nav_urls']['permalink'] ) {
+                       $toolbox['permalink'] = $this->data['nav_urls']['permalink'];
+                       if ( $toolbox['permalink']['href'] === '' ) {
+                               unset( $toolbox['permalink']['href'] );
+                               $toolbox['ispermalink']['tooltiponly'] = true;
+                               $toolbox['ispermalink']['id'] = 't-ispermalink';
+                               $toolbox['ispermalink']['msg'] = 'permalink';
+                       } else {
+                               $toolbox['permalink']['id'] = 't-permalink';
+                       }
+               }
+               if ( isset( $this->data['nav_urls']['info'] ) && $this->data['nav_urls']['info'] ) {
+                       $toolbox['info'] = $this->data['nav_urls']['info'];
+                       $toolbox['info']['id'] = 't-info';
+               }
+
+               wfRunHooks( 'BaseTemplateToolbox', array( &$this, &$toolbox ) );
+               wfProfileOut( __METHOD__ );
+               return $toolbox;
+       }
+
+       /**
+        * Create an array of personal tools items from the data in the quicktemplate
+        * stored by SkinTemplate.
+        * The resulting array is built according to a format intended to be passed
+        * through makeListItem to generate the html.
+        * This is in reality the same list as already stored in personal_urls
+        * however it is reformatted so that you can just pass the individual items
+        * to makeListItem instead of hardcoding the element creation boilerplate.
+        * @return array
+        */
+       function getPersonalTools() {
+               $personal_tools = array();
+               foreach ( $this->get( 'personal_urls' ) as $key => $plink ) {
+                       # The class on a personal_urls item is meant to go on the <a> instead
+                       # of the <li> so we have to use a single item "links" array instead
+                       # of using most of the personal_url's keys directly.
+                       $ptool = array(
+                               'links' => array(
+                                       array( 'single-id' => "pt-$key" ),
+                               ),
+                               'id' => "pt-$key",
+                       );
+                       if ( isset( $plink['active'] ) ) {
+                               $ptool['active'] = $plink['active'];
+                       }
+                       foreach ( array( 'href', 'class', 'text', 'dir' ) as $k ) {
+                               if ( isset( $plink[$k] ) ) {
+                                       $ptool['links'][0][$k] = $plink[$k];
+                               }
+                       }
+                       $personal_tools[$key] = $ptool;
+               }
+               return $personal_tools;
+       }
+
+       function getSidebar( $options = array() ) {
+               // Force the rendering of the following portals
+               $sidebar = $this->data['sidebar'];
+               if ( !isset( $sidebar['SEARCH'] ) ) {
+                       $sidebar['SEARCH'] = true;
+               }
+               if ( !isset( $sidebar['TOOLBOX'] ) ) {
+                       $sidebar['TOOLBOX'] = true;
+               }
+               if ( !isset( $sidebar['LANGUAGES'] ) ) {
+                       $sidebar['LANGUAGES'] = true;
+               }
+
+               if ( !isset( $options['search'] ) || $options['search'] !== true ) {
+                       unset( $sidebar['SEARCH'] );
+               }
+               if ( isset( $options['toolbox'] ) && $options['toolbox'] === false ) {
+                       unset( $sidebar['TOOLBOX'] );
+               }
+               if ( isset( $options['languages'] ) && $options['languages'] === false ) {
+                       unset( $sidebar['LANGUAGES'] );
+               }
+
+               $boxes = array();
+               foreach ( $sidebar as $boxName => $content ) {
+                       if ( $content === false ) {
+                               continue;
+                       }
+                       switch ( $boxName ) {
+                       case 'SEARCH':
+                               // Search is a special case, skins should custom implement this
+                               $boxes[$boxName] = array(
+                                       'id' => 'p-search',
+                                       'header' => $this->getMsg( 'search' )->text(),
+                                       'generated' => false,
+                                       'content' => true,
+                               );
+                               break;
+                       case 'TOOLBOX':
+                               $msgObj = $this->getMsg( 'toolbox' );
+                               $boxes[$boxName] = array(
+                                       'id' => 'p-tb',
+                                       'header' => $msgObj->exists() ? $msgObj->text() : 'toolbox',
+                                       'generated' => false,
+                                       'content' => $this->getToolbox(),
+                               );
+                               break;
+                       case 'LANGUAGES':
+                               if ( $this->data['language_urls'] ) {
+                                       $msgObj = $this->getMsg( 'otherlanguages' );
+                                       $boxes[$boxName] = array(
+                                               'id' => 'p-lang',
+                                               'header' => $msgObj->exists() ? $msgObj->text() : 'otherlanguages',
+                                               'generated' => false,
+                                               'content' => $this->data['language_urls'],
+                                       );
+                               }
+                               break;
+                       default:
+                               $msgObj = $this->getMsg( $boxName );
+                               $boxes[$boxName] = array(
+                                       'id' => "p-$boxName",
+                                       'header' => $msgObj->exists() ? $msgObj->text() : $boxName,
+                                       'generated' => true,
+                                       'content' => $content,
+                               );
+                               break;
+                       }
+               }
+
+               // HACK: Compatibility with extensions still using SkinTemplateToolboxEnd
+               $hookContents = null;
+               if ( isset( $boxes['TOOLBOX'] ) ) {
+                       ob_start();
+                       // We pass an extra 'true' at the end so extensions using BaseTemplateToolbox
+                       // can abort and avoid outputting double toolbox links
+                       wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this, true ) );
+                       $hookContents = ob_get_contents();
+                       ob_end_clean();
+                       if ( !trim( $hookContents ) ) {
+                               $hookContents = null;
+                       }
+               }
+               // END hack
+
+               if ( isset( $options['htmlOnly'] ) && $options['htmlOnly'] === true ) {
+                       foreach ( $boxes as $boxName => $box ) {
+                               if ( is_array( $box['content'] ) ) {
+                                       $content = '<ul>';
+                                       foreach ( $box['content'] as $key => $val ) {
+                                               $content .= "\n " . $this->makeListItem( $key, $val );
+                                       }
+                                       // HACK, shove the toolbox end onto the toolbox if we're rendering itself
+                                       if ( $hookContents ) {
+                                               $content .= "\n $hookContents";
+                                       }
+                                       // END hack
+                                       $content .= "\n</ul>\n";
+                                       $boxes[$boxName]['content'] = $content;
+                               }
+                       }
+               } else {
+                       if ( $hookContents ) {
+                               $boxes['TOOLBOXEND'] = array(
+                                       'id' => 'p-toolboxend',
+                                       'header' => $boxes['TOOLBOX']['header'],
+                                       'generated' => false,
+                                       'content' => "<ul>{$hookContents}</ul>",
+                               );
+                               // HACK: Make sure that TOOLBOXEND is sorted next to TOOLBOX
+                               $boxes2 = array();
+                               foreach ( $boxes as $key => $box ) {
+                                       if ( $key === 'TOOLBOXEND' ) {
+                                               continue;
+                                       }
+                                       $boxes2[$key] = $box;
+                                       if ( $key === 'TOOLBOX' ) {
+                                               $boxes2['TOOLBOXEND'] = $boxes['TOOLBOXEND'];
+                                       }
+                               }
+                               $boxes = $boxes2;
+                               // END hack
+                       }
+               }
+
+               return $boxes;
+       }
+
+       /**
+        * @param string $name
+        */
+       protected function renderAfterPortlet( $name ) {
+               $content = '';
+               wfRunHooks( 'BaseTemplateAfterPortlet', array( $this, $name, &$content ) );
+
+               if ( $content !== '' ) {
+                       echo "<div class='after-portlet after-portlet-$name'>$content</div>";
+               }
+
+       }
+
+       /**
+        * Makes a link, usually used by makeListItem to generate a link for an item
+        * in a list used in navigation lists, portlets, portals, sidebars, etc...
+        *
+        * @param string $key Usually a key from the list you are generating this
+        * link from.
+        * @param array $item Contains some of a specific set of keys.
+        *
+        * The text of the link will be generated either from the contents of the
+        * "text" key in the $item array, if a "msg" key is present a message by
+        * that name will be used, and if neither of those are set the $key will be
+        * used as a message name.
+        *
+        * If a "href" key is not present makeLink will just output htmlescaped text.
+        * The "href", "id", "class", "rel", and "type" keys are used as attributes
+        * for the link if present.
+        *
+        * If an "id" or "single-id" (if you don't want the actual id to be output
+        * on the link) is present it will be used to generate a tooltip and
+        * accesskey for the link.
+        *
+        * The keys "context" and "primary" are ignored; these keys are used
+        * internally by skins and are not supposed to be included in the HTML
+        * output.
+        *
+        * If you don't want an accesskey, set $item['tooltiponly'] = true;
+        *
+        * @param array $options Can be used to affect the output of a link.
+        * Possible options are:
+        *   - 'text-wrapper' key to specify a list of elements to wrap the text of
+        *   a link in. This should be an array of arrays containing a 'tag' and
+        *   optionally an 'attributes' key. If you only have one element you don't
+        *   need to wrap it in another array. eg: To use <a><span>...</span></a>
+        *   in all links use array( 'text-wrapper' => array( 'tag' => 'span' ) )
+        *   for your options.
+        *   - 'link-class' key can be used to specify additional classes to apply
+        *   to all links.
+        *   - 'link-fallback' can be used to specify a tag to use instead of "<a>"
+        *   if there is no link. eg: If you specify 'link-fallback' => 'span' than
+        *   any non-link will output a "<span>" instead of just text.
+        *
+        * @return string
+        */
+       function makeLink( $key, $item, $options = array() ) {
+               if ( isset( $item['text'] ) ) {
+                       $text = $item['text'];
+               } else {
+                       $text = $this->translator->translate( isset( $item['msg'] ) ? $item['msg'] : $key );
+               }
+
+               $html = htmlspecialchars( $text );
+
+               if ( isset( $options['text-wrapper'] ) ) {
+                       $wrapper = $options['text-wrapper'];
+                       if ( isset( $wrapper['tag'] ) ) {
+                               $wrapper = array( $wrapper );
+                       }
+                       while ( count( $wrapper ) > 0 ) {
+                               $element = array_pop( $wrapper );
+                               $html = Html::rawElement( $element['tag'], isset( $element['attributes'] )
+                                       ? $element['attributes']
+                                       : null, $html );
+                       }
+               }
+
+               if ( isset( $item['href'] ) || isset( $options['link-fallback'] ) ) {
+                       $attrs = $item;
+                       foreach ( array( 'single-id', 'text', 'msg', 'tooltiponly', 'context', 'primary' ) as $k ) {
+                               unset( $attrs[$k] );
+                       }
+
+                       if ( isset( $item['id'] ) && !isset( $item['single-id'] ) ) {
+                               $item['single-id'] = $item['id'];
+                       }
+                       if ( isset( $item['single-id'] ) ) {
+                               if ( isset( $item['tooltiponly'] ) && $item['tooltiponly'] ) {
+                                       $title = Linker::titleAttrib( $item['single-id'] );
+                                       if ( $title !== false ) {
+                                               $attrs['title'] = $title;
+                                       }
+                               } else {
+                                       $tip = Linker::tooltipAndAccesskeyAttribs( $item['single-id'] );
+                                       if ( isset( $tip['title'] ) && $tip['title'] !== false ) {
+                                               $attrs['title'] = $tip['title'];
+                                       }
+                                       if ( isset( $tip['accesskey'] ) && $tip['accesskey'] !== false ) {
+                                               $attrs['accesskey'] = $tip['accesskey'];
+                                       }
+                               }
+                       }
+                       if ( isset( $options['link-class'] ) ) {
+                               if ( isset( $attrs['class'] ) ) {
+                                       $attrs['class'] .= " {$options['link-class']}";
+                               } else {
+                                       $attrs['class'] = $options['link-class'];
+                               }
+                       }
+                       $html = Html::rawElement( isset( $attrs['href'] )
+                               ? 'a'
+                               : $options['link-fallback'], $attrs, $html );
+               }
+
+               return $html;
+       }
+
+       /**
+        * Generates a list item for a navigation, portlet, portal, sidebar... list
+        *
+        * @param string $key Usually a key from the list you are generating this link from.
+        * @param array $item Array of list item data containing some of a specific set of keys.
+        * The "id", "class" and "itemtitle" keys will be used as attributes for the list item,
+        * if "active" contains a value of true a "active" class will also be appended to class.
+        *
+        * @param array $options
+        *
+        * If you want something other than a "<li>" you can pass a tag name such as
+        * "tag" => "span" in the $options array to change the tag used.
+        * link/content data for the list item may come in one of two forms
+        * A "links" key may be used, in which case it should contain an array with
+        * a list of links to include inside the list item, see makeLink for the
+        * format of individual links array items.
+        *
+        * Otherwise the relevant keys from the list item $item array will be passed
+        * to makeLink instead. Note however that "id" and "class" are used by the
+        * list item directly so they will not be passed to makeLink
+        * (however the link will still support a tooltip and accesskey from it)
+        * If you need an id or class on a single link you should include a "links"
+        * array with just one link item inside of it. If you want to add a title
+        * to the list item itself, you can set "itemtitle" to the value.
+        * $options is also passed on to makeLink calls
+        *
+        * @return string
+        */
+       function makeListItem( $key, $item, $options = array() ) {
+               if ( isset( $item['links'] ) ) {
+                       $links = array();
+                       foreach ( $item['links'] as $linkKey => $link ) {
+                               $links[] = $this->makeLink( $linkKey, $link, $options );
+                       }
+                       $html = implode( ' ', $links );
+               } else {
+                       $link = $item;
+                       // These keys are used by makeListItem and shouldn't be passed on to the link
+                       foreach ( array( 'id', 'class', 'active', 'tag', 'itemtitle' ) as $k ) {
+                               unset( $link[$k] );
+                       }
+                       if ( isset( $item['id'] ) && !isset( $item['single-id'] ) ) {
+                               // The id goes on the <li> not on the <a> for single links
+                               // but makeSidebarLink still needs to know what id to use when
+                               // generating tooltips and accesskeys.
+                               $link['single-id'] = $item['id'];
+                       }
+                       $html = $this->makeLink( $key, $link, $options );
+               }
+
+               $attrs = array();
+               foreach ( array( 'id', 'class' ) as $attr ) {
+                       if ( isset( $item[$attr] ) ) {
+                               $attrs[$attr] = $item[$attr];
+                       }
+               }
+               if ( isset( $item['active'] ) && $item['active'] ) {
+                       if ( !isset( $attrs['class'] ) ) {
+                               $attrs['class'] = '';
+                       }
+                       $attrs['class'] .= ' active';
+                       $attrs['class'] = trim( $attrs['class'] );
+               }
+               if ( isset( $item['itemtitle'] ) ) {
+                       $attrs['title'] = $item['itemtitle'];
+               }
+               return Html::rawElement( isset( $options['tag'] ) ? $options['tag'] : 'li', $attrs, $html );
+       }
+
+       function makeSearchInput( $attrs = array() ) {
+               $realAttrs = array(
+                       'type' => 'search',
+                       'name' => 'search',
+                       'placeholder' => wfMessage( 'searchsuggest-search' )->text(),
+                       'value' => $this->get( 'search', '' ),
+               );
+               $realAttrs = array_merge( $realAttrs, Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs );
+               return Html::element( 'input', $realAttrs );
+       }
+
+       function makeSearchButton( $mode, $attrs = array() ) {
+               switch ( $mode ) {
+                       case 'go':
+                       case 'fulltext':
+                               $realAttrs = array(
+                                       'type' => 'submit',
+                                       'name' => $mode,
+                                       'value' => $this->translator->translate(
+                                               $mode == 'go' ? 'searcharticle' : 'searchbutton' ),
+                               );
+                               $realAttrs = array_merge(
+                                       $realAttrs,
+                                       Linker::tooltipAndAccesskeyAttribs( "search-$mode" ),
+                                       $attrs
+                               );
+                               return Html::element( 'input', $realAttrs );
+                       case 'image':
+                               $buttonAttrs = array(
+                                       'type' => 'submit',
+                                       'name' => 'button',
+                               );
+                               $buttonAttrs = array_merge(
+                                       $buttonAttrs,
+                                       Linker::tooltipAndAccesskeyAttribs( 'search-fulltext' ),
+                                       $attrs
+                               );
+                               unset( $buttonAttrs['src'] );
+                               unset( $buttonAttrs['alt'] );
+                               unset( $buttonAttrs['width'] );
+                               unset( $buttonAttrs['height'] );
+                               $imgAttrs = array(
+                                       'src' => $attrs['src'],
+                                       'alt' => isset( $attrs['alt'] )
+                                               ? $attrs['alt']
+                                               : $this->translator->translate( 'searchbutton' ),
+                                       'width' => isset( $attrs['width'] ) ? $attrs['width'] : null,
+                                       'height' => isset( $attrs['height'] ) ? $attrs['height'] : null,
+                               );
+                               return Html::rawElement( 'button', $buttonAttrs, Html::element( 'img', $imgAttrs ) );
+                       default:
+                               throw new MWException( 'Unknown mode passed to BaseTemplate::makeSearchButton' );
+               }
+       }
+
+       /**
+        * Returns an array of footerlinks trimmed down to only those footer links that
+        * are valid.
+        * If you pass "flat" as an option then the returned array will be a flat array
+        * of footer icons instead of a key/value array of footerlinks arrays broken
+        * up into categories.
+        * @param string $option
+        * @return array|mixed
+        */
+       function getFooterLinks( $option = null ) {
+               $footerlinks = $this->get( 'footerlinks' );
+
+               // Reduce footer links down to only those which are being used
+               $validFooterLinks = array();
+               foreach ( $footerlinks as $category => $links ) {
+                       $validFooterLinks[$category] = array();
+                       foreach ( $links as $link ) {
+                               if ( isset( $this->data[$link] ) && $this->data[$link] ) {
+                                       $validFooterLinks[$category][] = $link;
+                               }
+                       }
+                       if ( count( $validFooterLinks[$category] ) <= 0 ) {
+                               unset( $validFooterLinks[$category] );
+                       }
+               }
+
+               if ( $option == 'flat' ) {
+                       // fold footerlinks into a single array using a bit of trickery
+                       $validFooterLinks = call_user_func_array(
+                               'array_merge',
+                               array_values( $validFooterLinks )
+                       );
+               }
+
+               return $validFooterLinks;
+       }
+
+       /**
+        * Returns an array of footer icons filtered down by options relevant to how
+        * the skin wishes to display them.
+        * If you pass "icononly" as the option all footer icons which do not have an
+        * image icon set will be filtered out.
+        * If you pass "nocopyright" then MediaWiki's copyright icon will not be included
+        * in the list of footer icons. This is mostly useful for skins which only
+        * display the text from footericons instead of the images and don't want a
+        * duplicate copyright statement because footerlinks already rendered one.
+        * @param string $option
+        * @return string
+        */
+       function getFooterIcons( $option = null ) {
+               // Generate additional footer icons
+               $footericons = $this->get( 'footericons' );
+
+               if ( $option == 'icononly' ) {
+                       // Unset any icons which don't have an image
+                       foreach ( $footericons as &$footerIconsBlock ) {
+                               foreach ( $footerIconsBlock as $footerIconKey => $footerIcon ) {
+                                       if ( !is_string( $footerIcon ) && !isset( $footerIcon['src'] ) ) {
+                                               unset( $footerIconsBlock[$footerIconKey] );
+                                       }
+                               }
+                       }
+                       // Redo removal of any empty blocks
+                       foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) {
+                               if ( count( $footerIconsBlock ) <= 0 ) {
+                                       unset( $footericons[$footerIconsKey] );
+                               }
+                       }
+               } elseif ( $option == 'nocopyright' ) {
+                       unset( $footericons['copyright']['copyright'] );
+                       if ( count( $footericons['copyright'] ) <= 0 ) {
+                               unset( $footericons['copyright'] );
+                       }
+               }
+
+               return $footericons;
+       }
+
+       /**
+        * Output the basic end-page trail including bottomscripts, reporttime, and
+        * debug stuff. This should be called right before outputting the closing
+        * body and html tags.
+        */
+       function printTrail() { ?>
+<?php echo MWDebug::getDebugHTML( $this->getSkin()->getContext() ); ?>
+<?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
+<?php $this->html( 'reporttime' ) ?>
+<?php
+       }
+}
diff --git a/includes/skins/MediaWikiI18N.php b/includes/skins/MediaWikiI18N.php
new file mode 100644 (file)
index 0000000..8bd77cc
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * Wrapper object for MediaWiki's localization functions,
+ * to be passed to the template engine.
+ *
+ * @private
+ * @ingroup Skins
+ */
+class MediaWikiI18N {
+       private $context = array();
+
+       function set( $varName, $value ) {
+               $this->context[$varName] = $value;
+       }
+
+       function translate( $value ) {
+               wfProfileIn( __METHOD__ );
+
+               // Hack for i18n:attributes in PHPTAL 1.0.0 dev version as of 2004-10-23
+               $value = preg_replace( '/^string:/', '', $value );
+
+               $value = wfMessage( $value )->text();
+               // interpolate variables
+               $m = array();
+               while ( preg_match( '/\$([0-9]*?)/sm', $value, $m ) ) {
+                       list( $src, $var ) = $m;
+                       wfSuppressWarnings();
+                       $varValue = $this->context[$var];
+                       wfRestoreWarnings();
+                       $value = str_replace( $src, $varValue, $value );
+               }
+               wfProfileOut( __METHOD__ );
+               return $value;
+       }
+}
diff --git a/includes/skins/QuickTemplate.php b/includes/skins/QuickTemplate.php
new file mode 100644 (file)
index 0000000..b28dc51
--- /dev/null
@@ -0,0 +1,180 @@
+<?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
+ */
+
+/**
+ * Generic wrapper for template functions, with interface
+ * compatible with what we use of PHPTAL 0.7.
+ * @ingroup Skins
+ */
+abstract class QuickTemplate {
+
+       /** @var Config $config */
+       protected $config;
+
+       /**
+        * @param Config $config
+        */
+       function __construct( Config $config = null ) {
+               $this->data = array();
+               $this->translator = new MediaWikiI18N();
+               if ( $config === null ) {
+                       wfDebug( __METHOD__ . ' was called with no Config instance passed to it' );
+                       $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+               }
+               $this->config = $config;
+       }
+
+       /**
+        * Sets the value $value to $name
+        * @param string $name
+        * @param mixed $value
+        */
+       public function set( $name, $value ) {
+               $this->data[$name] = $value;
+       }
+
+       /**
+        * Gets the template data requested
+        * @since 1.22
+        * @param string $name Key for the data
+        * @param mixed $default Optional default (or null)
+        * @return mixed The value of the data requested or the deafult
+        */
+       public function get( $name, $default = null ) {
+               if ( isset( $this->data[$name] ) ) {
+                       return $this->data[$name];
+               } else {
+                       return $default;
+               }
+       }
+
+       /**
+        * @param string $name
+        * @param mixed $value
+        */
+       public function setRef( $name, &$value ) {
+               $this->data[$name] =& $value;
+       }
+
+       /**
+        * @param MediaWikiI18N $t
+        */
+       public function setTranslator( &$t ) {
+               $this->translator = &$t;
+       }
+
+       /**
+        * Main function, used by classes that subclass QuickTemplate
+        * to show the actual HTML output
+        */
+       abstract public function execute();
+
+       /**
+        * @private
+        * @param string $str
+        * @return string
+        */
+       function text( $str ) {
+               echo htmlspecialchars( $this->data[$str] );
+       }
+
+       /**
+        * @private
+        * @param string $str
+        * @return string
+        */
+       function html( $str ) {
+               echo $this->data[$str];
+       }
+
+       /**
+        * @private
+        * @param string $str
+        * @return string
+        */
+       function msg( $str ) {
+               echo htmlspecialchars( $this->translator->translate( $str ) );
+       }
+
+       /**
+        * @private
+        * @param string $str
+        * @return string
+        */
+       function msgHtml( $str ) {
+               echo $this->translator->translate( $str );
+       }
+
+       /**
+        * An ugly, ugly hack.
+        * @private
+        * @param string $str
+        * @return string
+        */
+       function msgWiki( $str ) {
+               global $wgOut;
+
+               $text = $this->translator->translate( $str );
+               echo $wgOut->parse( $text );
+       }
+
+       /**
+        * @private
+        * @param string $str
+        * @return bool
+        */
+       function haveData( $str ) {
+               return isset( $this->data[$str] );
+       }
+
+       /**
+        * @private
+        *
+        * @param string $str
+        * @return bool
+        */
+       function haveMsg( $str ) {
+               $msg = $this->translator->translate( $str );
+               return ( $msg != '-' ) && ( $msg != '' ); # ????
+       }
+
+       /**
+        * Get the Skin object related to this object
+        *
+        * @return Skin
+        */
+       public function getSkin() {
+               return $this->data['skin'];
+       }
+
+       /**
+        * Fetch the output of a QuickTemplate and return it
+        *
+        * @since 1.23
+        * @return string
+        */
+       public function getHTML() {
+               ob_start();
+               $this->execute();
+               $html = ob_get_contents();
+               ob_end_clean();
+               return $html;
+       }
+}
diff --git a/includes/skins/SkinApi.php b/includes/skins/SkinApi.php
new file mode 100644 (file)
index 0000000..064c076
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Extremely basic "skin" for API output, which needs to output a page without
+ * the usual skin elements but still using CSS, JS, and such via OutputPage and
+ * ResourceLoader.
+ *
+ * Created on Sep 08, 2014
+ *
+ * Copyright © 2014 Brad Jorsch <bjorsch@wikimedia.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * SkinTemplate class for API output
+ * @since 1.25
+ */
+class SkinApi extends SkinTemplate {
+       public $skinname = 'apioutput';
+       public $template = 'SkinApiTemplate';
+
+       public function setupSkinUserCss( OutputPage $out ) {
+               parent::setupSkinUserCss( $out );
+               $out->addModuleStyles( 'mediawiki.skinning.interface' );
+       }
+}
diff --git a/includes/skins/SkinApiTemplate.php b/includes/skins/SkinApiTemplate.php
new file mode 100644 (file)
index 0000000..be77c61
--- /dev/null
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Extremely basic "skin" for API output, which needs to output a page without
+ * the usual skin elements but still using CSS, JS, and such via OutputPage and
+ * ResourceLoader.
+ *
+ * Created on Sep 08, 2014
+ *
+ * Copyright © 2014 Brad Jorsch <bjorsch@wikimedia.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * BaseTemplate class for the 'apioutput' skin
+ * @since 1.25
+ */
+class SkinApiTemplate extends BaseTemplate {
+
+       public function execute() {
+               $this->html( 'headelement' ) ?>
+
+               <div class="mw-body" role="main">
+                       <h1 class="firstHeading">
+                               <span dir="auto"><?php $this->html( 'title' ) ?></span>
+                       </h1>
+                       <div class="mw-body-content">
+                               <?php $this->html( 'bodytext' ) ?>
+                       </div>
+               </div>
+
+               <?php $this->printTrail() ?>
+               </body></html>
+
+       <?php
+       }
+}
index b66862b..64ad816 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * Base class for template-based skins.
- *
  * 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
  */
 
 /**
- * Wrapper object for MediaWiki's localization functions,
- * to be passed to the template engine.
+ * Base class for template-based skins.
  *
- * @private
- * @ingroup Skins
- */
-class MediaWikiI18N {
-       private $context = array();
-
-       function set( $varName, $value ) {
-               $this->context[$varName] = $value;
-       }
-
-       function translate( $value ) {
-               wfProfileIn( __METHOD__ );
-
-               // Hack for i18n:attributes in PHPTAL 1.0.0 dev version as of 2004-10-23
-               $value = preg_replace( '/^string:/', '', $value );
-
-               $value = wfMessage( $value )->text();
-               // interpolate variables
-               $m = array();
-               while ( preg_match( '/\$([0-9]*?)/sm', $value, $m ) ) {
-                       list( $src, $var ) = $m;
-                       wfSuppressWarnings();
-                       $varValue = $this->context[$var];
-                       wfRestoreWarnings();
-                       $value = str_replace( $src, $varValue, $value );
-               }
-               wfProfileOut( __METHOD__ );
-               return $value;
-       }
-}
-
-/**
  * Template-filler skin base class
  * Formerly generic PHPTal (http://phptal.sourceforge.net/) skin
  * Based on Brion's smarty skin
@@ -1365,759 +1330,3 @@ class SkinTemplate extends Skin {
                return $this->getTitle()->getNamespaceKey();
        }
 }
-
-/**
- * Generic wrapper for template functions, with interface
- * compatible with what we use of PHPTAL 0.7.
- * @ingroup Skins
- */
-abstract class QuickTemplate {
-
-       /** @var Config $config */
-       protected $config;
-
-       /**
-        * @param Config $config
-        */
-       function __construct( Config $config = null ) {
-               $this->data = array();
-               $this->translator = new MediaWikiI18N();
-               if ( $config === null ) {
-                       wfDebug( __METHOD__ . ' was called with no Config instance passed to it' );
-                       $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
-               }
-               $this->config = $config;
-       }
-
-       /**
-        * Sets the value $value to $name
-        * @param string $name
-        * @param mixed $value
-        */
-       public function set( $name, $value ) {
-               $this->data[$name] = $value;
-       }
-
-       /**
-        * Gets the template data requested
-        * @since 1.22
-        * @param string $name Key for the data
-        * @param mixed $default Optional default (or null)
-        * @return mixed The value of the data requested or the deafult
-        */
-       public function get( $name, $default = null ) {
-               if ( isset( $this->data[$name] ) ) {
-                       return $this->data[$name];
-               } else {
-                       return $default;
-               }
-       }
-
-       /**
-        * @param string $name
-        * @param mixed $value
-        */
-       public function setRef( $name, &$value ) {
-               $this->data[$name] =& $value;
-       }
-
-       /**
-        * @param MediaWikiI18N $t
-        */
-       public function setTranslator( &$t ) {
-               $this->translator = &$t;
-       }
-
-       /**
-        * Main function, used by classes that subclass QuickTemplate
-        * to show the actual HTML output
-        */
-       abstract public function execute();
-
-       /**
-        * @private
-        * @param string $str
-        * @return string
-        */
-       function text( $str ) {
-               echo htmlspecialchars( $this->data[$str] );
-       }
-
-       /**
-        * @private
-        * @param string $str
-        * @return string
-        */
-       function html( $str ) {
-               echo $this->data[$str];
-       }
-
-       /**
-        * @private
-        * @param string $str
-        * @return string
-        */
-       function msg( $str ) {
-               echo htmlspecialchars( $this->translator->translate( $str ) );
-       }
-
-       /**
-        * @private
-        * @param string $str
-        * @return string
-        */
-       function msgHtml( $str ) {
-               echo $this->translator->translate( $str );
-       }
-
-       /**
-        * An ugly, ugly hack.
-        * @private
-        * @param string $str
-        * @return string
-        */
-       function msgWiki( $str ) {
-               global $wgOut;
-
-               $text = $this->translator->translate( $str );
-               echo $wgOut->parse( $text );
-       }
-
-       /**
-        * @private
-        * @param string $str
-        * @return bool
-        */
-       function haveData( $str ) {
-               return isset( $this->data[$str] );
-       }
-
-       /**
-        * @private
-        *
-        * @param string $str
-        * @return bool
-        */
-       function haveMsg( $str ) {
-               $msg = $this->translator->translate( $str );
-               return ( $msg != '-' ) && ( $msg != '' ); # ????
-       }
-
-       /**
-        * Get the Skin object related to this object
-        *
-        * @return Skin
-        */
-       public function getSkin() {
-               return $this->data['skin'];
-       }
-
-       /**
-        * Fetch the output of a QuickTemplate and return it
-        *
-        * @since 1.23
-        * @return string
-        */
-       public function getHTML() {
-               ob_start();
-               $this->execute();
-               $html = ob_get_contents();
-               ob_end_clean();
-               return $html;
-       }
-}
-
-/**
- * New base template for a skin's template extended from QuickTemplate
- * this class features helper methods that provide common ways of interacting
- * with the data stored in the QuickTemplate
- */
-abstract class BaseTemplate extends QuickTemplate {
-
-       /**
-        * Get a Message object with its context set
-        *
-        * @param string $name Message name
-        * @return Message
-        */
-       public function getMsg( $name ) {
-               return $this->getSkin()->msg( $name );
-       }
-
-       function msg( $str ) {
-               echo $this->getMsg( $str )->escaped();
-       }
-
-       function msgHtml( $str ) {
-               echo $this->getMsg( $str )->text();
-       }
-
-       function msgWiki( $str ) {
-               echo $this->getMsg( $str )->parseAsBlock();
-       }
-
-       /**
-        * Create an array of common toolbox items from the data in the quicktemplate
-        * stored by SkinTemplate.
-        * The resulting array is built according to a format intended to be passed
-        * through makeListItem to generate the html.
-        * @return array
-        */
-       function getToolbox() {
-               wfProfileIn( __METHOD__ );
-
-               $toolbox = array();
-               if ( isset( $this->data['nav_urls']['whatlinkshere'] )
-                       && $this->data['nav_urls']['whatlinkshere']
-               ) {
-                       $toolbox['whatlinkshere'] = $this->data['nav_urls']['whatlinkshere'];
-                       $toolbox['whatlinkshere']['id'] = 't-whatlinkshere';
-               }
-               if ( isset( $this->data['nav_urls']['recentchangeslinked'] )
-                       && $this->data['nav_urls']['recentchangeslinked']
-               ) {
-                       $toolbox['recentchangeslinked'] = $this->data['nav_urls']['recentchangeslinked'];
-                       $toolbox['recentchangeslinked']['msg'] = 'recentchangeslinked-toolbox';
-                       $toolbox['recentchangeslinked']['id'] = 't-recentchangeslinked';
-               }
-               if ( isset( $this->data['feeds'] ) && $this->data['feeds'] ) {
-                       $toolbox['feeds']['id'] = 'feedlinks';
-                       $toolbox['feeds']['links'] = array();
-                       foreach ( $this->data['feeds'] as $key => $feed ) {
-                               $toolbox['feeds']['links'][$key] = $feed;
-                               $toolbox['feeds']['links'][$key]['id'] = "feed-$key";
-                               $toolbox['feeds']['links'][$key]['rel'] = 'alternate';
-                               $toolbox['feeds']['links'][$key]['type'] = "application/{$key}+xml";
-                               $toolbox['feeds']['links'][$key]['class'] = 'feedlink';
-                       }
-               }
-               foreach ( array( 'contributions', 'log', 'blockip', 'emailuser',
-                       'userrights', 'upload', 'specialpages' ) as $special
-               ) {
-                       if ( isset( $this->data['nav_urls'][$special] ) && $this->data['nav_urls'][$special] ) {
-                               $toolbox[$special] = $this->data['nav_urls'][$special];
-                               $toolbox[$special]['id'] = "t-$special";
-                       }
-               }
-               if ( isset( $this->data['nav_urls']['print'] ) && $this->data['nav_urls']['print'] ) {
-                       $toolbox['print'] = $this->data['nav_urls']['print'];
-                       $toolbox['print']['id'] = 't-print';
-                       $toolbox['print']['rel'] = 'alternate';
-                       $toolbox['print']['msg'] = 'printableversion';
-               }
-               if ( isset( $this->data['nav_urls']['permalink'] ) && $this->data['nav_urls']['permalink'] ) {
-                       $toolbox['permalink'] = $this->data['nav_urls']['permalink'];
-                       if ( $toolbox['permalink']['href'] === '' ) {
-                               unset( $toolbox['permalink']['href'] );
-                               $toolbox['ispermalink']['tooltiponly'] = true;
-                               $toolbox['ispermalink']['id'] = 't-ispermalink';
-                               $toolbox['ispermalink']['msg'] = 'permalink';
-                       } else {
-                               $toolbox['permalink']['id'] = 't-permalink';
-                       }
-               }
-               if ( isset( $this->data['nav_urls']['info'] ) && $this->data['nav_urls']['info'] ) {
-                       $toolbox['info'] = $this->data['nav_urls']['info'];
-                       $toolbox['info']['id'] = 't-info';
-               }
-
-               wfRunHooks( 'BaseTemplateToolbox', array( &$this, &$toolbox ) );
-               wfProfileOut( __METHOD__ );
-               return $toolbox;
-       }
-
-       /**
-        * Create an array of personal tools items from the data in the quicktemplate
-        * stored by SkinTemplate.
-        * The resulting array is built according to a format intended to be passed
-        * through makeListItem to generate the html.
-        * This is in reality the same list as already stored in personal_urls
-        * however it is reformatted so that you can just pass the individual items
-        * to makeListItem instead of hardcoding the element creation boilerplate.
-        * @return array
-        */
-       function getPersonalTools() {
-               $personal_tools = array();
-               foreach ( $this->get( 'personal_urls' ) as $key => $plink ) {
-                       # The class on a personal_urls item is meant to go on the <a> instead
-                       # of the <li> so we have to use a single item "links" array instead
-                       # of using most of the personal_url's keys directly.
-                       $ptool = array(
-                               'links' => array(
-                                       array( 'single-id' => "pt-$key" ),
-                               ),
-                               'id' => "pt-$key",
-                       );
-                       if ( isset( $plink['active'] ) ) {
-                               $ptool['active'] = $plink['active'];
-                       }
-                       foreach ( array( 'href', 'class', 'text', 'dir' ) as $k ) {
-                               if ( isset( $plink[$k] ) ) {
-                                       $ptool['links'][0][$k] = $plink[$k];
-                               }
-                       }
-                       $personal_tools[$key] = $ptool;
-               }
-               return $personal_tools;
-       }
-
-       function getSidebar( $options = array() ) {
-               // Force the rendering of the following portals
-               $sidebar = $this->data['sidebar'];
-               if ( !isset( $sidebar['SEARCH'] ) ) {
-                       $sidebar['SEARCH'] = true;
-               }
-               if ( !isset( $sidebar['TOOLBOX'] ) ) {
-                       $sidebar['TOOLBOX'] = true;
-               }
-               if ( !isset( $sidebar['LANGUAGES'] ) ) {
-                       $sidebar['LANGUAGES'] = true;
-               }
-
-               if ( !isset( $options['search'] ) || $options['search'] !== true ) {
-                       unset( $sidebar['SEARCH'] );
-               }
-               if ( isset( $options['toolbox'] ) && $options['toolbox'] === false ) {
-                       unset( $sidebar['TOOLBOX'] );
-               }
-               if ( isset( $options['languages'] ) && $options['languages'] === false ) {
-                       unset( $sidebar['LANGUAGES'] );
-               }
-
-               $boxes = array();
-               foreach ( $sidebar as $boxName => $content ) {
-                       if ( $content === false ) {
-                               continue;
-                       }
-                       switch ( $boxName ) {
-                       case 'SEARCH':
-                               // Search is a special case, skins should custom implement this
-                               $boxes[$boxName] = array(
-                                       'id' => 'p-search',
-                                       'header' => $this->getMsg( 'search' )->text(),
-                                       'generated' => false,
-                                       'content' => true,
-                               );
-                               break;
-                       case 'TOOLBOX':
-                               $msgObj = $this->getMsg( 'toolbox' );
-                               $boxes[$boxName] = array(
-                                       'id' => 'p-tb',
-                                       'header' => $msgObj->exists() ? $msgObj->text() : 'toolbox',
-                                       'generated' => false,
-                                       'content' => $this->getToolbox(),
-                               );
-                               break;
-                       case 'LANGUAGES':
-                               if ( $this->data['language_urls'] ) {
-                                       $msgObj = $this->getMsg( 'otherlanguages' );
-                                       $boxes[$boxName] = array(
-                                               'id' => 'p-lang',
-                                               'header' => $msgObj->exists() ? $msgObj->text() : 'otherlanguages',
-                                               'generated' => false,
-                                               'content' => $this->data['language_urls'],
-                                       );
-                               }
-                               break;
-                       default:
-                               $msgObj = $this->getMsg( $boxName );
-                               $boxes[$boxName] = array(
-                                       'id' => "p-$boxName",
-                                       'header' => $msgObj->exists() ? $msgObj->text() : $boxName,
-                                       'generated' => true,
-                                       'content' => $content,
-                               );
-                               break;
-                       }
-               }
-
-               // HACK: Compatibility with extensions still using SkinTemplateToolboxEnd
-               $hookContents = null;
-               if ( isset( $boxes['TOOLBOX'] ) ) {
-                       ob_start();
-                       // We pass an extra 'true' at the end so extensions using BaseTemplateToolbox
-                       // can abort and avoid outputting double toolbox links
-                       wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this, true ) );
-                       $hookContents = ob_get_contents();
-                       ob_end_clean();
-                       if ( !trim( $hookContents ) ) {
-                               $hookContents = null;
-                       }
-               }
-               // END hack
-
-               if ( isset( $options['htmlOnly'] ) && $options['htmlOnly'] === true ) {
-                       foreach ( $boxes as $boxName => $box ) {
-                               if ( is_array( $box['content'] ) ) {
-                                       $content = '<ul>';
-                                       foreach ( $box['content'] as $key => $val ) {
-                                               $content .= "\n " . $this->makeListItem( $key, $val );
-                                       }
-                                       // HACK, shove the toolbox end onto the toolbox if we're rendering itself
-                                       if ( $hookContents ) {
-                                               $content .= "\n $hookContents";
-                                       }
-                                       // END hack
-                                       $content .= "\n</ul>\n";
-                                       $boxes[$boxName]['content'] = $content;
-                               }
-                       }
-               } else {
-                       if ( $hookContents ) {
-                               $boxes['TOOLBOXEND'] = array(
-                                       'id' => 'p-toolboxend',
-                                       'header' => $boxes['TOOLBOX']['header'],
-                                       'generated' => false,
-                                       'content' => "<ul>{$hookContents}</ul>",
-                               );
-                               // HACK: Make sure that TOOLBOXEND is sorted next to TOOLBOX
-                               $boxes2 = array();
-                               foreach ( $boxes as $key => $box ) {
-                                       if ( $key === 'TOOLBOXEND' ) {
-                                               continue;
-                                       }
-                                       $boxes2[$key] = $box;
-                                       if ( $key === 'TOOLBOX' ) {
-                                               $boxes2['TOOLBOXEND'] = $boxes['TOOLBOXEND'];
-                                       }
-                               }
-                               $boxes = $boxes2;
-                               // END hack
-                       }
-               }
-
-               return $boxes;
-       }
-
-       /**
-        * @param string $name
-        */
-       protected function renderAfterPortlet( $name ) {
-               $content = '';
-               wfRunHooks( 'BaseTemplateAfterPortlet', array( $this, $name, &$content ) );
-
-               if ( $content !== '' ) {
-                       echo "<div class='after-portlet after-portlet-$name'>$content</div>";
-               }
-
-       }
-
-       /**
-        * Makes a link, usually used by makeListItem to generate a link for an item
-        * in a list used in navigation lists, portlets, portals, sidebars, etc...
-        *
-        * @param string $key Usually a key from the list you are generating this
-        * link from.
-        * @param array $item Contains some of a specific set of keys.
-        *
-        * The text of the link will be generated either from the contents of the
-        * "text" key in the $item array, if a "msg" key is present a message by
-        * that name will be used, and if neither of those are set the $key will be
-        * used as a message name.
-        *
-        * If a "href" key is not present makeLink will just output htmlescaped text.
-        * The "href", "id", "class", "rel", and "type" keys are used as attributes
-        * for the link if present.
-        *
-        * If an "id" or "single-id" (if you don't want the actual id to be output
-        * on the link) is present it will be used to generate a tooltip and
-        * accesskey for the link.
-        *
-        * The keys "context" and "primary" are ignored; these keys are used
-        * internally by skins and are not supposed to be included in the HTML
-        * output.
-        *
-        * If you don't want an accesskey, set $item['tooltiponly'] = true;
-        *
-        * @param array $options Can be used to affect the output of a link.
-        * Possible options are:
-        *   - 'text-wrapper' key to specify a list of elements to wrap the text of
-        *   a link in. This should be an array of arrays containing a 'tag' and
-        *   optionally an 'attributes' key. If you only have one element you don't
-        *   need to wrap it in another array. eg: To use <a><span>...</span></a>
-        *   in all links use array( 'text-wrapper' => array( 'tag' => 'span' ) )
-        *   for your options.
-        *   - 'link-class' key can be used to specify additional classes to apply
-        *   to all links.
-        *   - 'link-fallback' can be used to specify a tag to use instead of "<a>"
-        *   if there is no link. eg: If you specify 'link-fallback' => 'span' than
-        *   any non-link will output a "<span>" instead of just text.
-        *
-        * @return string
-        */
-       function makeLink( $key, $item, $options = array() ) {
-               if ( isset( $item['text'] ) ) {
-                       $text = $item['text'];
-               } else {
-                       $text = $this->translator->translate( isset( $item['msg'] ) ? $item['msg'] : $key );
-               }
-
-               $html = htmlspecialchars( $text );
-
-               if ( isset( $options['text-wrapper'] ) ) {
-                       $wrapper = $options['text-wrapper'];
-                       if ( isset( $wrapper['tag'] ) ) {
-                               $wrapper = array( $wrapper );
-                       }
-                       while ( count( $wrapper ) > 0 ) {
-                               $element = array_pop( $wrapper );
-                               $html = Html::rawElement( $element['tag'], isset( $element['attributes'] )
-                                       ? $element['attributes']
-                                       : null, $html );
-                       }
-               }
-
-               if ( isset( $item['href'] ) || isset( $options['link-fallback'] ) ) {
-                       $attrs = $item;
-                       foreach ( array( 'single-id', 'text', 'msg', 'tooltiponly', 'context', 'primary' ) as $k ) {
-                               unset( $attrs[$k] );
-                       }
-
-                       if ( isset( $item['id'] ) && !isset( $item['single-id'] ) ) {
-                               $item['single-id'] = $item['id'];
-                       }
-                       if ( isset( $item['single-id'] ) ) {
-                               if ( isset( $item['tooltiponly'] ) && $item['tooltiponly'] ) {
-                                       $title = Linker::titleAttrib( $item['single-id'] );
-                                       if ( $title !== false ) {
-                                               $attrs['title'] = $title;
-                                       }
-                               } else {
-                                       $tip = Linker::tooltipAndAccesskeyAttribs( $item['single-id'] );
-                                       if ( isset( $tip['title'] ) && $tip['title'] !== false ) {
-                                               $attrs['title'] = $tip['title'];
-                                       }
-                                       if ( isset( $tip['accesskey'] ) && $tip['accesskey'] !== false ) {
-                                               $attrs['accesskey'] = $tip['accesskey'];
-                                       }
-                               }
-                       }
-                       if ( isset( $options['link-class'] ) ) {
-                               if ( isset( $attrs['class'] ) ) {
-                                       $attrs['class'] .= " {$options['link-class']}";
-                               } else {
-                                       $attrs['class'] = $options['link-class'];
-                               }
-                       }
-                       $html = Html::rawElement( isset( $attrs['href'] )
-                               ? 'a'
-                               : $options['link-fallback'], $attrs, $html );
-               }
-
-               return $html;
-       }
-
-       /**
-        * Generates a list item for a navigation, portlet, portal, sidebar... list
-        *
-        * @param string $key Usually a key from the list you are generating this link from.
-        * @param array $item Array of list item data containing some of a specific set of keys.
-        * The "id", "class" and "itemtitle" keys will be used as attributes for the list item,
-        * if "active" contains a value of true a "active" class will also be appended to class.
-        *
-        * @param array $options
-        *
-        * If you want something other than a "<li>" you can pass a tag name such as
-        * "tag" => "span" in the $options array to change the tag used.
-        * link/content data for the list item may come in one of two forms
-        * A "links" key may be used, in which case it should contain an array with
-        * a list of links to include inside the list item, see makeLink for the
-        * format of individual links array items.
-        *
-        * Otherwise the relevant keys from the list item $item array will be passed
-        * to makeLink instead. Note however that "id" and "class" are used by the
-        * list item directly so they will not be passed to makeLink
-        * (however the link will still support a tooltip and accesskey from it)
-        * If you need an id or class on a single link you should include a "links"
-        * array with just one link item inside of it. If you want to add a title
-        * to the list item itself, you can set "itemtitle" to the value.
-        * $options is also passed on to makeLink calls
-        *
-        * @return string
-        */
-       function makeListItem( $key, $item, $options = array() ) {
-               if ( isset( $item['links'] ) ) {
-                       $links = array();
-                       foreach ( $item['links'] as $linkKey => $link ) {
-                               $links[] = $this->makeLink( $linkKey, $link, $options );
-                       }
-                       $html = implode( ' ', $links );
-               } else {
-                       $link = $item;
-                       // These keys are used by makeListItem and shouldn't be passed on to the link
-                       foreach ( array( 'id', 'class', 'active', 'tag', 'itemtitle' ) as $k ) {
-                               unset( $link[$k] );
-                       }
-                       if ( isset( $item['id'] ) && !isset( $item['single-id'] ) ) {
-                               // The id goes on the <li> not on the <a> for single links
-                               // but makeSidebarLink still needs to know what id to use when
-                               // generating tooltips and accesskeys.
-                               $link['single-id'] = $item['id'];
-                       }
-                       $html = $this->makeLink( $key, $link, $options );
-               }
-
-               $attrs = array();
-               foreach ( array( 'id', 'class' ) as $attr ) {
-                       if ( isset( $item[$attr] ) ) {
-                               $attrs[$attr] = $item[$attr];
-                       }
-               }
-               if ( isset( $item['active'] ) && $item['active'] ) {
-                       if ( !isset( $attrs['class'] ) ) {
-                               $attrs['class'] = '';
-                       }
-                       $attrs['class'] .= ' active';
-                       $attrs['class'] = trim( $attrs['class'] );
-               }
-               if ( isset( $item['itemtitle'] ) ) {
-                       $attrs['title'] = $item['itemtitle'];
-               }
-               return Html::rawElement( isset( $options['tag'] ) ? $options['tag'] : 'li', $attrs, $html );
-       }
-
-       function makeSearchInput( $attrs = array() ) {
-               $realAttrs = array(
-                       'type' => 'search',
-                       'name' => 'search',
-                       'placeholder' => wfMessage( 'searchsuggest-search' )->text(),
-                       'value' => $this->get( 'search', '' ),
-               );
-               $realAttrs = array_merge( $realAttrs, Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs );
-               return Html::element( 'input', $realAttrs );
-       }
-
-       function makeSearchButton( $mode, $attrs = array() ) {
-               switch ( $mode ) {
-                       case 'go':
-                       case 'fulltext':
-                               $realAttrs = array(
-                                       'type' => 'submit',
-                                       'name' => $mode,
-                                       'value' => $this->translator->translate(
-                                               $mode == 'go' ? 'searcharticle' : 'searchbutton' ),
-                               );
-                               $realAttrs = array_merge(
-                                       $realAttrs,
-                                       Linker::tooltipAndAccesskeyAttribs( "search-$mode" ),
-                                       $attrs
-                               );
-                               return Html::element( 'input', $realAttrs );
-                       case 'image':
-                               $buttonAttrs = array(
-                                       'type' => 'submit',
-                                       'name' => 'button',
-                               );
-                               $buttonAttrs = array_merge(
-                                       $buttonAttrs,
-                                       Linker::tooltipAndAccesskeyAttribs( 'search-fulltext' ),
-                                       $attrs
-                               );
-                               unset( $buttonAttrs['src'] );
-                               unset( $buttonAttrs['alt'] );
-                               unset( $buttonAttrs['width'] );
-                               unset( $buttonAttrs['height'] );
-                               $imgAttrs = array(
-                                       'src' => $attrs['src'],
-                                       'alt' => isset( $attrs['alt'] )
-                                               ? $attrs['alt']
-                                               : $this->translator->translate( 'searchbutton' ),
-                                       'width' => isset( $attrs['width'] ) ? $attrs['width'] : null,
-                                       'height' => isset( $attrs['height'] ) ? $attrs['height'] : null,
-                               );
-                               return Html::rawElement( 'button', $buttonAttrs, Html::element( 'img', $imgAttrs ) );
-                       default:
-                               throw new MWException( 'Unknown mode passed to BaseTemplate::makeSearchButton' );
-               }
-       }
-
-       /**
-        * Returns an array of footerlinks trimmed down to only those footer links that
-        * are valid.
-        * If you pass "flat" as an option then the returned array will be a flat array
-        * of footer icons instead of a key/value array of footerlinks arrays broken
-        * up into categories.
-        * @param string $option
-        * @return array|mixed
-        */
-       function getFooterLinks( $option = null ) {
-               $footerlinks = $this->get( 'footerlinks' );
-
-               // Reduce footer links down to only those which are being used
-               $validFooterLinks = array();
-               foreach ( $footerlinks as $category => $links ) {
-                       $validFooterLinks[$category] = array();
-                       foreach ( $links as $link ) {
-                               if ( isset( $this->data[$link] ) && $this->data[$link] ) {
-                                       $validFooterLinks[$category][] = $link;
-                               }
-                       }
-                       if ( count( $validFooterLinks[$category] ) <= 0 ) {
-                               unset( $validFooterLinks[$category] );
-                       }
-               }
-
-               if ( $option == 'flat' ) {
-                       // fold footerlinks into a single array using a bit of trickery
-                       $validFooterLinks = call_user_func_array(
-                               'array_merge',
-                               array_values( $validFooterLinks )
-                       );
-               }
-
-               return $validFooterLinks;
-       }
-
-       /**
-        * Returns an array of footer icons filtered down by options relevant to how
-        * the skin wishes to display them.
-        * If you pass "icononly" as the option all footer icons which do not have an
-        * image icon set will be filtered out.
-        * If you pass "nocopyright" then MediaWiki's copyright icon will not be included
-        * in the list of footer icons. This is mostly useful for skins which only
-        * display the text from footericons instead of the images and don't want a
-        * duplicate copyright statement because footerlinks already rendered one.
-        * @param string $option
-        * @return string
-        */
-       function getFooterIcons( $option = null ) {
-               // Generate additional footer icons
-               $footericons = $this->get( 'footericons' );
-
-               if ( $option == 'icononly' ) {
-                       // Unset any icons which don't have an image
-                       foreach ( $footericons as &$footerIconsBlock ) {
-                               foreach ( $footerIconsBlock as $footerIconKey => $footerIcon ) {
-                                       if ( !is_string( $footerIcon ) && !isset( $footerIcon['src'] ) ) {
-                                               unset( $footerIconsBlock[$footerIconKey] );
-                                       }
-                               }
-                       }
-                       // Redo removal of any empty blocks
-                       foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) {
-                               if ( count( $footerIconsBlock ) <= 0 ) {
-                                       unset( $footericons[$footerIconsKey] );
-                               }
-                       }
-               } elseif ( $option == 'nocopyright' ) {
-                       unset( $footericons['copyright']['copyright'] );
-                       if ( count( $footericons['copyright'] ) <= 0 ) {
-                               unset( $footericons['copyright'] );
-                       }
-               }
-
-               return $footericons;
-       }
-
-       /**
-        * Output the basic end-page trail including bottomscripts, reporttime, and
-        * debug stuff. This should be called right before outputting the closing
-        * body and html tags.
-        */
-       function printTrail() { ?>
-<?php echo MWDebug::getDebugHTML( $this->getSkin()->getContext() ); ?>
-<?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
-<?php $this->html( 'reporttime' ) ?>
-<?php
-       }
-}
index ce43652..07e1be1 100644 (file)
@@ -205,7 +205,8 @@ class ActiveUsersPager extends UsersPager {
 
                # Username field
                $out .= Xml::inputLabel( $this->msg( 'activeusers-from' )->text(),
-                       'username', 'offset', 20, $this->requestedUser, array( 'tabindex' => 1 ) ) . '<br />';
+                       'username', 'offset', 20, $this->requestedUser,
+                       array( 'class' => 'mw-ui-input-inline', 'tabindex' => 1 ) ) . '<br />';
 
                $out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' )->text(),
                        'hidebots', 'hidebots', $this->opts->getValue( 'hidebots' ), array( 'tabindex' => 2 ) );
@@ -331,6 +332,8 @@ class SpecialActiveUsers extends SpecialPage {
         * @return int|bool UNIX timestamp the cache is now up-to-date as of (false on error)
         */
        protected static function doQueryCacheUpdate( DatabaseBase $dbw, $days, $window ) {
+               $dbw->startAtomic( __METHOD__ );
+
                $lockKey = wfWikiID() . '-activeusers';
                if ( !$dbw->lock( $lockKey, __METHOD__, 1 ) ) {
                        return false; // exclusive update (avoids duplicate entries)
@@ -342,6 +345,9 @@ class SpecialActiveUsers extends SpecialPage {
                        array( 'qci_type' => 'activeusers' )
                );
                $cTimeUnix = $cTime ? wfTimestamp( TS_UNIX, $cTime ) : 1;
+               // If a transaction was already started, it might have an old
+               // snapshot, so kludge the timestamp range a few seconds back.
+               $cTimeUnix -= 5;
 
                // Pick the date range to fetch from. This is normally from the last
                // update to till the present time, but has a limited window for sanity.
@@ -388,7 +394,10 @@ class SpecialActiveUsers extends SpecialPage {
                                        'qcc_type' => 'activeusers',
                                        'qcc_namespace' => NS_USER,
                                        'qcc_title' => array_keys( $names ) ),
-                               __METHOD__
+                               __METHOD__,
+                               // See the latest data (ignoring trx snapshot) to avoid
+                               // duplicates if this method was called in a transaction
+                               array( 'LOCK IN SHARE MODE' )
                        );
                        foreach ( $res as $row ) {
                                unset( $names[$row->user_name] );
@@ -425,6 +434,7 @@ class SpecialActiveUsers extends SpecialPage {
                );
 
                $dbw->unlock( $lockKey, __METHOD__ );
+               $dbw->endAtomic( __METHOD__ );
 
                return $eTimestamp;
        }
index 456f4ec..aefd99a 100644 (file)
@@ -103,6 +103,7 @@ class SpecialBlockList extends SpecialPage {
                $form->setMethod( 'get' );
                $form->setWrapperLegendMsg( 'ipblocklist-legend' );
                $form->setSubmitTextMsg( 'ipblocklist-submit' );
+               $form->setSubmitProgressive();
                $form->prepareForm();
 
                $form->displayForm( '' );
index 72f4e46..e6750e1 100644 (file)
@@ -131,9 +131,20 @@ class SpecialBookSources extends SpecialPage {
                        'isbn',
                        20,
                        $this->isbn,
-                       array( 'autofocus' => true )
+                       array( 'autofocus' => true, 'class' => 'mw-ui-input-inline' )
                );
-               $form .= '&#160;' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . "</p>\n";
+
+               if ( $this->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
+                       $form .= '&#160;' . Xml::submitButton(
+                               $this->msg( 'booksources-search' )->text(),
+                               array( 'class' => 'mw-ui-button mw-ui-progressive' )
+                       ) . "</p>\n";
+               } else {
+                       $form .= '&#160;' . Xml::submitButton(
+                               $this->msg( 'booksources-search' )->text()
+                       ) . "</p>\n";
+               }
+
                $form .= Html::closeElement( 'form' ) . "\n";
                $form .= Html::closeElement( 'fieldset' ) . "\n";
 
index 3656b9c..db83019 100644 (file)
@@ -609,6 +609,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                $context->setTitle( $this->getPageTitle() ); // Remove subpage
                $form = new EditWatchlistNormalHTMLForm( $fields, $context );
                $form->setSubmitTextMsg( 'watchlistedit-normal-submit' );
+               $form->setSubmitDestructive();
                # Used message keys:
                # 'accesskey-watchlistedit-normal-submit', 'tooltip-watchlistedit-normal-submit'
                $form->setSubmitTooltip( 'watchlistedit-normal-submit' );
index 04a83c8..2a97abc 100644 (file)
@@ -87,7 +87,7 @@ class ImageListPager extends TablePager {
                $this->mIncluding = $including;
                $this->mShowAll = $showAll;
 
-               if ( $userName ) {
+               if ( $userName !== null && $userName !== '' ) {
                        $nt = Title::newFromText( $userName, NS_USER );
                        if ( !is_null( $nt ) ) {
                                $this->mUserName = $nt->getText();
index 5bae28f..8b9a0ee 100644 (file)
@@ -235,20 +235,18 @@ class SpecialListGroupRights extends SpecialPage {
                foreach ( $permissions as $permission => $granted ) {
                        //show as granted only if it isn't revoked to prevent duplicate display of permissions
                        if ( $granted && ( !isset( $revoke[$permission] ) || !$revoke[$permission] ) ) {
-                               $description = $this->msg( 'listgrouprights-right-display',
+                               $r[] = $this->msg( 'listgrouprights-right-display',
                                        User::getRightDescription( $permission ),
                                        '<span class="mw-listgrouprights-right-name">' . $permission . '</span>'
                                )->parse();
-                               $r[] = $description;
                        }
                }
                foreach ( $revoke as $permission => $revoked ) {
                        if ( $revoked ) {
-                               $description = $this->msg( 'listgrouprights-right-revoked',
+                               $r[] = $this->msg( 'listgrouprights-right-revoked',
                                        User::getRightDescription( $permission ),
                                        '<span class="mw-listgrouprights-right-name">' . $permission . '</span>'
                                )->parse();
-                               $r[] = $description;
                        }
                }
 
@@ -257,51 +255,28 @@ class SpecialListGroupRights extends SpecialPage {
                $lang = $this->getLanguage();
                $allGroups = User::getAllGroups();
 
-               if ( $add === true ) {
-                       $r[] = $this->msg( 'listgrouprights-addgroup-all' )->escaped();
-               } elseif ( is_array( $add ) ) {
-                       $add = array_intersect( array_values( array_unique( $add ) ), $allGroups );
-                       if ( count( $add ) ) {
-                               $r[] = $this->msg( 'listgrouprights-addgroup',
-                                       $lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $add ) ),
-                                       count( $add )
-                               )->parse();
-                       }
-               }
-
-               if ( $remove === true ) {
-                       $r[] = $this->msg( 'listgrouprights-removegroup-all' )->escaped();
-               } elseif ( is_array( $remove ) ) {
-                       $remove = array_intersect( array_values( array_unique( $remove ) ), $allGroups );
-                       if ( count( $remove ) ) {
-                               $r[] = $this->msg( 'listgrouprights-removegroup',
-                                       $lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $remove ) ),
-                                       count( $remove )
-                               )->parse();
-                       }
-               }
-
-               if ( $addSelf === true ) {
-                       $r[] = $this->msg( 'listgrouprights-addgroup-self-all' )->escaped();
-               } elseif ( is_array( $addSelf ) ) {
-                       $addSelf = array_intersect( array_values( array_unique( $addSelf ) ), $allGroups );
-                       if ( count( $addSelf ) ) {
-                               $r[] = $this->msg( 'listgrouprights-addgroup-self',
-                                       $lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $addSelf ) ),
-                                       count( $addSelf )
-                               )->parse();
-                       }
-               }
+               $changeGroups = array(
+                       'addgroup' => $add,
+                       'removegroup' => $remove,
+                       'addgroup-self' => $addSelf,
+                       'removegroup-self' => $removeSelf
+               );
 
-               if ( $removeSelf === true ) {
-                       $r[] = $this->msg( 'listgrouprights-removegroup-self-all' )->parse();
-               } elseif ( is_array( $removeSelf ) ) {
-                       $removeSelf = array_intersect( array_values( array_unique( $removeSelf ) ), $allGroups );
-                       if ( count( $removeSelf ) ) {
-                               $r[] = $this->msg( 'listgrouprights-removegroup-self',
-                                       $lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $removeSelf ) ),
-                                       count( $removeSelf )
-                               )->parse();
+               foreach ( $changeGroups as $messageKey => $changeGroup ) {
+                       if ( $changeGroup === true ) {
+                               // For grep: listgrouprights-addgroup-all, listgrouprights-removegroup-all,
+                               // listgrouprights-addgroup-self-all, listgrouprights-removegroup-self-all
+                               $r[] = $this->msg( 'listgrouprights-' . $messageKey . '-all' )->escaped();
+                       } elseif ( is_array( $changeGroup ) ) {
+                               $changeGroup = array_intersect( array_values( array_unique( $changeGroup ) ), $allGroups );
+                               if ( count( $changeGroup ) ) {
+                                       // For grep: listgrouprights-addgroup, listgrouprights-removegroup,
+                                       // listgrouprights-addgroup-self, listgrouprights-removegroup-self
+                                       $r[] = $this->msg( 'listgrouprights-' . $messageKey,
+                                               $lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $changeGroup ) ),
+                                               count( $changeGroup )
+                                       )->parse();
+                               }
                        }
                }
 
index 115a918..bf2e3a3 100644 (file)
@@ -143,6 +143,12 @@ class Language {
         */
        static private $fallbackLanguageCache = array();
 
+       /**
+        * Cache for language names
+        * @var MapCacheLRU|null
+        */
+       static private $languageNameCache;
+
        /**
         * Get a cached or new language object for a given language code
         * @param string $code
@@ -846,6 +852,33 @@ class Language {
         * @since 1.20
         */
        public static function fetchLanguageNames( $inLanguage = null, $include = 'mw' ) {
+               wfProfileIn( __METHOD__ );
+               $cacheKey = $inLanguage === null ? 'null' : $inLanguage;
+               $cacheKey .= ":$include";
+               if ( self::$languageNameCache === null ) {
+                       self::$languageNameCache = new MapCacheLRU( 20 );
+               }
+               if ( self::$languageNameCache->has( $cacheKey ) ) {
+                       $ret = self::$languageNameCache->get( $cacheKey );
+               } else {
+                       $ret = self::fetchLanguageNamesUncached( $inLanguage, $include );
+                       self::$languageNameCache->set( $cacheKey, $ret );
+               }
+               wfProfileOut( __METHOD__ );
+               return $ret;
+       }
+
+       /**
+        * Uncached helper for fetchLanguageNames
+        * @param null|string $inLanguage Code of language in which to return the names
+        *              Use null for autonyms (native names)
+        * @param string $include One of:
+        *              'all' all available languages
+        *              'mw' only if the language is defined in MediaWiki or wgExtraLanguageNames (default)
+        *              'mwfile' only if the language is in 'mw' *and* has a message file
+        * @return array Language code => language name
+        */
+       private static function fetchLanguageNamesUncached( $inLanguage = null, $include = 'mw' ) {
                global $wgExtraLanguageNames;
                static $coreLanguageNames;
 
index c349d23..8671982 100644 (file)
        "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''адключана''')",
        "mediastatistics": "Статыстыка мэдыяфайлаў",
        "mediastatistics-summary": "Статыстыка тыпаў загружаных файлаў. Яна ўключае толькі актуальныя вэрсіі файлаў. Старыя і выдаленыя вэрсіі ня ўлічваюцца.",
-       "mediastatistics-nbytes": "{{PLURAL:$1|$1 байт|$1 байты|$1 байтаў}} ($2; $3%)"
+       "mediastatistics-nbytes": "{{PLURAL:$1|$1 байт|$1 байты|$1 байтаў}} ($2; $3%)",
+       "mediastatistics-table-mimetype": "MIME-тып"
 }
index f097ee5..42271e2 100644 (file)
        "invalidtitle-knownnamespace": "سەردێڕی نادروست بە بۆشایی ناوی «$2» و دەقی «$3»",
        "invalidtitle-unknownnamespace": "سەردێڕی هەڵە لەگەڵ ناوەبۆشایی نەناسراوی ژمارە $1 و دەقی \"$2\"",
        "exception-nologin": "لەژوورەوە نیت",
-       "exception-nologin-text": "تکایە [[Special:Userlogin|بچۆ ژوورەوە]] تا بتوانیت بچیتە نێو ئەم پەڕەیە یان ئەم کردەیە ئەنجام بدەیت.",
+       "exception-nologin-text": "تکایە بچۆ ژوورەوە تا بتوانی دەستت بەم پەڕەیە یان کردەوەیە ڕابگات.",
        "exception-nologin-text-manual": "تکایە $1 تا بتوانیت بچیتە نێو ئەم پەڕەیە یان ئەم کردەیە ئەنجام بدەیت.",
        "virus-badscanner": "پێکەربەندیی نابەجێ: ڤایرس سکەنێری نەناسراو: ''$1''",
        "virus-scanfailed": "سکەن ئەنجام نەدرا(کۆد $1)",
        "rev-delundel": "نیشان بدە/بشارەوە",
        "rev-showdeleted": "نیشان بدە",
        "revisiondelete": "سڕینەوە/ھێنانەوەی پێداچوونەوەکان",
-       "revdelete-nooldid-title": "Ù\85Û\95بÛ\95ستÛ\8c Ù¾Û\8eداÚ\86Ù\88Ù\88Ù\86Û\95Ù\88Û\95Û\8c Ù\86ادÛ\8cار",
-       "revdelete-nooldid-text": "پێداچوەنەوەی مەبەستت ڕاچاو نەکردە بۆ ئەنجامی ئەم فەنکشێنە یان ئەو پێداچوونەوەی ڕاچاوت کردە بوونی نیە، یا خەریکی هەوڵی داشاردنی پێداچوونەوهی ئێستا‌ ئەدەی.",
+       "revdelete-nooldid-title": "Ù¾Û\8eداÚ\86Ù\88Ù\88Ù\86Û\95Ù\88Û\95Û\8c Ù\85Û\95بÛ\95ستÛ\8c Ù\86ادرÙ\88ست",
+       "revdelete-nooldid-text": "پێداچوەنەوە(کان)ی مەبەستت بۆ جێبەجێکردنی ئەم کارە دەستنیشان نەکردووە یان پێداچوونەوەی دەستنیشان‌کراو بوونی نییە، یان خەریکی هەوڵی شاردنەوەی پێداچوونەوەی ھەنووکەیی دەدەیت.",
        "revdelete-no-file": "ئەو پەڕگەی ڕاچاوت کردووە بوونی نیە.",
        "revdelete-show-file-confirm": "ئایا دڵنیایت دەتەوێ پێداچوونەوەی سڕاوەی پەڕگەی \"<nowiki>$1</nowiki>\" لە $2، لە $3دا ببیینی؟",
        "revdelete-show-file-submit": "بەڵێ",
+       "revdelete-selected-text": "{{PLURAL:$1|پێداچوونەوەی ھەڵبژێردراوی|پێداچوونەوە ھەڵبژێردراوەکانی}} [[:$2]]:",
        "logdelete-selected": "{{PLURAL:$1|لۆگی ڕووداوەی هەڵبژێراو|لۆگی ڕووداوە هەڵبژێراوەکان}}:",
-       "revdelete-confirm": "تکایە بەڵێن بدە کە دەتەوێ ئەوە بکەی و لە ئەنجامەکانی ئەوە ئاگاداریت و بە پێی [[{{MediaWiki:Policy-url}}|سیاسەتنامە]] ئەنجامی ئەدەی.",
+       "revdelete-text-text": "پێداچوونە سڕاوەکان ھێشتا لە مێژووی پەڕەدا دەردەکەوێت بەڵام بەشێک لە ناوەرۆکەکەیان بۆ ھەمووان لەبەر دەست دەبێت.",
+       "revdelete-text-file": "وەشانە سڕاوەکانی پەڕگە ھێشتا لە مێژووی پەڕگەدا دەردەکەوێت بەڵام بەشێک لە ناوەرۆکەکەیان بۆ ھەمووان لەبەر دەست دەبێت.",
+       "logdelete-text": "ڕووداوە سڕاوەکانی لۆگ ھێشتا لە لۆگەکاندا دەردەکەوێت بەڵام بەشێک لە ناوەرۆکەکەیان بۆ ھەمووان لەبەر دەست دەبێت.",
+       "revdelete-text-others": "بەڕێوەبەرانی تر ھێشتا دەتوانن ناوەرۆکی شاردراو ببینن و بیھێننەوە، مەگەر سنووردارکردنی تر ڕێک بخرێت.",
+       "revdelete-confirm": "تکایە پشتڕاست بکەوە دەتەوێ ئەمە بکەیت و لە ئاکامەکەی ئاگاداریت و ئەمە بە پێی [[{{MediaWiki:Policy-url}}|سیاسەتنامە]] دەکەیت.",
        "revdelete-suppress-text": "بەرگری دەبێ '''تەنها''' بۆ ئەم بابەتانە بەکاربهێندرێت:<br />\n* سووکایەتیکردن بە کەسایەتییەک<br />\n* بڵاوکردنەوەی زانیاریی تاکەکەسی نەگونجاو<br />\n*: '' ناونیشانی ماڵ یا ژمارە تەلەفۆن و وەک ئەمانە.''<br />",
-       "revdelete-legend": "سنووردارکردنی دەرکەوتن",
+       "revdelete-legend": "ڕێکخستنی سنووردارکردنی دیاریکردن",
        "revdelete-hide-text": "دەقی پێداچوونەوە",
        "revdelete-hide-image": "ناوەڕۆکی پەڕگە بشارەوە",
        "revdelete-hide-name": "داشاردنی مەبەست و کردەوە",
        "revdelete-suppress": "بەرگری دراوە لە بەڕێوبەران هەر وەک ئەوانی دیکە",
        "revdelete-unsuppress": "لابردنی بەربەستەکان لە سەر پێداچوونەوە گەڕێندراوەکان",
        "revdelete-log": "هۆکار:",
-       "revdelete-submit": "خستÙ\86Û\95کار Ø¨Û\86 Ø³Û\95ر Ù¾Û\8eداÚ\86Ù\88Ù\88Ù\86Û\95Ù\88Û\95 {{PLURAL:$1|Ú¾Û\95ڵبÚ\98Û\8eردراÙ\88Û\95Ú©Û\95|ھەڵبژێردراوەکان}}",
+       "revdelete-submit": "بÛ\95کاربÛ\95رÛ\95 Ø¨Û\86 Ø³Û\95ر {{PLURAL:$1|Ù¾Û\8eداÚ\86Ù\88Ù\88Ù\86Û\95Ù\88Û\95Û\8c Ú¾Û\95ڵبÚ\98Û\8eردراÙ\88|Ù¾Û\8eداÚ\86Ù\88Ù\88Ù\86Û\95Ù\88Û\95 ھەڵبژێردراوەکان}}",
        "revdelete-success": "'''چۆنیەتی بیندرانی پێداچوونەوە بە سەرکەوتوویی نوێکراوە.'''",
        "revdelete-failure": "'''ناکرێ دەرکەوتنی پێداچوونەوە نوێبکرێتەوە:'''\n$1",
        "logdelete-success": "'''بیندرانی لۆگ‌ بە سەرکەوتوویی داندرا.'''",
        "difference-multipage": "(جیاوازی نێوان پەڕەکان)",
        "lineno": "ھێڵی  $1:",
        "compareselectedversions": "پیاچوونەوە ھەڵبژێردراوەکان ھەڵسەنگێنە",
-       "showhideselectedversions": "پیاچوونەوە ھەڵبژێردراوەکان نیشانبدە/بشارەوە",
+       "showhideselectedversions": "دیاریکردنی پێداچوونەوە ھەڵبژێردراوەکان بگۆڕە",
        "editundo": "پووچەڵکردنەوە",
        "searchresults": "ئاکامەکانی گەڕان",
        "searchresults-title": "ئاکامەکانی گەڕان بۆ «$1»",
        "search-section": "(بەشی $1)",
        "search-suggest": "ئایا مەبەستت ئەمە بوو: $1",
        "search-interwiki-caption": "پرۆژە خوشکەکان",
-       "search-interwiki-default": "$1 ئەنجام:",
+       "search-interwiki-default": "ئاکام لە $1:",
        "search-interwiki-more": "(زیاتر)",
        "search-relatedarticle": "پەیوەست",
        "searchrelated": "پەیوەست",
        "searchall": "ھەموو",
        "showingresults": "لە خوارەوە {{PLURAL:$1|'''یەک''' ئەنجام|'''$1''' ئەنجام}} نیشان دراوە، بە دەست پێ کردن لە ژمارەی '''$2'''ەوە.",
+       "search-showingresults": "{{PLURAL:$4|ئاکامی <strong>$1</strong> لە <strong>$3</strong>|ئاکامەکانی <strong>$1 - $2</strong> لە <strong>$3</strong>}}",
        "search-nonefound": "ھیچ ئاکامێک کە بە داواکارییەکەت بخوا نەدۆزرایەوە.",
        "powersearch-legend": "گەڕانی پێشکەوتوو",
        "powersearch-ns": "گەڕان لە بۆشاییی ناوەکانی:",
        "recentchanges-legend-heading": "'''کورتکراوەکان:'''",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (ھەروەھا بڕوانە [[Special:NewPages|پێرستی پەڕە نوێکان]])",
        "recentchanges-legend-plusminus": "(''±۱٢٣'')",
-       "rcnotefrom": "ژێرەوە گۆڕانکارییەکانە لە <strong>$2</strong>ەوە (ھەتا <strong>$1</strong> نیشان دراوە).",
+       "rcnotefrom": "ژێرەوە {{PLURAL:$5|گۆڕانکارییەکەیە|گۆڕانکارییەکانە}} لە strong>$3، $4</strong>ەوە (ھەتا <strong>$1</strong> نیشان دراوە).",
        "rclistfrom": "گۆڕانکارییە نوێکان نیشان بدە بە دەستپێکردن لە $3 $2",
        "rcshowhideminor": "دەستکارییە بچووکەکان $1",
        "rcshowhideminor-show": "نیشان بدە",
        "alllogstext": "نیشاندانی تێکڕای هەموو لۆگە بەردەستەکانی {{SITENAME}}.\nدەتوانی بە ھەڵبژاردنی جۆرە لۆگێک، ناوی بەکارھێنەرەکە (ھەستیار بە گەورە و بچووکی پیتەکان) یان پەڕە کارتێکراوەکە (ھەستیار بە گەورە و بچووکی پیتەکان)\nبینینەکە سنووردار بکەیتەوە.",
        "logempty": "هیچ بابەتێکی هاوتا لە لۆگەکاندا نەدۆزرایەوە.",
        "log-title-wildcard": "گەڕانی ئەو سەرناوانە بەم دەقەوە دەست پێدەکەن",
-       "showhideselectedlogentries": "بابÛ\95تÛ\95کاÙ\86Û\8c Ú¾Û\95ڵبÚ\98Û\8eردراÙ\88Û\8c Ù\84Û\86Ú¯ Ù\86Û\8cشاÙ\86 Ø¨Ø¯Û\95/بشارÛ\95Ù\88ە",
+       "showhideselectedlogentries": "دÛ\8cارÛ\8cکردÙ\86Û\8c Ø¨Ø§Ø¨Û\95تÛ\95 Ú¾Û\95ڵبÚ\98Û\8eردراÙ\88Û\95کاÙ\86Û\8c Ù\84Û\86Ú¯ Ø¨Ú¯Û\86Ú\95ە",
        "allpages": "ھەموو پەڕەکان",
        "nextpage": "پەڕەی پاشەوە ($1)",
        "prevpage": "پەڕەی پێشەوە ($1)",
        "deletecomment": "ھۆکار:",
        "deleteotherreason": "ھۆکاری تر/زیاتر:",
        "deletereasonotherlist": "ھۆکاری تر",
-       "deletereason-dropdown": "* Ú¾Û\86کارÛ\8c Ø³Ú\95Û\8cÙ\86Û\95Ù\88Û\95\n** Ø¯Ø§Ù\88اکارÛ\8cÛ\8c Ù\86Ù\88Ù\88سÛ\95ر\n** ØªÛ\8eکداÙ\86Û\8c Ù\85اÙ\81Û\8c Ù\84Û\95بÛ\95رگرتÙ\86Û\95Ù\88Û\95\n** Ø®Ø±Ø§Ù¾Ú©Ø§Ø±Û\8c",
+       "deletereason-dropdown": "* Ú¾Û\86کارÛ\95 Ø¨Ø§Ù\88Û\95کاÙ\86Û\8c Ø³Ú\95Û\8cÙ\86Û\95Ù\88Û\95\n** Ø³Ù¾Ø§Ù\85\n** Ø®Ø±Ø§Ù¾Ú©Ø§Ø±Û\8c\n** Ù¾Û\8eØ´Û\8eÙ\84کردÙ\86Û\8c Ù\85اÙ\81Û\8c Ù\84Û\95بÛ\95رگرتÙ\86Û\95Ù\88Û\95\n** Ø¯Ø§Ø®Ù\88ازÛ\8c Ø¯Ø§Ù\86Û\95ر\n** Ú\95Û\95Ù\88اÙ\86Û\95Ú©Û\95رÛ\8c Ø´Ú©Ø§Ù\88",
        "delete-edit-reasonlist": "دەستکاری کردنی ھۆکارەکانی سڕینەوە",
        "delete-toobig": "ئەم لاپەڕە مێژوویەکی دەستکاری زۆر گەورەی هەیە، زیاتر لە $1 {{PLURAL:$1|پێداچوونەوە|پێداچوونەوە}}.\nبۆ بەرگری لە خراپ‌بوونی چاوەڕوان نەکراوی {{SITENAME}}، سڕینەوەی لاپەڕەی وا بەربەست‌کراوە.",
        "delete-warning-toobig": "ئەم لاپەڕە مێژوویەکی دەستکاری زۆر گەورەی هەیە، زیاتر لە $1 {{PLURAL:$1|پێداچوونەوە|پێداچوونەوە}}.\nسڕینەوی ئەوە لە وانەیە کارەکانی بنکەدراوی {{SITENAME}} تووشی کێشە بکات؛\nدوورنواڕانە جێ‌بەجێی بکە.",
        "whatlinkshere-filters": "پاڵێوکەکان",
        "block": "بەربەستنی بەکارھێنەر",
        "unblock": "لە بەربەست‌دەرهێنانی بەکارهێنەر",
-       "blockip": "بەربەستنی بەکارھێنەر",
+       "blockip": "بەربەستنی {{GENDER:$1|بەکارھێنەر}}",
        "blockip-legend": "بەربەست‌کردنی بەکارهێنەر",
        "blockiptext": "لەم فۆرمەی خوارەوە دەتوانی بۆ بەربەست‌کردنی دەست‌پێ‌گەیشتنی نووسین لە ناونیشانێکی ئای‌پی تایبەت یا ناوی بەکارهێنەریەک، کەڵک وەرگریت.\nئەمە تەنها دەبێ بۆ بەرگری لە خراپکاری بەکاربێت و ڕێکەوتنی هەبێ دەگەڵ [[{{MediaWiki:Policy-url}}|سیاسەتەکان]].\nلە خوارەوە هۆکارێک بە ڕوونی بنووسە (بۆ نموونە بە وردی ئەو لاپەڕانە و خراپکاری تێدا کراوە وەک، وەک بەڵگە، بنووسە).",
        "ipaddressorusername": "ناونیشانی ئایپی یان ناوی‌ بەکارھێنەر:",
        "ipb-unblock-addr": "لە بەربەست‌دەرهێنانی $1",
        "ipb-unblock": "لە بەربەست‌دەرهێنانی ناوی بەکارهێنەریەک یا ناونیشانێکی ئای‌پی",
        "ipb-blocklist": "دیتنی ئەو بەربەستانەی وا هەیە",
-       "ipb-blocklist-contribs": "بەشدارییەکانی $1",
+       "ipb-blocklist-contribs": "بەشدارییەکانی {{GENDER:$1|$1}}",
        "unblockip": "لە بەربەست‌دەرهێنانی بەکارهێنەر",
        "unblockiptext": "بۆ گەڕاندنەوەی دەست‌پی‌گەیشتنی نووسین بۆ ئەو دوایین ئای‌پی یان بەکارهێنەری بەربەست کراوە، لەو فۆرمەی خوارەوە کەڵک وەرگرە.",
        "ipusubmit": "لابردنی ئەم بەربەستە",
        "import-upload": "بارکردنی دراوەی XML",
        "import-token-mismatch": "لەدەستدانی دراوەکانی کۆڕ.\nتکایە دیسان تاقی بکەوە.",
        "import-invalid-interwiki": "لە ویکی‌ دیاریکراو ھاوردن ناکرێ.",
-       "import-error-edit": "پەڕەی «$1» ھاوردە ناکرێ، چون ناتوانی ئەم پەڕەیە دەستکاری بکەی.",
-       "import-error-create": "پەڕەی «$1» ھاوردە ناکرێ، چون ناتوانی ئەم پەڕەیە دروست بکەی.",
-       "import-error-interwiki": "پەڕەی «$1» ھاوردە ناکرێ چون ناوەکەی بۆ بەستەری دەرەکیی (interwiki) گیراوەتەوە.",
-       "import-error-special": "پەڕەی «$1» ھاوردە ناکرێ چون لە بۆشاییی ناوی نەگونجاودایە.",
+       "import-error-edit": "پەڕەی «$1» ھاوردە نەکرا، چون ناتوانی ئەم پەڕەیە دەستکاری بکەی.",
+       "import-error-create": "پەڕەی «$1» ھاوردە نەکرا، چون ناتوانی ئەم پەڕەیە دروست بکەی.",
+       "import-error-interwiki": "پەڕەی «$1» ھاوردە نەکرا چون ناوەکەی بۆ بەستەری دەرەکیی (interwiki) گیراوەتەوە.",
+       "import-error-special": "پەڕەی «$1» ھاوردە نەکرا چون لە بۆشاییی ناوی نەگونجاودایە.",
        "import-error-invalid": "پەڕەی «$1» ھاوردە ناکرێ چون ناوەکەی نادروستە.",
        "importlogpage": "لۆگی ھاوردن",
        "importlogpagetext": "ھاوردنی پەڕەکان لەگەڵ مێژووی دەستکاری لە ویکییەکانی ترەوە.",
        "import-logentry-upload": "[[$1]]ی بە بارکردنی پەڕگە ھاورد",
-       "import-logentry-upload-detail": "$1 {{PLURAL:$1|پێداچوونەوە}}",
+       "import-logentry-upload-detail": "$1 {{PLURAL:$1|پێداچوونەوە}} ھاوردە کرا",
        "import-logentry-interwiki": "$1ی ناوویکی کرد",
-       "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|پێداچوونەوە}} لە $2",
+       "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|پێداچوونەوە}} لە $2 ھاوردە کرا",
        "javascripttest": "تاقیکردنەوەی جاڤاسکریپت",
        "tooltip-pt-userpage": "پەڕەی بەکارھێنەرییەکەت",
        "tooltip-pt-anonuserpage": "پەڕەی بەکارھێنەری بۆ ئای‌پی یەکە کە بەناویەوە خەریکی دەستکاری کردنی",
index 1986965..ac87707 100644 (file)
@@ -82,7 +82,7 @@
        "tog-hideminor": "Kleine Änderungen in den „Letzten Änderungen“ ausblenden",
        "tog-hidepatrolled": "Kontrollierte Änderungen in den „Letzten Änderungen“ ausblenden",
        "tog-newpageshidepatrolled": "Kontrollierte Seiten bei den „Neuen Seiten“ ausblenden",
-       "tog-extendwatchlist": "Beobachtungsliste erweitern, um statt nur der letzten Änderung alle Änderungen anzuzeigen.",
+       "tog-extendwatchlist": "Alle, und nicht nur die aktuellsten Änderungen in der Beobachtungsliste anzeigen",
        "tog-usenewrc": "Änderungen auf „Letzte Änderungen“ und der Beobachtungsliste nach Seite gruppieren",
        "tog-numberheadings": "Überschriften automatisch nummerieren",
        "tog-showtoolbar": "Bearbeiten-Werkzeugleiste anzeigen",
index 8b6e66b..c448fe5 100644 (file)
        "booksources-summary": "",
        "booksources-search-legend": "Search for book sources",
        "booksources-isbn": "ISBN:",
-       "booksources-go": "Go",
+       "booksources-search": "Search",
        "booksources-text": "Below is a list of links to other sites that sell new and used books, and may also have further information about books you are looking for:",
        "booksources-invalid-isbn": "The given ISBN does not appear to be valid; check for errors copying from the original source.",
        "rfcurl": "//tools.ietf.org/html/rfc$1",
index a38b679..da8a0b9 100644 (file)
        "changeemail-oldemail": "نشانی رایانامهٔ کنونی:",
        "changeemail-newemail": "نشانی رایانامهٔ تازه:",
        "changeemail-none": "(هیچ)",
-       "changeemail-password": " {{SITENAME}} رمز عبور شما:",
+       "changeemail-password": "گذرواژهٔ {{SITENAME}} شما:",
        "changeemail-submit": "تغییر رایانامه",
        "changeemail-throttled": "شما به مراتب برای ورود تلاش کرده‌اید.\nلطفاً پیش از آنکه دوباره تلاش کنید $1 صبر کنید.",
        "resettokens": "بازنشانی شناساننده‌ها",
        "difference-multipage": "(تفاوت بین صفحات)",
        "lineno": "سطر $1:",
        "compareselectedversions": "مقایسهٔ نسخه‌های انتخاب‌شده",
-       "showhideselectedversions": "تغییر پدیداری بازبینی‌های انتخاب‌شده",
+       "showhideselectedversions": "تغییر پدیداری نسخه‌های انتخاب‌شده",
        "editundo": "خنثی‌سازی",
        "diff-empty": "(بدون تفاوت)",
        "diff-multi-sameuser": "({{PLURAL:$1|یک نسخهٔ میانی|$1 نسخهٔ میانی}} توسط کاربر مشابهی که نشان داده نشده)",
index d04d9e5..57963b1 100644 (file)
        "sorbs_create_account_reason": "Votre adresse IP est listée comme mandataire ouvert dans le DNSBL utilisé par {{SITENAME}}.\nVous ne pouvez pas créer un compte.",
        "xffblockreason": "Une adresse IP dans l'en-tête X-Forwarded-For, soit la vôtre ou celle d'un serveur proxy que vous utilisez, a été bloquée. La raison du blocage initial est : $1",
        "cant-see-hidden-user": "L’utilisateur que vous tentez de bloquer a déjà été bloqué et masqué. N’ayant pas le droit ''hideuser'', vous ne pouvez pas voir ou modifier le blocage de cet utilisateur.",
-       "ipbblocked": "Vous ne pouvez pas bloquer ou débloquer d'autres utilisateurs, parce que vous êtes vous-même bloqué{{GENDER:||e|(e)}",
+       "ipbblocked": "Vous ne pouvez pas bloquer ou débloquer d'autres utilisateurs, parce que vous êtes vous-même bloqué{{GENDER:||e|}",
        "ipbnounblockself": "Vous n'êtes pas autorisé{{GENDER:||e}} à vous débloquer vous-même",
        "lockdb": "Verrouiller la base de données",
        "unlockdb": "Déverrouiller la base de données",
index cd72433..7d88991 100644 (file)
@@ -25,6 +25,7 @@
        "tog-watchdefault": "Cuir duilleagan a dheasaicheas mi air a' chlàr-fhaire agam",
        "tog-watchmoves": "Cuir duilleagan a ghluaiseas mi air a' chlàr-fhaire agam",
        "tog-watchdeletion": "Cuir duilleagan a sguabas mi às air a' chlàr-fhaire agam",
+       "tog-watchrollback": "Cuir duilleagan air an do rinn mi roladh air ais air a' chlàr-fhaire agam",
        "tog-minordefault": "Comharraich gach mùthadh mar mhùthadh beag a ghnàth",
        "tog-previewontop": "Nochd an ro-shealladh os cionn a' bhogsa deasachaidh",
        "tog-previewonfirst": "Nochd an ro-shealladh nuair a nithear a' chiad deasachadh",
        "otherlanguages": "Ann an cànain eile",
        "redirectedfrom": "(Air ath-sheòladh o $1)",
        "redirectpagesub": "Ath-sheòl an duilleag",
+       "redirectto": "Dèan ath-stiùireadh gu:",
        "lastmodifiedat": "Chaidh an duilleag seo a mhùthadh $1 aig $2 turas mu dheireadh.",
        "viewcount": "Chaidh inntrigeadh a dhèanamh dhan duilleag seo $1 {{PLURAL:$1|turas|thuras|tursan|turas}}.",
        "protectedpage": "Duilleag fo dhìon",
        "hidetoc": "falaich",
        "collapsible-collapse": "Co-theannaich",
        "collapsible-expand": "Leudaich",
+       "confirmable-confirm": "A bheil {{GENDER:$1|thu}} cinnteach?",
+       "confirmable-yes": "Tha",
+       "confirmable-no": "Chan eil",
        "thisisdeleted": "A bheil thu airson $1 a shealltainn no aiseag?",
        "viewdeleted": "A bheil thu airson $1 a shealltainn?",
        "restorelink": "$1 {{PLURAL:$1|deasachadh|dheasachadh|deasachaidhean|deasachadh}} a chaidh a sguabadh às",
        "invalidtitle-knownnamespace": "Tiotal mì-dhligheach leis an ainm-spàs \"$2\" agus an teacsa \"$3\"",
        "invalidtitle-unknownnamespace": "Tiotal mì-dhligheach leis an àireamh ainm-spàis $1 agus an teacsa \"$2\"",
        "exception-nologin": "Chan eil thu air logadh a-steach",
-       "exception-nologin-text": "Feumaidh tu [[Special:Userlogin|logadh a-steach]] mus fhaic thu an duilleag seo no mus urrainn dhut seo a dhèanamh.",
+       "exception-nologin-text": "Dèan logadh a-steach gus cothrom fhaighinn air an duilleag no air a' ghnìomh seo.",
        "exception-nologin-text-manual": "Ma tha thu ag iarraidh cothrom air an duilleag no air a' ghnìomh seo, $1.",
        "virus-badscanner": "Droch cho-dhealbhachd: sganair bhìorasan neo-aithnichte: <em>$1</em>",
        "virus-scanfailed": "dh'fhàillig an sganadh (còd $1)",
        "createaccount-text": "Chruthaich cuideigin cunntas airson a' phost-d agad air {{SITENAME}} ($4) air a bheil \"$2\", leis an fhacal-fhaire \"$3\".\nBu chòir dhut logadh a-steach agus am facal-faire agad atharrachadh gu h-ìosal an-dràsta.\n\n'S urrainn dhut an teachdaireachd seo a leigeil seachad ma chaidh an cunntas a chruthachadh air mhearachd.",
        "login-throttled": "Dh'fheuch thu ri logadh a-steach ro thric o chionn ghoirid.\nFuirich ort $1 mus feuch thu ris a-rithist.",
        "login-abort-generic": "Cha do shoirbhich leat leis an logadh a-steach - Chaidh sgur dheth",
+       "login-migrated-generic": "Chaidh an cunntas agad imrich 's chan eil an t-ainm cleachdaiche agad ann tuilleadh air an uicidh seo.",
        "loginlanguagelabel": "Cànan: $1",
        "suspicious-userlogout": "Chaidh d' iarrtas airson logadh a-mach a dhiùltadh a chionn 's gu bheil coltas gun deach a chur le brabhsair briste no le progsaidh tasglannaidh.",
        "createacct-another-realname-tip": "Cha leig thu leas innse dè am fìor-ainm a tha ort.\nMa bheir thu seachad e, thèid seo a chleachdadh gus urram a thoirt dha na h-ùghdaran airson an cuid obrach.",
        "passwordreset-emailsent-capture": "Chaidh post-d a chum ath-shuidheachadh an fhacail-fhaire a chur agus chì thu sin gu h-ìosal.",
        "passwordreset-emailerror-capture": "Chaidh post-d a chum ath-shuidheachadh an fhacail-fhaire a ghintinn agus chì thu sin gu h-ìosal ach cha b' urrainn dhuinn a chur dhan chleachdaiche: $1",
        "changeemail": "Atharraich am post-d",
-       "changeemail-header": "Atharraich cunntas a' phuist-d",
        "changeemail-text": "Lìon am foirm seo gus am post-d agad atharrachadh. Feumaidh tu am facal-faire agad a chur a-steach a-rithist gus a dhearbhadh.",
        "changeemail-no-info": "Feumaidh tu logadh a-steach mus dèan thu inntrigeadh dìreach dhan duilleag seo.",
        "changeemail-oldemail": "An seòladh puist-d làithreach:",
        "changeemail-none": "(chan eil gin)",
        "changeemail-password": "Am facal-faire agad air {{SITENAME}}:",
        "changeemail-submit": "Atharraich am post-d",
-       "changeemail-cancel": "Sguir dheth",
        "changeemail-throttled": "Dh'fheuch thu ri logadh a-steach ro thric.\nFuirich ort $1 mus feuch thu ris a-rithist.",
        "resettokens": "Ath-shuidhich na tòcanan",
        "resettokens-text": "'S urrainn dhut tòcanan ath-shuidheachadh a bheir cothrom dhut air cuid a dhàta prìobhaideach a tha co-cheangailte ris a' chunntas agad.\n\nBu chòir dhut seo a dhèanamh ma thug thu do chuideigin e air mhearachd no ma bhris cuideigin a-steach air a' chunntas agad.",
        "preview": "Ro-shealladh",
        "showpreview": "Seall an ro-shealladh",
        "showdiff": "Seall na mùthaidhean",
-       "anoneditwarning": "<strong>Rabhadh:</strong> Chan eil thu air logadh a-steach.\nThèid an seòladh IP agad a chlàradh ann an eachdraidh na duilleige seo.",
+       "blankarticle": "<strong>Rabhadh:</strong> Tha an duilleag a tha thu a' cruthachadh bàn.\nMa nì thu briogadh air \"{{int:savearticle}}\" a-rithist, thèid an duilleag a chruthachadh gun susbaint sam bith innte.",
+       "anoneditwarning": "<strong>Rabhadh:</strong> Chan eil thu air logadh a-steach. Chithear an seòladh IP agad gu poblach ma nì thu deasachadh sam bith. Ma nì thu <strong>[$1 logadh a-steach]</strong> no ma <strong>[$2 chruthaicheas tu cunntas]</strong>, thèid d' ainm a chur ris na dheasaich thu 's gheibh thu buannachd a bharrachd às cuideachd.",
        "anonpreviewwarning": "<em>Chan eil thu air logadh a-steach. Ma nì thu sàbhaladh, thèid an seòladh IP agad a chlàradh ann an eachdraidh deasachadh na duilleige seo.</em>",
        "missingsummary": "<strong>Cuimhnich:</strong> Cha dug thu seachad gearr-chunntas air na dh'atharraich thu.\nMa bhriogas tu air \"{{int:savearticle}}\" a-rithist, thèid na dheasaich thu a shàbhaladh as aonais gearr-chunntais.",
        "missingcommenttext": "Cuir a-steach beachd gu h-ìosal.",
        "searchall": "a h-uile",
        "showingresults": "A' sealltainn suas ri <strong>$1</strong> {{PLURAL:$1|toradh|thoradh|toraidhean|toradh}} gu h-ìosal a' tòiseachadh le àireamh <strong>$2</strong>.",
        "showingresultsinrange": "A' sealltainn suas ri <strong>$1</strong> {{PLURAL:$1|toradh|thoradh|toraidhean|toradh}} san rainse eadar àireamh <strong>$2</strong> is <strong>$3</strong>.",
-       "showingresultsheader": "{{PLURAL:$5|Toradh <strong>$1</strong> à <strong>$3</strong>|Toraidhean <strong>$1 - $2</strong> à <strong>$3</strong>}} airson <strong>$4</strong>",
        "search-nonefound": "Cha do fhreagair toradh sam bith ri d' iarrtas.",
        "powersearch-legend": "Rannsachadh adhartach",
        "powersearch-ns": "Lorg ann an ainm-spàsan:",
        "randomincategory": "Duilleag air thuaiream san roinn-seòrsa",
        "randomincategory-invalidcategory": "Chan e \"$1\" 'na ainm roinn-seòrsa dligheach.",
        "randomincategory-nopages": "Chan eil duilleag san roinn-seòrsa [[:Category:$1|$1]].",
-       "randomincategory-selectcategory": "Faigh duilleag air thuaiream a tha san roinn-seòrsa: $1 $2.",
-       "randomincategory-selectcategory-submit": "Siuthad",
        "randomredirect": "Ath-stiùireadh air thuaiream",
        "randomredirect-nopages": "Chan eil ath-stiùireadh san ainm-spàs \"$1\".",
        "statistics": "Stadastaireachd",
        "import": "Ion-phortaich duilleagan",
        "importinterwiki": "Ion-phortachadh tar-uicidh",
        "import-interwiki-text": "Tagh uicidh 's tiotal na duilleige airson ion-phortachadh.\nThèid cinn-là nam mùthaidhean 's ainmean nan deasaichean a ghlèidheadh.\nThèid gach gnìomh ion-phortachadh tar-uicidh a chur ris an [[Special:Log/import|loga ion-phortachaidh]].",
-       "import-interwiki-source": "An uicidh/duilleag thùsail:",
        "import-interwiki-history": "Dèan lethbhreac de dh'eachdraidh nam mùthaidhean slàna airson na duilleige seo",
        "import-interwiki-templates": "Gabh a-steach na teamplaidean uile",
        "import-interwiki-submit": "Ion-phortaich",
index 3edf919..a94831f 100644 (file)
        "userlogin-resetlink": "Datos de authentication oblidate?",
        "userlogin-resetpassword-link": "Contrasigno oblidate?",
        "userlogin-helplink2": "Adjuta al accesso",
+       "userlogin-loggedin": "Tu ha jam aperite session como {{GENDER:$1|$1}}.\nUsa le formulario sequente pro aperir session como altere usator.",
+       "userlogin-createanother": "Crear un altere conto",
        "createacct-emailrequired": "Adresse de e-mail",
        "createacct-emailoptional": "Adresse de e-mail (optional)",
        "createacct-email-ph": "Entra tu adresse de e-mail",
        "passwordreset-emailsent-capture": "Un message de e-mail pro le reinitialisation del contrasigno ha essite inviate; iste message es monstrate hic infra.",
        "passwordreset-emailerror-capture": "Un e-mail pro le reinitialisation del contrasigno ha essite generate; iste message es monstrate hic infra, ma le invio al {{GENDER:$2|usator}} ha fallite: $1",
        "changeemail": "Cambiar adresse de e-mail",
-       "changeemail-header": "Cambiar le adresse de e-mail del conto",
        "changeemail-text": "Completa iste formulario pro cambiar tu adresse de e-mail. Essera necessari entrar tu contrasigno pro confirmar iste cambio.",
        "changeemail-no-info": "Tu debe aperir un session pro poter acceder directemente a iste pagina.",
        "changeemail-oldemail": "Adresse de e-mail actual:",
        "changeemail-none": "(nulle)",
        "changeemail-password": "Contrasigno de {{SITENAME}}:",
        "changeemail-submit": "Cambiar e-mail",
-       "changeemail-cancel": "Cancellar",
        "changeemail-throttled": "Tu ha facite troppo de tentativas de aperir session.\nPer favor attende $1 ante de probar lo novemente.",
        "resettokens": "Reinitialisar indicios",
        "resettokens-text": "Hic tu pote reinitialisar le indicios que permitte le accesso a certe datos private associate a tu conto.\n\nTu deberea facer lo si tu los ha accidentalmente dividite con un altere persona o si tu conto ha essite compromittite.",
        "searchall": "totes",
        "showingresults": "Infra se monstra non plus de {{PLURAL:$1|'''1''' resultato|'''$1''' resultatos}} a partir del numero '''$2'''.",
        "showingresultsinrange": "In basso es monstrate usque a {{PLURAL:$1|<strong>1</strong> resultato|<strong>$1</strong> resultatos}} inter #<strong>$2</strong> e #<strong>$3</strong>.",
+       "search-showingresults": "{{PLURAL:$4|Resultato <strong>$1</strong> de <strong>$3</strong>|Resultatos <strong>$1 - $2</strong> de <strong>$3</strong>}}",
        "search-nonefound": "Le recerca non ha producite resultatos.",
        "powersearch-legend": "Recerca avantiate",
        "powersearch-ns": "Cercar in spatios de nomines:",
        "prefs-tokenwatchlist": "Indicio",
        "prefs-diffs": "Differentias",
        "prefs-help-prefershttps": "Iste preferentia habera effecto a partir de tu proxime session.",
+       "prefswarning-warning": "To ha facite modificationes in tu preferentias que non ha ancora essite confirmate. Si tu quita iste pagina sin cliccar sur \"$1\", tu preferentias non essera cambiate.",
        "prefs-tabs-navigation-hint": "Consilio: Tu pote usar le claves de sagitta sinistre e dextre pro navigar inter le schedas in le lista.",
        "email-address-validity-valid": "Sembla valide",
        "email-address-validity-invalid": "Un adresse valide es obligatori!",
        "protect-othertime": "Altere duration:",
        "protect-othertime-op": "altere duration",
        "protect-existing-expiry": "Expiration existente: le $2 a $3",
+       "protect-existing-expiry-infinity": "Termino de expiration existente: infinite",
        "protect-otherreason": "Motivo altere/additional:",
        "protect-otherreason-op": "Altere motivo",
        "protect-dropdown": "*Motivos commun de protection\n** Vandalismo excessive\n** Spam excessive\n** Guerra de modificationes contraproductive\n** Pagina frequentemente visitate",
        "unblocked": "[[User:$1|$1]] ha essite disblocate",
        "unblocked-range": "$1 ha essite disblocate",
        "unblocked-id": "Le blocada $1 ha essite eliminate",
+       "unblocked-ip": "[[Special:Contributions/$1|$1]] ha essite disblocate.",
        "blocklist": "Usatores blocate",
        "ipblocklist": "Usatores blocate",
        "ipblocklist-legend": "Cercar un usator blocate",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|ha incargate}} un nove version de $3",
        "logentry-upload-revert": "$1 {{GENDER:$2|ha incargate}} $3",
        "rightsnone": "(nulle)",
+       "revdelete-summary": "summario del modification",
        "feedback-bugornote": "Si tu es preste a describer un problema technic in detalio, per favor [$1 reporta un falta].\nSi non, tu pote usar le formulario facile hic infra. Tu commento essera addite al pagina \"[$3 $2]\", con tu nomine de usator e le navigator del web que tu usa.",
        "feedback-subject": "Subjecto:",
        "feedback-message": "Message:",
        "log-description-pagelang": "Isto es un registro de cambios de lingua in paginas.",
        "logentry-pagelang-pagelang": "$1 {{GENDER:$2|cambiava}} le lingua del pagina $3 de $4 a $5.",
        "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (activate)",
-       "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''disactivate''')"
+       "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''disactivate''')",
+       "mediastatistics": "Statisticas de multimedia",
+       "mediastatistics-summary": "Statisticas sur le typos de file incargate. Isto include solmente le version le plus recente de un file. Versiones ancian o delite de files es excludite.",
+       "mediastatistics-nbytes": "{{PLURAL:$1|$1 byte|$1 bytes}} ($2; $3%)",
+       "mediastatistics-table-mimetype": "Typo MIME",
+       "mediastatistics-table-extensions": "Extensiones possibile",
+       "mediastatistics-table-count": "Numero de files",
+       "mediastatistics-table-totalbytes": "Dimension combinate",
+       "mediastatistics-header-unknown": "Incognite",
+       "mediastatistics-header-bitmap": "Imagines de mappa de bits",
+       "mediastatistics-header-drawing": "Designos (imagines vectorial)",
+       "mediastatistics-header-audio": "Audio",
+       "mediastatistics-header-video": "Video",
+       "mediastatistics-header-multimedia": "Multimedia complexe",
+       "mediastatistics-header-office": "Officio",
+       "mediastatistics-header-text": "Textual",
+       "mediastatistics-header-executable": "Executabiles",
+       "mediastatistics-header-archive": "Formatos comprimite"
 }
index 056d4ca..8230632 100644 (file)
        "prefs-tokenwatchlist": "Tanda",
        "prefs-diffs": "Beda",
        "prefs-help-prefershttps": "Preferensi ini akan diaktifkan kali berikutnya Anda masuk log.",
+       "prefswarning-warning": "Perubahan preferensi anda belum tersimpan. Apabila anda meninggalkan halaman ini tanpa men-klik \"$1\" preferensi anda tidak akan diperbarui.",
        "prefs-tabs-navigation-hint": "Tip: Anda dapat menggunakan tombol panah kiri dan kanan untuk bernavigasi antartab di dalam daftar tab.",
        "email-address-validity-valid": "Alamat surel tampaknya sah",
        "email-address-validity-invalid": "Masukkan alamat surel yang sah",
        "log-description-pagelang": "Ini adalah log perubahan dalam bahasa halaman.",
        "logentry-pagelang-pagelang": "$1 {{GENDER:$2|mengubah}} bahasa halaman $3 dari $4 menjadi $5.",
        "mediastatistics-summary": "Statistik tentang jenis file yang terunggah. Ini hanya mencakup versi terbaru dari sebuah file. Terkecuali file lama dan file yang sudah dihapus",
+       "mediastatistics-table-count": "Jumlah file",
+       "mediastatistics-table-totalbytes": "Ukuran gabungan",
        "mediastatistics-header-unknown": "Tidak diketahui",
-       "mediastatistics-header-video": "Video"
+       "mediastatistics-header-bitmap": "Gambar bitmap",
+       "mediastatistics-header-audio": "Audio",
+       "mediastatistics-header-video": "Video",
+       "mediastatistics-header-office": "Office",
+       "mediastatistics-header-text": "Tekstual",
+       "mediastatistics-header-executable": "Executable",
+       "mediastatistics-header-archive": "Format terkompresi"
 }
index 6650352..9a09386 100644 (file)
        "otherlanguages": "他言語版",
        "redirectedfrom": "($1から転送)",
        "redirectpagesub": "転送ページ",
+       "redirectto": "転送先:",
        "lastmodifiedat": "このページの最終更新日時は $1 $2 です。",
        "viewcount": "このページは {{PLURAL:$1|$1 回}}アクセスされました。",
        "protectedpage": "保護されたページ",
        "searchall": "すべて",
        "showingresults": "<strong>$2</strong> 件目以降の最大 {{PLURAL:$1|<strong>$1</strong> 件の結果}}を表示しています。",
        "showingresultsinrange": "<strong>$2</strong> 件目から<strong>$3</strong> 件目までの範囲内で最大 {{PLURAL:$1|<strong>$1</strong> 件の結果}}を表示しています。",
+       "search-showingresults": "{{PLURAL:$4|<strong>$3</strong> 件中の <strong>$1</strong> 件目|<strong>$3</strong> 件中の <strong>$1</strong> 件目から <strong>$2</strong> 件目}}",
        "search-nonefound": "問い合わせに合致する検索結果はありませんでした。",
        "powersearch-legend": "高度な検索",
        "powersearch-ns": "名前空間を指定して検索:",
        "prefs-tokenwatchlist": "トークン",
        "prefs-diffs": "差分",
        "prefs-help-prefershttps": "この設定は、次回ログインの際に反映されます。",
+       "prefswarning-warning": "個人設定にまだ保存されていない変更があります。\n「$1」をクリックせずに離れた場合、個人設定は更新されません。",
        "prefs-tabs-navigation-hint": "ヒント: ← キーと → キーで、タブ一覧内のタブ間を移動できます。",
        "email-address-validity-valid": "メールアドレスは有効のようです",
        "email-address-validity-invalid": "有効なメールアドレスを入力してください",
        "protect-othertime": "その他の期間:",
        "protect-othertime-op": "その他の期間",
        "protect-existing-expiry": "現在の保護期限: $2 $3",
+       "protect-existing-expiry-infinity": "既存の有効期限: 無期限",
        "protect-otherreason": "他の、または追加の理由:",
        "protect-otherreason-op": "その他の理由",
        "protect-dropdown": "*よくある保護理由\n** 度重なる荒らし\n** 度重なるスパム投稿\n** 非生産的な編集合戦\n** 高負荷ページ",
        "unblocked": "[[User:$1|$1]]のブロックを解除しました。",
        "unblocked-range": "$1のブロックを解除しました。",
        "unblocked-id": "ブロック$1を除去しました。",
+       "unblocked-ip": "[[Special:Contributions/$1|$1]]はブロックされています。",
        "blocklist": "ブロックされている利用者",
        "ipblocklist": "ブロックされている利用者",
        "ipblocklist-legend": "ブロックされている利用者の検索",
        "default-skin-not-found": "おっと! あなたのウィキの既定の外装「<code>$1</code>」 (<code>$wgDefaultSkin</code>)は利用できません。\n\nあなたのインストールには以下の外装が含まれています。外装の有効化と既定の選択については、[https://www.mediawiki.org/wiki/Manual:Skin_configuration マニュアル: 外装設定] をご覧ください。\n\n$2\n\n; MediaWikiをインストールしたばかりの場合:\n: gitからインストールしたか、その他の何らかの方法でソースコードから直接インストールした場合には、これは期待されたとおりの動作です。\n:* [https://www.mediawiki.org/wiki/Category:All_skins mediawiki.org's skin directory] から外装をインストールしてみてください。\n:* [https://www.mediawiki.org/wiki/Download tarball installer] をダウンロードしてみてください。これにはいくつかの外装と拡張機能が含まれています。 <code>skins/</code> ディレクトリからコピー&ペーストできます。\n: あなたがMediaWiki開発者の場合、これを行うことであなたのgitリポジトリに干渉することはありません。\n\n; MediaWiki をアップグレードした場合:\n: MediaWiki 1.24 以降のバージョンでは、インストール済みの外装は自動的には有効になりません。 ([https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery マニュアル:外装の自動探索] をご覧ください)。<code>LocalSettings.php</code> に以下の行をペーストして、現在インストールされている外装を有効にできます。\n\n<pre>$3</pre>\n\n; <code>LocalSettings.php</code>を編集したばかりの場合:\n: 外装名に打ち間違いがないか再度確認してください。",
        "default-skin-not-found-no-skins": "おっと! あなたのウィキの既定の外装「<code>$1</code>」 (<code>$wgDefaultSkin</code>)は利用できません。\n\n外装をインストールしていません。\n\n; MediaWikiをインストールしたばかりの場合:\n: gitからインストールしたか、その他の何らかの方法でソースコードから直接インストールした場合には、これは期待されたとおりの動作です。\n:* [https://www.mediawiki.org/wiki/Category:All_skins mediawiki.org's skin directory] から外装をインストールしてみてください。\n:* [https://www.mediawiki.org/wiki/Download tarball installer] をダウンロードしてみてください。これには外装と拡張機能がいくつか含まれています。 <code>skins/</code> ディレクトリからコピー&ペーストできます。\n: あなたがMediaWiki開発者の場合、これを行うことであなたのgitリポジトリに干渉することはありません。外装の有効化と既定の選択についての情報は、[https://www.mediawiki.org/wiki/Manual:Skin_configuration マニュアル:外装設定] をご覧ください。",
        "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (有効)",
-       "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''無効''')"
+       "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''無効''')",
+       "mediastatistics": "メディア統計",
+       "mediastatistics-summary": "アップロードされたファイルの種類に関する統計。これはファイルの最新バージョンのみを含みます。以前のまたは削除されたバージョンについては除外されています。",
+       "mediastatistics-nbytes": "{{PLURAL:$1|$1 バイト|$1 バイト}} ($2; $3%)",
+       "mediastatistics-table-mimetype": "MIMEタイプ",
+       "mediastatistics-table-extensions": "取りうる拡張子",
+       "mediastatistics-table-count": "ファイル数",
+       "mediastatistics-table-totalbytes": "合計サイズ",
+       "mediastatistics-header-unknown": "不明",
+       "mediastatistics-header-bitmap": "ビットマップ画像",
+       "mediastatistics-header-drawing": "線画 (ベクタイメージ)",
+       "mediastatistics-header-audio": "オーディオ",
+       "mediastatistics-header-video": "動画",
+       "mediastatistics-header-multimedia": "リッチメディア",
+       "mediastatistics-header-office": "オフィス",
+       "mediastatistics-header-text": "テキスト",
+       "mediastatistics-header-executable": "実行ファイル",
+       "mediastatistics-header-archive": "圧縮フォーマット"
 }
index 72bc31b..80ac83c 100644 (file)
        "log-description-pagelang": "Dëst ass a Log mat den Ännerunge vun de Sprooche vun de Säiten.",
        "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (aktivéiert)",
        "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''desaktivéiert''')",
+       "mediastatistics-table-extensions": "Méiglech Erweiderungen",
        "mediastatistics-table-count": "Zuel vun de Fichieren",
        "mediastatistics-header-unknown": "Onbekannt",
        "mediastatistics-header-audio": "Audio",
index 5cb2908..199bc0d 100644 (file)
        "protect-expiring": "گات تموم بیین $1 (یو تی سی)",
        "protect-expiring-local": "گات تموم بیین $1",
        "protect-expiry-indefinite": "بی زمون",
+       "protect-cascade": "پر و پیم بیین تافنمایی- همه بلگه یایی که هان د ای بلگه پر و پیم بوئن.",
        "protect-othertime": "وخت هنی:",
        "protect-othertime-op": "گات هنی",
        "protect-existing-expiry": "گات تموم بیین ایسنی: $2، $3",
        "viewdeletedpage": "دیئن بلگه یا پاکسا بیه",
        "undelete-fieldset-title": "د نو زنه کردن وانئریا",
        "undeleterevisions": "$1 نسقه مال دیاری{{PLURAL:$1|بیه|بینه}}",
+       "undelete-revision": "نسقه پاکسا بیه $1 (د ویرگار$4 ساعت $5) وه دس $3:",
        "undelete-nodiff": "وانئری دماتری پیدا نبیه.",
        "undeletebtn": "د نو زنه کردن",
        "undeletelink": "بوين/دوواره آماده با",
        "undeleteinvert": "انتخاو برعسك بوئه",
        "undeletecomment": "دليل:",
        "undeletedrevisions": "وانئری$1 د نو زنه{{PLURAL:$1|بی}}",
+       "undeletedrevisions-files": "{{PLURAL:$1|1 وانئری|$1 وانئریا}} و{{PLURAL:$2|1 جانیا|$2 جانیا}} د نو زئنه بینه.",
        "undeletedfiles": "{{PLURAL:$1|1 جانیا|$1 جانیایا}} د نو زنه بیه",
        "cannotundelete": "زنه کردن انجوم نبی:$1",
        "undelete-search-title": "بلگه یا پاکسا بیه نه پی جوری کو",
        "undelete-search-box": "پی جوری بلگه یا پاکسا بیه",
        "undelete-search-prefix": "بلگه یایی که وا شرو بیه نشو بیه:",
        "undelete-search-submit": "پی جوری",
+       "undelete-cleanup-error": "خطا د پاکسا کردن ویرگارچه وه کار نگرته بیه د«$1».",
        "undelete-error": "خطا بلگه ای که نبوئه پاکساش بکی",
        "undelete-error-short": "خطا پاک نبیئن جانیا:$1",
        "undelete-show-file-submit": "هری",
        "undelete-revision-row": "$1 $2 ($3) $4 . . $5 $6 $7 $8 $9",
        "namespace": "نوم جا:",
        "invert": "انتخاو برعسك بوئه",
+       "namespace_association": "نوم جایا یکاگرته",
        "blanknamespace": "اصلی",
        "contributions": "{{جنس:$1|کارور}} هومیاریا",
        "contributions-title": "هومياري كارور سي $1",
        "mycontris": "هومياری",
        "contribsub2": "سي {{جنسيت:$3|$1}} ($2)",
+       "contributions-userdoesnotexist": "کاریار \"$1\" ثوت نام نکرده.",
        "uctop": "(تازه باو)",
        "month": "د ما(یا زیتر)",
        "year": "د سال",
index 4a7ad95..fdeefe6 100644 (file)
        "exif-ycbcrpositioning": "Mpizzamento d' Y e C",
        "exif-xresolution": "Resoluzione orizzontale",
        "exif-yresolution": "Resoluzione verticale",
+       "exif-stripoffsets": "Pizzo addò sta l'immaggine",
+       "exif-rowsperstrip": "Nummero 'e righe pe' striscia",
+       "exif-stripbytecounts": "Byte pe' striscia compressa",
+       "exif-jpeginterchangeformat": "Distanza 'a SOI JPEG",
+       "exif-jpeginterchangeformatlength": "Byte 'e date JPEG",
+       "exif-whitepoint": "Cromaticetà d' 'o punto janco",
+       "exif-primarychromaticities": "Cromaticetà d' 'e culore primmarie",
+       "exif-ycbcrcoefficients": "Coefficiente d' 'a matrice 'e trasformazione d' 'o spazio 'e culore",
+       "exif-referenceblackwhite": "Paro 'e riferimento 'e valore janche e nire",
+       "exif-datetime": "Data e ora 'e cagnamiento d' 'o file",
+       "exif-imagedescription": "Titulo 'e l'immaggene",
+       "exif-make": "Frabbeca ca muntaje 'a camera",
+       "exif-model": "Mudello d' 'a camera",
+       "exif-software": "Software ausàto",
+       "exif-artist": "Autore",
+       "exif-copyright": "Titolare d' 'o Copyright",
+       "exif-exifversion": "Verzione d'Exif",
+       "exif-flashpixversion": "Verziona Flashpix suppurtata",
+       "exif-colorspace": "Spazio d' 'e culore",
+       "exif-componentsconfiguration": "Significato d'ogne componente",
+       "exif-compressedbitsperpixel": "Modo 'e compressione 'e l'immaggene",
+       "exif-pixelydimension": "Larghezza 'e l'immaggene",
+       "exif-pixelxdimension": "Autezza 'e l'immaggene",
+       "exif-usercomment": "Note 'e ll'utente",
+       "exif-relatedsoundfile": "File audio cullegato",
+       "exif-datetimeoriginal": "Data e ora d' 'a criazione d' 'e date",
+       "exif-datetimedigitized": "Data e ora 'e digitalizzazziona",
+       "exif-subsectime": "DateTime centeseme",
+       "exif-subsectimeoriginal": "DateTimeOriginal centeseme",
+       "exif-subsectimedigitized": "DateTimeDigitized centeseme",
+       "exif-exposuretime": "Tiempo d'esposizione",
+       "exif-exposuretime-format": "$1 sec ($2)",
+       "exif-fnumber": "Nummero p' 'o F",
+       "exif-exposureprogram": "Prugramma d'esposizione",
+       "exif-spectralsensitivity": "Senzitività spettrale",
+       "exif-isospeedratings": "Senzibbiletà ISO",
+       "exif-shutterspeedvalue": "Velocità d' 'o nchiuretore APEX",
+       "exif-aperturevalue": "Apertura APEX",
+       "exif-brightnessvalue": "Lumenosetà APEX",
+       "exif-exposurebiasvalue": "Correzzione d'esposizione APEX",
+       "exif-maxaperturevalue": "Apiertura massima",
+       "exif-subjectdistance": "Distanza d' 'o soggetto",
+       "exif-meteringmode": "Metodo 'e mmisura",
+       "exif-lightsource": "Sorgente 'e luce",
+       "exif-flash": "Flash",
+       "exif-focallength": "Distanza focale d' 'a lente",
+       "exif-subjectarea": "Area d' 'o soggetto",
+       "exif-flashenergy": "Putenza d' 'o flash",
+       "exif-focalplanexresolution": "Resoluzione X ncopp' 'o piano focale",
+       "exif-focalplaneyresolution": "Resoluzione Y ncopp' 'o piano focale",
+       "exif-focalplaneresolutionunit": "Unità 'e resoluzione d' 'o piano focale",
+       "exif-subjectlocation": "Pizzo addò stà 'o soggetto",
+       "exif-exposureindex": "Innece d'esposizione",
+       "exif-sensingmethod": "Sistema 'e rilevazione",
+       "exif-filesource": "Origgene d' 'o file",
+       "exif-scenetype": "Tipo 'e scena",
+       "exif-customrendered": "Prucesso d' 'a immaggene",
+       "exif-exposuremode": "Modo d'esposizione",
+       "exif-whitebalance": "Valanza 'e janco",
+       "exif-digitalzoomratio": "Rapporto zoom diggitale",
+       "exif-focallengthin35mmfilm": "Focale eguale a 35 mm",
+       "exif-scenecapturetype": "Tipo d'acquisizziona",
+       "exif-gaincontrol": "Cuntrollo d' 'a scena",
+       "exif-contrast": "Contrasto",
+       "exif-saturation": "Saturazione",
+       "exif-sharpness": "Nitidezza",
+       "exif-devicesettingdescription": "Descrizione d' 'e mpustaziune d' 'o dispositivo",
+       "exif-subjectdistancerange": "Scala distanza soggetto",
+       "exif-imageuniqueid": "ID 'e l'immaggine univoco",
+       "exif-gpsversionid": "Verzione d' 'e tag GPS",
+       "exif-gpslatituderef": "Latitudine nord o sud",
+       "exif-gpslatitude": "Latitudine",
+       "exif-gpslongituderef": "Longitudine est o ovest",
+       "exif-gpslongitude": "Longitudine",
+       "exif-gpsaltituderef": "Riferimento pe' l'autezza",
+       "exif-gpsaltitude": "Autezza",
+       "exif-gpstimestamp": "orario d' 'o GPS (rilorgio atomico)",
        "exif-xyresolution-i": "$1 punte pe pollice (dpi)",
        "exif-meteringmode-0": "Scanusciuto",
        "exif-meteringmode-255": "Ato",
index 941bb91..54d2395 100644 (file)
        "booksources-summary": "{{doc-specialpagesummary|booksources}}",
        "booksources-search-legend": "Box heading on [[Special:BookSources|book sources]] special page. The box is for searching for places where a particular book can be bought or viewed.",
        "booksources-isbn": "{{optional}}\nThis is a label that appears before a text input field on the Special:BookSources page.\n{{Identical|ISBN}}",
-       "booksources-go": "Name of button in [[Special:BookSources]]\n\n{{Identical|Go}}",
+       "booksources-search": "Search button in [[Special:BookSources]]\n\n{{Identical|Go}}",
        "booksources-text": "Used in [[Special:BookSources/1]].\n\nThis message is followed by a list of links to other sites.\n\nSee also:\n* {{msg-mw|Booksources|title}}\n* {{msg-mw|Booksources-text|text}}",
        "booksources-invalid-isbn": "This message is displayed after an invalid ISBN is entered on [[Special:Booksources]].",
        "rfcurl": "{{notranslate}}\nParameters:\n* $1 - RFC number\nSee also:\n* {{msg-mw|Pubmedurl}}",
index 7edaae6..c21b615 100644 (file)
        "prefs-tokenwatchlist": "Žeton",
        "prefs-diffs": "Primerjave",
        "prefs-help-prefershttps": "Nastavitev bo začela veljati ob vaši naslednji prijavi.",
+       "prefswarning-warning": "V svojih nastavitvah ste naredili spremembe, ki jih še niste shranili. Če odidete s strani brez da bi kliknili »$1«, vaših nastavitev ne bomo posodobili.",
        "prefs-tabs-navigation-hint": "Namig: Za krmarjenje med zavihki na seznamu zavihkov lahko uporabite levo in desno smerno tipko.",
        "email-address-validity-valid": "E-poštni naslov je videti veljaven",
        "email-address-validity-invalid": "Vnesite veljaven e-poštni naslov",
        "default-skin-not-found": "Ups! Privzeta koža vašega wikija, določena v <code dir=\"ltr\">$wgDefaultSkin</code> kot <code>$1</code>, ni na voljo.\n\nKot kaže, vaša namestitev vsebuje kože, navedene spodaj. Oglejte si [https://www.mediawiki.org/wiki/Manual:Skin_configuration Priročnik: Konfiguracija kož] za več informacij, kako jih omogočiti in nastaviti kot privzete.\n\n$2\n\n; Če ste MediaWiki pravkar namestili:\n: Verjetno ste ga namestili z git ali neposredno iz izvorne kode na kakšen drug način. To je pričakovano. Poskusite namestiti nekaj kož z [https://www.mediawiki.org/wiki/Category:All_skins imenika kož mediawiki.org] tako:\n:* Prenesite [https://www.mediawiki.org/wiki/Download namestitveni program tarball], ki vsebuje nekaj kož in razširitev. Iz njega lahko kopirate in prilepite mapo <code>skins/</code>.\n:* Klonirajte enega od repozitorijev <code>mediawiki/skins/*</code> z git v mapo <code dir=\"ltr\">skins/</code> vaše namestitve MediaWiki.\n: Če ste razvijalec MediaWiki, to ne sme poseči v vaš repozitorij git.\n\n; Če ste MediaWiki pravkar posodobili:\n: MediaWiki 1.24 in novejši nameščenih kož več ne omogočijo samodejno (oglejte si [https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery Priročnik: Samodejno odkrivanje kož]). V <code>LocalSettings.php</code> lahko prilepite naslednje vrstice, da omogočite trenutno nameščene kože:\n\n<pre dir=\"ltr\">$3</pre>\n\n; Če ste pravkar spremenili <code>LocalSettings.php</code>:\n: Ponovno preverite imena kož, če ste se morda zatipkali.",
        "default-skin-not-found-no-skins": "Ups! Privzeta koža vašega wikija, določena v <code dir=\"ltr\">$wgDefaultSkin</code> kot <code>$1</code>, ni na voljo.\n\nNimate nameščenih kož.\n\n; Če ste MediaWiki pravkar namestili ali posodobili:\n: Verjetno ste ga namestili z git ali neposredno iz izvorne kode na kakšen drug način. To je pričakovano. MediaWiki 1.24 in novejši nimajo vključene nobene kože v glavnem repozitoriju. Poskusite namestiti nekaj kož z [https://www.mediawiki.org/wiki/Category:All_skins imenika kož mediawiki.org] tako:\n:* Prenesite [https://www.mediawiki.org/wiki/Download namestitveni program tarball], ki vsebuje nekaj kož in razširitev. Iz njega lahko kopirate in prilepite mapo <code dir=\"ltr\">skins/</code>.\n:* Klonirajte enega od repozitorijev <code>mediawiki/skins/*</code> z git v mapo <code>skins/</code> vaše namestitve MediaWiki.\n: Če ste razvijalec MediaWiki, to ne sme poseči v vaš repozitorij git. Oglejte si [https://www.mediawiki.org/wiki/Manual:Skin_configuration Priročnik: Konfiguracija kož] za več informacij, kako jih omogočiti in nastaviti kot privzete.",
        "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (omogočeno)",
-       "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''onemogočeno''')"
+       "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''onemogočeno''')",
+       "mediastatistics": "Statistika predstavnosti",
+       "mediastatistics-summary": "Statistika o naloženih vrstah datotek. To vključuje samo najnovejše različice datotek. Stare in izbrisane različice niso vključene.",
+       "mediastatistics-nbytes": "{{PLURAL:$1|$1 bajt|$1 bajta|$1 bajti|$1 bajtov}} ($2; $3 %)",
+       "mediastatistics-table-mimetype": "Vrsta MIME",
+       "mediastatistics-table-extensions": "Možne razširitve",
+       "mediastatistics-table-count": "Število datotek",
+       "mediastatistics-table-totalbytes": "Skupna velikost",
+       "mediastatistics-header-unknown": "Neznano",
+       "mediastatistics-header-bitmap": "Bitne slike",
+       "mediastatistics-header-drawing": "Risbe (vektorske slike)",
+       "mediastatistics-header-audio": "Zvok",
+       "mediastatistics-header-video": "Videoposnetki",
+       "mediastatistics-header-multimedia": "Obogatena predstavnost",
+       "mediastatistics-header-office": "Pisarna",
+       "mediastatistics-header-text": "Besedilno",
+       "mediastatistics-header-executable": "Izvedljive datoteke",
+       "mediastatistics-header-archive": "Stisnjene oblike"
 }
index d84868d..e0182a1 100644 (file)
        "content-model-javascript": "JavaScript",
        "content-model-css": "CSS",
        "expensive-parserfunction-warning": "<strong>警告:</strong>这个页面有太多高昂的语法功能调用。\n\n它应该少过$2次呼叫,现在有$1次呼叫。",
-       "expensive-parserfunction-category": "页面中有太多耗费的语法功能呼叫",
+       "expensive-parserfunction-category": "有过多高开销解析器函数调用的页面",
        "post-expand-template-inclusion-warning": "'''警告:'''包含模板大小过大。\n一些模板将不会包含。",
-       "post-expand-template-inclusion-category": "模板包含上限已经超过的页面",
+       "post-expand-template-inclusion-category": "模板包含大小超限的页面",
        "post-expand-template-argument-warning": "<strong>警告:</strong>本页面包含至少一个模板参数有过大扩展大小。这些参数会被略过。",
        "post-expand-template-argument-category": "含有略过模板参数的页面",
        "parser-template-loop-warning": "检查到模板循环:[[$1]]",
        "parser-template-recursion-depth-warning": "模板递归深度越限($1)",
        "language-converter-depth-warning": "字词转换器深度越限($1)",
-       "node-count-exceeded-category": "页面的节点数超出限制",
-       "node-count-exceeded-category-desc": "超出最高节点数的页面。",
-       "node-count-exceeded-warning": "页面超出了节点数",
-       "expansion-depth-exceeded-category": "扩展深度超出限制的页面",
-       "expansion-depth-exceeded-category-desc": "页面超出最大扩展深度。",
-       "expansion-depth-exceeded-warning": "页面超过了扩展深度",
+       "node-count-exceeded-category": "节点数超限的页面",
+       "node-count-exceeded-category-desc": "页面超出最大节点数限制。",
+       "node-count-exceeded-warning": "页面超出节点数限制",
+       "expansion-depth-exceeded-category": "展开深度超限的页面",
+       "expansion-depth-exceeded-category-desc": "页面超出了最大的展开深度。",
+       "expansion-depth-exceeded-warning": "页面超出展开深度限制",
        "parser-unstrip-loop-warning": "检测到回圈",
        "parser-unstrip-recursion-limit": "递归超过限制 ($1)",
        "converter-manual-rule-error": "在手动语言转换规则中检测到错误",
        "trackingcategories-msg": "追踪分类",
        "trackingcategories-name": "信息名",
        "trackingcategories-desc": "分类收录标准",
-       "noindex-category-desc": "页面中有<code><nowiki>__NOINDEX__</nowiki></code>魔术字(并且在标记允许的名字空间)且因此未被机器人索引的。",
-       "index-category-desc": "页é\9d¢ä¸\8aæ\9c\89é­\94æ\9c¯å­\97<code><nowiki>__INDEX__</nowiki></code>ï¼\88并ä½\8däº\8eå\85\81许è¿\99ç§\8dæ \87è®°ç\9a\84å\90\8då­\97空é\97´ï¼\89ï¼\8c并å\9b æ­¤è¢«ç½\91ç»\9cç\88¬è\99«ç´¢å¼\95ï¼\8cä½\86é\80\9a常ä¸\8dä¼\9a被索å¼\95。",
-       "post-expand-template-inclusion-category-desc": "在展开了所有模板后,页面大小大于<code>$wgMaxArticleSize</code>,所以一些模板未展开。",
-       "post-expand-template-argument-category-desc": "å±\95å¼\80äº\86模æ\9d¿å\8f\82æ\95°ï¼\88ä¸\89对è\8a±æ\8b¬å\8f·å\86\85ï¼\8cä¾\8bå¦\82<code>{{{Foo}}}</code>ï¼\89ä¹\8b后,页面大于<code>$wgMaxArticleSize</code>。",
-       "expensive-parserfunction-category-desc": "页面包含了太多的高级解析器函数(例如<code>#ifexist</code>)。参见[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgExpensiveParserFunctionLimit Manual:$wgExpensiveParserFunctionLimit]。",
-       "broken-file-category-desc": "页é\9d¢å\8c\85å\90«æ\8d\9få\9d\8fç\9a\84æ\96\87件è¿\9eæ\8e¥ï¼\88è¿\9eæ\8e¥è\87³åµ\8cå\85¥ç\9a\84ä¸\80个ä¸\8då­\98å\9c¨æ\96\87件)。",
-       "hidden-category-category-desc": "页面中包含<code><nowiki>__HIDDENCAT__</nowiki></code>的分类,它阻止分类默认在页面上的分类链接框中显示。",
+       "noindex-category-desc": "因为页面上有魔术字<code><nowiki>__NOINDEX__</nowiki></code>并位于允许该旗标的名字空间,而不被网络爬虫索引的页面。",
+       "index-category-desc": "页é\9d¢ä¸\8aæ\9c\89é­\94æ\9c¯å­\97<code><nowiki>__INDEX__</nowiki></code>ï¼\88并ä½\8däº\8eå\85\81许该æ\97\97æ \87ç\9a\84å\90\8då­\97空é\97´ï¼\89ï¼\8c并å\9b æ­¤è¢«ç½\91ç»\9cç\88¬è\99«ç´¢å¼\95ï¼\88è¿\99äº\9b页é\9d¢é\80\9a常ä¸\8dä¼\9a被索å¼\95ï¼\89。",
+       "post-expand-template-inclusion-category-desc": "在展开所有模板后,页面大小大于<code>$wgMaxArticleSize</code>,所以某些模板未展开。",
+       "post-expand-template-argument-category-desc": "å\9c¨å±\95å¼\80模æ\9d¿å\8f\82æ\95°ï¼\88以ä¸\89对è\8a±æ\8b¬å\8f·å\8c\85å\90«ç\9a\84ä¸\9c西ï¼\8cå¦\82<code>{{{Foo}}}</code>ï¼\89后,页面大于<code>$wgMaxArticleSize</code>。",
+       "expensive-parserfunction-category-desc": "页面使用过多高开销解析器函数(如<code>#ifexist</code>)。请见[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgExpensiveParserFunctionLimit MediaWiki官网手册]。",
+       "broken-file-category-desc": "页é\9d¢å\90«æ\9c\89å\8f\97æ\8d\9fæ\96\87件é\93¾æ\8e¥ï¼\88æ\96\87件ä¸\8då­\98å\9c¨æ\97¶ç\9a\84åµ\8cå\85¥æ\96\87件é\93¾æ\8e¥)。",
+       "hidden-category-category-desc": "分类的页面内容中含有<code><nowiki>__HIDDENCAT__</nowiki></code>,它会阻止分类默认在页面的分类链接框中显示。",
        "trackingcategories-nodesc": "没有说明。",
        "trackingcategories-disabled": "分类被禁用",
        "mailnologin": "无电子邮件地址",
        "import-interwiki-templates": "包含所有模板",
        "import-interwiki-submit": "导入",
        "import-interwiki-namespace": "目标名字空间:",
-       "import-interwiki-rootpage": "目的根页(可选):",
+       "import-interwiki-rootpage": "目标根页面(可选):",
        "import-upload-filename": "文件名:",
        "import-comment": "注释:",
        "importtext": "请使用[[Special:Export|导出功能]]从源 wiki 导出文件,\n保存到您的电脑并上传到这里。",
        "importlogpage": "导入日志",
        "importlogpagetext": "管理性导入在其他wiki上有编辑历史的页面。",
        "import-logentry-upload": "通过文件上传导入[[$1]]",
-       "import-logentry-upload-detail": "已导å\85¥$1个{{PLURAL:$1|ç\89\88æ\9c¬}}",
+       "import-logentry-upload-detail": "导入$1个{{PLURAL:$1|版本}}",
        "import-logentry-interwiki": "跨wiki页面$1",
-       "import-logentry-interwiki-detail": "已从$2导入$1个{{PLURAL:$1|版本}}",
+       "import-logentry-interwiki-detail": "来自$2的$1个{{PLURAL:$1|版本}}已导入",
        "javascripttest": "JavaScript测试",
        "javascripttest-title": "运行$1测试",
        "javascripttest-pagetext-noframework": "本页面被保留进行JavaScript测试。",
        "logentry-rights-rights": "$1{{GENDER:$2|更改}}$3的用户组自$4至$5",
        "logentry-rights-rights-legacy": "$1更改$3的用户组",
        "logentry-rights-autopromote": "$1被自动地{{GENDER:$2|提升}}自$4至$5",
-       "logentry-upload-upload": "$1{{GENDER:$2|上传}}$3",
-       "logentry-upload-overwrite": "$1{{GENDER:$2|上传}}$3的新版本",
-       "logentry-upload-revert": "$1{{GENDER:$2|上传}}$3",
+       "logentry-upload-upload": "$1{{GENDER:$2|上传}}$3",
+       "logentry-upload-overwrite": "$1{{GENDER:$2|上传}}$3的新版本",
+       "logentry-upload-revert": "$1{{GENDER:$2|上传}}$3",
        "rightsnone": "(无)",
        "revdelete-summary": "编辑摘要",
        "feedback-bugornote": "如果你准备好详细描述一个技术问题,请[$1 报告bug]。或者你可以使用下面的简单表格。你的评论将被添加至页面“[$3 $2]”,附有你的用户名。",
index 5dfec01..d949bd5 100644 (file)
        "userpage-userdoesnotexist": "使用者帳號 \"$1\" 尚未註冊。\n若您要建立/編輯此頁面,請先檢查是否正確。",
        "userpage-userdoesnotexist-view": "使用者帳號 \"$1\" 尚未註冊。",
        "blocked-notice-logextract": "此使用者目前已被封鎖。\n以下為最近的封鎖紀錄以供參考:",
-       "clearyourcache": "<strong>注意:</strong> 在您儲存之後您必須清除瀏覽器快取才可看到最新的變動。\n* <strong>Firefox / Safari:</strong> 按住 <em>Shift</em> 時點選 <em>重新整理</em>,或按 <em>Ctrl-F5</em> 或 <em>Ctrl-R</em> (Mac 為 <em>⌘-R</em>)\n* <strong>Google Chrome:</strong> 按 <em>Ctrl-Shift-R</em> (Mac 為 <em>⌘-Shift-R</em>)\n* <strong>Internet Explorer:</strong> 按住 <em>Ctrl</em> 時點選 <em>重新整理</em>,或按 <em>Ctrl-F5</em>\n* <strong>Opera:</strong> 進入 <em>工具 → 偏好設定</em> 中清除快取。",
+       "clearyourcache": "<strong>注意:</strong>在您儲存之後您必須清除瀏覽器快取才可看到最新的變動。\n* <strong>Firefox / Safari:</strong>按住 <em>Shift</em> 時點選 <em>重新整理</em>,或按 <em>Ctrl-F5</em> 或 <em>Ctrl-R</em>(Mac 則為 <em>⌘-R</em>)\n* <strong>Google Chrome:</strong>按 <em>Ctrl-Shift-R</em>(Mac 則為 <em>⌘-Shift-R</em>)\n* <strong>Internet Explorer:</strong>按住 <em>Ctrl</em> 時點選 <em>重新整理</em>,或按 <em>Ctrl-F5</em>\n* <strong>Opera:</strong>進入 <em>工具 → 偏好設定</em> 中清除快取。",
        "usercssyoucanpreview": "<strong>提示:</strong>在儲存之前使用 \"{{int:showpreview}}\" 按鈕來測試您的新 CSS。",
        "userjsyoucanpreview": "<strong>提示:</strong>在儲存之前使用 \"{{int:showpreview}}\" 按鈕來測試您的新 JavaScript。",
        "usercsspreview": "<strong>您目前正預覽您的使用者 CSS,CSS 還尚未儲存!</strong>",
index c80981b..0cc7bde 100644 (file)
@@ -16,8 +16,33 @@ if ( PHP_SAPI != 'cli' ) {
 }
 
 $source = file_get_contents( $argv[1] );
-$regexp = '#\@var\s+([^\s]+)([^/]+)/\s+(var|public|protected|private)\s+(\$[^\s;=]+)#';
-$replac = '${2} */ ${3} ${1} ${4}';
+$regexp = '#'
+       . '\@var'
+       . '\s+'
+       // Type hint
+       . '([^\s]+)'
+       . '\s+'
+       // Any text or line(s) between type hint and '/' closing the comment
+       // (includes the star of "*/"). Descriptions containing a slash
+       // are not supported. Those will have to to be rewritten to have their
+       // description *before* the @var:
+       // /**
+       //  * Description with / in it.
+       //  * @var array
+       //  */
+       // instead of:
+       // /**
+       //  * @var array Description with / in it.
+       //  */
+       . '([^/]+)'
+       . '/'
+       . '\s+'
+       . '(var|public|protected|private)'
+       . '\s+'
+       // Variable name
+       . '(\$[^\s;=]+)'
+       . '#';
+$replac = '${2}/ ${3} ${1} ${4}';
 $source = preg_replace( $regexp, $replac, $source );
 
 echo $source;
index f72049d..b9b2c8d 100644 (file)
@@ -1513,6 +1513,13 @@ return array(
                'position' => 'top',
                'targets' => array( 'desktop', 'mobile' ),
        ),
+       'mediawiki.ui.icon' => array(
+               'styles' => array(
+                       'resources/src/mediawiki.ui/components/icons.less',
+               ),
+               'position' => 'top',
+               'targets' => array( 'desktop', 'mobile' ),
+       ),
 
        /* es5-shim */
        'es5-shim' => array(
index 889b0f6..382317e 100644 (file)
@@ -4,10 +4,13 @@
                        "Milicevic01"
                ]
        },
-       "ooui-dialog-action-close": "Zatvori",
        "ooui-outline-control-move-down": "Premesti stavku na dole",
        "ooui-outline-control-move-up": "Premesti stavku na gore",
        "ooui-outline-control-remove": "Ukloni stavku",
        "ooui-toolbar-more": "Više",
-       "ooui-dialog-confirm-default-prompt": "Jeste li sigurni?"
+       "ooui-dialog-message-accept": "U redu",
+       "ooui-dialog-message-reject": "Otkaži",
+       "ooui-dialog-process-error": "Nešto je pošlo naopako",
+       "ooui-dialog-process-dismiss": "Odbaci",
+       "ooui-dialog-process-retry": "Pokušaj ponovo"
 }
index 05fb20d..cde5ffe 100644 (file)
@@ -23,6 +23,6 @@
        "ooui-dialog-message-accept": "確定",
        "ooui-dialog-message-reject": "取消",
        "ooui-dialog-process-error": "發生不明錯誤",
-       "ooui-dialog-process-dismiss": "放棄",
+       "ooui-dialog-process-dismiss": "關閉",
        "ooui-dialog-process-retry": "再試一次"
 }
index fdf41ae..0ee8ff6 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (f2c3f12959)
+ * OOjs UI v0.1.0-pre (880100c45e)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-09-18T23:22:20Z
+ * Date: 2014-09-23T22:28:43Z
  */
 /*
  * Blank theme mixins.
index 36492c0..465f087 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (f2c3f12959)
+ * OOjs UI v0.1.0-pre (880100c45e)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-09-18T23:22:20Z
+ * Date: 2014-09-23T22:28:43Z
  */
 /*
  * Blank theme mixins.
index 33c8238..7dd3735 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (f2c3f12959)
+ * OOjs UI v0.1.0-pre (880100c45e)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-09-18T23:22:20Z
+ * Date: 2014-09-23T22:28:43Z
  */
 ( function ( OO ) {
 
@@ -8218,6 +8218,7 @@ OO.ui.ButtonWidget.prototype.setTarget = function ( target ) {
  * @param {Object} [config] Configuration options
  * @cfg {string} [action] Symbolic action name
  * @cfg {string[]} [modes] Symbolic mode names
+ * @cfg {boolean} [framed=false] Render button with a frame
  */
 OO.ui.ActionWidget = function OoUiActionWidget( config ) {
        // Config intialization
@@ -8661,6 +8662,7 @@ OO.ui.InlineMenuWidget.prototype.onClick = function ( e ) {
  * @abstract
  * @class
  * @extends OO.ui.Widget
+ * @mixins OO.ui.FlaggedElement
  *
  * @constructor
  * @param {Object} [config] Configuration options
@@ -8676,6 +8678,9 @@ OO.ui.InputWidget = function OoUiInputWidget( config ) {
        // Parent constructor
        OO.ui.InputWidget.super.call( this, config );
 
+       // Mixin constructors
+       OO.ui.FlaggedElement.call( this, config );
+
        // Properties
        this.$input = this.getInputElement( config );
        this.value = '';
@@ -8697,6 +8702,7 @@ OO.ui.InputWidget = function OoUiInputWidget( config ) {
 /* Setup */
 
 OO.inheritClass( OO.ui.InputWidget, OO.ui.Widget );
+OO.mixinClass( OO.ui.InputWidget, OO.ui.FlaggedElement );
 
 /* Events */
 
@@ -8945,6 +8951,8 @@ OO.ui.CheckboxInputWidget.prototype.onEdit = function () {
  * @cfg {boolean} [multiline=false] Allow multiple lines of text
  * @cfg {boolean} [autosize=false] Automatically resize to fit content
  * @cfg {boolean} [maxRows=10] Maximum number of rows to make visible when autosizing
+ * @cfg {RegExp|string} [validate] Regular expression (or symbolic name referencing
+ *  one, see #static-validationPatterns)
  */
 OO.ui.TextInputWidget = function OoUiTextInputWidget( config ) {
        // Configuration initialization
@@ -8962,9 +8970,13 @@ OO.ui.TextInputWidget = function OoUiTextInputWidget( config ) {
        this.multiline = !!config.multiline;
        this.autosize = !!config.autosize;
        this.maxRows = config.maxRows !== undefined ? config.maxRows : 10;
+       this.validate = config.validate || null;
 
        // Events
-       this.$input.on( 'keypress', OO.ui.bind( this.onKeyPress, this ) );
+       this.$input.on( {
+               keypress: OO.ui.bind( this.onKeyPress, this ),
+               blur: OO.ui.bind( this.setValidityFlag, this )
+       } );
        this.$element.on( 'DOMNodeInsertedIntoDocument', OO.ui.bind( this.onElementAttach, this ) );
        this.$icon.on( 'mousedown', OO.ui.bind( this.onIconMouseDown, this ) );
        this.$indicator.on( 'mousedown', OO.ui.bind( this.onIndicatorMouseDown, this ) );
@@ -8986,6 +8998,13 @@ OO.mixinClass( OO.ui.TextInputWidget, OO.ui.IconElement );
 OO.mixinClass( OO.ui.TextInputWidget, OO.ui.IndicatorElement );
 OO.mixinClass( OO.ui.TextInputWidget, OO.ui.PendingElement );
 
+/* Static properties */
+
+OO.ui.TextInputWidget.static.validationPatterns = {
+       'non-empty': /.+/,
+       integer: /^\d+$/
+};
+
 /* Events */
 
 /**
@@ -9076,6 +9095,7 @@ OO.ui.TextInputWidget.prototype.setValue = function ( value ) {
        // Parent method
        OO.ui.TextInputWidget.super.prototype.setValue.call( this, value );
 
+       this.setValidityFlag();
        this.adjustSize();
        return this;
 };
@@ -9157,6 +9177,31 @@ OO.ui.TextInputWidget.prototype.select = function () {
        return this;
 };
 
+/**
+ * Sets the 'invalid' flag appropriately.
+ */
+OO.ui.TextInputWidget.prototype.setValidityFlag = function () {
+       this.isValid().done( OO.ui.bind( function ( valid ) {
+               this.setFlags( { invalid: !valid } );
+       }, this ) );
+};
+
+/**
+ * Returns whether or not the current value is considered valid, according to the
+ * supplied validation pattern.
+ *
+ * @return {jQuery.Deferred}
+ */
+OO.ui.TextInputWidget.prototype.isValid = function () {
+       var validationRegexp;
+       if ( this.validate instanceof RegExp ) {
+               validationRegexp = this.validate;
+       } else {
+               validationRegexp = this.constructor.static.validationPatterns[this.validate];
+       }
+       return $.Deferred().resolve( !!this.getValue().match( validationRegexp ) ).promise();
+};
+
 /**
  * Text input with a menu of optional values.
  *
@@ -10082,6 +10127,9 @@ OO.ui.PopupWidget.prototype.updateDimensions = function ( transition ) {
                this.$element.removeClass( 'oo-ui-popupWidget-transitioning' );
        }
 
+       // Reevaluate clipping state since we've relocated and resized the popup
+       this.clip();
+
        return this;
 };
 
index aafdff3..9f4c035 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (f2c3f12959)
+ * OOjs UI v0.1.0-pre (880100c45e)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-09-18T23:22:20Z
+ * Date: 2014-09-23T22:28:43Z
  */
 /*
  * Blank theme mixins.
index 51b3238..e5c85df 100644 (file)
                                ajaxOptions = undefined;
                        }
 
-                       return api.getToken( tokenType ).then( function ( token ) {
+                       return api.getToken( tokenType, params.assert ).then( function ( token ) {
                                params.token = token;
                                return api.post( params, ajaxOptions ).then(
                                        // If no error, return to caller as-is
                                                                params.token = undefined;
 
                                                        // Try again, once
-                                                       return api.getToken( tokenType ).then( function ( token ) {
+                                                       return api.getToken( tokenType, params.assert ).then( function ( token ) {
                                                                params.token = token;
                                                                return api.post( params, ajaxOptions );
                                                        } );
                /**
                 * Get a token for a certain action from the API.
                 *
+                * The assert parameter is only for internal use by postWithToken.
+                *
                 * @param {string} type Token type
                 * @return {jQuery.Promise}
                 * @return {Function} return.done
                 * @return {string} return.done.token Received token.
                 * @since 1.22
                 */
-               getToken: function ( type ) {
+               getToken: function ( type, assert ) {
                        var apiPromise,
                                promiseGroup = promises[ this.defaults.ajax.url ],
                                d = promiseGroup && promiseGroup[ type + 'Token' ];
 
                        if ( !d ) {
-                               apiPromise = this.get( { action: 'tokens', type: type } );
+                               apiPromise = this.get( { action: 'tokens', type: type, assert: assert } );
 
                                d = apiPromise
                                        .then( function ( data ) {
index c360e1f..4a87b74 100644 (file)
        background-image: e('/* @embed */') url(@url);
 }
 
+.background-size(@width, @height) {
+       // Vendor prefix for certain older opera browsers e.g. nintendo ds
+       -o-background-size: @width @height;
+       // Vendor prefix is added to support Android 2
+       -webkit-background-size: @width @height;
+       background-size: @width @height;
+}
+
+
 .vertical-gradient(@startColor: gray, @endColor: white, @startPos: 0, @endPos: 100%) {
        background-color: @endColor;
        background-image: -moz-linear-gradient( top, @startColor @startPos, @endColor @endPos ); // Firefox 3.6+
index e39646b..1997c1b 100644 (file)
@@ -23,7 +23,7 @@
        vertical-align: middle;
 }
 
-@checkboxSize: 24px;
+@checkboxSize: 1.6em;
 
 // We use the not selector to cancel out styling on IE 8 and below
 .mw-ui-checkbox:not(#noop) {
@@ -46,6 +46,7 @@
                // the pseudo before element of the label after the checkbox now looks like a checkbox
                & + label {
                        cursor: pointer;
+                       margin: 0 .4em;
 
                        &::before {
                                                content: '';
@@ -66,6 +67,7 @@
                        + label {
                                &::before {
                                        .background-image-svg('images/checked.svg', 'images/checked.png');
+                                       .background-size( @checkboxSize, @checkboxSize );
                                        background-repeat: no-repeat;
                                        background-position: center top;
                                }
diff --git a/resources/src/mediawiki.ui/components/icons.less b/resources/src/mediawiki.ui/components/icons.less
new file mode 100644 (file)
index 0000000..3a92b21
--- /dev/null
@@ -0,0 +1,80 @@
+@import "mediawiki.mixins";
+
+// Variables
+@iconSize: 1.4em;
+@gutterWidth: 1em;
+
+// Mixins
+.mixin-mw-ui-icon-bgimage(@iconSvg, @iconPng) {
+       &.mw-ui-icon:before {
+               .background-image-svg(@iconSvg, @iconPng);
+       }
+}
+
+// Icons
+//
+// To use icons you must be using a browser that supports pseudo elements.
+// This includes support for IE8.
+// http://caniuse.com/#feat=css-gencontent
+// Browsers that do not support either of these selectors will degrade to text only.
+//
+// Styleguide 4.
+
+.mw-ui-icon {
+       position: relative;
+       min-height: @iconSize;
+
+       // Standalone icons
+       //
+       // Markup:
+       // <div class="mw-ui-icon mw-ui-icon-element mw-ui-icon-ok">OK</div>
+       // <div class="mw-ui-icon mw-ui-icon-element mw-ui-icon-ok mw-ui-button mw-ui-progressive">OK</div>
+       //
+       // Styleguide 4.1.1.
+       &.mw-ui-icon-element {
+               @width: @iconSize + ( 2 * @gutterWidth );
+
+               text-indent: -999px;
+               overflow: hidden;
+               width: @width;
+               min-width: @width;
+               max-width: @width;
+               &:before {
+                       left: 0;
+                       right: 0;
+                       position: absolute;
+                       margin: 0 @gutterWidth;
+               }
+       }
+
+       &:before {
+               background-position: 50% 50%;
+               float: left;
+               display: block;
+               background-repeat: no-repeat;
+               background-size: 100% auto;
+               position: relative;
+               min-height: @iconSize;
+               content: '';
+       }
+
+
+       // Icons with text
+       //
+       // Markup:
+       // <div class="mw-ui-icon mw-ui-icon-before mw-ui-icon-ok">OK</div>
+       // <div class="mw-ui-icon mw-ui-icon-before mw-ui-icon-ok mw-ui-progressive mw-ui-button">OK</div>
+       //
+       // Styleguide 4.1.2
+       &.mw-ui-icon-before {
+               &:before {
+                       width: @iconSize;
+                       margin-right: @gutterWidth;
+               }
+       }
+}
+
+// Icons
+.mw-ui-icon-ok {
+       .mixin-mw-ui-icon-bgimage('images/ok.svg', 'images/ok.png');
+}
diff --git a/resources/src/mediawiki.ui/components/images/ok.png b/resources/src/mediawiki.ui/components/images/ok.png
new file mode 100644 (file)
index 0000000..8a62f27
Binary files /dev/null and b/resources/src/mediawiki.ui/components/images/ok.png differ
diff --git a/resources/src/mediawiki.ui/components/images/ok.svg b/resources/src/mediawiki.ui/components/images/ok.svg
new file mode 100644 (file)
index 0000000..15bc296
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+        width="142.282px" height="142.28px" viewBox="0 -11.785 142.282 142.28" enable-background="new 0 -11.785 142.282 142.28"
+        xml:space="preserve">
+<g>
+
+               <rect x="18.012" y="41.792" transform="matrix(0.6983 -0.7158 0.7158 0.6983 -17.1914 77.8785)" fill="#F0F0F0" width="131.56" height="35.083"/>
+
+               <rect x="2.416" y="64.455" transform="matrix(0.7158 0.6983 -0.6983 0.7158 67.7777 -2.5416)" fill="#F0F0F0" width="69.191" height="35.082"/>
+</g>
+</svg>
index 1da42a4..06a4ccd 100644 (file)
                // Remove focus glow on input[type="search"]
                outline: 0;
        }
+
+       &:disabled {
+               border-color: @colorGray14;
+               color: @colorGray12;
+       }
 }
 
 textarea.mw-ui-input {
index 9965c43..5d21319 100644 (file)
@@ -70,10 +70,6 @@ if ( $wgDBtype == 'sqlite' ) {
        }
 }
 
-# There is a convention that the parser should never
-# refer to $wgTitle directly, but instead use the title
-# passed to it.
-$wgTitle = Title::newFromText( 'Parser test script do not use' );
 $tester = new ParserTest( $options );
 
 if ( isset( $options['file'] ) ) {
index 995853e..4abb4e5 100644 (file)
@@ -428,6 +428,34 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                return false;
        }
 
+       /**
+        * Insert a new page.
+        *
+        * Should be called from addDBData().
+        *
+        * @since 1.25
+        * @param string $pageName Page name
+        * @param string $text Page's content
+        * @return array Title object and page id
+        */
+       protected function insertPage( $pageName, $text = 'Sample page for unit test.' ) {
+               $title = Title::newFromText( $pageName, 0 );
+
+               $user = User::newFromName( 'WikiSysop' );
+               $comment = __METHOD__ . ': Sample page for unit test.';
+
+               // Avoid memory leak...?
+               LinkCache::singleton()->clear();
+
+               $page = WikiPage::factory( $title );
+               $page->doEditContent( ContentHandler::makeContent( $text, $title ), $comment, 0, false, $user );
+
+               return array(
+                       'title' => $title,
+                       'id' => $page->getId(),
+               );
+       }
+
        /**
         * Stub. If a test needs to add additional data to the database, it should
         * implement this method and do so
@@ -464,7 +492,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
 
                User::resetIdByNameCache();
 
-               //Make sysop user
+               // Make sysop user
                $user = User::newFromName( 'UTSysop' );
 
                if ( $user->idForName() == 0 ) {
@@ -476,7 +504,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                        $user->saveSettings();
                }
 
-               //Make 1 page with 1 revision
+               // Make 1 page with 1 revision
                $page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
                if ( $page->getId() == 0 ) {
                        $page->doEditContent(
@@ -484,7 +512,8 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                                'UTPageSummary',
                                EDIT_NEW,
                                false,
-                               User::newFromName( 'UTSysop' ) );
+                               User::newFromName( 'UTSysop' )
+                       );
                }
        }
 
index e7454af..b78780a 100644 (file)
@@ -1,3 +1,4 @@
+/* @noflip */
 .unit-tests {
   color: green;
   border: 2px solid #eeeeee;
index 9b53381..59ffb90 100644 (file)
@@ -1,6 +1,7 @@
 <?php
+
 /**
- * @group Broken
+ * @group Http
  */
 class HttpTest extends MediaWikiTestCase {
        /**
@@ -92,8 +93,10 @@ class HttpTest extends MediaWikiTestCase {
                        array( true, 'http://user:pass@host', 'Username and password provided' ),
 
                        # (\S+) - host part is made of anything not whitespaces
-                       array( false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ),
-                       array( false, 'http://exam:ple.org/', 'hostname can not use colons!' ),
+                       // commented these out in order to remove @group Broken
+                       // @todo are these valid tests? if so, fix Http::isValidURI so it can handle them
+                       //array( false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ),
+                       //array( false, 'http://exam:ple.org/', 'hostname can not use colons!' ),
 
                        # (:[0-9]+)? - port number
                        array( true, 'http://example.org:80/' ),
@@ -171,6 +174,298 @@ class HttpTest extends MediaWikiTestCase {
                        $h->getFinalUrl( "Relative file path Location: should keep the latest host and scheme!" )
                );
        }
+
+       /**
+        * Constant values are from PHP 5.3.28 using cURL 7.24.0
+        * @see http://php.net/manual/en/curl.constants.php
+        *
+        * @covers CurlHttpRequest::execute
+        */
+       public function provideCurlConstants() {
+               return array(
+                       array( 'CURLAUTH_ANY' ),
+                       array( 'CURLAUTH_ANYSAFE' ),
+                       array( 'CURLAUTH_BASIC' ),
+                       array( 'CURLAUTH_DIGEST' ),
+                       array( 'CURLAUTH_GSSNEGOTIATE' ),
+                       array( 'CURLAUTH_NTLM' ),
+                       array( 'CURLCLOSEPOLICY_CALLBACK' ),
+                       array( 'CURLCLOSEPOLICY_LEAST_RECENTLY_USED' ),
+                       array( 'CURLCLOSEPOLICY_LEAST_TRAFFIC' ),
+                       array( 'CURLCLOSEPOLICY_OLDEST' ),
+                       array( 'CURLCLOSEPOLICY_SLOWEST' ),
+                       array( 'CURLE_ABORTED_BY_CALLBACK' ),
+                       array( 'CURLE_BAD_CALLING_ORDER' ),
+                       array( 'CURLE_BAD_CONTENT_ENCODING' ),
+                       array( 'CURLE_BAD_FUNCTION_ARGUMENT' ),
+                       array( 'CURLE_BAD_PASSWORD_ENTERED' ),
+                       array( 'CURLE_COULDNT_CONNECT' ),
+                       array( 'CURLE_COULDNT_RESOLVE_HOST' ),
+                       array( 'CURLE_COULDNT_RESOLVE_PROXY' ),
+                       array( 'CURLE_FAILED_INIT' ),
+                       array( 'CURLE_FILESIZE_EXCEEDED' ),
+                       array( 'CURLE_FILE_COULDNT_READ_FILE' ),
+                       array( 'CURLE_FTP_ACCESS_DENIED' ),
+                       array( 'CURLE_FTP_BAD_DOWNLOAD_RESUME' ),
+                       array( 'CURLE_FTP_CANT_GET_HOST' ),
+                       array( 'CURLE_FTP_CANT_RECONNECT' ),
+                       array( 'CURLE_FTP_COULDNT_GET_SIZE' ),
+                       array( 'CURLE_FTP_COULDNT_RETR_FILE' ),
+                       array( 'CURLE_FTP_COULDNT_SET_ASCII' ),
+                       array( 'CURLE_FTP_COULDNT_SET_BINARY' ),
+                       array( 'CURLE_FTP_COULDNT_STOR_FILE' ),
+                       array( 'CURLE_FTP_COULDNT_USE_REST' ),
+                       array( 'CURLE_FTP_PORT_FAILED' ),
+                       array( 'CURLE_FTP_QUOTE_ERROR' ),
+                       array( 'CURLE_FTP_SSL_FAILED' ),
+                       array( 'CURLE_FTP_USER_PASSWORD_INCORRECT' ),
+                       array( 'CURLE_FTP_WEIRD_227_FORMAT' ),
+                       array( 'CURLE_FTP_WEIRD_PASS_REPLY' ),
+                       array( 'CURLE_FTP_WEIRD_PASV_REPLY' ),
+                       array( 'CURLE_FTP_WEIRD_SERVER_REPLY' ),
+                       array( 'CURLE_FTP_WEIRD_USER_REPLY' ),
+                       array( 'CURLE_FTP_WRITE_ERROR' ),
+                       array( 'CURLE_FUNCTION_NOT_FOUND' ),
+                       array( 'CURLE_GOT_NOTHING' ),
+                       array( 'CURLE_HTTP_NOT_FOUND' ),
+                       array( 'CURLE_HTTP_PORT_FAILED' ),
+                       array( 'CURLE_HTTP_POST_ERROR' ),
+                       array( 'CURLE_HTTP_RANGE_ERROR' ),
+                       array( 'CURLE_LDAP_CANNOT_BIND' ),
+                       array( 'CURLE_LDAP_INVALID_URL' ),
+                       array( 'CURLE_LDAP_SEARCH_FAILED' ),
+                       array( 'CURLE_LIBRARY_NOT_FOUND' ),
+                       array( 'CURLE_MALFORMAT_USER' ),
+                       array( 'CURLE_OBSOLETE' ),
+                       array( 'CURLE_OK' ),
+                       array( 'CURLE_OPERATION_TIMEOUTED' ),
+                       array( 'CURLE_OUT_OF_MEMORY' ),
+                       array( 'CURLE_PARTIAL_FILE' ),
+                       array( 'CURLE_READ_ERROR' ),
+                       array( 'CURLE_RECV_ERROR' ),
+                       array( 'CURLE_SEND_ERROR' ),
+                       array( 'CURLE_SHARE_IN_USE' ),
+                       array( 'CURLE_SSH' ),
+                       array( 'CURLE_SSL_CACERT' ),
+                       array( 'CURLE_SSL_CERTPROBLEM' ),
+                       array( 'CURLE_SSL_CIPHER' ),
+                       array( 'CURLE_SSL_CONNECT_ERROR' ),
+                       array( 'CURLE_SSL_ENGINE_NOTFOUND' ),
+                       array( 'CURLE_SSL_ENGINE_SETFAILED' ),
+                       array( 'CURLE_SSL_PEER_CERTIFICATE' ),
+                       array( 'CURLE_TELNET_OPTION_SYNTAX' ),
+                       array( 'CURLE_TOO_MANY_REDIRECTS' ),
+                       array( 'CURLE_UNKNOWN_TELNET_OPTION' ),
+                       array( 'CURLE_UNSUPPORTED_PROTOCOL' ),
+                       array( 'CURLE_URL_MALFORMAT' ),
+                       array( 'CURLE_URL_MALFORMAT_USER' ),
+                       array( 'CURLE_WRITE_ERROR' ),
+                       array( 'CURLFTPAUTH_DEFAULT' ),
+                       array( 'CURLFTPAUTH_SSL' ),
+                       array( 'CURLFTPAUTH_TLS' ),
+                       array( 'CURLFTPMETHOD_MULTICWD' ),
+                       array( 'CURLFTPMETHOD_NOCWD' ),
+                       array( 'CURLFTPMETHOD_SINGLECWD' ),
+                       array( 'CURLFTPSSL_ALL' ),
+                       array( 'CURLFTPSSL_CONTROL' ),
+                       array( 'CURLFTPSSL_NONE' ),
+                       array( 'CURLFTPSSL_TRY' ),
+                       array( 'CURLINFO_CERTINFO' ),
+                       array( 'CURLINFO_CONNECT_TIME' ),
+                       array( 'CURLINFO_CONTENT_LENGTH_DOWNLOAD' ),
+                       array( 'CURLINFO_CONTENT_LENGTH_UPLOAD' ),
+                       array( 'CURLINFO_CONTENT_TYPE' ),
+                       array( 'CURLINFO_EFFECTIVE_URL' ),
+                       array( 'CURLINFO_FILETIME' ),
+                       array( 'CURLINFO_HEADER_OUT' ),
+                       array( 'CURLINFO_HEADER_SIZE' ),
+                       array( 'CURLINFO_HTTP_CODE' ),
+                       array( 'CURLINFO_NAMELOOKUP_TIME' ),
+                       array( 'CURLINFO_PRETRANSFER_TIME' ),
+                       array( 'CURLINFO_PRIVATE' ),
+                       array( 'CURLINFO_REDIRECT_COUNT' ),
+                       array( 'CURLINFO_REDIRECT_TIME' ),
+                       array( 'CURLINFO_REDIRECT_URL' ),
+                       array( 'CURLINFO_REQUEST_SIZE' ),
+                       array( 'CURLINFO_SIZE_DOWNLOAD' ),
+                       array( 'CURLINFO_SIZE_UPLOAD' ),
+                       array( 'CURLINFO_SPEED_DOWNLOAD' ),
+                       array( 'CURLINFO_SPEED_UPLOAD' ),
+                       array( 'CURLINFO_SSL_VERIFYRESULT' ),
+                       array( 'CURLINFO_STARTTRANSFER_TIME' ),
+                       array( 'CURLINFO_TOTAL_TIME' ),
+                       array( 'CURLMSG_DONE' ),
+                       array( 'CURLM_BAD_EASY_HANDLE' ),
+                       array( 'CURLM_BAD_HANDLE' ),
+                       array( 'CURLM_CALL_MULTI_PERFORM' ),
+                       array( 'CURLM_INTERNAL_ERROR' ),
+                       array( 'CURLM_OK' ),
+                       array( 'CURLM_OUT_OF_MEMORY' ),
+                       array( 'CURLOPT_AUTOREFERER' ),
+                       array( 'CURLOPT_BINARYTRANSFER' ),
+                       array( 'CURLOPT_BUFFERSIZE' ),
+                       array( 'CURLOPT_CAINFO' ),
+                       array( 'CURLOPT_CAPATH' ),
+                       array( 'CURLOPT_CERTINFO' ),
+                       array( 'CURLOPT_CLOSEPOLICY' ),
+                       array( 'CURLOPT_CONNECTTIMEOUT' ),
+                       array( 'CURLOPT_CONNECTTIMEOUT_MS' ),
+                       array( 'CURLOPT_COOKIE' ),
+                       array( 'CURLOPT_COOKIEFILE' ),
+                       array( 'CURLOPT_COOKIEJAR' ),
+                       array( 'CURLOPT_COOKIESESSION' ),
+                       array( 'CURLOPT_CRLF' ),
+                       array( 'CURLOPT_CUSTOMREQUEST' ),
+                       array( 'CURLOPT_DNS_CACHE_TIMEOUT' ),
+                       array( 'CURLOPT_DNS_USE_GLOBAL_CACHE' ),
+                       array( 'CURLOPT_EGDSOCKET' ),
+                       array( 'CURLOPT_ENCODING' ),
+                       array( 'CURLOPT_FAILONERROR' ),
+                       array( 'CURLOPT_FILE' ),
+                       array( 'CURLOPT_FILETIME' ),
+                       array( 'CURLOPT_FOLLOWLOCATION' ),
+                       array( 'CURLOPT_FORBID_REUSE' ),
+                       array( 'CURLOPT_FRESH_CONNECT' ),
+                       array( 'CURLOPT_FTPAPPEND' ),
+                       array( 'CURLOPT_FTPLISTONLY' ),
+                       array( 'CURLOPT_FTPPORT' ),
+                       array( 'CURLOPT_FTPSSLAUTH' ),
+                       array( 'CURLOPT_FTP_CREATE_MISSING_DIRS' ),
+                       array( 'CURLOPT_FTP_FILEMETHOD' ),
+                       array( 'CURLOPT_FTP_SKIP_PASV_IP' ),
+                       array( 'CURLOPT_FTP_SSL' ),
+                       array( 'CURLOPT_FTP_USE_EPRT' ),
+                       array( 'CURLOPT_FTP_USE_EPSV' ),
+                       array( 'CURLOPT_HEADER' ),
+                       array( 'CURLOPT_HEADERFUNCTION' ),
+                       array( 'CURLOPT_HTTP200ALIASES' ),
+                       array( 'CURLOPT_HTTPAUTH' ),
+                       array( 'CURLOPT_HTTPGET' ),
+                       array( 'CURLOPT_HTTPHEADER' ),
+                       array( 'CURLOPT_HTTPPROXYTUNNEL' ),
+                       array( 'CURLOPT_HTTP_VERSION' ),
+                       array( 'CURLOPT_INFILE' ),
+                       array( 'CURLOPT_INFILESIZE' ),
+                       array( 'CURLOPT_INTERFACE' ),
+                       array( 'CURLOPT_IPRESOLVE' ),
+                       array( 'CURLOPT_KEYPASSWD' ),
+                       array( 'CURLOPT_KRB4LEVEL' ),
+                       array( 'CURLOPT_LOW_SPEED_LIMIT' ),
+                       array( 'CURLOPT_LOW_SPEED_TIME' ),
+                       array( 'CURLOPT_MAXCONNECTS' ),
+                       array( 'CURLOPT_MAXREDIRS' ),
+                       array( 'CURLOPT_MAX_RECV_SPEED_LARGE' ),
+                       array( 'CURLOPT_MAX_SEND_SPEED_LARGE' ),
+                       array( 'CURLOPT_NETRC' ),
+                       array( 'CURLOPT_NOBODY' ),
+                       array( 'CURLOPT_NOPROGRESS' ),
+                       array( 'CURLOPT_NOSIGNAL' ),
+                       array( 'CURLOPT_PORT' ),
+                       array( 'CURLOPT_POST' ),
+                       array( 'CURLOPT_POSTFIELDS' ),
+                       array( 'CURLOPT_POSTQUOTE' ),
+                       array( 'CURLOPT_POSTREDIR' ),
+                       array( 'CURLOPT_PRIVATE' ),
+                       array( 'CURLOPT_PROGRESSFUNCTION' ),
+                       array( 'CURLOPT_PROTOCOLS' ),
+                       array( 'CURLOPT_PROXY' ),
+                       array( 'CURLOPT_PROXYAUTH' ),
+                       array( 'CURLOPT_PROXYPORT' ),
+                       array( 'CURLOPT_PROXYTYPE' ),
+                       array( 'CURLOPT_PROXYUSERPWD' ),
+                       array( 'CURLOPT_PUT' ),
+                       array( 'CURLOPT_QUOTE' ),
+                       array( 'CURLOPT_RANDOM_FILE' ),
+                       array( 'CURLOPT_RANGE' ),
+                       array( 'CURLOPT_READDATA' ),
+                       array( 'CURLOPT_READFUNCTION' ),
+                       array( 'CURLOPT_REDIR_PROTOCOLS' ),
+                       array( 'CURLOPT_REFERER' ),
+                       array( 'CURLOPT_RESUME_FROM' ),
+                       array( 'CURLOPT_RETURNTRANSFER' ),
+                       array( 'CURLOPT_SSH_AUTH_TYPES' ),
+                       array( 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' ),
+                       array( 'CURLOPT_SSH_PRIVATE_KEYFILE' ),
+                       array( 'CURLOPT_SSH_PUBLIC_KEYFILE' ),
+                       array( 'CURLOPT_SSLCERT' ),
+                       array( 'CURLOPT_SSLCERTPASSWD' ),
+                       array( 'CURLOPT_SSLCERTTYPE' ),
+                       array( 'CURLOPT_SSLENGINE' ),
+                       array( 'CURLOPT_SSLENGINE_DEFAULT' ),
+                       array( 'CURLOPT_SSLKEY' ),
+                       array( 'CURLOPT_SSLKEYPASSWD' ),
+                       array( 'CURLOPT_SSLKEYTYPE' ),
+                       array( 'CURLOPT_SSLVERSION' ),
+                       array( 'CURLOPT_SSL_CIPHER_LIST' ),
+                       array( 'CURLOPT_SSL_VERIFYHOST' ),
+                       array( 'CURLOPT_SSL_VERIFYPEER' ),
+                       array( 'CURLOPT_STDERR' ),
+                       array( 'CURLOPT_TCP_NODELAY' ),
+                       array( 'CURLOPT_TIMECONDITION' ),
+                       array( 'CURLOPT_TIMEOUT' ),
+                       array( 'CURLOPT_TIMEOUT_MS' ),
+                       array( 'CURLOPT_TIMEVALUE' ),
+                       array( 'CURLOPT_TRANSFERTEXT' ),
+                       array( 'CURLOPT_UNRESTRICTED_AUTH' ),
+                       array( 'CURLOPT_UPLOAD' ),
+                       array( 'CURLOPT_URL' ),
+                       array( 'CURLOPT_USERAGENT' ),
+                       array( 'CURLOPT_USERPWD' ),
+                       array( 'CURLOPT_VERBOSE' ),
+                       array( 'CURLOPT_WRITEFUNCTION' ),
+                       array( 'CURLOPT_WRITEHEADER' ),
+                       array( 'CURLPROTO_ALL' ),
+                       array( 'CURLPROTO_DICT' ),
+                       array( 'CURLPROTO_FILE' ),
+                       array( 'CURLPROTO_FTP' ),
+                       array( 'CURLPROTO_FTPS' ),
+                       array( 'CURLPROTO_HTTP' ),
+                       array( 'CURLPROTO_HTTPS' ),
+                       array( 'CURLPROTO_LDAP' ),
+                       array( 'CURLPROTO_LDAPS' ),
+                       array( 'CURLPROTO_SCP' ),
+                       array( 'CURLPROTO_SFTP' ),
+                       array( 'CURLPROTO_TELNET' ),
+                       array( 'CURLPROTO_TFTP' ),
+                       array( 'CURLPROXY_HTTP' ),
+                       array( 'CURLPROXY_SOCKS4' ),
+                       array( 'CURLPROXY_SOCKS5' ),
+                       array( 'CURLSSH_AUTH_DEFAULT' ),
+                       array( 'CURLSSH_AUTH_HOST' ),
+                       array( 'CURLSSH_AUTH_KEYBOARD' ),
+                       array( 'CURLSSH_AUTH_NONE' ),
+                       array( 'CURLSSH_AUTH_PASSWORD' ),
+                       array( 'CURLSSH_AUTH_PUBLICKEY' ),
+                       array( 'CURLVERSION_NOW' ),
+                       array( 'CURL_HTTP_VERSION_1_0' ),
+                       array( 'CURL_HTTP_VERSION_1_1' ),
+                       array( 'CURL_HTTP_VERSION_NONE' ),
+                       array( 'CURL_IPRESOLVE_V4' ),
+                       array( 'CURL_IPRESOLVE_V6' ),
+                       array( 'CURL_IPRESOLVE_WHATEVER' ),
+                       array( 'CURL_NETRC_IGNORED' ),
+                       array( 'CURL_NETRC_OPTIONAL' ),
+                       array( 'CURL_NETRC_REQUIRED' ),
+                       array( 'CURL_TIMECOND_IFMODSINCE' ),
+                       array( 'CURL_TIMECOND_IFUNMODSINCE' ),
+                       array( 'CURL_TIMECOND_LASTMOD' ),
+                       array( 'CURL_VERSION_IPV6' ),
+                       array( 'CURL_VERSION_KERBEROS4' ),
+                       array( 'CURL_VERSION_LIBZ' ),
+                       array( 'CURL_VERSION_SSL' ),
+               );
+       }
+
+       /**
+        * Added this test based on an issue experienced with hhvm where it did
+        * not define a cURL constant.
+        *
+        * @bug 70570
+        * @dataProvider provideCurlConstants
+        */
+       public function testCurlConstants( $value ) {
+               $this->assertTrue( defined( $value ), $value . ' not defined' );
+       }
 }
 
 /**
index f3d2a84..47560e6 100644 (file)
@@ -109,9 +109,15 @@ class MessageTest extends MediaWikiLangTestCase {
                $this->assertInstanceOf( 'Message', wfMessage( 'mainpage' ) );
                $this->assertInstanceOf( 'Message', wfMessage( 'i-dont-exist-evar' ) );
                $this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->text() );
-               $this->assertEquals( '&lt;i-dont-exist-evar&gt;', wfMessage( 'i-dont-exist-evar' )->text() );
+               $this->assertEquals( '<i-dont-exist-evar>', wfMessage( 'i-dont-exist-evar' )->text() );
+               $this->assertEquals( '<i<dont>exist-evar>', wfMessage( 'i<dont>exist-evar' )->text() );
                $this->assertEquals( '<i-dont-exist-evar>', wfMessage( 'i-dont-exist-evar' )->plain() );
+               $this->assertEquals( '<i<dont>exist-evar>', wfMessage( 'i<dont>exist-evar' )->plain() );
                $this->assertEquals( '&lt;i-dont-exist-evar&gt;', wfMessage( 'i-dont-exist-evar' )->escaped() );
+               $this->assertEquals(
+                       '&lt;i&lt;dont&gt;exist-evar&gt;',
+                       wfMessage( 'i<dont>exist-evar' )->escaped()
+               );
        }
 
        /**
diff --git a/tests/phpunit/includes/MovePageTest.php b/tests/phpunit/includes/MovePageTest.php
new file mode 100644 (file)
index 0000000..027b877
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+class MovePageTest extends MediaWikiTestCase {
+
+       /**
+        * @dataProvider provideIsValidMove
+        * @covers MovePage::isValidMove
+        * @covers MovePage::isValidFileMove
+        */
+       public function testIsValidMove( $old, $new, $error ) {
+               $this->setMwGlobals( 'wgContentHandlerUseDB', false );
+               $mp = new MovePage(
+                       Title::newFromText( $old ),
+                       Title::newFromText( $new )
+               );
+               $status = $mp->isValidMove();
+               if ( $error === true ) {
+                       $this->assertTrue( $status->isGood() );
+               } else {
+                       $this->assertTrue( $status->hasMessage( $error ) );
+               }
+       }
+
+       /**
+        * This should be kept in sync with TitleTest::provideTestIsValidMoveOperation
+        */
+       public static function provideIsValidMove() {
+               return array(
+                       // for MovePage::isValidMove
+                       array( 'Test', 'Test', 'selfmove' ),
+                       array( 'Special:FooBar', 'Test', 'immobile-source-namespace' ),
+                       array( 'Test', 'Special:FooBar', 'immobile-target-namespace' ),
+                       array( 'MediaWiki:Common.js', 'Help:Some wikitext page', 'bad-target-model' ),
+                       array( 'Page', 'File:Test.jpg', 'nonfile-cannot-move-to-file' ),
+                       // for MovePage::isValidFileMove
+                       array( 'File:Test.jpg', 'Page', 'imagenocrossnamespace' ),
+               );
+       }
+}
diff --git a/tests/phpunit/includes/jobqueue/JobTest.php b/tests/phpunit/includes/jobqueue/JobTest.php
new file mode 100644 (file)
index 0000000..93069d2
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+
+/**
+ * @author Adam Shorland
+ */
+class JobTest extends MediaWikiTestCase {
+
+       /**
+        * @dataProvider provideTestToString
+        *
+        * @param Job $job
+        * @param string $expected
+        *
+        * @covers Job::toString
+        */
+       public function testToString( $job, $expected ) {
+               $this->assertEquals( $expected, $job->toString() );
+       }
+
+       public function provideTestToString() {
+               $mockToStringObj = $this->getMock( 'stdClass', array( '__toString' ) );
+               $mockToStringObj->expects( $this->any() )
+                       ->method( '__toString' )
+                       ->will( $this->returnValue( '{STRING_OBJ_VAL}' ) );
+
+               return array(
+                       array(
+                               $this->getMockJob( false ),
+                               'someCommand '
+                       ),
+                       array(
+                               $this->getMockJob( array( 'key' => 'val' ) ),
+                               'someCommand  key=val'
+                       ),
+                       array(
+                               $this->getMockJob( array( 'key' => array( 'inkey' => 'inval' ) ) ),
+                               'someCommand  key={"inkey":"inval"}'
+                       ),
+                       array(
+                               $this->getMockJob( array( 'val1' ) ),
+                               'someCommand  0=val1'
+                       ),
+                       array(
+                               $this->getMockJob( array( 'val1', 'val2' ) ),
+                               'someCommand  0=val1 1=val2'
+                       ),
+                       array(
+                               $this->getMockJob( array( new stdClass() ) ),
+                               'someCommand  0=object(stdClass)'
+                       ),
+                       array(
+                               $this->getMockJob( array( $mockToStringObj ) ),
+                               'someCommand  0={STRING_OBJ_VAL}'
+                       ),
+               );
+       }
+
+       public function getMockJob( $params ) {
+               $mock = $this->getMockForAbstractClass(
+                       'Job',
+                       array( 'someCommand', new Title(), $params ),
+                       'SomeJob'
+               );
+               return $mock;
+       }
+
+}
index e4283b0..8d0224c 100644 (file)
@@ -15,27 +15,15 @@ class CSSJanusTest extends MediaWikiTestCase {
 
                if ( $cssB ) {
                        $transformedA = CSSJanus::transform( $cssA );
-                       $this->assertEquals(
-                               $transformedA,
-                               str_replace( '/* @noflip */ ', '', $cssB ),
-                               'Test A-B transformation'
-                       );
+                       $this->assertEquals( $transformedA, $cssB, 'Test A-B transformation' );
 
                        $transformedB = CSSJanus::transform( $cssB );
-                       $this->assertEquals(
-                               $transformedB,
-                               str_replace( '/* @noflip */ ', '', $cssA ),
-                               'Test B-A transformation'
-                       );
+                       $this->assertEquals( $transformedB, $cssA, 'Test B-A transformation' );
                } else {
                        // If no B version is provided, it means
                        // the output should equal the input (modulo @noflip annotations).
                        $transformedA = CSSJanus::transform( $cssA );
-                       $this->assertEquals(
-                               $transformedA,
-                               str_replace( '/* @noflip */ ', '', $cssA ),
-                               'Nothing was flipped'
-                       );
+                       $this->assertEquals( $transformedA, $cssA, 'Nothing was flipped' );
                }
        }
 
index 2b4d60d..43c5086 100644 (file)
@@ -202,6 +202,11 @@ class CSSMinTest extends MediaWikiTestCase {
                                'foo { /* @embed */ background: url(red.gif); }',
                                "foo { background: url($red); background: url(http://localhost/w/red.gif?timestamp)!ie; }",
                        ),
+                       array(
+                               'Embedded file, other comments before the rule',
+                               "foo { /* Bar. */ /* @embed */ background: url(red.gif); }",
+                               "foo { /* Bar. */ background: url($red); /* Bar. */ background: url(http://localhost/w/red.gif?timestamp)!ie; }",
+                       ),
                        array(
                                'Can not re-embed data: URIs',
                                "foo { /* @embed */ background: url($red); }",
index d2e118c..7664d5b 100644 (file)
@@ -90,6 +90,15 @@ class ResourceLoaderTest extends ResourceLoaderTestCase {
                $this->assertStringEqualsFile( $basePath . '/styles.css', $styles['all'] );
        }
 
+       /**
+        * Strip @noflip annotations from CSS code.
+        * @param string $css
+        * @return string
+        */
+       private function stripNoflip( $css ) {
+               return str_replace( '/*@noflip*/ ', '', $css );
+       }
+
        /**
         * What happens when you mix @embed and @noflip?
         * This really is an integration test, but oh well.
@@ -108,14 +117,16 @@ class ResourceLoaderTest extends ResourceLoaderTestCase {
                $contextLtr = self::getResourceLoaderContext( 'en' );
                $contextRtl = self::getResourceLoaderContext( 'he' );
 
+               // Since we want to compare the effect of @noflip+@embed against the effect of just @embed, and
+               // the @noflip annotations are always preserved, we need to strip them first.
                $this->assertEquals(
                        $expectedModule->getStyles( $contextLtr ),
-                       $testModule->getStyles( $contextLtr ),
+                       $this->stripNoflip( $testModule->getStyles( $contextLtr ) ),
                        "/*@noflip*/ with /*@embed*/ gives correct results in LTR mode"
                );
                $this->assertEquals(
                        $expectedModule->getStyles( $contextLtr ),
-                       $testModule->getStyles( $contextRtl ),
+                       $this->stripNoflip( $testModule->getStyles( $contextRtl ) ),
                        "/*@noflip*/ with /*@embed*/ gives correct results in RTL mode"
                );
        }
index 3da1361..d0cbfa0 100644 (file)
@@ -14,8 +14,6 @@ class SearchEngineTest extends MediaWikiLangTestCase {
         */
        protected $search;
 
-       protected $pageList;
-
        /**
         * Checks for database type & version.
         * Will skip current test if DB does not support search.
@@ -37,10 +35,6 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        'wgSearchType' => $searchType
                ) );
 
-               if ( !isset( self::$pageList ) ) {
-                       $this->addPages();
-               }
-
                $this->search = new $searchType( $this->db );
        }
 
@@ -50,33 +44,32 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                parent::tearDown();
        }
 
-       protected function addPages() {
+       public function addDBData() {
                if ( !$this->isWikitextNS( NS_MAIN ) ) {
                        // @todo cover the case of non-wikitext content in the main namespace
                        return;
                }
 
-               $this->insertPage( "Not_Main_Page", "This is not a main page", 0 );
+               $this->insertPage( 'Not_Main_Page', 'This is not a main page' );
                $this->insertPage(
                        'Talk:Not_Main_Page',
-                       'This is not a talk page to the main page, see [[smithee]]',
-                       1
+                       'This is not a talk page to the main page, see [[smithee]]'
                );
-               $this->insertPage( 'Smithee', 'A smithee is one who smiths. See also [[Alan Smithee]]', 0 );
-               $this->insertPage( 'Talk:Smithee', 'This article sucks.', 1 );
-               $this->insertPage( 'Unrelated_page', 'Nothing in this page is about the S word.', 0 );
-               $this->insertPage( 'Another_page', 'This page also is unrelated.', 0 );
-               $this->insertPage( 'Help:Help', 'Help me!', 4 );
-               $this->insertPage( 'Thppt', 'Blah blah', 0 );
-               $this->insertPage( 'Alan_Smithee', 'yum', 0 );
-               $this->insertPage( 'Pages', 'are\'food', 0 );
-               $this->insertPage( 'HalfOneUp', 'AZ', 0 );
-               $this->insertPage( 'FullOneUp', 'AZ', 0 );
-               $this->insertPage( 'HalfTwoLow', 'az', 0 );
-               $this->insertPage( 'FullTwoLow', 'az', 0 );
-               $this->insertPage( 'HalfNumbers', '1234567890', 0 );
-               $this->insertPage( 'FullNumbers', '1234567890', 0 );
-               $this->insertPage( 'DomainName', 'example.com', 0 );
+               $this->insertPage( 'Smithee', 'A smithee is one who smiths. See also [[Alan Smithee]]' );
+               $this->insertPage( 'Talk:Smithee', 'This article sucks.' );
+               $this->insertPage( 'Unrelated_page', 'Nothing in this page is about the S word.' );
+               $this->insertPage( 'Another_page', 'This page also is unrelated.' );
+               $this->insertPage( 'Help:Help', 'Help me!' );
+               $this->insertPage( 'Thppt', 'Blah blah' );
+               $this->insertPage( 'Alan_Smithee', 'yum' );
+               $this->insertPage( 'Pages', 'are\'food' );
+               $this->insertPage( 'HalfOneUp', 'AZ' );
+               $this->insertPage( 'FullOneUp', 'AZ' );
+               $this->insertPage( 'HalfTwoLow', 'az' );
+               $this->insertPage( 'FullTwoLow', 'az' );
+               $this->insertPage( 'HalfNumbers', '1234567890' );
+               $this->insertPage( 'FullNumbers', '1234567890' );
+               $this->insertPage( 'DomainName', 'example.com' );
        }
 
        protected function fetchIds( $results ) {
@@ -101,30 +94,6 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                return $matches;
        }
 
-       /**
-        * Insert a new page
-        *
-        * @param string $pageName Page name
-        * @param string $text Page's content
-        * @param int $ns Unused
-        */
-       protected function insertPage( $pageName, $text, $ns ) {
-               $title = Title::newFromText( $pageName, $ns );
-
-               $user = User::newFromName( 'WikiSysop' );
-               $comment = 'Search Test';
-
-               // avoid memory leak...?
-               LinkCache::singleton()->clear();
-
-               $page = WikiPage::factory( $title );
-               $page->doEditContent( ContentHandler::makeContent( $text, $title ), $comment, 0, false, $user );
-
-               $this->pageList[] = array( $title, $page->getId() );
-
-               return true;
-       }
-
        public function testFullWidth() {
                $this->assertEquals(
                        array( 'FullOneUp', 'FullTwoLow', 'HalfOneUp', 'HalfTwoLow' ),
index f156c72..76fa6be 100644 (file)
                );
        } );
 
+       QUnit.test( 'postWithToken( tokenType, params with assert )', function ( assert ) {
+               QUnit.expect( 2 );
+
+               var api = new mw.Api( { ajax: { url: '/postWithToken/api.php' } } );
+
+               api.postWithToken( 'testasserttoken', { action: 'example', key: 'foo', assert: 'user' } )
+                       .fail( function ( errorCode ) {
+                               assert.equal( errorCode, 'assertuserfailed', 'getToken fails assert' );
+                       } );
+
+               assert.equal( this.server.requests.length, 1, 'Request for token made' );
+               this.server.respondWith( /assert=user/, function ( request ) {
+                       request.respond(
+                               200,
+                               { 'Content-Type': 'application/json' },
+                               '{ "error": { "code": "assertuserfailed", "info": "Assertion failed" } }'
+                       );
+               } );
+
+               this.server.respond();
+       } );
+
        QUnit.test( 'postWithToken( tokenType, params, ajaxOptions )', function ( assert ) {
                QUnit.expect( 3 );