Merge "Allow for dynamic TTLs in getWithSetCallback()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 14 May 2015 03:23:36 +0000 (03:23 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 14 May 2015 03:23:36 +0000 (03:23 +0000)
127 files changed:
.gitignore
RELEASE-NOTES-1.25
RELEASE-NOTES-1.26
autoload.php
composer.json
docs/hooks.txt
docs/kss/styleguide-template/index.html
docs/kss/styleguide-template/public/kss.less
includes/DefaultSettings.php
includes/GlobalFunctions.php
includes/Setup.php
includes/User.php
includes/api/ApiQuerySiteinfo.php
includes/api/i18n/en.json
includes/api/i18n/es.json
includes/api/i18n/gl.json
includes/api/i18n/ksh.json
includes/api/i18n/zh-hans.json
includes/changetags/ChangeTags.php
includes/config/ConfigFactory.php
includes/filebackend/SwiftFileBackend.php
includes/filerepo/LocalRepo.php
includes/filerepo/file/LocalFile.php
includes/installer/i18n/es.json
includes/jobqueue/JobQueue.php
includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueFederated.php
includes/jobqueue/JobQueueGroup.php
includes/jobqueue/JobQueueRedis.php
includes/jobqueue/JobRunner.php
includes/jobqueue/jobs/RefreshLinksJob.php
includes/libs/MapCacheLRU.php
includes/libs/ProcessCacheLRU.php
includes/libs/objectcache/WANObjectCache.php
includes/media/DjVu.php
includes/page/WikiPage.php
includes/parser/Parser.php
includes/parser/StripState.php
includes/profiler/TransactionProfiler.php
includes/registration/ExtensionProcessor.php
includes/resourceloader/ResourceLoader.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
includes/title/TitleValue.php
includes/utils/UIDGenerator.php
languages/i18n/an.json
languages/i18n/be-tarask.json
languages/i18n/ce.json
languages/i18n/de.json
languages/i18n/es.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/hu.json
languages/i18n/ko.json
languages/i18n/krc.json
languages/i18n/ku-latn.json
languages/i18n/la.json
languages/i18n/lrc.json
languages/i18n/nn.json
languages/i18n/pl.json
languages/i18n/pt-br.json
languages/i18n/pt.json
languages/i18n/qqq.json
languages/i18n/ru.json
languages/messages/MessagesIt.php
languages/messages/MessagesSq.php
maintenance/update.php
resources/lib/oojs-ui/i18n/ku-latn.json [new file with mode: 0644]
resources/lib/oojs-ui/oojs-ui-mediawiki-noimages.css
resources/lib/oojs-ui/oojs-ui-mediawiki.js
resources/lib/oojs-ui/oojs-ui.js
resources/lib/oojs-ui/themes/mediawiki/icons.json
resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-ltr-invert.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-ltr-invert.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-ltr.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-ltr.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-rtl-invert.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-rtl-invert.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-rtl.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-rtl.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/link-ltr-invert.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/link-ltr-invert.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/link-ltr.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/link-ltr.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/menu-invert.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/menu-invert.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/menu.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/menu.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/quotes-ltr.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/quotes-ltr.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/quotes-rtl.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/quotes-rtl.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-constructive.png [new file with mode: 0644]
resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-constructive.svg [new file with mode: 0644]
resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.png [new file with mode: 0644]
resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.svg [new file with mode: 0644]
resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-progressive.png [new file with mode: 0644]
resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-progressive.svg [new file with mode: 0644]
resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-warning.png [new file with mode: 0644]
resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-warning.svg [new file with mode: 0644]
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-down-invert.png
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-down-invert.svg
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-down.png
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-down.svg
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-ltr-invert.png
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-ltr-invert.svg
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-ltr.png
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-ltr.svg
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-rtl-invert.png
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-rtl-invert.svg
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-rtl.png
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-rtl.svg
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-up-invert.png
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-up-invert.svg
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-up.png
resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-up.svg
resources/src/mediawiki.action/mediawiki.action.edit.editWarning.js
resources/src/mediawiki.less/mediawiki.ui/variables.less
resources/src/mediawiki.special/mediawiki.special.preferences.js
resources/src/mediawiki.special/mediawiki.special.upload.js
resources/src/mediawiki.ui/components/icons.less
resources/src/mediawiki/mediawiki.confirmCloseWindow.js
tests/phpunit/includes/libs/ArrayUtilsTest.php
tests/phpunit/includes/libs/ProcessCacheLRUTest.php
tests/phpunit/includes/registration/ExtensionProcessorTest.php
tests/phpunit/includes/site/CachingSiteStoreTest.php
tests/phpunit/includes/site/SiteImporterTest.php

index b1649df..01a11bf 100644 (file)
@@ -26,6 +26,7 @@ sftp-config.json
 /docs/js
 /images/[0-9a-f]
 /images/archive
+/images/cache
 /images/deleted
 /images/lockdir
 /images/temp
index e91a02e..3303f30 100644 (file)
@@ -489,10 +489,11 @@ changes to languages because of Bugzilla reports.
 * $wgResourceModuleSkinStyles no longer supports per-module local or remote paths. They
   can only be set for the entire skin.
 * Removed global function swap(). (deprecated since 1.24)
-* Deprecated the ".php5" file extension entry points. Refer to the ".php" files
-  instead. If you want ".php5" URLs to continue to work, set up redirects. In
-  Apache, this can be done by enabling mod_rewrite and adding the following
-  rules to your configuration:
+* Deprecated the ".php5" file extension entry points and the $wgScriptExtension
+  configuration variable. Refer to the ".php" files instead. If you want
+  ".php5" URLs to continue to work, set up redirects. In Apache, this can be
+  done by enabling mod_rewrite and adding the following rules to your
+  configuration:
 
     RewriteEngine On
     RewriteBase /
index 8a08f02..3d6651f 100644 (file)
@@ -13,6 +13,8 @@ production.
 === New features in 1.26 ===
 * Change tags can now be hidden in the interface by disabling the associated
   "tag-<id>" interface message.
+* ':' (colon) is now invalid in usernames for new accounts. Existing accounts
+  are not affected.
 
 ==== External libraries ====
 
@@ -50,6 +52,9 @@ by default for the ContentHandler base class and true for TextContentHandler
 and it's derivative classes (everything in core). For Content types that
 do not support direct editing, an alternative mechanism should be provided
 for editing, such as action overrides or specific api modules.
+* mediaWiki.confirmCloseWindow now returns an object of functions, instead of
+one function. The callback can't be called directly any more. The callback function
+is replaced with confirmCloseWindow.release().
 
 == Compatibility ==
 
index 6c623a3..d158481 100644 (file)
@@ -8,6 +8,7 @@ $wgAutoloadLocalClasses = array(
        'AbstractContent' => __DIR__ . '/includes/content/AbstractContent.php',
        'Action' => __DIR__ . '/includes/actions/Action.php',
        'ActiveUsersPager' => __DIR__ . '/includes/specials/SpecialActiveusers.php',
+       'ActivityUpdateJob' => __DIR__ . '/includes/jobqueue/jobs/ActivityUpdateJob.php',
        'AjaxDispatcher' => __DIR__ . '/includes/AjaxDispatcher.php',
        'AjaxResponse' => __DIR__ . '/includes/AjaxResponse.php',
        'AllMessagesTablePager' => __DIR__ . '/includes/specials/SpecialAllMessages.php',
index 6dc72e7..0789eee 100644 (file)
                "ext-iconv": "*",
                "leafo/lessphp": "0.5.0",
                "liuggio/statsd-php-client": "1.0.12",
-               "oojs/oojs-ui": "0.11.1",
+               "oojs/oojs-ui": "0.11.3",
                "php": ">=5.3.3",
                "psr/log": "1.0.0",
                "wikimedia/cdb": "1.0.1",
+               "wikimedia/assert": "0.2.2",
                "wikimedia/composer-merge-plugin": "1.0.0",
                "wikimedia/utfnormal": "1.0.2",
                "zordius/lightncandy": "0.18"
index 99a9d33..f03e38d 100644 (file)
@@ -2149,6 +2149,10 @@ $stripState: stripState used (object)
 $parser: Parser object being used
 $text: text that will be returned
 
+'ParserAfterUnstrip': Called after the first unstripGeneral() in Parser::internalParseHalfParsed()
+$parser: Parser object being used
+$text: text that will be returned
+
 'ParserBeforeInternalParse': Called at the beginning of Parser::internalParse().
 $parser: Parser object
 $text: text to parse
index 933260e..d1ae26a 100644 (file)
                                        {{else}}
                                                {{#whenDepth 2}}
                                                <a name="section-{{ reference }}"></a>
-                                               <h2>{{ reference }} {{ header }}</h2>
+                                               <h2><a href="#section-{{ reference }}">{{ reference }} {{ header }}</a></h2>
                                                {{/whenDepth}}
                                                {{#whenDepth 3}}
-                                               <h3>{{ reference }} {{ header }}</h3>
+                                               <a name="section-{{ reference }}"></a>
+                                               <h3><a href="#section-{{ reference }}">{{ reference }} {{ header }}</a></h3>
                                                {{/whenDepth}}
                                        {{/whenDepth}}
                                        {{#ifAny markup modifiers}}
index eeea1a8..3727694 100644 (file)
@@ -106,6 +106,11 @@ nav {
 
        h1, h2, h3, h4, h5, h6, p {
                margin-left: 20px;
+
+               a {
+                       text-decoration: none;
+                       color: #000;
+               }
        }
 
        p {
index 3ca54b5..857d69e 100644 (file)
@@ -154,12 +154,15 @@ $wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
        ( strpos( PHP_SAPI, 'isapi' ) === false );
 
 /**
- * The extension to append to script names by default. This can either be .php
- * or .php5.
+ * The extension to append to script names by default.
+ *
+ * Some hosting providers used PHP 4 for *.php files, and PHP 5 for *.php5.
+ * This variable was provided to support those providers.
  *
- * Some hosting providers use PHP 4 for *.php files, and PHP 5 for *.php5. This
- * variable is provided to support those providers.
  * @since 1.11
+ * @deprecated since 1.25; support for '.php5' is being phased out of MediaWiki
+ *  proper. Backward-compatibility can be maintained by configuring your web
+ *  server to rewrite URLs. See RELEASE-NOTES for details.
  */
 $wgScriptExtension = '.php';
 
@@ -4435,7 +4438,7 @@ $wgHiddenPrefs = array();
  * This is used in a regular expression character class during
  * registration (regex metacharacters like / are escaped).
  */
-$wgInvalidUsernameCharacters = '@';
+$wgInvalidUsernameCharacters = '@:';
 
 /**
  * Character used as a delimiter when testing for interwiki userrights
index 6eaeb25..8b3b959 100644 (file)
@@ -3353,7 +3353,7 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1,
                // Removing leading zeros works around broken base detection code in
                // some PHP versions (see <https://bugs.php.net/bug.php?id=50175> and
                // <https://bugs.php.net/bug.php?id=55398>).
-               $result = gmp_strval( gmp_init( ltrim( $input, '0' ), $sourceBase ), $destBase );
+               $result = gmp_strval( gmp_init( ltrim( $input, '0' ) ?: '0', $sourceBase ), $destBase );
        } elseif ( extension_loaded( 'bcmath' ) && ( $engine == 'auto' || $engine == 'bcmath' ) ) {
                $decimal = '0';
                foreach ( str_split( strtolower( $input ) ) as $char ) {
index 7a33328..1324ed8 100644 (file)
@@ -485,8 +485,8 @@ require_once "$IP/includes/libs/normal/UtfNormalUtil.php";
 
 $ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' );
 
-if ( defined( 'MW_ENTRY_PHP5' ) ) {
-       wfWarn( 'The ".php5" entry point files are deprecated. Use ".php" instead.' );
+if ( $wgScriptExtension !== '.php' || defined( 'MW_ENTRY_PHP5' ) ) {
+       wfWarn( 'Script extensions other than ".php" are deprecated.' );
 }
 
 if ( $wgCanonicalServer === false ) {
index 429ae0e..a2be2f0 100644 (file)
@@ -2333,15 +2333,14 @@ class User implements IDBAccessObject {
         * @since 1.25
         */
        public function touch() {
-               global $wgMemc;
-
                $this->load();
 
                if ( $this->mId ) {
+                       $this->mQuickTouched = $this->newTouchedTimestamp();
+
+                       $cache = ObjectCache::getMainWANInstance();
                        $key = wfMemcKey( 'user-quicktouched', 'id', $this->mId );
-                       $timestamp = $this->newTouchedTimestamp();
-                       $wgMemc->set( $key, $timestamp );
-                       $this->mQuickTouched = $timestamp;
+                       $cache->touchCheckKey( $key );
                }
        }
 
@@ -2359,16 +2358,16 @@ class User implements IDBAccessObject {
         * @return string TS_MW Timestamp
         */
        public function getTouched() {
-               global $wgMemc;
-
                $this->load();
 
                if ( $this->mId ) {
                        if ( $this->mQuickTouched === null ) {
+                               $cache = ObjectCache::getMainWANInstance();
                                $key = wfMemcKey( 'user-quicktouched', 'id', $this->mId );
-                               $timestamp = $wgMemc->get( $key );
+
+                               $timestamp = $cache->getCheckKeyTime( $key );
                                if ( $timestamp ) {
-                                       $this->mQuickTouched = $timestamp;
+                                       $this->mQuickTouched = wfTimestamp( TS_MW, $timestamp );
                                } else {
                                        # Set the timestamp to get HTTP 304 cache hits
                                        $this->touch();
index 98c2201..1dc9985 100644 (file)
@@ -176,6 +176,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $data['linktrail'] = $linktrail ?: '';
 
                $data['legaltitlechars'] = Title::legalChars();
+               $data['invalidusernamechars'] = $config->get( 'InvalidUsernameCharacters' );
 
                global $IP;
                $git = SpecialVersion::getGitHeadSha1( $IP );
index 359994a..3c53be1 100644 (file)
        "api-help-param-deprecated": "Deprecated.",
        "api-help-param-required": "This parameter is required.",
        "api-help-datatypes-header": "Data types",
-       "api-help-datatypes": "Some API parameter types need further explanation:\n;boolean\n:Boolean parameters work like HTML checkboxes: if the parameter is specified, regardless of value, it is considered true. For a false value, omit the parameter entirely.\n;timestamp\n:Timestamps may be specified in several formats. ISO 8601 date and time is recommended. All times are in UTC, any included timezone is ignored.\n:* ISO 8601 date and time, <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>Z</kbd> (punctuation and <kbd>Z</kbd> are optional)\n:* ISO 8601 date and time with (ignored) fractional seconds, <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>.<var>00001</var>Z</kbd> (dashes, colons, and <kbd>Z</kbd> are optional)\n:* MediaWiki format, <kbd><var>2001</var><var>01</var><var>15</var><var>14</var><var>56</var><var>00</var></kbd>\n:* Generic numeric format, <kbd><var>2001</var>-<var>01</var>-<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd> (optional timezone of <kbd>GMT</kbd>, <kbd>+<var>##</var></kbd>, or <kbd>-<var>##</var></kbd> is ignored)\n:* EXIF format, <kbd><var>2001</var>:<var>01</var>:<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:*RFC 2822 format (timezone may be omitted), <kbd><var>Mon</var>, <var>15</var> <var>Jan</var> <var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* RFC 850 format (timezone may be omitted), <kbd><var>Monday</var>, <var>15</var>-<var>Jan</var>-<var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* C ctime format, <kbd><var>Mon</var> <var>Jan</var> <var>15</var> <var>14</var>:<var>56</var>:<var>00</var> <var>2001</var></kbd>\n:* Seconds since 1970-01-01T00:00:00Z as a 1 to 13 digit integer",
+       "api-help-datatypes": "Some parameter types in API requests need further explanation:\n;boolean\n:Boolean parameters work like HTML checkboxes: if the parameter is specified, regardless of value, it is considered true. For a false value, omit the parameter entirely.\n;timestamp\n:Timestamps may be specified in several formats. ISO 8601 date and time is recommended. All times are in UTC, any included timezone is ignored.\n:* ISO 8601 date and time, <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>Z</kbd> (punctuation and <kbd>Z</kbd> are optional)\n:* ISO 8601 date and time with (ignored) fractional seconds, <kbd><var>2001</var>-<var>01</var>-<var>15</var>T<var>14</var>:<var>56</var>:<var>00</var>.<var>00001</var>Z</kbd> (dashes, colons, and <kbd>Z</kbd> are optional)\n:* MediaWiki format, <kbd><var>2001</var><var>01</var><var>15</var><var>14</var><var>56</var><var>00</var></kbd>\n:* Generic numeric format, <kbd><var>2001</var>-<var>01</var>-<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd> (optional timezone of <kbd>GMT</kbd>, <kbd>+<var>##</var></kbd>, or <kbd>-<var>##</var></kbd> is ignored)\n:* EXIF format, <kbd><var>2001</var>:<var>01</var>:<var>15</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:*RFC 2822 format (timezone may be omitted), <kbd><var>Mon</var>, <var>15</var> <var>Jan</var> <var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* RFC 850 format (timezone may be omitted), <kbd><var>Monday</var>, <var>15</var>-<var>Jan</var>-<var>2001</var> <var>14</var>:<var>56</var>:<var>00</var></kbd>\n:* C ctime format, <kbd><var>Mon</var> <var>Jan</var> <var>15</var> <var>14</var>:<var>56</var>:<var>00</var> <var>2001</var></kbd>\n:* Seconds since 1970-01-01T00:00:00Z as a 1 to 13 digit integer",
        "api-help-param-type-limit": "Type: integer or <kbd>max</kbd>",
        "api-help-param-type-integer": "Type: {{PLURAL:$1|1=integer|2=list of integers}}",
        "api-help-param-type-boolean": "Type: boolean ([[Special:ApiHelp/main#main/datatypes|details]])",
index 5705c48..b29f32d 100644 (file)
        "apihelp-options-example-reset": "Restablecer todas las preferencias",
        "apihelp-paraminfo-description": "Obtener información acerca de los módulos de la API.",
        "apihelp-paraminfo-param-helpformat": "Formato de las cadenas de ayuda.",
+       "apihelp-parse-paramvalue-prop-modules": "Da los módulos ResourceLoader utilizados en la página.",
        "apihelp-patrol-example-rcid": "Patrullar un cambio reciente",
        "apihelp-patrol-example-revid": "Patrullar una revisión",
        "apihelp-protect-param-reason": "Motivo de la (des)protección.",
index 59b110b..f9c87e6 100644 (file)
        "apihelp-parse-param-pageid": "Analizar o contido desta páxina. Ignora <var>$1page</var>.",
        "apihelp-parse-param-redirects": "Se <var>$1page</var> ou <var>$1pageid</var> apuntar a unha redirección, resólvea.",
        "apihelp-parse-param-oldid": "Analizar o contido desta revisión. Ignora <var>$1page</var> e <var>$1pageid</var>.",
-       "apihelp-parse-param-prop": "Que información obter:\n;text:Devolve o texto analizado do texto wiki.\n;langlinks:Devolve as ligazóns de idioma do texto wiki analizado\n;categories:Devolve as categorías do texto wiki analizado.\n;categorieshtml:Devolve a versión HTML das categorías.\n;links:Devolve as ligazóns internas do texto wiki analizado.\n;templates:Devolve os modelos no texto wiki analizado.\n;images:Devolve as imaxes no texto wiki analizado.\n;externallinks:Devolve as ligazóns externas no texto wiki analizado.\n;sections:Devolve as seccións no texto wiki analizado.\n;revid:Engade o identificador da revisión da páxina analizada.\n;displaytitle:Engade o título do texto wiki analizado.\n;headitems:Devolve os obxectos a poñer na &lt;cabeceira&gt; da páxina\n;headhtml:Devolve a &lt;cabeceira&gt; analizada da páxina.\n;modules:Devolve os módulos ResourceLoader usados na páxina.\n;indicators:Devolve o HTML dos indicadores de estado usados na páxina.\n;iwlinks:Devolve as ligazóns interwiki analizados no texto wiki.\n;wikitext:Devolve o texto wiki orixinal que foi analizado.\n;properties:Devolve varias propiedades definidas no texto wiki analizado.\n;limitreportdata:Devolve o informe de límite de forma estruturada. Non devolve datos cando está activo $1disablepp.\n;limitreporthtml:Devolve a versión HTML do informe de límite. Non devolve datos cando está activo $1disablepp.",
+       "apihelp-parse-param-prop": "Que información obter:",
+       "apihelp-parse-paramvalue-prop-text": "Devolve o texto analizado do texto wiki.",
+       "apihelp-parse-paramvalue-prop-langlinks": "Devolve as interwikis do texto analizado.",
+       "apihelp-parse-paramvalue-prop-categories": "Devolve as categoría do texto analizado.",
+       "apihelp-parse-paramvalue-prop-categorieshtml": "Devolve a versión HTML das categorías.",
+       "apihelp-parse-paramvalue-prop-links": "Devolve as ligazóns internas do texto wiki analizado.",
+       "apihelp-parse-paramvalue-prop-templates": "Devolve os modelos do texto wiki analizado.",
+       "apihelp-parse-paramvalue-prop-images": "Devolve as imaxes do texto wiki analizado.",
+       "apihelp-parse-paramvalue-prop-externallinks": "Devolve as ligazóns externas no texto wiki analizado.",
+       "apihelp-parse-paramvalue-prop-sections": "Devolve as seccións do texto wiki analizado.",
+       "apihelp-parse-paramvalue-prop-revid": "Engade o identificador de edición do texto wiki analizado.",
+       "apihelp-parse-paramvalue-prop-displaytitle": "Engade o título do texto wiki analizado.",
+       "apihelp-parse-paramvalue-prop-headitems": "Devolve os elementos a poñer na <code>&lt;cabeceira&gt;</code> da páxina.",
+       "apihelp-parse-paramvalue-prop-headhtml": "Devolve <code>&lt;cabeceira&gt;</code> analizada da páxina.",
+       "apihelp-parse-paramvalue-prop-modules": "Devolve os módulos ResourceLoader usados na páxina.",
+       "apihelp-parse-paramvalue-prop-jsconfigvars": "Devolve as variables específicas de configuración JavaScript da páxina.",
+       "apihelp-parse-paramvalue-prop-encodedjsconfigvars": "Devolve as variables específicas de configuración JavaScript da páxina como unha cadea de texto JSON.",
+       "apihelp-parse-paramvalue-prop-indicators": "Devolve o HTML dos indicadores de estado de páxina usados na páxina.",
+       "apihelp-parse-paramvalue-prop-iwlinks": "Devolve as ligazóns interwiki do texto wiki analizado.",
+       "apihelp-parse-paramvalue-prop-wikitext": "Devolve o texto wiki orixinal que foi analizado.",
+       "apihelp-parse-paramvalue-prop-properties": "Obter varias propiedades definidas no texto wiki analizado.",
+       "apihelp-parse-paramvalue-prop-limitreportdata": "Devolve o informe de límite de forma estruturada. Non devolve datos cando <var>$1disablepp</var> está fixado.",
+       "apihelp-parse-paramvalue-prop-limitreporthtml": "Devolve a versión HTML do informe de límite. Non devolve datos cando <var>$1disablepp</var> está fixado.",
        "apihelp-parse-param-pst": "Fai unha transformación antes de gardar a entrada antes de analizala. Válida unicamente para usar con texto.",
        "apihelp-parse-param-onlypst": "Facer unha transformación antes de gardar (PST) a entrada, pero sen analizala. Devolve o mesmo wikitexto, despois de que a PST foi aplicada. Só válida cando se usa con <var>$1text</var>.",
        "apihelp-parse-param-effectivelanglinks": "Inclúe ligazóns de idioma proporcionadas polas extensións (para usar con <kbd>$1prop=langlinks</kbd>).",
index a95bc11..8a6769d 100644 (file)
        "apihelp-paraminfo-param-formatmodules": "Leß met de Nahme vun de Moduhle zom Fommatehre (Wäät vum „<var lang=\"en\" xml:lang=\"en\" dir=\"ltr\">format</var>“-Parramehter). Nemm schtatt dämm „<varlang=\"en\" xml:lang=\"en\" dir=\"ltr\">$1modules</var>“.",
        "apihelp-paraminfo-example-1": "Zisch Aanjahbe övver <kbd lang=\"en\" xml:lang=\"en\" dir=\"ltr\">[[Special:ApiHelp/parse|action=parse]]</kbd>, <kbd lang=\"en\" xml:lang=\"en\" dir=\"ltr\">[[Special:ApiHelp/jsonfm|format=jsonfm]]</kbd>, <kbd lang=\"en\" xml:lang=\"en\" dir=\"ltr\">[[Special:ApiHelp/query+allpages|action=query&list=allpages]]</kbd>, un <kbd lang=\"en\" xml:lang=\"en\" dir=\"ltr\">[[Special:ApiHelp/query+siteinfo|action=query&meta=siteinfo]]</kbd>.",
        "apihelp-parse-param-summary": "De Zersammefaßong för ze pahse.",
+       "apihelp-parse-param-prop": "Wat för en schtöcker aan Ennfommazjuhne holle:",
+       "apihelp-parse-paramvalue-prop-text": "Jitt dä jepahßde Täx vum Wikkitäx uß.",
+       "apihelp-parse-paramvalue-prop-langlinks": "Jitt de Schprohche-Lengks em jepahßde Wikkitäx uß.",
+       "apihelp-parse-paramvalue-prop-categories": "Jitt de Saachjroppe em jepahßde Wikkitäx uß.",
+       "apihelp-parse-paramvalue-prop-categorieshtml": "Jitt de <i lang=\"en\" xml:lang=\"en\" dir=\"ltr\" title=\"HyperText Markup Language\">HTML</i>-Fazung vun de Saachjroppe us.",
+       "apihelp-parse-paramvalue-prop-links": "Jitt de entärne Lengks em jepahßde Wikkitäx uß.",
+       "apihelp-parse-paramvalue-prop-templates": "Jitt de Schablohne em jepahßde Wikkitäx uß.",
+       "apihelp-parse-paramvalue-prop-images": "Jitt de Belder em jepahßde Wikkitäx uß.",
+       "apihelp-parse-paramvalue-prop-externallinks": "Jitt de Lengks, di noh ußerhallev vum Wikki jonn, em jepahßde Wikkitäx uß.",
+       "apihelp-parse-paramvalue-prop-sections": "Jitt de Affschnedde em jepahßde Wikkitäx uß.",
+       "apihelp-parse-paramvalue-prop-revid": "Deiht de Kännong vun de Väsjohn vun dä jepahßde Sigg derbei.",
+       "apihelp-parse-paramvalue-prop-displaytitle": "Deiht de Övverschreff vum jepahßde Wikkitäx derbei.",
+       "apihelp-parse-paramvalue-prop-modules": "Jitt dem <i lang=\"en\" xml:lang=\"en\" dir=\"ltr\" title=\"Delivery system in MediaWiki for the optimized run-time loading and managing of modules\">ResourceLoader</i> sing Moduhle uß, di en dä Sigg jebruch wähde.",
+       "apihelp-parse-paramvalue-prop-iwlinks": "Jitt de Engewikkilengks em jepahßde Wikkitäx uß.",
+       "apihelp-parse-paramvalue-prop-wikitext": "Jitt de der ojinahl Wikkitäx us, dä jepahß woode es.",
+       "apihelp-parse-paramvalue-prop-properties": "Jitt devärse Eijeschafte uß, di em jepahßde Wikkitäx faßjelaat woode sen.",
        "apihelp-parse-param-section": "Holl blohß dann der Ennhalld vun däm Affschnett met dä Nommer, udder wann „<kbd lang=\"en\" xml:lang=\"en\" dir=\"ltr\">new</kbd>“ enjejovve es, maach ene neu Affschnett derbei.",
        "apihelp-parse-param-sectiontitle": "De Övverschreff för dä neuje Afschnet, wann <var lang=\"en\" xml:lang=\"en\" dir=\"ltr\">section</var> = <kbd lang=\"en\" xml:lang=\"en\" dir=\"ltr\">new</kbd> es.\n\nAnders wi beim Beärbeide vun dä Sigg weed dä Parramehter nit dorsch de <var lang=\"en\" xml:lang=\"en\" dir=\"ltr\">summary</var> ußjetuusch, wann hä fottjelohße udder läddesch es.",
        "apihelp-parse-param-disabletoc": "Donn et Ennhaldsverzeijscheneß en de Ußjahbe vottlohze.",
index 81d38cf..ff265cd 100644 (file)
        "apihelp-parse-param-pageid": "解析此页的内容。覆盖<var>$1page</var>。",
        "apihelp-parse-param-redirects": "如果<var>$1page</var>或<var>$1pageid</var>被设置为一个重定向,则解析它。",
        "apihelp-parse-param-oldid": "解析该修订版本的内容。覆盖<var>$1page</var>和<var>$1pageid</var>。",
+       "apihelp-parse-paramvalue-prop-categorieshtml": "提供HTML版本分类。",
+       "apihelp-parse-paramvalue-prop-modules": "提供在页面中使用的ResourceLoader模块。",
        "apihelp-parse-param-pst": "在解析输入前,对输入做一次保存前变换处理。仅当使用文本时有效。",
        "apihelp-parse-param-effectivelanglinks": "包含由扩展提供的语言链接(用于与<kbd>$1prop=langlinks</kbd>一起使用)。",
        "apihelp-parse-param-section": "只检索此段数的内容,或只当<kbd>new</kbd>生成新的段落时检索。\n\n<kbd>new</kbd>段落只当指定<var>text</var>时受尊重。",
index 64f89bf..7da25fe 100644 (file)
@@ -1064,22 +1064,18 @@ class ChangeTags {
         * @since 1.25
         */
        public static function listExtensionActivatedTags() {
-               $cache = ObjectCache::getMainWANInstance();
-
-               $key = wfMemcKey( 'active-tags' );
-               $tags = $cache->get( $key );
-               if ( $tags ) {
-                       return $tags;
-               }
-
-               // ask extensions which tags they consider active
-               $extensionActive = array();
-               Hooks::run( 'ChangeTagsListActive', array( &$extensionActive ) );
-
-               // Short-term caching.
-               $cache->set( $key, $extensionActive, 300 );
-
-               return $extensionActive;
+               return ObjectCache::getMainWANInstance()->getWithSetCallback(
+                       wfMemcKey( 'active-tags' ),
+                       function() {
+                               // Ask extensions which tags they consider active
+                               $extensionActive = array();
+                               Hooks::run( 'ChangeTagsListActive', array( &$extensionActive ) );
+                               return $extensionActive;
+                       },
+                       300,
+                       array( wfMemcKey( 'active-tags' ) ),
+                       array( 'lockTSE' => INF )
+               );
        }
 
        /**
@@ -1106,29 +1102,21 @@ class ChangeTags {
         * @since 1.25
         */
        public static function listExplicitlyDefinedTags() {
-               $cache = ObjectCache::getMainWANInstance();
-
-               $key = wfMemcKey( 'valid-tags-db' );
-               $tags = $cache->get( $key );
-               if ( $tags ) {
-                       return $tags;
-               }
-
-               $emptyTags = array();
-
-               // Some DB stuff
-               $dbr = wfGetDB( DB_SLAVE );
-               $res = $dbr->select( 'valid_tag', 'vt_tag', array(), __METHOD__ );
-               foreach ( $res as $row ) {
-                       $emptyTags[] = $row->vt_tag;
-               }
-
-               $emptyTags = array_filter( array_unique( $emptyTags ) );
-
-               // Short-term caching.
-               $cache->set( $key, $emptyTags, 300 );
-
-               return $emptyTags;
+               $fname = __METHOD__;
+
+               return ObjectCache::getMainWANInstance()->getWithSetCallback(
+                       wfMemcKey( 'valid-tags-db' ),
+                       function() use ( $fname ) {
+                               $dbr = wfGetDB( DB_SLAVE );
+                               $tags = $dbr->selectFieldValues(
+                                       'valid_tag', 'vt_tag', array(), $fname );
+
+                               return array_filter( array_unique( $tags ) );
+                       },
+                       300,
+                       array( wfMemcKey( 'valid-tags-db' ) ),
+                       array( 'lockTSE' => INF )
+               );
        }
 
        /**
@@ -1141,22 +1129,17 @@ class ChangeTags {
         * @since 1.25
         */
        public static function listExtensionDefinedTags() {
-               $cache = ObjectCache::getMainWANInstance();
-
-               $key = wfMemcKey( 'valid-tags-hook' );
-               $tags = $cache->get( $key );
-               if ( $tags ) {
-                       return $tags;
-               }
-
-               $emptyTags = array();
-               Hooks::run( 'ListDefinedTags', array( &$emptyTags ) );
-               $emptyTags = array_filter( array_unique( $emptyTags ) );
-
-               // Short-term caching.
-               $cache->set( $key, $emptyTags, 300 );
-
-               return $emptyTags;
+               return ObjectCache::getMainWANInstance()->getWithSetCallback(
+                       wfMemcKey( 'valid-tags-hook' ),
+                       function() {
+                               $tags = array();
+                               Hooks::run( 'ListDefinedTags', array( &$tags ) );
+                               return array_filter( array_unique( $tags ) );
+                       },
+                       300,
+                       array( wfMemcKey( 'valid-tags-hook' ) ),
+                       array( 'lockTSE' => INF )
+               );
        }
 
        /**
@@ -1167,9 +1150,9 @@ class ChangeTags {
        public static function purgeTagCacheAll() {
                $cache = ObjectCache::getMainWANInstance();
 
-               $cache->delete( wfMemcKey( 'active-tags' ) );
-               $cache->delete( wfMemcKey( 'valid-tags-db' ) );
-               $cache->delete( wfMemcKey( 'valid-tags-hook' ) );
+               $cache->touchCheckKey( wfMemcKey( 'active-tags' ) );
+               $cache->touchCheckKey( wfMemcKey( 'valid-tags-db' ) );
+               $cache->touchCheckKey( wfMemcKey( 'valid-tags-hook' ) );
 
                self::purgeTagUsageCache();
        }
@@ -1194,38 +1177,38 @@ class ChangeTags {
         * @return array Array of string => int
         */
        public static function tagUsageStatistics() {
-               $cache = ObjectCache::getMainWANInstance();
-
-               $key = wfMemcKey( 'change-tag-statistics' );
-               $stats = $cache->get( $key );
-               if ( $stats ) {
-                       return $stats;
-               }
-
-               $out = array();
+               $fname = __METHOD__;
+
+               return ObjectCache::getMainWANInstance()->getWithSetCallback(
+                       wfMemcKey( 'change-tag-statistics' ),
+                       function() use ( $fname ) {
+                               $out = array();
+
+                               $dbr = wfGetDB( DB_SLAVE, 'vslow' );
+                               $res = $dbr->select(
+                                       'change_tag',
+                                       array( 'ct_tag', 'hitcount' => 'count(*)' ),
+                                       array(),
+                                       $fname,
+                                       array( 'GROUP BY' => 'ct_tag', 'ORDER BY' => 'hitcount DESC' )
+                               );
 
-               $dbr = wfGetDB( DB_SLAVE, 'vslow' );
-               $res = $dbr->select(
-                       'change_tag',
-                       array( 'ct_tag', 'hitcount' => 'count(*)' ),
-                       array(),
-                       __METHOD__,
-                       array( 'GROUP BY' => 'ct_tag', 'ORDER BY' => 'hitcount DESC' )
+                               foreach ( $res as $row ) {
+                                       $out[$row->ct_tag] = $row->hitcount;
+                               }
+
+                               foreach ( ChangeTags::listDefinedTags() as $tag ) {
+                                       if ( !isset( $out[$tag] ) ) {
+                                               $out[$tag] = 0;
+                                       }
+                               }
+
+                               return $out;
+                       },
+                       300,
+                       array( wfMemcKey( 'change-tag-statistics' ) ),
+                       array( 'lockTSE' => INF )
                );
-
-               foreach ( $res as $row ) {
-                       $out[$row->ct_tag] = $row->hitcount;
-               }
-               foreach ( self::listDefinedTags() as $tag ) {
-                       if ( !isset( $out[$tag] ) ) {
-                               $out[$tag] = 0;
-                       }
-               }
-
-               // Cache for a very short time
-               $cache->set( $key, $out, 300 );
-
-               return $out;
        }
 
        /**
index 12b0c39..b20794b 100644 (file)
@@ -46,6 +46,9 @@ class ConfigFactory {
         */
        private static $self;
 
+       /**
+        * @return ConfigFactory
+        */
        public static function getDefaultInstance() {
                if ( !self::$self ) {
                        self::$self = new self;
index 5f406c9..d6d7e9e 100644 (file)
@@ -235,16 +235,16 @@ class SwiftFileBackend extends FileBackendStore {
                        'body' => $params['content']
                ) );
 
-               $be = $this;
+               $that = $this;
                $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $be, $method, $params ) {
+               $handler = function ( array $request, Status $status ) use ( $that, $method, $params ) {
                        list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
                        if ( $rcode === 201 ) {
                                // good
                        } elseif ( $rcode === 412 ) {
                                $status->fatal( 'backend-fail-contenttype', $params['dst'] );
                        } else {
-                               $be->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                               $that->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
                        }
                };
 
@@ -298,16 +298,16 @@ class SwiftFileBackend extends FileBackendStore {
                        'body' => $handle // resource
                ) );
 
-               $be = $this;
+               $that = $this;
                $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $be, $method, $params ) {
+               $handler = function ( array $request, Status $status ) use ( $that, $method, $params ) {
                        list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
                        if ( $rcode === 201 ) {
                                // good
                        } elseif ( $rcode === 412 ) {
                                $status->fatal( 'backend-fail-contenttype', $params['dst'] );
                        } else {
-                               $be->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                               $that->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
                        }
                };
 
@@ -347,16 +347,16 @@ class SwiftFileBackend extends FileBackendStore {
                        ) + $this->sanitizeHdrs( $params ), // extra headers merged into object
                ) );
 
-               $be = $this;
+               $that = $this;
                $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $be, $method, $params ) {
+               $handler = function ( array $request, Status $status ) use ( $that, $method, $params ) {
                        list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
                        if ( $rcode === 201 ) {
                                // good
                        } elseif ( $rcode === 404 ) {
                                $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
                        } else {
-                               $be->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                               $that->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
                        }
                };
 
@@ -405,9 +405,9 @@ class SwiftFileBackend extends FileBackendStore {
                        );
                }
 
-               $be = $this;
+               $that = $this;
                $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $be, $method, $params ) {
+               $handler = function ( array $request, Status $status ) use ( $that, $method, $params ) {
                        list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
                        if ( $request['method'] === 'PUT' && $rcode === 201 ) {
                                // good
@@ -416,7 +416,7 @@ class SwiftFileBackend extends FileBackendStore {
                        } elseif ( $rcode === 404 ) {
                                $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
                        } else {
-                               $be->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                               $that->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
                        }
                };
 
@@ -446,9 +446,9 @@ class SwiftFileBackend extends FileBackendStore {
                        'headers' => array()
                ) );
 
-               $be = $this;
+               $that = $this;
                $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $be, $method, $params ) {
+               $handler = function ( array $request, Status $status ) use ( $that, $method, $params ) {
                        list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
                        if ( $rcode === 204 ) {
                                // good
@@ -457,7 +457,7 @@ class SwiftFileBackend extends FileBackendStore {
                                        $status->fatal( 'backend-fail-delete', $params['src'] );
                                }
                        } else {
-                               $be->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                               $that->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
                        }
                };
 
@@ -505,16 +505,16 @@ class SwiftFileBackend extends FileBackendStore {
                        'headers' => $metaHdrs + $customHdrs
                ) );
 
-               $be = $this;
+               $that = $this;
                $method = __METHOD__;
-               $handler = function ( array $request, Status $status ) use ( $be, $method, $params ) {
+               $handler = function ( array $request, Status $status ) use ( $that, $method, $params ) {
                        list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $request['response'];
                        if ( $rcode === 202 ) {
                                // good
                        } elseif ( $rcode === 404 ) {
                                $status->fatal( 'backend-fail-describe', $params['src'] );
                        } else {
-                               $be->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
+                               $that->onError( $status, $method, $params, $rerr, $rcode, $rdesc );
                        }
                };
 
index 591d684..ef402ea 100644 (file)
@@ -275,14 +275,14 @@ class LocalRepo extends FileRepo {
                        );
                };
 
-               $repo = $this;
+               $that = $this;
                $applyMatchingFiles = function ( ResultWrapper $res, &$searchSet, &$finalFiles )
-                       use ( $repo, $fileMatchesSearch, $flags )
+                       use ( $that, $fileMatchesSearch, $flags )
                {
                        global $wgContLang;
-                       $info = $repo->getInfo();
+                       $info = $that->getInfo();
                        foreach ( $res as $row ) {
-                               $file = $repo->newFileFromRow( $row );
+                               $file = $that->newFileFromRow( $row );
                                // There must have been a search for this DB key, but this has to handle the
                                // cases were title capitalization is different on the client and repo wikis.
                                $dbKeysLook = array( str_replace( ' ', '_', $file->getName() ) );
index ba437f0..fe42c2d 100644 (file)
@@ -243,21 +243,19 @@ class LocalFile extends File {
         * @return bool
         */
        function loadFromCache() {
-               global $wgMemc;
-
                $this->dataLoaded = false;
                $this->extraDataLoaded = false;
                $key = $this->getCacheKey();
 
                if ( !$key ) {
-
                        return false;
                }
 
-               $cachedValues = $wgMemc->get( $key );
+               $cache = ObjectCache::getMainWANInstance();
+               $cachedValues = $cache->get( $key );
 
                // Check if the key existed and belongs to this version of MediaWiki
-               if ( isset( $cachedValues['version'] ) && $cachedValues['version'] == MW_FILE_VERSION ) {
+               if ( is_array( $cachedValues ) && $cachedValues['version'] == MW_FILE_VERSION ) {
                        wfDebug( "Pulling file metadata from cache key $key\n" );
                        $this->fileExists = $cachedValues['fileExists'];
                        if ( $this->fileExists ) {
@@ -283,22 +281,20 @@ class LocalFile extends File {
         * Save the file metadata to memcached
         */
        function saveToCache() {
-               global $wgMemc;
-
                $this->load();
-               $key = $this->getCacheKey();
 
+               $key = $this->getCacheKey();
                if ( !$key ) {
                        return;
                }
 
                $fields = $this->getCacheFields( '' );
-               $cache = array( 'version' => MW_FILE_VERSION );
-               $cache['fileExists'] = $this->fileExists;
+               $cacheVal = array( 'version' => MW_FILE_VERSION );
+               $cacheVal['fileExists'] = $this->fileExists;
 
                if ( $this->fileExists ) {
                        foreach ( $fields as $field ) {
-                               $cache[$field] = $this->$field;
+                               $cacheVal[$field] = $this->$field;
                        }
                }
 
@@ -306,13 +302,29 @@ class LocalFile extends File {
                // If the cache value gets to large it will not fit in memcached and nothing will
                // get cached at all, causing master queries for any file access.
                foreach ( $this->getLazyCacheFields( '' ) as $field ) {
-                       if ( isset( $cache[$field] ) && strlen( $cache[$field] ) > 100 * 1024 ) {
-                               unset( $cache[$field] ); // don't let the value get too big
+                       if ( isset( $cacheVal[$field] ) && strlen( $cacheVal[$field] ) > 100 * 1024 ) {
+                               unset( $cacheVal[$field] ); // don't let the value get too big
                        }
                }
 
                // Cache presence for 1 week and negatives for 1 day
-               $wgMemc->set( $key, $cache, $this->fileExists ? 86400 * 7 : 86400 );
+               $cache = ObjectCache::getMainWANInstance();
+               $cache->set( $key, $cacheVal, $this->fileExists ? 86400 * 7 : 86400 );
+       }
+
+       /**
+        * Purge the file object/metadata cache
+        */
+       function invalidateCache() {
+               $this->load();
+
+               $key = $this->getCacheKey();
+               if ( !$key ) {
+                       return;
+               }
+
+               $cache = ObjectCache::getMainWANInstance();
+               $cache->delete( $key );
        }
 
        /**
@@ -612,7 +624,7 @@ class LocalFile extends File {
                        __METHOD__
                );
 
-               $this->saveToCache();
+               $this->invalidateCache();
 
                $this->unlock(); // done
 
@@ -842,8 +854,7 @@ class LocalFile extends File {
         * Refresh metadata in memcached, but don't touch thumbnails or squid
         */
        function purgeMetadataCache() {
-               $this->loadFromDB( File::READ_LATEST );
-               $this->saveToCache();
+               $this->invalidateCache();
        }
 
        /**
@@ -1389,11 +1400,8 @@ class LocalFile extends File {
                #       to after $wikiPage->doEdit has been called.
                $dbw->commit( __METHOD__ );
 
-               # Save to memcache.
-               # We shall not saveToCache before the commit since otherwise
-               # in case of a rollback there is an usable file from memcached
-               # which in fact doesn't really exist (bug 24978)
-               $this->saveToCache();
+               # Update memcache after the commit
+               $this->invalidateCache();
 
                if ( $exists ) {
                        # Invalidate the cache for the description page
@@ -1595,21 +1603,21 @@ class LocalFile extends File {
 
                // Hack: the lock()/unlock() pair is nested in a transaction so the locking is not
                // tied to BEGIN/COMMIT. To avoid slow purges in the transaction, move them outside.
-               $file = $this;
+               $that = $this;
                $this->getRepo()->getMasterDB()->onTransactionIdle(
-                       function () use ( $file, $archiveNames ) {
+                       function () use ( $that, $archiveNames ) {
                                global $wgUseSquid;
 
-                               $file->purgeEverything();
+                               $that->purgeEverything();
                                foreach ( $archiveNames as $archiveName ) {
-                                       $file->purgeOldThumbnails( $archiveName );
+                                       $that->purgeOldThumbnails( $archiveName );
                                }
 
                                if ( $wgUseSquid ) {
                                        // Purge the squid
                                        $purgeUrls = array();
                                        foreach ( $archiveNames as $archiveName ) {
-                                               $purgeUrls[] = $file->getArchiveUrl( $archiveName );
+                                               $purgeUrls[] = $that->getArchiveUrl( $archiveName );
                                        }
                                        SquidUpdate::purge( $purgeUrls );
                                }
@@ -1793,7 +1801,7 @@ class LocalFile extends File {
                                        array( 'img_sha1' => $this->sha1 ),
                                        array( 'img_name' => $this->getName() ),
                                        __METHOD__ );
-                               $this->saveToCache();
+                               $this->invalidateCache();
                        }
 
                        $this->unlock(); // done
index 593a303..e83b478 100644 (file)
        "config-upload-deleted": "*Directorio para los archivos eliminados:",
        "config-upload-deleted-help": "Elige un directorio en el que guardar los archivos eliminados.\nLo ideal es una carpeta no accesible desde la red.",
        "config-logo": "URL del logo :",
-       "config-logo-help": "La apariencia por defecto de MediaWiki incluye espacio para un logotipo de 135x160 píxeles encima del menú de la barra lateral.\nCargua una imagen de tamaño adecuado e introduce la dirección URL aquí.\n\nPuedes usar <code>$wgStylePath</code> o <code>$wgScriptPath</code> si tu logotipo es relativo a esas rutas.\n\nSi no deseas un logotipo, deja esta casilla en blanco.",
+       "config-logo-help": "La apariencia predeterminada de MediaWiki incluye espacio para un logotipo de 135x160 píxeles encima del menú de la barra lateral.\nCarga una imagen de tamaño adecuado y escribe la dirección URL aquí.\n\nPuedes usar <code>$wgStylePath</code> o <code>$wgScriptPath</code> si tu logotipo es relativo a esas rutas.\n\nSi no deseas un logotipo, deja esta casilla en blanco.",
        "config-instantcommons": "Habilitar Instant Commons",
        "config-instantcommons-help": "[//www.mediawiki.org/wiki/InstantCommons Instant Commons] es una característica que permite que los wikis puedan utilizar imágenes, sonidos y otros archivos multimedia que se encuentran en el sitio [//commons.wikimedia.org/ Wikimedia Commons].\nPara ello, MediaWiki requiere acceso a Internet.\n\nPara obtener más información sobre esta función, incluidas las instrucciones sobre cómo configurarlo para otras wikis distintas de Wikimedia Commons, consulte [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgForeignFileRepos el manual].",
        "config-cc-error": "El selector de licencia de Creative Commons no dio resultado.\nEscribe el nombre de la licencia manualmente.",
index 7df85ff..fd4234d 100644 (file)
@@ -548,35 +548,6 @@ abstract class JobQueue {
        protected function doWaitForBackups() {
        }
 
-       /**
-        * Return a map of task names to task definition maps.
-        * A "task" is a fast periodic queue maintenance action.
-        * Mutually exclusive tasks must implement their own locking in the callback.
-        *
-        * Each task value is an associative array with:
-        *   - name     : the name of the task
-        *   - callback : a PHP callable that performs the task
-        *   - period   : the period in seconds corresponding to the task frequency
-        *
-        * @return array
-        */
-       final public function getPeriodicTasks() {
-               $tasks = $this->doGetPeriodicTasks();
-               foreach ( $tasks as $name => &$def ) {
-                       $def['name'] = $name;
-               }
-
-               return $tasks;
-       }
-
-       /**
-        * @see JobQueue::getPeriodicTasks()
-        * @return array
-        */
-       protected function doGetPeriodicTasks() {
-               return array();
-       }
-
        /**
         * Clear any process and persistent caches
         *
index b1b650b..491092a 100644 (file)
@@ -301,6 +301,12 @@ class JobQueueDB extends JobQueue {
                                $job->metadata['id'] = $row->job_id;
                                break; // done
                        } while ( true );
+
+                       if ( !$job || mt_rand( 0, 9 ) == 0 ) {
+                               // Handled jobs that need to be recycled/deleted;
+                               // any recycled jobs will be picked up next attempt
+                               $this->recycleAndDeleteStaleJobs();
+                       }
                } catch ( DBError $e ) {
                        $this->throwDBException( $e );
                }
@@ -471,6 +477,8 @@ class JobQueueDB extends JobQueue {
                        // Delete a row with a single DELETE without holding row locks over RTTs...
                        $dbw->delete( 'job',
                                array( 'job_cmd' => $this->type, 'job_id' => $job->metadata['id'] ), __METHOD__ );
+
+                       JobQueue::incrStats( 'job-ack', $this->type );
                } catch ( DBError $e ) {
                        $this->throwDBException( $e );
                }
@@ -535,18 +543,6 @@ class JobQueueDB extends JobQueue {
                wfWaitForSlaves( false, $this->wiki, $this->cluster ?: false );
        }
 
-       /**
-        * @return array
-        */
-       protected function doGetPeriodicTasks() {
-               return array(
-                       'recycleAndDeleteStaleJobs' => array(
-                               'callback' => array( $this, 'recycleAndDeleteStaleJobs' ),
-                               'period' => ceil( $this->claimTTL / 2 )
-                       )
-               );
-       }
-
        /**
         * @return void
         */
@@ -589,6 +585,10 @@ class JobQueueDB extends JobQueue {
 
        protected function doGetSiblingQueuesWithJobs( array $types ) {
                $dbr = $this->getSlaveDB();
+               // @note: this does not check whether the jobs are claimed or not.
+               // This is useful so JobQueueGroup::pop() also sees queues that only
+               // have stale jobs. This lets recycleAndDeleteStaleJobs() re-enqueue
+               // failed jobs so that they can be popped again for that edge case.
                $res = $dbr->select( 'job', 'DISTINCT job_cmd',
                        array( 'job_cmd' => $types ), __METHOD__ );
 
index b86819e..a35ab84 100644 (file)
@@ -373,18 +373,6 @@ class JobQueueFederated extends JobQueue {
                $this->throwErrorIfAllPartitionsDown( $failed );
        }
 
-       protected function doGetPeriodicTasks() {
-               $tasks = array();
-               /** @var JobQueue $queue */
-               foreach ( $this->partitionQueues as $partition => $queue ) {
-                       foreach ( $queue->getPeriodicTasks() as $task => $def ) {
-                               $tasks["{$partition}:{$task}"] = $def;
-                       }
-               }
-
-               return $tasks;
-       }
-
        protected function doFlushCaches() {
                /** @var JobQueue $queue */
                foreach ( $this->partitionQueues as $queue ) {
index ebd547a..fdf7b87 100644 (file)
@@ -341,69 +341,6 @@ class JobQueueGroup {
                return $this->coalescedQueues;
        }
 
-       /**
-        * Execute any due periodic queue maintenance tasks for all queues.
-        *
-        * A task is "due" if the time ellapsed since the last run is greater than
-        * the defined run period. Concurrent calls to this function will cause tasks
-        * to be attempted twice, so they may need their own methods of mutual exclusion.
-        *
-        * @return int Number of tasks run
-        */
-       public function executeReadyPeriodicTasks() {
-               global $wgMemc;
-
-               list( $db, $prefix ) = wfSplitWikiID( $this->wiki );
-               $key = wfForeignMemcKey( $db, $prefix, 'jobqueuegroup', 'taskruns', 'v1' );
-               $lastRuns = $wgMemc->get( $key ); // (queue => task => UNIX timestamp)
-
-               $count = 0;
-               $tasksRun = array(); // (queue => task => UNIX timestamp)
-               foreach ( $this->getQueueTypes() as $type ) {
-                       $queue = $this->get( $type );
-                       foreach ( $queue->getPeriodicTasks() as $task => $definition ) {
-                               if ( $definition['period'] <= 0 ) {
-                                       continue; // disabled
-                               } elseif ( !isset( $lastRuns[$type][$task] )
-                                       || $lastRuns[$type][$task] < ( time() - $definition['period'] )
-                               ) {
-                                       try {
-                                               if ( call_user_func( $definition['callback'] ) !== null ) {
-                                                       $tasksRun[$type][$task] = time();
-                                                       ++$count;
-                                               }
-                                       } catch ( JobQueueError $e ) {
-                                               MWExceptionHandler::logException( $e );
-                                       }
-                               }
-                       }
-               }
-
-               if ( $count === 0 ) {
-                       return $count; // nothing to update
-               }
-
-               $wgMemc->merge( $key, function ( $cache, $key, $lastRuns ) use ( $tasksRun ) {
-                       if ( is_array( $lastRuns ) ) {
-                               foreach ( $tasksRun as $type => $tasks ) {
-                                       foreach ( $tasks as $task => $timestamp ) {
-                                               if ( !isset( $lastRuns[$type][$task] )
-                                                       || $timestamp > $lastRuns[$type][$task]
-                                               ) {
-                                                       $lastRuns[$type][$task] = $timestamp;
-                                               }
-                                       }
-                               }
-                       } else {
-                               $lastRuns = $tasksRun;
-                       }
-
-                       return $lastRuns;
-               } );
-
-               return $count;
-       }
-
        /**
         * @param string $name
         * @return mixed
index f1de76c..7edb6ad 100644 (file)
@@ -389,6 +389,8 @@ LUA;
 
                                return false;
                        }
+
+                       JobQueue::incrStats( 'job-ack', $this->type );
                } catch ( RedisException $e ) {
                        $this->throwRedisException( $conn, $e );
                }
index 0948092..6bf33aa 100644 (file)
@@ -103,23 +103,16 @@ class JobRunner implements LoggerAwareInterface {
                        return $response;
                }
 
-               $group = JobQueueGroup::singleton();
-               // Handle any required periodic queue maintenance
-               $count = $group->executeReadyPeriodicTasks();
-               if ( $count > 0 ) {
-                       $msg = "Executed $count periodic queue task(s).";
-                       $this->logger->debug( $msg );
-                       $this->debugCallback( $msg );
-               }
-
                // Bail out if in read-only mode
                if ( wfReadOnly() ) {
                        $response['reached'] = 'read-only';
                        return $response;
                }
 
+               $profiler = Profiler::instance();
+
                // Catch huge single updates that lead to slave lag
-               $trxProfiler = Profiler::instance()->getTransactionProfiler();
+               $trxProfiler = $profiler->getTransactionProfiler();
                $trxProfiler->setLogger( LoggerFactory::getInstance( 'DBPerformance' ) );
                $trxProfiler->setExpectations( $wgTrxProfilerLimits['JobRunner'], __METHOD__ );
 
@@ -132,6 +125,8 @@ class JobRunner implements LoggerAwareInterface {
                        return $response;
                }
 
+               $group = JobQueueGroup::singleton();
+               
                // Flush any pending DB writes for sanity
                wfGetLBFactory()->commitMasterChanges();
 
@@ -175,10 +170,11 @@ class JobRunner implements LoggerAwareInterface {
                                }
 
                                $msg = $job->toString() . " STARTING";
-                               $this->logger->info( $msg );
+                               $this->logger->debug( $msg );
                                $this->debugCallback( $msg );
 
                                // Run the job...
+                               $psection = $profiler->scopedProfileIn( __METHOD__ . '-' . $jType );
                                $jobStartTime = microtime( true );
                                try {
                                        ++$jobsRun;
@@ -193,6 +189,7 @@ class JobRunner implements LoggerAwareInterface {
                                }
                                $timeMs = intval( ( microtime( true ) - $jobStartTime ) * 1000 );
                                $timeMsTotal += $timeMs;
+                               $profiler->scopedProfileOut( $psection );
 
                                // Mark the job as done on success or when the job cannot be retried
                                if ( $status !== false || !$job->allowRetries() ) {
index 1252b0b..749913a 100644 (file)
@@ -37,6 +37,8 @@
 class RefreshLinksJob extends Job {
        const PARSE_THRESHOLD_SEC = 1.0;
 
+       const CLOCK_FUDGE = 10;
+
        function __construct( $title, $params = '' ) {
                parent::__construct( 'refreshLinks', $title, $params );
                // A separate type is used just for cascade-protected backlinks
@@ -140,22 +142,38 @@ class RefreshLinksJob extends Job {
 
                $parserOutput = false;
                $parserOptions = $page->makeParserOptions( 'canonical' );
-               // If page_touched changed after this root job (with a good slave lag skew factor),
-               // then it is likely that any views of the pages already resulted in re-parses which
-               // are now in cache. This can be reused to avoid expensive parsing in some cases.
+               // If page_touched changed after this root job, then it is likely that
+               // any views of the pages already resulted in re-parses which are now in
+               // cache. The cache can be reused to avoid expensive parsing in some cases.
                if ( isset( $this->params['rootJobTimestamp'] ) ) {
-                       $skewedTimestamp = wfTimestamp( TS_UNIX, $this->params['rootJobTimestamp'] ) + 5;
-                       if ( $page->getLinksTimestamp() > wfTimestamp( TS_MW, $skewedTimestamp ) ) {
+                       $opportunistic = !empty( $this->params['isOpportunistic'] );
+
+                       $skewedTimestamp = $this->params['rootJobTimestamp'];
+                       if ( $opportunistic ) {
+                               // Neither clock skew nor DB snapshot/slave lag matter much for such
+                               // updates; focus on reusing the (often recently updated) cache
+                       } else {
+                               // For transclusion updates, the template changes must be reflected
+                               $skewedTimestamp = wfTimestamp( TS_MW,
+                                       wfTimestamp( TS_UNIX, $skewedTimestamp ) + self::CLOCK_FUDGE
+                               );
+                       }
+
+                       if ( $page->getLinksTimestamp() > $skewedTimestamp ) {
                                // Something already updated the backlinks since this job was made
                                return true;
                        }
-                       if ( $page->getTouched() > wfTimestamp( TS_MW, $skewedTimestamp ) ) {
+
+                       if ( $page->getTouched() >= $skewedTimestamp || $opportunistic ) {
+                               // Something bumped page_touched since this job was made
+                               // or the cache is otherwise suspected to be up-to-date
                                $parserOutput = ParserCache::singleton()->getDirty( $page, $parserOptions );
-                               if ( $parserOutput && $parserOutput->getCacheTime() <= $skewedTimestamp ) {
+                               if ( $parserOutput && $parserOutput->getCacheTime() < $skewedTimestamp ) {
                                        $parserOutput = false; // too stale
                                }
                        }
                }
+
                // Fetch the current revision and parse it if necessary...
                if ( $parserOutput == false ) {
                        $start = microtime( true );
index 0b6db32..a0230be 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Cache
  */
+use Wikimedia\Assert\Assert;
 
 /**
  * Handles a simple LRU key/value map with a maximum number of entries
@@ -41,9 +42,9 @@ class MapCacheLRU {
         * @throws Exception When $maxCacheKeys is not an int or =< 0.
         */
        public function __construct( $maxKeys ) {
-               if ( !is_int( $maxKeys ) || $maxKeys < 1 ) {
-                       throw new Exception( __METHOD__ . " must be given an integer and >= 1" );
-               }
+               Assert::parameterType( 'integer', $maxKeys, '$maxKeys' );
+               Assert::parameter( $maxKeys >= 1, '$maxKeys', 'must be >= 1' );
+
                $this->maxCacheKeys = $maxKeys;
        }
 
index 8d80eb3..b55ff9d 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Cache
  */
+use Wikimedia\Assert\Assert;
 
 /**
  * Handles per process caching of items
@@ -128,9 +129,9 @@ class ProcessCacheLRU {
         * @throws UnexpectedValueException
         */
        public function resize( $maxKeys ) {
-               if ( !is_int( $maxKeys ) || $maxKeys < 1 ) {
-                       throw new UnexpectedValueException( __METHOD__ . " must be given an integer >= 1" );
-               }
+               Assert::parameterType( 'integer', $maxKeys, '$maxKeys' );
+               Assert::parameter( $maxKeys >= 1, '$maxKeys', 'must be >= 1' );
+
                $this->maxCacheKeys = $maxKeys;
                while ( count( $this->cache ) > $this->maxCacheKeys ) {
                        reset( $this->cache );
index 21a09e6..0ca0f2e 100755 (executable)
@@ -74,6 +74,9 @@ class WANObjectCache {
        /** Seconds to keep lock keys around */
        const LOCK_TTL = 5;
 
+       /** Idiom for set()/getWithSetCallback() TTL */
+       const TTL_NONE = 0;
+
        /** Cache format version number */
        const VERSION = 1;
 
@@ -263,6 +266,8 @@ class WANObjectCache {
        /**
         * Fetch the value of a timestamp "check" key
         *
+        * Note that "check" keys won't collide with other regular keys
+        *
         * @param string $key
         * @return float|bool TS_UNIX timestamp of the key; false if not present
         */
@@ -283,6 +288,8 @@ class WANObjectCache {
         * avoid race conditions where dependent keys get updated with a
         * stale value (e.g. from a DB slave).
         *
+        * Note that "check" keys won't collide with other regular keys
+        *
         * @see WANObjectCache::get()
         *
         * @param string $key Cache key
index 5b57952..749ef23 100644 (file)
@@ -376,29 +376,55 @@ class DjVuHandler extends ImageHandler {
        }
 
        function pageCount( $image ) {
-               $tree = $this->getMetaTree( $image );
-               if ( !$tree ) {
-                       return false;
+               global $wgMemc;
+
+               $key = wfMemcKey( 'file-djvu', 'pageCount', $image->getSha1() );
+
+               $count = $wgMemc->get( $key );
+               if ( $count === false ) {
+                       $tree = $this->getMetaTree( $image );
+                       if ( !$tree ) {
+                               return false;
+                       }
+                       $count = count( $tree->xpath( '//OBJECT' ) );
+                       $wgMemc->set( $key, $count );
                }
 
-               return count( $tree->xpath( '//OBJECT' ) );
+               return $count;
        }
 
        function getPageDimensions( $image, $page ) {
-               $tree = $this->getMetaTree( $image );
-               if ( !$tree ) {
-                       return false;
-               }
+               global $wgMemc;
 
-               $o = $tree->BODY[0]->OBJECT[$page - 1];
-               if ( $o ) {
-                       return array(
-                               'width' => intval( $o['width'] ),
-                               'height' => intval( $o['height'] )
-                       );
-               } else {
-                       return false;
+               $key = wfMemcKey( 'file-djvu', 'dimensions', $image->getSha1() );
+
+               $dimsByPage = $wgMemc->get( $key );
+               if ( !is_array( $dimsByPage ) ) {
+                       $tree = $this->getMetaTree( $image );
+                       if ( !$tree ) {
+                               return false;
+                       }
+
+                       $dimsByPage = array();
+                       $count = count( $tree->xpath( '//OBJECT' ) );
+                       for ( $i = 0; $i < $count; ++$i ) {
+                               $o = $tree->BODY[0]->OBJECT[$i];
+                               if ( $o ) {
+                                       $dimsByPage[$i] = array(
+                                               'width' => (int)$o['width'],
+                                               'height' => (int)$o['height']
+                                       );
+                               } else {
+                                       $dimsByPage[$i] = false;
+                               }
+                       }
+
+                       $wgMemc->set( $key, $dimsByPage );
                }
+
+               $index = $page - 1; // MW starts pages at 1
+
+               return isset( $dimsByPage[$index] ) ? $dimsByPage[$index] : false;
        }
 
        /**
index cc182a4..7b33b02 100644 (file)
@@ -3411,6 +3411,9 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Check if the last link refresh was before page_touched
                if ( $this->getLinksTimestamp() < $this->getTouched() ) {
+                       $params['isOpportunistic'] = true;
+                       $params['rootJobTimestamp'] = $parserOutput->getCacheTime();
+
                        JobQueueGroup::singleton()->push( EnqueueJob::newFromLocalJobs(
                                new JobSpecification( 'refreshLinks', $params,
                                        array( 'removeDuplicates' => true ), $this->mTitle )
index ace63a0..27de039 100644 (file)
@@ -1279,6 +1279,10 @@ class Parser {
 
                $text = $this->mStripState->unstripGeneral( $text );
 
+               if ( $isMain ) {
+                       Hooks::run( 'ParserAfterUnstrip', array( &$this, &$text ) );
+               }
+
                # Clean up special characters, only run once, next-to-last before doBlockLevels
                $fixtags = array(
                        # french spaces, last one Guillemet-left
index 51ae42d..7e38acc 100644 (file)
@@ -144,7 +144,11 @@ class StripState {
                        }
                        $this->circularRefGuard[$marker] = true;
                        $this->recursionLevel++;
-                       $ret = $this->unstripType( $this->tempType, $this->data[$this->tempType][$marker] );
+                       $value = $this->data[$this->tempType][$marker];
+                       if ( $value instanceof Closure ) {
+                               $value = $value();
+                       }
+                       $ret = $this->unstripType( $this->tempType, $value );
                        $this->recursionLevel--;
                        unset( $this->circularRefGuard[$marker] );
                        return $ret;
index 3f4d58b..46d6119 100644 (file)
@@ -254,10 +254,14 @@ class TransactionProfiler implements LoggerAwareInterface {
                        $this->logger->info( "Detected no transaction for '$name' - out of sync." );
                        return;
                }
+
+               $slow = false;
+
                // Warn if too much time was spend writing...
                if ( $writeTime > $this->expect['writeQueryTime'] ) {
                        $this->reportExpectationViolated( 'writeQueryTime',
                                "[transaction $id writes to {$server} ({$db})]" );
+                       $slow = true;
                }
                // Fill in the last non-query period...
                $lastQuery = end( $this->dbTrxMethodTimes[$name] );
@@ -269,7 +273,6 @@ class TransactionProfiler implements LoggerAwareInterface {
                        }
                }
                // Check for any slow queries or non-query periods...
-               $slow = false;
                foreach ( $this->dbTrxMethodTimes[$name] as $info ) {
                        $elapsed = ( $info[2] - $info[1] );
                        if ( $elapsed >= $this->dbLockThreshold ) {
index 4b9a754..23a2993 100644 (file)
@@ -152,8 +152,10 @@ class ExtensionProcessor implements Processor {
 
        protected function extractHooks( array $info ) {
                if ( isset( $info['Hooks'] ) ) {
-                       foreach ( $info['Hooks'] as $name => $callable ) {
-                               $this->globals['wgHooks'][$name][] = $callable;
+                       foreach ( $info['Hooks'] as $name => $value ) {
+                               foreach ( (array)$value as $callback ) {
+                                       $this->globals['wgHooks'][$name][] = $callback;
+                               }
                        }
                        $this->processed[] = 'Hooks';
                }
index ce18c32..8c9c130 100644 (file)
@@ -805,14 +805,14 @@ class ResourceLoader {
                        if ( $this->tryRespondLastModified( $context, $ts ) ) {
                                return false; // output handled (buffers cleared)
                        }
+                       // Send content type and cache headers
+                       $this->sendResponseHeaders( $context, $ts, false );
+                       $response = $fileCache->fetchText();
                        // Capture any PHP warnings from the output buffer and append them to the
                        // response in a comment if we're in debug mode.
                        if ( $context->getDebug() && strlen( $warnings = ob_get_contents() ) ) {
-                               $response = "/*\n$warnings\n*/\n" . $response;
+                               $response = self::makeComment( $warnings ) . $response;
                        }
-                       // Send content type and cache headers
-                       $this->sendResponseHeaders( $context, $ts, false );
-                       $response = $fileCache->fetchText();
                        // Remove the output buffer and output the response
                        ob_end_clean();
                        echo $response . "\n/* Cached {$ts} */";
index c2cd812..6b918e9 100644 (file)
@@ -724,7 +724,6 @@ class ContribsPager extends ReverseChronologicalPager {
                        $limit,
                        $descending
                );
-               $pager = $this;
 
                /*
                 * This hook will allow extensions to add in additional queries, so they can get their data
@@ -749,7 +748,7 @@ class ContribsPager extends ReverseChronologicalPager {
                ) );
                Hooks::run(
                        'ContribsPager::reallyDoQuery',
-                       array( &$data, $pager, $offset, $limit, $descending )
+                       array( &$data, $this, $offset, $limit, $descending )
                );
 
                $result = array();
index 9e4bbbe..387c174 100644 (file)
@@ -88,15 +88,13 @@ class DeletedContribsPager extends IndexPager {
         * @return ResultWrapper
         */
        function reallyDoQuery( $offset, $limit, $descending ) {
-               $pager = $this;
-
                $data = array( parent::reallyDoQuery( $offset, $limit, $descending ) );
 
                // This hook will allow extensions to add in additional queries, nearly
                // identical to ContribsPager::reallyDoQuery.
                Hooks::run(
                        'DeletedContribsPager::reallyDoQuery',
-                       array( &$data, $pager, $offset, $limit, $descending )
+                       array( &$data, $this, $offset, $limit, $descending )
                );
 
                $result = array();
index 5cac347..a0f3b6f 100644 (file)
@@ -21,6 +21,7 @@
  * @license GPL 2+
  * @author Daniel Kinzler
  */
+use Wikimedia\Assert\Assert;
 
 /**
  * Represents a page (or page fragment) title within %MediaWiki.
@@ -67,26 +68,13 @@ class TitleValue {
         * @throws InvalidArgumentException
         */
        public function __construct( $namespace, $dbkey, $fragment = '' ) {
-               if ( !is_int( $namespace ) ) {
-                       throw new InvalidArgumentException( '$namespace must be an integer' );
-               }
-
-               if ( !is_string( $dbkey ) ) {
-                       throw new InvalidArgumentException( '$dbkey must be a string' );
-               }
+               Assert::parameterType( 'integer', $namespace, '$namespace' );
+               Assert::parameterType( 'string', $dbkey, '$dbkey' );
+               Assert::parameterType( 'string', $fragment, '$fragment' );
 
                // Sanity check, no full validation or normalization applied here!
-               if ( preg_match( '/^_|[ \r\n\t]|_$/', $dbkey ) ) {
-                       throw new InvalidArgumentException( '$dbkey must be a valid DB key: ' . $dbkey );
-               }
-
-               if ( !is_string( $fragment ) ) {
-                       throw new InvalidArgumentException( '$fragment must be a string' );
-               }
-
-               if ( $dbkey === '' ) {
-                       throw new InvalidArgumentException( '$dbkey must not be empty' );
-               }
+               Assert::parameter( !preg_match( '/^_|[ \r\n\t]|_$/', $dbkey ), '$dbkey', 'invalid DB key' );
+               Assert::parameter( $dbkey !== '', '$dbkey', 'should not be empty' );
 
                $this->namespace = $namespace;
                $this->dbkey = $dbkey;
index 9241587..cb32357 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @author Aaron Schulz
  */
+use Wikimedia\Assert\Assert;
 
 /**
  * Class for getting statistically unique IDs
@@ -107,9 +108,10 @@ class UIDGenerator {
         * @throws MWException
         */
        public static function newTimestampedUID88( $base = 10 ) {
-               if ( !is_integer( $base ) || $base > 36 || $base < 2 ) {
-                       throw new MWException( "Base must an integer be between 2 and 36" );
-               }
+               Assert::parameterType( 'integer', $base, '$base' );
+               Assert::parameter( $base <= 36, '$base', 'must be <= 36' );
+               Assert::parameter( $base >= 2, '$base', 'must be >= 2' );
+
                $gen = self::singleton();
                $time = $gen->getTimestampAndDelay( 'lockFile88', 1, 1024 );
 
@@ -152,9 +154,10 @@ class UIDGenerator {
         * @throws MWException
         */
        public static function newTimestampedUID128( $base = 10 ) {
-               if ( !is_integer( $base ) || $base > 36 || $base < 2 ) {
-                       throw new MWException( "Base must be an integer between 2 and 36" );
-               }
+               Assert::parameterType( 'integer', $base, '$base' );
+               Assert::parameter( $base <= 36, '$base', 'must be <= 36' );
+               Assert::parameter( $base >= 2, '$base', 'must be >= 2' );
+
                $gen = self::singleton();
                $time = $gen->getTimestampAndDelay( 'lockFile128', 16384, 1048576 );
 
index 2f9e747..e88507f 100644 (file)
        "querypage-disabled": "Ista pachina especial ye desactivata por motivos de rendimiento.",
        "booksources": "Fuents de libros",
        "booksources-search-legend": "Mirar fuents de libros",
+       "booksources-search": "Mirar",
        "booksources-text": "Contino ye una lista de vinclos ta atros puestos an que venden libros nuevos y usatos, talment bi haiga más información sobre os libros que ye mirando.",
        "booksources-invalid-isbn": "O numero d'ISBN dato pareix que no ye conforme; comprebe si no bi ha garra error en copiar d'a fuent orichinal.",
        "specialloguserlabel": "Fedor:",
index d6c3c4d..ef82495 100644 (file)
        "title-invalid-utf8": "Запытаная назва старонкі ўтрымлівае няслушныя сымбалі UTF-8.",
        "title-invalid-interwiki": "Назва ўтрымлівае інтэрвікі-спасылку",
        "title-invalid-talk-namespace": "Запытаная назва старонкі адпавядае старонцы абмеркаваньня, якая ня можа існаваць.",
+       "title-invalid-characters": "Запытаная назва старонкі ўтрымлівае няслушныя сымбалі: «$1».",
+       "title-invalid-relative": "Назва мае адносны шлях. Адносныя назвы старонак (./, ../) няслушныя, бо яны часта робяцца недаступнымі, калі апрацоўваюцца браўзэрам карыстальніка.",
+       "title-invalid-magic-tilde": "Запытаная назва старонкі ўтрымлівае недазволенае спалучэньне тыльдаў (<nowiki>~~~</nowiki>).",
+       "title-invalid-too-long": "Запытаная назва старонкі занадта доўгая. Яна ня мусіць быць даўжэй за $1 байтаў у кадаваньні UTF-8.",
        "perfcached": "Наступныя зьвесткі кэшаваныя і могуць быць састарэлымі. У кэшы {{PLURAL:$1|даступны|даступныя}} ня больш за $1 {{PLURAL:$1|вынік|вынікі|вынікаў}}.",
        "perfcachedts": "Наступныя зьвесткі кэшаваныя і апошні раз былі абноўленыя $1. У кэшы {{PLURAL:$4|даступны|даступныя}} ня больш за $4 {{PLURAL:$4|вынік|вынікі|вынікаў}}.",
        "querypage-no-updates": "Абнаўленьні гэтай старонкі цяпер адключаныя. Зьвесткі ня будуць абнаўляцца.",
index 32ca11e..29ab958 100644 (file)
        "missingcommentheader": "'''Дагадаийтар.''' Ахьа хӀокху къамелан дӀахьедар/корта билгал бина бац. Кнопка «{{int:savearticle}}» юху тӀетаӀича хийцамах лаьцна хӀума доцуш Ӏалашбира бу.",
        "summary-preview": "Цуьнах лаьцна хирду:",
        "subject-preview": "Коьрта могӀа хира бу:",
+       "previewerrortext": "Хьан хийцамашка хьалха хьажа гӀертачу хенахь гӀалат даьлла.",
        "blockedtitle": "Декъашхочун блоктоьхана",
        "blockedtext": "'''Хьан декъашхочун дӀаяздар я IP-адрес блоктоьхна ду.'''\n\nБлоктоьхна куьйгалхочо $1.\nБилгалдина бахьна: «''$2''».\n\n* Блоктохар доладелла: $8\n* Блоктохар чекхдолу: $6\n* Блоктохаран Ӏалашо: $7\n\nХьа йиш ю $1 декъашхочуьнга дехардан я кхечу муьлха [[{{MediaWiki:Grouppage-sysop}}|куьйгалхочуьнга]].\nТергам бе, хьа таро яц «декъашхочунга кехат» олу функци лелаян, хьан [[Special:Preferences|гӀирс нисбар чохь]] нийса электронан поштан адрес яздина дацахь, я кехаташ кхехӀитарна а блоктоьхна елахь.\nХьан IP-адрес — $3, блоктохаран идентификатор — $5.\nДехар до, хьайн хаам чохь билгалде и.",
        "blockednoreason": "бахьана билгалдина дац",
index 2b7417e..d3de755 100644 (file)
        "import-logentry-upload-detail": "$1 {{PLURAL:$1|Version|Versionen}} importiert",
        "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|Version|Versionen}} von $2 importiert",
        "javascripttest": "JavaScript-Test",
-       "javascripttest-pagetext-noframework": "Diese Seite ist JavaSkript-Tests vorbehalten.",
+       "javascripttest-pagetext-noframework": "Diese Seite ist JavaScript-Tests vorbehalten.",
        "javascripttest-pagetext-unknownframework": "Unbekanntes Framework „$1“.",
        "javascripttest-pagetext-unknownaction": "Unbekannte Aktion „$1“.",
        "javascripttest-pagetext-frameworks": "Bitte wähle eine der folgenden Prüfumgebungen aus: $1",
index 2da98f7..0c235a1 100644 (file)
        "no-null-revision": "No se pudo crear una nueva revisión nula para la página «$1»",
        "badtitle": "Título incorrecto",
        "badtitletext": "El título de la página solicitada está vacío, no es válido, o es un enlace interidioma o interwiki incorrecto.\nPuede que contenga uno o más caracteres que no se pueden usar en los títulos.",
+       "title-invalid-interwiki": "El título contiene un enlace interwiki",
+       "title-invalid-characters": "El título  de la página solicitada contiene caracteres no válidos: \"$1\".",
+       "title-invalid-leading-colon": "El título de la página solicitada contiene un caracater (:) no válido en el comienzo.",
        "perfcached": "Los siguientes datos provienen de la caché y pueden no estar actualizados. La caché puede contener {{PLURAL:$1|un resultado|$1 resultados}} como máximo.",
        "perfcachedts": "Los siguientes datos provienen de la caché, y fueron actualizados por última vez a fecha de: $1. La caché contiene {{PLURAL:$4|un resultado|$4 resultados}} como máximo.",
        "querypage-no-updates": "Actualmente las actualizaciones de esta página están desactivadas. Estos datos no serán actualizados a corto plazo.",
        "linksearch-pat": "Patrón de búsqueda:",
        "linksearch-ns": "Espacio de nombre:",
        "linksearch-ok": "Buscar",
-       "linksearch-text": "Se pueden usar caracteres comodín como \"*.wikipedia.org\".\nEs necesario, por lo menos, un dominio de alto nivel, por ejemplo \"*.org\".<br />\n{{PLURAL:$2|Protocolo|Protocolos}} soportados: <code>$1</code> (si no se especifica ninguno, el protocolo por defecto es http://).",
+       "linksearch-text": "Se pueden usar caracteres comodín como \"*.wikipedia.org\".\nEs necesario, por lo menos, un dominio de alto nivel, por ejemplo \"*.org\".<br />\n{{PLURAL:$2|Protocolo soportado|Protocolos soportados}}: <code>$1</code> (si no se especifica ninguno, el predeterminado es http://).",
        "linksearch-line": "$1 enlazado desde $2",
        "linksearch-error": "Los comodines sólo pueden aparecer al principio del nombre de sitio.",
        "listusersfrom": "Mostrar usuarios que empiecen por:",
index 16b3f98..5a0be1b 100644 (file)
        "no-null-revision": "Nollamuokkausta sivulla \"$1\" ei voi tehdä",
        "badtitle": "Kelvoton sivun nimi",
        "badtitletext": "Pyytämäsi sivunimi oli virheellinen, tyhjä tai väärin linkitetty kieltenvälinen tai wikienvälinen nimi.\nSiinä saattaa olla yksi tai useampi sellainen merkki, jota ei voi käyttää sivujen nimissä.",
+       "title-invalid-empty": "Pyydetty sivunimi on tyhjä tai sisältää ainoastaan nimiavaruuden nimen.",
+       "title-invalid-utf8": "Pyydetyn sivun nimessä on kelvoton UTF–8-jakso.",
+       "title-invalid-interwiki": "Nimessä on kieltenvälinen linkki",
+       "title-invalid-talk-namespace": "Pyydetyn sivun nimi viittaa sellaiseen keskustelusivuun, jota ei voi olla olemassa.",
+       "title-invalid-characters": "Pyydetyn sivun nimessä on kelvottomia merkkejä: \"$1\".",
+       "title-invalid-relative": "Nimessä on suhteellinen polku. Suhteellisen polun (./, ../) sisältävät sivujen nimet eivät ole kelvollisia, koska ne eivät useinkaan toimi käyttäjien selaimissa.",
+       "title-invalid-magic-tilde": "Pyydetyn sivun nimessä on kelvoton taikamatojakso (<nowiki>~~~</nowiki>).",
+       "title-invalid-too-long": "Pyydetyn sivun nimi on liian pitkä. Se ei saa olla pitempi kuin $1 tavua käytettäessä UTF–8-koodausta.",
+       "title-invalid-leading-colon": "Pyydetyn sivun nimessä on kelvoton kaksoispiste nimen alussa.",
        "perfcached": "Nämä tiedot ovat välimuistista eivätkä välttämättä ole ajan tasalla. Välimuistissa on saatavilla enintään {{PLURAL:$1|yksi tulos|$1 tulosta}}.",
        "perfcachedts": "Nämä tiedot ovat välimuistista, ja ne on päivitetty viimeksi $1. Välimuistissa on saatavilla enintään {{PLURAL:$4|yksi tulos|$4 tulosta}}.",
        "querypage-no-updates": "Tämän sivun tietoja ei toistaiseksi päivitetä.",
index 9c13d6e..8bab518 100644 (file)
        "movepagetalktext": "La page de discussion associée, si présente, sera automatiquement renommée '''sauf si :'''\n* vous déplacez la page vers un autre espace de noms, ou\n* une page de discussion non vide existe déjà sous le nouveau nom, ou\n* vous décochez la case ci-dessous.\n\nDans ces cas-là, vous devrez renommer ou fusionner cette page de discussion manuellement si vous le désirez.",
        "movearticle": "Renommer la page :",
        "moveuserpage-warning": "'''Attention :''' Vous êtes sur le point de renommer une page d’utilisateur. Veuillez noter que seule la page sera renommée et que l’utilisateur '''ne''' sera '''pas''' renommé.",
-       "movecategorypage-warning": "<strong>Avertissement :</strong> Vous êtes sur le point de renommer une page de catégorie. Veuillez noter que seule la page sera renommée et que toutes les pages dans l'ancienne catégorie ne seront <em>pas</em> transférées dans la nouvelle.",
+       "movecategorypage-warning": "<strong>Avertissement :</strong> Vous êtes sur le point de renommer une page de catégorie. Veuillez noter que seule la catégorie sera renommée et <em>qu’aucune</em> des pages de l’ancienne catégorie ne sera transférée dans la nouvelle.",
        "movenologintext": "Pour pouvoir renommer une page, vous devez être [[Special:UserLogin|identifié{{GENDER:||e}}]] avec un compte utilisateur enregistré et d'ancienneté suffisante.",
        "movenotallowed": "Vous n'avez pas la permission de renommer les pages.",
        "movenotallowedfile": "Vous n'avez pas la permission de renommer les fichiers.",
index 1f1eaa6..3e796bd 100644 (file)
        "viewsource-title": "$1 forrásának megtekintése",
        "actionthrottled": "Művelet megszakítva",
        "actionthrottledtext": "A spamek elleni védekezés miatt nem végezheted el a műveletet túl sokszor egy adott időn belül, és te átlépted a megengedett határt. Próbálkozz újra néhány perc múlva.",
-       "protectedpagetext": "Ez egy védett lap, így nem végezhető rajta szerkesztés és más tevékenység",
+       "protectedpagetext": "Ez egy védett lap, így nem végezhető rajta szerkesztés és más tevékenység.",
        "viewsourcetext": "Megtekintheted és másolhatod a lap forrását:",
        "viewyourtext": "Megtekintheted és kimásolhatod a '''saját szerkesztéseidet''' az alábbi lapra:",
        "protectedinterface": "Ez a lap a szoftver felületéhez szolgáltat szöveget, és a visszaélések elkerülése miatt le van zárva.",
index f30174b..70c2c0a 100644 (file)
        "right-sendemail": "다른 사용자에게 이메일 보내기",
        "right-passwordreset": "비밀번호 재설정 이메일을 보기",
        "right-managechangetags": "데이터베이스에서 [[Special:Tags|태그]]를 만들거나 지우기",
+       "right-applychangetags": "자신이 편집할 때 [[Special:Tags|태그]]를 적용하기",
+       "right-changetags": "문서의 특정 판과 특정 기록 항목에 임의의 [[Special:Tags|태그]]를 추가하거나 제거하기",
        "newuserlogpage": "사용자 만들기 기록",
        "newuserlogpagetext": "사용자가 만들어진 기록입니다.",
        "rightslog": "사용자 권한 기록",
        "action-editmyprivateinfo": "자신의 개인정보 편집",
        "action-editcontentmodel": "문서의 콘텐츠 모델을 편집",
        "action-managechangetags": "데이터베이스에서 태그를 만들거나 지울",
+       "action-applychangetags": "당신이 편집할 때 태그를 적용하기",
+       "action-changetags": "문서의 특정 판과 특정 기록 항목에 임의의 태그를 추가하거나 제거하기",
        "nchanges": "$1개 {{PLURAL:$1|바뀜}}",
        "enhancedrc-since-last-visit": "{{PLURAL:$1|마지막 방문 이후}} $1개",
        "enhancedrc-history": "역사",
index 371f0eb..ea8ba2b 100644 (file)
        "disclaimers": "Джууаблылыкъны унамау",
        "disclaimerpage": "Project:Джууаблылыкъны унамау",
        "edithelp": "Тюрлендириуню юсюнден болушлукъ",
+       "helppage-top-gethelp": "Ангылатыу",
        "mainpage": "Баш бет",
        "mainpage-description": "Баш бет",
        "policy-url": "Project:Джорукъла",
index 72b80ee..399c403 100644 (file)
        "nospecialpagetext": "<strong>Rûpela taybet a te xwestî tune ye.</strong>\n\nHemû rûpelên taybet dikarin di [[Special:SpecialPages|lîsteya rûpelên taybet]] de werin dîtin.",
        "error": "Çewtî",
        "databaseerror": "Çewtiya bingeha daneyan",
+       "databaseerror-query": "Pirs: $1",
        "databaseerror-error": "Çewtî:$1",
        "laggedslavemode": "'''Zanibe:''' Dibe ku di vê rûpelê de rojanekirinên dawî nîn bin.",
        "readonly": "Bingeha daneyan hatiye girtin",
        "newpassword": "Şîfreya nû",
        "retypenew": "Şîfreya nû careke din binîvîse",
        "resetpass_submit": "Şîfreyê pêkbîne û têkeve",
-       "changepassword-success": "Şîfreya te hate guherandin! Niha tu tê qeydkirin...",
+       "changepassword-success": "Guhertine şîfreya te serkeftî bû!",
        "resetpass_forbidden": "Şîfre nikarin werin guhertin",
        "resetpass-submit-loggedin": "Şîfre biguherîne",
        "resetpass-submit-cancel": "Betal bike",
        "passwordreset-text-one": "Ji bo ji nû ve sazkirina şîfreyê vê formê dagire.",
        "passwordreset-legend": "Şîfreyê nû bike",
        "passwordreset-username": "Navê bikarhêner:",
+       "passwordreset-domain": "Domain:",
        "passwordreset-email": "Navnîşana E-nameyê:",
        "passwordreset-emailtitle": "Hûragahiyên hesab li ser {{SITENAME}}",
        "passwordreset-emailelement": "Navê bikarhêner:$1\nŞîfreya niha:$2",
        "changeemail-newemail": "Navnîşana E-nameya nû:",
        "changeemail-none": "(nîne)",
        "changeemail-submit": "E-nameyê biguherîne",
+       "resettokens": "Mifteya jê bibe",
+       "resettokens-legend": "Mifteya jê bibe",
        "bold_sample": "Nivîsa stûr",
        "bold_tip": "Nivîsa stûr",
        "italic_sample": "Nivîsa xwehr (îtalîk)",
        "histlegend": "Rênîşan: ({{int:cur}}) = cudahiya nav vê û versiyona niha, ({{int:last}}) = cudahiya nav vê û ya berî vê, '''{{int:minoreditletter}}''' = guhertina biçûk",
        "history-fieldset-title": "Li dîrokê bigere",
        "history-show-deleted": "Tenê yên jêbirî",
-       "histfirst": "Kevintirîn",
-       "histlast": "Nûtirîn",
+       "histfirst": "kevintirîn",
+       "histlast": "nûtirîn",
        "historysize": "({{PLURAL:$1|1 byte|$1 bytes}})",
        "historyempty": "(vala)",
        "history-feed-title": "Dîroka guhertoyê",
        "uploadtext": "Berê tu wêneyên nû bar bikî, ji bo dîtin an vedîtina wêneyên ku ji xwe hene binêre: [[Special:FileList|lîsteya wêneyên barkirî]]. Herwisa wêneyên ku hatine barkirin an jî jê birin li vir dikarî bibînî: [[Special:Log/upload|reşahîya barkirîyan]].\n\nYek ji lînkên jêr ji bo bikarhînana wêne an file'ê di gotarê de bikar bihîne:\n'''<nowiki>[[</nowiki>{{ns:file}}:File.jpg<nowiki>]]</nowiki>''',\n'''<nowiki>[[</nowiki>{{ns:file}}:File.png|alt text<nowiki>]]</nowiki>''',\nanjî ji bo file'ên dengî '''<nowiki>[[</nowiki>{{ns:media}}:File.ogg<nowiki>]]</nowiki>'''",
        "upload-permitted": "Cureyên pelan yên tên qebûlkirin: $1.",
        "upload-preferred": "Cureyên pelan yên tên xwestin: $1.",
-       "upload-prohibited": "Cureyên pelan yên qedexekirî: $1.",
+       "upload-prohibited": "{{PLURAL:$2|Cureyê|Cureyên}} pelan yên qedexekirî: $1.",
        "uploadlogpage": "Barkirina belgeyan",
        "filename": "Navê pelê",
        "filedesc": "Danasîn",
        "filetype-unwanted-type": "'''\".$1\"''' formatekî nexastî ye.\nFormat {{PLURAL:$3|yê tê|yên tên}} qebûlkirin {{PLURAL:$3|ev e|ev in}}: $2.",
        "filetype-banned-type": "'''\".$1\"''' formatekî qedexe ye.\nFormat {{PLURAL:$3|yê tê|yên tên}} xwestin {{PLURAL:$3|ev e|ev in}}: $2.",
        "filetype-missing": "Piştnavê pelê tune (wek \".jpg\").",
+       "filename-tooshort": "Navê dosyeye zêde kurte.",
+       "filetype-banned": "Dosyeyên bi vê cureye hatîye qedexekirin.",
+       "verification-error": "Ev dosye, rastandina dosyeye derbas nekir.",
        "unknown-error": "Çewtiyeke nenas pêk hat.",
        "large-file": "Mezinbûna pelê bila ji $1 ne mezintir be; ev pel $2 e.",
        "emptyfile": "Data'ya barkirî vala ye. Sedemê valabûnê belkî şaşnivîsek di navê data'yê da ye. Xêra xwe seke, ku tu rast dixazê vê data'yê barbikê.",
        "protectedpages-noredirect": "Beralîkirinan veşêre",
        "protectedpagesempty": "Niha ti rûpelên ku bi vê parametreyê parastî ne, tine ne.",
        "protectedpages-page": "Rûpel",
+       "protectedpages-reason": "Sedem",
        "protectedpages-unknown-timestamp": "Nenas",
        "protectedpages-unknown-performer": "Bikarhênera nenas",
        "protectedtitles": "Sernavên parastî",
index ed289f8..1c48612 100644 (file)
        "createacct-error": "Error in ratione creanda",
        "createaccounterror": "Rationem creare non potuit: $1",
        "nocookiesnew": "Ratio usoris creata est, sed conventum non apertum est. {{SITENAME}} ''Cookies'' utitur in usorum conventa aperiendo. Cookies tua debiles sunt. Eis potestatem fac, tum conventum aperi cum nomine usoris tesseraque tua nova.",
-       "nocookieslogin": "{{SITENAME}} ''Cookies'' utitur in usorum conventa aperiendo. Cookies tua debiles sunt. Eis potestatem fac, tum conare denuo.",
+       "nocookieslogin": "{{SITENAME}} ''Cookies'' in conventis collatorum aperiendis adhibentur. ''Cookies'' tua debilitata sunt. Eis potestatem fac, tum conare denuo.",
        "noname": "Nomen usoris ratum non designavisti.",
        "loginsuccesstitle": "Conventum prospere apertum est",
        "loginsuccess": "'''Apud {{grammar:accusative|{{SITENAME}}}} agnosceris nomine \"$1\".'''",
index 66a5e66..d06846d 100644 (file)
        "no-null-revision": "سی بلگه$1 وانئری خنثی نه راس بکید",
        "badtitle": "داسون گن",
        "badtitletext": "داسون بلگه حاسته بیه معتور نی،یا  یه گل مئن زونی یا مئن ویکی داسون غلطه.\nیه شایت د ور گرته یکی با یا بیشتر کاراکتریا نبوئه سی ای داسونیا وه کار گرته بوئن",
+       "title-invalid-empty": "داسون بلگه حاستنی حالیه یا فقط مینونه دار یه گل نوم یا نومجائه.",
+       "title-invalid-utf8": "داسون بلگه حاستنی مینونه دار یه گل نماجا UTF-8 نامعتوره.",
+       "title-invalid-interwiki": "داسون مینونه دار یه گل هوم پیوند مینجا ویکیه",
+       "title-invalid-talk-namespace": "داسون بلگه حاستنی وه یه گل بلگه چک چنه که نئیش هشاره میکه.",
+       "title-invalid-characters": "داسون بلگه حاستنی مینونه دار یه گل کاراکتر نامعتوره \"1$\" ه.",
+       "title-invalid-relative": "داسون یه گل مسیر هوم دنگ داره.داسون بلگه هوم دنگ(./, ../) نامعتوره، سی یه که ونو د گاتی که دوارته نیئر کاریار وه کار گرته بوئن نمیان د بلگه نمایشت دوارته نیئر.",
+       "title-invalid-magic-tilde": "داسون بلگه حاستنی مینونه دار یه گل نماجا جادویی نامعتوره(<nowiki>~~~</nowiki>).",
+       "title-invalid-too-long": "داسون بلگه حاستنی فره گپه. د حال و بار رازینه کاری UTF-8 انازه وه نواس د $1 بایت گپتر بوئه.",
+       "title-invalid-leading-colon": "داسون بلگه حاستنی مینونه دار یه گل کلون نامعتور د شرو کارشه.",
        "perfcached": "رسینه یا نهایی د ویرگه نهونی موکشت بینه و شایت هنی وه هنگوم سازی نبینه.بیشترونه {{جمی:$4|یه گل نتیجه|$4 یه گل نتیجه}} د ویرگه نهونی هان د دسرس.",
        "perfcachedts": "رسینه یا نهایی د ویرگه نهونی موکشت بینه و شایت هنی وه هنگوم سازی نبینه.بیشترونه {{جمی:$4|یه گل نتیجه|$4 یه گل نتیجه}} د ویرگه نهونی هان د دسرس.",
        "querypage-no-updates": "نبوئه ای بلگه وه هنگوم سازی با.\nرسینه یا ایچه تازه نبیه.",
        "import-interwiki-history": "ؤرداشتن ویرگار همه وانئریا سی ای بلگه",
        "import-interwiki-templates": "همه چوئه یا",
        "import-interwiki-submit": "وامین اوردن",
+       "import-mapping-default": "وامین اوردن جاگه یا پیش فرض",
+       "import-mapping-namespace": "وامین اوردن یه گل نومجا:",
+       "import-mapping-subpage": "وامین اوردن یه گل بلگه چی یه گل زیر بلگه:",
        "import-upload-filename": "نوم جانیا:",
        "import-comment": "ویر و باور:",
        "importtext": "لطف بکیت  جانیا نه د ویکی سرچشمه وا هومیاری [[Special:Export|اوزار وه در دئن]] بئریت.\nاوسه ونه د دسگایا خوتو اماییه کاری بکیت و ایچه ونه سوار بکیت.",
index 66f7f1e..56cabca 100644 (file)
@@ -22,7 +22,8 @@
                        "לערי ריינהארט",
                        "아라",
                        "Gaute",
-                       "Macofe"
+                       "Macofe",
+                       "Chameleon222"
                ]
        },
        "tog-underline": "Strek under lenkjer:",
        "currentrev": "Versjonen no",
        "currentrev-asof": "Versjonen no frå $1",
        "revisionasof": "Versjonen frå $1",
-       "revision-info": "Versjonen frå $1 av $2",
+       "revision-info": "Versjonen frå $1 av {{GENDER:$6|$2}}$7",
        "previousrevision": "← Eldre versjon",
        "nextrevision": "Nyare versjon →",
        "currentrevisionlink": "Versjonen no",
        "logentry-rights-rights": "$1 {{GENDER:$2|endra}} gruppemedlemskap for $3 frå $4 til $5",
        "logentry-rights-rights-legacy": "$1 {{GENDER:$2|endra}} gruppemedlemskap for $3",
        "logentry-rights-autopromote": "$1 vart automatisk {{GENDER:$2|forfremja}} frå $4 til $5",
+       "logentry-upload-upload": "$1 {{GENDER:$2|lasta opp}} $3",
        "rightsnone": "(ingen)",
        "revdelete-summary": "Samandrag",
        "feedback-adding": "Legg til attendemeldinga til sida...",
index 41a5b85..49de490 100644 (file)
        "no-null-revision": "Nie można utworzyć zerowej wersji strony \"$1\"",
        "badtitle": "Niepoprawny tytuł",
        "badtitletext": "Podano niepoprawny tytuł strony. Prawdopodobnie jest pusty lub zawiera znaki, których użycie jest zabronione.",
+       "title-invalid-empty": "Żądany tytuł strony jest pusty lub zawiera tylko nazwę przestrzeni nazw.",
+       "title-invalid-utf8": "Żądany tytuł strony zawiera błędny ciąg znaków UTF-8.",
        "title-invalid-interwiki": "Tytuł zawiera link interwiki",
+       "title-invalid-talk-namespace": "Żądany tytuł strony dotyczy strony dyskusji, która nie istnieje.",
+       "title-invalid-characters": "Żądany tytuł strony zawiera błędne znaki: \"$1\".",
+       "title-invalid-magic-tilde": "Żądany tytuł strony zawiera błędną, magiczną sekwencję tyld (<nowiki>~~~</nowiki>)",
        "perfcached": "Poniższe dane są kopią z pamięci podręcznej i mogą być nieaktualne. W pamięci podręcznej {{PLURAL:$1|znajduje|znajdują|znajduje}} się maksymalnie {{PLURAL:$1|jeden wynik|$1 wyniki|$1 wyników}}.",
        "perfcachedts": "Poniższe dane są kopią z pamięci podręcznej. Ostatnia aktualizacja odbyła się $1. W pamięci podręcznej {{PLURAL:$4|znajduje|znajdują|znajduje}} się maksymalnie {{PLURAL:$4|jeden wynik|$4 wyniki|$4 wyników}}.",
        "querypage-no-updates": "Uaktualnienia dla tej strony są obecnie wyłączone. Znajdujące się tutaj dane nie zostaną odświeżone.",
index e51d30f..fe26adf 100644 (file)
        "revdelete-edit-reasonlist": "Editar motivos de eliminação",
        "revdelete-offender": "Autor da revisão:",
        "suppressionlog": "Registro de supressões",
-       "suppressionlogtext": "Abaixo está uma lista das eliminações e bloqueios envolvendo conteúdo ocultado por administradores.\nVeja a [[Special:BlockList|lista de bloqueios]] para uma lista de banimentos e bloqueios em efeito neste momento.",
+       "suppressionlogtext": "Abaixo está uma lista das eliminações e bloqueios envolvendo conteúdo ocultado para administradores.\nVeja a [[Special:BlockList|lista de bloqueios]] para uma lista de banimentos e bloqueios em efeito neste momento.",
        "mergehistory": "Fundir históricos das páginas",
        "mergehistory-header": "A partir desta página é possível fundir históricos de edições de uma página em outra.\nCertifique-se de que tal alteração manterá a continuidade das ações.",
        "mergehistory-box": "Fundir revisões de duas páginas:",
index 5d64a78..cd286ec 100644 (file)
        "feb": "Fev.",
        "mar": "Mar.",
        "apr": "Abr.",
-       "may": "Maio",
+       "may": "Mai.",
        "jun": "Jun.",
        "jul": "Jul.",
        "aug": "Ago.",
        "currentevents": "Notícias",
        "currentevents-url": "Project:Notícias",
        "disclaimers": "Exoneração de responsabilidade",
-       "disclaimerpage": "Project:Aviso_geral",
+       "disclaimerpage": "Project:Aviso geral",
        "edithelp": "Ajuda de edição",
        "helppage-top-gethelp": "Ajuda",
        "mainpage": "Página principal",
        "portal": "Portal comunitário",
        "portal-url": "Project:Portal comunitário",
        "privacy": "Política de privacidade",
-       "privacypage": "Project:Política_de_privacidade",
+       "privacypage": "Project:Política de privacidade",
        "badaccess": "Erro de permissão",
        "badaccess-group0": "Não está autorizado a executar a operação solicitada.",
        "badaccess-groups": "A operação solicitada está limitada a utilizadores {{PLURAL:$2|do grupo|de um dos seguintes grupos}}: $1.",
        "no-null-revision": "Não foi possível criar uma nova revisão nula para a página \"$1\"",
        "badtitle": "Título inválido",
        "badtitletext": "O título de página solicitado era inválido, vazio, ou a ligação interlínguas estava incorreta.\nTalvez contenha um ou mais caracteres que não podem ser usados em títulos.",
+       "title-invalid-empty": "O título da página solicitada está vazio ou contém apenas o nome de um domínio.",
+       "title-invalid-utf8": "O título da página solicitada contém uma sequência UTF-8 inválida.",
+       "title-invalid-interwiki": "O título contém uma ligação interna",
+       "title-invalid-talk-namespace": "O título da página solicitada refere-se a uma página de discussão que não existe.",
+       "title-invalid-characters": "O título da página solicitada contém carateres inválidos: \"$1\".",
+       "title-invalid-too-long": "O título da página solicitada é demasiado longo. Não deverá ser maior que $1 bytes na codificação UTF-8.",
        "perfcached": "Os seguintes dados encontram-se armazenados na ''cache'' e podem não estar atualizados. No máximo {{PLURAL:$1|um resultado é disponível|$1 resultados são disponíveis}} na ''cache''.",
        "perfcachedts": "Os seguintes dados encontram-se armazenados na ''cache'' e foram atualizados pela última vez a $1. No máximo {{PLURAL:$4|um resultado está disponível|$4 resultados estão disponíveis}} na ''cache''.",
        "querypage-no-updates": "As atualizações estão presentemente desativadas para esta página.\nPor enquanto, os dados aqui presentes não poderão ser atualizados.",
index fd58eea..b11cad1 100644 (file)
        "feedback-termsofuse": "Label with an agreement about the terms of use.",
        "feedback-thanks": "Thanks message, appears if feedback was successful. Parameters:\n* $1 - \"Feedback\"\n* $2 - Feedback page URL",
        "feedback-thanks-title": "The title of the thank you dialog at the end of the submission process.\n{{Identical|Thank you}}",
-       "feedback-useragent": "A label denoting the user agent in the feedback that is posted to the feedback page.",
+       "feedback-useragent": "A label denoting the user agent in the feedback that is posted to the feedback page.\n{{Identical|User agent}}",
        "searchsuggest-search": "Greyed out default text in the simple search box in the Vector skin. (It disappears and lets the user enter the requested search terms when the search box receives focus.)\n\n{{Identical|Search}}",
        "searchsuggest-containing": "Label used in the special item of the search suggestions list which gives the user an option to perform a full text search for the term.",
        "api-error-badaccess-groups": "API error message that can be used for client side localisation of API errors.",
index d436b51..4b4e98d 100644 (file)
        "log-name-pagelang": "Журнал изменения языка",
        "log-description-pagelang": "Это журнал изменений в языках страницы.",
        "logentry-pagelang-pagelang": "$1 изменил{{GENDER:$2||а}} язык страницы для $3 с $4 на $5.",
-       "default-skin-not-found": "Упс! Тема оформления по умолчанию для вашей вики <code>$wgDefaultSkin</code>, <code>$1</code> недоступна.\n\nВаша установка, похоже, содержит {{PLURAL:$4|следующую тему|следующие темы}} оформления. См. [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual:Skin configuration] для получения информации о том, как включить {{PLURAL:$4|её|их и выбрать тему по умолчанию}}.\n\n$2\n\n; Если вы только что установили MediaWiki:\n: Вы, видимо, сделали это с Git или непосредственно из исходного кода с использованием другого способа. Тогда такое возможно. Попробуйте установить некоторые темы из [https://www.mediawiki.org/wiki/Category:All_skins каталога тем оформления сайта mediawiki.org]:\n:* Загрузив [https://www.mediawiki.org/wiki/Download архив установочных файлов], который содержит несколько тем оформления и расширений. Вы можете скопировать папку <code>skins/</code> из него.\n:* Загрузив архивы отдельных тем оформления с [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org].\n:* Клонировав один из репозиториев <code>mediawiki/skins/*</code> через git в подпапку <code  dir=\"ltr\">skins/</code> папки, куда установлена MediaWiki.\n: Это не должно навредить вашему репозиторию, если вы MediaWiki-разработчик. См. [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual:Skin configuration] для получения информации о том, как включить темы оформления и выбрать тему по умолчанию.\n; Если вы только что обновили MediaWiki:\n: MediaWiki версии 1.24 и новее больше не включает автоматически установленные темы (см. [https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery Manual: Skin autodiscovery]).\nВы можете вставить {{PLURAL:$5|следующую строку|следующие строки}} в <code>LocalSettings.php</code>, чтобы включить {{PLURAL:$5|установленную в текущее время тему|все установленные в текущее время темы}} оформления: \n\n<pre dir=\"ltr\">$3</pre>\n\n\n; Если вы только что изменили <code>LocalSettings.php</code>:\n: Перепроверьте названия тем на наличие опечаток.",
-       "default-skin-not-found-no-skins": "Упс! Тема оформления по умолчанию для вашей вики <code>$wgDefaultSkin</code>, <code>$1</code> недоступна.\n\nУ вас нет установленных тем оформления.\n\n; Если вы только что установили или обновили MediaWiki:\n: Вы, видимо, сделали это с Git или непосредственно из исходного кода с использованием другого способа. Тогда такое возможно. MediaWiki версии 1.24 и новее не содержат темы оформления в основном репозитории. Попробуйте установить некоторые темы из [https://www.mediawiki.org/wiki/Category:All_skins каталога тем оформления сайта mediawiki.org]:\n:* Загрузив [https://www.mediawiki.org/wiki/Download архив установочных файлов], который содержит несколько тем оформления и расширений. Вы можете скопировать папку <code>skins/</code> из него.\n:* Загрузив архивы отдельных тем оформления с [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org].\n:* Клонировав один из репозиториев <code>mediawiki/skins/*</code> через git в подпапку <code dir=\"ltr\">skins/</code> папки, куда установлена MediaWiki.\n: Это не должно навредить вашему репозиторию, если вы MediaWiki-разработчик. См. [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual:Skin configuration] для получения информации о том, как включить темы оформления и выбрать тему по умолчанию.",
+       "default-skin-not-found": "Упс! Тема оформления по умолчанию для вашей вики <code>$wgDefaultSkin</code>, <code>$1</code> недоступна.\n\nВаша установка, похоже, содержит {{PLURAL:$4|следующую тему|следующие темы}} оформления. См. [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual:Skin configuration] с информацией о том, как включить {{PLURAL:$4|её|их и выбрать тему по умолчанию}}.\n\n$2\n\n; Если вы только что установили MediaWiki:\n: Вы, видимо, сделали это с Git или непосредственно из исходного кода с использованием другого способа. Тогда такое возможно. Попробуйте установить некоторые темы из [https://www.mediawiki.org/wiki/Category:All_skins каталога тем оформления сайта mediawiki.org]:\n:* скачав [https://www.mediawiki.org/wiki/Download архив установочных файлов], который содержит несколько тем оформления и расширений; вы можете скопировать из него папку <code>skins/</code>;\n:* скачав архивы отдельных тем оформления с [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org];\n:* клонировав один из репозиториев <code>mediawiki/skins/*</code> через git в подпапку <code  dir=\"ltr\">skins/</code> папки, куда установлена MediaWiki.\n: Это не должно навредить вашему репозиторию Git, если вы разработчик MediaWiki. См. [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual:Skin configuration] с информацией о том, как включить темы оформления и выбрать тему по умолчанию.\n; Если вы только что обновили MediaWiki:\n: MediaWiki версии 1.24 и новее больше не включает автоматически установленные темы (см. [https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery Manual: Skin autodiscovery]).\nВы можете вставить {{PLURAL:$5|следующую строку|следующие строки}} в <code>LocalSettings.php</code>, чтобы включить {{PLURAL:$5|установленную в текущее время тему|все установленные в текущее время темы}} оформления: \n\n<pre dir=\"ltr\">$3</pre>\n\n; Если вы только что изменили <code>LocalSettings.php</code>:\n: Перепроверьте названия тем на наличие опечаток.",
+       "default-skin-not-found-no-skins": "Упс! Тема оформления по умолчанию для вашей вики <code>$wgDefaultSkin</code>, <code>$1</code> недоступна.\n\nУ вас нет установленных тем оформления.\n\n; Если вы только что установили или обновили MediaWiki:\n: Вы, видимо, сделали это с Git или непосредственно из исходного кода с использованием другого способа. Тогда такое возможно. MediaWiki версии 1.24 и новее не содержат темы оформления в основном репозитории. Попробуйте установить некоторые темы из [https://www.mediawiki.org/wiki/Category:All_skins каталога тем оформления сайта mediawiki.org]:\n:* crfxfd [https://www.mediawiki.org/wiki/Download архив установочных файлов], который содержит несколько тем оформления и расширений; вы можете скопировать папку <code>skins/</code> из него;\n:* скачав архивы отдельных тем оформления с [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org];\n:* rлонировав один из репозиториев <code>mediawiki/skins/*</code> через git в подпапку <code dir=\"ltr\">skins/</code> папки, куда установлена MediaWiki.\n: Это не должно навредить вашему репозиторию Git, если вы разработчик MediaWiki. См. [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual:Skin configuration] с информацией о том, как включить темы оформления и выбрать тему по умолчанию.",
        "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (включено)",
        "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''отключено''')",
        "mediastatistics": "Медиа-статистика",
index 27bbe78..a369d1d 100644 (file)
@@ -215,7 +215,6 @@ $magicWords = array(
        'displaytitle'              => array( '1', 'MOSTRATITOLO', 'DISPLAYTITLE' ),
        'language'                  => array( '0', '#LINGUA', '#LANGUAGE:' ),
        'numberofadmins'            => array( '1', 'NUMEROADMIN', 'NUMBEROFADMINS' ),
-       'special'                   => array( '0', 'speciale', 'special' ),
        'tag'                       => array( '0', 'etichetta', 'tag' ),
        'pagesincategory'           => array( '1', 'PAGINEINCAT', 'PAGESINCATEGORY', 'PAGESINCAT' ),
        'pagesize'                  => array( '1', 'DIMENSIONEPAGINA', 'PESOPAGINA', 'PAGESIZE' ),
index 987464a..71180c3 100644 (file)
@@ -195,7 +195,6 @@ $magicWords = array(
        'fullurl'                   => array( '0', 'URLEPLOTË', 'FULLURL:' ),
        'language'                  => array( '0', '#GJUHA:', '#LANGUAGE:' ),
        'numberofadmins'            => array( '1', 'NUMRIIADMINISTRUESVE', 'NUMBEROFADMINS' ),
-       'special'                   => array( '0', 'speciale', 'special' ),
        'hiddencat'                 => array( '1', '__KATEGORIEFSHEHUR__', '__HIDDENCAT__' ),
        'pagesize'                  => array( '1', 'MADHËSIAEFAQES', 'PAGESIZE' ),
 );
index 2ba5daf..b8af5e9 100755 (executable)
@@ -63,8 +63,7 @@ class UpdateMediaWiki extends Maintenance {
        }
 
        function getDbType() {
-               /* If we used the class constant PHP4 would give a parser error here */
-               return 2; /* Maintenance::DB_ADMIN */
+               return Maintenance::DB_ADMIN;
        }
 
        function compatChecks() {
diff --git a/resources/lib/oojs-ui/i18n/ku-latn.json b/resources/lib/oojs-ui/i18n/ku-latn.json
new file mode 100644 (file)
index 0000000..be9a8ab
--- /dev/null
@@ -0,0 +1,13 @@
+{
+       "@metadata": {
+               "authors": [
+                       "George Animal"
+               ]
+       },
+       "ooui-toolgroup-expand": "Bêhtir",
+       "ooui-toolgroup-collapse": "Kêmtir",
+       "ooui-dialog-message-accept": "Baş e",
+       "ooui-dialog-message-reject": "Betal bike",
+       "ooui-dialog-process-retry": "Dîsa hewl bide",
+       "ooui-dialog-process-continue": "Bidomîne"
+}
index 297739d..12e80c1 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.11.1
+ * OOjs UI v0.11.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2015 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2015-05-05T00:40:57Z
+ * Date: 2015-05-12T12:15:44Z
  */
 @-webkit-keyframes oo-ui-progressBarWidget-slide {
        from {
 }
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled > .oo-ui-buttonElement-button:active > .oo-ui-labelElement-label,
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
-       color: #2962cc;
+       color: #1f4999;
        box-shadow: none;
 }
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:hover > .oo-ui-labelElement-label,
 }
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled > .oo-ui-buttonElement-button:active > .oo-ui-labelElement-label,
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
-       color: #008c6d;
+       color: #005946;
        box-shadow: none;
 }
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:hover > .oo-ui-labelElement-label,
 }
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled > .oo-ui-buttonElement-button:active > .oo-ui-labelElement-label,
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
-       color: #a7170f;
+       color: #73100a;
        box-shadow: none;
 }
 .oo-ui-buttonElement-frameless.oo-ui-widget-disabled > .oo-ui-buttonElement-button {
        border: 1px solid #cdcdcd;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled > .oo-ui-buttonElement-button:hover {
-       box-shadow: inset 0 -0.2em 0 0 rgba(0, 0, 0, 0.2), 0 0.1em 0 0 rgba(0, 0, 0, 0.2);
+       background-color: #ebebeb;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled > .oo-ui-buttonElement-button:focus {
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled > .oo-ui-buttonElement-button:active,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
-       background-color: #d0d0d0;
-       border-color: #d0d0d0;
+       background-color: #d9d9d9;
+       border-color: #d9d9d9;
        box-shadow: none;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button {
        color: #347bff;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:hover {
-       box-shadow: inset 0 -0.2em 0 0 #2962cc, 0 0.1em 0 0 rgba(0, 0, 0, 0.1);
-       border-bottom-color: #2962cc;
+       background-color: rgba(52, 123, 255, 0.1);
+       border-color: rgba(31, 73, 153, 0.5);
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:focus {
-       box-shadow: inset 0 0 0 1px #2962cc;
-       border-color: #2962cc;
+       box-shadow: inset 0 0 0 1px #1f4999;
+       border-color: #1f4999;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
-       color: #2962cc;
-       border-color: #d0d0d0;
+       color: #1f4999;
+       border-color: #1f4999;
        box-shadow: none;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button {
        color: #00af89;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:hover {
-       box-shadow: inset 0 -0.2em 0 0 #008c6d, 0 0.1em 0 0 rgba(0, 0, 0, 0.1);
-       border-bottom-color: #008c6d;
+       background-color: rgba(0, 171, 137, 0.1);
+       border-color: rgba(0, 89, 70, 0.5);
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:focus {
-       box-shadow: inset 0 0 0 1px #008c6d;
-       border-color: #008c6d;
+       box-shadow: inset 0 0 0 1px #005946;
+       border-color: #005946;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
-       color: #008c6d;
-       border-color: #d0d0d0;
+       color: #005946;
+       border-color: #005946;
        box-shadow: none;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button {
        color: #d11d13;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:hover {
-       box-shadow: inset 0 -0.2em 0 0 #a7170f, 0 0.1em 0 0 rgba(0, 0, 0, 0.1);
-       border-bottom-color: #a7170f;
+       background-color: rgba(209, 29, 19, 0.1);
+       border-color: rgba(115, 16, 10, 0.5);
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:focus {
-       box-shadow: inset 0 0 0 1px #a7170f;
-       border-color: #a7170f;
+       box-shadow: inset 0 0 0 1px #73100a;
+       border-color: #73100a;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
-       color: #a7170f;
-       border-color: #d0d0d0;
+       color: #73100a;
+       border-color: #73100a;
        box-shadow: none;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button {
        border-color: #347bff;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:hover {
-       box-shadow: inset 0 -0.2em 0 0 #2962cc, 0 0.1em 0 0 rgba(0, 0, 0, 0.1);
-       border-bottom-color: #2962cc;
+       background: #2962cc;
+       border-color: #2962cc;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:focus {
-       box-shadow: inset 0 0 0 1px #2962cc;
-       border-color: #2962cc;
+       box-shadow: inset 0 0 0 1px #ffffff;
+       border-color: #347bff;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
        color: #ffffff;
-       background-color: #2962cc;
-       border-color: #2962cc;
+       background-color: #1f4999;
+       border-color: #1f4999;
        box-shadow: none;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button {
        border-color: #00af89;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:hover {
-       box-shadow: inset 0 -0.2em 0 0 #008c6d, 0 0.1em 0 0 rgba(0, 0, 0, 0.1);
-       border-bottom-color: #008c6d;
+       background: #008064;
+       border-color: #008064;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:focus {
-       box-shadow: inset 0 0 0 1px #008c6d;
-       border-color: #008c6d;
+       box-shadow: inset 0 0 0 1px #ffffff;
+       border-color: #00af89;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
        color: #ffffff;
-       background-color: #008c6d;
-       border-color: #008c6d;
+       background-color: #005946;
+       border-color: #005946;
        box-shadow: none;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button {
        border-color: #d11d13;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:hover {
-       box-shadow: inset 0 -0.2em 0 0 #a7170f, 0 0.1em 0 0 rgba(0, 0, 0, 0.1);
-       border-bottom-color: #a7170f;
+       background: #8c130d;
+       border-color: #8c130d;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:focus {
-       box-shadow: inset 0 0 0 1px #a7170f;
-       border-color: #a7170f;
+       box-shadow: inset 0 0 0 1px #ffffff;
+       border-color: #d11d13;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
        color: #ffffff;
-       background-color: #a7170f;
-       border-color: #a7170f;
+       background-color: #73100a;
+       border-color: #73100a;
        box-shadow: none;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button {
        margin-left: 1.25em;
 }
 .oo-ui-toolGroupTool > .oo-ui-popupToolGroup {
+       border: 0;
+       border-radius: 0;
        margin: 0;
 }
+.oo-ui-toolGroupTool > .oo-ui-toolGroup {
+       border-right: none;
+}
 .oo-ui-toolGroupTool > .oo-ui-popupToolGroup > .oo-ui-popupToolGroup-handle {
-       height: 1.875em;
+       height: 2.5em;
        padding: 0.3125em;
 }
 .oo-ui-toolGroupTool > .oo-ui-popupToolGroup > .oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon {
-       height: 1.875em;
+       height: 2.5em;
        width: 1.875em;
-       opacity: 0.8;
 }
 .oo-ui-toolGroupTool > .oo-ui-popupToolGroup.oo-ui-labelElement > .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label {
        line-height: 2.1em;
 .oo-ui-toolGroup {
        display: inline-block;
        vertical-align: middle;
-       margin: 0.375em;
+       border-radius: 0;
+       border-right: 1px solid #dddddd;
 }
 .oo-ui-toolGroup-empty {
        display: none;
 .oo-ui-toolbar-narrow .oo-ui-toolGroup + .oo-ui-toolGroup {
        margin-left: 0;
 }
-.oo-ui-toolGroup.oo-ui-widget-enabled .oo-ui-tool-link .oo-ui-tool-title {
-       color: #000000;
-}
-.oo-ui-toolGroup.oo-ui-widget-enabled .oo-ui-tool-link .oo-ui-tool-accel {
-       color: #888888;
+.oo-ui-toolGroup .oo-ui-toolGroup .oo-ui-widget-enabled {
+       border-right: none !important;
 }
 .oo-ui-barToolGroup > .oo-ui-iconElement-icon,
 .oo-ui-barToolGroup > .oo-ui-labelElement-label {
        display: none;
 }
+.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link {
+       cursor: pointer;
+}
 .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool {
        display: inline-block;
        position: relative;
        display: none;
 }
 .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-iconElement > .oo-ui-tool-link .oo-ui-iconElement-icon {
-       display: block;
+       display: inline-block;
+       vertical-align: top;
 }
 .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-iconElement > .oo-ui-tool-link .oo-ui-tool-title {
        display: none;
 }
+.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-iconElement.oo-ui-tool-with-label > .oo-ui-tool-link .oo-ui-tool-title {
+       display: inline;
+}
 .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-disabled > .oo-ui-tool-link {
        cursor: default;
 }
-.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link {
-       cursor: pointer;
-}
 .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link {
        height: 1.875em;
-       padding: 0.3125em;
+       padding: 0.625em;
 }
 .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link .oo-ui-iconElement-icon {
        height: 1.875em;
        width: 1.875em;
-       opacity: 0.8;
 }
 .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link .oo-ui-tool-title {
        line-height: 2.1em;
+       padding: 0 0.4em;
+}
+.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-enabled:hover {
+       border-color: rgba(0, 0, 0, 0.2);
+       background-color: #eeeeee;
+}
+.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool > a.oo-ui-tool-link .oo-ui-tool-title {
+       color: #555555;
 }
 .oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-tool-active.oo-ui-widget-enabled {
+       border-color: rgba(0, 0, 0, 0.2);
+       box-shadow: inset 0 0.07em 0.07em 0 rgba(0, 0, 0, 0.07);
+       background-color: #e5e5e5;
+}
+.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-tool-active.oo-ui-widget-enabled:hover {
        background-color: #eeeeee;
 }
+.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-tool-active.oo-ui-widget-enabled + .oo-ui-tool-active.oo-ui-widget-enabled {
+       border-left-color: rgba(0, 0, 0, 0.1);
+}
+.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-disabled > .oo-ui-tool-link .oo-ui-tool-title {
+       color: #cccccc;
+}
 .oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-disabled > .oo-ui-tool-link .oo-ui-iconElement-icon {
        opacity: 0.2;
 }
 .oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-enabled > .oo-ui-tool-link .oo-ui-iconElement-icon {
-       opacity: 0.8;
+       opacity: 0.7;
 }
 .oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-enabled:hover > .oo-ui-tool-link .oo-ui-iconElement-icon {
-       opacity: 1;
+       opacity: 0.9;
+}
+.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-enabled:active {
+       background-color: #e7e7e7;
 }
-.oo-ui-barToolGroup.oo-ui-widget-disabled > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link .oo-ui-iconElement-icon {
+.oo-ui-barToolGroup.oo-ui-widget-disabled > .oo-ui-toolGroup-tools > .oo-ui-tool > a.oo-ui-tool-link .oo-ui-tool-title {
+       color: #cccccc;
+}
+.oo-ui-barToolGroup.oo-ui-widget-disabled > .oo-ui-toolGroup-tools > .oo-ui-tool > a.oo-ui-tool-link .oo-ui-iconElement-icon {
        opacity: 0.2;
 }
 .oo-ui-popupToolGroup {
        position: relative;
-       height: 2.5em;
-       min-width: 2.5em;
+       height: 3.125em;
+       min-width: 2em;
 }
 .oo-ui-popupToolGroup-handle {
        display: block;
        margin-left: 2.5em;
 }
 .oo-ui-popupToolGroup.oo-ui-labelElement.oo-ui-indicatorElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label {
-       margin-right: 2.25em;
+       margin-right: 2em;
 }
 .oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-labelElement.oo-ui-indicatorElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label {
        margin-right: 1.75em;
 }
+.oo-ui-popupToolGroup.oo-ui-widget-enabled .oo-ui-popupToolGroup-handle:hover {
+       background-color: #eeeeee;
+}
+.oo-ui-popupToolGroup.oo-ui-widget-enabled .oo-ui-popupToolGroup-handle:active {
+       background-color: #e5e5e5;
+}
+.oo-ui-popupToolGroup-handle {
+       padding: 0.3125em;
+       height: 2.5em;
+}
 .oo-ui-popupToolGroup-handle .oo-ui-indicatorElement-indicator {
        width: 0.9375em;
-       height: 0.9375em;
-       margin: 0.78125em;
+       height: 1.625em;
+       margin: 0.78125em 0.5em;
        top: 0;
        right: 0;
+       opacity: 0.3;
 }
 .oo-ui-toolbar-narrow .oo-ui-popupToolGroup-handle .oo-ui-indicatorElement-indicator {
        right: -0.3125em;
 }
 .oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon {
        width: 1.875em;
-       height: 1.875em;
-       margin: 0.3125em;
+       height: 2.6em;
+       margin: 0.25em;
        top: 0;
        left: 0.3125em;
+       opacity: 0.7;
 }
 .oo-ui-toolbar-narrow .oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon {
        left: 0;
        margin: 0 0.6em;
        font-weight: bold;
 }
+.oo-ui-popupToolGroup-active.oo-ui-widget-enabled {
+       border-bottom-left-radius: 0;
+       border-bottom-right-radius: 0;
+       box-shadow: inset 0 0.07em 0.07em 0 rgba(0, 0, 0, 0.07);
+       background-color: #eeeeee;
+}
 .oo-ui-popupToolGroup .oo-ui-toolGroup-tools {
-       top: 2.5em;
-       background-color: white;
+       top: 3.125em;
+       margin: 0 -1px;
+       border: 1px solid #cccccc;
+       background-color: #ffffff;
+       box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
+       min-width: 16em;
 }
 .oo-ui-popupToolGroup .oo-ui-tool-link {
-       padding: 0.3125em 0 0.3125em 0.3125em;
+       padding: 0.4em 0.625em;
+       box-sizing: border-box;
 }
 .oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-iconElement-icon {
-       height: 1.875em;
+       height: 2.5em;
        width: 1.875em;
        min-width: 1.875em;
 }
 .oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-title {
        padding-left: 0.5em;
+       color: #000000;
 }
 .oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel,
 .oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-title {
        line-height: 2em;
 }
+.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel {
+       color: #888888;
+}
 .oo-ui-listToolGroup .oo-ui-tool {
        display: block;
        -webkit-box-sizing: border-box;
 .oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link {
        cursor: default;
 }
-.oo-ui-listToolGroup .oo-ui-tool {
-       padding: 0 0.9375em 0 0.3125em;
+.oo-ui-listToolGroup.oo-ui-popupToolGroup-active {
+       border-color: rgba(0, 0, 0, 0.2);
 }
 .oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-enabled:hover {
+       border-color: rgba(0, 0, 0, 0.2);
        background-color: #eeeeee;
 }
-.oo-ui-listToolGroup .oo-ui-tool-active.oo-ui-widget-enabled,
+.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-enabled:active {
+       background-color: #e7e7e7;
+}
+.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-enabled:hover .oo-ui-tool-link .oo-ui-iconElement-icon {
+       opacity: 0.9;
+}
+.oo-ui-listToolGroup .oo-ui-tool-active.oo-ui-widget-enabled {
+       border-color: rgba(0, 0, 0, 0.1);
+       box-shadow: inset 0 0.07em 0.07em 0 rgba(0, 0, 0, 0.07);
+       background-color: #e5e5e5;
+}
+.oo-ui-listToolGroup .oo-ui-tool-active.oo-ui-widget-enabled + .oo-ui-tool-active.oo-ui-widget-enabled {
+       border-top-color: rgba(0, 0, 0, 0.1);
+}
 .oo-ui-listToolGroup .oo-ui-tool-active.oo-ui-widget-enabled:hover {
-       background-color: #d0d0d0;
+       border-color: rgba(0, 0, 0, 0.2);
+       background-color: #eeeeee;
 }
 .oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-tool-title {
        color: #cccccc;
 .oo-ui-listToolGroup.oo-ui-widget-disabled .oo-ui-iconElement-icon {
        opacity: 0.2;
 }
-.oo-ui-listToolGroup .oo-ui-toolGroup-tools {
-       padding: 0.3125em 0 0.3125em 0;
-       border: 1px solid #aaaaaa;
-       border-radius: 0.25em;
-       box-shadow: inset 0 -0.25em 0 0 rgba(0, 0, 0, 0.2), 0 0.125em 0 0 rgba(0, 0, 0, 0.1);
-}
-.oo-ui-menuToolGroup {
-       border: 1px solid #cccccc;
-       border-radius: 0.125em;
-}
 .oo-ui-menuToolGroup .oo-ui-tool {
        display: block;
 }
 .oo-ui-toolbar-narrow .oo-ui-menuToolGroup .oo-ui-popupToolGroup-handle {
        min-width: 8.125em;
 }
-.oo-ui-menuToolGroup .oo-ui-toolGroup-tools {
-       margin-left: -1px;
-       padding: 0.3125em 0 0.3125em 0;
-       border: 1px solid #aaaaaa;
-       border-radius: 0.25em;
-       border-top-left-radius: 0;
-       box-shadow: inset 0 -0.25em 0 0 rgba(0, 0, 0, 0.2), 0 0.125em 0 0 rgba(0, 0, 0, 0.1);
-}
-.oo-ui-menuToolGroup.oo-ui-widget-enabled:hover {
-       border-color: #aaaaaa;
-}
-.oo-ui-menuToolGroup.oo-ui-popupToolGroup-active {
-       border-color: #aaaaaa;
-}
-.oo-ui-menuToolGroup .oo-ui-tool {
-       padding: 0 1.25em 0 0.3125em;
-}
 .oo-ui-menuToolGroup .oo-ui-tool-link .oo-ui-iconElement-icon {
        background-image: none;
 }
 }
 .oo-ui-menuToolGroup.oo-ui-widget-disabled {
        color: #cccccc;
-       border-color: #cccccc;
 }
 .oo-ui-menuToolGroup.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
 .oo-ui-menuToolGroup.oo-ui-widget-disabled .oo-ui-iconElement-icon {
 }
 .oo-ui-toolbar-bar {
        line-height: 1em;
+       position: relative;
 }
 .oo-ui-toolbar-actions {
        float: right;
 }
+.oo-ui-toolbar-actions .oo-ui-toolbar {
+       display: inline-block;
+}
 .oo-ui-toolbar-tools {
        display: inline;
        white-space: nowrap;
        pointer-events: none;
 }
 .oo-ui-toolbar-bar {
-       border-bottom: 2px solid rgba(0, 0, 0, 0.15);
-       background: #ffffff;
+       border-bottom: 1px solid #cccccc;
+       background-color: #ffffff;
+       box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+       font-weight: 500;
+       color: #555555;
 }
 .oo-ui-toolbar-bar .oo-ui-toolbar-bar {
        border: none;
        background: none;
+       box-shadow: none;
 }
-.oo-ui-toolbar-shadow {
-       display: none;
-}
-.oo-ui-selectWidget {
-       border-radius: 2px;
-}
-.oo-ui-selectWidget .oo-ui-buttonOptionWidget .oo-ui-buttonElement-button {
-       border-radius: 0;
-       margin-left: -1px;
-}
-.oo-ui-selectWidget .oo-ui-buttonOptionWidget:first-child .oo-ui-buttonElement-button {
-       border-bottom-left-radius: 2px;
-       border-top-left-radius: 2px;
-       margin-left: 0;
+.oo-ui-toolbar-actions > .oo-ui-buttonElement {
+       margin-top: 0.25em;
+       margin-bottom: 0.25em;
 }
-.oo-ui-selectWidget .oo-ui-buttonOptionWidget:last-child .oo-ui-buttonElement-button {
-       border-bottom-right-radius: 2px;
-       border-top-right-radius: 2px;
+.oo-ui-toolbar-actions > .oo-ui-toolbar,
+.oo-ui-toolbar-actions > .oo-ui-buttonElement:last-child {
+       margin-right: 0.5em;
 }
 .oo-ui-optionWidget {
        position: relative;
        display: block;
 }
 .oo-ui-menuOptionWidget.oo-ui-optionWidget-selected {
-       background-color: #999999;
-       color: #ffffff;
+       background-color: #d8e6fe;
+       color: rgba(0, 0, 0, 0.8);
 }
 .oo-ui-menuOptionWidget.oo-ui-optionWidget-selected .oo-ui-iconElement-icon {
        display: none;
        background-color: #eeeeee;
        color: black;
 }
+.oo-ui-menuOptionWidget.oo-ui-optionWidget-selected.oo-ui-menuOptionWidget.oo-ui-optionWidget-highlighted {
+       background-color: #d8e6fe;
+}
 .oo-ui-menuSectionOptionWidget {
        cursor: default;
        padding: 0.33em 0.75em;
        color: #666666;
        font-weight: bold;
 }
-.oo-ui-tabOptionWidget:hover {
+.oo-ui-tabOptionWidget.oo-ui-widget-enabled:hover {
        background-color: rgba(255, 255, 255, 0.3);
 }
-.oo-ui-tabOptionWidget:active {
+.oo-ui-tabOptionWidget.oo-ui-widget-enabled:active {
        background-color: rgba(255, 255, 255, 0.8);
 }
 .oo-ui-tabOptionWidget.oo-ui-indicatorElement .oo-ui-labelElement-label {
index b013b1a..eaca1f1 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.11.1
+ * OOjs UI v0.11.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2015 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2015-05-05T00:40:50Z
+ * Date: 2015-05-12T12:15:37Z
  */
 /**
  * @class
index f6d6128..9692d5c 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.11.1
+ * OOjs UI v0.11.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2015 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2015-05-05T00:40:50Z
+ * Date: 2015-05-12T12:15:37Z
  */
 ( function ( OO ) {
 
@@ -4187,9 +4187,10 @@ OO.ui.ButtonElement.prototype.onMouseUp = function ( e ) {
  */
 OO.ui.ButtonElement.prototype.onClick = function ( e ) {
        if ( !this.isDisabled() && e.which === 1 ) {
-               this.emit( 'click' );
+               if ( this.emit( 'click' ) ) {
+                       return false;
+               }
        }
-       return false;
 };
 
 /**
@@ -4232,8 +4233,9 @@ OO.ui.ButtonElement.prototype.onKeyUp = function ( e ) {
  */
 OO.ui.ButtonElement.prototype.onKeyPress = function ( e ) {
        if ( !this.isDisabled() && ( e.which === OO.ui.Keys.SPACE || e.which === OO.ui.Keys.ENTER ) ) {
-               this.emit( 'click' );
-               return false;
+               if ( this.emit( 'click' ) ) {
+                       return false;
+               }
        }
 };
 
@@ -5739,16 +5741,15 @@ OO.ui.LookupElement.prototype.populateLookupMenu = function () {
 };
 
 /**
- * Select and highlight the first selectable item in the menu.
+ * Highlight the first selectable item in the menu.
  *
  * @private
  * @chainable
  */
 OO.ui.LookupElement.prototype.initializeLookupMenuSelection = function () {
        if ( !this.lookupMenu.getSelectedItem() ) {
-               this.lookupMenu.selectItem( this.lookupMenu.getFirstSelectableItem() );
+               this.lookupMenu.highlightItem( this.lookupMenu.getFirstSelectableItem() );
        }
-       this.lookupMenu.highlightItem( this.lookupMenu.getSelectedItem() );
 };
 
 /**
@@ -6488,6 +6489,7 @@ OO.ui.Tool = function OoUiTool( toolGroup, config ) {
                        'oo-ui-tool ' + 'oo-ui-tool-name-' +
                        this.constructor.static.name.replace( /^([^\/]+)\/([^\/]+).*$/, '$1-$2' )
                )
+               .toggleClass( 'oo-ui-tool-with-label', this.constructor.static.displayBothIconAndLabel )
                .append( this.$link );
        this.setTitle( config.title || this.constructor.static.title );
 };
@@ -6548,6 +6550,16 @@ OO.ui.Tool.static.group = '';
  */
 OO.ui.Tool.static.title = '';
 
+/**
+ * Whether this tool should be displayed with both title and label when used in a bar tool group.
+ * Normally only the icon is displayed, or only the label if no icon is given.
+ *
+ * @static
+ * @inheritable
+ * @property {boolean}
+ */
+OO.ui.Tool.static.displayBothIconAndLabel = false;
+
 /**
  * Tool can be automatically added to catch-all groups.
  *
@@ -6695,9 +6707,9 @@ OO.ui.Tool.prototype.destroy = function () {
 /**
  * Collection of tool groups.
  *
- *     @example
- *     // Basic OOjs UI toolbar example
+ * The following is a minimal example using several tools and tool groups.
  *
+ *     @example
  *     // Create the toolbar
  *     var toolFactory = new OO.ui.ToolFactory();
  *     var toolGroupFactory = new OO.ui.ToolGroupFactory();
@@ -6711,7 +6723,123 @@ OO.ui.Tool.prototype.destroy = function () {
  *     // Create a class inheriting from OO.ui.Tool
  *     function PictureTool() {
  *         PictureTool.super.apply( this, arguments );
+ *     }
+ *     OO.inheritClass( PictureTool, OO.ui.Tool );
+ *     // Each tool must have a 'name' (used as an internal identifier, see later) and at least one
+ *     // of 'icon' and 'title' (displayed icon and text).
+ *     PictureTool.static.name = 'picture';
+ *     PictureTool.static.icon = 'picture';
+ *     PictureTool.static.title = 'Insert picture';
+ *     // Defines the action that will happen when this tool is selected (clicked).
+ *     PictureTool.prototype.onSelect = function () {
+ *         $area.text( 'Picture tool clicked!' );
+ *         // Never display this tool as "active" (selected).
+ *         this.setActive( false );
+ *     };
+ *     // Make this tool available in our toolFactory and thus our toolbar
+ *     toolFactory.register( PictureTool );
+ *
+ *     // Register two more tools, nothing interesting here
+ *     function SettingsTool() {
+ *         SettingsTool.super.apply( this, arguments );
+ *     }
+ *     OO.inheritClass( SettingsTool, OO.ui.Tool );
+ *     SettingsTool.static.name = 'settings';
+ *     SettingsTool.static.icon = 'settings';
+ *     SettingsTool.static.title = 'Change settings';
+ *     SettingsTool.prototype.onSelect = function () {
+ *         $area.text( 'Settings tool clicked!' );
+ *         this.setActive( false );
+ *     };
+ *     toolFactory.register( SettingsTool );
+ *
+ *     // Register two more tools, nothing interesting here
+ *     function StuffTool() {
+ *         StuffTool.super.apply( this, arguments );
+ *     }
+ *     OO.inheritClass( StuffTool, OO.ui.Tool );
+ *     StuffTool.static.name = 'stuff';
+ *     StuffTool.static.icon = 'ellipsis';
+ *     StuffTool.static.title = 'More stuff';
+ *     StuffTool.prototype.onSelect = function () {
+ *         $area.text( 'More stuff tool clicked!' );
+ *         this.setActive( false );
  *     };
+ *     toolFactory.register( StuffTool );
+ *
+ *     // This is a PopupTool. Rather than having a custom 'onSelect' action, it will display a
+ *     // little popup window (a PopupWidget).
+ *     function HelpTool( toolGroup, config ) {
+ *         OO.ui.PopupTool.call( this, toolGroup, $.extend( { popup: {
+ *             padded: true,
+ *             label: 'Help',
+ *             head: true
+ *         } }, config ) );
+ *         this.popup.$body.append( '<p>I am helpful!</p>' );
+ *     }
+ *     OO.inheritClass( HelpTool, OO.ui.PopupTool );
+ *     HelpTool.static.name = 'help';
+ *     HelpTool.static.icon = 'help';
+ *     HelpTool.static.title = 'Help';
+ *     toolFactory.register( HelpTool );
+ *
+ *     // Finally define which tools and in what order appear in the toolbar. Each tool may only be
+ *     // used once (but not all defined tools must be used).
+ *     toolbar.setup( [
+ *         {
+ *             // 'bar' tool groups display tools' icons only, side-by-side.
+ *             type: 'bar',
+ *             include: [ 'picture', 'help' ]
+ *         },
+ *         {
+ *             // 'list' tool groups display both the titles and icons, in a dropdown list.
+ *             type: 'list',
+ *             indicator: 'down',
+ *             label: 'More',
+ *             include: [ 'settings', 'stuff' ]
+ *         }
+ *         // Note how the tools themselves are toolgroup-agnostic - the same tool can be displayed
+ *         // either in a 'list' or a 'bar'. There is a 'menu' tool group too, not showcased here,
+ *         // since it's more complicated to use. (See the next example snippet on this page.)
+ *     ] );
+ *
+ *     // Create some UI around the toolbar and place it in the document
+ *     var frame = new OO.ui.PanelLayout( {
+ *         expanded: false,
+ *         framed: true
+ *     } );
+ *     var contentFrame = new OO.ui.PanelLayout( {
+ *         expanded: false,
+ *         padded: true
+ *     } );
+ *     frame.$element.append(
+ *         toolbar.$element,
+ *         contentFrame.$element.append( $area )
+ *     );
+ *     $( 'body' ).append( frame.$element );
+ *
+ *     // Here is where the toolbar is actually built. This must be done after inserting it into the
+ *     // document.
+ *     toolbar.initialize();
+ *
+ * The following example extends the previous one to illustrate 'menu' tool groups and the usage of
+ * 'updateState' event.
+ *
+ *     @example
+ *     // Create the toolbar
+ *     var toolFactory = new OO.ui.ToolFactory();
+ *     var toolGroupFactory = new OO.ui.ToolGroupFactory();
+ *     var toolbar = new OO.ui.Toolbar( toolFactory, toolGroupFactory );
+ *
+ *     // We will be placing status text in this element when tools are used
+ *     var $area = $( '<p>' ).text( 'Toolbar example' );
+ *
+ *     // Define the tools that we're going to place in our toolbar
+ *
+ *     // Create a class inheriting from OO.ui.Tool
+ *     function PictureTool() {
+ *         PictureTool.super.apply( this, arguments );
+ *     }
  *     OO.inheritClass( PictureTool, OO.ui.Tool );
  *     // Each tool must have a 'name' (used as an internal identifier, see later) and at least one
  *     // of 'icon' and 'title' (displayed icon and text).
@@ -6721,13 +6849,13 @@ OO.ui.Tool.prototype.destroy = function () {
  *     // Defines the action that will happen when this tool is selected (clicked).
  *     PictureTool.prototype.onSelect = function () {
  *         $area.text( 'Picture tool clicked!' );
+ *         // Never display this tool as "active" (selected).
  *         this.setActive( false );
  *     };
  *     // The toolbar can be synchronized with the state of some external stuff, like a text
  *     // editor's editing area, highlighting the tools (e.g. a 'bold' tool would be shown as active
  *     // when the text cursor was inside bolded text). Here we simply disable this feature.
  *     PictureTool.prototype.onUpdateState = function () {
- *         this.setActive( false );
  *     };
  *     // Make this tool available in our toolFactory and thus our toolbar
  *     toolFactory.register( PictureTool );
@@ -6735,34 +6863,42 @@ OO.ui.Tool.prototype.destroy = function () {
  *     // Register two more tools, nothing interesting here
  *     function SettingsTool() {
  *         SettingsTool.super.apply( this, arguments );
- *     };
+ *         this.reallyActive = false;
+ *     }
  *     OO.inheritClass( SettingsTool, OO.ui.Tool );
  *     SettingsTool.static.name = 'settings';
  *     SettingsTool.static.icon = 'settings';
  *     SettingsTool.static.title = 'Change settings';
  *     SettingsTool.prototype.onSelect = function () {
  *         $area.text( 'Settings tool clicked!' );
- *         this.setActive( false );
+ *         // Toggle the active state on each click
+ *         this.reallyActive = !this.reallyActive;
+ *         this.setActive( this.reallyActive );
+ *         // To update the menu label
+ *         this.toolbar.emit( 'updateState' );
  *     };
  *     SettingsTool.prototype.onUpdateState = function () {
- *         this.setActive( false );
  *     };
  *     toolFactory.register( SettingsTool );
  *
  *     // Register two more tools, nothing interesting here
  *     function StuffTool() {
  *         StuffTool.super.apply( this, arguments );
- *     };
+ *         this.reallyActive = false;
+ *     }
  *     OO.inheritClass( StuffTool, OO.ui.Tool );
  *     StuffTool.static.name = 'stuff';
  *     StuffTool.static.icon = 'ellipsis';
  *     StuffTool.static.title = 'More stuff';
  *     StuffTool.prototype.onSelect = function () {
  *         $area.text( 'More stuff tool clicked!' );
- *         this.setActive( false );
+ *         // Toggle the active state on each click
+ *         this.reallyActive = !this.reallyActive;
+ *         this.setActive( this.reallyActive );
+ *         // To update the menu label
+ *         this.toolbar.emit( 'updateState' );
  *     };
  *     StuffTool.prototype.onUpdateState = function () {
- *         this.setActive( false );
  *     };
  *     toolFactory.register( StuffTool );
  *
@@ -6775,7 +6911,7 @@ OO.ui.Tool.prototype.destroy = function () {
  *             head: true
  *         } }, config ) );
  *         this.popup.$body.append( '<p>I am helpful!</p>' );
- *     };
+ *     }
  *     OO.inheritClass( HelpTool, OO.ui.PopupTool );
  *     HelpTool.static.name = 'help';
  *     HelpTool.static.icon = 'help';
@@ -6791,14 +6927,12 @@ OO.ui.Tool.prototype.destroy = function () {
  *             include: [ 'picture', 'help' ]
  *         },
  *         {
- *             // 'list' tool groups display both the titles and icons, in a dropdown list.
- *             type: 'list',
+ *             // 'menu' tool groups display both the titles and icons, in a dropdown menu.
+ *             // Menu label indicates which items are selected.
+ *             type: 'menu',
  *             indicator: 'down',
- *             label: 'More',
  *             include: [ 'settings', 'stuff' ]
  *         }
- *         // Note how the tools themselves are toolgroup-agnostic - the same tool can be displayed
- *         // either in a 'list' or a 'bar'. There is a 'menu' tool group too, not showcased here.
  *     ] );
  *
  *     // Create some UI around the toolbar and place it in the document
@@ -8459,8 +8593,9 @@ OO.ui.FormLayout.static.tagName = 'form';
  * @fires submit
  */
 OO.ui.FormLayout.prototype.onFormSubmit = function () {
-       this.emit( 'submit' );
-       return false;
+       if ( this.emit( 'submit' ) ) {
+               return false;
+       }
 };
 
 /**
@@ -10283,8 +10418,6 @@ OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.TitledElement );
 OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.ClippableElement );
 OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.TabIndexedElement );
 
-/* Static Properties */
-
 /* Methods */
 
 /**
@@ -10439,8 +10572,6 @@ OO.inheritClass( OO.ui.ListToolGroup, OO.ui.PopupToolGroup );
 
 /* Static Properties */
 
-OO.ui.ListToolGroup.static.accelTooltips = true;
-
 OO.ui.ListToolGroup.static.name = 'list';
 
 /* Methods */
@@ -10563,8 +10694,6 @@ OO.inheritClass( OO.ui.MenuToolGroup, OO.ui.PopupToolGroup );
 
 /* Static Properties */
 
-OO.ui.MenuToolGroup.static.accelTooltips = true;
-
 OO.ui.MenuToolGroup.static.name = 'menu';
 
 /* Methods */
@@ -10673,6 +10802,9 @@ OO.ui.ToolGroupTool = function OoUiToolGroupTool( toolGroup, config ) {
        // Properties
        this.innerToolGroup = this.createGroup( this.constructor.static.groupConfig );
 
+       // Events
+       this.innerToolGroup.connect( this, { disable: 'onToolGroupDisable' } );
+
        // Initialization
        this.$link.remove();
        this.$element
@@ -10705,6 +10837,16 @@ OO.ui.ToolGroupTool.prototype.onSelect = function () {
        return false;
 };
 
+/**
+ * Synchronize disabledness state of the tool with the inner toolgroup.
+ *
+ * @private
+ * @param {boolean} disabled Element is disabled
+ */
+OO.ui.ToolGroupTool.prototype.onToolGroupDisable = function ( disabled ) {
+       this.setDisabled( disabled );
+};
+
 /**
  * Handle the toolbar state being updated.
  *
@@ -11208,28 +11350,6 @@ OO.ui.ButtonWidget.prototype.onMouseUp = function ( e ) {
        return OO.ui.ButtonElement.prototype.onMouseUp.call( this, e );
 };
 
-/**
- * @inheritdoc
- */
-OO.ui.ButtonWidget.prototype.onClick = function ( e ) {
-       var ret = OO.ui.ButtonElement.prototype.onClick.call( this, e );
-       if ( this.href ) {
-               return true;
-       }
-       return ret;
-};
-
-/**
- * @inheritdoc
- */
-OO.ui.ButtonWidget.prototype.onKeyPress = function ( e ) {
-       var ret = OO.ui.ButtonElement.prototype.onKeyPress.call( this, e );
-       if ( this.href ) {
-               return true;
-       }
-       return ret;
-};
-
 /**
  * Get hyperlink location.
  *
@@ -12702,7 +12822,7 @@ OO.ui.TextInputWidget = function OoUiTextInputWidget( config ) {
        // Events
        this.$input.on( {
                keypress: this.onKeyPress.bind( this ),
-               blur: this.setValidityFlag.bind( this )
+               blur: this.onBlur.bind( this )
        } );
        this.$input.one( {
                focus: this.onElementAttach.bind( this )
@@ -12728,6 +12848,7 @@ OO.ui.TextInputWidget = function OoUiTextInputWidget( config ) {
        }
        if ( config.required ) {
                this.$input.attr( 'required', 'required' );
+               this.$input.attr( 'aria-required', 'true' );
        }
        if ( this.label || config.autosize ) {
                this.installParentChangeDetector();
@@ -12802,6 +12923,16 @@ OO.ui.TextInputWidget.prototype.onKeyPress = function ( e ) {
        }
 };
 
+/**
+ * Handle blur events.
+ *
+ * @private
+ * @param {jQuery.Event} e Blur event
+ */
+OO.ui.TextInputWidget.prototype.onBlur = function () {
+       this.setValidityFlag();
+};
+
 /**
  * Handle element attach events.
  *
@@ -13025,17 +13156,25 @@ OO.ui.TextInputWidget.prototype.setValidation = function ( validate ) {
 
 /**
  * Sets the 'invalid' flag appropriately.
+ *
+ * @param {boolean} [isValid] Optionally override validation result
  */
-OO.ui.TextInputWidget.prototype.setValidityFlag = function () {
-       var widget = this;
-       this.isValid().done( function ( valid ) {
-               if ( !valid ) {
-                       widget.$input.attr( 'aria-invalid', 'true' );
-               } else {
-                       widget.$input.removeAttr( 'aria-invalid' );
-               }
-               widget.setFlags( { invalid: !valid } );
-       } );
+OO.ui.TextInputWidget.prototype.setValidityFlag = function ( isValid ) {
+       var widget = this,
+               setFlag = function ( valid ) {
+                       if ( !valid ) {
+                               widget.$input.attr( 'aria-invalid', 'true' );
+                       } else {
+                               widget.$input.removeAttr( 'aria-invalid' );
+                       }
+                       widget.setFlags( { invalid: !valid } );
+               };
+
+       if ( isValid !== undefined ) {
+               setFlag( isValid );
+       } else {
+               this.isValid().done( setFlag );
+       }
 };
 
 /**
@@ -14140,12 +14279,7 @@ OO.ui.PopupWidget = function OoUiPopupWidget( config ) {
        this.anchor = null;
        this.width = config.width !== undefined ? config.width : 320;
        this.height = config.height !== undefined ? config.height : null;
-       // Validate alignment and transform deprecated values
-       if ( [ 'left', 'right', 'force-left', 'force-right', 'backwards', 'forwards', 'center' ].indexOf( config.align ) > -1 ) {
-               this.align = { left: 'force-right', right: 'force-left' }[ config.align ] || config.align;
-       } else {
-               this.align = 'center';
-       }
+       this.setAlignment( config.align );
        this.closeButton = new OO.ui.ButtonWidget( { framed: false, icon: 'close' } );
        this.onMouseDownHandler = this.onMouseDown.bind( this );
        this.onDocumentKeyDownHandler = this.onDocumentKeyDown.bind( this );
@@ -14442,6 +14576,29 @@ OO.ui.PopupWidget.prototype.updateDimensions = function ( transition ) {
        return this;
 };
 
+/**
+ * Set popup alignment
+ * @param {string} align Alignment of the popup, `center`, `force-left`, `force-right`,
+ *  `backwards` or `forwards`.
+ */
+OO.ui.PopupWidget.prototype.setAlignment = function ( align ) {
+       // Validate alignment and transform deprecated values
+       if ( [ 'left', 'right', 'force-left', 'force-right', 'backwards', 'forwards', 'center' ].indexOf( align ) > -1 ) {
+               this.align = { left: 'force-right', right: 'force-left' }[ align ] || align;
+       } else {
+               this.align = 'center';
+       }
+};
+
+/**
+ * Get popup alignment
+ * @return {string} align Alignment of the popup, `center`, `force-left`, `force-right`,
+ *  `backwards` or `forwards`.
+ */
+OO.ui.PopupWidget.prototype.getAlignment = function () {
+       return this.align;
+};
+
 /**
  * Progress bars visually display the status of an operation, such as a download,
  * and can be either determinate or indeterminate:
@@ -14747,6 +14904,7 @@ OO.ui.SearchWidget.prototype.getResults = function () {
  *
  * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Widgets/Selects_and_Options
  *
+ * @abstract
  * @class
  * @extends OO.ui.Widget
  * @mixins OO.ui.GroupElement
index 948ae6c..d385eb1 100644 (file)
@@ -65,7 +65,7 @@
                        "rtl": "images/icons/search-rtl.svg"
                } },
                "settings": { "file": "images/icons/settings.svg" },
-               "tag": { "file": "images/icons/tag.svg" },
+               "tag": { "file": "images/icons/tag.svg", "variants": [ "destructive", "warning", "constructive", "progressive" ] },
                "undo": { "file": {
                        "ltr": "images/icons/arched-arrow-rtl.svg",
                        "rtl": "images/icons/arched-arrow-ltr.svg"
index 8a07140..37b57fe 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-ltr-invert.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-ltr-invert.png differ
index 1874597..9aca415 100644 (file)
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #FFFFFF }</style>
-    <g id="arched-arrow-ltr">
-        <path id="arrow" d="M19.925 14.937l-2.391-6.901-1.48 2.329c-.964-.845-2.699-1.85-5.513-1.823-4.887.046-6.524 4.244-6.524 4.244s2.753-2.639 6.925-1.949c1.729.286 3.007 1.206 3.675 1.791l-1.474 2.319 6.782-.01z"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-487 489 24 24" enable-background="new -487 489 24 24" xml:space="preserve"><style>* { fill: #FFFFFF }</style>\r
+<path d="M-472.8,494.7l6.3,5.7l-6.3,5.7v-3.8h-1.3c-3.2,0-6.3,1.3-7.6,3.8c0-4.7,2.8-7.6,7.9-7.6h0.9V494.7z"/>\r
+</svg>\r
index 88db108..7d2113f 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-ltr.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-ltr.png differ
index 8a670ef..049f21e 100644 (file)
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-    <g id="arched-arrow-ltr">
-        <path id="arrow" d="M19.925 14.937l-2.391-6.901-1.48 2.329c-.964-.845-2.699-1.85-5.513-1.823-4.887.046-6.524 4.244-6.524 4.244s2.753-2.639 6.925-1.949c1.729.286 3.007 1.206 3.675 1.791l-1.474 2.319 6.782-.01z"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-487 489 24 24" enable-background="new -487 489 24 24" xml:space="preserve">\r
+<path d="M-472.8,494.7l6.3,5.7l-6.3,5.7v-3.8h-1.3c-3.2,0-6.3,1.3-7.6,3.8c0-4.7,2.8-7.6,7.9-7.6h0.9V494.7z"/>\r
+</svg>\r
index c6cbec1..a50b306 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-rtl-invert.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-rtl-invert.png differ
index 75b23b4..11fffcb 100644 (file)
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #FFFFFF }</style>
-    <g id="arched-arrow-rtl">
-        <path id="arrow" d="M13.401 8.542c-2.814-.027-4.549.978-5.513 1.823l-1.48-2.329-2.391 6.901 6.782.009-1.474-2.319c.668-.584 1.945-1.504 3.675-1.791 4.172-.69 6.925 1.949 6.925 1.949s-1.637-4.197-6.524-4.243z"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-487 489 24 24" enable-background="new -487 489 24 24" xml:space="preserve"><style>* { fill: #FFFFFF }</style>\r
+<path d="M-476.3,494.7l-6.3,5.7l6.3,5.7v-3.8h1.3c3.2,0,6.3,1.3,7.6,3.8c0-4.7-2.8-7.6-7.9-7.6h-0.9V494.7z"/>\r
+</svg>\r
index 0afcbfa..ed69a01 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-rtl.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/arched-arrow-rtl.png differ
index 01fc216..20875f3 100644 (file)
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-    <g id="arched-arrow-rtl">
-        <path id="arrow" d="M13.401 8.542c-2.814-.027-4.549.978-5.513 1.823l-1.48-2.329-2.391 6.901 6.782.009-1.474-2.319c.668-.584 1.945-1.504 3.675-1.791 4.172-.69 6.925 1.949 6.925 1.949s-1.637-4.197-6.524-4.243z"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-487 489 24 24" enable-background="new -487 489 24 24" xml:space="preserve">\r
+<path d="M-476.3,494.7l-6.3,5.7l6.3,5.7v-3.8h1.3c3.2,0,6.3,1.3,7.6,3.8c0-4.7-2.8-7.6-7.9-7.6h-0.9V494.7z"/>\r
+</svg>\r
index dfcfb7f..1b1e2ed 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/link-ltr-invert.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/link-ltr-invert.png differ
index d17622c..c98df5c 100644 (file)
@@ -1,6 +1,13 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #FFFFFF }</style>
-    <g>
-        <path d="M15.8 3.6c-2.1 0-3.6 1.9-5.1 3.3.2 0 .5-.1.8-.1.5 0 1 .1 1.5.3.8-.8 1.6-1.7 2.8-1.7.6 0 1.3.3 1.8.7 1 1 1 2.6 0 3.6l-2.6 2.6c-.4.4-1.2.7-1.8.7-1.4 0-2.1-.9-2.6-2l-1.3 1.3c.8 1.5 2 2.6 3.8 2.6 1.2 0 2.3-.5 3-1.3l2.6-2.6c.9-.9 1.5-2 1.5-3.3-.2-2.2-2.2-4.1-4.4-4.1zm-4.3 12.1l-.9.9c-.4.4-1.2.7-1.8.7-.6 0-1.3-.3-1.8-.7-1-1-1-2.7 0-3.6l2.6-2.6c.4-.4 1.2-.7 1.8-.7 1.4 0 2.1 1 2.6 2l1.3-1.3c-.8-1.5-2-2.6-3.8-2.6-1.2 0-2.3.5-3 1.3l-2.6 2.6c-1.7 1.7-1.7 4.4 0 6 1.6 1.6 4.4 1.7 5.9 0l1.9-1.9c-.3.1-.6.1-.9.1-.5 0-.9 0-1.3-.2z"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-487 489 24 24" enable-background="new -487 489 24 24" xml:space="preserve"><style>* { fill: #FFFFFF }</style>\r
+<g>\r
+       <path d="M-471.2,493.6c-2.1,0-3.6,1.9-5.1,3.3c0.2,0,0.5-0.1,0.8-0.1c0.5,0,1,0.1,1.5,0.3c0.8-0.8,1.6-1.7,2.8-1.7\r
+               c0.6,0,1.3,0.3,1.8,0.7c1,1,1,2.6,0,3.6l-2.6,2.6c-0.4,0.4-1.2,0.7-1.8,0.7c-1.4,0-2.1-0.9-2.6-2l-1.3,1.3c0.8,1.5,2,2.6,3.8,2.6\r
+               c1.2,0,2.3-0.5,3-1.3l2.6-2.6c0.9-0.9,1.5-2,1.5-3.3C-467,495.5-469,493.6-471.2,493.6z M-475.5,505.7l-0.9,0.9\r
+               c-0.4,0.4-1.2,0.7-1.8,0.7c-0.6,0-1.3-0.3-1.8-0.7c-1-1-1-2.7,0-3.6l2.6-2.6c0.4-0.4,1.2-0.7,1.8-0.7c1.4,0,2.1,1,2.6,2l1.3-1.3\r
+               c-0.8-1.5-2-2.6-3.8-2.6c-1.2,0-2.3,0.5-3,1.3l-2.6,2.6c-1.7,1.7-1.7,4.4,0,6c1.6,1.6,4.4,1.7,5.9,0l1.9-1.9\r
+               c-0.3,0.1-0.6,0.1-0.9,0.1C-474.7,505.9-475.1,505.9-475.5,505.7z"/>\r
+</g>\r
+</svg>\r
index 3b60a11..1fe66f1 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/link-ltr.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/link-ltr.png differ
index 1b332ce..841ba7d 100644 (file)
@@ -1,6 +1,13 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-    <g>
-        <path d="M15.8 3.6c-2.1 0-3.6 1.9-5.1 3.3.2 0 .5-.1.8-.1.5 0 1 .1 1.5.3.8-.8 1.6-1.7 2.8-1.7.6 0 1.3.3 1.8.7 1 1 1 2.6 0 3.6l-2.6 2.6c-.4.4-1.2.7-1.8.7-1.4 0-2.1-.9-2.6-2l-1.3 1.3c.8 1.5 2 2.6 3.8 2.6 1.2 0 2.3-.5 3-1.3l2.6-2.6c.9-.9 1.5-2 1.5-3.3-.2-2.2-2.2-4.1-4.4-4.1zm-4.3 12.1l-.9.9c-.4.4-1.2.7-1.8.7-.6 0-1.3-.3-1.8-.7-1-1-1-2.7 0-3.6l2.6-2.6c.4-.4 1.2-.7 1.8-.7 1.4 0 2.1 1 2.6 2l1.3-1.3c-.8-1.5-2-2.6-3.8-2.6-1.2 0-2.3.5-3 1.3l-2.6 2.6c-1.7 1.7-1.7 4.4 0 6 1.6 1.6 4.4 1.7 5.9 0l1.9-1.9c-.3.1-.6.1-.9.1-.5 0-.9 0-1.3-.2z"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-487 489 24 24" enable-background="new -487 489 24 24" xml:space="preserve">\r
+<g>\r
+       <path d="M-471.2,493.6c-2.1,0-3.6,1.9-5.1,3.3c0.2,0,0.5-0.1,0.8-0.1c0.5,0,1,0.1,1.5,0.3c0.8-0.8,1.6-1.7,2.8-1.7\r
+               c0.6,0,1.3,0.3,1.8,0.7c1,1,1,2.6,0,3.6l-2.6,2.6c-0.4,0.4-1.2,0.7-1.8,0.7c-1.4,0-2.1-0.9-2.6-2l-1.3,1.3c0.8,1.5,2,2.6,3.8,2.6\r
+               c1.2,0,2.3-0.5,3-1.3l2.6-2.6c0.9-0.9,1.5-2,1.5-3.3C-467,495.5-469,493.6-471.2,493.6z M-475.5,505.7l-0.9,0.9\r
+               c-0.4,0.4-1.2,0.7-1.8,0.7c-0.6,0-1.3-0.3-1.8-0.7c-1-1-1-2.7,0-3.6l2.6-2.6c0.4-0.4,1.2-0.7,1.8-0.7c1.4,0,2.1,1,2.6,2l1.3-1.3\r
+               c-0.8-1.5-2-2.6-3.8-2.6c-1.2,0-2.3,0.5-3,1.3l-2.6,2.6c-1.7,1.7-1.7,4.4,0,6c1.6,1.6,4.4,1.7,5.9,0l1.9-1.9\r
+               c-0.3,0.1-0.6,0.1-0.9,0.1C-474.7,505.9-475.1,505.9-475.5,505.7z"/>\r
+</g>\r
+</svg>\r
index 0400c19..0246e4d 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/menu-invert.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/menu-invert.png differ
index dddbbb8..61b8877 100644 (file)
@@ -1,6 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #FFFFFF }</style>
-    <g id="menu">
-        <path id="lines" d="M6 15h12c.553 0 1 .447 1 1v1c0 .553-.447 1-1 1h-12c-.553 0-1-.447-1-1v-1c0-.553.447-1 1-1zm-1-4v1c0 .553.447 1 1 1h12c.553 0 1-.447 1-1v-1c0-.553-.447-1-1-1h-12c-.553 0-1 .447-1 1zm0-5v1c0 .553.447 1 1 1h12c.553 0 1-.447 1-1v-1c0-.553-.447-1-1-1h-12c-.553 0-1 .447-1 1z"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-487 489 24 24" enable-background="new -487 489 24 24" xml:space="preserve"><style>* { fill: #FFFFFF }</style>\r
+<g id="menu">\r
+       <path id="lines" d="M-481,505h12c0.6,0,1,0.4,1,1v1c0,0.6-0.4,1-1,1h-12c-0.6,0-1-0.4-1-1v-1C-482,505.4-481.6,505-481,505z\r
+                M-482,501v1c0,0.6,0.4,1,1,1h12c0.6,0,1-0.4,1-1v-1c0-0.6-0.4-1-1-1h-12C-481.6,500-482,500.4-482,501z M-482,496v1\r
+               c0,0.6,0.4,1,1,1h12c0.6,0,1-0.4,1-1v-1c0-0.6-0.4-1-1-1h-12C-481.6,495-482,495.4-482,496z"/>\r
+</g>\r
+</svg>\r
index 0a78119..de7b1d2 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/menu.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/menu.png differ
index 50ac8a3..89fd978 100644 (file)
@@ -1,6 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-    <g id="menu">
-        <path id="lines" d="M6 15h12c.553 0 1 .447 1 1v1c0 .553-.447 1-1 1h-12c-.553 0-1-.447-1-1v-1c0-.553.447-1 1-1zm-1-4v1c0 .553.447 1 1 1h12c.553 0 1-.447 1-1v-1c0-.553-.447-1-1-1h-12c-.553 0-1 .447-1 1zm0-5v1c0 .553.447 1 1 1h12c.553 0 1-.447 1-1v-1c0-.553-.447-1-1-1h-12c-.553 0-1 .447-1 1z"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-487 489 24 24" enable-background="new -487 489 24 24" xml:space="preserve">\r
+<g id="menu">\r
+       <path id="lines" d="M-481,505h12c0.6,0,1,0.4,1,1v1c0,0.6-0.4,1-1,1h-12c-0.6,0-1-0.4-1-1v-1C-482,505.4-481.6,505-481,505z\r
+                M-482,501v1c0,0.6,0.4,1,1,1h12c0.6,0,1-0.4,1-1v-1c0-0.6-0.4-1-1-1h-12C-481.6,500-482,500.4-482,501z M-482,496v1\r
+               c0,0.6,0.4,1,1,1h12c0.6,0,1-0.4,1-1v-1c0-0.6-0.4-1-1-1h-12C-481.6,495-482,495.4-482,496z"/>\r
+</g>\r
+</svg>\r
index 7060db7..ffe3601 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/quotes-ltr.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/quotes-ltr.png differ
index dc1c06f..b3b923e 100644 (file)
@@ -1,6 +1,11 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-    <g>
-        <path d="M19.9 8.7c.3-.1.6-.3.8-.6s.3-.7.3-1.1v-1c-1.3.2-1.9.2-3.3.8-.9.5-1.6 1.1-2.2 1.8s-2.5 3.4-2.5 7.4v4h6c1.1 0 2-.9 2-2v-6h-4s.1-.9.8-1.8c.6-.7 1.3-1.2 2.1-1.5zm-14.4-.1c-.6.7-2.5 3.4-2.5 7.4v4h6c1.1 0 2-.9 2-2v-6h-4s.1-.9.8-1.8c.6-.7 1.3-1.2 2.1-1.5.3-.1.6-.3.8-.6s.3-.7.3-1.1v-1c-1.3.2-1.9.2-3.3.8-.8.5-1.6 1.1-2.2 1.8z"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-487 489 24 24" enable-background="new -487 489 24 24" xml:space="preserve">\r
+<g>\r
+       <path d="M-468.9,498.1c0.2-0.1,0.5-0.2,0.6-0.5s0.2-0.5,0.2-0.9V496c-1,0.2-1.5,0.2-2.6,0.6c-0.7,0.4-1.2,0.9-1.7,1.4\r
+               c-0.5,0.5-1.9,2.6-1.9,5.8v3.1h4.7c0.9,0,1.6-0.7,1.6-1.6v-4.7h-3.1c0,0,0.1-0.7,0.6-1.4C-470,498.7-469.5,498.3-468.9,498.1z\r
+                M-480.1,498c-0.5,0.5-1.9,2.9-1.9,6v2.9h4.7c0.9,0,1.6-0.7,1.6-1.6v-4.7h-3.1c0,0,0.1-0.7,0.6-1.4c0.5-0.5,1-0.9,1.6-1.2\r
+               c0.2-0.1,0.5-0.2,0.6-0.5s0.2-0.5,0.2-0.9V496c-1,0.2-1.5,0.2-2.6,0.6C-479,497-479.6,497.5-480.1,498z"/>\r
+</g>\r
+</svg>\r
index df0facf..a2acf5e 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/quotes-rtl.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/quotes-rtl.png differ
index 3a8b701..b40a8ac 100644 (file)
@@ -1,6 +1,11 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-    <g id="g552">
-        <path d="M4.1 8.7c-.3-.1-.6-.3-.8-.6-.2-.3-.3-.7-.3-1.1v-1c1.3.2 1.9.2 3.3.8.9.5 1.6 1.1 2.2 1.8.6.7 2.5 3.4 2.5 7.4v4h-6c-1.1 0-2-.9-2-2v-6h4s-.1-.9-.8-1.8c-.6-.7-1.3-1.2-2.1-1.5zm14.4-.1c.6.7 2.5 3.4 2.5 7.4v4h-6c-1.1 0-2-.9-2-2v-6h4s-.1-.9-.8-1.8c-.6-.7-1.3-1.2-2.1-1.5-.3-.1-.6-.3-.8-.6-.2-.3-.3-.7-.3-1.1v-1c1.3.2 1.9.2 3.3.8.8.5 1.6 1.1 2.2 1.8z" id="path554"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-487 489 24 24" enable-background="new -487 489 24 24" xml:space="preserve">\r
+<g>\r
+       <path d="M-479.5,499.3c0.5,0.7,0.6,1.4,0.6,1.4h-3.1v4.7c0,0.9,0.7,1.6,1.6,1.6h4.7v-3.1c0-3.1-1.5-5.2-1.9-5.8\r
+               c-0.5-0.5-1-1-1.7-1.4c-1.1-0.5-1.6-0.5-2.6-0.6v0.8c0,0.3,0.1,0.6,0.2,0.9s0.4,0.4,0.6,0.5C-480.5,498.3-480,498.7-479.5,499.3z\r
+                M-471.7,496.6c-1.1-0.5-1.6-0.5-2.6-0.6v0.8c0,0.3,0.1,0.6,0.2,0.9s0.4,0.4,0.6,0.5c0.6,0.2,1.2,0.6,1.6,1.2\r
+               c0.5,0.7,0.6,1.4,0.6,1.4h-3.1v4.7c0,0.9,0.7,1.6,1.6,1.6h4.7V504c0-3.1-1.5-5.4-1.9-6C-470.4,497.5-471,497-471.7,496.6z"/>\r
+</g>\r
+</svg>\r
diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-constructive.png b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-constructive.png
new file mode 100644 (file)
index 0000000..66af375
Binary files /dev/null and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-constructive.png differ
diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-constructive.svg b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-constructive.svg
new file mode 100644 (file)
index 0000000..82171db
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #00AF89 }</style>
+    <g id="tag">
+        <path d="M18.748 11.717c.389.389.389 1.025 0 1.414l-4.949 4.95c-.389.389-1.025.389-1.414 0l-6.01-6.01c-.389-.389-.707-1.157-.707-1.707l-.001-4.364c0-.55.45-1 1-1h4.364c.55 0 1.318.318 1.707.707l6.01 6.01zm-10.644-4.261c-.579.576-.578 1.514-.001 2.093.578.577 1.516.577 2.095.001.576-.578.576-1.517 0-2.095-.581-.576-1.518-.577-2.094.001z"/>
+    </g>
+</svg>
diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.png b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.png
new file mode 100644 (file)
index 0000000..1de90d4
Binary files /dev/null and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.png differ
diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.svg b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.svg
new file mode 100644 (file)
index 0000000..3d48512
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #D11D13 }</style>
+    <g id="tag">
+        <path d="M18.748 11.717c.389.389.389 1.025 0 1.414l-4.949 4.95c-.389.389-1.025.389-1.414 0l-6.01-6.01c-.389-.389-.707-1.157-.707-1.707l-.001-4.364c0-.55.45-1 1-1h4.364c.55 0 1.318.318 1.707.707l6.01 6.01zm-10.644-4.261c-.579.576-.578 1.514-.001 2.093.578.577 1.516.577 2.095.001.576-.578.576-1.517 0-2.095-.581-.576-1.518-.577-2.094.001z"/>
+    </g>
+</svg>
diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-progressive.png b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-progressive.png
new file mode 100644 (file)
index 0000000..a6759e2
Binary files /dev/null and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-progressive.png differ
diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-progressive.svg b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-progressive.svg
new file mode 100644 (file)
index 0000000..f52e06c
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #347BFF }</style>
+    <g id="tag">
+        <path d="M18.748 11.717c.389.389.389 1.025 0 1.414l-4.949 4.95c-.389.389-1.025.389-1.414 0l-6.01-6.01c-.389-.389-.707-1.157-.707-1.707l-.001-4.364c0-.55.45-1 1-1h4.364c.55 0 1.318.318 1.707.707l6.01 6.01zm-10.644-4.261c-.579.576-.578 1.514-.001 2.093.578.577 1.516.577 2.095.001.576-.578.576-1.517 0-2.095-.581-.576-1.518-.577-2.094.001z"/>
+    </g>
+</svg>
diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-warning.png b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-warning.png
new file mode 100644 (file)
index 0000000..77fc366
Binary files /dev/null and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-warning.png differ
diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-warning.svg b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-warning.svg
new file mode 100644 (file)
index 0000000..337adb6
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #FF5D00 }</style>
+    <g id="tag">
+        <path d="M18.748 11.717c.389.389.389 1.025 0 1.414l-4.949 4.95c-.389.389-1.025.389-1.414 0l-6.01-6.01c-.389-.389-.707-1.157-.707-1.707l-.001-4.364c0-.55.45-1 1-1h4.364c.55 0 1.318.318 1.707.707l6.01 6.01zm-10.644-4.261c-.579.576-.578 1.514-.001 2.093.578.577 1.516.577 2.095.001.576-.578.576-1.517 0-2.095-.581-.576-1.518-.577-2.094.001z"/>
+    </g>
+</svg>
index 55f3d1f..f18841d 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-down-invert.png and b/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-down-invert.png differ
index 6ee6803..847f935 100644 (file)
@@ -1,6 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><style>* { fill: #FFFFFF }</style>
-    <g id="down">
-        <path id="arrow" d="M11 4l-.463-.467c-.45-.446-1.186-.445-1.637 0l-2.897 2.89-2.915-2.898c-.45-.446-1.176-.43-1.626.017L1 4l5.003 5v-.01V9L11 4"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve"><style>* { fill: #FFFFFF }</style>\r
+<g id="down">\r
+       <path id="arrow" d="M883.3,341H116.7L500,724.3l0,0l0,0L883.3,341"/>\r
+</g>\r
+</svg>\r
index db8c51d..15ec586 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-down.png and b/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-down.png differ
index 0c0da8e..1738057 100644 (file)
@@ -1,6 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
-    <g id="down">
-        <path id="arrow" d="M11 4l-.463-.467c-.45-.446-1.186-.445-1.637 0l-2.897 2.89-2.915-2.898c-.45-.446-1.176-.43-1.626.017L1 4l5.003 5v-.01V9L11 4"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">\r
+<g id="down">\r
+       <path id="arrow" d="M883.3,341H116.7L500,724.3l0,0l0,0L883.3,341"/>\r
+</g>\r
+</svg>\r
index 9edc9de..22bf897 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-ltr-invert.png and b/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-ltr-invert.png differ
index 64203e1..2a91c02 100644 (file)
@@ -1,6 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><style>* { fill: #FFFFFF }</style>
-    <g id="ltr">
-        <path id="arrow" d="M4 1l-.47.463c-.444.45-.444 1.186 0 1.637L6.423 6l-2.9 2.91c-.444.45-.43 1.177.02 1.627L4 11l5-5h-.01H9L4 1"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-493 495 12 12" enable-background="new -493 495 12 12" xml:space="preserve"><style>* { fill: #FFFFFF }</style>\r
+<g id="ltr">\r
+       <path id="arrow" d="M-489,496v10l5-5h0h0L-489,496"/>\r
+</g>\r
+</svg>\r
index 19e9820..4440329 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-ltr.png and b/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-ltr.png differ
index 0d11e3e..fb366e6 100644 (file)
@@ -1,6 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
-    <g id="ltr">
-        <path id="arrow" d="M4 1l-.47.463c-.444.45-.444 1.186 0 1.637L6.423 6l-2.9 2.91c-.444.45-.43 1.177.02 1.627L4 11l5-5h-.01H9L4 1"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-493 495 12 12" enable-background="new -493 495 12 12" xml:space="preserve">\r
+<g id="ltr">\r
+       <path id="arrow" d="M-489,496v10l5-5h0h0L-489,496"/>\r
+</g>\r
+</svg>\r
index ac769a3..4f3c9d1 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-rtl-invert.png and b/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-rtl-invert.png differ
index 3d36e4f..3cce872 100644 (file)
@@ -1,6 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><style>* { fill: #FFFFFF }</style>
-    <g id="rtl">
-        <path id="arrow" d="M8 11l.47-.463c.444-.45.444-1.186 0-1.637L5.576 6l2.9-2.91c.444-.45.43-1.177-.02-1.627L8 1 3 6h.01H3l5 5"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-493 495 12 12" enable-background="new -493 495 12 12" xml:space="preserve"><style>* { fill: #FFFFFF }</style>\r
+<g id="rtl">\r
+       <path id="arrow" d="M-485,506v-10l-5,5h0h0L-485,506"/>\r
+</g>\r
+</svg>\r
index d912a1b..5f1f868 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-rtl.png and b/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-rtl.png differ
index e4c04b8..62b6bb5 100644 (file)
@@ -1,6 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
-    <g id="rtl">
-        <path id="arrow" d="M8 11l.47-.463c.444-.45.444-1.186 0-1.637L5.576 6l2.9-2.91c.444-.45.43-1.177-.02-1.627L8 1 3 6h.01H3l5 5"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-493 495 12 12" enable-background="new -493 495 12 12" xml:space="preserve">\r
+<g id="rtl">\r
+       <path id="arrow" d="M-485,506v-10l-5,5h0h0L-485,506"/>\r
+</g>\r
+</svg>\r
index c8f4402..e6fad56 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-up-invert.png and b/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-up-invert.png differ
index 9bbde71..50da8de 100644 (file)
@@ -1,6 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><style>* { fill: #FFFFFF }</style>
-    <g id="up">
-        <path id="arrow" d="M1 8l.463.47c.45.444 1.186.444 1.637 0L6 5.567l2.91 2.91c.45.444 1.177.43 1.627-.02L11 8 6 2.99V3v-.01L1 8"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-493 495 12 12" enable-background="new -493 495 12 12" xml:space="preserve"><style>* { fill: #FFFFFF }</style>\r
+<g id="up">\r
+       <path id="arrow" d="M-492,503h10l-5-5v0v0L-492,503"/>\r
+</g>\r
+</svg>\r
index 214b12e..38d01c7 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-up.png and b/resources/lib/oojs-ui/themes/mediawiki/images/indicators/arrow-up.png differ
index ad41a87..20e734f 100644 (file)
@@ -1,6 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
-    <g id="up">
-        <path id="arrow" d="M1 8l.463.47c.45.444 1.186.444 1.637 0L6 5.567l2.91 2.91c.45.444 1.177.43 1.627-.02L11 8 6 2.99V3v-.01L1 8"/>
-    </g>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<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"\r
+        viewBox="-493 495 12 12" enable-background="new -493 495 12 12" xml:space="preserve">\r
+<g id="up">\r
+       <path id="arrow" d="M-492,503h10l-5-5v0v0L-492,503"/>\r
+</g>\r
+</svg>\r
index 6b33012..56dba70 100644 (file)
@@ -35,7 +35,7 @@
 
                // Add form submission handler
                $( '#editform' ).submit( function () {
-                       allowCloseWindow();
+                       allowCloseWindow.release();
                } );
        } );
 
index e91302b..f6bf382 100644 (file)
@@ -60,3 +60,8 @@
 
 // Global border radius to be used to buttons and inputs
 @borderRadius: 2px;
+
+
+// Icon related variables
+@iconSize: 1.4em;
+@iconGutterWidth: 1em;
index 4bd747b..8617f7c 100644 (file)
@@ -5,7 +5,7 @@ jQuery( function ( $ ) {
        var $preftoc, $preferences, $fieldsets, $legends,
                hash, labelFunc,
                $tzSelect, $tzTextbox, $localtimeHolder, servertime,
-               $checkBoxes, allowCloseWindowFn;
+               $checkBoxes, allowCloseWindow;
 
        labelFunc = function () {
                return this.id.replace( /^mw-prefsection/g, 'preftab' );
@@ -266,7 +266,7 @@ jQuery( function ( $ ) {
        // Set up a message to notify users if they try to leave the page without
        // saving.
        $( '#mw-prefs-form' ).data( 'origdata', $( '#mw-prefs-form' ).serialize() );
-       allowCloseWindowFn = mediaWiki.confirmCloseWindow( {
+       allowCloseWindow = mediaWiki.confirmCloseWindow( {
                test: function () {
                        return $( '#mw-prefs-form' ).serialize() !== $( '#mw-prefs-form' ).data( 'origdata' );
                },
@@ -274,6 +274,6 @@ jQuery( function ( $ ) {
                message: mediaWiki.msg( 'prefswarning-warning', mediaWiki.msg( 'saveprefs' ) ),
                namespace: 'prefswarning'
        } );
-       $( '#mw-prefs-form' ).submit( allowCloseWindowFn );
-       $( '#mw-prefs-restoreprefs' ).click( allowCloseWindowFn );
+       $( '#mw-prefs-form' ).submit( allowCloseWindow.release() );
+       $( '#mw-prefs-restoreprefs' ).click( allowCloseWindow.release() );
 } );
index eeccda5..d0dfb28 100644 (file)
                } );
 
                $uploadForm.submit( function () {
-                       allowCloseWindow();
+                       allowCloseWindow.release();
                } );
        } );
 }( mediaWiki, jQuery ) );
index ad951b0..5107f8e 100644 (file)
@@ -1,8 +1,5 @@
 @import "mediawiki.mixins";
-
-// Variables
-@iconSize: 1.4em;
-@gutterWidth: 1em;
+@import "mediawiki.ui/variables";
 
 // Mixins
 .mixin-mw-ui-icon-bgimage(@iconSvg, @iconPng) {
@@ -42,7 +39,7 @@
        //
        // Styleguide 6.1.1.
        &.mw-ui-icon-element {
-               @width: @iconSize + ( 2 * @gutterWidth );
+               @width: @iconSize + ( 2 * @iconGutterWidth );
 
                text-indent: -999px;
                overflow: hidden;
@@ -53,7 +50,7 @@
                        left: 0;
                        right: 0;
                        position: absolute;
-                       margin: 0 @gutterWidth;
+                       margin: 0 @iconGutterWidth;
                }
        }
 
@@ -81,7 +78,7 @@
                &:before {
                        position: relative;
                        width: @iconSize;
-                       margin-right: @gutterWidth;
+                       margin-right: @iconGutterWidth;
                }
        }
 
@@ -96,7 +93,7 @@
                        position: relative;
                        float: right;
                        width: @iconSize;
-                       margin-left: @gutterWidth;
+                       margin-left: @iconGutterWidth;
                }
        }
 }
index 7fc5c42..8d1faa6 100644 (file)
@@ -1,3 +1,4 @@
+/* jshint devel: true */
 ( function ( mw, $ ) {
        /**
         * @method confirmCloseWindow
@@ -7,11 +8,22 @@
         * work in most browsers.)
         *
         * This supersedes any previous onbeforeunload handler. If there was a handler before, it is
-        * restored when you execute the returned function.
+        * restored when you execute the returned release() function.
         *
         *     var allowCloseWindow = mw.confirmCloseWindow();
         *     // ... do stuff that can't be interrupted ...
-        *     allowCloseWindow();
+        *     allowCloseWindow.release();
+        *
+        * The second function returned is a trigger function to trigger the check and an alert
+        * window manually, e.g.:
+        *
+        *     var allowCloseWindow = mw.confirmCloseWindow();
+        *     // ... do stuff that can't be interrupted ...
+        *     if ( allowCloseWindow.trigger() ) {
+        *         // don't do anything (e.g. destroy the input field)
+        *     } else {
+        *         // do whatever you wanted to do
+        *     }
         *
         * @param {Object} [options]
         * @param {string} [options.namespace] Namespace for the event registration
         * @param {string} options.message.return The string message to show in the confirm dialog.
         * @param {Function} [options.test]
         * @param {boolean} [options.test.return=true] Whether to show the dialog to the user.
-        * @return {Function} Execute this when you want to allow the user to close the window
+        * @return {Object} An object of functions to work with this module
         */
        mw.confirmCloseWindow = function ( options ) {
                var savedUnloadHandler,
                        mainEventName = 'beforeunload',
-                       showEventName = 'pageshow';
+                       showEventName = 'pageshow',
+                       message;
 
                options = $.extend( {
                        message: mw.message( 'mwe-prevent-close' ).text(),
                        showEventName += '.' + options.namespace;
                }
 
+               if ( $.isFunction( options.message ) ) {
+                       message = options.message();
+               } else {
+                       message = options.message;
+               }
+
                $( window ).on( mainEventName, function () {
                        if ( options.test() ) {
                                // remove the handler while the alert is showing - otherwise breaks caching in Firefox (3?).
                                }, 1 );
 
                                // show an alert with this message
-                               if ( $.isFunction( options.message ) ) {
-                                       return options.message();
-                               } else {
-                                       return options.message;
-                               }
+                               return message;
                        }
                } ).on( showEventName, function () {
                        // Re-add onbeforeunload handler
                        }
                } );
 
-               // return the function they can use to stop this
-               return function () {
-                       $( window ).off( mainEventName + ' ' + showEventName );
+               /**
+                * Return the object with functions to release and manually trigger the confirm alert
+                * @ignore
+                */
+               return {
+                       /**
+                        * Remove all event listeners and don't show an alert anymore, if the user wants to leave
+                        * the page.
+                        * @ignore
+                        */
+                       release: function () {
+                               $( window ).off( mainEventName + ' ' + showEventName );
+                       },
+                       /**
+                        * Trigger the module's function manually: Check, if options.test() returns true and show
+                        * an alert to the user if he/she want to leave this page. Returns false, if options.test() returns
+                        * false or the user cancelled the alert window (~don't leave the page), true otherwise.
+                        * @ignore
+                        * @return boolean
+                        */
+                       trigger: function () {
+                               // use confirm to show the message to the user (if options.text() is true)
+                               if ( options.test() && !confirm( message ) ) {
+                                       // the user want to keep the actual page
+                                       return false;
+                               }
+                               // otherwise return true
+                               return true;
+                       }
                };
        };
 } )( mediaWiki, jQuery );
index b5ea7b7..a91cc95 100644 (file)
@@ -23,11 +23,11 @@ class ArrayUtilsTest extends PHPUnit_Framework_TestCase {
        }
 
        function provideFindLowerBound() {
-               $self = $this;
-               $indexValueCallback = function ( $size ) use ( $self ) {
-                       return function ( $val ) use ( $self, $size ) {
-                               $self->assertTrue( $val >= 0 );
-                               $self->assertTrue( $val < $size );
+               $that = $this;
+               $indexValueCallback = function ( $size ) use ( $that ) {
+                       return function ( $val ) use ( $that, $size ) {
+                               $that->assertTrue( $val >= 0 );
+                               $that->assertTrue( $val < $size );
                                return $val;
                        };
                };
index 4300197..cec662a 100644 (file)
@@ -70,7 +70,7 @@ class ProcessCacheLRUTest extends PHPUnit_Framework_TestCase {
 
        /**
         * @dataProvider provideInvalidConstructorArg
-        * @expectedException UnexpectedValueException
+        * @expectedException Wikimedia\Assert\ParameterAssertionException
         * @covers ProcessCacheLRU::__construct
         */
        public function testConstructorGivenInvalidValue( $maxSize ) {
index b95316c..d47ffa9 100644 (file)
@@ -36,6 +36,10 @@ class ExtensionProcessorTest extends MediaWikiTestCase {
        }
 
        public static function provideRegisterHooks() {
+               // Format:
+               // Current $wgHooks
+               // Content in extension.json
+               // Expected value of $wgHooks
                return array(
                        // No hooks
                        array(
@@ -64,6 +68,22 @@ class ExtensionProcessorTest extends MediaWikiTestCase {
                                        'FooBaz' => array( 'FooBazCallback' ),
                                ),
                        ),
+                       // Callbacks for FooBaz wrapped in an array
+                       array(
+                               array(),
+                               array( 'Hooks' => array( 'FooBaz' => array( 'Callback1' ) ) ) + self::$default,
+                               array(
+                                       'FooBaz' => array( 'Callback1' ),
+                               ),
+                       ),
+                       // Multiple callbacks for FooBaz hook
+                       array(
+                               array(),
+                               array( 'Hooks' => array( 'FooBaz' => array( 'Callback1', 'Callback2' ) ) ) + self::$default,
+                               array(
+                                       'FooBaz' => array( 'Callback1', 'Callback2' ),
+                               ),
+                       ),
                );
        }
 
index d0a7980..4305ceb 100644 (file)
@@ -96,17 +96,17 @@ class CachingSiteStoreTest extends MediaWikiTestCase {
                        ->getMock();
 
                // php 5.3 compatibility!
-               $self = $this;
+               $that = $this;
 
                $dbSiteStore->expects( $this->any() )
                        ->method( 'getSite' )
-                       ->will( $this->returnValue( $self->getTestSite() ) );
+                       ->will( $this->returnValue( $that->getTestSite() ) );
 
                $dbSiteStore->expects( $this->any() )
                        ->method( 'getSites' )
-                       ->will( $this->returnCallback( function() use( $self ) {
+                       ->will( $this->returnCallback( function() use ( $that ) {
                                $siteList = new SiteList();
-                               $siteList->setSite( $self->getTestSite() );
+                               $siteList->setSite( $that->getTestSite() );
 
                                return $siteList;
                        } ) );
index cb0316a..64b195d 100644 (file)
@@ -34,11 +34,11 @@ class SiteImporterTest extends PHPUnit_Framework_TestCase {
        private function newSiteImporter( array $expectedSites, $errorCount ) {
                $store = $this->getMock( 'SiteStore' );
 
-               $self = $this;
+               $that = $this;
                $store->expects( $this->once() )
                        ->method( 'saveSites' )
-                       ->will( $this->returnCallback( function ( $sites ) use ( $expectedSites, $self ) {
-                               $self->assertSitesEqual( $expectedSites, $sites );
+                       ->will( $this->returnCallback( function ( $sites ) use ( $expectedSites, $that ) {
+                               $that->assertSitesEqual( $expectedSites, $sites );
                        } ) );
 
                $store->expects( $this->any() )