[MediaWiki-commits] [Gerrit] renderer.article: Use .html() instead of .text() in getProce... - change (mediawiki...Popups)
Prtksxna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199840 Change subject: renderer.article: Use .html() instead of .text() in getProcessesElements .. renderer.article: Use .html() instead of .text() in getProcessesElements Both the title and the extract are being html escaped thus producing string like #039; and quot; when used with .text() Moving to html() solves this problem without jeopardizing the XSS attack test case as both strings were already escaped. This undoes parts of I0bbff84532f63cac67af1bf889c328ec6ff2 and thus also partially affects T76378. Bug: T93720 Change-Id: I6bbc52e427dc636b7b0be1ad4f749d9273ff61b3 --- M resources/ext.popups.renderer.article.js M tests/qunit/ext.popups.renderer.article.test.js 2 files changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/40/199840/1 diff --git a/resources/ext.popups.renderer.article.js b/resources/ext.popups.renderer.article.js index 728606b..d1f8334 100644 --- a/resources/ext.popups.renderer.article.js +++ b/resources/ext.popups.renderer.article.js @@ -171,7 +171,7 @@ $.each( extract, function ( index, part ) { if ( part.indexOf( boldIdentifier ) === 0 ) { - elements.push( $( 'b' ).text( part.substring( boldIdentifier.length ) ) ); + elements.push( $( 'b' ).html( part.substring( boldIdentifier.length ) ) ); } else { elements.push( part ); } diff --git a/tests/qunit/ext.popups.renderer.article.test.js b/tests/qunit/ext.popups.renderer.article.test.js index 9d1622e..0e33c94 100644 --- a/tests/qunit/ext.popups.renderer.article.test.js +++ b/tests/qunit/ext.popups.renderer.article.test.js @@ -2,7 +2,7 @@ QUnit.module( 'ext.popups' ); QUnit.test( 'render.article.getProcessedElements', function ( assert ) { - QUnit.expect( 12 ); + QUnit.expect( 13 ); function test ( extract, title, expected, msg ) { var $div = $( 'div' ).append( @@ -73,11 +73,17 @@ test( 'Foo\'s pub is a pub in Bar', 'Foo\'s pub', - 'bFooamp;#039;s pub/b is a pub in Bar', + 'bFoo\'s pub/b is a pub in Bar', 'Correct escaping' ); test( + '\Heroes\ is a David Bowie album', '\Heroes\', + 'b\Heroes\/b is a David Bowie album', + 'Quotes in title' + ); + + test( '*Testing if Things are correctly identified', 'Things', '*Testing if bThings/b are correctly identified', 'Article that begins with asterisk' -- To view, visit https://gerrit.wikimedia.org/r/199840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6bbc52e427dc636b7b0be1ad4f749d9273ff61b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Prtksxna psax...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace Html::... with self::... in the Html class - change (mediawiki/core)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/199844 Change subject: Replace Html::... with self::... in the Html class .. Replace Html::... with self::... in the Html class How cool is that, I can call a patch SelfHTML. ;-) Change-Id: I17d36bc45a349c92715b88004aaae046d4f7be1c --- M includes/Html.php 1 file changed, 24 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/44/199844/1 diff --git a/includes/Html.php b/includes/Html.php index ed77729..6f22243 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -169,7 +169,7 @@ * @return string Raw HTML */ public static function linkButton( $contents, $attrs, $modifiers = array() ) { - return Html::element( 'a', + return self::element( 'a', self::buttonAttributes( $attrs, $modifiers ), $contents ); @@ -191,7 +191,7 @@ public static function submitButton( $contents, $attrs, $modifiers = array() ) { $attrs['type'] = 'submit'; $attrs['value'] = $contents; - return Html::element( 'input', self::buttonAttributes( $attrs, $modifiers ) ); + return self::element( 'input', self::buttonAttributes( $attrs, $modifiers ) ); } /** @@ -460,7 +460,7 @@ * * @par Numerical array * @code -* Html::element( 'em', array( +* self::element( 'em', array( * 'class' = array( 'foo', 'bar' ) * ) ); * // gives 'em class=foo bar/em' @@ -468,7 +468,7 @@ * * @par Associative array * @code -* Html::element( 'em', array( +* self::element( 'em', array( * 'class' = array( 'foo', 'bar', 'foo' = false, 'quux' = true ) * ) ); * // gives 'em class=bar quux/em' @@ -707,7 +707,7 @@ * @param array $value Value attribute * @param string $type Type attribute * @param array $attribs Associative array of miscellaneous extra -* attributes, passed to Html::element() +* attributes, passed to self::element() * @return string Raw HTML */ public static function input( $name, $value = '', $type = 'text', $attribs = array() ) { @@ -715,7 +715,7 @@ $attribs['value'] = $value; $attribs['name'] = $name; if ( in_array( $type, array( 'text', 'search', 'email', 'password', 'number' ) ) ) { - $attribs = Html::getTextInputAttributes( $attribs ); + $attribs = self::getTextInputAttributes( $attribs ); } return self::element( 'input', $attribs ); } @@ -787,7 +787,7 @@ * @param string $name Name attribute * @param string $value Value attribute * @param array $attribs Associative array of miscellaneous extra -* attributes, passed to Html::element() +* attributes, passed to self::element() * @return string Raw HTML */ public static function hidden( $name, $value, $attribs = array() ) { @@ -803,7 +803,7 @@ * @param string $name Name attribute * @param string $value Value attribute * @param array $attribs Associative array of miscellaneous extra -* attributes, passed to Html::element() +* attributes, passed to self::element() * @return string Raw HTML */ public static function textarea( $name, $value = '', $attribs = array() ) { @@ -818,7 +818,7 @@ } else { $spacedValue = $value; } - return self::element( 'textarea', Html::getTextInputAttributes( $attribs ), $spacedValue ); + return self::element( 'textarea', self::getTextInputAttributes( $attribs ), $spacedValue ); } /** @@ -889,7 +889,7 @@ } elseif ( is_int( $nsId ) ) { $nsName = $wgContLang-convertNamespace( $nsId ); } - $optionsHtml[] = Html::element( + $optionsHtml[] = self::element( 'option', array( 'disabled' = in_array( $nsId, $params['disable'] ), 'value' = $nsId, @@ -908,7 +908,7 @@ $ret = ''; if ( isset( $params['label'] ) ) { - $ret .= Html::element( + $ret .= self::element( 'label', array( 'for' = isset( $selectAttribs['id'] ) ? $selectAttribs['id'] : null,
[MediaWiki-commits] [Gerrit] Use update callout widget for the new article campaign dialog - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/199847 Change subject: Use update callout widget for the new article campaign dialog .. Use update callout widget for the new article campaign dialog Change-Id: I6458f120c9cf5e7fdeb0f9c310665ffee5dacd12 --- M modules/campaigns/ext.cx.campaigns.newarticle.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/47/199847/1 diff --git a/modules/campaigns/ext.cx.campaigns.newarticle.js b/modules/campaigns/ext.cx.campaigns.newarticle.js index f729371..cdc7056 100644 --- a/modules/campaigns/ext.cx.campaigns.newarticle.js +++ b/modules/campaigns/ext.cx.campaigns.newarticle.js @@ -36,7 +36,7 @@ $trigger.callout( { trigger: 'auto', - gravity: $.fn.callout.autoNEW, + direction: $.fn.callout.autoDirection( '1' ), content: $banner } ); -- To view, visit https://gerrit.wikimedia.org/r/199847 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6458f120c9cf5e7fdeb0f9c310665ffee5dacd12 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] settings: Use .text() instead of .html() for option's label - change (mediawiki...Popups)
jenkins-bot has submitted this change and it was merged. Change subject: settings: Use .text() instead of .html() for option's label .. settings: Use .text() instead of .html() for option's label Bug: T88171 Change-Id: I5d4631870f916194901f897839cad4c90c2d8d01 --- M resources/ext.popups.settings.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: CSteipp: Looks good to me, but someone else must approve Werdna: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/ext.popups.settings.js b/resources/ext.popups.settings.js index 636d9f0..7759e6f 100644 --- a/resources/ext.popups.settings.js +++ b/resources/ext.popups.settings.js @@ -116,7 +116,7 @@ } ), $label = $( 'label' ) .attr( 'for', domId ) - .html( content[ 1 ] ) + .text( content[ 1 ] ) .prepend( $( 'span' ).text( content[ 0 ] ) ), $p = $( 'p' ).append( $input, $label ); -- To view, visit https://gerrit.wikimedia.org/r/199210 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d4631870f916194901f897839cad4c90c2d8d01 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Prtksxna psax...@wikimedia.org Gerrit-Reviewer: CSteipp cste...@wikimedia.org Gerrit-Reviewer: Werdna agarr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] icinga: check its own configuration - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/199841 Change subject: icinga: check its own configuration .. icinga: check its own configuration At the moment, whenever one puppet change breaks the icinga config we get exactly one puppet failure from neon, which then recovers (as the icinga config will be reloaded just once), but it seems we can't notice it promptly. The net effect is that the icinga config is often broken and it requires me and others to fix it a posteriori when we're doing another change. Introducting an icinga check on its own configuration should allow us to notice the problem more explicitly, and persistently. Change-Id: I166e1113478e64f9763702f9b391e78027edcafe --- M modules/icinga/manifests/init.pp A modules/nagios_common/files/check_commands/check_icinga_config M modules/nagios_common/manifests/check_command.pp M modules/nagios_common/manifests/commands.pp A modules/nagios_common/templates/check_icinga_config.cfg.erb 5 files changed, 33 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/41/199841/1 diff --git a/modules/icinga/manifests/init.pp b/modules/icinga/manifests/init.pp index 7beb4b8..780cd6d 100644 --- a/modules/icinga/manifests/init.pp +++ b/modules/icinga/manifests/init.pp @@ -155,4 +155,10 @@ group = 'www-data', mode = '0664', } + +montioring::service { 'check_icinga_config': +description = 'Check correctness of the icinga configuration', +check_command = 'check_icinga_config', +normal_check_interval = 10, +} } diff --git a/modules/nagios_common/files/check_commands/check_icinga_config b/modules/nagios_common/files/check_commands/check_icinga_config new file mode 100755 index 000..208240b --- /dev/null +++ b/modules/nagios_common/files/check_commands/check_icinga_config @@ -0,0 +1,11 @@ +#!/bin/bash +set -u +CONFIG_FILE=${1} +/usr/sbin/icinga -v ${CONFIG_FILE} /dev/null 21 +RETVAL=$? +if [ ${RETVAL} -eq 0 ]; then +echo Icinga configuration is correct +exit 0 +fi; +echo Icinga configuration contains errors, please check! +exit 2 diff --git a/modules/nagios_common/manifests/check_command.pp b/modules/nagios_common/manifests/check_command.pp index d2ce446..f3f9013 100644 --- a/modules/nagios_common/manifests/check_command.pp +++ b/modules/nagios_common/manifests/check_command.pp @@ -82,7 +82,7 @@ # Path to source for the plugin configuration. # Defaults to puppet:///modules/nagios_common/check_commands/$title.cfg # -# [*source*] +# [*content*] # String content to use for the plugin configuration. # Should not be used with the source parameter. # diff --git a/modules/nagios_common/manifests/commands.pp b/modules/nagios_common/manifests/commands.pp index d353e58..c8264b7 100644 --- a/modules/nagios_common/manifests/commands.pp +++ b/modules/nagios_common/manifests/commands.pp @@ -93,6 +93,16 @@ group = $group, } +# Check that the icinga config works +nagios_common::check_command { 'check_icinga_config': +ensure = present, +config_content= template('nagios_common/check_icinga_config.cfg.erb'), +config_dir = $config_dir, +owner = $owner, +group = $group, +require= File[${config_dir}/commands], +} + file { ${config_dir}/checkcommands.cfg: source = 'puppet:///modules/nagios_common/checkcommands.cfg', owner = $owner, diff --git a/modules/nagios_common/templates/check_icinga_config.cfg.erb b/modules/nagios_common/templates/check_icinga_config.cfg.erb new file mode 100644 index 000..ee76cae --- /dev/null +++ b/modules/nagios_common/templates/check_icinga_config.cfg.erb @@ -0,0 +1,5 @@ +# Check icinga config command definition +define command{ + command_name check_icinga_config + command_line /usr/lib/nagios/plugins/%= @title -% %= @config_dir -%/icinga.cfg +} -- To view, visit https://gerrit.wikimedia.org/r/199841 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I166e1113478e64f9763702f9b391e78027edcafe Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix TestingAccessWrapper::__call - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/199842 Change subject: Fix TestingAccessWrapper::__call .. Fix TestingAccessWrapper::__call We were only passing the first parameter to the wrapped object's methods. Change-Id: I27a69d1cc1b2d048e44514af8b4ac79d7ee1fb85 --- M tests/phpunit/data/helpers/WellProtectedClass.php M tests/phpunit/includes/TestingAccessWrapper.php M tests/phpunit/includes/TestingAccessWrapperTest.php 3 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/42/199842/1 diff --git a/tests/phpunit/data/helpers/WellProtectedClass.php b/tests/phpunit/data/helpers/WellProtectedClass.php index 7114cc9..99c7f64 100644 --- a/tests/phpunit/data/helpers/WellProtectedClass.php +++ b/tests/phpunit/data/helpers/WellProtectedClass.php @@ -14,4 +14,8 @@ public function getProperty() { return $this-property; } + + protected function whatSecondArg( $a, $b = false ) { + return $b; + } } diff --git a/tests/phpunit/includes/TestingAccessWrapper.php b/tests/phpunit/includes/TestingAccessWrapper.php index d4ad363..84c0f9b 100644 --- a/tests/phpunit/includes/TestingAccessWrapper.php +++ b/tests/phpunit/includes/TestingAccessWrapper.php @@ -31,7 +31,7 @@ $classReflection = new ReflectionClass( $this-object ); $methodReflection = $classReflection-getMethod( $method ); $methodReflection-setAccessible( true ); - return $methodReflection-invoke( $this-object, $args ); + return $methodReflection-invokeArgs( $this-object, $args ); } public function __set( $name, $value ) { diff --git a/tests/phpunit/includes/TestingAccessWrapperTest.php b/tests/phpunit/includes/TestingAccessWrapperTest.php index 8da8e42..7e5b91a 100644 --- a/tests/phpunit/includes/TestingAccessWrapperTest.php +++ b/tests/phpunit/includes/TestingAccessWrapperTest.php @@ -27,4 +27,8 @@ $this-assertSame( 2, $this-wrapped-property ); $this-assertSame( 2, $this-raw-getProperty() ); } + + function testCallMethodTwoArgs() { + $this-assertSame( 'two', $this-wrapped-whatSecondArg( 'one', 'two' ) ); + } } -- To view, visit https://gerrit.wikimedia.org/r/199842 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27a69d1cc1b2d048e44514af8b4ac79d7ee1fb85 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wip: dont merge: arrghhh - change (mediawiki...Popups)
Prtksxna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199843 Change subject: wip: dont merge: arrghhh .. wip: dont merge: arrghhh Change-Id: Ie7a3643f4e7323c9f031d046ef65da30ad431f27 --- M resources/ext.popups.renderer.article.js 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/43/199843/1 diff --git a/resources/ext.popups.renderer.article.js b/resources/ext.popups.renderer.article.js index d1f8334..5daf6a9 100644 --- a/resources/ext.popups.renderer.article.js +++ b/resources/ext.popups.renderer.article.js @@ -150,8 +150,8 @@ * @return {Array} of elements to appended */ article.getProcessedElements = function ( extract, title ) { - extract = mw.html.escape( extract ); - title = mw.html.escape( title ); +// extract = mw.html.escape( extract ); +// title = mw.html.escape( title ); title = title.replace( /([.?*+^$[\]\\(){}|-])/g, '\\$1' ); // Escape RegExp elements var elements = [], @@ -171,7 +171,7 @@ $.each( extract, function ( index, part ) { if ( part.indexOf( boldIdentifier ) === 0 ) { - elements.push( $( 'b' ).html( part.substring( boldIdentifier.length ) ) ); + elements.push( $( 'b' ).text( part.substring( boldIdentifier.length ) ) ); } else { elements.push( part ); } -- To view, visit https://gerrit.wikimedia.org/r/199843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7a3643f4e7323c9f031d046ef65da30ad431f27 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Prtksxna psax...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More specific types in doc tags in the Html class - change (mediawiki/core)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/199845 Change subject: More specific types in doc tags in the Html class .. More specific types in doc tags in the Html class This is a pure inline-documentation patch. It fixes a few actual mistakes in documentation tags and makes some generic array types more specific, if that's possible. Change-Id: Id02e1e936624b845316b8ce99f8b8d2a1f829e97 --- M includes/Html.php 1 file changed, 9 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/45/199845/1 diff --git a/includes/Html.php b/includes/Html.php index ed77729..c172ae0 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -104,7 +104,8 @@ /** * Modifies a set of attributes meant for button elements * and apply a set of default attributes when $wgUseMediaWikiUIEverywhere enabled. -* @param array $modifiers to add to the button +* @param array $attrs +* @param string[] $modifiers to add to the button * @see https://tools.wmflabs.org/styleguide/desktop/index.html for guidance on available modifiers * @return array $attrs A modified attribute array */ @@ -164,7 +165,7 @@ * @param array $attrs Associative array of attributes, e.g., array( * 'href' = 'http://www.mediawiki.org/' ). See expandAttributes() for * further documentation. -* @param array $modifiers to add to the button +* @param string[] $modifiers to add to the button * @see http://tools.wmflabs.org/styleguide/desktop/index.html for guidance on available modifiers * @return string Raw HTML */ @@ -184,7 +185,7 @@ * @param array $attrs Associative array of attributes, e.g., array( * 'href' = 'http://www.mediawiki.org/' ). See expandAttributes() for * further documentation. -* @param array $modifiers to add to the button +* @param string[] $modifiers to add to the button * @see http://tools.wmflabs.org/styleguide/desktop/index.html for guidance on available modifiers * @return string Raw HTML */ @@ -704,7 +705,7 @@ * new HTML5 input types and attributes. * * @param string $name Name attribute -* @param array $value Value attribute +* @param string $value Value attribute * @param string $type Type attribute * @param array $attribs Associative array of miscellaneous extra * attributes, passed to Html::element() @@ -726,7 +727,7 @@ * @param string $name Name attribute * @param bool $checked Whether the checkbox is checked or not * @param array $attribs Array of additional attributes -* @return string +* @return string Raw HTML */ public static function check( $name, $checked = false, array $attribs = array() ) { if ( isset( $attribs['value'] ) ) { @@ -749,7 +750,7 @@ * @param string $name Name attribute * @param bool $checked Whether the checkbox is checked or not * @param array $attribs Array of additional attributes -* @return string +* @return string Raw HTML */ public static function radio( $name, $checked = false, array $attribs = array() ) { if ( isset( $attribs['value'] ) ) { @@ -772,7 +773,7 @@ * @param string $label Contents of the label * @param string $id ID of the element being labeled * @param array $attribs Additional attributes -* @return string +* @return string Raw HTML */ public static function label( $label, $id, array $attribs = array() ) { $attribs += array( @@ -1025,7 +1026,7 @@ * to URLs. Note that srcset supports width and height values as well, which * are not used here. * -* @param array $urls +* @param string[] $urls * @return string */ static function srcSet( $urls ) { -- To view, visit https://gerrit.wikimedia.org/r/199845 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id02e1e936624b845316b8ce99f8b8d2a1f829e97 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] LivePreview: Let's not potentially mangle #wikiPreview - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: LivePreview: Let's not potentially mangle #wikiPreview .. LivePreview: Let's not potentially mangle #wikiPreview Sometimes you look at what you have written and realize it can be better... Bug: T90490 Change-Id: If620e5c672e4632997028ddc9f802a82a83e6924 --- M resources/src/mediawiki.action/mediawiki.action.edit.preview.js 1 file changed, 10 insertions(+), 8 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js index 1878c89..6f8e8af 100644 --- a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js +++ b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js @@ -9,12 +9,13 @@ */ function doLivePreview( e ) { var isDiff, api, request, postData, copySelectors, section, - $wikiPreview, $wikiDiff, $editform, $copyElements, $spinner; + $wikiPreview, $wikiDiff, $editform, $copyElements, $spinner, $errorBox; isDiff = ( e.target.name === 'wpDiff' ); $wikiPreview = $( '#wikiPreview' ); $wikiDiff = $( '#wikiDiff' ); $editform = $( '#editform' ); + $errorBox = $( '.errorbox' ); section = $editform.find( '[name=wpSection]' ).val(); // Show changes for a new section is not yet supported @@ -23,6 +24,8 @@ } e.preventDefault(); + // Remove any previously displayed errors + $errorBox.remove(); // Show #wikiPreview if it's hidden to be able to scroll to it // (if it is hidden, it's also empty, so nothing changes in the rendering) $wikiPreview.show(); @@ -227,13 +230,12 @@ errorMsg += result.textStatus; } } - $wikiPreview.children( '.mw-content-ltr,.mw-content-rtl' ) - .empty() - .append( $( 'div' ) - .addClass( 'errorbox' ) - .html( 'strong' + mw.message( 'previewerrortext' ).escaped() + '/strongbr' ) - .append( document.createTextNode( errorMsg ) ) ); - $wikiPreview.show(); + $errorBox = $( 'div' ) + .addClass( 'errorbox' ) + .html( 'strong' + mw.message( 'previewerrortext' ).escaped() + '/strongbr' ) + .append( document.createTextNode( errorMsg ) ); + $wikiDiff.hide(); + $wikiPreview.hide().before( $errorBox ); } ); } -- To view, visit https://gerrit.wikimedia.org/r/199792 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If620e5c672e4632997028ddc9f802a82a83e6924 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net Gerrit-Reviewer: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix misleading $class = false default in Html::infoBox - change (mediawiki/core)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/199846 Change subject: Fix misleading $class = false default in Html::infoBox .. Fix misleading $class = false default in Html::infoBox I found this because my PHPStorm complains about the type mismatch. I could have changed the @param tag to string|bool, but when looking at the code, the $class variable is casted to a string anyway and never used as a bool. Change-Id: I3450fa8a898923bbae26830ed3be0017685020d3 --- M includes/Html.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/46/199846/1 diff --git a/includes/Html.php b/includes/Html.php index c172ae0..6bd661f 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -997,7 +997,7 @@ * * @return string */ - static function infoBox( $text, $icon, $alt, $class = false ) { + static function infoBox( $text, $icon, $alt, $class = '' ) { $s = Html::openElement( 'div', array( 'class' = mw-infobox $class ) ); $s .= Html::openElement( 'div', array( 'class' = 'mw-infobox-left' ) ) . -- To view, visit https://gerrit.wikimedia.org/r/199846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3450fa8a898923bbae26830ed3be0017685020d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Introduce Wikibase\View\HtmlSnakFormatterFactory - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Introduce Wikibase\View\HtmlSnakFormatterFactory .. Introduce Wikibase\View\HtmlSnakFormatterFactory Change-Id: I077c324a7c76977f68353a3cf0584b6559e8be1a --- M repo/includes/View/EntityViewFactory.php A repo/includes/WikibaseHtmlSnakFormatterFactory.php M repo/includes/WikibaseRepo.php M repo/tests/phpunit/includes/View/EntityViewFactoryTest.php A repo/tests/phpunit/includes/WikibaseHtmlSnakFormatterFactoryTest.php A view/src/HtmlSnakFormatterFactory.php 6 files changed, 176 insertions(+), 64 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/View/EntityViewFactory.php b/repo/includes/View/EntityViewFactory.php index 836cabb..c46b6cc 100644 --- a/repo/includes/View/EntityViewFactory.php +++ b/repo/includes/View/EntityViewFactory.php @@ -6,17 +6,15 @@ use InvalidArgumentException; use Language; use SiteStore; -use ValueFormatters\FormatterOptions; -use ValueFormatters\ValueFormatter; use Wikibase\LanguageFallbackChain; use Wikibase\Lib\EntityIdFormatter; use Wikibase\Lib\LanguageNameLookup; -use Wikibase\Lib\OutputFormatSnakFormatterFactory; use Wikibase\Lib\SnakFormatter; use Wikibase\Lib\Store\EntityLookup; use Wikibase\Lib\Store\LabelLookup; use Wikibase\Template\TemplateFactory; use Wikibase\View\EntityIdFormatterFactory; +use Wikibase\View\HtmlSnakFormatterFactory; /** * @since 0.5 @@ -27,9 +25,9 @@ class EntityViewFactory { /** -* @var OutputFormatSnakFormatterFactory +* @var HtmlSnakFormatterFactory */ - private $snakFormatterFactory; + private $htmlSnakFormatterFactory; /** * @var EntityIdFormatterFactory @@ -78,7 +76,7 @@ /** * @param EntityIdFormatterFactory $idFormatterFactory -* @param OutputFormatSnakFormatterFactory $snakFormatterFactory +* @param HtmlSnakFormatterFactory $htmlSnakFormatterFactory * @param EntityLookup $entityLookup * @param SiteStore $siteStore * @param DataTypeFactory $dataTypeFactory @@ -90,7 +88,7 @@ */ public function __construct( EntityIdFormatterFactory $idFormatterFactory, - OutputFormatSnakFormatterFactory $snakFormatterFactory, + HtmlSnakFormatterFactory $htmlSnakFormatterFactory, EntityLookup $entityLookup, SiteStore $siteStore, DataTypeFactory $dataTypeFactory, @@ -103,7 +101,7 @@ $this-checkOutputFormat( $idFormatterFactory-getOutputFormat() ); $this-idFormatterFactory = $idFormatterFactory; - $this-snakFormatterFactory = $snakFormatterFactory; + $this-htmlSnakFormatterFactory = $htmlSnakFormatterFactory; $this-entityLookup = $entityLookup; $this-siteStore = $siteStore; $this-dataTypeFactory = $dataTypeFactory; @@ -134,7 +132,7 @@ * @param string $entityType * @param string $languageCode * @param LabelLookup $labelLookup -* @param LanguageFallbackChain|null $fallbackChain +* @param LanguageFallbackChain $fallbackChain * @param bool $editable * * @throws InvalidArgumentException @@ -144,7 +142,7 @@ $entityType, $languageCode, LabelLookup $labelLookup, - LanguageFallbackChain $fallbackChain = null, + LanguageFallbackChain $fallbackChain, $editable = true ) { $editSectionGenerator = $editable ? new ToolbarEditSectionGenerator( @@ -199,7 +197,7 @@ /** * @param string $languageCode -* @param LanguageFallbackChain|null $fallbackChain +* @param LanguageFallbackChain $fallbackChain * @param LabelLookup $labelLookup * @param EditSectionGenerator $editSectionGenerator * @@ -207,7 +205,7 @@ */ private function newStatementGroupListView( $languageCode, - LanguageFallbackChain $fallbackChain = null, + LanguageFallbackChain $fallbackChain, LabelLookup $labelLookup, EditSectionGenerator $editSectionGenerator ) { @@ -215,7 +213,7 @@ $snakHtmlGenerator = new SnakHtmlGenerator( $this-templateFactory, - $this-getSnakFormatter( $languageCode, $fallbackChain, $labelLookup ), + $this-htmlSnakFormatterFactory-getSnakFormatter( $languageCode, $fallbackChain, $labelLookup ), $propertyIdFormatter ); @@ -244,52 +242,6 @@ $editSectionGenerator, $this-languageNameLookup,
[MediaWiki-commits] [Gerrit] Add array type hints to minor methods in the Html class - change (mediawiki/core)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/199849 Change subject: Add array type hints to minor methods in the Html class .. Add array type hints to minor methods in the Html class I'm aware that adding these type hints does have the potential of beeing a breaking change if a caller misuses it. Note that it really is a misuse in this case because all these parameters are documented as array and nothing else. I double-checked the usages of all methods I touched and could not find any caller that does not fulfill the contract of these methods - in other words, all callers I can find in my local code base (which includes all major extensions like Echo, Flow, Parsoid, VisualEditor and so on) pass arrays to these parameters. I left the main methods openElement, rawElement and so on untouched because they are called way to often (500 times and more). Change-Id: I5ca13b26fb08d732ce4cadc4ee3d38314e606fd3 --- M includes/Html.php 1 file changed, 11 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/199849/1 diff --git a/includes/Html.php b/includes/Html.php index 6bd661f..606e0db 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -109,7 +109,7 @@ * @see https://tools.wmflabs.org/styleguide/desktop/index.html for guidance on available modifiers * @return array $attrs A modified attribute array */ - public static function buttonAttributes( $attrs, $modifiers = array() ) { + public static function buttonAttributes( array $attrs, array $modifiers = array() ) { global $wgUseMediaWikiUIEverywhere; if ( $wgUseMediaWikiUIEverywhere ) { if ( isset( $attrs['class'] ) ) { @@ -137,11 +137,8 @@ * @param array $attrs An attribute array. * @return array $attrs A modified attribute array */ - public static function getTextInputAttributes( $attrs ) { + public static function getTextInputAttributes( array $attrs ) { global $wgUseMediaWikiUIEverywhere; - if ( !$attrs ) { - $attrs = array(); - } if ( $wgUseMediaWikiUIEverywhere ) { if ( isset( $attrs['class'] ) ) { if ( is_array( $attrs['class'] ) ) { @@ -169,7 +166,7 @@ * @see http://tools.wmflabs.org/styleguide/desktop/index.html for guidance on available modifiers * @return string Raw HTML */ - public static function linkButton( $contents, $attrs, $modifiers = array() ) { + public static function linkButton( $contents, array $attrs, array $modifiers = array() ) { return Html::element( 'a', self::buttonAttributes( $attrs, $modifiers ), $contents @@ -189,7 +186,7 @@ * @see http://tools.wmflabs.org/styleguide/desktop/index.html for guidance on available modifiers * @return string Raw HTML */ - public static function submitButton( $contents, $attrs, $modifiers = array() ) { + public static function submitButton( $contents, array $attrs, array $modifiers = array() ) { $attrs['type'] = 'submit'; $attrs['value'] = $contents; return Html::element( 'input', self::buttonAttributes( $attrs, $modifiers ) ); @@ -337,8 +334,7 @@ * further documentation. * @return array An array of attributes functionally identical to $attribs */ - private static function dropDefaults( $element, $attribs ) { - + private static function dropDefaults( $element, array $attribs ) { // Whenever altering this array, please provide a covering test case // in HtmlTest::provideElementsWithAttributesHavingDefaultValues static $attribDefaults = array( @@ -485,11 +481,10 @@ * @return string HTML fragment that goes between element name and '' * (starting with a space if at least one attribute is output) */ - public static function expandAttributes( $attribs ) { + public static function expandAttributes( array $attribs ) { global $wgWellFormedXml; $ret = ''; - $attribs = (array)$attribs; foreach ( $attribs as $key = $value ) { // Support intuitive array( 'checked' = true/false ) form if ( $value === false || is_null( $value ) ) { @@ -711,7 +706,7 @@ * attributes, passed to Html::element() * @return string Raw HTML */ - public static function input( $name, $value = '', $type = 'text', $attribs = array() ) { + public static function input( $name, $value = '', $type = 'text', array $attribs =
[MediaWiki-commits] [Gerrit] renderer.article: Ignore thumnail if the URL has suspicious ... - change (mediawiki...Popups)
jenkins-bot has submitted this change and it was merged. Change subject: renderer.article: Ignore thumnail if the URL has suspicious characters .. renderer.article: Ignore thumnail if the URL has suspicious characters If the URL of the thumbnail has suspicious characters like ', or \ return a span instead of trying to render a thumbnail. Bug: T88171 Change-Id: Ide052ea2a7de166599d077a385a6e788bfa63302 --- M resources/ext.popups.renderer.article.js 1 file changed, 9 insertions(+), 2 deletions(-) Approvals: CSteipp: Looks good to me, but someone else must approve Werdna: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/ext.popups.renderer.article.js b/resources/ext.popups.renderer.article.js index 728606b..0204577 100644 --- a/resources/ext.popups.renderer.article.js +++ b/resources/ext.popups.renderer.article.js @@ -249,11 +249,18 @@ var svg = mw.popups.supportsSVG; if ( - !thumbnail || // No thumbnail + // No thumbnail + !thumbnail || // Image too small for landscape display ( !tall thumbnail.width article.SIZES.landscapeImage.w ) || // Image too small for protrait display - ( tall thumbnail.height article.SIZES.portraitImage.h ) + ( tall thumbnail.height article.SIZES.portraitImage.h ) || + // These characters in URL that could inject CSS and thus JS + ( + thumbnail.source.indexOf( '\\' ) -1 || + thumbnail.source.indexOf( '\'' ) -1 || + thumbnail.source.indexOf( '\' ) -1 + ) ) { return $( 'span' ); } -- To view, visit https://gerrit.wikimedia.org/r/199211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ide052ea2a7de166599d077a385a6e788bfa63302 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Prtksxna psax...@wikimedia.org Gerrit-Reviewer: CSteipp cste...@wikimedia.org Gerrit-Reviewer: Prtksxna psax...@wikimedia.org Gerrit-Reviewer: Werdna agarr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-03-26T10:00:01+0000 - change (mediawiki...Wikidata)
WikidataBuilder has uploaded a new change for review. https://gerrit.wikimedia.org/r/199848 Change subject: New Wikidata Build - 2015-03-26T10:00:01+ .. New Wikidata Build - 2015-03-26T10:00:01+ Change-Id: Idf905e1d0197fb3685e2fa9074e0e5b4b5d23573 --- M WikibaseClient.settings.php M WikibaseRepo.settings.php M composer.lock M extensions/PropertySuggester/build/travis/after_script.sh M extensions/PropertySuggester/build/travis/before_script.sh M extensions/PropertySuggester/build/travis/script.sh M extensions/ValueView/README.md M extensions/ValueView/ValueView.php M extensions/ValueView/tests/lib/jquery.ui/jquery.ui.inputextender.tests.js M extensions/ValueView/tests/lib/jquery/jquery.focusAt.tests.js M extensions/ValueView/tests/src/ExpertExtender/ExpertExtender.tests.js M extensions/Wikibase/.jscsrc M extensions/Wikibase/README.md M extensions/Wikibase/build/jenkins/mw-apply-wb-settings.sh M extensions/Wikibase/build/travis/install.sh M extensions/Wikibase/build/travis/mw-apply-wb-settings.sh M extensions/Wikibase/build/travis/script.sh M extensions/Wikibase/build/travis/update-db.sh M extensions/Wikibase/client/WikibaseClient.hooks.php M extensions/Wikibase/client/WikibaseClient.php M extensions/Wikibase/client/config/WikibaseClient.default.php A extensions/Wikibase/client/i18n/ang.json M extensions/Wikibase/client/i18n/arq.json M extensions/Wikibase/client/i18n/as.json M extensions/Wikibase/client/i18n/az.json M extensions/Wikibase/client/i18n/be-tarask.json A extensions/Wikibase/client/i18n/bho.json M extensions/Wikibase/client/i18n/da.json M extensions/Wikibase/client/i18n/de.json A extensions/Wikibase/client/i18n/gom-deva.json M extensions/Wikibase/client/i18n/kk-cyrl.json M extensions/Wikibase/client/i18n/lt.json M extensions/Wikibase/client/i18n/lzh.json M extensions/Wikibase/client/i18n/oc.json M extensions/Wikibase/client/i18n/ps.json M extensions/Wikibase/client/i18n/qqq.json M extensions/Wikibase/client/i18n/ru.json M extensions/Wikibase/client/i18n/sr-el.json A extensions/Wikibase/client/i18n/tcy.json M extensions/Wikibase/client/i18n/tt-cyrl.json M extensions/Wikibase/client/i18n/uk.json M extensions/Wikibase/client/i18n/zh-hant.json M extensions/Wikibase/client/includes/Changes/ChangeHandler.php M extensions/Wikibase/client/includes/DataAccess/StatementTransclusionInteractor.php M extensions/Wikibase/client/includes/Hooks/UpdateRepoHookHandlers.php M extensions/Wikibase/client/includes/RepoItemLinkGenerator.php M extensions/Wikibase/client/includes/UpdateRepo/UpdateRepo.php M extensions/Wikibase/client/includes/Usage/HashUsageAccumulator.php M extensions/Wikibase/client/includes/Usage/ParserOutputUsageAccumulator.php M extensions/Wikibase/client/includes/Usage/UsageAccumulator.php M extensions/Wikibase/client/includes/scribunto/EntityAccessor.php M extensions/Wikibase/client/includes/scribunto/SnakSerializationRenderer.php A extensions/Wikibase/client/includes/store/sql/BulkSubscriptionUpdater.php A extensions/Wikibase/client/maintenance/updateSubscriptions.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php M extensions/Wikibase/client/tests/phpunit/includes/Usage/HashUsageAccumulatorTest.php M extensions/Wikibase/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php A extensions/Wikibase/client/tests/phpunit/includes/store/sql/BulkSubscriptionUpdaterTest.php M extensions/Wikibase/composer.json M extensions/Wikibase/docs/json.wiki A extensions/Wikibase/lib/i18n/arq.json M extensions/Wikibase/lib/i18n/as.json M extensions/Wikibase/lib/i18n/az.json A extensions/Wikibase/lib/i18n/gom-deva.json M extensions/Wikibase/lib/i18n/hr.json M extensions/Wikibase/lib/i18n/lt.json A extensions/Wikibase/lib/i18n/ne.json M extensions/Wikibase/lib/i18n/oc.json M extensions/Wikibase/lib/i18n/ps.json M extensions/Wikibase/lib/i18n/qqq.json M extensions/Wikibase/lib/i18n/qu.json M extensions/Wikibase/lib/i18n/sr-ec.json M extensions/Wikibase/lib/i18n/sr-el.json M extensions/Wikibase/lib/i18n/sv.json A extensions/Wikibase/lib/i18n/sw.json M extensions/Wikibase/lib/i18n/uk.json M extensions/Wikibase/lib/includes/Summary.php M extensions/Wikibase/lib/includes/changes/EntityChange.php M extensions/Wikibase/lib/includes/formatters/CommonsLinkFormatter.php M extensions/Wikibase/lib/includes/formatters/EntityIdLinkFormatter.php M extensions/Wikibase/lib/includes/formatters/GlobeCoordinateDetailsFormatter.php M extensions/Wikibase/lib/includes/formatters/HtmlTimeFormatter.php M extensions/Wikibase/lib/includes/formatters/HtmlUrlFormatter.php M extensions/Wikibase/lib/includes/formatters/MonolingualHtmlFormatter.php M extensions/Wikibase/lib/includes/formatters/MwTimeIsoFormatter.php M
[MediaWiki-commits] [Gerrit] Make wfWarn name the caller - change (mediawiki/core)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/199850 Change subject: Make wfWarn name the caller .. Make wfWarn name the caller The warning is useless as of now, unless you have to have strack traces. Bug: T91764 Change-Id: I8fcae49f3943ab2f6d13519c5f8d370ed147b185 --- M includes/HttpFunctions.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/50/199850/1 diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 36e06b5..8e05f59 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -96,7 +96,7 @@ if ( isset( $args[1] ) ( is_string( $args[1] ) || is_numeric( $args[1] ) ) ) { // Second was used to be the timeout // And third parameter used to be $options - wfWarn( Second parameter should not be a timeout. ); + wfWarn( Second parameter should not be a timeout., 2 ); $options = isset( $args[2] ) is_array( $args[2] ) ? $args[2] : array(); $options['timeout'] = $args[1]; -- To view, visit https://gerrit.wikimedia.org/r/199850 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8fcae49f3943ab2f6d13519c5f8d370ed147b185 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preserve array keys in array_slice - change (mediawiki...UserOptionStats)
jenkins-bot has submitted this change and it was merged. Change subject: Preserve array keys in array_slice .. Preserve array keys in array_slice Enabled could show as disabled when keys were renumbered. Change-Id: I56dd242c10dc2df11e1c2d2462fc539914ce7e47 --- M SpecialUserOptionStats.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialUserOptionStats.php b/SpecialUserOptionStats.php index c6fe292..ad592ff 100644 --- a/SpecialUserOptionStats.php +++ b/SpecialUserOptionStats.php @@ -80,7 +80,7 @@ // So use the last free color for other which includes the rest $max = 7; $rest = array_slice( $data, $max ); - $data = array_slice( $data, 0, $max ); + $data = array_slice( $data, 0, $max, true ); foreach ( $data as $k = $d ) { $labels[] = $k ($d); $realdata[] = array( $k, $d ); -- To view, visit https://gerrit.wikimedia.org/r/199583 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56dd242c10dc2df11e1c2d2462fc539914ce7e47 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UserOptionStats Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make wfWarn name the caller in Http::get - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make wfWarn name the caller in Http::get .. Make wfWarn name the caller in Http::get The warning is useless as of now, unless you have stracktraces. Bug: T91764 Change-Id: I8fcae49f3943ab2f6d13519c5f8d370ed147b185 --- M includes/HttpFunctions.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 36e06b5..8e05f59 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -96,7 +96,7 @@ if ( isset( $args[1] ) ( is_string( $args[1] ) || is_numeric( $args[1] ) ) ) { // Second was used to be the timeout // And third parameter used to be $options - wfWarn( Second parameter should not be a timeout. ); + wfWarn( Second parameter should not be a timeout., 2 ); $options = isset( $args[2] ) is_array( $args[2] ) ? $args[2] : array(); $options['timeout'] = $args[1]; -- To view, visit https://gerrit.wikimedia.org/r/199850 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8fcae49f3943ab2f6d13519c5f8d370ed147b185 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes to the page action tutorial - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fixes to the page action tutorial .. Fixes to the page action tutorial * Trigger changed event whenever new styles pulled in. * Loading watchstar styles and the tablet styles can impact the skin so we should trigger the event here as well * Avoid positioning issues on alpha * Add debouncing to the resize event handler * Don't trigger resize event on a scroll event Bug: T91047 Change-Id: I1de85d748c3c49eefb58ffcaa33bf2435afb2146 --- M javascripts/Skin.js M javascripts/modules/tutorials/ContentOverlay.js 2 files changed, 11 insertions(+), 2 deletions(-) Approvals: Jhernandez: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/Skin.js b/javascripts/Skin.js index 9a6d6d5..b5d0651 100644 --- a/javascripts/Skin.js +++ b/javascripts/Skin.js @@ -109,6 +109,7 @@ if ( self.page.inNamespace( '' ) ) { mw.loader.using( self.tabletModules ).always( function () { self.off( '_resize' ); + self.emit.call( self, 'changed' ); } ); } } @@ -118,6 +119,7 @@ // FIXME: Remove when cache has cleared. if ( user.isAnon() !context.isBetaGroupMember() ) { mw.loader.using( 'mobile.watchstar.init' ); + self.emit.call( self, 'changed' ); } this.emit( '_resize' ); }, diff --git a/javascripts/modules/tutorials/ContentOverlay.js b/javascripts/modules/tutorials/ContentOverlay.js index 0d152a5..a04ece7 100644 --- a/javascripts/modules/tutorials/ContentOverlay.js +++ b/javascripts/modules/tutorials/ContentOverlay.js @@ -1,6 +1,7 @@ ( function ( M, $ ) { var ContentOverlay, + context = M.require( 'context' ), skin = M.require( 'skin' ), Overlay = M.require( 'Overlay' ); @@ -54,9 +55,15 @@ */ _position: function ( $pa ) { var paOffset = $pa.offset(), - h = $pa.outerHeight( true ); + h = $pa.outerHeight( true ), + y = paOffset.top; - this.$el.css( 'top', paOffset.top + h ); + // We only care about this in a border-box world which is disabled in alpha. + if ( !context.isAlphaGroupMember() ) { + y += h; + } + + this.$el.css( 'top', y ); }, /** * Position overlay and add pointer arrow that points at specified element -- To view, visit https://gerrit.wikimedia.org/r/199812 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1de85d748c3c49eefb58ffcaa33bf2435afb2146 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix the small font size issue in monobook skin - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/199855 Change subject: Fix the small font size issue in monobook skin .. Fix the small font size issue in monobook skin Avoid font size inheritance from skin for CX widgets Bug: T93180 Change-Id: Ic96def4aa352c2cc50850256fc09151febf00ea6 --- M modules/dashboard/styles/ext.cx.dashboard.less M modules/translationview/styles/ext.cx.translationview.less 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/55/199855/1 diff --git a/modules/dashboard/styles/ext.cx.dashboard.less b/modules/dashboard/styles/ext.cx.dashboard.less index 0325962..8e1c51b 100644 --- a/modules/dashboard/styles/ext.cx.dashboard.less +++ b/modules/dashboard/styles/ext.cx.dashboard.less @@ -45,6 +45,7 @@ color: @gray-darker; background: white; padding-bottom: 50px; + font-size: medium; } // Do not display the header bar containing the link to dashboard in dashboard page. diff --git a/modules/translationview/styles/ext.cx.translationview.less b/modules/translationview/styles/ext.cx.translationview.less index 41ff5cb..ff642b4 100644 --- a/modules/translationview/styles/ext.cx.translationview.less +++ b/modules/translationview/styles/ext.cx.translationview.less @@ -25,6 +25,7 @@ color: @gray-darker; background: white; padding-bottom: 50px; + font-size: medium; } .cx-widget__header { -- To view, visit https://gerrit.wikimedia.org/r/199855 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic96def4aa352c2cc50850256fc09151febf00ea6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't call api on Gather watchstar load. - change (mediawiki...Gather)
jenkins-bot has submitted this change and it was merged. Change subject: Don't call api on Gather watchstar load. .. Don't call api on Gather watchstar load. There is a hit to the api for watchstar status on every page load. We should stop extending Watchstar view asap to avoid these issues. Change-Id: I2b948339f6a3f014860a2260d9bef82b787c53fa --- M resources/ext.gather.watchstar/CollectionsWatchstar.js M resources/ext.gather.watchstar/init.js 2 files changed, 7 insertions(+), 0 deletions(-) Approvals: Jhernandez: Looks good to me, approved Florianschmidtwelzow: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/resources/ext.gather.watchstar/CollectionsWatchstar.js b/resources/ext.gather.watchstar/CollectionsWatchstar.js index bc79651..418ace6 100644 --- a/resources/ext.gather.watchstar/CollectionsWatchstar.js +++ b/resources/ext.gather.watchstar/CollectionsWatchstar.js @@ -15,12 +15,14 @@ name: 'watched', additionalClassNames: 'icon-32px watch-this-article' } ), + View = M.require( 'View' ), Watchstar = M.require( 'modules/watchstar/Watchstar' ); /** * A clickable watchstar for managing collections * @class CollectionsWatchstar * @extends Watchstar +* FIXME: do not extend Watchstar. */ CollectionsWatchstar = Watchstar.extend( { /** @inheritdoc */ @@ -46,6 +48,10 @@ collections: undefined } ), /** @inheritdoc */ + initialize: function ( options ) { + View.prototype.initialize.call( this, options ); + }, + /** @inheritdoc */ postRender: function ( options ) { var $el = this.$el, unwatchedClass = watchIcon.getGlyphClassName(), diff --git a/resources/ext.gather.watchstar/init.js b/resources/ext.gather.watchstar/init.js index 459bd4f..80d352c 100644 --- a/resources/ext.gather.watchstar/init.js +++ b/resources/ext.gather.watchstar/init.js @@ -80,6 +80,7 @@ el: $star, page: page, isAnon: user.isAnon(), + isWatched: $star.hasClass( 'watched' ), wasUserPrompted: shouldShow, isNewlyAuthenticatedUser: mw.util.getParamValue( 'article_action' ) === 'add_to_collection' } ); -- To view, visit https://gerrit.wikimedia.org/r/199805 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b948339f6a3f014860a2260d9bef82b787c53fa Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.wel...@t-online.de Gerrit-Reviewer: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] scap: improve deploy2graphite - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/199857 Change subject: scap: improve deploy2graphite .. scap: improve deploy2graphite mostly cleaner/saner shell Bug: T1387 Change-Id: Ice7e95f963b78386189ada37ba88838735fb82d3 --- M modules/scap/files/deploy2graphite 1 file changed, 33 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/57/199857/1 diff --git a/modules/scap/files/deploy2graphite b/modules/scap/files/deploy2graphite index 4dead4a..9895b76 100755 --- a/modules/scap/files/deploy2graphite +++ b/modules/scap/files/deploy2graphite @@ -1,28 +1,41 @@ -#! /bin/bash +#!/bin/bash + +set -e +set -u . /usr/local/lib/mw-deployment-vars.sh +me=$(readlink -f $0) +deploy_type=${1:-} +deploy_duration=${2:-} +dry_run=${DOLOGMSGNOLOG:+no} + usage() { - echo Usage: $0 deploy_type [deploy_duration_seconds] - echo $0 will log an entry at graphite.wikimedia.org indicating that a - echo deploy event of the type indicated has occurred. - echo Expected deploy events include sync-common, sync-file, scap, etc. - echo These messages can be suppressed by setting an environment variable $DOLOGMSGNOLOG. - echo - echo IF YOU'RE RUNNING THIS BY HAND, PLEASE STOP. - echo - exit +echo Usage: $me deploy_type [deploy_duration_seconds] +echo $me will log an entry at graphite.wikimedia.org indicating that a +echo deploy event of the type indicated has occurred. +echo Expected deploy events include sync-common, sync-file, scap, etc. +echo These messages can be suppressed by setting an environment variable \$DOLOGMSGNOLOG. +echo +echo IF YOU'RE RUNNING THIS BY HAND, PLEASE STOP. +echo +exit } -[ ${1/-h} != $1 ] usage +statsd_send() { +echo $1 | nc -w1 -q0 -u $MW_STATSD_HOST $MW_STATSD_PORT +} -if [ -z $DOLOGMSGNOLOG ]; then - if [ $1 ] ; then - utime=$(date +%s) - echo deploy.${1}:1|c | nc -w1 -q0 -u $MW_STATSD_HOST $MW_STATSD_PORT || /bin/true - echo deploy.all:1|c | nc -w1 -q0 -u $MW_STATSD_HOST $MW_STATSD_PORT || /bin/true - test -n $2 echo deploy.${1}.timing:${2}000|ms | nc -w1 -q0 -u $MW_STATSD_HOST $MW_STATSD_PORT || /bin/true - else - usage - fi +if [ $deploy_type = -h ] || [ $deploy_type = ]; then +usage +fi + +if [ $dry_run != no ]; then +exit 0 +fi + +statsd_send deploy.${deploy_type}:1|c || true +statsd_send deploy.all:1|c || true +if [ -n $deploy_duration ]; then +statsd_send deploy.${deploy_type}.timing:${deploy_duration}000|ms || true fi -- To view, visit https://gerrit.wikimedia.org/r/199857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice7e95f963b78386189ada37ba88838735fb82d3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make collections overlay less glitchy - change (mediawiki...Gather)
jenkins-bot has submitted this change and it was merged. Change subject: Make collections overlay less glitchy .. Make collections overlay less glitchy Disable scrolling whilst it is open Bug: T93948 Change-Id: I0ebc22818e2f853a9589b2b964eaf0031ed08cbd --- M resources/ext.gather.watchstar/CollectionsContentOverlay.js M resources/ext.gather.watchstar/contentOverlay.less 2 files changed, 13 insertions(+), 0 deletions(-) Approvals: Jhernandez: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/ext.gather.watchstar/CollectionsContentOverlay.js b/resources/ext.gather.watchstar/CollectionsContentOverlay.js index 2f08bc6..f4a0c09 100644 --- a/resources/ext.gather.watchstar/CollectionsContentOverlay.js +++ b/resources/ext.gather.watchstar/CollectionsContentOverlay.js @@ -75,7 +75,13 @@ } }, /** @inheritdoc */ + show: function () { + CollectionsContentOverlayBase.prototype.show.apply( this, arguments ); + $( 'html' ).addClass( 'gather-overlay-enabled' ); + }, + /** @inheritdoc */ hide: function () { + $( 'html' ).removeClass( 'gather-overlay-enabled' ); schema.log( { eventName: 'hide' } ); diff --git a/resources/ext.gather.watchstar/contentOverlay.less b/resources/ext.gather.watchstar/contentOverlay.less index 5e315d2..d766605 100644 --- a/resources/ext.gather.watchstar/contentOverlay.less +++ b/resources/ext.gather.watchstar/contentOverlay.less @@ -3,6 +3,13 @@ @backgroundHeight: 2.8em; @backgroundYOffset: 0.75em; +.gather-overlay-enabled { + #mw-mf-page-center { + overflow: hidden; + display: block; + } +} + .overlay.collection-overlay { font-size: .9em; text-align: left; -- To view, visit https://gerrit.wikimedia.org/r/199813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ebc22818e2f853a9589b2b964eaf0031ed08cbd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added the Excel export format. - change (mediawiki...Cargo)
AdSvS has uploaded a new change for review. https://gerrit.wikimedia.org/r/199859 Change subject: Added the Excel export format. .. Added the Excel export format. Change-Id: Ic3d0d21398eaac9c70de8d21606a3d17ca59cd1a --- M Cargo.php M CargoQueryDisplayer.php A formats/CargoExcelFormat.php M specials/CargoExport.php 4 files changed, 68 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/59/199859/1 diff --git a/Cargo.php b/Cargo.php index 7f36145..73944e5 100644 --- a/Cargo.php +++ b/Cargo.php @@ -100,6 +100,7 @@ $wgAutoloadClasses['CargoTreeFormatTree'] = $dir . '/formats/CargoTreeFormat.php'; $wgAutoloadClasses['CargoEmbeddedFormat'] = $dir . '/formats/CargoEmbeddedFormat.php'; $wgAutoloadClasses['CargoCSVFormat'] = $dir . '/formats/CargoCSVFormat.php'; +$wgAutoloadClasses['CargoExcelFormat'] = $dir . '/formats/CargoExcelFormat.php'; $wgAutoloadClasses['CargoJSONFormat'] = $dir . '/formats/CargoJSONFormat.php'; $wgAutoloadClasses['CargoTableFormat'] = $dir . '/formats/CargoTableFormat.php'; $wgAutoloadClasses['CargoDynamicTableFormat'] = $dir . '/formats/CargoDynamicTableFormat.php'; diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php index d5d5fa0..460dd8e 100644 --- a/CargoQueryDisplayer.php +++ b/CargoQueryDisplayer.php @@ -35,6 +35,7 @@ 'template' = 'CargoTemplateFormat', 'embedded' = 'CargoEmbeddedFormat', 'csv' = 'CargoCSVFormat', + 'excel' = 'CargoExcelFormat', 'json' = 'CargoJSONFormat', 'outline' = 'CargoOutlineFormat', 'tree' = 'CargoTreeFormat', diff --git a/formats/CargoExcelFormat.php b/formats/CargoExcelFormat.php new file mode 100644 index 000..f3b97af --- /dev/null +++ b/formats/CargoExcelFormat.php @@ -0,0 +1,40 @@ +?php +/** + * @author Yaron Koren + * @ingroup Cargo + */ + +class CargoExcelFormat extends CargoDeferredFormat { + + function allowedParameters() { + return array( 'filename' ); + } + + /** +* +* @param array $sqlQueries +* @param array $displayParams Unused +* @param array $querySpecificParams Unused +* @return string +*/ + function queryAndDisplay( $sqlQueries, $displayParams, $querySpecificParams = null ) { + $ce = SpecialPage::getTitleFor( 'CargoExport' ); + $queryParams = $this-sqlQueriesToQueryParams( $sqlQueries ); + $queryParams['format'] = 'excel'; + if ( array_key_exists( 'filename', $displayParams ) ) { + $queryParams['filename'] = $displayParams['filename']; + } + if ( array_key_exists( 'link text', $displayParams ) ) { + $linkText = $displayParams['link text']; + } else { + $linkText = wfMessage( 'cargo-viewcsv' )-text(); + } + $linkAttrs = array( + 'href' = $ce-getFullURL( $queryParams ), + ); + $text = Html::rawElement( 'a', $linkAttrs, $linkText ); + + return $text; + } + +} diff --git a/specials/CargoExport.php b/specials/CargoExport.php index 08ab751..67034c1 100644 --- a/specials/CargoExport.php +++ b/specials/CargoExport.php @@ -56,6 +56,12 @@ $filename = 'results.csv'; } $this-displayCSVData( $sqlQueries, $delimiter, $filename ); + } elseif ( $format == 'excel' ) { + $filename = $req-getVal( 'filename' ); + if ( $filename == '' ) { + $filename = 'results.xls'; + } + $this-displayExcelData( $sqlQueries, $filename ); } elseif ( $format == 'json' ) { $this-displayJSONData( $sqlQueries ); } @@ -226,8 +232,9 @@ } function displayCSVData( $sqlQueries, $delimiter, $filename ) { - header( Content-Type: text/csv ); + header( Content-Type: text/csv;charset=UTF-8 ); header( Content-Disposition: attachment; filename=$filename ); + header( Content-Transfer-Encoding: quoted-printable ); // We'll only use the first query, if there's more than one. $sqlQuery = $sqlQueries[0]; @@ -240,7 +247,25 @@ } fclose( $out ); } + + function displayExcelData( $sqlQueries, $filename ) { + + // We'll only use the first query, if there's more than one. + $sqlQuery = $sqlQueries[0]; + $queryResults = $sqlQuery-run(); + +
[MediaWiki-commits] [Gerrit] config: Add Gujarati (gu) in source and target - change (mediawiki...cxserver)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/199851 Change subject: config: Add Gujarati (gu) in source and target .. config: Add Gujarati (gu) in source and target Bug: T93999 Change-Id: Ib378c7d66bd35f00eddff29d06baa24bc990a92b --- M config.defaults.js 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/51/199851/1 diff --git a/config.defaults.js b/config.defaults.js index b100247..af8a307 100644 --- a/config.defaults.js +++ b/config.defaults.js @@ -22,8 +22,8 @@ cert: null, // Service registry registry: { - source: [ 'af', 'an', 'ar', 'az', 'bg', 'bs', 'ca', 'cr', 'cy', 'en', 'eo', 'es', 'fr', 'gl', 'hi', 'hr', 'id', 'ja', 'kk', 'km', 'kn', 'ky', 'kz', 'min', 'mk', 'ms', 'mt', 'nl', 'no', 'nn', 'oc', 'pa', 'pl', 'pt', 'ru', 'sh', 'sl', 'tr', 'tt', 'uk', 'ur', 'uz', 'vi', 'xh', 'zh' ], - target: [ 'af', 'an', 'ar', 'az', 'bg', 'bs', 'ca', 'cr', 'cy', 'eo', 'es', 'fr', 'gl', 'hi', 'hr', 'id', 'ja', 'kk', 'km', 'kn', 'ky', 'kz', 'min', 'mk', 'ms', 'mt', 'nl', 'no', 'nn', 'oc', 'pa', 'pl', 'pt', 'ru', 'sh', 'sl', 'tt', 'tr', 'uk', 'ur', 'uz', 'vi', 'xh', 'zh' ], + source: [ 'af', 'an', 'ar', 'az', 'bg', 'bs', 'ca', 'cr', 'cy', 'en', 'eo', 'es', 'fr', 'gl', 'gu', 'hi', 'hr', 'id', 'ja', 'kk', 'km', 'kn', 'ky', 'kz', 'min', 'mk', 'ms', 'mt', 'nl', 'no', 'nn', 'oc', 'pa', 'pl', 'pt', 'ru', 'sh', 'sl', 'tr', 'tt', 'uk', 'ur', 'uz', 'vi', 'xh', 'zh' ], + target: [ 'af', 'an', 'ar', 'az', 'bg', 'bs', 'ca', 'cr', 'cy', 'eo', 'es', 'fr', 'gl', 'gu', 'hi', 'hr', 'id', 'ja', 'kk', 'km', 'kn', 'ky', 'kz', 'min', 'mk', 'ms', 'mt', 'nl', 'no', 'nn', 'oc', 'pa', 'pl', 'pt', 'ru', 'sh', 'sl', 'tt', 'tr', 'uk', 'ur', 'uz', 'vi', 'xh', 'zh' ], mt: { Apertium: { af: [ 'nl' ], -- To view, visit https://gerrit.wikimedia.org/r/199851 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib378c7d66bd35f00eddff29d06baa24bc990a92b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Debounce resize events - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Debounce resize events .. Debounce resize events Not debouncing is dumb. Bug: T93988 Change-Id: Ic991d3cdd22f5cb58cb99a6e64d4e568bedcc517 --- M includes/Resources.php M javascripts/application.js 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jhernandez: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Resources.php b/includes/Resources.php index 792e2ba..c105d62 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -313,6 +313,7 @@ 'mobile.user', 'mediawiki.api', 'mobile.redlinks', + 'jquery.throttle-debounce', ), 'templates' = array( 'icon.hogan' = 'templates/icon.hogan', diff --git a/javascripts/application.js b/javascripts/application.js index 45fedef..1e71a8b 100644 --- a/javascripts/application.js +++ b/javascripts/application.js @@ -21,8 +21,7 @@ } ); M.define( 'skin', skin ); - $( window ).on( 'resize', $.proxy( M, 'emit', 'resize' ) ) - .on( 'scroll', $.proxy( M, 'emit', 'scroll' ) ); + $( window ).on( 'resize', $.debounce( 100, $.proxy( M, 'emit', 'resize' ) ) ); /** * Get current page view object -- To view, visit https://gerrit.wikimedia.org/r/199811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic991d3cdd22f5cb58cb99a6e64d4e568bedcc517 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Apertium: Install needed language pairs for CX - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: Apertium: Install needed language pairs for CX .. Apertium: Install needed language pairs for CX Also install apertium-nob, apertium-nno. Change-Id: I0413fac3d112c3d549924a4ad94603e12180bfb0 --- M modules/apertium/manifests/init.pp 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/modules/apertium/manifests/init.pp b/modules/apertium/manifests/init.pp index 7e7245d..222fd6c 100644 --- a/modules/apertium/manifests/init.pp +++ b/modules/apertium/manifests/init.pp @@ -6,14 +6,23 @@ class apertium(){ package { [ 'apertium', +'apertium-af-nl', 'apertium-apy', 'apertium-en-ca', -'apertium-eo-en', 'apertium-en-es', +'apertium-eo-en', 'apertium-es-ca', 'apertium-es-pt', +'apertium-hbs', +'apertium-hbs-eng', +'apertium-hbs-mkd', +'apertium-hbs-slv', 'apertium-id-ms', +'apertium-mk-bg', +'apertium-mkd', +'apertium-nno', 'apertium-nno-nob', +'apertium-nob', 'apertium-pt-ca', 'apertium-sv-da', 'apertium-lex-tools', -- To view, visit https://gerrit.wikimedia.org/r/198693 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0413fac3d112c3d549924a4ad94603e12180bfb0 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Beta: Add missing 'af' and 'az' - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: Beta: Add missing 'af' and 'az' .. Beta: Add missing 'af' and 'az' Also sort languages alphabetically. Change-Id: I78e78b55e820d49618743d7b05312f0d1ab0a50b --- M hieradata/labs/deployment-prep/common.yaml 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 4ed1bb5..061250c 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -37,6 +37,7 @@ cxserver::registry: source: - 'af' +- 'az' - 'bg' - 'ca' - 'da' @@ -44,8 +45,8 @@ - 'en' - 'eo' - 'es' -- 'hy' - 'fr' +- 'hy' - 'id' - 'it' - 'kk' @@ -72,14 +73,15 @@ - 'xh' - 'zh' target: +- 'af' - 'az' - 'bg' - 'ca' - 'da' - 'de' -- 'fr' - 'eo' - 'es' +- 'fr' - 'hy' - 'id' - 'it' @@ -134,8 +136,8 @@ 'mk': - 'bg' 'pt': -- 'es' - 'ca' +- 'es' 'sh': - 'sl' 'sl': -- To view, visit https://gerrit.wikimedia.org/r/198692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78e78b55e820d49618743d7b05312f0d1ab0a50b Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Typofix in class Between - change (pywikibot/core)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/199856 Change subject: Typofix in class Between .. Typofix in class Between Change-Id: I3d813387e4069466b8dfce3ce8e4d4426174114e --- M pywikibot/data/wikidataquery.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/56/199856/1 diff --git a/pywikibot/data/wikidataquery.py b/pywikibot/data/wikidataquery.py index 5ad6bed..d5491a7 100644 --- a/pywikibot/data/wikidataquery.py +++ b/pywikibot/data/wikidataquery.py @@ -368,7 +368,7 @@ to be in UTC, timezones are not supported by the API @param prop: the property -@param begin: WbTime object representign the beginning of the period +@param begin: WbTime object representing the beginning of the period @param end: WbTime object representing the end of the period -- To view, visit https://gerrit.wikimedia.org/r/199856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d813387e4069466b8dfce3ce8e4d4426174114e Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Introduce common widget style LESS file - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/199860 Change subject: Introduce common widget style LESS file .. Introduce common widget style LESS file * Add widgets/common/ext.cx.common.less as the top level common styling for CX * Abstract the Grid system in it This is part of common UI widgets refactoring. Change-Id: I51dfe65f1f23f56845c0ea3051ba6152bf61c80b --- M modules/base/styles/ext.cx.feedback.less M modules/dashboard/styles/ext.cx.dashboard.less M modules/dashboard/styles/ext.cx.magnuslink.less M modules/dashboard/styles/ext.cx.translationlist.less M modules/entrypoint/styles/ext.cx.entrypoint.less M modules/entrypoint/styles/ext.cx.redlink.less M modules/header/styles/ext.cx.header.less M modules/publish/styles/ext.cx.publish.dialog.less M modules/publish/styles/ext.cx.publish.less M modules/source/styles/ext.cx.source.less M modules/source/styles/ext.cx.source.selector.less M modules/stats/styles/ext.cx.stats.less M modules/tools/styles/ext.cx.progressbar.less M modules/tools/styles/ext.cx.tools.card.less M modules/tools/styles/ext.cx.tools.categories.less M modules/tools/styles/ext.cx.tools.dictionary.less M modules/tools/styles/ext.cx.tools.formatter.less M modules/tools/styles/ext.cx.tools.instructions.less M modules/tools/styles/ext.cx.tools.less M modules/tools/styles/ext.cx.tools.link.less M modules/tools/styles/ext.cx.tools.manager.less M modules/tools/styles/ext.cx.tools.mt.less M modules/tools/styles/ext.cx.tools.mtabuse.less M modules/tools/styles/ext.cx.tools.reference.less M modules/translation/styles/ext.cx.translation.conflict.less M modules/translation/styles/ext.cx.translation.less M modules/translationview/styles/ext.cx.translationview.less R modules/widgets/common/grid/agora-grid.less R modules/widgets/common/grid/grid-core.less R modules/widgets/common/grid/grid-responsive.less R modules/widgets/common/grid/grid-settings.less 31 files changed, 29 insertions(+), 64 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/60/199860/1 diff --git a/modules/base/styles/ext.cx.feedback.less b/modules/base/styles/ext.cx.feedback.less index c54bf9e..ca3d46c 100644 --- a/modules/base/styles/ext.cx.feedback.less +++ b/modules/base/styles/ext.cx.feedback.less @@ -1,4 +1,4 @@ -@import ../../base/styles/grid/agora-grid; +@import ../../widgets/common/ext.cx.common; @import mediawiki.mixins; .cx-feedback { diff --git a/modules/dashboard/styles/ext.cx.dashboard.less b/modules/dashboard/styles/ext.cx.dashboard.less index 8e1c51b..070511d 100644 --- a/modules/dashboard/styles/ext.cx.dashboard.less +++ b/modules/dashboard/styles/ext.cx.dashboard.less @@ -1,11 +1,4 @@ -@import ../../base/styles/grid/agora-grid; -@import mediawiki.mixins; - -@gray-darker: #252525; -@gray-dark: #565656; -@gray: #C9C9C9; -@gray-light: #f0f0f0; -@gray-lighter: #fbfbfb; +@import ../../widgets/common/ext.cx.common; h2 { color: @gray-darker; @@ -38,14 +31,6 @@ .cx-feedback { right: 10px; } -} - -.cx-widget { - .mw-ui-grid; - color: @gray-darker; - background: white; - padding-bottom: 50px; - font-size: medium; } // Do not display the header bar containing the link to dashboard in dashboard page. diff --git a/modules/dashboard/styles/ext.cx.magnuslink.less b/modules/dashboard/styles/ext.cx.magnuslink.less index f521641..78dc0b5 100644 --- a/modules/dashboard/styles/ext.cx.magnuslink.less +++ b/modules/dashboard/styles/ext.cx.magnuslink.less @@ -1,5 +1,4 @@ -@import ../../base/styles/grid/agora-grid; -@import mediawiki.mixins; +@import ../../widgets/common/ext.cx.common; .cx-magnus-link { .mw-ui-item; diff --git a/modules/dashboard/styles/ext.cx.translationlist.less b/modules/dashboard/styles/ext.cx.translationlist.less index 5683834..b07ec04 100644 --- a/modules/dashboard/styles/ext.cx.translationlist.less +++ b/modules/dashboard/styles/ext.cx.translationlist.less @@ -1,4 +1,4 @@ -@import ../../base/styles/grid/agora-grid; +@import ../../widgets/common/ext.cx.common; @import mediawiki.mixins; .cx-translationlist { diff --git a/modules/entrypoint/styles/ext.cx.entrypoint.less b/modules/entrypoint/styles/ext.cx.entrypoint.less index 8b5aae9..c2cfdad 100644 --- a/modules/entrypoint/styles/ext.cx.entrypoint.less +++ b/modules/entrypoint/styles/ext.cx.entrypoint.less @@ -1,4 +1,4 @@ -@import ../../base/styles/grid/agora-grid; +@import ../../widgets/common/ext.cx.common; @import mediawiki.mixins; .cx-entrypoint-dialog { @@ -80,4 +80,4 @@ font-size: 12px; color: #777; border-top: 1px solid #f5f5f5; -} \ No newline at end of file +} diff --git a/modules/entrypoint/styles/ext.cx.redlink.less b/modules/entrypoint/styles/ext.cx.redlink.less index 932cae3..0d78924 100644 --- a/modules/entrypoint/styles/ext.cx.redlink.less +++
[MediaWiki-commits] [Gerrit] zuul: update zuul-merger init info - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/199852 Change subject: zuul: update zuul-merger init info .. zuul: update zuul-merger init info The zuul-merger init script got copy pasted from the zuul one but I forgot to update the init info in the top level comments. Spotted by Filippo Giunchedi while reviewing the Zuul Debian packaging work. Change-Id: Ifd0fc0a40e57658c8e4b773f71a31d5512768ff7 --- M modules/zuul/files/zuul-merger.init 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/52/199852/1 diff --git a/modules/zuul/files/zuul-merger.init b/modules/zuul/files/zuul-merger.init index f1e442f..f8470a5 100755 --- a/modules/zuul/files/zuul-merger.init +++ b/modules/zuul/files/zuul-merger.init @@ -1,11 +1,11 @@ #! /bin/sh ### BEGIN INIT INFO -# Provides: zuul +# Provides: zuul-merger # Required-Start:$remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: Zuul +# Short-Description: Zuul Merger # Description: Trunk gating system ### END INIT INFO -- To view, visit https://gerrit.wikimedia.org/r/199852 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd0fc0a40e57658c8e4b773f71a31d5512768ff7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FIX] ParamInfo: Correct read generators from help - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/199853 Change subject: [FIX] ParamInfo: Correct read generators from help .. [FIX] ParamInfo: Correct read generators from help Interpreting the help text in d0485f71 was done incorrectly for the query generators as it must have been a parameter allowing multiple values. Change-Id: I31f23977c571bf3fe554f01dbf10e348a0d1d894 --- M pywikibot/data/api.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/53/199853/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 7946767..0ad45c8 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -363,8 +363,8 @@ meta_modules = help_text[start:end].split(', ') start = help_text.find('Use the output of a list as the input') -start = help_text.find(query_help_list_prefix, start) -start += len(query_help_list_prefix) +start = help_text.find('One value: ', start) +start += len('One value: ') end = help_text.find('\n', start) gen_modules = help_text[start:end].split(', ') -- To view, visit https://gerrit.wikimedia.org/r/199853 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31f23977c571bf3fe554f01dbf10e348a0d1d894 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding *.loc.gov to wgCopyUploadsDomains - change (operations/mediawiki-config)
Steinsplitter has uploaded a new change for review. https://gerrit.wikimedia.org/r/199854 Change subject: Adding *.loc.gov to wgCopyUploadsDomains .. Adding *.loc.gov to wgCopyUploadsDomains Bug: T94017 Change-Id: I8fe8aed5b78174b6ab6cea860bd113992623a5d5 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/54/199854/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 732a15e..f6a6f2c 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11159,6 +11159,7 @@ 'pool.publicdomainproject.org', // Public Domain Project - T91927 '*.nordiskamuseet.se', // Nordiska museet - T93104 'mapserver.library.wur.nl', // Wageningen University library map server - T91630 + '*.loc.gov',// Library of Congress - T94017 ), ), -- To view, visit https://gerrit.wikimedia.org/r/199854 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8fe8aed5b78174b6ab6cea860bd113992623a5d5 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Steinsplitter steinsplit...@wikipedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] zuul: update zuul-merger init info - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: zuul: update zuul-merger init info .. zuul: update zuul-merger init info The zuul-merger init script got copy pasted from the zuul one but I forgot to update the init info in the top level comments. Spotted by Filippo Giunchedi while reviewing the Zuul Debian packaging work. Change-Id: Ifd0fc0a40e57658c8e4b773f71a31d5512768ff7 --- M modules/zuul/files/zuul-merger.init 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/zuul/files/zuul-merger.init b/modules/zuul/files/zuul-merger.init index f1e442f..f8470a5 100755 --- a/modules/zuul/files/zuul-merger.init +++ b/modules/zuul/files/zuul-merger.init @@ -1,11 +1,11 @@ #! /bin/sh ### BEGIN INIT INFO -# Provides: zuul +# Provides: zuul-merger # Required-Start:$remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: Zuul +# Short-Description: Zuul Merger # Description: Trunk gating system ### END INIT INFO -- To view, visit https://gerrit.wikimedia.org/r/199852 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd0fc0a40e57658c8e4b773f71a31d5512768ff7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update data-values/interfaces to 0.1.5 - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/199858 Change subject: Update data-values/interfaces to 0.1.5 .. Update data-values/interfaces to 0.1.5 Required because the ValueFormatterBase constructor parameter was not optional in 0.1.4 but is already declared as optional (but never used as such) in subclasses. Bug: T92280 Change-Id: Ied4d029e40fd19fdd5e244657e2bd111960983d3 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/58/199858/1 diff --git a/composer.json b/composer.json index bab24ba..5f3fc36 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ data-values/data-values: ~1.0.0, data-values/common: ~0.2.0, data-values/geo: ~1.0, - data-values/interfaces: ~0.1.4, + data-values/interfaces: ~0.1.5, data-values/number: ~0.4.0, data-values/time: ~0.6.0, data-values/validators: ~0.1.0, -- To view, visit https://gerrit.wikimedia.org/r/199858 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied4d029e40fd19fdd5e244657e2bd111960983d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make yamllint job runnable again - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/199876 Change subject: Make yamllint job runnable again .. Make yamllint job runnable again The job was tied to hasSlaveScripts but it is only available on production machines. That prevented the job from running: Before this change we had 8 jobs pending and no worker: gallium:~$ zuul-gearman.py status|grep build:yamllint build:yamllint 8 0 0 build:yamllint:UbuntuPrecise0 0 0 build:yamllint:hasSlaveScripts 0 0 0 After there are 8, 4 being processed and 20 workers available: gallium:~$ zuul-gearman.py status|grep build:yamllint build:yamllint 8 4 20 build:yamllint:UbuntuPrecise0 0 20 build:yamllint:hasSlaveScripts 0 0 0 build:yamllint:contintLabsSlave 0 0 20 Change-Id: Icb37c94f111b56ad3b70c1458e99a0172db7f444 --- M jjb/job-templates.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/76/199876/1 diff --git a/jjb/job-templates.yaml b/jjb/job-templates.yaml index e704631..2d181a7 100644 --- a/jjb/job-templates.yaml +++ b/jjb/job-templates.yaml @@ -333,7 +333,7 @@ - job: name: 'yamllint' defaults: use-remote-zuul-shallow-clone -node: contintLabsSlave hasSlaveScripts UbuntuPrecise +node: contintLabsSlave UbuntuPrecise concurrent: true triggers: - zuul -- To view, visit https://gerrit.wikimedia.org/r/199876 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb37c94f111b56ad3b70c1458e99a0172db7f444 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BrowserTest] Add padding to Insert button screenshots - change (mediawiki...VisualEditor)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/199877 Change subject: [BrowserTest] Add padding to Insert button screenshots .. [BrowserTest] Add padding to Insert button screenshots Change-Id: Ic79942bddf811b7f219424c9ae317c7664f9a193 --- M modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb 1 file changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/77/199877/1 diff --git a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb index 9283a0d..f99bda1 100644 --- a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb +++ b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb @@ -188,7 +188,8 @@ Screenshot.capture( @browser, #{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_button_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element], +3 ) Screenshot.highlight(@current_page, @current_page.media_insert_menu_element) @@ -196,7 +197,8 @@ Screenshot.capture( @browser, VisualEditor_Media_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_button_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element], +3 ) Screenshot.highlight(@current_page, @current_page.media_insert_menu_element, '#FF') @@ -205,7 +207,8 @@ Screenshot.capture( @browser, VisualEditor_Template_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_button_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element], +3 ) Screenshot.highlight(@current_page, @current_page.template_insert_menu_element, '#FF') @@ -214,7 +217,8 @@ Screenshot.capture( @browser, VisualEditor_References_List_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_button_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element], +3 ) Screenshot.highlight(@current_page, @current_page.ref_list_insert_menu_element, '#FF') @@ -223,7 +227,8 @@ Screenshot.capture( @browser, VisualEditor_Formula_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_button_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element], +3 ) end -- To view, visit https://gerrit.wikimedia.org/r/199877 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic79942bddf811b7f219424c9ae317c7664f9a193 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make yamllint job runnable again - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Make yamllint job runnable again .. Make yamllint job runnable again The job was tied to hasSlaveScripts but it is only available on production machines. That prevented the job from running: Before this change we had 8 jobs pending and no worker: gallium:~$ zuul-gearman.py status|grep build:yamllint build:yamllint 8 0 0 build:yamllint:UbuntuPrecise0 0 0 build:yamllint:hasSlaveScripts 0 0 0 After there are 8, 4 being processed and 20 workers available: gallium:~$ zuul-gearman.py status|grep build:yamllint build:yamllint 8 4 20 build:yamllint:UbuntuPrecise0 0 20 build:yamllint:hasSlaveScripts 0 0 0 build:yamllint:contintLabsSlave 0 0 20 Change-Id: Icb37c94f111b56ad3b70c1458e99a0172db7f444 --- M jjb/job-templates.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/job-templates.yaml b/jjb/job-templates.yaml index e704631..2d181a7 100644 --- a/jjb/job-templates.yaml +++ b/jjb/job-templates.yaml @@ -333,7 +333,7 @@ - job: name: 'yamllint' defaults: use-remote-zuul-shallow-clone -node: contintLabsSlave hasSlaveScripts UbuntuPrecise +node: contintLabsSlave UbuntuPrecise concurrent: true triggers: - zuul -- To view, visit https://gerrit.wikimedia.org/r/199876 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icb37c94f111b56ad3b70c1458e99a0172db7f444 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix documentation of 'choose' event - change (oojs/ui)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/199878 Change subject: Fix documentation of 'choose' event .. Fix documentation of 'choose' event It can't (and shoudn't) emit a null item. See #chooseItem. Change-Id: I7f4ccb5e88e70b70d4333aad0ad8771ec8df0885 --- M src/widgets/SelectWidget.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/78/199878/1 diff --git a/src/widgets/SelectWidget.js b/src/widgets/SelectWidget.js index 28ebcb6..3aba716 100644 --- a/src/widgets/SelectWidget.js +++ b/src/widgets/SelectWidget.js @@ -111,7 +111,7 @@ /** * @event choose * A `choose` event is emitted when an item is chosen with the #chooseItem method. - * @param {OO.ui.OptionWidget|null} item Chosen item + * @param {OO.ui.OptionWidget} item Chosen item */ /** -- To view, visit https://gerrit.wikimedia.org/r/199878 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f4ccb5e88e70b70d4333aad0ad8771ec8df0885 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2da4430..8eb5ca1 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 2da4430..8eb5ca1 .. Syncronize VisualEditor: 2da4430..8eb5ca1 Change-Id: I7df9d0aebf78337a10864f9deed6cf50a73c5096 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 2da4430..8eb5ca1 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 2da4430f6420ad37ad41d417dd44db65b3ebb01f +Subproject commit 8eb5ca15369e14a3d93130216b77e8e7812ebb09 -- To view, visit https://gerrit.wikimedia.org/r/199879 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7df9d0aebf78337a10864f9deed6cf50a73c5096 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BrowserTest] Capture the whole Insert button in the screenshot - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: [BrowserTest] Capture the whole Insert button in the screenshot .. [BrowserTest] Capture the whole Insert button in the screenshot Change-Id: I7551914d57adace5ceb385f16cc93e146e4774a7 --- M modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb 2 files changed, 6 insertions(+), 5 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb index 91eb37b..9283a0d 100644 --- a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb +++ b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb @@ -188,7 +188,7 @@ Screenshot.capture( @browser, #{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_indicator_down_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element] ) Screenshot.highlight(@current_page, @current_page.media_insert_menu_element) @@ -196,7 +196,7 @@ Screenshot.capture( @browser, VisualEditor_Media_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_indicator_down_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element] ) Screenshot.highlight(@current_page, @current_page.media_insert_menu_element, '#FF') @@ -205,7 +205,7 @@ Screenshot.capture( @browser, VisualEditor_Template_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_indicator_down_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element] ) Screenshot.highlight(@current_page, @current_page.template_insert_menu_element, '#FF') @@ -214,7 +214,7 @@ Screenshot.capture( @browser, VisualEditor_References_List_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_indicator_down_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element] ) Screenshot.highlight(@current_page, @current_page.ref_list_insert_menu_element, '#FF') @@ -223,7 +223,7 @@ Screenshot.capture( @browser, VisualEditor_Formula_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_indicator_down_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element] ) end diff --git a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb index 918966f..af6ec3b 100644 --- a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb +++ b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb @@ -72,6 +72,7 @@ span(:insert_citation, css: '.ve-ui-nodeDialog div:nth-child(1) div:nth-child(1) div:nth-child(3) div:nth-child(1) a:nth-child(1) span:nth-child(2) ') span(:insert_indicator, text: 'Insert') + div(:insert_button, class: 've-test-toolbar-insert') span(:insert_indicator_down, css: '.ve-test-toolbar-insert .oo-ui-indicator-down') a(:insert_more_fewer, css: '.ve-test-toolbar-insert .oo-ui-tool-name-more-fewer .oo-ui-tool-link') div(:insert_pull_down, css: '.ve-test-toolbar-insert .oo-ui-clippableElement-clippable') -- To view, visit https://gerrit.wikimedia.org/r/199872 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7551914d57adace5ceb385f16cc93e146e4774a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BrowserTest] Add padding to Insert button screenshots - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: [BrowserTest] Add padding to Insert button screenshots .. [BrowserTest] Add padding to Insert button screenshots Change-Id: Ic79942bddf811b7f219424c9ae317c7664f9a193 --- M modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb 1 file changed, 10 insertions(+), 5 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb index 9283a0d..f99bda1 100644 --- a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb +++ b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb @@ -188,7 +188,8 @@ Screenshot.capture( @browser, #{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_button_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element], +3 ) Screenshot.highlight(@current_page, @current_page.media_insert_menu_element) @@ -196,7 +197,8 @@ Screenshot.capture( @browser, VisualEditor_Media_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_button_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element], +3 ) Screenshot.highlight(@current_page, @current_page.media_insert_menu_element, '#FF') @@ -205,7 +207,8 @@ Screenshot.capture( @browser, VisualEditor_Template_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_button_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element], +3 ) Screenshot.highlight(@current_page, @current_page.template_insert_menu_element, '#FF') @@ -214,7 +217,8 @@ Screenshot.capture( @browser, VisualEditor_References_List_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_button_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element], +3 ) Screenshot.highlight(@current_page, @current_page.ref_list_insert_menu_element, '#FF') @@ -223,7 +227,8 @@ Screenshot.capture( @browser, VisualEditor_Formula_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_button_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element], +3 ) end -- To view, visit https://gerrit.wikimedia.org/r/199877 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic79942bddf811b7f219424c9ae317c7664f9a193 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2da4430..8eb5ca1 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/199879 Change subject: Syncronize VisualEditor: 2da4430..8eb5ca1 .. Syncronize VisualEditor: 2da4430..8eb5ca1 Change-Id: I7df9d0aebf78337a10864f9deed6cf50a73c5096 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/79/199879/1 diff --git a/VisualEditor b/VisualEditor index 2da4430..8eb5ca1 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 2da4430f6420ad37ad41d417dd44db65b3ebb01f +Subproject commit 8eb5ca15369e14a3d93130216b77e8e7812ebb09 -- To view, visit https://gerrit.wikimedia.org/r/199879 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7df9d0aebf78337a10864f9deed6cf50a73c5096 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Visualize the published translations as a graph - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Visualize the published translations as a graph .. Visualize the published translations as a graph * Introduce a new API to get cumulative number of translations in intervels of week or month between a language pair * Use that api output and Chart.js to plot a graph in Special:CXStats * For now graphs for total translations and content language of wiki is shown. Bug: T90104 Change-Id: Ib384f63e2fdbb845bdef4ac386f42e14db5ea7a4 --- M .jshintignore M Autoload.php M ContentTranslation.php M Resources.php A api/ApiQueryContentTranslationLanguageTrend.php M i18n/en.json M i18n/qqq.json M includes/Translation.php A lib/chart.js/Chart.Core.js A lib/chart.js/Chart.Line.js M modules/stats/ext.cx.stats.js 11 files changed, 2,679 insertions(+), 5 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/.jshintignore b/.jshintignore index d609334..18be9f9 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,3 +1,2 @@ # upstream libs lib/* -modules/editor/medium/* \ No newline at end of file diff --git a/Autoload.php b/Autoload.php index 500f040..abec7cd 100644 --- a/Autoload.php +++ b/Autoload.php @@ -16,6 +16,7 @@ 'ApiContentTranslationDelete' = $dir/api/ApiContentTranslationDelete.php, 'ApiQueryContentTranslation' = $dir/api/ApiQueryContentTranslation.php, 'ApiQueryContentTranslationStats' = $dir/api/ApiQueryContentTranslationStats.php, + 'ApiQueryContentTranslationLanguageTrend' =$dir/api/ApiQueryContentTranslationLanguageTrend.php, 'ApiQueryPublishedTranslations' = $dir/api/ApiQueryPublishedTranslations.php, 'ContentTranslationHooks' = $dir/ContentTranslation.hooks.php, 'ContentTranslation\Database' = $dir/includes/Database.php, diff --git a/ContentTranslation.php b/ContentTranslation.php index 386e5a4..97a0647 100644 --- a/ContentTranslation.php +++ b/ContentTranslation.php @@ -59,7 +59,9 @@ $GLOBALS['wgAPIModules']['cxdelete'] = 'ApiContentTranslationDelete'; $GLOBALS['wgAPIListModules']['contenttranslation'] = 'ApiQueryContentTranslation'; $GLOBALS['wgAPIListModules']['contenttranslationstats'] = 'ApiQueryContentTranslationStats'; -$GLOBALS['wgAPIListModules']['cxpublishedtranslations']= 'ApiQueryPublishedTranslations'; +$GLOBALS['wgAPIListModules']['contenttranslationlangtrend'] = + 'ApiQueryContentTranslationLanguageTrend'; +$GLOBALS['wgAPIListModules']['cxpublishedtranslations' ]= 'ApiQueryPublishedTranslations'; // Hooks $GLOBALS['wgHooks']['BeforePageDisplay'][] = 'ContentTranslationHooks::addModules'; $GLOBALS['wgHooks']['GetBetaFeaturePreferences'][] = 'ContentTranslationHooks::getPreferences'; diff --git a/Resources.php b/Resources.php index 1c959bb..d070102 100644 --- a/Resources.php +++ b/Resources.php @@ -668,6 +668,7 @@ 'dependencies' = array( 'ext.cx.sitemapper', 'ext.cx.util', + 'chart.js' ), 'messages' = array( 'cx-stats-table-source-target', @@ -676,9 +677,20 @@ 'cx-stats-published-translations-title', 'cx-stats-draft-translations-title', 'cx-stats-published-translators-title', + 'cx-trend-all-translations', + 'cx-trend-translations-to', ) ) + $resourcePaths; +$wgResourceModules['chart.js'] = array( + 'localBasePath' = $dir . '/lib', + 'remoteExtPath' = 'ContentTranslation/lib', + 'scripts' = array( + 'chart.js/Chart.Core.js', + 'chart.js/Chart.Line.js', + ), +); + $wgResourceModules['ext.cx.beta.notification'] = array( 'scripts' = array( 'entrypoint/ext.cx.betafeature.notification.js', diff --git a/api/ApiQueryContentTranslationLanguageTrend.php b/api/ApiQueryContentTranslationLanguageTrend.php new file mode 100644 index 000..cd5bf33 --- /dev/null +++ b/api/ApiQueryContentTranslationLanguageTrend.php @@ -0,0 +1,65 @@ +?php +/** + * Api module for querying Content translations trend over a period of time. + * + * @file + * @copyright See AUTHORS.txt + * @license GPL-2.0+ + */ + +/** + * Api module for querying ContentTranslation stats. + * + * @ingroup API ContentTranslationAPI + */ +class ApiQueryContentTranslationLanguageTrend extends ApiQueryBase { + + public function __construct( $query, $moduleName ) { + parent::__construct( $query, $moduleName ); + } + + public function execute() { + $result = $this-getResult(); + $params = $this-extractRequestParams(); + $source = $target = null; + if ( isset( $params['source'] ) Language::isValidBuiltInCode( $params['source'] ) ) { + $source = $params['source']; + } + if ( isset(
[MediaWiki-commits] [Gerrit] contint: migrate to require_package() - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: contint: migrate to require_package() .. contint: migrate to require_package() We have a few package definition conflicts in the contint module which were previously handled with: if ! defined ( Package['openjdk-6-jdk'] ) { package { 'openjdk-6-jdk': ensure = present } } Switch to require_package instead ie: require_package('openjdk-6-jdk') Change-Id: Ib99ad3026efca924b5fabe4aa8a1333a683b63cf --- M modules/contint/manifests/packages.pp M modules/contint/manifests/publish-console.pp 2 files changed, 5 insertions(+), 17 deletions(-) Approvals: Krinkle: Looks good to me, but someone else must approve Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/modules/contint/manifests/packages.pp b/modules/contint/manifests/packages.pp index 5b3ed0b..7ff37a5 100644 --- a/modules/contint/manifests/packages.pp +++ b/modules/contint/manifests/packages.pp @@ -22,12 +22,8 @@ # applications. # (openjdk is the default distribution for the java define. # The java define is found in modules/java/manifests/init.pp ) -if ! defined ( Package['openjdk-6-jdk'] ) { -package { 'openjdk-6-jdk': ensure = present } -} -if ! defined ( Package['openjdk-7-jdk'] ) { -package { 'openjdk-7-jdk': ensure = present } -} +require_package('openjdk-6-jdk') +require_package('openjdk-7-jdk') package { 'maven2': ensure = present, @@ -94,11 +90,7 @@ # For Doxygen based documentations require_package('graphviz') -if ! defined ( Package['python-requests'] ) { -package { 'python-requests': -ensure = present, -} -} +require_package('python-requests') # Node.js evolves quickly so we want to update automatically. require_package('nodejs') diff --git a/modules/contint/manifests/publish-console.pp b/modules/contint/manifests/publish-console.pp index 1f76a96..92aea0e 100644 --- a/modules/contint/manifests/publish-console.pp +++ b/modules/contint/manifests/publish-console.pp @@ -3,11 +3,7 @@ # https://integration.wikimedia.org/logs/ class contint::publish-console { -# publish-console.py dependencies -if ! defined ( Package['python-requests'] ) { -package { 'python-requests': -ensure = present, -} -} +# publish-console.py dependency +require_package('python-requests') } -- To view, visit https://gerrit.wikimedia.org/r/188034 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib99ad3026efca924b5fabe4aa8a1333a683b63cf Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add #bodyContent element, fixes VisualEditor - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199867 Change subject: Add #bodyContent element, fixes VisualEditor .. Add #bodyContent element, fixes VisualEditor Change-Id: I705de99a2dc03ea97f2790b152570445490b6f06 --- M templates/Skin.php M templates/Skin.template 2 files changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/67/199867/1 diff --git a/templates/Skin.php b/templates/Skin.php index 5d0f912..4874899 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -253,7 +253,7 @@ /div ul class=nav navbar-nav navbar-right - lia rhref=#Desktop/a/li + lia href=#Desktop/a/li lia href=#Mobile/a/li /ul /nav @@ -280,7 +280,9 @@ /div '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('undelete' ? 'div id=contentSub2'.$cx['funcs']['v']($cx, $in, array('undelete')).'/div ' : '').''.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('newtalk' ? 'div class=usermessage'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('newtalk')), ENT_QUOTES, 'UTF-8').'/div -' : '').' '.$cx['funcs']['v']($cx, $in, array('bodytext')).' +' : '').' div class=mw-body-content id=bodyContent + '.$cx['funcs']['v']($cx, $in, array('bodytext')).' + /div '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('printfooter' ? ' div class=printfooter '.$cx['funcs']['v']($cx, $in, array('printfooter')).' /div @@ -293,4 +295,4 @@ /html '; } -? +? \ No newline at end of file diff --git a/templates/Skin.template b/templates/Skin.template index 8124965..fd46d99 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -70,7 +70,9 @@ {{#if newtalk}} div class=usermessage{{newtalk}}/div {{/if}} - {{{bodytext}}} + div class=mw-body-content id=bodyContent + {{{bodytext}}} + /div {{#if printfooter}} div class=printfooter {{{printfooter}}} -- To view, visit https://gerrit.wikimedia.org/r/199867 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I705de99a2dc03ea97f2790b152570445490b6f06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna agarr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Skip revId check for new pages - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/199868 Change subject: Skip revId check for new pages .. Skip revId check for new pages Makes it possible to edit new pages again. Follows up Ifbf44b7772 Change-Id: If170a367dc2f531d11f09569c7ab45ebd414dff6 --- M modules/ve-mw/init/ve.init.mw.Target.js 1 file changed, 19 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/68/199868/1 diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index e902e2c..9521c5c 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -335,24 +335,26 @@ this.startTimeStamp = data.starttimestamp; this.revid = data.oldid; - aboutDoc = this.doc.children[0].getAttribute( 'about' ); - docRevId = aboutDoc.match( /revision\/([0-9]*)$/ )[1]; - if ( Number.parseInt( docRevId ) !== this.revid ) { - if ( this.retriedRevIdConflict ) { - // Retried already, just error the second time. - ve.init.mw.Target.onLoadError.call( - this, - 've-api', - 'Revision IDs (doc=' + docRevId + ',api=' + this.revid + ') ' + - 'returned by server do not match' - ); - } else { - this.retriedRevIdConflict = true; - // Have to retry both until we can access the document server directly... - this.loading = false; - this.load(); + if ( this.originalHtml ) { + aboutDoc = this.doc.children[0].getAttribute( 'about' ); + docRevId = aboutDoc.match( /revision\/([0-9]*)$/ )[1]; + if ( Number.parseInt( docRevId ) !== this.revid ) { + if ( this.retriedRevIdConflict ) { + // Retried already, just error the second time. + ve.init.mw.Target.onLoadError.call( + this, + 've-api', + 'Revision IDs (doc=' + docRevId + ',api=' + this.revid + ') ' + + 'returned by server do not match' + ); + } else { + this.retriedRevIdConflict = true; + // Have to retry both until we can access the document server directly... + this.loading = false; + this.load(); + } + return; } - return; } // Populate link cache -- To view, visit https://gerrit.wikimedia.org/r/199868 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If170a367dc2f531d11f09569c7ab45ebd414dff6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] LivePreview: Update the correct mw-editfooter-list - change (mediawiki/core)
TheDJ has uploaded a new change for review. https://gerrit.wikimedia.org/r/199870 Change subject: LivePreview: Update the correct mw-editfooter-list .. LivePreview: Update the correct mw-editfooter-list mw-editfooter-list is used by both templatesUsed and hiddencats, so make sure we replace correct one. Bug: T78834 Change-Id: I00be75ac6d68f96fb366b9561ec1ee0e1998f656 --- M resources/src/mediawiki.action/mediawiki.action.edit.preview.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/70/199870/1 diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js index 3a6110d..65ae0f0 100644 --- a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js +++ b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js @@ -159,7 +159,7 @@ newList.push( li ); } ); - $editform.find( '.mw-editfooter-list' ).detach().empty().append( newList ).appendTo( '.templatesUsed' ); + $editform.find( '.templatesUsed .mw-editfooter-list' ).detach().empty().append( newList ).appendTo( '.templatesUsed' ); } if ( response.parse.limitreporthtml ) { $( '.limitreport' ).html( response.parse.limitreporthtml['*'] ); -- To view, visit https://gerrit.wikimedia.org/r/199870 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00be75ac6d68f96fb366b9561ec1ee0e1998f656 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: TheDJ hartman.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add warning about PDF files on the file page. - change (mediawiki...PdfHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Add warning about PDF files on the file page. .. Add warning about PDF files on the file page. Depends on I3c4b7af7284b5e16e458dd72de789e74db489895 in core. Bug: T89765 Change-Id: I674bf7f6c1b21ffc9870aa84382479af5f966561 --- M PdfHandler.php M PdfHandler_body.php M i18n/en.json 3 files changed, 35 insertions(+), 1 deletion(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/PdfHandler.php b/PdfHandler.php index 63bb0b3..d1aa8a1 100644 --- a/PdfHandler.php +++ b/PdfHandler.php @@ -65,3 +65,4 @@ $wgMediaHandlers['application/pdf'] = 'PdfHandler'; $wgJobClasses['createPdfThumbnailsJob'] = 'CreatePdfThumbnailsJob'; $wgHooks['UploadVerifyFile'][] = 'CreatePdfThumbnailsJob::insertJobs'; +$wgHooks['ResourceLoaderRegisterModules'][] = 'PdfHandler::registerWarningModule'; diff --git a/PdfHandler_body.php b/PdfHandler_body.php index 2a08a95..ef9cb55 100644 --- a/PdfHandler_body.php +++ b/PdfHandler_body.php @@ -22,6 +22,12 @@ */ class PdfHandler extends ImageHandler { + static $messages = array( + 'main' = 'pdf-file-page-warning', + 'header' = 'pdf-file-page-warning-header', + 'info' = 'pdf-file-page-warning-info', + 'footer' = 'pdf-file-page-warning-footer', + ); /** * @return bool @@ -383,4 +389,27 @@ return $data['text'][$page - 1]; } + /** +* Adds a warning about PDFs being potentially dangerous to the file +* page. Multiple messages with this base will be used. +* @param File $file +* @return array +*/ + function getWarningConfig( $file ) { + return array( + 'messages' = self::$messages, + 'link' = '//www.mediawiki.org/wiki/Special:MyLanguage/Help:Security/PDF_files', + 'module' = 'pdfhandler.messages', + ); + } + + /** +* Register a module with the warning messages in it. +* @param $resourceLoader ResourceLoader +*/ + static function registerWarningModule( $resourceLoader ) { + $resourceLoader-register( 'pdfhandler.messages', array( + 'messages' = array_values( self::$messages ), + ) ); + } } diff --git a/i18n/en.json b/i18n/en.json index 18bdff8..20ad5db 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -3,10 +3,14 @@ authors: [] }, pdf-desc: Handler for viewing PDF files in image mode., + pdf-file-page-warning: PDF is a complex format that may expose some of your private information in some cases. Make sure to configure your PDF viewer in a safe way., + pdf-file-page-warning-header: Privacy considerations, + pdf-file-page-warning-footer: This issue is not specific to this particular file, but a general issue with the PDF format., + pdf-file-page-warning-info: Learn more about this issue., pdf_no_metadata: Cannot get metadata from PDF., pdf_page_error: Page number not in range., exif-pdf-producer: Conversion program, exif-pdf-version: Version of PDF format, exif-pdf-encrypted: Encrypted, exif-pdf-pagesize: Page size -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/194569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I674bf7f6c1b21ffc9870aa84382479af5f966561 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/extensions/PdfHandler Gerrit-Branch: master Gerrit-Owner: MarkTraceur mtrac...@member.fsf.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [IMPROV] ParamInfo: Dynamically read parameters - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/199863 Change subject: [IMPROV] ParamInfo: Dynamically read parameters .. [IMPROV] ParamInfo: Dynamically read parameters This dynamically reads and interprets the parameters from the help text. Change-Id: I0845201af32a484005214f357f1f37ba4d82765f --- M pywikibot/data/api.py 1 file changed, 41 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/63/199863/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 71cc0a9..5bf92ef 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -463,36 +463,52 @@ if not prefix: continue -params = {} +self._paraminfo[path]['parameters'] = [] -# Check existence of parameters used frequently by pywikibot. -# TODO: for each parameter, parse list of values ('type') -if prefix + 'limit' in help_text: -params['limit'] = { -'name': 'limit', -'type': 'limit', -'max': 50, -} +param_start = help_text.find('Parameters:', start) +param_start += len('Parameters:') +param_end = help_text.find('Example', param_start) - 1 -if prefix + 'namespace' in help_text: -params['namespace'] = { -'name': 'namespace', -'type': 'namespace', -} -if not submodule.startswith('all'): -params['namespace']['multi'] = '' +# If this module has no parameter +if param_start end: +param_start = end +# If there are no examples after the parameters +if param_end end: +param_end = end -for param_name in ['token', 'prop', 'type', 'show']: -if prefix + param_name in help_text: -params[param_name] = { -'name': param_name, -'type': [], -'multi': '', -} +parameter = None +# skip first as the parameters begin with '\n ' and the regex +# does split an empty group before that match +for param in re.split(r'\n (?=\w)', help_text[param_start:param_end])[1:]: +lines = param.splitlines() +name = param[:param.index('-')].strip() +assert(name.startswith(prefix)) +name = name[len(prefix):] +parameter = {'name': name} +self._paraminfo[path]['parameters'] += [parameter] +values_line = -1 +if 'Default: ' in lines[-1]: +parameter['default'] = lines[-1][lines[-1].index(':') + 2:] +values_line -= 1 +values_line = lines[values_line].strip() +if values_line.startswith(query_help_list_prefix): +parameter['multi'] = '' +has_type = True +else: +limits = re.match(r'No more than (\d+) (?:(\d+) for bots) allowed.', values_line) +if limits: +parameter['max'] = int(limits.group(1)) +parameter['highmax'] = int(limits.group(2)) +parameter['type'] = 'limit' +has_type = not limits and values_line.startswith('One value: ') +if name == 'namespace': +assert(has_type) +parameter['type'] = 'namespace' +elif has_type: +parameter['type'] = values_line[values_line.index(': ') + 2:].split(', ') -self._paraminfo[path]['parameters'] = params.values() if (help_text.find('\n\nThis module only accepts POST ' - 'requests.\n', start) end): + 'requests.\n', start) param_start): self._paraminfo[path]['mustbeposted'] = '' self._emulate_pageset() -- To view, visit https://gerrit.wikimedia.org/r/199863 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0845201af32a484005214f357f1f37ba4d82765f Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] Typofix in class Between - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Typofix in class Between .. Typofix in class Between Change-Id: I3d813387e4069466b8dfce3ce8e4d4426174114e --- M pywikibot/data/wikidataquery.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/data/wikidataquery.py b/pywikibot/data/wikidataquery.py index 5ad6bed..d5491a7 100644 --- a/pywikibot/data/wikidataquery.py +++ b/pywikibot/data/wikidataquery.py @@ -368,7 +368,7 @@ to be in UTC, timezones are not supported by the API @param prop: the property -@param begin: WbTime object representign the beginning of the period +@param begin: WbTime object representing the beginning of the period @param end: WbTime object representing the end of the period -- To view, visit https://gerrit.wikimedia.org/r/199856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d813387e4069466b8dfce3ce8e4d4426174114e Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: XZise commodorefabia...@gmx.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Beta: CX: Add Gujarati as target language - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: Beta: CX: Add Gujarati as target language .. Beta: CX: Add Gujarati as target language Bug: T93999 Change-Id: I8be295fb2960ba829e1a024028bac74963d01ae7 --- M hieradata/labs/deployment-prep/common.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 061250c..9a56dd2 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -82,6 +82,7 @@ - 'eo' - 'es' - 'fr' +- 'gu' - 'hy' - 'id' - 'it' -- To view, visit https://gerrit.wikimedia.org/r/199866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8be295fb2960ba829e1a024028bac74963d01ae7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add #bodyContent element, fixes VisualEditor - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199869 Change subject: Add #bodyContent element, fixes VisualEditor .. Add #bodyContent element, fixes VisualEditor Change-Id: I705de99a2dc03ea97f2790b152570445490b6f06 --- M templates/Skin.php M templates/Skin.template 2 files changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/69/199869/1 diff --git a/templates/Skin.php b/templates/Skin.php index 5d0f912..4874899 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -253,7 +253,7 @@ /div ul class=nav navbar-nav navbar-right - lia rhref=#Desktop/a/li + lia href=#Desktop/a/li lia href=#Mobile/a/li /ul /nav @@ -280,7 +280,9 @@ /div '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('undelete' ? 'div id=contentSub2'.$cx['funcs']['v']($cx, $in, array('undelete')).'/div ' : '').''.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('newtalk' ? 'div class=usermessage'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('newtalk')), ENT_QUOTES, 'UTF-8').'/div -' : '').' '.$cx['funcs']['v']($cx, $in, array('bodytext')).' +' : '').' div class=mw-body-content id=bodyContent + '.$cx['funcs']['v']($cx, $in, array('bodytext')).' + /div '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('printfooter' ? ' div class=printfooter '.$cx['funcs']['v']($cx, $in, array('printfooter')).' /div @@ -293,4 +295,4 @@ /html '; } -? +? \ No newline at end of file diff --git a/templates/Skin.template b/templates/Skin.template index 8124965..fd46d99 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -70,7 +70,9 @@ {{#if newtalk}} div class=usermessage{{newtalk}}/div {{/if}} - {{{bodytext}}} + div class=mw-body-content id=bodyContent + {{{bodytext}}} + /div {{#if printfooter}} div class=printfooter {{{printfooter}}} -- To view, visit https://gerrit.wikimedia.org/r/199869 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I705de99a2dc03ea97f2790b152570445490b6f06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna agarr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] When changing language first time, language code was shown - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/199874 Change subject: When changing language first time, language code was shown .. When changing language first time, language code was shown Now it shows the language autonym as expected Change-Id: I1f2c3bca2b5582b917d65533b08545d1332782ab --- M resources/js/ext.uls.interface.js 1 file changed, 46 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/74/199874/1 diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index 88b890b..4618060 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -164,6 +164,27 @@ } /** +* Gets the name of the previously active language +* @param {string} code Language code of previously selected language. +* @return {jQuery.promise} +*/ + function getUndoAutonym( code ) { + var + deferred = $.Deferred(), + autonym = $.cookie( mw.uls.previousLanguageAutonymCookie ); + + if ( autonym ) { + deferred.resolve( autonym ); + } else { + mw.loader.using( 'jquery.uls.data', function () { + deferred.resolve( $.uls.data.getAutonym( code ) ); + } ); + } + + return deferred.promise(); + } + + /** * The tooltip to be shown when language changed using ULS. * It also allows to undo the language selection. */ @@ -171,7 +192,6 @@ var ulsPosition = mw.config.get( 'wgULSPosition' ), currentLang = mw.config.get( 'wgUserLanguage' ), previousLang, - previousLanguageAutonym, $ulsTrigger, anonMode, rtlPage = $( 'body' ).hasClass( 'rtl' ), @@ -203,35 +223,34 @@ return; } - previousLanguageAutonym = $.cookie( mw.uls.previousLanguageAutonymCookie ) || - previousLang; + getUndoAutonym( previousLang ).done( function( autonym ) { + // Attach a tipsy tooltip to the trigger + $ulsTrigger.tipsy( { + gravity: tipsyGravity[ulsPosition], + delayOut: 3000, + html: true, + fade: true, + trigger: 'manual', + title: function () { + var link; - // Attach a tipsy tooltip to the trigger - $ulsTrigger.tipsy( { - gravity: tipsyGravity[ulsPosition], - delayOut: 3000, - html: true, - fade: true, - trigger: 'manual', - title: function () { - var link; + link = $( 'a' ).text( autonym ) + .attr( { + href: '#', + 'class': 'uls-prevlang-link', + lang: previousLang, + // We could get dir from uls.data, + // but we are trying to avoid loading it + // and 'auto' is safe enough in this context + dir: 'auto' + } ); - link = $( 'a' ).text( previousLanguageAutonym ) - .attr( { - href: '#', - 'class': 'uls-prevlang-link', - lang: previousLang, - // We could get dir from uls.data, - // but we are trying to avoid loading it - // and 'auto' is safe enough in this context - dir: 'auto' - } ); + // Get the html of the link by wrapping it in div first + link = $( 'div' ).html( link ).html(); - // Get the html of
[MediaWiki-commits] [Gerrit] Make spinner as a widget module - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/199862 Change subject: Make spinner as a widget module .. Make spinner as a widget module Change-Id: Id984cfd455ffa8ad2ae47a816983f88f13de82d2 --- M Resources.php R modules/widgets/spinner/ext.cx.spinner.less 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/62/199862/1 diff --git a/Resources.php b/Resources.php index 1c959bb..7b4e7a2 100644 --- a/Resources.php +++ b/Resources.php @@ -173,7 +173,6 @@ ), 'styles' = array( 'source/styles/ext.cx.source.less', - 'base/styles/ext.cx.spinner.less', ), 'dependencies' = array( 'ext.cx.util', @@ -183,6 +182,7 @@ 'mediawiki.api', 'mediawiki.jqueryMsg', 'mediawiki.util', + 'ext.cx.widgets.spinner', ), 'messages' = array( 'cx-source-view-page', @@ -272,7 +272,6 @@ ), 'styles' = array( 'tools/styles/ext.cx.tools.less', - 'base/styles/ext.cx.spinner.less', ), 'dependencies' = array( 'ext.cx.feedback', @@ -291,6 +290,7 @@ 'ext.cx.util.selection', 'jquery.uls.data', 'mediawiki.jqueryMsg', + 'ext.cx.widgets.spinner', ), ) + $resourcePaths; @@ -721,6 +721,12 @@ ), ) + $resourcePaths; +$wgResourceModules['ext.cx.widgets.spinner'] = array( + 'styles' = array( + 'widgets/spinner/ext.cx.spinner.less', + ), +) + $resourcePaths; + $wgResourceModules['ext.cx.widgets.callout'] = array( 'scripts' = array( 'widgets/callout/ext.cx.callout.js', diff --git a/modules/base/styles/ext.cx.spinner.less b/modules/widgets/spinner/ext.cx.spinner.less similarity index 100% rename from modules/base/styles/ext.cx.spinner.less rename to modules/widgets/spinner/ext.cx.spinner.less -- To view, visit https://gerrit.wikimedia.org/r/199862 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id984cfd455ffa8ad2ae47a816983f88f13de82d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] zuul: provide sane defaults in init scripts - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/199861 Change subject: zuul: provide sane defaults in init scripts .. zuul: provide sane defaults in init scripts Filippo Giunchedi pointed we should not exit when a default file is missing but instead provide sane default. Add to the init script sane defaults to be overriden via the default file: START_DAEMON=0 DAEMON_ARGS=0 Our default files (in puppet templates) do have START_DAEMON=1 so no impact for us. Change-Id: I2fa45c3d0e46d1346d1906a48bd174b458a5b0c1 --- M modules/zuul/files/zuul-merger.init M modules/zuul/files/zuul.init 2 files changed, 4 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/61/199861/1 diff --git a/modules/zuul/files/zuul-merger.init b/modules/zuul/files/zuul-merger.init index f8470a5..db5b98a 100755 --- a/modules/zuul/files/zuul-merger.init +++ b/modules/zuul/files/zuul-merger.init @@ -23,7 +23,8 @@ # Exit if the package is not installed [ -x $DAEMON ] || exit 0 -START_DAEMON=1 +START_DAEMON=0 +DAEMON_ARGS='' # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh @@ -35,10 +36,6 @@ # Read configuration variable file if it is present if [ -r /etc/default/$NAME ] ; then . /etc/default/$NAME -else - log_daemon_msg $DESC: /etc/default/$NAME not found: exiting - log_end_msg 1 - exit 0 fi if ! [ ${START_DAEMON} = 1 ] ; then diff --git a/modules/zuul/files/zuul.init b/modules/zuul/files/zuul.init index 20ec8ad..2beb988 100755 --- a/modules/zuul/files/zuul.init +++ b/modules/zuul/files/zuul.init @@ -23,7 +23,8 @@ # Exit if the package is not installed [ -x $DAEMON ] || exit 0 -START_DAEMON=1 +START_DAEMON=0 +DAEMON_ARGS='' # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh @@ -35,10 +36,6 @@ # Read configuration variable file if it is present if [ -r /etc/default/$NAME ] ; then . /etc/default/$NAME -else - log_daemon_msg $DESC: /etc/default/$NAME not found: exiting - log_end_msg 1 - exit 0 fi if ! [ ${START_DAEMON} = 1 ] ; then -- To view, visit https://gerrit.wikimedia.org/r/199861 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fa45c3d0e46d1346d1906a48bd174b458a5b0c1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] synchs upstream changes to ProjectMoveController and TaskEdi... - change (phabricator...Sprint)
Christopher Johnson (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/199864 Change subject: synchs upstream changes to ProjectMoveController and TaskEditController with Sprint .. synchs upstream changes to ProjectMoveController and TaskEditController with Sprint Sprint current with D12162 commit 47114513b00f88d4e22070556a2a00dd3339b2af 25-03-2015 Change-Id: I0c405951419476503a02c17bb11fd443e9b04100 --- M src/controller/SprintController.php M src/controller/board/SprintBoardMoveController.php M src/controller/board/SprintBoardTaskEditController.php M src/customfield/SprintBeginDateField.php M src/customfield/SprintEndDateField.php M src/customfield/SprintProjectCustomField.php M src/customfield/SprintTaskStoryPointsField.php M src/events/BurndownActionMenuEventListener.php M src/util/BurndownDataDate.php 9 files changed, 41 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint refs/changes/64/199864/1 diff --git a/src/controller/SprintController.php b/src/controller/SprintController.php index 39c19c5..461c19e 100644 --- a/src/controller/SprintController.php +++ b/src/controller/SprintController.php @@ -1,6 +1,7 @@ ?php /** * @author Michael Peters + * @author Christopher Johnson * @license GPL version 3 */ diff --git a/src/controller/board/SprintBoardMoveController.php b/src/controller/board/SprintBoardMoveController.php index 3b46891..b28784c 100644 --- a/src/controller/board/SprintBoardMoveController.php +++ b/src/controller/board/SprintBoardMoveController.php @@ -101,55 +101,46 @@ if ($task_phids ($order == PhabricatorProjectColumn::ORDER_PRIORITY)) { $tasks = id(new ManiphestTaskQuery()) --setViewer($viewer) --withPHIDs($task_phids) --requireCapabilities( - array( -PhabricatorPolicyCapability::CAN_VIEW, -PhabricatorPolicyCapability::CAN_EDIT, - )) --execute(); + -setViewer($viewer) + -withPHIDs($task_phids) + -requireCapabilities( + array( + PhabricatorPolicyCapability::CAN_VIEW, + PhabricatorPolicyCapability::CAN_EDIT, + )) + -execute(); if (count($tasks) != count($task_phids)) { return new Aphront404Response(); } $tasks = mpull($tasks, null, 'getPHID'); - $a_task = idx($tasks, $after_phid); - $b_task = idx($tasks, $before_phid); + $try = array( + array($after_phid, true), + array($before_phid, false), + ); - if ($a_task - (($a_task-getPriority() $object-getPriority()) || - ($a_task-getPriority() == $object-getPriority() - $a_task-getSubpriority() = $object-getSubpriority( { - -$after_pri = $a_task-getPriority(); -$after_sub = $a_task-getSubpriority(); - -$xactions[] = id(new ManiphestTransaction()) - -setTransactionType(ManiphestTransaction::TYPE_SUBPRIORITY) - -setNewValue(array( -'newPriority' = $after_pri, -'newSubpriorityBase' = $after_sub, -'direction' = '', - )); - - } else if ($b_task - (($b_task-getPriority() $object-getPriority()) || - ($b_task-getPriority() == $object-getPriority() - $b_task-getSubpriority() = $object-getSubpriority( { - -$before_pri = $b_task-getPriority(); -$before_sub = $b_task-getSubpriority(); - -$xactions[] = id(new ManiphestTransaction()) - -setTransactionType(ManiphestTransaction::TYPE_SUBPRIORITY) - -setNewValue(array( -'newPriority' = $before_pri, -'newSubpriorityBase' = $before_sub, -'direction' = '', - )); + $pri = null; + $sub = null; + foreach ($try as $spec) { +list($task_phid, $is_after) = $spec; +$task = idx($tasks, $task_phid); +if ($task) { + list($pri, $sub) = ManiphestTransactionEditor::getAdjacentSubpriority( + $task, + $is_after); + break; +} } - } + + if ($pri !== null) { +$xactions[] = id(new ManiphestTransaction()) +-setTransactionType(ManiphestTransaction::TYPE_PRIORITY) +-setNewValue($pri); +$xactions[] = id(new ManiphestTransaction()) +-setTransactionType(ManiphestTransaction::TYPE_SUBPRIORITY) +-setNewValue($sub); + } +} $editor = id(new ManiphestTransactionEditor()) -setActor($viewer) diff --git a/src/controller/board/SprintBoardTaskEditController.php b/src/controller/board/SprintBoardTaskEditController.php index 32dfe1b..4fa8a9c 100644 --- a/src/controller/board/SprintBoardTaskEditController.php +++ b/src/controller/board/SprintBoardTaskEditController.php @@
[MediaWiki-commits] [Gerrit] Refactor the feedback tool as a widget module - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/199865 Change subject: Refactor the feedback tool as a widget module .. Refactor the feedback tool as a widget module Change-Id: I7d64dd5e76eb3bf92b6331f4a0e384fe3cb8b556 --- M Resources.php R modules/widgets/feedback/ext.cx.feedback.js R modules/widgets/feedback/images/horn.png R modules/widgets/feedback/images/horn.svg R modules/widgets/feedback/styles/ext.cx.feedback.less 5 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/65/199865/1 diff --git a/Resources.php b/Resources.php index 7b4e7a2..56a5a1f 100644 --- a/Resources.php +++ b/Resources.php @@ -53,10 +53,10 @@ 'ext.cx.model', ), 'scripts' = array( - 'base/ext.cx.feedback.js', + 'widgets/feedback/ext.cx.feedback.js', ), 'styles' = array( - 'base/styles/ext.cx.feedback.less', + 'widgets/feedback/styles/ext.cx.feedback.less', ), 'messages' = array( 'cx-feedback-link', diff --git a/modules/base/ext.cx.feedback.js b/modules/widgets/feedback/ext.cx.feedback.js similarity index 100% rename from modules/base/ext.cx.feedback.js rename to modules/widgets/feedback/ext.cx.feedback.js diff --git a/modules/base/images/horn.png b/modules/widgets/feedback/images/horn.png similarity index 100% rename from modules/base/images/horn.png rename to modules/widgets/feedback/images/horn.png Binary files differ diff --git a/modules/base/images/horn.svg b/modules/widgets/feedback/images/horn.svg similarity index 100% rename from modules/base/images/horn.svg rename to modules/widgets/feedback/images/horn.svg diff --git a/modules/base/styles/ext.cx.feedback.less b/modules/widgets/feedback/styles/ext.cx.feedback.less similarity index 87% rename from modules/base/styles/ext.cx.feedback.less rename to modules/widgets/feedback/styles/ext.cx.feedback.less index ca3d46c..4c54298 100644 --- a/modules/base/styles/ext.cx.feedback.less +++ b/modules/widgets/feedback/styles/ext.cx.feedback.less @@ -1,4 +1,3 @@ -@import ../../widgets/common/ext.cx.common; @import mediawiki.mixins; .cx-feedback { -- To view, visit https://gerrit.wikimedia.org/r/199865 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d64dd5e76eb3bf92b6331f4a0e384fe3cb8b556 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] config: Add Gujarati (gu) in source and target - change (mediawiki...cxserver)
jenkins-bot has submitted this change and it was merged. Change subject: config: Add Gujarati (gu) in source and target .. config: Add Gujarati (gu) in source and target Bug: T93999 Change-Id: Ib378c7d66bd35f00eddff29d06baa24bc990a92b --- M config.defaults.js 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/config.defaults.js b/config.defaults.js index b100247..f6c0f2e 100644 --- a/config.defaults.js +++ b/config.defaults.js @@ -22,8 +22,8 @@ cert: null, // Service registry registry: { - source: [ 'af', 'an', 'ar', 'az', 'bg', 'bs', 'ca', 'cr', 'cy', 'en', 'eo', 'es', 'fr', 'gl', 'hi', 'hr', 'id', 'ja', 'kk', 'km', 'kn', 'ky', 'kz', 'min', 'mk', 'ms', 'mt', 'nl', 'no', 'nn', 'oc', 'pa', 'pl', 'pt', 'ru', 'sh', 'sl', 'tr', 'tt', 'uk', 'ur', 'uz', 'vi', 'xh', 'zh' ], - target: [ 'af', 'an', 'ar', 'az', 'bg', 'bs', 'ca', 'cr', 'cy', 'eo', 'es', 'fr', 'gl', 'hi', 'hr', 'id', 'ja', 'kk', 'km', 'kn', 'ky', 'kz', 'min', 'mk', 'ms', 'mt', 'nl', 'no', 'nn', 'oc', 'pa', 'pl', 'pt', 'ru', 'sh', 'sl', 'tt', 'tr', 'uk', 'ur', 'uz', 'vi', 'xh', 'zh' ], + source: [ 'af', 'an', 'ar', 'az', 'bg', 'bs', 'ca', 'cr', 'cy', 'en', 'eo', 'es', 'fr', 'gl', 'gu', 'hi', 'hr', 'id', 'ja', 'kk', 'km', 'kn', 'ky', 'kz', 'min', 'mk', 'ms', 'mt', 'nl', 'no', 'nn', 'oc', 'pa', 'pl', 'pt', 'ru', 'sh', 'sl', 'tr', 'tt', 'uk', 'ur', 'uz', 'vi', 'xh', 'zh' ], + target: [ 'af', 'an', 'ar', 'az', 'bg', 'bs', 'ca', 'cr', 'cy', 'eo', 'es', 'fr', 'gl', 'gu', 'hi', 'hr', 'id', 'ja', 'kk', 'km', 'kn', 'ky', 'kz', 'min', 'mk', 'ms', 'mt', 'nl', 'no', 'nn', 'oc', 'pa', 'pl', 'pt', 'ru', 'sh', 'sl', 'tt', 'tr', 'uk', 'ur', 'uz', 'vi', 'xh', 'zh' ], mt: { Apertium: { af: [ 'nl' ], -- To view, visit https://gerrit.wikimedia.org/r/199851 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib378c7d66bd35f00eddff29d06baa24bc990a92b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Beta: CX: Add Gujarati as target language - change (operations/puppet)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/199866 Change subject: Beta: CX: Add Gujarati as target language .. Beta: CX: Add Gujarati as target language Bug: T93999 Change-Id: I8be295fb2960ba829e1a024028bac74963d01ae7 --- M hieradata/labs/deployment-prep/common.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/66/199866/1 diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 061250c..9a56dd2 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -82,6 +82,7 @@ - 'eo' - 'es' - 'fr' +- 'gu' - 'hy' - 'id' - 'it' -- To view, visit https://gerrit.wikimedia.org/r/199866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8be295fb2960ba829e1a024028bac74963d01ae7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove undeclared dependency on mw.user - change (mediawiki...ImageMetrics)
jenkins-bot has submitted this change and it was merged. Change subject: Remove undeclared dependency on mw.user .. Remove undeclared dependency on mw.user Bug: T93310 Change-Id: I6ab988be43c93780d01077a0b08e627488df8d51 --- M resources/loader.js 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Gilles: Looks good to me, approved Bmansurov: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/resources/loader.js b/resources/loader.js index 521f919..9adc84e 100644 --- a/resources/loader.js +++ b/resources/loader.js @@ -30,7 +30,10 @@ if ( mw.config.get( 'wgCanonicalNamespace' ) !== 'File' ) { imageFactor = 0; - } else if ( !mw.user.isAnon() loggedinImageFactor ) { + } else if ( + mw.config.get( 'wgUserName' ) !== null // same as !mw.user.isAnon() - don't require mw.user just for this + loggedinImageFactor + ) { imageFactor = loggedinImageFactor; } -- To view, visit https://gerrit.wikimedia.org/r/198414 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ab988be43c93780d01077a0b08e627488df8d51 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/ImageMetrics Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Bmansurov bmansu...@wikimedia.org Gerrit-Reviewer: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Return to default tipsy styles in Blueprint - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199871 Change subject: Return to default tipsy styles in Blueprint .. Return to default tipsy styles in Blueprint Change-Id: Ic8aa4e73d4dd629ac794446cf88a2669fdd34d1d --- M LivingStyleGuide.php A skinStyles/tipsy.original.less A skinStyles/tipsy.override.less 3 files changed, 51 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/71/199871/1 diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 7f70eb7..d392861 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -57,6 +57,16 @@ ) + $styleguideSkinResourceTemplate, ); +$wgResourceModuleSkinStyles['livingstyleguide'] = array( + // Apply original Tipsy styles + 'jquery.tipsy' = array( + 'tipsy.original.less', + 'tipsy.override.less', + ), + 'remoteSkinPath' = 'LivingStyleGuide/skinStyles', + 'localBasePath' = __DIR__ . '/skinStyles', +); + require_once __DIR__./autoload.php; require_once __DIR__./vendor/autoload.php; diff --git a/skinStyles/tipsy.original.less b/skinStyles/tipsy.original.less new file mode 100644 index 000..14a31f5 --- /dev/null +++ b/skinStyles/tipsy.original.less @@ -0,0 +1,34 @@ +// Copied from https://raw.githubusercontent.com/jaz303/tipsy/master/src/stylesheets/tipsy.css +// And modified for additional specificity + +@tooltip-color: #333; + +body { + .tipsy { +font-size: 10px; position: absolute; padding: 5px; z-index: 10; +.tipsy-inner { background-color: @tooltip-color; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; } + +/* Rounded corners */ +.tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } + +/* Uncomment for shadow */ +/*.tipsy-inner { box-shadow: 0 0 5px #00; -webkit-box-shadow: 0 0 5px #00; -moz-box-shadow: 0 0 5px #00; }*/ + +.tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed @tooltip-color; } + +/* Rules to colour arrows */ +.tipsy-arrow-n { border-bottom-color: @tooltip-color; } +.tipsy-arrow-s { border-top-color: @tooltip-color; } +.tipsy-arrow-e { border-left-color: @tooltip-color; } +.tipsy-arrow-w { border-right-color: @tooltip-color; } + + .tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; } + .tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} + .tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} +.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } + .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } + .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } +.tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; } +.tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; } + } +} diff --git a/skinStyles/tipsy.override.less b/skinStyles/tipsy.override.less new file mode 100644 index 000..39d3f8c --- /dev/null +++ b/skinStyles/tipsy.override.less @@ -0,0 +1,7 @@ +body .tipsy { + font-size: 14px; + + .tipsy-inner { + border: none; + } +} -- To view, visit https://gerrit.wikimedia.org/r/199871 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8aa4e73d4dd629ac794446cf88a2669fdd34d1d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna agarr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BrowserTest] Capture the whole Insert button in the screenshot - change (mediawiki...VisualEditor)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/199872 Change subject: [BrowserTest] Capture the whole Insert button in the screenshot .. [BrowserTest] Capture the whole Insert button in the screenshot Change-Id: I7551914d57adace5ceb385f16cc93e146e4774a7 --- M modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb 2 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/72/199872/1 diff --git a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb index 91eb37b..9283a0d 100644 --- a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb +++ b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb @@ -188,7 +188,7 @@ Screenshot.capture( @browser, #{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_indicator_down_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element] ) Screenshot.highlight(@current_page, @current_page.media_insert_menu_element) @@ -196,7 +196,7 @@ Screenshot.capture( @browser, VisualEditor_Media_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_indicator_down_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element] ) Screenshot.highlight(@current_page, @current_page.media_insert_menu_element, '#FF') @@ -205,7 +205,7 @@ Screenshot.capture( @browser, VisualEditor_Template_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_indicator_down_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element] ) Screenshot.highlight(@current_page, @current_page.template_insert_menu_element, '#FF') @@ -214,7 +214,7 @@ Screenshot.capture( @browser, VisualEditor_References_List_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_indicator_down_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element] ) Screenshot.highlight(@current_page, @current_page.ref_list_insert_menu_element, '#FF') @@ -223,7 +223,7 @@ Screenshot.capture( @browser, VisualEditor_Formula_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, -[@current_page.insert_indicator_down_element, @current_page.insert_pull_down_element] +[@current_page.insert_button_element, @current_page.insert_pull_down_element] ) end diff --git a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb index 918966f..af6ec3b 100644 --- a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb +++ b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb @@ -72,6 +72,7 @@ span(:insert_citation, css: '.ve-ui-nodeDialog div:nth-child(1) div:nth-child(1) div:nth-child(3) div:nth-child(1) a:nth-child(1) span:nth-child(2) ') span(:insert_indicator, text: 'Insert') + div(:insert_button, class: 've-test-toolbar-insert') span(:insert_indicator_down, css: '.ve-test-toolbar-insert .oo-ui-indicator-down') a(:insert_more_fewer, css: '.ve-test-toolbar-insert .oo-ui-tool-name-more-fewer .oo-ui-tool-link') div(:insert_pull_down, css: '.ve-test-toolbar-insert .oo-ui-clippableElement-clippable') -- To view, visit https://gerrit.wikimedia.org/r/199872 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7551914d57adace5ceb385f16cc93e146e4774a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clunky workaround for putting link into escaped message - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/199873 Change subject: Clunky workaround for putting link into escaped message .. Clunky workaround for putting link into escaped message Not escaping the message trips up my unescaped message checker Change-Id: I7e4de4c5b9008988f9d3eedd83c825b3a050849b --- M resources/js/ext.uls.interface.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/73/199873/1 diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index 86d17e7..88b890b 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -230,7 +230,7 @@ // Get the html of the link by wrapping it in div first link = $( 'div' ).html( link ).html(); - return mw.msg( 'ext-uls-undo-language-tooltip-text', link ); + return mw.message( 'ext-uls-undo-language-tooltip-text', '$1' ).escaped().replace( '$1', link ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/199873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e4de4c5b9008988f9d3eedd83c825b3a050849b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor showULSTooltip - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/199875 Change subject: Refactor showULSTooltip .. Refactor showULSTooltip Makes the code easier to understand and fixes T52743 Bug: T52743 Change-Id: If508f26b5133284f3059b50d420066a8b4fefb07 --- M resources/js/ext.uls.interface.js 1 file changed, 18 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/75/199875/1 diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index 4618060..6e1e8f7 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -189,37 +189,37 @@ * It also allows to undo the language selection. */ function showULSTooltip() { - var ulsPosition = mw.config.get( 'wgULSPosition' ), + var previousLang, $ulsTrigger, anonMode, showUndo, newLanguage, previousLanguages, + ulsPosition = mw.config.get( 'wgULSPosition' ), currentLang = mw.config.get( 'wgUserLanguage' ), - previousLang, - $ulsTrigger, - anonMode, rtlPage = $( 'body' ).hasClass( 'rtl' ), tipsyGravity = { personal: 'n', interlanguage: rtlPage ? 'e' : 'w' - }, - previousLanguages = mw.uls.getPreviousLanguages() || []; - - previousLang = previousLanguages.slice( -1 )[0]; + }; $ulsTrigger = ( ulsPosition === 'interlanguage' ) ? $( '.uls-settings-trigger' ) : $( '.uls-trigger' ); - if ( previousLang === currentLang ) { - $ulsTrigger.tipsy( { gravity: rtlPage ? 'e' : 'w' } ); + previousLanguages = mw.uls.getPreviousLanguages() || []; + previousLang = previousLanguages.slice( -1 )[0]; - return; + // Whether we see current language for the first time + newLanguage = currentLang !== previousLang; + // Whether user is able to change language + anonMode = ( mw.user.isAnon() !mw.config.get( 'wgULSAnonCanChangeLanguage' ) ); + // Whether user is able to change language, and just did so + showUndo = !anonMode newLanguage previousLang !== undefined; + + if ( newLanguage ) { + previousLanguages.push( currentLang ); + mw.uls.setPreviousLanguages( previousLanguages ); } - previousLanguages.push( currentLang ); - mw.uls.setPreviousLanguages( previousLanguages ); - - anonMode = ( mw.user.isAnon() !mw.config.get( 'wgULSAnonCanChangeLanguage' ) ); - - if ( anonMode || !previousLang ) { - // Do not show tooltip + if ( !showUndo ) { + // In interlanguage mode, we will have normal tooltip, make it look same using tipsy + $ulsTrigger.tipsy( { gravity: tipsyGravity[ulsPosition] } ); return; } -- To view, visit https://gerrit.wikimedia.org/r/199875 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If508f26b5133284f3059b50d420066a8b4fefb07 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add text filters - change (wikimedia...dash)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/200097 Change subject: Add text filters .. Add text filters With 'Exactly', 'Contains', 'Starts with' and 'Ends with' Change-Id: If2424596ce43afce1f1a40e843d9d54bb16673c2 --- M src/app/startup.js M src/components/filters/filters.js A src/components/filters/text-filter/text-filter.html A src/components/filters/text-filter/text-filter.js 4 files changed, 68 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash refs/changes/97/200097/1 diff --git a/src/app/startup.js b/src/app/startup.js index 8e90dc0..a7665ea 100644 --- a/src/app/startup.js +++ b/src/app/startup.js @@ -21,6 +21,7 @@ //register filters ko.components.register( 'filters',{ require: 'components/filters/filters' }); ko.components.register( 'dropdown-filter',{ require: 'components/filters/dropdown-filter/dropdown-filter' }); +ko.components.register( 'text-filter', { require: 'components/filters/text-filter/text-filter' }); //register individual widgets ko.components.register( 'fraud-gauge',{ require: 'components/widgets/fraud-gauge/fraud-gauge' }); diff --git a/src/components/filters/filters.js b/src/components/filters/filters.js index 6836419..c359c51 100644 --- a/src/components/filters/filters.js +++ b/src/components/filters/filters.js @@ -37,11 +37,16 @@ metadata: filterMeta, queryString: ko.observable('') }; - if ( filterMeta.type === 'dropdown' ) { - filter.userChoices = ko.observableArray( params.userChoices()[name] || [] ); - } else { - return;//temporarily only doing dropdown filters - //filter.userChoices = ko.observable( params.userChoices()[name] ); + switch( filterMeta.type ) { + case 'dropdown': + filter.userChoices = ko.observableArray( params.userChoices()[name] || [] ); + break; + case 'text': + filter.userChoices = ko.observable( params.userChoices()[name] || {} ); + break; + default: + //not yet supported filter type + return; } filter.queryString.subscribe( self.setChoices ); self.filters.push( filter ); diff --git a/src/components/filters/text-filter/text-filter.html b/src/components/filters/text-filter/text-filter.html new file mode 100644 index 000..1821328 --- /dev/null +++ b/src/components/filters/text-filter/text-filter.html @@ -0,0 +1,2 @@ +select data-bind=options:operators, value: selectedOperator, optionsText: 'text', optionsValue: 'value'/select +input type=text data-bind=value:value / diff --git a/src/components/filters/text-filter/text-filter.js b/src/components/filters/text-filter/text-filter.js new file mode 100644 index 000..f194fdf --- /dev/null +++ b/src/components/filters/text-filter/text-filter.js @@ -0,0 +1,55 @@ +define( [ + 'knockout', + 'text!components/filters/text-filter/text-filter.html' + ], +function( ko, template ){ + + function TextFilterViewModel( params ){ + var self = this; + + this.operators = [ + { + value: 'eq', + text: 'Exactly' + }, + { + value: 'fn|startswith', + text: 'Starts with' + }, + { + value: 'fn|endswith', + text: 'Ends with' + }, + { + value: 'fn|substringof', + text: 'Contains' + } + ]; + this.selectedOperator = ko.observable( params.userChoices().operator || 'eq' ); + this.value = ko.observable( params.userChoices().value || '' ); + + this.changed = function() { + params.userChoices( { + operator: self.selectedOperator(), + value: self.value() +
[MediaWiki-commits] [Gerrit] Add 'kn' and 'uk' languages - change (analytics/limn-language-data)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/200101 Change subject: Add 'kn' and 'uk' languages .. Add 'kn' and 'uk' languages Change-Id: I9668cf68727dcb195ad39e27e43d85214abd39e3 --- M language/content_translation_beta.sql M language/content_translation_beta_manual.sql M reportgenerator/config/config.json 3 files changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-language-data refs/changes/01/200101/1 diff --git a/language/content_translation_beta.sql b/language/content_translation_beta.sql index 311b5a7..2d8b270 100644 --- a/language/content_translation_beta.sql +++ b/language/content_translation_beta.sql @@ -12,7 +12,9 @@ minwiki, uzwiki, kywiki, - pawiki + pawiki, + knwiki, + ukwiki from ( select count(*) as cawiki from cawiki.user_properties where up_property = 'cx' and up_value = 1 ) ca left join @@ -41,4 +43,8 @@ ( select count(*) as kywiki from kywiki.user_properties where up_property = 'cx' and up_value = 1 ) ky on 1=1 left join ( select count(*) as pawiki from pawiki.user_properties where up_property = 'cx' and up_value = 1 ) pa on 1=1 +left join +( select count(*) as knwiki from knwiki.user_properties where up_property = 'cx' and up_value = 1 ) kn on 1=1 +left join +( select count(*) as ukwiki from ukwiki.user_properties where up_property = 'cx' and up_value = 1 ) uk on 1=1 ; diff --git a/language/content_translation_beta_manual.sql b/language/content_translation_beta_manual.sql index 0e34aa1..98f0d75 100644 --- a/language/content_translation_beta_manual.sql +++ b/language/content_translation_beta_manual.sql @@ -12,7 +12,9 @@ minwiki, uzwiki, kywiki, - pawiki + pawiki, + knwiki, + ukwiki from ( select count(*) as cawiki from cawiki.user_properties where up_property = 'cx' and up_value = 1 and up_user not in ( select up_user from cawiki.user_properties where up_property = 'betafeatures-auto-enroll' and up_value = 1 ) ) ca left join @@ -41,4 +43,8 @@ ( select count(*) as kywiki from kywiki.user_properties where up_property = 'cx' and up_value = 1 and up_user not in ( select up_user from kywiki.user_properties where up_property = 'betafeatures-auto-enroll' and up_value = 1 ) ) ky on 1=1 left join ( select count(*) as pawiki from pawiki.user_properties where up_property = 'cx' and up_value = 1 and up_user not in ( select up_user from pawiki.user_properties where up_property = 'betafeatures-auto-enroll' and up_value = 1 ) ) pa on 1=1 +left join +( select count(*) as knwiki from knwiki.user_properties where up_property = 'cx' and up_value = 1 and up_user not in ( select up_user from knwiki.user_properties where up_property = 'betafeatures-auto-enroll' and up_value = 1 ) ) kn on 1=1 +left join +( select count(*) as ukwiki from ukwiki.user_properties where up_property = 'cx' and up_value = 1 and up_user not in ( select up_user from ukwiki.user_properties where up_property = 'betafeatures-auto-enroll' and up_value = 1 ) ) uk on 1=1 ; diff --git a/reportgenerator/config/config.json b/reportgenerator/config/config.json index a915929..c0c6de3 100644 --- a/reportgenerator/config/config.json +++ b/reportgenerator/config/config.json @@ -1,3 +1,3 @@ { - languages: [ ca, da, eo, es, id, ky, ms, nn, no, pa, pt, sv, min, uz ] + languages: [ ca, da, eo, es, id, ky, ms, nn, no, pa, pt, sv, min, uz, kn, uk ] } -- To view, visit https://gerrit.wikimedia.org/r/200101 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9668cf68727dcb195ad39e27e43d85214abd39e3 Gerrit-PatchSet: 1 Gerrit-Project: analytics/limn-language-data Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use standard box-sixing for mw-ui-input as well - change (mediawiki...Flow)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/200102 Change subject: Use standard box-sixing for mw-ui-input as well .. Use standard box-sixing for mw-ui-input as well Change-Id: I11016f5c242f16af34b61fe393b1aa8d9637423e --- M modules/editor/editors/visualeditor/mw.flow.ve.Target.less 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/02/200102/1 diff --git a/modules/editor/editors/visualeditor/mw.flow.ve.Target.less b/modules/editor/editors/visualeditor/mw.flow.ve.Target.less index 73b5ccb..392b504 100644 --- a/modules/editor/editors/visualeditor/mw.flow.ve.Target.less +++ b/modules/editor/editors/visualeditor/mw.flow.ve.Target.less @@ -9,9 +9,10 @@ .box-sizing(content-box); } - // VE and OOjs UI do use other models in some cases, so we + // Core, VE and OOjs UI do use other models in some cases, so we // have to re-override them again as needed. - .oo-ui-textInputWidget input { + .oo-ui-textInputWidget input, + .mw-ui-input { .box-sizing(border-box); } } -- To view, visit https://gerrit.wikimedia.org/r/200102 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11016f5c242f16af34b61fe393b1aa8d9637423e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make VisualEditor access RESTbase directly on all wikis - change (operations/mediawiki-config)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/200107 Change subject: Make VisualEditor access RESTbase directly on all wikis .. Make VisualEditor access RESTbase directly on all wikis Bug: T90374 Change-Id: I34aee64b217c46b8dd24a36818850e4f09060850 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/07/200107/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 038376e..28d8abe 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -2031,9 +2031,7 @@ } // RESTbase connection configuration -if ( $wmgVisualEditorAccessRESTbaseDirectly ) { -$wgVisualEditorRestbaseURL = https://rest.wikimedia.org/$wgServerName/v1/page/html/;; -} +$wgVisualEditorRestbaseURL = https://rest.wikimedia.org/$wgServerName/v1/page/html/;; // Namespace configuration if ( !$wmgVisualEditorInContentNamespaces ) { diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 6b80529..61b7de5 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12306,13 +12306,6 @@ 'svwiktionary' = true, # Per community request ), -// Whether VisualEditor should bypass the MediaWiki layer and contact RESTbase directly for speed -'wmgVisualEditorAccessRESTbaseDirectly' = array( - 'default' = false, - 'group0' = true, - 'wikipedia' = true, -), - // Namespaces for VisualEditor to be active in, as well as wgContentNamespaces // NS_VISUALEDITOR is added in CommonSettings.php if wmgUseVisualEditorNamespace is true 'wmgVisualEditorNamespaces' = array( -- To view, visit https://gerrit.wikimedia.org/r/200107 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34aee64b217c46b8dd24a36818850e4f09060850 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make VisualEditor access RESTbase directly on Wikipedias - change (operations/mediawiki-config)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/200106 Change subject: Make VisualEditor access RESTbase directly on Wikipedias .. Make VisualEditor access RESTbase directly on Wikipedias Bug: T90374 Change-Id: I81d5509c12fe2049169ec24d5133c24323096e5d --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/06/200106/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index c82cc14..6b80529 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12309,10 +12309,8 @@ // Whether VisualEditor should bypass the MediaWiki layer and contact RESTbase directly for speed 'wmgVisualEditorAccessRESTbaseDirectly' = array( 'default' = false, - 'mediawikiwiki' = true, - 'testwiki' = true, - 'test2wiki' = true, - 'enwiki' = true, + 'group0' = true, + 'wikipedia' = true, ), // Namespaces for VisualEditor to be active in, as well as wgContentNamespaces -- To view, visit https://gerrit.wikimedia.org/r/200106 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81d5509c12fe2049169ec24d5133c24323096e5d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make VisualEditor access RESTbase directly on enwiki - change (operations/mediawiki-config)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/200105 Change subject: Make VisualEditor access RESTbase directly on enwiki .. Make VisualEditor access RESTbase directly on enwiki Bug: T90374 Change-Id: I544259a4f9ad733bc7e361b68c294b255a47cc01 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/05/200105/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index eade0b7..c82cc14 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12312,6 +12312,7 @@ 'mediawikiwiki' = true, 'testwiki' = true, 'test2wiki' = true, + 'enwiki' = true, ), // Namespaces for VisualEditor to be active in, as well as wgContentNamespaces -- To view, visit https://gerrit.wikimedia.org/r/200105 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I544259a4f9ad733bc7e361b68c294b255a47cc01 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't access context in SpecialPage::__construct(), it's not... - change (mediawiki...Gather)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/200112 Change subject: Don't access context in SpecialPage::__construct(), it's not set yet .. Don't access context in SpecialPage::__construct(), it's not set yet Change-Id: I8bf84990ea9c6c16dd08a23c426e6909752f7ad8 --- M includes/specials/SpecialGather.php 1 file changed, 10 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/12/200112/1 diff --git a/includes/specials/SpecialGather.php b/includes/specials/SpecialGather.php index 3368353..fe717e0 100644 --- a/includes/specials/SpecialGather.php +++ b/includes/specials/SpecialGather.php @@ -21,18 +21,6 @@ public function __construct() { parent::__construct( 'Gather' ); - $out = $this-getOutput(); - $out-addModules( - array( - 'ext.gather.special', - ) - ); - $out-addModuleStyles( array( - 'mediawiki.ui.anchor', - 'mediawiki.ui.icon', - 'ext.gather.icons', - 'ext.gather.styles', - ) ); } /** @@ -41,7 +29,16 @@ * @param string $subpage */ public function execute( $subpage ) { - + $out = $this-getOutput(); + $out-addModules( array( + 'ext.gather.special', + ) ); + $out-addModuleStyles( array( + 'mediawiki.ui.anchor', + 'mediawiki.ui.icon', + 'ext.gather.icons', + 'ext.gather.styles', + ) ); if ( preg_match( '/^$/', $subpage ) ) { // Root subpage. User owned collections. // For listing own lists, you need to be logged in -- To view, visit https://gerrit.wikimedia.org/r/200112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8bf84990ea9c6c16dd08a23c426e6909752f7ad8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update CodeMirror library to version 5.0.0 (v 3.1.1) - change (mediawiki...CodeMirror)
jenkins-bot has submitted this change and it was merged. Change subject: update CodeMirror library to version 5.0.0 (v 3.1.1) .. update CodeMirror library to version 5.0.0 (v 3.1.1) Change-Id: Ifcd1bdcd45c7b6fbb10927d1c6821f8804527ef6 --- M CodeMirror.php M resources/lib/codemirror/AUTHORS M resources/lib/codemirror/CONTRIBUTING.md M resources/lib/codemirror/README.md M resources/lib/codemirror/addon/dialog/dialog.js A resources/lib/codemirror/addon/display/panel.js M resources/lib/codemirror/addon/edit/closebrackets.js M resources/lib/codemirror/addon/edit/closetag.js M resources/lib/codemirror/addon/edit/continuelist.js M resources/lib/codemirror/addon/edit/matchbrackets.js M resources/lib/codemirror/addon/fold/foldcode.js M resources/lib/codemirror/addon/fold/foldgutter.js M resources/lib/codemirror/addon/hint/anyword-hint.js M resources/lib/codemirror/addon/hint/css-hint.js M resources/lib/codemirror/addon/hint/html-hint.js M resources/lib/codemirror/addon/hint/javascript-hint.js D resources/lib/codemirror/addon/hint/python-hint.js M resources/lib/codemirror/addon/hint/show-hint.js M resources/lib/codemirror/addon/hint/sql-hint.js M resources/lib/codemirror/addon/hint/xml-hint.js M resources/lib/codemirror/addon/lint/lint.js M resources/lib/codemirror/addon/merge/merge.css M resources/lib/codemirror/addon/merge/merge.js M resources/lib/codemirror/addon/mode/loadmode.js M resources/lib/codemirror/addon/mode/overlay.js M resources/lib/codemirror/addon/mode/simple.js A resources/lib/codemirror/addon/scroll/annotatescrollbar.js A resources/lib/codemirror/addon/scroll/simplescrollbars.css A resources/lib/codemirror/addon/scroll/simplescrollbars.js A resources/lib/codemirror/addon/search/matchesonscrollbar.css A resources/lib/codemirror/addon/search/matchesonscrollbar.js M resources/lib/codemirror/addon/search/search.js A resources/lib/codemirror/addon/selection/selection-pointer.js M resources/lib/codemirror/addon/tern/tern.js M resources/lib/codemirror/keymap/emacs.js M resources/lib/codemirror/keymap/sublime.js M resources/lib/codemirror/keymap/vim.js M resources/lib/codemirror/lib/codemirror.css M resources/lib/codemirror/lib/codemirror.js M resources/lib/codemirror/mode/clike/clike.js M resources/lib/codemirror/mode/clike/index.html M resources/lib/codemirror/mode/coffeescript/coffeescript.js M resources/lib/codemirror/mode/commonlisp/commonlisp.js M resources/lib/codemirror/mode/css/css.js M resources/lib/codemirror/mode/css/index.html M resources/lib/codemirror/mode/css/test.js M resources/lib/codemirror/mode/cypher/cypher.js A resources/lib/codemirror/mode/dart/dart.js A resources/lib/codemirror/mode/dart/index.html A resources/lib/codemirror/mode/dockerfile/dockerfile.js A resources/lib/codemirror/mode/dockerfile/index.html A resources/lib/codemirror/mode/ebnf/ebnf.js A resources/lib/codemirror/mode/ebnf/index.html A resources/lib/codemirror/mode/forth/forth.js A resources/lib/codemirror/mode/forth/index.html M resources/lib/codemirror/mode/gfm/gfm.js M resources/lib/codemirror/mode/gfm/index.html M resources/lib/codemirror/mode/gfm/test.js M resources/lib/codemirror/mode/go/go.js M resources/lib/codemirror/mode/htmlmixed/htmlmixed.js M resources/lib/codemirror/mode/htmlmixed/index.html A resources/lib/codemirror/mode/idl/idl.js A resources/lib/codemirror/mode/idl/index.html M resources/lib/codemirror/mode/index.html M resources/lib/codemirror/mode/javascript/javascript.js M resources/lib/codemirror/mode/javascript/test.js M resources/lib/codemirror/mode/markdown/markdown.js M resources/lib/codemirror/mode/meta.js M resources/lib/codemirror/mode/perl/perl.js M resources/lib/codemirror/mode/puppet/puppet.js M resources/lib/codemirror/mode/ruby/index.html M resources/lib/codemirror/mode/sass/sass.js M resources/lib/codemirror/mode/shell/shell.js A resources/lib/codemirror/mode/soy/index.html A resources/lib/codemirror/mode/soy/soy.js M resources/lib/codemirror/mode/sparql/index.html M resources/lib/codemirror/mode/sparql/sparql.js A resources/lib/codemirror/mode/spreadsheet/index.html A resources/lib/codemirror/mode/spreadsheet/spreadsheet.js M resources/lib/codemirror/mode/sql/sql.js M resources/lib/codemirror/mode/stex/stex.js A resources/lib/codemirror/mode/stylus/index.html A resources/lib/codemirror/mode/stylus/stylus.js M resources/lib/codemirror/mode/textile/test.js M resources/lib/codemirror/mode/textile/textile.js M resources/lib/codemirror/mode/turtle/turtle.js M resources/lib/codemirror/mode/verilog/verilog.js M resources/lib/codemirror/mode/yaml/yaml.js M resources/lib/codemirror/theme/3024-day.css M resources/lib/codemirror/theme/3024-night.css M resources/lib/codemirror/theme/ambiance.css M resources/lib/codemirror/theme/base16-dark.css M resources/lib/codemirror/theme/base16-light.css M resources/lib/codemirror/theme/blackboard.css M resources/lib/codemirror/theme/cobalt.css A
[MediaWiki-commits] [Gerrit] Adding $message of caught WikitextException object to displa... - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Adding $message of caught WikitextException object to displayed error .. Adding $message of caught WikitextException object to displayed error This commit pulls the $message field of a caught WikitextException object and forwards it via the dieUsage method call. The message is passed as the detail entry of the error object, meaning it will not be displayed to the user. Bug: T69000 Change-Id: I87cb484896ed1ac5369bf8c11b315d5f53ac3e8a --- M includes/api/ApiParsoidUtilsFlow.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiParsoidUtilsFlow.php b/includes/api/ApiParsoidUtilsFlow.php index 695adfa..0d13d8e 100644 --- a/includes/api/ApiParsoidUtilsFlow.php +++ b/includes/api/ApiParsoidUtilsFlow.php @@ -15,7 +15,8 @@ $content = Utils::convert( $params['from'], $params['to'], $params['content'], $page-getTitle() ); } catch ( WikitextException $e ) { $code = $e-getErrorCode(); - $this-dieUsage( $this-msg( $code )-inContentLanguage()-useDatabase( false )-plain(), $code ); + $this-dieUsage( $this-msg( $code )-inContentLanguage()-useDatabase( false )-plain(), $code, + $e-getStatusCode(), array( 'detail' = $e-getMessage() ) ); return; // helps static analysis know execution does not continue past self::dieUsage } -- To view, visit https://gerrit.wikimedia.org/r/199816 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I87cb484896ed1ac5369bf8c11b315d5f53ac3e8a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Happy5214 happy5...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Live index update - change (mediawiki...MathSearch)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/200100 Change subject: Live index update .. Live index update * use onPageContentSaveComplete hook * still quite prototypical Change-Id: Iff6e07e2276f32c11f4b828e55ba9e27bd33aa5d --- M MathSearch.hooks.php M MathSearch.php A includes/MwsDumpWriter.php M includes/engines/MathEngineBaseX.php M includes/engines/MathEngineRest.php M maintenance/CreateMWSHarvest.php M maintenance/UpdateMath.php A tests/MwsDumpWriterTest.php 8 files changed, 464 insertions(+), 79 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch refs/changes/00/200100/1 diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php index de78e6d..83ae417 100644 --- a/MathSearch.hooks.php +++ b/MathSearch.hooks.php @@ -1,11 +1,11 @@ ?php + /** * MediaWiki MathSearch extension * * (c) 2012 various MediaWiki contributors * GPLv2 license; info in main package. */ - class MathSearchHooks { static $nextID = 0; @@ -35,29 +35,31 @@ if ( is_null( $updater ) ) { throw new MWException( Mathsearch extension requires Mediawiki 1.18 or above ); } - $type = $updater-getDB()-getType(); - if ( $type == mysql ) { - $dir = __DIR__ . '/db/' ; + $type = $updater-getDB()-getType(); + if ( $type == mysql ) { + $dir = __DIR__ . '/db/'; $updater-addExtensionTable( 'mathindex', $dir . 'mathindex.sql' ); - $updater-addExtensionTable( 'mathobservation', $dir . 'mathobservation.sql' ); + $updater-addExtensionTable( 'mathobservation', $dir . 'mathobservation.sql' ); $updater-addExtensionTable( 'mathvarstat', $dir . 'mathvarstat.sql' ); $updater-addExtensionTable( 'mathrevisionstat', $dir . 'mathrevisionstat.sql' ); $updater-addExtensionTable( 'mathsemantics', $dir . 'mathsemantics.sql' ); $updater-addExtensionTable( 'mathperformance', $dir . 'mathperformance.sql' ); $updater-addExtensionTable( 'mathidentifier', $dir . 'mathidentifier.sql' ); - if ( $wgMathWmcServer ){ + if ( $wgMathWmcServer ) { $wmcDir = $dir . 'wmc/persistent/'; - $updater-addExtensionTable( 'math_wmc_ref', $wmcDir . math_wmc_ref.sql); - $updater-addExtensionTable( 'math_wmc_runs', $wmcDir . math_wmc_runs.sql); - $updater-addExtensionTable( 'math_wmc_results', $wmcDir . math_wmc_results.sql); - $updater-addExtensionTable( 'math_wmc_assessed_formula', $wmcDir . math_wmc_assessed_formula.sql); - $updater-addExtensionTable( 'math_wmc_assessed_revision', $wmcDir . math_wmc_assessed_revision.sql); + $updater-addExtensionTable( 'math_wmc_ref', $wmcDir . math_wmc_ref.sql ); + $updater-addExtensionTable( 'math_wmc_runs', $wmcDir . math_wmc_runs.sql ); + $updater-addExtensionTable( 'math_wmc_results', $wmcDir . math_wmc_results.sql ); + $updater-addExtensionTable( 'math_wmc_assessed_formula', + $wmcDir . math_wmc_assessed_formula.sql ); + $updater-addExtensionTable( 'math_wmc_assessed_revision', + $wmcDir . math_wmc_assessed_revision.sql ); } - } elseif ( $type == 'sqlite' ){ + } elseif ( $type == 'sqlite' ) { // Don't scare Jenkins with an exception. } else { - throw new Exception( Math extension does not currently support $type database. ); - } + throw new Exception( Math extension does not currently support $type database. ); + } return true; } @@ -65,8 +67,8 @@ * Checks if the db2 php client is installed * @return boolean */ - public static function isDB2Supported(){ - if ( function_exists('db2_connect') ){ + public static function isDB2Supported() { + if ( function_exists( 'db2_connect' ) ) { return true; } else { return false; @@ -81,7 +83,7 @@ * @param string $inputHash hash of tex string (used as database entry) * @param string $tex the user input hash */ - private static function updateIndex($revId, $eid, $inputHash, $tex){ + private
[MediaWiki-commits] [Gerrit] Move progressbar to widgets - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/200111 Change subject: Move progressbar to widgets .. Move progressbar to widgets Change-Id: Id50ac227a4cc909c85673dc8d7d05cc4478d58c5 --- M Resources.php R modules/widgets/progressbar/ext.cx.progressbar.js R modules/widgets/progressbar/ext.cx.progressbar.less 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/11/200111/1 diff --git a/Resources.php b/Resources.php index 1c959bb..7297639 100644 --- a/Resources.php +++ b/Resources.php @@ -464,9 +464,9 @@ ) + $resourcePaths; $wgResourceModules['ext.cx.progressbar'] = array( - 'scripts' = 'tools/ext.cx.progressbar.js', + 'scripts' = 'widgets/progressbar/ext.cx.progressbar.js', 'styles' = array( - 'tools/styles/ext.cx.progressbar.less', + 'widgets/progressbar/ext.cx.progressbar.less', ), 'messages' = array( 'cx-header-progressbar-text', diff --git a/modules/tools/ext.cx.progressbar.js b/modules/widgets/progressbar/ext.cx.progressbar.js similarity index 100% rename from modules/tools/ext.cx.progressbar.js rename to modules/widgets/progressbar/ext.cx.progressbar.js diff --git a/modules/tools/styles/ext.cx.progressbar.less b/modules/widgets/progressbar/ext.cx.progressbar.less similarity index 92% rename from modules/tools/styles/ext.cx.progressbar.less rename to modules/widgets/progressbar/ext.cx.progressbar.less index f5f84de..ba7e0b4 100644 --- a/modules/tools/styles/ext.cx.progressbar.less +++ b/modules/widgets/progressbar/ext.cx.progressbar.less @@ -1,4 +1,4 @@ -@import ../../widgets/common/ext.cx.common; +@import ../common/ext.cx.common; .cx-header__progressbar { .mw-ui-one-whole; -- To view, visit https://gerrit.wikimedia.org/r/200111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id50ac227a4cc909c85673dc8d7d05cc4478d58c5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Live index update - change (mediawiki...MathSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Live index update .. Live index update * use onPageContentSaveComplete hook * still quite prototypical Change-Id: Iff6e07e2276f32c11f4b828e55ba9e27bd33aa5d --- M MathSearch.hooks.php M MathSearch.php A includes/MwsDumpWriter.php M includes/engines/MathEngineBaseX.php M includes/engines/MathEngineRest.php M maintenance/CreateMWSHarvest.php M maintenance/UpdateMath.php M tests/MathSearchHooksTest.php A tests/MwsDumpWriterTest.php 9 files changed, 482 insertions(+), 80 deletions(-) Approvals: Physikerwelt: Looks good to me, approved jenkins-bot: Verified diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php index de78e6d..5861f5f 100644 --- a/MathSearch.hooks.php +++ b/MathSearch.hooks.php @@ -1,11 +1,11 @@ ?php + /** * MediaWiki MathSearch extension * * (c) 2012 various MediaWiki contributors * GPLv2 license; info in main package. */ - class MathSearchHooks { static $nextID = 0; @@ -35,29 +35,31 @@ if ( is_null( $updater ) ) { throw new MWException( Mathsearch extension requires Mediawiki 1.18 or above ); } - $type = $updater-getDB()-getType(); - if ( $type == mysql ) { - $dir = __DIR__ . '/db/' ; + $type = $updater-getDB()-getType(); + if ( $type == mysql ) { + $dir = __DIR__ . '/db/'; $updater-addExtensionTable( 'mathindex', $dir . 'mathindex.sql' ); - $updater-addExtensionTable( 'mathobservation', $dir . 'mathobservation.sql' ); + $updater-addExtensionTable( 'mathobservation', $dir . 'mathobservation.sql' ); $updater-addExtensionTable( 'mathvarstat', $dir . 'mathvarstat.sql' ); $updater-addExtensionTable( 'mathrevisionstat', $dir . 'mathrevisionstat.sql' ); $updater-addExtensionTable( 'mathsemantics', $dir . 'mathsemantics.sql' ); $updater-addExtensionTable( 'mathperformance', $dir . 'mathperformance.sql' ); $updater-addExtensionTable( 'mathidentifier', $dir . 'mathidentifier.sql' ); - if ( $wgMathWmcServer ){ + if ( $wgMathWmcServer ) { $wmcDir = $dir . 'wmc/persistent/'; - $updater-addExtensionTable( 'math_wmc_ref', $wmcDir . math_wmc_ref.sql); - $updater-addExtensionTable( 'math_wmc_runs', $wmcDir . math_wmc_runs.sql); - $updater-addExtensionTable( 'math_wmc_results', $wmcDir . math_wmc_results.sql); - $updater-addExtensionTable( 'math_wmc_assessed_formula', $wmcDir . math_wmc_assessed_formula.sql); - $updater-addExtensionTable( 'math_wmc_assessed_revision', $wmcDir . math_wmc_assessed_revision.sql); + $updater-addExtensionTable( 'math_wmc_ref', $wmcDir . math_wmc_ref.sql ); + $updater-addExtensionTable( 'math_wmc_runs', $wmcDir . math_wmc_runs.sql ); + $updater-addExtensionTable( 'math_wmc_results', $wmcDir . math_wmc_results.sql ); + $updater-addExtensionTable( 'math_wmc_assessed_formula', + $wmcDir . math_wmc_assessed_formula.sql ); + $updater-addExtensionTable( 'math_wmc_assessed_revision', + $wmcDir . math_wmc_assessed_revision.sql ); } - } elseif ( $type == 'sqlite' ){ + } elseif ( $type == 'sqlite' ) { // Don't scare Jenkins with an exception. } else { - throw new Exception( Math extension does not currently support $type database. ); - } + throw new Exception( Math extension does not currently support $type database. ); + } return true; } @@ -65,8 +67,8 @@ * Checks if the db2 php client is installed * @return boolean */ - public static function isDB2Supported(){ - if ( function_exists('db2_connect') ){ + public static function isDB2Supported() { + if ( function_exists( 'db2_connect' ) ) { return true; } else { return false; @@ -81,7 +83,7 @@ * @param string $inputHash hash of tex string (used as database entry) * @param string $tex the user input hash */ - private static function updateIndex($revId, $eid, $inputHash, $tex){ + private static function
[MediaWiki-commits] [Gerrit] [WIP] Make VisualEditor access RESTbase directly - change (operations/mediawiki-config)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/200098 Change subject: [WIP] Make VisualEditor access RESTbase directly .. [WIP] Make VisualEditor access RESTbase directly Bug: T90374 Change-Id: I74a63bc028fdf098dad69437532adfb48bc533ed --- M wmf-config/InitialiseSettings.php 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/98/200098/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 61b7de5..cf130ea 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12306,6 +12306,17 @@ 'svwiktionary' = true, # Per community request ), +// OMG the hack; this really should be wmgVisualEditorAccessRESTbaseDirectly or whatever +'wgVisualEditorRestbaseURL' = array( + 'default' = '', + 'dewiki' = 'https://rest.wikimedia.org/de.wikipedia.org/v1/page/html/', + 'enwiki' = 'https://rest.wikimedia.org/en.wikipedia.org/v1/page/html/', + 'eswiki' = 'https://rest.wikimedia.org/es.wikipedia.org/v1/page/html/', + 'frwiki' = 'https://rest.wikimedia.org/fr.wikipedia.org/v1/page/html/', + 'itwiki' = 'https://rest.wikimedia.org/it.wikipedia.org/v1/page/html/', + 'ptwiki' = 'https://rest.wikimedia.org/pt.wikipedia.org/v1/page/html/', +), + // Namespaces for VisualEditor to be active in, as well as wgContentNamespaces // NS_VISUALEDITOR is added in CommonSettings.php if wmgUseVisualEditorNamespace is true 'wmgVisualEditorNamespaces' = array( -- To view, visit https://gerrit.wikimedia.org/r/200098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74a63bc028fdf098dad69437532adfb48bc533ed Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimetrics: lint - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/200103 Change subject: wikimetrics: lint .. wikimetrics: lint 3 x double quoted string containing no variables 4 x indentation of = is not properly aligned 1 x ensure found on line but it's not the first attribute puppet-lint 1.1.0 Change-Id: I60588381ef15d22d25a90d2f75e8e1fa5c1680c5 --- M manifests/role/wikimetrics.pp 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/200103/1 diff --git a/manifests/role/wikimetrics.pp b/manifests/role/wikimetrics.pp index 88c6ea4..ff16971 100644 --- a/manifests/role/wikimetrics.pp +++ b/manifests/role/wikimetrics.pp @@ -168,11 +168,11 @@ # Setup mysql, put data in /srv class { 'mysql::server': -config_hash = { +config_hash = { 'datadir' = '/srv/mysql' }, -before = Class['::wikimetrics::database'], -require = Labs_lvm::Volume['second-local-disk'] +before = Class['::wikimetrics::database'], +require = Labs_lvm::Volume['second-local-disk'] } class { '::wikimetrics': @@ -234,7 +234,7 @@ var_directory= $var_directory, public_subdirectory = $public_subdirectory, -require = Labs_lvm::Volume['second-local-disk'], +require = Labs_lvm::Volume['second-local-disk'], } # Run the wikimetrics/scripts/install script @@ -270,7 +270,7 @@ class { '::redis': dir = $redis_dir, dbfilename = $redis_dbfilename, -saves = [ 900 1, 300 10, 60 20 ], +saves = [ '900 1', '300 10', '60 20' ], stop_writes_on_bgsave_error = true, } @@ -299,6 +299,7 @@ $backup_ensure = 'absent' } class { '::wikimetrics::backup': +ensure= $backup_ensure, destination = /data/project/wikimetrics/backup/${::hostname}, db_user = $db_user_wikimetrics, db_pass = $db_pass_wikimetrics, @@ -307,7 +308,6 @@ redis_db_file = ${redis_dir}/${redis_dbfilename}, public_files = $public_directory, keep_days = 10, -ensure= $backup_ensure, } # Link aggregated projectcounts files to public directory -- To view, visit https://gerrit.wikimedia.org/r/200103 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60588381ef15d22d25a90d2f75e8e1fa5c1680c5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jenkins job validation, do not submit - change (mediawiki...Gather)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/200113 Change subject: jenkins job validation, do not submit .. jenkins job validation, do not submit Change-Id: I096a4c6eda2d283ed9fd16474fb733a1e94f2b06 --- A test.js A test.json A test.php A test.py A test.rb 5 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/13/200113/1 diff --git a/test.js b/test.js new file mode 100644 index 000..6b2b3db --- /dev/null +++ b/test.js @@ -0,0 +1 @@ +console.log(hello world); diff --git a/test.json b/test.json new file mode 100644 index 000..0967ef4 --- /dev/null +++ b/test.json @@ -0,0 +1 @@ +{} diff --git a/test.php b/test.php new file mode 100644 index 000..71625a4 --- /dev/null +++ b/test.php @@ -0,0 +1,2 @@ +?php +echo hi; diff --git a/test.py b/test.py new file mode 100644 index 000..f1a1813 --- /dev/null +++ b/test.py @@ -0,0 +1 @@ +print(Hello world!) diff --git a/test.rb b/test.rb new file mode 100644 index 000..5351f08 --- /dev/null +++ b/test.rb @@ -0,0 +1 @@ +puts 'Hello, world!' -- To view, visit https://gerrit.wikimedia.org/r/200113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I096a4c6eda2d283ed9fd16474fb733a1e94f2b06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] TODO Less special-casing in DataValidator - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/200096 Change subject: TODO Less special-casing in DataValidator .. TODO Less special-casing in DataValidator Change-Id: I2049be40bf41c3db048a0225ac711aefd5ed585e --- M gateway_common/DataValidator.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/96/200096/1 diff --git a/gateway_common/DataValidator.php b/gateway_common/DataValidator.php index 111b3ae..52ae1ea 100644 --- a/gateway_common/DataValidator.php +++ b/gateway_common/DataValidator.php @@ -347,6 +347,7 @@ } $result = null; // Handle special cases. + // TODO: Pass $gateway and $results, eliminating special cases? switch ( $validation_function ) { case 'validate_amount': if ( self::checkValidationPassed( array( 'currency_code', 'gateway' ), $results ) ){ -- To view, visit https://gerrit.wikimedia.org/r/200096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2049be40bf41c3db048a0225ac711aefd5ed585e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use addModuleStyles for mediawiki.skinning.content.parsoid - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Use addModuleStyles for mediawiki.skinning.content.parsoid .. Use addModuleStyles for mediawiki.skinning.content.parsoid Bug: T93723 Change-Id: Ica0ef4987c0de1b84105188d46ba38679a5641fa --- M includes/Parsoid/Utils.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Parsoid/Utils.php b/includes/Parsoid/Utils.php index edc80ba..3c99b76 100644 --- a/includes/Parsoid/Utils.php +++ b/includes/Parsoid/Utils.php @@ -237,7 +237,7 @@ self::parsoidConfig(); // XXX We only need the Parsoid CSS if some content being // rendered has getContentFormat() === 'html'. - $out-addModules( 'mediawiki.skinning.content.parsoid' ); + $out-addModuleStyles( 'mediawiki.skinning.content.parsoid' ); } catch ( NoParsoidException $e ) { // The module is only necessary when we are using parsoid. } -- To view, visit https://gerrit.wikimedia.org/r/199753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica0ef4987c0de1b84105188d46ba38679a5641fa Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] test - change (mediawiki...MathSearch)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/200099 Change subject: test .. test Change-Id: Ic0fbfa14ee655da82181173642206c33458b0655 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch refs/changes/99/200099/1 -- To view, visit https://gerrit.wikimedia.org/r/200099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0fbfa14ee655da82181173642206c33458b0655 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't throw a plain \Exception - change (mediawiki...Gather)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/200108 Change subject: Don't throw a plain \Exception .. Don't throw a plain \Exception Change-Id: I681387914c62d6cfa8048b5681825d4b9c0783cc --- M includes/specials/SpecialGather.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/08/200108/1 diff --git a/includes/specials/SpecialGather.php b/includes/specials/SpecialGather.php index 4b8b3dd..ce216c6 100644 --- a/includes/specials/SpecialGather.php +++ b/includes/specials/SpecialGather.php @@ -12,7 +12,7 @@ use \UsageException; use \DerivativeRequest; use \ApiMain; -use \Exception; +use \InvalidArgumentException; /** * Render a collection of articles. @@ -110,7 +110,7 @@ */ public function renderUserCollection( User $user, $id ) { if ( !is_int( $id ) ) { - throw new Exception( __METHOD__ . ' requires the second parameter to be an integer, ' + throw new InvalidArgumentException( __METHOD__ . ' requires the second parameter to be an integer, ' . gettype( $id ) . ' given.' ); } $collection = models\Collection::newFromApi( $id, $user ); -- To view, visit https://gerrit.wikimedia.org/r/200108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I681387914c62d6cfa8048b5681825d4b9c0783cc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use User::equals() - change (mediawiki...Gather)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/200109 Change subject: Use User::equals() .. Use User::equals() Change-Id: I7fe3c1c9a7e798d6f063d4c10a1f05444682aacc --- M includes/specials/SpecialGather.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/09/200109/1 diff --git a/includes/specials/SpecialGather.php b/includes/specials/SpecialGather.php index ce216c6..f635e41 100644 --- a/includes/specials/SpecialGather.php +++ b/includes/specials/SpecialGather.php @@ -162,7 +162,7 @@ * @return boolean */ private function isOwner( User $user ) { - return $this-getUser()-getName() == $user-getName(); + return $this-getUser()-equals( $user ); } // FIXME: Re-evaluate when UI supports editing image of collection. -- To view, visit https://gerrit.wikimedia.org/r/200109 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7fe3c1c9a7e798d6f063d4c10a1f05444682aacc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Temporary disable foreign keys for mathindex table - change (mediawiki...MathSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Temporary disable foreign keys for mathindex table .. Temporary disable foreign keys for mathindex table Bug: T94134 Change-Id: Ic0fbfa14ee655da82181173642206c33458b0655 --- M db/mathindex.sql 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Physikerwelt: Looks good to me, approved jenkins-bot: Verified diff --git a/db/mathindex.sql b/db/mathindex.sql index 42cea75..49d0601 100644 --- a/db/mathindex.sql +++ b/db/mathindex.sql @@ -20,7 +20,7 @@ mathindex_timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (mathindex_revision_id,mathindex_anchor), - FOREIGN KEY ( /*i*/mathindex_inputhash ) REFERENCES mathlatexml( math_inputhash ), + -- FOREIGN KEY ( /*i*/mathindex_inputhash ) REFERENCES mathlatexml( math_inputhash ), FOREIGN KEY ( /*i*/mathindex_revision_id ) REFERENCES revision( rev_id ) ) /*$wgDBTableOptions*/; \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/200099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0fbfa14ee655da82181173642206c33458b0655 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: Hcohl hc...@nist.gov Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: Springle sprin...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update preq dependency - change (mediawiki...deploy)
GWicke has submitted this change and it was merged. Change subject: Update preq dependency .. Update preq dependency Change-Id: I0c0e5519b8ceac71989426810cc9f2647c7849f9 --- M node_modules/istanbul/node_modules/async/package.json M node_modules/mocha-lcov-reporter/package.json M node_modules/mocha/node_modules/jade/package.json M node_modules/mocha/node_modules/mkdirp/package.json M node_modules/preq/index.js M node_modules/preq/node_modules/bluebird/package.json M node_modules/preq/package.json M node_modules/restbase-mod-table-cassandra/node_modules/async/package.json M node_modules/restbase-mod-table-cassandra/node_modules/cassandra-driver/package.json M node_modules/swagger-router/node_modules/bluebird/package.json M node_modules/swagger-ui/node_modules/shred/package.json 11 files changed, 27 insertions(+), 16 deletions(-) Approvals: GWicke: Verified; Looks good to me, approved diff --git a/node_modules/istanbul/node_modules/async/package.json b/node_modules/istanbul/node_modules/async/package.json index 9d15cd7..bdbe740 100644 --- a/node_modules/istanbul/node_modules/async/package.json +++ b/node_modules/istanbul/node_modules/async/package.json @@ -41,7 +41,7 @@ shasum: ac3613b1da9bed1b47510bb4651b8931e47146c7, tarball: http://registry.npmjs.org/async/-/async-0.9.0.tgz; }, - _from: async@0.9.x, + _from: async@~0.9.0, _npmVersion: 1.4.3, _npmUser: { name: caolan, diff --git a/node_modules/mocha-lcov-reporter/package.json b/node_modules/mocha-lcov-reporter/package.json index fa47c01..26cfa83 100644 --- a/node_modules/mocha-lcov-reporter/package.json +++ b/node_modules/mocha-lcov-reporter/package.json @@ -45,5 +45,9 @@ ], _shasum: 02670491db57ee6cb1fe7392e813700f6e336a21, _from: mocha-lcov-reporter@0.0.1, - _resolved: https://registry.npmjs.org/mocha-lcov-reporter/-/mocha-lcov-reporter-0.0.1.tgz; + _resolved: https://registry.npmjs.org/mocha-lcov-reporter/-/mocha-lcov-reporter-0.0.1.tgz;, + bugs: { +url: https://github.com/StevenLooman/mocha-lcov-reporter/issues; + }, + readme: ERROR: No README data found! } diff --git a/node_modules/mocha/node_modules/jade/package.json b/node_modules/mocha/node_modules/jade/package.json index 14198af..191cb4d 100644 --- a/node_modules/mocha/node_modules/jade/package.json +++ b/node_modules/mocha/node_modules/jade/package.json @@ -52,5 +52,9 @@ directories: {}, _shasum: 8f10d7977d8d79f2f6ff862a81b0513ccb25686c, _from: jade@0.26.3, - _resolved: https://registry.npmjs.org/jade/-/jade-0.26.3.tgz; + _resolved: https://registry.npmjs.org/jade/-/jade-0.26.3.tgz;, + bugs: { +url: https://github.com/visionmedia/jade/issues; + }, + readme: ERROR: No README data found! } diff --git a/node_modules/mocha/node_modules/mkdirp/package.json b/node_modules/mocha/node_modules/mkdirp/package.json index a6de8f3..b7fe466 100644 --- a/node_modules/mocha/node_modules/mkdirp/package.json +++ b/node_modules/mocha/node_modules/mkdirp/package.json @@ -39,7 +39,7 @@ shasum: 1d73076a6df986cd9344e15e71fcc05a4c9abf12, tarball: http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz; }, - _from: mkdirp@~0.5.0, + _from: mkdirp@0.5.x, _npmVersion: 1.4.3, _npmUser: { name: substack, diff --git a/node_modules/preq/index.js b/node_modules/preq/index.js index 0ff933c..a820998 100644 --- a/node_modules/preq/index.js +++ b/node_modules/preq/index.js @@ -158,7 +158,8 @@ description: err.toString(), error: err, stack: err.stack, -options: self.options +uri: self.options.uri, +method: self.options.method, }, stack: err.stack })); diff --git a/node_modules/preq/node_modules/bluebird/package.json b/node_modules/preq/node_modules/bluebird/package.json index bfd096e..90ea2aa 100644 --- a/node_modules/preq/node_modules/bluebird/package.json +++ b/node_modules/preq/node_modules/bluebird/package.json @@ -74,7 +74,7 @@ gitHead: d5e06c2648b8be3c47cb5b6cb95f2bddf79c4c0a, _id: bluebird@2.9.15, _shasum: 80b37137c1dee42efac86486b0afc5f858354ab0, - _from: bluebird@^2.7.1, + _from: bluebird@^2.3.2, _npmVersion: 2.7.0, _nodeVersion: 1.5.1, _npmUser: { @@ -92,5 +92,6 @@ tarball: http://registry.npmjs.org/bluebird/-/bluebird-2.9.15.tgz; }, directories: {}, - _resolved: https://registry.npmjs.org/bluebird/-/bluebird-2.9.15.tgz; + _resolved: https://registry.npmjs.org/bluebird/-/bluebird-2.9.15.tgz;, + readme: ERROR: No README data found! } diff --git a/node_modules/preq/package.json b/node_modules/preq/package.json index 995add1..a044a75 100644 --- a/node_modules/preq/package.json +++ b/node_modules/preq/package.json @@ -1,6 +1,6 @@ { name: preq, - version: 0.3.12, + version: 0.3.13, description: Yet another promising request wrapper, main: index.js, scripts: { @@ -25,11 +25,11 @@
[MediaWiki-commits] [Gerrit] Update preq dependency - change (mediawiki...deploy)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/200104 Change subject: Update preq dependency .. Update preq dependency Change-Id: I0c0e5519b8ceac71989426810cc9f2647c7849f9 --- M node_modules/istanbul/node_modules/async/package.json M node_modules/mocha-lcov-reporter/package.json M node_modules/mocha/node_modules/jade/package.json M node_modules/mocha/node_modules/mkdirp/package.json M node_modules/preq/index.js M node_modules/preq/node_modules/bluebird/package.json M node_modules/preq/package.json M node_modules/restbase-mod-table-cassandra/node_modules/async/package.json M node_modules/restbase-mod-table-cassandra/node_modules/cassandra-driver/package.json M node_modules/swagger-router/node_modules/bluebird/package.json M node_modules/swagger-ui/node_modules/shred/package.json 11 files changed, 27 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy refs/changes/04/200104/1 diff --git a/node_modules/istanbul/node_modules/async/package.json b/node_modules/istanbul/node_modules/async/package.json index 9d15cd7..bdbe740 100644 --- a/node_modules/istanbul/node_modules/async/package.json +++ b/node_modules/istanbul/node_modules/async/package.json @@ -41,7 +41,7 @@ shasum: ac3613b1da9bed1b47510bb4651b8931e47146c7, tarball: http://registry.npmjs.org/async/-/async-0.9.0.tgz; }, - _from: async@0.9.x, + _from: async@~0.9.0, _npmVersion: 1.4.3, _npmUser: { name: caolan, diff --git a/node_modules/mocha-lcov-reporter/package.json b/node_modules/mocha-lcov-reporter/package.json index fa47c01..26cfa83 100644 --- a/node_modules/mocha-lcov-reporter/package.json +++ b/node_modules/mocha-lcov-reporter/package.json @@ -45,5 +45,9 @@ ], _shasum: 02670491db57ee6cb1fe7392e813700f6e336a21, _from: mocha-lcov-reporter@0.0.1, - _resolved: https://registry.npmjs.org/mocha-lcov-reporter/-/mocha-lcov-reporter-0.0.1.tgz; + _resolved: https://registry.npmjs.org/mocha-lcov-reporter/-/mocha-lcov-reporter-0.0.1.tgz;, + bugs: { +url: https://github.com/StevenLooman/mocha-lcov-reporter/issues; + }, + readme: ERROR: No README data found! } diff --git a/node_modules/mocha/node_modules/jade/package.json b/node_modules/mocha/node_modules/jade/package.json index 14198af..191cb4d 100644 --- a/node_modules/mocha/node_modules/jade/package.json +++ b/node_modules/mocha/node_modules/jade/package.json @@ -52,5 +52,9 @@ directories: {}, _shasum: 8f10d7977d8d79f2f6ff862a81b0513ccb25686c, _from: jade@0.26.3, - _resolved: https://registry.npmjs.org/jade/-/jade-0.26.3.tgz; + _resolved: https://registry.npmjs.org/jade/-/jade-0.26.3.tgz;, + bugs: { +url: https://github.com/visionmedia/jade/issues; + }, + readme: ERROR: No README data found! } diff --git a/node_modules/mocha/node_modules/mkdirp/package.json b/node_modules/mocha/node_modules/mkdirp/package.json index a6de8f3..b7fe466 100644 --- a/node_modules/mocha/node_modules/mkdirp/package.json +++ b/node_modules/mocha/node_modules/mkdirp/package.json @@ -39,7 +39,7 @@ shasum: 1d73076a6df986cd9344e15e71fcc05a4c9abf12, tarball: http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz; }, - _from: mkdirp@~0.5.0, + _from: mkdirp@0.5.x, _npmVersion: 1.4.3, _npmUser: { name: substack, diff --git a/node_modules/preq/index.js b/node_modules/preq/index.js index 0ff933c..a820998 100644 --- a/node_modules/preq/index.js +++ b/node_modules/preq/index.js @@ -158,7 +158,8 @@ description: err.toString(), error: err, stack: err.stack, -options: self.options +uri: self.options.uri, +method: self.options.method, }, stack: err.stack })); diff --git a/node_modules/preq/node_modules/bluebird/package.json b/node_modules/preq/node_modules/bluebird/package.json index bfd096e..90ea2aa 100644 --- a/node_modules/preq/node_modules/bluebird/package.json +++ b/node_modules/preq/node_modules/bluebird/package.json @@ -74,7 +74,7 @@ gitHead: d5e06c2648b8be3c47cb5b6cb95f2bddf79c4c0a, _id: bluebird@2.9.15, _shasum: 80b37137c1dee42efac86486b0afc5f858354ab0, - _from: bluebird@^2.7.1, + _from: bluebird@^2.3.2, _npmVersion: 2.7.0, _nodeVersion: 1.5.1, _npmUser: { @@ -92,5 +92,6 @@ tarball: http://registry.npmjs.org/bluebird/-/bluebird-2.9.15.tgz; }, directories: {}, - _resolved: https://registry.npmjs.org/bluebird/-/bluebird-2.9.15.tgz; + _resolved: https://registry.npmjs.org/bluebird/-/bluebird-2.9.15.tgz;, + readme: ERROR: No README data found! } diff --git a/node_modules/preq/package.json b/node_modules/preq/package.json index 995add1..a044a75 100644 --- a/node_modules/preq/package.json +++ b/node_modules/preq/package.json @@ -1,6 +1,6 @@ { name: preq, - version: 0.3.12, + version: 0.3.13, description: Yet another
[MediaWiki-commits] [Gerrit] various role classes - indentation fixes - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/200110 Change subject: various role classes - indentation fixes .. various role classes - indentation fixes about 75 x 'indentation of = is not properly aligned' puppet-lint 1.1.0 Change-Id: I6ea05a3f0e0074896b42ceb1c0c632eedcf54661 --- M manifests/role/labmon.pp M manifests/role/nova.pp M manifests/role/ntp.pp M manifests/role/osm.pp M manifests/role/parsoid.pp M manifests/role/postgres.pp M manifests/role/redisdb.pp M manifests/role/releases.pp M manifests/role/requesttracker.pp M manifests/role/torrus.pp M manifests/role/wikimania_scholarships.pp M manifests/role/zuul.pp 12 files changed, 79 insertions(+), 79 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/10/200110/1 diff --git a/manifests/role/labmon.pp b/manifests/role/labmon.pp index b77ccb6..a7cb46c 100644 --- a/manifests/role/labmon.pp +++ b/manifests/role/labmon.pp @@ -6,10 +6,10 @@ class { 'role::graphite::labmon': } file { '/var/lib/carbon': -ensure = link, -target = '/srv/carbon', -owner = '_graphite', -group = '_graphite', +ensure = link, +target = '/srv/carbon', +owner = '_graphite', +group = '_graphite', require = Class['role::graphite::labmon'] } diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp index a882d33..a233bde 100644 --- a/manifests/role/nova.pp +++ b/manifests/role/nova.pp @@ -215,8 +215,8 @@ } class { 'openstack::openstack-manager': -novaconfig= $novaconfig, -certificate = $certificate, +novaconfig = $novaconfig, +certificate = $certificate, } include ::nutcracker::monitoring diff --git a/manifests/role/ntp.pp b/manifests/role/ntp.pp index 73670a5..76d9414 100644 --- a/manifests/role/ntp.pp +++ b/manifests/role/ntp.pp @@ -95,9 +95,9 @@ system::role { 'ntp': description = 'NTP server' } ntp::daemon { 'server': -servers = $peer_upstreams[$::fqdn], -peers = delete($wmf_all_peers, $::fqdn), -time_acl = $our_networks_acl, +servers = $peer_upstreams[$::fqdn], +peers = delete($wmf_all_peers, $::fqdn), +time_acl = $our_networks_acl, query_acl = $neon_acl, } @@ -123,8 +123,8 @@ } ntp::daemon { 'client': -servers = $client_upstreams[$::site], -query_acl = $neon_acl, +servers = $client_upstreams[$::site], +query_acl = $neon_acl, servers_opt = $s_opt, } diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp index 1d1aa40..278508e 100644 --- a/manifests/role/osm.pp +++ b/manifests/role/osm.pp @@ -7,10 +7,10 @@ file { '/etc/postgresql/9.1/main/tuning.conf': ensure = 'present', -owner = 'root', -group = 'root', -mode= '0444', -source = 'puppet:///files/osm/tuning.conf', +owner = 'root', +group = 'root', +mode = '0444', +source = 'puppet:///files/osm/tuning.conf', } sysctl::parameters { 'postgres_shmem': @@ -52,8 +52,8 @@ postgresql::spatialdb { 'gis': } # Import planet.osm osm::planet_import { 'gis': -input_pbf_file = '/srv/labsdb/planet-latest-osm.pbf', -require = Postgresql::Spatialdb['gis'] +input_pbf_file = '/srv/labsdb/planet-latest-osm.pbf', +require= Postgresql::Spatialdb['gis'] } osm::planet_sync { 'gis': period = 'day', diff --git a/manifests/role/parsoid.pp b/manifests/role/parsoid.pp index 2a72280..3fbaaed 100644 --- a/manifests/role/parsoid.pp +++ b/manifests/role/parsoid.pp @@ -53,10 +53,10 @@ } user { 'parsoid': -gid = 'parsoid', -home = '/var/lib/parsoid', -managehome= true, -system= true, +gid= 'parsoid', +home = '/var/lib/parsoid', +managehome = true, +system = true, } file { '/var/lib/parsoid/deploy': @@ -65,11 +65,11 @@ } file { '/etc/init/parsoid.conf': -ensure = present, -owner = root, -group = root, -mode= '0444', -source = 'puppet:///files/misc/parsoid.upstart', +ensure = present, +owner = root, +group = root, +mode = '0444', +source = 'puppet:///files/misc/parsoid.upstart', } file { '/var/log/parsoid': ensure = directory, @@ -104,12 +104,12 @@ } cron { 'parsoid-hourly-logrot': -ensure = present, -command = '/usr/sbin/logrotate /etc/logrotate.d/parsoid', -user = 'root', -hour = '*', -minute = '12', -require =
[MediaWiki-commits] [Gerrit] Made User actually use the mQuickTouched process cache - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/200115 Change subject: Made User actually use the mQuickTouched process cache .. Made User actually use the mQuickTouched process cache Change-Id: I158eae2dac16b5fdacd095fff7fb031b42804a1e --- M includes/User.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/15/200115/1 diff --git a/includes/User.php b/includes/User.php index 2f9b716..78693c1 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2309,7 +2309,9 @@ if ( $this-mQuickTouched === null ) { $key = wfMemcKey( 'user-quicktouched', 'id', $this-mId ); $timestamp = $wgMemc-get( $key ); - if ( !$timestamp ) { + if ( $timestamp ) { + $this-mQuickTouched = $timestamp; + } else { # Set the timestamp to get HTTP 304 cache hits $this-touch(); } -- To view, visit https://gerrit.wikimedia.org/r/200115 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I158eae2dac16b5fdacd095fff7fb031b42804a1e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add import sources for cawikibooks - change (operations/mediawiki-config)
Gerardduenas has uploaded a new change for review. https://gerrit.wikimedia.org/r/199927 Change subject: Add import sources for cawikibooks .. Add import sources for cawikibooks Adding the following import sources for cawikibooks: w:en, w:fr, w:it, w:de, w:pt, w:es, en, fr, it, de, pt, es, meta, wikt, q, n Bug: T93750 Change-Id: Icf21313ee69c9899312d731661634bd5dc9cb492 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/27/199927/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index fccb4de..89533e9 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -9400,8 +9400,8 @@ 'bhwiki' = array( 'commons', 'meta', 'species', 'de', 'en', 'wikibooks:en', 'wikiquote:en', 'wikinews:en', 'wikisource:en', 'wikiversity:en', 'es', 'fa', 'fr', 'hi', 'ml', 'ne', 'nl', 'ro', 'ru', 'pl', 'pt', 'simple', 'ta', 'ur' ), // T70616 'bnwiki' = array( 'en' ), # Bug 34791 'bnwikisource' = array( 'OldWikisource', 'w', 'en' ), - 'cawikibooks' = array( 'w', 's', ), - 'cawikinews' = array( 'w', 'wikt', 'q', 'b', 's', 'v', 'fr', 'en', 'de', 'es', 'pt', 'it', 'commons', 'meta', 'eo', 'pl', 'ja', 'ru', 'sr', 'tr', 'uk', 'zh' ), //T93203 + 'cawikibooks' = array( 'w', 's', 'q', 'n', 'wikt', 'en', 'es, 'fr', 'it', 'de', 'pt', 'meta', 'w:en', 'w:es', 'w:fr', 'w:it', 'w:de', 'w:pt' ), // T93750 + 'cawikinews' = array( 'w', 'wikt', 'q', 'b', 's', 'v', 'fr', 'en', 'de', 'es', 'pt', 'it', 'commons', 'meta', 'eo', 'pl', 'ja', 'ru', 'sr', 'tr', 'uk', 'zh' ), // T93203 'cawikiquote' = array( 'w' ), 'cawikisource' = array( 'w', 'b', ), 'cawiktionary' = array( 'w', ), -- To view, visit https://gerrit.wikimedia.org/r/199927 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf21313ee69c9899312d731661634bd5dc9cb492 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Gerardduenas gerarddue...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Initial totally untested project commit - change (sink_nova_fixed_multi)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/199926 Change subject: Initial totally untested project commit .. Initial totally untested project commit Change-Id: I507d716d04a6f0ccb4a133f31fae765a8e92c282 --- A README A nova_fixed_multi/__init__.py A nova_fixed_multi/base.py A nova_fixed_multi/novamulti.py A setup.py 5 files changed, 224 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/sink_nova_fixed_multi refs/changes/26/199926/1 diff --git a/README b/README new file mode 100644 index 000..5f44f33 --- /dev/null +++ b/README @@ -0,0 +1,8 @@ +I'm using 'stdeb' to build debian packages here. To build: + +$ sudo apt-get install python-stdeb +$ python setup.py --command-packages=stdeb.command bdist_deb +$ ls deb_dist/*.deb + +Note that due to file-system weirdness, stddeb errors out on labs +boxes. I'm running it on a VirtualBox VM without any trouble. diff --git a/nova_fixed_multi/__init__.py b/nova_fixed_multi/__init__.py new file mode 100644 index 000..711e39e --- /dev/null +++ b/nova_fixed_multi/__init__.py @@ -0,0 +1,18 @@ +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# +#Licensed under the Apache License, Version 2.0 (the License); you may +#not use this file except in compliance with the License. You may obtain +#a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, software +#distributed under the License is distributed on an AS IS BASIS, WITHOUT +#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +#License for the specific language governing permissions and limitations +#under the License. + +import gettext +import logging diff --git a/nova_fixed_multi/base.py b/nova_fixed_multi/base.py new file mode 100644 index 000..a6e5d9b --- /dev/null +++ b/nova_fixed_multi/base.py @@ -0,0 +1,85 @@ +# Copyright 2015 Andrew Bogott for the Wikimedia Foundation +# All Rights Reserved. +# +#Licensed under the Apache License, Version 2.0 (the License); you may +#not use this file except in compliance with the License. You may obtain +#a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, software +#distributed under the License is distributed on an AS IS BASIS, WITHOUT +#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +#License for the specific language governing permissions and limitations +#under the License. + + +# This is a slight form of the designate source file found at +# designate/notification_handler/base.py + +import abc +from oslo.config import cfg +from designate import exceptions +from designate.openstack.common import log as logging +from designate.central import rpcapi as central_rpcapi +from designate.context import DesignateContext +from designate.plugin import ExtensionPlugin + +from designate.notification_handler.base import BaseAddressHandler + +LOG = logging.getLogger(__name__) + + +class BaseAddressMultiHandler(BaseAddressHandler): +def _create(self, addresses, extra, managed=True, +resource_type=None, resource_id=None): + +Create a a record from addresses + +:param addresses: Address objects like + {'version': 4, 'ip': '10.0.0.1'} +:param extra: Extra data to use when formatting the record +:param managed: Is it a managed resource +:param resource_type: The managed resource type +:param resource_id: The managed resource ID + +LOG.debug('Using DomainID: %s' % cfg.CONF[self.name].domain_id) +domain = self.get_domain(cfg.CONF[self.name].domain_id) +LOG.debug('Domain: %r' % domain) + +data = extra.copy() +LOG.debug('Event data: %s' % data) +data['domain'] = domain['name'] + +context = DesignateContext.get_admin_context(all_tenants=True) + +for addr in addresses: +event_data = data.copy() +event_data.update(get_ip_data(addr)) + +for fmt in cfg.CONF[self.name].get('format'): +recordset_values = { +'domain_id': domain['id'], +'name': fmt % event_data, +'type': 'A' if addr['version'] == 4 else ''} + +recordset = self._find_or_create_recordset( +context, **recordset_values) + +record_values = { +'data': addr['address']} + +if managed: +record_values.update({ +'managed': managed, +'managed_plugin_name':
[MediaWiki-commits] [Gerrit] Enable GeoData at cawikibooks - change (operations/mediawiki-config)
Gerardduenas has uploaded a new change for review. https://gerrit.wikimedia.org/r/199930 Change subject: Enable GeoData at cawikibooks .. Enable GeoData at cawikibooks Setting $wmgEnableGeoData true for cawikibooks. Bug: T93637 Change-Id: I0a1325fe0c70f8030960c1724b71362ccda1672a --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/30/199930/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index fccb4de..104d2d2 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13973,6 +13973,7 @@ 'wmgEnableGeoData' = array( 'default' = false, 'wikipedia' = true, + 'cawikibooks' = true, // T93637 'wikivoyage' = true, 'commonswiki' = true, 'testwiki' = true, -- To view, visit https://gerrit.wikimedia.org/r/199930 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a1325fe0c70f8030960c1724b71362ccda1672a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Gerardduenas gerarddue...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] setting ganeti2001-2006 mgmt entries - change (operations/dns)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/199929 Change subject: setting ganeti2001-2006 mgmt entries .. setting ganeti2001-2006 mgmt entries mgmt entries for new systems Bug:T91977 Change-Id: I8fac113546c4f3c5f5101629c99278d3ed25dfb4 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/29/199929/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 1835025..2e2b4ab 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -3535,6 +3535,12 @@ 163 1H IN PTR wmf5816.mgmt.codfw.wmnet. 164 1H IN PTR suhail.mgmt.codfw.wmnet. 164 1H IN PTR wmf5817.mgmt.codfw.wmnet. +165 1H IN PTR ganeti2001.mgmt.codfw.wmnet. +166 1H IN PTR ganeti2002.mgmt.codfw.wmnet. +167 1H IN PTR ganeti2003.mgmt.codfw.wmnet. +168 1H IN PTR ganeti2004.mgmt.codfw.wmnet. +169 1H IN PTR ganeti2005.mgmt.codfw.wmnet. +170 1H IN PTR ganeti2006.mgmt.codfw.wmnet. ; 10.195.0.0/25 - frack.codfw subnets diff --git a/templates/wmnet b/templates/wmnet index 1383686..aff1e92 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2596,6 +2596,12 @@ es2009 1H IN A10.193.1.243 es2010 1H IN A10.193.1.244 eventlog20011H IN A10.193.2.119 +ganeti2001 1H IN A10.193.2.165 +ganeti2002 1H IN A10.193.2.166 +ganeti2003 1H IN A10.193.2.167 +ganeti2004 1H IN A10.193.2.168 +ganeti2005 1H IN A10.193.2.169 +ganeti2006 1H IN A10.193.2.170 graphite20011H IN A10.193.2.14 haedus 1H IN A10.193.2.1 heze1H IN A10.193.1.250 -- To view, visit https://gerrit.wikimedia.org/r/199929 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8fac113546c4f3c5f5101629c99278d3ed25dfb4 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: RobH r...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Add Apps session metrics job - change (analytics...source)
Mforns has uploaded a new change for review. https://gerrit.wikimedia.org/r/199935 Change subject: [WIP] Add Apps session metrics job .. [WIP] Add Apps session metrics job Bug: T86535 Change-Id: Ibd9bc45179ace3f74fe1bf1ac2f42de7867db90e --- A refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/AppSessionMetrics.scala 1 file changed, 101 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery/source refs/changes/35/199935/1 diff --git a/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/AppSessionMetrics.scala b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/AppSessionMetrics.scala new file mode 100644 index 000..82474ae --- /dev/null +++ b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/AppSessionMetrics.scala @@ -0,0 +1,101 @@ + +import java.util.Date +import java.text.SimpleDateFormat +import org.wikimedia.analytics.refinery.core.PageviewDefinition +import org.wikimedia.analytics.refinery.core.Webrequest +import scala.math.pow +import org.apache.spark.rdd.RDD + + +// helper methods +val dateFormat = new SimpleDateFormat(-MM-dd'T'HH:mm:ss) +def ms (s:String) : Long = { dateFormat.parse(s).getTime() } +def s (a:Any) : String = { a.asInstanceOf[String] } + + +// statistical methods +def geoMean (nums:RDD[Long]) : Double = { +pow(nums.fold(1)(_ * _), 1.0 / nums.count) +} +def printStats (nums:RDD[Long]) = println(( +nums.count, +geoMean(nums), +nums.mean, +nums.min, +nums.max +)) + + +/** + * Empty list of sessions + * To be used as zero value for the sessionize function. + */ +val emptySessions = List[List[Long]]() + + +/** + * Session logic + * + * @param sessions List of sessions. Each session is represented + * as an ordered list of pageview timestamps. + * @param timestamp The pageview timestamp to be merged to the + * session list. It is assumed to be greater than + * all the previous timestamps in the session list. + * + * @return The list of sessions including the new pageview timestamp. + * Depending on the time passed since last pageview, + * The timestamp will be allocated as part of the last session + * or in a new session. + */ +def sessionize (sessions:List[List[Long]], timestamp:Long) : List[List[Long]] = { +if (sessions.length == 0) List(List(timestamp)) +else { +if (timestamp = sessions.last.last + 180) { +sessions.init :+ (sessions.last :+ timestamp) +} else sessions :+ List(timestamp) +} +} + + +// setup sql engine +val sqlContext = new org.apache.spark.sql.SQLContext(sc) +sqlContext.parquetFile( + /wmf/data/wmf/webrequest/webrequest_source=mobile/year=2015/month=3/day=20/hour=0/00_0 +).registerTempTable(webrequest) + + +// compute sessions by user +val userSessions = sqlContext. +// get webrequest data +sql(SELECT uri_path, uri_query, content_type, user_agent, x_analytics, dt +FROM webrequest WHERE is_pageview = TRUE). +// filter app pageviews +filter(r = PageviewDefinition.getInstance.isAppPageview(s(r(0)), s(r(1)), s(r(2)), s(r(3. +// map: pageview - (uuid, timestamp) +map(pv = (Webrequest.getInstance.getXAnalyticsValue(s(pv(4)), uuid), ms(s(pv(5). +// aggregate: (uuid, timestamp)* - (uuid, List(ts1, ts2, ts3, ...)) +combineByKey( +List(_), +(l:List[Long], t:Long) = l :+ t, +(l1:List[Long], l2:List[Long]) = l1 ::: l2 +). +// sample sessions to 10% +sample(false, 0.1). +// map: (uuid, List(ts1, ts2, ts3, ...)) - (uuid, List(List(ts1, ts2), List(ts3), ...) +map(p = (p._1, p._2.sorted.foldLeft(emptySessions)(sessionize))) + + +// flatten: (uuid, List(session1, session2, ...) - session* +val sessions = userSessions.flatMap(_._2) + + +// metrics +val sessionsPerUser = userSessions.map(r = { r._2.length.asInstanceOf[Long] }) +val pageviewsPerSession = sessions.map(r = { r.length.asInstanceOf[Long] }) +val sessionLength = sessions.filter(r = { r.length 1 }).map(r = { r.last - r(0) }) + + +// output +printStats(sessionsPerUser) +printStats(pageviewsPerSession) +printStats(sessionLength) -- To view, visit https://gerrit.wikimedia.org/r/199935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd9bc45179ace3f74fe1bf1ac2f42de7867db90e Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery/source Gerrit-Branch: master Gerrit-Owner: Mforns mfo...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed the usage of $flags in loadLastEdit() - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed the usage of $flags in loadLastEdit() .. Fixed the usage of $flags in loadLastEdit() Bug: T93976 Change-Id: I57eb41b463116ea27c0fc8dac8fff07db593499a --- M includes/page/WikiPage.php 1 file changed, 17 insertions(+), 7 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 5527ace..2315dc7 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -602,13 +602,23 @@ return; // page doesn't exist or is missing page_latest info } - // Bug 37225: if session S1 loads the page row FOR UPDATE, the result always includes the - // latest changes committed. This is true even within REPEATABLE-READ transactions, where - // S1 normally only sees changes committed before the first S1 SELECT. Thus we need S1 to - // also gets the revision row FOR UPDATE; otherwise, it may not find it since a page row - // UPDATE and revision row INSERT by S2 may have happened after the first S1 SELECT. - // http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html#isolevel_repeatable-read. - $flags = ( $this-mDataLoadedFrom == self::READ_LOCKING ) ? Revision::READ_LOCKING : 0; + if ( $this-mDataLoadedFrom == self::READ_LOCKING ) { + // Bug 37225: if session S1 loads the page row FOR UPDATE, the result always + // includes the latest changes committed. This is true even within REPEATABLE-READ + // transactions, where S1 normally only sees changes committed before the first S1 + // SELECT. Thus we need S1 to also gets the revision row FOR UPDATE; otherwise, it + // may not find it since a page row UPDATE and revision row INSERT by S2 may have + // happened after the first S1 SELECT. + // http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html#isolevel_repeatable-read. + $flags = Revision::READ_LOCKING; + } elseif ( $this-mDataLoadedFrom == self::READ_LATEST ) { + // Bug T93976: if page_latest was loaded from the master, fetch the + // revision from there as well, as it may not exist yet on a slave DB. + // Also, this keeps the queries in the same REPEATABLE-READ snapshot. + $flags = Revision::READ_LATEST; + } else { + $flags = 0; + } $revision = Revision::newFromPageId( $this-getId(), $latest, $flags ); if ( $revision ) { // sanity $this-setLastEdit( $revision ); -- To view, visit https://gerrit.wikimedia.org/r/199819 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57eb41b463116ea27c0fc8dac8fff07db593499a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [sshd] Disable agent forwarding - change (operations/puppet)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/199936 Change subject: [sshd] Disable agent forwarding .. [sshd] Disable agent forwarding Since deployments no longer require a forwarded key to production (for either pulling/pushing to git or scap co) there is no reason for people to forward their keys anymore. It's poor security practice, and we discourage it heavily in default configurations and examples. Per sshd_config(5) this can't stop a malicious shell user but if you're malicious you're already violating the server agreement and will get your access stripped. So don't work around it ;-) Change-Id: I283eb516c4b87118328ca5d0374d9437531b64d6 --- M modules/ssh/templates/sshd_config.erb 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/199936/1 diff --git a/modules/ssh/templates/sshd_config.erb b/modules/ssh/templates/sshd_config.erb index 2e76f0a..2bd6a08 100644 --- a/modules/ssh/templates/sshd_config.erb +++ b/modules/ssh/templates/sshd_config.erb @@ -68,6 +68,9 @@ # Globally deny logon via password, only allow SSH-key login. PasswordAuthentication no +# Don't allow people to forward their agents either. +AllowAgentForwarding no + # Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no -- To view, visit https://gerrit.wikimedia.org/r/199936 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I283eb516c4b87118328ca5d0374d9437531b64d6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updated ContentTranslation to 6ed6d61 - change (mediawiki/core)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/199945 Change subject: Updated ContentTranslation to 6ed6d61 .. Updated ContentTranslation to 6ed6d61 Change-Id: I4198e7999729c9c35f61b876cb407da59a34ee4f --- M extensions/ContentTranslation 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/45/199945/1 diff --git a/extensions/ContentTranslation b/extensions/ContentTranslation index ba9a9ee..6ed6d61 16 --- a/extensions/ContentTranslation +++ b/extensions/ContentTranslation -Subproject commit ba9a9eead529b08f3fa4e79bf1588055fd017fbf +Subproject commit 6ed6d61adacde1b04faeeab550d395e0e324ad35 -- To view, visit https://gerrit.wikimedia.org/r/199945 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4198e7999729c9c35f61b876cb407da59a34ee4f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf23 Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed table autodrop if you have older schema - change (mediawiki...Gather)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/199948 Change subject: Removed table autodrop if you have older schema .. Removed table autodrop if you have older schema We can't go into production with a potential of droping tables. (e.g. someone accidently adds that index later) Make sure you have ran update.php on your machine before this patch gets merged. Change-Id: I31738f23c4d68a3e2453833a5596993af54d3405 --- M schema/Updater.hooks.php 1 file changed, 0 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/48/199948/1 diff --git a/schema/Updater.hooks.php b/schema/Updater.hooks.php index ba8b93e..774c929 100644 --- a/schema/Updater.hooks.php +++ b/schema/Updater.hooks.php @@ -11,13 +11,6 @@ public static function onLoadExtensionSchemaUpdates( DatabaseUpdater $du ) { $dir = __DIR__; - // TODO BUG !!! - // Remove this before going to production - good enough migration for BETA DEV - if ( $du-getDB()-indexExists( 'gather_list_item', 'gli_id_order_ns_title', __METHOD__ ) ) { - $du-dropExtensionTable( 'gather_list_item', false ); - $du-dropExtensionTable( 'gather_list', false ); - } - $du-addExtensionTable( 'gather_list', $dir/gather_list.sql ); $du-addExtensionTable( 'gather_list_item', $dir/gather_list_item.sql ); -- To view, visit https://gerrit.wikimedia.org/r/199948 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31738f23c4d68a3e2453833a5596993af54d3405 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Yurik yu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Gather - change (mediawiki/core)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/199956 Change subject: Add Gather .. Add Gather Change-Id: I8c86e49c6624e086700679b58199c20bea3f5f04 --- M .gitmodules A extensions/Gather 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/199956/1 diff --git a/.gitmodules b/.gitmodules index 95c719c..8401ae1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -478,3 +478,6 @@ [submodule vendor] path = vendor url = https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git +[submodule extensions/Gather] + path = extensions/Gather + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Gather.git diff --git a/extensions/Gather b/extensions/Gather new file mode 16 index 000..5a2b791 --- /dev/null +++ b/extensions/Gather +Subproject commit 5a2b7914be7d2f305afa7732671841573c27418f -- To view, visit https://gerrit.wikimedia.org/r/199956 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c86e49c6624e086700679b58199c20bea3f5f04 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf22 Gerrit-Owner: MaxSem maxsem.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Functionality test for SpecialSetLabelDescriptionAliases - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Functionality test for SpecialSetLabelDescriptionAliases .. Functionality test for SpecialSetLabelDescriptionAliases Change-Id: Ib8b74b6ec9db9cf039b38ce5c9278134b3c88aae --- M repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php 1 file changed, 90 insertions(+), 9 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php b/repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php index 1561273..bc05ff5 100644 --- a/repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php +++ b/repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php @@ -3,6 +3,7 @@ namespace Wikibase\Test; use FauxRequest; +use FauxResponse; use ValueValidators\Result; use WebRequest; use Wikibase\ChangeOp\FingerprintChangeOpFactory; @@ -154,6 +155,31 @@ return $languages; } + /** +* @param string[] $labels +* @param string[] $descriptions +* @param array[] $aliases +* +* @return Fingerprint +*/ + private function makeFingerprint( array $labels, array $descriptions, array $aliases ) { + $fingerprint = new Fingerprint(); + + foreach ( $labels as $lang = $text ) { + $fingerprint-setLabel( $lang, $text ); + } + + foreach ( $descriptions as $lang = $text ) { + $fingerprint-setDescription( $lang, $text ); + } + + foreach ( $aliases as $lang = $texts ) { + $fingerprint-setAliasGroup( $lang, $texts ); + } + + return $fingerprint; + } + public function executeProvider() { global $wgLang; @@ -224,8 +250,11 @@ $withLanguageMatchers['language']['attributes']['value'] = 'de'; $withLanguageMatchers['label']['attributes']['value'] = 'foo'; - $fooFingerprint = new Fingerprint(); - $fooFingerprint-setLabel( 'de', 'foo' ); + $fooFingerprint = $this-makeFingerprint( + array( 'de' = 'foo' ), + array(), + array() + ); return array( 'no input' = array( @@ -259,6 +288,55 @@ $withLanguageMatchers, null ), + + 'add label' = array( + $fooFingerprint, + '$id', + new FauxRequest( array( 'language' = 'en', 'label' = 'FOO' ), true ), + array(), + $this-makeFingerprint( + array( 'de' = 'foo', 'en' = 'FOO' ), + array(), + array() + ), + ), + + 'replace label' = array( + $fooFingerprint, + '$id', + new FauxRequest( array( 'language' = 'de', 'label' = 'FOO' ), true ), + array(), + $this-makeFingerprint( + array( 'de' = 'FOO' ), + array(), + array() + ), + ), + + 'add description, keep label' = array( + $fooFingerprint, + '$id', + new FauxRequest( array( 'language' = 'de', 'description' = 'Lorem Ipsum' ), true ), + array(), + $this-makeFingerprint( + array( 'de' = 'foo' ), + array( 'de' = 'Lorem Ipsum' ), + array() + ), + ), + + 'set aliases' = array( + $fooFingerprint, + '$id', + new FauxRequest( array( 'language' = 'de', 'aliases' = 'foo|bar' ), true ), + array(), + $this-makeFingerprint( + array( 'de' = 'foo' ), + array(), + array( 'de' =