[MediaWiki-commits] [Gerrit] hhvm: ensure that jemalloc heap profiling is disabled. - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/171515 Change subject: hhvm: ensure that jemalloc heap profiling is disabled. .. hhvm: ensure that jemalloc heap profiling is disabled. This means that if you want to capture heap profiles, you have to temporarily disable Puppet. But that's OK, because you should not have heap profiling turned on in production for more than a few hours. This way we can be sure we're not forgetting to turn it off (which results in degraded performance and junk in /var/tmp/hhvm). Change-Id: I4f3534ea2aaf67c6ee29267ab9843933b8390de8 --- M modules/mediawiki/manifests/hhvm.pp 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/15/171515/1 diff --git a/modules/mediawiki/manifests/hhvm.pp b/modules/mediawiki/manifests/hhvm.pp index c151f14..5d32743 100644 --- a/modules/mediawiki/manifests/hhvm.pp +++ b/modules/mediawiki/manifests/hhvm.pp @@ -78,6 +78,16 @@ } +# Ensure that jemalloc heap profiling is disabled. This means that +# if you want to capture heap profiles, you have to disable Puppet. +# But this way we can be sure we're not forgetting to turn it off. + +exec { 'ensure_jemalloc_prof_deactivated': +command = '/bin/true', +unless = '/usr/bin/curl -fs http://localhost:9005/jemalloc-prof-deactivate', +} + + # Once a day, check the uptime of HHVM. If HHVM has been running # for more than a day, restart it. We do this as a form of insurance # against subtle memory leaks. A graceful restart once a day is -- To view, visit https://gerrit.wikimedia.org/r/171515 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f3534ea2aaf67c6ee29267ab9843933b8390de8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Disable l10nupdate for the duration of CLDR 26 plura... - change (operations/puppet)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/171516 Change subject: Revert Disable l10nupdate for the duration of CLDR 26 plural migration .. Revert Disable l10nupdate for the duration of CLDR 26 plural migration Migration period is now over. This reverts commit 5b02e75232620d8050ada203ec36918ad74860af. Change-Id: I184eecfd4f1de866d22736995f442cf14711fd41 --- M manifests/misc/deployment.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/16/171516/1 diff --git a/manifests/misc/deployment.pp b/manifests/misc/deployment.pp index d831843..f5a7389 100644 --- a/manifests/misc/deployment.pp +++ b/manifests/misc/deployment.pp @@ -213,7 +213,7 @@ require misc::deployment::scap_scripts cron { 'l10nupdate': -ensure = absent, +ensure = present, command = '/usr/local/bin/l10nupdate-1 --verbose /var/log/l10nupdatelog/l10nupdate.log 21', user= 'l10nupdate', hour= 2, -- To view, visit https://gerrit.wikimedia.org/r/171516 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I184eecfd4f1de866d22736995f442cf14711fd41 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production 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] Remove triggering of unused global events on wb - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/171517 Change subject: Remove triggering of unused global events on wb .. Remove triggering of unused global events on wb Change-Id: I0ec30277b2babde7eec055ef5c2ed8d0f4dec885 --- M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js 1 file changed, 0 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/17/171517/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js index 202faa2..4bb7639 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js @@ -113,25 +113,6 @@ PARENT.prototype._create.call( this ); this._createWidgets(); - - var self = this; - this.element - // TODO: Move that code to a sensible place (see jQuery.wikibase.entityview): - .on( 'fingerprintviewafterstartediting.' + this.widgetName, function( event ) { - $( wb ).trigger( 'startItemPageEditMode', [ - self.element, - { - exclusive: false, - wbCopyrightWarningGravity: 'sw' - } - ] ); - } ) - .on( 'fingerprintviewafterstopediting.' + this.widgetName, function( event, dropValue ) { - $( wb ).trigger( 'stopItemPageEditMode', [ - self.element, - { save: dropValue !== true } - ] ); - } ); }, /** -- To view, visit https://gerrit.wikimedia.org/r/171517 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ec30277b2babde7eec055ef5c2ed8d0f4dec885 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make wikibase lazily initiable - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/171518 Change subject: Make wikibase lazily initiable .. Make wikibase lazily initiable Change-Id: I82aab6f9b2a1e77a393495b5bef5904bfa25c64c --- M lib/resources/wikibase.js 1 file changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/18/171518/1 diff --git a/lib/resources/wikibase.js b/lib/resources/wikibase.js index b57abbd..432e898 100644 --- a/lib/resources/wikibase.js +++ b/lib/resources/wikibase.js @@ -6,11 +6,11 @@ * @author Daniel Werner daniel.werner at wikimedia.de */ -/** - * Global 'Wikibase' extension singleton. - * @since 0.1 - */ -this.wikibase = this.wb = new ( function Wb( mw, $ ) { +this.wikibase = this.wikibase || {}; + +this.wb = this.wikibase; + +( function ( wb, mw, $ ) { 'use strict'; /** @@ -23,7 +23,7 @@ * * @return {Object} Set of languages (empty object when ULS is not available) */ - this.getLanguages = function() { + wb.getLanguages = function() { return ( $.uls !== undefined ) ? $.uls.data.languages : {}; }; @@ -34,8 +34,8 @@ * @param {string} langCode * @return string */ - this.getLanguageNameByCode = function( langCode ) { - var language = this.getLanguages()[ langCode ]; + wb.getLanguageNameByCode = function( langCode ) { + var language = wb.getLanguages()[ langCode ]; if( language language[2] ) { return language[2]; } @@ -46,11 +46,11 @@ * Same getLanguageNameByCode but on user UI native language instead, fallbacks * to getLanguageNameByCode in cases native translation wasn't available */ - this.getNativeLanguageNameByCode = function( langCode ) { + wb.getNativeLanguageNameByCode = function( langCode ) { var ulsLanguages = mw.config.get( 'wgULSLanguages' ); return ( ulsLanguages ulsLanguages[langCode] ) ? ulsLanguages[langCode] : - this.getLanguageNameByCode( langCode ); + wb.getLanguageNameByCode( langCode ); }; -} )( mediaWiki, jQuery ); +} )( wikibase, mediaWiki, jQuery ); -- To view, visit https://gerrit.wikimedia.org/r/171518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82aab6f9b2a1e77a393495b5bef5904bfa25c64c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] icinga: Send betalabs alerts to alerts list - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/171519 Change subject: icinga: Send betalabs alerts to alerts list .. icinga: Send betalabs alerts to alerts list https://phabricator.wikimedia.org/T789 Change-Id: Idf1b95cb3124dab5ca368273d23704ca8567b77d --- M modules/icinga/files/contactgroups.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/19/171519/1 diff --git a/modules/icinga/files/contactgroups.cfg b/modules/icinga/files/contactgroups.cfg index 958041e..47eb717 100644 --- a/modules/icinga/files/contactgroups.cfg +++ b/modules/icinga/files/contactgroups.cfg @@ -36,7 +36,7 @@ define contactgroup { contactgroup_name betalabs -members gregg,amusso,cmcmahon,yuvipanda,kart,irc-qa +members gregg,amusso,cmcmahon,yuvipanda,kart,irc-qa,betacluster-alerts-list } define contactgroup { -- To view, visit https://gerrit.wikimedia.org/r/171519 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf1b95cb3124dab5ca368273d23704ca8567b77d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] icinga: Send betalabs alerts to alerts list - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: icinga: Send betalabs alerts to alerts list .. icinga: Send betalabs alerts to alerts list Bug: T789 Change-Id: Idf1b95cb3124dab5ca368273d23704ca8567b77d --- M modules/icinga/files/contactgroups.cfg 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/icinga/files/contactgroups.cfg b/modules/icinga/files/contactgroups.cfg index 958041e..47eb717 100644 --- a/modules/icinga/files/contactgroups.cfg +++ b/modules/icinga/files/contactgroups.cfg @@ -36,7 +36,7 @@ define contactgroup { contactgroup_name betalabs -members gregg,amusso,cmcmahon,yuvipanda,kart,irc-qa +members gregg,amusso,cmcmahon,yuvipanda,kart,irc-qa,betacluster-alerts-list } define contactgroup { -- To view, visit https://gerrit.wikimedia.org/r/171519 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idf1b95cb3124dab5ca368273d23704ca8567b77d Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@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] reverted last commit - change (mediawiki...BlueSpiceExtensions)
Tweichart has uploaded a new change for review. https://gerrit.wikimedia.org/r/171520 Change subject: reverted last commit .. reverted last commit Change-Id: I5e06558aedbff367c972e17bc3a0e39a6ed68c0e --- M Checklist/resources/bluespice.checklist.js 1 file changed, 42 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/20/171520/1 diff --git a/Checklist/resources/bluespice.checklist.js b/Checklist/resources/bluespice.checklist.js index 964d284..f21f0bc 100644 --- a/Checklist/resources/bluespice.checklist.js +++ b/Checklist/resources/bluespice.checklist.js @@ -22,11 +22,11 @@ menuButton: false, lastCommand: mceBsCheckbox, lastCommandKey: false, - + init: function () { /*alert('check');*/ }, - + click: function(elem) { $.ajax({ type: GET, @@ -42,7 +42,7 @@ } }); }, - + change: function(elem) { elem.style.color=elem.options[elem.selectedIndex].style.color; $.ajax({ @@ -59,12 +59,12 @@ } }); }, - + getOptionsList: function(listId) { if ( listId in BsChecklist.optionsLists ) { return BsChecklist.optionsLists[listId]; } - + $.ajax({ type: GET, url: bs.util.getAjaxDispatcherUrl( 'Checklist::getOptionsList' ), @@ -77,15 +77,15 @@ BsChecklist.optionsLists[listId] = eval(result); } }); - + return BsChecklist.optionsLists[listId]; }, - + changeSelect: function(elem) { var value = $(elem).find(:selected).text(); tinymce.activeEditor.dom.setAttrib(elem.parentNode, 'data-bs-value', value); }, - + makeCheckbox: function(checked) { var innerText; innerText = 'button contentEditable=false class=bsClickableElement '; @@ -107,9 +107,9 @@ var optionSet = options[i].split(|); var optionValue = optionSet[0]; var optionColor = optionSet[1]; - + if ( !selectedColor optionColor ) selectedColor = 'style=color:'+optionColor+'; '; - + innerText += 'option '; if ( optionColor ) innerText += 'style=color:'+optionColor+'; '; if ( optionValue == valueText ) { @@ -122,12 +122,12 @@ innerText = innerText.replace({color}, selectedColor); return innerText; }, - + makeAndRegisterCheckboxSpecialTag: function(ed, checked) { var id = ed.plugins.bswikicode.getSpecialTagList().length; ed.plugins.bswikicode.getSpecialTagList().push('bs:checklist value= /'); var node = ed.dom.create( - 'div', + 'span', { 'id' : bs_specialtag:@@@ST+id+@@@, 'class' : mceNonEditable tag, @@ -136,16 +136,16 @@ 'data-bs-id' : id, 'data-bs-value' : false, 'data-bs-cbtype' : checkbox - }, + }, BsChecklist.makeCheckbox(checked)); return node; }, - + makeAndRegisterSelectboxSpecialTag: function(ed, listname, value) { var id = ed.plugins.bswikicode.getSpecialTagList().length; ed.plugins.bswikicode.getSpecialTagList().push('bs:checklist type=list value= list='+listname+'/'); var node = ed.dom.create( - 'div', + 'span', { 'id' : bs_specialtag:@@@ST+id+@@@, 'class' : mceNonEditable tag, @@ -154,7 +154,7 @@ 'data-bs-id' : id, 'data-bs-value' : false, 'data-bs-cbtype' : list - }, + }, BsChecklist.makeSelectbox(listname, value)); return node; } @@
[MediaWiki-commits] [Gerrit] reverted last commit - change (mediawiki...BlueSpiceExtensions)
Pwirth has submitted this change and it was merged. Change subject: reverted last commit .. reverted last commit Change-Id: I5e06558aedbff367c972e17bc3a0e39a6ed68c0e --- M Checklist/resources/bluespice.checklist.js 1 file changed, 42 insertions(+), 34 deletions(-) Approvals: Pwirth: Verified; Looks good to me, approved diff --git a/Checklist/resources/bluespice.checklist.js b/Checklist/resources/bluespice.checklist.js index 964d284..f21f0bc 100644 --- a/Checklist/resources/bluespice.checklist.js +++ b/Checklist/resources/bluespice.checklist.js @@ -22,11 +22,11 @@ menuButton: false, lastCommand: mceBsCheckbox, lastCommandKey: false, - + init: function () { /*alert('check');*/ }, - + click: function(elem) { $.ajax({ type: GET, @@ -42,7 +42,7 @@ } }); }, - + change: function(elem) { elem.style.color=elem.options[elem.selectedIndex].style.color; $.ajax({ @@ -59,12 +59,12 @@ } }); }, - + getOptionsList: function(listId) { if ( listId in BsChecklist.optionsLists ) { return BsChecklist.optionsLists[listId]; } - + $.ajax({ type: GET, url: bs.util.getAjaxDispatcherUrl( 'Checklist::getOptionsList' ), @@ -77,15 +77,15 @@ BsChecklist.optionsLists[listId] = eval(result); } }); - + return BsChecklist.optionsLists[listId]; }, - + changeSelect: function(elem) { var value = $(elem).find(:selected).text(); tinymce.activeEditor.dom.setAttrib(elem.parentNode, 'data-bs-value', value); }, - + makeCheckbox: function(checked) { var innerText; innerText = 'button contentEditable=false class=bsClickableElement '; @@ -107,9 +107,9 @@ var optionSet = options[i].split(|); var optionValue = optionSet[0]; var optionColor = optionSet[1]; - + if ( !selectedColor optionColor ) selectedColor = 'style=color:'+optionColor+'; '; - + innerText += 'option '; if ( optionColor ) innerText += 'style=color:'+optionColor+'; '; if ( optionValue == valueText ) { @@ -122,12 +122,12 @@ innerText = innerText.replace({color}, selectedColor); return innerText; }, - + makeAndRegisterCheckboxSpecialTag: function(ed, checked) { var id = ed.plugins.bswikicode.getSpecialTagList().length; ed.plugins.bswikicode.getSpecialTagList().push('bs:checklist value= /'); var node = ed.dom.create( - 'div', + 'span', { 'id' : bs_specialtag:@@@ST+id+@@@, 'class' : mceNonEditable tag, @@ -136,16 +136,16 @@ 'data-bs-id' : id, 'data-bs-value' : false, 'data-bs-cbtype' : checkbox - }, + }, BsChecklist.makeCheckbox(checked)); return node; }, - + makeAndRegisterSelectboxSpecialTag: function(ed, listname, value) { var id = ed.plugins.bswikicode.getSpecialTagList().length; ed.plugins.bswikicode.getSpecialTagList().push('bs:checklist type=list value= list='+listname+'/'); var node = ed.dom.create( - 'div', + 'span', { 'id' : bs_specialtag:@@@ST+id+@@@, 'class' : mceNonEditable tag, @@ -154,7 +154,7 @@ 'data-bs-id' : id, 'data-bs-value' : false, 'data-bs-cbtype' : list - }, + }, BsChecklist.makeSelectbox(listname, value)); return node; } @@ -168,7 +168,7 @@ if ( type != 'bs:checklist' ) return false; var ed =
[MediaWiki-commits] [Gerrit] fingerprintgroupview: Reset edit mode when an error occurs w... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: fingerprintgroupview: Reset edit mode when an error occurs while saving .. fingerprintgroupview: Reset edit mode when an error occurs while saving Bug: 72311 Change-Id: I82eb9a39360b3469dd6f386ef3fba84e80768f63 --- M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js 4 files changed, 60 insertions(+), 10 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js index 32b92a4..5c4c653 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js @@ -196,10 +196,19 @@ this.disable(); - this.$fingerprintlistview.one( - 'fingerprintlistviewafterstopediting', + this.$fingerprintlistview + .one( + 'fingerprintlistviewafterstopediting.fingerprintgroupviewstopediting', function( event, dropValue ) { self._afterStopEditing( dropValue ); + self.$fingerprintlistview.off( '.fingerprintgroupviewstopediting' ); + } + ) + .one( + 'fingerprintlistviewtoggleerror.fingerprintgroupviewstopediting', + function( event, dropValue ) { + self.enable(); + self.$fingerprintlistview.off( '.fingerprintgroupviewstopediting' ); } ); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js index 2dec501..a1a580e 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js @@ -251,9 +251,19 @@ function addStopEditToQueue( $queue, fingerprintview, dropValue ) { $queue.queue( 'stopediting', function( next ) { fingerprintview.element - .one( 'fingerprintviewafterstopediting.fingerprintviewlistview', function( event ) { - setTimeout( next, 0 ); - } ); + .one( 'fingerprintviewafterstopediting.fingerprintlistviewstopediting', + function( event ) { + fingerprintview.element.off( '.fingerprintlistviewstopediting' ); + setTimeout( next, 0 ); + } + ) + .one( 'fingerprintviewtoggleerror.fingerprintlistviewstopediting', + function( event ) { + fingerprintview.element.off( '.fingerprintlistviewstopediting' ); + $queue.clearQueue(); + self._resetEditMode(); + } + ); fingerprintview.stopEditing( dropValue ); } ); } @@ -274,6 +284,17 @@ $queue.dequeue( 'stopediting' ); }, + _resetEditMode: function() { + this.enable(); + + var listview = this.element.data( 'listview' ), + lia = listview.listItemAdapter(); + + listview.items().each( function() { + lia.liInstance( $( this ) ).startEditing(); + } ); + }, + /** * @param {boolean} dropValue */ diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js index 202faa2..6b45f48 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js @@ -293,12 +293,23 @@ * @param {boolean} dropValue */ function addStopEditToQueue( $queue, widget, dropValue ) { - var eventName = widget.widgetEventPrefix + 'afterstopediting';
[MediaWiki-commits] [Gerrit] Remove sitelinkview when hitting backspace in first input - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove sitelinkview when hitting backspace in first input .. Remove sitelinkview when hitting backspace in first input Requires ValueView 0.7.1 to work properly. Change-Id: I69c3dc959b67f329d988d773a7bc18622e1b0983 --- M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js 1 file changed, 44 insertions(+), 0 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js index 757fa38..10b9fc9 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js @@ -145,6 +145,16 @@ event.stopPropagation(); self.setError( error ); } ) + .on( 'keydown.' + this.widgetName, function( event ) { + if( event.keyCode === $.ui.keyCode.BACKSPACE ) { + var $sitelinkview = $( event.target ).closest( ':wikibase-sitelinkview' ), + sitelinkview = $sitelinkview.data( 'sitelinkview' ); + + if( sitelinkview ) { + self._removeSitelinkviewIfEmpty( sitelinkview ); + } + } + } ) .on( [ prefix + 'create.' + this.widgetName, @@ -193,6 +203,40 @@ }, /** +* @param {jQuery.wikibase.sitelinkview} sitelinkview +*/ + _removeSitelinkviewIfEmpty: function( sitelinkview ) { + var $sitelinkview = sitelinkview.element, + listview = this.$listview.data( 'listview' ), + lia = listview.listItemAdapter(), + $items = listview.items(), + isLast = $sitelinkview.get( 0 ) === $items.last().get( 0 ), + isEmpty = sitelinkview.isEmpty() + || sitelinkview.option( 'value' ) !sitelinkview.value(); + + if( isEmpty ) { + event.preventDefault(); + event.stopPropagation(); + + // Shift focus to previous line or to following line if there is no previous: + $items.each( function( i ) { + if( this === $sitelinkview.get( 0 ) ) { + if( i 0 ) { + lia.liInstance( $items.eq( i - 1 ) ).focus(); + } else if( $items.length 1 ) { + lia.liInstance( $items.eq( i + 1 ) ).focus(); + } + return false; + } + } ); + + if( !isLast ) { + listview.removeItem( $sitelinkview ); + } + } + }, + + /** * @return {string[]} */ _getUnusedAllowedSiteIds: function() { -- To view, visit https://gerrit.wikimedia.org/r/168294 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69c3dc959b67f329d988d773a7bc18622e1b0983 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@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] $.wikibase.sitelinklistview: Implemented dynamic input elements - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: $.wikibase.sitelinklistview: Implemented dynamic input elements .. $.wikibase.sitelinklistview: Implemented dynamic input elements Along with the change, the now obsolete add toolbar initialized on sitelinkgroupview is removed. Bug: 72023 Change-Id: I33bddf76ea63d53e41dea3f01514851541d84407 --- M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js M repo/resources/wikibase.ui.entityViewInit.js 3 files changed, 84 insertions(+), 96 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js index 7726ef8..34ad5f4 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js @@ -418,92 +418,6 @@ } } ); -$.wikibase.toolbarcontroller.definition( 'addtoolbar', { - id: 'sitelinkgroupview-sitelinklistview', - selector: ':' + $.wikibase.sitelinkgroupview.prototype.namespace - + '-' + $.wikibase.sitelinkgroupview.prototype.widgetName, - events: { - sitelinkgroupviewafterstartediting: function( event, toolbarcontroller ) { - var $sitelinkgroupview = $( event.target ), - sitelinkgroupview = $sitelinkgroupview.data( 'sitelinkgroupview' ), - $sitelinklistview =sitelinkgroupview.$sitelinklistview, - sitelinklistview = $sitelinklistview.data( 'sitelinklistview' ); - - $sitelinklistview - .addtoolbar( { - $container: $( 'span/' ).appendTo( sitelinklistview.$tfoot.find( 'td' ).last() ) - } ) - .on( 'addtoolbaradd.addtoolbar', function() { - sitelinklistview.$listview.one( - 'sitelinkviewafterstartediting', - function( event ) { - $( event.target ).data( 'sitelinkview' ).focus(); - } - ); - - $sitelinklistview.data( 'sitelinklistview' ).enterNewItem(); - - // Re-focus add button after having added or having cancelled adding a link: - var eventName = 'sitelinklistviewafterstopediting.addtoolbar'; - $sitelinklistview.one( eventName, function( event ) { - $sitelinklistview.data( 'addtoolbar' ).focus(); - } ); - } ); - - if( sitelinklistview.isFull() ) { - $sitelinklistview.data( 'addtoolbar' ).disable(); - } - }, - sitelinkgroupviewafterstopediting: function( event, toolbarcontroller ) { - var $sitelinkgroupview = $( event.target ), - sitelinkgroupview = $sitelinkgroupview.data( 'sitelinkgroupview' ), - $sitelinklistview = sitelinkgroupview.$sitelinklistview; - - toolbarcontroller.destroyToolbar( $sitelinklistview.data( 'addtoolbar' ) ); - $sitelinklistview.off( '.addtoolbar' ); - }, - sitelinklistviewafterremove: function( event, toolbarcontroller ) { - var $sitelinkgroupview = $( event.target ), - sitelinkgroupview = $sitelinkgroupview.data( 'sitelinkgroupview' ), - $sitelinklistview = sitelinkgroupview.$sitelinklistview, - sitelinklistview = $sitelinklistview.data( 'sitelinklistview' ); - - $sitelinklistview.data( 'addtoolbar' )[sitelinklistview.isFull() - ? 'disable' - : 'enable' - ](); - }, - sitelinkgroupviewchange: function( event, toolbarcontroller ) { - var $sitelinkgroupview = $( event.target ), - sitelinkgroupview = $sitelinkgroupview.data( 'sitelinkgroupview' ), - $sitelinklistview = sitelinkgroupview.$sitelinklistview, - sitelinklistview = $sitelinklistview.data( 'sitelinklistview' ), - addtoolbar = $sitelinklistview.data( 'addtoolbar' ); - -
[MediaWiki-commits] [Gerrit] Revert layout changes - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/171521 Change subject: Revert layout changes .. Revert layout changes This reverts several commits that changed above/below-the-fold Change-Id: Ic1c9d82ea8b4498004ab3530fd903f632c3d4a1b --- M MultimediaViewer.php M i18n/en.json M i18n/qqq.json M resources/mmv/mmv.globals.less M resources/mmv/mmv.lightboxinterface.less M resources/mmv/model/mmv.model.License.js A resources/mmv/ui/img/drag-active.svg A resources/mmv/ui/img/drag.svg D resources/mmv/ui/img/pd.svg M resources/mmv/ui/img/time.svg D resources/mmv/ui/img/uploader-ltr.svg D resources/mmv/ui/img/uploader-rtl.svg M resources/mmv/ui/mmv.ui.metadataPanel.js M resources/mmv/ui/mmv.ui.metadataPanel.less M resources/mmv/ui/mmv.ui.metadataPanelScroller.js M resources/mmv/ui/mmv.ui.metadataPanelScroller.less M resources/mmv/ui/mmv.ui.stripeButtons.less M tests/browser/features/support/pages/e2e_test_page.rb M tests/qunit/mmv/mmv.lightboxinterface.test.js M tests/qunit/mmv/model/mmv.model.License.test.js M tests/qunit/mmv/ui/mmv.ui.metadataPanel.test.js M tests/qunit/mmv/ui/mmv.ui.metadataPanelScroller.test.js 22 files changed, 474 insertions(+), 442 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/21/171521/1 diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 5822e44..963005c 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -554,7 +554,6 @@ 'multimediaviewer-commons-subtitle', 'multimediaviewer-credit', - 'multimediaviewer-credit-fallback', 'multimediaviewer-userpage-link', @@ -591,6 +590,8 @@ 'multimediaviewer-credit-popup-text', 'multimediaviewer-title-popup-text-more', 'multimediaviewer-credit-popup-text-more', + 'multimediaviewer-panel-open-popup-text', + 'multimediaviewer-panel-close-popup-text', ), ), diff --git a/i18n/en.json b/i18n/en.json index 3b97c13..3e90779 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1,8 +1,8 @@ { @metadata: { - authors: [ - Mark Holmquist mtrac...@member.fsf.org - ] + authors: [ + Mark Holmquist mtrac...@member.fsf.org + ] }, multimediaviewer-desc: Expand thumbnails in a larger size in a fullscreen interface., multimediaviewer-desc-nil: No description available., @@ -15,7 +15,6 @@ multimediaviewer-datetime-uploaded: Uploaded: $1, multimediaviewer-userpage-link: {{GENDER:$2|Uploaded}} by $1, multimediaviewer-credit: $1 - $2, - multimediaviewer-credit-fallback: View author information, multimediaviewer-metadata-error: Error: Could not load image data. $1, multimediaviewer-thumbnail-error: Error: Could not load thumbnail data. $1, multimediaviewer-license-cc-by-1.0: CC BY 1.0, @@ -109,6 +108,8 @@ multimediaviewer-credit-popup-text: Author and source information, multimediaviewer-title-popup-text-more: Click to show full file name, multimediaviewer-credit-popup-text-more: Click to show full author and source, + multimediaviewer-panel-open-popup-text: More details, + multimediaviewer-panel-close-popup-text: Fewer details, multimediaviewer-download-attribution-cta-header: You need to attribute the author, multimediaviewer-download-attribution-cta: Show me how, multimediaviewer-attr-plain: Plain, diff --git a/i18n/qqq.json b/i18n/qqq.json index 5c814f9..7b65151 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -20,8 +20,7 @@ multimediaviewer-datetime-created: Used in JavaScript code. Parameters:\n* $1 - time and date\nSee also:\n* {{msg-mw|Multimediaviewer-datetime-uploaded}}\n\nNote that the date comes from the description page and can have various forms (e.g. \2000-01-01\, \1st January 2000\, \1492\, \16th century\...)\n\nAlso, this might refer to the date when the picture was taken, or the date when the depcited work was made - the usage is not consistent. You should choose a translation that works in all cases.\n{{Identical|Created}}, multimediaviewer-datetime-uploaded: Used in JavaScript code. Parameters:\n* $1 - time and date (formatted)\nSee also:\n* {{msg-mw|Multimediaviewer-datetime-created}}\n{{Identical|Uploaded}}, multimediaviewer-userpage-link: Link to the user page for the uploader of the image.\n\nUsed in JavaScript code.\n\nParameters:\n* $1 - the username of the uploader\n* $2 - their gender, - multimediaviewer-credit: Credit line for images. Parameters:\n* $1 - HTML describing the author\n* $2 - HTML describing the source\n\nNeither parameters are usernames, so
[MediaWiki-commits] [Gerrit] Revert layout changes - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Revert layout changes .. Revert layout changes This reverts several commits that changed above/below-the-fold Change-Id: Ic1c9d82ea8b4498004ab3530fd903f632c3d4a1b --- M MultimediaViewer.php M i18n/en.json M i18n/qqq.json M resources/mmv/mmv.globals.less M resources/mmv/mmv.lightboxinterface.less M resources/mmv/model/mmv.model.License.js A resources/mmv/ui/img/drag-active.svg A resources/mmv/ui/img/drag.svg D resources/mmv/ui/img/pd.svg M resources/mmv/ui/img/time.svg D resources/mmv/ui/img/uploader-ltr.svg D resources/mmv/ui/img/uploader-rtl.svg M resources/mmv/ui/mmv.ui.metadataPanel.js M resources/mmv/ui/mmv.ui.metadataPanel.less M resources/mmv/ui/mmv.ui.metadataPanelScroller.js M resources/mmv/ui/mmv.ui.metadataPanelScroller.less M resources/mmv/ui/mmv.ui.stripeButtons.less M tests/browser/features/support/pages/e2e_test_page.rb M tests/qunit/mmv/mmv.lightboxinterface.test.js M tests/qunit/mmv/model/mmv.model.License.test.js M tests/qunit/mmv/ui/mmv.ui.metadataPanel.test.js M tests/qunit/mmv/ui/mmv.ui.metadataPanelScroller.test.js 22 files changed, 474 insertions(+), 442 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 5822e44..963005c 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -554,7 +554,6 @@ 'multimediaviewer-commons-subtitle', 'multimediaviewer-credit', - 'multimediaviewer-credit-fallback', 'multimediaviewer-userpage-link', @@ -591,6 +590,8 @@ 'multimediaviewer-credit-popup-text', 'multimediaviewer-title-popup-text-more', 'multimediaviewer-credit-popup-text-more', + 'multimediaviewer-panel-open-popup-text', + 'multimediaviewer-panel-close-popup-text', ), ), diff --git a/i18n/en.json b/i18n/en.json index 3b97c13..3e90779 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1,8 +1,8 @@ { @metadata: { - authors: [ - Mark Holmquist mtrac...@member.fsf.org - ] + authors: [ + Mark Holmquist mtrac...@member.fsf.org + ] }, multimediaviewer-desc: Expand thumbnails in a larger size in a fullscreen interface., multimediaviewer-desc-nil: No description available., @@ -15,7 +15,6 @@ multimediaviewer-datetime-uploaded: Uploaded: $1, multimediaviewer-userpage-link: {{GENDER:$2|Uploaded}} by $1, multimediaviewer-credit: $1 - $2, - multimediaviewer-credit-fallback: View author information, multimediaviewer-metadata-error: Error: Could not load image data. $1, multimediaviewer-thumbnail-error: Error: Could not load thumbnail data. $1, multimediaviewer-license-cc-by-1.0: CC BY 1.0, @@ -109,6 +108,8 @@ multimediaviewer-credit-popup-text: Author and source information, multimediaviewer-title-popup-text-more: Click to show full file name, multimediaviewer-credit-popup-text-more: Click to show full author and source, + multimediaviewer-panel-open-popup-text: More details, + multimediaviewer-panel-close-popup-text: Fewer details, multimediaviewer-download-attribution-cta-header: You need to attribute the author, multimediaviewer-download-attribution-cta: Show me how, multimediaviewer-attr-plain: Plain, diff --git a/i18n/qqq.json b/i18n/qqq.json index 5c814f9..7b65151 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -20,8 +20,7 @@ multimediaviewer-datetime-created: Used in JavaScript code. Parameters:\n* $1 - time and date\nSee also:\n* {{msg-mw|Multimediaviewer-datetime-uploaded}}\n\nNote that the date comes from the description page and can have various forms (e.g. \2000-01-01\, \1st January 2000\, \1492\, \16th century\...)\n\nAlso, this might refer to the date when the picture was taken, or the date when the depcited work was made - the usage is not consistent. You should choose a translation that works in all cases.\n{{Identical|Created}}, multimediaviewer-datetime-uploaded: Used in JavaScript code. Parameters:\n* $1 - time and date (formatted)\nSee also:\n* {{msg-mw|Multimediaviewer-datetime-created}}\n{{Identical|Uploaded}}, multimediaviewer-userpage-link: Link to the user page for the uploader of the image.\n\nUsed in JavaScript code.\n\nParameters:\n* $1 - the username of the uploader\n* $2 - their gender, - multimediaviewer-credit: Credit line for images. Parameters:\n* $1 - HTML describing the author\n* $2 - HTML describing the source\n\nNeither parameters are usernames, so GENDER is useless. Both come directly from the API, the
[MediaWiki-commits] [Gerrit] Revert layout changes in Media viewer - change (mediawiki/core)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/171522 Change subject: Revert layout changes in Media viewer .. Revert layout changes in Media viewer Change-Id: I44cc33349167367b5f7d01780f44d5bb64d0f269 --- M extensions/MultimediaViewer 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/22/171522/1 diff --git a/extensions/MultimediaViewer b/extensions/MultimediaViewer index aac95a1..630d523 16 --- a/extensions/MultimediaViewer +++ b/extensions/MultimediaViewer -Subproject commit aac95a18ecc1c2f87a2bb56e6361c12a7c1a91fc +Subproject commit 630d5235640be4b7763e57fcbe6c0bf92f2159ba -- To view, visit https://gerrit.wikimedia.org/r/171522 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44cc33349167367b5f7d01780f44d5bb64d0f269 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf7 Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed a couple of issues with emails - change (mediawiki...BlueSpiceFoundation)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/171523 Change subject: Fixed a couple of issues with emails .. Fixed a couple of issues with emails 1) The email greeting was in content language and not in the user language 2) Real name parameter was missing in email greeting * Fixed profiling in Mailer.class.php Change-Id: If871ce67d81fb9df84264b6135da945242994d10 --- M i18n/core/de.json M i18n/core/en.json M i18n/core/qqq.json M includes/Mailer.class.php 4 files changed, 18 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/23/171523/1 diff --git a/i18n/core/de.json b/i18n/core/de.json index bb6f35b..f4cf68f 100644 --- a/i18n/core/de.json +++ b/i18n/core/de.json @@ -25,7 +25,7 @@ bs-two-units-ago: vor $1 und $2, bs-one-unit-ago: vor $1, bs-now: jetzt, - bs-email-greeting-receiver: {{GENDER:$1|Hallo Herr $1|Hallo Frau $1|Hallo $1}},, + bs-email-greeting-receiver: {{GENDER:$1|Hallo Herr $2|Hallo Frau $2|Hallo $2}},, bs-email-greeting-no-receiver: Hallo,, bs-email-footer: Dies ist eine automatisch generierte E-Mail. Bitte antworte nicht auf diese E-Mail!, bs-userpagesettings-legend: Benutzereinstellungen, diff --git a/i18n/core/en.json b/i18n/core/en.json index 8287ee6..ea95f5d 100644 --- a/i18n/core/en.json +++ b/i18n/core/en.json @@ -25,7 +25,7 @@ bs-two-units-ago: $1 and $2 ago, bs-one-unit-ago: $1 ago, bs-now: now, - bs-email-greeting-receiver: {{GENDER:$1|Hello Mr $1|Hello Mrs $1|Hello $1}},, + bs-email-greeting-receiver: {{GENDER:$1|Hello Mr $2|Hello Mrs $2|Hello $2}},, bs-email-greeting-no-receiver: Hello,, bs-email-footer: This message was generated automatically. Please do not reply to this email., bs-userpagesettings-legend: User settings, diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json index 5e6ed1c..07aa245 100644 --- a/i18n/core/qqq.json +++ b/i18n/core/qqq.json @@ -29,8 +29,8 @@ bs-two-units-ago: Text shown when indicating how long ago an event was.\n\nUses {{msg-mw|Bs-years-duration}}, {{msg-mw|Bs-months-duration}}, {{msg-mw|Bs-weeks-duration}}, {{msg-mw|Bs-days-duration}}, {{msg-mw|Bs-hours-duration}}, {{msg-mw|Bs-mins-duration}}, {{msg-mw|Bs-secs-duration}} for parameters\n\nParameters:\n* $1 - a duration, e.g. {{msg-mw|Bs-weeks-duration}}\n* $2 - a duration one unit smaller than $1, e.g. {{msg-mw|Bs-days-duration}}, bs-one-unit-ago: Text shown when indicating how long ago an event was\n\nParameters:\n* $1 - a duration; any one of the following messages:\n** {{msg-mw|Bs-years-duration}}\n** {{msg-mw|Bs-months-duration}}\n** {{msg-mw|Bs-weeks-duration}}\n** {{msg-mw|Bs-days-duration}}\n** {{msg-mw|Bs-hours-duration}}\n** {{msg-mw|Bs-mins-duration}}\n** {{msg-mw|Bs-secs-duration}}\n{{Identical|Ago}}, bs-now: Text shown for \now\ when indicating how long ago an event was.\n{{Identical|Now}}, - bs-email-greeting-receiver: Used in plain text mails as first line in body to greet the receiver, $1 is the current user name for GENDER distinction (depends on sex setting)\n\nParameters:\n* $1 - name of the receiver, - bs-email-greeting-no-receiver: Used in plain text mails as first line in body to greet the reveiver\n{{Identical|Hello}}, + bs-email-greeting-receiver: Used in emails as first line in body to greet the receiver.\n\nParameters:\n* $1 is the username of the receiver - use for GENDER distinction \n*$2 is real name of the receiver, if the receiver has not set a real name it is the username, + bs-email-greeting-no-receiver: Used in emails as first line in body to greet the reveiver\n{{Identical|Hello}}, bs-email-footer: Used in plain text mails as last line, bs-userpagesettings-legend: Label for section with links to special user related settings, bs-userpreferences-link-text: Label for link to user preferences on user page, diff --git a/includes/Mailer.class.php b/includes/Mailer.class.php index a27b883..3881ee8 100644 --- a/includes/Mailer.class.php +++ b/includes/Mailer.class.php @@ -128,14 +128,20 @@ foreach ( $aEmailTo as $aReceiver ) { //Prepare message if ( $aReceiver['greeting'] ) { - $sGreeting = wfMessage( 'bs-email-greeting-receiver', $aReceiver['greeting'] )-text() . ( $this-bSendHTML ) - ? br /br / - : \n\n; + $oUser = User::newFromName( $aReceiver['greeting'] ); + $sRealname = $oUser-getRealName(); + if ( empty( $sRealname ) ) { + $sRealname = $aReceiver['greeting']; +
[MediaWiki-commits] [Gerrit] Fixed issue with email language - change (mediawiki...BlueSpiceExtensions)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/171524 Change subject: Fixed issue with email language .. Fixed issue with email language Emails were sent in content languge and not in user language. So now the emails are sent per user and not combined for all. Change-Id: I2afe945a9958930c5fae76a64c1844de8038f4c3 --- M ResponsibleEditors/ResponsibleEditors.class.php 1 file changed, 67 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/24/171524/1 diff --git a/ResponsibleEditors/ResponsibleEditors.class.php b/ResponsibleEditors/ResponsibleEditors.class.php index 2fed95f..44ecf6e 100644 --- a/ResponsibleEditors/ResponsibleEditors.class.php +++ b/ResponsibleEditors/ResponsibleEditors.class.php @@ -874,80 +874,77 @@ * @param string $sAction */ public static function notifyResponsibleEditors($aResponsibleEditorIds, $oUser, $aTitles, $sAction) { - if (empty($aResponsibleEditorIds)) return true; + if ( empty( $aResponsibleEditorIds ) ) return true; - $aResponsibleEditors = array(); - foreach ($aResponsibleEditorIds as $iUserId) { - $oREUser = User::newFromId($iUserId); + foreach ( $aResponsibleEditorIds as $iUserId ) { + $oREUser = User::newFromId( $iUserId ); if ( $iUserId == $oUser-getId() ) continue; - if ( BsConfig::getVarForUser( MW::ResponsibleEditors::E.ucfirst( $sAction ), $oREUser ) === true ) { - $aResponsibleEditors[] = $oREUser; + if ( BsConfig::getVarForUser( MW::ResponsibleEditors::E.ucfirst( $sAction ), $oREUser ) === false ) { + continue; } + + $sUserRealName = BsCore::getInstance()-getUserDisplayName( $oUser ); + $sUsername = $oUser-getName(); + $sArticleName = $aTitles[0]-getText(); + $sArticleLink = $aTitles[0]-getFullURL(); + + switch( $sAction ) { + case 'change': + $sSubject = wfMessage( + 'bs-responsibleeditors-mail-subject-re-article-changed', + $sArticleName, + $sUsername, + $sUserRealName + )-inLanguage( $oREUser-getOption( 'language' ) )-text(); + $sMessage = wfMessage( + 'bs-responsibleeditors-mail-text-re-article-changed', + $sArticleName, + $sUsername, + $sUserRealName, + $sArticleLink + )-inLanguage( $oREUser-getOption( 'language' ) )-text(); + break; + case 'delete': + $sSubject = wfMessage( + 'bs-responsibleeditors-mail-subject-re-article-deleted', + $sArticleName, + $sUsername, + $sUserRealName + )-inLanguage( $oREUser-getOption( 'language' ) )-text(); + $sMessage = wfMessage( + 'bs-responsibleeditors-mail-text-re-article-deleted', + $sArticleName, + $sUsername, + $sUserRealName, + $sArticleLink + )-inLanguage( $oREUser-getOption( 'language' ) )-text(); + break; + case 'move': + $sSubject = wfMessage( + 'bs-responsibleeditors-mail-subject-re-article-moved', + $sArticleName, + $sUsername, + $sUserRealName + )-inLanguage( $oREUser-getOption( 'language' ) )-text(); + $sMessage = wfMessage( +
[MediaWiki-commits] [Gerrit] add graphite-related CNAMEs - change (operations/dns)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/171525 Change subject: add graphite-related CNAMEs .. add graphite-related CNAMEs rationale being: carbon-relay while being technically correct isn't what one would think about when thinking about graphite (I think). The -in is to distinguish the fact that this endpoint should be used to send datapoints to graphite (as opposed to using the api or the web interface). Change-Id: Id3bc2b4c9fb46742c0d86e22b404f889627f4c92 --- M templates/wmnet 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/25/171525/1 diff --git a/templates/wmnet b/templates/wmnet index 985b425..5ffb377 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -28,6 +28,8 @@ webproxy1H IN CNAMEcarbon.wikimedia.org. zuul1H IN CNAMEgallium.wikimedia.org. carbon-relay1H IN CNAMEtungsten.eqiad.wmnet. +graphite1H IN CNAMEtungsten.eqiad.wmnet. +graphite-in 1H IN CNAMEtungsten.eqiad.wmnet. config-master 1H IN CNAMEpalladium.eqiad.wmnet. statsd 1H IN CNAMEtungsten.eqiad.wmnet. eventlogging1H IN CNAMEvanadium.eqiad.wmnet. -- To view, visit https://gerrit.wikimedia.org/r/171525 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3bc2b4c9fb46742c0d86e22b404f889627f4c92 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix sitelinklistview tests and some edge cases - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/171526 Change subject: Fix sitelinklistview tests and some edge cases .. Fix sitelinklistview tests and some edge cases Fixed edge cases: * enterNewItem() does not create two empty sitelinkviews if the sitelinklistview is not yet in edit mode * _removeSitelinkviewIfEmpty gets the event passed instead of relying on the global event property * isValid can actually return false Also added two tests. Change-Id: Ib093592c84e350d129350316afec7c6e6b508f95 --- M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js 2 files changed, 44 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/26/171526/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js index 9cac24a..d2e8011 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js @@ -108,7 +108,7 @@ this.element .on( this.widgetEventPrefix + 'afterstartediting', function() { - self.enterNewItem(); + self._updateAutoInput(); } ); } }, @@ -169,7 +169,7 @@ sitelinkview = $sitelinkview.data( 'sitelinkview' ); if( sitelinkview ) { - self._removeSitelinkviewIfEmpty( sitelinkview ); + self._removeSitelinkviewIfEmpty( sitelinkview, event ); } } } ) @@ -222,8 +222,9 @@ /** * @param {jQuery.wikibase.sitelinkview} sitelinkview +* @param {jQuery.Event} event */ - _removeSitelinkviewIfEmpty: function( sitelinkview ) { + _removeSitelinkviewIfEmpty: function( sitelinkview, event ) { var $sitelinkview = sitelinkview.element, listview = this.$listview.data( 'listview' ), lia = listview.listItemAdapter(), @@ -363,11 +364,14 @@ // Site link views are regarded valid if they have a valid site. Invalid site links // (without a page name) and empty values (with no site id and page name input) are // supposed to be stripped when querying this widget for its value. - var sitelinkview = lia.liInstance( $( this ) ), - isValid = sitelinkview.isValid() - || sitelinkview.isEmpty() - // Previously existing values do always feature a valid site id: - || sitelinkview.option( 'value' ); + // Put together, we consider sitelinkviews invalid only when they have something in + // the siteId input field which does not resolve to a valid siteId and which is not + // empty. + var sitelinkview = lia.liInstance( $( this ) ); + isValid = sitelinkview.isValid() + || sitelinkview.isEmpty() + // Previously existing values do always feature a valid site id: + || Boolean( sitelinkview.option( 'value' ) ); return isValid === true; } ); diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js index 427a575..fafedbe 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js @@ -150,13 +150,22 @@ sitelinklistview.isValid(), 'Verified isValid() returning TRUE.' ); +} ); + +QUnit.test( 'isValid() with invalid sitelinkview', function( assert ) { + var $sitelinklistview = createSitelinklistview( { + value: [] + } ), + sitelinklistview = $sitelinklistview.data( 'sitelinklistview' ); + + sitelinklistview.enterNewItem(); var listview = sitelinklistview.$listview.data( 'listview' ), - lia = listview.listItemAdapter(); + lia = listview.listItemAdapter(), + sitelinkview = lia.liInstance( listview.items().first() ); - lia.liInstance( listview.items().first() ).isValid = function() { -
[MediaWiki-commits] [Gerrit] Reduce the margin-top for three column widget - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Reduce the margin-top for three column widget .. Reduce the margin-top for three column widget 150px is not required now since the header is compact Change-Id: I6fbe6afa71507140eb72ae8e3c857bb8294c0111 --- M modules/translationview/styles/ext.cx.translationview.less 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pginer: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/translationview/styles/ext.cx.translationview.less b/modules/translationview/styles/ext.cx.translationview.less index b339756..6aeb2db 100644 --- a/modules/translationview/styles/ext.cx.translationview.less +++ b/modules/translationview/styles/ext.cx.translationview.less @@ -38,7 +38,7 @@ } .cx-widget__columns { - margin-top: 150px; + margin-top: 100px; min-height: 100vh; } -- To view, visit https://gerrit.wikimedia.org/r/171510 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6fbe6afa71507140eb72ae8e3c857bb8294c0111 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Pginer pgi...@wikimedia.org Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make this extension fast - change (mediawiki...UserOptionStats)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/171527 Change subject: Make this extension fast .. Make this extension fast Relies on the new user_preferences table, present since MW 1.15. Numbers are 99% the same with this method. Change-Id: Ifc33ed2dadd0aba7e6b6d31ba9945176e5d61879 --- M SpecialUserOptionStats.php 1 file changed, 15 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UserOptionStats refs/changes/27/171527/1 diff --git a/SpecialUserOptionStats.php b/SpecialUserOptionStats.php index c6fe292..e2ce37f 100644 --- a/SpecialUserOptionStats.php +++ b/SpecialUserOptionStats.php @@ -58,17 +58,22 @@ $dbr = wfGetDB( DB_SLAVE ); - $users = $dbr-select( 'user', '*', '', __METHOD__ ); - $data = array(); - $optionName = $par; - foreach ( $users as $u ) { - // New from row doesn't load user_properties, hence this is slow! - $obj = User::newFromRow( $u ); - $opt = $obj-getOption( $optionName, $this-msg( 'uos-unknown' )-text() ); + $total = $dbr-selectField( 'user', 'count(*)', '', __METHOD__ ); - if ( !isset( $data[$opt] ) ) $data[$opt] = 0; - $data[$opt]++; + $data = array(); + $props = $dbr-select( + 'user_properties', + array( 'up_value', 'count(up_value) as c' ), + array( 'up_property' = $par ), + __METHOD__, + array( 'GROUP BY' = 'up_value' ) + ); + + foreach ( $props as $row ) { + $total -= $row-c; + $data[$row-up_value] = $row-c; } + $data[$this-msg( 'uos-unknown' )-text()] = $total; $realdata = array(); $labels = array(); @@ -95,7 +100,7 @@ } $request = $this-getRequest(); - $title = $request-getText( 'pietitle', $this-msg( 'uos-title', $optionName )-text() ); + $title = $request-getText( 'pietitle', $this-msg( 'uos-title', $par )-text() ); $width = $request-getInt( 'width', 700 ); $height = $request-getInt( 'height', 500 ); $width = max( 200, min( 1000, $width ) ); -- To view, visit https://gerrit.wikimedia.org/r/171527 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc33ed2dadd0aba7e6b6d31ba9945176e5d61879 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UserOptionStats 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] Applied case-insensitivity to snakview property selector - change (mediawiki...Wikibase)
Adrian Lang has submitted this change and it was merged. Change subject: Applied case-insensitivity to snakview property selector .. Applied case-insensitivity to snakview property selector Bug: 66715 Bug: 72622 Change-Id: Ie3a4364cb8775e7210e73d49d1b506e4006e88f4 --- M lib/resources/jquery.wikibase/snakview/snakview.js 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/snakview/snakview.js b/lib/resources/jquery.wikibase/snakview/snakview.js index 0c5e0ae..cf15bbb 100644 --- a/lib/resources/jquery.wikibase/snakview/snakview.js +++ b/lib/resources/jquery.wikibase/snakview/snakview.js @@ -776,7 +776,11 @@ // TODO: use selectedEntity() or other command to set selected entity in both cases! if( propertySelector property ) { // property selector in DOM already, just replace current value - propertySelector.widget().val( propertyLabel ); + var currentValue = propertySelector.widget().val(); + // Impose case-insensitivity: + if( propertyLabel.toLowerCase() !== currentValue.toLocaleLowerCase() ) { + propertySelector.widget().val( propertyLabel ); + } return; } else if( !propertySelector ) { // Create property selector and set value: -- To view, visit https://gerrit.wikimedia.org/r/170064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3a4364cb8775e7210e73d49d1b506e4006e88f4 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Make resource definitions work from /vendor/, too - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/171529 Change subject: Make resource definitions work from /vendor/, too .. Make resource definitions work from /vendor/, too Change-Id: I59ac7b8f3e48d6098d53875abcb8811fc36f5892 --- M client/WikibaseClient.hooks.php M client/resources/Resources.php M lib/resources/Resources.php M lib/resources/api/resources.php M lib/resources/entityChangers/resources.php M lib/resources/experts/resources.php M lib/resources/formatters/resources.php M lib/resources/jquery.wikibase/resources.php M lib/resources/jquery.wikibase/snakview/resources.php M lib/resources/jquery.wikibase/toolbar/resources.php M lib/resources/parsers/resources.php M lib/resources/wikibase.RepoApi/resources.php M lib/resources/wikibase.store/resources.php M lib/resources/wikibase.utilities/resources.php M repo/resources/Resources.php 15 files changed, 80 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/29/171529/1 diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 46c7e25..f60ec9d 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -501,8 +501,14 @@ public static function onGetBetaFeaturePreferences( User $user, array $betaPreferences ) { global $wgExtensionAssetsPath; - $remoteExtPathParts = explode( DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR , __DIR__, 2 ); - $assetsPath = $wgExtensionAssetsPath . '/' . $remoteExtPathParts[1]; +preg_match( +'+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . +preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', +__DIR__, +$remoteExtPathParts +); + + $assetsPath = $wgExtensionAssetsPath . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $remoteExtPathParts[1]; $settings = WikibaseClient::getDefaultInstance()-getSettings(); if ( !$settings-getSetting( 'otherProjectsLinksBeta' ) || $settings-getSetting( 'otherProjectsLinksByDefault' ) ) { diff --git a/client/resources/Resources.php b/client/resources/Resources.php index 61812b5..c591f28 100644 --- a/client/resources/Resources.php +++ b/client/resources/Resources.php @@ -1,7 +1,12 @@ ?php return call_user_func( function() { - $remoteExtPathParts = explode( DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR , __DIR__, 2 ); + preg_match( + '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . + preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', + __DIR__, + $remoteExtPathParts + ); $moduleTemplate = array( 'localBasePath' = __DIR__, 'remoteExtPath' = $remoteExtPathParts[1], diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 770ec7d..14016e8 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -11,8 +11,11 @@ * @codeCoverageIgnoreStart */ return call_user_func( function() { - $remoteExtPathParts = explode( - DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR, __DIR__, 2 + preg_match( + '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . + preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', + __DIR__, + $remoteExtPathParts ); $moduleTemplate = array( 'localBasePath' = __DIR__, diff --git a/lib/resources/api/resources.php b/lib/resources/api/resources.php index 6db8cc2..8379334 100644 --- a/lib/resources/api/resources.php +++ b/lib/resources/api/resources.php @@ -5,8 +5,11 @@ */ return call_user_func( function() { - $remoteExtPathParts = explode( - DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR, __DIR__, 2 + preg_match( + '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . + preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', + __DIR__, + $remoteExtPathParts ); $moduleTemplate = array( 'localBasePath' = __DIR__, diff --git a/lib/resources/entityChangers/resources.php b/lib/resources/entityChangers/resources.php index 5305309..6b0c1ed 100644 --- a/lib/resources/entityChangers/resources.php +++ b/lib/resources/entityChangers/resources.php @@ -5,8 +5,11 @@ */ return call_user_func( function() { - $remoteExtPathParts = explode( - DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR, __DIR__, 2 + preg_match( + '+^.*?' . preg_quote(
[MediaWiki-commits] [Gerrit] Tag v1.1.2 - change (oojs/core)
jenkins-bot has submitted this change and it was merged. Change subject: Tag v1.1.2 .. Tag v1.1.2 Change-Id: Ibb951357fdec00702c724d20a5f1601f1c63f196 --- M History.md M package.json 2 files changed, 7 insertions(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/History.md b/History.md index 665ab9a..02075e4 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,11 @@ # OOjs Release History +## v1.1.2 / 2014-11-05 +* build: Bump miscellaneous devDependencies to latest (James D. Forrester) +* build: Use local Chrome and Firefox in ci task (Timo Tijhof) +* EventEmitter: Use hasOwn check in #emit (Ed Sanders) +* EventEmitter: Use hasOwn check in #off (Timo Tijhof) + ## v1.1.1 / 2014-09-10 * core: Make oo.compare cover boolean as well as number and string primitives (James D. Forrester) diff --git a/package.json b/package.json index 231a67f..04d80d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { name: oojs, - version: 1.1.1, + version: 1.1.2, description: Power for object oriented javascript libraries., keywords: [ oo, -- To view, visit https://gerrit.wikimedia.org/r/171304 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb951357fdec00702c724d20a5f1601f1c63f196 Gerrit-PatchSet: 4 Gerrit-Project: oojs/core Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@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 sitelinklistview tests and some edge cases - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix sitelinklistview tests and some edge cases .. Fix sitelinklistview tests and some edge cases Fixed edge cases: * enterNewItem() does not create two empty sitelinkviews if the sitelinklistview is not yet in edit mode * _removeSitelinkviewIfEmpty gets the event passed instead of relying on the global event property * isValid can actually return false Also added two tests. Change-Id: Ib093592c84e350d129350316afec7c6e6b508f95 --- M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js 2 files changed, 44 insertions(+), 12 deletions(-) Approvals: Henning Snater: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js index 9cac24a..d2e8011 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js @@ -108,7 +108,7 @@ this.element .on( this.widgetEventPrefix + 'afterstartediting', function() { - self.enterNewItem(); + self._updateAutoInput(); } ); } }, @@ -169,7 +169,7 @@ sitelinkview = $sitelinkview.data( 'sitelinkview' ); if( sitelinkview ) { - self._removeSitelinkviewIfEmpty( sitelinkview ); + self._removeSitelinkviewIfEmpty( sitelinkview, event ); } } } ) @@ -222,8 +222,9 @@ /** * @param {jQuery.wikibase.sitelinkview} sitelinkview +* @param {jQuery.Event} event */ - _removeSitelinkviewIfEmpty: function( sitelinkview ) { + _removeSitelinkviewIfEmpty: function( sitelinkview, event ) { var $sitelinkview = sitelinkview.element, listview = this.$listview.data( 'listview' ), lia = listview.listItemAdapter(), @@ -363,11 +364,14 @@ // Site link views are regarded valid if they have a valid site. Invalid site links // (without a page name) and empty values (with no site id and page name input) are // supposed to be stripped when querying this widget for its value. - var sitelinkview = lia.liInstance( $( this ) ), - isValid = sitelinkview.isValid() - || sitelinkview.isEmpty() - // Previously existing values do always feature a valid site id: - || sitelinkview.option( 'value' ); + // Put together, we consider sitelinkviews invalid only when they have something in + // the siteId input field which does not resolve to a valid siteId and which is not + // empty. + var sitelinkview = lia.liInstance( $( this ) ); + isValid = sitelinkview.isValid() + || sitelinkview.isEmpty() + // Previously existing values do always feature a valid site id: + || Boolean( sitelinkview.option( 'value' ) ); return isValid === true; } ); diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js index 427a575..fafedbe 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js @@ -150,13 +150,22 @@ sitelinklistview.isValid(), 'Verified isValid() returning TRUE.' ); +} ); + +QUnit.test( 'isValid() with invalid sitelinkview', function( assert ) { + var $sitelinklistview = createSitelinklistview( { + value: [] + } ), + sitelinklistview = $sitelinklistview.data( 'sitelinklistview' ); + + sitelinklistview.enterNewItem(); var listview = sitelinklistview.$listview.data( 'listview' ), - lia = listview.listItemAdapter(); + lia = listview.listItemAdapter(), + sitelinkview = lia.liInstance( listview.items().first() ); - lia.liInstance( listview.items().first() ).isValid = function() { - return false; - }; +
[MediaWiki-commits] [Gerrit] Implement CachingLabelLookup with EntityLookup [WIP] - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/171530 Change subject: Implement CachingLabelLookup with EntityLookup [WIP] .. Implement CachingLabelLookup with EntityLookup [WIP] this moves the label lookup code out of the formatter, and into implementations of the LabelLookup, using the existing caching EntityLookup service which uses memcached. this is better performance-wise, at the moment than using lookup via the TermSqlIndex. Change-Id: Ia6a968d289cefc2e4df917b60dc761652d8354b6 --- M lib/includes/formatters/EntityIdLabelFormatter.php A lib/includes/store/CachingLanguageFallbackLabelLookup.php A lib/includes/store/CachingLanguageLabelLookup.php 3 files changed, 171 insertions(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/30/171530/1 diff --git a/lib/includes/formatters/EntityIdLabelFormatter.php b/lib/includes/formatters/EntityIdLabelFormatter.php index b3c1d9f..7fbdc8b 100644 --- a/lib/includes/formatters/EntityIdLabelFormatter.php +++ b/lib/includes/formatters/EntityIdLabelFormatter.php @@ -8,6 +8,8 @@ use ValueFormatters\FormattingException; use Wikibase\DataModel\Entity\EntityId; use Wikibase\LanguageFallbackChain; +use Wikibase\Lib\Store\CachingLanguageFallbackLabelLookup; +use Wikibase\Lib\Store\CachingLanguageLabelLookup; use Wikibase\Lib\Store\EntityLookup; use Wikibase\Lib\Store\StorageException; use Wikibase\Lib\Store\UnresolvedRedirectException; @@ -19,8 +21,6 @@ * @author Jeroen De Dauw jeroended...@gmail.com * @author Katie Filbert aude.w...@gmail.com * @author Daniel Kinzler - * - * @todo: add support for language fallback chains */ class EntityIdLabelFormatter extends EntityIdFormatter { @@ -39,9 +39,9 @@ const FALLBACK_NONE = 2; /** -* @var EntityLookup +* @var LabelLookup */ - protected $entityLookup; + private $labelLookup; /** * @since 0.4 @@ -54,8 +54,6 @@ */ public function __construct( FormatterOptions $options, EntityLookup $entityLookup ) { parent::__construct( $options ); - - $this-entityLookup = $entityLookup; $this-defaultOption( self::OPT_LOOKUP_LABEL, true ); $this-defaultOption( self::OPT_LABEL_FALLBACK, self::FALLBACK_PREFIXED_ID ); @@ -75,6 +73,18 @@ if ( !is_bool( $this-getOption( self::OPT_LOOKUP_LABEL ) ) ) { throw new InvalidArgumentException( 'Bad value for OPT_LOOKUP_LABEL option: must be a boolean' ); + } + + if ( $this-options-hasOption( 'languages' ) ) { + $this-labelLookup = new CachingLanguageFallbackLabelLookup( + $entityLookup, + $this-getOption( 'languages' ) + ); + } else { + $this-labelLookup = new CachingLanguageLabelLookup( + $entityLookup, + $this-getOption( self::OPT_LANG ) + ); } } @@ -124,37 +134,7 @@ * @return string|bool False if no label was found in the language or language fallback chain. */ protected function lookupEntityLabel( EntityId $entityId ) { - try { - $entity = $this-entityLookup-getEntity( $entityId ); - } catch ( UnresolvedRedirectException $ex ) { - $entity = null; - } catch ( StorageException $ex ) { - $entity = null; - wfLogWarning( 'Failed to load entity: ' - . $entityId-getSerialization() . ': ' - . $ex-getMessage() ); - } - - if ( $entity === null ) { - // double redirect, deleted entity, etc - throw new OutOfBoundsException( An Entity with the id $entityId could not be loaded ); - } - - /* @var LanguageFallbackChain $languageFallbackChain */ - if ( $this-options-hasOption( 'languages' ) ) { - $languageFallbackChain = $this-getOption( 'languages' ); - - $extractedData = $languageFallbackChain-extractPreferredValue( $entity-getLabels() ); - - if ( $extractedData === null ) { - return false; - } else { - return $extractedData['value']; - } - } else { - $lang = $this-getOption( self::OPT_LANG ); - return $entity-getLabel( $lang ); - } + return $this-labelLookup-getLabel( $entityId ); }
[MediaWiki-commits] [Gerrit] hhvm: remove unnecessary upstart stanza, config option - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: hhvm: remove unnecessary upstart stanza, config option .. hhvm: remove unnecessary upstart stanza, config option The hhvm.server.graceful_shutdown_wait option will work only if the HHVM server gets shut down by calling the /stop url on the admin server.The only practical effect of hhvm.server.graceful_shutdown_wait in our setup would be that: - The socket communicating with apache will be reset immediately - Requests will be processed internally until they either end or the wait is reached; apache will still, ironically, get a 503. - Any new connection will be refused, resulting in more 503s So I think this option is basically useless with the FastCGI server, unless the server is processing some operations that can be unacknowledged. Finally, if any kill signal is sent to HHVM, it will happily forget about that setting and die instantly. Since upstart kills and restarts/reloads its services by sending signals, this configuration has zero effects on it. Change-Id: If27c02833a54343ba3ea423f5a4185ff3608a4ef Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M modules/hhvm/files/hhvm.conf M modules/hhvm/manifests/init.pp 2 files changed, 0 insertions(+), 5 deletions(-) Approvals: Ori.livneh: Looks good to me, but someone else must approve Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/hhvm/files/hhvm.conf b/modules/hhvm/files/hhvm.conf index 523fd6f..0e7378c 100644 --- a/modules/hhvm/files/hhvm.conf +++ b/modules/hhvm/files/hhvm.conf @@ -70,10 +70,6 @@ # Increase the maximum size of the stack to 64MiB. See bug 71486. limit stack 67108864 unlimited -# When `hhvm.server.graceful_shutdown_wait` is set to a positive -# integer, HHVM will perform a graceful shutdown on SIGHUP. -kill signal HUP - respawn respawn limit unlimited diff --git a/modules/hhvm/manifests/init.pp b/modules/hhvm/manifests/init.pp index d702e17..8a312a4 100644 --- a/modules/hhvm/manifests/init.pp +++ b/modules/hhvm/manifests/init.pp @@ -136,7 +136,6 @@ port = 9000, type = 'fastcgi', gzip_compression_level = 0, -graceful_shutdown_wait = 5, }, }, } -- To view, visit https://gerrit.wikimedia.org/r/171244 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If27c02833a54343ba3ea423f5a4185ff3608a4ef Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Ori.livneh 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] Implemented jquery.sticknode plugin - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Implemented jquery.sticknode plugin .. Implemented jquery.sticknode plugin Applied to the sitelinkgroupview edit toolbar container and the sitelinklistview table header, both will be sticked when scrolling while their corresponding sitelinklistview is still visible. Change-Id: I7c5c70e506b9d4a52bad2261486df9e0313c933f --- M lib/resources/Resources.php M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js M lib/resources/jquery.wikibase/resources.php M lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinkgroupview.css A lib/resources/jquery/jquery.sticknode.js M lib/tests/qunit/jquery/jquery.removeClassByRegex.tests.js A lib/tests/qunit/jquery/jquery.sticknode.tests.js M lib/tests/qunit/resources.php 9 files changed, 380 insertions(+), 1 deletion(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 770ec7d..b27b25f 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -128,6 +128,15 @@ ), ), + 'jquery.sticknode' = $moduleTemplate + array( + 'scripts' = array( + 'jquery/jquery.sticknode.js', + ), + 'dependencies' = array( + 'jquery.throttle-debounce', + ), + ), + 'jquery.ui.tagadata' = $moduleTemplate + array( 'scripts' = array( 'jquery.ui/jquery.ui.tagadata.js', diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js index 6a92c82..c891ec5 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js @@ -382,6 +382,10 @@ sitelinkgroupview.stopEditing( false ); } } ); + + $container.sticknode( { + $container: sitelinkgroupview.$sitelinklistview.data( 'sitelinklistview' ).$thead + } ); }, 'sitelinkgroupviewchange sitelinkgroupviewafterstartediting': function( event ) { var $sitelinkgroupview = $( event.target ), diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js index 9cac24a..29a83d1 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js @@ -111,12 +111,19 @@ self.enterNewItem(); } ); } + + this.$thead.sticknode( { + $container: this.element + } ); + + this._applyStickiness(); }, /** * @see jQuery.ui.TemplatedWidget.destroy */ destroy: function() { + this.$thead.data( 'sticknode' ).destroy(); this.$listview.data( 'listview' ).destroy(); this.$listview.off( '.' + this.widgetName ); this.element.removeData( 'tablesorter' ); @@ -220,6 +227,50 @@ ); }, + _applyStickiness: function() { + var self = this, + stickyNode = this.$thead.data( 'sticknode' ); + + this.$thead.on( 'sticknodeupdate', function() { + if( !stickyNode.isFixed() ) { + return; + } + + var $firstBodyTrTds = self.$listview.find( 'tr:first td' ); + + if( !$firstBodyTrTds.length ) { + return; + } + + self.$thead.find( 'th' ).each( function( i ) { + var $th = $( this ); + + if( !self._isInEditMode ) { + $th.removeAttr( 'style' ); + } + + if( i === 2 !self._isInEditMode ) { + return; + } + + var width = $firstBodyTrTds.eq( i ).width(); + + // Translate border width and padding added by tablesorter: + if( i === 0 ) { + width -= 10; +
[MediaWiki-commits] [Gerrit] Fixed failing browser tests - change (mediawiki...VisualEditor)
Vikassy has uploaded a new change for review. https://gerrit.wikimedia.org/r/171531 Change subject: Fixed failing browser tests .. Fixed failing browser tests Bug: 73033 Change-Id: Iea3a03b1ec628bfe03f10b4cb2a4795d4fabb8bc --- M modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb 2 files changed, 22 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/31/171531/1 diff --git a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb index ebc0b18..87e566e 100644 --- a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb +++ b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb @@ -56,6 +56,7 @@ When(/^I click on the Special character option in Insert menu$/) do step I click on the Insert menu + step I click on More in insert pull-down menu on(VisualEditorPage).special_character_element.when_present.click end @@ -114,12 +115,15 @@ end When(/^I click on References list in Insert menu$/) do + step I click in the editable part step I click on the Insert menu + step I click on More in insert pull-down menu on(VisualEditorPage).ve_references_element.when_present.click end Then(/^I should see category dialog box$/) do on(VisualEditorPage).iframe_element.when_present.should be_visible + capture_screenshot(#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.iframe_element]) end Then(/^I should see Headings pull-down menu$/) do @@ -155,6 +159,7 @@ end Then(/^I take screenshot of insert pull-down menu$/) do + step I click on More in insert pull-down menu capture_screenshot(#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.insert_menu_element, @current_page.insert_pull_down_element]) highlight @current_page.media_insert_menu_element @@ -173,6 +178,10 @@ capture_screenshot(VisualEditor_Formula_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.insert_menu_element, @current_page.insert_pull_down_element], nil, 0) end +Then(/^I click on More in insert pull-down menu$/) do + on(VisualEditorPage).ve_more_references_options_element.when_present.click +end + Then(/^I should see Special character Insertion window$/) do on(VisualEditorPage).iframe_element.when_present.should be_visible capture_screenshot(#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.iframe_element], nil, -2) @@ -188,13 +197,13 @@ capture_screenshot(#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.iframe_element], nil, 0) - capture_screenshot(VisualEditor_Page_Settings_Redirects-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.page_settings_heading_element, @current_page.prevent_redirect_element], @current_page.iframe_element, 0) + capture_screenshot(VisualEditor_Page_Settings_Redirects-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.page_settings_icon_element, @current_page.prevent_redirect_element], nil, 0) - capture_screenshot(VisualEditor_Page_Settings_TOC-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.table_of_contents_element], @current_page.iframe_element, 0) + capture_screenshot(VisualEditor_Page_Settings_TOC-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.table_of_contents_element], nil, 0) - capture_screenshot(VisualEditor_Page_Settings_Edit_Links-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.page_settings_editlinks_element], @current_page.iframe_element, 0) + capture_screenshot(VisualEditor_Page_Settings_Edit_Links-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.page_settings_editlinks_element], nil, 0) - capture_screenshot(VisualEditor_Apply_Changes-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.settings_apply_button_element], @current_page.iframe_element, 3) + capture_screenshot(VisualEditor_Apply_Changes-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png, [@current_page.settings_apply_button_element], nil, 3) end Then(/^I should see list and indentation dropdown$/) do diff --git a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb index d7f0710..9c8d341 100644 --- a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb +++ b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb @@ -46,9 +46,9 @@ span(:page_settings, class: oo-ui-iconElement-icon oo-ui-icon-settings) div(:indentation_pull_down, class: oo-ui-toolGroup-tools oo-ui-clippableElement-clippable, index: 3) div(:insert_pull_down, class: oo-ui-toolGroup-tools
[MediaWiki-commits] [Gerrit] Use hasOwnProperty instead of 'key in obj' - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Use hasOwnProperty instead of 'key in obj' .. Use hasOwnProperty instead of 'key in obj' Change-Id: I48f044c547b48a97cdfb31f7b887dca0ed7e341b --- M modules/ve-mw/init/ve.init.mw.Platform.js M modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js M modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js M modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js 4 files changed, 4 insertions(+), 4 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/ve.init.mw.Platform.js b/modules/ve-mw/init/ve.init.mw.Platform.js index 0f5be8f..ca2939f 100644 --- a/modules/ve-mw/init/ve.init.mw.Platform.js +++ b/modules/ve-mw/init/ve.init.mw.Platform.js @@ -68,7 +68,7 @@ /** @inheritdoc */ ve.init.mw.Platform.prototype.getParsedMessage = function ( key ) { - if ( key in this.parsedMessages ) { + if ( Object.prototype.hasOwnProperty.call( this.parsedMessages, key ) ) { // Prefer parsed results from VisualEditorDataModule if available. return this.parsedMessages[key]; } diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js index 07c5085..d700f05 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js @@ -67,7 +67,7 @@ $.each( query.allcategories || [], function ( index, category ) { result.push( category['*'] ); - linkCacheUpdate['Category:' + category['*']] = { missing: false, hidden: category.hasOwnProperty( 'hidden' ) }; + linkCacheUpdate['Category:' + category['*']] = { missing: false, hidden: 'hidden' in category }; }.bind( this ) ); ve.init.platform.linkCache.set( linkCacheUpdate ); diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js index d56f806..ae79c94 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js @@ -96,7 +96,7 @@ if ( value value !== '' ) { // Remove existing items by value - if ( value in this.categories ) { + if ( Object.prototype.hasOwnProperty.call( this.categories, value ) ) { this.categories[value].metaItem.remove(); } // Add new item diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js index f52b712..24c1c00 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js @@ -226,7 +226,7 @@ // ve.ui.MWMediaResultWidget if ( pages[page].imageinfo pages[page].imageinfo.length 0 ) { title = new mw.Title( pages[page].title ).getMainText(); - if ( !( title in this.titles ) ) { + if ( !Object.prototype.hasOwnProperty.call( this.titles, title ) ) { this.titles[title] = true; items.push( new ve.ui.MWMediaResultWidget( -- To view, visit https://gerrit.wikimedia.org/r/171328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I48f044c547b48a97cdfb31f7b887dca0ed7e341b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Esanders esand...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@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] Syncronize VisualEditor: 81d153b..1a6c46f - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/171532 Change subject: Syncronize VisualEditor: 81d153b..1a6c46f .. Syncronize VisualEditor: 81d153b..1a6c46f Change-Id: Icf5926724ffa91d0e6a7a3da44fee5addfbe219e --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/32/171532/1 diff --git a/VisualEditor b/VisualEditor index 81d153b..1a6c46f 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 81d153b430f9340927784c25b800e8649a753327 +Subproject commit 1a6c46f7eeffda57228b01f03d3cc9939fe3 -- To view, visit https://gerrit.wikimedia.org/r/171532 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf5926724ffa91d0e6a7a3da44fee5addfbe219e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 81d153b..1a6c46f - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 81d153b..1a6c46f .. Syncronize VisualEditor: 81d153b..1a6c46f Change-Id: Icf5926724ffa91d0e6a7a3da44fee5addfbe219e --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 81d153b..1a6c46f 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 81d153b430f9340927784c25b800e8649a753327 +Subproject commit 1a6c46f7eeffda57228b01f03d3cc9939fe3 -- To view, visit https://gerrit.wikimedia.org/r/171532 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf5926724ffa91d0e6a7a3da44fee5addfbe219e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use hasOwnProperty instead of 'key in obj' - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Use hasOwnProperty instead of 'key in obj' .. Use hasOwnProperty instead of 'key in obj' Change-Id: I1c558388505a902d5b048f51d551c7ec09742c2b --- M src/ce/nodes/ve.ce.DefinitionListItemNode.js M src/ce/nodes/ve.ce.HeadingNode.js M src/ce/nodes/ve.ce.ListNode.js M src/ce/nodes/ve.ce.TableCellNode.js M src/ce/nodes/ve.ce.TableSectionNode.js M src/ce/nodes/ve.ce.TextNode.js M src/ce/ve.ce.AnnotationFactory.js M src/ce/ve.ce.NodeFactory.js M src/dm/lineardata/ve.dm.ElementLinearData.js M src/dm/ve.dm.ClassAttributeNode.js M src/dm/ve.dm.DocumentSynchronizer.js M src/dm/ve.dm.IndexValueStore.js M src/dm/ve.dm.MetaItemFactory.js M src/dm/ve.dm.MetaList.js M src/dm/ve.dm.NodeFactory.js M src/dm/ve.dm.TransactionProcessor.js M src/init/sa/ve.init.sa.Platform.js M src/ui/ve.ui.ActionFactory.js M src/ui/ve.ui.Surface.js M src/ui/ve.ui.Trigger.js M src/ui/ve.ui.TriggerRegistry.js 21 files changed, 39 insertions(+), 39 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ce/nodes/ve.ce.DefinitionListItemNode.js b/src/ce/nodes/ve.ce.DefinitionListItemNode.js index 4b9371c..049f479 100644 --- a/src/ce/nodes/ve.ce.DefinitionListItemNode.js +++ b/src/ce/nodes/ve.ce.DefinitionListItemNode.js @@ -45,7 +45,7 @@ var style = this.model.getAttribute( 'style' ), types = { definition: 'dd', term: 'dt' }; - if ( !( style in types ) ) { + if ( !Object.prototype.hasOwnProperty.call( types, style ) ) { throw new Error( 'Invalid style' ); } return types[style]; diff --git a/src/ce/nodes/ve.ce.HeadingNode.js b/src/ce/nodes/ve.ce.HeadingNode.js index 3b9eb78..1b8f966 100644 --- a/src/ce/nodes/ve.ce.HeadingNode.js +++ b/src/ce/nodes/ve.ce.HeadingNode.js @@ -43,7 +43,7 @@ var level = this.model.getAttribute( 'level' ), types = { 1: 'h1', 2: 'h2', 3: 'h3', 4: 'h4', 5: 'h5', 6: 'h6' }; - if ( !( level in types ) ) { + if ( !Object.prototype.hasOwnProperty.call( types, level ) ) { throw new Error( 'Invalid level' ); } return types[level]; diff --git a/src/ce/nodes/ve.ce.ListNode.js b/src/ce/nodes/ve.ce.ListNode.js index fbaaa9c..30bf855 100644 --- a/src/ce/nodes/ve.ce.ListNode.js +++ b/src/ce/nodes/ve.ce.ListNode.js @@ -43,7 +43,7 @@ var style = this.model.getAttribute( 'style' ), types = { bullet: 'ul', number: 'ol' }; - if ( !( style in types ) ) { + if ( !Object.prototype.hasOwnProperty.call( types, style ) ) { throw new Error( 'Invalid style' ); } return types[style]; diff --git a/src/ce/nodes/ve.ce.TableCellNode.js b/src/ce/nodes/ve.ce.TableCellNode.js index 6d0ef39..1b59e6d 100644 --- a/src/ce/nodes/ve.ce.TableCellNode.js +++ b/src/ce/nodes/ve.ce.TableCellNode.js @@ -70,7 +70,7 @@ var style = this.model.getAttribute( 'style' ), types = { data: 'td', header: 'th' }; - if ( !( style in types ) ) { + if ( !Object.prototype.hasOwnProperty.call( types, style ) ) { throw new Error( 'Invalid style' ); } return types[style]; diff --git a/src/ce/nodes/ve.ce.TableSectionNode.js b/src/ce/nodes/ve.ce.TableSectionNode.js index 9412b04..59ce151 100644 --- a/src/ce/nodes/ve.ce.TableSectionNode.js +++ b/src/ce/nodes/ve.ce.TableSectionNode.js @@ -43,7 +43,7 @@ var style = this.model.getAttribute( 'style' ), types = { header: 'thead', body: 'tbody', footer: 'tfoot' }; - if ( !( style in types ) ) { + if ( !Object.prototype.hasOwnProperty.call( types, style ) ) { throw new Error( 'Invalid style' ); } return types[style]; diff --git a/src/ce/nodes/ve.ce.TextNode.js b/src/ce/nodes/ve.ce.TextNode.js index c247ffc..8ccd162 100644 --- a/src/ce/nodes/ve.ce.TextNode.js +++ b/src/ce/nodes/ve.ce.TextNode.js @@ -93,7 +93,7 @@ } // Show meaningful whitespace characters - if ( chr in whitespaceHtmlChars ) { + if ( Object.prototype.hasOwnProperty.call( whitespaceHtmlChars, chr ) ) { setChar( whitespaceHtmlChars[chr], i, data ); } } diff --git a/src/ce/ve.ce.AnnotationFactory.js b/src/ce/ve.ce.AnnotationFactory.js index aa12afe..f6c711d 100644 --- a/src/ce/ve.ce.AnnotationFactory.js +++ b/src/ce/ve.ce.AnnotationFactory.js @@ -31,7 +31,7 @@ */ ve.ce.AnnotationFactory.prototype.getDescription = function ( annotation ) { var type = annotation.constructor.static.name; - if ( type in this.registry ) { + if ( Object.prototype.hasOwnProperty.call( this.registry, type ) ) { return this.registry[type].static.getDescription(
[MediaWiki-commits] [Gerrit] Fix wrong closing tag - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/171533 Change subject: Fix wrong closing tag .. Fix wrong closing tag Bug: 73081 Change-Id: I808dce238f6eab4c4202f366b0b8d3752087002c --- M includes/specials/SpecialVersion.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/33/171533/1 diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 6b9173f..f491c77 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -808,7 +808,7 @@ $html .= Html::rawElement( 'td', array( 'class' = 'mw-version-ext-description' ), $description ); $html .= Html::rawElement( 'td', array( 'class' = 'mw-version-ext-authors' ), $authors ); - $html .= Html::closeElement( 'td' ); + $html .= Html::closeElement( 'tr' ); return $html; } -- To view, visit https://gerrit.wikimedia.org/r/171533 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I808dce238f6eab4c4202f366b0b8d3752087002c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com Gerrit-Reviewer: Gerrit Patch Uploader gerritpatchuploa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make the logo link to the wiki's main page - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/171534 Change subject: Make the logo link to the wiki's main page .. Make the logo link to the wiki's main page Change-Id: I694630ba055e568cb18a69c0333264d14575ed5a --- M modules/header/ext.cx.header.js M modules/header/styles/ext.cx.header.less 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/34/171534/1 diff --git a/modules/header/ext.cx.header.js b/modules/header/ext.cx.header.js index 5e958c8..be59b3c 100644 --- a/modules/header/ext.cx.header.js +++ b/modules/header/ext.cx.header.js @@ -153,7 +153,8 @@ $translationCenterLink, $translationCenter, $publishArea, $headerBar; - $logo = $( 'div' ) + $logo = $( 'a' ) + .prop( 'href', mw.config.get( 'wgScript' ) ) .addClass( 'cx-header__logo' ); $titleText = $( 'span' ) .addClass( 'cx-header__title__name' ) diff --git a/modules/header/styles/ext.cx.header.less b/modules/header/styles/ext.cx.header.less index 3a5ced5..aa2aa05 100644 --- a/modules/header/styles/ext.cx.header.less +++ b/modules/header/styles/ext.cx.header.less @@ -15,6 +15,7 @@ background-position: center center; background-size: 28px; border-right: 1px solid #ddd; + display: block; } .cx-header__title { -- To view, visit https://gerrit.wikimedia.org/r/171534 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I694630ba055e568cb18a69c0333264d14575ed5a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation 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] Remove triggering of unused global events on wb - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove triggering of unused global events on wb .. Remove triggering of unused global events on wb Change-Id: I0ec30277b2babde7eec055ef5c2ed8d0f4dec885 --- M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js 1 file changed, 0 insertions(+), 19 deletions(-) Approvals: Henning Snater: Looks good to me, approved Jeroen De Dauw: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js index 202faa2..4bb7639 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js @@ -113,25 +113,6 @@ PARENT.prototype._create.call( this ); this._createWidgets(); - - var self = this; - this.element - // TODO: Move that code to a sensible place (see jQuery.wikibase.entityview): - .on( 'fingerprintviewafterstartediting.' + this.widgetName, function( event ) { - $( wb ).trigger( 'startItemPageEditMode', [ - self.element, - { - exclusive: false, - wbCopyrightWarningGravity: 'sw' - } - ] ); - } ) - .on( 'fingerprintviewafterstopediting.' + this.widgetName, function( event, dropValue ) { - $( wb ).trigger( 'stopItemPageEditMode', [ - self.element, - { save: dropValue !== true } - ] ); - } ); }, /** -- To view, visit https://gerrit.wikimedia.org/r/171517 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ec30277b2babde7eec055ef5c2ed8d0f4dec885 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Add qunit localhost setup to role::ci::slave::labs - change (operations/puppet)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/171535 Change subject: Add qunit localhost setup to role::ci::slave::labs .. Add qunit localhost setup to role::ci::slave::labs Currently, this is only available on role::ci::slave hosts. Bug: 72184 Change-Id: I40a1783f19d948168dc92dd33f323cd86be2d8f3 --- M manifests/role/ci.pp 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/35/171535/1 diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp index 461504a..b5bb5f2 100644 --- a/manifests/role/ci.pp +++ b/manifests/role/ci.pp @@ -423,6 +423,19 @@ ] } +file { '/srv/localhost': +ensure = directory, +mode = '0775', +owner = 'jenkins-slave', +group = 'jenkins-slave', +} +file { '/srv/localhost/qunit': +ensure = directory, +mode = '0775', +owner = 'jenkins-slave', +group = 'jenkins-slave', +} +include contint::qunit_localhost } -- To view, visit https://gerrit.wikimedia.org/r/171535 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40a1783f19d948168dc92dd33f323cd86be2d8f3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make NoLangLinkHandler testable. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/159762 Change subject: Make NoLangLinkHandler testable. .. Make NoLangLinkHandler testable. Doesn't add a test yet, though. Change-Id: I4b0a0a76d406beb93e23de6ba86948bf3fc00684 --- M client/includes/parserhooks/NoLangLinkHandler.php 1 file changed, 42 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/62/159762/3 diff --git a/client/includes/parserhooks/NoLangLinkHandler.php b/client/includes/parserhooks/NoLangLinkHandler.php index 71619dd..3701728 100644 --- a/client/includes/parserhooks/NoLangLinkHandler.php +++ b/client/includes/parserhooks/NoLangLinkHandler.php @@ -19,6 +19,41 @@ class NoLangLinkHandler { /** +* @var NamespaceChecker +*/ + private $namespaceChecker; + + /** +* Parser function +* +* @since 0.4 +* +* @param \Parser $parser +* +* @return string +*/ + public static function handle( $parser ) { + $handler = self::newFromGlobalState(); + $handler-doHandle( $parser ); + } + + public function newFromGlobalState() { + $wikibaseClient = WikibaseClient::getDefaultInstance(); + $settings = $wikibaseClient-getSettings(); + + $namespaceChecker = new NamespaceChecker( + $settings-getSetting( 'excludeNamespaces' ), + $settings-getSetting( 'namespaces' ) + ); + + return new NoLangLinkHandler( $namespaceChecker ); + } + + public function __construct( NamespaceChecker $namespaceChecker ) { + $this-namespaceChecker = $namespaceChecker; + } + + /** * Get the noexternallanglinks page property from the ParserOutput, * which is set by the {{#noexternallanglinks}} parser function. * @@ -27,7 +62,7 @@ * @return string[] A list of language codes, identifying which repository links to ignore. * Empty if {{#noexternallanglinks}} was not used on the page. */ - public static function getNoExternalLangLinks( ParserOutput $out ) { + public function getNoExternalLangLinks( ParserOutput $out ) { $property = $out-getProperty( 'noexternallanglinks' ); $nel = is_string( $property ) ? unserialize( $property ) : array(); return $nel; @@ -42,29 +77,22 @@ * @param ParserOutput $out * @param string[] $noexternallanglinks a list of languages to suppress */ - public static function setNoExternalLangLinks( ParserOutput $out, array $noexternallanglinks ) { + public function setNoExternalLangLinks( ParserOutput $out, array $noexternallanglinks ) { $out-setProperty( 'noexternallanglinks', serialize( $noexternallanglinks ) ); } /** * Parser function * -* @since 0.4 +* @since 0.5 * * @param \Parser $parser * * @return string */ - public static function handle( $parser ) { - $wikibaseClient = WikibaseClient::getDefaultInstance(); - $settings = $wikibaseClient-getSettings(); + public function doHandle( $parser ) { - $namespaceChecker = new NamespaceChecker( - $settings-getSetting( 'excludeNamespaces' ), - $settings-getSetting( 'namespaces' ) - ); - - if ( !$namespaceChecker-isWikibaseEnabled( $parser-getTitle()-getNamespace() ) ) { + if ( !$this-namespaceChecker-isWikibaseEnabled( $parser-getTitle()-getNamespace() ) ) { // shorten out return ''; } @@ -75,8 +103,8 @@ $output = $parser-getOutput(); - $nel = array_merge( self::getNoExternalLangLinks( $output ), $langs ); - self::setNoExternalLangLinks( $output, $nel ); + $nel = array_merge( $this-getNoExternalLangLinks( $output ), $langs ); + $this-setNoExternalLangLinks( $output, $nel ); return ''; } -- To view, visit https://gerrit.wikimedia.org/r/159762 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b0a0a76d406beb93e23de6ba86948bf3fc00684 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: jenkins-bot ___
[MediaWiki-commits] [Gerrit] Move wtp1001 to wtp1004 to raid1-lvm partman scheme - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/171536 Change subject: Move wtp1001 to wtp1004 to raid1-lvm partman scheme .. Move wtp1001 to wtp1004 to raid1-lvm partman scheme Turns out wtp1001-wtp1004 were using a different partman scheme. Use the same as the rest of wtp boxes for consistency Change-Id: I161d1c68b8b18faa7e44f9fd1c425ff3996a5cfd --- M modules/install-server/files/autoinstall/netboot.cfg 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/171536/1 diff --git a/modules/install-server/files/autoinstall/netboot.cfg b/modules/install-server/files/autoinstall/netboot.cfg index edfc1ac..ea4326e 100755 --- a/modules/install-server/files/autoinstall/netboot.cfg +++ b/modules/install-server/files/autoinstall/netboot.cfg @@ -56,7 +56,7 @@ acamar|achernar|baham|cobalt|lead|lithium|polonium) echo partman/raid1-lvm.cfg ;; \ cp102[1-9]|cp10[3-6][0-9]|cp1070|cp[34]0[0-9][0-9]|sq6[7-9]|sq70|dysprosium) echo partman/raid1-varnish.cfg ;; \ cp1008) echo partman/raid1-varnish.cfg ;; \ - antimony|arsenic|caesium|erbium|gadolinium|holmium|magnesium|neodymium|palladium|promethium|rubidium|strontium|terbium|wtp100[1-4]) echo partman/lvm.cfg ;; \ + antimony|arsenic|caesium|erbium|gadolinium|holmium|magnesium|neodymium|palladium|promethium|rubidium|strontium|terbium) echo partman/lvm.cfg ;; \ lvs[1-6]|lvs[12]00*) echo partman/lvs.cfg ;; \ lvs[34]00*) echo partman/raid1-lvm.cfg ;; \ eeden) echo partman/raid1-1partition.cfg ;; \ @@ -86,7 +86,7 @@ virt100[1-9]) echo partman/virt-raid10-cisco.cfg ;; \ labnet1001) echo partman/lvm.cfg ;; \ labmon1001) echo partman/raid1-lvm.cfg ;; \ - wtp100[5-9]|wtp10[1-2][0-9]|hafnium) echo partman/raid1-lvm.cfg ;; \ + wtp100[1-9]|wtp10[1-2][0-9]|hafnium) echo partman/raid1-lvm.cfg ;; \ carbon|stat1003) echo partman/raid5-gpt-lvm.cfg ;; \ hydrogen|krypton) echo partman/raid1-1partition.cfg ;; \ mercury|thallium|gold|platinum) echo partman/raid1-lvm.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/171536 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I161d1c68b8b18faa7e44f9fd1c425ff3996a5cfd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move wtp1001 to wtp1004 to raid1-lvm partman scheme - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Move wtp1001 to wtp1004 to raid1-lvm partman scheme .. Move wtp1001 to wtp1004 to raid1-lvm partman scheme Turns out wtp1001-wtp1004 were using a different partman scheme. Use the same as the rest of wtp boxes for consistency Change-Id: I161d1c68b8b18faa7e44f9fd1c425ff3996a5cfd --- M modules/install-server/files/autoinstall/netboot.cfg 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/modules/install-server/files/autoinstall/netboot.cfg b/modules/install-server/files/autoinstall/netboot.cfg index edfc1ac..ea4326e 100755 --- a/modules/install-server/files/autoinstall/netboot.cfg +++ b/modules/install-server/files/autoinstall/netboot.cfg @@ -56,7 +56,7 @@ acamar|achernar|baham|cobalt|lead|lithium|polonium) echo partman/raid1-lvm.cfg ;; \ cp102[1-9]|cp10[3-6][0-9]|cp1070|cp[34]0[0-9][0-9]|sq6[7-9]|sq70|dysprosium) echo partman/raid1-varnish.cfg ;; \ cp1008) echo partman/raid1-varnish.cfg ;; \ - antimony|arsenic|caesium|erbium|gadolinium|holmium|magnesium|neodymium|palladium|promethium|rubidium|strontium|terbium|wtp100[1-4]) echo partman/lvm.cfg ;; \ + antimony|arsenic|caesium|erbium|gadolinium|holmium|magnesium|neodymium|palladium|promethium|rubidium|strontium|terbium) echo partman/lvm.cfg ;; \ lvs[1-6]|lvs[12]00*) echo partman/lvs.cfg ;; \ lvs[34]00*) echo partman/raid1-lvm.cfg ;; \ eeden) echo partman/raid1-1partition.cfg ;; \ @@ -86,7 +86,7 @@ virt100[1-9]) echo partman/virt-raid10-cisco.cfg ;; \ labnet1001) echo partman/lvm.cfg ;; \ labmon1001) echo partman/raid1-lvm.cfg ;; \ - wtp100[5-9]|wtp10[1-2][0-9]|hafnium) echo partman/raid1-lvm.cfg ;; \ + wtp100[1-9]|wtp10[1-2][0-9]|hafnium) echo partman/raid1-lvm.cfg ;; \ carbon|stat1003) echo partman/raid5-gpt-lvm.cfg ;; \ hydrogen|krypton) echo partman/raid1-1partition.cfg ;; \ mercury|thallium|gold|platinum) echo partman/raid1-lvm.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/171536 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I161d1c68b8b18faa7e44f9fd1c425ff3996a5cfd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make resource definitions work from /vendor/, too - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Make resource definitions work from /vendor/, too .. Make resource definitions work from /vendor/, too Change-Id: I59ac7b8f3e48d6098d53875abcb8811fc36f5892 --- M client/WikibaseClient.hooks.php M client/resources/Resources.php M lib/resources/Resources.php M lib/resources/api/resources.php M lib/resources/entityChangers/resources.php M lib/resources/experts/resources.php M lib/resources/formatters/resources.php M lib/resources/jquery.wikibase/resources.php M lib/resources/jquery.wikibase/snakview/resources.php M lib/resources/jquery.wikibase/toolbar/resources.php M lib/resources/parsers/resources.php M lib/resources/wikibase.RepoApi/resources.php M lib/resources/wikibase.store/resources.php M lib/resources/wikibase.utilities/resources.php M repo/resources/Resources.php 15 files changed, 80 insertions(+), 28 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 46c7e25..f60ec9d 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -501,8 +501,14 @@ public static function onGetBetaFeaturePreferences( User $user, array $betaPreferences ) { global $wgExtensionAssetsPath; - $remoteExtPathParts = explode( DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR , __DIR__, 2 ); - $assetsPath = $wgExtensionAssetsPath . '/' . $remoteExtPathParts[1]; +preg_match( +'+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . +preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', +__DIR__, +$remoteExtPathParts +); + + $assetsPath = $wgExtensionAssetsPath . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $remoteExtPathParts[1]; $settings = WikibaseClient::getDefaultInstance()-getSettings(); if ( !$settings-getSetting( 'otherProjectsLinksBeta' ) || $settings-getSetting( 'otherProjectsLinksByDefault' ) ) { diff --git a/client/resources/Resources.php b/client/resources/Resources.php index 61812b5..c591f28 100644 --- a/client/resources/Resources.php +++ b/client/resources/Resources.php @@ -1,7 +1,12 @@ ?php return call_user_func( function() { - $remoteExtPathParts = explode( DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR , __DIR__, 2 ); + preg_match( + '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . + preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', + __DIR__, + $remoteExtPathParts + ); $moduleTemplate = array( 'localBasePath' = __DIR__, 'remoteExtPath' = $remoteExtPathParts[1], diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 770ec7d..14016e8 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -11,8 +11,11 @@ * @codeCoverageIgnoreStart */ return call_user_func( function() { - $remoteExtPathParts = explode( - DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR, __DIR__, 2 + preg_match( + '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . + preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', + __DIR__, + $remoteExtPathParts ); $moduleTemplate = array( 'localBasePath' = __DIR__, diff --git a/lib/resources/api/resources.php b/lib/resources/api/resources.php index 6db8cc2..8379334 100644 --- a/lib/resources/api/resources.php +++ b/lib/resources/api/resources.php @@ -5,8 +5,11 @@ */ return call_user_func( function() { - $remoteExtPathParts = explode( - DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR, __DIR__, 2 + preg_match( + '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . + preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', + __DIR__, + $remoteExtPathParts ); $moduleTemplate = array( 'localBasePath' = __DIR__, diff --git a/lib/resources/entityChangers/resources.php b/lib/resources/entityChangers/resources.php index 5305309..6b0c1ed 100644 --- a/lib/resources/entityChangers/resources.php +++ b/lib/resources/entityChangers/resources.php @@ -5,8 +5,11 @@ */ return call_user_func( function() { - $remoteExtPathParts = explode( - DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR, __DIR__, 2 + preg_match( + '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . +
[MediaWiki-commits] [Gerrit] Make wikibase lazily initiable - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Make wikibase lazily initiable .. Make wikibase lazily initiable Change-Id: I82aab6f9b2a1e77a393495b5bef5904bfa25c64c --- M lib/resources/wikibase.js 1 file changed, 11 insertions(+), 11 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/wikibase.js b/lib/resources/wikibase.js index b57abbd..432e898 100644 --- a/lib/resources/wikibase.js +++ b/lib/resources/wikibase.js @@ -6,11 +6,11 @@ * @author Daniel Werner daniel.werner at wikimedia.de */ -/** - * Global 'Wikibase' extension singleton. - * @since 0.1 - */ -this.wikibase = this.wb = new ( function Wb( mw, $ ) { +this.wikibase = this.wikibase || {}; + +this.wb = this.wikibase; + +( function ( wb, mw, $ ) { 'use strict'; /** @@ -23,7 +23,7 @@ * * @return {Object} Set of languages (empty object when ULS is not available) */ - this.getLanguages = function() { + wb.getLanguages = function() { return ( $.uls !== undefined ) ? $.uls.data.languages : {}; }; @@ -34,8 +34,8 @@ * @param {string} langCode * @return string */ - this.getLanguageNameByCode = function( langCode ) { - var language = this.getLanguages()[ langCode ]; + wb.getLanguageNameByCode = function( langCode ) { + var language = wb.getLanguages()[ langCode ]; if( language language[2] ) { return language[2]; } @@ -46,11 +46,11 @@ * Same getLanguageNameByCode but on user UI native language instead, fallbacks * to getLanguageNameByCode in cases native translation wasn't available */ - this.getNativeLanguageNameByCode = function( langCode ) { + wb.getNativeLanguageNameByCode = function( langCode ) { var ulsLanguages = mw.config.get( 'wgULSLanguages' ); return ( ulsLanguages ulsLanguages[langCode] ) ? ulsLanguages[langCode] : - this.getLanguageNameByCode( langCode ); + wb.getLanguageNameByCode( langCode ); }; -} )( mediaWiki, jQuery ); +} )( wikibase, mediaWiki, jQuery ); -- To view, visit https://gerrit.wikimedia.org/r/171518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I82aab6f9b2a1e77a393495b5bef5904bfa25c64c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Replace deprecated .error() by .fail() - change (mediawiki...ApiSandbox)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/171537 Change subject: Replace deprecated .error() by .fail() .. Replace deprecated .error() by .fail() Change-Id: Icdd0f01da029074bc06b7141ca9063a375843e63 --- M resources/main.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ApiSandbox refs/changes/37/171537/1 diff --git a/resources/main.js b/resources/main.js index d16ff63..459c9f0 100644 --- a/resources/main.js +++ b/resources/main.js @@ -150,7 +150,7 @@ } completeCallback(); } - ).error( errorCallback ); + ).fail( errorCallback ); } } -- To view, visit https://gerrit.wikimedia.org/r/171537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icdd0f01da029074bc06b7141ca9063a375843e63 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ApiSandbox Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix wrong closing tag in Special:Version - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix wrong closing tag in Special:Version .. Fix wrong closing tag in Special:Version Bug: 73081 Change-Id: I808dce238f6eab4c4202f366b0b8d3752087002c --- M includes/specials/SpecialVersion.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 6b9173f..f491c77 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -808,7 +808,7 @@ $html .= Html::rawElement( 'td', array( 'class' = 'mw-version-ext-description' ), $description ); $html .= Html::rawElement( 'td', array( 'class' = 'mw-version-ext-authors' ), $authors ); - $html .= Html::closeElement( 'td' ); + $html .= Html::closeElement( 'tr' ); return $html; } -- To view, visit https://gerrit.wikimedia.org/r/171533 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I808dce238f6eab4c4202f366b0b8d3752087002c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com Gerrit-Reviewer: Gerrit Patch Uploader gerritpatchuploa...@gmail.com 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] Actually make resources work from vendor - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/171538 Change subject: Actually make resources work from vendor .. Actually make resources work from vendor Change-Id: Iaa6e344ea897a9a399dee7d4618389ce176c97b4 --- M client/WikibaseClient.hooks.php M client/resources/Resources.php M lib/resources/Resources.php M lib/resources/api/resources.php M lib/resources/entityChangers/resources.php M lib/resources/experts/resources.php M lib/resources/formatters/resources.php M lib/resources/jquery.wikibase/resources.php M lib/resources/jquery.wikibase/snakview/resources.php M lib/resources/jquery.wikibase/toolbar/resources.php M lib/resources/parsers/resources.php M lib/resources/wikibase.RepoApi/resources.php M lib/resources/wikibase.store/resources.php M lib/resources/wikibase.utilities/resources.php M repo/resources/Resources.php 15 files changed, 44 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/38/171538/1 diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index f60ec9d..9cfb4c6 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -502,8 +502,8 @@ global $wgExtensionAssetsPath; preg_match( -'+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . -preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', +'+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '((?:vendor|extensions)' . +preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+', __DIR__, $remoteExtPathParts ); diff --git a/client/resources/Resources.php b/client/resources/Resources.php index c591f28..8ce8981 100644 --- a/client/resources/Resources.php +++ b/client/resources/Resources.php @@ -2,14 +2,14 @@ return call_user_func( function() { preg_match( - '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . - preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', + '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '((?:vendor|extensions)' . + preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+', __DIR__, $remoteExtPathParts ); $moduleTemplate = array( 'localBasePath' = __DIR__, - 'remoteExtPath' = $remoteExtPathParts[1], + 'remoteExtPath' = DIRECTORY_SEPARATOR . '..' . $remoteExtPathParts[1], ); return array( diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index f2e85c4..48b6acf 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -12,14 +12,14 @@ */ return call_user_func( function() { preg_match( - '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . - preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', + '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '((?:vendor|extensions)' . + preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+', __DIR__, $remoteExtPathParts ); $moduleTemplate = array( 'localBasePath' = __DIR__, - 'remoteExtPath' = $remoteExtPathParts[1], + 'remoteExtPath' = DIRECTORY_SEPARATOR . '..' . $remoteExtPathParts[1], ); $modules = array( diff --git a/lib/resources/api/resources.php b/lib/resources/api/resources.php index 8379334..d483b9c 100644 --- a/lib/resources/api/resources.php +++ b/lib/resources/api/resources.php @@ -6,14 +6,14 @@ return call_user_func( function() { preg_match( - '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(?:vendor|extensions)' . - preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+', + '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . '((?:vendor|extensions)' . + preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+', __DIR__, $remoteExtPathParts ); $moduleTemplate = array( 'localBasePath' = __DIR__, - 'remoteExtPath' = $remoteExtPathParts[1], + 'remoteExtPath' = DIRECTORY_SEPARATOR . '..' . $remoteExtPathParts[1], ); return array( diff --git a/lib/resources/entityChangers/resources.php b/lib/resources/entityChangers/resources.php index 6b0c1ed..985b09f 100644 --- a/lib/resources/entityChangers/resources.php +++ b/lib/resources/entityChangers/resources.php @@ -6,14 +6,14 @@ return call_user_func( function() { preg_match( - '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+'
[MediaWiki-commits] [Gerrit] QA update Ruby gems - change (mediawiki...Flow)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/171539 Change subject: QA update Ruby gems .. QA update Ruby gems Change-Id: Iacc12b7783a4b8b950fce5a94595adb336bfc6aa --- M Gemfile.lock 1 file changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/39/171539/1 diff --git a/Gemfile.lock b/Gemfile.lock index 7fe92d2..b40ee68 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,7 +6,7 @@ parser (= 2.2.0.pre.3, 3.0) blankslate (3.1.3) builder (3.2.2) -childprocess (0.5.3) +childprocess (0.5.5) ffi (~ 1.0, = 1.0.11) colorize (0.7.3) csscss (1.3.3) @@ -18,11 +18,11 @@ gherkin (~ 2.12) multi_json (= 1.7.5, 2.0) multi_test (= 0.1.1) -data_magic (0.19) +data_magic (0.20) faker (= 1.1.2) - yml_reader (= 0.3) + yml_reader (= 0.4) diff-lcs (1.2.5) -domain_name (0.5.21) +domain_name (0.5.22) unf (= 0.0.5, 1.0.0) faker (1.4.3) i18n (~ 0.5) @@ -31,7 +31,7 @@ faraday-cookie_jar (0.0.6) faraday (= 0.7.4) http-cookie (~ 1.0.0) -ffi (1.9.3) +ffi (1.9.6) gherkin (2.12.2) multi_json (~ 1.3) headless (1.0.2) @@ -39,10 +39,10 @@ domain_name (~ 0.5) i18n (0.6.11) json (1.8.1) -mediawiki_api (0.2.1) +mediawiki_api (0.3.0) faraday (~ 0.9, = 0.9.0) faraday-cookie_jar (~ 0.0, = 0.0.6) -mediawiki_selenium (0.3.2) +mediawiki_selenium (0.4.0) cucumber (~ 1.3, = 1.3.10) headless (~ 1.0, = 1.0.1) json (~ 1.8, = 1.8.1) @@ -51,18 +51,18 @@ rest-client (~ 1.6, = 1.6.7) rspec-expectations (~ 2.14, = 2.14.4) syntax (~ 1.2, = 1.2.0) -mime-types (2.3) +mime-types (2.4.3) multi_json (1.10.1) multi_test (0.1.1) multipart-post (2.0.0) -netrc (0.7.7) +netrc (0.8.0) page-object (1.0.2) page_navigation (= 0.9) selenium-webdriver (= 2.42.0) watir-webdriver (= 0.6.9) page_navigation (0.9) data_magic (= 0.14) -parser (2.2.0.pre.4) +parser (2.2.0.pre.7) ast (= 1.1, 3.0) slop (~ 3.4, = 3.4.5) parslet (1.6.2) @@ -74,15 +74,15 @@ netrc (~ 0.7) rspec-expectations (2.99.2) diff-lcs (= 1.1.3, 2.0) -rubocop (0.26.1) +rubocop (0.27.0) astrolabe (~ 1.3) - parser (= 2.2.0.pre.4, 3.0) + parser (= 2.2.0.pre.6, 3.0) powerpack (~ 0.0.6) rainbow (= 1.99.1, 3.0) ruby-progressbar (~ 1.4) -ruby-progressbar (1.6.0) +ruby-progressbar (1.7.0) rubyzip (1.1.6) -selenium-webdriver (2.43.0) +selenium-webdriver (2.44.0) childprocess (~ 0.5) multi_json (~ 1.0) rubyzip (~ 1.0) @@ -92,10 +92,10 @@ unf (0.1.4) unf_ext unf_ext (0.0.6) -watir-webdriver (0.6.10) +watir-webdriver (0.6.11) selenium-webdriver (= 2.18.0) websocket (1.2.1) -yml_reader (0.3) +yml_reader (0.4) PLATFORMS ruby -- To view, visit https://gerrit.wikimedia.org/r/171539 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iacc12b7783a4b8b950fce5a94595adb336bfc6aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] My commit message - change (mediawiki/core)
Joyceg has uploaded a new change for review. https://gerrit.wikimedia.org/r/171540 Change subject: My commit message .. My commit message Bug: Bug 61419 - Improving message databaseerror-text Change-Id:I55862204ef71f69bc88c79fe2259f7cb8365699a --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/40/171540/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 341f626..58eb575 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -306,7 +306,7 @@ nospecialpagetext: strongYou have requested an invalid special page./strong\n\nA list of valid special pages can be found at [[Special:SpecialPages|{{int:specialpages}}]]., error: Error, databaseerror: Database error, - databaseerror-text: A database query error has occurred.\nThis may indicate a bug in the software., + databaseerror-text: A database query error has occurred. This may indicate a bug in the software. See the manual on how [[Manual:How to debug#SQL errors|to debug SQL errors]]., databaseerror-textcl: A database query error has occurred., databaseerror-query: Query: $1, databaseerror-function: Function: $1, -- To view, visit https://gerrit.wikimedia.org/r/171540 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55862204ef71f69bc88c79fe2259f7cb8365699a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Joyceg geojoyce...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA update Ruby gems - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: QA update Ruby gems .. QA update Ruby gems Change-Id: Iacc12b7783a4b8b950fce5a94595adb336bfc6aa --- M Gemfile.lock 1 file changed, 16 insertions(+), 16 deletions(-) Approvals: Cmcmahon: Looks good to me, approved jenkins-bot: Verified diff --git a/Gemfile.lock b/Gemfile.lock index 7fe92d2..b40ee68 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,7 +6,7 @@ parser (= 2.2.0.pre.3, 3.0) blankslate (3.1.3) builder (3.2.2) -childprocess (0.5.3) +childprocess (0.5.5) ffi (~ 1.0, = 1.0.11) colorize (0.7.3) csscss (1.3.3) @@ -18,11 +18,11 @@ gherkin (~ 2.12) multi_json (= 1.7.5, 2.0) multi_test (= 0.1.1) -data_magic (0.19) +data_magic (0.20) faker (= 1.1.2) - yml_reader (= 0.3) + yml_reader (= 0.4) diff-lcs (1.2.5) -domain_name (0.5.21) +domain_name (0.5.22) unf (= 0.0.5, 1.0.0) faker (1.4.3) i18n (~ 0.5) @@ -31,7 +31,7 @@ faraday-cookie_jar (0.0.6) faraday (= 0.7.4) http-cookie (~ 1.0.0) -ffi (1.9.3) +ffi (1.9.6) gherkin (2.12.2) multi_json (~ 1.3) headless (1.0.2) @@ -39,10 +39,10 @@ domain_name (~ 0.5) i18n (0.6.11) json (1.8.1) -mediawiki_api (0.2.1) +mediawiki_api (0.3.0) faraday (~ 0.9, = 0.9.0) faraday-cookie_jar (~ 0.0, = 0.0.6) -mediawiki_selenium (0.3.2) +mediawiki_selenium (0.4.0) cucumber (~ 1.3, = 1.3.10) headless (~ 1.0, = 1.0.1) json (~ 1.8, = 1.8.1) @@ -51,18 +51,18 @@ rest-client (~ 1.6, = 1.6.7) rspec-expectations (~ 2.14, = 2.14.4) syntax (~ 1.2, = 1.2.0) -mime-types (2.3) +mime-types (2.4.3) multi_json (1.10.1) multi_test (0.1.1) multipart-post (2.0.0) -netrc (0.7.7) +netrc (0.8.0) page-object (1.0.2) page_navigation (= 0.9) selenium-webdriver (= 2.42.0) watir-webdriver (= 0.6.9) page_navigation (0.9) data_magic (= 0.14) -parser (2.2.0.pre.4) +parser (2.2.0.pre.7) ast (= 1.1, 3.0) slop (~ 3.4, = 3.4.5) parslet (1.6.2) @@ -74,15 +74,15 @@ netrc (~ 0.7) rspec-expectations (2.99.2) diff-lcs (= 1.1.3, 2.0) -rubocop (0.26.1) +rubocop (0.27.0) astrolabe (~ 1.3) - parser (= 2.2.0.pre.4, 3.0) + parser (= 2.2.0.pre.6, 3.0) powerpack (~ 0.0.6) rainbow (= 1.99.1, 3.0) ruby-progressbar (~ 1.4) -ruby-progressbar (1.6.0) +ruby-progressbar (1.7.0) rubyzip (1.1.6) -selenium-webdriver (2.43.0) +selenium-webdriver (2.44.0) childprocess (~ 0.5) multi_json (~ 1.0) rubyzip (~ 1.0) @@ -92,10 +92,10 @@ unf (0.1.4) unf_ext unf_ext (0.0.6) -watir-webdriver (0.6.10) +watir-webdriver (0.6.11) selenium-webdriver (= 2.18.0) websocket (1.2.1) -yml_reader (0.3) +yml_reader (0.4) PLATFORMS ruby -- To view, visit https://gerrit.wikimedia.org/r/171539 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iacc12b7783a4b8b950fce5a94595adb336bfc6aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: SG shah...@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] Use getHtmlCode() instead of getCode() to set the lang attri... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Use getHtmlCode() instead of getCode() to set the lang attribute .. Use getHtmlCode() instead of getCode() to set the lang attribute The lang attribute of HTML elements should conform to BCP 47. Bug: 72939 Change-Id: I9b4a734753af2c9dd7256eec60781553bc76edbf --- M includes/CategoryViewer.php M includes/EditPage.php M includes/logging/LogEventsList.php M includes/specials/SpecialNewimages.php M includes/specials/SpecialVersion.php 5 files changed, 6 insertions(+), 6 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 7581ae4..f68da95 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -136,7 +136,7 @@ } $lang = $this-getLanguage(); - $langAttribs = array( 'lang' = $lang-getCode(), 'dir' = $lang-getDir() ); + $langAttribs = array( 'lang' = $lang-getHtmlCode(), 'dir' = $lang-getDir() ); # put a div around the headings which are in the user language $r = Html::openElement( 'div', $langAttribs ) . $r . '/div'; @@ -515,7 +515,7 @@ } $pageLang = $this-title-getPageLanguage(); - $attribs = array( 'lang' = $pageLang-getCode(), 'dir' = $pageLang-getDir(), + $attribs = array( 'lang' = $pageLang-getHtmlCode(), 'dir' = $pageLang-getDir(), 'class' = 'mw-content-' . $pageLang-getDir() ); $list = Html::rawElement( 'div', $attribs, $list ); diff --git a/includes/EditPage.php b/includes/EditPage.php index fa19c78..d106da2 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2956,7 +2956,7 @@ ); $pageLang = $this-mTitle-getPageLanguage(); - $attribs['lang'] = $pageLang-getCode(); + $attribs['lang'] = $pageLang-getHtmlCode(); $attribs['dir'] = $pageLang-getDir(); $wgOut-addHTML( Html::textarea( $name, $wikitext, $attribs ) ); diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index 8421672..5d11f84 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -557,7 +557,7 @@ if ( $logBody ) { if ( $msgKey[0] ) { $dir = $context-getLanguage()-getDir(); - $lang = $context-getLanguage()-getCode(); + $lang = $context-getLanguage()-getHtmlCode(); $s = Xml::openElement( 'div', array( 'class' = mw-warning-with-logexcerpt mw-content-$dir, diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index b9d1872..bc16925 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -59,7 +59,7 @@ if ( !$message-isDisabled() ) { $this-getOutput()-addWikiText( Html::rawElement( 'p', - array( 'lang' = $wgContLang-getCode(), 'dir' = $wgContLang-getDir() ), + array( 'lang' = $wgContLang-getHtmlCode(), 'dir' = $wgContLang-getDir() ), \n . $message-plain() . \n ), /* $lineStart */ false, diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 6b9173f..5be3bc5 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -1203,7 +1203,7 @@ $language = $this-getLanguage(); $thAttribures = array( 'dir' = $language-getDir(), - 'lang' = $language-getCode() + 'lang' = $language-getHtmlCode() ); $out = Html::element( 'h2', -- To view, visit https://gerrit.wikimedia.org/r/170890 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b4a734753af2c9dd7256eec60781553bc76edbf Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Fomafix Gerrit-Reviewer: Gerrit Patch Uploader gerritpatchuploa...@gmail.com Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Tpt thomaspe...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing
[MediaWiki-commits] [Gerrit] Allow mediawiki.cookie module to be used on mobile - change (mediawiki/core)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/171541 Change subject: Allow mediawiki.cookie module to be used on mobile .. Allow mediawiki.cookie module to be used on mobile Change-Id: If9cce75738e11a552eee620bdab8b2e2c5938392 --- M resources/Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/41/171541/1 diff --git a/resources/Resources.php b/resources/Resources.php index 24e2fc2..e53ed54 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1002,6 +1002,7 @@ 'dependencies' = array( 'jquery.cookie', ), + 'targets' = array( 'desktop', 'mobile' ), ), 'mediawiki.toolbar' = array( 'class' = 'ResourceLoaderEditToolbarModule', -- To view, visit https://gerrit.wikimedia.org/r/171541 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9cce75738e11a552eee620bdab8b2e2c5938392 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Phuedx g...@samsmith.io ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Use wfParseUrl() in Http::isValidURI() and fix tests - change (mediawiki/core)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/171542 Change subject: WIP: Use wfParseUrl() in Http::isValidURI() and fix tests .. WIP: Use wfParseUrl() in Http::isValidURI() and fix tests Instead of building yet another regular expression, let's use wfParseUrl() and ensure that the scheme is either http or https and the hostname is not empty. Two tests are relaxed: - 'http://!èèè¿¿¿~~\'' is now a valid URL. My understanding is that Http::isValidURI() is used on user input, and with IDN, this may well be a legitimate hostname. - 'http://a ¿non !!sens after' [FIXME] Change-Id: I3b45c71e53c0c85768647b1d4c684c2eb12be229 --- M includes/HttpFunctions.php M tests/phpunit/includes/HttpTest.php 2 files changed, 11 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/42/171542/1 diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index f9ee14b..ca4da13 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -172,10 +172,14 @@ * @return bool */ public static function isValidURI( $uri ) { - return preg_match( - '/^https?:\/\/[^\/\s]\S*$/D', - $uri - ); + $i = wfParseUrl( $uri ); + + if ($i === false) { + return false; + } + + return ($i ['scheme'] === 'http' || $i ['scheme'] === 'https') + $i['host'] != ''; } } diff --git a/tests/phpunit/includes/HttpTest.php b/tests/phpunit/includes/HttpTest.php index fbd2c31..8d33cc4 100644 --- a/tests/phpunit/includes/HttpTest.php +++ b/tests/phpunit/includes/HttpTest.php @@ -93,10 +93,8 @@ array( true, 'http://user:pass@host', 'Username and password provided' ), # (\S+) - host part is made of anything not whitespaces - // commented these out in order to remove @group Broken - // @todo are these valid tests? if so, fix Http::isValidURI so it can handle them - //array( false, 'http://!èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ), - //array( false, 'http://exam:ple.org/', 'hostname can not use colons!' ), + array( true, 'http://!èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ), + array( false, 'http://exam:ple.org/', 'hostname can not use colons!' ), # (:[0-9]+)? - port number array( true, 'http://example.org:80/' ), @@ -125,7 +123,7 @@ array( true, 'http://example.org/?id#anchor' ), array( true, 'http://example.org/?#anchor' ), - array( false, 'http://a ¿non !!sens after', 'Allow anything after URI' ), + array( true, 'http://a ¿non !!sens after', 'Allow anything after URI' ), ); } -- To view, visit https://gerrit.wikimedia.org/r/171542 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b45c71e53c0c85768647b1d4c684c2eb12be229 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Defer entity deserialization. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/167224 Change subject: Defer entity deserialization. .. Defer entity deserialization. This introduces EntityHolders which are used by EntityContent as placeholders for not-yet-deserialized entities. This should avoid averhead especially for creating deep copies. Change-Id: I51f3d5860859c25acfb535d4a5725ceced9c090b --- A repo/includes/content/DeferredCopyEntityHolder.php A repo/includes/content/DeferredDecodingEntityHolder.php M repo/includes/content/EntityContent.php M repo/includes/content/EntityContentFactory.php M repo/includes/content/EntityHandler.php A repo/includes/content/EntityHolder.php A repo/includes/content/EntityInstanceHolder.php M repo/includes/content/ItemContent.php M repo/includes/content/PropertyContent.php M repo/tests/phpunit/includes/content/EntityHandlerTest.php M repo/tests/phpunit/includes/content/ItemHandlerTest.php 11 files changed, 416 insertions(+), 56 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/24/167224/2 diff --git a/repo/includes/content/DeferredCopyEntityHolder.php b/repo/includes/content/DeferredCopyEntityHolder.php new file mode 100644 index 000..2c1302b --- /dev/null +++ b/repo/includes/content/DeferredCopyEntityHolder.php @@ -0,0 +1,76 @@ +?php + +namespace Wikibase\Content; + +use RuntimeException; +use Wikibase\DataModel\Entity\Entity; +use Wikibase\DataModel\Entity\EntityId; + +/** + * EntityHolder implementing deferred copying. + * + * @license GPL 2+ + * @author Daniel Kinzler + */ +class DeferredCopyEntityHolder implements EntityHolder { + + /** +* @var EntityHolder +*/ + private $entityHolder; + + /** +* @var Entity +*/ + private $entity = null; + + /** +* @param EntityHolder $entityHolder +*/ + public function __construct( EntityHolder $entityHolder ) { + $this-entityHolder = $entityHolder; + } + + /** +* @see EntityHolder::getEntityId +* +* This implements lazy initialization of the entity: when called for the first time, +* this method will call getEntity() on the EntityHolder passed to the constructor, +* and then calls copy() on the entity returned. The resulting copy is returned. +* Subsequent calls will return the same entity. +* +* @param string $expectedClass The class the result is expected to be compatible with. +* Defaults to Entity. +* +* @throws RuntimeException If the entity held by this EntityHolder is not compatible with $expectedClass. +* @return Entity +*/ + public function getEntity( $expectedClass = 'Wikibase\DataModel\Entity\Entity' ) { + if ( !$this-entity ) { + $entity = $this-entityHolder-getEntity( $expectedClass ); + $this-entity = $entity-copy(); + } + + return $this-entity; + } + + /** +* @see EntityHolder::getEntityId +* +* @return EntityId|null +*/ + public function getEntityId() { + return $this-entityHolder-getEntityId(); + } + + /** +* @see EntityHolder::getEntityType +* +* @return string +*/ + public function getEntityType() { + return $this-entityHolder-getEntityType(); + } + +} + \ No newline at end of file diff --git a/repo/includes/content/DeferredDecodingEntityHolder.php b/repo/includes/content/DeferredDecodingEntityHolder.php new file mode 100644 index 000..08af376 --- /dev/null +++ b/repo/includes/content/DeferredDecodingEntityHolder.php @@ -0,0 +1,123 @@ +?php + +namespace Wikibase\Content; + +use InvalidArgumentException; +use RuntimeException; +use Wikibase\DataModel\Entity\Entity; +use Wikibase\DataModel\Entity\EntityId; +use Wikibase\Lib\Store\EntityContentDataCodec; + +/** + * EntityHolder implementing deferred deserialization. + * + * @license GPL 2+ + * @author Daniel Kinzler + */ +class DeferredDecodingEntityHolder implements EntityHolder { + + /** +* @var Entity +*/ + private $entity = null; + + /** +* @var EntityContentDataCodec +*/ + private $codec; + + /** +* @var string +*/ + private $blob; + + /** +* @var null +*/ + private $format; + + /** +* @var string +*/ + private $entityType; + + /** +* @var EntityId +*/ + private $entityId; + + /** +* @param EntityContentDataCodec $codec +* @param string $blob +* @param string $format +* @param $entityType +* @param EntityId $entityId +* +* @throws InvalidArgumentException +
[MediaWiki-commits] [Gerrit] Expose Content-Range response header for CORS requests on up... - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Expose Content-Range response header for CORS requests on upload .. Expose Content-Range response header for CORS requests on upload When a client submits an HTTP request with 'Range' header, the actual range returned, including the total file size, comes back in the 'Content-Range' response header. Naturally, this doesn't get automatically exposed in cross-origin requests and must be explicitly listed in the OPTIONS response. Yay CORS! Exposing this will let ogv.js eliminate an extra HEAD request to get the total file size, and allows validation of the ranges to check for a Safari caching bug https://bugs.webkit.org/show_bug.cgi?id=82672 without adding a cachebuster query string on every request. Change-Id: I35d51c66814fd23972c8044208b1545b8e20f464 --- M templates/varnish/upload-frontend.inc.vcl.erb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/upload-frontend.inc.vcl.erb b/templates/varnish/upload-frontend.inc.vcl.erb index 62257d9..bbcf905 100644 --- a/templates/varnish/upload-frontend.inc.vcl.erb +++ b/templates/varnish/upload-frontend.inc.vcl.erb @@ -117,5 +117,5 @@ } set resp.http.Access-Control-Allow-Origin = *; - set resp.http.Access-Control-Expose-Headers = Age, Date, Content-Length, X-Content-Duration, X-Cache, X-Varnish; + set resp.http.Access-Control-Expose-Headers = Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish; } -- To view, visit https://gerrit.wikimedia.org/r/171502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35d51c66814fd23972c8044208b1545b8e20f464 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis 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] Porting us-script.py - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Porting us-script.py .. Porting us-script.py Renamed to states-redirect.py as it covers more than US States. Sub-divisions used for all countries using pycountry Created a bot class function for us-states.py for subdivisions Change-Id: I2b49afce96a801ab92a2e5656144ed4ee3deadc1 --- A scripts/states_redirect.py 1 file changed, 143 insertions(+), 0 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/states_redirect.py b/scripts/states_redirect.py new file mode 100644 index 000..6f3bbd1 --- /dev/null +++ b/scripts/states_redirect.py @@ -0,0 +1,143 @@ +#!usr/bin/python +# -*- coding: utf-8 -*- + +Create country sub-division redirect pages. + +Check if they are in the form Something, State, and if so, create a redirect +from Something, ST. + +Specific arguments: +-start:xxx Specify the place in the alphabet to start searching +-force: Don't ask whether to create pages, just create them. + +PRE-REQUISITE : Need to install python-pycountry library. +* Follow the instructions at: https://www.versioneye.com/python/pycountry/0.16 +* Install with pip: pip install pycountry + +# +# (C) Andre Engels, 2004 +# (C) Pywikibot team, 2004-2014 +# +# Distributed under the terms of the MIT license. +# +__version__ = '$Id$' +# + +import re +import sys +import pywikibot +from pywikibot import i18n + +try: +import pycountry +except ImportError: +pywikibot.error('This script requires the python-pycountry module') +pywikibot.error('See: https://pypi.python.org/pypi/pycountry') +pywikibot.exception() +sys.exit() + +msg = { +'en': 'Creating state abbreviation redirect', +'ar': u'إنشاء تحويلة اختصار الولاية', +'fa': u'ایجاد تغییرمسیر برای نام اختصاری ایالت', +'he': u'יוצר הפניה מראשי התיבות של המדינה', +} + + +class StatesRedirectBot(pywikibot.Bot): + +Bot class used for implementation of re-direction norms. + +def __init__(self, start, force): +Constructor. + +Parameters: +@param start:xxx Specify the place in the alphabet to start +searching. +@param force: Don't ask whether to create pages, just create +them. + +self.start = start +self.force = force +self.site = pywikibot.Site() +# Created abbrev from pycountry data base +self.abbrev = {} +for subd in pycountry.subdivisions: +# Used subd.code[3:] to extract the exact code for +# subdivisional states(ignoring the country code). +self.abbrev[subd.name] = subd.code[3:] +self.generator = self.site.allpages(start=self.start) + +def treat(self, page): + Re-directing process. + +Check if pages are in the given form Something, State, and +if so, create a redirect from Something, ST.. + +for sn in self.abbrev: +R = re.compile(r', %s$' % sn) +if R.search(page.title()): +pl = pywikibot.Page(self.site, page.title().replace(sn, +self.abbrev[sn])) +# A bit hacking here - the real work is done in the +# 'except pywikibot.NoPage' part rather than the 'try'. + +try: +pl.get(get_redirect=True) +goal = pl.getRedirectTarget().title() +if pywikibot.Page(self.site, goal).exists(): +pywikibot.output( +uNot creating %s - redirect already exists. +% goal) +else: +pywikibot.warning( +u%s already exists but redirects elsewhere! +% goal) +except pywikibot.IsNotRedirectPage: +pywikibot.warning( +uPage %s already exists and is not a redirect\ +Please check page! +% pl.title()) +except pywikibot.NoPage: +change = '' +if page.isRedirectPage(): +p2 = page.getRedirectTarget() +pywikibot.output(u'Note: goal page is redirect.\ +Creating redirect ' u'to %s to avoid double\ +redirect.' % p2.title()) +else: +p2 = page +if self.force: +change = 'y' +else: +change = pywikibot.input_choice(u'Create redirect\ +%s?' % pl.title(), +(('yes', 'y'), +('no',
[MediaWiki-commits] [Gerrit] Remove unused error messages from RepoApiError - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused error messages from RepoApiError .. Remove unused error messages from RepoApiError I couldn't find any usage of these error codes in our codebase or in core. Change-Id: Ic8113edb3bc0b6cfa63103a6fb966be5143ad361 --- M lib/i18n/en.json M lib/i18n/qqq.json M lib/resources/wikibase.RepoApi/resources.php M lib/resources/wikibase.RepoApi/wikibase.RepoApiError.js M lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApiError.tests.js 5 files changed, 1 insertion(+), 32 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved Jeroen De Dauw: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/lib/i18n/en.json b/lib/i18n/en.json index 85da7fe..b6a94ca 100644 --- a/lib/i18n/en.json +++ b/lib/i18n/en.json @@ -31,12 +31,7 @@ wikibase-error-remove-timeout: We are experiencing technical difficulties. Your \remove\ could not be completed., wikibase-error-autocomplete-connection: Could not query site API. Please try again later., wikibase-error-autocomplete-response: Server responded: $1, - wikibase-error-ui-client-error: The connection to the client page failed. Please try again later., wikibase-error-ui-no-external-page: The specified article could not be found on the corresponding site., - wikibase-error-ui-cant-edit: You are not allowed to perform this action., - wikibase-error-ui-no-permissions: You do not have sufficient rights to perform this action., - wikibase-error-ui-link-exists: You cannot link to this page because another item already links to it., - wikibase-error-ui-session-failure: Your session has expired. Please log in again., wikibase-error-ui-edit-conflict: There is an edit conflict. Please reload and save again., wikibase-quantitydetails-amount: Amount, wikibase-quantitydetails-upperbound: Upper bound, diff --git a/lib/i18n/qqq.json b/lib/i18n/qqq.json index 8a01912..ed69cf5 100644 --- a/lib/i18n/qqq.json +++ b/lib/i18n/qqq.json @@ -40,12 +40,7 @@ wikibase-error-remove-timeout: Error message for an error happening during a remove operation. The error was caused by a request time out., wikibase-error-autocomplete-connection: Error message for page auto-complete input box; displayed when API could not be reached., wikibase-error-autocomplete-response: When querying the API for auto-completion fails, this message contains more detailed information about the error. $1 is the actual server error response or jQuery error code (e.g. when the server did not respond)., - wikibase-error-ui-client-error: This is a human readable version of the API error \wikibase-api-client-error\ which is shown in the UI., wikibase-error-ui-no-external-page: This is a human readable version of the API error \wikibase-api-no-external-page\ which is shown in the UI., - wikibase-error-ui-cant-edit: This is a human readable version of the API error \wikibase-api-cant-edit\ which is shown in the UI., - wikibase-error-ui-no-permissions: This is a human readable version of the API error \wikibase-api-no-permission\ which is shown in the UI., - wikibase-error-ui-link-exists: This is a human readable version of the API error \wikibase-api-link-exists\ which is shown in the UI., - wikibase-error-ui-session-failure: This is a human readable version of the API error \wikibase-api-session-failure\ which is shown in the UI., wikibase-error-ui-edit-conflict: This is a human readable version of the API error \edit-conflict\ which is shown in the UI.\nNote that the default message says the user shall \reload and save\, but after a reload the content that should be saved will be lost., wikibase-quantitydetails-amount: Label used for the \amount\ field of a quantity value when showing a detailed representation of the quantity, e.g. in a diff.\n{{Identical|Amount}}, wikibase-quantitydetails-upperbound: Label used for the \upper bound\ field of a quantity value when showing a detailed representation of the quantity, e.g. in a diff., diff --git a/lib/resources/wikibase.RepoApi/resources.php b/lib/resources/wikibase.RepoApi/resources.php index 5d3ce4b..a767c52 100644 --- a/lib/resources/wikibase.RepoApi/resources.php +++ b/lib/resources/wikibase.RepoApi/resources.php @@ -36,13 +36,7 @@ 'wikibase-error-remove-generic', 'wikibase-error-save-timeout', 'wikibase-error-remove-timeout', - 'wikibase-error-ui-client-error', 'wikibase-error-ui-no-external-page', - 'wikibase-error-ui-cant-edit', - 'wikibase-error-ui-no-permissions', -
[MediaWiki-commits] [Gerrit] Use mysql::config::client to render a research pw file reada... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/171543 Change subject: Use mysql::config::client to render a research pw file readable by the stats user. .. Use mysql::config::client to render a research pw file readable by the stats user. Change-Id: Icec6a5d9cf78c8224697575af7db651f4d004272 --- M manifests/misc/statistics.pp 1 file changed, 22 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/171543/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 4f95894..87721dc 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -709,14 +709,14 @@ # then rsyncs those files to stat1001 so they can be served publicly class misc::statistics::limn::mobile_data_sync { include misc::statistics::base -include passwords::mysql::research +include misc::statistics::stats_researchdb_password $working_path = $misc::statistics::base::working_path $source_dir= ${working_path}/limn-mobile-data $command = ${source_dir}/generate.py $config= ${source_dir}/mobile/ -$mysql_credentials = ${working_path}/.my.cnf.research +$mysql_credentials = '/etc/mysql/conf.d/stats-research-client.cnf' $rsync_from= ${working_path}/limn-public-data $output= ${rsync_from}/mobile/datafiles $log = '/var/log/limn-mobile-data.log' @@ -741,11 +741,12 @@ mode= '0660', } -file { $mysql_credentials: -owner = $user, -group = $user, -mode= '0600', -content = template('misc/mysql-config-research.erb'), +# This path is used in the limn-mobile-data config. +# Symlink this until they change it. +# https://github.com/wikimedia/analytics-limn-mobile-data/blob/2321a6a0976b1805e79fecd495cf12ed7c6565a0/mobile/config.yaml#L5 +file { ${working_path}/.my.cnf.research: +ensure = 'link', +target = $mysql_credentials, } file { [$source_dir, $rsync_from, $output]: @@ -1026,3 +1027,17 @@ mode = '0440', } } + +# Same as above, but renders a file readable by the stats user. +class misc::statistics::stats_researchdb_password { +include misc::statistics::user + +# This file will render at +# /etc/mysql/conf.d/research-client.cnf. +mysql::config::client { 'stats-research': +user = $::passwords::mysql::research::user, +pass = $::passwords::mysql::research::pass, +group = $misc::statistics::user::username, +mode = '0440', +} +} -- To view, visit https://gerrit.wikimedia.org/r/171543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icec6a5d9cf78c8224697575af7db651f4d004272 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] Implement EntityParserOutputGeneratorFactory - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/171528 Change subject: Implement EntityParserOutputGeneratorFactory .. Implement EntityParserOutputGeneratorFactory allows removing a lot of cruft from EntityContent attempts to address some of the issues in Ic06639c approach, or perhaps can rebase on top of that. Change-Id: I9453fd95eb7af8f34e7dbe18bd159b8bcb1927f7 --- M lib/includes/LanguageFallbackChainFactory.php A repo/includes/View/EntityParserOutputGeneratorFactory.php M repo/includes/WikibaseRepo.php M repo/includes/content/EntityContent.php M repo/includes/content/ItemContent.php M repo/includes/content/PropertyContent.php 6 files changed, 298 insertions(+), 209 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/28/171528/2 diff --git a/lib/includes/LanguageFallbackChainFactory.php b/lib/includes/LanguageFallbackChainFactory.php index b653da7..eee471f 100644 --- a/lib/includes/LanguageFallbackChainFactory.php +++ b/lib/includes/LanguageFallbackChainFactory.php @@ -349,20 +349,31 @@ * @return LanguageFallbackChain */ public function newFromContextForPageView( IContextSource $context ) { + return $this-newFromUserAndLanguageCodeForPageView( + $context-getUser(), + $context-getLanguage()-getCode() + ); + } + + /** +* @param User $user +* @param string $languageCode +* +* @return LanguageFallbackChain +*/ + public function newFromUserAndLanguageCodeForPageView( User $user, $languageCode ) { if ( $this-isExperimentalMode ) { // The generated chain should yield a cacheable result - if ( $this-anonymousPageViewCached $context-getUser()-isAnon() ) { + if ( $this-anonymousPageViewCached $user-isAnon() ) { // Anonymous users share the same Squid cache, which is splitted by URL. - // That means we can't do anything except for what completely depends by URL such as uselang=. - return $this-newFromLanguage( $context-getLanguage() ); + // That means we can't do anything except for what completely depends + // by URL such as uselang=. + return $this-newFromLanguageCode( $languageCode ); } - return $this-newFromContext( $context ); + return $this-newFromUserAndLanguageCode( $user, $languageCode ); } else { - return $this-newFromLanguage( - $context-getLanguage(), - self::FALLBACK_SELF - ); + return $this-newFromLanguageCode( $languageCode, self::FALLBACK_SELF ); } } diff --git a/repo/includes/View/EntityParserOutputGeneratorFactory.php b/repo/includes/View/EntityParserOutputGeneratorFactory.php new file mode 100644 index 000..455d435 --- /dev/null +++ b/repo/includes/View/EntityParserOutputGeneratorFactory.php @@ -0,0 +1,242 @@ +?php + +namespace Wikibase; + +use IContextSource; +use Language; +use ParserOptions; +use ParserOutput; +use RequestContext; +use User; +use ValueFormatters\FormatterOptions; +use ValueFormatters\ValueFormatter; +use Wikibase\DataModel\Entity\Entity; +use Wikibase\DataModel\Entity\EntityId; +use Wikibase\DataModel\Entity\EntityIdParser; +use Wikibase\DataModel\Entity\PropertyDataTypeLookup; +use Wikibase\LanguageFallbackChainFactory; +use Wikibase\Lib\OutputFormatSnakFormatterFactory; +use Wikibase\Lib\Serializers\SerializationOptions; +use Wikibase\Lib\SnakFormatter; +use Wikibase\Lib\Store\EntityInfoBuilderFactory; +use Wikibase\Lib\Store\EntityTitleLookup; +use Wikibase\Repo\View\ClaimsView; +use Wikibase\Repo\View\FingerprintView; +use Wikibase\Repo\View\SectionEditLinkGenerator; +use Wikibase\Repo\View\SnakHtmlGenerator; +use Wikibase\Repo\WikibaseRepo; + +/** + * @since 0.5 + * + * @licence GNU GPL v2+ + * @author Katie Filbert aude.w...@gmail.com + */ +class EntityParserOutputGeneratorFactory { + + /** +* @var OutputFormatSnakFormatterFactory +*/ + private $snakFormatterFactory; + + /** +* @var EntityInfoBuilderFactory +*/ + private $entityInfoBuilderFactory; + + /** +* @var EntityTitleLookup +*/ + private $entityTitleLookup; + + /** +* @var EntityIdParser +*/ + private $entityIdParser; + + /** +* @var PropertyDataTypeLookup +*/ + private $propertyDataTypeLookup; + + /** +* @var LanguageFallbackChainFactory +
[MediaWiki-commits] [Gerrit] Use mysql::config::client to render a research pw file reada... - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Use mysql::config::client to render a research pw file readable by the stats user. .. Use mysql::config::client to render a research pw file readable by the stats user. Change-Id: Icec6a5d9cf78c8224697575af7db651f4d004272 --- M manifests/misc/statistics.pp 1 file changed, 22 insertions(+), 7 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 4f95894..acb8e0d 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -709,14 +709,14 @@ # then rsyncs those files to stat1001 so they can be served publicly class misc::statistics::limn::mobile_data_sync { include misc::statistics::base -include passwords::mysql::research +include misc::statistics::stats_researchdb_password $working_path = $misc::statistics::base::working_path $source_dir= ${working_path}/limn-mobile-data $command = ${source_dir}/generate.py $config= ${source_dir}/mobile/ -$mysql_credentials = ${working_path}/.my.cnf.research +$mysql_credentials = '/etc/mysql/conf.d/stats-research-client.cnf' $rsync_from= ${working_path}/limn-public-data $output= ${rsync_from}/mobile/datafiles $log = '/var/log/limn-mobile-data.log' @@ -741,11 +741,12 @@ mode= '0660', } -file { $mysql_credentials: -owner = $user, -group = $user, -mode= '0600', -content = template('misc/mysql-config-research.erb'), +# This path is used in the limn-mobile-data config. +# Symlink this until they change it. +# https://github.com/wikimedia/analytics-limn-mobile-data/blob/2321a6a0976b1805e79fecd495cf12ed7c6565a0/mobile/config.yaml#L5 +file { ${working_path}/.my.cnf.research: +ensure = 'link', +target = $mysql_credentials, } file { [$source_dir, $rsync_from, $output]: @@ -1026,3 +1027,17 @@ mode = '0440', } } + +# Same as above, but renders a file readable by the stats user. +class misc::statistics::stats_researchdb_password { +include misc::statistics::user + +# This file will render at +# /etc/mysql/conf.d/stats-research-client.cnf. +mysql::config::client { 'stats-research': +user = $::passwords::mysql::research::user, +pass = $::passwords::mysql::research::pass, +group = $misc::statistics::user::username, +mode = '0440', +} +} -- To view, visit https://gerrit.wikimedia.org/r/171543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icec6a5d9cf78c8224697575af7db651f4d004272 Gerrit-PatchSet: 2 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] Beta: Enable EventLogging in ContentTranslation - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Beta: Enable EventLogging in ContentTranslation .. Beta: Enable EventLogging in ContentTranslation Change-Id: I958fb18e79409ed3dda3500f8ec8bf6915d2df9d --- M wmf-config/CommonSettings-labs.php M wmf-config/InitialiseSettings-labs.php 2 files changed, 7 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, but someone else must approve Manybubbles: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index a0e07c3..d25a098 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -98,6 +98,9 @@ 'timeout' = 1, 'prefix' = $wgDBname, ); + + $wgContentTranslationEventLogging = $wmgContentTranslationEventLogging; + } if ( $wmgUseCentralNotice ) { diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index b3e4948..1c1a3a5 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -348,6 +348,10 @@ 'default' = true, ), + 'wmgContentTranslationEventLogging' = array( + 'default' = true, + ), + 'wmgUseNavigationTiming' = array( 'default' = true, ), -- To view, visit https://gerrit.wikimedia.org/r/171273 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I958fb18e79409ed3dda3500f8ec8bf6915d2df9d Gerrit-PatchSet: 4 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Jsahleen jsahl...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove unused resource dependency - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused resource dependency .. Remove unused resource dependency Change-Id: Ib0e3ebd0147076d1277997761631d553bdc50406 --- M lib/tests/qunit/resources.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php index cd4b163..1989376 100644 --- a/lib/tests/qunit/resources.php +++ b/lib/tests/qunit/resources.php @@ -68,7 +68,6 @@ 'wikibase.RepoApi/wikibase.RepoApi.tests.js', ), 'dependencies' = array( - 'mw.config.values.wbRepo', 'wikibase', 'wikibase.api.getLocationAgnosticMwApi', 'wikibase.RepoApi', -- To view, visit https://gerrit.wikimedia.org/r/171251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0e3ebd0147076d1277997761631d553bdc50406 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Update composer.json - change (translatewiki)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/171544 Change subject: Update composer.json .. Update composer.json PHP version check is useless for us. Add cssjanus. Change-Id: I7663afcafaf7dcfd4fb4f47d2132f4fad3d38663 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/44/171544/1 diff --git a/composer.json b/composer.json index 11c1a49..d2c9598 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { require: { - php: =5.3.2, + cssjanus/cssjanus: 1.1.0, psr/log: 1.0.0, mediawiki/semantic-media-wiki: @dev, mediawiki/semantic-maps: @dev -- To view, visit https://gerrit.wikimedia.org/r/171544 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7663afcafaf7dcfd4fb4f47d2132f4fad3d38663 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki 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] Revert layout changes in Media viewer - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Revert layout changes in Media viewer .. Revert layout changes in Media viewer Includes: Ic1c9d82ea8b4498004ab3530fd903f632c3d4a1b Change-Id: I44cc33349167367b5f7d01780f44d5bb64d0f269 --- M extensions/MultimediaViewer 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Manybubbles: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/MultimediaViewer b/extensions/MultimediaViewer index aac95a1..630d523 16 --- a/extensions/MultimediaViewer +++ b/extensions/MultimediaViewer -Subproject commit aac95a18ecc1c2f87a2bb56e6361c12a7c1a91fc +Subproject commit 630d5235640be4b7763e57fcbe6c0bf92f2159ba -- To view, visit https://gerrit.wikimedia.org/r/171522 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I44cc33349167367b5f7d01780f44d5bb64d0f269 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf7 Gerrit-Owner: Gilles gdu...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@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] Set iw_local to 1 for tools.wmflabs.org - change (mediawiki...WikimediaMaintenance)
Glaisher has uploaded a new change for review. https://gerrit.wikimedia.org/r/171545 Change subject: Set iw_local to 1 for tools.wmflabs.org .. Set iw_local to 1 for tools.wmflabs.org So that URLs like https://en.wikipedia.org/wiki/toollabs: work directly instead of giving a bad title error. Bug: 72220 Change-Id: Ie11a40ac4c11b9b452d74e0dcb424dd16fcf42e5 --- M dumpInterwiki.php M rebuildInterwiki.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance refs/changes/45/171545/1 diff --git a/dumpInterwiki.php b/dumpInterwiki.php index 96415ff..cc3d367 100644 --- a/dumpInterwiki.php +++ b/dumpInterwiki.php @@ -245,7 +245,7 @@ $prefix = str_replace( ' ', '_', $prefix ); $url = $matches[2]; - if ( preg_match( '/(wikipedia|wiktionary|wikisource|wikiquote|wikibooks|wikimedia|wikinews|wikiversity|wikivoyage|wikimediafoundation|mediawiki|wikidata)\.org/', $url ) ) { + if ( preg_match( '/(wikipedia|wiktionary|wikisource|wikiquote|wikibooks|wikimedia|wikinews|wikiversity|wikivoyage|wikimediafoundation|mediawiki|wikidata|tools\.wmflabs)\.org/', $url ) ) { $local = 1; } else { $local = 0; diff --git a/rebuildInterwiki.php b/rebuildInterwiki.php index d79201c..6a8fc40 100644 --- a/rebuildInterwiki.php +++ b/rebuildInterwiki.php @@ -108,7 +108,7 @@ if ( preg_match( '/^\|\s*(.*?)\s*\|\|\s*(https?:\/\/.*?)\s*$/', $line, $matches ) ) { $prefix = strtolower( $matches[1] ); $url = $matches[2]; - if ( preg_match( '/(wikipedia|wiktionary|wikisource|wikiquote|wikibooks|wikimedia|wikinews|wikiversity|wikivoyage|wikimediafoundation|mediawiki|wikidata)\.org/', $url ) ) { + if ( preg_match( '/(wikipedia|wiktionary|wikisource|wikiquote|wikibooks|wikimedia|wikinews|wikiversity|wikivoyage|wikimediafoundation|mediawiki|wikidata|tools\.wmflabs)\.org/', $url ) ) { $local = 1; } else { $local = 0; -- To view, visit https://gerrit.wikimedia.org/r/171545 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie11a40ac4c11b9b452d74e0dcb424dd16fcf42e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: Glaisher glaisher.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mw.Title: Add new static methods `newFromFileName`, `newFrom... - change (mediawiki/core)
MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/171546 Change subject: mw.Title: Add new static methods `newFromFileName`, `newFromUserInput` .. mw.Title: Add new static methods `newFromFileName`, `newFromUserInput` This is the replacement for Ia57e4b0e804. Use cases: - UploadWizard: Suggesting valid tiles for files supplied by user whose names are invalid MediaWiki titles. - Upload Form: The same. - Community scripts, VisualEditor upload gadget, [...]: The same. Bug: 64912 Bug: 64922 Change-Id: I260ba883548975263bba03d25f6d11d3d9bbfbd9 (cherry picked from commit cc8b00ed5bf69dafac2413d9c4387523a14bc62a) --- M resources/src/mediawiki/mediawiki.Title.js M tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js 2 files changed, 507 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/46/171546/1 diff --git a/resources/src/mediawiki/mediawiki.Title.js b/resources/src/mediawiki/mediawiki.Title.js index 95b18a8..7ced42f 100644 --- a/resources/src/mediawiki/mediawiki.Title.js +++ b/resources/src/mediawiki/mediawiki.Title.js @@ -58,6 +58,34 @@ NS_SPECIAL = -1, /** +* @private +* @static +* @property NS_MEDIA +*/ + NS_MEDIA = -2, + + /** +* @private +* @static +* @property NS_FILE +*/ + NS_FILE = 6, + + /** +* @private +* @static +* @property FILENAME_MAX_BYTES +*/ + FILENAME_MAX_BYTES = 240, + + /** +* @private +* @static +* @property TITLE_MAX_BYTES +*/ + TITLE_MAX_BYTES = 255, + + /** * Get the namespace id from a namespace name (either from the localized, canonical or alias * name). * @@ -102,6 +130,85 @@ '|#[0-9]+;' + '|#x[0-9A-Fa-f]+;' ), + + // From MediaWikiTitleCodec.php#L225 @26fcab1f18c568a41 + // Clean up whitespace in function MediaWikiTitleCodec::splitTitleString() + rWhitespace = /[ _\u0009\u00A0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\s]+/g, + + /** +* Slightly modified from Flinfo. Credit goes to Lupo and Flominator. +* @private +* @static +* @property sanitationRules +*/ + sanitationRules = [ + // signature + { + pattern: /~{3}/g, + replace: '', + generalRule: true + }, + // Space, underscore, tab, NBSP and other unusual spaces + { + pattern: rWhitespace, + replace: ' ', + generalRule: true + }, + // unicode bidi override characters: Implicit, Embeds, Overrides + { + pattern: /[\u200E\u200F\u202A-\u202E]/g, + replace: '', + generalRule: true + }, + // control characters + { + pattern: /[\x00-\x1f\x7f]/g, + replace: '', + generalRule: true + }, + // URL encoding (possibly) + { + pattern: /%([0-9A-Fa-f]{2})/g, + replace: '% $1', + generalRule: true + }, + // HTML-character-entities + { + pattern: /(([A-Za-z0-9\x80-\xff]+|#[0-9]+|#x[0-9A-Fa-f]+);)/g, + replace: ' $1', + generalRule: true + }, + // slash, colon (not supported by file systems like NTFS/Windows, Mac OS 9 [:], ext4 [/]) + { + pattern: /[:\/#]/g, + replace: '-', + fileRule: true + }, + // brackets, greater than + { + pattern: /[\]\}]/g, + replace: ')', + generalRule: true + }, + // brackets, lower than + { + pattern: /[\[\{]/g, + replace: '(', + generalRule: true + }, + // everything that wasn't covered yet + { + pattern: new RegExp( rInvalid.source, 'g' ), + replace: '-', + generalRule: true + }, + // directory structures + { + pattern: /^(\.|\.\.|\.\/.*|\.\.\/.*|.*\/\.\/.*|.*\/\.\.\/.*|.*\/\.|.*\/\.\.)$/g, + replace: '', + generalRule: true + } +
[MediaWiki-commits] [Gerrit] swift: report statsd data to localhost - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/171547 Change subject: swift: report statsd data to localhost .. swift: report statsd data to localhost swift statsd traffic seems to account for = 50% of the statsd traffic, thus driving txstatsd cpu usage very high on tungsten. A more reasonable solution is to have statsd locally and let txstatsd push it to tungsten. NOTE: this works only because the swift metrics are per-machine, and thus don't need to get aggregated across machines in a central statsd Change-Id: Ia95564b1b2950d16d44c347e1a612ef5b079822c --- M hieradata/codfw.yaml M manifests/role/swift.pp M modules/swift_new/manifests/params.pp 3 files changed, 19 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/47/171547/1 diff --git a/hieradata/codfw.yaml b/hieradata/codfw.yaml index 72807ef..3468965 100644 --- a/hieradata/codfw.yaml +++ b/hieradata/codfw.yaml @@ -29,9 +29,9 @@ #search_backup: key swift_new::hash_path_suffix: 'de4227064232ed08' -swift_new::storage::statsd_host: 'statsd.eqiad.wmnet' +swift_new::storage::statsd_host: 'localhost' swift_new::proxy::proxy_address: 'http://ms-fe.svc.codfw.wmnet' -swift_new::proxy::statsd_host: 'statsd.eqiad.wmnet' +swift_new::proxy::statsd_host: 'localhost' swift_new::proxy::backend_url_format: 'sitelang' swift_new::proxy::rewrite_thumb_server: 'rendering.svc.eqiad.wmnet' swift_new::proxy::dispersion_account: 'dispersion' diff --git a/manifests/role/swift.pp b/manifests/role/swift.pp index e136030..75a2efe 100644 --- a/manifests/role/swift.pp +++ b/manifests/role/swift.pp @@ -358,6 +358,14 @@ memcached_port = '11211', } +class { '::txstatsd': +settings = { +statsd = { +'carbon-cache-host' = ${::swift_new::params::graphite_host}, +}, +}, +} + monitor_service { 'swift-http-frontend': description = 'Swift HTTP frontend', check_command = check_http_url!${swift_check_http_host}!/monitoring/frontend, @@ -385,6 +393,14 @@ include ::swift_new::container_sync include ::swift_new::storage::monitoring +class { '::txstatsd': +settings = { +statsd = { +'carbon-cache-host' = ${::swift_new::params::graphite_host}, +}, +}, +} + $all_drives = hiera('swift_storage_drives') swift_new::init_device { $all_drives: diff --git a/modules/swift_new/manifests/params.pp b/modules/swift_new/manifests/params.pp index a946632..c41c6f7 100644 --- a/modules/swift_new/manifests/params.pp +++ b/modules/swift_new/manifests/params.pp @@ -4,6 +4,7 @@ $account_keys = {}, $replication_accounts = {}, $replication_keys = {}, + $graphite_host = 'graphite-in.eqiad.wmnet', ) { # Noop class } -- To view, visit https://gerrit.wikimedia.org/r/171547 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia95564b1b2950d16d44c347e1a612ef5b079822c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move ArrayUtils into libs/ as there is nothing tying it to M... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Move ArrayUtils into libs/ as there is nothing tying it to MediaWiki .. Move ArrayUtils into libs/ as there is nothing tying it to MediaWiki Change-Id: I6910c85279858895f5462324134bade580a0cae7 --- M includes/AutoLoader.php R includes/libs/ArrayUtils.php 2 files changed, 1 insertion(+), 1 deletion(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 2cb6335..5024b7a 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -675,6 +675,7 @@ 'FormatJson' = 'includes/json/FormatJson.php', # includes/libs + 'ArrayUtils' = 'includes/libs/ArrayUtils.php', 'CSSMin' = 'includes/libs/CSSMin.php', 'GenericArrayObject' = 'includes/libs/GenericArrayObject.php', 'HashRing' = 'includes/libs/HashRing.php', @@ -1151,7 +1152,6 @@ 'UploadStashNoSuchKeyException' = 'includes/upload/UploadStash.php', # includes/utils - 'ArrayUtils' = 'includes/utils/ArrayUtils.php', 'CdbException' = 'includes/utils/Cdb.php', 'CdbFunctions' = 'includes/utils/CdbPHP.php', 'CdbReader' = 'includes/utils/Cdb.php', diff --git a/includes/utils/ArrayUtils.php b/includes/libs/ArrayUtils.php similarity index 100% rename from includes/utils/ArrayUtils.php rename to includes/libs/ArrayUtils.php -- To view, visit https://gerrit.wikimedia.org/r/171449 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6910c85279858895f5462324134bade580a0cae7 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: BryanDavis bda...@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 'indeterminate' state to progress bar widget - change (oojs/ui)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/171548 Change subject: Add 'indeterminate' state to progress bar widget .. Add 'indeterminate' state to progress bar widget Use typical 'bouncing' animation in apex MW themes. Change-Id: Ib97d39cdc695ac714fb64f709bae0e20f7c73db0 --- M demos/pages/widgets.js M src/styles/common.less M src/themes/apex/widgets.less M src/themes/mediawiki/widgets.less M src/widgets/ProgressBarWidget.js 5 files changed, 71 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/48/171548/1 diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js index c70afec..2a4de1c 100644 --- a/demos/pages/widgets.js +++ b/demos/pages/widgets.js @@ -662,6 +662,15 @@ label: 'Progress bar', align: 'top' } + ), + new OO.ui.FieldLayout( + new OO.ui.ProgressBarWidget( { + progress: false + } ), + { + label: 'Progress bart (indeterminate)\u200E', + align: 'top' + } ) ]; diff --git a/src/styles/common.less b/src/styles/common.less index 53c7aad..d0dc08a 100644 --- a/src/styles/common.less +++ b/src/styles/common.less @@ -52,6 +52,15 @@ .oo-ui-image-variant( texture, @name, @file, @variant, @ext, @path ); } +.oo-ui-animation( @value1, @value2: X, ... ) { + @value: ~`@{arguments}.replace(/[\[\]]|\,\sX/g, '')`; + -webkit-animation: @value; + -moz-animation: @value; + -ms-animation: @value; + -o-animation: @value; + animation: @value; +} + .oo-ui-transition( @value1, @value2: X, ... ) { @value: ~`@{arguments}.replace(/[\[\]]|\,\sX/g, '')`; -webkit-transition: @value; diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less index 88f8ff0..b92de81 100644 --- a/src/themes/apex/widgets.less +++ b/src/themes/apex/widgets.less @@ -622,17 +622,36 @@ } .theme-oo-ui-progressBarWidget () { - width: 100%; max-width: 50em; border: solid 1px @primary-border; border-radius: 0.25em; + overflow: hidden; + -bar { height: 1em; border-right: solid 1px @primary-border; - .oo-ui-transition(width 200ms); + .oo-ui-transition(width 200ms, margin-left 200ms); .oo-ui-vertical-gradient(@primary-gradient-start, @primary-gradient-end); + } + -indeterminate { + .oo-ui-progressBarWidget-bar { + .oo-ui-animation(oo-ui-progressBarWidget-pulsate 1s infinite alternate ease-in-out); + width: 40%; + margin-left: -10%; + border-left-width: 1px; + } } .oo-ui-widget-disabled { opacity: 0.6; } } + +.oo-ui-progressBarWidget-pulsate-frames { + 0% { margin-left: -2%; } + 100% { margin-left: 62%; } +} +@-webkit-keyframes oo-ui-progressBarWidget-pulsate { .oo-ui-progressBarWidget-pulsate-frames } +@-moz-keyframes oo-ui-progressBarWidget-pulsate { .oo-ui-progressBarWidget-pulsate-frames } +@-ms-keyframes oo-ui-progressBarWidget-pulsate { .oo-ui-progressBarWidget-pulsate-frames } +@-o-keyframes oo-ui-progressBarWidget-pulsate { .oo-ui-progressBarWidget-pulsate-frames } +@keyframes oo-ui-progressBarWidget-pulsate { .oo-ui-progressBarWidget-pulsate-frames } diff --git a/src/themes/mediawiki/widgets.less b/src/themes/mediawiki/widgets.less index d5a6e85..81c50e1 100644 --- a/src/themes/mediawiki/widgets.less +++ b/src/themes/mediawiki/widgets.less @@ -638,17 +638,36 @@ } .theme-oo-ui-progressBarWidget () { - width: 100%; max-width: 50em; border: solid 1px @primary-fill; border-radius: 0.1em; + overflow: hidden; + -bar { height: 1em; border-right: solid 1px @primary-fill; background: @primary-fill; - .oo-ui-transition(width 200ms); + .oo-ui-transition(width 200ms, margin-left 200ms); + } + -indeterminate { + .oo-ui-progressBarWidget-bar { + .oo-ui-animation(oo-ui-progressBarWidget-pulsate 1s infinite alternate ease-in-out); + width: 40%; + margin-left: -10%; + border-left-width: 1px; + } } .oo-ui-widget-disabled { opacity: 0.2; } } + +.oo-ui-progressBarWidget-pulsate-frames { + 0% { margin-left: -2%; }
[MediaWiki-commits] [Gerrit] Hygiene: Code format - change (mediawiki...MobileFrontend)
Jhernandez has uploaded a new change for review. https://gerrit.wikimedia.org/r/171552 Change subject: Hygiene: Code format .. Hygiene: Code format Change-Id: I8ef4e86ce923babcbdedd4960feb3a09d3a0ca31 --- M javascripts/modules/wikigrok/wikigrok.js 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/52/171552/1 diff --git a/javascripts/modules/wikigrok/wikigrok.js b/javascripts/modules/wikigrok/wikigrok.js index 02226ef..10f5a32 100644 --- a/javascripts/modules/wikigrok/wikigrok.js +++ b/javascripts/modules/wikigrok/wikigrok.js @@ -136,10 +136,12 @@ // See if there are potential occupation claims about this person so we can decide if // it's appropriate to display the WikiGrok interface. function init() { - var dialog = new WikiGrokDialog( { itemId: wikidataID, - title: mw.config.get( 'wgTitle' ), - userToken: getUserToken(), - testing: ( idOverride ) ? true : false } ); + var dialog = new WikiGrokDialog( { + itemId: wikidataID, + title: mw.config.get( 'wgTitle' ), + userToken: getUserToken(), + testing: ( idOverride ) ? true : false + } ); if ( $( '.toc-mobile' ).length ) { dialog.insertBefore( '.toc-mobile' ); -- To view, visit https://gerrit.wikimedia.org/r/171552 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ef4e86ce923babcbdedd4960feb3a09d3a0ca31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test WikiGrokResponseApi.js - change (mediawiki...MobileFrontend)
Jhernandez has uploaded a new change for review. https://gerrit.wikimedia.org/r/171549 Change subject: Test WikiGrokResponseApi.js .. Test WikiGrokResponseApi.js Change-Id: I87d83a3ab959be1ec43e8a591b99ca169168226d --- A tests/qunit/modules/wikigrok/test_WikiGrokResponseApi.js 1 file changed, 35 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/49/171549/1 diff --git a/tests/qunit/modules/wikigrok/test_WikiGrokResponseApi.js b/tests/qunit/modules/wikigrok/test_WikiGrokResponseApi.js new file mode 100644 index 000..83f1cf8 --- /dev/null +++ b/tests/qunit/modules/wikigrok/test_WikiGrokResponseApi.js @@ -0,0 +1,35 @@ +( function ( $, M ) { + + var WikiGrokResponseApi = M.require( 'modules/wikigrok/WikiGrokResponseApi' ), + Api = M.require( 'api' ).Api; + + QUnit.module( 'MobileFrontend: WikiGrokResponseApi.js', { + setup: function () { + this.api = new WikiGrokResponseApi( { + itemId: 'Q764812', + subject: 'title', + version: 'a', + userToken: 'token', + taskToken: 'taskToken' + } ); + + this.spy = this.sandbox.stub( Api.prototype, 'postWithToken' ); + } + } ); + + QUnit.test( 'recordClaims', 8, function ( assert ) { + var callArgs, + claims = [ { a: 1 }, { b: 2 } ]; + this.api.recordClaims(claims); + assert.ok( this.spy.called ); + callArgs = this.spy.getCall( 0 ).args; + assert.strictEqual( callArgs[0], 'edit'); + assert.strictEqual( callArgs[1].action, 'wikigrokresponse' ); + assert.strictEqual( callArgs[1].claims, JSON.stringify(claims) ); + assert.strictEqual( callArgs[1].subject_id, 'Q764812' ); + assert.strictEqual( callArgs[1].subject, 'title' ); + assert.strictEqual( callArgs[1].user_token, 'token' ); + assert.strictEqual( callArgs[1].task_token, 'taskToken' ); + } ); + +}( jQuery, mw.mobileFrontend ) ); -- To view, visit https://gerrit.wikimedia.org/r/171549 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87d83a3ab959be1ec43e8a591b99ca169168226d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix nonexisting methods in WikiDataApi - change (mediawiki...MobileFrontend)
Jhernandez has uploaded a new change for review. https://gerrit.wikimedia.org/r/171550 Change subject: Fix nonexisting methods in WikiDataApi .. Fix nonexisting methods in WikiDataApi Need to comment this to test WikiGrokDialog Change-Id: Ic71d43fbaa703dfe8865c43bb16923cdd428d73b --- M javascripts/modules/wikigrok/WikiDataApi.js 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/50/171550/1 diff --git a/javascripts/modules/wikigrok/WikiDataApi.js b/javascripts/modules/wikigrok/WikiDataApi.js index d16358f..2964a76 100644 --- a/javascripts/modules/wikigrok/WikiDataApi.js +++ b/javascripts/modules/wikigrok/WikiDataApi.js @@ -73,11 +73,13 @@ } return claims; } else { - self.logError( 'no-impression-cannot-fetch-claims' ); + // FIXME: logError does not exist + // self.logError( 'no-impression-cannot-fetch-claims' ); return false; } } ).fail( function () { - self.logError( 'no-impression-cannot-fetch-claims' ); + // FIXME: logError does not exist + // self.logError( 'no-impression-cannot-fetch-claims' ); } ); }, /** -- To view, visit https://gerrit.wikimedia.org/r/171550 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic71d43fbaa703dfe8865c43bb16923cdd428d73b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WikiGrokDialog UI tests - change (mediawiki...MobileFrontend)
Jhernandez has uploaded a new change for review. https://gerrit.wikimedia.org/r/171551 Change subject: WikiGrokDialog UI tests .. WikiGrokDialog UI tests Tests for the views, steps and the html. Change-Id: I45bc944204a3cecf4f368cdd6579d07c9b090146 --- M tests/qunit/modules/wikigrok/test_WikiGrokDialog.js 1 file changed, 103 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/51/171551/1 diff --git a/tests/qunit/modules/wikigrok/test_WikiGrokDialog.js b/tests/qunit/modules/wikigrok/test_WikiGrokDialog.js index e742286..c53ddd3 100644 --- a/tests/qunit/modules/wikigrok/test_WikiGrokDialog.js +++ b/tests/qunit/modules/wikigrok/test_WikiGrokDialog.js @@ -1,15 +1,37 @@ ( function ( $, M ) { - var WikiGrokDialog = M.require( 'modules/wikigrok/WikiGrokDialog' ); + var WikiGrokDialog = M.require( 'modules/wikigrok/WikiGrokDialog' ), + WikiDataApi = M.require( 'modules/wikigrok/WikiDataApi' ), + WikiGrokResponseApi = M.require( 'modules/wikigrok/WikiGrokResponseApi' ), + suggestions = [ { + id: P106, + name: occupations, + list: [ Q285759 ] + } ], + labels = { + Q285759: insurance broker + }, + pageTitle = 'Some guy'; QUnit.module( 'MobileFrontend: WikiGrokDialog', { - setup: function() { + teardown: function () { + this.wk.remove(); }, - teardown: function() { + setup: function () { + this.$el = $( 'div id=test' ); + this.wk = new WikiGrokDialog( { + el: this.$el, + itemId: '1234', + title: pageTitle, + userToken: 'token', + testing: false, + // Set suggestions to go to the second screen. + suggestions: suggestions + } ); } } ); - QUnit.test( 'randomly choose items form array', 7, function( assert ) { + QUnit.test( '#chooseRandomItemsFromArray - randomly choose items form array', 7, function ( assert ) { var array = [], chooseRandomItemsFromArray = WikiGrokDialog.prototype.chooseRandomItemsFromArray; @@ -19,7 +41,7 @@ 'picking 1 element from an array with 0 elements' ); - array = [1]; + array = [ 1 ]; assert.strictEqual( chooseRandomItemsFromArray( array, 1 ).length, 1, @@ -31,7 +53,7 @@ 'picking 2 elements from an array with 1 element' ); - array = [4, {3: 2}, ['a', 'b', 0], -1]; + array = [ 4, { 3: 2 }, [ 'a', 'b', 0 ], -1 ]; assert.strictEqual( chooseRandomItemsFromArray( array, 1 ).length, 1, @@ -54,4 +76,79 @@ ); } ); + /** +* Debug the wikigrok dialog by showing it in screen +* Use in tests like: +* debugDialog.apply( this ); +*/ + /* + function debugDialog() { + this.wk.remove = function() {}; + this.wk.prependTo( '#content' ).show(); + } + */ + + QUnit.test( '#UI renders initial screen', 4, function ( assert ) { + // Lets check that we've got the header, info, buttons and 'Tell me more' + assert.strictEqual( this.$el.find( '.wg-header' ).length, 1 ); + assert.ok( this.$el.find( '.wg-content' ).text().length 0 ); + assert.strictEqual( this.$el.find( '.wg-buttons button' ).length, 2 ); + assert.ok( this.$el.find( '.wg-noticea' ).attr('href').length 0 ); + } ); + + QUnit.test( '#UI clicking no thanks hides the dialog', 1, function ( assert ) { + var spy = this.sandbox.stub( WikiGrokDialog.prototype, 'hide' ); + this.$el.find('.cancel').click(); + assert.ok( spy.called ); + } ); + + function getToQuestion() { + this.sandbox.stub( WikiDataApi.prototype, 'getLabels' ) + .returns( $.Deferred().resolve( labels ) ); + + this.$el.find('.proceed').click(); + } + + QUnit.test( '#UI clicking OK, takes you to the question dialog', 1, function ( assert ) { + getToQuestion.apply(this); + // The name of the page is on the question + assert.ok( this.$el.text().indexOf(pageTitle) !== -1 ); +
[MediaWiki-commits] [Gerrit] Slightly refactor misc::statistics::limn::mobile_data_sync - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/171553 Change subject: Slightly refactor misc::statistics::limn::mobile_data_sync .. Slightly refactor misc::statistics::limn::mobile_data_sync This will allow for multliple teams to more easily run generate.py and sync data over to stat1001 using different limn dataset sources. TODO: put generate.py into a generic limn generator repository, rather than requiring that limn-mobile-data repo is cloned for all limn::data::generate jobs. Change-Id: Iec0f862ca3e4ee63570f1c495260807071b1e2a4 --- M manifests/misc/statistics.pp M manifests/site.pp 2 files changed, 113 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/53/171553/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index acb8e0d..3751ad1 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -701,45 +701,41 @@ } } - -# Class: misc::statistics::limn::mobile_data_sync +# == Class misc::statistics::limn::data +# Sets up base directories and repositories +# for using the misc::statistics::limn::data::generate() define. # -# Sets up daily cron jobs to run a script which -# generates csv datafiles from mobile apps statistics -# then rsyncs those files to stat1001 so they can be served publicly -class misc::statistics::limn::mobile_data_sync { +class misc::statistics::limn::data { include misc::statistics::base include misc::statistics::stats_researchdb_password +# Either '/a' or '/srv', depending on the server. :/ $working_path = $misc::statistics::base::working_path +# Directory where the repository of the generate.py will be cloned. $source_dir= ${working_path}/limn-mobile-data + +# generate.py command to run in a cron. $command = ${source_dir}/generate.py -$config= ${source_dir}/mobile/ + +# my.cnf credentials file. This is the file rendered by +# misc::statistics::stats_researchdb_password. $mysql_credentials = '/etc/mysql/conf.d/stats-research-client.cnf' -$rsync_from= ${working_path}/limn-public-data -$output= ${rsync_from}/mobile/datafiles -$log = '/var/log/limn-mobile-data.log' -$gerrit_repo = 'https://gerrit.wikimedia.org/r/p/analytics/limn-mobile-data.git' + +# cron job logs will be kept here +$log_dir = '/var/log/limn-data' + +# generate.py's repository +$git_remote= 'https://gerrit.wikimedia.org/r/p/analytics/limn-mobile-data.git' + +# public data directory. Data will be synced from here to a public web host. +$public_dir= ${working_path}/limn-public-data + +# Rsync generated data to stat1001 at http://datasets.wikimedia.org/limn-public-data/ +$rsync_to = stat1001.wikimedia.org::www/limn-public-data/ + +# user to own files and run cron job as (stats). $user = $misc::statistics::user::username - -$db_user = $passwords::mysql::research::user -$db_pass = $passwords::mysql::research::pass - -git::clone { 'analytics/limn-mobile-data': -ensure= 'latest', -directory = $source_dir, -origin= $gerrit_repo, -owner = $user, -require = [User[$user]], -} - -file { $log: -ensure = 'present', -owner = $user, -group = $user, -mode= '0660', -} # This path is used in the limn-mobile-data config. # Symlink this until they change it. @@ -749,20 +745,104 @@ target = $mysql_credentials, } -file { [$source_dir, $rsync_from, $output]: +# TODO: This repository contains the generate.py script. +# Other limn data repositories only have config and data +# directories. generate.py should be abstracted out into +# a general purupose limn data generator. +# For now, all limn data classes rely on this repository +# and generate.py script to be present. +if !defined(Git::Clone['analytics/limn-mobile-data']) { +git::clone { 'analytics/limn-mobile-data': +ensure= 'latest', +directory = $source_dir, +origin= $git_remote, +owner = $user, +require = [User[$user]], +} +} + +# Make sure these are writeable by $user. +file { [$log_dir, $source_dir, $public_data_dir]: ensure = 'directory', owner = $user, group = wikidev, mode = '0775', } +} -cron { 'rsync_mobile_apps_stats': -command = python ${command} ${config} ${log} 21 /usr/bin/rsync -rt ${rsync_from}/* stat1001.wikimedia.org::www/limn-public-data/, + + +# == Define: misc::statistics::limn::data::generate +# +# Sets up daily cron jobs to run a script which +#
[MediaWiki-commits] [Gerrit] Added .foucs() to $.ui.TemplatedWidget and child widgets - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/171554 Change subject: Added .foucs() to $.ui.TemplatedWidget and child widgets .. Added .foucs() to $.ui.TemplatedWidget and child widgets Enforces consistency across $.ui.TemplatedWidget widgets. Change-Id: I97583a451fd9e8148fd37689cb5bec60b81616bf --- M lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js M lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js M lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js M lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js M lib/resources/jquery.wikibase/jquery.wikibase.listview.js M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js M lib/resources/jquery.wikibase/jquery.wikibase.snaklistview.js M lib/resources/jquery.wikibase/jquery.wikibase.statementview.RankSelector.js M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js M lib/resources/jquery.wikibase/snakview/snakview.js M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.movetoolbar.js M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.singlebuttontoolbar.js M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js 28 files changed, 249 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/54/171554/1 diff --git a/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js b/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js index 939994c..c4974c0 100644 --- a/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js +++ b/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js @@ -151,6 +151,13 @@ } return response; + }, + + /** +* Applies focus to the widget. +*/ + focus: function() { + this.element.focus(); } } ); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js b/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js index 869a271..81abffa 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js @@ -373,11 +373,13 @@ }, /** -* Puts Keyboard focus on the widget. +* @see jQuery.ui.TemplatedWidget.focus */ focus: function() { if( this._isInEditMode ) { this.$list.data( 'tagadata' ).getHelperTag().find( 'input' ).focus(); + } else { + this.element.focus(); } } diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js b/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js index 8d77e7f..b6b5f9b 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js @@ -5,7 +5,7 @@ ( function( wb, $, mw ) { 'use strict'; -var PARENT = $.TemplatedWidget; +var PARENT = $.ui.TemplatedWidget; /** * References one single $menu instance that is reused for all badgeselector instances. @@ -22,6 +22,7 @@ /** * Selector for toggling badges. * @since 0.5 + * @extends jQuery.ui.TemplatedWidget * * @option {string[]} [value] * Item ids of badges currently assigned. diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js index b9f3b72..7c506a2 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js @@ -5,12 +5,12 @@ ( function( wb, $ ) { 'use strict'; - var PARENT = $.TemplatedWidget; + var PARENT = $.ui.TemplatedWidget; /** * View for displaying
[MediaWiki-commits] [Gerrit] Removed focus smartness from snakview - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/171555 Change subject: Removed focus smartness from snakview .. Removed focus smartness from snakview Fixes focusing of claimview within statementview and removes misplaced focus logic from snakview. requires Change-Id: I927c27d280facd558c2aa3d86528250ffdf0e226 --- M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js M lib/resources/jquery.wikibase/snakview/snakview.js M lib/resources/jquery.wikibase/snakview/snakview.variations.Value.js M lib/resources/jquery.wikibase/snakview/snakview.variations.Variation.js 6 files changed, 126 insertions(+), 59 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/55/171555/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js index f58bec5..b131d31 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js @@ -559,6 +559,16 @@ enable = view.isValid() !view.isInitialValue(); btnSave[enable ? 'enable' : 'disable'](); + }, + edittoolbaredit: function( event, toolbarcontroller ) { + var $statementview = $( event.target ), + statementview = $statementview.data( 'statementview' ); + + if( !statementview ) { + return; + } + + statementview.focus(); } } } ); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js index abcacbd..d9524a9 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js @@ -398,30 +398,34 @@ }, // start edit mode if event doesn't prevent default: natively: function( e ) { - this.$mainSnak.data( 'snakview' ).startEditing(); + var self = this; - if( !this._qualifiers this._claim ) { - this._createQualifiersListview(); - } - - // Start edit mode of all qualifiers: - if( this._qualifiers ) { - var snaklistviews = this._qualifiers.value(); - if ( snaklistviews.length ) { - for( var i = 0; i snaklistviews.length; i++ ) { - snaklistviews[i].startEditing(); - } + this.$mainSnak.one( 'snakviewafterstartediting', function() { + if( !self._qualifiers self._claim ) { + self._createQualifiersListview(); } - // If there are no snaklistviews, there is no way for the add qualifier toolbar - // to be - this._qualifiers.element.trigger( 'qualifiersstartediting' ); - } + + // Start edit mode of all qualifiers: + if( self._qualifiers ) { + var snaklistviews = self._qualifiers.value(); + if( snaklistviews.length ) { + for( var i = 0; i snaklistviews.length; i++ ) { + snaklistviews[i].startEditing(); + } + } + // If there are no snaklistviews, there is no way for the add qualifier toolbar + // to be + self._qualifiers.element.trigger( 'qualifiersstartediting' ); + } - this.element.addClass( 'wb-edit' ); - this._isInEditMode = true; + self.element.addClass( 'wb-edit' ); + self._isInEditMode = true; - this._trigger( 'afterstartediting' ); + self._trigger( 'afterstartediting' ); + } ); + + this.$mainSnak.data( 'snakview' ).startEditing(); } }
[MediaWiki-commits] [Gerrit] Remove obsolete MakeGlobalVariablesScriptHandler - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/171556 Change subject: Remove obsolete MakeGlobalVariablesScriptHandler .. Remove obsolete MakeGlobalVariablesScriptHandler this is quite old and obsolete. in production, the parser cache has been invalidated numerous times since and there is no use case for this code now. Change-Id: Idce26ec3dea691bb8ed8aea206cb519eb6303235 --- M repo/Wikibase.hooks.php M repo/Wikibase.php D repo/includes/Hook/MakeGlobalVariablesScriptHandler.php D repo/tests/phpunit/includes/Hook/MakeGlobalVariablesScriptHandlerTest.php 4 files changed, 0 insertions(+), 375 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/56/171556/1 diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index 677e8d4..ccae95b 100644 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -32,7 +32,6 @@ use User; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\EntityIdParsingException; -use Wikibase\Hook\MakeGlobalVariablesScriptHandler; use Wikibase\Hook\OutputPageJsConfigHookHandler; use Wikibase\Repo\Content\EntityHandler; use Wikibase\Repo\View\EntityViewPlaceholderExpander; @@ -1140,44 +1139,6 @@ $isExperimental = defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES; $hookHandler-handle( $out, $isExperimental ); - - return true; - } - - /** -* Provides fallback for output page js config vars that are stored in parser cache. -* -* In some cases, e.g. stale parser cache contents, variables including wbEntity might be -* missing, so we add them here as a fallback. This hook is called after -* OutputPage::setRevisionId is called. Revision id is needed to retrieve the correct entity. -* -* @param array $vars -* @param OutputPage $out -* -* @return bool -*/ - public static function onMakeGlobalVariablesScript( $vars, $out ) { - $entityNamespaceLookup = WikibaseRepo::getDefaultInstance()-getEntityNamespaceLookup(); - - if ( !$entityNamespaceLookup-isEntityNamespace( $out-getTitle()-getNamespace() ) ) { - return true; - } - - $wikibaseRepo = WikibaseRepo::getDefaultInstance(); - $languageCode = $out-getContext()-getLanguage()-getCode(); - - $fallbackChainFactory = $wikibaseRepo-getLanguageFallbackChainFactory(); - $fallbackChain = $fallbackChainFactory-newFromContextForPageView( $out-getContext() ); - - $languageCodes = Utils::getLanguageCodes() + array( $languageCode = $fallbackChain ); - - $hookHandler = new MakeGlobalVariablesScriptHandler( - $wikibaseRepo-getEntityContentFactory(), - $wikibaseRepo-getParserOutputJsConfigBuilder( $languageCode ), - $languageCodes - ); - - $hookHandler-handle( $out ); return true; } diff --git a/repo/Wikibase.php b/repo/Wikibase.php index c7e41d2..baafa23 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -211,7 +211,6 @@ $wgHooks['ContentModelCanBeUsedOn'][] = 'Wikibase\RepoHooks::onContentModelCanBeUsedOn'; $wgHooks['OutputPageBeforeHTML'][] = 'Wikibase\RepoHooks::onOutputPageBeforeHTML'; $wgHooks['OutputPageBeforeHTML'][] = 'Wikibase\RepoHooks::onOutputPageBeforeHtmlRegisterConfig'; - $wgHooks['MakeGlobalVariablesScript'][] = 'Wikibase\RepoHooks::onMakeGlobalVariablesScript'; $wgHooks['ContentHandlerForModelID'][] = 'Wikibase\RepoHooks::onContentHandlerForModelID'; $wgHooks['APIQuerySiteInfoStatisticsInfo'][]= 'Wikibase\RepoHooks::onAPIQuerySiteInfoStatisticsInfo'; $wgHooks['ImportHandleRevisionXMLTag'][]= 'Wikibase\RepoHooks::onImportHandleRevisionXMLTag'; diff --git a/repo/includes/Hook/MakeGlobalVariablesScriptHandler.php b/repo/includes/Hook/MakeGlobalVariablesScriptHandler.php deleted file mode 100644 index a67a178..000 --- a/repo/includes/Hook/MakeGlobalVariablesScriptHandler.php +++ /dev/null @@ -1,137 +0,0 @@ -?php - -namespace Wikibase\Hook; - -use OutputPage; -use Wikibase\DataModel\Entity\Entity; -use Wikibase\EntityContent; -use Wikibase\Lib\Serializers\SerializationOptions; -use Wikibase\ParserOutputJsConfigBuilder; -use Wikibase\Repo\Content\EntityContentFactory; - -/** - * @since 0.5 - * - * @licence GNU GPL v2+ - * @author Katie Filbert aude.w...@gmail.com - */ -class MakeGlobalVariablesScriptHandler { - - /** -* @var EntityContentFactory -*/ - private $entityContentFactory; - - /** -
[MediaWiki-commits] [Gerrit] txstatsd: add graphite-carbon dependency - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/171557 Change subject: txstatsd: add graphite-carbon dependency .. txstatsd: add graphite-carbon dependency Change-Id: I2071e061fd61bb74ed4fef2458045c7ea44e0827 --- M modules/txstatsd/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/57/171557/1 diff --git a/modules/txstatsd/manifests/init.pp b/modules/txstatsd/manifests/init.pp index 09943f0..3917a5b 100644 --- a/modules/txstatsd/manifests/init.pp +++ b/modules/txstatsd/manifests/init.pp @@ -23,7 +23,7 @@ # } # class txstatsd($settings) { -package { [ 'python-txstatsd', 'python-twisted-web' ]: } +package { [ 'python-txstatsd', 'python-twisted-web', 'graphite-carbon' ]: } file { '/etc/init/txstatsd.conf': source = 'puppet:///modules/txstatsd/txstatsd.conf', -- To view, visit https://gerrit.wikimedia.org/r/171557 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2071e061fd61bb74ed4fef2458045c7ea44e0827 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mw.Title: Add new static methods `newFromFileName`, `newFrom... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: mw.Title: Add new static methods `newFromFileName`, `newFromUserInput` .. mw.Title: Add new static methods `newFromFileName`, `newFromUserInput` This is the replacement for Ia57e4b0e804. Use cases: - UploadWizard: Suggesting valid tiles for files supplied by user whose names are invalid MediaWiki titles. - Upload Form: The same. - Community scripts, VisualEditor upload gadget, [...]: The same. Bug: 64912 Bug: 64922 Change-Id: I260ba883548975263bba03d25f6d11d3d9bbfbd9 (cherry picked from commit cc8b00ed5bf69dafac2413d9c4387523a14bc62a) --- M resources/src/mediawiki/mediawiki.Title.js M tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js 2 files changed, 507 insertions(+), 3 deletions(-) Approvals: MarkAHershberger: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki/mediawiki.Title.js b/resources/src/mediawiki/mediawiki.Title.js index 95b18a8..7ced42f 100644 --- a/resources/src/mediawiki/mediawiki.Title.js +++ b/resources/src/mediawiki/mediawiki.Title.js @@ -58,6 +58,34 @@ NS_SPECIAL = -1, /** +* @private +* @static +* @property NS_MEDIA +*/ + NS_MEDIA = -2, + + /** +* @private +* @static +* @property NS_FILE +*/ + NS_FILE = 6, + + /** +* @private +* @static +* @property FILENAME_MAX_BYTES +*/ + FILENAME_MAX_BYTES = 240, + + /** +* @private +* @static +* @property TITLE_MAX_BYTES +*/ + TITLE_MAX_BYTES = 255, + + /** * Get the namespace id from a namespace name (either from the localized, canonical or alias * name). * @@ -102,6 +130,85 @@ '|#[0-9]+;' + '|#x[0-9A-Fa-f]+;' ), + + // From MediaWikiTitleCodec.php#L225 @26fcab1f18c568a41 + // Clean up whitespace in function MediaWikiTitleCodec::splitTitleString() + rWhitespace = /[ _\u0009\u00A0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\s]+/g, + + /** +* Slightly modified from Flinfo. Credit goes to Lupo and Flominator. +* @private +* @static +* @property sanitationRules +*/ + sanitationRules = [ + // signature + { + pattern: /~{3}/g, + replace: '', + generalRule: true + }, + // Space, underscore, tab, NBSP and other unusual spaces + { + pattern: rWhitespace, + replace: ' ', + generalRule: true + }, + // unicode bidi override characters: Implicit, Embeds, Overrides + { + pattern: /[\u200E\u200F\u202A-\u202E]/g, + replace: '', + generalRule: true + }, + // control characters + { + pattern: /[\x00-\x1f\x7f]/g, + replace: '', + generalRule: true + }, + // URL encoding (possibly) + { + pattern: /%([0-9A-Fa-f]{2})/g, + replace: '% $1', + generalRule: true + }, + // HTML-character-entities + { + pattern: /(([A-Za-z0-9\x80-\xff]+|#[0-9]+|#x[0-9A-Fa-f]+);)/g, + replace: ' $1', + generalRule: true + }, + // slash, colon (not supported by file systems like NTFS/Windows, Mac OS 9 [:], ext4 [/]) + { + pattern: /[:\/#]/g, + replace: '-', + fileRule: true + }, + // brackets, greater than + { + pattern: /[\]\}]/g, + replace: ')', + generalRule: true + }, + // brackets, lower than + { + pattern: /[\[\{]/g, + replace: '(', + generalRule: true + }, + // everything that wasn't covered yet + { + pattern: new RegExp( rInvalid.source, 'g' ), + replace: '-', + generalRule: true + }, + // directory structures + { + pattern: /^(\.|\.\.|\.\/.*|\.\.\/.*|.*\/\.\/.*|.*\/\.\.\/.*|.*\/\.|.*\/\.\.)$/g, + replace: '', + generalRule: true + } + ], /** * Internal
[MediaWiki-commits] [Gerrit] Slightly refactor misc::statistics::limn::mobile_data_sync - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Slightly refactor misc::statistics::limn::mobile_data_sync .. Slightly refactor misc::statistics::limn::mobile_data_sync This will allow for multliple teams to more easily run generate.py and sync data over to stat1001 using different limn dataset sources. TODO: put generate.py into a generic limn generator repository, rather than requiring that limn-mobile-data repo is cloned for all limn::data::generate jobs. Change-Id: Iec0f862ca3e4ee63570f1c495260807071b1e2a4 --- M manifests/misc/statistics.pp M manifests/site.pp 2 files changed, 113 insertions(+), 33 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index acb8e0d..654d61a 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -701,45 +701,41 @@ } } - -# Class: misc::statistics::limn::mobile_data_sync +# == Class misc::statistics::limn::data +# Sets up base directories and repositories +# for using the misc::statistics::limn::data::generate() define. # -# Sets up daily cron jobs to run a script which -# generates csv datafiles from mobile apps statistics -# then rsyncs those files to stat1001 so they can be served publicly -class misc::statistics::limn::mobile_data_sync { +class misc::statistics::limn::data { include misc::statistics::base include misc::statistics::stats_researchdb_password +# Either '/a' or '/srv', depending on the server. :/ $working_path = $misc::statistics::base::working_path +# Directory where the repository of the generate.py will be cloned. $source_dir= ${working_path}/limn-mobile-data + +# generate.py command to run in a cron. $command = ${source_dir}/generate.py -$config= ${source_dir}/mobile/ + +# my.cnf credentials file. This is the file rendered by +# misc::statistics::stats_researchdb_password. $mysql_credentials = '/etc/mysql/conf.d/stats-research-client.cnf' -$rsync_from= ${working_path}/limn-public-data -$output= ${rsync_from}/mobile/datafiles -$log = '/var/log/limn-mobile-data.log' -$gerrit_repo = 'https://gerrit.wikimedia.org/r/p/analytics/limn-mobile-data.git' + +# cron job logs will be kept here +$log_dir = '/var/log/limn-data' + +# generate.py's repository +$git_remote= 'https://gerrit.wikimedia.org/r/p/analytics/limn-mobile-data.git' + +# public data directory. Data will be synced from here to a public web host. +$public_dir= ${working_path}/limn-public-data + +# Rsync generated data to stat1001 at http://datasets.wikimedia.org/limn-public-data/ +$rsync_to = stat1001.wikimedia.org::www/limn-public-data/ + +# user to own files and run cron job as (stats). $user = $misc::statistics::user::username - -$db_user = $passwords::mysql::research::user -$db_pass = $passwords::mysql::research::pass - -git::clone { 'analytics/limn-mobile-data': -ensure= 'latest', -directory = $source_dir, -origin= $gerrit_repo, -owner = $user, -require = [User[$user]], -} - -file { $log: -ensure = 'present', -owner = $user, -group = $user, -mode= '0660', -} # This path is used in the limn-mobile-data config. # Symlink this until they change it. @@ -749,20 +745,104 @@ target = $mysql_credentials, } -file { [$source_dir, $rsync_from, $output]: +# TODO: This repository contains the generate.py script. +# Other limn data repositories only have config and data +# directories. generate.py should be abstracted out into +# a general purupose limn data generator. +# For now, all limn data classes rely on this repository +# and generate.py script to be present. +if !defined(Git::Clone['analytics/limn-mobile-data']) { +git::clone { 'analytics/limn-mobile-data': +ensure= 'latest', +directory = $source_dir, +origin= $git_remote, +owner = $user, +require = [User[$user]], +} +} + +# Make sure these are writeable by $user. +file { [$log_dir, $source_dir, $public_data_dir]: ensure = 'directory', owner = $user, group = wikidev, mode = '0775', } +} -cron { 'rsync_mobile_apps_stats': -command = python ${command} ${config} ${log} 21 /usr/bin/rsync -rt ${rsync_from}/* stat1001.wikimedia.org::www/limn-public-data/, + + +# == Define: misc::statistics::limn::data::generate +# +# Sets up daily cron jobs to run a script which +# generates csv datafiles and rsyncs those files +# to
[MediaWiki-commits] [Gerrit] Add Oracle version of update-keys.sql - change (mediawiki/core)
MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/171558 Change subject: Add Oracle version of update-keys.sql .. Add Oracle version of update-keys.sql Oracle appears not to like the mysql version. Note: update-keys.sql is only inserted on install, never on update, so the fact that it's not INSERT IGNOREing should not matter. Bug: 71040 Change-Id: Iaf4a284d24cefb16f0e7583c7b84ae3f38437f2f (cherry picked from commit 6253cc6b2fbb0f9b1b21e52f71d63acca9cef13b) --- A maintenance/oracle/update-keys.sql 1 file changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/171558/1 diff --git a/maintenance/oracle/update-keys.sql b/maintenance/oracle/update-keys.sql new file mode 100644 index 000..7761d0c --- /dev/null +++ b/maintenance/oracle/update-keys.sql @@ -0,0 +1,29 @@ +-- SQL to insert update keys into the initial tables after a +-- fresh installation of MediaWiki's database. +-- This is read and executed by the install script; you should +-- not have to run it by itself unless doing a manual install. +-- Insert keys here if either the unnecessary would cause heavy +-- processing or could potentially cause trouble by lowering field +-- sizes, adding constraints, etc. +-- When adjusting field sizes, it is recommended removing old +-- patches but to play safe, update keys should also inserted here. + +-- The /*_*/ comments in this and other files are +-- replaced with the defined table prefix by the installer +-- and updater scripts. If you are installing or running +-- updates manually, you will need to manually insert the +-- table prefix if any when running these scripts. +-- + +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'image-img_major_mime-patch-img_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'oldimage-oi_major_mime-patch-oi_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_groups-ug_group-patch-ug_group-length-increase-255.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_former_groups-ufg_group-patch-ufg_group-length-increase-255.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_properties-up_property-patch-up_property.sql', null ); -- To view, visit https://gerrit.wikimedia.org/r/171558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf4a284d24cefb16f0e7583c7b84ae3f38437f2f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_24 Gerrit-Owner: MarkAHershberger m...@nichework.com Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo variable name in statistics.pp - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/171559 Change subject: Fix typo variable name in statistics.pp .. Fix typo variable name in statistics.pp Change-Id: Ib4ba5bb0126971db2e7fa994120d8e2188fbe6ff --- M manifests/misc/statistics.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/59/171559/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 654d61a..e750eb0 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -762,7 +762,7 @@ } # Make sure these are writeable by $user. -file { [$log_dir, $source_dir, $public_data_dir]: +file { [$log_dir, $source_dir, $public_dir]: ensure = 'directory', owner = $user, group = wikidev, -- To view, visit https://gerrit.wikimedia.org/r/171559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib4ba5bb0126971db2e7fa994120d8e2188fbe6ff 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] Fix typo variable name in statistics.pp - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Fix typo variable name in statistics.pp .. Fix typo variable name in statistics.pp Change-Id: Ib4ba5bb0126971db2e7fa994120d8e2188fbe6ff --- M manifests/misc/statistics.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 654d61a..e750eb0 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -762,7 +762,7 @@ } # Make sure these are writeable by $user. -file { [$log_dir, $source_dir, $public_data_dir]: +file { [$log_dir, $source_dir, $public_dir]: ensure = 'directory', owner = $user, group = wikidev, -- To view, visit https://gerrit.wikimedia.org/r/171559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4ba5bb0126971db2e7fa994120d8e2188fbe6ff Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Action schema update - change (analytics/multimedia)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/171560 Change subject: Action schema update .. Action schema update Change-Id: I4c087f68818bd218ddc5d0db1178b7ff4e679c14 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/977 --- M actions/template.sql 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/multimedia refs/changes/60/171560/1 diff --git a/actions/template.sql b/actions/template.sql index 083b8cf..820726b 100644 --- a/actions/template.sql +++ b/actions/template.sql @@ -82,6 +82,9 @@ SELECT timestamp, event_action, event_samplingFactor FROM MediaViewer_10277480 WHERE %wiki% timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) UNION ALL + SELECT timestamp, event_action, event_samplingFactor FROM MediaViewer_10308479 + WHERE %wiki% timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) + UNION ALL SELECT timestamp, (CASE WHEN event_value = 0 THEN 'pref-optout-loggedin' ELSE 'pref-optin-loggedin' END) AS event_action, 1 AS event_samplingFactor FROM PrefUpdate_5563398 WHERE event_property = 'multimediaviewer-enable' AND timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) ) AS MediaViewerUnioned -- To view, visit https://gerrit.wikimedia.org/r/171560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c087f68818bd218ddc5d0db1178b7ff4e679c14 Gerrit-PatchSet: 1 Gerrit-Project: analytics/multimedia Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Action schema update - change (analytics/multimedia)
jenkins-bot has submitted this change and it was merged. Change subject: Action schema update .. Action schema update Change-Id: I4c087f68818bd218ddc5d0db1178b7ff4e679c14 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/977 --- M actions/template.sql 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/actions/template.sql b/actions/template.sql index 083b8cf..820726b 100644 --- a/actions/template.sql +++ b/actions/template.sql @@ -82,6 +82,9 @@ SELECT timestamp, event_action, event_samplingFactor FROM MediaViewer_10277480 WHERE %wiki% timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) UNION ALL + SELECT timestamp, event_action, event_samplingFactor FROM MediaViewer_10308479 + WHERE %wiki% timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) + UNION ALL SELECT timestamp, (CASE WHEN event_value = 0 THEN 'pref-optout-loggedin' ELSE 'pref-optin-loggedin' END) AS event_action, 1 AS event_samplingFactor FROM PrefUpdate_5563398 WHERE event_property = 'multimediaviewer-enable' AND timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) ) AS MediaViewerUnioned -- To view, visit https://gerrit.wikimedia.org/r/171560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4c087f68818bd218ddc5d0db1178b7ff4e679c14 Gerrit-PatchSet: 1 Gerrit-Project: analytics/multimedia Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Send different OrderNumbers for each WP transaction - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/171561 Change subject: Send different OrderNumbers for each WP transaction .. Send different OrderNumbers for each WP transaction WP needs us to send different OrderNumbers for each transaction in a donation. This commit stages up transaction-specific values with unique suffixes on order IDs for each transaction. Change-Id: I4109e89ef8f559d1a814cc50e3b55cc64a0d21d3 --- M tests/Adapter/WorldPay/WorldPayTest.php M worldpay_gateway/worldpay.adapter.php 2 files changed, 56 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/61/171561/1 diff --git a/tests/Adapter/WorldPay/WorldPayTest.php b/tests/Adapter/WorldPay/WorldPayTest.php index cfb3f92..8d7f22d 100644 --- a/tests/Adapter/WorldPay/WorldPayTest.php +++ b/tests/Adapter/WorldPay/WorldPayTest.php @@ -408,4 +408,25 @@ $this-assertTrue( $gateway-getAVSResult() 25, 'getAVSResult giving snowflake account too high a risk score' ); } + + /** +* Check that we send different OrderNumbers for each transaction in a donation. +*/ + function testDistinctOrderNumberForEachTxn() { + $options = $this-getDonorTestData(); +$gateway = $this-getFreshGatewayObject( $options ); + + $getOrderNumber = function() use ( $gateway ) { + $xml = new SimpleXMLElement( preg_replace( '/StringIn=/', '', $gateway-curled ) ); + return $xml-OrderNumber; + }; + + $gateway-do_transaction( 'AuthorizePaymentForFraud' ); + $fraudOrderNumber = $getOrderNumber(); + $gateway-do_transaction( 'AuthorizeAndDepositPayment' ); + $saleOrderNumber = $getOrderNumber(); + +$this-assertNotEquals( $fraudOrderNumber, $saleOrderNumber, + 'Sending same OrderNumber for both fraud auth and sale.' ); + } } diff --git a/worldpay_gateway/worldpay.adapter.php b/worldpay_gateway/worldpay.adapter.php index d214621..30b067d 100644 --- a/worldpay_gateway/worldpay.adapter.php +++ b/worldpay_gateway/worldpay.adapter.php @@ -924,6 +924,41 @@ return $headers; } + /** +* WorldPay requires different OrderNumbers for each transaction within a donation. +* This will add suffixes to order_id for token generation, token querying, and fraud test. +* The real authorization and sale transaction keeps the old order ID format +* @param string $order_id - the base order_id for this donation attempt +*/ + protected function set_transaction_order_ids( $order_id ) { + if ( empty( $order_id ) ) { + return; + } + $this-transactions['GenerateToken']['values']['OrderNumber'] = $order_id . '.0'; + $this-transactions['QueryTokenData']['values']['OrderNumber'] = $order_id . '.1'; + $this-transactions['AuthorizePaymentForFraud']['values']['OrderNumber'] = $order_id . '.2'; + } + + /** +* Can't add order_id to staged_vars without nasty side effects, so we have +* to override this to catch changes +*/ + public function normalizeOrderID( $override = null, $dataObj = null ) { + $value = parent::normalizeOrderID( $override, $dataObj ); + $this-set_transaction_order_ids( $value ); + return $value; + } + + /** +* Can't add order_id to staged_vars without nasty side effects, so we have +* to override this to catch changes +*/ + public function regenerateOrderID() { + parent::regenerateOrderID(); + $order_id = $this-getData_Unstaged_Escaped( 'order_id' ); + $this-set_transaction_order_ids( $order_id ); + } + protected function stage_returnto( $type = 'request' ) { global $wgServer, $wgArticlePath; -- To view, visit https://gerrit.wikimedia.org/r/171561 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4109e89ef8f559d1a814cc50e3b55cc64a0d21d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg eeggles...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improving message databaseerror-text - change (mediawiki/core)
Joyceg has uploaded a new change for review. https://gerrit.wikimedia.org/r/171562 Change subject: Improving message databaseerror-text .. Improving message databaseerror-text I have fixed the bug in the databaseerror-text. I have rephrased the error message so that the users can understand the error very easily and can take necessary actions. Change-Id: I4a0d21e31a850608e82471a72e1ee0624aa2f40e --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/171562/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 341f626..58eb575 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -306,7 +306,7 @@ nospecialpagetext: strongYou have requested an invalid special page./strong\n\nA list of valid special pages can be found at [[Special:SpecialPages|{{int:specialpages}}]]., error: Error, databaseerror: Database error, - databaseerror-text: A database query error has occurred.\nThis may indicate a bug in the software., + databaseerror-text: A database query error has occurred. This may indicate a bug in the software. See the manual on how [[Manual:How to debug#SQL errors|to debug SQL errors]]., databaseerror-textcl: A database query error has occurred., databaseerror-query: Query: $1, databaseerror-function: Function: $1, -- To view, visit https://gerrit.wikimedia.org/r/171562 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a0d21e31a850608e82471a72e1ee0624aa2f40e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Joyceg geojoyce...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Couple of more fixes for misc::statistics::limn::data::gener... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/171563 Change subject: Couple of more fixes for misc::statistics::limn::data::generate refactor .. Couple of more fixes for misc::statistics::limn::data::generate refactor Change-Id: I7f3851a149ff8ec8073930d43f6bf7e35b9bbdcc --- M manifests/misc/statistics.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/63/171563/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index e750eb0..56a025b 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -809,7 +809,7 @@ $rsync_to = $misc::statistics::limn::data::rsync_to # I'm not totally sure what this is... -$output= ${rsync_from}/mobile/datafiles +$output= ${rsync_from}/datafiles if !defined(Git::Clone[analytics/limn-${title}-data]) { git::clone { analytics/limn-${title}-data: @@ -829,7 +829,7 @@ } cron { rsync_${title}_apps_stats: -command = python ${command} ${config} ${log} 21 /usr/bin/rsync -rt ${rsync_from} ${rsync_to}/, +command = python ${command} ${config_dir} ${log} 21 /usr/bin/rsync -rt ${rsync_from} ${rsync_to}, user= $user, minute = 0, } -- To view, visit https://gerrit.wikimedia.org/r/171563 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f3851a149ff8ec8073930d43f6bf7e35b9bbdcc 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] Couple of more fixes for misc::statistics::limn::data::gener... - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Couple of more fixes for misc::statistics::limn::data::generate refactor .. Couple of more fixes for misc::statistics::limn::data::generate refactor Change-Id: I7f3851a149ff8ec8073930d43f6bf7e35b9bbdcc --- M manifests/misc/statistics.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index e750eb0..56a025b 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -809,7 +809,7 @@ $rsync_to = $misc::statistics::limn::data::rsync_to # I'm not totally sure what this is... -$output= ${rsync_from}/mobile/datafiles +$output= ${rsync_from}/datafiles if !defined(Git::Clone[analytics/limn-${title}-data]) { git::clone { analytics/limn-${title}-data: @@ -829,7 +829,7 @@ } cron { rsync_${title}_apps_stats: -command = python ${command} ${config} ${log} 21 /usr/bin/rsync -rt ${rsync_from} ${rsync_to}/, +command = python ${command} ${config_dir} ${log} 21 /usr/bin/rsync -rt ${rsync_from} ${rsync_to}, user= $user, minute = 0, } -- To view, visit https://gerrit.wikimedia.org/r/171563 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f3851a149ff8ec8073930d43f6bf7e35b9bbdcc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor out show/hide loading spinner - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/171564 Change subject: Refactor out show/hide loading spinner .. Refactor out show/hide loading spinner Change-Id: If505a46f54921ce4742ecfed598eb07a9ba5e3eb --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js 1 file changed, 18 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/64/171564/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js index 8dd7486..4bb1290 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js @@ -339,8 +339,7 @@ return; } - var $spinner = $( 'div class=mw-viewPageTarget-loading/div' ); - $( '#firstHeading' ).prepend( $spinner ); + init.showLoading(); if ( window.history.pushState uri.query.veaction !== 'edit' ) { //Set veaction to edit @@ -352,7 +351,7 @@ getTarget().done( function ( target ) { ve.track( 'Edit', { action: 'edit-link-click' } ); - target.activate().always( function () { $spinner.remove(); } ); + target.activate().always( init.hideLoading.bind( init ) ); } ); }, @@ -361,8 +360,7 @@ return; } - var $spinner = $( 'div class=mw-viewPageTarget-loading/div' ); - $( '#firstHeading' ).prepend( $spinner ); + init.showLoading(); if ( window.history.pushState uri.query.veaction !== 'edit' ) { window.history.pushState( { tag: 'visualeditor' }, document.title, this.href ); } @@ -372,8 +370,20 @@ getTarget().done( function ( target ) { ve.track( 'Edit', { action: 'section-edit-link-click' } ); target.saveEditSection( $( e.target ).closest( 'h1, h2, h3, h4, h5, h6' ).get( 0 ) ); - target.activate().always( function () { $spinner.remove(); } ); + target.activate().always( init.hideLoading.bind( init ) ); } ); + }, + showLoading: function () { + if ( !init.$loading ) { + init.$loading = $( 'div class=mw-viewPageTarget-loading/div' ); + } + $( '#firstHeading' ).prepend( init.$loading ); + }, + + hideLoading: function () { + if ( init.$loading ) { + init.$loading.detach(); + } } }; @@ -451,11 +461,10 @@ $( function () { if ( init.isAvailable ) { if ( isViewPage uri.query.veaction === 'edit' ) { - var $spinner = $( 'div class=mw-viewPageTarget-loading/div' ); - $( '#firstHeading' ).prepend( $spinner ); + init.showLoading(); getTarget().done( function ( target ) { - target.activate().always( function () { $spinner.remove(); } ); + target.activate().always( init.hideLoading.bind( init ) ); } ); } } -- To view, visit https://gerrit.wikimedia.org/r/171564 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If505a46f54921ce4742ecfed598eb07a9ba5e3eb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Oracle version of update-keys.sql - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add Oracle version of update-keys.sql .. Add Oracle version of update-keys.sql Oracle appears not to like the mysql version. Note: update-keys.sql is only inserted on install, never on update, so the fact that it's not INSERT IGNOREing should not matter. Bug: 71040 Change-Id: Iaf4a284d24cefb16f0e7583c7b84ae3f38437f2f (cherry picked from commit 6253cc6b2fbb0f9b1b21e52f71d63acca9cef13b) --- A maintenance/oracle/update-keys.sql 1 file changed, 29 insertions(+), 0 deletions(-) Approvals: MarkAHershberger: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/oracle/update-keys.sql b/maintenance/oracle/update-keys.sql new file mode 100644 index 000..7761d0c --- /dev/null +++ b/maintenance/oracle/update-keys.sql @@ -0,0 +1,29 @@ +-- SQL to insert update keys into the initial tables after a +-- fresh installation of MediaWiki's database. +-- This is read and executed by the install script; you should +-- not have to run it by itself unless doing a manual install. +-- Insert keys here if either the unnecessary would cause heavy +-- processing or could potentially cause trouble by lowering field +-- sizes, adding constraints, etc. +-- When adjusting field sizes, it is recommended removing old +-- patches but to play safe, update keys should also inserted here. + +-- The /*_*/ comments in this and other files are +-- replaced with the defined table prefix by the installer +-- and updater scripts. If you are installing or running +-- updates manually, you will need to manually insert the +-- table prefix if any when running these scripts. +-- + +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'image-img_major_mime-patch-img_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'oldimage-oi_major_mime-patch-oi_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_groups-ug_group-patch-ug_group-length-increase-255.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_former_groups-ufg_group-patch-ufg_group-length-increase-255.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_properties-up_property-patch-up_property.sql', null ); -- To view, visit https://gerrit.wikimedia.org/r/171558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaf4a284d24cefb16f0e7583c7b84ae3f38437f2f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_24 Gerrit-Owner: MarkAHershberger m...@nichework.com Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com Gerrit-Reviewer: MarkAHershberger m...@nichework.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] Move Cookie(Jar) to utils/ - change (mediawiki/core)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/171565 Change subject: Move Cookie(Jar) to utils/ .. Move Cookie(Jar) to utils/ This doesn't rely on any other parts of MediaWiki since we can replace MWException with InvalidArgumentException here. Change-Id: Id4512b184d24efc6674d486a5d452aa44dc871c6 --- M includes/AutoLoader.php R includes/utils/Cookie.php 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/171565/1 diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 5024b7a..1541170 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -48,8 +48,6 @@ 'CollationCkb' = 'includes/Collation.php', 'CollationEt' = 'includes/Collation.php', 'ConcatenatedGzipHistoryBlob' = 'includes/HistoryBlob.php', - 'Cookie' = 'includes/Cookie.php', - 'CookieJar' = 'includes/Cookie.php', 'CurlHttpRequest' = 'includes/HttpFunctions.php', 'DeprecatedGlobal' = 'includes/DeprecatedGlobal.php', 'DerivativeRequest' = 'includes/WebRequest.php', @@ -1160,6 +1158,8 @@ 'CdbWriter' = 'includes/utils/Cdb.php', 'CdbWriterDBA' = 'includes/utils/CdbDBA.php', 'CdbWriterPHP' = 'includes/utils/CdbPHP.php', + 'Cookie' = 'includes/Cookie.php', + 'CookieJar' = 'includes/Cookie.php', 'DoubleReplacer' = 'includes/utils/StringUtils.php', 'ExplodeIterator' = 'includes/utils/StringUtils.php', 'HashtableReplacer' = 'includes/utils/StringUtils.php', diff --git a/includes/Cookie.php b/includes/utils/Cookie.php similarity index 98% rename from includes/Cookie.php rename to includes/utils/Cookie.php index cb04190..56dc6ea 100644 --- a/includes/Cookie.php +++ b/includes/utils/Cookie.php @@ -69,7 +69,7 @@ $this-domain = $attr['domain']; } } else { - throw new MWException( 'You must specify a domain.' ); + throw new InvalidArgumentException( '$attr must contain a domain' ); } } -- To view, visit https://gerrit.wikimedia.org/r/171565 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4512b184d24efc6674d486a5d452aa44dc871c6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad ch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix source_dir variable reference - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/171566 Change subject: Fix source_dir variable reference .. Fix source_dir variable reference Change-Id: I81efe5794c91ed6c44d48340db79c780ae197cc5 --- M manifests/misc/statistics.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/66/171566/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 56a025b..7011ba0 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -796,7 +796,7 @@ $git_remote= https://gerrit.wikimedia.org/r/p/analytics/limn-${title}-data.git; # Directory at which to clone $git_remote -$source_dir= ${misc::statistics::base::limn::data::working_path}/limn-${title}-data +$source_dir= ${misc::statistics::limn::data::working_path}/limn-${title}-data # config directory for this limn data generate job $config_dir= ${$source_dir}/${title}/ -- To view, visit https://gerrit.wikimedia.org/r/171566 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81efe5794c91ed6c44d48340db79c780ae197cc5 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] Fix source_dir variable reference - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Fix source_dir variable reference .. Fix source_dir variable reference Change-Id: I81efe5794c91ed6c44d48340db79c780ae197cc5 --- M manifests/misc/statistics.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 56a025b..7011ba0 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -796,7 +796,7 @@ $git_remote= https://gerrit.wikimedia.org/r/p/analytics/limn-${title}-data.git; # Directory at which to clone $git_remote -$source_dir= ${misc::statistics::base::limn::data::working_path}/limn-${title}-data +$source_dir= ${misc::statistics::limn::data::working_path}/limn-${title}-data # config directory for this limn data generate job $config_dir= ${$source_dir}/${title}/ -- To view, visit https://gerrit.wikimedia.org/r/171566 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81efe5794c91ed6c44d48340db79c780ae197cc5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed obsolete $.TemplatedWidget alias - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/171567 Change subject: Removed obsolete $.TemplatedWidget alias .. Removed obsolete $.TemplatedWidget alias Change-Id: I400cf6163b425488f0258d75912889baafcf059e --- M lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js M lib/resources/jquery.wikibase/jquery.wikibase.listview.js M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 3 files changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/67/171567/1 diff --git a/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js b/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js index c4974c0..11703aa 100644 --- a/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js +++ b/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js @@ -161,6 +161,4 @@ } } ); - $.TemplatedWidget = $.ui.TemplatedWidget; - }( jQuery ) ); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js index d7288ab..5b4a0cb 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js @@ -112,7 +112,7 @@ }, /** -* @see jQuery.TemplatedWidget.destroy +* @see jQuery.ui.TemplatedWidget.destroy */ destroy: function() { this._lia = null; diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js index 92f5c58..73ffb21 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js @@ -105,7 +105,7 @@ _referencesChanger: null, /** -* @see jQuery.TemplatedWidget._create +* @see jQuery.ui.TemplatedWidget._create */ _create: function() { if( -- To view, visit https://gerrit.wikimedia.org/r/171567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I400cf6163b425488f0258d75912889baafcf059e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove management of source_dir ownership - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Remove management of source_dir ownership .. Remove management of source_dir ownership This is done by git::clone anyway. Change-Id: I86c1012856178122adc7409d4fdc90b80a19cff5 --- M manifests/misc/statistics.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 7011ba0..5c24d1c 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -762,7 +762,7 @@ } # Make sure these are writeable by $user. -file { [$log_dir, $source_dir, $public_dir]: +file { [$log_dir, $public_dir]: ensure = 'directory', owner = $user, group = wikidev, @@ -821,7 +821,7 @@ } } -file { [$source_dir, $rsync_from, $output]: +file { [$rsync_from, $output]: ensure = 'directory', owner = $misc::statistics::limn::data::user, group = wikidev, -- To view, visit https://gerrit.wikimedia.org/r/171568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86c1012856178122adc7409d4fdc90b80a19cff5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove management of source_dir ownership - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/171568 Change subject: Remove management of source_dir ownership .. Remove management of source_dir ownership This is done by git::clone anyway. Change-Id: I86c1012856178122adc7409d4fdc90b80a19cff5 --- M manifests/misc/statistics.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/68/171568/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 7011ba0..5c24d1c 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -762,7 +762,7 @@ } # Make sure these are writeable by $user. -file { [$log_dir, $source_dir, $public_dir]: +file { [$log_dir, $public_dir]: ensure = 'directory', owner = $user, group = wikidev, @@ -821,7 +821,7 @@ } } -file { [$source_dir, $rsync_from, $output]: +file { [$rsync_from, $output]: ensure = 'directory', owner = $misc::statistics::limn::data::user, group = wikidev, -- To view, visit https://gerrit.wikimedia.org/r/171568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86c1012856178122adc7409d4fdc90b80a19cff5 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] Clean up ChangeHandler - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/171569 Change subject: Clean up ChangeHandler .. Clean up ChangeHandler Change-Id: If258b63807930aacd89cd24da57a1a27648800d6 --- M client/includes/ChangeHandler.php 1 file changed, 27 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/69/171569/1 diff --git a/client/includes/ChangeHandler.php b/client/includes/ChangeHandler.php index 95cc27b..b351085 100644 --- a/client/includes/ChangeHandler.php +++ b/client/includes/ChangeHandler.php @@ -65,7 +65,7 @@ private $affectedPagesFinder; /** -* @var Client\Store\TitleFactory +* @var TitleFactory */ private $titleFactory; @@ -84,6 +84,22 @@ */ private $localSiteId; + /** +* @var bool +*/ + private $injectRC; + + /** +* @param EntityChangeFactory $changeFactory +* @param AffectedPagesFinder $affectedPagesFinder +* @param TitleFactory $titleFactory +* @param PageUpdater $updater +* @param EntityRevisionLookup $entityRevisionLookup +* @param string $localSiteId +* @param bool $injectRC +* +* @throws InvalidArgumentException +*/ public function __construct( EntityChangeFactory $changeFactory, AffectedPagesFinder $affectedPagesFinder, @@ -93,12 +109,6 @@ $localSiteId, $injectRC ) { - $this-changeFactory = $changeFactory; - $this-affectedPagesFinder = $affectedPagesFinder; - $this-titleFactory = $titleFactory; - $this-updater = $updater; - $this-entityRevisionLookup = $entityRevisionLookup; - if ( !is_string( $localSiteId ) ) { throw new InvalidArgumentException( '$localSiteId must be a string' ); } @@ -107,10 +117,13 @@ throw new InvalidArgumentException( '$injectRC must be a bool' ); } + $this-changeFactory = $changeFactory; + $this-affectedPagesFinder = $affectedPagesFinder; + $this-titleFactory = $titleFactory; + $this-updater = $updater; + $this-entityRevisionLookup = $entityRevisionLookup; $this-localSiteId = $localSiteId; - $this-injectRC = (bool)$injectRC; - - $this-mirrorUpdater = null; + $this-injectRC = $injectRC; } /** @@ -308,7 +321,7 @@ $currentRun[] = $change; // skip any change that failed to process in some way (bug 49417) - } catch ( \Exception $e ) { + } catch ( Exception $e ) { wfLogWarning( __METHOD__ . ':' . $e-getMessage() ); } } @@ -601,7 +614,7 @@ * * @since 0.4 * -* @param \Wikibase\EntityChange $change The Change that caused the update +* @param EntityChange $change The Change that caused the update * * @return array|boolean an array of RC attributes, * or false if the change does not provide edit meta data @@ -652,7 +665,7 @@ * * @param EntityChange $change the change to get a comment for * -* @throws \MWException +* @throws MWException * @return array */ public function getEditComment( EntityChange $change ) { @@ -667,7 +680,7 @@ $editComment = $commentCreator-getEditComment( $siteLinkDiff, $action, $comment ); if( is_array( $editComment ) !isset( $editComment['message'] ) ) { - throw new \MWException( 'getEditComment returned an empty comment' ); + throw new MWException( 'getEditComment returned an empty comment' ); } return $editComment; -- To view, visit https://gerrit.wikimedia.org/r/171569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If258b63807930aacd89cd24da57a1a27648800d6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [ContributionTracking] Add empty message keys - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [ContributionTracking] Add empty message keys .. [ContributionTracking] Add empty message keys https://gerrit.wikimedia.org/r/#/c/169811/1/i18n/en.json,unified Change-Id: I3d85cb1a4cd5ae90d632092303965a9ad1bd5b16 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 4789347..c55e902 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -651,6 +651,9 @@ Contribution Tracking aliasfile = ContributionTracking/ContributionTracking.alias.php +ignored = apihelp-contributiontracking-param-utm_source, apihelp-contributiontracking-param-utm_medium +ignored = apihelp-contributiontracking-param-utm_campaign, apihelp-contributiontracking-param-utm_key +ignored = apihelp-contributiontracking-param-owa_session, apihelp-contributiontracking-param-owa_ref Contributions List -- To view, visit https://gerrit.wikimedia.org/r/171570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d85cb1a4cd5ae90d632092303965a9ad1bd5b16 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: Raimond Spekking raimond.spekk...@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] Align text and icons on the grey area - change (mediawiki...MultimediaViewer)
Pginer has uploaded a new change for review. https://gerrit.wikimedia.org/r/171571 Change subject: Align text and icons on the grey area .. Align text and icons on the grey area Due to differences in line-height, author and license text were missaligned. Some adjusment has been done also about icon position. The end result can be viewed at http://i.imgur.com/x7KEjDE.png Change-Id: Ie369d7ab6f1230b1b795ce2b63cdba1401d052dd --- M resources/mmv/ui/mmv.ui.metadataPanel.less 1 file changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/71/171571/1 diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.less b/resources/mmv/ui/mmv.ui.metadataPanel.less index e3495c0..e0cf138 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.less +++ b/resources/mmv/ui/mmv.ui.metadataPanel.less @@ -37,6 +37,10 @@ } } +.mw-mmv-source-author { + line-height: 1.8em; +} + .mw-mmv-title { font-size: 1.2em; max-width: 60%; @@ -48,7 +52,7 @@ margin-top: -@metadatabar-below-fold-pushup-height; border-top: @fold-separator-border-width solid #ddd; background-color: #f5f5f5; - padding-top: 4px; + padding-top: 2px; .jq-fullscreened { // Make sure content fits into the screen. This assumes no paddings. @@ -66,7 +70,8 @@ height: 16px; width: 16px; content: ' '; - margin-right: 5px; + margin-right: 7px; + margin-bottom: 2px; background-size: contain; background-position: center center; background-repeat: no-repeat; @@ -114,7 +119,8 @@ height: 16px; width: 16px; content: ' '; - margin-right: 10px; + margin-right: 7px; + margin-bottom: 2px; background-size: contain; background-position: right center; background-repeat: no-repeat; @@ -139,7 +145,7 @@ /* @embed */ background-image: url(img/uploader-ltr.svg); width: 18px; - margin-right: 8px; + margin-right: 5px; } .mw-mmv-location-li:before { -- To view, visit https://gerrit.wikimedia.org/r/171571 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie369d7ab6f1230b1b795ce2b63cdba1401d052dd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Pginer pgi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Separate rsync from generate cron job - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/171572 Change subject: Separate rsync from generate cron job .. Separate rsync from generate cron job This will allow everything in limn-public-data to be synced in a single cron job, rather than in a cron job per ::generate() Change-Id: I86c7a7de2af96e888e50e66b77284e726ce41377 --- M manifests/misc/statistics.pp 1 file changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/72/171572/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 5c24d1c..ba10db7 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -768,6 +768,13 @@ group = wikidev, mode = '0775', } + +# Rsync anything generated in $public_dir to $rsync_to +cron { rsync_limn_public_data: +command = /usr/bin/rsync -rt ${public_dir}/* ${rsync_to}, +user= $user, +minute = 15, +} } @@ -804,10 +811,6 @@ # log file for the generate cron job $log = ${misc::statistics::limn::data::log_dir}/limn-${title}-data.log -# Rsync from $public_dir/${title} -$rsync_from= ${misc::statistics::limn::data::public_dir}/${title} -$rsync_to = $misc::statistics::limn::data::rsync_to - # I'm not totally sure what this is... $output= ${rsync_from}/datafiles @@ -828,8 +831,9 @@ mode = '0775', } -cron { rsync_${title}_apps_stats: -command = python ${command} ${config_dir} ${log} 21 /usr/bin/rsync -rt ${rsync_from} ${rsync_to}, +# This will generate data into $public_dir/${title} (if configured correctly) +cron { generate_${title}_limn_public_data: +command = python ${command} ${config_dir} ${log}, user= $user, minute = 0, } -- To view, visit https://gerrit.wikimedia.org/r/171572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86c7a7de2af96e888e50e66b77284e726ce41377 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] [ContributionTracking] Add empty message keys - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/171570 Change subject: [ContributionTracking] Add empty message keys .. [ContributionTracking] Add empty message keys https://gerrit.wikimedia.org/r/#/c/169811/1/i18n/en.json,unified Change-Id: I3d85cb1a4cd5ae90d632092303965a9ad1bd5b16 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/70/171570/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 4789347..c55e902 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -651,6 +651,9 @@ Contribution Tracking aliasfile = ContributionTracking/ContributionTracking.alias.php +ignored = apihelp-contributiontracking-param-utm_source, apihelp-contributiontracking-param-utm_medium +ignored = apihelp-contributiontracking-param-utm_campaign, apihelp-contributiontracking-param-utm_key +ignored = apihelp-contributiontracking-param-owa_session, apihelp-contributiontracking-param-owa_ref Contributions List -- To view, visit https://gerrit.wikimedia.org/r/171570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d85cb1a4cd5ae90d632092303965a9ad1bd5b16 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Separate rsync from generate cron job - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Separate rsync from generate cron job .. Separate rsync from generate cron job This will allow everything in limn-public-data to be synced in a single cron job, rather than in a cron job per ::generate() Change-Id: I86c7a7de2af96e888e50e66b77284e726ce41377 --- M manifests/misc/statistics.pp 1 file changed, 10 insertions(+), 6 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 5c24d1c..ba10db7 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -768,6 +768,13 @@ group = wikidev, mode = '0775', } + +# Rsync anything generated in $public_dir to $rsync_to +cron { rsync_limn_public_data: +command = /usr/bin/rsync -rt ${public_dir}/* ${rsync_to}, +user= $user, +minute = 15, +} } @@ -804,10 +811,6 @@ # log file for the generate cron job $log = ${misc::statistics::limn::data::log_dir}/limn-${title}-data.log -# Rsync from $public_dir/${title} -$rsync_from= ${misc::statistics::limn::data::public_dir}/${title} -$rsync_to = $misc::statistics::limn::data::rsync_to - # I'm not totally sure what this is... $output= ${rsync_from}/datafiles @@ -828,8 +831,9 @@ mode = '0775', } -cron { rsync_${title}_apps_stats: -command = python ${command} ${config_dir} ${log} 21 /usr/bin/rsync -rt ${rsync_from} ${rsync_to}, +# This will generate data into $public_dir/${title} (if configured correctly) +cron { generate_${title}_limn_public_data: +command = python ${command} ${config_dir} ${log}, user= $user, minute = 0, } -- To view, visit https://gerrit.wikimedia.org/r/171572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86c7a7de2af96e888e50e66b77284e726ce41377 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