[MediaWiki-commits] [Gerrit] Split line and fixed spacing in skins folder - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Split line and fixed spacing in skins folder .. Split line and fixed spacing in skins folder Change-Id: I669033b45f34353e201ffe2718ee54fed41fa450 --- M skins/CologneBlue.php M skins/Modern.php M skins/MonoBook.php M skins/Vector.php 4 files changed, 11 insertions(+), 9 deletions(-) Approvals: IAlex: Looks good to me, approved jenkins-bot: Verified diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index 1669de7..0182d76 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -532,7 +532,7 @@ $search = $this-getSkin()-getRequest()-getText( 'search' ); $action = $this-data['searchaction']; - $s = form id=\searchform- . htmlspecialchars($which) . \ method=\get\ class=\inline\ action=\$action\; + $s = form id=\searchform- . htmlspecialchars( $which ) . \ method=\get\ class=\inline\ action=\$action\; if ( $which == 'footer' ) { $s .= wfMessage( 'qbfind' )-text() . : ; } diff --git a/skins/Modern.php b/skins/Modern.php index 9177895..52f9fa2 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -83,7 +83,7 @@ for the margins -- div id=mw_contentholder class=mw-body div class='mw-topboxes' - div id=mw-js-message style=display:none;?php $this-html( 'userlangattributes' )?/div + div id=mw-js-message style=display:none;?php $this-html( 'userlangattributes' ) ?/div div class=mw-topbox id=siteSub?php $this-msg( 'tagline' ) ?/div ?php if ( $this-data['newtalk'] ) { ?div class=usermessage mw-topbox?php $this-html( 'newtalk' ) ?/div @@ -139,7 +139,7 @@ ?php foreach ( $this-getFooterLinks( flat ) as $aLink ) { if ( isset( $this-data[$aLink] ) $this-data[$aLink] ) { -? li id=?php echo$aLink??php $this-html($aLink) ?/li +? li id=?php echo $aLink ??php $this-html( $aLink ) ?/li ?php } } ? diff --git a/skins/MonoBook.php b/skins/MonoBook.php index b704173..aeeb0f8 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -95,7 +95,7 @@ ?php if ( $this-data['undelete'] ) { ? div id=contentSub2?php $this-html( 'undelete' ) ?/div ?php } ??php if ( $this-data['newtalk'] ) { ? - div class=usermessage?php $this-html( 'newtalk' ) ?/div + div class=usermessage?php $this-html( 'newtalk' ) ?/div ?php } ??php if ( $this-data['showjumplinks'] ) { ? div id=jump-to-nav class=mw-jump?php $this-msg( 'jumpto' ) ? a href=#column-one?php $this-msg( 'jumptonavigation' ) ?/a?php $this-msg( 'comma-separator' ) ?a href=#searchInput?php $this-msg( 'jumptosearch' ) ?/a/div ?php } ? @@ -107,7 +107,7 @@ div class=visualClear/div /div /div/div -div id=column-one?php $this-html( 'userlangattributes' ) ? +div id=column-one?php $this-html( 'userlangattributes' ) ? h2?php $this-msg( 'navigation-heading' ) ?/h2 ?php $this-cactions(); ? div class=portlet id=p-personal role=navigation @@ -146,7 +146,7 @@ $footerEnd = ''; } foreach ( $validFooterIcons as $blockName = $footerIcons ) { ? - div id=f-?php echo htmlspecialchars($blockName); ?ico + div id=f-?php echo htmlspecialchars( $blockName ); ?ico ?php foreach ( $footerIcons as $icon ) { ? ?php echo $this-getSkin()-makeFooterIcon( $icon ); ? @@ -159,7 +159,7 @@ ? ul id=f-list ?php foreach ( $validFooterLinks as $aLink ) { ? - li id=?php echo $aLink ??php $this-html($aLink) ?/li + li id=?php echo $aLink ??php $this-html( $aLink ) ?/li ?php } ? @@ -306,9 +306,10 @@ $portletAttribs['title'] = $tooltip; } echo ' ' . Html::openElement( 'div', $portletAttribs ); + $msgObj = wfMessage( $bar ); ? - h3?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg-exists() ? $msg-text() : $bar ); ?/h3 + h3?php echo htmlspecialchars( $msgObj-exists() ? $msgObj-text() : $bar ); ?/h3 div class='pBody' ?php if ( is_array( $cont ) ) { ? ul diff --git a/skins/Vector.php b/skins/Vector.php index 1e4643e..0bdf2fb 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -333,9 +333,10 @@ if ( $msg === null ) { $msg = $name; } + $msgObj = wfMessage( $msg ); ? div class=portal role=navigation id='?php echo Sanitizer::escapeId( p-$name ) ?'?php echo Linker::tooltip( 'p-' .
[MediaWiki-commits] [Gerrit] Change icons to use img tags, allowing easier customization: - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Change icons to use img tags, allowing easier customization: .. Change icons to use img tags, allowing easier customization: * Icon can be defined using a path or a URL * Extensions don't need custom CSS, but add icon through BeforeCreateEchoEvent * Sites set their notification icon in LocalSettings.php or equivalent Bug: 46585 Change-Id: Ifc02b653d07de19229dfb2604305e32f3bd595fe --- M Echo.php M Hooks.php M formatters/BasicFormatter.php M modules/base/ext.echo.base.css D modules/icons/icons.css M special/SpecialNotifications.php 6 files changed, 79 insertions(+), 67 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/Echo.php b/Echo.php index 3021a31..c6aea70 100644 --- a/Echo.php +++ b/Echo.php @@ -128,7 +128,6 @@ 'mediawiki.api', 'mediawiki.jqueryMsg', 'jquery.badge', - 'ext.echo.icons', 'mediawiki.ui', ), 'messages' = array( @@ -151,16 +150,12 @@ 'ext.echo.base', 'mediawiki.api', 'mediawiki.jqueryMsg', - 'ext.echo.icons', ), 'messages' = array( 'echo-load-more-error', 'echo-more-info', 'echo-feedback', ), - ), - 'ext.echo.icons' = $echoResourceTemplate + array( - 'styles' = 'icons/icons.css', ), ); @@ -296,6 +291,56 @@ ), ); +$echoIconPath = Echo/modules/icons; + +// Defines icons, which are 30x30 images. This is passed to BeforeCreateEchoEvent so +// extensions can define their own icons with the same structure. It is recommended that +// extensions prefix their icon key. An example is myextension-name. This will help +// avoid namespace conflicts. +// +// You can use either a path or a url, but not both. +// The value of 'path' is relative to $wgExtensionAssetsPath. +// +// The value of 'url' should be a URL. +// +// You should customize the site icon URL, which is: +// $wgEchoNotificationIcons['site']['url'] +$wgEchoNotificationIcons = array( + 'placeholder' = array( + 'path' = $echoIconPath/Generic.png, + ), + 'trash' = array( + 'path' = $echoIconPath/Deletion.png, + ), + 'chat' = array( + 'path' = $echoIconPath/Talk.png, + ), + 'linked' = array( + 'path' = $echoIconPath/CrossReferenced.png, + ), + 'featured' = array( + 'path' = $echoIconPath/Featured.png, + ), + 'reviewed' = array( + 'path' = $echoIconPath/Reviewed.png, + ), + 'tagged' = array( + 'path' = $echoIconPath/ReviewedWithTags.png, + ), + 'revert' = array( + 'path' = $echoIconPath/Revert.png, + ), + 'checkmark' = array( + 'path' = $echoIconPath/Reviewed.png, + ), + 'gratitude' = array( + 'path' = $echoIconPath/Gratitude.png, + ), + 'site' = array( + 'url' = false + ), +); + // Definitions of the notification event types built into Echo. // If formatter-class isn't specified, defaults to EchoBasicFormatter. $wgEchoNotifications = array( @@ -304,6 +349,7 @@ 'group' = 'system', 'title-message' = 'notification-new-user', 'title-params' = array( 'agent' ), + 'icon' = 'site', ), 'edit-user-talk' = array( 'category' = 'edit-user-talk', @@ -399,6 +445,7 @@ 'email-body-params' = array( 'agent', 'user-rights-list', 'email-footer' ), 'email-body-batch-message' = 'notification-user-rights-email-batch-body', 'email-body-batch-params' = array( 'agent', 'user-rights-list' ), + 'icon' = 'site', ), ); diff --git a/Hooks.php b/Hooks.php index 8858fdc..44d36f4 100644 --- a/Hooks.php +++ b/Hooks.php @@ -12,10 +12,10 @@ */ public static function initEchoExtension() { global $wgEchoBackend, $wgEchoBackendName, $wgEchoNotifications, - $wgEchoNotificationCategories, $wgEchoConfig; + $wgEchoNotificationCategories, $wgEchoNotificationIcons, $wgEchoConfig; // allow extensions to define their own event - wfRunHooks( 'BeforeCreateEchoEvent', array( $wgEchoNotifications, $wgEchoNotificationCategories ) ); + wfRunHooks( 'BeforeCreateEchoEvent', array( $wgEchoNotifications, $wgEchoNotificationCategories, $wgEchoNotificationIcons ) ); $wgEchoBackend = MWEchoBackend::factory(
[MediaWiki-commits] [Gerrit] Add new $icons parameter to Echo hook: - change (mediawiki...Thanks)
jenkins-bot has submitted this change and it was merged. Change subject: Add new $icons parameter to Echo hook: .. Add new $icons parameter to Echo hook: * Update doc block * Use names that indicate the variables are passed in, not used as globals. Bug: 46585 Change-Id: I0f15498ab1fba239bce141b178340a9d9984bedf --- M Thanks.hooks.php 1 file changed, 8 insertions(+), 7 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/Thanks.hooks.php b/Thanks.hooks.php index 1c280c8..c802f72 100644 --- a/Thanks.hooks.php +++ b/Thanks.hooks.php @@ -88,17 +88,18 @@ } /** -* Add extension event to $wgEchoEnabledEvents -* @param $wgEchoEnabledEvents array a list of enabled echo events -* @param $wgEchoEventDetails array details for echo events -* @return bool +* Add Thanks events to Echo +* +* @param $notifications array of Echo notifications +* @param $notificationCategories array of Echo notification categories +* @param $icons array of icon details */ - public static function onBeforeCreateEchoEvent( $wgEchoNotifications, $wgEchoNotificationCategories ) { - $wgEchoNotificationCategories['edit-thank'] = array( + public static function onBeforeCreateEchoEvent( $notifications, $notificationCategories, $icons ) { + $notificationCategories['edit-thank'] = array( 'priority' = 3, ); - $wgEchoNotifications['edit-thank'] = array( + $notifications['edit-thank'] = array( 'category' = 'edit-thank', 'group' = 'interactive', 'formatter-class' = 'EchoThanksFormatter', -- To view, visit https://gerrit.wikimedia.org/r/61344 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f15498ab1fba239bce141b178340a9d9984bedf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Thanks Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Kaldari rkald...@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] Add methods to access config/settings array via JS - change (mediawiki...SemanticMediaWiki)
Mwjames has uploaded a new change for review. https://gerrit.wikimedia.org/r/61346 Change subject: Add methods to access config/settings array via JS .. Add methods to access config/settings array via JS * smw.settings() * smw.settings.get() * smw.formats.getList() * smw.formats.getName() * smw.version() Change-Id: Ia6d1e342c3a1e7196bbb3019d212ec2b13d6c0cb --- M SemanticMediaWiki.hooks.php M resources/smw/ext.smw.js M tests/qunit/smw/ext.smw.test.js 3 files changed, 135 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/46/61346/1 diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php index 64f774c..d65fdb4 100644 --- a/SemanticMediaWiki.hooks.php +++ b/SemanticMediaWiki.hooks.php @@ -379,7 +379,9 @@ /** * Hook: ResourceLoaderGetConfigVars called right before -* ResourceLoaderStartUpModule::getConfig returns +* ResourceLoaderStartUpModule::getConfig and exports static configuration +* variables to JavaScript. Things that depend on the current +* page/request state should use MakeGlobalVariablesScript instead * * @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars * @@ -398,6 +400,14 @@ ) ); + foreach ( array_keys( $GLOBALS['smwgResultFormats'] ) as $format ) { + // Special formats count and debug currently not supported. + if ( $format != 'broadtable' $format != 'count' $format != 'debug' ) { + $printer = SMWQueryProcessor::getResultPrinter( $format, SMWQueryProcessor::SPECIAL_PAGE ); + $vars['smw-config']['formats'][$format] = $printer-getName(); + } + } + return true; } diff --git a/resources/smw/ext.smw.js b/resources/smw/ext.smw.js index 68d3ba5..97f7ba4 100644 --- a/resources/smw/ext.smw.js +++ b/resources/smw/ext.smw.js @@ -37,7 +37,85 @@ else { return mediaWiki.msg.apply( mediaWiki.msg, arguments ); } + }; + + /** +* Declares methods to access information about available formats +*/ + instance.formats = { + + /** +* Returns real name in the current page content language of a +* select format +* +* @since 1.9 +* +* @param {String} format +* +* @return {String} +*/ + getName: function( format ) { + if( typeof format === 'string' ){ + return mediaWiki.config.get( 'smw-config' ).formats[format]; + } + return undefined; + }, + + /** +* Returns list of available formats +* +* @since 1.9 +* +* @return {Object} +*/ + getList: function() { + return mediaWiki.config.get( 'smw-config' ).formats; + } + }; + + /** +* Returns SMW settings array +* +* @see SMW\Settings::newFromGlobals +* +* @since 1.9 +* +* @return {Mixed} +*/ + instance.settings = function() { + return mediaWiki.config.get( 'smw-config' ).settings; + }; + + /** +* Returns a specific settings value +* +* @see SMW\Settings::get +* +* @since 1.9 +* +* @param {String} key options to be selected +* +* @return {Mixed} +*/ + instance.settings.get = function( key ) { + if( typeof key === 'string' ){ + return mediaWiki.config.get( 'smw-config' ).settings[key]; + } + return undefined; + }; + + /** +* Returns SMW version +* +* @since 1.9 +* +* @return {String} +*/ + instance.version = function() { + return mediaWiki.config.get( 'smw-config' ).version; + }; + return instance; } )(); diff --git a/tests/qunit/smw/ext.smw.test.js b/tests/qunit/smw/ext.smw.test.js index 75217c1..8af1e66 100644 --- a/tests/qunit/smw/ext.smw.test.js +++ b/tests/qunit/smw/ext.smw.test.js @@ -21,10 +21,55 @@ * * @since: 1.9 */ - QUnit.test( 'init', 2, function ( assert ) { + QUnit.test( 'init', 8, function ( assert ) { assert.ok( smw instanceof Object, pass + 'the smw instance was accessible' ); assert.equal( $.type( smw.log ),
[MediaWiki-commits] [Gerrit] Add new $icons parameter to Echo hook: - change (mediawiki...PageTriage)
jenkins-bot has submitted this change and it was merged. Change subject: Add new $icons parameter to Echo hook: .. Add new $icons parameter to Echo hook: * Update doc block * Use names that indicate the variables are passed in, not used as globals. Bug: 46585 Change-Id: I2c8c086fb5f4a6c5618039908fed188522c864c5 --- M PageTriage.hooks.php 1 file changed, 10 insertions(+), 8 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php index 7a46b23..a657506 100644 --- a/PageTriage.hooks.php +++ b/PageTriage.hooks.php @@ -463,21 +463,23 @@ } /** -* Add extension event to $wgEchoEnabledEvents -* @param $wgEchoEnabledEvents array a list of enabled echo events -* @param $wgEchoEventDetails array details for echo events +* Add PageTriage events to Echo +* +* @param $notifications array a list of enabled echo events +* @param $notificationCategories array details for echo events +* @param $icons array of icon details */ - public static function onBeforeCreateEchoEvent( $wgEchoNotifications, $wgEchoNotificationCategories ) { + public static function onBeforeCreateEchoEvent( $notifications, $notificationCategories, $icons ) { global $wgPageTriageEnabledEchoEvents; if ( $wgPageTriageEnabledEchoEvents ) { - $wgEchoNotificationCategories['page-review'] = array( + $notificationCategories['page-review'] = array( 'priority' = 8, ); } if ( in_array( 'pagetriage-mark-as-reviewed', $wgPageTriageEnabledEchoEvents ) ) { - $wgEchoNotifications['pagetriage-mark-as-reviewed'] = array( + $notifications['pagetriage-mark-as-reviewed'] = array( 'category' = 'page-review', 'group' = 'neutral', 'formatter-class' = 'PageTriageNotificationFormatter', @@ -495,7 +497,7 @@ ); } if ( in_array( 'pagetriage-add-maintenance-tag', $wgPageTriageEnabledEchoEvents ) ) { - $wgEchoNotifications['pagetriage-add-maintenance-tag'] = array( + $notifications['pagetriage-add-maintenance-tag'] = array( 'category' = 'page-review', 'group' = 'neutral', 'formatter-class' = 'PageTriageNotificationFormatter', @@ -513,7 +515,7 @@ ); } if ( in_array( 'pagetriage-add-deletion-tag', $wgPageTriageEnabledEchoEvents ) ) { - $wgEchoNotifications['pagetriage-add-deletion-tag'] = array( + $notifications['pagetriage-add-deletion-tag'] = array( 'category' = 'page-review', 'group' = 'neutral', 'formatter-class' = 'PageTriageNotificationFormatter', -- To view, visit https://gerrit.wikimedia.org/r/61343 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c8c086fb5f4a6c5618039908fed188522c864c5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageTriage Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Kaldari rkald...@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] Add methods to access config/settings array via JS - change (mediawiki...SemanticMediaWiki)
jenkins-bot has submitted this change and it was merged. Change subject: Add methods to access config/settings array via JS .. Add methods to access config/settings array via JS * smw.settings() * smw.settings.get() * smw.formats.getList() * smw.formats.getName() * smw.version() Change-Id: Ia6d1e342c3a1e7196bbb3019d212ec2b13d6c0cb --- M SemanticMediaWiki.hooks.php M resources/smw/ext.smw.js M tests/qunit/smw/ext.smw.test.js 3 files changed, 135 insertions(+), 2 deletions(-) Approvals: Mwjames: Looks good to me, approved jenkins-bot: Verified diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php index 64f774c..d65fdb4 100644 --- a/SemanticMediaWiki.hooks.php +++ b/SemanticMediaWiki.hooks.php @@ -379,7 +379,9 @@ /** * Hook: ResourceLoaderGetConfigVars called right before -* ResourceLoaderStartUpModule::getConfig returns +* ResourceLoaderStartUpModule::getConfig and exports static configuration +* variables to JavaScript. Things that depend on the current +* page/request state should use MakeGlobalVariablesScript instead * * @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars * @@ -398,6 +400,14 @@ ) ); + foreach ( array_keys( $GLOBALS['smwgResultFormats'] ) as $format ) { + // Special formats count and debug currently not supported. + if ( $format != 'broadtable' $format != 'count' $format != 'debug' ) { + $printer = SMWQueryProcessor::getResultPrinter( $format, SMWQueryProcessor::SPECIAL_PAGE ); + $vars['smw-config']['formats'][$format] = $printer-getName(); + } + } + return true; } diff --git a/resources/smw/ext.smw.js b/resources/smw/ext.smw.js index 68d3ba5..97f7ba4 100644 --- a/resources/smw/ext.smw.js +++ b/resources/smw/ext.smw.js @@ -37,7 +37,85 @@ else { return mediaWiki.msg.apply( mediaWiki.msg, arguments ); } + }; + + /** +* Declares methods to access information about available formats +*/ + instance.formats = { + + /** +* Returns real name in the current page content language of a +* select format +* +* @since 1.9 +* +* @param {String} format +* +* @return {String} +*/ + getName: function( format ) { + if( typeof format === 'string' ){ + return mediaWiki.config.get( 'smw-config' ).formats[format]; + } + return undefined; + }, + + /** +* Returns list of available formats +* +* @since 1.9 +* +* @return {Object} +*/ + getList: function() { + return mediaWiki.config.get( 'smw-config' ).formats; + } + }; + + /** +* Returns SMW settings array +* +* @see SMW\Settings::newFromGlobals +* +* @since 1.9 +* +* @return {Mixed} +*/ + instance.settings = function() { + return mediaWiki.config.get( 'smw-config' ).settings; + }; + + /** +* Returns a specific settings value +* +* @see SMW\Settings::get +* +* @since 1.9 +* +* @param {String} key options to be selected +* +* @return {Mixed} +*/ + instance.settings.get = function( key ) { + if( typeof key === 'string' ){ + return mediaWiki.config.get( 'smw-config' ).settings[key]; + } + return undefined; + }; + + /** +* Returns SMW version +* +* @since 1.9 +* +* @return {String} +*/ + instance.version = function() { + return mediaWiki.config.get( 'smw-config' ).version; + }; + return instance; } )(); diff --git a/tests/qunit/smw/ext.smw.test.js b/tests/qunit/smw/ext.smw.test.js index 75217c1..8af1e66 100644 --- a/tests/qunit/smw/ext.smw.test.js +++ b/tests/qunit/smw/ext.smw.test.js @@ -21,10 +21,55 @@ * * @since: 1.9 */ - QUnit.test( 'init', 2, function ( assert ) { + QUnit.test( 'init', 8, function ( assert ) { assert.ok( smw instanceof Object, pass + 'the smw instance was accessible' ); assert.equal( $.type( smw.log ), 'function', pass + '.log() was accessible' ); +
[MediaWiki-commits] [Gerrit] Update how icon is configured, due to corresponding Echo change - change (mediawiki...GettingStarted)
jenkins-bot has submitted this change and it was merged. Change subject: Update how icon is configured, due to corresponding Echo change .. Update how icon is configured, due to corresponding Echo change Bug: 46585 Change-Id: I84c7a92917f7a14e865a6a4bc9aff643f7cfba77 --- M GettingStarted.hooks.php D resources/ext.gettingstarted.echo.css 2 files changed, 7 insertions(+), 9 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/GettingStarted.hooks.php b/GettingStarted.hooks.php index 73851ad..5cf9f00 100644 --- a/GettingStarted.hooks.php +++ b/GettingStarted.hooks.php @@ -110,9 +110,14 @@ return true; } - public static function onBeforeCreateEchoEvent( $notifications, $categories ) { + public static function onBeforeCreateEchoEvent( $notifications, $categories, $icons ) { // Currently not used, but most notifications seem to include agent as a param. // It will allow username to be included later with just a message change. + + $icons['gettingstarted-contribute'] = array( + 'path' = 'GettingStarted/resources/images/echo-gettingstarted-icon.png', + ); + $defaults = array( 'category' = 'system', 'group' = 'positive', @@ -120,7 +125,7 @@ 'email-subject-params' = array( 'agent' ), 'email-body-params' = array( 'agent', 'titlelink', 'email-footer' ), 'email-body-batch-params' = array( 'agent', 'titlelink' ), - 'icon' = 'gettingstarted', + 'icon' = 'gettingstarted-contribute', ); $notifications['gettingstarted-start-editing'] = array( diff --git a/resources/ext.gettingstarted.echo.css b/resources/ext.gettingstarted.echo.css deleted file mode 100644 index 187c55b..000 --- a/resources/ext.gettingstarted.echo.css +++ /dev/null @@ -1,7 +0,0 @@ -/* Loaded on every page so it is available for Echo */ - -/* I had to add extra specificity to override the default 'none' background */ -.mw-echo-icon.mw-echo-icon-gettingstarted { - /* @embed */ - background-image: url(images/echo-gettingstarted-icon.png); -} -- To view, visit https://gerrit.wikimedia.org/r/61342 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84c7a92917f7a14e865a6a4bc9aff643f7cfba77 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Swalling swall...@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] wfRandomString: Correct bias toward digits 1-7 - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: wfRandomString: Correct bias toward digits 1-7 .. wfRandomString: Correct bias toward digits 1-7 Two problems with a single line of code: * dechex() does not include leading zeros, so the first digit generated in each iteration cannot be zero unless the return value of mt_rand() is 0. This also means wfRandomString() is extremely unlikely to start a string with '0'. * mt_rand() does not actually uniformly distribute values over [0,2^32-1]; it actually right-shifts one of the bits off (just because [...] the previous php_rand only returns 31 at most), so the maximum value is 0x7fff, not 0x. This means wfRandomString() will never start a string with any of the digits 8-f. Including leading zeros and using only the 28 LSBs to form seven hex digits at a time is the simplest fix. Change-Id: Ic19b5b97c582485780b24fd35ffef2111cc8b3ca --- M RELEASE-NOTES-1.22 M includes/GlobalFunctions.php 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index ec424d3..f0ec6bb 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -63,6 +63,8 @@ * (bug 46768) Usernames of blocking users now display correctly, even if numeric. * (bug 39590) {{PAGESIZE}} for the current page and self-transclusions now show the most up to date result always instead of being a revision behind. +* A bias in wfRandomString() toward digits 1-7 has been corrected. Generated + strings now can start with digits 0 and 8-f. === API changes in 1.22 === * (bug 46626) xmldoublequote parameter was removed. Because of a bug, the diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 50287b3..43caf7a 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -322,8 +322,8 @@ */ function wfRandomString( $length = 32 ) { $str = ''; - while ( strlen( $str ) $length ) { - $str .= dechex( mt_rand() ); + for ( $n = 0; $n $length; $n += 7 ) { + $str .= sprintf( '%07x', mt_rand() 0xfff ); } return substr( $str, 0, $length ); } -- To view, visit https://gerrit.wikimedia.org/r/61345 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic19b5b97c582485780b24fd35ffef2111cc8b3ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: PleaseStand pleasest...@live.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: Tim Starling tstarl...@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 site icon config for Wikipedia. - change (operations/mediawiki-config)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/61348 Change subject: Add site icon config for Wikipedia. .. Add site icon config for Wikipedia. Bug: 46585 Change-Id: I4b14d22c624b6d63bfd97a3b09e7ef98d5a47bab --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/48/61348/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index eb3e743..3aced28 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -2501,6 +2501,7 @@ $wgEchoEnableEmailBatch = $wmgEchoEnableEmailBatch; $wgEchoEmailFooterAddress = $wmgEchoEmailFooterAddress; $wgEchoBundleEmailInterval = $wmgEchoBundleEmailInterval; + $wgEchoNotificationIcons['site']['url'] = $wmgEchoSiteNotificationIconUrl; # Outgoing from and reply to address for Echo notifications extension $wgNotificationSender = $wmgNotificationSender; diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 42ebe27..6d8f48e 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11962,7 +11962,10 @@ 'wmgEchoEmailFooterAddress' = array( 'default' = 'Wikimedia Foundation, 149 New Montgomery St., 3rd Fl., San Francisco, CA 94105.', ), - +'wmgEchoSiteNotificationIconUrl' = array( + 'default' = false, // Placeholder icon + 'enwiki' = '//upload.wikimedia.org/wikipedia/commons/f/ff/Wikipedia_Echo_notification_icon.png', // https://commons.wikimedia.org/wiki/File:Wikipedia_Echo_notification_icon.png +), # from and reply to address when Echo sends email notifications 'wmgNotificationSender' = array( 'default' = 'no-reply-notificati...@mediawiki.org', -- To view, visit https://gerrit.wikimedia.org/r/61348 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b14d22c624b6d63bfd97a3b09e7ef98d5a47bab Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config 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] Remove unused W icon, now configured outside extension. - change (mediawiki...Echo)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/61349 Change subject: Remove unused W icon, now configured outside extension. .. Remove unused W icon, now configured outside extension. Bug: 46585 Change-Id: Ic0e29cf8284efc87e2ce67434a5d7984ee760659 --- D modules/icons/W.png 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/49/61349/1 diff --git a/modules/icons/W.png b/modules/icons/W.png deleted file mode 100644 index 17a9d07..000 --- a/modules/icons/W.png +++ /dev/null Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/61349 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0e29cf8284efc87e2ce67434a5d7984ee760659 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo 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] Use type 'api' for lastuse preferences - change (mediawiki...PageTriage)
Nischayn22 has uploaded a new change for review. https://gerrit.wikimedia.org/r/61350 Change subject: Use type 'api' for lastuse preferences .. Use type 'api' for lastuse preferences Bug: 47805 Change-Id: I5a36d8b1abe11436ace9188bb6ad45e27fc54be8 --- M PageTriage.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage refs/changes/50/61350/1 diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php index 7a46b23..4f2ac4b 100644 --- a/PageTriage.hooks.php +++ b/PageTriage.hooks.php @@ -223,7 +223,7 @@ */ public static function onGetPreferences( $user, $preferences ) { $preferences['pagetriage-lastuse'] = array( - 'type' = 'hidden', + 'type' = 'api', ); return true; -- To view, visit https://gerrit.wikimedia.org/r/61350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a36d8b1abe11436ace9188bb6ad45e27fc54be8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageTriage Gerrit-Branch: master Gerrit-Owner: Nischayn22 nischay...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 47483) update file metadata in importImages - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 47483) update file metadata in importImages .. (bug 47483) update file metadata in importImages importImages maintenance script was not updating file metadata when overwriting files. Bring code in importImages in line with LocalFile::upload Bug: 47483 Change-Id: I0e879604ce76ed78708a36df46b58fb3b8a7d6d2 --- M maintenance/importImages.php 1 file changed, 11 insertions(+), 2 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/importImages.php b/maintenance/importImages.php index abc1b87..7b340cc 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -228,7 +228,16 @@ if ( isset( $options['dry'] ) ) { echo( publishing {$file} by ' . $wgUser-getName() . ', comment '$commentText'... ); } else { - $archive = $image-publish( $file ); + $props = FSFile::getPropsFromPath( $file ); + $flags = 0; + $options = array(); + $handler = MediaHandler::getHandler( $props['mime'] ); + if ( $handler ) { + $options['headers'] = $handler-getStreamHeaders( $props['metadata'] ); + } else { + $options['headers'] = array(); + } + $archive = $image-publish( $file, $flags, $options ); if ( !$archive-isGood() ) { echo( failed. ( . $archive-getWikiText() . @@ -245,7 +254,7 @@ if ( isset( $options['dry'] ) ) { echo( done.\n ); - } elseif ( $image-recordUpload2( $archive-value, $summary, $commentText, false, $timestamp ) ) { + } elseif ( $image-recordUpload2( $archive-value, $summary, $commentText, $props, $timestamp ) ) { # We're done! echo( done.\n ); -- To view, visit https://gerrit.wikimedia.org/r/60249 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0e879604ce76ed78708a36df46b58fb3b8a7d6d2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: J jger...@wikimedia.org Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: J jger...@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] use mw.Api() instead of ajax - change (mediawiki...PageTriage)
Nischayn22 has uploaded a new change for review. https://gerrit.wikimedia.org/r/61351 Change subject: use mw.Api() instead of ajax .. use mw.Api() instead of ajax Change-Id: I1f2eaba7229afb19d849549bb987d26bbb3d1a83 --- M modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js M modules/ext.pageTriage.views.toolbar/ext.pageTriage.mark.js M modules/ext.pageTriage.views.toolbar/ext.pageTriage.tags.js M modules/ext.pageTriage.views.toolbar/ext.pageTriage.toolbarView.js 4 files changed, 93 insertions(+), 140 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage refs/changes/51/61351/1 diff --git a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js index 9bdd929..30902f7 100644 --- a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js +++ b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js @@ -574,19 +574,16 @@ } // Applying deletion tags should automatically mark the page as reviewed - apiRequest = { - 'action': 'pagetriageaction', - 'pageid': mw.config.get( 'wgArticleId' ), - 'reviewed': '1', - 'token': mw.user.tokens.get( 'editToken' ), - 'format': 'json', - 'skipnotif': '1' - }; - $.ajax( { - type: 'post', - url: mw.util.wikiScript( 'api' ), - data: apiRequest, - success: function( data ) { + var api = new mw.Api(), + apiRequest = { + 'action': 'pagetriageaction', + 'pageid': mw.config.get( 'wgArticleId' ), + 'reviewed': '1', + 'token': mw.user.tokens.get( 'editToken' ), + 'format': 'json', + 'skipnotif': '1' + }, + success = function ( data ) { if ( data.error ) { _this.handleError( mw.msg( 'pagetriage-mark-as-reviewed-error', data.error.info ) ); } else { @@ -606,9 +603,8 @@ } _this.tagPage(); } - }, - dataType: 'json' - } ); + }; + api.post( apiRequest ).done( success ); }, /** @@ -667,10 +663,8 @@ text = '{{' + $.pageTriageDeletionTagsMultiple.tag + '|' + tagText + paramsText + '}}'; } - $.ajax( { - type: 'post', - url: mw.util.wikiScript( 'api' ), - data: { + var api = new mw.Api(), + apiRequest = { 'action': 'pagetriagetagging', 'pageid': mw.config.get( 'wgArticleId' ), 'token': mw.user.tokens.get('editToken'), @@ -679,7 +673,7 @@ 'deletion': 1, 'taglist': tagList.join( '|' ) }, - success: function( data ) { + success = function ( data ) { if ( data.pagetriagetagging data.pagetriagetagging.result === 'success' ) { _this.notifyUser( count, key ); } else { @@ -689,9 +683,8 @@ _this.handleError( mw.msg( 'pagetriage-tagging-error' ) ); } } - }, - dataType: 'json' - } ); + }; + api.post( apiRequest ).done( success ); }, /** @@ -713,10 +706,8 @@ if ( this.model.get( 'user_name' ) ) { var title = new mw.Title( this.model.get(
[MediaWiki-commits] [Gerrit] Update webfonts and uls libs from upstream - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Update webfonts and uls libs from upstream .. Update webfonts and uls libs from upstream Change-Id: I338950789e94e1638069ca97cf29cea2d78cf3b8 --- M lib/jquery.uls/i18n/mk.json M lib/jquery.webfonts.js 2 files changed, 20 insertions(+), 20 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/jquery.uls/i18n/mk.json b/lib/jquery.uls/i18n/mk.json index 05015f4..7381eec 100644 --- a/lib/jquery.uls/i18n/mk.json +++ b/lib/jquery.uls/i18n/mk.json @@ -12,7 +12,7 @@ uls-region-EU: \u0415\u0432\u0440\u043e\u043f\u0430, uls-region-AS: \u0410\u0437\u0438\u0458\u0430, uls-region-ME: \u0411\u043b\u0438\u0437\u043e\u043a \u0418\u0441\u0442\u043e\u043a, -uls-region-PA: \u041f\u0430\u0446\u0438\u0444\u0438\u043a, +uls-region-PA: \u041e\u043a\u0435\u0430\u043d\u0438\u0458\u0430, uls-no-results-found: \u041d\u0435 \u043f\u0440\u043e\u043d\u0430\u0458\u0434\u043e\u0432 \u043d\u0438\u0448\u0442\u043e, uls-common-languages: \u041f\u043e\u0437\u0430\u0441\u0442\u0430\u043f\u0435\u043d\u0438 \u0458\u0430\u0437\u0438\u0446\u0438, uls-no-results-suggestion-title: \u041c\u043e\u0436\u0435 \u0434\u0430 \u0432\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0438\u0440\u0430\u0430\u0442:, diff --git a/lib/jquery.webfonts.js b/lib/jquery.webfonts.js index 5f1d690..88c817e 100644 --- a/lib/jquery.webfonts.js +++ b/lib/jquery.webfonts.js @@ -16,7 +16,7 @@ */ ( function( $, window, document, undefined ) { - use strict; + 'use strict'; var WebFonts = function( element, options ) { // Load defaults @@ -252,50 +252,50 @@ base = this.repository.base; version = fontconfig.version; - versionSuffix = ?version= + version + '20120101'; - styleString = @font-face { font-family: ' + fontFamily + ';\n; + versionSuffix = '?version=' + version + '20120101'; + styleString = '@font-face { font-family: \'' + fontFamily + '\';\\n'; userAgent = window.navigator.userAgent; fontStyle = fontconfig.fontstyle || 'normal'; fontFormats = []; if ( fontconfig.eot ) { - styleString += \tsrc: url(' + base + fontconfig.eot + versionSuffix + ');\n; + styleString += '\\tsrc: url(\'' + base + fontconfig.eot + versionSuffix + '\');\\n'; } - styleString += \tsrc: ; + styleString += '\\tsrc: '; // If the font is present locally, use it. if ( userAgent.match( /Android 2\.3/ ) === null ) { // Android 2.3.x does not respect local() syntax. // http://code.google.com/p/android/issues/detail?id=10609 - styleString += local(' + fontFamily + '),; + styleString += 'local(\'' + fontFamily + '\'),'; } if ( fontconfig.woff ) { - fontFormats.push( \t\turl(' + base + fontconfig.woff + versionSuffix - + ') format('woff') ); + fontFormats.push( '\\t\\turl(\'' + base + fontconfig.woff + versionSuffix + + '\') format(\'woff\')' ); } if ( fontconfig.svg ) { - fontFormats.push( \t\turl(' + base + fontconfig.svg + versionSuffix + # - + fontFamily + ') format('svg') ); + fontFormats.push( '\\t\\turl(\'' + base + fontconfig.svg + versionSuffix + '#' + + fontFamily + '\') format(\'svg\')' ); } if ( fontconfig.ttf ) { - fontFormats.push( \t\turl(' + base + fontconfig.ttf + versionSuffix - + ') format('truetype') ); + fontFormats.push( '\\t\\turl(\'' + base + fontconfig.ttf + versionSuffix + + '\') format(\'truetype\')' ); } - styleString += fontFormats.join() + ;\n; + styleString += fontFormats.join() + ';\\n'; if ( fontconfig.fontweight ) { - styleString += \tfont-weight: + fontconfig.fontweight + ;; + styleString += '\\tfont-weight:' +
[MediaWiki-commits] [Gerrit] Cleanup for jslint and coding conventions - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Cleanup for jslint and coding conventions .. Cleanup for jslint and coding conventions Change-Id: I6884759d960721840f44220648dce7838ff6 --- M resources/js/ext.uls.displaysettings.js 1 file changed, 15 insertions(+), 11 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index fab120f..661cf1e 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -314,7 +314,8 @@ * @param target String 'ui' or 'content' */ prepareFontSelector: function ( target ) { - var language, fonts, $fontSelector, savedFont, $systemFont, $fontLabel, $fontsSection; + var language, fonts, $fontSelector, savedFont, + $systemFont, $fontLabel, $fontsSection; // Get the language code from the right property - // uiLanguage or contentLanguage @@ -347,8 +348,10 @@ savedFont = mw.webfonts.preferences.getFont( this.uiLanguage ); $.each( fonts, function ( key, font ) { + var $fontOption; + if ( font !== 'system' ) { - var $fontOption = $( 'option' ).attr( 'value', font ).text( font ); + $fontOption = $( 'option' ).attr( 'value', font ).text( font ); $fontSelector.append( $fontOption ); $fontOption.attr( 'selected', savedFont === font ); } @@ -477,21 +480,24 @@ $uiFontSelector.on( 'change', function () { displaySettings.enableApplyButton(); - var font = $( this ).find( 'option:selected' ).val(); - mw.webfonts.preferences.setFont( displaySettings.uiLanguage, font ); + + mw.webfonts.preferences.setFont( displaySettings.uiLanguage, + $( this ).find( 'option:selected' ).val() + ); displaySettings.$webfonts.refresh(); } ); $contentFontSelector.on( 'change', function () { displaySettings.enableApplyButton(); - var font = $( this ).find( 'option:selected' ).val(); - mw.webfonts.preferences.setFont( displaySettings.contentLanguage, font ); + + mw.webfonts.preferences.setFont( displaySettings.contentLanguage, + $( this ).find( 'option:selected' ).val() + ); displaySettings.$webfonts.refresh(); } ); $tabButtons.on( 'click', function () { - var $subPanels, - $button = $( this ); + var $button = $( this ); if ( $button.hasClass( 'down' ) ) { return; @@ -547,9 +553,7 @@ if ( this.uiLanguage !== this.getUILanguage() ) { mw.uls.changeLanguage( this.uiLanguage ); } - } else { - // FIXME failure. what to do?! - } + } // @todo What to do in case of failure? }, /** -- To view, visit https://gerrit.wikimedia.org/r/61272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6884759d960721840f44220648dce7838ff6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Siebrand siebr...@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 JSHint issues - change (mediawiki...UniversalLanguageSelector)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/61352 Change subject: Fix JSHint issues .. Fix JSHint issues Change-Id: I0d63ec803f9cc8719f5275717b788812149a94c5 --- M .jshintignore M resources/js/ext.uls.interface.js 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/52/61352/1 diff --git a/.jshintignore b/.jshintignore index 18be9f9..d2373e9 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,2 +1,4 @@ # upstream libs lib/* +# Generated file that contains JSON. Would fail Strings must use singlequote. +resources/js/ext.ulswebfonts.repository.js diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index 4144322..dd7b39f 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -164,7 +164,7 @@ scrollTop: scrollPosition }, 500 ); } - } + }; } $ulsTrigger.uls( ulsOptions ); -- To view, visit https://gerrit.wikimedia.org/r/61352 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d63ec803f9cc8719f5275717b788812149a94c5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix JSHint issues - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Fix JSHint issues .. Fix JSHint issues Change-Id: I0d63ec803f9cc8719f5275717b788812149a94c5 --- M .jshintignore M resources/js/ext.uls.interface.js 2 files changed, 3 insertions(+), 1 deletion(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/.jshintignore b/.jshintignore index 18be9f9..4c02d63 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,2 +1,4 @@ # upstream libs lib/* +# Generated file that contains JSON. Would fail Strings must use singlequote. +resources/js/ext.uls.webfonts.repository.js diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index 4144322..dd7b39f 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -164,7 +164,7 @@ scrollTop: scrollPosition }, 500 ); } - } + }; } $ulsTrigger.uls( ulsOptions ); -- To view, visit https://gerrit.wikimedia.org/r/61352 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0d63ec803f9cc8719f5275717b788812149a94c5 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Nikerabbit niklas.laxst...@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 typo - change (mediawiki...UniversalLanguageSelector)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/61353 Change subject: Fix typo .. Fix typo Change-Id: Ic5a12a89c2442d8c658756db8ff392da5b6d1c2e --- M i18n/en.json 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/53/61353/1 diff --git a/i18n/en.json b/i18n/en.json index a3b6984..090d0af 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -23,7 +23,7 @@ ext-uls-display-settings-anon-same-as-content: English (same as content), ext-uls-display-settings-anon-log-in-cta: [[Special:UserLogin|Log in]] to select a different language for menus., ext-uls-webfonts-settings-title: Download font when needed, -ext-uls-webfonts-settings-info: Webfonts will be downloaded for displaying text in special scripts., +ext-uls-webfonts-settings-info: Web fonts will be downloaded for displaying text in special scripts., ext-uls-webfonts-settings-info-link: More information, ext-uls-webfonts-select-for: Select font for $1, ext-uls-webfonts-select-for-ui-info: Font used for user interface, @@ -47,4 +47,3 @@ ext-uls-input-disable-info: Input method tools are disabled., ext-uls-input-settings-noime: No input methods are available for this language. } - -- To view, visit https://gerrit.wikimedia.org/r/61353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5a12a89c2442d8c658756db8ff392da5b6d1c2e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Introduced ValueComparer interface - change (mediawiki...Diff)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Introduced ValueComparer interface .. Introduced ValueComparer interface Change-Id: I671a8dc821e2f02f451723d36fa0674528723f70 --- M Diff.classes.php M Diff.mw.php M RELEASE-NOTES A includes/Comparer/CallbackComparer.php A includes/Comparer/StrictComparer.php A includes/Comparer/ValueComparer.php M includes/patcher/MapPatcher.php A tests/phpunit/Comparer/CallbackComparerTest.php A tests/phpunit/Comparer/StrictComparerTest.php M tests/phpunit/patcher/MapPatcherTest.php 10 files changed, 393 insertions(+), 2 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved diff --git a/Diff.classes.php b/Diff.classes.php index fb1ff9e..fb806a0 100644 --- a/Diff.classes.php +++ b/Diff.classes.php @@ -15,6 +15,10 @@ 'Diff\Appendable' = 'includes/Appendable.php', 'Diff\DiffOpFactory' = 'includes/DiffOpFactory.php', + 'Diff\Comparer\CallbackComparer' = 'includes/Comparer/CallbackComparer.php', + 'Diff\Comparer\StrictComparer' = 'includes/Comparer/StrictComparer.php', + 'Diff\Comparer\ValueComparer' = 'includes/Comparer/ValueComparer.php', + 'Diff\CallbackListDiffer' = 'includes/differ/CallbackListDiffer.php', 'Diff\Differ' = 'includes/differ/Differ.php', 'Diff\ListDiffer' = 'includes/differ/ListDiffer.php', diff --git a/Diff.mw.php b/Diff.mw.php index daae74c..dfadc9e 100644 --- a/Diff.mw.php +++ b/Diff.mw.php @@ -58,6 +58,9 @@ $wgHooks['UnitTestsList'][]= function( array $files ) { // @codeCoverageIgnoreStart $testFiles = array( + 'Comparer/CallbackComparer', + 'Comparer/StrictComparer', + 'differ/CallbackListDiffer', 'differ/ListDiffer', 'differ/MapDiffer', diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0f0a207..3d412e2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -15,6 +15,8 @@ ; Additions * Added phpunit.php runner in the tests directory +* Added Diff\Comparer\ValueComparer interface with CallbackComparer and StrictComparer implementations +* Added MapPatcher::setValueComparer to facilitate patching maps containing objects ; Removals diff --git a/includes/Comparer/CallbackComparer.php b/includes/Comparer/CallbackComparer.php new file mode 100644 index 000..749719c --- /dev/null +++ b/includes/Comparer/CallbackComparer.php @@ -0,0 +1,49 @@ +?php + +namespace Diff\Comparer; + +/** + * Adapter around a comparision callback that implements the ValueComparer + * interface. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @since 0.6 + * + * @file + * @ingroup Diff + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class CallbackComparer implements ValueComparer { + + private $callback; + + /** +* @since 0.6 +* +* @param callable $callback +*/ + public function __construct( $callback ) { + $this-callback = $callback; + } + + public function valuesAreEqual( $firstValue, $secondValue ) { + return call_user_func_array( $this-callback, array( $firstValue, $secondValue ) ); + } + +} diff --git a/includes/Comparer/StrictComparer.php b/includes/Comparer/StrictComparer.php new file mode 100644 index 000..4734858 --- /dev/null +++ b/includes/Comparer/StrictComparer.php @@ -0,0 +1,37 @@ +?php + +namespace Diff\Comparer; + +/** + * Value comparer that uses PHPs native strict equality check (ie ===). + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to
[MediaWiki-commits] [Gerrit] Fix issues in Entity::patch - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Fix issues in Entity::patch .. Fix issues in Entity::patch * The base claim list passed in did not have claim guids as keys * The MapPatcher comparison behaviour was not altered to behave correctly for Claim objects This change depends on https://gerrit.wikimedia.org/r/#/c/60870/ Change-Id: I86d158e9653724c36575d93952da9317fca0f349 --- M DataModel/DataModel/Entity/Entity.php M DataModel/tests/phpunit/Entity/EntityTest.php 2 files changed, 24 insertions(+), 8 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/DataModel/DataModel/Entity/Entity.php b/DataModel/DataModel/Entity/Entity.php index 0bc0a71..bf1ee16 100644 --- a/DataModel/DataModel/Entity/Entity.php +++ b/DataModel/DataModel/Entity/Entity.php @@ -2,7 +2,9 @@ namespace Wikibase; +use Diff\Comparer\CallbackComparer; use Diff\Differ; +use Diff\MapPatcher; use Diff\Patcher; use MWException; use Wikibase\Lib\GuidGenerator; @@ -851,22 +853,31 @@ * @since 0.4 * * @param EntityDiff $patch -* @param Patcher|null $patcher The patcher with which to apply the diff */ - public final function patch( EntityDiff $patch, Patcher $patcher = null ) { - if ( $patcher === null ) { - $patcher = new \Diff\MapPatcher(); - } + public final function patch( EntityDiff $patch ) { + $patcher = new MapPatcher(); $this-setLabels( $patcher-patch( $this-getLabels(), $patch-getLabelsDiff() ) ); $this-setDescriptions( $patcher-patch( $this-getDescriptions(), $patch-getDescriptionsDiff() ) ); $this-setAllAliases( $patcher-patch( $this-getAllAliases(), $patch-getAliasesDiff() ) ); - $claims = $patcher-patch( $this-getClaims(), $patch-getClaimsDiff() ); + $this-patchSpecificFields( $patch, $patcher ); + + $patcher-setValueComparer( new CallbackComparer( + function( Claim $firstClaim, Claim $secondClaim ) { + return $firstClaim-getHash() === $secondClaim-getHash(); + } + ) ); + + $claims = array(); + + foreach ( $this-getClaims() as $claim ) { + $claims[$claim-getGuid()] = $claim; + } + + $claims = $patcher-patch( $claims, $patch-getClaimsDiff() ); $this-setClaims( new Claims( $claims ) ); - - $this-patchSpecificFields( $patch, $patcher ); } /** diff --git a/DataModel/tests/phpunit/Entity/EntityTest.php b/DataModel/tests/phpunit/Entity/EntityTest.php index b70e36f..fd40f0e 100644 --- a/DataModel/tests/phpunit/Entity/EntityTest.php +++ b/DataModel/tests/phpunit/Entity/EntityTest.php @@ -718,6 +718,11 @@ $claim2 = new \Wikibase\Claim( new \Wikibase\PropertyValueSnak( 42, new \DataValues\StringValue( 'ohi' ) ) ); $claim3 = new \Wikibase\Claim( new \Wikibase\PropertyNoValueSnak( 1 ) ); + $claim0-setGuid( 'claim0' ); + $claim1-setGuid( 'claim1' ); + $claim2-setGuid( 'claim2' ); + $claim3-setGuid( 'claim3' ); + $argLists = array(); -- To view, visit https://gerrit.wikimedia.org/r/61018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86d158e9653724c36575d93952da9317fca0f349 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf3 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Cleanup of edit-conflict Selenium test - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Cleanup of edit-conflict Selenium test .. Cleanup of edit-conflict Selenium test Change-Id: I7205939f02799b8da2a2dfb49e512f1cfe96c2b9 --- M repo/tests/selenium/item/edit_conflict_spec.rb 1 file changed, 3 insertions(+), 33 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/repo/tests/selenium/item/edit_conflict_spec.rb b/repo/tests/selenium/item/edit_conflict_spec.rb index f00fc0a..2a7c24f 100644 --- a/repo/tests/selenium/item/edit_conflict_spec.rb +++ b/repo/tests/selenium/item/edit_conflict_spec.rb @@ -149,6 +149,9 @@ first_claim_guid = 0 old_revid = 0 it should login as user 1, change claim and save revid do + visit_page(RepoLoginPage) do |page| +page.logout_user + end visit_page(NewPropertyPage) do |page| page.create_new_property(prop_label, prop_description, prop_datatype) end @@ -176,9 +179,6 @@ end it should login as user 2, change claim value do visit_page(RepoLoginPage) do |page| -page.logout_user - end - visit_page(RepoLoginPage) do |page| page.login_with(WIKI_ADMIN_USERNAME, WIKI_ADMIN_PASSWORD) end on_page(ItemPage) do |page| @@ -194,7 +194,6 @@ revid.should old_revid end end -# TODO: this test will fail because of bug 44101 (issue 1) it should login as user 1 again, inject old revid complain about edit conflict when changing claim value do visit_page(RepoLoginPage) do |page| page.login_with(WIKI_ORDINARY_USERNAME, WIKI_ORDINARY_PASSWORD) @@ -202,7 +201,6 @@ on_page(ItemPage) do |page| page.navigate_to_item page.wait_for_entity_to_load -revid = @browser.execute_script(return wb.getRevisionStore().getClaimRevision(' + first_claim_guid + ');) inject_old_revid = wb.getRevisionStore().setClaimRevision(parseInt( + old_revid.to_s() + ), ' + first_claim_guid.to_s() + '); @browser.execute_script(inject_old_revid) injected_revid = @browser.execute_script(return wb.getRevisionStore().getClaimRevision(' + first_claim_guid + ');) @@ -212,34 +210,6 @@ page.statementValueInput = statement_value_user1_changed page.saveStatement ajax_wait -page.wbErrorDiv?.should be_true -page.wbErrorDetailsLink?.should be_true -page.wbErrorDetailsLink -page.wbErrorDetailsDiv?.should be_true -# TODO: this will fail because of bug 44101 (issue 1) -page.wbErrorDetailsDiv_element.text.should == edit_conflict_msg -page.cancelStatement - end -end -# TODO: this test will fail because of bug 44101 (issue 2) -it should login as user 1 again, inject old revid complain about edit conflict when changing claim value do - visit_page(RepoLoginPage) do |page| -page.login_with(WIKI_ORDINARY_USERNAME, WIKI_ORDINARY_PASSWORD) - end - on_page(ItemPage) do |page| -page.navigate_to_item -page.wait_for_entity_to_load -revid = @browser.execute_script(return wb.getRevisionStore().getClaimRevision(' + first_claim_guid + ');) -inject_old_revid = wb.getRevisionStore().setClaimRevision(parseInt( + old_revid.to_s() + ), ' + first_claim_guid.to_s() + '); -@browser.execute_script(inject_old_revid) -injected_revid = @browser.execute_script(return wb.getRevisionStore().getClaimRevision(' + first_claim_guid + ');) -injected_revid.should == old_revid -page.editFirstStatement -page.statementValueInput_element.clear -page.statementValueInput = statement_value_user1 -page.saveStatement -ajax_wait -# TODO: this will fail because of bug 44101 (issue 2) page.wbErrorDiv?.should be_true page.wbErrorDetailsLink?.should be_true page.wbErrorDetailsLink -- To view, visit https://gerrit.wikimedia.org/r/61020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7205939f02799b8da2a2dfb49e512f1cfe96c2b9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf3 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Add input checks for Language::sprintfDate() - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add input checks for Language::sprintfDate() .. Add input checks for Language::sprintfDate() Check if the timestamp has a length of 14 characters and if it is numeric. Throw an exception otherwise. Includes tests. Bug: 47629 Change-Id: I9a4fd0af88cf20c2a6bd72fd7048743466c1600f --- M languages/Language.php M tests/phpunit/languages/LanguageTest.php 2 files changed, 34 insertions(+), 1 deletion(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/Language.php b/languages/Language.php index 9651f3d..7ec37a1 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1078,6 +1078,7 @@ * @param $zone DateTimeZone: Timezone of $ts * @todo handling of o format character for Iranian, Hebrew, Hijri Thai? * +* @throws MWException * @return string */ function sprintfDate( $format, $ts, DateTimeZone $zone = null ) { @@ -1093,6 +1094,15 @@ $thai = false; $minguo = false; $tenno = false; + + if ( strlen( $ts ) !== 14 ) { + throw new MWException( __METHOD__ . : The timestamp $ts should have 14 characters ); + } + + if ( !ctype_digit( $ts ) ) { + throw new MWException( __METHOD__ . : The timestamp $ts should be a number ); + } + for ( $p = 0; $p strlen( $format ); $p++ ) { $num = false; $code = $format[$p]; diff --git a/tests/phpunit/languages/LanguageTest.php b/tests/phpunit/languages/LanguageTest.php index d5dbfb2..26bb2f3 100644 --- a/tests/phpunit/languages/LanguageTest.php +++ b/tests/phpunit/languages/LanguageTest.php @@ -1,7 +1,6 @@ ?php class LanguageTest extends LanguageClassesTestCase { - function testLanguageConvertDoubleWidthToSingleWidth() { $this-assertEquals( 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz, @@ -500,6 +499,30 @@ } /** +* Test too short timestamp +* @expectedException MWException +*/ + function testSprintfDateTooShortTimestamp() { + $this-getLang()-sprintfDate( 'xiY', '1234567890123' ); + } + + /** +* Test too long timestamp +* @expectedException MWException +*/ + function testSprintfDateTooLongTimestamp() { + $this-getLang()-sprintfDate( 'xiY', '123456789012345' ); + } + + /** +* Test too short timestamp +* @expectedException MWException +*/ + function testSprintfDateNotAllDigitTimestamp() { + $this-getLang()-sprintfDate( 'xiY', '-1234567890123' ); + } + + /** * @dataProvider provideSprintfDateSamples */ function testSprintfDate( $format, $ts, $expected, $msg ) { -- To view, visit https://gerrit.wikimedia.org/r/60798 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9a4fd0af88cf20c2a6bd72fd7048743466c1600f Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: Siebrand siebr...@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] Changing how the enotifusertalkpages user option is handled ... - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Changing how the enotifusertalkpages user option is handled by Echo .. Changing how the enotifusertalkpages user option is handled by Echo If we're using Echo to handle user talk page post notifications, hide the old (non-Echo) preference for this. If Echo is moved to core we'll want to remove this old user option entirely. For now, though, we need to keep it defined in case Echo is ever uninstalled. Otherwise, that preference could be lost entirely. This hiding logic is not abstracted since there is only a single preference in core that is potentially made obsolete by Echo. Change-Id: I6c8b2143a5fd719486f7e6cbaa3d7635f507ffca --- M Hooks.php 1 file changed, 13 insertions(+), 9 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index 8858fdc..15720ed 100644 --- a/Hooks.php +++ b/Hooks.php @@ -256,7 +256,7 @@ */ public static function getPreferences( $user, $preferences ) { global $wgEchoDefaultNotificationTypes, $wgAuth, $wgEchoEnableEmailBatch, - $wgEchoNotifiers, $wgEchoNotificationCategories; + $wgEchoNotifiers, $wgEchoNotificationCategories, $wgEchoNotifications; // Show email frequency options $never = wfMessage( 'echo-pref-email-frequency-never' )-plain(); @@ -324,9 +324,6 @@ // Show subscription options - // $oldPrefs are prefs that we are replacing - $oldPrefs['email']['edit-user-talk'] = 'enotifusertalkpages'; - // Build the columns (output formats) $columns = array(); foreach ( $wgEchoNotifiers as $notifierType = $notifierData ) { @@ -360,11 +357,6 @@ } elseif ( !$wgEchoDefaultNotificationTypes['all'][$notifierType] ) { $removeOptions[] = $notifierType-$category; } - - // Unset redundant prefs while we're cycling through the matrix - if ( isset( $oldPrefs[$notifierType][$category] ) ) { - unset( $preferences[$oldPrefs[$notifierType][$category]] ); - } } } @@ -376,6 +368,18 @@ 'remove-options' = $removeOptions, ); + // If we're using Echo to handle user talk page post notifications, + // hide the old (non-Echo) preference for this. If Echo is moved to core + // we'll want to remove this old user option entirely. For now, though, + // we need to keep it defined in case Echo is ever uninstalled. + // Otherwise, that preference could be lost entirely. This hiding logic + // is not abstracted since there is only a single preference in core + // that is potentially made obsolete by Echo. + if ( isset( $wgEchoNotifications['edit-user-talk'] ) ) { + $preferences['enotifusertalkpages']['type'] = 'hidden'; + unset( $preferences['enotifusertalkpages']['section'] ); + } + // Show fly-out display prefs // Per bug 47562, we're going to hide this pref for now until we see // what the community reaction to Echo is on en.wiki. -- To view, visit https://gerrit.wikimedia.org/r/61282 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c8b2143a5fd719486f7e6cbaa3d7635f507ffca Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: Bsitu bs...@wikimedia.org Gerrit-Reviewer: EBernhardson (WMF) ebernhard...@wikimedia.org Gerrit-Reviewer: Lwelling lwell...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@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] Updated Ruby gems - change (qa/browsertests)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/61354 Change subject: Updated Ruby gems .. Updated Ruby gems Change-Id: I37ad454eb13470a74b761382d49906e87dd46d4b --- M Gemfile.lock 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/54/61354/1 diff --git a/Gemfile.lock b/Gemfile.lock index be9e577..c53adfa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,10 +29,10 @@ page_navigation (= 0.7) selenium-webdriver (= 2.32.1) watir-webdriver (= 0.6.3) -page_navigation (0.7) +page_navigation (0.8) data_magic (= 0.14) parallel (0.6.4) -parallel_tests (0.11.1) +parallel_tests (0.11.3) parallel rake (10.0.4) rspec-expectations (2.13.0) @@ -44,7 +44,7 @@ rubyzip websocket (~ 1.0.4) syntax (1.0.0) -watir-webdriver (0.6.3) +watir-webdriver (0.6.4) selenium-webdriver (= 2.18.0) websocket (1.0.7) yml_reader (0.2) -- To view, visit https://gerrit.wikimedia.org/r/61354 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I37ad454eb13470a74b761382d49906e87dd46d4b Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updated Ruby gems - change (mediawiki...MobileFrontend)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/61355 Change subject: Updated Ruby gems .. Updated Ruby gems Change-Id: Ifc1ba6a4740e557e0e496cee4635efb138dc3c21 --- M tests/acceptance/Gemfile.lock 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/55/61355/1 diff --git a/tests/acceptance/Gemfile.lock b/tests/acceptance/Gemfile.lock index 731f4a3..a94f1ac 100644 --- a/tests/acceptance/Gemfile.lock +++ b/tests/acceptance/Gemfile.lock @@ -26,10 +26,10 @@ page_navigation (= 0.7) selenium-webdriver (= 2.32.1) watir-webdriver (= 0.6.3) -page_navigation (0.7) +page_navigation (0.8) data_magic (= 0.14) parallel (0.6.4) -parallel_tests (0.11.1) +parallel_tests (0.11.3) parallel rake (10.0.4) rspec-expectations (2.13.0) @@ -41,7 +41,7 @@ rubyzip websocket (~ 1.0.4) syntax (1.0.0) -watir-webdriver (0.6.3) +watir-webdriver (0.6.4) selenium-webdriver (= 2.18.0) websocket (1.0.7) yml_reader (0.2) -- To view, visit https://gerrit.wikimedia.org/r/61355 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc1ba6a4740e557e0e496cee4635efb138dc3c21 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only create notifications that are wanted by the recipients - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Only create notifications that are wanted by the recipients .. Only create notifications that are wanted by the recipients Also moving getUserEnabledEvents from EchoBackend to NotificationController since it has nothing to do with the backend. Bug: 47664 Change-Id: I4f9682b861d9f035ae45f206c37ec0ae1c09ab64 --- M Notifier.php M controller/NotificationController.php M includes/DbEchoBackend.php M includes/EchoBackend.php 4 files changed, 32 insertions(+), 26 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/Notifier.php b/Notifier.php index 22d730f..1d6015b 100644 --- a/Notifier.php +++ b/Notifier.php @@ -12,6 +12,13 @@ public static function notifyWithNotification( $user, $event ) { global $wgEchoConfig, $wgEchoNotifications; + // Only create the notification if the user wants to recieve that type + // of notification and they are eligible to recieve it. See bug 47664. + $userWebNotifications = EchoNotificationController::getUserEnabledEvents( $user, 'web' ); + if ( !in_array( $event-getType(), $userWebNotifications ) ) { + return; + } + EchoNotification::create( array( 'user' = $user, 'event' = $event ) ); self::logEvent( $user, $event, 'web' ); diff --git a/controller/NotificationController.php b/controller/NotificationController.php index e9ce855..d7d219a 100644 --- a/controller/NotificationController.php +++ b/controller/NotificationController.php @@ -31,6 +31,29 @@ } /** +* Get the enabled events for a user, which excludes user-dismissed events +* from the general enabled events +* @param $user User +* @param $outputFormat string +* @return array +*/ + public static function getUserEnabledEvents( $user, $outputFormat ) { + global $wgEchoNotifications; + $eventTypesToLoad = $wgEchoNotifications; + foreach ( $eventTypesToLoad as $eventType = $eventData ) { + $category = self::getNotificationCategory( $eventType ); + // Make sure the user is eligible to recieve this type of notification + if ( !self::getCategoryEligibility( $user, $category ) ) { + unset( $eventTypesToLoad[$eventType] ); + } + if ( !$user-getOption( 'echo-subscriptions-' . $outputFormat . '-' . $category ) ) { + unset( $eventTypesToLoad[$eventType] ); + } + } + return array_keys( $eventTypesToLoad ); + } + + /** * See if a user is eligible to recieve a certain type of notification * (based on user groups, not user preferences) * diff --git a/includes/DbEchoBackend.php b/includes/DbEchoBackend.php index d73e647..3e570d2 100644 --- a/includes/DbEchoBackend.php +++ b/includes/DbEchoBackend.php @@ -42,7 +42,7 @@ public function loadNotifications( $user, $limit, $timestamp, $offset, $outputFormat = 'web' ) { $dbr = MWEchoDbFactory::getDB( DB_SLAVE ); - $eventTypesToLoad = $this-getUserEnabledEvents( $user, $outputFormat ); + $eventTypesToLoad = EchoNotificationController::getUserEnabledEvents( $user, $outputFormat ); if ( !$eventTypesToLoad ) { return array(); } @@ -264,7 +264,7 @@ $dbSource = DB_SLAVE; } - $eventTypesToLoad = $this-getUserEnabledEvents( $user, 'web' ); + $eventTypesToLoad = EchoNotificationController::getUserEnabledEvents( $user, 'web' ); if ( !$eventTypesToLoad ) { return false; diff --git a/includes/EchoBackend.php b/includes/EchoBackend.php index d1d2123..8f1cde7 100644 --- a/includes/EchoBackend.php +++ b/includes/EchoBackend.php @@ -26,30 +26,6 @@ } /** -* Get the enabled events for a user, which excludes user-dismissed events -* from the general enabled events -* @param $user User -* @param $outputFormat string -* @return array -*/ - protected function getUserEnabledEvents( $user, $outputFormat ) { - global $wgEchoNotifications; - $eventTypesToLoad = $wgEchoNotifications; - foreach ( $eventTypesToLoad as $eventType = $eventData ) { - $category = EchoNotificationController::getNotificationCategory( $eventType ); - // Make sure the user is eligible to recieve this type of notification - if (
[MediaWiki-commits] [Gerrit] Disable upload from URL on Special:ImportTranslations by def... - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Disable upload from URL on Special:ImportTranslations by default .. Disable upload from URL on Special:ImportTranslations by default In bug 40341, Chris Steipp identified unknown potential attack vectors in allowing users to request arbitrary URLs via MediaWiki. This patch disables the existing feature by adding global $wgTranslateAllowImportFromUrl. It can be reenabled by setting $wgTranslateAllowImportFromUrl to true. Bug: 40341 Change-Id: I01057787abcf9cbcf9796cac7750134858ebff7b --- M Translate.php M specials/SpecialImportTranslations.php 2 files changed, 26 insertions(+), 13 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/Translate.php b/Translate.php index 7302f7f..fe63d5c 100644 --- a/Translate.php +++ b/Translate.php @@ -17,7 +17,7 @@ /** * Version number used in extension credits and in other places where needed. */ -define( 'TRANSLATE_VERSION', '2013-04-16' ); +define( 'TRANSLATE_VERSION', '2013-04-29' ); /** * Extension credits properties. @@ -608,6 +608,13 @@ */ $wgTranslateUseTux = true; +/** + * Whether to allow uploading gettext files through URLs on + * Special:ImportTranslations. Default is false. + * @since 2013-04-26 + */ +$wgTranslateAllowImportFromUrl = false; + # /source /** @cond cli_support */ diff --git a/specials/SpecialImportTranslations.php b/specials/SpecialImportTranslations.php index 0a70e79..028c58f 100644 --- a/specials/SpecialImportTranslations.php +++ b/specials/SpecialImportTranslations.php @@ -118,6 +118,8 @@ * Constructs and outputs file input form with supported methods. */ protected function outputForm() { + global $wgTranslateAllowImportFromUrl; + $this-getOutput()-addModules( 'ext.translate.special.importtranslations' ); TranslateUtils::addSpecialHelpLink( $this-getOutput(), 'Help:Extension:Translate/Off-line_translation' ); /** @@ -139,17 +141,19 @@ $class = array( 'class' = 'mw-translate-import-inputs' ); - $this-getOutput()-addHTML( - Xml::radioLabel( $this-msg( 'translate-import-from-url' )-text(), - 'upload-type', 'url', 'mw-translate-up-url', - $this-getRequest()-getText( 'upload-type' ) === 'url' ) . - \n . Xml::closeElement( 'td' ) . Xml::openElement( 'td' ) . \n . - Xml::input( 'upload-url', 50, - $this-getRequest()-getText( 'upload-url' ), - array( 'id' = 'mw-translate-up-url-input' ) + $class ) . - \n . Xml::closeElement( 'td' ) . Xml::closeElement( 'tr' ) . - Xml::openElement( 'tr' ) . Xml::openElement( 'td' ) . \n - ); + if( $wgTranslateAllowImportFromUrl === true ) { + $this-getOutput()-addHTML( + Xml::radioLabel( $this-msg( 'translate-import-from-url' )-text(), + 'upload-type', 'url', 'mw-translate-up-url', + $this-getRequest()-getText( 'upload-type' ) === 'url' ) . + \n . Xml::closeElement( 'td' ) . Xml::openElement( 'td' ) . \n . + Xml::input( 'upload-url', 50, + $this-getRequest()-getText( 'upload-url' ), + array( 'id' = 'mw-translate-up-url-input' ) + $class ) . + \n . Xml::closeElement( 'td' ) . Xml::closeElement( 'tr' ) . + Xml::openElement( 'tr' ) . Xml::openElement( 'td' ) . \n + ); + } $this-getOutput()-addHTML( Xml::radioLabel( $this-msg( 'translate-import-from-wiki' )-text(), @@ -181,9 +185,11 @@ * @return array */ protected function loadFile( $filedata ) { + global $wgTranslateAllowImportFromUrl; + $source = $this-getRequest()-getText( 'upload-type' ); - if ( $source === 'url' ) { + if ( $source === 'url' $wgTranslateAllowImportFromUrl === true ) { $url = $this-getRequest()-getText( 'upload-url' ); $filedata = Http::get( $url ); if ( $filedata ) { -- To view, visit https://gerrit.wikimedia.org/r/60983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I01057787abcf9cbcf9796cac7750134858ebff7b Gerrit-PatchSet: 4
[MediaWiki-commits] [Gerrit] Timestamp params (no longer Message-escaped()) still need t... - change (mediawiki...ArticleFeedbackv5)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/61356 Change subject: Timestamp params (no longer Message-escaped()) still need to be escaped .. Timestamp params (no longer Message-escaped()) still need to be escaped Change-Id: I1af17c01395f5affaa3ef1ac4c31881a05d12232 --- M ArticleFeedbackv5.render.php M ArticleFeedbackv5.utils.php 2 files changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 refs/changes/56/61356/1 diff --git a/ArticleFeedbackv5.render.php b/ArticleFeedbackv5.render.php index 9267f82..55e7a12 100644 --- a/ArticleFeedbackv5.render.php +++ b/ArticleFeedbackv5.render.php @@ -483,7 +483,7 @@ Html::rawElement( 'span', array( 'class' = 'articleFeedbackv5-comment-details' ), - Html::rawElement( + Html::element( 'span', array( 'class' = 'articleFeedbackv5-comment-details-date' ), $timestamp-getHumanTimestamp() @@ -1237,7 +1237,7 @@ array( 'class' = 'articleFeedbackv5-feedback-permalink-status articleFeedbackv5-laststatus-' . $last-log_action ), wfMessage( 'articlefeedbackv5-permalink-status-' . $last-log_action ) -rawParams( ArticleFeedbackv5Utils::getUserLink( $last-log_user, $last-log_user_text ) ) - -rawParams( $timestamp-getHumanTimestamp() ) + -params( $timestamp-getHumanTimestamp() ) -parse() ) ) . diff --git a/ArticleFeedbackv5.utils.php b/ArticleFeedbackv5.utils.php index d41e471..2cb53ad 100644 --- a/ArticleFeedbackv5.utils.php +++ b/ArticleFeedbackv5.utils.php @@ -256,8 +256,7 @@ // articlefeedbackv5-mask-text-oversight, articlefeedbackv5-mask-text-hide, // articlefeedbackv5-mask-text-inappropriate return wfMessage( 'articlefeedbackv5-mask-text-' . $type ) - -params( static::formatId( $feedbackId ), $username ) - -rawParams( $timestamp-getHumanTimestamp() ) + -params( static::formatId( $feedbackId ), $username, $timestamp-getHumanTimestamp() ) -escaped(); } -- To view, visit https://gerrit.wikimedia.org/r/61356 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1af17c01395f5affaa3ef1ac4c31881a05d12232 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5 Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rewritten and added the ULS IME test scenarios - change (qa/browsertests)
Zfilipin has submitted this change and it was merged. Change subject: Rewritten and added the ULS IME test scenarios .. Rewritten and added the ULS IME test scenarios The descriptions for the ULS IME test scenarios have been updated with more information on what the tests are to accomplish. Change-Id: Id37cc9f94fbe22f0cd235182c0b33b81b53d6f38 --- M features/uls_ime.feature 1 file changed, 50 insertions(+), 0 deletions(-) Approvals: Zfilipin: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/features/uls_ime.feature b/features/uls_ime.feature index 35c118e..8c21494 100644 --- a/features/uls_ime.feature +++ b/features/uls_ime.feature @@ -4,3 +4,53 @@ Given I am at random page When I click on an input box Then I should see the input method keyboard icon at the bottom right + + Scenario: ULS can see dropdown menu when they click on the IME icon +Given I am on a wiki page with input options with focus on an input box +When I click on the IME keyboard icon +Then I should see the dropdown menu with the a list of keymaps + + Scenario: Autonyms of keyboards should be visible to the user +Given I have clicked on the IME keyboard icon +When I get the drop down list of keyboards +Then I should see the autonyms of the keyboards + + Scenario: Language and Input Settings dialog should be displayed to the user +Given I have the dropdown menu of the keyboard open +When I click on the 'More Settings' option at the bottom of the dropdown +Then I should see the dialog to select Language and Input settings + + Scenario: User should see the main ULS dialog +Given I have the dropdown menu of the keyboard open +When I click on the '...' option near the bottom of the dropdown +Then I should see the main ULS dialog + + Scenario: Name of the selected keymap is visible with the IME icon +Given I have the dropdown menu of the keyboard open +When I click on the 'Bengali Probhat' keyboard +Then I should see the name of the keyboard i.e. 'Bengali Probhat' displayed with the IME icon + + Scenario: User should not be able to type with a disabled keymap +Given I have selected and enabled a keyboard to use from the dropdown menu and its name is displayed with the IME icon +When I press 'Ctrl+m' +Then I should see the selected keyboard being disabled and am not able to type in that script + + Scenario: The name of a disabled keyboard should not be visible in the IME icon tooltip +Given I have selected a keyboard and enabled from the dropdown menu +When I press 'ctrl+m' to disable it +Then I should see the name of the keyboard removed from the tooltip displaying the IME icon + + Scenario: Without a prior keyboard selection a keyboard name should not be displayed on pressing the shortcut keys +Given The cursor is on an input box and I have not made any keyboard selection +When I press 'ctrl+m' +Then I should not see any keyboard name displayed along with the IME icon + + Scenario: Keyboard selected in one input box should also be the selected keyboard in the next one +Given I have selected a keyboard and enabled from the dropdown menu +When I move from the currently active input box to another input box and start typing +Then I should be able to write in the keyboard that was selected in the previous box + + Scenario: Name of a keyboard selected in one input box should be displayed in the next one +Given I have selected a keyboard and enabled from the dropdown menu +When I move from the currently active input box to another input box +Then I should see the keyboard name still displayed with the IME icon -- To view, visit https://gerrit.wikimedia.org/r/60276 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id37cc9f94fbe22f0cd235182c0b33b81b53d6f38 Gerrit-PatchSet: 3 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Arrbee run...@gmail.com Gerrit-Reviewer: Arrbee run...@gmail.com Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@wikimedia.org 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] Don't let anonymous users change interface language - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Don't let anonymous users change interface language .. Don't let anonymous users change interface language Language selector is still opened by default Change-Id: Iee7d83179e71b4546d8f3cd4f6fb053262ce05e2 --- M Resources.php M i18n/en.json M i18n/qqq.json M resources/css/ext.uls.displaysettings.css M resources/js/ext.uls.displaysettings.js 5 files changed, 50 insertions(+), 2 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index e8fab4c..4747205 100644 --- a/Resources.php +++ b/Resources.php @@ -22,6 +22,7 @@ 'ext.uls.languagesettings', 'ext.uls.webfonts', 'jquery.i18n', + 'mediawiki.api.parse', ), ) + $resourcePaths; diff --git a/i18n/en.json b/i18n/en.json index 9e90a7a..a3b6984 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -19,6 +19,9 @@ ext-uls-language-buttons-help: Change the language of menus. Content language will not be affected., ext-uls-display-settings-font-settings: Font settings, ext-uls-display-settings-ui-language: Display language, +ext-uls-display-settings-anon-label: Display language:, +ext-uls-display-settings-anon-same-as-content: English (same as content), +ext-uls-display-settings-anon-log-in-cta: [[Special:UserLogin|Log in]] to select a different language for menus., ext-uls-webfonts-settings-title: Download font when needed, ext-uls-webfonts-settings-info: Webfonts will be downloaded for displaying text in special scripts., ext-uls-webfonts-settings-info-link: More information, diff --git a/i18n/qqq.json b/i18n/qqq.json index 63048b1..0646c8b 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -21,6 +21,10 @@ ext-uls-language-buttons-help: Help text that appears above the language selection buttons in the Display settings panel., ext-uls-display-settings-font-settings: Subsection title for font settings, ext-uls-display-settings-ui-language: Sub section title for selecting UI language.\n{{Identical|Display language}}, +ext-uls-display-settings-anon-label: A label that appears to anonymous users before the message {{msg-mw|ext-uls-display-settings-anon-same-as-content}}., +ext-uls-display-settings-anon-same-as-content: Text that appears to anonymous users after the label {{msg-mw|ext-uls-display-settings-anon-label}}. +Replace \English\ with the name of your language., +ext-uls-display-settings-anon-log-in-cta: A call to action for an anonymous user to log in., ext-uls-webfonts-settings-title: Short title for enabling webfonts, ext-uls-webfonts-settings-info: Webfonts will be downloaded for displaying text in special scripts., ext-uls-webfonts-settings-info-link: More information link text for webfonts, @@ -45,4 +49,4 @@ ext-uls-input-enable: Label for enable input tools button, ext-uls-input-disable-info: Info text for the disable input tools button, ext-uls-input-settings-noime: Text to be shown when no input methods are available for a selected language -} \ No newline at end of file +} diff --git a/resources/css/ext.uls.displaysettings.css b/resources/css/ext.uls.displaysettings.css index 85255c8..0480307 100644 --- a/resources/css/ext.uls.displaysettings.css +++ b/resources/css/ext.uls.displaysettings.css @@ -100,3 +100,11 @@ color: #55; font-size: 10pt; } + +.uls-display-settings-anon-label { + font-weight: bold; +} + +#uls-display-settings-anon-log-in-cta { + font-size: 10pt; +} diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index 661cf1e..d81391f 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -160,11 +160,43 @@ * Prepare the UI language selector */ prepareLanguages: function () { - var displaySettings = this, + var loginUri, $loginCta, + displaySettings = this, SUGGESTED_LANGUAGES_NUMBER = 3, + anonsAllowed = mw.config.get( 'wgULSAnonCanChangeLanguage' ), languagesForButtons, $languages, suggestedLanguages, lang, i, language, $button; + // Don't let anonymous users change interface language + if ( !anonsAllowed mw.user.isAnon() ) { + loginUri = new mw.Uri(); + loginUri.query = { + title: 'Special:UserLogin' + }; + $loginCta = $( 'p' ) + .attr( 'id',
[MediaWiki-commits] [Gerrit] Fix typo - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Fix typo .. Fix typo Change-Id: Ic5a12a89c2442d8c658756db8ff392da5b6d1c2e --- M i18n/en.json 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index a3b6984..090d0af 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -23,7 +23,7 @@ ext-uls-display-settings-anon-same-as-content: English (same as content), ext-uls-display-settings-anon-log-in-cta: [[Special:UserLogin|Log in]] to select a different language for menus., ext-uls-webfonts-settings-title: Download font when needed, -ext-uls-webfonts-settings-info: Webfonts will be downloaded for displaying text in special scripts., +ext-uls-webfonts-settings-info: Web fonts will be downloaded for displaying text in special scripts., ext-uls-webfonts-settings-info-link: More information, ext-uls-webfonts-select-for: Select font for $1, ext-uls-webfonts-select-for-ui-info: Font used for user interface, @@ -47,4 +47,3 @@ ext-uls-input-disable-info: Input method tools are disabled., ext-uls-input-settings-noime: No input methods are available for this language. } - -- To view, visit https://gerrit.wikimedia.org/r/61353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5a12a89c2442d8c658756db8ff392da5b6d1c2e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Nikerabbit niklas.laxst...@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] Avoid null in the IME languages buttons - change (mediawiki...UniversalLanguageSelector)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/61357 Change subject: Avoid null in the IME languages buttons .. Avoid null in the IME languages buttons Change-Id: Ic64763fdba34bdcebde33104f7e6130d93a84e02 --- M resources/js/ext.uls.inputsettings.js 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/57/61357/1 diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index e161e0c..e5733fa 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -223,14 +223,18 @@ $languages.empty(); // UI language must always be present - if ( this.imeLanguage !== this.contentLanguage ) { + if ( this.imeLanguage !== this.contentLanguage + $.uls.data.languages[this.imeLanguage] + ) { languagesForButtons.push( this.imeLanguage ); firstLanguage = this.imeLanguage; } // Selected IME language may be different, and it must // be present, too - if ( $.inArray( selectedImeLanguage, languagesForButtons ) === -1 ) { + if ( $.inArray( selectedImeLanguage, languagesForButtons ) === -1 + $.uls.data.languages[selectedImeLanguage] + ) { languagesForButtons.push( selectedImeLanguage ); firstLanguage = selectedImeLanguage; } -- To view, visit https://gerrit.wikimedia.org/r/61357 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic64763fdba34bdcebde33104f7e6130d93a84e02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector 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] Don't bind 'blur' and 'focus' on the document node in Opera - change (mediawiki...VisualEditor)
Matmarex has uploaded a new change for review. https://gerrit.wikimedia.org/r/61358 Change subject: Don't bind 'blur' and 'focus' on the document node in Opera .. Don't bind 'blur' and 'focus' on the document node in Opera Opera triggers 'blur' when clicking on any a link, then forgets to trigger 'focus'. This causes the change polling to stop - SurfaceObserver.prototype.stop is called without a subsequent call to SurfaceObserver.prototype.start). Let's just not bind these events, as the worst this can cause is worse performance (unnecessary polling when the window is not active). The only way I've found to restore focus (and resume polling) is to press 'Esc' (this fires another 'blur' event), then click inside the document node (this finally fires 'focus'). Bug: 47793 Change-Id: Iaaa2a7993f3561dc663a064468c396ebfe951ce7 --- M modules/ve/ce/ve.ce.Surface.js 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/58/61358/1 diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 125a961..c9df06e 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -47,10 +47,15 @@ this.model.addListenerMethods( this, { 'change': 'onChange', 'lock': 'onLock', 'unlock': 'onUnlock' } ); - this.documentView.getDocumentNode().$.on( { - 'focus': ve.bind( this.documentOnFocus, this ), - 'blur': ve.bind( this.documentOnBlur, this ) - } ); + // Opera triggers 'blur' when clicking on any a link, then forgets to trigger 'focus'. + // Let's just not bind these events, as the worst this can cause is worse performance + // (unnecessary polling when the window is not active). + if ( $.client.test( { ltr: { opera: false }, rtl: { opera: false } } ) ) { + this.documentView.getDocumentNode().$.on( { + 'focus': ve.bind( this.documentOnFocus, this ), + 'blur': ve.bind( this.documentOnBlur, this ) + } ); + } this.$.on( { 'cut': ve.bind( this.onCut, this ), 'copy': ve.bind( this.onCopy, this ), -- To view, visit https://gerrit.wikimedia.org/r/61358 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaaa2a7993f3561dc663a064468c396ebfe951ce7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Matmarex matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move check to detect if AFT is enabled down (otherwise class... - change (mediawiki...ArticleFeedback)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/61359 Change subject: Move check to detect if AFT is enabled down (otherwise class was not yet loaded) .. Move check to detect if AFT is enabled down (otherwise class was not yet loaded) Change-Id: I77b3e39b0ffc21dbd48a76e09c9ef46f1a3580e5 --- M populateAFStatistics.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedback refs/changes/59/61359/1 diff --git a/populateAFStatistics.php b/populateAFStatistics.php index d601a6d..0a4425b 100644 --- a/populateAFStatistics.php +++ b/populateAFStatistics.php @@ -6,10 +6,6 @@ } require_once( $IP/maintenance/Maintenance.php ); -if ( !class_exists( 'SpecialArticleFeedback' ) ) { - die( The ArticleFeedback extension must be loaded to use this maintenance script.\n ); -} - class PopulateAFStatistics extends Maintenance { /** * The number of records to attempt to insert at any given time. @@ -149,6 +145,10 @@ } public function execute() { + if ( !class_exists( 'SpecialArticleFeedback' ) ) { + die( The ArticleFeedback extension must be loaded to use this maintenance script.\n ); + } + // finish bootstrapping the script $this-bootstrap(); -- To view, visit https://gerrit.wikimedia.org/r/61359 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77b3e39b0ffc21dbd48a76e09c9ef46f1a3580e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedback Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] If there's feedback, show talk-page link (regardless of AFTv... - change (mediawiki...ArticleFeedbackv5)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/61360 Change subject: If there's feedback, show talk-page link (regardless of AFTv5 being en/disabled) .. If there's feedback, show talk-page link (regardless of AFTv5 being en/disabled) Change-Id: I4b70369cc5c126ead24ee63d0934c86b2d160fea --- M modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.js 1 file changed, 12 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 refs/changes/60/61360/1 diff --git a/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.js b/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.js index 1793ae9..42d0a67 100644 --- a/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.js +++ b/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.js @@ -8,17 +8,6 @@ // Check if the talk page link can be shown if ( mw.config.get( 'wgArticleFeedbackv5TalkPageLink' ) ) { - // Check if AFT is enabled - var enable = $.aftUtils.verify( 'talk' ); - if ( !enable ) { - return; - } - - // Initialize clicktracking - // NB: Using the talk page's namespace, title, and rev id, not - // the article's as in the front end tracking - $.aftTrack.init(); - // Build the url to the Special:ArticleFeedbackv5 page var params = { ref: 'talk' }; var url = mw.config.get( 'wgArticleFeedbackv5SpecialUrl' ) + '/' + @@ -35,8 +24,18 @@ $( '#firstHeading' ).append( link ); - // Track an impression - $.aftTrack.track( 'talk_page_view_feedback-impression' ); + // Check if AFT is enabled + var enable = $.aftUtils.verify( 'talk' ); + if ( enable ) { + // Initialize clicktracking + // NB: Using the talk page's namespace, title, and rev id, not + // the article's as in the front end tracking + $.aftTrack.init(); + + // Track an impression + $.aftTrack.track( 'talk_page_view_feedback-impression' ); + } + } } ); -- To view, visit https://gerrit.wikimedia.org/r/61360 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b70369cc5c126ead24ee63d0934c86b2d160fea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5 Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid null in the IME languages buttons - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Avoid null in the IME languages buttons .. Avoid null in the IME languages buttons Change-Id: Ic64763fdba34bdcebde33104f7e6130d93a84e02 --- M resources/js/ext.uls.inputsettings.js 1 file changed, 8 insertions(+), 3 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index e161e0c..d95e288 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -201,9 +201,10 @@ prepareLanguages: function () { var inputSettings = this, SUGGESTED_LANGUAGES_NUMBER = 3, + firstLanguage = this.contentLanguage, selectedImeLanguage = $.ime.preferences.getLanguage(), languagesForButtons, $languages, suggestedLanguages, - firstLanguage, lang, i, language, $button, $caret; + lang, i, language, $button, $caret; $languages = this.$template.find( 'div.uls-ui-languages' ); this.$template.find( 'div.uls-ui-languages' ).show(); @@ -223,14 +224,18 @@ $languages.empty(); // UI language must always be present - if ( this.imeLanguage !== this.contentLanguage ) { + if ( this.imeLanguage !== this.contentLanguage + $.uls.data.languages[this.imeLanguage] + ) { languagesForButtons.push( this.imeLanguage ); firstLanguage = this.imeLanguage; } // Selected IME language may be different, and it must // be present, too - if ( $.inArray( selectedImeLanguage, languagesForButtons ) === -1 ) { + if ( $.inArray( selectedImeLanguage, languagesForButtons ) === -1 + $.uls.data.languages[selectedImeLanguage] + ) { languagesForButtons.push( selectedImeLanguage ); firstLanguage = selectedImeLanguage; } -- To view, visit https://gerrit.wikimedia.org/r/61357 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic64763fdba34bdcebde33104f7e6130d93a84e02 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Nikerabbit niklas.laxst...@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] Rename confusingly named function - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/61361 Change subject: Rename confusingly named function .. Rename confusingly named function Change-Id: I685a1658ec911e28cba4c9d3d7cbaaf4f1cca22e --- M resources/js/ext.uls.inputsettings.js 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/61/61361/1 diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index d95e288..74e4e2a 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -71,7 +71,7 @@ this.name = $.i18n( 'ext-uls-input-settings-title-short' ); this.description = $.i18n( 'ext-uls-input-settings-desc' ); this.$template = $( template ); - this.imeLanguage = this.getImeLanguage(); + this.imeLanguage = this.getInterfaceLanguage(); this.contentLanguage = this.getContentLanguage(); this.$imes = null; this.$parent = $parent; @@ -376,8 +376,7 @@ * Get the current user interface language. * @returns String Current UI language */ - // XXX: Probably bad name - getImeLanguage: function () { + getInterfaceLanguage: function () { return mw.config.get( 'wgUserLanguage' ); }, -- To view, visit https://gerrit.wikimedia.org/r/61361 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I685a1658ec911e28cba4c9d3d7cbaaf4f1cca22e 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] Join some appends to one call - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/61362 Change subject: Join some appends to one call .. Join some appends to one call Change-Id: Iccf4c7653aff775a6ea0ddc211135dab8b1d99d1 --- M resources/js/ext.uls.inputsettings.js 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/62/61362/1 diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index 74e4e2a..52d99fe 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -188,9 +188,10 @@ } } - $imeLabel - .append( $( 'strong' ).text( name ) ) - .append( $( 'span' ).text( description ) ); + $imeLabel.append( + $( 'strong' ).text( name ), + $( 'span' ).text( description ) + ); return $imeLabel; }, @@ -284,7 +285,7 @@ $button.data( 'language', language ); $caret = $( 'span' ).addClass( 'uls-input-settings-caret' ); - $languages.append( $button ).append( $caret ); + $languages.append( $button, $caret ); $button.on( 'click', buttonHandler( $button ) ); } -- To view, visit https://gerrit.wikimedia.org/r/61362 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iccf4c7653aff775a6ea0ddc211135dab8b1d99d1 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] Reduce rerenderings in input settings - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/61363 Change subject: Reduce rerenderings in input settings .. Reduce rerenderings in input settings Change-Id: Ia9292cd6be18e37d9b73b4eea199bd0ad4b8 --- M resources/js/ext.uls.inputsettings.js 1 file changed, 18 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/63/61363/1 diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index 52d99fe..94f26e4 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -28,19 +28,19 @@ + '/div' // Language for ime, title above the buttons row - + 'div class=row uls-input-settings-languages-title' + + 'div class=row enabled-only uls-input-settings-languages-title' + 'div class=eleven columns' + 'h4 data-i18n=ext-uls-input-settings-ui-language/h4' + '/div' + '/div' // UI languages buttons row - + 'div class=row' + + 'div class=row enabled-only' + 'div class=uls-ui-languages eleven columns/div' + '/div' // Web IMEs enabling chechbox with label - + 'div class=row' + + 'div class=row enabled-only' + 'div class=eleven columns uls-input-settings-inputmethods-list' // Input settings for language xyz title + 'h4 class=ext-uls-input-settings-imes-title/h4' @@ -89,17 +89,13 @@ this.$imes = $( 'body' ).data( 'ime' ); this.$parent.$settingsPanel.append( this.$template ); if ( $.ime.preferences.isEnabled() ) { - this.prepareLanguages(); - this.prepareInputmethods( $.ime.preferences.getLanguage() ); + this.$template.find( '.enabled-only' ).removeClass( 'hide' ); } else { - - // Hide the language list - this.$template.find( 'div.uls-input-settings-languages-title' ).hide(); - this.$template.find( 'div.uls-ui-languages' ).hide(); - - // Hide input methods - this.$template.find( 'div.uls-input-settings-inputmethods-list' ).hide(); + // Hide the language list and ime selector + this.$template.find( '.enabled-only' ).addClass( 'hide' ); } + this.prepareLanguages(); + this.prepareInputmethods( $.ime.preferences.getLanguage() ); this.prepareToggleButton(); this.$template.i18n(); this.listen(); @@ -122,9 +118,7 @@ this.imeLanguage = language; $imeListTitle = this.$template.find( '.ext-uls-input-settings-imes-title' ); - $imeListContainer = this.$template.find( '.uls-input-settings-inputmethods-list' ); - $imeListContainer.show(); $imeListContainer.find( 'label' ).remove(); @@ -207,9 +201,7 @@ languagesForButtons, $languages, suggestedLanguages, lang, i, language, $button, $caret; - $languages = this.$template.find( 'div.uls-ui-languages' ); - this.$template.find( 'div.uls-ui-languages' ).show(); - this.$template.find( 'div.uls-input-settings-languages-title' ).show(); + $languages = this.$template.find( '.uls-ui-languages' ); suggestedLanguages = this.frequentLanguageList() // Common world languages, for the case that there are @@ -261,7 +253,7 @@ inputSettings.enableApplyButton(); $.ime.preferences.setLanguage( selectedLanguage ); - $( 'div.uls-ui-languages button.button' ).removeClass( 'down' ); + $( '.uls-ui-languages .button' ).removeClass( 'down' ); button.addClass( 'down' ); inputSettings.prepareInputmethods( selectedLanguage ); }; @@ -300,7 +292,7 @@ var inputSettings = this, $languages, $moreLanguagesButton; - $languages = this.$template.find(
[MediaWiki-commits] [Gerrit] Timestamp params (no longer Message-escaped()) still need t... - change (mediawiki...ArticleFeedbackv5)
jenkins-bot has submitted this change and it was merged. Change subject: Timestamp params (no longer Message-escaped()) still need to be escaped .. Timestamp params (no longer Message-escaped()) still need to be escaped Change-Id: I1af17c01395f5affaa3ef1ac4c31881a05d12232 --- M ArticleFeedbackv5.render.php M ArticleFeedbackv5.utils.php 2 files changed, 3 insertions(+), 4 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/ArticleFeedbackv5.render.php b/ArticleFeedbackv5.render.php index 9267f82..55e7a12 100644 --- a/ArticleFeedbackv5.render.php +++ b/ArticleFeedbackv5.render.php @@ -483,7 +483,7 @@ Html::rawElement( 'span', array( 'class' = 'articleFeedbackv5-comment-details' ), - Html::rawElement( + Html::element( 'span', array( 'class' = 'articleFeedbackv5-comment-details-date' ), $timestamp-getHumanTimestamp() @@ -1237,7 +1237,7 @@ array( 'class' = 'articleFeedbackv5-feedback-permalink-status articleFeedbackv5-laststatus-' . $last-log_action ), wfMessage( 'articlefeedbackv5-permalink-status-' . $last-log_action ) -rawParams( ArticleFeedbackv5Utils::getUserLink( $last-log_user, $last-log_user_text ) ) - -rawParams( $timestamp-getHumanTimestamp() ) + -params( $timestamp-getHumanTimestamp() ) -parse() ) ) . diff --git a/ArticleFeedbackv5.utils.php b/ArticleFeedbackv5.utils.php index d41e471..2cb53ad 100644 --- a/ArticleFeedbackv5.utils.php +++ b/ArticleFeedbackv5.utils.php @@ -256,8 +256,7 @@ // articlefeedbackv5-mask-text-oversight, articlefeedbackv5-mask-text-hide, // articlefeedbackv5-mask-text-inappropriate return wfMessage( 'articlefeedbackv5-mask-text-' . $type ) - -params( static::formatId( $feedbackId ), $username ) - -rawParams( $timestamp-getHumanTimestamp() ) + -params( static::formatId( $feedbackId ), $username, $timestamp-getHumanTimestamp() ) -escaped(); } -- To view, visit https://gerrit.wikimedia.org/r/61356 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1af17c01395f5affaa3ef1ac4c31881a05d12232 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5 Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: Nikerabbit niklas.laxst...@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] Fixed a comment - change (mediawiki...VisualEditor)
Matmarex has uploaded a new change for review. https://gerrit.wikimedia.org/r/61364 Change subject: Fixed a comment .. Fixed a comment Change-Id: I97917f70d42820105f6cdbaa3a1724cee3d6731b --- M modules/ve/ui/inspectors/ve.ui.LinkInspector.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/64/61364/1 diff --git a/modules/ve/ui/inspectors/ve.ui.LinkInspector.js b/modules/ve/ui/inspectors/ve.ui.LinkInspector.js index ff08744..dfbcc6c 100644 --- a/modules/ve/ui/inspectors/ve.ui.LinkInspector.js +++ b/modules/ve/ui/inspectors/ve.ui.LinkInspector.js @@ -127,7 +127,7 @@ }; /** - * Handle the inspector being opened. + * Handle the inspector being closed. * * @method * @param {string} action Action that caused the window to be closed -- To view, visit https://gerrit.wikimedia.org/r/61364 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97917f70d42820105f6cdbaa3a1724cee3d6731b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Matmarex matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Address error caused by changing focus from context ... - change (mediawiki...VisualEditor)
Matmarex has uploaded a new change for review. https://gerrit.wikimedia.org/r/61365 Change subject: Revert Address error caused by changing focus from context menu to window. .. Revert Address error caused by changing focus from context menu to window. Just a proof-of-concept that this would work on Opera. I'm figuring out what was this for initially... This reverts commit 30dadb6c8c1b684fecfc066b003c92e78ae66124. Bug: 47794 Change-Id: Ie4f1334e0beb7ba7d4f4aa3b42464fa219c4778c --- M modules/ve/ui/ve.ui.Context.js 1 file changed, 1 insertion(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/65/61365/1 diff --git a/modules/ve/ui/ve.ui.Context.js b/modules/ve/ui/ve.ui.Context.js index 8f0f631..2595a2e 100644 --- a/modules/ve/ui/ve.ui.Context.js +++ b/modules/ve/ui/ve.ui.Context.js @@ -52,8 +52,7 @@ 'close': 'onInspectorClose' } ); $( window ).on( { - 'resize': ve.bind( this.update, this ), - 'focus': ve.bind( this.onWindowFocus, this ) + 'resize': ve.bind( this.update, this ) } ); }; @@ -117,15 +116,6 @@ ve.ui.Context.prototype.onRelocationEnd = function () { this.relocating = false; this.update(); -}; - -/** - * Handle window focus events on the view. - * - * @method - */ -ve.ui.Context.prototype.onWindowFocus = function () { - this.hide(); }; /** -- To view, visit https://gerrit.wikimedia.org/r/61365 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4f1334e0beb7ba7d4f4aa3b42464fa219c4778c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Matmarex matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean-up to global overrides in NewParserTest - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Clean-up to global overrides in NewParserTest .. Clean-up to global overrides in NewParserTest - Move definitions of constant values from NewParserTest::setupGlobals() to NewParserTest::setUp() so that the former only defines values depending on the test - Remove duplicate definitions - Use setMwGlobals() to override the globals in NewParserTest::setUp() - Change the overriding of $wgNamespaceProtection to use the normal procedure instead of the weirdglobal thing - Only define $wgUser, $wgOut and $wgRequest in NewParserTest::setupGlobals() Change-Id: I1362932db2230455b23e469759ff3f9946da0392 --- M tests/phpunit/includes/parser/NewParserTest.php 1 file changed, 50 insertions(+), 76 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 934f181..994bc1c 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -19,7 +19,6 @@ public $runParsoid = false; public $regex = ''; public $showProgress = true; - public $savedInitialGlobals = array(); public $savedWeirdGlobals = array(); public $savedGlobals = array(); public $hooks = array(); @@ -33,7 +32,7 @@ protected $file = false; protected function setUp() { - global $wgNamespaceProtection, $wgNamespaceAliases; + global $wgNamespaceAliases; global $wgHooks, $IP; parent::setUp(); @@ -52,11 +51,17 @@ $tmpGlobals['wgLanguageCode'] = 'en'; $tmpGlobals['wgContLang'] = Language::factory( 'en' ); + $tmpGlobals['wgSitename'] = 'MediaWiki'; + $tmpGlobals['wgServer'] = 'http://example.org'; $tmpGlobals['wgScript'] = '/index.php'; $tmpGlobals['wgScriptPath'] = '/'; $tmpGlobals['wgArticlePath'] = '/wiki/$1'; + $tmpGlobals['wgActionPaths'] = array(); + $tmpGlobals['wgVariantArticlePath'] = false; + $tmpGlobals['wgExtensionAssetsPath'] = '/extensions'; $tmpGlobals['wgStyleSheetPath'] = '/skins'; $tmpGlobals['wgStylePath'] = '/skins'; + $tmpGlobals['wgEnableUploads'] = true; $tmpGlobals['wgThumbnailScriptPath'] = false; $tmpGlobals['wgLocalFileRepo'] = array( 'class' = 'LocalRepo', @@ -67,50 +72,62 @@ 'backend' = 'local-backend' ); $tmpGlobals['wgForeignFileRepos'] = array(); + $tmpGlobals['wgDefaultExternalStore'] = array(); $tmpGlobals['wgEnableParserCache'] = false; - $tmpGlobals['wgHooks'] = $wgHooks; + $tmpGlobals['wgCapitalLinks'] = true; + $tmpGlobals['wgNoFollowLinks'] = true; + $tmpGlobals['wgNoFollowDomainExceptions'] = array(); + $tmpGlobals['wgExternalLinkTarget'] = false; + $tmpGlobals['wgThumbnailScriptPath'] = false; + $tmpGlobals['wgUseImageResize'] = true; + $tmpGlobals['wgAllowExternalImages'] = true; + $tmpGlobals['wgRawHtml'] = false; + $tmpGlobals['wgUseTidy'] = false; + $tmpGlobals['wgAlwaysUseTidy'] = false; + $tmpGlobals['wgHtml5'] = true; + $tmpGlobals['wgWellFormedXml'] = true; + $tmpGlobals['wgAllowMicrodataAttributes'] = true; + $tmpGlobals['wgExperimentalHtmlIds'] = false; + $tmpGlobals['wgAdaptiveMessageCache'] = true; + $tmpGlobals['wgUseDatabaseMessages'] = true; + $tmpGlobals['wgLocaltimezone'] = 'UTC'; $tmpGlobals['wgDeferredUpdateList'] = array(); - $tmpGlobals['wgMemc'] = wfGetMainCache(); + $tmpGlobals['wgGroupPermissions'] = array( + '*' = array( + 'createaccount' = true, + 'read' = true, + 'edit' = true, + 'createpage' = true, + 'createtalk' = true, + ) ); + $tmpGlobals['wgNamespaceProtection'] = array( NS_MEDIAWIKI = 'editinterface' ); + $tmpGlobals['wgMemc'] = new EmptyBagOStuff; $tmpGlobals['messageMemc'] = wfGetMessageCacheStorage(); $tmpGlobals['parserMemc'] = wfGetParserCacheStorage(); - // $tmpGlobals['wgContLang'] = new StubContLang; - $tmpGlobals['wgUser'] = new User; - $context = new RequestContext(); -
[MediaWiki-commits] [Gerrit] trigger pep8/pyflakes only when .py files are changed - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/61366 Change subject: trigger pep8/pyflakes only when .py files are changed .. trigger pep8/pyflakes only when .py files are changed Change-Id: I1b163315c9b1422e20a9cbadd9344def2637289a --- M layout.yaml 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/66/61366/1 diff --git a/layout.yaml b/layout.yaml index 8ce77a4..fbf74dd 100644 --- a/layout.yaml +++ b/layout.yaml @@ -253,10 +253,14 @@ - name: ^.*-pep8$ # Non-voting (most of our script fail the tests miserably) voting: false +files: + - '^.*\.py$' - name: ^.*-pyflakes$ # do not vote by default voting: false +files: + - '^.*\.py$' # PHP CodeSniffer (experimental) - name: ^.*-phpcs$ -- To view, visit https://gerrit.wikimedia.org/r/61366 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b163315c9b1422e20a9cbadd9344def2637289a Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-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] trigger PHP related job only when PHP files are changed - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/61367 Change subject: trigger PHP related job only when PHP files are changed .. trigger PHP related job only when PHP files are changed Change-Id: I054abdfaf3fbc767f1cdc90646bb934477df3e94 --- M layout.yaml 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/67/61367/1 diff --git a/layout.yaml b/layout.yaml index fbf74dd..8d4fea1 100644 --- a/layout.yaml +++ b/layout.yaml @@ -265,8 +265,18 @@ # PHP CodeSniffer (experimental) - name: ^.*-phpcs$ voting: false +files: + - '^.*\.(php5?|inc)$' - name: ^.*-phpcs-HEAD$ voting: false +files: + - '^.*\.(php5?|inc)$' + - name: ^.*-phplint$ +files: + - '^.*\.(php5?|inc)$' + - name: ^mediawiki-core-lint$ +files: + - '^.*\.(php5?|inc)$' # Rejecting changes having trailing whitespaces cause too many false # positives. So only report the whitespace issues, but don't let it vote. -- To view, visit https://gerrit.wikimedia.org/r/61367 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I054abdfaf3fbc767f1cdc90646bb934477df3e94 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-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] Fixes to bugSplit.js script - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/61368 Change subject: Fixes to bugSplit.js script .. Fixes to bugSplit.js script * Make it directly executable * Create a directory for the bug report files based on bug data and move the bug report and all files into that directory so that each bug is self-contained making it possible to process multiple bug report files without worrying about stepping on each other. Change-Id: Ic37bec04707271168b68216217d60f4e8514e450 --- M js/tests/bugSplit.js 1 file changed, 26 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/68/61368/1 diff --git a/js/tests/bugSplit.js b/js/tests/bugSplit.js old mode 100644 new mode 100755 index 238bb40..d23f9d6 --- a/js/tests/bugSplit.js +++ b/js/tests/bugSplit.js @@ -1,3 +1,5 @@ +#!/usr/bin/env node + /** * Split up a bug report JSON file into a bunch of files */ @@ -5,23 +7,34 @@ var fs = require('fs'), Util = require( '../lib/mediawiki.Util.js' ).Util; -function writeFiles ( data ) { +function writeFiles ( bugfile, data ) { var keys = Object.keys(data), - val; - for ( var i = 0; i keys.length; i++ ) { - var key = keys[i], - fileName = encodeURIComponent(key); - console.log( 'Creating file ' + fileName ); + val, dirName; - val = data[key]; + // SSS: the 'wiki' field adds the 'wiki' string at the end + // which is unnecessary + dirName = ./ + (data.wiki || 'none').replace(/wiki$/, '') + . + + (data.title || 'no-title') + . + + (data.timestamp || ('now-' + JSON.stringify(new Date(; - if (fileName === 'editedHtml') { - // apply smart quoting to minimize diff - val = Util.compressHTML(val); + fs.mkdir(dirName, 0755, function() { + for ( var i = 0; i keys.length; i++ ) { + var key = keys[i], + fileName = encodeURIComponent(key); + console.log( 'Creating file ' + fileName ); + + val = data[key]; + + if (fileName === 'editedHtml') { + // apply smart quoting to minimize diff + val = Util.compressHTML(val); + } + + fs.writeFileSync(dirName + / + fileName, val); } - fs.writeFileSync(fileName, val); - } + fs.renameSync( bugfile, dirName + / + bugfile.replace(/^.*\//, '')); + }); } function main () { @@ -41,7 +54,7 @@ console.error(e); process.exit(1); } - writeFiles( data ); + writeFiles( filename, data ); } -- To view, visit https://gerrit.wikimedia.org/r/61368 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic37bec04707271168b68216217d60f4e8514e450 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix tipsy behaviour - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/61369 Change subject: Fix tipsy behaviour .. Fix tipsy behaviour * Make it visible in interlanguage position * Do not get stuck in no-tooltip state if previous lang is invalid Change-Id: Iaf5727a8a729579c2a0c79d0e0dc49d58bbf66ea --- M resources/js/ext.uls.interface.js 1 file changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/69/61369/1 diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index dd7b39f..6b071db 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -171,21 +171,18 @@ uls = $ulsTrigger.data( 'uls' ); - if ( !previousLang ) { - previousLanguages.push( currentLang ); - mw.uls.setPreviousLanguages( previousLanguages ); - - // Do not show tooltip. - return true; - } - - if ( previousLang === currentLang || !$.uls.data.languages[previousLang] ) { - // Do not show tooltip. + if ( previousLang === currentLang ) { + // Do not show tooltip nor update language list return true; } previousLanguages.push( currentLang ); mw.uls.setPreviousLanguages( previousLanguages ); + + if ( !previousLang || !$.uls.data.languages[previousLang] ) { + // Do not show tooltip + return true; + } // Attach a tipsy tooltip to the trigger $ulsTrigger.tipsy( { @@ -238,8 +235,11 @@ $ulsTrigger.tipsy( 'hide' ); } - // Show the tipsy tooltip on page load. - showTipsy( 6000 ); + // The interlanguage position needs some time to settle down + window.setTimeout( function() { + // Show the tipsy tooltip on page load. + showTipsy( 6000 ); + }, 500 ); // manually show the tooltip $ulsTrigger.on( 'mouseover', function () { -- To view, visit https://gerrit.wikimedia.org/r/61369 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf5727a8a729579c2a0c79d0e0dc49d58bbf66ea 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] (bug 45535) Hook for changing language links. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 45535) Hook for changing language links. .. (bug 45535) Hook for changing language links. This adds a new hook called LanguageLinks which is called whenever a list of language links is returned to the user. This gives extensions the option to manipulate the links on the fly. Note that this change only covers the language links used in OutputPage and by ApiParse. Adapting ApiQueryLangLinks is left as a follow-up task. As explained on bugzilla, this is a precondition to allowing Wikibase/Wikidata to update languagelinks without forcing a (redundant) re-parse of the page content. This change also introduces the notion of link flags that can be used to associate flags with language links. This will be integrated with ParserOutput and OutputPage in a follow-up. Change-Id: Iaec0faa131413a291fc8f77496e4f371addb3b99 --- M RELEASE-NOTES-1.22 M docs/hooks.txt M includes/OutputPage.php M includes/api/ApiParse.php M includes/api/ApiQueryAllPages.php M includes/api/ApiQueryLangBacklinks.php M includes/api/ApiQueryLangLinks.php 7 files changed, 54 insertions(+), 4 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index a9160e5..ce4c949 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -52,6 +52,8 @@ still be visible on cached page renders until they are purged); extensions using the DoEditSectionLink or EditSectionLink hooks might need adjustments as well. +* (bug 45535) introduced the new 'LanguageLinks' hook for manipulating the + language links associated with a page before display. === Bug fixes in 1.22 === * Disable Special:PasswordReset when $wgEnableEmail. Previously one could still @@ -84,6 +86,13 @@ * action=opensearch no longer silently ignores the format parameter. * action=opensearch now supports format=jsonfm. * list=usercontribsucprop=ids will now include the parent revision id. +* BREAKING CHANGE: action=parse no longer returns all langlinks for the page + with prop=langlinks by default. The new effectivelanglinks parameter will + request that the LanguageLinks hook be called to determine the effective + language links. +* BREAKING CHANGE: list=allpages, list=langbacklinks, and prop=langlinks do not + apply the new LanguageLinks hook, and thus only consider language links + stored in the database. === Languages updated in 1.22=== diff --git a/docs/hooks.txt b/docs/hooks.txt index 2d64bce..de51024 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1384,6 +1384,16 @@ $names: array of language code = language name $code language of the preferred translations +'LanguageLinks': Manipulate a page's language links. This is called +in various places to allow extensions to define the effective language +links for a page. +$title: The page's Title. +$links: Associative array mapping language codes to prefixed links of the + form language:title. +$linkFlags: Associative array mapping prefixed links to arrays of flags. + Currently unused, but planned to provide support for marking individual + language links in the UI, e.g. for featured articles. + 'LinkBegin': Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 08eb3ae..65800dd 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1609,6 +1609,10 @@ } } + // Link flags are ignored for now, but may in the future be + // used to mark individual language links. + $linkFlags = array(); + wfRunHooks( 'LanguageLinks', array( $this-getTitle(), $this-mLanguageLinks, $linkFlags ) ); wfRunHooks( 'OutputPageParserOutput', array( $this, $parserOutput ) ); } diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 09b7a88..defdade 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -233,11 +233,25 @@ $result-setContent( $result_array['parsedsummary'], Linker::formatComment( $params['summary'], $titleObj ) ); } + if ( isset( $prop['langlinks'] ) || isset( $prop['languageshtml'] ) ) { + $langlinks = $p_result-getLanguageLinks(); + + if ( $params['effectivelanglinks'] ) { + // Link flags are ignored for now, but may in the future be + // included in the result. + $linkFlags = array(); + wfRunHooks( 'LanguageLinks', array( $titleObj, $langlinks, $linkFlags ) ); +
[MediaWiki-commits] [Gerrit] ve.ce.Surface.getSelectionRect() might return null - change (mediawiki...VisualEditor)
Matmarex has uploaded a new change for review. https://gerrit.wikimedia.org/r/61370 Change subject: ve.ce.Surface.getSelectionRect() might return null .. ve.ce.Surface.getSelectionRect() might return null Protect against this. Also fix misnesting of updateDimensions() function's body. Change-Id: I5040d46d51bd59bf4d2fd7d4d8853c8675420ad0 --- M modules/ve/ui/ve.ui.Context.js 1 file changed, 14 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/70/61370/1 diff --git a/modules/ve/ui/ve.ui.Context.js b/modules/ve/ui/ve.ui.Context.js index 8f0f631..06b31d3 100644 --- a/modules/ve/ui/ve.ui.Context.js +++ b/modules/ve/ui/ve.ui.Context.js @@ -254,19 +254,20 @@ var position, $container, inspector = this.inspectors.getCurrent(); - // Get cursor position - position = ve.ce.Surface.getSelectionRect().end; - if ( position ) { - $container = inspector ? this.inspectors.$ : this.$menu; - this.$.css( { 'left': position.x, 'top': position.y } ); - this.popup.display( - position.x, - position.y, - $container.outerWidth( true ), - $container.outerHeight( true ), - transition - ); - } + // Get cursor position + position = ve.ce.Surface.getSelectionRect(); + position = position position.end; + if ( position ) { + $container = inspector ? this.inspectors.$ : this.$menu; + this.$.css( { 'left': position.x, 'top': position.y } ); + this.popup.display( + position.x, + position.y, + $container.outerWidth( true ), + $container.outerHeight( true ), + transition + ); + } return this; }; -- To view, visit https://gerrit.wikimedia.org/r/61370 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5040d46d51bd59bf4d2fd7d4d8853c8675420ad0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Matmarex matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set X-Forwarded-(Port|Proto) so Gitblit knows its on SSL - change (operations/puppet)
Faidon has submitted this change and it was merged. Change subject: Set X-Forwarded-(Port|Proto) so Gitblit knows its on SSL .. Set X-Forwarded-(Port|Proto) so Gitblit knows its on SSL Change-Id: Ic7141217bdce6ceaa6a5fcfbec6f321bcd1259f8 --- M manifests/misc/gitblit.pp M templates/apache/sites/git.wikimedia.org.erb 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: Faidon: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/gitblit.pp b/manifests/misc/gitblit.pp index 0e5d160..2db1974 100644 --- a/manifests/misc/gitblit.pp +++ b/manifests/misc/gitblit.pp @@ -29,6 +29,7 @@ } apache_site { git: name = git.wikimedia.org } + apache_module { headers: name = headers } apache_module { rewrite: name = rewrite } apache_module { proxy: name = proxy } apache_module { proxy_http: name = proxy_http } diff --git a/templates/apache/sites/git.wikimedia.org.erb b/templates/apache/sites/git.wikimedia.org.erb index a9008fc..a3f22fe 100644 --- a/templates/apache/sites/git.wikimedia.org.erb +++ b/templates/apache/sites/git.wikimedia.org.erb @@ -48,6 +48,9 @@ SSLCertificateKeyFile /etc/ssl/private/%= ssl_cert_key %.key SSLCACertificatePath /etc/ssl/certs/ + RequestHeader set X-Forwarded-Proto https + RequestHeader set X-Forwarded-Port 443 + SetEnvIf User-Agent 80legs bad_browser SetEnvIf User-Agent bingbot bad_browser -- To view, visit https://gerrit.wikimedia.org/r/61050 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic7141217bdce6ceaa6a5fcfbec6f321bcd1259f8 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Demon ch...@wikimedia.org Gerrit-Reviewer: Faidon fai...@wikimedia.org Gerrit-Reviewer: Jeremyb jer...@tuxmachine.com Gerrit-Reviewer: Ryan Lane rl...@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] Factorise call to getSuggestedDurations() in SpecialBlock::g... - change (mediawiki/core)
IAlex has uploaded a new change for review. https://gerrit.wikimedia.org/r/61371 Change subject: Factorise call to getSuggestedDurations() in SpecialBlock::getFormFields() .. Factorise call to getSuggestedDurations() in SpecialBlock::getFormFields() So that it is not needed to parse the message two times per request. Change-Id: I07f48dc35f4904d043844c2a3370bc27cdd5fb45 --- M includes/specials/SpecialBlock.php 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/71/61371/1 diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 645de23..5a2ad62 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -127,6 +127,8 @@ $user = $this-getUser(); + $suggestedDurations = self::getSuggestedDurations(); + $a = array( 'Target' = array( 'type' = 'text', @@ -139,11 +141,11 @@ 'validation-callback' = array( __CLASS__, 'validateTargetField' ), ), 'Expiry' = array( - 'type' = !count( self::getSuggestedDurations() ) ? 'text' : 'selectorother', + 'type' = !count( $suggestedDurations ) ? 'text' : 'selectorother', 'label-message' = 'ipbexpiry', 'required' = true, 'tabindex' = '2', - 'options' = self::getSuggestedDurations(), + 'options' = $suggestedDurations, 'other' = $this-msg( 'ipbother' )-text(), 'default' = $this-msg( 'ipb-default-expiry' )-inContentLanguage()-text(), ), -- To view, visit https://gerrit.wikimedia.org/r/61371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07f48dc35f4904d043844c2a3370bc27cdd5fb45 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: IAlex coderev...@emsenhuber.ch ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix tipsy behaviour - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Fix tipsy behaviour .. Fix tipsy behaviour * Make it visible in interlanguage position * Do not get stuck in no-tooltip state if previous lang is invalid Change-Id: Iaf5727a8a729579c2a0c79d0e0dc49d58bbf66ea --- M resources/js/ext.uls.interface.js 1 file changed, 12 insertions(+), 12 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index dd7b39f..6b071db 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -171,21 +171,18 @@ uls = $ulsTrigger.data( 'uls' ); - if ( !previousLang ) { - previousLanguages.push( currentLang ); - mw.uls.setPreviousLanguages( previousLanguages ); - - // Do not show tooltip. - return true; - } - - if ( previousLang === currentLang || !$.uls.data.languages[previousLang] ) { - // Do not show tooltip. + if ( previousLang === currentLang ) { + // Do not show tooltip nor update language list return true; } previousLanguages.push( currentLang ); mw.uls.setPreviousLanguages( previousLanguages ); + + if ( !previousLang || !$.uls.data.languages[previousLang] ) { + // Do not show tooltip + return true; + } // Attach a tipsy tooltip to the trigger $ulsTrigger.tipsy( { @@ -238,8 +235,11 @@ $ulsTrigger.tipsy( 'hide' ); } - // Show the tipsy tooltip on page load. - showTipsy( 6000 ); + // The interlanguage position needs some time to settle down + window.setTimeout( function() { + // Show the tipsy tooltip on page load. + showTipsy( 6000 ); + }, 500 ); // manually show the tooltip $ulsTrigger.on( 'mouseover', function () { -- To view, visit https://gerrit.wikimedia.org/r/61369 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaf5727a8a729579c2a0c79d0e0dc49d58bbf66ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Feature: PDF, Scenario: Click on Download as PDF link - change (qa/browsertests)
Zfilipin has submitted this change and it was merged. Change subject: Feature: PDF, Scenario: Click on Download as PDF link .. Feature: PDF, Scenario: Click on Download as PDF link Bug: 46224 Change-Id: I4b3a96fd7eefb85a1ba402b22c8b6ad922360550 --- M features/pdf.feature M features/step_definitions/pdf_steps.rb M features/support/env.rb M features/support/pages/random_page.rb 4 files changed, 24 insertions(+), 2 deletions(-) Approvals: Zfilipin: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/features/pdf.feature b/features/pdf.feature index 1886b92..3422c2f 100644 --- a/features/pdf.feature +++ b/features/pdf.feature @@ -1,5 +1,10 @@ Feature: PDF - Scenario: Check for Download as PDF ink + Scenario: Check for Download as PDF link Given I am at random page Then Download as PDF should be present + + Scenario: Click on Download as PDF link +Given I am at random page +When I click on Download as PDF +Then Download the file link should be present diff --git a/features/step_definitions/pdf_steps.rb b/features/step_definitions/pdf_steps.rb index 4e05f1d..321f26c 100644 --- a/features/step_definitions/pdf_steps.rb +++ b/features/step_definitions/pdf_steps.rb @@ -1,3 +1,18 @@ Then(/^Download as PDF should be present$/) do on(RandomPage).download_as_pdf_element.should exist end + +When(/^I click on Download as PDF$/) do + on(RandomPage) do |page| +page.print_or_export_element.when_present.click +page.download_as_pdf_element.when_present.click + end +end + +Then(/^Download the file link should be present$/) do + on(RandomPage) do |page| +page.download_the_file_element.when_present(15) +page.download_the_file_element.should exist + end +end + diff --git a/features/support/env.rb b/features/support/env.rb index b053b93..76154a1 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -128,5 +128,5 @@ sauce_api(%Q{{passed: #{scenario.passed?}}}, saucelabs_username, saucelabs_key) sauce_api(%Q{{public: true}}, saucelabs_username, saucelabs_key) end - @browser.close + #@browser.close end diff --git a/features/support/pages/random_page.rb b/features/support/pages/random_page.rb index ea3640e..1291237 100644 --- a/features/support/pages/random_page.rb +++ b/features/support/pages/random_page.rb @@ -13,6 +13,8 @@ li(:main_page, id: 'n-mainpage-description') a(:download_as_pdf, text: 'Download as PDF') + a(:download_the_file, text: 'Download the file') + a(:print_or_export, text: 'Print/export') a(:uls_trigger, class: 'uls-trigger') div(:search, id: 'search') text_field(:search_input, id: 'searchInput') -- To view, visit https://gerrit.wikimedia.org/r/61257 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4b3a96fd7eefb85a1ba402b22c8b6ad922360550 Gerrit-PatchSet: 3 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Karim.rayani karim.ray...@gmail.com Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Karim.rayani karim.ray...@gmail.com 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] Make Database component tests work without a MW setup and wi... - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Make Database component tests work without a MW setup and without MySQL .. Make Database component tests work without a MW setup and without MySQL Change-Id: I43ad38c86970dde6c87da1be88c666f0e3649865 --- M Database/Database/MWDB/ExtendedAbstraction.php M Database/tests/phpunit/MWDB/ExtendedMySQLAbstractionTest.php M Database/tests/phpunit/MediaWikiQueryInterfaceTest.php 3 files changed, 226 insertions(+), 174 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/Database/Database/MWDB/ExtendedAbstraction.php b/Database/Database/MWDB/ExtendedAbstraction.php index 8f60b5d..f59865a 100644 --- a/Database/Database/MWDB/ExtendedAbstraction.php +++ b/Database/Database/MWDB/ExtendedAbstraction.php @@ -70,7 +70,7 @@ $db = $this-connectionProvider-getConnection(); if ( $db-getType() !== $this-getType() ) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException( 'The DatabaseBase class type does not match the type of this ExtendedAbstraction' ); } return $db; diff --git a/Database/tests/phpunit/MWDB/ExtendedMySQLAbstractionTest.php b/Database/tests/phpunit/MWDB/ExtendedMySQLAbstractionTest.php index 97138bc..a305596 100644 --- a/Database/tests/phpunit/MWDB/ExtendedMySQLAbstractionTest.php +++ b/Database/tests/phpunit/MWDB/ExtendedMySQLAbstractionTest.php @@ -38,6 +38,14 @@ */ class ExtendedMySQLAbstractionTest extends ExtendedAbstractionTest { + protected function setUp() { + if ( wfGetDB( DB_SLAVE )-getType() !== 'mysql' ) { + $this-markTestSkipped( 'Can only run the ExtendedMySQLAbstractionTest when MediaWiki is using MySQL' ); + } + + parent::setUp(); + } + /** * @see ExtendedAbstractionTest::newInstance * diff --git a/Database/tests/phpunit/MediaWikiQueryInterfaceTest.php b/Database/tests/phpunit/MediaWikiQueryInterfaceTest.php index a3c70c9..dfb22e4 100644 --- a/Database/tests/phpunit/MediaWikiQueryInterfaceTest.php +++ b/Database/tests/phpunit/MediaWikiQueryInterfaceTest.php @@ -2,10 +2,12 @@ namespace Wikibase\Test\Database; +use DatabaseBase; use Wikibase\Database\MediaWikiQueryInterface; use Wikibase\Database\QueryInterface; use Wikibase\Database\TableDefinition; use Wikibase\Database\FieldDefinition; +use Wikibase\Repo\DBConnectionProvider; /** * Unit tests for the Wikibase\Database\MediaWikiQueryInterface class. @@ -33,62 +35,101 @@ * @group Wikibase * @group WikibaseRepo * @group WikibaseDatabase - * @group Database * * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com */ class MediaWikiQueryInterfaceTest extends \MediaWikiTestCase { - protected function tearDown() { - parent::tearDown(); - - $this-dropTablesIfStillThere(); - } - - protected function dropTablesIfStillThere() { - $queryInterface = $this-newInstance(); - - foreach ( array( 'differentfieldtypes', 'defaultfieldvalues', 'notnullfields', - 'testinsert', 'testupdate', 'testdelete', 'testgetinsertid' ) as $tableName ) { - if ( $queryInterface-tableExists( $tableName ) ) { - $queryInterface-dropTable( $tableName ); - } - } - } - /** * @return QueryInterface */ protected function newInstance() { - $conn = new \Wikibase\Repo\LazyDBConnectionProvider( DB_MASTER ); + $connection = $this-getMock( 'DatabaseMysql' ); + + $connectionProvider = new DirectConnectionProvider( $connection ); return new MediaWikiQueryInterface( - $conn, - new \Wikibase\Database\MWDB\ExtendedMySQLAbstraction( $conn ) + $connectionProvider, + $this-getMock( '\Wikibase\Database\MWDB\ExtendedMySQLAbstraction' ) ); } - public function tableExistsProvider() { + /** +* @dataProvider tableNameProvider +* +* @param string $tableName +*/ + public function testTableExists( $tableName ) { + $connection = $this-getMock( 'DatabaseMysql' ); + $extendedAbstraction = $this-getMockBuilder( '\Wikibase\Database\MWDB\ExtendedMySQLAbstraction' ) + -disableOriginalConstructor()-getMock(); + + $queryInterface = new MediaWikiQueryInterface( + new DirectConnectionProvider( $connection ), + $extendedAbstraction +
[MediaWiki-commits] [Gerrit] Update the target language direction when changing the language - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Update the target language direction when changing the language .. Update the target language direction when changing the language Change-Id: I66f30a255567bace9893b80e5b27f45ce6b64bee --- M resources/js/ext.translate.special.translate.js 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.special.translate.js b/resources/js/ext.translate.special.translate.js index 0c0075a..76ec11d 100644 --- a/resources/js/ext.translate.special.translate.js +++ b/resources/js/ext.translate.special.translate.js @@ -111,7 +111,10 @@ } $( '.ext-translate-language-selector .uls' ).text( $.uls.data.getAutonym( language ) ); - $( '.tux-messagelist' ).data( 'targetlangcode', language ); + $( '.tux-messagelist' ).data( { + targetlangcode: language, + targetlangdir: $.uls.data.getDir( language ) + } ); mw.translate.changeUrl( changes ); $( '.tux-statsbar' ).trigger( 'refresh', language ); -- To view, visit https://gerrit.wikimedia.org/r/61185 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66f30a255567bace9893b80e5b27f45ce6b64bee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@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] Remove commented out code - change (qa/browsertests)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/61372 Change subject: Remove commented out code .. Remove commented out code Introduced by mistake in https://gerrit.wikimedia.org/r/#/c/61257/3/features/support/env.rb Change-Id: Ie8a6412c25fb04f0087b930c9288183bbb90b259 --- M features/support/env.rb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/72/61372/1 diff --git a/features/support/env.rb b/features/support/env.rb index 76154a1..b053b93 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -128,5 +128,5 @@ sauce_api(%Q{{passed: #{scenario.passed?}}}, saucelabs_username, saucelabs_key) sauce_api(%Q{{public: true}}, saucelabs_username, saucelabs_key) end - #@browser.close + @browser.close end -- To view, visit https://gerrit.wikimedia.org/r/61372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8a6412c25fb04f0087b930c9288183bbb90b259 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove commented out code - change (qa/browsertests)
Zfilipin has submitted this change and it was merged. Change subject: Remove commented out code .. Remove commented out code Introduced by mistake in https://gerrit.wikimedia.org/r/#/c/61257/3/features/support/env.rb Change-Id: Ie8a6412c25fb04f0087b930c9288183bbb90b259 --- M features/support/env.rb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Zfilipin: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/features/support/env.rb b/features/support/env.rb index 76154a1..b053b93 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -128,5 +128,5 @@ sauce_api(%Q{{passed: #{scenario.passed?}}}, saucelabs_username, saucelabs_key) sauce_api(%Q{{public: true}}, saucelabs_username, saucelabs_key) end - #@browser.close + @browser.close end -- To view, visit https://gerrit.wikimedia.org/r/61372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8a6412c25fb04f0087b930c9288183bbb90b259 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Karim.rayani karim.ray...@gmail.com 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] Made SetupTest run without actually accessing a real database - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Made SetupTest run without actually accessing a real database .. Made SetupTest run without actually accessing a real database This enabled running the test when using a DB different then MySQL and when not having a full MW setup Change-Id: I07071d18e1dd6e47d4ad6886fe9715900773aafc --- M QueryEngine/tests/phpunit/SQLStore/SetupTest.php 1 file changed, 26 insertions(+), 38 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/QueryEngine/tests/phpunit/SQLStore/SetupTest.php b/QueryEngine/tests/phpunit/SQLStore/SetupTest.php index 6e02d9b..72ae564 100644 --- a/QueryEngine/tests/phpunit/SQLStore/SetupTest.php +++ b/QueryEngine/tests/phpunit/SQLStore/SetupTest.php @@ -2,14 +2,11 @@ namespace Wikibase\Tests\QueryEngine\SQLStore; -use Wikibase\Database\MWDB\ExtendedMySQLAbstraction; -use Wikibase\Database\MediaWikiQueryInterface; use Wikibase\Database\TableBuilder; use Wikibase\QueryEngine\SQLStore\DataValueHandlers; use Wikibase\QueryEngine\SQLStore\Schema; use Wikibase\QueryEngine\SQLStore\Setup; use Wikibase\QueryEngine\SQLStore\StoreConfig; -use Wikibase\Repo\LazyDBConnectionProvider; /** * Unit tests for the Wikibase\QueryEngine\SQLStore\Setup class. @@ -40,30 +37,17 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com */ -class SetupTest extends \MediaWikiTestCase { +class SetupTest extends \PHPUnit_Framework_TestCase { - /** -* @return \Wikibase\Database\QueryInterface -*/ - protected function getQueryInterface() { - $connectionProvider = new LazyDBConnectionProvider( DB_MASTER ); - - $queryInterface = new MediaWikiQueryInterface( - $connectionProvider, - new ExtendedMySQLAbstraction( $connectionProvider ) - ); - - return $queryInterface; - } - - public function testExecutionOfRun() { + public function testInstall() { $defaultHandlers = new DataValueHandlers(); - $storeConfig = new StoreConfig( 'foo', 'wbsql_', $defaultHandlers-getHandlers() ); - $schema = new Schema( $storeConfig ); + $queryInterface = $this-getMock( 'Wikibase\Database\QueryInterface' ); - $queryInterface = $this-getQueryInterface(); + $queryInterface-expects( $this-atLeastOnce() ) + -method( 'createTable' ) + -will( $this-returnValue( true ) ); $storeSetup = new Setup( $storeConfig, @@ -72,23 +56,27 @@ new TableBuilder( $queryInterface ) ); - $this-assertTrue( $storeSetup-install() ); - - foreach ( $storeConfig-getDataValueHandlers() as $dvHandler ) { - foreach ( array( 'mainsnak_', 'qualifier_' ) as $snakLevel ) { - $table = $dvHandler-getDataValueTable()-getTableDefinition(); - $tableName = $storeConfig-getTablePrefix() . $snakLevel . $table-getName(); - - $this-assertTrue( - $queryInterface-tableExists( $tableName ), - 'Table ' . $tableName . ' should exist after store setup' - ); - } - } - - $this-assertTrue( $storeSetup-uninstall() ); + $storeSetup-install(); } - // TODO: add more detailed tests + public function testUninstall() { + $defaultHandlers = new DataValueHandlers(); + $storeConfig = new StoreConfig( 'foo', 'wbsql_', $defaultHandlers-getHandlers() ); + $schema = new Schema( $storeConfig ); + $queryInterface = $this-getMock( 'Wikibase\Database\QueryInterface' ); + + $queryInterface-expects( $this-atLeastOnce() ) + -method( 'dropTable' ) + -will( $this-returnValue( true ) ); + + $storeSetup = new Setup( + $storeConfig, + $schema, + $queryInterface, + new TableBuilder( $queryInterface ) + ); + + $storeSetup-uninstall(); + } } -- To view, visit https://gerrit.wikimedia.org/r/61041 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I07071d18e1dd6e47d4ad6886fe9715900773aafc Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Daniel Werner
[MediaWiki-commits] [Gerrit] Run uls_ime.feature on sandbox.translatewiki.net - change (qa/browsertests)
Cmcmahon has submitted this change and it was merged. Change subject: Run uls_ime.feature on sandbox.translatewiki.net .. Run uls_ime.feature on sandbox.translatewiki.net Do not run in IE6-8 because it fails there. Change-Id: Ie1ba4b2e394d8f5a111e327fc06494800496e579 --- M docs/jobs.md 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/docs/jobs.md b/docs/jobs.md index bd669f1..bb6674f 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -96,7 +96,7 @@ # browsertests-sandbox.translatewiki.net - MediaWiki URL: sandbox.translatewiki.net -- bundle exec: parallel_cucumber features/create_account.feature features/universal_language_selector.feature -n 2 --test-options '--profile ci' +- bundle exec: parallel_cucumber features/create_account.feature features/uls_ime.feature features/universal_language_selector.feature -n 3 --test-options '--profile ci' ## browsertests-sandbox.translatewiki.net-linux-chrome @@ -104,7 +104,7 @@ ## browsertests-sandbox.translatewiki.net-linux-firefox - Browser Label: firefox -- bundle exec: parallel_cucumber features/accept_language.feature features/create_account.feature features/universal_language_selector.feature -n 3 --test-options '--profile ci' +- bundle exec: parallel_cucumber features/accept_language.feature features/create_account.feature features/uls_ime.feature features/universal_language_selector.feature -n 4 --test-options '--profile ci' ## browsertests-sandbox.translatewiki.net-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- To view, visit https://gerrit.wikimedia.org/r/60130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1ba4b2e394d8f5a111e327fc06494800496e579 Gerrit-PatchSet: 2 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Arrbee run...@gmail.com Gerrit-Reviewer: Cmcmahon cmcma...@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] Moved unimplemented scenarios to backlog folder - change (qa/browsertests)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/61373 Change subject: Moved unimplemented scenarios to backlog folder .. Moved unimplemented scenarios to backlog folder Bug: 47731 Change-Id: I820d6e046dfeba2080422af284231a67c4613a34 --- A features/backlog/search.feature A features/backlog/uls_ime.feature M features/search.feature M features/uls_ime.feature 4 files changed, 66 insertions(+), 64 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/73/61373/1 diff --git a/features/backlog/search.feature b/features/backlog/search.feature new file mode 100644 index 000..465ef06 --- /dev/null +++ b/features/backlog/search.feature @@ -0,0 +1,15 @@ +Feature: Search + + Scenario: Search without accent yields optimal accent result as top choice but shows redlink for search term. THIS TEST EMULATES CURRENT FUNCTION. +Given that I am on the Portuguese Wikivoyage Main page pt.wikivoyage.org +When I search for Africa +Then I should be on the Search Results page + And the page entitled África should be the top result + And the results page should show Africa as a red link + + Scenario: Find tokens in the captions of uploaded files + Given I am on http://commons.wikimedia.beta.wmflabs.org/ +And http://commons.wikimedia.beta.wmflabs.org/wiki/File:Presentation.pdf exists +And http://commons.wikimedia.beta.wmflabs.org/wiki/File:Presentation.pdf has the caption This is a presentation about snails that User:GreenSpark gave on 6 December 2010 in Athens. + When I search for: snails + Then Presentation.pdf should be a result diff --git a/features/backlog/uls_ime.feature b/features/backlog/uls_ime.feature new file mode 100644 index 000..8bb37f7 --- /dev/null +++ b/features/backlog/uls_ime.feature @@ -0,0 +1,51 @@ +Feature: Universal Language Selector input method engine + + Scenario: ULS can see dropdown menu when they click on the IME icon +Given I am on a wiki page with input options with focus on an input box +When I click on the IME keyboard icon +Then I should see the dropdown menu with the a list of keymaps + + Scenario: Autonyms of keyboards should be visible to the user +Given I have clicked on the IME keyboard icon +When I get the drop down list of keyboards +Then I should see the autonyms of the keyboards + + Scenario: Language and Input Settings dialog should be displayed to the user +Given I have the dropdown menu of the keyboard open +When I click on the 'More Settings' option at the bottom of the dropdown +Then I should see the dialog to select Language and Input settings + + Scenario: User should see the main ULS dialog +Given I have the dropdown menu of the keyboard open +When I click on the '...' option near the bottom of the dropdown +Then I should see the main ULS dialog + + Scenario: Name of the selected keymap is visible with the IME icon +Given I have the dropdown menu of the keyboard open +When I click on the 'Bengali Probhat' keyboard +Then I should see the name of the keyboard i.e. 'Bengali Probhat' displayed with the IME icon + + Scenario: User should not be able to type with a disabled keymap +Given I have selected and enabled a keyboard to use from the dropdown menu and its name is displayed with the IME icon +When I press 'Ctrl+m' +Then I should see the selected keyboard being disabled and am not able to type in that script + + Scenario: The name of a disabled keyboard should not be visible in the IME icon tooltip +Given I have selected a keyboard and enabled from the dropdown menu +When I press 'ctrl+m' to disable it +Then I should see the name of the keyboard removed from the tooltip displaying the IME icon + + Scenario: Without a prior keyboard selection a keyboard name should not be displayed on pressing the shortcut keys +Given The cursor is on an input box and I have not made any keyboard selection +When I press 'ctrl+m' +Then I should not see any keyboard name displayed along with the IME icon + + Scenario: Keyboard selected in one input box should also be the selected keyboard in the next one +Given I have selected a keyboard and enabled from the dropdown menu +When I move from the currently active input box to another input box and start typing +Then I should be able to write in the keyboard that was selected in the previous box + + Scenario: Name of a keyboard selected in one input box should be displayed in the next one +Given I have selected a keyboard and enabled from the dropdown menu +When I move from the currently active input box to another input box +Then I should see the keyboard name still displayed with the IME icon diff --git a/features/search.feature b/features/search.feature index b148612..a73ce75 100644 --- a/features/search.feature +++
[MediaWiki-commits] [Gerrit] Run login.feature everywhere except at sandbox.translatewiki... - change (qa/browsertests)
Cmcmahon has submitted this change and it was merged. Change subject: Run login.feature everywhere except at sandbox.translatewiki.net .. Run login.feature everywhere except at sandbox.translatewiki.net Change-Id: I20f30739f1a79ef3dec917141a8a6f77d1c43032 --- M docs/jobs.md 1 file changed, 12 insertions(+), 12 deletions(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/docs/jobs.md b/docs/jobs.md index bd669f1..344711c 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -9,7 +9,7 @@ # browsertests-commons.wikimedia.beta.wmflabs.org - MediaWiki URL: commons.wikimedia.beta.wmflabs.org -- bundle exec: parallel_cucumber features/create_account.feature features/file.feature features/search.feature features/upload_wizard.feature -n 4 --test-options '--profile ci' +- bundle exec: parallel_cucumber features/create_account.feature features/file.feature features/login.feature features/search.feature features/upload_wizard.feature -n 5 --test-options '--profile ci' ## browsertests-commons.wikimedia.beta.wmflabs.org-linux-chrome @@ -20,15 +20,15 @@ ## browsertests-commons.wikimedia.beta.wmflabs.org-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: parallel_cucumber features/create_account.feature features/file.feature features/search.feature features/upload_wizard.feature -n 4 --test-options '--profile ci --tags ~@ie6-bug' +- bundle exec: parallel_cucumber features/create_account.feature features/file.feature features/login.feature features/search.feature features/upload_wizard.feature -n 5 --test-options '--profile ci --tags ~@ie6-bug' ## browsertests-commons.wikimedia.beta.wmflabs.org-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: parallel_cucumber features/create_account.feature features/file.feature features/search.feature features/upload_wizard.feature -n 4 --test-options '--profile ci --tags ~@ie7-bug' +- bundle exec: parallel_cucumber features/create_account.feature features/file.feature features/login.feature features/search.feature features/upload_wizard.feature -n 5 --test-options '--profile ci --tags ~@ie7-bug' ## browsertests-commons.wikimedia.beta.wmflabs.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 -- bundle exec: parallel_cucumber features/create_account.feature features/file.feature features/search.feature features/upload_wizard.feature -n 4 --test-options '--profile ci --tags ~@ie8-bug' +- bundle exec: parallel_cucumber features/create_account.feature features/file.feature features/login.feature features/search.feature features/upload_wizard.feature -n 5 --test-options '--profile ci --tags ~@ie8-bug' ## browsertests-commons.wikimedia.beta.wmflabs.org-windows-internet_explorer_9 - Browser Label: internet_explorer_9 @@ -37,7 +37,7 @@ # browsertests-en.wikipedia.beta.wmflabs.org -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/search.feature -n 6 --test-options '--profile ci' +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/login.feature features/page_edit.feature features/page_triage.feature features/search.feature -n 7 --test-options '--profile ci' - MediaWiki URL: en.wikipedia.beta.wmflabs.or @@ -49,15 +49,15 @@ ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/search.feature -n 6 --test-options '--profile ci --tags ~@ie6-bug' +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/login.feature features/page_edit.feature features/page_triage.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie6-bug' ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/search.feature -n 6 --test-options '--profile ci --tags ~@ie7-bug' +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/login.feature features/page_edit.feature features/page_triage.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie7-bug' ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 -- bundle exec: parallel_cucumber features/aftv5.feature
[MediaWiki-commits] [Gerrit] Updated Ruby gems - change (qa/browsertests)
Cmcmahon has submitted this change and it was merged. Change subject: Updated Ruby gems .. Updated Ruby gems Change-Id: I37ad454eb13470a74b761382d49906e87dd46d4b --- M Gemfile.lock 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/Gemfile.lock b/Gemfile.lock index be9e577..c53adfa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,10 +29,10 @@ page_navigation (= 0.7) selenium-webdriver (= 2.32.1) watir-webdriver (= 0.6.3) -page_navigation (0.7) +page_navigation (0.8) data_magic (= 0.14) parallel (0.6.4) -parallel_tests (0.11.1) +parallel_tests (0.11.3) parallel rake (10.0.4) rspec-expectations (2.13.0) @@ -44,7 +44,7 @@ rubyzip websocket (~ 1.0.4) syntax (1.0.0) -watir-webdriver (0.6.3) +watir-webdriver (0.6.4) selenium-webdriver (= 2.18.0) websocket (1.0.7) yml_reader (0.2) -- To view, visit https://gerrit.wikimedia.org/r/61354 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I37ad454eb13470a74b761382d49906e87dd46d4b Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@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] Updated Ruby gems - change (mediawiki...MobileFrontend)
Cmcmahon has submitted this change and it was merged. Change subject: Updated Ruby gems .. Updated Ruby gems Change-Id: Ifc1ba6a4740e557e0e496cee4635efb138dc3c21 --- M tests/acceptance/Gemfile.lock 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/tests/acceptance/Gemfile.lock b/tests/acceptance/Gemfile.lock index 731f4a3..a94f1ac 100644 --- a/tests/acceptance/Gemfile.lock +++ b/tests/acceptance/Gemfile.lock @@ -26,10 +26,10 @@ page_navigation (= 0.7) selenium-webdriver (= 2.32.1) watir-webdriver (= 0.6.3) -page_navigation (0.7) +page_navigation (0.8) data_magic (= 0.14) parallel (0.6.4) -parallel_tests (0.11.1) +parallel_tests (0.11.3) parallel rake (10.0.4) rspec-expectations (2.13.0) @@ -41,7 +41,7 @@ rubyzip websocket (~ 1.0.4) syntax (1.0.0) -watir-webdriver (0.6.3) +watir-webdriver (0.6.4) selenium-webdriver (= 2.18.0) websocket (1.0.7) yml_reader (0.2) -- To view, visit https://gerrit.wikimedia.org/r/61355 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc1ba6a4740e557e0e496cee4635efb138dc3c21 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Mgrover mgro...@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] Create meta item for defaultsort - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/61374 Change subject: Create meta item for defaultsort .. Create meta item for defaultsort Bug: 46465 Change-Id: I604a79c25e5b0315f7e6437da657977b0efa77db --- M VisualEditor.php M demos/ve/index.php A modules/ve/dm/metaitems/ve.dm.MWDefaultSortMetaItem.js M modules/ve/test/dm/ve.dm.example.js M modules/ve/test/index.php 5 files changed, 71 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/74/61374/1 diff --git a/VisualEditor.php b/VisualEditor.php index 744a721..7342bec 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -290,6 +290,7 @@ 've/dm/metaitems/ve.dm.AlienMetaItem.js', 've/dm/metaitems/ve.dm.MWAlienMetaItem.js', 've/dm/metaitems/ve.dm.MWCategoryMetaItem.js', + 've/dm/metaitems/ve.dm.MWDefaultSortMetaItem.js', 've/dm/metaitems/ve.dm.MWLanguageMetaItem.js', // ce diff --git a/demos/ve/index.php b/demos/ve/index.php index 43218f4..52f4767 100644 --- a/demos/ve/index.php +++ b/demos/ve/index.php @@ -178,6 +178,7 @@ script src=../../modules/ve/dm/metaitems/ve.dm.AlienMetaItem.js/script script src=../../modules/ve/dm/metaitems/ve.dm.MWAlienMetaItem.js/script script src=../../modules/ve/dm/metaitems/ve.dm.MWCategoryMetaItem.js/script + script src=../../modules/ve/dm/metaitems/ve.dm.MWDefaultSortMetaItem.js/script script src=../../modules/ve/dm/metaitems/ve.dm.MWLanguageMetaItem.js/script script src=../../modules/ve/ce/ve.ce.js/script script src=../../modules/ve/ce/ve.ce.DomRange.js/script diff --git a/modules/ve/dm/metaitems/ve.dm.MWDefaultSortMetaItem.js b/modules/ve/dm/metaitems/ve.dm.MWDefaultSortMetaItem.js new file mode 100644 index 000..80b857e --- /dev/null +++ b/modules/ve/dm/metaitems/ve.dm.MWDefaultSortMetaItem.js @@ -0,0 +1,54 @@ +/*! + * VisualEditor DataModel MWDefaultSortMetaItem class. + * + * @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ + +/** + * DataModel category default sort meta item. + * + * @class + * @extends ve.dm.MetaItem + * @constructor + * @param {Object} element Reference to element in meta-linmod + */ +ve.dm.MWDefaultSortMetaItem = function VeDmMWDefaultSortMetaItem( element ) { + // Parent constructor + ve.dm.MetaItem.call( this, element ); +}; + +/* Inheritance */ + +ve.inheritClass( ve.dm.MWDefaultSortMetaItem, ve.dm.MetaItem ); + +/* Static Properties */ + +ve.dm.MWDefaultSortMetaItem.static.name = 'MWdefaultSort'; + +ve.dm.MWDefaultSortMetaItem.static.group = 'MWdefaultSort'; + +ve.dm.MWDefaultSortMetaItem.static.matchTagNames = [ 'meta' ]; + +ve.dm.MWDefaultSortMetaItem.static.matchRdfaTypes = [ 'mw:PageProp/categorydefaultsort' ]; + +ve.dm.MWDefaultSortMetaItem.static.toDataElement = function ( domElements ) { + var content = domElements[0].getAttribute( 'content' ); + return { + 'type': this.name, + 'attributes': { + 'content': content + } + }; +}; + +ve.dm.MWDefaultSortMetaItem.static.toDomElements = function ( dataElement, doc ) { + var meta = doc.createElement( 'meta' ); + meta.setAttribute( 'property', 'mw:PageProp/categorydefaultsort' ); + meta.setAttribute( 'content', dataElement.attributes.content ); + return [ meta ]; +}; + +/* Registration */ + +ve.dm.modelRegistry.register( ve.dm.MWDefaultSortMetaItem ); diff --git a/modules/ve/test/dm/ve.dm.example.js b/modules/ve/test/dm/ve.dm.example.js index 7002ba6..9fa018e 100644 --- a/modules/ve/test/dm/ve.dm.example.js +++ b/modules/ve/test/dm/ve.dm.example.js @@ -2487,6 +2487,20 @@ 'table with caption, head, foot and body': { 'html': ve.dm.example.complexTableHtml, 'data': ve.dm.example.complexTable + }, + 'category default sort key': { + 'html': 'bodymeta property=mw:PageProp/categorydefaultsort content=foo/body', + 'data': [ + { + 'type': 'MWdefaultSort', + 'attributes': { + 'content': 'foo', + 'html/0/content': 'foo', + 'html/0/property': 'mw:PageProp/categorydefaultsort' + } + }, + { 'type': '/MWdefaultSort' } + ] } }; diff --git a/modules/ve/test/index.php b/modules/ve/test/index.php index 6fdc970..fd6d15b 100644 --- a/modules/ve/test/index.php +++
[MediaWiki-commits] [Gerrit] Refactor unimplemented search tests so they are ready for im... - change (qa/browsertests)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/61375 Change subject: Refactor unimplemented search tests so they are ready for implementation .. Refactor unimplemented search tests so they are ready for implementation Bug: 47829 Change-Id: I9847fbbea9b5617ae6eaf5360d7c93e5a311f5e0 --- M features/backlog/search.feature 1 file changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/75/61375/1 diff --git a/features/backlog/search.feature b/features/backlog/search.feature index 465ef06..62ac644 100644 --- a/features/backlog/search.feature +++ b/features/backlog/search.feature @@ -1,15 +1,15 @@ Feature: Search - Scenario: Search without accent yields optimal accent result as top choice but shows redlink for search term. THIS TEST EMULATES CURRENT FUNCTION. -Given that I am on the Portuguese Wikivoyage Main page pt.wikivoyage.org -When I search for Africa -Then I should be on the Search Results page - And the page entitled África should be the top result + Scenario: Search without accent yields optimal accent result as top choice but shows redlink for search term +Given I am at random page +When I search for Africa +Then Search Results page should open + And the page entitled África should be the top result And the results page should show Africa as a red link Scenario: Find tokens in the captions of uploaded files - Given I am on http://commons.wikimedia.beta.wmflabs.org/ -And http://commons.wikimedia.beta.wmflabs.org/wiki/File:Presentation.pdf exists -And http://commons.wikimedia.beta.wmflabs.org/wiki/File:Presentation.pdf has the caption This is a presentation about snails that User:GreenSpark gave on 6 December 2010 in Athens. - When I search for: snails - Then Presentation.pdf should be a result + Given that a file exists +And that it has a caption + When I search for it's caption + Then Search Results page should open +And the file should be included in the search results -- To view, visit https://gerrit.wikimedia.org/r/61375 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9847fbbea9b5617ae6eaf5360d7c93e5a311f5e0 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mw/ext/Wikibase: split client and server (experiment) - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/61376 Change subject: mw/ext/Wikibase: split client and server (experiment) .. mw/ext/Wikibase: split client and server (experiment) Change-Id: Idc47a30325b5572ed7a1ae30d8bea6a15979f0bb --- M layout.yaml 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/76/61376/1 diff --git a/layout.yaml b/layout.yaml index 2ca9c78..07e686a 100644 --- a/layout.yaml +++ b/layout.yaml @@ -376,6 +376,10 @@ - name: ^mwext-Wikibase-testextensions-.* voting: false + - name: ^mwext-Wikibase-client-tests$ +voting: false + - name: ^mwext-Wikibase-server-tests$ +voting: false - name: mediawiki-core-master-phpunit-all branch: ^master$ @@ -2801,11 +2805,15 @@ - mwext-Wikibase-jslint - mwext-Wikibase-lint: - mwext-Wikibase-testextensions-master + - mwext-Wikibase-client-tests + - mwext-Wikibase-server-tests gate-silent: - mwext-Wikibase-merge: - mwext-Wikibase-jslint - mwext-Wikibase-lint: - mwext-Wikibase-testextensions-master + - mwext-Wikibase-client-tests + - mwext-Wikibase-server-tests - name: mediawiki/extensions/WikiLove check-only: -- To view, visit https://gerrit.wikimedia.org/r/61376 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc47a30325b5572ed7a1ae30d8bea6a15979f0bb Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-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] mw/ext/Wikibase: split client and server (experiment) - change (integration/zuul-config)
Hashar has submitted this change and it was merged. Change subject: mw/ext/Wikibase: split client and server (experiment) .. mw/ext/Wikibase: split client and server (experiment) Change-Id: Idc47a30325b5572ed7a1ae30d8bea6a15979f0bb --- M layout.yaml 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 2ca9c78..07e686a 100644 --- a/layout.yaml +++ b/layout.yaml @@ -376,6 +376,10 @@ - name: ^mwext-Wikibase-testextensions-.* voting: false + - name: ^mwext-Wikibase-client-tests$ +voting: false + - name: ^mwext-Wikibase-server-tests$ +voting: false - name: mediawiki-core-master-phpunit-all branch: ^master$ @@ -2801,11 +2805,15 @@ - mwext-Wikibase-jslint - mwext-Wikibase-lint: - mwext-Wikibase-testextensions-master + - mwext-Wikibase-client-tests + - mwext-Wikibase-server-tests gate-silent: - mwext-Wikibase-merge: - mwext-Wikibase-jslint - mwext-Wikibase-lint: - mwext-Wikibase-testextensions-master + - mwext-Wikibase-client-tests + - mwext-Wikibase-server-tests - name: mediawiki/extensions/WikiLove check-only: -- To view, visit https://gerrit.wikimedia.org/r/61376 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idc47a30325b5572ed7a1ae30d8bea6a15979f0bb Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-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 gridengine class to be parametrized - change (operations/puppet)
coren has uploaded a new change for review. https://gerrit.wikimedia.org/r/61377 Change subject: Fix gridengine class to be parametrized .. Fix gridengine class to be parametrized Remove reliance on a global variable for configuration (but keep the global as default for transition purposes) Change-Id: I844113e7c073a30b3afd200d2970a0cb311e44ff --- M modules/gridengine/manifests/exec_host.pp M modules/gridengine/manifests/init.pp M modules/gridengine/manifests/master.pp M modules/gridengine/manifests/shadow_master.pp M modules/gridengine/manifests/submit_host.pp M modules/gridengine/templates/gridengine.preseed.erb 6 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/77/61377/1 diff --git a/modules/gridengine/manifests/exec_host.pp b/modules/gridengine/manifests/exec_host.pp index 31fa11d..2a5a9a4 100644 --- a/modules/gridengine/manifests/exec_host.pp +++ b/modules/gridengine/manifests/exec_host.pp @@ -1,7 +1,7 @@ # gridengine/exec_host.pp -class gridengine::exec_host { - require gridengine +class gridengine::exec_host($gridmaster = $grid_master) { + require gridengine($gridmaster) package { gridengine-exec: ensure = latest, diff --git a/modules/gridengine/manifests/init.pp b/modules/gridengine/manifests/init.pp index 83e235f..427050d 100644 --- a/modules/gridengine/manifests/init.pp +++ b/modules/gridengine/manifests/init.pp @@ -1,7 +1,7 @@ # gridengine/init.pp -class gridengine { +class gridengine($gridmaster) { file { /var/local/preseed: mode = 0600, ensure = directory, diff --git a/modules/gridengine/manifests/master.pp b/modules/gridengine/manifests/master.pp index 2cc885e..29fc749 100644 --- a/modules/gridengine/manifests/master.pp +++ b/modules/gridengine/manifests/master.pp @@ -2,7 +2,7 @@ class gridengine::master { - require gridengine + require gridengine($fqdn) package { gridengine-master: ensure = latest, diff --git a/modules/gridengine/manifests/shadow_master.pp b/modules/gridengine/manifests/shadow_master.pp index 8f30f0e..b80712b 100644 --- a/modules/gridengine/manifests/shadow_master.pp +++ b/modules/gridengine/manifests/shadow_master.pp @@ -1,8 +1,8 @@ # gridengine.pp -class gridengine::shadow_master { - require gridengine +class gridengine::shadow_master($gridmaster = $grid_master) { + require gridengine($gridmaster) package { gridengine-master: ensure = latest, diff --git a/modules/gridengine/manifests/submit_host.pp b/modules/gridengine/manifests/submit_host.pp index af092d8..767d6f5 100644 --- a/modules/gridengine/manifests/submit_host.pp +++ b/modules/gridengine/manifests/submit_host.pp @@ -1,8 +1,8 @@ # gridengine.pp -class gridengine::submit_host { - require gridengine +class gridengine::submit_host($gridmaster = $grid_master) { + require gridengine($gridmaster) package { gridengine-client: ensure = latest, diff --git a/modules/gridengine/templates/gridengine.preseed.erb b/modules/gridengine/templates/gridengine.preseed.erb index 1f57df1..e41e5fc 100644 --- a/modules/gridengine/templates/gridengine.preseed.erb +++ b/modules/gridengine/templates/gridengine.preseed.erb @@ -1,3 +1,3 @@ gridengine-common shared/gridenginecell string default gridengine-common shared/gridengineconfig boolean true -gridengine-common shared/gridenginemaster string %= grid_master % +gridengine-common shared/gridenginemaster string %= gridmaster % -- To view, visit https://gerrit.wikimedia.org/r/61377 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I844113e7c073a30b3afd200d2970a0cb311e44ff Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: coren mpellet...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moved unimplemented scenarios to backlog folder - change (qa/browsertests)
Cmcmahon has submitted this change and it was merged. Change subject: Moved unimplemented scenarios to backlog folder .. Moved unimplemented scenarios to backlog folder Bug: 47731 Change-Id: I820d6e046dfeba2080422af284231a67c4613a34 --- A features/backlog/search.feature A features/backlog/uls_ime.feature M features/search.feature M features/uls_ime.feature 4 files changed, 66 insertions(+), 64 deletions(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/features/backlog/search.feature b/features/backlog/search.feature new file mode 100644 index 000..465ef06 --- /dev/null +++ b/features/backlog/search.feature @@ -0,0 +1,15 @@ +Feature: Search + + Scenario: Search without accent yields optimal accent result as top choice but shows redlink for search term. THIS TEST EMULATES CURRENT FUNCTION. +Given that I am on the Portuguese Wikivoyage Main page pt.wikivoyage.org +When I search for Africa +Then I should be on the Search Results page + And the page entitled África should be the top result + And the results page should show Africa as a red link + + Scenario: Find tokens in the captions of uploaded files + Given I am on http://commons.wikimedia.beta.wmflabs.org/ +And http://commons.wikimedia.beta.wmflabs.org/wiki/File:Presentation.pdf exists +And http://commons.wikimedia.beta.wmflabs.org/wiki/File:Presentation.pdf has the caption This is a presentation about snails that User:GreenSpark gave on 6 December 2010 in Athens. + When I search for: snails + Then Presentation.pdf should be a result diff --git a/features/backlog/uls_ime.feature b/features/backlog/uls_ime.feature new file mode 100644 index 000..8bb37f7 --- /dev/null +++ b/features/backlog/uls_ime.feature @@ -0,0 +1,51 @@ +Feature: Universal Language Selector input method engine + + Scenario: ULS can see dropdown menu when they click on the IME icon +Given I am on a wiki page with input options with focus on an input box +When I click on the IME keyboard icon +Then I should see the dropdown menu with the a list of keymaps + + Scenario: Autonyms of keyboards should be visible to the user +Given I have clicked on the IME keyboard icon +When I get the drop down list of keyboards +Then I should see the autonyms of the keyboards + + Scenario: Language and Input Settings dialog should be displayed to the user +Given I have the dropdown menu of the keyboard open +When I click on the 'More Settings' option at the bottom of the dropdown +Then I should see the dialog to select Language and Input settings + + Scenario: User should see the main ULS dialog +Given I have the dropdown menu of the keyboard open +When I click on the '...' option near the bottom of the dropdown +Then I should see the main ULS dialog + + Scenario: Name of the selected keymap is visible with the IME icon +Given I have the dropdown menu of the keyboard open +When I click on the 'Bengali Probhat' keyboard +Then I should see the name of the keyboard i.e. 'Bengali Probhat' displayed with the IME icon + + Scenario: User should not be able to type with a disabled keymap +Given I have selected and enabled a keyboard to use from the dropdown menu and its name is displayed with the IME icon +When I press 'Ctrl+m' +Then I should see the selected keyboard being disabled and am not able to type in that script + + Scenario: The name of a disabled keyboard should not be visible in the IME icon tooltip +Given I have selected a keyboard and enabled from the dropdown menu +When I press 'ctrl+m' to disable it +Then I should see the name of the keyboard removed from the tooltip displaying the IME icon + + Scenario: Without a prior keyboard selection a keyboard name should not be displayed on pressing the shortcut keys +Given The cursor is on an input box and I have not made any keyboard selection +When I press 'ctrl+m' +Then I should not see any keyboard name displayed along with the IME icon + + Scenario: Keyboard selected in one input box should also be the selected keyboard in the next one +Given I have selected a keyboard and enabled from the dropdown menu +When I move from the currently active input box to another input box and start typing +Then I should be able to write in the keyboard that was selected in the previous box + + Scenario: Name of a keyboard selected in one input box should be displayed in the next one +Given I have selected a keyboard and enabled from the dropdown menu +When I move from the currently active input box to another input box +Then I should see the keyboard name still displayed with the IME icon diff --git a/features/search.feature b/features/search.feature index b148612..a73ce75 100644 --- a/features/search.feature +++ b/features/search.feature @@ -16,17 +16,3 @@
[MediaWiki-commits] [Gerrit] DO NOT MERGE~~ - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/61378 Change subject: DO NOT MERGE~~ .. DO NOT MERGE~~ Change-Id: Ib2af055f6bbeaa8cb11184185032c689e39b5c34 --- M Wikibase.php D client/COPYING D client/ExampleSettings.php D client/INSTALL D client/README D client/RELEASE-NOTES D client/WikibaseClient.hooks.php D client/WikibaseClient.i18n.alias.php D client/WikibaseClient.i18n.magic.php D client/WikibaseClient.i18n.php D client/WikibaseClient.php D client/config/WikibaseClient.default.php D client/config/WikibaseClient.example.php D client/config/WikibaseClient.experimental.php D client/includes/CachedEntity.php D client/includes/ChangeHandler.php D client/includes/EntityCacheUpdater.php D client/includes/EntityIdPropertyUpdater.php D client/includes/InterwikiSorter.php D client/includes/LangLinkHandler.php D client/includes/NamespaceChecker.php D client/includes/PageUpdater.php D client/includes/RepoLinker.php D client/includes/WikiPageUpdater.php D client/includes/WikibaseClient.php D client/includes/WikibaseLibrary.php D client/includes/api/ApiClientInfo.php D client/includes/modules/SiteModule.php D client/includes/parserhooks/NoLangLinkHandler.php D client/includes/parserhooks/ParserErrorMessageFormatter.php D client/includes/parserhooks/PropertyParserFunction.php D client/includes/recentchanges/ExternalChangesLine.php D client/includes/recentchanges/ExternalRecentChange.php D client/includes/recentchanges/RecentChangesFilterOptions.php D client/includes/specials/SpecialUnconnectedPages.php D client/includes/store/ClientStore.php D client/includes/store/EntityCache.php D client/includes/store/sql/CachingSqlStore.php D client/includes/store/sql/DirectSqlStore.php D client/includes/store/sql/EntityCacheTable.php D client/maintenance/populateInterwiki.php D client/resources/Resources.php D client/resources/images/WBC-Asset-Pencil-Hover.png D client/resources/images/WBC-Asset-Pencil.png D client/resources/jquery.wikibase/jquery.wikibase.linkitem.css D client/resources/jquery.wikibase/jquery.wikibase.linkitem.js D client/resources/mw.wikibase.lua D client/resources/wikibase.client.css D client/resources/wikibase.client.linkitem.init.js D client/resources/wikibase.client.nolanglinks.css D client/resources/wikibase.client.page-move.css D client/sql/KillLocalItems.sql D client/sql/WikibaseCache.sql D client/sql/WikibaseClient.sql D client/tests/phpunit/MockPageUpdater.php D client/tests/phpunit/includes/CachedEntityTest.php D client/tests/phpunit/includes/ChangeHandlerTest.php D client/tests/phpunit/includes/EntityCacheUpdaterTest.php D client/tests/phpunit/includes/InterwikiSorterTest.php D client/tests/phpunit/includes/LangLinkHandlerTest.php D client/tests/phpunit/includes/NamespaceCheckerTest.php D client/tests/phpunit/includes/RepoLinkerTest.php D client/tests/phpunit/includes/WikibaseClientTest.php D client/tests/phpunit/includes/api/ApiClientInfoTest.php D client/tests/phpunit/includes/parserhooks/PropertyParserFunctionTest.php D client/tests/phpunit/includes/specials/SpecialUnconnectedPagesTest.php D client/tests/phpunit/includes/store/EntityCacheTableTest.php D client/tests/selenium/interwiki/client_repo_spec.rb D client/tests/selenium/interwiki/edit_sitelinks_spec.rb D client/tests/selenium/interwiki/inclusion_syntax_spec.rb D client/tests/selenium/interwiki/interwiki_spec.rb D client/tests/selenium/qunit/qunit_spec.rb D client/tests/selenium/special/client_rc_and_wl_spec.rb 73 files changed, 11 insertions(+), 14,692 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/78/61378/1 -- To view, visit https://gerrit.wikimedia.org/r/61378 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2af055f6bbeaa8cb11184185032c689e39b5c34 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor unimplemented search tests so they are ready for im... - change (qa/browsertests)
Cmcmahon has submitted this change and it was merged. Change subject: Refactor unimplemented search tests so they are ready for implementation .. Refactor unimplemented search tests so they are ready for implementation Bug: 47829 Change-Id: I9847fbbea9b5617ae6eaf5360d7c93e5a311f5e0 --- M features/backlog/search.feature 1 file changed, 10 insertions(+), 10 deletions(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/features/backlog/search.feature b/features/backlog/search.feature index 465ef06..62ac644 100644 --- a/features/backlog/search.feature +++ b/features/backlog/search.feature @@ -1,15 +1,15 @@ Feature: Search - Scenario: Search without accent yields optimal accent result as top choice but shows redlink for search term. THIS TEST EMULATES CURRENT FUNCTION. -Given that I am on the Portuguese Wikivoyage Main page pt.wikivoyage.org -When I search for Africa -Then I should be on the Search Results page - And the page entitled África should be the top result + Scenario: Search without accent yields optimal accent result as top choice but shows redlink for search term +Given I am at random page +When I search for Africa +Then Search Results page should open + And the page entitled África should be the top result And the results page should show Africa as a red link Scenario: Find tokens in the captions of uploaded files - Given I am on http://commons.wikimedia.beta.wmflabs.org/ -And http://commons.wikimedia.beta.wmflabs.org/wiki/File:Presentation.pdf exists -And http://commons.wikimedia.beta.wmflabs.org/wiki/File:Presentation.pdf has the caption This is a presentation about snails that User:GreenSpark gave on 6 December 2010 in Athens. - When I search for: snails - Then Presentation.pdf should be a result + Given that a file exists +And that it has a caption + When I search for it's caption + Then Search Results page should open +And the file should be included in the search results -- To view, visit https://gerrit.wikimedia.org/r/61375 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9847fbbea9b5617ae6eaf5360d7c93e5a311f5e0 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@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] experimental config switcher for WMF Jenkins jobs - change (mediawiki...Wikibase)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/61379 Change subject: experimental config switcher for WMF Jenkins jobs .. experimental config switcher for WMF Jenkins jobs Wikibase would need a client and a server job that would let tweak the default configuration settings. I have created two Jenkins jobs that launch the full PHPUnit file and named: - mwext-Wikibase-client-tests - mwext-Wikibase-server-tests Jenkins provide the job name as the JOB_NAME environnement variable. One can thus detect which job is being run and tweak the PHPUnit setting. For the client job, we insert a `--exclude-group WikidataClient`. Change-Id: Ide41a0b9003a9627f5a86c0514cc61d684b5e6aa --- M Wikibase.php 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/79/61379/1 diff --git a/Wikibase.php b/Wikibase.php index 1313a9f..ba33bfe 100644 --- a/Wikibase.php +++ b/Wikibase.php @@ -28,3 +28,27 @@ //require_once __DIR__ . '/client/ExampleSettings.php'; require_once __DIR__ . '/repo/ExampleSettings.php'; + +# Let JenkinsAdapt our test suite when run under Jenkins +$jenkins_job_name = getenv( 'JOB_NAME' ); +if( PHP_SAPI === 'cli' $jenkins_job_name !== false ) { + + switch( $jenkins_job_name) { + + case 'mwext-Wikibase-client-tests': + break; + + case 'mwext-Wikibase-server-tests': + # Pretends we asked PHPUnit to exclude WikidataClient group, + # this is done by inserting an --exclude-group option just after the + # command line. + $cmd = array_shift( $_SERVER['argv'] ); + $_SERVER['argv'] = array_merge( + array( $cmd, '--exclude-group', 'WikidataClient'), + $_SERVER['argv'] + ); + break; + } +} +// Avoid polluting the global namespace +unset( $jenkins_job_name, $cmd ); -- To view, visit https://gerrit.wikimedia.org/r/61379 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide41a0b9003a9627f5a86c0514cc61d684b5e6aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase 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] Wikibase client/server jobs - change (integration/jenkins-job-builder-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/61380 Change subject: Wikibase client/server jobs .. Wikibase client/server jobs We want to split unit tests in Wikibase since that extensions actually contains several part. The first ones are 'client' and 'servers'. The jobs are doing the exact same thing: they call phpunit on the extension directoy, it is up to the extension authors to detect the job name and tweak their settings accordingly. Change-Id: I588cdd677a2a4438fed52ff038bfe85726a9b2a9 --- M mediawiki-extensions.yaml 1 file changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/80/61380/1 diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index e8a5f0d..b74f935 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -94,6 +94,26 @@ - junit: results: 'junit*.xml' +# Job specific to Wikibase, let us switch between client +# and server configurations. +- job-template: +name: 'mwext-Wikibase-{kind}-tests' +defaults: use-zuul-for-mw-ext +ext-name: 'Wikibase' +triggers: + - zuul +builders: + - mw-setup-extension: +mwbranch: 'master' +dependencies: '{dependencies}' + - mw-phpunit-ext: +extension: '{ext-name}' + - mw-phpunit-allexts +publishers: + - junit: +results: 'junit*.xml' + + # VisualEditor's docgen has a maintenance script, so install mediawiki first - job-template: name: 'mwext-VisualEditor-doc-test' @@ -370,6 +390,15 @@ name: mwext ext-name: Wikibase dependencies: 'Ask,Diff,DataValues,Validator' + - 'mwext-Wikibase-{kind}-tests': +ext-name: Wikibase +dependencies: 'Ask,Diff,DataValues,Validator' +kind: 'client' + - 'mwext-Wikibase-{kind}-tests': +ext-name: Wikibase +dependencies: 'Ask,Diff,DataValues,Validator' +kind: 'server' + - '{name}-{ext-name}-testextensions-{mwbranch}': name: mwext ext-name: Ask -- To view, visit https://gerrit.wikimedia.org/r/61380 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I588cdd677a2a4438fed52ff038bfe85726a9b2a9 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-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] Wikibase client/server jobs - change (integration/jenkins-job-builder-config)
Hashar has submitted this change and it was merged. Change subject: Wikibase client/server jobs .. Wikibase client/server jobs We want to split unit tests in Wikibase since that extensions actually contains several part. The first ones are 'client' and 'servers'. The jobs are doing the exact same thing: they call phpunit on the extension directoy, it is up to the extension authors to detect the job name and tweak their settings accordingly. Change-Id: I588cdd677a2a4438fed52ff038bfe85726a9b2a9 --- M mediawiki-extensions.yaml 1 file changed, 29 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index e8a5f0d..b74f935 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -94,6 +94,26 @@ - junit: results: 'junit*.xml' +# Job specific to Wikibase, let us switch between client +# and server configurations. +- job-template: +name: 'mwext-Wikibase-{kind}-tests' +defaults: use-zuul-for-mw-ext +ext-name: 'Wikibase' +triggers: + - zuul +builders: + - mw-setup-extension: +mwbranch: 'master' +dependencies: '{dependencies}' + - mw-phpunit-ext: +extension: '{ext-name}' + - mw-phpunit-allexts +publishers: + - junit: +results: 'junit*.xml' + + # VisualEditor's docgen has a maintenance script, so install mediawiki first - job-template: name: 'mwext-VisualEditor-doc-test' @@ -370,6 +390,15 @@ name: mwext ext-name: Wikibase dependencies: 'Ask,Diff,DataValues,Validator' + - 'mwext-Wikibase-{kind}-tests': +ext-name: Wikibase +dependencies: 'Ask,Diff,DataValues,Validator' +kind: 'client' + - 'mwext-Wikibase-{kind}-tests': +ext-name: Wikibase +dependencies: 'Ask,Diff,DataValues,Validator' +kind: 'server' + - '{name}-{ext-name}-testextensions-{mwbranch}': name: mwext ext-name: Ask -- To view, visit https://gerrit.wikimedia.org/r/61380 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I588cdd677a2a4438fed52ff038bfe85726a9b2a9 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-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] Band-aid patch to get puppet running again on labs. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/61381 Change subject: Band-aid patch to get puppet running again on labs. .. Band-aid patch to get puppet running again on labs. Currently the ganglia config depends on a fact (projectgid.rb) which itself depends on the resolution of the ganglia manifest. That was causing a failure due to an undefined variable. Now I just define that var to 'TBD' in order to allow the first pass to complete. Subsequent passes insert proper values. Clearly this needs a better fix, but this patch should get labs working again in the meantime. Change-Id: Ic0edf12d6ce63ce13669beb72da867a70781ccc2 --- M modules/ganglia_new/manifests/monitor.pp 1 file changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/81/61381/1 diff --git a/modules/ganglia_new/manifests/monitor.pp b/modules/ganglia_new/manifests/monitor.pp index ce0c041..0497153 100644 --- a/modules/ganglia_new/manifests/monitor.pp +++ b/modules/ganglia_new/manifests/monitor.pp @@ -6,11 +6,16 @@ $id = $ganglia_new::configuration::clusters[$cluster]['id'] + $ganglia_new::configuration::id_prefix[$::site] $desc = $ganglia_new::configuration::clusters[$cluster]['name'] $portnr = $ganglia_new::configuration::base_port + $id + $gmond_port = $portnr + } else { + if $::project_gid { + $gmond_port = $::project_gid + } else { + # This is dumb, but will get resolved on the next pass. + $gmond_port = TBD + } } - $gmond_port = $::realm ? { - production = $portnr, - labs = $::project_gid - } + $cname = $::realm ? { production = ${desc} ${::site}, labs = $::instanceproject @@ -27,4 +32,4 @@ aggregator_hosts = $aggregator_hosts, override_hostname = $override_hostname } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/61381 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0edf12d6ce63ce13669beb72da867a70781ccc2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deploy VisualEditor opt-in alpha to viwiki - change (operations/mediawiki-config)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/61382 Change subject: Deploy VisualEditor opt-in alpha to viwiki .. Deploy VisualEditor opt-in alpha to viwiki Bug: 43018 Change-Id: I56906c123e924b84eb9ee076cd67254f8935911d --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/82/61382/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 42ebe27..d1a6b80 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10351,6 +10351,7 @@ 'plwiki' = true, 'ruwiki' = true, 'svwiki' = true, + 'viwiki' = true, 'zhwiki' = true, ), @@ -10372,6 +10373,7 @@ 'plwiki' = 'pl', 'ruwiki' = 'ru', 'svwiki' = 'sv', + 'viwiki' = 'vi', 'zhwiki' = 'zh', ), -- To view, visit https://gerrit.wikimedia.org/r/61382 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56906c123e924b84eb9ee076cd67254f8935911d 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] Adding Aaron Halfakar's new keys: - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/61383 Change subject: Adding Aaron Halfakar's new keys: .. Adding Aaron Halfakar's new keys: See: - RT 5004 - RT 5026 - https://office.wikimedia.org/wiki/User:Ahalfaker Change-Id: I1c69f2ebdbc570e4ed99b17cc78b74303e89bbb4 --- M manifests/admins.pp 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/83/61383/1 diff --git a/manifests/admins.pp b/manifests/admins.pp index ddb5432..ac93288 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -1759,6 +1759,7 @@ if $manage_home { Ssh_authorized_key { require = Unixaccount[$realname]} ssh_authorized_key { + # these first two keys have been removed. halfak: ensure = absent, user= $username, @@ -1769,11 +1770,26 @@ user= $username, type= ssh-rsa, key = B3NzaC1yc2EDAQABAAABAQCqjDvky8+pqKrACjc1eZ3nLuAOa9pmwHBEk7EFqRVMSSy9IsaP7Q2RbblrcMFUJP0dCj+rDDu5Q4YKDYhN/x0Wr0vPdjQqrU2Ujx65EEeeYJQ4/InG1MgABoFOcm8TdCjkOFdvwD/JFzaNJ3YxMilv+xepqyGOTfTf+ThsXtGX6qGGWMZwfBmt7Z7oC/R/juaH49xHcFihzbh3DFdZLB2/VpyzIn55kvtqXFcw6SBppegu7bknnLMaXFi4edG/Jm1BjuFBnpHRVO1V91ou5tNNrMhTDGLGGyKgqmz/xYS70yPdy3nW8V3ygOdZWDmOCeWYMVGQE4pfSNA1vdsuV33r; + # These are Aaron's key's now. + # See: + # - https://rt.wikimedia.org/Ticket/Display.html?id=5004 + # - https://rt.wikimedia.org/Ticket/Display.html?id=5026 + # - https://office.wikimedia.org/wiki/User:Ahalfaker halfak@graphite2: ensure = present, user = $username, type = ssh-rsa, key= B3NzaC1yc2EDAQABAAABAQDI6xBPpUqjfZl0AkSgS4sMLqaLdaVIUzZdCmNvzw+TbITw6PWOtMAOnP5A8HOn7aqnSH0ZYYWN/AzMz+9zT6+5JvxOfY43pCmT6qJv3e6mtCkkdy79kCH+b8S9NtrhttxMt9iem2RP1sbJiXLfcinOHuezd2Q05BoY97Aoo8z2/tRRvkPnHA2QU3fxAMS/PBle1ZytN2XJtz565AS7vzrts0su/jTej1ikLNZtMITZIrgB4o9KVcF5FHsmTIBehVwOEQRNYc6AwK+GWDQ1ZDS9m07/VmSIAO8krFPJ8y1M/EvMSP/VR78ABXOYTNlgzTCSuLFjocFMARBOnpA5Nfg5; + halfak@halfak@tako-umh: + ensure = present, + user = $username, + type = ssh-rsa, + key= B3NzaC1yc2EDAQABAAABAQDUTJ/rlBnGfXU0Ybp1gjJNizb66gaRFPzq33ptdnCLSP8hWymFgpzmuNyUaBClWJwl9qxXIw0xZjHXyTcK7Dv8ajqatgeiY0ow1LoVfzFDtN3Y0dxFNKC5/bC6lk+VmBl7fmNk8+fx5Y2FF8LMPy+QceZU2CJOvJzEkjd1lJJTFnSSonRrMBzK2xhT1qG2PhlThWWhVklrEvO+wIdi9M2B+m4cjgzaLaK/UgeqhFWsTQd655tLb2trhNHj3I6Nn38l/b+TFKsYT1+x1QWt9IxrSgKcDc2oAj+HSrcHIaKIXLbMMDaFIzRpHGMxnSXpJvCDvSq9aKyfw9dsoqxuFLF9; + halfak@carbon: + ensure = present, + user = $username, + type = ssh-rsa, + key= B3NzaC1yc2EDAQABAAABAQCjS8cth/18dmTr37h0A+K1g82iVqfrQ5c98iLrtl/ejvkMNDvVSo1Kyho6sXhwCx7HsF5hF6Y+fVB5FaxugI6o3CeAt8PQBeOjOWOdCZCUudywwnNWQgLH1XejaAxV95VRZTeuzhTLMymZRojOm2Kbb2f89C3CDCPohlOqVKMRsa7vMA6mgHgJtOXjqdrn+Toj/oe3+ZLvTpFsD8ROTsppKo+ie8AvRRzaCobgHF31OrihlAxQlovAPH/3eH67NRlmwwJhkuGAIra7+ZCfJzNR/9RVoc6mZgRANDXASTsBuI7ZdUQjgRIHbdd+VkXlzR+jLQy940ukLT1IK5hH9IZd; } } } -- To view, visit https://gerrit.wikimedia.org/r/61383 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c69f2ebdbc570e4ed99b17cc78b74303e89bbb4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding Aaron Halfakar's new keys: - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Adding Aaron Halfakar's new keys: .. Adding Aaron Halfakar's new keys: See: - RT 5004 - RT 5026 - https://office.wikimedia.org/wiki/User:Ahalfaker Change-Id: I1c69f2ebdbc570e4ed99b17cc78b74303e89bbb4 --- M manifests/admins.pp 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: Ottomata: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/admins.pp b/manifests/admins.pp index ddb5432..ac93288 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -1759,6 +1759,7 @@ if $manage_home { Ssh_authorized_key { require = Unixaccount[$realname]} ssh_authorized_key { + # these first two keys have been removed. halfak: ensure = absent, user= $username, @@ -1769,11 +1770,26 @@ user= $username, type= ssh-rsa, key = B3NzaC1yc2EDAQABAAABAQCqjDvky8+pqKrACjc1eZ3nLuAOa9pmwHBEk7EFqRVMSSy9IsaP7Q2RbblrcMFUJP0dCj+rDDu5Q4YKDYhN/x0Wr0vPdjQqrU2Ujx65EEeeYJQ4/InG1MgABoFOcm8TdCjkOFdvwD/JFzaNJ3YxMilv+xepqyGOTfTf+ThsXtGX6qGGWMZwfBmt7Z7oC/R/juaH49xHcFihzbh3DFdZLB2/VpyzIn55kvtqXFcw6SBppegu7bknnLMaXFi4edG/Jm1BjuFBnpHRVO1V91ou5tNNrMhTDGLGGyKgqmz/xYS70yPdy3nW8V3ygOdZWDmOCeWYMVGQE4pfSNA1vdsuV33r; + # These are Aaron's key's now. + # See: + # - https://rt.wikimedia.org/Ticket/Display.html?id=5004 + # - https://rt.wikimedia.org/Ticket/Display.html?id=5026 + # - https://office.wikimedia.org/wiki/User:Ahalfaker halfak@graphite2: ensure = present, user = $username, type = ssh-rsa, key= B3NzaC1yc2EDAQABAAABAQDI6xBPpUqjfZl0AkSgS4sMLqaLdaVIUzZdCmNvzw+TbITw6PWOtMAOnP5A8HOn7aqnSH0ZYYWN/AzMz+9zT6+5JvxOfY43pCmT6qJv3e6mtCkkdy79kCH+b8S9NtrhttxMt9iem2RP1sbJiXLfcinOHuezd2Q05BoY97Aoo8z2/tRRvkPnHA2QU3fxAMS/PBle1ZytN2XJtz565AS7vzrts0su/jTej1ikLNZtMITZIrgB4o9KVcF5FHsmTIBehVwOEQRNYc6AwK+GWDQ1ZDS9m07/VmSIAO8krFPJ8y1M/EvMSP/VR78ABXOYTNlgzTCSuLFjocFMARBOnpA5Nfg5; + halfak@halfak@tako-umh: + ensure = present, + user = $username, + type = ssh-rsa, + key= B3NzaC1yc2EDAQABAAABAQDUTJ/rlBnGfXU0Ybp1gjJNizb66gaRFPzq33ptdnCLSP8hWymFgpzmuNyUaBClWJwl9qxXIw0xZjHXyTcK7Dv8ajqatgeiY0ow1LoVfzFDtN3Y0dxFNKC5/bC6lk+VmBl7fmNk8+fx5Y2FF8LMPy+QceZU2CJOvJzEkjd1lJJTFnSSonRrMBzK2xhT1qG2PhlThWWhVklrEvO+wIdi9M2B+m4cjgzaLaK/UgeqhFWsTQd655tLb2trhNHj3I6Nn38l/b+TFKsYT1+x1QWt9IxrSgKcDc2oAj+HSrcHIaKIXLbMMDaFIzRpHGMxnSXpJvCDvSq9aKyfw9dsoqxuFLF9; + halfak@carbon: + ensure = present, + user = $username, + type = ssh-rsa, + key= B3NzaC1yc2EDAQABAAABAQCjS8cth/18dmTr37h0A+K1g82iVqfrQ5c98iLrtl/ejvkMNDvVSo1Kyho6sXhwCx7HsF5hF6Y+fVB5FaxugI6o3CeAt8PQBeOjOWOdCZCUudywwnNWQgLH1XejaAxV95VRZTeuzhTLMymZRojOm2Kbb2f89C3CDCPohlOqVKMRsa7vMA6mgHgJtOXjqdrn+Toj/oe3+ZLvTpFsD8ROTsppKo+ie8AvRRzaCobgHF31OrihlAxQlovAPH/3eH67NRlmwwJhkuGAIra7+ZCfJzNR/9RVoc6mZgRANDXASTsBuI7ZdUQjgRIHbdd+VkXlzR+jLQy940ukLT1IK5hH9IZd; } } } -- To view, visit https://gerrit.wikimedia.org/r/61383 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c69f2ebdbc570e4ed99b17cc78b74303e89bbb4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@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] Remove tags where not necessary to simplify Jenkins job conf... - change (qa/browsertests)
Cmcmahon has submitted this change and it was merged. Change subject: Remove tags where not necessary to simplify Jenkins job configuration .. Remove tags where not necessary to simplify Jenkins job configuration Bug: 47550 Change-Id: I8e1bb7c62f570f846d8099c1250f414f3b20c9d6 --- M docs/jobs.md 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/docs/jobs.md b/docs/jobs.md index 4875b21..5d6a238 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -57,7 +57,6 @@ ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/login.feature features/page_edit.feature features/page_triage.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie8-bug' ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_9 - Browser Label: internet_explorer_9 @@ -86,7 +85,6 @@ ## browsertests-en.wikipedia.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 -- bundle exec: parallel_cucumber features/create_account.feature features/login.feature features/math.feature features/page_triage.feature -n 4 --test-options '--profile ci --tags ~@ie8-bug' ## browsertests-en.wikipedia.org-windows-internet_explorer_9 - Browser Label: internet_explorer_9 @@ -108,15 +106,12 @@ ## browsertests-sandbox.translatewiki.net-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: parallel_cucumber features/create_account.feature features/universal_language_selector.feature -n 2 --test-options '--profile ci --tags ~@ie6-bug' ## browsertests-sandbox.translatewiki.net-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: parallel_cucumber features/create_account.feature features/universal_language_selector.feature -n 2 --test-options '--profile ci --tags ~@ie7-bug' ## browsertests-sandbox.translatewiki.net-windows-internet_explorer_8 - Browser Label: internet_explorer_8 -- bundle exec: parallel_cucumber features/create_account.feature features/universal_language_selector.feature -n 2 --test-options '--profile ci --tags ~@ie8-bug' ## browsertests-sandbox.translatewiki.net-windows-internet_explorer_9 - Browser Label: internet_explorer_9 -- To view, visit https://gerrit.wikimedia.org/r/60396 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e1bb7c62f570f846d8099c1250f414f3b20c9d6 Gerrit-PatchSet: 2 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@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] Wikibase: run all extensions tests - change (integration/jenkins-job-builder-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/61384 Change subject: Wikibase: run all extensions tests .. Wikibase: run all extensions tests Change-Id: I84cdb39932e5330e10a3991e9e6340d8798a3da7 --- M mediawiki-extensions.yaml 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/84/61384/1 diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index b74f935..3fc3d91 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -106,8 +106,6 @@ - mw-setup-extension: mwbranch: 'master' dependencies: '{dependencies}' - - mw-phpunit-ext: -extension: '{ext-name}' - mw-phpunit-allexts publishers: - junit: -- To view, visit https://gerrit.wikimedia.org/r/61384 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84cdb39932e5330e10a3991e9e6340d8798a3da7 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-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] Wikibase: run all extensions tests - change (integration/jenkins-job-builder-config)
Hashar has submitted this change and it was merged. Change subject: Wikibase: run all extensions tests .. Wikibase: run all extensions tests Change-Id: I84cdb39932e5330e10a3991e9e6340d8798a3da7 --- M mediawiki-extensions.yaml 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index b74f935..3fc3d91 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -106,8 +106,6 @@ - mw-setup-extension: mwbranch: 'master' dependencies: '{dependencies}' - - mw-phpunit-ext: -extension: '{ext-name}' - mw-phpunit-allexts publishers: - junit: -- To view, visit https://gerrit.wikimedia.org/r/61384 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84cdb39932e5330e10a3991e9e6340d8798a3da7 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-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] Revert Wikibase: run all extensions tests - change (integration/jenkins-job-builder-config)
Hashar has submitted this change and it was merged. Change subject: Revert Wikibase: run all extensions tests .. Revert Wikibase: run all extensions tests This reverts commit 13935370c21c117e815d9e74e48545662e83f509 Change-Id: I6175ba32ebdd2f13842fd4010ccbd24fb5ef3369 --- M mediawiki-extensions.yaml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 3fc3d91..b74f935 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -106,6 +106,8 @@ - mw-setup-extension: mwbranch: 'master' dependencies: '{dependencies}' + - mw-phpunit-ext: +extension: '{ext-name}' - mw-phpunit-allexts publishers: - junit: -- To view, visit https://gerrit.wikimedia.org/r/61385 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6175ba32ebdd2f13842fd4010ccbd24fb5ef3369 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-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] Running new preferences feature at en.wikipedia.beta.wmflabs... - change (qa/browsertests)
Zfilipin has submitted this change and it was merged. Change subject: Running new preferences feature at en.wikipedia.beta.wmflabs.org and en.wikipedia.org .. Running new preferences feature at en.wikipedia.beta.wmflabs.org and en.wikipedia.org The test fails at all other sites, so I am not enabling it there for now. Change-Id: I0fdb5aa7a94723678a1866b50c5ac024ba9468ac --- M docs/jobs.md 1 file changed, 8 insertions(+), 7 deletions(-) Approvals: Zfilipin: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/docs/jobs.md b/docs/jobs.md index 5d6a238..c418ec9 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -37,7 +37,7 @@ # browsertests-en.wikipedia.beta.wmflabs.org -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/login.feature features/page_edit.feature features/page_triage.feature features/search.feature -n 7 --test-options '--profile ci' +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/preferences_appearance.feature features/search.feature -n 7 --test-options '--profile ci' - MediaWiki URL: en.wikipedia.beta.wmflabs.or @@ -49,14 +49,15 @@ ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/login.feature features/page_edit.feature features/page_triage.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie6-bug' +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/preferences_appearance.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie6-bug' ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/login.feature features/page_edit.feature features/page_triage.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie7-bug' +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/preferences_appearance.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie7-bug' ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/preferences_appearance.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie8-bug' ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_9 - Browser Label: internet_explorer_9 @@ -64,8 +65,7 @@ # browsertests-en.wikipedia.org-linux-firefox - -- bundle exec: parallel_cucumber features/create_account.feature features/login.feature features/math.feature features/page_triage.feature -n 4 --test-options '--profile ci' +- bundle exec: parallel_cucumber features/create_account.feature features/math.feature features/page_triage.feature features/preferences_appearance.feature -n 4 --test-options '--profile ci' - MediaWiki URL: en.wikipedia.org @@ -77,14 +77,15 @@ ## browsertests-en.wikipedia.org-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: parallel_cucumber features/create_account.feature features/login.feature features/math.feature features/page_triage.feature -n 4 --test-options '--profile ci --tags ~@ie6-bug' +- bundle exec: parallel_cucumber features/create_account.feature features/math.feature features/page_triage.feature features/preferences_appearance.feature -n 4 --test-options '--profile ci --tags ~@ie6-bug' ## browsertests-en.wikipedia.org-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: parallel_cucumber features/create_account.feature features/login.feature features/math.feature features/page_triage.feature -n 4 --test-options '--profile ci --tags ~@ie7-bug' +- bundle exec: parallel_cucumber features/create_account.feature features/math.feature features/page_triage.feature features/preferences_appearance.feature -n 4 --test-options '--profile ci --tags ~@ie7-bug' ## browsertests-en.wikipedia.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 +- bundle exec: parallel_cucumber features/create_account.feature features/math.feature features/page_triage.feature
[MediaWiki-commits] [Gerrit] Band-aid patch to get puppet running again on labs. - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Band-aid patch to get puppet running again on labs. .. Band-aid patch to get puppet running again on labs. Currently the ganglia config depends on a fact (projectgid.rb) which itself depends on the resolution of the ganglia manifest. That was causing a failure due to an undefined variable. Now I just define that var to 'TBD' in order to allow the first pass to complete. Subsequent passes insert proper values. Clearly this needs a better fix, but this patch should get labs working again in the meantime. Change-Id: Ic0edf12d6ce63ce13669beb72da867a70781ccc2 --- M modules/ganglia_new/manifests/monitor.pp 1 file changed, 10 insertions(+), 5 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ganglia_new/manifests/monitor.pp b/modules/ganglia_new/manifests/monitor.pp index ce0c041..0497153 100644 --- a/modules/ganglia_new/manifests/monitor.pp +++ b/modules/ganglia_new/manifests/monitor.pp @@ -6,11 +6,16 @@ $id = $ganglia_new::configuration::clusters[$cluster]['id'] + $ganglia_new::configuration::id_prefix[$::site] $desc = $ganglia_new::configuration::clusters[$cluster]['name'] $portnr = $ganglia_new::configuration::base_port + $id + $gmond_port = $portnr + } else { + if $::project_gid { + $gmond_port = $::project_gid + } else { + # This is dumb, but will get resolved on the next pass. + $gmond_port = TBD + } } - $gmond_port = $::realm ? { - production = $portnr, - labs = $::project_gid - } + $cname = $::realm ? { production = ${desc} ${::site}, labs = $::instanceproject @@ -27,4 +32,4 @@ aggregator_hosts = $aggregator_hosts, override_hostname = $override_hostname } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/61381 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0edf12d6ce63ce13669beb72da867a70781ccc2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@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 new PDF feature to Jenkins jobs - change (qa/browsertests)
Zfilipin has submitted this change and it was merged. Change subject: Add new PDF feature to Jenkins jobs .. Add new PDF feature to Jenkins jobs Runs at: - en.wikipedia.beta.wmflabs.org - en.wikipedia.org - test2.wikipedia Broken at: - commons.wikimedia.beta.wmflabs.org - sandbox.translatewiki.net Bug: 46224 Change-Id: Idec21c492871f4a55aaa0f1568971ccc7174cf1d --- M docs/jobs.md 1 file changed, 12 insertions(+), 13 deletions(-) Approvals: Zfilipin: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/docs/jobs.md b/docs/jobs.md index c418ec9..da0505c 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -36,8 +36,7 @@ # browsertests-en.wikipedia.beta.wmflabs.org - -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/preferences_appearance.feature features/search.feature -n 7 --test-options '--profile ci' +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/pdf.feature features/preferences_appearance.feature features/search.feature -n 8 --test-options '--profile ci' - MediaWiki URL: en.wikipedia.beta.wmflabs.or @@ -49,15 +48,15 @@ ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/preferences_appearance.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie6-bug' +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/pdf.feature features/preferences_appearance.feature features/search.feature -n 8 --test-options '--profile ci --tags ~@ie6-bug' ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/preferences_appearance.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie7-bug' +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/pdf.feature features/preferences_appearance.feature features/search.feature -n 8 --test-options '--profile ci --tags ~@ie7-bug' ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 -- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/preferences_appearance.feature features/search.feature -n 7 --test-options '--profile ci --tags ~@ie8-bug' +- bundle exec: parallel_cucumber features/aftv5.feature features/create_account.feature features/file.feature features/page_edit.feature features/page_triage.feature features/pdf.feature features/preferences_appearance.feature features/search.feature -n 8 --test-options '--profile ci --tags ~@ie8-bug' ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_9 - Browser Label: internet_explorer_9 @@ -65,7 +64,7 @@ # browsertests-en.wikipedia.org-linux-firefox -- bundle exec: parallel_cucumber features/create_account.feature features/math.feature features/page_triage.feature features/preferences_appearance.feature -n 4 --test-options '--profile ci' +- bundle exec: parallel_cucumber features/create_account.feature features/math.feature features/page_triage.feature features/pdf.feature features/preferences_appearance.feature -n 5 --test-options '--profile ci' - MediaWiki URL: en.wikipedia.org @@ -77,15 +76,15 @@ ## browsertests-en.wikipedia.org-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: parallel_cucumber features/create_account.feature features/math.feature features/page_triage.feature features/preferences_appearance.feature -n 4 --test-options '--profile ci --tags ~@ie6-bug' +- bundle exec: parallel_cucumber features/create_account.feature features/math.feature features/page_triage.feature features/pdf.feature features/preferences_appearance.feature -n 5 --test-options '--profile ci --tags ~@ie6-bug' ## browsertests-en.wikipedia.org-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: parallel_cucumber features/create_account.feature features/math.feature features/page_triage.feature features/preferences_appearance.feature -n
[MediaWiki-commits] [Gerrit] Story 477: Only show nearby in menu when supported - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/61386 Change subject: Story 477: Only show nearby in menu when supported .. Story 477: Only show nearby in menu when supported Change-Id: I106282a302bfdc870b225b85b8b000f65fac4674 --- M javascripts/common/mf-application.js M javascripts/specials/nearby.js 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/86/61386/1 diff --git a/javascripts/common/mf-application.js b/javascripts/common/mf-application.js index 3275f56..e192834 100644 --- a/javascripts/common/mf-application.js +++ b/javascripts/common/mf-application.js @@ -86,6 +86,10 @@ return support; } + function supportsGeoLocation() { + return !!navigator.geolocation; + } + // Try to scroll and hide URL bar scrollY = window.scrollY || 0; if( !window.location.hash scrollY 10 ) { @@ -215,6 +219,7 @@ message: message, on: on, prefix: 'mw-mf-', + supportsGeoLocation: supportsGeoLocation, supportsPositionFixed: supportsPositionFixed, triggerPageReadyHook: triggerPageReadyHook, prettyEncodeTitle: prettyEncodeTitle, diff --git a/javascripts/specials/nearby.js b/javascripts/specials/nearby.js index de8af5a..9f155a5 100644 --- a/javascripts/specials/nearby.js +++ b/javascripts/specials/nearby.js @@ -1,7 +1,7 @@ ( function( M, $ ) { ( function() { - var supported = !!navigator.geolocation, + var supported = M.supportsGeoLocation(), popup = M.require( 'notifications' ), View = M.require( 'view' ), cachedPages, -- To view, visit https://gerrit.wikimedia.org/r/61386 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I106282a302bfdc870b225b85b8b000f65fac4674 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added limited-overwrite/merge option for importing XML or CSV - change (mediawiki...DataTransfer)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/61387 Change subject: Added limited-overwrite/merge option for importing XML or CSV .. Added limited-overwrite/merge option for importing XML or CSV Change-Id: If308b926be2d17f0fdb3278f1e54cab41b2bd96d --- M includes/DT_ImportJob.php M includes/DT_PageStructure.php M includes/DT_Utils.php M languages/DT_Messages.php 4 files changed, 102 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataTransfer refs/changes/87/61387/1 diff --git a/includes/DT_ImportJob.php b/includes/DT_ImportJob.php index 09fddd3..0210080 100644 --- a/includes/DT_ImportJob.php +++ b/includes/DT_ImportJob.php @@ -50,14 +50,23 @@ $actual_user = $wgUser; $wgUser = User::newFromId( $this-params['user_id'] ); $text = $this-params['text']; - if ( $for_pages_that_exist == 'append' $this-title-exists() ) { - if ( method_exists( 'WikiPage', 'getContent' ) ) { - // MW = 1.21 - $existingText = $wikiPage-getContent()-getNativeData(); - } else { - $existingText = $article-getContent(); + if ( $this-title-exists() ) { + if ( $for_pages_that_exist == 'append' ) { + if ( method_exists( 'WikiPage', 'getContent' ) ) { + // MW = 1.21 + $existingText = $wikiPage-getContent()-getNativeData(); + } else { + $existingText = $article-getContent(); + } + $text = $existingText . \n . $text; + } elseif ( $for_pages_that_exist == 'merge' ) { + $existingPageStructure = DTPageStructure::newFromTitle( $this-title ); + $newPageStructure = new DTPageStructure; + $newPageStructure-parsePageContents( $text ); + $existingPageStructure-mergeInPageStructure( $newPageStructure ); + return $existingPageStructure-toWikitext(); } - $text = $existingText . \n . $text; + // otherwise, $for_pages_that_exist == 'overwrite' } $edit_summary = $this-params['edit_summary']; if ( method_exists( 'WikiPage', 'getContent' ) ) { diff --git a/includes/DT_PageStructure.php b/includes/DT_PageStructure.php index 3f65f4a..6df693a 100644 --- a/includes/DT_PageStructure.php +++ b/includes/DT_PageStructure.php @@ -39,6 +39,23 @@ $this-mFields[$fieldName] = trim( $fieldValue ); } + public function toWikitext() { + if ( $this-mIsTemplate ) { + $wikitext = '{{' . $this-mTemplateName; + foreach ( $this-mFields as $fieldName = $fieldValue ) { + if ( is_numeric( $fieldName ) ) { + $wikitext .= '|' . $fieldValue; + } else { + $wikitext .= \n|$fieldName=$fieldValue; + } + } + $wikitext .= \n}}; + return $wikitext; + } else { + return $this-mFreeText; + } + } + public function toXML( $isSimplified ) { global $wgDataTransferViewXMLParseFields; global $wgDataTransferViewXMLParseFreeText; @@ -261,6 +278,67 @@ } } + /** +* Helper function for mergeInPageStructure(). +*/ + private function getSingleInstanceTemplates() { + $instancesPerTemplate = array(); + foreach ( $this-mComponents as $pageComponent ) { + if ( $pageComponent-mIsTemplate ) { + $templateName = $pageComponent-mTemplateName; + if ( array_key_exists( $templateName, $instancesPerTemplate ) ) { + $instancesPerTemplate[$templateName]++; + } else { + $instancesPerTemplate[$templateName] = 1; + } + } + } + + $singleInstanceTemplates = array(); + foreach ( $instancesPerTemplate as $templateName = $instances ) { + if ( $instances == 1 ) { + $singleInstanceTemplates[] = $templateName;
[MediaWiki-commits] [Gerrit] ms-be2 new mac addr, new disk layout (720xd) - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/61388 Change subject: ms-be2 new mac addr, new disk layout (720xd) .. ms-be2 new mac addr, new disk layout (720xd) Change-Id: I4c5a61feddc947c93af433f4b655e3aa61760de7 --- M files/autoinstall/netboot.cfg M files/dhcpd/linux-host-entries.ttyS1-115200 M manifests/site.pp 3 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/88/61388/1 diff --git a/files/autoinstall/netboot.cfg b/files/autoinstall/netboot.cfg index 2204274..5850dd1 100755 --- a/files/autoinstall/netboot.cfg +++ b/files/autoinstall/netboot.cfg @@ -47,8 +47,8 @@ mobile100[0-9]) echo partman/mw.cfg ;; \ ms[1-3]) echo partman/raid1-1partition-thumper.cfg ;; \ ms-fe[1-4]) echo partman/raid1-1partition.cfg ;; \ - ms-be[1-2]|ms-be4) echo partman/ms-be.cfg ;; \ - ms-be3|ms-be[5-9]|ms-be1[0-2]) echo partman/ms-be-ssd.cfg ;; \ + ms-be1|ms-be4) echo partman/ms-be.cfg ;; \ + ms-be2|3|ms-be[5-9]|ms-be1[0-2]) echo partman/ms-be-ssd.cfg ;; \ ms-be30[0-9][0-9]) echo partman/raid1-varnish.cfg ;; \ ms-fe100[1-4]) echo partman/raid1-1partition.cfg ;; \ ms-be10[0-9][0-9]) echo partman/ceph-ssd.cfg ;; \ diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 b/files/dhcpd/linux-host-entries.ttyS1-115200 index fb03ca8..e837193 100644 --- a/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -1500,7 +1500,7 @@ } host ms-be2 { - hardware ethernet E8:9A:8F:D3:3E:44; + hardware ethernet 90:B1:1C:18:A6:32; fixed-address ms-be2.pmtpa.wmnet; } diff --git a/manifests/site.pp b/manifests/site.pp index 0ab6fbd..b678f91 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1776,7 +1776,7 @@ include role::swift::pmtpa-prod::proxy } -node /^ms-be(1|2|4|13)\.pmtpa\.wmnet$/ { +node /^ms-be(1|4)\.pmtpa\.wmnet$/ { $all_drives = [ '/dev/sdc', '/dev/sdd', '/dev/sde', '/dev/sdf', '/dev/sdg', '/dev/sdh', '/dev/sdi', '/dev/sdj', '/dev/sdk', '/dev/sdl' ] @@ -1803,7 +1803,7 @@ swift::mount_filesystem{ '/dev/sdn3': } } -node /^ms-be(9|11|12)\.pmtpa\.wmnet$/ { +node /^ms-be(2|9|11|12)\.pmtpa\.wmnet$/ { # the ms-be hosts with ssds have two more disks # this is the 720xds with h710 layout $all_drives = [ '/dev/sdc', '/dev/sdd', '/dev/sde', @@ -1820,7 +1820,7 @@ swift::mount_filesystem{ '/dev/sdb3': } } -node /^ms-be(1|2|4)\.pmtpa\.wmnet$/ { +node /^ms-be(1|4)\.pmtpa\.wmnet$/ { # the ms-be hosts with ssds have two more disks # these are the c2100s, to be gone soon $all_drives = [ '/dev/sdc', '/dev/sdd', '/dev/sde', -- To view, visit https://gerrit.wikimedia.org/r/61388 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c5a61feddc947c93af433f4b655e3aa61760de7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix selser bug while serializing templates; bug in cite output - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/61389 Change subject: Fix selser bug while serializing templates; bug in cite output .. Fix selser bug while serializing templates; bug in cite output * When multiple DOM nodes emitted by a template are unmodified and both happen to have valid DSR, selser emitted tpl source for each such DOM node (which led to duplicate citation output in several cases). This makes selser more robust. * But, the fact that multiple content nodes of an encapsulated tpl/ext. has the same top-level dsr is a different bug. This currently happens with citations because marker metas aren't getting deleted. Initial investigates point to a bug either in the handleLinkNeighbors DOM post-processor or the DOMTraverser class in some edge case. Will be investigated separately. * Based on a bug report submitted on parsoid.wmflabs.org /mnt/bugs/2013-04-29T09:48:52.536Z-Religion_in_Eritrea * Unrelated: Fixed a JSHint warning Change-Id: I8a3808b3d0e36b7e3de7c5f4aa774f78881d63e4 --- M js/lib/mediawiki.WikitextSerializer.js 1 file changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/89/61389/1 diff --git a/js/lib/mediawiki.WikitextSerializer.js b/js/lib/mediawiki.WikitextSerializer.js index 85a2a2c..e4b2838 100644 --- a/js/lib/mediawiki.WikitextSerializer.js +++ b/js/lib/mediawiki.WikitextSerializer.js @@ -675,7 +675,11 @@ // 2. we have an open bracket, and //- text has an unmatched bracket //- the combined text will get parsed as a link (expensive check) - if (cl.hasOpenHeadingChar opts.isLastChild text.match(/=$/) || + // + // NOTE: Escaping the = char in the regexp because JSHint complains that + // it can be confused by other developers. + // See http://jslinterrors.com/a-regular-expression-literal-can-be-confused-with/ + if (cl.hasOpenHeadingChar opts.isLastChild text.match(/\=$/) || cl.hasOpenBrackets text.match(/^[^\[]*\]/) this.wteHandlers.hasWikitextTokens(state, sol, cl.text + text, true)) { @@ -2885,8 +2889,15 @@ node, domHandler); } - var handled = false; - if (state.selserMode !state.inModifiedContent) { + var handled = false, + about = node.getAttribute('about') || null; + + // We have 2 global checks here for selser-mode + // 1. WTS is not in a subtree with a modification flag that applies to every + //node of a subtree (rather than an indication that some node in the + //subtree is modified). + // 2. WTS not processing template content that has already been emitted. + if (state.selserMode !state.inModifiedContent (!about || about !== state.activeTemplateId)) { // To serialize from source, we need 2 things of the node: // -- it should not have a diff marker // -- it should have valid, usable DSR @@ -2936,7 +2947,7 @@ // can be ignored, if necessary. var nodeTypeOf = node.getAttribute( 'typeof' ) || ''; if (nodeTypeOf nodeTypeOf.match(/\bmw:Object(\/[^\s]+|\b)/)) { - state.activeTemplateId = node.getAttribute('about') || null; + state.activeTemplateId = about; } } } -- To view, visit https://gerrit.wikimedia.org/r/61389 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a3808b3d0e36b7e3de7c5f4aa774f78881d63e4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 47653) Processing foreign API files protocol-relative - change (mediawiki/core)
Kai Nissen (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/61390 Change subject: (bug 47653) Processing foreign API files protocol-relative .. (bug 47653) Processing foreign API files protocol-relative Bug: 47653 When a page contains resources being loaded by a foreign wiki's API, the protocol type is being cached by the parser. When a user calls the cached page afterwards, resources that have been originally loaded using an unsecure protocol will always be loaded using an unsecure connection, even if the user requests the page using a secure connection. Some browsers warn the user about that. The patch removes the protocol type from the retrieved 'thumburl', leaving it protocol-relative. Change-Id: Id40186d10019a77f8b827a6a67982d40f3e97f11 --- M includes/filerepo/ForeignAPIRepo.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/61390/1 diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index 5cd6fc2..71129fa 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -236,7 +236,9 @@ if ( $data $info isset( $info['thumburl'] ) ) { wfDebug( __METHOD__ . got remote thumb . $info['thumburl'] . \n ); $result = $info; - return $info['thumburl']; + // replacing protocol type by protocol-relative '//' + $thumbUrl = preg_replace( /^(http\:|https\:)/i, , $info['thumburl'] ); + return $thumbUrl; } else { return false; } -- To view, visit https://gerrit.wikimedia.org/r/61390 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id40186d10019a77f8b827a6a67982d40f3e97f11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Kai Nissen (WMDE) kai.nis...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ms-be2 new mac addr, new disk layout (720xd), remove dup stanza - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: ms-be2 new mac addr, new disk layout (720xd), remove dup stanza .. ms-be2 new mac addr, new disk layout (720xd), remove dup stanza Change-Id: I4c5a61feddc947c93af433f4b655e3aa61760de7 --- M files/autoinstall/netboot.cfg M files/dhcpd/linux-host-entries.ttyS1-115200 M manifests/site.pp 3 files changed, 5 insertions(+), 17 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/files/autoinstall/netboot.cfg b/files/autoinstall/netboot.cfg index 2204274..d6dfae0 100755 --- a/files/autoinstall/netboot.cfg +++ b/files/autoinstall/netboot.cfg @@ -47,8 +47,8 @@ mobile100[0-9]) echo partman/mw.cfg ;; \ ms[1-3]) echo partman/raid1-1partition-thumper.cfg ;; \ ms-fe[1-4]) echo partman/raid1-1partition.cfg ;; \ - ms-be[1-2]|ms-be4) echo partman/ms-be.cfg ;; \ - ms-be3|ms-be[5-9]|ms-be1[0-2]) echo partman/ms-be-ssd.cfg ;; \ + ms-be1|ms-be4) echo partman/ms-be.cfg ;; \ + ms-be[2-3]|ms-be[5-9]|ms-be1[0-2]) echo partman/ms-be-ssd.cfg ;; \ ms-be30[0-9][0-9]) echo partman/raid1-varnish.cfg ;; \ ms-fe100[1-4]) echo partman/raid1-1partition.cfg ;; \ ms-be10[0-9][0-9]) echo partman/ceph-ssd.cfg ;; \ diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 b/files/dhcpd/linux-host-entries.ttyS1-115200 index fb03ca8..e837193 100644 --- a/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -1500,7 +1500,7 @@ } host ms-be2 { - hardware ethernet E8:9A:8F:D3:3E:44; + hardware ethernet 90:B1:1C:18:A6:32; fixed-address ms-be2.pmtpa.wmnet; } diff --git a/manifests/site.pp b/manifests/site.pp index 0ab6fbd..eadc668 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1776,7 +1776,7 @@ include role::swift::pmtpa-prod::proxy } -node /^ms-be(1|2|4|13)\.pmtpa\.wmnet$/ { +node /^ms-be(1|4)\.pmtpa\.wmnet$/ { $all_drives = [ '/dev/sdc', '/dev/sdd', '/dev/sde', '/dev/sdf', '/dev/sdg', '/dev/sdh', '/dev/sdi', '/dev/sdj', '/dev/sdk', '/dev/sdl' ] @@ -1803,7 +1803,7 @@ swift::mount_filesystem{ '/dev/sdn3': } } -node /^ms-be(9|11|12)\.pmtpa\.wmnet$/ { +node /^ms-be(2|9|11|12)\.pmtpa\.wmnet$/ { # the ms-be hosts with ssds have two more disks # this is the 720xds with h710 layout $all_drives = [ '/dev/sdc', '/dev/sdd', '/dev/sde', @@ -1818,18 +1818,6 @@ swift::label_filesystem{ '/dev/sdb3': } swift::mount_filesystem{ '/dev/sda3': } swift::mount_filesystem{ '/dev/sdb3': } -} - -node /^ms-be(1|2|4)\.pmtpa\.wmnet$/ { - # the ms-be hosts with ssds have two more disks - # these are the c2100s, to be gone soon - $all_drives = [ '/dev/sdc', '/dev/sdd', '/dev/sde', - '/dev/sdf', '/dev/sdg', '/dev/sdh', '/dev/sdi', '/dev/sdj', '/dev/sdk', - '/dev/sdl', '/dev/sdm', '/dev/sdn' ] - - include role::swift::pmtpa-prod::storage - - swift::create_filesystem{ $all_drives: partition_nr = 1 } } node /^ms-fe100[1-4]\.eqiad\.wmnet$/ { -- To view, visit https://gerrit.wikimedia.org/r/61388 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4c5a61feddc947c93af433f4b655e3aa61760de7 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@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 gridengine class to be parametrized - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Fix gridengine class to be parametrized .. Fix gridengine class to be parametrized Remove reliance on a global variable for configuration (but keep the global as default for transition purposes) Change-Id: I844113e7c073a30b3afd200d2970a0cb311e44ff --- M modules/gridengine/manifests/exec_host.pp M modules/gridengine/manifests/init.pp M modules/gridengine/manifests/master.pp M modules/gridengine/manifests/shadow_master.pp M modules/gridengine/manifests/submit_host.pp M modules/gridengine/templates/gridengine.preseed.erb 6 files changed, 13 insertions(+), 10 deletions(-) Approvals: Andrew Bogott: Verified; Looks good to me, approved diff --git a/modules/gridengine/manifests/exec_host.pp b/modules/gridengine/manifests/exec_host.pp index 31fa11d..2a5a9a4 100644 --- a/modules/gridengine/manifests/exec_host.pp +++ b/modules/gridengine/manifests/exec_host.pp @@ -1,7 +1,7 @@ # gridengine/exec_host.pp -class gridengine::exec_host { - require gridengine +class gridengine::exec_host($gridmaster = $grid_master) { + require gridengine($gridmaster) package { gridengine-exec: ensure = latest, diff --git a/modules/gridengine/manifests/init.pp b/modules/gridengine/manifests/init.pp index 83e235f..6e44287 100644 --- a/modules/gridengine/manifests/init.pp +++ b/modules/gridengine/manifests/init.pp @@ -1,7 +1,10 @@ # gridengine/init.pp +# +# The gridmaster parameter is used in the template to preseed the package +# installation with the (annoyingly) semi-hardcoded FQDN to the grid +# master server. - -class gridengine { +class gridengine($gridmaster) { file { /var/local/preseed: mode = 0600, ensure = directory, diff --git a/modules/gridengine/manifests/master.pp b/modules/gridengine/manifests/master.pp index 2cc885e..29fc749 100644 --- a/modules/gridengine/manifests/master.pp +++ b/modules/gridengine/manifests/master.pp @@ -2,7 +2,7 @@ class gridengine::master { - require gridengine + require gridengine($fqdn) package { gridengine-master: ensure = latest, diff --git a/modules/gridengine/manifests/shadow_master.pp b/modules/gridengine/manifests/shadow_master.pp index 8f30f0e..b80712b 100644 --- a/modules/gridengine/manifests/shadow_master.pp +++ b/modules/gridengine/manifests/shadow_master.pp @@ -1,8 +1,8 @@ # gridengine.pp -class gridengine::shadow_master { - require gridengine +class gridengine::shadow_master($gridmaster = $grid_master) { + require gridengine($gridmaster) package { gridengine-master: ensure = latest, diff --git a/modules/gridengine/manifests/submit_host.pp b/modules/gridengine/manifests/submit_host.pp index af092d8..767d6f5 100644 --- a/modules/gridengine/manifests/submit_host.pp +++ b/modules/gridengine/manifests/submit_host.pp @@ -1,8 +1,8 @@ # gridengine.pp -class gridengine::submit_host { - require gridengine +class gridengine::submit_host($gridmaster = $grid_master) { + require gridengine($gridmaster) package { gridengine-client: ensure = latest, diff --git a/modules/gridengine/templates/gridengine.preseed.erb b/modules/gridengine/templates/gridengine.preseed.erb index 1f57df1..e41e5fc 100644 --- a/modules/gridengine/templates/gridengine.preseed.erb +++ b/modules/gridengine/templates/gridengine.preseed.erb @@ -1,3 +1,3 @@ gridengine-common shared/gridenginecell string default gridengine-common shared/gridengineconfig boolean true -gridengine-common shared/gridenginemaster string %= grid_master % +gridengine-common shared/gridenginemaster string %= gridmaster % -- To view, visit https://gerrit.wikimedia.org/r/61377 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I844113e7c073a30b3afd200d2970a0cb311e44ff Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: coren mpellet...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@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] Change live hack revision reference to new patchset - change (mediawiki...release)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/61391 Change subject: Change live hack revision reference to new patchset .. Change live hack revision reference to new patchset Change-Id: I748faeebf3d033187cb284e3e6e2bcb40b044b30 --- M make-wmf-branch/default.conf 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/91/61391/1 diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf index c8e85f7..f303f51 100644 --- a/make-wmf-branch/default.conf +++ b/make-wmf-branch/default.conf @@ -182,7 +182,7 @@ $branchPrefix = 'wmf/'; $patches = array( - 'refs/changes/66/22466/4' = 'core', // Most of the WMF live hacks https://gerrit.wikimedia.org/r/#/c/22466 + 'refs/changes/66/22466/5' = 'core', // Most of the WMF live hacks https://gerrit.wikimedia.org/r/#/c/22466 ); $dryRun = false; // Don't actually push anything -- To view, visit https://gerrit.wikimedia.org/r/61391 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I748faeebf3d033187cb284e3e6e2bcb40b044b30 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change live hack revision reference to new patchset - change (mediawiki...release)
Reedy has submitted this change and it was merged. Change subject: Change live hack revision reference to new patchset .. Change live hack revision reference to new patchset Change-Id: I748faeebf3d033187cb284e3e6e2bcb40b044b30 --- M make-wmf-branch/default.conf 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Reedy: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf index c8e85f7..f303f51 100644 --- a/make-wmf-branch/default.conf +++ b/make-wmf-branch/default.conf @@ -182,7 +182,7 @@ $branchPrefix = 'wmf/'; $patches = array( - 'refs/changes/66/22466/4' = 'core', // Most of the WMF live hacks https://gerrit.wikimedia.org/r/#/c/22466 + 'refs/changes/66/22466/5' = 'core', // Most of the WMF live hacks https://gerrit.wikimedia.org/r/#/c/22466 ); $dryRun = false; // Don't actually push anything -- To view, visit https://gerrit.wikimedia.org/r/61391 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I748faeebf3d033187cb284e3e6e2bcb40b044b30 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@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] Enable LVS check for ms-fe.eqiad.wmnet - change (operations/puppet)
Faidon has uploaded a new change for review. https://gerrit.wikimedia.org/r/61392 Change subject: Enable LVS check for ms-fe.eqiad.wmnet .. Enable LVS check for ms-fe.eqiad.wmnet Ceph is going into production, let's make sure it doesn't break without us knowing :-) Change-Id: Ice8ba87416113acd54a045f84961c08fa077d21c --- M manifests/lvs.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/92/61392/1 diff --git a/manifests/lvs.pp b/manifests/lvs.pp index 41a87cb..d5cf87b 100644 --- a/manifests/lvs.pp +++ b/manifests/lvs.pp @@ -954,7 +954,7 @@ monitor_service_lvs_http { rendering.svc.pmtpa.wmnet: ip_address = 10.2.1.21, check_command = check_http_lvs!en.wikipedia.org!/wiki/Main_Page } monitor_service_lvs_http { rendering.svc.eqiad.wmnet: ip_address = 10.2.2.21, check_command = check_http_lvs!en.wikipedia.org!/wiki/Main_Page } monitor_service_lvs_http { ms-fe.pmtpa.wmnet: ip_address = 10.2.1.27, check_command = check_http_lvs!ms-fe.pmtpa.wmnet!/monitoring/backend } - #monitor_service_lvs_http { ms-fe.eqiad.wmnet: ip_address = 10.2.2.27, check_command = check_http_lvs!ms-fe.eqiad.wmnet!/monitoring/backend } + monitor_service_lvs_http { ms-fe.eqiad.wmnet: ip_address = 10.2.2.27, check_command = check_http_lvs!ms-fe.eqiad.wmnet!/monitoring/backend } monitor_service_lvs_http { parsoid.svc.pmtpa.wmnet: ip_address = 10.2.1.28, check_command = check_http_on_port!8000, contact_group = admins,parsoid } monitor_service_lvs_http { parsoid.svc.eqiad.wmnet: ip_address = 10.2.2.28, check_command = check_http_on_port!8000, contact_group = admins,parsoid } monitor_service_lvs_http { parsoidcache.svc.pmtpa.wmnet: ip_address = 10.2.1.29, check_command = check_http_on_port!6081, contact_group = admins,parsoid } -- To view, visit https://gerrit.wikimedia.org/r/61392 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice8ba87416113acd54a045f84961c08fa077d21c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable LVS check for ms-fe.eqiad.wmnet - change (operations/puppet)
Faidon has submitted this change and it was merged. Change subject: Enable LVS check for ms-fe.eqiad.wmnet .. Enable LVS check for ms-fe.eqiad.wmnet Ceph is going into production, let's make sure it doesn't break without us knowing :-) Change-Id: Ice8ba87416113acd54a045f84961c08fa077d21c --- M manifests/lvs.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Faidon: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/lvs.pp b/manifests/lvs.pp index 41a87cb..d5cf87b 100644 --- a/manifests/lvs.pp +++ b/manifests/lvs.pp @@ -954,7 +954,7 @@ monitor_service_lvs_http { rendering.svc.pmtpa.wmnet: ip_address = 10.2.1.21, check_command = check_http_lvs!en.wikipedia.org!/wiki/Main_Page } monitor_service_lvs_http { rendering.svc.eqiad.wmnet: ip_address = 10.2.2.21, check_command = check_http_lvs!en.wikipedia.org!/wiki/Main_Page } monitor_service_lvs_http { ms-fe.pmtpa.wmnet: ip_address = 10.2.1.27, check_command = check_http_lvs!ms-fe.pmtpa.wmnet!/monitoring/backend } - #monitor_service_lvs_http { ms-fe.eqiad.wmnet: ip_address = 10.2.2.27, check_command = check_http_lvs!ms-fe.eqiad.wmnet!/monitoring/backend } + monitor_service_lvs_http { ms-fe.eqiad.wmnet: ip_address = 10.2.2.27, check_command = check_http_lvs!ms-fe.eqiad.wmnet!/monitoring/backend } monitor_service_lvs_http { parsoid.svc.pmtpa.wmnet: ip_address = 10.2.1.28, check_command = check_http_on_port!8000, contact_group = admins,parsoid } monitor_service_lvs_http { parsoid.svc.eqiad.wmnet: ip_address = 10.2.2.28, check_command = check_http_on_port!8000, contact_group = admins,parsoid } monitor_service_lvs_http { parsoidcache.svc.pmtpa.wmnet: ip_address = 10.2.1.29, check_command = check_http_on_port!6081, contact_group = admins,parsoid } -- To view, visit https://gerrit.wikimedia.org/r/61392 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ice8ba87416113acd54a045f84961c08fa077d21c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org Gerrit-Reviewer: Faidon fai...@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] Make api/server.js directly executable. - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/61393 Change subject: Make api/server.js directly executable. .. Make api/server.js directly executable. Change-Id: I84d922bdc1f388e816d5ea5208a5aa75f9a696c4 --- M js/api/server.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/93/61393/1 diff --git a/js/api/server.js b/js/api/server.js old mode 100644 new mode 100755 index 9827e11..e85834d --- a/js/api/server.js +++ b/js/api/server.js @@ -1,3 +1,4 @@ +#!/usr/bin/env node /** * A very basic cluster-based server runner. Restarts failed workers, but does * not much else right now. -- To view, visit https://gerrit.wikimedia.org/r/61393 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84d922bdc1f388e816d5ea5208a5aa75f9a696c4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott wikime...@cscott.net ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ability to batch pages-logging dump (works aoround wikidata ... - change (operations/dumps)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/61394 Change subject: ability to batch pages-logging dump (works aoround wikidata issue) .. ability to batch pages-logging dump (works aoround wikidata issue) Change-Id: Iccdbec2387fd6b624b77d76e303f45ff7edb8d40 --- M xmldumps-backup/WikiDump.py M xmldumps-backup/worker.py 2 files changed, 93 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dumps refs/changes/94/61394/1 diff --git a/xmldumps-backup/WikiDump.py b/xmldumps-backup/WikiDump.py index 2e71b42..ad22b7d 100644 --- a/xmldumps-backup/WikiDump.py +++ b/xmldumps-backup/WikiDump.py @@ -235,6 +235,9 @@ checkpointTime : 0, #otherformats: { multistream : 0, + # pageslogging : { + # number of rows to request in a single query, default is no batch, do them all + loggingBatchsize : 0, } self.conf = ConfigParser.SafeConfigParser(defaults) self.conf.read(self.files) @@ -300,6 +303,10 @@ self.conf.add_section('cleanup') self.keep = self.conf.getint(cleanup, keep) + if not self.conf.has_section('pageslogging'): + self.conf.add_section('pageslogging') + self.loggingBatchsize = self.conf.getint(pageslogging,batchsize) + def parseConfFilePerProject(self, projectName = False): # we need to read from the project section without falling back # to the defaults, which has_option() normally does, ugh. so set diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py index efa3e68..e998f9c 100644 --- a/xmldumps-backup/worker.py +++ b/xmldumps-backup/worker.py @@ -2949,26 +2949,100 @@ def getFileExt(self): return gz + def getMaxLogID(self, runner): + dbServerInfo = DbServerInfo(runner.wiki, runner.dbName) + query = select MAX(log_id) from logging; + results = None + retries = 0 + maxretries = 5 + results = dbServerInfo.runSqlAndGetOutput(query) + while (results == None and retries maxretries): + retries = retries + 1 + time.sleep(5) + results = dbServerInfo.runSqlAndGetOutput(query) + if (not results): + return None + lines = results.splitlines() + if (lines and lines[1]): + return int(lines[1]) + else: + return None + + def getTempFilename(self, name, number): + return name + - + str(number) + def run(self, runner): self.cleanupOldFiles(runner.dumpDir) files = self.listOutputFilesForBuildCommand(runner.dumpDir) if (len(files) 1): raise BackupError(logging table job wants to produce more than one output file) - logging = runner.dumpDir.filenamePublicPath(files[0]) + outputFileObj = files[0] if (not exists( runner.wiki.config.php ) ): raise BackupError(php command %s not found % runner.wiki.config.php) scriptCommand = MultiVersion.MWScriptAsArray(runner.wiki.config, dumpBackup.php) - command = [ %s % runner.wiki.config.php, -q ] - command.extend(scriptCommand) - command.extend([--wiki=%s % runner.dbName, - --logs, --report=1, - %s % runner.forceNormalOption(), - --output=gzip:%s % logging ]) - pipeline = [ command ] - series = [ pipeline ] - error = runner.runCommand([ series ], callbackStderr=self.progressCallback, callbackStderrArg=runner) - if (error): - raise BackupError(error dimping log files) + + # do logging table in batches to avoid taking days to dump (wikidata for example) + maxLogId = self.getMaxLogID(runner) + if not maxLogId: + raise BackupError(error retrieving max id from logging table) + + batchsize = runner.wiki.config.loggingBatchsize + if batchsize: + startId = 0 + tempFiles = [] + tempFileObjs = [] + while startId maxLogId: + endId = startId + batchsize + fileObjThisBatch = DumpFilename(runner.wiki, outputFileObj.date, self.getTempFilename(outputFileObj.dumpName,startId),
[MediaWiki-commits] [Gerrit] Added limited-overwrite/merge option for importing XML or CSV - change (mediawiki...DataTransfer)
Yaron Koren has submitted this change and it was merged. Change subject: Added limited-overwrite/merge option for importing XML or CSV .. Added limited-overwrite/merge option for importing XML or CSV Change-Id: If308b926be2d17f0fdb3278f1e54cab41b2bd96d --- M includes/DT_ImportJob.php M includes/DT_PageStructure.php M includes/DT_Utils.php M languages/DT_Messages.php 4 files changed, 102 insertions(+), 7 deletions(-) Approvals: Yaron Koren: Verified; Looks good to me, approved diff --git a/includes/DT_ImportJob.php b/includes/DT_ImportJob.php index 09fddd3..0210080 100644 --- a/includes/DT_ImportJob.php +++ b/includes/DT_ImportJob.php @@ -50,14 +50,23 @@ $actual_user = $wgUser; $wgUser = User::newFromId( $this-params['user_id'] ); $text = $this-params['text']; - if ( $for_pages_that_exist == 'append' $this-title-exists() ) { - if ( method_exists( 'WikiPage', 'getContent' ) ) { - // MW = 1.21 - $existingText = $wikiPage-getContent()-getNativeData(); - } else { - $existingText = $article-getContent(); + if ( $this-title-exists() ) { + if ( $for_pages_that_exist == 'append' ) { + if ( method_exists( 'WikiPage', 'getContent' ) ) { + // MW = 1.21 + $existingText = $wikiPage-getContent()-getNativeData(); + } else { + $existingText = $article-getContent(); + } + $text = $existingText . \n . $text; + } elseif ( $for_pages_that_exist == 'merge' ) { + $existingPageStructure = DTPageStructure::newFromTitle( $this-title ); + $newPageStructure = new DTPageStructure; + $newPageStructure-parsePageContents( $text ); + $existingPageStructure-mergeInPageStructure( $newPageStructure ); + return $existingPageStructure-toWikitext(); } - $text = $existingText . \n . $text; + // otherwise, $for_pages_that_exist == 'overwrite' } $edit_summary = $this-params['edit_summary']; if ( method_exists( 'WikiPage', 'getContent' ) ) { diff --git a/includes/DT_PageStructure.php b/includes/DT_PageStructure.php index 3f65f4a..6df693a 100644 --- a/includes/DT_PageStructure.php +++ b/includes/DT_PageStructure.php @@ -39,6 +39,23 @@ $this-mFields[$fieldName] = trim( $fieldValue ); } + public function toWikitext() { + if ( $this-mIsTemplate ) { + $wikitext = '{{' . $this-mTemplateName; + foreach ( $this-mFields as $fieldName = $fieldValue ) { + if ( is_numeric( $fieldName ) ) { + $wikitext .= '|' . $fieldValue; + } else { + $wikitext .= \n|$fieldName=$fieldValue; + } + } + $wikitext .= \n}}; + return $wikitext; + } else { + return $this-mFreeText; + } + } + public function toXML( $isSimplified ) { global $wgDataTransferViewXMLParseFields; global $wgDataTransferViewXMLParseFreeText; @@ -261,6 +278,67 @@ } } + /** +* Helper function for mergeInPageStructure(). +*/ + private function getSingleInstanceTemplates() { + $instancesPerTemplate = array(); + foreach ( $this-mComponents as $pageComponent ) { + if ( $pageComponent-mIsTemplate ) { + $templateName = $pageComponent-mTemplateName; + if ( array_key_exists( $templateName, $instancesPerTemplate ) ) { + $instancesPerTemplate[$templateName]++; + } else { + $instancesPerTemplate[$templateName] = 1; + } + } + } + + $singleInstanceTemplates = array(); + foreach ( $instancesPerTemplate as $templateName = $instances ) { + if ( $instances == 1 ) { + $singleInstanceTemplates[] = $templateName; + } + } + return
[MediaWiki-commits] [Gerrit] ability to batch pages-logging dump (works aoround wikidata ... - change (operations/dumps)
ArielGlenn has submitted this change and it was merged. Change subject: ability to batch pages-logging dump (works aoround wikidata issue) .. ability to batch pages-logging dump (works aoround wikidata issue) Change-Id: Iccdbec2387fd6b624b77d76e303f45ff7edb8d40 --- M xmldumps-backup/WikiDump.py M xmldumps-backup/worker.py 2 files changed, 93 insertions(+), 12 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/xmldumps-backup/WikiDump.py b/xmldumps-backup/WikiDump.py index 2e71b42..ad22b7d 100644 --- a/xmldumps-backup/WikiDump.py +++ b/xmldumps-backup/WikiDump.py @@ -235,6 +235,9 @@ checkpointTime : 0, #otherformats: { multistream : 0, + # pageslogging : { + # number of rows to request in a single query, default is no batch, do them all + loggingBatchsize : 0, } self.conf = ConfigParser.SafeConfigParser(defaults) self.conf.read(self.files) @@ -300,6 +303,10 @@ self.conf.add_section('cleanup') self.keep = self.conf.getint(cleanup, keep) + if not self.conf.has_section('pageslogging'): + self.conf.add_section('pageslogging') + self.loggingBatchsize = self.conf.getint(pageslogging,batchsize) + def parseConfFilePerProject(self, projectName = False): # we need to read from the project section without falling back # to the defaults, which has_option() normally does, ugh. so set diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py index efa3e68..e998f9c 100644 --- a/xmldumps-backup/worker.py +++ b/xmldumps-backup/worker.py @@ -2949,26 +2949,100 @@ def getFileExt(self): return gz + def getMaxLogID(self, runner): + dbServerInfo = DbServerInfo(runner.wiki, runner.dbName) + query = select MAX(log_id) from logging; + results = None + retries = 0 + maxretries = 5 + results = dbServerInfo.runSqlAndGetOutput(query) + while (results == None and retries maxretries): + retries = retries + 1 + time.sleep(5) + results = dbServerInfo.runSqlAndGetOutput(query) + if (not results): + return None + lines = results.splitlines() + if (lines and lines[1]): + return int(lines[1]) + else: + return None + + def getTempFilename(self, name, number): + return name + - + str(number) + def run(self, runner): self.cleanupOldFiles(runner.dumpDir) files = self.listOutputFilesForBuildCommand(runner.dumpDir) if (len(files) 1): raise BackupError(logging table job wants to produce more than one output file) - logging = runner.dumpDir.filenamePublicPath(files[0]) + outputFileObj = files[0] if (not exists( runner.wiki.config.php ) ): raise BackupError(php command %s not found % runner.wiki.config.php) scriptCommand = MultiVersion.MWScriptAsArray(runner.wiki.config, dumpBackup.php) - command = [ %s % runner.wiki.config.php, -q ] - command.extend(scriptCommand) - command.extend([--wiki=%s % runner.dbName, - --logs, --report=1, - %s % runner.forceNormalOption(), - --output=gzip:%s % logging ]) - pipeline = [ command ] - series = [ pipeline ] - error = runner.runCommand([ series ], callbackStderr=self.progressCallback, callbackStderrArg=runner) - if (error): - raise BackupError(error dimping log files) + + # do logging table in batches to avoid taking days to dump (wikidata for example) + maxLogId = self.getMaxLogID(runner) + if not maxLogId: + raise BackupError(error retrieving max id from logging table) + + batchsize = runner.wiki.config.loggingBatchsize + if batchsize: + startId = 0 + tempFiles = [] + tempFileObjs = [] + while startId maxLogId: + endId = startId + batchsize + fileObjThisBatch = DumpFilename(runner.wiki, outputFileObj.date, self.getTempFilename(outputFileObj.dumpName,startId), outputFileObj.fileType, outputFileObj.fileExt) +