[MediaWiki-commits] [Gerrit] Replace webkitMovementX with movementX - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Replace webkitMovementX with movementX .. Replace webkitMovementX with movementX Bug: T104758 Bug: T77869 Change-Id: Ied88588a3db3a773b02799568da71ecd6c66a2fd --- M resources/mmv/mmv.lightboxinterface.js 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/mmv.lightboxinterface.js b/resources/mmv/mmv.lightboxinterface.js index 6d6a2d1..87db342 100644 --- a/resources/mmv/mmv.lightboxinterface.js +++ b/resources/mmv/mmv.lightboxinterface.js @@ -416,12 +416,12 @@ * @param {jQuery.Event} e The mousemove event object */ LIP.mousemove = function ( e ) { - // This is a fake mousemove event triggered by Chrome, ignore it + // T77869 ignore fake mousemove events triggered by Chrome if ( e e.originalEvent -e.originalEvent.webkitMovementX === 0 -e.originalEvent.webkitMovementY === 0 +e.originalEvent.movementX === 0 +e.originalEvent.movementY === 0 ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/223517 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied88588a3db3a773b02799568da71ecd6c66a2fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix request-matching logic in varnishrls - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Fix request-matching logic in varnishrls .. Fix request-matching logic in varnishrls The mistake I made here was to assume that command-line options were implemented entirely by VSL_Arg(). This is not true for the 'm' arg. Adding a regex does not mean the varnishlog callback only gets called with matching requests. Instead, it means that a bit in the bitmap field will be set if the regex matched and the current log tag is the tag specified in the regex. This means that it is up to us to track whether the current log record is associated with a request which matched our conditions. We can do that by relying on the fact that for every request, RxURL comes before RxHeader which comes before TxStatus. This means that whenever we get a matching RxURL, we look for the RxHeader and TxStatus records that follow it and which have the same transaction ID. TxHeader is trickier to order relative to RxURL / RxHeader / TxStatus, so we'll just live without logging of X-Cache hits / misses for now. As Brandon pointed out, they don't necessarily correspond to cache hits / misses anyway. I tested this on cp1066 by confirming that the rate of requests it picks up matches the rate of load.php requests as reported by varnishncsa. Change-Id: I55f0c44cd5270e5a4809106514aebead63dbcf5c --- M modules/varnish/files/varnishrls 1 file changed, 34 insertions(+), 11 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/modules/varnish/files/varnishrls b/modules/varnish/files/varnishrls index e95c551..0eb2706 100755 --- a/modules/varnish/files/varnishrls +++ b/modules/varnish/files/varnishrls @@ -63,17 +63,41 @@ stats = {} +current_match = -1 + def vsl_callback(transaction_id, tag, record, remote_party): +global current_match keys = () + +# Start of new request. +if tag == 'RxURL': +if record.startswith('/w/load.php'): +current_match = transaction_id +else: +# This should only happen if the request URL consists of +# three digits or if starts with 'if-modified-since', in +# which case we reject the match. +current_match = -1 +return 0 + +# Out-of-sequence log record. Discard and reset request context. +if current_match != transaction_id: +current_match = -1 +return 0 + if tag == 'TxStatus': +# We don't expect to see any more log records from this request +# because TxStatus ought to come after RxHeader and RxURL. +current_match = -1 keys = ('reqs.all', 'resps.%s' % record) elif tag == 'RxHeader': -if not record.startswith('X-Cache'): -keys = ('reqs.if_none_match',) -elif tag == 'TxHeader': -if record.startswith('X-Cache'): -results = re.findall(r'(hit|miss)', record) -keys = ('x_cache.%s' % '_'.join(results),) +if not re.match(r'if-none-match', record, re.I): +# This should only happen if the request header name +# consists of three digits or starts with '/w/load.php'. +current_match = -1 +return 0 +keys = ('reqs.if_none_match',) + for key in keys: stats[key] = stats.get(key, 0) + 1 @@ -97,10 +121,9 @@ ('c', None),# Only consider interactions with the client ('i', 'TxStatus'), # Get TxStatus for the HTTP status code ('i', 'RxHeader'), # Get RxHeader for If-None-Match header -('i', 'TxHeader'), # Get TxHeader for X-Cache header +('i', 'RxURL'), # Get RxURL to match /w/load.php ('C', ''), # Use case-insensitive matching -('m', 'RxURL:/w/load.php'), # Only consider ResourceLoader requests -('I', '^(x-cache' # ...that contain an X-Cache header - '|if-none-match' # ...or an If-None-Match header - '|\d{3}$)'), # ...or an HTTP status code. +('I', '^(/w/load\.php' # ...to match ResourceLoader RxURLs + '|if-none-match' # ...or If-None-Match RxHeaders + '|[1-5]\d{2}$)'), # ...or RxStatus codes ), vsl_callback) -- To view, visit https://gerrit.wikimedia.org/r/223522 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55f0c44cd5270e5a4809106514aebead63dbcf5c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@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] Change trusted e-mail address to cover Gerrit E-Mail change - change (integration/config)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/223530 Change subject: Change trusted e-mail address to cover Gerrit E-Mail change .. Change trusted e-mail address to cover Gerrit E-Mail change I changed my own E-Mail in gerrit - change it in the trusted user list, too. Change-Id: I2a1f4d3133e4dc3ea735dd3f4e92da9c7bc742d7 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/30/223530/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index f48c14c..33124d5 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -76,7 +76,7 @@ | ebrahim@gnu\.org | ecokpo@gmail\.com | federicoleva@tiscali\.it -| florian\.schmidt\.welzow@t-online\.de +| florian\.schmidt\.stargatewissen@gmail\.com | git@samsmith\.io | geofbot@gmail\.com | glaisher\.wiki@gmail\.com -- To view, visit https://gerrit.wikimedia.org/r/223530 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a1f4d3133e4dc3ea735dd3f4e92da9c7bc742d7 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add role for OpenBadges extension - change (mediawiki/vagrant)
Lokal Profil has uploaded a new change for review. https://gerrit.wikimedia.org/r/223531 Change subject: Add role for OpenBadges extension .. Add role for OpenBadges extension Adds a puppet role for the OpenBadges extension Bug: T62064 Change-Id: I155aa58299ebcbaca27d2077ee4709d72531898c --- A puppet/modules/role/manifests/openbadges.pp 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/31/223531/1 diff --git a/puppet/modules/role/manifests/openbadges.pp b/puppet/modules/role/manifests/openbadges.pp new file mode 100644 index 000..47d51d4 --- /dev/null +++ b/puppet/modules/role/manifests/openbadges.pp @@ -0,0 +1,7 @@ +# == Class: role::openbadges +# This role sets up the OpenBadges extension for MediaWiki. O +class role::openbadges { +mediawiki::extension { 'OpenBadges': +needs_update = true +} +} -- To view, visit https://gerrit.wikimedia.org/r/223531 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I155aa58299ebcbaca27d2077ee4709d72531898c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Lokal Profil lokal.pro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix spelling of I am dummies in QUnit tests - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/223532 Change subject: Fix spelling of I am dummies in QUnit tests .. Fix spelling of I am dummies in QUnit tests Change-Id: I9cac77e43132b64a433dca307275d5ee054dda63 --- M view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.descriptionview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.itemview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.labelview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.propertyview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.referenceview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinkgrouplistview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinkgroupview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinklistview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.statementgrouplistview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.statementview.tests.js 14 files changed, 27 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/32/223532/1 diff --git a/view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js b/view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js index 52bed6e..33199fd 100644 --- a/view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js +++ b/view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js @@ -12,8 +12,8 @@ */ var createAliasesview = function( options ) { options = $.extend( { - entityId: 'i am an EntityId', - aliasesChanger: 'i am an AliasesChanger', + entityId: 'I am an EntityId', + aliasesChanger: 'I am an AliasesChanger', value: new wb.datamodel.MultiTerm( 'en', ['a', 'b', 'c'] ) }, options || {} ); diff --git a/view/tests/qunit/jquery/wikibase/jquery.wikibase.descriptionview.tests.js b/view/tests/qunit/jquery/wikibase/jquery.wikibase.descriptionview.tests.js index 801df4a..4fa449a 100644 --- a/view/tests/qunit/jquery/wikibase/jquery.wikibase.descriptionview.tests.js +++ b/view/tests/qunit/jquery/wikibase/jquery.wikibase.descriptionview.tests.js @@ -27,7 +27,7 @@ $descriptionview.data( 'descriptionview' )._save = function() { return $.Deferred().resolve( { entity: { - lastrevid: 'i am a revision id' + lastrevid: 'I am a revision id' } } ).promise(); }; diff --git a/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.tests.js b/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.tests.js index 55546ba..a18ab37 100644 --- a/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.tests.js +++ b/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.tests.js @@ -11,11 +11,11 @@ */ var createEntitytermsforlanguagelistview = function( options ) { options = $.extend( { - entityId: 'i am an EntityId', + entityId: 'I am an EntityId', entityChangersFactory: { - getAliasesChanger: function() { return 'i am an AliasesChanger'; }, - getDescriptionsChanger: function() { return 'i am a DescriptionsChanger'; }, - getLabelsChanger: function() { return 'i am a LabelsChanger'; } + getAliasesChanger: function() { return 'I am an AliasesChanger'; }, + getDescriptionsChanger: function() { return 'I am a DescriptionsChanger'; }, + getLabelsChanger: function() { return 'I am a LabelsChanger'; } }, value: [ { diff --git a/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js b/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js index 4f7980e..860f792 100644 --- a/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js +++ b/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js @@ -12,9 +12,9 @@ */ var createEntitytermsforlanguageview = function( options, $node ) { options = $.extend( { - entityId: 'i am an EntityId', + entityId: 'I am an EntityId',
[MediaWiki-commits] [Gerrit] UpdateFlorian Schmidt email in test pipeline - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/223533 Change subject: UpdateFlorian Schmidt email in test pipeline .. UpdateFlorian Schmidt email in test pipeline 82791e17 only updated the check pipeline. Change-Id: I9f37463349fdf14c0259499f2398e39273dd980d --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/33/223533/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 33124d5..c2dea00 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -306,7 +306,7 @@ - ^devunt@gmail\.com$ - ^ebrahim@gnu\.org$ - ^federicoleva@tiscali\.it$ # Nemo bis - - ^florian\.schmidt\.welzow@t-online\.de$ + - ^florian\.schmidt\.stargatewissen@gmail\.com$ - ^geofbot@gmail\.com$ - ^glaisher\.wiki@gmail\.com$ - ^hartman\.wiki@gmail\.com$ -- To view, visit https://gerrit.wikimedia.org/r/223533 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f37463349fdf14c0259499f2398e39273dd980d Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [OpenBadges] Register extensio - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/223535 Change subject: [OpenBadges] Register extensio .. [OpenBadges] Register extensio Change-Id: I831ef6fc9dc820c6580fa26f4c7708fcf2e66434 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/35/223535/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index d33ac7b..11eed1f 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -1543,6 +1543,9 @@ # OOUI Playground # Missing message doc 2015-01-15 +Open Badges +aliasfile = OpenBadges/OpenBadges.alias.php + Open ID aliasfile = OpenID/OpenID.alias.php optional = prefs-openid, openid-urls-url, openid-urls-registration-date-time -- To view, visit https://gerrit.wikimedia.org/r/223535 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I831ef6fc9dc820c6580fa26f4c7708fcf2e66434 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] [OpenBadges] Register extensio - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [OpenBadges] Register extensio .. [OpenBadges] Register extensio Change-Id: I831ef6fc9dc820c6580fa26f4c7708fcf2e66434 --- 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 d33ac7b..11eed1f 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -1543,6 +1543,9 @@ # OOUI Playground # Missing message doc 2015-01-15 +Open Badges +aliasfile = OpenBadges/OpenBadges.alias.php + Open ID aliasfile = OpenID/OpenID.alias.php optional = prefs-openid, openid-urls-url, openid-urls-registration-date-time -- To view, visit https://gerrit.wikimedia.org/r/223535 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I831ef6fc9dc820c6580fa26f4c7708fcf2e66434 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] Change trusted e-mail address to cover Gerrit E-Mail change - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Change trusted e-mail address to cover Gerrit E-Mail change .. Change trusted e-mail address to cover Gerrit E-Mail change I changed my own E-Mail in gerrit - change it in the trusted user list, too. Change-Id: I2a1f4d3133e4dc3ea735dd3f4e92da9c7bc742d7 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index f48c14c..33124d5 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -76,7 +76,7 @@ | ebrahim@gnu\.org | ecokpo@gmail\.com | federicoleva@tiscali\.it -| florian\.schmidt\.welzow@t-online\.de +| florian\.schmidt\.stargatewissen@gmail\.com | git@samsmith\.io | geofbot@gmail\.com | glaisher\.wiki@gmail\.com -- To view, visit https://gerrit.wikimedia.org/r/223530 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a1f4d3133e4dc3ea735dd3f4e92da9c7bc742d7 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr 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] Add list of highlighted words and total term frequency to AP... - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Add list of highlighted words and total term frequency to API output .. Add list of highlighted words and total term frequency to API output Bug: T104443 Change-Id: I56593181890c79afbdb69f85e83c9a3a6c5c9a14 --- M includes/Api/ApiFlowSearch.php M includes/Search/SearchEngine.php M includes/Search/Searcher.php 3 files changed, 163 insertions(+), 16 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Api/ApiFlowSearch.php b/includes/Api/ApiFlowSearch.php index bdb2002..f3896b6 100644 --- a/includes/Api/ApiFlowSearch.php +++ b/includes/Api/ApiFlowSearch.php @@ -10,6 +10,7 @@ use Flow\Model\UUID; use Flow\Search\Connection; use Flow\Search\SearchEngine; +use Flow\Search\Searcher; use Flow\TalkpageManager; use MWNamespace; use Status; @@ -28,7 +29,10 @@ public function execute() { $params = $this-extractRequestParams(); - $this-searchEngine-setType( $params['type'] ); + if ( $params['type'] ) { + $this-searchEngine-setType( $params['type'] ); + } + $this-searchEngine-setLimitOffset( $params['limit'], $params['offset'] ); $this-searchEngine-setSort( $params['sort'] ); @@ -55,10 +59,31 @@ throw new InvalidDataException( $status-getMessage(), 'fail-search' ); } - /** @var \Elastica\ResultSet|null $result */ - $result = $status-getValue(); - // result can be null, if nothing was found - $results = $result === null ? array() : $result-getResults(); + /** @var \Elastica\ResultSet|null $resultSet */ + $resultSet = $status-getValue(); + // $resultSet can be null, if nothing was found + $results = $resultSet === null ? array() : $resultSet-getResults(); + + // list of highlighted words + $highlights = array(); + /** @var \Elastica\Result $result */ + foreach ( $results as $result ) { + // there'll always be exactly 1 excerpt + // see Searcher.php, ...-setHighlight() config + $excerpt = $result-getHighlights(); + $excerpt = $excerpt[Searcher::HIGHLIGHT_FIELD][0]; + + $pre = preg_quote( Searcher::HIGHLIGHT_PRE, '/' ); + $post = preg_quote( Searcher::HIGHLIGHT_POST, '/' ); + if ( preg_match_all( '/' . $pre . '(.*?)' . $post . '/', $excerpt, $matches ) ) { + $highlights += array_flip( $matches[1] ); + } + } + $highlights = array_keys( $highlights ); + + // total term frequency + $ttf = $resultSet-getAggregation( 'ttf' ); + $ttf = $ttf['value']; $topicIds = array(); foreach ( $results as $topic ) { @@ -68,7 +93,9 @@ // output similar to view-topiclist $results = $this-formatApi( $topicIds ); // search-specific output - $results['total'] = $result-getTotalHits(); + $results['total'] = $resultSet-getTotalHits(); + $results['highlights'] = $highlights; + $results['ttf'] = $ttf; $this-getResult()-addValue( null, $this-getModuleName(), $results ); } diff --git a/includes/Search/SearchEngine.php b/includes/Search/SearchEngine.php index cdc3953..f238bf9 100644 --- a/includes/Search/SearchEngine.php +++ b/includes/Search/SearchEngine.php @@ -42,7 +42,7 @@ /** * @param string $term text to search -* @return Status +* @return \Status */ public function searchText( $term ) { $term = trim( $term ); diff --git a/includes/Search/Searcher.php b/includes/Search/Searcher.php index cf1c249..2930bde 100644 --- a/includes/Search/Searcher.php +++ b/includes/Search/Searcher.php @@ -5,10 +5,16 @@ use Elastica\Query; use Elastica\Query\QueryString; use Elastica\Exception\ExceptionInterface; +use Elastica\Request; +use Elastica\ResultSet; use PoolCounterWorkViaCallback; use Status; class Searcher { + const HIGHLIGHT_FIELD = 'revisions.text'; + const HIGHLIGHT_PRE = 'span class=searchmatch'; + const HIGHLIGHT_POST = '/span'; + /** * @var string|false $type */ @@ -47,6 +53,26 @@ $queryString-setFields( array( 'revisions.text' ) ); $this-query-setQuery( $queryString ); + // add aggregation to determine exact amount of matching search terms + $terms = $this-getTerms( $term ); +
[MediaWiki-commits] [Gerrit] Enable packet filter for potassium - change (operations/puppet)
Muehlenhoff has submitted this change and it was merged. Change subject: Enable packet filter for potassium .. Enable packet filter for potassium Include base::firewall. role::poolcounter already provides the respective ferm rules (which are also already in use on subra and suhail for codfw. Change-Id: I5f76d1f491cbcb83b9f7cfeb64329baec8309a06 --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Muehlenhoff: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 39b3a15..d74153d 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2056,6 +2056,7 @@ node 'potassium.eqiad.wmnet' { include standard +include base::firewall include role::poolcounter } -- To view, visit https://gerrit.wikimedia.org/r/223282 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f76d1f491cbcb83b9f7cfeb64329baec8309a06 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: Muehlenhoff mmuhlenh...@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 ferm rules for swift proxies - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/223537 Change subject: Add ferm rules for swift proxies .. Add ferm rules for swift proxies Change-Id: I9b5d098878a3fd21621c706a55be62eae8cab6bb --- M manifests/swift.pp 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/37/223537/1 diff --git a/manifests/swift.pp b/manifests/swift.pp index 9afe6f9..8a8d26c 100644 --- a/manifests/swift.pp +++ b/manifests/swift.pp @@ -154,6 +154,21 @@ mode = '0444', } +ferm::service { 'swift-proxy': +proto = 'tcp', +port = '80', +} + +$swift_frontends = hiera('cluster: swift') +$swift_frontends_ferm = join($swift_frontends, ' ') + +# Access to memcached from swift frontends +ferm::service { 'swift-memcached': +proto = 'tcp', +port = '11211', +srange = @resolve(($swift_frontends_ferm), +} + rsyslog::conf { 'swift-proxy': source = 'puppet:///files/swift/swift-proxy.rsyslog.conf', priority = 30, -- To view, visit https://gerrit.wikimedia.org/r/223537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b5d098878a3fd21621c706a55be62eae8cab6bb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] UpdateFlorian Schmidt email in test pipeline - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: UpdateFlorian Schmidt email in test pipeline .. UpdateFlorian Schmidt email in test pipeline 82791e17 only updated the check pipeline. Change-Id: I9f37463349fdf14c0259499f2398e39273dd980d --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 33124d5..c2dea00 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -306,7 +306,7 @@ - ^devunt@gmail\.com$ - ^ebrahim@gnu\.org$ - ^federicoleva@tiscali\.it$ # Nemo bis - - ^florian\.schmidt\.welzow@t-online\.de$ + - ^florian\.schmidt\.stargatewissen@gmail\.com$ - ^geofbot@gmail\.com$ - ^glaisher\.wiki@gmail\.com$ - ^hartman\.wiki@gmail\.com$ -- To view, visit https://gerrit.wikimedia.org/r/223533 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f37463349fdf14c0259499f2398e39273dd980d Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Passwords/keys for Nodepool - change (labs/private)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/223536 Change subject: Passwords/keys for Nodepool .. Passwords/keys for Nodepool Nodepool needs a few credentials to interact with the OpenStack API, Jenkins and SSH into instances. Add dummy entries under passwords::nodepool. operations/puppet.git : https://gerrit.wikimedia.org/r/#/c/201728/ Bug: T89143 Change-Id: Icb2f9b9fe7dbef60f293870e223edfa849cf0951 --- M modules/passwords/manifests/init.pp 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/private refs/changes/36/223536/1 diff --git a/modules/passwords/manifests/init.pp b/modules/passwords/manifests/init.pp index ac845a0..1512d97 100644 --- a/modules/passwords/manifests/init.pp +++ b/modules/passwords/manifests/init.pp @@ -183,6 +183,17 @@ $jobbuilder_user_apikey = 'd1ae36235638ce19b2aef73a8cb510a7' } +class passwords::nodepool { +# Jenkins API token. Used by Nodepool to attach/detach slaves. +$jenkins_api_key = '' + +# Private SSH key. Used by Jenkins and Nodepool to ssh to instances +$jenkins_ssh_private_key = '' + +# Password of the user that has access to the OpenStack API +$manager_pass = '' +} + class passwords::mongodb::eventlogging { $user = 'eventloggingusername' $password = 'fakepassword' -- To view, visit https://gerrit.wikimedia.org/r/223536 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb2f9b9fe7dbef60f293870e223edfa849cf0951 Gerrit-PatchSet: 1 Gerrit-Project: labs/private Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] firewall: add ferm rule for kafka - change (operations/puppet)
Matanya has uploaded a new change for review. https://gerrit.wikimedia.org/r/223534 Change subject: firewall: add ferm rule for kafka .. firewall: add ferm rule for kafka bug: T83597 Change-Id: Ie64fad431c34f342e8043c7cda1d8a7ff3330e32 --- M manifests/role/analytics/kafka.pp 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/34/223534/1 diff --git a/manifests/role/analytics/kafka.pp b/manifests/role/analytics/kafka.pp index 08f0da7..82181bc 100644 --- a/manifests/role/analytics/kafka.pp +++ b/manifests/role/analytics/kafka.pp @@ -268,5 +268,12 @@ # monitor disk statistics include role::analytics::monitor_disks + +#firewall Kafka Broker +ferm::service { 'kafka-server': +proto = 'tcp', +port = '9092', +srange = '$ALL_NETWORKS', +} } } -- To view, visit https://gerrit.wikimedia.org/r/223534 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie64fad431c34f342e8043c7cda1d8a7ff3330e32 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya mata...@foss.co.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] beta: include deployment-mediawiki03 in scap targets - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: beta: include deployment-mediawiki03 in scap targets .. beta: include deployment-mediawiki03 in scap targets Bug: T72181 Change-Id: I7cf664a257c55dbbc15fbc772d2f57da4688c5b4 --- M modules/beta/files/dsh/group/mediawiki-installation 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Thcipriani: Looks good to me, but someone else must approve Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/beta/files/dsh/group/mediawiki-installation b/modules/beta/files/dsh/group/mediawiki-installation index 59ab6b3..13e5581 100644 --- a/modules/beta/files/dsh/group/mediawiki-installation +++ b/modules/beta/files/dsh/group/mediawiki-installation @@ -1,4 +1,5 @@ deployment-jobrunner01.eqiad.wmflabs deployment-mediawiki01.eqiad.wmflabs deployment-mediawiki02.eqiad.wmflabs +deployment-mediawiki03.eqiad.wmflabs deployment-videoscaler01.eqiad.wmflabs -- To view, visit https://gerrit.wikimedia.org/r/223391 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7cf664a257c55dbbc15fbc772d2f57da4688c5b4 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Thcipriani tcipri...@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] Add aggregation across projects - change (analytics/aggregator)
Joal has submitted this change and it was merged. Change subject: Add aggregation across projects .. Add aggregation across projects With this change, if the flag --all-projects is used, a new file 'all.csv' will be created for the raw_daily data as well as for each additional aggregator (daily, weekly_rescaled, etc.). This file will contain an aggregation across all projects. Bug: T95339 Change-Id: Ieee012e60d2286e450779cabf253d6a1f11578b4 --- M aggregator/projectcounts.py M aggregator/util.py M bin/aggregate_projectcounts A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-01 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-02 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-03 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-04 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-05 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-06 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-07 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-08 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-09 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-10 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-11 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-12 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-13 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-14 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-15 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-16 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-17 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-18 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-19 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-20 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-21 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-22 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141101-23 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-00 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-01 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-02 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-03 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-04 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-05 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-06 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-07 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-08 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-09 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-10 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-11 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-12 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-13 A tests/test_projectcounts/fixtures/2014-11-3projects-for-aggregation/2014/2014-11/projectcounts-20141102-14 A
[MediaWiki-commits] [Gerrit] Add LanguageTool - change (translatewiki)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/223521 Change subject: Add LanguageTool .. Add LanguageTool The name should be without a space because it's based on the name of an external software package, which is written without a space. Change-Id: If2e4065b2102ff5e3a53a43fb9df31f8990de8f5 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/21/223521/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 3b87744..e9ede96 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -1225,6 +1225,9 @@ Language Tag +LanguageTool +file = LanguageTool/i18n/%CODE%.json + Last Modified Last User Login -- To view, visit https://gerrit.wikimedia.org/r/223521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2e4065b2102ff5e3a53a43fb9df31f8990de8f5 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki 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] pybal: refactor pybal::pool, print pools in pybal::web - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/223523 Change subject: pybal: refactor pybal::pool, print pools in pybal::web .. pybal: refactor pybal::pool, print pools in pybal::web Since we're moving away from out traditional schema where the pybal pools are directly operated on via raw files, we still want to present what's pooled and what's not pooled via an http request. So we: - Factor out the confd file generation from pybal::pool - Create the resources for all pools on hosts with the pybal::web definition - Avoid monitoring all of those on palladium, as that's not really critical. Change-Id: I30dd4ae6a0bce64c02c809e214fd868a897a97e7 --- M hieradata/common.yaml M hieradata/hosts/palladium.yaml M hieradata/labs.yaml M modules/confd/manifests/file.pp M modules/confd/manifests/init.pp A modules/pybal/manifests/conf_file.pp M modules/pybal/manifests/pool.pp M modules/pybal/manifests/web.pp A modules/pybal/manifests/web/service.pp 9 files changed, 103 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/223523/1 diff --git a/hieradata/common.yaml b/hieradata/common.yaml index c0087df..78dad9a 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -1,3 +1,11 @@ +# General variables that once would have been in realm.pp +datacenters: + - eqiad + - codfw + - esams + - ulsfo + + # NOTE: Do *not* add new clusters *per site* anymore, # the site name will automatically be appended now, # and a different IP prefix will be used. diff --git a/hieradata/hosts/palladium.yaml b/hieradata/hosts/palladium.yaml index d65e54f..ab24429 100644 --- a/hieradata/hosts/palladium.yaml +++ b/hieradata/hosts/palladium.yaml @@ -6,3 +6,4 @@ - ulsfo.wmnet - esams.wikimedia.org ganglia_class: new +confd::monitor_files: false diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml index 9736342..46d34a1 100644 --- a/hieradata/labs.yaml +++ b/hieradata/labs.yaml @@ -1,14 +1,20 @@ +# General variables that once would have been in realm.pp +datacenters: [eqiad] +ganglia_class: old +has_ganglia: false +has_nrpe: false + +# Additional base overrides standard::has_admin: false base::remote_syslog::enable: false + +# Other overrides elasticsearch::minimum_master_nodes: 1 elasticsearch::recover_after_time: 1m elasticsearch::multicast_group: 224.2.2.4 elasticsearch::heap_memory: '2G' elasticsearch::expected_nodes: 1 elasticsearch::recover_after_nodes: 1 -ganglia_class: old -has_ganglia: false -has_nrpe: false archiva::proxy::ssl_enabled: false archiva::proxy::certificate_name: ssl-cert-snakeoil statsite::instance::graphite_host: 'labmon1001.eqiad.wmnet' diff --git a/modules/confd/manifests/file.pp b/modules/confd/manifests/file.pp index cff5fc2..1d4576f 100644 --- a/modules/confd/manifests/file.pp +++ b/modules/confd/manifests/file.pp @@ -32,9 +32,12 @@ notify = Service['confd'], } -nrpe::monitor_service{ confd${safe_name}: -description = Confd template for ${name}, -nrpe_command = /usr/local/lib/nagios/plugins/check_confd_template '${name}', -require = File['/usr/local/lib/nagios/plugins/check_confd_template'], +# In particular situations, we might not want monitoring +if $::confd::monitor_files { +nrpe::monitor_service{ confd${safe_name}: +description = Confd template for ${name}, +nrpe_command = /usr/local/lib/nagios/plugins/check_confd_template '${name}', +require = File['/usr/local/lib/nagios/plugins/check_confd_template'], +} } } diff --git a/modules/confd/manifests/init.pp b/modules/confd/manifests/init.pp index 60e3ac9..cb9ab77 100644 --- a/modules/confd/manifests/init.pp +++ b/modules/confd/manifests/init.pp @@ -10,6 +10,7 @@ $srv_dns=$::domain, $scheme='https', $interval=undef, +$monitor_files=true, ) { package { 'confd': diff --git a/modules/pybal/manifests/conf_file.pp b/modules/pybal/manifests/conf_file.pp new file mode 100644 index 000..ba30e73 --- /dev/null +++ b/modules/pybal/manifests/conf_file.pp @@ -0,0 +1,34 @@ +# Writes the actual config file for pybal. Uses the datacenter as title +# +# === Parameters +# +# [*pool_name*] +# The pool name in pybal's terms +# +# [*cluster*] +# The cluster we're writing the file for. +# +# [*service*] +# The service we're writing the file for. +# +define pybal::conf_file ( +$pool_name, +$cluster, +$service, +$basedir = undef, +){ +$dc = $name +$watch_keys = [/conftool/v1/pools/${dc}/${cluster}/${service}/] + +$filepath = $basedir ? { +undef = /etc/pybal/pools/${pool_name}, +default = ${basedir}/${dc}/${pool_name} +} + +confd::file { $filepath: +watch_keys = $watch_keys, +content= template('pybal/host-pool.tmpl.erb'), +check =
[MediaWiki-commits] [Gerrit] Retry composer install on travis - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Retry composer install on travis .. Retry composer install on travis This sometimes fails for no apparent reason, eg. https://travis-ci.org/wikimedia/mediawiki-extensions-Wikibase/jobs/69970751 Also removed no longer needed workaround. Change-Id: Ie6152a1523f25b271a3e4b1e02682c03dd9a552a --- M build/travis/install.sh 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/build/travis/install.sh b/build/travis/install.sh index 495d345..6dbad81 100755 --- a/build/travis/install.sh +++ b/build/travis/install.sh @@ -21,7 +21,11 @@ cd phase3 composer self-update composer install -composer dump-autoload -o # Workaround https://github.com/wikimedia/composer-merge-plugin/issues/41 + +# Try composer install again... this tends to fail from time to time +if [ $? -gt 0 ]; then + composer install +fi mysql -e 'create database its_a_mw;' php maintenance/install.php --dbtype $DBTYPE --dbuser root --dbname its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin @@ -38,3 +42,8 @@ cd Wikibase composer install --prefer-source + +# Try composer install again... this tends to fail from time to time +if [ $? -gt 0 ]; then + composer install --prefer-source +fi -- To view, visit https://gerrit.wikimedia.org/r/223459 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6152a1523f25b271a3e4b1e02682c03dd9a552a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: Addshore addshorew...@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] HTMLTextAreaField: Honor 'rows' setting in OOUI format - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: HTMLTextAreaField: Honor 'rows' setting in OOUI format .. HTMLTextAreaField: Honor 'rows' setting in OOUI format And throw an exception if 'cols' is set, since it won't work. Requires eed0f5294b0080 in OOUI. Bug: T104682 Change-Id: I8e09402a01cecac8a90497d31b3b1ca15ff2d949 --- M includes/htmlform/HTMLTextAreaField.php 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/htmlform/HTMLTextAreaField.php b/includes/htmlform/HTMLTextAreaField.php index e4f78b2..aeb4b7c 100644 --- a/includes/htmlform/HTMLTextAreaField.php +++ b/includes/htmlform/HTMLTextAreaField.php @@ -47,6 +47,10 @@ } function getInputOOUI( $value ) { + if ( isset( $this-mParams['cols'] ) ) { + throw new Exception( OOUIHTMLForm does not support the 'cols' parameter for textareas ); + } + $attribs = $this-getTooltipAndAccessKey(); if ( $this-mClass !== '' ) { @@ -72,6 +76,7 @@ 'name' = $this-mName, 'multiline' = true, 'value' = $value, + 'rows' = $this-getRows(), ) + $attribs ); } } -- To view, visit https://gerrit.wikimedia.org/r/223479 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e09402a01cecac8a90497d31b3b1ca15ff2d949 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@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 LanguageTool - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Add LanguageTool .. Add LanguageTool The name should be without a space because it's based on the name of an external software package, which is written without a space. Change-Id: If2e4065b2102ff5e3a53a43fb9df31f8990de8f5 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Raimond Spekking: Looks good to me, approved jenkins-bot: Verified diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 3b87744..d33ac7b 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -1225,6 +1225,8 @@ Language Tag +LanguageTool + Last Modified Last User Login -- To view, visit https://gerrit.wikimedia.org/r/223521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2e4065b2102ff5e3a53a43fb9df31f8990de8f5 Gerrit-PatchSet: 2 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il 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] Userlogin is canonical name, not UserLogin - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Userlogin is canonical name, not UserLogin .. Userlogin is canonical name, not UserLogin Fixes: PHP Notice: Found alias defined for Userlogin when searching for special page aliases for UserLogin. Change-Id: Ib64d4c76d3915ae752a9c56eb9635653e0da5623 --- M includes/special/SpecialNotifications.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/special/SpecialNotifications.php b/includes/special/SpecialNotifications.php index d34d0b7..a267f0c 100644 --- a/includes/special/SpecialNotifications.php +++ b/includes/special/SpecialNotifications.php @@ -25,8 +25,8 @@ // the html message for anon users $anonMsgHtml = $this-msg( 'echo-anon', - SpecialPage::getTitleFor( 'UserLogin', 'signup' )-getFullURL( $returnTo ), - SpecialPage::getTitleFor( 'UserLogin' )-getFullURL( $returnTo ) + SpecialPage::getTitleFor( 'Userlogin', 'signup' )-getFullURL( $returnTo ), + SpecialPage::getTitleFor( 'Userlogin' )-getFullURL( $returnTo ) )-parse(); $out-addHTML( Html::rawElement( 'span', array( 'class' = 'plainlinks' ), $anonMsgHtml ) ); return; -- To view, visit https://gerrit.wikimedia.org/r/223524 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib64d4c76d3915ae752a9c56eb9635653e0da5623 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] New Wikidata Build - 2015-07-08T10:00:01+0000 - change (mediawiki...Wikidata)
WikidataBuilder has uploaded a new change for review. https://gerrit.wikimedia.org/r/223526 Change subject: New Wikidata Build - 2015-07-08T10:00:01+ .. New Wikidata Build - 2015-07-08T10:00:01+ Change-Id: I45a5a02ed6ef3e0bc63e80b57f3c9638ad50d6c0 --- M composer.lock M extensions/Wikibase/client/i18n/ja.json A extensions/Wikibase/client/i18n/kw.json M extensions/Wikibase/client/includes/DataAccess/Scribunto/EntityAccessor.php M extensions/Wikibase/client/includes/api/ApiClientInfo.php M extensions/Wikibase/client/includes/api/PageTerms.php M extensions/Wikibase/lib/includes/serializers/DispatchingEntitySerializer.php R extensions/Wikibase/lib/includes/serializers/LibSerializerFactory.php M extensions/Wikibase/lib/includes/store/EntityRevision.php A extensions/Wikibase/lib/includes/store/RedirectRevision.php A extensions/Wikibase/lib/includes/store/RevisionInfo.php M extensions/Wikibase/lib/includes/store/UnresolvedRedirectException.php M extensions/Wikibase/lib/includes/store/sql/WikiPageEntityRevisionLookup.php M extensions/Wikibase/lib/tests/phpunit/EntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/MockRepository.php M extensions/Wikibase/lib/tests/phpunit/MockRepositoryTest.php M extensions/Wikibase/lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php M extensions/Wikibase/lib/tests/phpunit/serializers/DispatchingEntitySerializerTest.php R extensions/Wikibase/lib/tests/phpunit/serializers/LibSerializerFactoryTest.php M extensions/Wikibase/repo/Wikibase.php M extensions/Wikibase/repo/i18n/ar.json M extensions/Wikibase/repo/i18n/de.json M extensions/Wikibase/repo/i18n/en.json M extensions/Wikibase/repo/i18n/gl.json M extensions/Wikibase/repo/i18n/he.json M extensions/Wikibase/repo/i18n/hy.json M extensions/Wikibase/repo/i18n/ja.json M extensions/Wikibase/repo/i18n/ksh.json A extensions/Wikibase/repo/i18n/kw.json M extensions/Wikibase/repo/i18n/lb.json M extensions/Wikibase/repo/i18n/pt.json M extensions/Wikibase/repo/i18n/qqq.json M extensions/Wikibase/repo/i18n/xmf.json M extensions/Wikibase/repo/includes/Dumpers/RdfDumpGenerator.php A extensions/Wikibase/repo/includes/EditEntityFactory.php M extensions/Wikibase/repo/includes/Interactors/ItemMergeInteractor.php M extensions/Wikibase/repo/includes/LinkedData/EntityDataRequestHandler.php M extensions/Wikibase/repo/includes/LinkedData/EntityDataSerializationService.php M extensions/Wikibase/repo/includes/ParserOutputJsConfigBuilder.php M extensions/Wikibase/repo/includes/UpdateRepo/UpdateRepoJob.php M extensions/Wikibase/repo/includes/UpdateRepo/UpdateRepoOnDeleteJob.php M extensions/Wikibase/repo/includes/UpdateRepo/UpdateRepoOnMoveJob.php M extensions/Wikibase/repo/includes/WikibaseRepo.php M extensions/Wikibase/repo/includes/api/ApiErrorReporter.php M extensions/Wikibase/repo/includes/api/ApiHelperFactory.php M extensions/Wikibase/repo/includes/api/AvailableBadges.php M extensions/Wikibase/repo/includes/api/CreateClaim.php M extensions/Wikibase/repo/includes/api/CreateRedirect.php M extensions/Wikibase/repo/includes/api/EditEntity.php R extensions/Wikibase/repo/includes/api/EntityLoadingHelper.php R extensions/Wikibase/repo/includes/api/EntitySavingHelper.php M extensions/Wikibase/repo/includes/api/FormatSnakValue.php M extensions/Wikibase/repo/includes/api/GetClaims.php M extensions/Wikibase/repo/includes/api/GetEntities.php M extensions/Wikibase/repo/includes/api/ItemByTitleHelper.php M extensions/Wikibase/repo/includes/api/LinkTitles.php M extensions/Wikibase/repo/includes/api/MergeItems.php M extensions/Wikibase/repo/includes/api/ModifyClaim.php M extensions/Wikibase/repo/includes/api/ModifyEntity.php M extensions/Wikibase/repo/includes/api/ModifyTerm.php M extensions/Wikibase/repo/includes/api/ParseValue.php M extensions/Wikibase/repo/includes/api/RemoveClaims.php M extensions/Wikibase/repo/includes/api/RemoveQualifiers.php M extensions/Wikibase/repo/includes/api/RemoveReferences.php M extensions/Wikibase/repo/includes/api/ResultBuilder.php M extensions/Wikibase/repo/includes/api/SearchEntities.php M extensions/Wikibase/repo/includes/api/SetAliases.php M extensions/Wikibase/repo/includes/api/SetClaim.php M extensions/Wikibase/repo/includes/api/SetClaimValue.php M extensions/Wikibase/repo/includes/api/SetDescription.php M extensions/Wikibase/repo/includes/api/SetLabel.php M extensions/Wikibase/repo/includes/api/SetQualifier.php M extensions/Wikibase/repo/includes/api/SetReference.php M extensions/Wikibase/repo/includes/api/SetSiteLink.php M extensions/Wikibase/repo/includes/api/StatementModificationHelper.php M extensions/Wikibase/repo/includes/rdf/RdfBuilder.php M extensions/Wikibase/repo/includes/specials/SpecialEntityData.php M extensions/Wikibase/repo/includes/specials/SpecialMergeItems.php M extensions/Wikibase/repo/includes/specials/SpecialSetLabelDescriptionAliases.php M
[MediaWiki-commits] [Gerrit] Publish php docs for MobileFrontend - change (integration/config)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/223527 Change subject: Publish php docs for MobileFrontend .. Publish php docs for MobileFrontend After the dependency change in MobileFrontend is merged, php docs in MobileFrontend can generated by running doxygen, instead of using a composer library. This allows to publish the php docs. Depends on: Ia6b7e2c48c5459478a7ddb5de3b23e90a4ced9df Bug: T105134 Change-Id: I905b6b6789099d74d64a6b714ff8cb7cfc3580f1 --- M jjb/misc.yaml M zuul/layout.yaml 2 files changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/27/223527/1 diff --git a/jjb/misc.yaml b/jjb/misc.yaml index ee10248..9aba10b 100644 --- a/jjb/misc.yaml +++ b/jjb/misc.yaml @@ -145,6 +145,22 @@ - global-teardown - job: +name: 'mwext-MobileFrontend-doxygen-publish' +node: contintLabsSlave UbuntuTrusty +defaults: use-remote-zuul-shallow-clone +concurrent: false +triggers: + - zuul +builders: + - global-setup + - doxygen + - doc-publish: +docsrc: 'docs/php' +docdest: 'MobileFrontend/$DOC_SUBPATH/php' +publishers: + - global-teardown + +- job: name: 'oojs-ui-demos-publish' node: contintLabsSlave UbuntuTrusty defaults: use-remote-zuul-shallow-clone diff --git a/zuul/layout.yaml b/zuul/layout.yaml index f48c14c..46f7393 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -4095,6 +4095,7 @@ - mwext-MobileFrontend-testextension-zend postmerge: - mwext-MobileFrontend-publish + - mwext-MobileFrontend-doxygen-publish experimental: - mwext-MobileFrontend-testextension-hhvm - mwext-mw-selenium -- To view, visit https://gerrit.wikimedia.org/r/223527 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I905b6b6789099d74d64a6b714ff8cb7cfc3580f1 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create PHP docs with Doxygen instead of phpdocumentor - change (mediawiki...MobileFrontend)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/223528 Change subject: Create PHP docs with Doxygen instead of phpdocumentor .. Create PHP docs with Doxygen instead of phpdocumentor This allows us to easier publish our docs and they follow a de facto default for MediaWiki (mediawiki/core, oojs-ui, and all other libraries using doxgen to generate php docs). Bug: T105134 Change-Id: Ia6b7e2c48c5459478a7ddb5de3b23e90a4ced9df --- A Doxyfile M composer.json 2 files changed, 37 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/28/223528/1 diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 000..2a5fbdb --- /dev/null +++ b/Doxyfile @@ -0,0 +1,36 @@ +# Configuration file for Doxygen + +PROJECT_NAME = MobileFrontend +PROJECT_BRIEF = Mobile optimised frontend for MediaWiki + +OUTPUT_DIRECTORY = docs +HTML_OUTPUT= php + +JAVADOC_AUTOBRIEF = YES +QT_AUTOBRIEF = YES + +WARN_NO_PARAMDOC = YES + +INPUT = ./ +EXCLUDE_PATTERNS = */vendor/* +EXCLUDE_PATTERNS += */docs/* +EXCLUDE_PATTERNS += */node_modules/* +FILE_PATTERNS = *.php +RECURSIVE = YES +# Requires doxygen 1.8.3+ +USE_MDFILE_AS_MAINPAGE = README.mediawiki + +HTML_DYNAMIC_SECTIONS = YES +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 250 + +GENERATE_LATEX = NO + +HAVE_DOT = YES +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +TEMPLATE_RELATIONS = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +# Makes dot run faster. Requires graphviz 1.8.10 +DOT_MULTI_TARGETS = YES diff --git a/composer.json b/composer.json index 49a03cf..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,12 @@ { require-dev: { jakub-onderka/php-parallel-lint: 0.9, - mediawiki/mediawiki-codesniffer: 0.3.0, - phpdocumentor/phpdocumentor: ^2.8 + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ parallel-lint . --exclude vendor, phpcs --standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki --extensions=php,php5,inc --ignore=vendor -p . - ], - doc: [ - phpdoc ] } } -- To view, visit https://gerrit.wikimedia.org/r/223528 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6b7e2c48c5459478a7ddb5de3b23e90a4ced9df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change == to === according to PHP coding conventions - change (mediawiki...Cite)
jenkins-bot has submitted this change and it was merged. Change subject: Change == to === according to PHP coding conventions .. Change == to === according to PHP coding conventions Change-Id: I2a93194e3c216d30f2f2fd7717f4ba501c23 --- M Cite_body.php 1 file changed, 8 insertions(+), 8 deletions(-) Approvals: Brion VIBBER: Looks good to me, approved jenkins-bot: Verified diff --git a/Cite_body.php b/Cite_body.php index e800d94..9763555 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -364,7 +364,7 @@ --$cnt; } - if ( $cnt == 0 ) { + if ( $cnt === 0 ) { return array ( $key, $group, $follow ); } else { // Invalid key @@ -520,7 +520,7 @@ case 'new': # Rollback the addition of new elements to the stack. unset( $this-mRefs[$group][$key] ); - if ( count( $this-mRefs[$group] ) == 0 ) { + if ( count( $this-mRefs[$group] ) === 0 ) { unset( $this-mRefs[$group] ); unset( $this-mGroupCnt[$group] ); } @@ -647,7 +647,7 @@ * @return string XHTML ready for output */ function referencesFormat( $group ) { - if ( ( count( $this-mRefs ) == 0 ) || ( empty( $this-mRefs[$group] ) ) ) { + if ( ( count( $this-mRefs ) === 0 ) || ( empty( $this-mRefs[$group] ) ) ) { return ''; } @@ -935,7 +935,7 @@ $this-refKey( $key, $count ), $this-referencesKey( $key . $subkey ), $this-getLinkLabel( $label, $group, - ( ( $group == self::DEFAULT_GROUP ) ? '' : $group ) . $wgContLang-formatNum( $label ) ) + ( ( $group === self::DEFAULT_GROUP ) ? '' : $group ) . $wgContLang-formatNum( $label ) ) )-inContentLanguage()-plain() ); } @@ -958,7 +958,7 @@ $sep = wfMessage( 'cite_references_link_many_sep' )-inContentLanguage()-plain(); $and = wfMessage( 'cite_references_link_many_and' )-inContentLanguage()-plain(); - if ( $cnt == 1 ) { + if ( $cnt === 1 ) { // Enforce always returning a string return (string)$arr[0]; } else { @@ -1074,10 +1074,10 @@ } foreach ( $this-mRefs as $group = $refs ) { - if ( count( $refs ) == 0 ) { + if ( count( $refs ) === 0 ) { continue; } - if ( $group == self::DEFAULT_GROUP ) { + if ( $group === self::DEFAULT_GROUP ) { $text .= $this-referencesFormat( $group, '', '' ); } else { $text .= \nbr / . @@ -1146,7 +1146,7 @@ $ret = 'strong class=error mw-ext-cite-error' . $msg . '/strong'; - if ( $parse == 'parse' ) { + if ( $parse === 'parse' ) { $ret = $this-mParser-recursiveTagParse( $ret ); } -- To view, visit https://gerrit.wikimedia.org/r/223284 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a93194e3c216d30f2f2fd7717f4ba501c23 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Jackmcbarn jackmcb...@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] mediawiki.api: Refactor to use server.respondImmediately - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: mediawiki.api: Refactor to use server.respondImmediately .. mediawiki.api: Refactor to use server.respondImmediately * Simplifies code a lot and removes the need to explicitly flush and handle the request queue with respond(). This was especially annoying when a request spawned others as they wouldn't be in the queue yet. * Make tests more explicit and resilient by specifying what they respond to instead of assigning to requests[i] directly. This also makes the failure better if one request isn't made, instead of throwing for accessing properties on undefined objects. * Avoid relying on test order for badToken(). Follows-up 7b05096bcae0. Tests should be atomic and not rely on order. This is already important as QUnit re-orders failed tests. And in the future they may run concurrently. Resolve using a unique name (like the other tests). Also, the previous test wasn't asserting that badToken() works, it was merely asserting that getToken() works and that it wasn't yet cached. The new test will fetch and purge its own token. Change-Id: I26d22ace6c5df19d7144779be1a625aede79749f --- M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js 1 file changed, 165 insertions(+), 161 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js index 4f199bd..de79198 100644 --- a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js +++ b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js @@ -2,13 +2,38 @@ QUnit.module( 'mediawiki.api', QUnit.newMwEnvironment( { setup: function () { this.server = this.sandbox.useFakeServer(); + this.server.respondImmediately = true; + this.clock = this.sandbox.useFakeTimers(); + }, + teardown: function () { + // https://github.com/jquery/jquery/issues/2453 + this.clock.tick(); } } ) ); + function sequence( responses ) { + var i = 0; + return function ( request ) { + var response = responses[i]; + if ( response ) { + i++; + request.respond.apply( request, response ); + } + }; + } + + function sequenceBodies( status, headers, bodies ) { + jQuery.each( bodies, function ( i, body ) { + bodies[i] = [ status, headers, body ]; + } ); + return sequence( bodies ); + } + QUnit.test( 'Basic functionality', function ( assert ) { QUnit.expect( 2 ); - var api = new mw.Api(); + + this.server.respond( [ 200, { 'Content-Type': 'application/json' }, '[]' ] ); api.get( {} ) .done( function ( data ) { @@ -19,35 +44,25 @@ .done( function ( data ) { assert.deepEqual( data, [], 'Simple POST request' ); } ); - - this.server.respond( function ( request ) { - request.respond( 200, { 'Content-Type': 'application/json' }, '[]' ); - } ); } ); QUnit.test( 'API error', function ( assert ) { QUnit.expect( 1 ); - var api = new mw.Api(); + + this.server.respond( [ 200, { 'Content-Type': 'application/json' }, + '{ error: { code: unknown_action } }' + ] ); api.get( { action: 'doesntexist' } ) .fail( function ( errorCode ) { assert.equal( errorCode, 'unknown_action', 'API error should reject the deferred' ); } ); - - this.server.respond( function ( request ) { - request.respond( 200, { 'Content-Type': 'application/json' }, - '{ error: { code: unknown_action } }' - ); - } ); } ); QUnit.test( 'FormData support', function ( assert ) { QUnit.expect( 2 ); - var api = new mw.Api(); - - api.post( { action: 'test' }, { contentType: 'multipart/form-data' } ); this.server.respond( function ( request ) { if ( window.FormData ) { @@ -59,28 +74,28 @@ } request.respond( 200, { 'Content-Type': 'application/json' }, '[]' );
[MediaWiki-commits] [Gerrit] Minor cleanups and narrower interfaces in MergeItems code - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/223519 Change subject: Minor cleanups and narrower interfaces in MergeItems code .. Minor cleanups and narrower interfaces in MergeItems code The reason to touch this was the ApiBase::PARAM_... constants I missed in Ibeb6d10. I also did a little bit of refactoring and made some interfaces of private methods smaller: it never can be an Entity, it always is an Item. Change-Id: I84952a544c430c9894dd36fa2d7932c5f2d14075 --- M repo/includes/Interactors/ItemMergeInteractor.php M repo/includes/api/MergeItems.php M repo/includes/specials/SpecialMergeItems.php 3 files changed, 27 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/19/223519/1 diff --git a/repo/includes/Interactors/ItemMergeInteractor.php b/repo/includes/Interactors/ItemMergeInteractor.php index 22bff09..211b3b2 100644 --- a/repo/includes/Interactors/ItemMergeInteractor.php +++ b/repo/includes/Interactors/ItemMergeInteractor.php @@ -17,7 +17,6 @@ use Wikibase\Repo\Store\EntityPermissionChecker; use Wikibase\Summary; use Wikibase\SummaryFormatter; -use Wikibase\Repo\Interactors\RedirectCreationInteractor; /** * @since 0.5 @@ -112,7 +111,7 @@ * Check the given permissions for the given $entityId. * * @param EntityId $entityId -* @param $permission +* @param string $permission * * @throws ItemMergeException if the permission check fails */ @@ -131,7 +130,7 @@ * * @param ItemId $fromId * @param ItemId $toId -* @param array $ignoreConflicts The kinds of conflicts to ignore +* @param string[] $ignoreConflicts The kinds of conflicts to ignore * @param string|null $summary * @param bool $bot Mark the edit as bot edit * @@ -179,27 +178,29 @@ } /** -* @param EntityId $entityId -* @return bool isEmpty +* @param ItemId $itemId +* +* @return bool */ - private function isEmpty( EntityId $entityId ) { - return $this-loadEntity( $entityId )-isEmpty(); + private function isEmpty( ItemId $itemId ) { + return $this-loadEntity( $itemId )-isEmpty(); } /** * Either throws an exception or returns a EntityDocument object. * -* @param EntityId $entityId +* @param ItemId $itemId +* * @return EntityDocument * @throws ItemMergeException */ - private function loadEntity( EntityId $entityId ) { + private function loadEntity( ItemId $itemId ) { try { - $revision = $this-entityRevisionLookup-getEntityRevision( $entityId, EntityRevisionLookup::LATEST_FROM_MASTER ); + $revision = $this-entityRevisionLookup-getEntityRevision( $itemId, EntityRevisionLookup::LATEST_FROM_MASTER ); if ( !$revision ) { throw new ItemMergeException( - Entity $entityId not found, + Entity $itemId not found, 'no-such-entity' ); } @@ -213,6 +214,7 @@ /** * @param EntityDocument $fromEntity * @param EntityDocument $toEntity +* * @throws ItemMergeException */ private function validateEntities( EntityDocument $fromEntity, EntityDocument $toEntity ) { @@ -229,6 +231,7 @@ * @param string $direction either 'from' or 'to' * @param ItemId $getId * @param string|null $customSummary +* * @return Summary */ private function getSummary( $direction, $getId, $customSummary = null ) { diff --git a/repo/includes/api/MergeItems.php b/repo/includes/api/MergeItems.php index c366504..0708a29 100644 --- a/repo/includes/api/MergeItems.php +++ b/repo/includes/api/MergeItems.php @@ -4,6 +4,7 @@ use ApiBase; use ApiMain; +use Exception; use InvalidArgumentException; use LogicException; use UsageException; @@ -142,12 +143,13 @@ /** * @param ItemId $fromId * @param ItemId $toId -* @param array $ignoreConflicts +* @param string[] $ignoreConflicts * @param string $summary * @param bool $bot */ private function mergeItems( ItemId $fromId, ItemId $toId, array $ignoreConflicts, $summary, $bot ) { - list( $newRevisionFrom, $newRevisionTo, $redirected ) = $this-interactor-mergeItems( $fromId, $toId, $ignoreConflicts, $summary, $bot ); + list( $newRevisionFrom, $newRevisionTo, $redirected ) + =
[MediaWiki-commits] [Gerrit] uwsgi: Update Service['uwsgi'] to more accurate Service defs - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: uwsgi: Update Service['uwsgi'] to more accurate Service defs .. uwsgi: Update Service['uwsgi'] to more accurate Service defs Change-Id: Ic4bb4b3d93ffa01b5dfba5b3c99b8b95a15814af --- M modules/graphite/manifests/web.pp M modules/uwsgi/manifests/app.pp M modules/uwsgi/manifests/init.pp 3 files changed, 8 insertions(+), 9 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/graphite/manifests/web.pp b/modules/graphite/manifests/web.pp index 085e56d..6f2 100644 --- a/modules/graphite/manifests/web.pp +++ b/modules/graphite/manifests/web.pp @@ -50,13 +50,13 @@ file { '/etc/graphite/cors.py': source = 'puppet:///modules/graphite/cors.py', require = Package['graphite-web'], -notify = Service['uwsgi'], +notify = Service['uwsgi-graphite-web'], } file { '/etc/graphite/local_settings.py': content = template('graphite/local_settings.py.erb'), require = Package['graphite-web'], -notify = Service['uwsgi'], +notify = Service['uwsgi-graphite-web'], } diff --git a/modules/uwsgi/manifests/app.pp b/modules/uwsgi/manifests/app.pp index 77fb3a3..171c393 100644 --- a/modules/uwsgi/manifests/app.pp +++ b/modules/uwsgi/manifests/app.pp @@ -41,7 +41,7 @@ file { $inipath: ensure = link, target = /etc/uwsgi/apps-available/${basename}.ini, -notify = Service['uwsgi'], +notify = Service[uwsgi-${title}], } base::service_unit { uwsgi-${title}: @@ -50,12 +50,12 @@ systemd = true, upstart = true, } -} -nrpe::monitor_service { uwsgi-${title}: -description = ${title} uWSGI web app, -nrpe_command = /usr/sbin/service uwsgi-${title} status, -require = Service['uwsgi'], +nrpe::monitor_service { uwsgi-${title}: +description = ${title} uWSGI web app, +nrpe_command = /usr/sbin/service uwsgi-${title} status, +require = Service[uwsgi-${title}], +} } } } diff --git a/modules/uwsgi/manifests/init.pp b/modules/uwsgi/manifests/init.pp index e060eff..05a9d6c 100644 --- a/modules/uwsgi/manifests/init.pp +++ b/modules/uwsgi/manifests/init.pp @@ -29,6 +29,5 @@ purge = true, force = true, require = Package['uwsgi', $plugins], -notify = Service['uwsgi'], } } -- To view, visit https://gerrit.wikimedia.org/r/223529 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4bb4b3d93ffa01b5dfba5b3c99b8b95a15814af Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com 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] Log errors in Http::request() - change (mediawiki/core)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/223518 Change subject: Log errors in Http::request() .. Log errors in Http::request() Instead of silently discarding errors in server-side HTTP requests, log them to a 'http' channel. Make ForeignAPIFile::httpGet() (which sort of reimplements Http::get()) log to the same channel, for consistency. Bug: T103043 Change-Id: Ibf552e22adc7fde4a751f92e92dad6ceba2f335c --- M includes/HttpFunctions.php M includes/filerepo/ForeignAPIRepo.php 2 files changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/18/223518/1 diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 825cd06..189eef3 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -25,6 +25,8 @@ * @defgroup HTTP HTTP */ +use MediaWiki\Logger\LoggerFactory; + /** * Various HTTP related functions * @ingroup HTTP @@ -73,11 +75,14 @@ $req = MWHttpRequest::factory( $url, $options, $caller ); $status = $req-execute(); - $content = false; if ( $status-isOK() ) { - $content = $req-getContent(); + return $content = $req-getContent(); + } else { + $errors = $status-getErrorsByType( 'error' ); + $logger = LoggerFactory::getInstance( 'http' ); + $logger-warning( $status-getWikiText() ); + return false; } - return $content; } /** diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index ec84762..727aa38 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -21,6 +21,8 @@ * @ingroup FileRepo */ +use MediaWiki\Logger\LoggerFactory; + /** * A foreign repository with a remote MediaWiki with an API thingy * @@ -522,6 +524,8 @@ return $req-getContent(); } else { wfDebug( ForeignAPIRepo: ERROR on GET: . $status-getWikiText() ); + $logger = LoggerFactory::getInstance( 'http' ); + $logger-warning( $status-getWikiText() ); return false; } } -- To view, visit https://gerrit.wikimedia.org/r/223518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf552e22adc7fde4a751f92e92dad6ceba2f335c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] uwsgi: Clean up uwsgi module - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: uwsgi: Clean up uwsgi module .. uwsgi: Clean up uwsgi module - Works on Jessie! - Creates a new upstart/systemd unit per uwsgi app, instead of 'uwsgi' instances. This, IMO, is much easier to maintain and understand. - Move NRPE monitor check into the app, so we get per app checks Change-Id: I23716dec739f6c3ba2fa61ea60579de8bfd4e42c --- M modules/graphite/files/graphite-web-logrotate D modules/uwsgi/files/init/app.conf D modules/uwsgi/files/init/init.conf D modules/uwsgi/files/uwsgictl M modules/uwsgi/manifests/app.pp M modules/uwsgi/manifests/init.pp A modules/uwsgi/templates/initscripts/uwsgi.systemd.erb A modules/uwsgi/templates/initscripts/uwsgi.upstart.erb 8 files changed, 38 insertions(+), 120 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/graphite/files/graphite-web-logrotate b/modules/graphite/files/graphite-web-logrotate index ad09f99..206988e 100644 --- a/modules/graphite/files/graphite-web-logrotate +++ b/modules/graphite/files/graphite-web-logrotate @@ -16,6 +16,6 @@ nocreate sharedscripts postrotate -test ! -x /sbin/uwsgictl || /sbin/uwsgictl restart +/usr/sbin/service uwsgi-graphite-web restart endscript } diff --git a/modules/uwsgi/files/init/app.conf b/modules/uwsgi/files/init/app.conf deleted file mode 100644 index 3f936e2..000 --- a/modules/uwsgi/files/init/app.conf +++ /dev/null @@ -1,16 +0,0 @@ -# uwsgi/app -# This file is managed by Puppet -description uWSGI application - -instance $NAME - -stop on uwsgi.stop - -setuid www-data -setgid www-data - -exec /usr/bin/uwsgi --autoload --ini $CONFIG - -respawn - -# vim: set ft=upstart: diff --git a/modules/uwsgi/files/init/init.conf b/modules/uwsgi/files/init/init.conf deleted file mode 100644 index d805dfa..000 --- a/modules/uwsgi/files/init/init.conf +++ /dev/null @@ -1,24 +0,0 @@ -# uwsgi/init -# This file is managed by Puppet -description uWSGI application server container - -start on (filesystem and net-device-up IFACE!=lo) or uwsgi.start -stop on runlevel [!2345] or uwsgi.stop - -task - -pre-start script -mkdir -p /run/uwsgi -chown www-data:www-data /run/uwsgi -end script - -script -for config in /etc/uwsgi/apps-enabled/*.ini; do -[ -e $config ] || break -name=$(basename $config .ini) -start uwsgi/app NAME=$name CONFIG=$config || -status uwsgi/app NAME=$name -done -end script - -# vim: set ft=upstart: diff --git a/modules/uwsgi/files/uwsgictl b/modules/uwsgi/files/uwsgictl deleted file mode 100755 index e9ee706d..000 --- a/modules/uwsgi/files/uwsgictl +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# uwsgictl -- Manage configured uWSGI applications -# Usage: uwsgictl {status|check|start|stop|restart|tail} -# -command=$1 -shift -case $command in -status) -initctl list | grep -P '^uwsgi/(?!init)' | sort | \ -perl -pe 'END { exit $code } $code=1 if /stop\/waiting/;' -;; -check) -$0 status 21 /dev/null || { -echo CRITICAL: Not all configured uWSGI apps are running. -exit 2 -} -echo OK: All defined uWSGI apps are runnning. -exit 0 -;; -start) -/sbin/initctl emit uwsgi.start -;; -stop) -/sbin/initctl emit uwsgi.stop -;; -restart) -/sbin/initctl emit uwsgi.stop -/sbin/initctl emit uwsgi.start -;; -tail) -test -r /var/log/upstart/uwsgi_init.log tail $@ /var/log/upstart/uwsgi_init.log -;; -*) -echo 2 Usage: ${0##*/} {status|check|start|stop|restart|tail} -;; -esac diff --git a/modules/uwsgi/manifests/app.pp b/modules/uwsgi/manifests/app.pp index a1df351..77fb3a3 100644 --- a/modules/uwsgi/manifests/app.pp +++ b/modules/uwsgi/manifests/app.pp @@ -37,11 +37,25 @@ } if $enabled == true { -file { /etc/uwsgi/apps-enabled/${basename}.ini: +$inipath = /etc/uwsgi/apps-enabled/${basename}.ini +file { $inipath: ensure = link, target = /etc/uwsgi/apps-available/${basename}.ini, notify = Service['uwsgi'], } + +base::service_unit { uwsgi-${title}: +ensure= present, +template_name = 'uwsgi', +systemd = true, +upstart = true, +} +} + +nrpe::monitor_service { uwsgi-${title}: +description = ${title} uWSGI web app, +nrpe_command = /usr/sbin/service uwsgi-${title} status, +require = Service['uwsgi'], } } } diff --git a/modules/uwsgi/manifests/init.pp b/modules/uwsgi/manifests/init.pp index 81a4ae8..e060eff 100644 --- a/modules/uwsgi/manifests/init.pp +++
[MediaWiki-commits] [Gerrit] Consistency tweak: Make the description message more descrip... - change (mediawiki...OpenBadges)
jenkins-bot has submitted this change and it was merged. Change subject: Consistency tweak: Make the description message more descriptive .. Consistency tweak: Make the description message more descriptive Change-Id: I9e75693946a20d2e6dfa8fc631396647c02232bd --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 7685020..8671363 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -2,7 +2,7 @@ @metadata: { authors: [] }, - ob-desc: Mozilla Open Badges extension, + ob-desc: Allows the wiki to become an [http://openbadges.org/ OpenBadges] issuer, action-createbadge: create badges, action-viewbadge: view badges, action-issuebadge: issue badges, -- To view, visit https://gerrit.wikimedia.org/r/223376 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e75693946a20d2e6dfa8fc631396647c02232bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OpenBadges Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: Lokal Profil lokal.pro...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix request-matching logic in varnishrls - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/223522 Change subject: Fix request-matching logic in varnishrls .. Fix request-matching logic in varnishrls The mistake I made here was to assume that command-line options were implemented entirely by VSL_Arg(). This is not true for the 'm' arg. Adding a regex does not mean the varnishlog callback only gets called with matching requests. Instead, it means that a bit in the bitmap field will be set if the regex matched and the current log tag is the tag specified in the regex. This means that it is up to us to track whether the current log record is associated with a request which matched our conditions. We can do that by relying on the fact that for every request, RxURL comes before RxHeader which comes before TxStatus. This means that whenever we get a matching RxURL, we look for the RxHeader and TxStatus records that follow it and which have the same transaction ID. TxHeader is trickier to order relative to RxURL / RxHeader / TxStatus, so we'll just live without logging of X-Cache hits / misses for now. As Brandon pointed out, they don't necessarily correspond to cache hits / misses anyway. I tested this on cp1066 by confirming that the rate of requests it picks up matches the rate of load.php requests as reported by varnishncsa. Change-Id: I55f0c44cd5270e5a4809106514aebead63dbcf5c --- M modules/varnish/files/varnishrls 1 file changed, 34 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/223522/1 diff --git a/modules/varnish/files/varnishrls b/modules/varnish/files/varnishrls index e95c551..0eb2706 100755 --- a/modules/varnish/files/varnishrls +++ b/modules/varnish/files/varnishrls @@ -63,17 +63,41 @@ stats = {} +current_match = -1 + def vsl_callback(transaction_id, tag, record, remote_party): +global current_match keys = () + +# Start of new request. +if tag == 'RxURL': +if record.startswith('/w/load.php'): +current_match = transaction_id +else: +# This should only happen if the request URL consists of +# three digits or if starts with 'if-modified-since', in +# which case we reject the match. +current_match = -1 +return 0 + +# Out-of-sequence log record. Discard and reset request context. +if current_match != transaction_id: +current_match = -1 +return 0 + if tag == 'TxStatus': +# We don't expect to see any more log records from this request +# because TxStatus ought to come after RxHeader and RxURL. +current_match = -1 keys = ('reqs.all', 'resps.%s' % record) elif tag == 'RxHeader': -if not record.startswith('X-Cache'): -keys = ('reqs.if_none_match',) -elif tag == 'TxHeader': -if record.startswith('X-Cache'): -results = re.findall(r'(hit|miss)', record) -keys = ('x_cache.%s' % '_'.join(results),) +if not re.match(r'if-none-match', record, re.I): +# This should only happen if the request header name +# consists of three digits or starts with '/w/load.php'. +current_match = -1 +return 0 +keys = ('reqs.if_none_match',) + for key in keys: stats[key] = stats.get(key, 0) + 1 @@ -97,10 +121,9 @@ ('c', None),# Only consider interactions with the client ('i', 'TxStatus'), # Get TxStatus for the HTTP status code ('i', 'RxHeader'), # Get RxHeader for If-None-Match header -('i', 'TxHeader'), # Get TxHeader for X-Cache header +('i', 'RxURL'), # Get RxURL to match /w/load.php ('C', ''), # Use case-insensitive matching -('m', 'RxURL:/w/load.php'), # Only consider ResourceLoader requests -('I', '^(x-cache' # ...that contain an X-Cache header - '|if-none-match' # ...or an If-None-Match header - '|\d{3}$)'), # ...or an HTTP status code. +('I', '^(/w/load\.php' # ...to match ResourceLoader RxURLs + '|if-none-match' # ...or If-None-Match RxHeaders + '|[1-5]\d{2}$)'), # ...or RxStatus codes ), vsl_callback) -- To view, visit https://gerrit.wikimedia.org/r/223522 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55f0c44cd5270e5a4809106514aebead63dbcf5c 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] Add more tests for edge cases of references without text - change (mediawiki...Cite)
jenkins-bot has submitted this change and it was merged. Change subject: Add more tests for edge cases of references without text .. Add more tests for edge cases of references without text Change-Id: Ia6c10419a7a92dac642db6ea21908927a5830b69 --- M citeParserTests.txt 1 file changed, 22 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Looks good to me, approved jenkins-bot: Verified diff --git a/citeParserTests.txt b/citeParserTests.txt index 944b28d..9e1a906 100644 --- a/citeParserTests.txt +++ b/citeParserTests.txt @@ -459,3 +459,25 @@ refs with no name must have content/strong /p !! end + +!! test +ref with an empty-string name parameter and no content. +!! input +Bla.ref name=/ref +!! result +pBla.strong class=error mw-ext-cite-errorCite error: Invalid codelt;refgt;/code tag; +refs with no name must have content/strong +/p +!! end + +!! test +ref with an empty-string name parameter and no content. +!! input +Bla.ref name=void/ref +!! result +Bla.sup id=cite_ref-void_1-0 class=referencea href=#cite_note-void-1[1]/a/supol class=references +li id=cite_note-voidspan class=mw-cite-backlinka href=#cite_ref-void_0↑/a/span strong class=error mw-ext-cite-errorCite error: Invalid codelt;refgt;/code tag; +no text was provided for refs named codevoid/code/strong/li +/ol + +!! end -- To view, visit https://gerrit.wikimedia.org/r/223281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia6c10419a7a92dac642db6ea21908927a5830b69 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Jackmcbarn jackmcb...@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] uwsgi: Update Service['uwsgi'] to more accurate Service defs - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/223529 Change subject: uwsgi: Update Service['uwsgi'] to more accurate Service defs .. uwsgi: Update Service['uwsgi'] to more accurate Service defs Change-Id: Ic4bb4b3d93ffa01b5dfba5b3c99b8b95a15814af --- M modules/graphite/manifests/web.pp M modules/uwsgi/manifests/app.pp M modules/uwsgi/manifests/init.pp 3 files changed, 8 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/29/223529/1 diff --git a/modules/graphite/manifests/web.pp b/modules/graphite/manifests/web.pp index 085e56d..6f2 100644 --- a/modules/graphite/manifests/web.pp +++ b/modules/graphite/manifests/web.pp @@ -50,13 +50,13 @@ file { '/etc/graphite/cors.py': source = 'puppet:///modules/graphite/cors.py', require = Package['graphite-web'], -notify = Service['uwsgi'], +notify = Service['uwsgi-graphite-web'], } file { '/etc/graphite/local_settings.py': content = template('graphite/local_settings.py.erb'), require = Package['graphite-web'], -notify = Service['uwsgi'], +notify = Service['uwsgi-graphite-web'], } diff --git a/modules/uwsgi/manifests/app.pp b/modules/uwsgi/manifests/app.pp index 77fb3a3..171c393 100644 --- a/modules/uwsgi/manifests/app.pp +++ b/modules/uwsgi/manifests/app.pp @@ -41,7 +41,7 @@ file { $inipath: ensure = link, target = /etc/uwsgi/apps-available/${basename}.ini, -notify = Service['uwsgi'], +notify = Service[uwsgi-${title}], } base::service_unit { uwsgi-${title}: @@ -50,12 +50,12 @@ systemd = true, upstart = true, } -} -nrpe::monitor_service { uwsgi-${title}: -description = ${title} uWSGI web app, -nrpe_command = /usr/sbin/service uwsgi-${title} status, -require = Service['uwsgi'], +nrpe::monitor_service { uwsgi-${title}: +description = ${title} uWSGI web app, +nrpe_command = /usr/sbin/service uwsgi-${title} status, +require = Service[uwsgi-${title}], +} } } } diff --git a/modules/uwsgi/manifests/init.pp b/modules/uwsgi/manifests/init.pp index e060eff..05a9d6c 100644 --- a/modules/uwsgi/manifests/init.pp +++ b/modules/uwsgi/manifests/init.pp @@ -29,6 +29,5 @@ purge = true, force = true, require = Package['uwsgi', $plugins], -notify = Service['uwsgi'], } } -- To view, visit https://gerrit.wikimedia.org/r/223529 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4bb4b3d93ffa01b5dfba5b3c99b8b95a15814af 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] Userlogin is canonical name, not UserLogin - change (mediawiki...Echo)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/223524 Change subject: Userlogin is canonical name, not UserLogin .. Userlogin is canonical name, not UserLogin Fixes: PHP Notice: Found alias defined for Userlogin when searching for special page aliases for UserLogin. Change-Id: Ib64d4c76d3915ae752a9c56eb9635653e0da5623 --- M includes/special/SpecialNotifications.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/24/223524/1 diff --git a/includes/special/SpecialNotifications.php b/includes/special/SpecialNotifications.php index d34d0b7..a267f0c 100644 --- a/includes/special/SpecialNotifications.php +++ b/includes/special/SpecialNotifications.php @@ -25,8 +25,8 @@ // the html message for anon users $anonMsgHtml = $this-msg( 'echo-anon', - SpecialPage::getTitleFor( 'UserLogin', 'signup' )-getFullURL( $returnTo ), - SpecialPage::getTitleFor( 'UserLogin' )-getFullURL( $returnTo ) + SpecialPage::getTitleFor( 'Userlogin', 'signup' )-getFullURL( $returnTo ), + SpecialPage::getTitleFor( 'Userlogin' )-getFullURL( $returnTo ) )-parse(); $out-addHTML( Html::rawElement( 'span', array( 'class' = 'plainlinks' ), $anonMsgHtml ) ); return; -- To view, visit https://gerrit.wikimedia.org/r/223524 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib64d4c76d3915ae752a9c56eb9635653e0da5623 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo 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] [WIP] Create new topics on a Flow board - change (pywikibot/core)
Happy5214 has uploaded a new change for review. https://gerrit.wikimedia.org/r/223525 Change subject: [WIP] Create new topics on a Flow board .. [WIP] Create new topics on a Flow board This patch adds functionality that allows bots to create new topics on existing Flow boards. Bug: T105129 Change-Id: I3b35082dde30f35df7663e265c89754c73f9ecb8 --- M pywikibot/flow.py M pywikibot/site.py M tests/flow_tests.py 3 files changed, 60 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/25/223525/1 diff --git a/pywikibot/flow.py b/pywikibot/flow.py index 061ad28..e58740f 100644 --- a/pywikibot/flow.py +++ b/pywikibot/flow.py @@ -104,6 +104,21 @@ cont_args = _parse_url(data['links']['pagination']) data = self._load(**cont_args) +def new_topic(self, title, content, format='wikitext'): +Create and return a Topic object for a new topic on this Board. + +@param title: The title of the new topic +@type title: unicode +@param content: The content of the topic's initial post +@type content: unicode +@param format: The content format of the supplied content +@type format: unicode (either 'wikitext' or 'html') +@return: The new topic +@rtype: Topic + +data = self.site.create_new_topic(self, title, content, format) +return Topic(self.site, data['topic-page']) + class Topic(FlowPage): diff --git a/pywikibot/site.py b/pywikibot/site.py index 59ca823..ec30709 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -5815,6 +5815,28 @@ data = req.submit() return data['flow']['view-post']['result']['topic'] +@need_extension('Flow') +def create_new_topic(self, page, title, content, format='wikitext'): +Create a new topic on a Flow board. + +@param page: A Flow board +@type page: Board +@param title: The title of the new topic +@type title: unicode +@param content: The content of the topic's initial post +@type content: unicode +@param format: The content format of the supplied content +@type format: unicode (either 'wikitext' or 'html') +@return: A dict representing the metadata of the new topic +@rtype: dict + +token = self.tokens['csrf'] +req = self._simple_request(action='flow', page=page, token=token, + submodule='new-topic', nttopic=title, + ntcontent=content, ntformat=format) +data = req.submit() +return data['flow']['new-topic']['committed']['topiclist'] + # aliases for backwards compatibility isBlocked = redirect_func(is_blocked, old_name='isBlocked', class_name='APISite') diff --git a/tests/flow_tests.py b/tests/flow_tests.py index cacb104..dc01ea1 100644 --- a/tests/flow_tests.py +++ b/tests/flow_tests.py @@ -165,3 +165,26 @@ if i == 10: break self.assertEqual(i, 10) + +class TestFlowCreateTopic(TestCase): + +Test the creation of Flow topics. + +family = 'wikipedia' +code = 'test2' + +write = True + +def test_create_topic(self): +Test creation of topic. +site = self.get_site() +board = pywikibot.flow.Board(site, 'Talk:Flow QA') +topic = board.new_topic('Pywikibot test', +'If you can read this, the Flow code in Pywikibot works!', +'wikitext') +first_post = topic.replies()[0] +wikitext = first_post.get(format='wikitext') +self.assertIn('wikitext', first_post._content) +self.assertNotIn('html', first_post._content) +self.assertIsInstance(wikitext, unicode) +self.assertNotEqual(wikitext, '') -- To view, visit https://gerrit.wikimedia.org/r/223525 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b35082dde30f35df7663e265c89754c73f9ecb8 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Happy5214 happy5...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Minor cleanups and narrower interfaces in MergeItems code - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Minor cleanups and narrower interfaces in MergeItems code .. Minor cleanups and narrower interfaces in MergeItems code The reason to touch this was the ApiBase::PARAM_... constants I missed in Ibeb6d10. I also did a little bit of refactoring and made some interfaces of private methods smaller: it never can be an Entity, it always is an Item. Change-Id: I84952a544c430c9894dd36fa2d7932c5f2d14075 --- M repo/includes/Interactors/ItemMergeInteractor.php M repo/includes/api/MergeItems.php M repo/includes/specials/SpecialMergeItems.php 3 files changed, 27 insertions(+), 20 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/Interactors/ItemMergeInteractor.php b/repo/includes/Interactors/ItemMergeInteractor.php index 22bff09..211b3b2 100644 --- a/repo/includes/Interactors/ItemMergeInteractor.php +++ b/repo/includes/Interactors/ItemMergeInteractor.php @@ -17,7 +17,6 @@ use Wikibase\Repo\Store\EntityPermissionChecker; use Wikibase\Summary; use Wikibase\SummaryFormatter; -use Wikibase\Repo\Interactors\RedirectCreationInteractor; /** * @since 0.5 @@ -112,7 +111,7 @@ * Check the given permissions for the given $entityId. * * @param EntityId $entityId -* @param $permission +* @param string $permission * * @throws ItemMergeException if the permission check fails */ @@ -131,7 +130,7 @@ * * @param ItemId $fromId * @param ItemId $toId -* @param array $ignoreConflicts The kinds of conflicts to ignore +* @param string[] $ignoreConflicts The kinds of conflicts to ignore * @param string|null $summary * @param bool $bot Mark the edit as bot edit * @@ -179,27 +178,29 @@ } /** -* @param EntityId $entityId -* @return bool isEmpty +* @param ItemId $itemId +* +* @return bool */ - private function isEmpty( EntityId $entityId ) { - return $this-loadEntity( $entityId )-isEmpty(); + private function isEmpty( ItemId $itemId ) { + return $this-loadEntity( $itemId )-isEmpty(); } /** * Either throws an exception or returns a EntityDocument object. * -* @param EntityId $entityId +* @param ItemId $itemId +* * @return EntityDocument * @throws ItemMergeException */ - private function loadEntity( EntityId $entityId ) { + private function loadEntity( ItemId $itemId ) { try { - $revision = $this-entityRevisionLookup-getEntityRevision( $entityId, EntityRevisionLookup::LATEST_FROM_MASTER ); + $revision = $this-entityRevisionLookup-getEntityRevision( $itemId, EntityRevisionLookup::LATEST_FROM_MASTER ); if ( !$revision ) { throw new ItemMergeException( - Entity $entityId not found, + Entity $itemId not found, 'no-such-entity' ); } @@ -213,6 +214,7 @@ /** * @param EntityDocument $fromEntity * @param EntityDocument $toEntity +* * @throws ItemMergeException */ private function validateEntities( EntityDocument $fromEntity, EntityDocument $toEntity ) { @@ -229,6 +231,7 @@ * @param string $direction either 'from' or 'to' * @param ItemId $getId * @param string|null $customSummary +* * @return Summary */ private function getSummary( $direction, $getId, $customSummary = null ) { diff --git a/repo/includes/api/MergeItems.php b/repo/includes/api/MergeItems.php index c366504..0708a29 100644 --- a/repo/includes/api/MergeItems.php +++ b/repo/includes/api/MergeItems.php @@ -4,6 +4,7 @@ use ApiBase; use ApiMain; +use Exception; use InvalidArgumentException; use LogicException; use UsageException; @@ -142,12 +143,13 @@ /** * @param ItemId $fromId * @param ItemId $toId -* @param array $ignoreConflicts +* @param string[] $ignoreConflicts * @param string $summary * @param bool $bot */ private function mergeItems( ItemId $fromId, ItemId $toId, array $ignoreConflicts, $summary, $bot ) { - list( $newRevisionFrom, $newRevisionTo, $redirected ) = $this-interactor-mergeItems( $fromId, $toId, $ignoreConflicts, $summary, $bot ); + list( $newRevisionFrom, $newRevisionTo, $redirected ) + = $this-interactor-mergeItems( $fromId, $toId, $ignoreConflicts, $summary, $bot );
[MediaWiki-commits] [Gerrit] Update extension registration system for MoodBar - change (mediawiki...MoodBar)
Niharika29 has uploaded a new change for review. https://gerrit.wikimedia.org/r/223539 Change subject: Update extension registration system for MoodBar .. Update extension registration system for MoodBar Bug:T87942 Change-Id: I16e30d1d494de23cd093529ab7545699ba384533 --- M MoodBar.php A extension.json 2 files changed, 319 insertions(+), 296 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MoodBar refs/changes/39/223539/1 diff --git a/MoodBar.php b/MoodBar.php index 4605df9..23d913a 100644 --- a/MoodBar.php +++ b/MoodBar.php @@ -4,305 +4,25 @@ * Allows specified users to send their mood back to the site operator. */ -$wgExtensionCredits['other'][] = array( - 'author' = array( 'Andrew Garrett', 'Timo Tijhof' ), - 'descriptionmsg' = 'moodbar-desc', - 'name' = 'MoodBar', - 'url' = 'https://www.mediawiki.org/wiki/MoodBar', - 'version' = '0.3.0', - 'path' = __FILE__, -); +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'Renameuser' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['Renameuser'] = __DIR__ . '/i18n'; + $wgExtensionMessagesFiles['RenameuserAliases'] = __DIR__ . '/Renameuser.alias.php'; + $oldVersion = version_compare( $wgVersion, '1.17', '=' ); -$moodBarDir = __DIR__ . '/'; + if ( !$oldVersion ) { + $wgResourceModules['ext.moodBar.init']['dependencies'][] = 'mediawiki.user'; + } -// Object model -$wgAutoloadClasses['MBFeedbackItem'] = $moodBarDir . 'FeedbackItem.php'; -$wgAutoloadClasses['MBFeedbackResponseItem'] = $moodBarDir . 'FeedbackResponseItem.php'; -$wgAutoloadClasses['MWFeedbackResponseItemPropertyException'] = $moodBarDir . 'FeedbackResponseItem.php'; -$wgAutoloadClasses['MoodBarFormatter'] = $moodBarDir . 'Formatter.php'; -$wgAutoloadClasses['MoodBarHTMLEmailNotification'] = $moodBarDir . 'include/MoodBarHTMLEmailNotification.php'; -$wgAutoloadClasses['MoodBarHTMLMailerJob'] = $moodBarDir . 'include/MoodBarHTMLMailerJob.php'; -$wgAutoloadClasses['MoodBarUtil'] = $moodBarDir . 'include/MoodBarUtil.php'; - -// API -$wgAutoloadClasses['ApiMoodBar'] = $moodBarDir . 'ApiMoodBar.php'; -$wgAPIModules['moodbar'] = 'ApiMoodBar'; -$wgAutoloadClasses['ApiQueryMoodBarComments'] = $moodBarDir . 'ApiQueryMoodBarComments.php'; -$wgAPIListModules['moodbarcomments'] = 'ApiQueryMoodBarComments'; -$wgAutoloadClasses['ApiFeedbackDashboard'] = $moodBarDir . 'ApiFeedbackDashboard.php'; -$wgAPIModules['feedbackdashboard'] = 'ApiFeedbackDashboard'; -$wgAutoloadClasses['ApiFeedbackDashboardResponse'] = $moodBarDir . 'ApiFeedbackDashboardResponse.php'; -$wgAPIModules['feedbackdashboardresponse'] = 'ApiFeedbackDashboardResponse'; -$wgAutoloadClasses['ApiMoodBarSetUserEmail'] = $moodBarDir . 'ApiMoodBarSetUserEmail.php'; -$wgAutoloadClasses['MWApiMoodBarSetUserEmailInvalidActionException'] = $moodBarDir . 'ApiMoodBarSetUserEmail.php'; -$wgAPIModules['moodbarsetuseremail'] = 'ApiMoodBarSetUserEmail'; - -// Hooks -$wgAutoloadClasses['MoodBarHooks'] = $moodBarDir . 'MoodBar.hooks.php'; -$wgHooks['BeforePageDisplay'][] = 'MoodBarHooks::onPageDisplay'; -$wgHooks['ResourceLoaderGetConfigVars'][] = 'MoodBarHooks::resourceLoaderGetConfigVars'; -$wgHooks['MakeGlobalVariablesScript'][] = 'MoodBarHooks::makeGlobalVariablesScript'; -$wgHooks['LoadExtensionSchemaUpdates'][] = 'MoodBarHooks::onLoadExtensionSchemaUpdates'; -$wgHooks['onMarkItemAsHelpful'][] = 'MoodBarHooks::onMarkItemAsHelpful'; -$wgHooks['GetPreferences'][] = 'MoodBarHooks::onGetPreferences'; -$wgHooks['UserMergeAccountFields'][] = 'MoodBarHooks::onUserMergeAccountFields'; - -// Special pages -$wgAutoloadClasses['SpecialMoodBar'] = $moodBarDir . 'SpecialMoodBar.php'; -$wgAutoloadClasses['MoodBarPager'] = $moodBarDir . 'SpecialMoodBar.php'; -$wgSpecialPages['MoodBar'] = 'SpecialMoodBar'; -$wgAutoloadClasses['SpecialFeedbackDashboard'] = $moodBarDir . 'SpecialFeedbackDashboard.php'; -$wgSpecialPages['FeedbackDashboard'] = 'SpecialFeedbackDashboard'; - -$dashboardFormsPath = $moodBarDir . 'DashboardForms.php'; -$wgAutoloadClasses['MBDashboardForm'] = $dashboardFormsPath; -$wgAutoloadClasses['MBActionForm'] = $dashboardFormsPath; -$wgAutoloadClasses['MBHideForm'] = $dashboardFormsPath; -$wgAutoloadClasses['MBRestoreForm'] = $dashboardFormsPath; -$wgAutoloadClasses['MBDeleteForm'] = $dashboardFormsPath; - -$wgLogTypes[] = 'moodbar'; -$wgLogNames['moodbar'] = 'moodbar-log-name'; -$wgLogHeaders['moodbar'] = 'moodbar-log-header'; -$wgLogActions += array( - 'moodbar/hide' = 'moodbar-log-hide', - 'moodbar/restore' = 'moodbar-log-restore', - 'moodbar/feedback' = 'moodbar-log-feedback', - 'moodbar/delete' = 'moodbar-log-delete' -); - -// Jobs -$wgJobClasses['MoodBarHTMLMailerJob'] = 'MoodBarHTMLMailerJob'; - -// User rights -$wgAvailableRights[] = 'moodbar-view';
[MediaWiki-commits] [Gerrit] Deactivate packet filter on potassium - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Deactivate packet filter on potassium .. Deactivate packet filter on potassium nf_conntrack table full is wreaking havoc. Change-Id: I1b9ec2294d7bcf48c397937ba64489b4acc070ed --- M manifests/site.pp 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified Objections: Matanya: There's a problem with this change, please improve diff --git a/manifests/site.pp b/manifests/site.pp index d74153d..39b3a15 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2056,7 +2056,6 @@ node 'potassium.eqiad.wmnet' { include standard -include base::firewall include role::poolcounter } -- To view, visit https://gerrit.wikimedia.org/r/223538 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b9ec2294d7bcf48c397937ba64489b4acc070ed Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More flexible options handling in referenceview tests - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/223541 Change subject: More flexible options handling in referenceview tests .. More flexible options handling in referenceview tests Compare to the options handling in createSitelinklistview() in jquery.wikibase.sitelinklistview.tests.js, for example. Swapping the two parameters in the extend() call means: prefer the later options. This is an other bit split from I9444ae5. Bug: T87759 Change-Id: Ia7711da2dc2543eec5cacdc2c07c8a9112ffea34 --- M view/tests/qunit/jquery/wikibase/jquery.wikibase.referenceview.tests.js 1 file changed, 10 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/41/223541/1 diff --git a/view/tests/qunit/jquery/wikibase/jquery.wikibase.referenceview.tests.js b/view/tests/qunit/jquery/wikibase/jquery.wikibase.referenceview.tests.js index 0957ce8..a43c47d 100644 --- a/view/tests/qunit/jquery/wikibase/jquery.wikibase.referenceview.tests.js +++ b/view/tests/qunit/jquery/wikibase/jquery.wikibase.referenceview.tests.js @@ -32,18 +32,17 @@ /** * Generates a referenceview widget suitable for testing. * -* @param {string} [statementGuid] -* @param {Object} [additionalOptions] +* @param {Object} [options] * @return {jQuery} */ - function createReferenceview( statementGuid, additionalOptions ) { - var options = $.extend( additionalOptions, { - statementGuid: statementGuid, + function createReferenceview( options ) { + options = $.extend( { + statementGuid: 'testGuid', entityStore: entityStore, valueViewBuilder: valueViewBuilder, referencesChanger: 'I am a ReferencesChanger', dataTypeStore: 'I am a DataTypeStore' - } ); + }, options ); return $( 'div/' ) .addClass( 'test_referenceview' ) @@ -66,7 +65,7 @@ } ) ); QUnit.test( 'Initialize and destroy', function( assert ) { - var $node = createReferenceview( 'testGuid' ), + var $node = createReferenceview(), referenceview = $node.data( 'referenceview' ); assert.ok( @@ -112,7 +111,7 @@ } ); QUnit.test( 'is initialized with a value', function( assert ) { - var $node = createReferenceview( 'testGuid', { + var $node = createReferenceview( { value: new wb.datamodel.Reference( new wb.datamodel.SnakList( [ new wb.datamodel.PropertyNoValueSnak( 'P1' ) ] ) ) @@ -127,7 +126,7 @@ } ); QUnit.test( 'allows to enter new item', function( assert ) { - var $node = createReferenceview( 'testGuid' ), + var $node = createReferenceview(), referenceview = $node.data( 'referenceview' ); referenceview.enterNewItem(); @@ -152,7 +151,7 @@ } ); QUnit.test( 'allows to stop editing', function( assert ) { - var $node = createReferenceview( 'testGuid' ), + var $node = createReferenceview(), referenceview = $node.data( 'referenceview' ); referenceview.enterNewItem(); @@ -178,7 +177,7 @@ } ); QUnit.test( 'recognizes initial value', function( assert ) { - var $node = createReferenceview( 'testGuid', { + var $node = createReferenceview( { value: new wb.datamodel.Reference( new wb.datamodel.SnakList( [ new wb.datamodel.PropertyNoValueSnak( 'P1' ) ] ) ) -- To view, visit https://gerrit.wikimedia.org/r/223541 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7711da2dc2543eec5cacdc2c07c8a9112ffea34 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] ores: Fix typo - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: ores: Fix typo .. ores: Fix typo Change-Id: I1b5a1ebd62c92c816c8777431a2df7f2fa779110 --- M modules/ores/manifests/worker.pp 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/ores/manifests/worker.pp b/modules/ores/manifests/worker.pp index 7ae42d3..7ebb02c 100644 --- a/modules/ores/manifests/worker.pp +++ b/modules/ores/manifests/worker.pp @@ -1,11 +1,9 @@ class ores::worker { - - celery::worker { 'ores-worker': app = 'ores_celery.application', working_dir = $ores::base::config_path, user= 'www-data', group = 'www-data', -celery_bin_path = ${ores::base::venve_path}/bin/celery, +celery_bin_path = ${ores::base::venv_path}/bin/celery, } } -- To view, visit https://gerrit.wikimedia.org/r/223546 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b5a1ebd62c92c816c8777431a2df7f2fa779110 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show a missing search icon in alpha - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Show a missing search icon in alpha .. Show a missing search icon in alpha * Remove the search-white icon and use ResourceLoaderImageModule to create an inverted version of the icon. * Create a gray variant of the search icon and use it in the alpha header (since the default is black now) * Fix the padding around the icon to center the icon vertically. Bug: T101145 Change-Id: Ieba2bab1395445e5cdec307128c6d30f3b6ff3a8 --- M images/icons/magnifying-glass.svg D images/icons/search-white.svg M includes/Resources.php M includes/skins/MinervaTemplateAlpha.php M resources/mobile.special.mobilemenu.styles/mobilemenu.less 5 files changed, 25 insertions(+), 78 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/images/icons/magnifying-glass.svg b/images/icons/magnifying-glass.svg index edc0656..8c375d0 100644 --- a/images/icons/magnifying-glass.svg +++ b/images/icons/magnifying-glass.svg @@ -1,4 +1,4 @@ ?xml version=1.0 encoding=UTF-8 standalone=no? svg xmlns=http://www.w3.org/2000/svg; viewBox=0 0 24 24 enable-background=new 0 0 612 792 -path d=M3.065 16.536c1.765 1.766 4.073 2.732 6.583 2.732 2.187 0 4.25-.744 5.913-2.112l6.76 6.112s1.518-.398 1.89-2.086l-6.78-6.135c2.385-3.63 1.964-8.498-1.193-11.655C14.47 1.626 12.162.66 9.677.66c-2.488 0-4.823.97-6.585 2.71-3.656 3.647-3.63 9.537-.027 13.166zm1.54-11.11c.073-.1.175-.198.272-.272C6.17 3.887 7.86 3.166 9.672 3.166c1.812 0 3.504.72 4.794 1.988 2.635 2.635 2.66 6.934-.023 9.593-1.29 1.29-2.982 1.988-4.795 1.988-1.812 0-3.504-.72-4.794-1.988-2.534-2.534-2.66-6.634-.25-9.32z id=path4 fill=#555/ +path d=M3.065 16.536c1.765 1.766 4.073 2.732 6.583 2.732 2.187 0 4.25-.744 5.913-2.112l6.76 6.112s1.518-.398 1.89-2.086l-6.78-6.135c2.385-3.63 1.964-8.498-1.193-11.655C14.47 1.626 12.162.66 9.677.66c-2.488 0-4.823.97-6.585 2.71-3.656 3.647-3.63 9.537-.027 13.166zm1.54-11.11c.073-.1.175-.198.272-.272C6.17 3.887 7.86 3.166 9.672 3.166c1.812 0 3.504.72 4.794 1.988 2.635 2.635 2.66 6.934-.023 9.593-1.29 1.29-2.982 1.988-4.795 1.988-1.812 0-3.504-.72-4.794-1.988-2.534-2.534-2.66-6.634-.25-9.32z id=path4 / /svg diff --git a/images/icons/search-white.svg b/images/icons/search-white.svg deleted file mode 100644 index 7db1f3b..000 --- a/images/icons/search-white.svg +++ /dev/null @@ -1,62 +0,0 @@ -?xml version=1.0 encoding=UTF-8 standalone=no? -svg - xmlns:dc=http://purl.org/dc/elements/1.1/; - xmlns:cc=http://creativecommons.org/ns#; - xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; - xmlns:svg=http://www.w3.org/2000/svg; - xmlns=http://www.w3.org/2000/svg; - xmlns:sodipodi=http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd; - xmlns:inkscape=http://www.inkscape.org/namespaces/inkscape; - viewBox=0 0 48 48 - enable-background=new 0 0 612 792 - id=svg2 - version=1.1 - inkscape:version=0.48.2 r9819 - sodipodi:docname=search-white.svg - width=100% - height=100% - metadata - id=metadata10 -rdf:RDF - cc:Work - rdf:about= -dc:formatimage/svg+xml/dc:format -dc:type - rdf:resource=http://purl.org/dc/dcmitype/StillImage; / -dc:title / - /cc:Work -/rdf:RDF - /metadata - defs - id=defs8 / - sodipodi:namedview - pagecolor=#ff - bordercolor=#66 - borderopacity=1 - objecttolerance=10 - gridtolerance=10 - guidetolerance=10 - inkscape:pageopacity=0 - inkscape:pageshadow=2 - inkscape:window-width=1440 - inkscape:window-height=788 - id=namedview6 - showgrid=false - inkscape:zoom=6.5103448 - inkscape:cx=-3.5861991 - inkscape:cy=24.3892 - inkscape:window-x=103 - inkscape:window-y=1102 - inkscape:window-maximized=1 - inkscape:current-layer=svg2 / - path - d=m 5.9311042,33.828283 c 3.4706671,3.662023 8.0063058,5.666818 12.9403248,5.666818 4.298119,0 8.351079,-1.544017 11.622536,-4.38148 l 13.285099,12.675573 c 0,0 2.980331,-0.824561 3.715845,-4.324884 L 34.163842,30.740229 C 38.852704,23.214121 38.025252,13.117315 31.819412,6.5693597 28.348745,2.9073559 23.813126,0.90254115 18.925055,0.90254115 c -4.88805,0 -9.4773151,2.01288315 -12.9403242,5.61831035 C -1.2017817,14.0874 -1.1481551,26.302174 5.9312028,33.828283 z m 3.026299,-23.039125 c 0.1455439,-0.210189 0.3447732,-0.41227 0.5363247,-0.565882 2.5436191,-2.6272549 5.8610651,-4.1227828 9.4236701,-4.1227828 3.562623,0 6.887727,1.4955279 9.423689,4.1227828 5.179197,5.464737 5.225165,14.381269 -0.04591,19.894495 -2.535963,2.675781 -5.861066,4.122801 -9.423689,4.122801 -3.562604,0 -6.887708,-1.495527 -9.4236896,-4.122801 C 4.4678108,24.863242 4.2226522,16.358961 8.9574617,10.789158 z - id=path4 - inkscape:connector-curvature=0 - style=fill:#55 / - path - style=fill:#ff - d=m 37.17213,41.363593
[MediaWiki-commits] [Gerrit] Fix wrong assumption in statementview - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/223544 Change subject: Fix wrong assumption in statementview .. Fix wrong assumption in statementview This is split from I9444ae5. This is actually a bug. The value can be null. All other places in this code already check this. Bug: T87759 Change-Id: Id6dc26ca86c684d31dfa92fb6b854379996f3078 --- M view/resources/jquery/wikibase/jquery.wikibase.statementview.js 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/44/223544/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js index 7268a4f..c3ab89d 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js @@ -315,7 +315,9 @@ newItemOptionsFn: function( value ) { return { value: value || null, - statementGuid: self.options.value.getClaim().getGuid(), + statementGuid: self.options.value + ? self.options.value.getClaim().getGuid() + : null, dataTypeStore: self.options.dataTypeStore, entityStore: self.options.entityStore, valueViewBuilder: self.options.valueViewBuilder, @@ -469,6 +471,7 @@ : new wb.datamodel.SnakList() ); } + this._createReferences( this.options.value ); return $.Deferred().resolve().promise(); -- To view, visit https://gerrit.wikimedia.org/r/223544 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6dc26ca86c684d31dfa92fb6b854379996f3078 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] Add missing fail-safe to counter calculation in statementview - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/223548 Change subject: Add missing fail-safe to counter calculation in statementview .. Add missing fail-safe to counter calculation in statementview This is split from I9444ae5. This adds a missing fail-safe. That's all. Note that the private variable can be null. All other places in the code already check this. Bug: T87759 Change-Id: I54cf4c0333c9744ccacf11ddd833fbd7843541ff --- M view/resources/jquery/wikibase/jquery.wikibase.statementview.js 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/48/223548/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js index ba90614..a452a84 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js @@ -608,8 +608,13 @@ * @private */ _drawReferencesCounter: function() { - var numberOfValues = this._referencesListview.nonEmptyItems().length, + var numberOfValues = 0, + numberOfPendingValues = 0; + + if( this._referencesListview ) { + numberOfValues = this._referencesListview.nonEmptyItems().length; numberOfPendingValues = this._referencesListview.items().length - numberOfValues; + } // build a nice counter, displaying fixed and pending values: var $counterMsg = wb.utilities.ui.buildPendingCounter( -- To view, visit https://gerrit.wikimedia.org/r/223548 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54cf4c0333c9744ccacf11ddd833fbd7843541ff 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] poolcounter: don't track connections on the firewall - change (operations/puppet)
Matanya has uploaded a new change for review. https://gerrit.wikimedia.org/r/223540 Change subject: poolcounter: don't track connections on the firewall .. poolcounter: don't track connections on the firewall Change-Id: I18621798d1ad9b13b7dc05cbcbea67011f4564cd --- M manifests/role/poolcounter.pp 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/40/223540/1 diff --git a/manifests/role/poolcounter.pp b/manifests/role/poolcounter.pp index d2a19c4..28755be 100644 --- a/manifests/role/poolcounter.pp +++ b/manifests/role/poolcounter.pp @@ -23,4 +23,20 @@ port = '7531', srange = '$ALL_NETWORKS', } + +ferm::rule { 'skip_poolcounter_conntrack-out': +desc = 'Skip poolcounter outgoing connection tracking', +table = 'raw', +chain = 'OUTPUT', +rule = 'proto tcp sport 7531 NOTRACK;', +} + +ferm::rule { 'skip_poolcounter_conntrack-in': +desc = 'Skip poolcounter incoming connection tracking', +table = 'raw', +chain = 'PREROUTING', +rule = 'proto tcp sport 7531 NOTRACK;', +} + + } -- To view, visit https://gerrit.wikimedia.org/r/223540 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18621798d1ad9b13b7dc05cbcbea67011f4564cd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya mata...@foss.co.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make referencesChanger optional in the referenceview widget - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/223542 Change subject: Make referencesChanger optional in the referenceview widget .. Make referencesChanger optional in the referenceview widget This is split from I9444ae5. This patch does nothing but adding a new feature: Both statementGuid and referencesChanger options are now optional. The referenceview will *not* be able to save anthing in this case. It can't. This is intended. Instead the statementview (which is the next widget up in the chain) must take care of that. This new feature is currently *not* used. Bug: T87759 Change-Id: Ic452f2395b949f8a78ebc00705f19da33c030be3 --- M view/resources/jquery/wikibase/jquery.wikibase.referenceview.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.referenceview.tests.js 2 files changed, 83 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/42/223542/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.referenceview.js b/view/resources/jquery/wikibase/jquery.wikibase.referenceview.js index 1a9ee33..877fbbc 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.referenceview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.referenceview.js @@ -16,15 +16,22 @@ * * @param {Object} options * @param {wikibase.datamodel.Reference|null} options.value - * @param {string} options.statementGuid + * @param {string|null} [options.statementGuid] *The GUID of the `Statement` the `Reference` represented by the widget instance belongs to. + *Required only if the `Reference` is supposed to be saved individually (`referencesChanger` + *option is defined). Else, the `Reference` is supposed to be saved along with its + *`Statement` (e.g. by being part of a `statementview`) and will receive the GUID from that + *context. * @param {wikibase.store.EntityStore} options.entityStore *Required for dynamically gathering `Entity`/`Property` information. * @param {wikibase.ValueViewBuilder} options.valueViewBuilder *Required by the `snakview` interfacing a `snakview` value `Variation` to *`jQuery.valueview`. - * @param {wikibase.entityChangers.ReferencesChanger} options.referencesChanger - *Required for saving the `Reference` represented by the widget instance. + * @param {wikibase.entityChangers.ReferencesChanger} [options.referencesChanger] + *Required for saving the `Reference` represented by the widget instance. If omitted, the + *`referenceview` widget does not trigger saving the `Reference` it is managing when + *stopping edit mode. Setting this option by providing a `ReferencesChanger` instance + *requires the `statementGuid` option to be set as well. * @param {string} [options.helpMessage=mw.msg( 'wikibase-claimview-snak-new-tooltip' )] *End-user message explaining how to interact with the widget. The message is most likely to *be used inside the tooltip of the toolbar corresponding to the widget. @@ -92,13 +99,16 @@ * @protected * * @throws {Error} if a required option is not specified properly. +* @throws {Error} if `referencesChanger` option is defined but `statementGuid` option is +* omitted. */ _create: function() { - if( - !this.options.statementGuid || !this.options.entityStore - || !this.options.valueViewBuilder || !this.options.referencesChanger - ) { + if( !this.options.entityStore || !this.options.valueViewBuilder ) { throw new Error( 'Required option not specified properly' ); + } + if( this.options.referencesChanger !this.options.statementGuid ) { + throw new Error( 'Would be unable to save a Reference using the provided ' + + 'ReferencesChanger without a statementGuid being provided' ); } PARENT.prototype._create.call( this ); @@ -424,20 +434,32 @@ * @see wikibase.entityChangers.ReferencesChanger.setReference * @private * -* @return {Object} jQuery.Promise -* @return {Function} return.done -* @return {Reference} return.done.savedReference -* @return {Function} return.fail -* @return {wikibase.api.RepoApiError} return.fail.error +* @return {jQuery.Promise} +* Resolved parameters: +* - {wikibase.datamodel.Reference} The saved reference +* Rejected parameters: +* - {wikibase.api.RepoApiError} +* +* @throws {Error} when no `ReferencesChanger` was supplied via options and it is tried to save +* an
[MediaWiki-commits] [Gerrit] Rename wrong private method name in statementview - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/223545 Change subject: Rename wrong private method name in statementview .. Rename wrong private method name in statementview Bug: T87759 Change-Id: Ib3b9ade540fb5325c042f781cbf5b83953ea4b76 --- M view/resources/jquery/wikibase/jquery.wikibase.statementview.js 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/45/223545/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js index c3ab89d..ece6a7e 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js @@ -294,7 +294,7 @@ * * @param {wikibase.datamodel.Statement} [statement] */ - _createReferences: function( statement ) { + _createReferencesListview: function( statement ) { if( !statement ) { return; } @@ -472,7 +472,7 @@ ); } - this._createReferences( this.options.value ); + this._createReferencesListview( this.options.value ); return $.Deferred().resolve().promise(); }, -- To view, visit https://gerrit.wikimedia.org/r/223545 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib3b9ade540fb5325c042f781cbf5b83953ea4b76 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] deactive packet filter on potassium - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/223538 Change subject: deactive packet filter on potassium .. deactive packet filter on potassium Change-Id: I1b9ec2294d7bcf48c397937ba64489b4acc070ed --- M manifests/site.pp 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/38/223538/1 diff --git a/manifests/site.pp b/manifests/site.pp index d74153d..39b3a15 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2056,7 +2056,6 @@ node 'potassium.eqiad.wmnet' { include standard -include base::firewall include role::poolcounter } -- To view, visit https://gerrit.wikimedia.org/r/223538 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b9ec2294d7bcf48c397937ba64489b4acc070ed Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Highlight errors in the editing area - change (mediawiki...LanguageTool)
Amire80 has submitted this change and it was merged. Change subject: Highlight errors in the editing area .. Highlight errors in the editing area Changed spaces to tabs Removed trailing whitespaces Removed extra blank lines Changed line length Changed == to === Change-Id: I52606179ba26de18e51db04d6c368f54ae585c7a --- M modules/ext.LanguageToolAction.js 1 file changed, 52 insertions(+), 53 deletions(-) Approvals: Amire80: Verified; Looks good to me, approved diff --git a/modules/ext.LanguageToolAction.js b/modules/ext.LanguageToolAction.js index b749b20..2c794f6 100644 --- a/modules/ext.LanguageToolAction.js +++ b/modules/ext.LanguageToolAction.js @@ -18,10 +18,9 @@ // Parent constructor ve.ui.Action.call( this, surface ); this.surfaceModel = this.surface.getModel(); - //console.log( this.surfaceModel ); - this.surrogateAttribute = onkeypress; + this.surrogateAttribute = 'onkeypress'; this.surrogateAttributeDelimiter = ---#---; - this.ignoredRulesIds = []; + this.ignoredRulesIds = [ 'SENTENCE_WHITESPACE' ]; this.ignoredSpellingErrors = []; this.$findResults = $( 'div' ).addClass( 'hiddenSpellError' ); this.initialFragment = null; @@ -82,22 +81,31 @@ * @return {NULL} Action was executed */ mw.languageToolAction.prototype.send = function () { - var textNodes, model, text, nodeI, node, nodeRange, nodeText, lang, self; + var textNodes, model, text, nodeI, node, nodeRange, nodeText, lang, self, + data, textArray, mapper, i; textNodes = this.extract(); model = ve.init.target.getSurface().getModel(); - text = ''; - for ( nodeI = 0; nodeI textNodes.length; nodeI++ ) { - node = textNodes[nodeI]; - nodeRange = node.getRange(); - nodeText = model.getLinearFragment( nodeRange ).getText(); + data = ve.init.target.getSurface().getModel().getDocument().data.getData(); - console.log( nodeText ); - text = text + '\n' + nodeText; + mapper = []; + for( i = 0; i data.length; i++ ){ + if( (typeof data[i]) === 'string' || ( typeof data[i][0] ) === 'string') + mapper.push(i); + } + textArray = []; + + for( i = 0; i mapper.length; i++ ){ + if( ( typeof data[mapper[i]] ) === 'string'){ + textArray[i] = data[mapper[i]]; + } + else{ + textArray[i] = data[mapper[i]][0]; + } } - console.log( text ); + text = textArray.join(''); // TODO: Get the language from VE's data model lang = mw.config.get( 'wgPageContentLanguage' ); @@ -109,25 +117,19 @@ url: 'http://tools.wmflabs.org/languageproofing/', data: {language: lang, text: text} } ) .done( function( responseXML ) { - //console.log( responseXML ); - self.openDialog.apply( self, [ responseXML, text ] ); + self.openDialog.apply( self, [ responseXML, mapper ] ); } ); return; } -mw.languageToolAction.prototype.openDialog = function ( responseXML, text ) { - var results, range, fragment, surfaceModel, languageCode, previousSpanStart, +mw.languageToolAction.prototype.openDialog = function ( responseXML, mapper ) { + var range, fragment, surfaceModel, languageCode, previousSpanStart, suggestionIndex, suggestion, spanStart, spanEnd, ruleId, cssName; - //console.log( this.constructor.name ); - //this.processXML = mw.languageToolAction.prototype.processXML.bind( this ); - //console.log( responseXML ); - results = this.processXML( responseXML ); + this.suggestions = this.processXML( responseXML ); surfaceModel = this.surface.getModel(); - this.suggestions = results; - //console.log( results ); // TODO: Get the language from VE's data model languageCode = mw.config.get( 'wgPageContentLanguage' ); previousSpanStart = -1; @@ -147,25 +149,25 @@ } previousSpanStart = spanStart; - //console.log( text.substring( spanStart, spanEnd ) ); - range = new ve.Range( spanStart - 1, spanEnd ); + range = new ve.Range( mapper[ spanStart ], mapper[ spanEnd ] ); fragment = surfaceModel.getLinearFragment( range, true ); - //console.log( fragment ); - console.log( fragment.getText() ); - //fragment.annotate( 'set', 'textStyle/bold' ); - console.log( spanStart + , + spanEnd); ruleId = suggestion.ruleid; + if ( ruleId ===
[MediaWiki-commits] [Gerrit] ores: Fix typo - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/223546 Change subject: ores: Fix typo .. ores: Fix typo Change-Id: I1b5a1ebd62c92c816c8777431a2df7f2fa779110 --- M modules/ores/manifests/worker.pp 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/46/223546/1 diff --git a/modules/ores/manifests/worker.pp b/modules/ores/manifests/worker.pp index 7ae42d3..7ebb02c 100644 --- a/modules/ores/manifests/worker.pp +++ b/modules/ores/manifests/worker.pp @@ -1,11 +1,9 @@ class ores::worker { - - celery::worker { 'ores-worker': app = 'ores_celery.application', working_dir = $ores::base::config_path, user= 'www-data', group = 'www-data', -celery_bin_path = ${ores::base::venve_path}/bin/celery, +celery_bin_path = ${ores::base::venv_path}/bin/celery, } } -- To view, visit https://gerrit.wikimedia.org/r/223546 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b5a1ebd62c92c816c8777431a2df7f2fa779110 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] Allow switching to edit mode with null references in state... - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/223547 Change subject: Allow switching to edit mode with null references in statementview .. Allow switching to edit mode with null references in statementview This is split from I9444ae5. This patch does two very closely related things: * It narrows the interface of the private _createReferencesListview method. From a statement to an array of references. * The added isInEditMode adds the possibility to switch to edit mode even if the value is still set to the default null. This was not possible before. I think this even qualifies as a bug. Bug: T87759 Change-Id: Ia87273a384edc7bf47699114a93dbb51569ace3d --- M view/resources/jquery/wikibase/jquery.wikibase.statementview.js 1 file changed, 9 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/47/223547/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js index ece6a7e..ba90614 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js @@ -292,15 +292,10 @@ /** * @private * -* @param {wikibase.datamodel.Statement} [statement] +* @param {wikibase.datamodel.Reference[]} [references] */ - _createReferencesListview: function( statement ) { - if( !statement ) { - return; - } - - var self = this, - references = statement.getReferences(); + _createReferencesListview: function( references ) { + var self = this; var $listview = this.$references.children(); if( !$listview.length ) { @@ -325,7 +320,7 @@ }; } } ), - value: references.toArray() + value: references } ); this._referencesListview = $listview.data( 'listview' ); @@ -472,7 +467,11 @@ ); } - this._createReferencesListview( this.options.value ); + if( this.isInEditMode() || this.options.value ) { + this._createReferencesListview( + this.options.value ? this.options.value.getReferences().toArray() : [] + ); + } return $.Deferred().resolve().promise(); }, -- To view, visit https://gerrit.wikimedia.org/r/223547 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia87273a384edc7bf47699114a93dbb51569ace3d 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] nodepool: add guest disk image utilities - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/223543 Change subject: nodepool: add guest disk image utilities .. nodepool: add guest disk image utilities Install on Nodepool host the package libguestfs-tools guest disk image management system - tools The libguestfs library allows accessing and modifying guest disk images. This package contains the guestfish interactive shell and various virtualization tools. Example usages: $ virt-ls -a ci-dib-jessie-wikimedia-1436281442.qcow2 -R /etc/network ... $ $ virt-cat -a ci-dib-jessie-wikimedia-1436281442.qcow2 \ /etc/network/interfaces.d/eth0 auto eth0 iface eth0 inet dhcp $ Spurts an XML output listing OS metadata and installed packages. $ virt-inspector ci-dib-jessie-wikimedia-1436281442.qcow2 ?xml version=1.0? operatingsystems operatingsystem root/dev/sda1/root namelinux/name archx86_64/arch distrodebian/distro product_name8.1/product_name major_version8/major_version minor_version1/minor_version package_formatdeb/package_format package_managementapt/package_management hostnamedebian/hostname formatinstalled/format mountpoints mountpoint dev=/dev/sda1//mountpoint /mountpoints filesystems filesystem dev=/dev/sda1 typeext4/type labelcloudimg-rootfs/label uuid960587aa-2cab-4d8f-b217-41eebcf115a2/uuid /filesystem /filesystems ... Change-Id: Iece471baec077b455005dbf596cba03cb455e5c9 --- M modules/nodepool/manifests/init.pp 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/223543/1 diff --git a/modules/nodepool/manifests/init.pp b/modules/nodepool/manifests/init.pp index 01099b7..fb87d5b 100644 --- a/modules/nodepool/manifests/init.pp +++ b/modules/nodepool/manifests/init.pp @@ -64,6 +64,12 @@ ensure = present, } +# guest disk image management system - tools +# eg: virt-inspector, virt-ls ... +package { 'libguestfs-tools': +ensure = present, +} + $dib_cache_dir = ${dib_base_path}/cache $dib_images_dir = ${dib_base_path}/images $dib_tmp_dir= ${dib_base_path}/tmp -- To view, visit https://gerrit.wikimedia.org/r/223543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iece471baec077b455005dbf596cba03cb455e5c9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update collector version - change (operations...cassandra-metrics-collector)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/223550 Change subject: update collector version .. update collector version Change-Id: Ie6c266a642fd432154570e72205b3810be4e68d5 --- D lib/cassandra-metrics-collector-1.0.0-20150707.154900-3-jar-with-dependencies.jar A lib/cassandra-metrics-collector-1.0.0-20150707.171846-4-jar-with-dependencies.jar 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/cassandra-metrics-collector refs/changes/50/223550/1 diff --git a/lib/cassandra-metrics-collector-1.0.0-20150707.154900-3-jar-with-dependencies.jar b/lib/cassandra-metrics-collector-1.0.0-20150707.154900-3-jar-with-dependencies.jar deleted file mode 100644 index c7af6de..000 --- a/lib/cassandra-metrics-collector-1.0.0-20150707.154900-3-jar-with-dependencies.jar +++ /dev/null @@ -1 +0,0 @@ -#$# git-fat 302983948374eb3e9c717f16849c897fe735e8f8 2383079 diff --git a/lib/cassandra-metrics-collector-1.0.0-20150707.171846-4-jar-with-dependencies.jar b/lib/cassandra-metrics-collector-1.0.0-20150707.171846-4-jar-with-dependencies.jar new file mode 100644 index 000..b1d7f64 --- /dev/null +++ b/lib/cassandra-metrics-collector-1.0.0-20150707.171846-4-jar-with-dependencies.jar @@ -0,0 +1 @@ +#$# git-fat 40a8babe4fbf17567837b7cc2a2a9ba6c6b07b77 2383139 -- To view, visit https://gerrit.wikimedia.org/r/223550 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6c266a642fd432154570e72205b3810be4e68d5 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/cassandra-metrics-collector 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] update collector version - change (operations...cassandra-metrics-collector)
Filippo Giunchedi has submitted this change and it was merged. Change subject: update collector version .. update collector version Change-Id: Ie6c266a642fd432154570e72205b3810be4e68d5 --- D lib/cassandra-metrics-collector-1.0.0-20150707.154900-3-jar-with-dependencies.jar A lib/cassandra-metrics-collector-1.0.0-20150707.171846-4-jar-with-dependencies.jar 2 files changed, 1 insertion(+), 1 deletion(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/lib/cassandra-metrics-collector-1.0.0-20150707.154900-3-jar-with-dependencies.jar b/lib/cassandra-metrics-collector-1.0.0-20150707.154900-3-jar-with-dependencies.jar deleted file mode 100644 index c7af6de..000 --- a/lib/cassandra-metrics-collector-1.0.0-20150707.154900-3-jar-with-dependencies.jar +++ /dev/null @@ -1 +0,0 @@ -#$# git-fat 302983948374eb3e9c717f16849c897fe735e8f8 2383079 diff --git a/lib/cassandra-metrics-collector-1.0.0-20150707.171846-4-jar-with-dependencies.jar b/lib/cassandra-metrics-collector-1.0.0-20150707.171846-4-jar-with-dependencies.jar new file mode 100644 index 000..b1d7f64 --- /dev/null +++ b/lib/cassandra-metrics-collector-1.0.0-20150707.171846-4-jar-with-dependencies.jar @@ -0,0 +1 @@ +#$# git-fat 40a8babe4fbf17567837b7cc2a2a9ba6c6b07b77 2383139 -- To view, visit https://gerrit.wikimedia.org/r/223550 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6c266a642fd432154570e72205b3810be4e68d5 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/cassandra-metrics-collector Gerrit-Branch: master Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: 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] mediawiki.api: Include 'mobile' target in mediawiki.api.pars... - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/223549 Change subject: mediawiki.api: Include 'mobile' target in mediawiki.api.parse module .. mediawiki.api: Include 'mobile' target in mediawiki.api.parse module Bug: T104940 Change-Id: Ic654f0e38b27b41df13c0423460c1c12c9aec9c3 --- M resources/Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/223549/1 diff --git a/resources/Resources.php b/resources/Resources.php index 182f090..1ec4c1e 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -853,6 +853,7 @@ 'mediawiki.api.parse' = array( 'scripts' = 'resources/src/mediawiki.api/mediawiki.api.parse.js', 'dependencies' = 'mediawiki.api', + 'targets' = array( 'desktop', 'mobile' ), ), 'mediawiki.api.watch' = array( 'scripts' = 'resources/src/mediawiki.api/mediawiki.api.watch.js', -- To view, visit https://gerrit.wikimedia.org/r/223549 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic654f0e38b27b41df13c0423460c1c12c9aec9c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup whitespace and credits ext.LanguageToolAction.js - change (mediawiki...LanguageTool)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/223551 Change subject: Cleanup whitespace and credits ext.LanguageToolAction.js .. Cleanup whitespace and credits ext.LanguageToolAction.js Change-Id: Ide8cadd3bb6016ffb5973536d00686c58309599c --- M modules/ext.LanguageToolAction.js 1 file changed, 49 insertions(+), 42 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LanguageTool refs/changes/51/223551/1 diff --git a/modules/ext.LanguageToolAction.js b/modules/ext.LanguageToolAction.js index 2c794f6..324e034 100644 --- a/modules/ext.LanguageToolAction.js +++ b/modules/ext.LanguageToolAction.js @@ -2,7 +2,10 @@ /*! * VisualEditor UserInterface LanguageToolAction class. * - * @copyright 2011-2015 VisualEditor Team and others; see http://ve.mit-license.org + * @copyright 2011-2015 + * Ankita Kumari + * Eran Rosenthal + * Amir E. Aharoni */ /** @@ -17,6 +20,7 @@ mw.languageToolAction = function VeUiLanguageToolAction( surface ) { // Parent constructor ve.ui.Action.call( this, surface ); + this.surfaceModel = this.surface.getModel(); this.surrogateAttribute = 'onkeypress'; this.surrogateAttributeDelimiter = ---#---; @@ -25,6 +29,7 @@ this.$findResults = $( 'div' ).addClass( 'hiddenSpellError' ); this.initialFragment = null; this.fragments = []; + this.surface.$selections.append( this.$findResults ); }; @@ -59,12 +64,12 @@ var i; for ( i = 0; i obj.children.length; i++ ) { - if ( obj.children[i].type === 'text') { - nodes.push( obj.children[i] ); + if ( obj.children[ i ].type === 'text') { + nodes.push( obj.children[ i ] ); } if ( obj.children[i].children ) { - getTextNodes( obj.children[i] ); + getTextNodes( obj.children[ i ] ); } } } @@ -81,42 +86,41 @@ * @return {NULL} Action was executed */ mw.languageToolAction.prototype.send = function () { - var textNodes, model, text, nodeI, node, nodeRange, nodeText, lang, self, - data, textArray, mapper, i; + var textNodes, model, data, mapper, i, textArray, text, lang, + self = this; textNodes = this.extract(); model = ve.init.target.getSurface().getModel(); - data = ve.init.target.getSurface().getModel().getDocument().data.getData(); + data = model.getDocument().data.getData(); mapper = []; - for( i = 0; i data.length; i++ ){ - if( (typeof data[i]) === 'string' || ( typeof data[i][0] ) === 'string') + for ( i = 0; i data.length; i++ ){ + if ( ( typeof data[i]) === 'string' || ( typeof data[i][0] ) === 'string' ) { mapper.push(i); + } } - textArray = []; - for( i = 0; i mapper.length; i++ ){ + textArray = []; + for ( i = 0; i mapper.length; i++ ) { if( ( typeof data[mapper[i]] ) === 'string'){ textArray[i] = data[mapper[i]]; - } - else{ + } else { textArray[i] = data[mapper[i]][0]; } } - text = textArray.join(''); + text = textArray.join( '' ); // TODO: Get the language from VE's data model lang = mw.config.get( 'wgPageContentLanguage' ); - self = this; $.ajax( { type: 'POST', dataType: 'xml', url: 'http://tools.wmflabs.org/languageproofing/', - data: {language: lang, text: text} - } ) .done( function( responseXML ) { + data: { language: lang, text: text } + } ).done( function( responseXML ) { self.openDialog.apply( self, [ responseXML, mapper ] ); } ); @@ -124,8 +128,9 @@ } mw.languageToolAction.prototype.openDialog = function ( responseXML, mapper ) { - var range, fragment, surfaceModel, languageCode, previousSpanStart, - suggestionIndex, suggestion, spanStart, spanEnd, ruleId, cssName; + var surfaceModel, languageCode, previousSpanStart, + suggestionIndex, suggestion, spanStart, spanEnd, + range, fragment, ruleId, cssName; this.suggestions = this.processXML( responseXML ); surfaceModel = this.surface.getModel(); @@ -158,8 +163,6 @@ } fragment.annotateContent( 'set', 'textStyle/highlight' ); - cssName; - if ( ruleId.indexOf('SPELLER_RULE') = 0 ||
[MediaWiki-commits] [Gerrit] test secret() again on cp1008 - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/223553 Change subject: test secret() again on cp1008 .. test secret() again on cp1008 Change-Id: I6d10a47168e7b9749ad205fbd034df629fe57d9f --- M manifests/site.pp 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/53/223553/1 diff --git a/manifests/site.pp b/manifests/site.pp index 39b3a15..4a368f6 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -368,6 +368,12 @@ node 'cp1008.wikimedia.org' { role cache::text, authdns::testns interface::add_ip6_mapped { 'main': } +file { '/tmp/secme': +owner = 'root', +group = 'root', +mode = '0400', +content = secret('ssl/foo'), +} } node /^cp104[34]\.eqiad\.wmnet$/ { -- To view, visit https://gerrit.wikimedia.org/r/223553 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d10a47168e7b9749ad205fbd034df629fe57d9f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP Upgrade to the latest released version of watir-webdrive... - change (mediawiki/core)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/223556 Change subject: WIP Upgrade to the latest released version of watir-webdriver Ruby gem .. WIP Upgrade to the latest released version of watir-webdriver Ruby gem The new version speeds up element lookup. Bug: T92613 Change-Id: I06bde19f5a2e0b6b3fc7af9c01a66a137ba352ba --- M Gemfile.lock 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/223556/1 diff --git a/Gemfile.lock b/Gemfile.lock index 7aa9dae..a7fcc1f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,7 +26,7 @@ faraday-cookie_jar (0.0.6) faraday (= 0.7.4) http-cookie (~ 1.0.0) -ffi (1.9.8) +ffi (1.9.10) gherkin (2.12.2) multi_json (~ 1.3) headless (1.0.2) @@ -48,7 +48,7 @@ syntax (~ 1.2, = 1.2.0) thor (~ 0.19, = 0.19.1) mime-types (2.6.1) -multi_json (1.11.0) +multi_json (1.11.2) multi_test (0.1.2) multipart-post (2.0.0) netrc (0.10.3) @@ -76,7 +76,7 @@ ruby-progressbar (~ 1.4) ruby-progressbar (1.7.5) rubyzip (1.1.7) -selenium-webdriver (2.45.0) +selenium-webdriver (2.46.2) childprocess (~ 0.5) multi_json (~ 1.0) rubyzip (~ 1.0) @@ -86,8 +86,8 @@ unf (0.1.4) unf_ext unf_ext (0.0.7.1) -watir-webdriver (0.7.0) - selenium-webdriver (= 2.45) +watir-webdriver (0.8.0) + selenium-webdriver (= 2.46.2) websocket (1.2.2) yml_reader (0.5) -- To view, visit https://gerrit.wikimedia.org/r/223556 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06bde19f5a2e0b6b3fc7af9c01a66a137ba352ba Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix section scrolling - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/223555 Change subject: Fix section scrolling .. Fix section scrolling Core code now has a scrollIntoView animation triggered on focus which needs to be cancelled before we scroll to the section heading. Change-Id: I5eb6a5c98b38c2510d2d7f0108fe56e607b34bd6 --- M modules/ve-mw/init/ve.init.mw.Target.js 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/55/223555/1 diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index 62bab98..9022ca2 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -1347,7 +1347,9 @@ var nextNode, offset, target = this, offsetNode = headingNode, - surfaceModel = this.getSurface().getView().getModel(), + surface = this.getSurface(), + surfaceModel = surface.getModel(), + surfaceView = surface.getView(), lastHeadingLevel = -1; // Find next sibling which isn't a heading @@ -1365,8 +1367,11 @@ ); // onDocumentFocus is debounced, so wait for that to happen before setting // the model selection, otherwise it will get reset - this.getSurface().getView().once( 'focus', function () { + surfaceView.once( 'focus', function () { surfaceModel.setLinearSelection( new ve.Range( offset ) ); + // Focussing the document triggers showSelection which calls scrollIntoView + // which uses a jQuery animation, so make sure this is aborted. + $( OO.ui.Element.static.getClosestScrollableContainer( surfaceView.$element[0] ) ).stop( true ); target.scrollToHeading( headingNode ); } ); }; -- To view, visit https://gerrit.wikimedia.org/r/223555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5eb6a5c98b38c2510d2d7f0108fe56e607b34bd6 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] cassandra: alternative metrics collector - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: cassandra: alternative metrics collector .. cassandra: alternative metrics collector Add a new trebuchet-deployed repository to ship a JMX-based metrics collector which pushes metrics to graphite. We've found the built-in dropwizard metrics reporter to be unreliable, given that JMX is used in cassandra to be the source of truth this reporter should provide much more reliable metrics. Bug: T104208 Change-Id: I370c699222002b62352ddcae3a0e73b72329b4b9 --- M hieradata/common/role/deployment.yaml A modules/cassandra/files/cassandra-metrics-collector M modules/cassandra/manifests/metrics.pp 3 files changed, 70 insertions(+), 8 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved Eevans: Looks good to me, but someone else must approve Alexandros Kosiaris: Looks good to me, but someone else must approve diff --git a/hieradata/common/role/deployment.yaml b/hieradata/common/role/deployment.yaml index 6f3323e..007697d 100644 --- a/hieradata/common/role/deployment.yaml +++ b/hieradata/common/role/deployment.yaml @@ -88,3 +88,6 @@ dropwizard/metrics: gitfat_enabled: true upstream: https://gerrit.wikimedia.org/r/operations/software/dropwizard-metrics + cassandra/metrics-collector: +gitfat_enabled: true +upstream: https://gerrit.wikimedia.org/r/operations/software/cassandra-metrics-collector diff --git a/modules/cassandra/files/cassandra-metrics-collector b/modules/cassandra/files/cassandra-metrics-collector new file mode 100755 index 000..956cdcd --- /dev/null +++ b/modules/cassandra/files/cassandra-metrics-collector @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e +set -u + +jarfile=${JARFILE:-/usr/local/lib/cassandra-metrics-collector/cassandra-metrics-collector.jar} +graphite_host=localhost +graphite_port=2003 +metric_prefix=cassandra.$(hostname) + +usage() { +echo usage: $(basename $0) --graphite-host HOST --graphite-port PORT --prefix PREFIX +exit 1 +} + +OPTS=$(getopt -o h --long help,graphite-host:,graphite-port:,prefix: \ + -n $0 -- $@) +if [ $? != 0 ] ; then echo Terminating... 2 ; exit 1 ; fi +eval set -- $OPTS + +while true; do + case $1 in +--graphite-host ) graphite_host=$2 +shift 2 ;; +--graphite-port ) graphite_port=$2 +shift 2 ;; +--prefix ) metric_prefix=$2 +shift 2 ;; +-h | --help ) usage ;; +-- ) shift; break ;; +* ) break ;; + esac +done + +java -jar $jarfile localhost 7199 ${graphite_host} ${graphite_port} ${metric_prefix} diff --git a/modules/cassandra/manifests/metrics.pp b/modules/cassandra/manifests/metrics.pp index 28b03a8..8a0a2cd 100644 --- a/modules/cassandra/manifests/metrics.pp +++ b/modules/cassandra/manifests/metrics.pp @@ -26,21 +26,45 @@ validate_string($graphite_host) validate_string($graphite_port) -package { 'dropwizard/metrics': +package { 'cassandra/metrics-collector': ensure = present, provider = 'trebuchet', } -file { '/usr/share/cassandra/lib/metrics-graphite.jar': +file { '/usr/local/lib/cassandra-metrics-collector': +owner = 'root', +group = 'root', +mode = '0555', +ensure = 'directory', +} + +file { '/usr/local/lib/cassandra-metrics-collector/cassandra-metrics-collector.jar': ensure = 'link', -target = '/srv/deployment/dropwizard/metrics/lib/metrics-graphite-2.2.0.jar', -require = Package['dropwizard/metrics'], +target = '/srv/deployment/cassandra/metrics-collector/lib/cassandra-metrics-collector-1.0.0-20150707.171846-4-jar-with-dependencies.jar', +require = Package['cassandra/metrics-collector'], +} + +file { '/usr/local/bin/cassandra-metrics-collector': +source = puppet:///modules/${module_name}/cassandra-metrics-collector, +owner = 'root', +group = 'root', +mode= '0555', +} + +cron { 'cassandra-metrics-collector': +ensure = present, +user= 'cassandra', +command = flock --wait 2 /usr/local/bin/cassandra-metrics-collector --graphite-host ${graphite_host} --graphite-port ${graphite_port} --prefix ${graphite_prefix}, +minute = '*', +require = Package['cassandra/metrics-collector'], +} + +# built-in cassandra metrics reporter, T104208 +file { '/usr/share/cassandra/lib/metrics-graphite.jar': +ensure = absent, } file { '/etc/cassandra/metrics.yaml': -content = template(${module_name}/metrics.yaml.erb), -owner = 'cassandra', -group = 'cassandra', -mode= '0444', +ensure = absent, } } -- To view, visit https://gerrit.wikimedia.org/r/223041 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I370c699222002b62352ddcae3a0e73b72329b4b9
[MediaWiki-commits] [Gerrit] Make page_props.pp_sortkey a double instead of float - change (mediawiki/core)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/223552 Change subject: Make page_props.pp_sortkey a double instead of float .. Make page_props.pp_sortkey a double instead of float I'd like to store a timestamp in there (to sort pages based on the most recent change in a Flow topic) However, float's precision doesn't suffice to store even a TS_UNIX. A double would be plenty to store TS_UNIX or even TS_MW. Change-Id: I65e397990d9d2fda7dbd7a96e9247aa5f159036a --- M includes/installer/MysqlUpdater.php M includes/installer/SqliteUpdater.php A maintenance/archives/patch-pp_sortkey_double.sql A maintenance/sqlite/archives/patch-pp_sortkey_double.sql M maintenance/tables.sql 5 files changed, 21 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/223552/1 diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index 36d2c1d..e405519 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -273,6 +273,7 @@ array( 'doUserNewTalkUseridUnsigned' ), // note this patch covers other _comment and _description fields too array( 'modifyField', 'recentchanges', 'rc_comment', 'patch-editsummary-length.sql' ), + array( 'modifyField', 'page_props', 'pp_sortkey', 'patch-pp_sortkey_double.sql' ), ); } diff --git a/includes/installer/SqliteUpdater.php b/includes/installer/SqliteUpdater.php index 2693be0..06805f5 100644 --- a/includes/installer/SqliteUpdater.php +++ b/includes/installer/SqliteUpdater.php @@ -143,6 +143,7 @@ array( 'dropField', 'site_stats', 'ss_total_views', 'patch-drop-ss_total_views.sql' ), array( 'dropField', 'page', 'page_counter', 'patch-drop-page_counter.sql' ), array( 'modifyField', 'filearchive', 'fa_deleted_reason', 'patch-editsummary-length.sql' ), + array( 'modifyField', 'page_props', 'pp_sortkey', 'patch-pp_sortkey_double.sql' ), ); } diff --git a/maintenance/archives/patch-pp_sortkey_double.sql b/maintenance/archives/patch-pp_sortkey_double.sql new file mode 100644 index 000..8a01022 --- /dev/null +++ b/maintenance/archives/patch-pp_sortkey_double.sql @@ -0,0 +1 @@ +ALTER TABLE /*_*/page_props MODIFY pp_sortkey DOUBLE DEFAULT NULL; diff --git a/maintenance/sqlite/archives/patch-pp_sortkey_double.sql b/maintenance/sqlite/archives/patch-pp_sortkey_double.sql new file mode 100644 index 000..b46fb9d --- /dev/null +++ b/maintenance/sqlite/archives/patch-pp_sortkey_double.sql @@ -0,0 +1,17 @@ +ALTER TABLE /*_*/page_props RENAME TO /*_*/page_props_temp; + +CREATE TABLE /*_*/page_props ( + pp_page int NOT NULL, + pp_propname varbinary(60) NOT NULL, + pp_value blob NOT NULL, + pp_sortkey double DEFAULT NULL +) /*$wgDBTableOptions*/; + +INSERT INTO /*_*/page_props (pp_page, pp_propname, pp_value, pp_sortkey) +SELECT pp_page, pp_propname, pp_value, pp_sortkey FROM /*_*/page_props_temp; + +DROP TABLE /*_*/page_props_temp; + +CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propname); +CREATE UNIQUE INDEX /*i*/pp_propname_page ON /*_*/page_props (pp_propname,pp_page); +CREATE UNIQUE INDEX /*i*/pp_propname_sortkey_page ON /*_*/page_props (pp_propname,pp_sortkey,pp_page); diff --git a/maintenance/tables.sql b/maintenance/tables.sql index de36d26..97fdea5 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -1427,7 +1427,7 @@ pp_page int NOT NULL, pp_propname varbinary(60) NOT NULL, pp_value blob NOT NULL, - pp_sortkey float DEFAULT NULL + pp_sortkey double DEFAULT NULL ) /*$wgDBTableOptions*/; CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propname); -- To view, visit https://gerrit.wikimedia.org/r/223552 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65e397990d9d2fda7dbd7a96e9247aa5f159036a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show the gray interlanguage link only when viewing the article - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/223554 Change subject: Show the gray interlanguage link only when viewing the article .. Show the gray interlanguage link only when viewing the article Bug: T105158 Change-Id: I13fb04eaad5aa786062f38b861f61a5a19ce4774 --- M ContentTranslation.hooks.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/54/223554/1 diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php index 1dff85f..3cf829e 100644 --- a/ContentTranslation.hooks.php +++ b/ContentTranslation.hooks.php @@ -67,6 +67,7 @@ } if ( $title-inNamespace( NS_MAIN ) + Action::getActionName( $out-getContext() ) === 'view' $title-exists() ) { $out-addModules( 'ext.cx.interlanguagelink' ); -- To view, visit https://gerrit.wikimedia.org/r/223554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13fb04eaad5aa786062f38b861f61a5a19ce4774 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] When aborting EnhancedRC block line, block should reflect that - change (mediawiki/core)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/223557 Change subject: When aborting EnhancedRC block line, block should reflect that .. When aborting EnhancedRC block line, block should reflect that It was possible to abort the rendering of all block lines, but the block would still be rendered (with nothing inside). It would also render a x changes link, even though that x is no longer correct. Change-Id: I94ae68e80461dcfbf328683522ea6cb58c6c5753 --- M includes/changes/EnhancedChangesList.php 1 file changed, 133 insertions(+), 107 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/57/223557/1 diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index 9635c17..e4cd042 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -270,7 +270,15 @@ $queryParams['curid'] = $curId; - $r .= $this-getLogText( $block, $queryParams, $allLogs, $isnew, $namehidden ); + # Sub-entries + $lines = array(); + foreach ( $block as $rcObj ) { + $lines[] = $this-getLineData( $block, $rcObj, $queryParams ); + } + # strip empty (aborted by hook) lines + $lines = array_filter( $lines ); + + $r .= $this-getLogText( $block, $queryParams, $allLogs, $isnew, $namehidden, $lines ); $r .= ' span class=mw-changeslist-separator. ./span '; @@ -299,116 +307,133 @@ $r .= $this-numberofWatchingusers( $block[0]-numberofWatchingusers ); $r .= '/td/tr'; - # Sub-entries - foreach ( $block as $rcObj ) { - # Classes to apply -- TODO implement - $classes = array(); - $type = $rcObj-mAttribs['rc_type']; - $data = array(); - - $trClass = $rcObj-watched $rcObj-mAttribs['rc_timestamp'] = $rcObj-watched - ? ' class=mw-enhanced-watched' : ''; - $separator = ' span class=mw-changeslist-separator. ./span '; - - $data['recentChangesFlags'] = array( - 'newpage' = $type == RC_NEW, - 'minor' = $rcObj-mAttribs['rc_minor'], - 'unpatrolled' = $rcObj-unpatrolled, - 'bot' = $rcObj-mAttribs['rc_bot'], - ); - - $params = $queryParams; - - if ( $rcObj-mAttribs['rc_this_oldid'] != 0 ) { - $params['oldid'] = $rcObj-mAttribs['rc_this_oldid']; - } - - # Log timestamp - if ( $type == RC_LOG ) { - $link = $rcObj-timestamp; - # Revision link - } elseif ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this-getUser() ) ) { - $link = 'span class=history-deleted' . $rcObj-timestamp . '/span '; - } else { - $link = Linker::linkKnown( - $rcObj-getTitle(), - $rcObj-timestamp, - array(), - $params - ); - if ( $this-isDeleted( $rcObj, Revision::DELETED_TEXT ) ) { - $link = 'span class=history-deleted' . $link . '/span '; - } - } - $data['timestampLink'] = $link; - - $currentAndLastLinks = ''; - if ( !$type == RC_LOG || $type == RC_NEW ) { - $currentAndLastLinks .= ' ' . $this-msg( 'parentheses' )-rawParams( - $rcObj-curlink . - $this-message['pipe-separator'] . - $rcObj-lastlink - )-escaped(); - } - $data['currentAndLastLinks'] = $currentAndLastLinks; - $data['separatorAfterCurrentAndLastLinks'] = $separator; - - # Character diff - if ( $RCShowChangedSize ) { - $cd = $this-formatCharacterDifference( $rcObj ); - if ( $cd !== '' ) { - $data['characterDiff'] = $cd; -
[MediaWiki-commits] [Gerrit] Don't show select and share tips on Gingerbread - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Don't show select and share tips on Gingerbread .. Don't show select and share tips on Gingerbread Gingerbread doesn't support long press in its WebView. Don't show impossible tips. Change-Id: If094a95f8ac726f4918ba127d137d410cf70a057 --- M wikipedia/src/main/java/org/wikipedia/WikipediaApp.java 1 file changed, 9 insertions(+), 4 deletions(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java index 684fe39..e6910a5 100644 --- a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java +++ b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java @@ -455,11 +455,16 @@ } public boolean isFeatureSelectTextAndShareTutorialEnabled() { -if (Prefs.hasFeatureSelectTextAndShareTutorial()) { -return Prefs.isFeatureSelectTextAndShareTutorialEnabled(); +boolean enabled = false; +// Select text does not work on Gingerbread. +if (ApiUtil.hasHoneyComb()) { +if (Prefs.hasFeatureSelectTextAndShareTutorial()) { +enabled = Prefs.isFeatureSelectTextAndShareTutorialEnabled(); +} else { +enabled = new Random().nextInt(2) == 0; +Prefs.setFeatureSelectTextAndShareTutorialEnabled(enabled); +} } -boolean enabled = new Random().nextInt(2) == 0; -Prefs.setFeatureSelectTextAndShareTutorialEnabled(enabled); return enabled; } -- To view, visit https://gerrit.wikimedia.org/r/223502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If094a95f8ac726f4918ba127d137d410cf70a057 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski sniedziel...@wikimedia.org Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: Mholloway mhollo...@wikimedia.org Gerrit-Reviewer: Niedzielski sniedziel...@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 link preview and morelike to developer settings - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Add link preview and morelike to developer settings .. Add link preview and morelike to developer settings Change-Id: I3f7bd859c81dff5a83054215dcaa68960302d372 --- M wikipedia/res/xml/developer_preferences.xml 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/res/xml/developer_preferences.xml b/wikipedia/res/xml/developer_preferences.xml index c4c2e06..209bc5f 100644 --- a/wikipedia/res/xml/developer_preferences.xml +++ b/wikipedia/res/xml/developer_preferences.xml @@ -46,6 +46,15 @@ android:title=@string/preference_key_language_mru android:inputType=textVisiblePassword / +org.wikipedia.settings.IntPreference +style=@style/IntPreference +android:key=@string/preference_key_link_preview_version +android:title=@string/preference_key_link_preview_version / + +CheckBoxPreference +android:key=@string/preference_key_more_like_search_enabled +android:title=@string/preference_key_more_like_search_enabled / + CheckBoxPreference android:key=@string/preference_key_exp_page_load android:title=@string/preference_key_exp_page_load / -- To view, visit https://gerrit.wikimedia.org/r/223504 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f7bd859c81dff5a83054215dcaa68960302d372 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski sniedziel...@wikimedia.org Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: Mholloway mhollo...@wikimedia.org Gerrit-Reviewer: Niedzielski sniedziel...@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 ULS_VERSION when using extension registration - change (mediawiki...UniversalLanguageSelector)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/223562 Change subject: Set ULS_VERSION when using extension registration .. Set ULS_VERSION when using extension registration This unbreaks Translate and CleanChanges who depend on the constant. Change-Id: I8bfb9e2aaeb77351beefb130f71daeee4e07afae --- M UniversalLanguageSelector.hooks.php M extension.json 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/62/223562/1 diff --git a/UniversalLanguageSelector.hooks.php b/UniversalLanguageSelector.hooks.php index 4c7a553..5724deb 100644 --- a/UniversalLanguageSelector.hooks.php +++ b/UniversalLanguageSelector.hooks.php @@ -19,6 +19,11 @@ */ class UniversalLanguageSelectorHooks { + // Used when extension registration in use which skips the main php file + public static function setVersionConstant() { + define( 'ULS_VERSION', '2015-06-08' ); + } + /** * Whether ULS user toolbar (language selection and settings) is enabled. * diff --git a/extension.json b/extension.json index 5ef3b11..7625015 100644 --- a/extension.json +++ b/extension.json @@ -88,6 +88,7 @@ @ULSCompactLinks: Whether the \Compact language links\ Beta Feature is exposed. Requires $wgULSPosition to be \interlanguage\. Defaults to false. @since 2014.03, ULSCompactLinks: false }, + callback: UniversalLanguageSelectorHooks::setVersionConstant, ResourceModules: { ext.uls.languagenames: { class: ResourceLoaderULSModule -- To view, visit https://gerrit.wikimedia.org/r/223562 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8bfb9e2aaeb77351beefb130f71daeee4e07afae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: wmf/1.26wmf13 Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: 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] Added table name param to CargoUtils::recreateDBTablesForT... - change (mediawiki...Cargo)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/223565 Change subject: Added table name param to CargoUtils::recreateDBTablesForTemplate() .. Added table name param to CargoUtils::recreateDBTablesForTemplate() Change-Id: I65fd9a9b60fb8593f27105f16503e2dd0c024cc8 --- M CargoUtils.php 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/65/223565/1 diff --git a/CargoUtils.php b/CargoUtils.php index d74e04c..e8bda92 100644 --- a/CargoUtils.php +++ b/CargoUtils.php @@ -286,7 +286,7 @@ * @return boolean * @throws MWException */ - public static function recreateDBTablesForTemplate( $templatePageID ) { + public static function recreateDBTablesForTemplate( $templatePageID, $tableName = null ) { $tableSchemaString = self::getPageProp( $templatePageID, 'CargoFields' ); // First, see if there even is DB storage for this template - // if not, exit. @@ -312,7 +312,10 @@ $dbr-delete( 'cargo_tables', array( 'template_id' = $templatePageID ) ); - $tableName = self::getPageProp( $templatePageID, 'CargoTableName' ); + if ( $tableName == null ) { + $tableName = self::getPageProp( $templatePageID, 'CargoTableName' ); + } + // Unfortunately, there is not yet a 'CREATE TABLE' wrapper // in the MediaWiki DB API, so we have to call SQL directly. $dbType = $cdb-getType(); -- To view, visit https://gerrit.wikimedia.org/r/223565 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65fd9a9b60fb8593f27105f16503e2dd0c024cc8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use getStatements instead of getClaims in EntityContent subc... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Use getStatements instead of getClaims in EntityContent subclasses .. Use getStatements instead of getClaims in EntityContent subclasses Bug: T104895 Change-Id: I0709f49dd46714286b2bc2fc558facc498615701 --- M repo/includes/content/EntityContent.php M repo/includes/content/ItemContent.php M repo/includes/content/PropertyContent.php 3 files changed, 23 insertions(+), 8 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index 3577335..7323170 100644 --- a/repo/includes/content/EntityContent.php +++ b/repo/includes/content/EntityContent.php @@ -740,9 +740,7 @@ * * @see getEntityStatus() * -* Keys used: -* - wb-status: the entity's status, according to getEntityStatus() -* - wb-claims: the number of claims in the entity +* Records the entity's status in the 'wb-status' key. * * @return array A map from property names to property values. */ @@ -751,10 +749,7 @@ return array(); } - $properties = array( - 'wb-claims' = count( $this-getEntity()-getClaims() ), - ); - + $properties = array(); $status = $this-getEntityStatus(); if ( $status !== self::STATUS_NONE ) { diff --git a/repo/includes/content/ItemContent.php b/repo/includes/content/ItemContent.php index ee013da..99fc14c 100644 --- a/repo/includes/content/ItemContent.php +++ b/repo/includes/content/ItemContent.php @@ -209,7 +209,8 @@ /** * @see EntityContent::getEntityPageProperties * -* Records the number of sitelinks in the 'wb-sitelinks' key. +* Records the number of statements in the 'wb-claims' key +* and the number of sitelinks in the 'wb-sitelinks' key. * * @return array A map from property names to property values. */ @@ -219,6 +220,7 @@ } $properties = parent::getEntityPageProperties(); + $properties['wb-claims'] = $this-getItem()-getStatements()-count(); $properties['wb-sitelinks'] = $this-getItem()-getSiteLinkList()-count(); return $properties; diff --git a/repo/includes/content/PropertyContent.php b/repo/includes/content/PropertyContent.php index b8b40d0..c8f7c51 100644 --- a/repo/includes/content/PropertyContent.php +++ b/repo/includes/content/PropertyContent.php @@ -92,6 +92,24 @@ } /** +* @see EntityContent::getEntityPageProperties +* +* Records the number of statements in the 'wb-claims' key. +* +* @return array A map from property names to property values. +*/ + public function getEntityPageProperties() { + if ( $this-isRedirect() ) { + return array(); + } + + $properties = parent::getEntityPageProperties(); + $properties['wb-claims'] = $this-getProperty()-getStatements()-count(); + + return $properties; + } + + /** * Checks if this PropertyContent is valid for saving. * * Returns false if the entity does not have a DataType set. -- To view, visit https://gerrit.wikimedia.org/r/222895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0709f49dd46714286b2bc2fc558facc498615701 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Bene benestar.wikime...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com 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] Avoid a little bit of code duplication in EntityContent classes - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/223563 Change subject: Avoid a little bit of code duplication in EntityContent classes .. Avoid a little bit of code duplication in EntityContent classes Bug: T104895 Change-Id: I0f0342b4609e5d8da968f59cb5343e1fc8531556 --- M repo/includes/content/EntityContent.php M repo/includes/content/ItemContent.php M repo/includes/content/PropertyContent.php 3 files changed, 10 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/63/223563/1 diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index 7323170..55c0531 100644 --- a/repo/includes/content/EntityContent.php +++ b/repo/includes/content/EntityContent.php @@ -292,7 +292,6 @@ $output = $outputGenerator-getParserOutput( $entityRevision, $options, $generateHtml ); - // register page properties $this-applyEntityPageProperties( $output ); return $output; @@ -726,8 +725,11 @@ * @param ParserOutput $output */ private function applyEntityPageProperties( ParserOutput $output ) { - $properties = $this-getEntityPageProperties(); + if ( $this-isRedirect() ) { + return; + } + $properties = $this-getEntityPageProperties(); foreach ( $properties as $name = $value ) { $output-setProperty( $name, $value ); } @@ -745,13 +747,9 @@ * @return array A map from property names to property values. */ public function getEntityPageProperties() { - if ( $this-isRedirect() ) { - return array(); - } - $properties = array(); - $status = $this-getEntityStatus(); + $status = $this-getEntityStatus(); if ( $status !== self::STATUS_NONE ) { $properties['wb-status'] = $status; } diff --git a/repo/includes/content/ItemContent.php b/repo/includes/content/ItemContent.php index 99fc14c..f627d77 100644 --- a/repo/includes/content/ItemContent.php +++ b/repo/includes/content/ItemContent.php @@ -215,13 +215,11 @@ * @return array A map from property names to property values. */ public function getEntityPageProperties() { - if ( $this-isRedirect() ) { - return array(); - } - $properties = parent::getEntityPageProperties(); - $properties['wb-claims'] = $this-getItem()-getStatements()-count(); - $properties['wb-sitelinks'] = $this-getItem()-getSiteLinkList()-count(); + + $item = $this-getItem(); + $properties['wb-claims'] = $item-getStatements()-count(); + $properties['wb-sitelinks'] = $item-getSiteLinkList()-count(); return $properties; } diff --git a/repo/includes/content/PropertyContent.php b/repo/includes/content/PropertyContent.php index c8f7c51..26beaa5 100644 --- a/repo/includes/content/PropertyContent.php +++ b/repo/includes/content/PropertyContent.php @@ -99,11 +99,8 @@ * @return array A map from property names to property values. */ public function getEntityPageProperties() { - if ( $this-isRedirect() ) { - return array(); - } - $properties = parent::getEntityPageProperties(); + $properties['wb-claims'] = $this-getProperty()-getStatements()-count(); return $properties; -- To view, visit https://gerrit.wikimedia.org/r/223563 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f0342b4609e5d8da968f59cb5343e1fc8531556 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] test secret() again on cp1008 - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: test secret() again on cp1008 .. test secret() again on cp1008 Change-Id: I6d10a47168e7b9749ad205fbd034df629fe57d9f --- M manifests/site.pp 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 39b3a15..4a368f6 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -368,6 +368,12 @@ node 'cp1008.wikimedia.org' { role cache::text, authdns::testns interface::add_ip6_mapped { 'main': } +file { '/tmp/secme': +owner = 'root', +group = 'root', +mode = '0400', +content = secret('ssl/foo'), +} } node /^cp104[34]\.eqiad\.wmnet$/ { -- To view, visit https://gerrit.wikimedia.org/r/223553 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d10a47168e7b9749ad205fbd034df629fe57d9f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] enable voting for pep8/pyflakes for adminbot repo - change (integration/config)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/223559 Change subject: enable voting for pep8/pyflakes for adminbot repo .. enable voting for pep8/pyflakes for adminbot repo after Elee fixed the issues and per Jan's comment on https://gerrit.wikimedia.org/r/#/c/223046/ Change-Id: Icfba0aac8667904f691ae036211e62c288399096 --- M zuul/layout.yaml 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/59/223559/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index c2dea00..e5ea95f 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -1564,10 +1564,6 @@ voting: false - name: mw-tools-codeutils-pep8 voting: false - - name: operations-debs-adminbot-pep8 -voting: false - - name: operations-debs-adminbot-pyflakes -voting: false - name: pywikibot-bots-CommonsDelinker-tox-flake8 voting: false - name: pywikibot-compat-pyflakes -- To view, visit https://gerrit.wikimedia.org/r/223559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icfba0aac8667904f691ae036211e62c288399096 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] monitoring: detect saturation of nf_conntrack table - change (operations/puppet)
Matanya has uploaded a new change for review. https://gerrit.wikimedia.org/r/223560 Change subject: monitoring: detect saturation of nf_conntrack table .. monitoring: detect saturation of nf_conntrack table bug: T105154 Change-Id: Idf21587618d76dc0fb685f17320c4004cd37c05c --- A modules/base/files/firewall/check_conntrack.py M modules/base/manifests/firewall.pp M modules/nagios_common/files/checkcommands.cfg 3 files changed, 54 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/60/223560/1 diff --git a/modules/base/files/firewall/check_conntrack.py b/modules/base/files/firewall/check_conntrack.py new file mode 100644 index 000..fe86fc5 --- /dev/null +++ b/modules/base/files/firewall/check_conntrack.py @@ -0,0 +1,34 @@ +#!/usr/bin/python +import string + +def _get_sysctl(self, name): + +path = '/proc/sys/' + name.translate(string.maketrans('.', '/')) + +try: +with open(path) as f: +value = f.read().rstrip('\n') +return value + +except IOError: +return None + +def collect(self): + +max_value = self._get_sysctl('net.netfilter.nf_conntrack_max') +if max_value is not None and max_value 0: +count_value = self._get_sysctl('net.netfilter.nf_conntrack_count') +full = count_value/max_value*100 +if int(full) = 80 and = 90: +print Warning: nf_conntrack is %s % full % (full) +sys.exit(1) +elif int(full) = 90: +print Critical: nf_conntrack is %s % full % (full) +sys.exit(2) +elif int(full) 80: +print OK: nf_conntrack is %s % full % (full) +sys.exit(0) +else: +print UNKNOWN: error reading nf_conntrack +sys.exit(3) + diff --git a/modules/base/manifests/firewall.pp b/modules/base/manifests/firewall.pp index 561a061..68f3fbf 100644 --- a/modules/base/manifests/firewall.pp +++ b/modules/base/manifests/firewall.pp @@ -31,4 +31,17 @@ ensure = $ensure, rule = 'saddr $MONITORING_HOSTS ACCEPT;', } -} \ No newline at end of file + +file { '/usr/lib/nagios/plugins/check_conntrack': +source = 'puppet:///modules/base/firewall/check_conntrack.py', +mode = '0755', +} + +nrpe::monitor_service { 'conntrack_table_size': +ensure= 'present', +description = 'Check size of conntrack table', +nrpe_command = '/usr/lib/nagios/plugins/check_conntrack', +require = File['/usr/lib/nagios/plugins/check_conntrack'], +contact_group = 'admins', +} +} diff --git a/modules/nagios_common/files/checkcommands.cfg b/modules/nagios_common/files/checkcommands.cfg index 866f949..44b16f5 100644 --- a/modules/nagios_common/files/checkcommands.cfg +++ b/modules/nagios_common/files/checkcommands.cfg @@ -482,3 +482,9 @@ command_namecheck_http_zotero_lvs_on_port command_line$USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$ -p $ARG2$ -P '[{itemType:journalArticle}]' -T 'application/json' -u $ARG3$ } + +define command { +command_namenrpe_check_conntrack +command_line$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_conntrack +} + -- To view, visit https://gerrit.wikimedia.org/r/223560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf21587618d76dc0fb685f17320c4004cd37c05c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya mata...@foss.co.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: remove NonNull annotation on primitive - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: remove NonNull annotation on primitive .. Hygiene: remove NonNull annotation on primitive Change-Id: I51402ecd6d806d43465df97c73914ee53c7ca317 --- M wikipedia/src/main/java/org/wikipedia/settings/Prefs.java 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java b/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java index 7d1a480..f58567e 100644 --- a/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java +++ b/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java @@ -82,7 +82,6 @@ remove(getCookiesForDomainKey(domain)); } -@NonNull public static boolean isShowDeveloperSettingsEnabled() { return getBoolean(R.string.preference_key_show_developer_settings, WikipediaApp.getInstance().isDevRelease()); -- To view, visit https://gerrit.wikimedia.org/r/223503 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I51402ecd6d806d43465df97c73914ee53c7ca317 Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski sniedziel...@wikimedia.org Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: Mholloway mhollo...@wikimedia.org Gerrit-Reviewer: Niedzielski sniedziel...@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] WikidataPageBanner hide icon placeholder if empty - change (mediawiki...WikidataPageBanner)
Sumit has uploaded a new change for review. https://gerrit.wikimedia.org/r/223558 Change subject: WikidataPageBanner hide icon placeholder if empty .. WikidataPageBanner hide icon placeholder if empty Bug: T105163 Change-Id: I1ac2edc605bb262e751bdbebb3d1109f9c30b6ab --- M includes/WikidataPageBanner.functions.php M templates/banner.mustache 2 files changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/58/223558/1 diff --git a/includes/WikidataPageBanner.functions.php b/includes/WikidataPageBanner.functions.php index 7a3d83d..503d025 100644 --- a/includes/WikidataPageBanner.functions.php +++ b/includes/WikidataPageBanner.functions.php @@ -33,7 +33,8 @@ ) ); $iconsToAdd[] = array( 'icon' = $icon ); } + $paramsForBannerTemplate['icons'] = true; + $paramsForBannerTemplate['iconSet'] = $iconsToAdd; } - $paramsForBannerTemplate['icons'] = $iconsToAdd; } } diff --git a/templates/banner.mustache b/templates/banner.mustache index a6e6ed7..e2c7564 100644 --- a/templates/banner.mustache +++ b/templates/banner.mustache @@ -3,11 +3,13 @@ div class=topbanner div class=name{{title}}/div a title={{tooltip}} href={{bannerfile}}img src={{banner}} srcset={{srcset}} class=wpb-banner-image/a + {{#icons}} div class=iconbox - {{#icons}} + {{#iconSet}} {{{icon}}} - {{/icons}} + {{/iconSet}} /div + {{/icons}} div class=topbanner-toc/div /div /div -- To view, visit https://gerrit.wikimedia.org/r/223558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ac2edc605bb262e751bdbebb3d1109f9c30b6ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Sumit asthana.sumi...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] added year into logging, made pep8 and pyflakes happy - change (operations...adminbot)
Dzahn has submitted this change and it was merged. Change subject: added year into logging, made pep8 and pyflakes happy .. added year into logging, made pep8 and pyflakes happy Bug: T85803 Change-Id: Ia1a8bddfa60fc50d95cfbc2227ca395b8b68f7c4 --- M adminlog.py M adminlogbot.py M statusnet.py 3 files changed, 18 insertions(+), 18 deletions(-) Approvals: Negative24: Looks good to me, but someone else must approve JanZerebecki: Looks good to me, but someone else must approve Dzahn: Looks good to me, approved diff --git a/adminlog.py b/adminlog.py index 240c778..d20cc42 100644 --- a/adminlog.py +++ b/adminlog.py @@ -23,7 +23,7 @@ page = site.Pages[pagename] if page.redirect: - page = next(p.links()) + page = next(page.links()) text = page.edit() lines = text.split('\n') @@ -31,6 +31,7 @@ # Um, check the date now = datetime.datetime.utcnow() logline = * %02d:%02d %s: %s % (now.hour, now.minute, author, message) + year = str(now.year) month = str(now.month) day = str(now.day) # Try extracting latest date header @@ -38,12 +39,13 @@ for line in lines: position += 1 if line.startswith(header): - undef, month, day, undef = line.split( , 3) + undef, year, month, day, undef = line.split( , 4) break - if months[now.month - 1] != month or now.day != int(day): + if now.year != int(year) or months[ + now.month - 1] != month or now.day != int(day): lines.insert(0, ) lines.insert(0, logline) - lines.insert(0, %s %s %d %s % (header, months[now.month - 1], + lines.insert(0, %s %d %s %d %s % (header, now.year, months[now.month - 1], now.day, header)) else: lines.insert(position, logline) diff --git a/adminlogbot.py b/adminlogbot.py index 1b96b3f..2776729 100755 --- a/adminlogbot.py +++ b/adminlogbot.py @@ -13,8 +13,6 @@ import time import urllib -import traceback - LOG_FORMAT = %(asctime)-15s %(levelname)s: %(message)s @@ -33,7 +31,8 @@ ircbot.SingleServerIRCBot.connect(self, *args, **kwargs) def get_version(self): -return 'Wikimedia Server Admin Log bot -- https://wikitech.wikimedia.org/wiki/Morebots' +return ('Wikimedia Server Admin Log bot -- ' +'https://wikitech.wikimedia.org/wiki/Morebots') def get_cloak(self, source): if re.search(/, source) and re.search(@, source): @@ -118,12 +117,10 @@ for obj in projectdata: projects.append(obj[1][cn][0]) - if self.config.service_group_rdn: sgdata = ds.search_s(self.config.service_group_rdn + - , + base, - ldap.SCOPE_SUBTREE, - (objectclass=groupofnames)) +, + base, ldap.SCOPE_SUBTREE, +(objectclass=groupofnames)) if not sgdata: self.connection.privmsg(event.target(), Can't contact LDAP @@ -137,7 +134,7 @@ self.connection.privmsg(event.target(), Error reading project list from LDAP.) -except irclib.ServerNotConnectedError, e: +except irclib.ServerNotConnectedError: logging.debug(Server connection error when sending message) return projects @@ -169,7 +166,7 @@ try: self.connection.privmsg(event.target(), To log a message, type !log msg.) -except irclib.ServerNotConnectedError, e: +except irclib.ServerNotConnectedError: logging.debug(Server connection error when sending message) elif line.lower().startswith(!log ): @@ -222,7 +219,7 @@ to the trust list or your user page.) return -except irclib.ServerNotConnectedError, e: +except irclib.ServerNotConnectedError: logging.debug(Server connection error when sending message) if self.config.enable_projects: @@ -237,7 +234,7 @@ self.connection.privmsg(event.target(), Message missing. Nothing logged.)
[MediaWiki-commits] [Gerrit] Allow full server configuration with array syntax - change (mediawiki...Elastica)
jenkins-bot has submitted this change and it was merged. Change subject: Allow full server configuration with array syntax .. Allow full server configuration with array syntax I need to run ES on a non-default port and this change is needed to allow me to do that with CirrusSearch. Change-Id: I441e056f4aad68f884eb03f7e1ebdccc5c22e173 --- M ElasticaConnection.php 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Manybubbles: Looks good to me, approved Tjones: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/ElasticaConnection.php b/ElasticaConnection.php index bd3917b..2e05a1f 100644 --- a/ElasticaConnection.php +++ b/ElasticaConnection.php @@ -76,7 +76,11 @@ // Setup the Elastica servers $servers = array(); foreach ( $this-getServerList() as $server ) { - $servers[] = array( 'host' = $server ); + if ( is_array( $server ) ) { + $servers[] = $server; + } else { + $servers[] = array( 'host' = $server ); + } } $self = $this; -- To view, visit https://gerrit.wikimedia.org/r/223392 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I441e056f4aad68f884eb03f7e1ebdccc5c22e173 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Elastica Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: DCausse dcau...@wikimedia.org Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Tjones tjo...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use child selectors in popup widget to apply rules correctly - change (oojs/ui)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/223561 Change subject: Use child selectors in popup widget to apply rules correctly .. Use child selectors in popup widget to apply rules correctly Was causing rendering issues in Firefox by applying main label styles to hidden label of close button. Bug: T105164 Change-Id: I51ffc41834703ff1f066e8b7373df06ceac98e42 --- M src/styles/widgets/PopupWidget.less M src/themes/apex/widgets.less M src/themes/mediawiki/widgets.less 3 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/61/223561/1 diff --git a/src/styles/widgets/PopupWidget.less b/src/styles/widgets/PopupWidget.less index d8fdd40..bfa7eab 100644 --- a/src/styles/widgets/PopupWidget.less +++ b/src/styles/widgets/PopupWidget.less @@ -30,11 +30,11 @@ -head { .oo-ui-unselectable(); - .oo-ui-buttonWidget { +.oo-ui-buttonWidget { float: right; } - .oo-ui-labelElement-label { +.oo-ui-labelElement-label { float: left; cursor: default; } diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less index fb3b1b7..f2d3d50 100644 --- a/src/themes/apex/widgets.less +++ b/src/themes/apex/widgets.less @@ -738,11 +738,11 @@ -head { height: 2.5em; - .oo-ui-buttonWidget { +.oo-ui-buttonWidget { margin: 0.25em; } - .oo-ui-labelElement-label { +.oo-ui-labelElement-label { margin: 0.75em 1em; } } diff --git a/src/themes/mediawiki/widgets.less b/src/themes/mediawiki/widgets.less index 0e0f7b8..5d0fa0f 100644 --- a/src/themes/mediawiki/widgets.less +++ b/src/themes/mediawiki/widgets.less @@ -918,11 +918,11 @@ -head { height: 2.5em; - .oo-ui-buttonWidget { +.oo-ui-buttonWidget { margin: 0.25em; } - .oo-ui-labelElement-label { +.oo-ui-labelElement-label { margin: 0.75em 1em; } } -- To view, visit https://gerrit.wikimedia.org/r/223561 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I51ffc41834703ff1f066e8b7373df06ceac98e42 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.api: Include 'mobile' target in mediawiki.api.pars... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: mediawiki.api: Include 'mobile' target in mediawiki.api.parse module .. mediawiki.api: Include 'mobile' target in mediawiki.api.parse module Bug: T104940 Change-Id: Ic654f0e38b27b41df13c0423460c1c12c9aec9c3 --- M resources/Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/Resources.php b/resources/Resources.php index 182f090..1ec4c1e 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -853,6 +853,7 @@ 'mediawiki.api.parse' = array( 'scripts' = 'resources/src/mediawiki.api/mediawiki.api.parse.js', 'dependencies' = 'mediawiki.api', + 'targets' = array( 'desktop', 'mobile' ), ), 'mediawiki.api.watch' = array( 'scripts' = 'resources/src/mediawiki.api/mediawiki.api.watch.js', -- To view, visit https://gerrit.wikimedia.org/r/223549 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic654f0e38b27b41df13c0423460c1c12c9aec9c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] labstore: Rewrite of replica-addusers.pl - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/223564 Change subject: [WIP] labstore: Rewrite of replica-addusers.pl .. [WIP] labstore: Rewrite of replica-addusers.pl - Switch it to opt-in per project rather than turned on by default for all projects. That caused a deluge of unnecessary and unused mysql accounts, and also presumed that all projects got NFS by default (which is not the case). - Opt-in only tools by default. - Keeps state only in the replica.my.cnf files themselves - no state kept elsewhere (other than in the mysql dbs themselves, ofc) TODO: - Actually do the MySQL grants! - Figure out what to do if the replica.my.cnf file is missing but the user / grant already exists. Currently the file is regenerated but not sure what the use case is / why we support it. - Add support for user accoutns, not just service groups Change-Id: I90dc98401b89e769fa058943e3714e383dfe25ea --- A modules/labstore/files/create-dbusers A modules/labstore/manifests/account_services.pp M modules/labstore/manifests/fileserver.pp 3 files changed, 152 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/64/223564/1 diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers new file mode 100644 index 000..d973417 --- /dev/null +++ b/modules/labstore/files/create-dbusers @@ -0,0 +1,110 @@ +#!/usr/bin/python3 + +This script does the following: + + - Check if users / service groups in opted in projects have +a replica.my.cnf file with mysql credentials + - If they do not exist, create a mysql user, give them +appropriate grants and write the replica.my.cnf file + +import ldap3 +import pymysql +import yaml +import re +import os +import string +import random + + +class User: +def __init__(self, project, name, uid, homedir): +self.project = project +self.name = name +self.uid = uid +self.homedir = homedir + +@property +def db_username(self): +return 's%s' % self.uid + +def __repr__(self): +return User(name=%s, uid=%s, homedir=%s) % ( +self.name, self.uid, self.homedir) + +@classmethod +def from_ldap_servicegroups(cls, conn, projectname): +conn.search( +'ou=people,ou=servicegroups,dc=wikimedia,dc=org', +'(cn=%s.*)' % projectname, +ldap3.SEARCH_SCOPE_WHOLE_SUBTREE, +attributes=['uidNumber', 'homeDirectory', 'cn'] +) +users = [] +for resp in conn.response: +attrs = resp['attributes'] +users.append(cls(projectname, attrs['cn'][0], attrs['uidNumber'][0], attrs['homeDirectory'][0])) + +return users + + +class CredentialCreator: +PASSWORD_LENGTH = 16 +PASSWORD_CHARS = string.ascii_letters + string.digits + +def __init__(self, hosts, username, password): +self.conns = [ +pymysql.connect(host, username, password) +for host in hosts +] + +@staticmethod +def _generate_pass(): +sysrandom = random.SystemRandom() # Uses /dev/urandom +return ''.join(sysrandom.sample( +CredentialCreator.PASSWORD_CHARS, +CredentialCreator.PASSWORD_LENGTH)) + +def check_user_exists(self, user): +exists = True +for conn in self.conns: +conn.ping(True) +cur = conn.cursor() +try: +cur.execute('SELECT * FROM mysql.user WHERE User = %s', user.db_username) +result = cur.fetchone() +finally: +cur.close() +exists = exists and (result is not None) +return exists + + +PROJECTS = ['tools'] + +config = yaml.safe_load(open('config.yaml')) + +server = ldap3.Server('neptunium.wikimedia.org') +conn = ldap3.Connection( +server, read_only=True, +user='cn=proxyagent,ou=profile,dc=wikimedia,dc=org', +auto_bind=True, +password='') + +servicegroups = User.from_ldap_servicegroups(conn, 'tools') +cgen = CredentialCreator( +config['mysql']['hosts'], +config['mysql']['username'], +config['mysql']['password'] +) + +for sg in servicegroups: +replica_path = os.path.join( +'/srv/project/', sg.project, 'project', +re.sub(r'^%s\.' % sg.project, '', sg.name), +'replica.my.cnf' +) +exists = cgen.check_user_exists(sg) +if not exists: +if not os.path.exists(replica_path): +print(No replica.my.cnf for %s % sg.name) +else: +print('wat' + sg.name) diff --git a/modules/labstore/manifests/account_services.pp b/modules/labstore/manifests/account_services.pp new file mode 100644 index 000..1b75e47 --- /dev/null +++ b/modules/labstore/manifests/account_services.pp @@ -0,0 +1,41 @@ +# == Class: labstore::account_services +# Provides account services
[MediaWiki-commits] [Gerrit] Add TOC floating action button - change (apps...wikipedia)
Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/223566 Change subject: Add TOC floating action button .. Add TOC floating action button This patch adds a floating action button for TOC interaction (and removes the TOC button from the Toolbar). This declutters the Toolbar and brings the app more in line with Material Design. Bug: T104654 Change-Id: I4b2d2db0366e28d6cc66858a859d4ec8b3b54191 --- M wikipedia/build.gradle A wikipedia/res/anim/fade_in_toc.xml A wikipedia/res/anim/fade_out_toc.xml M wikipedia/res/layout/fragment_page.xml D wikipedia/res/layout/group_toc_intro.xml A wikipedia/res/layout/inflate_tool_tip_toc_button.xml M wikipedia/res/menu/menu_page_actions.xml D wikipedia/res/values-h480dp/dimens.xml M wikipedia/res/values-qq/strings.xml A wikipedia/res/values-sw600dp/styles.xml M wikipedia/res/values/colors.xml M wikipedia/res/values/dimens.xml M wikipedia/res/values/strings.xml M wikipedia/res/values/styles.xml M wikipedia/src/main/java/org/wikipedia/onboarding/PrefsOnboardingStateMachine.java M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java M wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java M wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java M wikipedia/src/main/java/org/wikipedia/settings/Prefs.java 19 files changed, 144 insertions(+), 126 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/66/223566/1 diff --git a/wikipedia/build.gradle b/wikipedia/build.gradle index 62e4e67..fdaec23 100644 --- a/wikipedia/build.gradle +++ b/wikipedia/build.gradle @@ -94,6 +94,7 @@ // Debug with ./gradlew -q wikipedia:dependencies --configuration compile compile 'com.android.support:appcompat-v7:22.2.0' // includes support-v4 +compile 'com.android.support:design:22.2.0' compile('org.mediawiki.api:json:1.3.1') { exclude group: 'org.json', module: 'json' } diff --git a/wikipedia/res/anim/fade_in_toc.xml b/wikipedia/res/anim/fade_in_toc.xml new file mode 100644 index 000..b07490e --- /dev/null +++ b/wikipedia/res/anim/fade_in_toc.xml @@ -0,0 +1,9 @@ +?xml version=1.0 encoding=utf-8? +alpha +xmlns:android=http://schemas.android.com/apk/res/android; +android:interpolator=@android:anim/linear_interpolator +android:fillAfter=true +android:fromAlpha=0.5 +android:toAlpha=1.0 +android:duration=@android:integer/config_shortAnimTime +/ \ No newline at end of file diff --git a/wikipedia/res/anim/fade_out_toc.xml b/wikipedia/res/anim/fade_out_toc.xml new file mode 100644 index 000..b7169fe --- /dev/null +++ b/wikipedia/res/anim/fade_out_toc.xml @@ -0,0 +1,9 @@ +?xml version=1.0 encoding=utf-8? +alpha +xmlns:android=http://schemas.android.com/apk/res/android; +android:interpolator=@android:anim/linear_interpolator +android:fillAfter=true +android:fromAlpha=1.0 +android:toAlpha=0.5 +android:duration=@android:integer/config_shortAnimTime +/ \ No newline at end of file diff --git a/wikipedia/res/layout/fragment_page.xml b/wikipedia/res/layout/fragment_page.xml index 78698d4..4935487 100644 --- a/wikipedia/res/layout/fragment_page.xml +++ b/wikipedia/res/layout/fragment_page.xml @@ -2,6 +2,7 @@ FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; +xmlns:app=http://schemas.android.com/apk/res-auto; xmlns:tools=http://schemas.android.com/tools; android:layout_width=match_parent android:layout_height=match_parent @@ -18,7 +19,7 @@ android:layout_width=match_parent android:layout_height=match_parent -FrameLayout +android.support.design.widget.CoordinatorLayout android:id=@+id/page_contents_container android:layout_width=match_parent android:layout_height=match_parent @@ -166,7 +167,21 @@ /LinearLayout /LinearLayout -/FrameLayout +android.support.design.widget.FloatingActionButton +android:id=@+id/floating_toc_button +android:layout_width=wrap_content +android:layout_height=wrap_content +style=@style/floating_action_button +android:layout_gravity=bottom|end +android:src=@drawable/ic_toc +android:contentDescription=@string/menu_show_toc +app:elevation=4sp +app:borderWidth=0dp +app:layout_anchor=@id/page_web_view +app:layout_anchorGravity=bottom|right|end +/ + +/android.support.design.widget.CoordinatorLayout /org.wikipedia.views.SwipeRefreshLayoutWithScroll @@ -210,11 +225,6 @@ android:visibility=gone android:choiceMode=singleChoice / - -
[MediaWiki-commits] [Gerrit] Recompile all Handlebars to fix whitespace discrepancy - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Recompile all Handlebars to fix whitespace discrepancy .. Recompile all Handlebars to fix whitespace discrepancy Change-Id: I1e81f3889cbccc079f0ef43bef972174140adaf4 --- M handlebars/compiled/flow_block_topic_history.handlebars.php M handlebars/compiled/flow_block_topiclist.handlebars.php M handlebars/compiled/flow_revision_diff_header.handlebars.php 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Sbisson: Looks good to me, approved jenkins-bot: Verified diff --git a/handlebars/compiled/flow_block_topic_history.handlebars.php b/handlebars/compiled/flow_block_topic_history.handlebars.php index 8b3714c..3594b23 100644 --- a/handlebars/compiled/flow_block_topic_history.handlebars.php +++ b/handlebars/compiled/flow_block_topic_history.handlebars.php @@ -153,4 +153,4 @@ /div '; } -? +? \ No newline at end of file diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php b/handlebars/compiled/flow_block_topiclist.handlebars.php index ae82b4f..778a70d 100644 --- a/handlebars/compiled/flow_block_topiclist.handlebars.php +++ b/handlebars/compiled/flow_block_topiclist.handlebars.php @@ -326,4 +326,4 @@ /div '; } -? +? \ No newline at end of file diff --git a/handlebars/compiled/flow_revision_diff_header.handlebars.php b/handlebars/compiled/flow_revision_diff_header.handlebars.php index 371b78a..7931324 100644 --- a/handlebars/compiled/flow_revision_diff_header.handlebars.php +++ b/handlebars/compiled/flow_revision_diff_header.handlebars.php @@ -40,4 +40,4 @@ '.((LCRun3::ifvar($cx, ((isset($in['new']) is_array($in)) ? $in['new'] : null))) ? ''.((LCRun3::ifvar($cx, ((isset($in['revision']['actions']['undo']) is_array($in['revision']['actions'])) ? $in['revision']['actions']['undo'] : null))) ? '('.htmlentities((string)((isset($in['noop']) is_array($in)) ? $in['noop'] : null), ENT_QUOTES, 'UTF-8').'a class=mw-ui-anchor mw-ui-quiet href='.htmlentities((string)((isset($in['revision']['actions']['undo']['url']) is_array($in['revision']['actions']['undo'])) ? $in['revision']['actions']['undo']['url'] : null), ENT_QUOTES, 'UTF-8').''.htmlentities((string)((isset($in['revision']['actions']['undo']['title']) is_array($in['revision']['actions']['undo'])) ? $in['revision']['actions']['undo']['title'] : null), ENT_QUOTES, 'UTF-8').'/a'.htmlentities((string)((isset($in['noop']) is_array($in)) ? $in['noop'] : null), ENT_QUOTES, 'UTF-8').')' : '').'' : '').'/div '.((LCRun3::ifvar($cx, ((isset($in['links']['previous']) is_array($in['links'])) ? $in['links']['previous'] : null))) ? ''.((!LCRun3::ifvar($cx, ((isset($in['new']) is_array($in)) ? $in['new'] : null))) ? 'diva href='.htmlentities((string)((isset($in['links']['previous']) is_array($in['links'])) ? $in['links']['previous'] : null), ENT_QUOTES, 'UTF-8').''.LCRun3::ch($cx, 'l10n', array(array('flow-previous-diff'),array()), 'encq').'/a/div' : '').'' : '').''.((LCRun3::ifvar($cx, ((isset($in['links']['next']) is_array($in['links'])) ? $in['links']['next'] : null))) ? ''.((LCRun3::ifvar($cx, ((isset($in['new']) is_array($in)) ? $in['new'] : null))) ? 'diva href='.htmlentities((string)((isset($in['links']['next']) is_array($in['links'])) ? $in['links']['next'] : null), ENT_QUOTES, 'UTF-8').''.LCRun3::ch($cx, 'l10n', array(array('flow-next-diff'),array()), 'encq').'/a/div' : '').'' : '').''.LCRun3::p($cx, 'flow_patrol_diff', array(array($in),array())).''; } -? +? \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/223498 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e81f3889cbccc079f0ef43bef972174140adaf4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Sbisson sbis...@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] Import name prefix and suffix - change (wikimedia...crm)
jenkins-bot has submitted this change and it was merged. Change subject: Import name prefix and suffix .. Import name prefix and suffix Bug: T88836 Change-Id: I4bffaafb924e56ffc2b346ae90d4c6b18d050a06 --- M sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 38 insertions(+), 0 deletions(-) Approvals: Cdentinger: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php index e6a56aa..4f24a86 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php @@ -78,6 +78,8 @@ $gateway_txn_id = mt_rand(); $check_number = (string) mt_rand(); +$new_prefix = 'M' . mt_rand(); + return array( // Minimal contribution array( @@ -146,6 +148,8 @@ 'last_name' = 'Last', 'middle_name' = 'Middle', 'no_thank_you' = 'no forwarding address', +'name_prefix' = $new_prefix, +'name_suffix' = 'Sr.', 'payment_method' = 'check', 'stock_description' = 'Long-winded prolegemenon', 'thankyou_date' = '2012-04-01', @@ -160,6 +164,8 @@ 'is_opt_out' = '1', 'last_name' = 'Last', 'middle_name' = 'Middle', +'prefix' = $new_prefix, +'suffix' = 'Sr.', ), 'contribution' = array( 'address_id' = '', diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 854085f..be18efc 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -892,6 +892,38 @@ $contact['display_name'] = $msg['organization_name']; $contact['organization_name'] = $msg['organization_name']; } +if ( !empty( $msg['name_prefix'] ) ) { +$existing_prefixes = array_flip( CRM_Core_PseudoConstant::individualPrefix() ); +if ( array_key_exists( $msg['name_prefix'], $existing_prefixes ) ) { +$prefix_id = $existing_prefixes[$msg['name_prefix']]; +} else { +$option_group_result = civicrm_api3( 'OptionGroup', 'Get', array( +'name' = 'individual_prefix', +) ); +$result = civicrm_api3( 'OptionValue', 'Create', array( +'option_group_id' = $option_group_result['id'], +'name' = $msg['name_prefix'], +) ); +$prefix_id = $result['id']; +} +$contact['individual_prefix'] = $prefix_id; +} +if ( !empty( $msg['name_suffix'] ) ) { +$existing_suffixes = array_flip( CRM_Core_PseudoConstant::individualSuffix() ); +if ( array_key_exists( $msg['name_suffix'], $existing_suffixes ) ) { +$suffix_id = $existing_suffixes[$msg['name_suffix']]; +} else { +$option_group_result = civicrm_api3( 'OptionGroup', 'Get', array( +'name' = 'individual_suffix', +) ); +$result = civicrm_api3( 'OptionValue', 'Create', array( +'option_group_id' = $option_group_result['id'], +'name' = $msg['name_suffix'], +) ); +$suffix_id = $result['id']; +} +$contact['individual_suffix'] = $suffix_id; +} if ( empty($msg['language']) ) { // TODO: use LanguageTag to prevent truncation of 2 char lang codes // guess from contribution_tracking data -- To view, visit https://gerrit.wikimedia.org/r/220629 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bffaafb924e56ffc2b346ae90d4c6b18d050a06 Gerrit-PatchSet: 4 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org Gerrit-Reviewer: AndyRussG andrew.green...@gmail.com Gerrit-Reviewer: Awight awi...@wikimedia.org Gerrit-Reviewer: Cdentinger cdentin...@wikimedia.org Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org Gerrit-Reviewer: Katie Horn kh...@wikimedia.org Gerrit-Reviewer: Ssmith ssm...@wikimedia.org Gerrit-Reviewer: XenoRyet dkozlow...@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] install_server: switch to elasticsearch 1.6 - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: install_server: switch to elasticsearch 1.6 .. install_server: switch to elasticsearch 1.6 Bug: T102008 Change-Id: I7ac9ed55bd05c509f77cf8403b0cc17c0bd1c9eb --- M modules/install_server/files/reprepro/updates 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved Manybubbles: Looks good to me, but someone else must approve diff --git a/modules/install_server/files/reprepro/updates b/modules/install_server/files/reprepro/updates index acc61a1..4330f9a 100644 --- a/modules/install_server/files/reprepro/updates +++ b/modules/install_server/files/reprepro/updates @@ -37,7 +37,7 @@ ListShellHook: grep-dctrl -X -S cassandra || [ $? -eq 1 ] Name: elasticsearch -Method: http://packages.elasticsearch.org/elasticsearch/1.3/debian +Method: http://packages.elasticsearch.org/elasticsearch/1.6/debian Components: mainthirdparty UDebComponents: Suite: stable -- To view, visit https://gerrit.wikimedia.org/r/223251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ac9ed55bd05c509f77cf8403b0cc17c0bd1c9eb Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@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] Syncronize VisualEditor: db9a02e..c39bd98 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/223568 Change subject: Syncronize VisualEditor: db9a02e..c39bd98 .. Syncronize VisualEditor: db9a02e..c39bd98 Change-Id: Ib7a8f2eb07473a03207e9db96a1322de5edc394c --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/68/223568/1 diff --git a/VisualEditor b/VisualEditor index db9a02e..c39bd98 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit db9a02e9b748e44582449dc9eb114a5952527277 +Subproject commit c39bd985973c4bd7adbed4f9767c059da85948cc -- To view, visit https://gerrit.wikimedia.org/r/223568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7a8f2eb07473a03207e9db96a1322de5edc394c 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: db9a02e..c39bd98 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: db9a02e..c39bd98 .. Syncronize VisualEditor: db9a02e..c39bd98 Change-Id: Ib7a8f2eb07473a03207e9db96a1322de5edc394c --- 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 db9a02e..c39bd98 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit db9a02e9b748e44582449dc9eb114a5952527277 +Subproject commit c39bd985973c4bd7adbed4f9767c059da85948cc -- To view, visit https://gerrit.wikimedia.org/r/223568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7a8f2eb07473a03207e9db96a1322de5edc394c 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] Revert Make toolbar save button frameless - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Revert Make toolbar save button frameless .. Revert Make toolbar save button frameless This reverts commit cb11cbd2f5e3dd09c5af8ca0cc19b3071ec63f9a. Actually not needed after 3d36cac7fc4808f708f03b66f5c099de440e4569 in OOjs UI, and would change the UI in unexpected way. Bug: T103403 Change-Id: Ia30b168ea29d03aa76ad81d1f9894a67604fdc08 --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index 019477f..deeb0d2 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -1195,7 +1195,6 @@ ve.init.mw.ViewPageTarget.prototype.setupToolbarSaveButton = function () { this.toolbarSaveButton = new OO.ui.ButtonWidget( { label: ve.msg( 'visualeditor-toolbar-savedialog' ), - framed: false, flags: [ 'progressive', 'primary' ], disabled: !this.restoring } ); -- To view, visit https://gerrit.wikimedia.org/r/223300 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia30b168ea29d03aa76ad81d1f9894a67604fdc08 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Esanders esand...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added another $cdb-close() call - change (mediawiki...Cargo)
Yaron Koren has submitted this change and it was merged. Change subject: Added another $cdb-close() call .. Added another $cdb-close() call Change-Id: I55826faaaebe1f03beac4f5ccea06b87a8b9bd31 --- M CargoUtils.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved diff --git a/CargoUtils.php b/CargoUtils.php index e8bda92..2a2293d 100644 --- a/CargoUtils.php +++ b/CargoUtils.php @@ -415,6 +415,9 @@ $fieldTableNames[] = $tableName . '__' . $fieldName; } + // Necessary in some cases. + $cdb-close(); + // Finally, store all the info in the cargo_tables table. $dbr-insert( 'cargo_tables', array( 'template_id' = $templatePageID, 'main_table' = $tableName, -- To view, visit https://gerrit.wikimedia.org/r/223569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55826faaaebe1f03beac4f5ccea06b87a8b9bd31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com Gerrit-Reviewer: Yaron Koren yaro...@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] Correct column header - change (wikimedia...crm)
jenkins-bot has submitted this change and it was merged. Change subject: Correct column header .. Correct column header Bug: T88836 Change-Id: Ic106d094a8e7f96a1c4d8018ad160e86d14536b7 --- M sites/all/modules/offline2civicrm/WmfImportFile.php M sites/all/modules/offline2civicrm/WmfOrgImportFile.php 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Cdentinger: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/offline2civicrm/WmfImportFile.php b/sites/all/modules/offline2civicrm/WmfImportFile.php index ed81a64..ec8a99c 100644 --- a/sites/all/modules/offline2civicrm/WmfImportFile.php +++ b/sites/all/modules/offline2civicrm/WmfImportFile.php @@ -43,7 +43,7 @@ 'Street Address', 'Suffix', 'Tags', -'Target Contact', +'Target Contact ID', 'Thank You Letter Date', 'Transaction ID', ); diff --git a/sites/all/modules/offline2civicrm/WmfOrgImportFile.php b/sites/all/modules/offline2civicrm/WmfOrgImportFile.php index 9468710..e905e55 100644 --- a/sites/all/modules/offline2civicrm/WmfOrgImportFile.php +++ b/sites/all/modules/offline2civicrm/WmfOrgImportFile.php @@ -41,7 +41,7 @@ 'State', 'Street Address', 'Tags', -'Target Contact', +'Target Contact ID', 'Thank You Letter Date', 'Title', 'Transaction ID', -- To view, visit https://gerrit.wikimedia.org/r/221727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic106d094a8e7f96a1c4d8018ad160e86d14536b7 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org Gerrit-Reviewer: AndyRussG andrew.green...@gmail.com Gerrit-Reviewer: Awight awi...@wikimedia.org Gerrit-Reviewer: Cdentinger cdentin...@wikimedia.org Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org Gerrit-Reviewer: Katie Horn kh...@wikimedia.org Gerrit-Reviewer: Ssmith ssm...@wikimedia.org Gerrit-Reviewer: XenoRyet dkozlow...@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] up version to 1.7.7 - add year to logs - change (operations...adminbot)
jenkins-bot has submitted this change and it was merged. Change subject: up version to 1.7.7 - add year to logs .. up version to 1.7.7 - add year to logs Build 1.7.7 to add the year to logs (by Elee) Bug:T85803 Bug:T105169 Change-Id: I5c8cca95fdd7d548f5c88c747c1e0f7ebdbc3f64 --- M debian/changelog 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 882422a..c9d1496 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +adminbot (1.7.7) precise-wikimedia; urgency=low + + * Addded year to log output (by Elee, T85803) + + -- Daniel Zahn dz...@wikimedia.org Wed, 8 Jul 2015 16:14:23 + + adminbot (1.7.6) precise-wikimedia; urgency=low * Support logging for labs service groups. -- To view, visit https://gerrit.wikimedia.org/r/223575 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c8cca95fdd7d548f5c88c747c1e0f7ebdbc3f64 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/adminbot Gerrit-Branch: master Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Elee e...@mit.edu Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.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] Added table name param to CargoUtils::recreateDBTablesForT... - change (mediawiki...Cargo)
jenkins-bot has submitted this change and it was merged. Change subject: Added table name param to CargoUtils::recreateDBTablesForTemplate() .. Added table name param to CargoUtils::recreateDBTablesForTemplate() Change-Id: I65fd9a9b60fb8593f27105f16503e2dd0c024cc8 --- M CargoUtils.php 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/CargoUtils.php b/CargoUtils.php index d74e04c..e8bda92 100644 --- a/CargoUtils.php +++ b/CargoUtils.php @@ -286,7 +286,7 @@ * @return boolean * @throws MWException */ - public static function recreateDBTablesForTemplate( $templatePageID ) { + public static function recreateDBTablesForTemplate( $templatePageID, $tableName = null ) { $tableSchemaString = self::getPageProp( $templatePageID, 'CargoFields' ); // First, see if there even is DB storage for this template - // if not, exit. @@ -312,7 +312,10 @@ $dbr-delete( 'cargo_tables', array( 'template_id' = $templatePageID ) ); - $tableName = self::getPageProp( $templatePageID, 'CargoTableName' ); + if ( $tableName == null ) { + $tableName = self::getPageProp( $templatePageID, 'CargoTableName' ); + } + // Unfortunately, there is not yet a 'CREATE TABLE' wrapper // in the MediaWiki DB API, so we have to call SQL directly. $dbType = $cdb-getType(); -- To view, visit https://gerrit.wikimedia.org/r/223565 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I65fd9a9b60fb8593f27105f16503e2dd0c024cc8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com Gerrit-Reviewer: Yaron Koren yaro...@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] Added another $cdb-close() call - change (mediawiki...Cargo)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/223569 Change subject: Added another $cdb-close() call .. Added another $cdb-close() call Change-Id: I55826faaaebe1f03beac4f5ccea06b87a8b9bd31 --- M CargoUtils.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/69/223569/1 diff --git a/CargoUtils.php b/CargoUtils.php index e8bda92..2a2293d 100644 --- a/CargoUtils.php +++ b/CargoUtils.php @@ -415,6 +415,9 @@ $fieldTableNames[] = $tableName . '__' . $fieldName; } + // Necessary in some cases. + $cdb-close(); + // Finally, store all the info in the cargo_tables table. $dbr-insert( 'cargo_tables', array( 'template_id' = $templatePageID, 'main_table' = $tableName, -- To view, visit https://gerrit.wikimedia.org/r/223569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55826faaaebe1f03beac4f5ccea06b87a8b9bd31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Set overflow auto on the ToC wrapper - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Revert Set overflow auto on the ToC wrapper .. Revert Set overflow auto on the ToC wrapper This reverts commit 2b8f2fede7a52d001843243adcefa9ac7db93fdd. This fixes a problem that makes the TOC disappear completely in certain browsers. We'll have to retest to see how to solve the original issue. Bug: T105113 Change-Id: Ia1229c13e0f71e5849d1d24762d719ebdb0a1941 --- M modules/styles/flow/widgets/mw.flow.ui.NavigationWidget.less 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Sbisson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/styles/flow/widgets/mw.flow.ui.NavigationWidget.less b/modules/styles/flow/widgets/mw.flow.ui.NavigationWidget.less index 54e60f5..1f5ad26 100644 --- a/modules/styles/flow/widgets/mw.flow.ui.NavigationWidget.less +++ b/modules/styles/flow/widgets/mw.flow.ui.NavigationWidget.less @@ -44,7 +44,7 @@ width: 100%; max-height: 400px; position: absolute; - overflow-y: auto; + overflow: hidden; /* Workaround for flicker and https://code.google.com/p/chromium/issues/detail?id=343244 */ -webkit-transform: translateZ(0); -- To view, visit https://gerrit.wikimedia.org/r/223487 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia1229c13e0f71e5849d1d24762d719ebdb0a1941 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Mooeypoo mor...@gmail.com Gerrit-Reviewer: Sbisson sbis...@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] cassandra: use lock file with flock - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: cassandra: use lock file with flock .. cassandra: use lock file with flock Bug: T104208 Change-Id: I28f97cf3163dc250e2c014207b717bc025dfd4bc --- M modules/cassandra/manifests/metrics.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/modules/cassandra/manifests/metrics.pp b/modules/cassandra/manifests/metrics.pp index 8a0a2cd..633183b 100644 --- a/modules/cassandra/manifests/metrics.pp +++ b/modules/cassandra/manifests/metrics.pp @@ -54,7 +54,7 @@ cron { 'cassandra-metrics-collector': ensure = present, user= 'cassandra', -command = flock --wait 2 /usr/local/bin/cassandra-metrics-collector --graphite-host ${graphite_host} --graphite-port ${graphite_port} --prefix ${graphite_prefix}, +command = flock --wait 2 /tmp/cassandra-metrics-collector.lock /usr/local/bin/cassandra-metrics-collector --graphite-host ${graphite_host} --graphite-port ${graphite_port} --prefix ${graphite_prefix}, minute = '*', require = Package['cassandra/metrics-collector'], } -- To view, visit https://gerrit.wikimedia.org/r/223570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28f97cf3163dc250e2c014207b717bc025dfd4bc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: 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] Update environments.yml file according to the documentation - change (mediawiki/core)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/223571 Change subject: Update environments.yml file according to the documentation .. Update environments.yml file according to the documentation Bug: T105174 Change-Id: Ib049d12f2029f5aeb8ef3149c731c2b9c810 --- M tests/browser/environments.yml 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/71/223571/1 diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml index 8f8381e..b2232e6 100644 --- a/tests/browser/environments.yml +++ b/tests/browser/environments.yml @@ -14,7 +14,7 @@ # export MEDIAWIKI_USER=Selenium_user2 # bundle exec cucumber # -mw-vagrant-host: +mw-vagrant-host: default mediawiki_url: http://127.0.0.1:8080/wiki/ mediawiki_user: Selenium_user mediawiki_password: vagrant @@ -33,3 +33,5 @@ mediawiki_url: http://test2.wikipedia.org/wiki/ mediawiki_user: Selenium_user # mediawiki_password: SET THIS IN THE ENVIRONMENT! + +default: *default -- To view, visit https://gerrit.wikimedia.org/r/223571 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib049d12f2029f5aeb8ef3149c731c2b9c810 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] up version to 1.7.7 - add year to logs - change (operations...adminbot)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/223575 Change subject: up version to 1.7.7 - add year to logs .. up version to 1.7.7 - add year to logs Build 1.7.7 to add the year to logs (by Elee) Bug:T85803 Bug:T105169 Change-Id: I5c8cca95fdd7d548f5c88c747c1e0f7ebdbc3f64 --- M debian/changelog 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/adminbot refs/changes/75/223575/1 diff --git a/debian/changelog b/debian/changelog index 882422a..c9d1496 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +adminbot (1.7.7) precise-wikimedia; urgency=low + + * Addded year to log output (by Elee, T85803) + + -- Daniel Zahn dz...@wikimedia.org Wed, 8 Jul 2015 16:14:23 + + adminbot (1.7.6) precise-wikimedia; urgency=low * Support logging for labs service groups. -- To view, visit https://gerrit.wikimedia.org/r/223575 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c8cca95fdd7d548f5c88c747c1e0f7ebdbc3f64 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/adminbot Gerrit-Branch: master Gerrit-Owner: Dzahn dz...@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] Run RuboCop when Gemfile.lock changes - change (integration/config)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/223574 Change subject: Run RuboCop when Gemfile.lock changes .. Run RuboCop when Gemfile.lock changes Bug: T105178 Change-Id: I61ce803b0d6e5adf6312b426083dc1acf60ecd38 --- M zuul/layout.yaml 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/74/223574/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index f48c14c..8322835 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -549,7 +549,8 @@ # - .gemspec # - *.rb # - Gemfile - - '^(\.rubocop.*|\.gemspec|.*\.rb|Gemfile$)' + # - Gemfile.lock + - '^(\.rubocop.*|\.gemspec|.*\.rb|Gemfile|Gemfile.lock$)' - name: mediawiki-core-bundle-rubocop files: -- To view, visit https://gerrit.wikimedia.org/r/223574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61ce803b0d6e5adf6312b426083dc1acf60ecd38 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix required import data - change (wikimedia...crm)
jenkins-bot has submitted this change and it was merged. Change subject: Fix required import data .. Fix required import data Change-Id: Ib2a968eb8e1290c93335a1fdb9cb4aef647fdd13 --- M sites/all/modules/offline2civicrm/CoinbaseFile.php M sites/all/modules/offline2civicrm/EngageChecksFile.php M sites/all/modules/offline2civicrm/ForeignChecksFile.php M sites/all/modules/offline2civicrm/JpMorganFile.php M sites/all/modules/offline2civicrm/PayPalChecksFile.php M sites/all/modules/offline2civicrm/SquareFile.php M sites/all/modules/offline2civicrm/tests/PayPalChecksFileTest.php 7 files changed, 8 insertions(+), 22 deletions(-) Approvals: Cdentinger: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/offline2civicrm/CoinbaseFile.php b/sites/all/modules/offline2civicrm/CoinbaseFile.php index 0d2a298..2bfe8c6 100644 --- a/sites/all/modules/offline2civicrm/CoinbaseFile.php +++ b/sites/all/modules/offline2civicrm/CoinbaseFile.php @@ -32,10 +32,7 @@ } protected function getRequiredData() { -return array( -'date', -'gross', -'currency', +return parent::getRequiredData() + array( 'gateway_txn_id', ); } diff --git a/sites/all/modules/offline2civicrm/EngageChecksFile.php b/sites/all/modules/offline2civicrm/EngageChecksFile.php index 874a0ea..34442ea 100644 --- a/sites/all/modules/offline2civicrm/EngageChecksFile.php +++ b/sites/all/modules/offline2civicrm/EngageChecksFile.php @@ -25,11 +25,9 @@ } function getRequiredData() { -return array( +return parent::getRequiredData() + array( 'check_number', -'date', 'gift_source', -'gross', 'import_batch_number', 'payment_method', 'restrictions', diff --git a/sites/all/modules/offline2civicrm/ForeignChecksFile.php b/sites/all/modules/offline2civicrm/ForeignChecksFile.php index 2f280e9..d163e5a 100644 --- a/sites/all/modules/offline2civicrm/ForeignChecksFile.php +++ b/sites/all/modules/offline2civicrm/ForeignChecksFile.php @@ -29,11 +29,8 @@ } protected function getRequiredData() { -return array( +return parent::getRequiredData() + array( 'check_number', -'date', -'currency', -'gross', ); } diff --git a/sites/all/modules/offline2civicrm/JpMorganFile.php b/sites/all/modules/offline2civicrm/JpMorganFile.php index f83ac0e..15c4fd3 100644 --- a/sites/all/modules/offline2civicrm/JpMorganFile.php +++ b/sites/all/modules/offline2civicrm/JpMorganFile.php @@ -15,11 +15,8 @@ } protected function getRequiredData() { -return array( -'currency', -'date', +return parent::getRequiredData() + array( 'gateway_txn_id', -'gross', ); } diff --git a/sites/all/modules/offline2civicrm/PayPalChecksFile.php b/sites/all/modules/offline2civicrm/PayPalChecksFile.php index e70e5fd..81f5fae 100644 --- a/sites/all/modules/offline2civicrm/PayPalChecksFile.php +++ b/sites/all/modules/offline2civicrm/PayPalChecksFile.php @@ -19,10 +19,8 @@ } protected function getRequiredData() { -return array( -'date', +return parent::getRequiredData() + array( 'gift_source', -'gross', 'payment_method', 'restrictions', ); @@ -30,5 +28,6 @@ protected function mungeMessage( $msg ) { $msg['gateway'] = 'paypal'; +$msg['currency'] = 'USD'; } } diff --git a/sites/all/modules/offline2civicrm/SquareFile.php b/sites/all/modules/offline2civicrm/SquareFile.php index 73126a5..33a14a9 100644 --- a/sites/all/modules/offline2civicrm/SquareFile.php +++ b/sites/all/modules/offline2civicrm/SquareFile.php @@ -19,11 +19,8 @@ } protected function getRequiredData() { -return array( -'currency', -'date', +return parent::getRequiredData() + array( 'gateway_txn_id', -'gross', ); } diff --git a/sites/all/modules/offline2civicrm/tests/PayPalChecksFileTest.php b/sites/all/modules/offline2civicrm/tests/PayPalChecksFileTest.php index f1e1c88..f8f4a55 100644 --- a/sites/all/modules/offline2civicrm/tests/PayPalChecksFileTest.php +++ b/sites/all/modules/offline2civicrm/tests/PayPalChecksFileTest.php @@ -37,6 +37,7 @@ 'contact_type' = 'Individual', 'contribution_source' = 'USD 10.00', 'country' = 'US', +'currency' = 'USD', 'date' = 1359244800, 'direct_mail_appeal' = 'MissionFish (PayPal)', 'first_name' = 'Diz and', -- To view, visit https://gerrit.wikimedia.org/r/219242 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType:
[MediaWiki-commits] [Gerrit] Alternative architecture of EntityContent::isStub - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/223567 Change subject: Alternative architecture of EntityContent::isStub .. Alternative architecture of EntityContent::isStub Bug: T104895 Change-Id: I8065743021c40ec8f52c0606a44649ce73e2d937 --- M repo/includes/content/EntityContent.php M repo/includes/content/ItemContent.php M repo/includes/content/PropertyContent.php 3 files changed, 21 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/67/223567/1 diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index dc59568..7a8fd6c 100644 --- a/repo/includes/content/EntityContent.php +++ b/repo/includes/content/EntityContent.php @@ -643,9 +643,18 @@ } /** -* @return bool +* @return bool False if the entity is a redirect, true otherwise. */ - abstract public function isStub(); + public function isEmpty() { + return !$this-isRedirect(); + } + + /** +* @return bool False if the entity is a redirect, true otherwise. +*/ + public function isStub() { + return !$this-isRedirect(); + } /** * @see Content::copy diff --git a/repo/includes/content/ItemContent.php b/repo/includes/content/ItemContent.php index 4a8ccb7..65be325 100644 --- a/repo/includes/content/ItemContent.php +++ b/repo/includes/content/ItemContent.php @@ -208,29 +208,21 @@ } /** -* @see AbstractContent::isEmpty +* @see EntityContent::isEmpty * -* @return bool +* @return bool True if this is not a redirect and the item is empty. */ public function isEmpty() { - if ( $this-isRedirect() ) { - return false; - } - - return $this-getItem()-isEmpty(); + return parent::isEmpty() $this-getItem()-isEmpty(); } /** * @see EntityContent::isStub * -* @return bool +* @return bool True if this is not a redirect and the item does not contain statements. */ public function isStub() { - if ( $this-isEmpty() ) { - return false; - } - - return $this-getItem()-getStatements()-isEmpty(); + return parent::isStub() $this-getItem()-getStatements()-isEmpty(); } /** diff --git a/repo/includes/content/PropertyContent.php b/repo/includes/content/PropertyContent.php index d3d18e5..1365979 100644 --- a/repo/includes/content/PropertyContent.php +++ b/repo/includes/content/PropertyContent.php @@ -113,29 +113,21 @@ } /** -* @see AbstractContent::isEmpty +* @see EntityContent::isEmpty * -* @return bool +* @return bool True if this is not a redirect and the property is empty. */ public function isEmpty() { - if ( $this-isRedirect() ) { - return false; - } - - return $this-getProperty()-isEmpty(); + return parent::isEmpty() $this-getProperty()-isEmpty(); } /** * @see EntityContent::isStub * -* @return bool +* @return bool True if this is not a redirect and the property does not contain statements. */ public function isStub() { - if ( $this-isEmpty() ) { - return false; - } - - return $this-getProperty()-getStatements()-isEmpty(); + return parent::isStub() $this-getProperty()-getStatements()-isEmpty(); } } -- To view, visit https://gerrit.wikimedia.org/r/223567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8065743021c40ec8f52c0606a44649ce73e2d937 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