[MediaWiki-commits] [Gerrit] operations/puppet[production]: aptrepo: fix typo in template that broke release uploads

2016-11-01 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319268

Change subject: aptrepo: fix typo in template that broke release uploads
..

aptrepo: fix typo in template that broke release uploads

Change-Id: I8157e055df004fbfa6865f8e0d6a2246e1592302
---
M modules/aptrepo/templates/incoming.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/68/319268/1

diff --git a/modules/aptrepo/templates/incoming.erb 
b/modules/aptrepo/templates/incoming.erb
index 19315cb..ea3ada0 100644
--- a/modules/aptrepo/templates/incoming.erb
+++ b/modules/aptrepo/templates/incoming.erb
@@ -1,4 +1,4 @@
 Name: default
 IncomingDir: <%= @incomingdir %>
 TempDir: tmp
-Default: <% @default_distro %>
+Default: <%= @default_distro %>

-- 
To view, visit https://gerrit.wikimedia.org/r/319268
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8157e055df004fbfa6865f8e0d6a2246e1592302
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/dns[master]: fix IPv6 reverse record for contint1001

2016-11-01 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: fix IPv6 reverse record for contint1001
..


fix IPv6 reverse record for contint1001

Change-Id: I321c8a3d8e08897adf560ba1ce553cbff5eb431a
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Dzahn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 2aad6b6..c491e85 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -24,7 +24,7 @@
 
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   lists.wikimedia.org.
 
-7.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   contint1001.wikimedia.org.
+7.1.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   contint1001.wikimedia.org.
 
 3.5.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   uranium.wikimedia.org.
 

-- 
To view, visit https://gerrit.wikimedia.org/r/319267
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I321c8a3d8e08897adf560ba1ce553cbff5eb431a
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/dns[master]: fix IPv6 reverse record for contint1001

2016-11-01 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319267

Change subject: fix IPv6 reverse record for contint1001
..

fix IPv6 reverse record for contint1001

Change-Id: I321c8a3d8e08897adf560ba1ce553cbff5eb431a
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/67/319267/1

diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 2aad6b6..c491e85 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -24,7 +24,7 @@
 
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   lists.wikimedia.org.
 
-7.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   contint1001.wikimedia.org.
+7.1.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   contint1001.wikimedia.org.
 
 3.5.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   uranium.wikimedia.org.
 

-- 
To view, visit https://gerrit.wikimedia.org/r/319267
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I321c8a3d8e08897adf560ba1ce553cbff5eb431a
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.util: Fix replacement of $ signs in mw.util.getUrl

2016-11-01 Thread TTO (Code Review)
TTO has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319266

Change subject: mediawiki.util: Fix replacement of $ signs in mw.util.getUrl
..

mediawiki.util: Fix replacement of $ signs in mw.util.getUrl

Bug: T149767
Change-Id: I91c1afa1f93966d1f01793d124fe8f2ae3dab0cf
---
M resources/src/mediawiki/mediawiki.util.js
M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/319266/1

diff --git a/resources/src/mediawiki/mediawiki.util.js 
b/resources/src/mediawiki/mediawiki.util.js
index 866f213..654f232 100644
--- a/resources/src/mediawiki/mediawiki.util.js
+++ b/resources/src/mediawiki/mediawiki.util.js
@@ -128,7 +128,8 @@
? util.wikiScript() + '?title=' + 
util.wikiUrlencode( title ) + '&' + query
: util.wikiScript() + '?' + query;
} else {
-   url = mw.config.get( 'wgArticlePath' ).replace( 
'$1', util.wikiUrlencode( title ) );
+   url = mw.config.get( 'wgArticlePath' )
+   .replace( '$1', util.wikiUrlencode( 
title ).replace( /\$/g, '' ) );
}
 
// Append the encoded fragment
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
index 4eac362..a04d65a 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
@@ -150,6 +150,10 @@
href = mw.util.getUrl( 'Foo:Sandbox? 5+5=10! (test)/sub ' );
assert.equal( href, 
'/wiki/Foo:Sandbox%3F_5%2B5%3D10!_(test)/sub_', 'complex title' );
 
+   // T149767
+   href = mw.util.getUrl( 'My$$test$title' );
+   assert.equal( href, '/wiki/My$$test$title', 'title with 
multiple consecutive dollar signs' );
+
href = mw.util.getUrl();
assert.equal( href, '/wiki/Foobar', 'default title' );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/319266
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91c1afa1f93966d1f01793d124fe8f2ae3dab0cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TTO 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Revert "Bump some resource limits in production"

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert "Bump some resource limits in production"
..


Revert "Bump some resource limits in production"

This reverts commit e7a4cfc1f446013e2506be55b62d5bb33f51bf7e.

Since ChangeProp has launched, our performance margin has disappeared.
Plus there are large pages like User:Discographer/Various that are
unlikely to be editable in VE anyway. So, let us fall back to our
older limits till we get around to fixing performance on large pages.

Change-Id: I7650b62b853e1353e91038cb63fd691b1fd462a6
---
M conf/wmf/localsettings.js
1 file changed, 0 insertions(+), 6 deletions(-)

Approvals:
  Arlolra: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/conf/wmf/localsettings.js b/conf/wmf/localsettings.js
index dd49606..7884831 100644
--- a/conf/wmf/localsettings.js
+++ b/conf/wmf/localsettings.js
@@ -22,12 +22,6 @@
// a chance of succeeding.
parsoidConfig.timeouts.request = 3*60*1000; // 3 minutes
 
-   // Bump default resource limits.
-   // With node v4, we have a wider margin.
-   parsoidConfig.limits.wt2html.maxWikitextSize = 125;
-   parsoidConfig.limits.wt2html.maxListItems = 5;
-   parsoidConfig.limits.wt2html.maxTableCells = 5;
-
// Sample these verbose logs to prevent overwhelm
// 1% and 2% for empty/tr and empty/li is based on
// seeing the volume in rt-testing.

-- 
To view, visit https://gerrit.wikimedia.org/r/319265
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7650b62b853e1353e91038cb63fd691b1fd462a6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
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...deploy[master]: Revert "Bump some resource limits in production"

2016-11-01 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319265

Change subject: Revert "Bump some resource limits in production"
..

Revert "Bump some resource limits in production"

This reverts commit e7a4cfc1f446013e2506be55b62d5bb33f51bf7e.
Since ChangeProp has launched, our margin has disappeared.
Plus there are large pages like User:Discographer/Various
that are unlikely to be editable in VE anyway. So, let us
fall back to our older limits till we get around to fixing
performance on large pages.

Change-Id: I7650b62b853e1353e91038cb63fd691b1fd462a6
---
M conf/wmf/localsettings.js
1 file changed, 0 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/65/319265/1

diff --git a/conf/wmf/localsettings.js b/conf/wmf/localsettings.js
index ebdf63a..61559ba 100644
--- a/conf/wmf/localsettings.js
+++ b/conf/wmf/localsettings.js
@@ -22,12 +22,6 @@
// a chance of succeeding.
parsoidConfig.timeouts.request = 3*60*1000; // 3 minutes
 
-   // Bump default resource limits.
-   // With node v4, we have a wider margin.
-   parsoidConfig.limits.wt2html.maxWikitextSize = 125;
-   parsoidConfig.limits.wt2html.maxListItems = 5;
-   parsoidConfig.limits.wt2html.maxTableCells = 5;
-
// Direct logs to logstash via bunyan and gelf-stream.
var LOGSTASH_HOSTNAME='logstash1003.eqiad.wmnet';
var LOGSTASH_PORT=12201;

-- 
To view, visit https://gerrit.wikimedia.org/r/319265
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7650b62b853e1353e91038cb63fd691b1fd462a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Fix extension.json and also re add support for extension.jso...

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix extension.json and also re add support for extension.json 
in MW 1.27
..


Fix extension.json and also re add support for extension.json in MW 1.27

Change-Id: Ia58769f92153cd08409bc5c850b7ac0623b98b02
---
M PageForms.php
M extension.json
2 files changed, 38 insertions(+), 88 deletions(-)

Approvals:
  Paladox: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/PageForms.php b/PageForms.php
index 65372f4..8efef74 100644
--- a/PageForms.php
+++ b/PageForms.php
@@ -43,7 +43,7 @@
 // set in LocalSettings.php do not override the settings in
 // extension.json. For simplicity's sake, don't load extensions unless we're
 // at version 1.27 or higher.
-if ( version_compare( $GLOBALS['wgVersion'], '1.28c', '>' ) ) {
+if ( version_compare( $GLOBALS['wgVersion'], '1.27c', '>' ) ) {
if ( function_exists( 'wfLoadExtension' ) ) {
wfLoadExtension( 'PageForms' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
diff --git a/extension.json b/extension.json
index eb57cb4..90461f4 100644
--- a/extension.json
+++ b/extension.json
@@ -31,7 +31,7 @@
"PFHooks::initialize"
],
"require": {
-   "MediaWiki": ">= 1.28.0"
+   "MediaWiki": ">= 1.27.0"
},
"GroupPermissions": {
"*": {
@@ -397,93 +397,43 @@
]
},
"config": {
-   "PageFormsMaxAutocompleteValues": {
-   "value": 1000
-   },
-   "PageFormsMaxLocalAutocompleteValues": {
-   "value": 100
-   },
-   "PageFormsAutocompleteOnAllChars": {
-   "value": false
-   },
-   "PageFormsCacheAutocompleteValues": {
-   "value": false
-   },
-   "PageFormsAutocompleteCacheTimeout": {
-   "value": null
-   },
-   "PageFormsRenameEditTabs": {
-   "value": false
-   },
-   "PageFormsRenameMainEditTab": {
-   "value": false
-   },
-   "PageFormsListSeparator": {
-   "value": ","
-   },
-   "PageForms24HourTime": {
-   "value": false
-   },
-   "PageFormsCacheFormDefinitions": {
-   "value": false
-   },
-   "PageFormsFormCacheType": {
-   "value": null
-   },
-   "PageFormsLinkAllRedLinksToForms": {
-   "value": false
-   },
-   "PageFormsRedLinksCheckOnlyLocalProps": {
-   "value": false
-   },
-   "PageFormsShowTabsForAllHelperForms": {
-   "value": true
-   },
-   "PageFormsRunQueryFormAtTop": {
-   "value": false
-   },
-   "PageFormsGoogleMapsKey": {
-   "value": null
-   },
-   "PageFormsShowOnSelect": {
-   "value": []
-   },
-   "PageFormsAutocompleteValues": {
-   "value": []
-   },
-   "PageFormsGridValues": {
-   "value": []
-   },
-   "PageFormsGridParams": {
-   "value": []
-   },
-   "PageFormsFieldProperties": {
-   "value": []
-   },
-   "PageFormsCargoFields": {
-   "value": []
-   },
-   "PageFormsDependentFields": {
-   "value": []
-   },
-   "PageFormsCheckboxesSelectAllMinimum": {
-   "value": 10
-   },
+   "PageFormsMaxAutocompleteValues": 1000,
+   "PageFormsMaxLocalAutocompleteValues": 100,
+   "PageFormsAutocompleteOnAllChars": false,
+   "PageFormsCacheAutocompleteValues": false,
+   "PageFormsAutocompleteCacheTimeout": null,
+   "PageFormsRenameEditTabs": false,
+   "PageFormsRenameMainEditTab": false,
+   "PageFormsListSeparator":  ",",
+   "PageForms24HourTime": false,
+   "PageFormsCacheFormDefinitions": false,
+   "PageFormsFormCacheType": null,
+   "PageFormsLinkAllRedLinksToForms": false,
+   "PageFormsRedLinksCheckOnlyLocalProps": false,
+   "PageFormsShowTabsForAllHelperForms": true,
+   "PageFormsRunQueryFormAtTop": false,
+   "PageFormsGoogleMapsKey": null,
+   "PageFormsShowOnSelect": [],
+

[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Fix extension.json and also re add support for extension.jso...

2016-11-01 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319264

Change subject: Fix extension.json and also re add support for extension.json 
in MW 1.27
..

Fix extension.json and also re add support for extension.json in MW 1.27

Change-Id: Ia58769f92153cd08409bc5c850b7ac0623b98b02
---
M PageForms.php
M extension.json
2 files changed, 38 insertions(+), 88 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/64/319264/1

diff --git a/PageForms.php b/PageForms.php
index 65372f4..8efef74 100644
--- a/PageForms.php
+++ b/PageForms.php
@@ -43,7 +43,7 @@
 // set in LocalSettings.php do not override the settings in
 // extension.json. For simplicity's sake, don't load extensions unless we're
 // at version 1.27 or higher.
-if ( version_compare( $GLOBALS['wgVersion'], '1.28c', '>' ) ) {
+if ( version_compare( $GLOBALS['wgVersion'], '1.27c', '>' ) ) {
if ( function_exists( 'wfLoadExtension' ) ) {
wfLoadExtension( 'PageForms' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
diff --git a/extension.json b/extension.json
index eb57cb4..90461f4 100644
--- a/extension.json
+++ b/extension.json
@@ -31,7 +31,7 @@
"PFHooks::initialize"
],
"require": {
-   "MediaWiki": ">= 1.28.0"
+   "MediaWiki": ">= 1.27.0"
},
"GroupPermissions": {
"*": {
@@ -397,93 +397,43 @@
]
},
"config": {
-   "PageFormsMaxAutocompleteValues": {
-   "value": 1000
-   },
-   "PageFormsMaxLocalAutocompleteValues": {
-   "value": 100
-   },
-   "PageFormsAutocompleteOnAllChars": {
-   "value": false
-   },
-   "PageFormsCacheAutocompleteValues": {
-   "value": false
-   },
-   "PageFormsAutocompleteCacheTimeout": {
-   "value": null
-   },
-   "PageFormsRenameEditTabs": {
-   "value": false
-   },
-   "PageFormsRenameMainEditTab": {
-   "value": false
-   },
-   "PageFormsListSeparator": {
-   "value": ","
-   },
-   "PageForms24HourTime": {
-   "value": false
-   },
-   "PageFormsCacheFormDefinitions": {
-   "value": false
-   },
-   "PageFormsFormCacheType": {
-   "value": null
-   },
-   "PageFormsLinkAllRedLinksToForms": {
-   "value": false
-   },
-   "PageFormsRedLinksCheckOnlyLocalProps": {
-   "value": false
-   },
-   "PageFormsShowTabsForAllHelperForms": {
-   "value": true
-   },
-   "PageFormsRunQueryFormAtTop": {
-   "value": false
-   },
-   "PageFormsGoogleMapsKey": {
-   "value": null
-   },
-   "PageFormsShowOnSelect": {
-   "value": []
-   },
-   "PageFormsAutocompleteValues": {
-   "value": []
-   },
-   "PageFormsGridValues": {
-   "value": []
-   },
-   "PageFormsGridParams": {
-   "value": []
-   },
-   "PageFormsFieldProperties": {
-   "value": []
-   },
-   "PageFormsCargoFields": {
-   "value": []
-   },
-   "PageFormsDependentFields": {
-   "value": []
-   },
-   "PageFormsCheckboxesSelectAllMinimum": {
-   "value": 10
-   },
+   "PageFormsMaxAutocompleteValues": 1000,
+   "PageFormsMaxLocalAutocompleteValues": 100,
+   "PageFormsAutocompleteOnAllChars": false,
+   "PageFormsCacheAutocompleteValues": false,
+   "PageFormsAutocompleteCacheTimeout": null,
+   "PageFormsRenameEditTabs": false,
+   "PageFormsRenameMainEditTab": false,
+   "PageFormsListSeparator":  ",",
+   "PageForms24HourTime": false,
+   "PageFormsCacheFormDefinitions": false,
+   "PageFormsFormCacheType": null,
+   "PageFormsLinkAllRedLinksToForms": false,
+   "PageFormsRedLinksCheckOnlyLocalProps": false,
+   "PageFormsShowTabsForAllHelperForms": true,
+   "PageFormsRunQueryFormAtTop": false,
+   "PageFormsGoogleMapsKey": 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: zuul: migrate server only settings out of merger

2016-11-01 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: zuul: migrate server only settings out of merger
..


zuul: migrate server only settings out of merger

The url_pattern and status_url settings are solely for the Zuul server.
Stop populating them for both merger and server.

Change-Id: I97c1c702be1f44bcdc647517567cb6169d3100f4
---
M hieradata/common/zuul.yaml
M hieradata/role/common/zuul/server.yaml
M modules/role/manifests/zuul/merger.pp
M modules/role/manifests/zuul/server.pp
M modules/zuul/manifests/merger.pp
M modules/zuul/templates/zuul.conf.erb
6 files changed, 6 insertions(+), 8 deletions(-)

Approvals:
  Hashar: Looks good to me, but someone else must approve
  Dzahn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/hieradata/common/zuul.yaml b/hieradata/common/zuul.yaml
index 4a31991..5fbad1f 100644
--- a/hieradata/common/zuul.yaml
+++ b/hieradata/common/zuul.yaml
@@ -1,5 +1,3 @@
 zuul::common:
 gerrit_server: gerrit.wikimedia.org
 gerrit_user: jenkins-bot
-url_pattern: 
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/console'
-status_url: 'https://integration.wikimedia.org/zuul/'
diff --git a/hieradata/role/common/zuul/server.yaml 
b/hieradata/role/common/zuul/server.yaml
index 51128dd..c21168f 100644
--- a/hieradata/role/common/zuul/server.yaml
+++ b/hieradata/role/common/zuul/server.yaml
@@ -7,3 +7,5 @@
 jenkins_user: zuul-bot
 # FIXME use a lookup?
 statsd_host: statsd.eqiad.wmnet
+url_pattern: 
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/console'
+status_url: 'https://integration.wikimedia.org/zuul/'
diff --git a/modules/role/manifests/zuul/merger.pp 
b/modules/role/manifests/zuul/merger.pp
index b6dbb77..38f48f5 100644
--- a/modules/role/manifests/zuul/merger.pp
+++ b/modules/role/manifests/zuul/merger.pp
@@ -9,8 +9,6 @@
 # Shared settings
 gerrit_server   => $conf_common['gerrit_server'],
 gerrit_user => $conf_common['gerrit_user'],
-url_pattern => $conf_common['url_pattern'],
-status_url  => $conf_common['status_url'],
 
 # Merger related
 gearman_server  => $conf_merger['gearman_server'],
diff --git a/modules/role/manifests/zuul/server.pp 
b/modules/role/manifests/zuul/server.pp
index 1803d56..80de5a8 100644
--- a/modules/role/manifests/zuul/server.pp
+++ b/modules/role/manifests/zuul/server.pp
@@ -14,8 +14,6 @@
 # Shared settings
 gerrit_server=> $conf_common['gerrit_server'],
 gerrit_user  => $conf_common['gerrit_user'],
-url_pattern  => $conf_common['url_pattern'],
-status_url   => $conf_common['status_url'],
 
 # Server settings
 jenkins_apikey   => $jenkins_apikey,
@@ -23,6 +21,8 @@
 gearman_server_start => $conf_server['gearman_server_start'],
 jenkins_server   => $conf_server['jenkins_server'],
 jenkins_user => $conf_server['jenkins_user'],
+url_pattern  => $conf_server['url_pattern'],
+status_url   => $conf_server['status_url'],
 statsd_host  => $conf_server['statsd_host'],
 }
 
diff --git a/modules/zuul/manifests/merger.pp b/modules/zuul/manifests/merger.pp
index 3b56c19..f418614 100644
--- a/modules/zuul/manifests/merger.pp
+++ b/modules/zuul/manifests/merger.pp
@@ -19,13 +19,11 @@
 $gearman_server,
 $gerrit_server,
 $gerrit_user,
-$url_pattern,
 $gerrit_ssh_key_file,
 $gerrit_baseurl = 'https://gerrit.wikimedia.org/r',
 $git_dir= '/var/lib/zuul/git',
 $git_email  = "zuul-merger@${::hostname}",
 $git_name   = 'Wikimedia Zuul Merger',
-$status_url = "https://${::fqdn}/zuul/status;,
 $zuul_url   = $::fqdn,
 ) {
 
diff --git a/modules/zuul/templates/zuul.conf.erb 
b/modules/zuul/templates/zuul.conf.erb
index 60396b5..8b520e0 100644
--- a/modules/zuul/templates/zuul.conf.erb
+++ b/modules/zuul/templates/zuul.conf.erb
@@ -33,9 +33,11 @@
 layout_config=/etc/zuul/wikimedia/zuul/layout.yaml
 log_config=/etc/zuul/logging.conf
 state_dir=/var/lib/zuul
+<% if @zuul_role == 'server' -%>
 url_pattern=<%= @url_pattern %>
 status_url=<%= @status_url %>
 job_name_in_report = true
+<% end -%>
 
 <% if @zuul_role == 'merger' -%>
 [merger]

-- 
To view, visit https://gerrit.wikimedia.org/r/309299
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I97c1c702be1f44bcdc647517567cb6169d3100f4
Gerrit-PatchSet: 8
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Thcipriani 

[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Restrict noindex template feature to new articles

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Restrict noindex template feature to new articles
..


Restrict noindex template feature to new articles

This change restricts the noindex template feature to articles
that are less than $wgRCMaxAge old.

The logic for testing if an article is new has been moved to its
own function.

Also optimizing the template check and adding a short curcuit for
better performance.

Bug: T149538
Change-Id: I0f3ee84a73fbf8c4e28cbfeb1a5c437c2258ce30
---
M PageTriage.hooks.php
1 file changed, 54 insertions(+), 30 deletions(-)

Approvals:
  Cenarium: Looks good to me, but someone else must approve
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php
index 1684b59..e205de7 100644
--- a/PageTriage.hooks.php
+++ b/PageTriage.hooks.php
@@ -254,20 +254,26 @@
/**
 * Determines whether to set noindex for the article specified
 *
-* Returns true if the page includes a template that triggers 
noindexing or
-* all of the following are true:
-* 1. $wgPageTriageNoIndexUnreviewedNewArticles is true
-* 2. The page is in triage queue and has not been triaged
-* 3. The page is younger than the maximum age for "new pages"
+* Returns true if all of the following are true:
+*   1. The page includes a template that triggers noindexing
+*   2. The page was at some point in the triage queue
+*   3. The page is younger than the maximum age for "new pages"
+* or all of the following are true:
+*   1. $wgPageTriageNoIndexUnreviewedNewArticles is true
+*   2. The page is in the triage queue and has not been triaged
+*   3. The page is younger than the maximum age for "new pages"
+* Note that we always check the age of the page last since that is
+* potentially the most expensive check (if the data isn't cached).
 *
 * @param $article Article
 * @return bool
 */
private static function shouldShowNoIndex( $article ) {
-   global $wgPageTriageNoIndexUnreviewedNewArticles, $wgRCMaxAge,
-   $wgPageTriageNoIndexTemplates;
+   global $wgPageTriageNoIndexUnreviewedNewArticles, 
$wgPageTriageNoIndexTemplates;
 
// See if article includes any templates that should trigger 
noindexing
+   // TODO: This system is a bit hacky and unintuitive. At some 
point we
+   // may want to switch to a system based on the __NOINDEX__ 
magic word.
if ( $wgPageTriageNoIndexTemplates && $article->mParserOutput 
instanceof ParserOutput ) {
// Properly format the template names to match what 
getTemplates() returns
$noIndexTemplates = array_map(
@@ -282,41 +288,59 @@
$allTransclusions[NS_TEMPLATE] :
[];
 
-   foreach ( $templates as $template => $pageId ) {
-   if ( in_array( $template, $noIndexTemplates ) ) 
{
-   return true;
+   foreach ( $noIndexTemplates as $noIndexTemplate ) {
+   if ( isset( $templates[ $noIndexTemplate ] ) ) {
+   // The noindex template feature is 
restricted to new articles
+   // to minimize the potential for abuse.
+   if ( self::isArticleNew( $article ) ) {
+   return true;
+   } else {
+   // Short circuit since we know 
it will fail the next set
+   // of tests as well.
+   return false;
+   }
}
}
}
 
if ( $wgPageTriageNoIndexUnreviewedNewArticles &&
-   PageTriageUtil::doesPageNeedTriage( $article )
+   PageTriageUtil::doesPageNeedTriage( $article ) &&
+   self::isArticleNew( $article )
) {
+   return true;
+   }
 
-   $pageId = $article->getId();
+   return false;
+   }
 
-   // Get timestamp for article creation (typically from 
cache)
-   $metaDataObject = new ArticleMetadata( [ $pageId ] );
-   $metaData = $metaDataObject->getMetadata();
+   /**
+* Checks to see if an article is new, i.e. less than $wgRCMaxAge
+* @param Article $article Article to check
+   

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Clean up and simplify icon SVGs

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Clean up and simplify icon SVGs
..


Clean up and simplify icon SVGs

Using svgo and some manual fixes

Change-Id: Ifb2ca82da7e95e2f0deccbec0e01eeefaae43236
---
M modules/icons/feedback.svg
M modules/icons/generic.svg
M modules/icons/mention-success.svg
M modules/icons/thanks-ltr.svg
M modules/icons/thanks-rtl.svg
M modules/icons/trash.svg
M modules/icons/tray.svg
M modules/icons/user-speech-bubble.svg
8 files changed, 13 insertions(+), 25 deletions(-)

Approvals:
  VolkerE: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/icons/feedback.svg b/modules/icons/feedback.svg
index 6b12bc1..c0aad33 100644
--- a/modules/icons/feedback.svg
+++ b/modules/icons/feedback.svg
@@ -1,15 +1,4 @@
-
-http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink;>
-feedback
-
-
-
-
-
-
-
-
-
-
-
+
+http://www.w3.org/2000/svg; width="30" height="30" viewBox="0 0 30 
30">
+  
 
diff --git a/modules/icons/generic.svg b/modules/icons/generic.svg
index 297de26..e9c1b73 100644
--- a/modules/icons/generic.svg
+++ b/modules/icons/generic.svg
@@ -1,7 +1,7 @@
 
 http://www.w3.org/2000/svg; width="30" height="30" viewBox="0 0 30 
30">
   
-
-
+
+
   
 
diff --git a/modules/icons/mention-success.svg 
b/modules/icons/mention-success.svg
index 5cfcabf..843b81f 100644
--- a/modules/icons/mention-success.svg
+++ b/modules/icons/mention-success.svg
@@ -1,4 +1,5 @@
 
 http://www.w3.org/2000/svg; width="30" height="30" viewBox="0 0 
213.37759 149.36432">
-
-
\ No newline at end of file
+
+
+
diff --git a/modules/icons/thanks-ltr.svg b/modules/icons/thanks-ltr.svg
index b58974c..f277ce4 100644
--- a/modules/icons/thanks-ltr.svg
+++ b/modules/icons/thanks-ltr.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
+
 
diff --git a/modules/icons/thanks-rtl.svg b/modules/icons/thanks-rtl.svg
index 7ef9ec2..0f9a6fb 100644
--- a/modules/icons/thanks-rtl.svg
+++ b/modules/icons/thanks-rtl.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
+
 
diff --git a/modules/icons/trash.svg b/modules/icons/trash.svg
index f0ceebc..02bdcd6 100644
--- a/modules/icons/trash.svg
+++ b/modules/icons/trash.svg
@@ -1,6 +1,4 @@
 
 http://www.w3.org/2000/svg;>
-
-
-
+
 
diff --git a/modules/icons/tray.svg b/modules/icons/tray.svg
index d7ab69b..7c617ee 100644
--- a/modules/icons/tray.svg
+++ b/modules/icons/tray.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
+
 
diff --git a/modules/icons/user-speech-bubble.svg 
b/modules/icons/user-speech-bubble.svg
index cf5e91b..12e60d4 100644
--- a/modules/icons/user-speech-bubble.svg
+++ b/modules/icons/user-speech-bubble.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
+
 

-- 
To view, visit https://gerrit.wikimedia.org/r/316724
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb2ca82da7e95e2f0deccbec0e01eeefaae43236
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/dns[master]: add AAAA and PTR for eventlog1001.eqiad.wmnet

2016-11-01 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: add  and PTR for eventlog1001.eqiad.wmnet
..


add  and PTR for eventlog1001.eqiad.wmnet

A mapped IPv6 address has been added to the host
in Change-Id: I3f5d90a66d5f9c20.

Now add the DNS records for it.

Change-Id: Ieeffd2e44ac0ec2453cd72fef645df1646ab4f98
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wmnet
2 files changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Dzahn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 29fb1b1..2aad6b6 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -140,6 +140,7 @@
 4.3.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   cp1057.eqiad.wmnet.
 
 0.5.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   iridium.eqiad.wmnet.
+7.6.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   eventlog1001.eqiad.wmnet.
 9.7.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   planet1001.eqiad.wmnet.
 6.8.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   iridium-vcs.eqiad.wmnet.
 
diff --git a/templates/wmnet b/templates/wmnet
index be8ea11..d5363a8 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -380,6 +380,7 @@
 etcd10061H  IN A10.64.32.218
 etherpad10011H  IN A10.64.32.177 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 eventlog10011H  IN A10.64.32.167
+eventlog10011H  IN  2620:0:861:103:10:64:32:167
 fluorine1H  IN A10.64.0.21
 francium1H  IN A10.64.32.168
 ganeti1001  1H  IN A10.64.32.169

-- 
To view, visit https://gerrit.wikimedia.org/r/319150
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieeffd2e44ac0ec2453cd72fef645df1646ab4f98
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
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...parsoid[master]: Get rid of simple debug helpers

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Get rid of simple debug helpers
..


Get rid of simple debug helpers

 * Use the logger instead.

Change-Id: I6039267e43b59fd647dfd3d85c69d7a3c8b707a4
---
M lib/config/MWParserEnvironment.js
M lib/logger/ParsoidLogger.js
M lib/mw/ApiRequest.js
M lib/utils/Util.js
M lib/wt2html/TokenTransformManager.js
M lib/wt2html/tt/ExtensionHandler.js
M lib/wt2html/tt/ParserFunctions.js
M lib/wt2html/tt/TemplateHandler.js
M lib/wt2html/tt/TokenCollector.js
9 files changed, 74 insertions(+), 110 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index c30d3d7..c8c6a7c 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -605,52 +605,6 @@
return this.normalizedTitleKey(this.resolveTitle(hrefToken, true), 
true) !== null;
 };
 
-/**
- * Simple debug helper
- */
-MWParserEnvironment.prototype.dp = function() {
-   if (this.conf.parsoid.debug) {
-   if (arguments.length > 1) {
-   try {
-   console.warn(JSON.stringify(arguments, null, 
2));
-   } catch (e) {
-   console.trace();
-   console.warn(e);
-   }
-   } else {
-   console.warn(arguments[0]);
-   }
-   }
-};
-
-/**
- * Even simpler debug helper that always prints..
- */
-MWParserEnvironment.prototype.ap = function() {
-   if (arguments.length > 1) {
-   try {
-   console.warn(JSON.stringify(arguments, null, 2));
-   } catch (e) {
-   console.warn(e);
-   }
-   } else {
-   console.warn(arguments[0]);
-   }
-};
-
-/**
- * Simple debug helper, trace-only
- */
-MWParserEnvironment.prototype.tp = function() {
-   if (this.conf.parsoid.debug) {
-   if (arguments.length > 1) {
-   console.warn(JSON.stringify(arguments, null, 2));
-   } else {
-   console.warn(arguments[0]);
-   }
-   }
-};
-
 MWParserEnvironment.prototype.initUID = function() {
this.uid = 1;
 };
diff --git a/lib/logger/ParsoidLogger.js b/lib/logger/ParsoidLogger.js
index d3bf078..15973b2 100644
--- a/lib/logger/ParsoidLogger.js
+++ b/lib/logger/ParsoidLogger.js
@@ -107,13 +107,15 @@

this.registerBackend(buildTraceOrDebugFlag(parsoidConfig.traceFlags, "trace"),
tracerBackend);
}
-   if (parsoidConfig.debugFlags) {
+   if (parsoidConfig.debug) {
+   this.registerBackend(/^debug(\/.*)?/, tracerBackend);
+   } else if (parsoidConfig.debugFlags) {

this.registerBackend(buildTraceOrDebugFlag(parsoidConfig.debugFlags, "debug"),
tracerBackend);
}
if (linter && parsoidConfig.linting) {
-   this.registerBackend(/lint(\/.*)?/, 
linter.linterBackend.bind(linter));
-   this.registerBackend(/end(\/.*)/, 
linter.logLintOutput.bind(linter));
+   this.registerBackend(/^lint(\/.*)?/, 
linter.linterBackend.bind(linter));
+   this.registerBackend(/^end(\/.*)/, 
linter.logLintOutput.bind(linter));
}
 };
 
@@ -146,6 +148,7 @@
 };
 
 var prettyLogTypeMap = {
+   "debug":"[DEBUG]",
"trace/peg":"[peg]",
"trace/pre":"[PRE]",
"debug/pre":"[PRE-DBG]",
@@ -182,7 +185,8 @@
}
 
// indent by number of slashes
-   var level = logType.match(/\//g).length - 1;
+   var match = logType.match(/\//g);
+   var level = match ? match.length - 1 : 0;
var indent = '  '.repeat(level);
msg += indent;
 
diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index 5394a0d..75d350f 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -311,8 +311,7 @@
options.headers['X-Forwarded-Proto'] = 'https';
}
}
-   this.env.dp("Starting HTTP request: ", options);
-   this.trace(options);
+   this.trace("Starting HTTP request: ", options);
 
return request(options, callback);
 };
@@ -581,7 +580,7 @@
return;
}
 
-   this.env.tp('Retrieved ' + this.title, metadata);
+   this.trace('Retrieved ' + this.title, metadata);
 
// Add the source to the cache
// (both original title as well as possible redirected title)
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index e08430a..176592a 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -51,6 +51,10 @@

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

98fb6c0 Explicitly create table, break up updates

Change-Id: I0ebdb49d793c2443c14fc28d6d48e71f253135f5
---
0 files changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified




-- 
To view, visit https://gerrit.wikimedia.org/r/319261
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ebdb49d793c2443c14fc28d6d48e71f253135f5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
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/core[master]: WatchedItemStore: Update process cache when adding items

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: WatchedItemStore: Update process cache when adding items
..


WatchedItemStore: Update process cache when adding items

This way, when submitting POST to action=watch, the response will
not show "Unwatched" in the navigation 'content action' tabs.

This was previously the case on any wiki installation that has
more than 1 database as the skin would call User::isWatched(),
which would query stale data from a slave.

This doesn't yet account for the reverse use case (removing from
watchlist). That's to be addressed in a later commit.

Bug: T28292
Change-Id: Ie4b69c985815a77b70692db0c4dbf52e1a6a018d
---
M includes/WatchedItemStore.php
1 file changed, 14 insertions(+), 2 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/WatchedItemStore.php b/includes/WatchedItemStore.php
index 6c47cae..cc4779e 100644
--- a/includes/WatchedItemStore.php
+++ b/includes/WatchedItemStore.php
@@ -167,7 +167,7 @@
 * @param User $user
 * @param LinkTarget $target
 *
-* @return WatchedItem|null
+* @return WatchedItem|false
 */
private function getCached( User $user, LinkTarget $target ) {
return $this->cache->get( $this->getCacheKey( $user, $target ) 
);
@@ -495,7 +495,7 @@
 
$watchedItems = [];
foreach ( $res as $row ) {
-   // todo these could all be cached at some point?
+   // @todo: Should we add these to the process cache?
$watchedItems[] = new WatchedItem(
$user,
new TitleValue( (int)$row->wl_namespace, 
$row->wl_title ),
@@ -602,6 +602,7 @@
}
 
$rows = [];
+   $items = [];
foreach ( $targets as $target ) {
$rows[] = [
'wl_user' => $user->getId(),
@@ -609,6 +610,11 @@
'wl_title' => $target->getDBkey(),
'wl_notificationtimestamp' => null,
];
+   $items[] = new WatchedItem(
+   $user,
+   $target,
+   null
+   );
$this->uncache( $user, $target );
}
 
@@ -618,6 +624,12 @@
// if there's already an entry for this page
$dbw->insert( 'watchlist', $toInsert, __METHOD__, 
'IGNORE' );
}
+   // Update process cache to ensure skin doesn't claim that the 
current
+   // page is unwatched in the response of action=watch itself 
(T28292).
+   // This would otherwise be re-queried from a slave by 
isWatched().
+   foreach ( $items as $item ) {
+   $this->cache( $item );
+   }
 
return true;
}

-- 
To view, visit https://gerrit.wikimedia.org/r/319255
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4b69c985815a77b70692db0c4dbf52e1a6a018d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
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/core[master]: Add ISBN parser function

2016-11-01 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319263

Change subject: Add ISBN parser function
..

Add ISBN parser function

This is intended to ease linking to Special:Booksources as an
alternative to magic links.

{{isbn:}} is basically equivalent to
[[Special:Booksources/...|ISBN ...]], but it will also validate the
ISBN, and allow for localization of the link text.

Bug: T148274
Change-Id: I12dfdf70e09f4847e68bc7d88683ea62c40b29a1
---
M includes/parser/CoreParserFunctions.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M languages/messages/MessagesEn.php
M tests/parser/parserTests.txt
5 files changed, 43 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/63/319263/1

diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index ef26db6..952e59d 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -54,7 +54,7 @@
'talkpagename', 'talkpagenamee', 'subjectpagename',
'subjectpagenamee', 'pageid', 'revisionid', 
'revisionday',
'revisionday2', 'revisionmonth', 'revisionmonth1', 
'revisionyear',
-   'revisiontimestamp', 'revisionuser', 'cascadingsources',
+   'revisiontimestamp', 'revisionuser', 
'cascadingsources', 'isbn',
];
foreach ( $noHashFunctions as $func ) {
$parser->setFunctionHook( $func, [ __CLASS__, $func ], 
Parser::SFH_NO_HASH );
@@ -1334,4 +1334,30 @@
return '';
}
 
+   /**
+* ISBN parser function to ease linking to Special:Booksources
+*
+* @param Parser $parser
+* @param string $isbn
+* @return array|string
+*/
+   public static function isbn( Parser $parser, $isbn = '' ) {
+   if ( !SpecialBookSources::isValidISBN( $isbn ) ) {
+   $converter = 
$parser->getConverterLanguage()->getConverter();
+   return '' .
+   wfMessage( 'isbn-invalid' )
+   ->params( $converter->markNoConversion( 
wfEscapeWikiText( $isbn ) ) )
+   ->inContentLanguage()->text() .
+   '';
+   }
+
+   return [
+   $parser->getLinkRenderer()->makeLink(
+   SpecialPage::getTitleFor( 'Booksources', $isbn 
),
+   wfMessage( 'isbn-linktext' )->params( $isbn 
)->text()
+   ),
+   'isHTML' => true
+   ];
+   }
+
 }
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index c759984..aeea50c 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1937,6 +1937,8 @@
"booksources-invalid-isbn": "The given ISBN does not appear to be 
valid; check for errors copying from the original source.",
"rfcurl": "//tools.ietf.org/html/rfc$1",
"pubmedurl": "//www.ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",
+   "isbn-invalid": "Error: Invalid ISBN \"$1\".",
+   "isbn-linktext": "ISBN $1",
"specialloguserlabel": "Performer:",
"speciallogtitlelabel": "Target (title or {{ns:user}}:username for 
user):",
"log": "Logs",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index fe44a2b..5cdb52f 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -2121,6 +2121,8 @@
"booksources-invalid-isbn": "This message is displayed after an invalid 
ISBN is entered on [[Special:Booksources]].",
"rfcurl": "{{notranslate}}\nParameters:\n* $1 - RFC number\nSee 
also:\n* {{msg-mw|Pubmedurl}}",
"pubmedurl": "{{notranslate}}\nParameters:\n* $1 - Pubmed number\nSee 
also:\n* {{msg-mw|Rfcurl}}",
+   "isbn-invalid": "Error message shown if the provided ISBN number is 
invalid. $1 is the user-provided ISBN number.",
+   "isbn-linktext": "Link text used when generating a link to 
Special:Booksources. ISBN refers to [[:w:International Standard Book Number]]. 
$1 is the ISBN identifier.",
"specialloguserlabel": "Used in [[Special:Log]] as a label for an input 
field with which the log can be filtered for entries describing actions 
''performed'' by the specified user.  \"Carried out\" and \"done\" are possible 
alternatives for \"performed\".",
"speciallogtitlelabel": "Used in [[Special:Log]] as a label for an 
input field with which the log can be filtered.  This filter selects for pages 
or users on which a log action was performed.",
"log": "{{doc-special|Log}}\n{{Identical|Log}}",
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 67369e2..83c5de3 100644
--- 

[MediaWiki-commits] [Gerrit] analytics/discovery-stats[production]: DO NOT MERGE WIP: count page with geo tags

2016-11-01 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319262

Change subject: DO NOT MERGE WIP: count page with geo tags
..

DO NOT MERGE WIP: count page with geo tags

Bug: T149722
Change-Id: I1fa2d69549af5527105efa4403329182399ab238
---
A geo-tag-counts.php
A src/Graphite.php
A src/Mysql.php
M vendor/composer/autoload_classmap.php
M vendor/composer/autoload_static.php
5 files changed, 76 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/discovery-stats 
refs/changes/62/319262/1

diff --git a/geo-tag-counts.php b/geo-tag-counts.php
new file mode 100644
index 000..2999053
--- /dev/null
+++ b/geo-tag-counts.php
@@ -0,0 +1,22 @@
+prepare( 'USE :dbname' );
+$graphite = new Graphite( $config );
+
+foreach ( $matrix->getSites() as $site ) {
+$switchToDb->execute( [ ':dbname' => $site->getDbName() ] );
+$siteKey = $site->getFamily() . '.' . $site->getCode();
+$res = $db->query( 'SELECT count(*) AS num FROM geo_tags WHERE 
gt_primary=1' );
+if ( $res && ( $row = reset( $res ) ) ) {
+$siteKey = $site->getFamily() . '.' . $site->getCode();
+$graphite->record( "geodata.pages.$siteKey.hourly" );
+}
+}
diff --git a/src/Graphite.php b/src/Graphite.php
new file mode 100644
index 000..7a65164
--- /dev/null
+++ b/src/Graphite.php
@@ -0,0 +1,26 @@
+host = $config->graphiteHost;
+$this->port = $config->graphitePort;
+$this->timestamp = time();
+}
+
+public function record( $metric, $value ) {
+$packet = "{$metric} {$value} {$this->timestamp}";
+$nc = "nc -q0 {$this->host} {$this->port}";
+$command = "echo \"$packet\" | $nc";
+
+exec( $command );
+}
+}
diff --git a/src/Mysql.php b/src/Mysql.php
new file mode 100644
index 000..82fefcb
--- /dev/null
+++ b/src/Mysql.php
@@ -0,0 +1,24 @@
+ $baseDir . '/src/Api.php',
+'DiscoveryStats\\Graphite' => $baseDir . '/src/Graphite.php',
+'DiscoveryStats\\Mysql' => $baseDir . '/src/Mysql.php',
 'DiscoveryStats\\NormalSite' => $baseDir . '/src/NormalSite.php',
 'DiscoveryStats\\Site' => $baseDir . '/src/Site.php',
 'DiscoveryStats\\SiteMatrix' => $baseDir . '/src/SiteMatrix.php',
diff --git a/vendor/composer/autoload_static.php 
b/vendor/composer/autoload_static.php
index 43a02a2..9b64739 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -8,6 +8,8 @@
 {
 public static $classMap = array (
 'DiscoveryStats\\Api' => __DIR__ . '/../..' . '/src/Api.php',
+'DiscoveryStats\\Graphite' => __DIR__ . '/../..' . '/src/Graphite.php',
+'DiscoveryStats\\Mysql' => __DIR__ . '/../..' . '/src/Mysql.php',
 'DiscoveryStats\\NormalSite' => __DIR__ . '/../..' . 
'/src/NormalSite.php',
 'DiscoveryStats\\Site' => __DIR__ . '/../..' . '/src/Site.php',
 'DiscoveryStats\\SiteMatrix' => __DIR__ . '/../..' . 
'/src/SiteMatrix.php',

-- 
To view, visit https://gerrit.wikimedia.org/r/319262
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fa2d69549af5527105efa4403329182399ab238
Gerrit-PatchSet: 1
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: production
Gerrit-Owner: MaxSem 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

2016-11-01 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319261

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

98fb6c0 Explicitly create table, break up updates

Change-Id: I0ebdb49d793c2443c14fc28d6d48e71f253135f5
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/61/319261/1


-- 
To view, visit https://gerrit.wikimedia.org/r/319261
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ebdb49d793c2443c14fc28d6d48e71f253135f5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Explicitly create table, break up updates

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Explicitly create table, break up updates
..


Explicitly create table, break up updates

Try to minimize civicrm_address locking.

Bug: T148578
Change-Id: I3d981fe972e883f5b990c1d27c8616a3b3e4f6b8
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 21 insertions(+), 7 deletions(-)

Approvals:
  Eileen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 9fc3a35..3574e7a 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -2372,21 +2372,35 @@
 function wmf_civicrm_update_7320() {
   civicrm_initialize();
   CRM_Core_DAO::executeQuery("
-CREATE TEMPORARY TABLE civicrm_address_geocode
- SELECT id, LEFT(postal_code, 5) AS zip
+CREATE TEMPORARY TABLE civicrm_address_geocode (
+  id INT PRIMARY KEY,
+  zip CHAR(5),
+  latitude DOUBLE,
+  longitude DOUBLE,
+  timezone VARCHAR(8)
+)");
+
+  CRM_Core_DAO::executeQuery("INSERT INTO civicrm_address_geocode (id, zip)
+ SELECT id, LEFT(postal_code, 5)
  FROM civicrm_address
  WHERE country_id = (SELECT id FROM civicrm_country WHERE iso_code = 'US')
   ");
 
-  CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_address_geocode ADD INDEX 
index_id(id)");
   CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_address_geocode ADD INDEX 
index_zip(zip)");
+
+  CRM_Core_DAO::executeQuery("
+UPDATE civicrm_address_geocode c
+INNER JOIN wmf_zip_geo g ON c.zip = g.zip
+SET c.latitude = g.latitude,
+  c.longitude = g.longitude,
+  c.timezone = g.timezone
+  ");
 
   CRM_Core_DAO::executeQuery("
 UPDATE civicrm_address a
 INNER JOIN civicrm_address_geocode c ON c.id = a.id
-INNER JOIN wmf_zip_geo g ON c.zip = g.zip
-SET a.geo_code_1 = g.latitude,
-  a.geo_code_2 = g.longitude,
-  a.timezone = g.timezone
+SET a.geo_code_1 = c.latitude,
+  a.geo_code_2 = c.longitude,
+  a.timezone = c.timezone
   ");
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/319256
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d981fe972e883f5b990c1d27c8616a3b3e4f6b8
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] analytics/discovery-stats[master]: WIP: count page with geo tags

2016-11-01 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319260

Change subject: WIP: count page with geo tags
..

WIP: count page with geo tags

Bug: T149722
Change-Id: I1fa2d69549af5527105efa4403329182399ab238
---
A geo-tag-counts.php
A src/Graphite.php
A src/Mysql.php
3 files changed, 72 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/discovery-stats 
refs/changes/60/319260/1

diff --git a/geo-tag-counts.php b/geo-tag-counts.php
new file mode 100644
index 000..2999053
--- /dev/null
+++ b/geo-tag-counts.php
@@ -0,0 +1,22 @@
+prepare( 'USE :dbname' );
+$graphite = new Graphite( $config );
+
+foreach ( $matrix->getSites() as $site ) {
+$switchToDb->execute( [ ':dbname' => $site->getDbName() ] );
+$siteKey = $site->getFamily() . '.' . $site->getCode();
+$res = $db->query( 'SELECT count(*) AS num FROM geo_tags WHERE 
gt_primary=1' );
+if ( $res && ( $row = reset( $res ) ) ) {
+$siteKey = $site->getFamily() . '.' . $site->getCode();
+$graphite->record( "geodata.pages.$siteKey.hourly" );
+}
+}
diff --git a/src/Graphite.php b/src/Graphite.php
new file mode 100644
index 000..7a65164
--- /dev/null
+++ b/src/Graphite.php
@@ -0,0 +1,26 @@
+host = $config->graphiteHost;
+$this->port = $config->graphitePort;
+$this->timestamp = time();
+}
+
+public function record( $metric, $value ) {
+$packet = "{$metric} {$value} {$this->timestamp}";
+$nc = "nc -q0 {$this->host} {$this->port}";
+$command = "echo \"$packet\" | $nc";
+
+exec( $command );
+}
+}
diff --git a/src/Mysql.php b/src/Mysql.php
new file mode 100644
index 000..82fefcb
--- /dev/null
+++ b/src/Mysql.php
@@ -0,0 +1,24 @@
+https://gerrit.wikimedia.org/r/319260
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fa2d69549af5527105efa4403329182399ab238
Gerrit-PatchSet: 1
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Add ve.Range#overlapsRange method

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add ve.Range#overlapsRange method
..


Add ve.Range#overlapsRange method

Similar to #touchesRange but requires a non-zero overlap.

Change-Id: I5eb3ceca76ff53a7e395733567c99751b350
---
M src/ve.Range.js
M tests/ve.Range.test.js
2 files changed, 37 insertions(+), 15 deletions(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/ve.Range.js b/src/ve.Range.js
index 43618f9..0495f4f 100644
--- a/src/ve.Range.js
+++ b/src/ve.Range.js
@@ -150,6 +150,20 @@
 };
 
 /**
+ * Check if another range overlaps this one
+ *
+ * This includes ranges which intersect this one, e.g. [1,3] & [2,4],
+ * and ranges which cover this one completely, e.g. [1,3] & [0,5],
+ * but *not* ranges which only touch, e.g. [0,2] & [2,4].
+ *
+ * @param {ve.Range} range Range to check
+ * @return {boolean} If other range overlaps this range
+ */
+ve.Range.prototype.overlapsRange = function ( range ) {
+   return range.end > this.start && range.start < this.end;
+};
+
+/**
  * Get the length of the range.
  *
  * @return {number} Length of range
diff --git a/tests/ve.Range.test.js b/tests/ve.Range.test.js
index c86cf3e..d6cc5ee 100644
--- a/tests/ve.Range.test.js
+++ b/tests/ve.Range.test.js
@@ -8,12 +8,12 @@
 
 /* Tests */
 
-QUnit.test( 'Basic usage (clone, isCollapsed, isBackwards, getLength, equals, 
equalsSelection, containsOffset, containsRange, touchesRange)', 35, function ( 
assert ) {
+QUnit.test( 'Basic usage (clone, isCollapsed, isBackwards, getLength, equals, 
equalsSelection, containsOffset, containsRange, touchesRange)', function ( 
assert ) {
var range = new ve.Range( 100, 200 );
 
-   assert.strictEqual( range.isCollapsed(), false );
-   assert.strictEqual( range.isBackwards(), false );
-   assert.strictEqual( range.getLength(), 100 );
+   assert.strictEqual( range.isCollapsed(), false, 'forwards range is not 
collapsed' );
+   assert.strictEqual( range.isBackwards(), false, 'forwards range is not 
backwards' );
+   assert.strictEqual( range.getLength(), 100, 'forwards range has length 
100' );
assert.strictEqual( range.equals( new ve.Range( 100, 200 ) ), true, 
'equals matches identical range' );
assert.strictEqual( range.equals( new ve.Range( 200, 100 ) ), false, 
'equals doesn\'t match reverse range' );
assert.strictEqual( range.equalsSelection( new ve.Range( 200, 100 ) ), 
true, 'equalsSelection matches reverse range' );
@@ -27,9 +27,9 @@
assert.strictEqual( range.containsRange( new ve.Range( 100, 201 ) ), 
false, 'doesn\'t contain 100, 201' );
 
range = new ve.Range( 200, 100 );
-   assert.strictEqual( range.isCollapsed(), false );
-   assert.strictEqual( range.isBackwards(), true );
-   assert.strictEqual( range.getLength(), 100 );
+   assert.strictEqual( range.isCollapsed(), false, 'backwards range is not 
collapsed' );
+   assert.strictEqual( range.isBackwards(), true, 'backwards range is 
backwards' );
+   assert.strictEqual( range.getLength(), 100, 'backwards range has length 
100' );
assert.strictEqual( range.containsOffset( 99 ), false, 'doesn\'t 
contain 99' );
assert.strictEqual( range.containsOffset( 100 ), true, 'contains 100' );
assert.strictEqual( range.containsOffset( 199 ), true, 'contains 199' );
@@ -41,17 +41,25 @@
assert.strictEqual( range.containsRange( new ve.Range( 100, 201 ) ), 
false, 'doesn\'t contain 100, 201' );
 
assert.strictEqual( range.touchesRange( new ve.Range( 98, 99 ) ), 
false, 'doesn\'t touch 98, 99' );
-   assert.strictEqual( range.touchesRange( new ve.Range( 203, 201 ) ), 
false, 'doesn\'t touch 203,201' );
-   assert.strictEqual( range.touchesRange( new ve.Range( 98, 100 ) ), 
true, 'touches 98,100' );
-   assert.strictEqual( range.touchesRange( new ve.Range( 200, 201 ) ), 
true, 'touches 200,201' );
-   assert.strictEqual( range.touchesRange( new ve.Range( 150, 98 ) ), 
true, 'touches 150,98' );
-   assert.strictEqual( range.touchesRange( new ve.Range( 0, 300 ) ), true, 
'touches 0,300' );
+   assert.strictEqual( range.touchesRange( new ve.Range( 203, 201 ) ), 
false, 'doesn\'t touch 203, 201' );
+   assert.strictEqual( range.touchesRange( new ve.Range( 98, 100 ) ), 
true, 'touches 98, 100' );
+   assert.strictEqual( range.touchesRange( new ve.Range( 200, 201 ) ), 
true, 'touches 200, 201' );
+   assert.strictEqual( range.touchesRange( new ve.Range( 150, 98 ) ), 
true, 'touches 150, 98' );
+   assert.strictEqual( range.touchesRange( new ve.Range( 0, 300 ) ), true, 
'touches 0, 300' );
assert.strictEqual( range.touchesRange( range ), true, 'returns true 
when passed itself' );
 
+   assert.strictEqual( range.overlapsRange( new ve.Range( 99, 100 ) ), 
false, 'doesn\'t overlap 99, 100' );
+   

[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Undo 'require' debug mode hack

2016-11-01 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319259

Change subject: Undo 'require' debug mode hack
..

Undo 'require' debug mode hack

Not needed since I6ede10fd42676bb035ea26c693c78bcdc1438a7d

Change-Id: I1417763ea574f71008049aff47358bcd0c084b9f
---
M resources/subscribing/ext.centralNotice.geoIP.js
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/59/319259/1

diff --git a/resources/subscribing/ext.centralNotice.geoIP.js 
b/resources/subscribing/ext.centralNotice.geoIP.js
index 4062fa9..e9c3241 100644
--- a/resources/subscribing/ext.centralNotice.geoIP.js
+++ b/resources/subscribing/ext.centralNotice.geoIP.js
@@ -122,8 +122,7 @@
 
geoPromise = mw.loader.using( lookupModule )
 
-   // require arg needed for debug mode to 
work TODO fixed?
-   .then( function ( require ) {
+   .then( function () {
var lookupCallback = require( 
lookupModule );
 
// Chaining lookup: here, 
return the promise provided by

-- 
To view, visit https://gerrit.wikimedia.org/r/319259
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1417763ea574f71008049aff47358bcd0c084b9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: netops (etc.): add asw2-d-eqiad

2016-11-01 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: netops (etc.): add asw2-d-eqiad
..


netops (etc.): add asw2-d-eqiad

Change-Id: I779561919640298473be8f72b41e36e5cf637b40
---
M modules/netops/manifests/monitoring.pp
M modules/rancid/files/core/router.db
M modules/role/manifests/torrus.pp
M modules/smokeping/files/config.d/Targets
4 files changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/netops/manifests/monitoring.pp 
b/modules/netops/manifests/monitoring.pp
index a505bcf..6f8ee2d 100644
--- a/modules/netops/manifests/monitoring.pp
+++ b/modules/netops/manifests/monitoring.pp
@@ -67,6 +67,7 @@
 'asw-b-eqiad.mgmt.eqiad.wmnet'   => { ipv4 => '10.65.0.18',   },
 'asw-c-eqiad.mgmt.eqiad.wmnet'   => { ipv4 => '10.65.0.23',   },
 'asw-d-eqiad.mgmt.eqiad.wmnet'   => { ipv4 => '10.65.0.24',   },
+'asw2-d-eqiad.mgmt.eqiad.wmnet'  => { ipv4 => '10.65.0.27',   },
 'msw1-eqiad.mgmt.eqiad.wmnet'=> { ipv4 => '10.65.0.10',   },
 # codfw
 'asw-a-codfw.mgmt.codfw.wmnet'   => { ipv4 => '10.193.0.16',  },
diff --git a/modules/rancid/files/core/router.db 
b/modules/rancid/files/core/router.db
index 6bf6c79..2f2a347 100644
--- a/modules/rancid/files/core/router.db
+++ b/modules/rancid/files/core/router.db
@@ -10,6 +10,7 @@
 asw-b-eqiad.mgmt.eqiad.wmnet:juniper:up:
 asw-c-eqiad.mgmt.eqiad.wmnet:juniper:up:
 asw-d-eqiad.mgmt.eqiad.wmnet:juniper:up:
+asw2-d-eqiad.mgmt.eqiad.wmnet:juniper:up:
 asw2-a5-eqiad.mgmt.eqiad.wmnet:juniper:up:
 msw1-eqiad.mgmt.eqiad.wmnet:juniper:up:
 lab-ex4200-1.mgmt.eqiad.wmnet:juniper:down:
diff --git a/modules/role/manifests/torrus.pp b/modules/role/manifests/torrus.pp
index 424b603..a4af83e 100644
--- a/modules/role/manifests/torrus.pp
+++ b/modules/role/manifests/torrus.pp
@@ -27,6 +27,7 @@
 'asw-b-eqiad.mgmt.eqiad.wmnet',
 'asw-c-eqiad.mgmt.eqiad.wmnet',
 'asw-d-eqiad.mgmt.eqiad.wmnet',
+'asw2-d-eqiad.mgmt.eqiad.wmnet',
 'asw-a-codfw.mgmt.codfw.wmnet',
 'asw-b-codfw.mgmt.codfw.wmnet',
 'asw-c-codfw.mgmt.codfw.wmnet',
diff --git a/modules/smokeping/files/config.d/Targets 
b/modules/smokeping/files/config.d/Targets
index d0e1fe7..61694ea 100644
--- a/modules/smokeping/files/config.d/Targets
+++ b/modules/smokeping/files/config.d/Targets
@@ -52,6 +52,11 @@
 title = asw-d-eqiad.mgmt.eqiad.wmnet
 host = asw-d-eqiad.mgmt.eqiad.wmnet
 
 asw2-d-eqiad
+menu = asw2-d-eqiad
+title = asw2-d-eqiad.mgmt.eqiad.wmnet
+host = asw2-d-eqiad.mgmt.eqiad.wmnet
+
 +++ mr1-eqiad
 menu = mr1-eqiad
 title = mr1-eqiad.wikimedia.org

-- 
To view, visit https://gerrit.wikimedia.org/r/319098
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I779561919640298473be8f72b41e36e5cf637b40
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/dns[master]: add AAAA and PTR for contint1001.wikimedia.org.

2016-11-01 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: add  and PTR for contint1001.wikimedia.org.
..


add  and PTR for contint1001.wikimedia.org.

Change-Id: Ib9dc9e09aebc6d5596eac537268f4e13899a4e50
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wikimedia.org
2 files changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Dzahn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 18c8c3a..29fb1b1 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -24,6 +24,8 @@
 
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   lists.wikimedia.org.
 
+7.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   contint1001.wikimedia.org.
+
 3.5.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   uranium.wikimedia.org.
 
 0.5.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   hydrogen.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 5f15e40..c5d79e5 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -113,6 +113,7 @@
 cobalt  1H  IN A208.80.154.81
 cobalt  1H  IN  2620:0:861:3:208:80:154:81
 contint1001 1H  IN A208.80.154.17
+contint1001 1H  IN  2620:0:861:1:208:80:154:17
 dubnium 1H  IN A208.80.154.77
 cp1008  1H  IN A208.80.154.42
 dataset1001 1H  IN A208.80.154.11

-- 
To view, visit https://gerrit.wikimedia.org/r/319258
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9dc9e09aebc6d5596eac537268f4e13899a4e50
Gerrit-PatchSet: 3
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/dns[master]: add AAAA and PTR for contint1001.wikimedia.org.

2016-11-01 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319258

Change subject: add  and PTR for contint1001.wikimedia.org.
..

add  and PTR for contint1001.wikimedia.org.

Change-Id: Ib9dc9e09aebc6d5596eac537268f4e13899a4e50
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wikimedia.org
2 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/58/319258/1

diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 18c8c3a..52e0396 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -24,6 +24,8 @@
 
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   lists.wikimedia.org.
 
+7.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   contint1001.wikimedia.org
+
 3.5.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   uranium.wikimedia.org.
 
 0.5.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   hydrogen.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index b20c957..3a450bc 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -113,6 +113,7 @@
 cobalt  1H  IN A208.80.154.81
 cobalt  1H  IN  2620:0:861:3:208:80:154:81
 contint1001 1H  IN A208.80.154.17
+contint1001 1H  IN  2620:0:861:1:208:80:154:17
 dubnium 1H  IN A208.80.154.77
 cp1008  1H  IN A208.80.154.42
 dataset1001 1H  IN A208.80.154.11

-- 
To view, visit https://gerrit.wikimedia.org/r/319258
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9dc9e09aebc6d5596eac537268f4e13899a4e50
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] analytics/discovery-stats[master]: Add script for hourly cronjobs

2016-11-01 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Add script for hourly cronjobs
..


Add script for hourly cronjobs

...in preparation for adding more metrics

Bug: T149722
Change-Id: Iadd6d29bb4404fe533bbf51e849a79ba818eb0d3
---
A bin/hourly.sh
M tracking-category-count.php
2 files changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Yurik: Verified; Looks good to me, approved



diff --git a/bin/hourly.sh b/bin/hourly.sh
new file mode 100755
index 000..8ba6b00
--- /dev/null
+++ b/bin/hourly.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+BASEDIR=`dirname "$0"`/..
+
+/usr/bin/php $BASEDIR/tracking-category-count.php
diff --git a/tracking-category-count.php b/tracking-category-count.php
index b9978ab..1dc3950 100644
--- a/tracking-category-count.php
+++ b/tracking-category-count.php
@@ -2,7 +2,7 @@
 
 namespace DiscoveryStats;
 
-require_once( 'vendor/autoload.php' );
+require_once( __DIR__ . '/vendor/autoload.php' );
 
 $wikiBlacklist = [
 'ukwikimedia', // redirected

-- 
To view, visit https://gerrit.wikimedia.org/r/319250
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iadd6d29bb4404fe533bbf51e849a79ba818eb0d3
Gerrit-PatchSet: 1
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Yurik 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Get rid of simple debug helpers

2016-11-01 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319257

Change subject: Get rid of simple debug helpers
..

Get rid of simple debug helpers

 * Use the logger instead.

Change-Id: I6039267e43b59fd647dfd3d85c69d7a3c8b707a4
---
M lib/config/MWParserEnvironment.js
M lib/logger/ParsoidLogger.js
M lib/mw/ApiRequest.js
M lib/utils/Util.js
M lib/wt2html/TokenTransformManager.js
M lib/wt2html/tt/ExtensionHandler.js
M lib/wt2html/tt/ParserFunctions.js
M lib/wt2html/tt/TemplateHandler.js
M lib/wt2html/tt/TokenCollector.js
9 files changed, 74 insertions(+), 110 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/57/319257/1

diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index c30d3d7..c8c6a7c 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -605,52 +605,6 @@
return this.normalizedTitleKey(this.resolveTitle(hrefToken, true), 
true) !== null;
 };
 
-/**
- * Simple debug helper
- */
-MWParserEnvironment.prototype.dp = function() {
-   if (this.conf.parsoid.debug) {
-   if (arguments.length > 1) {
-   try {
-   console.warn(JSON.stringify(arguments, null, 
2));
-   } catch (e) {
-   console.trace();
-   console.warn(e);
-   }
-   } else {
-   console.warn(arguments[0]);
-   }
-   }
-};
-
-/**
- * Even simpler debug helper that always prints..
- */
-MWParserEnvironment.prototype.ap = function() {
-   if (arguments.length > 1) {
-   try {
-   console.warn(JSON.stringify(arguments, null, 2));
-   } catch (e) {
-   console.warn(e);
-   }
-   } else {
-   console.warn(arguments[0]);
-   }
-};
-
-/**
- * Simple debug helper, trace-only
- */
-MWParserEnvironment.prototype.tp = function() {
-   if (this.conf.parsoid.debug) {
-   if (arguments.length > 1) {
-   console.warn(JSON.stringify(arguments, null, 2));
-   } else {
-   console.warn(arguments[0]);
-   }
-   }
-};
-
 MWParserEnvironment.prototype.initUID = function() {
this.uid = 1;
 };
diff --git a/lib/logger/ParsoidLogger.js b/lib/logger/ParsoidLogger.js
index d3bf078..15973b2 100644
--- a/lib/logger/ParsoidLogger.js
+++ b/lib/logger/ParsoidLogger.js
@@ -107,13 +107,15 @@

this.registerBackend(buildTraceOrDebugFlag(parsoidConfig.traceFlags, "trace"),
tracerBackend);
}
-   if (parsoidConfig.debugFlags) {
+   if (parsoidConfig.debug) {
+   this.registerBackend(/^debug(\/.*)?/, tracerBackend);
+   } else if (parsoidConfig.debugFlags) {

this.registerBackend(buildTraceOrDebugFlag(parsoidConfig.debugFlags, "debug"),
tracerBackend);
}
if (linter && parsoidConfig.linting) {
-   this.registerBackend(/lint(\/.*)?/, 
linter.linterBackend.bind(linter));
-   this.registerBackend(/end(\/.*)/, 
linter.logLintOutput.bind(linter));
+   this.registerBackend(/^lint(\/.*)?/, 
linter.linterBackend.bind(linter));
+   this.registerBackend(/^end(\/.*)/, 
linter.logLintOutput.bind(linter));
}
 };
 
@@ -146,6 +148,7 @@
 };
 
 var prettyLogTypeMap = {
+   "debug":"[DEBUG]",
"trace/peg":"[peg]",
"trace/pre":"[PRE]",
"debug/pre":"[PRE-DBG]",
@@ -182,7 +185,8 @@
}
 
// indent by number of slashes
-   var level = logType.match(/\//g).length - 1;
+   var match = logType.match(/\//g);
+   var level = match ? match.length - 1 : 0;
var indent = '  '.repeat(level);
msg += indent;
 
diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index 5394a0d..75d350f 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -311,8 +311,7 @@
options.headers['X-Forwarded-Proto'] = 'https';
}
}
-   this.env.dp("Starting HTTP request: ", options);
-   this.trace(options);
+   this.trace("Starting HTTP request: ", options);
 
return request(options, callback);
 };
@@ -581,7 +580,7 @@
return;
}
 
-   this.env.tp('Retrieved ' + this.title, metadata);
+   this.trace('Retrieved ' + this.title, metadata);
 
// Add the source to the cache
// (both original title as well as possible redirected title)
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index e08430a..176592a 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -51,6 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Explicitly create table, break up updates

2016-11-01 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319256

Change subject: Explicitly create table, break up updates
..

Explicitly create table, break up updates

Try to minimize civicrm_address locking.

Bug: T148578
Change-Id: I3d981fe972e883f5b990c1d27c8616a3b3e4f6b8
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 17 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/56/319256/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 9fc3a35..78cc439 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -2372,19 +2372,33 @@
 function wmf_civicrm_update_7320() {
   civicrm_initialize();
   CRM_Core_DAO::executeQuery("
-CREATE TEMPORARY TABLE civicrm_address_geocode
+CREATE TEMPORARY TABLE civicrm_address_geocode (
+  id INT PRIMARY KEY,
+  zip CHAR(5),
+  latitude DOUBLE,
+  longitude DOUBLE,
+  timezone VARCHAR(8)
+)");
+
+  CRM_Core_DAO::executeQuery("INSERT INTO civicrm_address_geocode
  SELECT id, LEFT(postal_code, 5) AS zip
  FROM civicrm_address
  WHERE country_id = (SELECT id FROM civicrm_country WHERE iso_code = 'US')
   ");
 
-  CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_address_geocode ADD INDEX 
index_id(id)");
   CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_address_geocode ADD INDEX 
index_zip(zip)");
+
+  CRM_Core_DAO::executeQuery("
+UPDATE civicrm_address_geocode c
+INNER JOIN wmf_zip_geo g ON c.zip = g.zip
+SET c.latitude = g.latitude,
+  c.longitude = g.longitude,
+  c.timezone = g.timezone
+  ");
 
   CRM_Core_DAO::executeQuery("
 UPDATE civicrm_address a
 INNER JOIN civicrm_address_geocode c ON c.id = a.id
-INNER JOIN wmf_zip_geo g ON c.zip = g.zip
 SET a.geo_code_1 = g.latitude,
   a.geo_code_2 = g.longitude,
   a.timezone = g.timezone

-- 
To view, visit https://gerrit.wikimedia.org/r/319256
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d981fe972e883f5b990c1d27c8616a3b3e4f6b8
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: WatchedItemStore: Update process cache when adding items

2016-11-01 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319255

Change subject: WatchedItemStore: Update process cache when adding items
..

WatchedItemStore: Update process cache when adding items

This way, when submitting POST to action=watch, the response will
not show "Unwatched" in the navigation 'content action' tabs.

This was previously the case on any wiki installation that has
more than 1 database as the skin would call User::isWatched(),
which would query stale data from a slave.

This doesn't yet account for the reverse use case (removing from
watchlist). That's to be addressed in a later commit.

Bug: T28292
Change-Id: Ie4b69c985815a77b70692db0c4dbf52e1a6a018d
---
M includes/WatchedItemStore.php
1 file changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/55/319255/1

diff --git a/includes/WatchedItemStore.php b/includes/WatchedItemStore.php
index 6c47cae..d379105 100644
--- a/includes/WatchedItemStore.php
+++ b/includes/WatchedItemStore.php
@@ -167,7 +167,7 @@
 * @param User $user
 * @param LinkTarget $target
 *
-* @return WatchedItem|null
+* @return WatchedItem|false
 */
private function getCached( User $user, LinkTarget $target ) {
return $this->cache->get( $this->getCacheKey( $user, $target ) 
);
@@ -495,7 +495,7 @@
 
$watchedItems = [];
foreach ( $res as $row ) {
-   // todo these could all be cached at some point?
+   // @todo: Should we add these to the process cache?
$watchedItems[] = new WatchedItem(
$user,
new TitleValue( (int)$row->wl_namespace, 
$row->wl_title ),
@@ -602,6 +602,7 @@
}
 
$rows = [];
+   $items = [];
foreach ( $targets as $target ) {
$rows[] = [
'wl_user' => $user->getId(),
@@ -609,6 +610,11 @@
'wl_title' => $target->getDBkey(),
'wl_notificationtimestamp' => null,
];
+   $items[] = new WatchedItem(
+   $user,
+   $target,
+   null
+   );
$this->uncache( $user, $target );
}
 
@@ -618,6 +624,12 @@
// if there's already an entry for this page
$dbw->insert( 'watchlist', $toInsert, __METHOD__, 
'IGNORE' );
}
+   // Update process cache to ensure skin doesn't claim that the 
current
+   // page is unwatched in the response of action=watch itself 
(T28292).
+   // This would otherwise be re-queried from a slave by 
isWatched().
+   foreach ( $items as $item ) {
+   $this->cache( $user, $item );
+   }
 
return true;
}

-- 
To view, visit https://gerrit.wikimedia.org/r/319255
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4b69c985815a77b70692db0c4dbf52e1a6a018d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Refactor to match the layout in example config.

2016-11-01 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319254

Change subject: Config: Refactor to match the layout in example config.
..

Config: Refactor to match the layout in example config.

Whenever a config deploy is done, we need to transfer the changes
from the example config in github where we normally do the code
review to the scap-deployed config. It's way more convenient to do
if the config structures actually match.

Change-Id: I2efbfa882cd2c6360a0b442b2027481b9a5b5274
---
M scap/templates/config.yaml.j2
1 file changed, 580 insertions(+), 578 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/54/319254/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index a7f5ef9..b97d82e 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -1,3 +1,582 @@
+spec: 
+  x-sub-request-filters:
+- type: default
+  name: http
+  options:
+allow:
+  - pattern: /^https?:\/\//
+forward_headers:
+  user-agent: true
+  title: The Change Propagation root
+  paths:
+/{api:sys}/purge:
+  x-modules:
+- path: src/sys/purge.js
+  options:
+host: <%= purge_host %>
+port: <%= purge_port %>
+/{api:sys}/links:
+  x-modules:
+- path: src/sys/dep_updates.js
+  options:
+templates:
+  mw_api:
+uri: <%= mwapi_uri %>
+headers:
+  host: '{{message.meta.domain}}'
+body:
+  formatversion: 2
+/{api:sys}/queue:
+  x-modules:
+- path: src/sys/kafka.js
+  options:
+metadata_broker_list: <%= broker_list %>
+dc_name: <%= site %>
+concurrency: <%= concurrency %>
+startup_delay: 6
+templates:
+  summary_definition_rerender: _definition_rerender_spec
+topic: resource_change
+cases:
+  - match:
+  meta:
+uri: 
'/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^\/]+)$/'
+  tags:
+- restbase
+match_not:
+  meta:
+domain: '/wiktionary\.org$/'
+exec:
+  method: get
+  # Don't encode title since it should be already encoded
+  uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri[1]}}'
+  query:
+redirect: false
+  headers:
+cache-control: no-cache
+  - match:
+  meta:
+# These URIs are coming from RESTBase, so we know that 
article titles will be normalized
+# and main namespace articles will not have : 
(uri-encoded, so %3a or %3A)
+uri: 
'/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/((?:(?!%3a|%3A|\/).)+)$/'
+domain: '/^en\.wiktionary\.org$/'
+  tags:
+- restbase
+exec:
+  method: get
+  # Don't encode title since it should be already encoded
+  uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/definition/{{match.meta.uri[1]}}'
+  query:
+redirect: false
+  headers:
+cache-control: no-cache
+
+  summary_definition_rerender_transcludes:
+<<: *summary_definition_rerender_spec
+topic: change-prop.transcludes.resource-change
+
+  mobile_rerender: _rerender_spec
+topic: resource_change
+match:
+  meta:
+uri: 
'/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^/]+)$/'
+  tags:
+- restbase
+exec:
+  method: get
+  # Don't encode title since it should be already encoded
+  uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/mobile-sections/{{match.meta.uri[1]}}'
+  query:
+redirect: false
+  headers:
+cache-control: no-cache
+
+  mobile_rerender_transcludes:
+<<: *mobile_rerender_spec
+topic: change-prop.transcludes.resource-change
+
+  purge_varnish: _varnish_spec
+topic: resource_change
+match:
+  meta:
+uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/(?.+)$/'
+  

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add a wiki configuration tag for configured language

2016-11-01 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319253

Change subject: Add a wiki configuration tag for configured language
..

Add a wiki configuration tag for configured language

Within CirrusSearch we need the ability to turn some settings on/off
based on the language of the wiki. We could of course list out all the
wiki's that use the language, but that would be tedious, error prone,
and overly verbose. Instead add a 'wikiTag', per SiteConfiguration::get,
that allows defining settings based on the language of the wiki in
question.

Bug: T149755
Change-Id: I912778fe9ed4ff9286e2a849cad4c4b0de43804e
---
M wmf-config/CommonSettings.php
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/53/319253/1

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index a622558..4af3776 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -176,13 +176,15 @@
}
 
$dbSuffix = ( $site === 'wikipedia' ) ? 'wiki' : $site;
-   $globals = $wgConf->getAll( $wgDBname, $dbSuffix,
-   [
-   'lang'=> $lang,
-   'docRoot' => $_SERVER['DOCUMENT_ROOT'],
-   'site'=> $site,
-   'stdlogo' => 
"//{$wmfHostnames['upload']}/$site/$lang/b/bc/Wiki.png" ,
-   ], $wikiTags );
+   $confParams = [
+   'lang'=> $lang,
+   'docRoot' => $_SERVER['DOCUMENT_ROOT'],
+   'site'=> $site,
+   'stdlogo' => 
"//{$wmfHostnames['upload']}/$site/$lang/b/bc/Wiki.png" ,
+   ];
+   // Add a per-language tag as well
+   $wikiTags[] = $wgConf->get( 'wgLanguageCode', $wgDBname, $dbSuffix, 
$confParams, $wikiTags );
+   $globals = $wgConf->getAll( $wgDBname, $dbSuffix, $confParams, 
$wikiTags );
 
# Save cache
@mkdir( '/tmp/mw-cache-' . $wmgVersionNumber );

-- 
To view, visit https://gerrit.wikimedia.org/r/319253
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I912778fe9ed4ff9286e2a849cad4c4b0de43804e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Switch discovery-stats cronjob to a dedicated script

2016-11-01 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319252

Change subject: Switch discovery-stats cronjob to a dedicated script
..

Switch discovery-stats cronjob to a dedicated script

Change-Id: I850b4a1c01164b1d8626db016cf1fa9d8cb5d6b3
Depends-On: Iadd6d29bb4404fe533bbf51e849a79ba818eb0d3
Bug: T149722
---
M modules/statistics/manifests/discovery.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/319252/1

diff --git a/modules/statistics/manifests/discovery.pp 
b/modules/statistics/manifests/discovery.pp
index f63a144..c26f57c 100644
--- a/modules/statistics/manifests/discovery.pp
+++ b/modules/statistics/manifests/discovery.pp
@@ -57,7 +57,7 @@
   }
 
   cron { 'discovery-stats':
-command => "/usr/bin/php ${scripts_dir}/tracking-category-count.php >> 
${log_dir}/tracking-category-count.log 2>&1",
+command => "${scripts_dir}/bin/hourly.sh >> ${log_dir}/hourly.log 2>&1",
 minute  => '14',
 require => Git::Clone['analytics/discovery-stats'],
 user=> $user,

-- 
To view, visit https://gerrit.wikimedia.org/r/319252
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I850b4a1c01164b1d8626db016cf1fa9d8cb5d6b3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: MaxSem 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: [wip] RecentChanges Dynamic Filters

2016-11-01 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319251

Change subject: [wip] RecentChanges Dynamic Filters
..

[wip] RecentChanges Dynamic Filters

** SUPER WIP **

This is the beginning/groundwork for the new RecentChanges filters
with ORES.

This commit is extremely WIP as we should work on solving some
big infrastructure questions.

Bug: T18
Change-Id: I97a2df99b11eca8288fb3c9b85ed9588cc408749
---
M extension.json
M includes/Hooks.php
A modules/recentchanges/dm/mw.ores.dm.FilterGroup.js
A modules/recentchanges/dm/mw.ores.dm.FilterItem.js
A modules/recentchanges/dm/mw.ores.dm.FiltersViewModel.js
A modules/recentchanges/mw.ores.js
A modules/recentchanges/ui/mw.ores.ui.FilterItemWidget.js
A modules/recentchanges/ui/mw.ores.ui.FiltersCapsuleMultiselectWidget.js
A modules/recentchanges/ui/mw.ores.ui.FiltersListWidget.js
9 files changed, 251 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/51/319251/1

diff --git a/extension.json b/extension.json
index eb096bc..bdfb3aa 100644
--- a/extension.json
+++ b/extension.json
@@ -71,6 +71,19 @@
"desktop",
"mobile"
]
+   },
+   "ext.ores.recentchangesfilters": {
+   "scripts": [
+   "modules/recentchanges/mw.ores.js",
+   
"modules/recentchanges/dm/mw.ores.dm.FilterItem.js",
+   
"modules/recentchanges/dm/mw.ores.dm.FiltersModel.js",
+   
"modules/recentchanges/ui/mw.ores.ui.FiltersListWidget.js",
+   
"modules/recentchanges/ui/mw.ores.ui.FiltersCapsuleMultiselectWidget.js"
+   ],
+   "targets": [
+   "desktop",
+   "mobile"
+   ]
}
},
"MessagesDirs": {
@@ -125,7 +138,17 @@
"legend": "ores-damaging-legend",
"class": "ores-damaging"
}
-   }
+   },
+   "RCDynamicFilters": {
+   "userregistration": {
+   "options": {
+   "registered": {
+   
+   },
+   "unregistered": {}
+   }
+   }
+   },
},
"DefaultUserOptions": {
"oresDamagingPref": "hard",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 9c887ea..2ba47a7 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -507,6 +507,12 @@
}
 
$out->addModuleStyles( 'ext.ores.styles' );
+
+   // TODO: Add another layer of beta feature to this?
+   // TODO: Only do this if we are in Special:RecentChanges
+   $wgRCDynamicFilters[] = '';
+   $out->addModules( array( 'ext.ores.recentchangesfilters' ) );
+
return true;
}
 
diff --git a/modules/recentchanges/dm/mw.ores.dm.FilterGroup.js 
b/modules/recentchanges/dm/mw.ores.dm.FilterGroup.js
new file mode 100644
index 000..4604c57
--- /dev/null
+++ b/modules/recentchanges/dm/mw.ores.dm.FilterGroup.js
@@ -0,0 +1,28 @@
+( function ( mw ) {
+   /**
+* Filter group model
+*
+* @mixins OO.EventEmitter
+* @mixins OO.EmitterList
+*
+* @constructor
+* @param {Object} config Configuration object
+* @cfg {boolean} selected Filter is selected
+*/
+   mw.ores.dm.FilterGroup = function MwOresDmFilterGroup( config ) {
+   config = config || {};
+
+   // Mixin constructor
+   OO.EventEmitter.call( this );
+   OO.EmitterList.call( this );
+
+   // Parent constructor
+   mw.ores.dm.FilterGroup.parent.call( this, config );
+   };
+
+   /* Initialization */
+
+   OO.initClass( mw.ores.dm.FilterGroup );
+   OO.mixinClass( mw.ores.dm.FilterGroup, OO.EventEmitter );
+   OO.mixinClass( mw.ores.dm.FilterGroup, OO.EmitterList );
+} )( mediaWiki );
diff --git a/modules/recentchanges/dm/mw.ores.dm.FilterItem.js 
b/modules/recentchanges/dm/mw.ores.dm.FilterItem.js
new file mode 100644
index 000..c79ca33
--- /dev/null
+++ b/modules/recentchanges/dm/mw.ores.dm.FilterItem.js
@@ -0,0 +1,68 @@
+( function ( mw ) {
+   /**
+* Filter item model
+*
+* @mixins OO.EventEmitter
+*
+* @constructor
+* @param {Object} config Configuration object
+* @cfg {boolean} [selecte] Filter is 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: add mapped IPv6 address for contint1001

2016-11-01 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: add mapped IPv6 address for contint1001
..


add mapped IPv6 address for contint1001

Let's give it a proper IPv6 address and DNS
records right from the beginning since this
is in the middle of being setup.

Change-Id: Ia04f192fb6daf6a65a18a0c1d91b07c56e8ba946
---
M manifests/site.pp
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Hashar: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/manifests/site.pp b/manifests/site.pp
index ebf6c72..9b34095 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -291,6 +291,7 @@
 backup::host)
 
 include standard
+interface::add_ip6_mapped { 'main': interface => 'eth0', }
 include contint::firewall
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/316040
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia04f192fb6daf6a65a18a0c1d91b07c56e8ba946
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] analytics/discovery-stats[master]: Add script for hourly cronjobs

2016-11-01 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319250

Change subject: Add script for hourly cronjobs
..

Add script for hourly cronjobs

...in preparation for adding more metrics

Bug: T149722
Change-Id: Iadd6d29bb4404fe533bbf51e849a79ba818eb0d3
---
A bin/hourly.sh
M tracking-category-count.php
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/discovery-stats 
refs/changes/50/319250/1

diff --git a/bin/hourly.sh b/bin/hourly.sh
new file mode 100755
index 000..8ba6b00
--- /dev/null
+++ b/bin/hourly.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+BASEDIR=`dirname "$0"`/..
+
+/usr/bin/php $BASEDIR/tracking-category-count.php
diff --git a/tracking-category-count.php b/tracking-category-count.php
index b9978ab..1dc3950 100644
--- a/tracking-category-count.php
+++ b/tracking-category-count.php
@@ -2,7 +2,7 @@
 
 namespace DiscoveryStats;
 
-require_once( 'vendor/autoload.php' );
+require_once( __DIR__ . '/vendor/autoload.php' );
 
 $wikiBlacklist = [
 'ukwikimedia', // redirected

-- 
To view, visit https://gerrit.wikimedia.org/r/319250
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadd6d29bb4404fe533bbf51e849a79ba818eb0d3
Gerrit-PatchSet: 1
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: deployment-prep: Fix deployment access.conf rules to allow a...

2016-11-01 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: deployment-prep: Fix deployment access.conf rules to allow all 
deployment servers
..


deployment-prep: Fix deployment access.conf rules to allow all deployment 
servers

Not just tin. Also simplifies things.

Change-Id: I76bc9348453e19617e48e464712e26370932bc4d
---
M modules/beta/manifests/deployaccess.pp
M modules/role/manifests/beta/mediawiki.pp
2 files changed, 5 insertions(+), 9 deletions(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/modules/beta/manifests/deployaccess.pp 
b/modules/beta/manifests/deployaccess.pp
index dcd7114..3c7da66 100644
--- a/modules/beta/manifests/deployaccess.pp
+++ b/modules/beta/manifests/deployaccess.pp
@@ -1,12 +1,9 @@
 # TODO: remove this if https://phabricator.wikimedia.org/T121721
 # is fixed.
-class beta::deployaccess(
-$bastion_ip = '10.68.21.205', # ip of deployment-tin
-) {
-
+class beta::deployaccess {
+$ips = 
join($network::constants::special_hosts[$::realm]['deployment_hosts'], ' ')
 security::access::config { 'beta-allow-mwdeploy':
-content  => "+ : deploy-service mwdeploy : ${bastion_ip}\n",
+content  => "+ : deploy-service mwdeploy : ${ips}\n",
 priority => 50,
 }
-
 }
diff --git a/modules/role/manifests/beta/mediawiki.pp 
b/modules/role/manifests/beta/mediawiki.pp
index 42a91d2..cb47c33 100644
--- a/modules/role/manifests/beta/mediawiki.pp
+++ b/modules/role/manifests/beta/mediawiki.pp
@@ -5,10 +5,9 @@
 class role::beta::mediawiki {
 include base::firewall
 
-$deployment_host = hiera('scap::deployment_server')
-$deployment_ip = ipresolve($deployment_host, 4, $::nameservers[0])
+$ips = 
join($network::constants::special_hosts[$::realm]['deployment_hosts'], ' ')
 security::access::config { 'scap-allow-mwdeploy':
-content  => "+ : mwdeploy : ${deployment_ip}\n",
+content  => "+ : mwdeploy : ${ips}\n",
 priority => 60,
 }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/319249
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I76bc9348453e19617e48e464712e26370932bc4d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: shinkengen: Ensure consistent ordering of hostgroups

2016-11-01 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: shinkengen: Ensure consistent ordering of hostgroups
..


shinkengen: Ensure consistent ordering of hostgroups

Otherwise --test-if-up-to-date is rarely (if ever) going to work properly

Change-Id: Ic5515e36c1c6616a7eb90df5300886ffa0c557d3
---
M modules/shinken/files/shinkengen
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/modules/shinken/files/shinkengen b/modules/shinken/files/shinkengen
index 2ff598f..310aae1 100755
--- a/modules/shinken/files/shinkengen
+++ b/modules/shinken/files/shinkengen
@@ -136,7 +136,7 @@
 # manifests/site.pp, so we need to add it here explicitly.
 hostgroups = [project, 'role::labs::instance'] + 
instance['puppetClasses']
 hostgroups += get_instance_roles(instance['project'], 
instance['fqdn'])
-co.properties['hostgroups'] = ','.join(set(hostgroups))
+co.properties['hostgroups'] = ','.join(sorted(set(hostgroups)))
 # For each project added to monitoring we expect a contactgroup 
with the same
 # name added.
 # FIXME: Implement access mechanism more fine grained than 
per-project

-- 
To view, visit https://gerrit.wikimedia.org/r/317294
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5515e36c1c6616a7eb90df5300886ffa0c557d3
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: deployment-prep: Fix deployment access.conf rules to allow a...

2016-11-01 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319249

Change subject: deployment-prep: Fix deployment access.conf rules to allow all 
deployment servers
..

deployment-prep: Fix deployment access.conf rules to allow all deployment 
servers

Not just tin. Also simplifies things.

Change-Id: I76bc9348453e19617e48e464712e26370932bc4d
---
M modules/beta/manifests/deployaccess.pp
M modules/role/manifests/beta/mediawiki.pp
2 files changed, 5 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/49/319249/1

diff --git a/modules/beta/manifests/deployaccess.pp 
b/modules/beta/manifests/deployaccess.pp
index dcd7114..3c7da66 100644
--- a/modules/beta/manifests/deployaccess.pp
+++ b/modules/beta/manifests/deployaccess.pp
@@ -1,12 +1,9 @@
 # TODO: remove this if https://phabricator.wikimedia.org/T121721
 # is fixed.
-class beta::deployaccess(
-$bastion_ip = '10.68.21.205', # ip of deployment-tin
-) {
-
+class beta::deployaccess {
+$ips = 
join($network::constants::special_hosts[$::realm]['deployment_hosts'], ' ')
 security::access::config { 'beta-allow-mwdeploy':
-content  => "+ : deploy-service mwdeploy : ${bastion_ip}\n",
+content  => "+ : deploy-service mwdeploy : ${ips}\n",
 priority => 50,
 }
-
 }
diff --git a/modules/role/manifests/beta/mediawiki.pp 
b/modules/role/manifests/beta/mediawiki.pp
index 42a91d2..cb47c33 100644
--- a/modules/role/manifests/beta/mediawiki.pp
+++ b/modules/role/manifests/beta/mediawiki.pp
@@ -5,10 +5,9 @@
 class role::beta::mediawiki {
 include base::firewall
 
-$deployment_host = hiera('scap::deployment_server')
-$deployment_ip = ipresolve($deployment_host, 4, $::nameservers[0])
+$ips = 
join($network::constants::special_hosts[$::realm]['deployment_hosts'], ' ')
 security::access::config { 'scap-allow-mwdeploy':
-content  => "+ : mwdeploy : ${deployment_ip}\n",
+content  => "+ : mwdeploy : ${ips}\n",
 priority => 60,
 }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/319249
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76bc9348453e19617e48e464712e26370932bc4d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Turn off Cirrus AB test on zh and ja

2016-11-01 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319248

Change subject: Turn off Cirrus AB test on zh and ja
..

Turn off Cirrus AB test on zh and ja

Turns off zh and ja, we have plenty of data to analyze. Due to how much
less usage of thwiki there is vs the other two we will be leaving that
on for one more week.

Bug: T147499
Change-Id: I50985eb4dbd30cc0354bcc09e7138e0dd3c874ba
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 3 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/48/319248/1

diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index b123413..92a6d9c 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -116,19 +116,11 @@
sampleSize = ( function () {
var dbName = mw.config.get( 'wgDBname' 
),
subTests = {
-   zhwiki: {
-   // 1:16 overall 
sessions into test
-   test: 16,
-   // 1:13 of test 
sessions reserved for dashboard
-   // 12:13 
sessions split evenly between test buckets
-   subTest: 13
-   },
-   jawiki: {
-   test: 16,
-   subTest: 13
-   },
thwiki: {
+   // 1:5 overall 
sessions into test
test: 5,
+   // 1:39 of test 
sessions reserved for dashboard
+   // 38:39 
sessions split evenly between test buckets
subTest: 39
}
};

-- 
To view, visit https://gerrit.wikimedia.org/r/319248
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50985eb4dbd30cc0354bcc09e7138e0dd3c874ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Show MapPin icon next to all links

2016-11-01 Thread JGirault (Code Review)
JGirault has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319247

Change subject: Show MapPin icon next to all  links
..

Show MapPin icon next to all  links

* VW maplinks with counter are not impacted by this change.
* Provides an optional CSS class .no-icon to hide the icon easily.

Bug: T145176
Change-Id: I29c3fcac94afcf862fb8da46f371a19abe1057a1
---
A styles/images/mapPin-progressive.png
A styles/images/mapPin-progressive.svg
M styles/kartographer.less
3 files changed, 29 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/47/319247/1

diff --git a/styles/images/mapPin-progressive.png 
b/styles/images/mapPin-progressive.png
new file mode 100644
index 000..c1676e6
--- /dev/null
+++ b/styles/images/mapPin-progressive.png
Binary files differ
diff --git a/styles/images/mapPin-progressive.svg 
b/styles/images/mapPin-progressive.svg
new file mode 100644
index 000..a9631cc
--- /dev/null
+++ b/styles/images/mapPin-progressive.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">* { fill: #36c }
+
+
diff --git a/styles/kartographer.less b/styles/kartographer.less
index a36866c..c20bc41 100644
--- a/styles/kartographer.less
+++ b/styles/kartographer.less
@@ -1,4 +1,5 @@
 @import 'mediawiki.ui/variables';
+@import 'mediawiki.mixins';
 
 .mw-kartographer-mapDialog-map {
position: absolute;
@@ -14,9 +15,31 @@
background: #ffc0cb;
 }
 
-a.mw-kartographer-link {
+a.mw-kartographer-link,
+a.mw-kartographer-maplink {
display: inline;
cursor: pointer;
+
+   background-position: left -3px;
+   background-repeat: no-repeat;
+   .background-image-svg('images/mapPin-progressive.svg', 
'images/mapPin-progressive.png');
+   padding-left: 19px;
+   margin-left: 2px;
+   background-size: 18px 18px;
+
+   &.no-icon:not(.mw-kartographer-autostyled) {
+   background: none;
+   padding-left: 0;
+   margin-left: 0;
+   }
+}
+
+.skin-minerva {
+   a.mw-kartographer-link,
+   a.mw-kartographer-maplink {
+   padding-left: 20px;
+   background-size: 20px 20px;
+   }
 }
 
 a.mw-kartographer-autostyled {
@@ -34,6 +57,7 @@
line-height: 1;
text-align: center;
 }
+
 a.mw-kartographer-autostyled:visited {
color: #fff;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/319247
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29c3fcac94afcf862fb8da46f371a19abe1057a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

94feca9 Local geocoding for US addresses
4bc6d15 Trim whitespace when comparing names for conflicts.
a328268 Eradicate Stomp from crm repo
3eaafd1 Fix contacts who have no primary address.
e4bf03d Geocode existing US addresses
37b0b1a Fill missing order_id while normalizing

Change-Id: I7a6a1e5f809678e5d80c5c3cac5240c7fc5a3c3a
---
M sites/all/modules/queue2civicrm/queue2civicrm.info
D sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php
D sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
3 files changed, 1 insertion(+), 678 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/sites/all/modules/queue2civicrm/queue2civicrm.info 
b/sites/all/modules/queue2civicrm/queue2civicrm.info
index 81d80d0..40db4d2 100644
--- a/sites/all/modules/queue2civicrm/queue2civicrm.info
+++ b/sites/all/modules/queue2civicrm/queue2civicrm.info
@@ -7,9 +7,4 @@
 package = queue2civicrm
 files[] = Queue2civicrmTrxnCounter.php
 files[] = DonationQueueConsumer.php
-<<< HEAD   (56eada Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wiki)
-files[] = Stomp.php
-===
-files[] = tests/includes/Message.php
-files[] = tests/includes/TestingSmashPigDbQueueConfiguration.php
->>> BRANCH (37b0b1 Fill missing order_id while normalizing)
+
diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php 
b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php
deleted file mode 100644
index ad29169..000
--- a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php
+++ /dev/null
@@ -1,570 +0,0 @@
-<<< HEAD   (56eada Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wiki)
-===
- WMF_CAMPAIGNS_OPTION_GROUP_NAME,
-'label' => ImportMessageTest_campaign,
-'value' => ImportMessageTest_campaign,
-) );
-}
-
-public function tearDown() {
-if ( $this->contribution_id ) {
-civicrm_api_classapi()->Contribution->Delete( array(
-'id' => $this->contribution_id,
-'version' => '3',
-) );
-}
-parent::tearDown();
-}
-
-/**
- * @dataProvider messageProvider
- */
-public function testMessageInsert( $msg, $expected ) {
-$contribution = wmf_civicrm_contribution_message_import( $msg );
-$this->contribution_id = $contribution['id'];
-
-// Ignore contact_id if we have no expectation.
-if ( empty( $expected['contribution']['contact_id'] ) ) {
-$this->fieldsToIgnore[] = 'contact_id';
-}
-
-$this->assertComparable( $expected['contribution'], $contribution );
-
-if ( !empty( $expected['contribution_custom_values'] ) ) {
-$actual_contribution_custom_values = wmf_civicrm_get_custom_values(
-$contribution['id'],
-array_keys( $expected['contribution_custom_values'] )
-);
-$this->assertEquals( $expected['contribution_custom_values'], 
$actual_contribution_custom_values );
-}
-
-if ( !empty( $expected['contact'] ) ) {
-$api = civicrm_api_classapi();
-$api->Contact->Get( array(
-'id' => $contribution['contact_id'],
-'version' => 3,
-) );
-$contact = (array) $api->values[0];
-$renamedFields = array('prefix' => 1, 'suffix' => 1);
-$this->assertEquals( array_diff_key($expected['contact'], 
$renamedFields), array_intersect_key( $expected['contact'], $contact ) );
-foreach (array_keys($renamedFields) as $renamedField) {
-$this->assertEquals(civicrm_api3('OptionValue', 'getvalue', 
array(
-'value' => $contact[$renamedField . '_id'],
-'option_group_id' => 'individual_' . $renamedField,
-'return' => 'name',
-)), $expected['contact'][$renamedField]);
-}
-}
-
-   if ( !empty( $expected['address'] ) ) {
-   $addresses = civicrm_api3( 'Address', 'get', array(
-   'contact_id' => $contribution['contact_id'],
-   'return' => 
'city,postal_code,street_address,geo_code_1,geo_code_2,timezone',
-   ) );
-   $address = $addresses['values'][$addresses['id']];
-   $this->assertComparable( $expected['address'], $address 
);
-   }
-
-if ( !empty( $expected['contact_custom_values'] ) ) {
-$actual_contact_custom_values = wmf_civicrm_get_custom_values(
-$contribution['contact_id'],
-array_keys( 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Fix errors when searching ideographic whitespaces and keep t...

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix errors when searching ideographic whitespaces and keep 
track of the original query
..


Fix errors when searching ideographic whitespaces and keep track of the 
original query

Cirrus should log original queries not the query that was
munged/trimmed by cirrus itself.
Moved the trim and empty query detection into the Searcher so that the
state is coherent when SpecialSearch calls our hooks.

Bug: T149416
Change-Id: I395bada2d74f805b7a62901b28890b3121ecde10
---
M includes/CirrusSearch.php
M includes/InterwikiSearcher.php
M includes/Search/SearchContext.php
M includes/Searcher.php
M tests/browser/features/bad_syntax_api.feature
M tests/unit/SearcherTest.php
6 files changed, 43 insertions(+), 22 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  Tjones: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php
index 2ecc29e..c6302c7 100644
--- a/includes/CirrusSearch.php
+++ b/includes/CirrusSearch.php
@@ -330,15 +330,6 @@
 * @return null|Status|ResultSet
 */
protected function searchTextReal( $term, SearchConfig $config = null, 
$forceLocal = false ) {
-   // Convert the unicode character 'ideographic whitespace' into 
standard
-   // whitespace.  Cirrussearch treats them both as normal 
whitespace, but
-   // the preceding isn't appropriately trimmed.
-   $term = trim( str_replace( "\xE3\x80\x80", " ", $term) );
-   // No searching for nothing! That takes forever!
-   if ( $term === '' ) {
-   return null;
-   }
-
if ( $config ) {
$this->indexBaseName = $config->get( 
SearchConfig::INDEX_BASE_NAME );
}
diff --git a/includes/InterwikiSearcher.php b/includes/InterwikiSearcher.php
index ffa237d..30f5c8c 100644
--- a/includes/InterwikiSearcher.php
+++ b/includes/InterwikiSearcher.php
@@ -73,6 +73,7 @@
);
 
$this->searchContext->setLimitSearchToLocalWiki( true );
+   $this->searchContext->setOriginalSearchTerm( $term );
$this->buildFullTextSearch( $term, false );
$context = $this->searchContext;
 
@@ -92,7 +93,7 @@
}
}
 
-   $results = $this->searchMulti( $searches, $term, $resultsTypes 
);
+   $results = $this->searchMulti( $searches, $resultsTypes );
if ( !$results->isOK() ) {
return null;
}
diff --git a/includes/Search/SearchContext.php 
b/includes/Search/SearchContext.php
index 8584a27..90912c7 100644
--- a/includes/Search/SearchContext.php
+++ b/includes/Search/SearchContext.php
@@ -170,6 +170,11 @@
private $cacheTtl = 0;
 
/**
+* @param string The original search
+*/
+   private $originalSearchTerm;
+
+   /**
 * @param SearchConfig $config
 * @param int[]|null $namespaces
 */
@@ -647,4 +652,18 @@
public function setCacheTtl( $ttl ) {
$this->cacheTtl = $ttl;
}
+
+   /**
+* @return string the original search term
+*/
+   public function getOriginalSearchTerm() {
+   return $this->originalSearchTerm;
+   }
+
+   /**
+* @param string set the original search term
+*/
+   public function setOriginalSearchTerm( $term ) {
+   $this->originalSearchTerm = $term;
+   }
 }
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 56b376c..3413eee 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -210,6 +210,7 @@
public function nearMatchTitleSearch( $term ) {
$this->checkTitleSearchRequestLength( $term );
 
+   $this->searchContext->setOriginalSearchTerm( $term );
// Elasticsearch seems to have trouble extracting the proper 
terms to highlight
// from the default query we make so we feed it exactly the 
right query to highlight.
$highlightQuery = new \Elastica\Query\MultiMatch();
@@ -230,7 +231,7 @@
$this->searchContext->setHighlightQuery( $highlightQuery );
$this->searchContext->setSearchType( 'near_match' );
 
-   return $this->searchOne( $term );
+   return $this->searchOne();
}
 
/**
@@ -240,6 +241,7 @@
 */
public function prefixSearch( $term ) {
$this->checkTitleSearchRequestLength( $term );
+   $this->searchContext->setOriginalSearchTerm( $term );
 
$this->searchContext->setSearchType( 'prefix' );
  

[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Changed manifest_version in extension.json back to 1

2016-11-01 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Changed manifest_version in extension.json back to 1
..


Changed manifest_version in extension.json back to 1

Change-Id: I4b2458f7af52409d6df6db2cdf2aa7f6ac719080
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Yaron Koren: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index 5e00e0a..eb57cb4 100644
--- a/extension.json
+++ b/extension.json
@@ -487,5 +487,5 @@
"merge_strategy": "array_plus"
}
},
-   "manifest_version": 2
+   "manifest_version": 1
 }
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/319245
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b2458f7af52409d6df6db2cdf2aa7f6ac719080
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

2016-11-01 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319246

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

94feca9 Local geocoding for US addresses
4bc6d15 Trim whitespace when comparing names for conflicts.
a328268 Eradicate Stomp from crm repo
3eaafd1 Fix contacts who have no primary address.
e4bf03d Geocode existing US addresses
37b0b1a Fill missing order_id while normalizing

Change-Id: I7a6a1e5f809678e5d80c5c3cac5240c7fc5a3c3a
---
M sites/all/modules/queue2civicrm/queue2civicrm.info
D sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php
D sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
3 files changed, 1 insertion(+), 678 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/46/319246/1

diff --git a/sites/all/modules/queue2civicrm/queue2civicrm.info 
b/sites/all/modules/queue2civicrm/queue2civicrm.info
index 81d80d0..40db4d2 100644
--- a/sites/all/modules/queue2civicrm/queue2civicrm.info
+++ b/sites/all/modules/queue2civicrm/queue2civicrm.info
@@ -7,9 +7,4 @@
 package = queue2civicrm
 files[] = Queue2civicrmTrxnCounter.php
 files[] = DonationQueueConsumer.php
-<<< HEAD   (56eada Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wiki)
-files[] = Stomp.php
-===
-files[] = tests/includes/Message.php
-files[] = tests/includes/TestingSmashPigDbQueueConfiguration.php
->>> BRANCH (37b0b1 Fill missing order_id while normalizing)
+
diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php 
b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php
deleted file mode 100644
index ad29169..000
--- a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php
+++ /dev/null
@@ -1,570 +0,0 @@
-<<< HEAD   (56eada Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wiki)
-===
- WMF_CAMPAIGNS_OPTION_GROUP_NAME,
-'label' => ImportMessageTest_campaign,
-'value' => ImportMessageTest_campaign,
-) );
-}
-
-public function tearDown() {
-if ( $this->contribution_id ) {
-civicrm_api_classapi()->Contribution->Delete( array(
-'id' => $this->contribution_id,
-'version' => '3',
-) );
-}
-parent::tearDown();
-}
-
-/**
- * @dataProvider messageProvider
- */
-public function testMessageInsert( $msg, $expected ) {
-$contribution = wmf_civicrm_contribution_message_import( $msg );
-$this->contribution_id = $contribution['id'];
-
-// Ignore contact_id if we have no expectation.
-if ( empty( $expected['contribution']['contact_id'] ) ) {
-$this->fieldsToIgnore[] = 'contact_id';
-}
-
-$this->assertComparable( $expected['contribution'], $contribution );
-
-if ( !empty( $expected['contribution_custom_values'] ) ) {
-$actual_contribution_custom_values = wmf_civicrm_get_custom_values(
-$contribution['id'],
-array_keys( $expected['contribution_custom_values'] )
-);
-$this->assertEquals( $expected['contribution_custom_values'], 
$actual_contribution_custom_values );
-}
-
-if ( !empty( $expected['contact'] ) ) {
-$api = civicrm_api_classapi();
-$api->Contact->Get( array(
-'id' => $contribution['contact_id'],
-'version' => 3,
-) );
-$contact = (array) $api->values[0];
-$renamedFields = array('prefix' => 1, 'suffix' => 1);
-$this->assertEquals( array_diff_key($expected['contact'], 
$renamedFields), array_intersect_key( $expected['contact'], $contact ) );
-foreach (array_keys($renamedFields) as $renamedField) {
-$this->assertEquals(civicrm_api3('OptionValue', 'getvalue', 
array(
-'value' => $contact[$renamedField . '_id'],
-'option_group_id' => 'individual_' . $renamedField,
-'return' => 'name',
-)), $expected['contact'][$renamedField]);
-}
-}
-
-   if ( !empty( $expected['address'] ) ) {
-   $addresses = civicrm_api3( 'Address', 'get', array(
-   'contact_id' => $contribution['contact_id'],
-   'return' => 
'city,postal_code,street_address,geo_code_1,geo_code_2,timezone',
-   ) );
-   $address = $addresses['values'][$addresses['id']];
-   $this->assertComparable( $expected['address'], $address 
);
-   }
-
-if ( !empty( $expected['contact_custom_values'] ) ) {
-$actual_contact_custom_values = wmf_civicrm_get_custom_values(
-$contribution['contact_id'],
-

[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Changed manifest_version in extension.json back to 1

2016-11-01 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319245

Change subject: Changed manifest_version in extension.json back to 1
..

Changed manifest_version in extension.json back to 1

Change-Id: I4b2458f7af52409d6df6db2cdf2aa7f6ac719080
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/45/319245/2

diff --git a/extension.json b/extension.json
index 5e00e0a..eb57cb4 100644
--- a/extension.json
+++ b/extension.json
@@ -487,5 +487,5 @@
"merge_strategy": "array_plus"
}
},
-   "manifest_version": 2
+   "manifest_version": 1
 }
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/319245
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b2458f7af52409d6df6db2cdf2aa7f6ac719080
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Don't default to now when no date found

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't default to now when no date found
..


Don't default to now when no date found

This logic could be re-used when determining whether to re-queue
messages in queue consumer error handling, but we don't want to
default to 'now' in that case.

Change-Id: I8785dc5a03f963a4165c5e02f60fdc2e88865746
---
M Core/DataStores/DamagedDatabase.php
M CrmLink/Messages/DateFields.php
2 files changed, 6 insertions(+), 4 deletions(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Core/DataStores/DamagedDatabase.php 
b/Core/DataStores/DamagedDatabase.php
index 8f6e60a..5253c92 100644
--- a/Core/DataStores/DamagedDatabase.php
+++ b/Core/DataStores/DamagedDatabase.php
@@ -28,8 +28,9 @@
$trace = '',
$retryDate = null
) {
+   $now = UtcDate::getUtcTimestamp();
$originalDate = UtcDate::getUtcDatabaseString(
-   DateFields::getOriginalDateOrNow( $message )
+   DateFields::getOriginalDateOrDefault( $message, $now )
);
 
$dbRecord = array(
diff --git a/CrmLink/Messages/DateFields.php b/CrmLink/Messages/DateFields.php
index b30714a..4c6537f 100644
--- a/CrmLink/Messages/DateFields.php
+++ b/CrmLink/Messages/DateFields.php
@@ -7,10 +7,11 @@
 
/**
 * @param array $message A message from donation queues
+* @param int $default Value to return when message has no dates
 * @return int The unix timestamp at which the message was originally
-*  enqueued, or the current timestamp if no date information exists
+*  enqueued, or $default if no date information exists
 */
-   public static function getOriginalDateOrNow( $message ) {
+   public static function getOriginalDateOrDefault( $message, $default = 0 
) {
// This is the actual queued time
if ( isset( $message['source_enqueued_time'] ) ) {
// This is only ever set to the numeric timestamp
@@ -31,6 +32,6 @@
return $parsedTimestamp;
}
}
-   return UtcDate::getUtcTimestamp();
+   return $default;
}
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/316417
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8785dc5a03f963a4165c5e02f60fdc2e88865746
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Don't require Context in PageToolbarHideHandler.

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Don't require Context in PageToolbarHideHandler.
..


Hygiene: Don't require Context in PageToolbarHideHandler.

Change-Id: Ia26e9092bcb948d0cd348d214f76ccfb0dea2a09
---
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
2 files changed, 6 insertions(+), 18 deletions(-)

Approvals:
  jenkins-bot: Verified
  Niedzielski: Looks good to me, approved



diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index 990b62b..d6f67f0 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -143,7 +143,7 @@
 getSupportActionBar().setTitle("");
 getSupportActionBar().setDisplayHomeAsUpEnabled(true);
 
-toolbarHideHandler = new PageToolbarHideHandler(this, 
toolbarContainerView);
+toolbarHideHandler = new PageToolbarHideHandler(toolbarContainerView);
 
 boolean languageChanged = false;
 if (savedInstanceState != null) {
diff --git a/app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java 
b/app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
index 7dd12c5..d1546ed 100644
--- a/app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
+++ b/app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
@@ -1,12 +1,10 @@
 package org.wikipedia.page;
 
-import android.content.Context;
-import android.content.res.Resources;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.LayerDrawable;
 import android.support.annotation.ColorInt;
-import android.support.annotation.ColorRes;
 import android.support.annotation.NonNull;
+import android.support.v4.content.ContextCompat;
 import android.view.Gravity;
 import android.view.View;
 
@@ -17,20 +15,19 @@
 public class PageToolbarHideHandler extends ViewHideHandler {
 private static final int FULL_OPACITY = 255;
 
-@NonNull private final Context context;
 private boolean fadeEnabled;
 private boolean forceNoFade;
 @NonNull private final Drawable toolbarBackground;
 private Drawable toolbarGradient;
 @NonNull private final Drawable statusBar;
 
-public PageToolbarHideHandler(@NonNull Context context, @NonNull View 
hideableView) {
+public PageToolbarHideHandler(@NonNull View hideableView) {
 super(hideableView, Gravity.TOP);
-this.context = context;
 
 LayerDrawable toolbarBackgroundLayers = (LayerDrawable) 
hideableView.getBackground();
 toolbarBackground = 
toolbarBackgroundLayers.findDrawableByLayerId(R.id.toolbar_background_solid).mutate();
-initToolbarGradient(toolbarBackgroundLayers);
+initToolbarGradient(toolbarBackgroundLayers,
+ContextCompat.getColor(hideableView.getContext(), 
R.color.lead_gradient_start));
 
 statusBar = 
hideableView.findViewById(R.id.empty_status_bar).getBackground().mutate();
 }
@@ -63,8 +60,7 @@
 statusBar.setAlpha(opacity);
 }
 
-private void initToolbarGradient(LayerDrawable toolbarBackgroundLayers) {
-@ColorInt int baseColor = getColor(R.color.lead_gradient_start);
+private void initToolbarGradient(LayerDrawable toolbarBackgroundLayers, 
@ColorInt int baseColor) {
 toolbarGradient = GradientUtil.getCubicGradient(baseColor, 
Gravity.TOP);
 
toolbarBackgroundLayers.setDrawableByLayerId(R.id.toolbar_background_gradient, 
toolbarGradient);
 }
@@ -79,13 +75,5 @@
 opacity = Math.max(0, opacity);
 opacity = Math.min(FULL_OPACITY, opacity);
 return opacity;
-}
-
-@ColorInt private int getColor(@ColorRes int id) {
-return getResources().getColor(id);
-}
-
-@NonNull private Resources getResources() {
-return context.getResources();
 }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/319130
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia26e9092bcb948d0cd348d214f76ccfb0dea2a09
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Don't keep Context where not necessary.

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Don't keep Context where not necessary.
..


Hygiene: Don't keep Context where not necessary.

Change-Id: Id466149fd50d0ef8355a1a43504ac7e2d0632465
---
M app/src/main/java/org/wikipedia/WikipediaApp.java
M app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
M app/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java
3 files changed, 3 insertions(+), 8 deletions(-)

Approvals:
  jenkins-bot: Verified
  Niedzielski: Looks good to me, approved



diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index 3a19755..afc8854 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -176,7 +176,7 @@
 appLanguageState = new AppLanguageState(this);
 funnelManager = new FunnelManager(this);
 sessionFunnel = new SessionFunnel(this);
-editTokenStorage = new EditTokenStorage(this);
+editTokenStorage = new EditTokenStorage();
 database = new Database(this);
 
 enableWebViewDebugging();
diff --git 
a/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java 
b/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
index 3ca812e..b6b8caf 100644
--- a/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
+++ b/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
@@ -1,6 +1,5 @@
 package org.wikipedia.editing.token;
 
-import android.content.Context;
 import android.os.Looper;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -19,15 +18,13 @@
 private static final String DELIMITER = ";";
 
 private final Map tokenJar = new HashMap<>();
-private final Context context;
 
 public interface TokenRetrievedCallback {
 void onTokenRetrieved(String token);
 void onTokenFailed(Throwable caught);
 }
 
-public EditTokenStorage(Context context) {
-this.context = context;
+public EditTokenStorage() {
 List wikis = makeList(Prefs.getEditTokenWikis());
 for (String wiki : wikis) {
 tokenJar.put(wiki, Prefs.getEditTokenForWiki(wiki));
diff --git 
a/app/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java 
b/app/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java
index 16f12fd..4f53608 100644
--- 
a/app/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java
+++ 
b/app/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java
@@ -19,7 +19,6 @@
 import org.wikipedia.views.ViewUtil;
 
 public class GalleryThumbnailScrollView extends RecyclerView {
-@NonNull private final Context mContext;
 @NonNull private final Animation mPressAnimation;
 @NonNull private final Animation mReleaseAnimation;
 @Nullable private GalleryViewListener mListener;
@@ -34,7 +33,6 @@
 
 public GalleryThumbnailScrollView(@NonNull Context context, AttributeSet 
attrs, int defStyle) {
 super(context, attrs, defStyle);
-this.mContext = context;
 setLayoutManager(new LinearLayoutManager(context, 
LinearLayoutManager.HORIZONTAL, false));
 
 mPressAnimation = AnimationUtils.loadAnimation(context, 
R.anim.thumbnail_item_press);
@@ -107,7 +105,7 @@
 
 @Override
 public GalleryItemHolder onCreateViewHolder(ViewGroup parent, int pos) 
{
-View view = LayoutInflater.from(mContext)
+View view = LayoutInflater.from(parent.getContext())
 .inflate(R.layout.item_gallery_thumbnail, parent, false);
 return new GalleryItemHolder(view);
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/319126
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id466149fd50d0ef8355a1a43504ac7e2d0632465
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Don't require a Context for LongPressHandler.

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Don't require a Context for LongPressHandler.
..


Hygiene: Don't require a Context for LongPressHandler.

Change-Id: Iad00c9f9df447e3833c0951edf7bdb6f835b1113
---
M app/src/main/java/org/wikipedia/LongPressHandler.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageInfoDialog.java
M app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
M app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
5 files changed, 8 insertions(+), 14 deletions(-)

Approvals:
  jenkins-bot: Verified
  Niedzielski: Looks good to me, approved



diff --git a/app/src/main/java/org/wikipedia/LongPressHandler.java 
b/app/src/main/java/org/wikipedia/LongPressHandler.java
index fd1f831..b71899e 100644
--- a/app/src/main/java/org/wikipedia/LongPressHandler.java
+++ b/app/src/main/java/org/wikipedia/LongPressHandler.java
@@ -1,6 +1,5 @@
 package org.wikipedia;
 
-import android.content.Context;
 import android.net.Uri;
 import android.support.annotation.NonNull;
 import android.view.ContextMenu;
@@ -21,18 +20,15 @@
 
 public class LongPressHandler implements View.OnCreateContextMenuListener,
 MenuItem.OnMenuItemClickListener {
-private final Context context;
 private final ContextMenuListener contextMenuListener;
 private final int historySource;
 
 private PageTitle title;
 private HistoryEntry entry;
 
-public LongPressHandler(@NonNull Context context,
-@NonNull View view,
+public LongPressHandler(@NonNull View view,
 int historySource,
 @NonNull ContextMenuListener listener) {
-this.context = context;
 this.historySource = historySource;
 this.contextMenuListener = listener;
 view.setOnCreateContextMenuListener(this);
@@ -60,7 +56,7 @@
 if (title != null && !title.isSpecial()) {
 hideSoftKeyboard(view);
 entry = new HistoryEntry(title, historySource);
-new MenuInflater(context).inflate(R.menu.menu_page_long_press, 
menu);
+new 
MenuInflater(view.getContext()).inflate(R.menu.menu_page_long_press, menu);
 menu.setHeaderTitle(title.getDisplayText());
 for (int i = 0; i < menu.size(); i++) {
 menu.getItem(i).setOnMenuItemClickListener(this);
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index a91527a..57fc795 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -387,8 +387,7 @@
 if (callback() != null) {
 LongPressHandler.WebViewContextMenuListener contextMenuListener
 = new PageFragmentLongPressHandler(callback());
-new LongPressHandler(getActivity(), webView, 
HistoryEntry.SOURCE_INTERNAL_LINK,
-contextMenuListener);
+new LongPressHandler(webView, HistoryEntry.SOURCE_INTERNAL_LINK, 
contextMenuListener);
 }
 
 pageDataClient.setUp(model, this, refreshView, webView, bridge, 
toolbarHideHandler,
diff --git a/app/src/main/java/org/wikipedia/page/PageInfoDialog.java 
b/app/src/main/java/org/wikipedia/page/PageInfoDialog.java
index e9a0e43..f15e722 100644
--- a/app/src/main/java/org/wikipedia/page/PageInfoDialog.java
+++ b/app/src/main/java/org/wikipedia/page/PageInfoDialog.java
@@ -63,8 +63,8 @@
 if (fragment.callback() != null) {
 ListViewContextMenuListener contextMenuListener
 = new LongPressHandler(fragment.callback());
-new org.wikipedia.LongPressHandler(getContext(), disambigList,
-HistoryEntry.SOURCE_DISAMBIG, contextMenuListener);
+new org.wikipedia.LongPressHandler(disambigList, 
HistoryEntry.SOURCE_DISAMBIG,
+contextMenuListener);
 }
 
 if (pageInfo.getSimilarTitles().length > 0) {
diff --git 
a/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java 
b/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
index 9bd501e..8c2393c 100644
--- 
a/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
+++ 
b/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
@@ -103,8 +103,8 @@
 ListViewContextMenuListener contextMenuListener
 = new LongPressHandler(parentFragment.callback());
 
-new org.wikipedia.LongPressHandler(parentFragment.getActivity(), 
readMoreList,
-HistoryEntry.SOURCE_INTERNAL_LINK, contextMenuListener);
+new org.wikipedia.LongPressHandler(readMoreList, 
HistoryEntry.SOURCE_INTERNAL_LINK,
+

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Check MW version requires before manifest_version

2016-11-01 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319244

Change subject: Check MW version requires before manifest_version
..

Check MW version requires before manifest_version

Bug: T149751
Change-Id: I914be4da431dcd613bdf2d1fd5ba9f28cf5b936b
---
M includes/registration/ExtensionRegistry.php
1 file changed, 16 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/319244/1

diff --git a/includes/registration/ExtensionRegistry.php 
b/includes/registration/ExtensionRegistry.php
index 0236ea2..b5c70e9 100644
--- a/includes/registration/ExtensionRegistry.php
+++ b/includes/registration/ExtensionRegistry.php
@@ -187,18 +187,7 @@
if ( !is_array( $info ) ) {
throw new Exception( "$path is not a valid JSON 
file." );
}
-   if ( !isset( $info['manifest_version'] ) ) {
-   // For backwards-compatability, assume a 
version of 1
-   $info['manifest_version'] = 1;
-   }
-   $version = $info['manifest_version'];
-   if ( $version < self::OLDEST_MANIFEST_VERSION || 
$version > self::MANIFEST_VERSION ) {
-   throw new Exception( "$path: unsupported 
manifest_version: {$version}" );
-   }
-   $autoload = $this->processAutoLoader( dirname( $path ), 
$info );
-   // Set up the autoloader now so custom processors will 
work
-   $GLOBALS['wgAutoloadClasses'] += $autoload;
-   $autoloadClasses += $autoload;
+
// Check any constraints against MediaWiki core
$requires = $processor->getRequirements( $info );
if ( isset( $requires[self::MEDIAWIKI_CORE] )
@@ -210,6 +199,21 @@
. '.';
continue;
}
+
+   if ( !isset( $info['manifest_version'] ) ) {
+   // For backwards-compatability, assume a 
version of 1
+   $info['manifest_version'] = 1;
+   }
+   $version = $info['manifest_version'];
+   if ( $version < self::OLDEST_MANIFEST_VERSION || 
$version > self::MANIFEST_VERSION ) {
+   throw new Exception( "$path: unsupported 
manifest_version: {$version}" );
+   }
+
+   $autoload = $this->processAutoLoader( dirname( $path ), 
$info );
+   // Set up the autoloader now so custom processors will 
work
+   $GLOBALS['wgAutoloadClasses'] += $autoload;
+   $autoloadClasses += $autoload;
+
// Get extra paths for later inclusion
$autoloaderPaths = array_merge( $autoloaderPaths,
$processor->getExtraAutoloaderPaths( dirname( 
$path ), $info ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/319244
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I914be4da431dcd613bdf2d1fd5ba9f28cf5b936b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Add some debug logging to queue consumer

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add some debug logging to queue consumer
..


Add some debug logging to queue consumer

Should it log the whole message too?

Change-Id: I15d19520308a4288409e94623a498385d7322c50
---
M Core/QueueConsumers/BaseQueueConsumer.php
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Core/QueueConsumers/BaseQueueConsumer.php 
b/Core/QueueConsumers/BaseQueueConsumer.php
index 2bb458c..5367c51 100644
--- a/Core/QueueConsumers/BaseQueueConsumer.php
+++ b/Core/QueueConsumers/BaseQueueConsumer.php
@@ -101,6 +101,10 @@
}
$timeOk = $this->timeLimit === 0 || time() <= 
$startTime + $this->timeLimit;
$countOk = $this->messageLimit === 0 || $processed < 
$this->messageLimit;
+   $debugMessage = 'Data is ' . ( $data === null ? '' : 
'not ' ) . 'null, ' .
+   "time limit ($this->timeLimit) is " . ( $timeOk 
? 'not ' : '' ) . 'elapsed, ' .
+   "message limit ($this->messageLimit) is " . ( 
$countOk ? 'not ' : '' ) . 'reached.';
+   Logger::debug( $debugMessage );
}
while( $timeOk && $countOk && $data !== null );
return $processed;
@@ -180,6 +184,7 @@
public static function getQueue( $queueName ) {
$config = Context::get()->getConfiguration();
$key = "data-store/$queueName";
+   Logger::debug( "Getting queue $queueName from key $key" );
 
// Get a reference to the config node so we can mess with it
$node =& $config->val( $key, true );
@@ -187,6 +192,7 @@
empty( $node['constructor-parameters'] ) ||
empty( $node['constructor-parameters'][0]['queue'] )
) {
+   Logger::debug( "'queue' not set, defaulting to 
$queueName" );
$node['constructor-parameters'][0]['queue'] = 
$queueName;
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/314613
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I15d19520308a4288409e94623a498385d7322c50
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove extra non-ASCII character in role::cache::text that w...

2016-11-01 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Remove extra non-ASCII character in role::cache::text that was 
causing issues
..


Remove extra non-ASCII character in role::cache::text that was causing issues

A 0xC2 character caused clients to think the class could not be found

Change-Id: I9ca0a1a0265fd8056b65e1171e382e7762752f95
---
M modules/role/manifests/cache/text.pp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/role/manifests/cache/text.pp 
b/modules/role/manifests/cache/text.pp
index 3aeb123..ce6f535 100644
--- a/modules/role/manifests/cache/text.pp
+++ b/modules/role/manifests/cache/text.pp
@@ -140,7 +140,7 @@
 # varnishkafka eventlogging listens for eventlogging
 # requests and logs them to the eventlogging-client-side
 # topic.  EventLogging servers consume and process this
-# topic into many JSON based kafka topics for further
+# topic into many JSON based kafka topics for further
 # consumption.
 class { '::role::cache::kafka::eventlogging':
 varnish_name => 'frontend',

-- 
To view, visit https://gerrit.wikimedia.org/r/319243
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ca0a1a0265fd8056b65e1171e382e7762752f95
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Remove bogus 'inflight' store

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove bogus 'inflight' store
..


Remove bogus 'inflight' store

Would write things to /tmp and never do anything with them

Change-Id: I8eaf21444d1a127f2ed95a562c2188a33083b66a
---
M Core/DataStores/NullDataStore.php
M Core/Listeners/ListenerBase.php
M Core/Listeners/RestListener.php
M Core/Listeners/SoapListener.php
M PaymentProviders/Adyen/AdyenListener.php
M PaymentProviders/AstroPay/ExpatriatedMessages/AstroPayMessage.php
M SmashPig.yaml
7 files changed, 7 insertions(+), 30 deletions(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Core/DataStores/NullDataStore.php 
b/Core/DataStores/NullDataStore.php
index 36d3068..156d3cc 100644
--- a/Core/DataStores/NullDataStore.php
+++ b/Core/DataStores/NullDataStore.php
@@ -6,8 +6,7 @@
  * Class NullDataStore
  *
  * Stub datastore to use when a datastore is not desirable to
- * be used. E.g. this can be subbed into the inflight data
- * store if that redundancy is not desired.
+ * be used.
  *
  * @package SmashPig\Core\DataStores
  */
diff --git a/Core/Listeners/ListenerBase.php b/Core/Listeners/ListenerBase.php
index 98a95e9..b3304ef 100644
--- a/Core/Listeners/ListenerBase.php
+++ b/Core/Listeners/ListenerBase.php
@@ -20,12 +20,8 @@
/** @var Configuration object - stores all listener configuration */
protected $c;
 
-   /** @var KeyedOpaqueDataStore for placing messages that are in flight */
-   protected $inflightStore;
-
public function __construct() {
$this->c = Context::get()->getConfiguration();
-   $this->inflightStore = $this->c->object( 'data-store/inflight' 
);
}
 
public function execute( Request $request, Response $response ) {
@@ -114,8 +110,7 @@
 *
 * @param ListenerMessage $msg Message object to operate on
 *
-* @return bool True if the message was successfully processed. 
Returning false will keep the
-* message in the bogus inflight queue.
+* @return bool True if the message was successfully processed.
 */
protected function processMessage( ListenerMessage $msg ) {
try {
diff --git a/Core/Listeners/RestListener.php b/Core/Listeners/RestListener.php
index c007928..ff597ca 100644
--- a/Core/Listeners/RestListener.php
+++ b/Core/Listeners/RestListener.php
@@ -17,13 +17,7 @@
 
if ( is_array( $msgs ) ) {
foreach ( $msgs as $msg ) {
-   // FIXME: this looks like an elaborate 
try-catch.  If there's
-   // a fatal exception, the remaining 
messages are toast anyway,
-   // so we should... do something 
different here.
-   $this->inflightStore->addObject( $msg );
-   if ( $this->processMessage( $msg ) ) {
-   
$this->inflightStore->removeObjects( $msg );
-   }
+   $this->processMessage( $msg );
}
}
$this->ackEnvelope();
diff --git a/Core/Listeners/SoapListener.php b/Core/Listeners/SoapListener.php
index 3f2f08c..9b55db1 100644
--- a/Core/Listeners/SoapListener.php
+++ b/Core/Listeners/SoapListener.php
@@ -43,8 +43,7 @@
 
/* --- Unfortunately because of how PHP handles SOAP 
requests we cannot do the fully wrapped
loop like we could in the REST 
listener. Instead it is up to the listener itself to
-   do the required calls to 
$this->inflightStore->addObject( $msg ), $this->processMessage( $msg ),
-   and $this->inflightStore->removeObject( 
$msg ).
+   do the required call to 
$this->processMessage( $msg ).
 
It is also expected that inside the 
handle() context that an exception will throw a SOAP
fault through $this->server->fault() 
instead of doing a $response->kill_response() call.
diff --git a/PaymentProviders/Adyen/AdyenListener.php 
b/PaymentProviders/Adyen/AdyenListener.php
index 7bdbb87..ba7d7dd 100644
--- a/PaymentProviders/Adyen/AdyenListener.php
+++ b/PaymentProviders/Adyen/AdyenListener.php
@@ -94,10 +94,9 @@
// Now process each message to the best of our ability
foreach ( $messages as $msg ) {
if ( $this->processMessage( $msg ) ) {
-   Logger::debug( "Message successfully 
processed, removing from inflight store." 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove extra non-ASCII character in role::cache::text that w...

2016-11-01 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319243

Change subject: Remove extra non-ASCII character in role::cache::text that was 
causing issues
..

Remove extra non-ASCII character in role::cache::text that was causing issues

A 0xC2 character caused clients to think the class could not be found

Change-Id: I9ca0a1a0265fd8056b65e1171e382e7762752f95
---
M modules/role/manifests/cache/text.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/319243/1

diff --git a/modules/role/manifests/cache/text.pp 
b/modules/role/manifests/cache/text.pp
index 3aeb123..ce6f535 100644
--- a/modules/role/manifests/cache/text.pp
+++ b/modules/role/manifests/cache/text.pp
@@ -140,7 +140,7 @@
 # varnishkafka eventlogging listens for eventlogging
 # requests and logs them to the eventlogging-client-side
 # topic.  EventLogging servers consume and process this
-# topic into many JSON based kafka topics for further
+# topic into many JSON based kafka topics for further
 # consumption.
 class { '::role::cache::kafka::eventlogging':
 varnish_name => 'frontend',

-- 
To view, visit https://gerrit.wikimedia.org/r/319243
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ca0a1a0265fd8056b65e1171e382e7762752f95
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix class name

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix class name
..


Fix class name

Change-Id: Ia5de4e8848e0c17aaf5044c8db757fe447eaf051
---
M globalcollect_gateway/globalcollect_resultswitcher.body.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/globalcollect_gateway/globalcollect_resultswitcher.body.php 
b/globalcollect_gateway/globalcollect_resultswitcher.body.php
index bc9218d..bcf88d3 100644
--- a/globalcollect_gateway/globalcollect_resultswitcher.body.php
+++ b/globalcollect_gateway/globalcollect_resultswitcher.body.php
@@ -97,7 +97,7 @@
$sessionOrders = $req->getSessionData( 
'order_status' );

$sessionOrders[$this->qs_oid]['data']['count'] = 
$sessionOrders[$this->qs_oid]['data']['count'] + 1;
$this->logger->error( "Resultswitcher: 
Multiple attempts to process. " . 
$sessionOrders[$this->qs_oid]['data']['count'] );
-   $result = new 
PaymentTransactionResult();
+   $result = new 
PaymentTransactionResponse();
$result->setData( 
$sessionOrders[$this->qs_oid]['data'] );
$result->setMessage( 
$sessionOrders[$this->qs_oid]['message'] );
$result->setErrors( 
$sessionOrders[$this->qs_oid]['errors'] );

-- 
To view, visit https://gerrit.wikimedia.org/r/317998
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5de4e8848e0c17aaf5044c8db757fe447eaf051
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Fix silly requeue defaults

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix silly requeue defaults
..


Fix silly requeue defaults

Every 10 minutes for 6 hours is a bit excessive. Change defaults to
match old settings in CRM: try every 20 minutes, up to 10 times.

Change-Id: Ia084f6b626b0caf07c79cac22ab2a4d2db0d54ce
---
M SmashPig.yaml
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SmashPig.yaml b/SmashPig.yaml
index 9350d5c..d088897 100644
--- a/SmashPig.yaml
+++ b/SmashPig.yaml
@@ -192,9 +192,9 @@
 max-messages: 0
 
 # in seconds
-requeue-delay: 600
+requeue-delay: 1200
 
-requeue-max-age: 36000
+requeue-max-age: 12000
 
 adyen:
 logging:

-- 
To view, visit https://gerrit.wikimedia.org/r/318017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia084f6b626b0caf07c79cac22ab2a4d2db0d54ce
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: XenoRyet 
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...DonationInterface[master]: Fit mailcheck domain list to our donor population

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fit mailcheck domain list to our donor population
..


Fit mailcheck domain list to our donor population

Possible future TODO: ResourceLoader module to load different
lists based on donor country. Legal says domains with 1,000 or
more donors should be OK to include.

Bug: T148970
Change-Id: I5e8454c4441b8e3112f270360f31996624d72fcb
---
M modules/js/ext.donationInterface.validation.js
1 file changed, 22 insertions(+), 54 deletions(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/js/ext.donationInterface.validation.js 
b/modules/js/ext.donationInterface.validation.js
index d8bd96e..13edae9 100644
--- a/modules/js/ext.donationInterface.validation.js
+++ b/modules/js/ext.donationInterface.validation.js
@@ -57,60 +57,28 @@
$( this ).mailcheck( {
topLevelDomains: [],
domains: Mailcheck.defaultDomains.concat( [
-   /* Other global domains */
-   'email.com', 'games.com' /* AOL */, 'gmx.net', 
'hush.com',
-   'hushmail.com', 'icloud.com', 'inbox.com', 
'lavabit.com',
-   'love.com' /* AOL */, 'outlook.com', 
'pobox.com',
-   'rocketmail.com' /* Yahoo */, 'safe-mail.net',
-   'wow.com' /* AOL */, 'ygm.com' /* AOL */,
-   'ymail.com' /* Yahoo */, 'zoho.com', 
'fastmail.fm',
-   'yandex.com',
-
-   /* United States ISP domains */
-   'bellsouth.net', 'charter.net', 'comcast.net', 
'cox.net',
-   'earthlink.net', 'juno.com',
-
-   /* British ISP domains */
-   'btinternet.com', 'virginmedia.com', 
'blueyonder.co.uk',
-   'freeserve.co.uk', 'live.co.uk', 
'ntlworld.com', 'o2.co.uk',
-   'orange.net', 'sky.com', 'talktalk.co.uk', 
'tiscali.co.uk',
-   'virgin.net', 'wanadoo.co.uk', 'bt.com',
-
-   /* Domains used in Asia */
-   'sina.com', 'qq.com', 'naver.com', 
'hanmail.net', 'daum.net',
-   'nate.com', 'yahoo.co.jp', 'yahoo.co.kr', 
'yahoo.co.id',
-   'yahoo.co.in', 'yahoo.com.sg', 'yahoo.com.ph',
-
-   /* French ISP domains */
-   'hotmail.fr', 'live.fr', 'laposte.net', 
'yahoo.fr',
-   'wanadoo.fr', 'orange.fr', 'gmx.fr', 'sfr.fr', 
'neuf.fr',
-   'free.fr',
-
-   /* German ISP domains */
-   'gmx.de', 'hotmail.de', 'live.de', 'online.de',
-   't-online.de' /* T-Mobile */, 'web.de', 
'yahoo.de',
-
-   /* Russian ISP domains */
-   'mail.ru', 'rambler.ru', 'yandex.ru', 'ya.ru', 
'list.ru',
-
-   /* Belgian ISP domains */
-   'hotmail.be', 'live.be', 'skynet.be', 'voo.be',
-   'tvcablenet.be', 'telenet.be',
-
-   /* Argentinian ISP domains */
-   'hotmail.com.ar', 'live.com.ar', 'yahoo.com.ar',
-   'fibertel.com.ar', 'speedy.com.ar', 
'arnet.com.ar',
-
-   /* Domains used in Mexico */
-   'hotmail.com', 'gmail.com', 'yahoo.com.mx', 
'live.com.mx',
-   'yahoo.com', 'hotmail.es', 'live.com', 
'hotmail.com.mx',
-   'prodigy.net.mx', 'msn.com',
-
-   /* Domains used in Brazil */
-   'yahoo.com.br', 'hotmail.com.br', 
'outlook.com.br',
-   'uol.com.br', 'bol.com.br', 'terra.com.br', 
'ig.com.br',
-   'itelefonica.com.br', 'r7.com', 
'zipmail.com.br', 'globo.com',
-   'globomail.com', 'oi.com.br'
+   'aim.com', 'alice.it', 'aon.at', 
'bellsouth.net', 'bigpond.com',
+   'bigpond.net.au', 'blueyonder.co.uk', 
'btinternet.com',
+   'btopenworld.com', 'charter.net', 'cox.net', 
'docomo.ne.jp',
+   'earthlink.net', 'email.it', 'embarqmail.com', 
'ezweb.ne.jp',
+   'fastwebnet.it', 'free.fr', 'frontier.com', 
'gmx.at', 'gmx.de',
+   'gmx.net', 'hetnet.nl', 'home.nl', 
'hotmail.co.jp', 'hotmail.es',
+ 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fill missing order_id while normalizing

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fill missing order_id while normalizing
..


Fill missing order_id while normalizing

Since we've moved off of stomp, we're transitioning from using
correlation-id to order_id to identify messages in logs and the like.

If order_id is missing, fill it with either contribution_tracking_id
or gateway_txn_id.

Bug: T149123
Change-Id: I1f3c6d97287ff96ccfecf604789eb98d88fdb207
---
M sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
2 files changed, 23 insertions(+), 0 deletions(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php 
b/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
index 5264b96..162f510 100644
--- a/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
+++ b/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
@@ -45,6 +45,7 @@
 'middle_name' => '',
 'net' => 5.29,
 'optout' => 0,
+'order_id' => mt_rand(),
 'organization_name' => '',
 'original_currency' => 'ILS',
 'original_gross' => '20.00',
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 068e9b3..105e140 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1625,6 +1625,28 @@
 }
 }
 
+// Order ID is used as a message identifier in a bunch of places.
+// If it's missing, fill it with something unique-ish.
+if ( !isset( $msg[ 'order_id' ] ) ) {
+watchdog(
+'wmf_civicrm',
+'Message is missing order_id, looking for a substitute 
identifier.',
+WATCHDOG_INFO
+);
+$keys = array( 'contribution_tracking_id', 'gateway_txn_id' );
+foreach ( $keys as $key ) {
+if ( isset( $msg[$key] ) ) {
+watchdog(
+'wmf_civicrm',
+"Filling order_id with {$msg[$key]} from key $key.",
+WATCHDOG_INFO
+);
+$msg['order_id'] = $msg[$key];
+break;
+}
+}
+}
+
 if ( $msg['recurring'] and !isset( $msg['start_date'] ) ) {
 $msg['start_date'] = $msg['date'];
 $msg['create_date'] = $msg['date'];

-- 
To view, visit https://gerrit.wikimedia.org/r/318150
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f3c6d97287ff96ccfecf604789eb98d88fdb207
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: XenoRyet 
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...DonationInterface[master]: Use order id as error reference when possible

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use order id as error reference when possible
..


Use order id as error reference when possible

If for some reason it doesn't exist, fall back to ct_id.

Bug: T149137
Change-Id: I60c25e0e75a54b66eef191d0d412f7fef630ba34
---
M gateway_forms/mustache/error_form.html.mustache
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/gateway_forms/mustache/error_form.html.mustache 
b/gateway_forms/mustache/error_form.html.mustache
index 7e7817f..bb57e17 100644
--- a/gateway_forms/mustache/error_form.html.mustache
+++ b/gateway_forms/mustache/error_form.html.mustache
@@ -19,7 +19,10 @@
 
 {{ l10n "donate_interface-donate-error-thank-you-for-your-support" 
}}
 
-
+{{# order_id }}{{! Use the full order id as reference if we have 
one }}
+{{ l10n "donate_interface-error-reference" . }}
+{{/order_id}}{{^ order_id }}{{! Otherwise fall back to contribution 
tracking ID }}
 {{ l10n "donate_interface-error-reference" 
contribution_tracking_id }}
+{{/order_id}}
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/319002
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I60c25e0e75a54b66eef191d0d412f7fef630ba34
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
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...Echo[master]: Follow overhauled color palette

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Follow overhauled color palette
..


Follow overhauled color palette

Replacing colors with ones from the overhauled WCAG 2.0 level AA
compliant color palette https://phabricator.wikimedia.org/M82
Applying Less variables where possible for better flexibility
in future design maintenance.
Also introducing some variables from WikimediaUI Base.

Bug: T147365
Depends-on: I16bdfbdada252ee27d5a0de11e0930347315b699
Change-Id: Ic05ed15b44d86752c686d80efc4f2ed2a1e71b41
---
M modules/echo.variables.less
M modules/nojs/mw.echo.notifications.less
M modules/nojs/mw.echo.special.less
M modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
M modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
M modules/styles/mw.echo.ui.MenuItemWidget.less
M modules/styles/mw.echo.ui.NotificationItemWidget.less
M modules/styles/mw.echo.ui.NotificationsListWidget.less
M modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
M modules/styles/mw.echo.ui.ToggleReadCircleButtonWidget.less
10 files changed, 65 insertions(+), 48 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  VolkerE: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/echo.variables.less b/modules/echo.variables.less
index a24ba39..66bdfc0 100644
--- a/modules/echo.variables.less
+++ b/modules/echo.variables.less
@@ -1,17 +1,38 @@
+// Taken from WikimediaUI base v0.6.1
+// Background Colors
+@background-color-base: #fff;
+
+// Foreground Colors
+@color-base: #222;
+@color-base-active: #000;
+@color-base-emphasized: @color-base-active;
+// Primary 'Progressive' Color, Background Color
+@background-color-primary: #eaf3ff;
+@color-primary: #36c;
+// 'Destructive' Color
+@color-destructive: #c33;
+
+// Border Colors
+@border-color-heading: #c8ccd1;
+
+// Echo's original variables
+@grey-light: #72777d;
+@grey-medium: #54595d;
+
 @badge-padding: 0.12em;
 @badge-icon-size: 1.1em;
 @badge-distance-adjustment: 1em;
 
 @notification-background-unseen: #dce8ff;
-@notification-background-unread: #fff;
-@notification-background-read: #f1f1f1;
+@notification-background-unread: @background-color-base;
+@notification-background-read: #eaecf0;
 
-@badge-counter-background-seen: #71777d;
-@badge-counter-background-unseen-alert: #c33;
-@badge-counter-background-unseen-message: #36c;
+@badge-counter-background-seen: @grey-light;
+@badge-counter-background-unseen-alert: @color-destructive;
+@badge-counter-background-unseen-message: @color-primary;
 
-@notification-text-color: #111;
-@notification-body-color: #777;
+@notification-text-color: @color-base-emphasized;
+@notification-body-color: @grey-light;
 
 @bundle-group-padding: 0.7em;
 @notification-popup-width: 500px;
@@ -26,9 +47,4 @@
 
 @specialpage-width: 1000px;
 
-@grey-light: #777;
-@grey-medium: #555;
-@grey-dark: #333;
-@grey-darkest: #000;
-
-@border-color: #ccc;
+@border-color: @border-color-heading;
diff --git a/modules/nojs/mw.echo.notifications.less 
b/modules/nojs/mw.echo.notifications.less
index 7c69be5..4627fdc 100644
--- a/modules/nojs/mw.echo.notifications.less
+++ b/modules/nojs/mw.echo.notifications.less
@@ -21,13 +21,13 @@
margin-left: 10px;
}
.mw-echo-notification {
+   background-color: @background-color-base;
+   color: @grey-light;
clear: both;
display: block;
-   color: #6d6d6d;
line-height: 90%;
margin: 0;
min-height: 30px;
-   background-color: #fff;
position: relative;
padding-top: 15px;
padding-bottom: 10px;
@@ -42,7 +42,7 @@
}
 
.mw-echo-notifications {
-   background-color: #eee;
+   background-color: @notification-background-read;
}
 
.mw-echo-content {
@@ -75,7 +75,7 @@
}
 
.mw-echo-notification-footer {
-   color: #6d6d6d;
+   color: @grey-light;
font-size: 11px;
margin-top: 0.2em;
 
diff --git a/modules/nojs/mw.echo.special.less 
b/modules/nojs/mw.echo.special.less
index 0630fd7..681a952 100644
--- a/modules/nojs/mw.echo.special.less
+++ b/modules/nojs/mw.echo.special.less
@@ -43,9 +43,9 @@
 }
 
 .mw-echo-date-section {
-   border-bottom: 1px solid #c9c9c9;
+   border-bottom: 1px solid @border-color;
margin: 20px 0 5px 0;
-   color: #686868;
+   color: @grey-light;
display: inline-block;
width: 100%;
padding-bottom: 0.5em;
@@ -77,7 +77,7 @@
 .mw-echo-special-navbar-bottom {
margin-top: 20px;
padding-top: 10px;
-   border-top: solid 1px #c9c9c9;
+   border-top: 1px solid @border-color;
 }
 
 .mw-echo-notification {
@@ -114,7 +114,7 @@

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Updating icon colors to latest palette

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Updating icon colors to latest palette
..


Updating icon colors to latest palette

Echo icons updated to the new color palette
https://phabricator.wikimedia.org/M82
Also setting color value hex codes to lowercase for uniformity
across products.

Bug: T147365
Change-Id: I16bdfbdada252ee27d5a0de11e0930347315b699
---
M modules/icons/chat.svg
M modules/icons/edit-user-talk.svg
M modules/icons/emailuser.svg
M modules/icons/feedback.svg
M modules/icons/generic.svg
M modules/icons/global.svg
M modules/icons/link-blue.svg
M modules/icons/mention-failure.svg
M modules/icons/mention-status-bundle.svg
M modules/icons/mention.svg
M modules/icons/ooui-edit-ltr-progressive.svg
M modules/icons/ooui-edit-rtl-progressive.svg
M modules/icons/revert.svg
M modules/icons/reviewed.svg
M modules/icons/trash.svg
M modules/icons/user-rights.svg
16 files changed, 23 insertions(+), 22 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/icons/chat.svg b/modules/icons/chat.svg
index c18db1c..61b69b2 100644
--- a/modules/icons/chat.svg
+++ b/modules/icons/chat.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg;>
-
+
 
diff --git a/modules/icons/edit-user-talk.svg b/modules/icons/edit-user-talk.svg
index 96be758..c78c9c1 100644
--- a/modules/icons/edit-user-talk.svg
+++ b/modules/icons/edit-user-talk.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg;>
-
+
 
diff --git a/modules/icons/emailuser.svg b/modules/icons/emailuser.svg
index e0627e6..03e6ad8 100644
--- a/modules/icons/emailuser.svg
+++ b/modules/icons/emailuser.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg;>
-
+
 
diff --git a/modules/icons/feedback.svg b/modules/icons/feedback.svg
index fc6b955..6b12bc1 100644
--- a/modules/icons/feedback.svg
+++ b/modules/icons/feedback.svg
@@ -1,17 +1,15 @@
 
 http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink;>
-
 feedback
-Created with Sketch.
 
 
 
 
 
 
-
+
 
 
 
 
-
\ No newline at end of file
+
diff --git a/modules/icons/generic.svg b/modules/icons/generic.svg
index ec87a25..297de26 100644
--- a/modules/icons/generic.svg
+++ b/modules/icons/generic.svg
@@ -1,5 +1,7 @@
 
 http://www.w3.org/2000/svg; width="30" height="30" viewBox="0 0 30 
30">
-  
-  
+  
+
+
+  
 
diff --git a/modules/icons/global.svg b/modules/icons/global.svg
index 71e60ed..5038a09 100644
--- a/modules/icons/global.svg
+++ b/modules/icons/global.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg;>
-
+
 
diff --git a/modules/icons/link-blue.svg b/modules/icons/link-blue.svg
index bb57a2c..6a37deb 100644
--- a/modules/icons/link-blue.svg
+++ b/modules/icons/link-blue.svg
@@ -1,6 +1,6 @@
 
 http://www.w3.org/2000/svg; viewBox="0 0 30 30" width="30" 
height="30">
-
+
 
 
 
diff --git a/modules/icons/mention-failure.svg 
b/modules/icons/mention-failure.svg
index 3b78b41..00c980b 100644
--- a/modules/icons/mention-failure.svg
+++ b/modules/icons/mention-failure.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg; width="30" height="30" viewBox="0 0 
188.36253 188.36253">
-
-
\ No newline at end of file
+
+
diff --git a/modules/icons/mention-status-bundle.svg 
b/modules/icons/mention-status-bundle.svg
index d240a7e..56295b2 100644
--- a/modules/icons/mention-status-bundle.svg
+++ b/modules/icons/mention-status-bundle.svg
@@ -1,4 +1,5 @@
 
 http://www.w3.org/2000/svg; width="30" height="30" viewBox="0 0 
241.12238 168.78567">
-
-
\ No newline at end of file
+
+
+
diff --git a/modules/icons/mention.svg b/modules/icons/mention.svg
index b98f1b9..f090bf1 100644
--- a/modules/icons/mention.svg
+++ b/modules/icons/mention.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg;>
-
+
 
diff --git a/modules/icons/ooui-edit-ltr-progressive.svg 
b/modules/icons/ooui-edit-ltr-progressive.svg
index 7918ebf..bacc712 100644
--- a/modules/icons/ooui-edit-ltr-progressive.svg
+++ b/modules/icons/ooui-edit-ltr-progressive.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
+
 
diff --git a/modules/icons/ooui-edit-rtl-progressive.svg 
b/modules/icons/ooui-edit-rtl-progressive.svg
index 6670aa4..6f16aef 100644
--- a/modules/icons/ooui-edit-rtl-progressive.svg
+++ b/modules/icons/ooui-edit-rtl-progressive.svg
@@ -1,4 +1,4 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
+
 
diff --git a/modules/icons/revert.svg b/modules/icons/revert.svg
index 02ed441..af0f2b4 100644
--- a/modules/icons/revert.svg
+++ b/modules/icons/revert.svg
@@ -1,6 +1,6 @@
 
 http://www.w3.org/2000/svg; width="30" height="30" viewBox="0 0 30 
30">
-
+
 
 
 
diff --git 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: [WIP] Deprecate, rename, move icons

2016-11-01 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319242

Change subject: [WIP] Deprecate, rename, move icons
..

[WIP] Deprecate, rename, move icons

Change-Id: Id055edded7d24fd01121c5647c1a51d47458553c
---
M build/modules.yaml
M demos/demo.js
M demos/pages/icons.js
R src/themes/apex/icons-notifications.json
A src/themes/mediawiki/icons-deprecated.json
M src/themes/mediawiki/icons-editing-advanced.json
M src/themes/mediawiki/icons-interactions.json
A src/themes/mediawiki/icons-messages.json
M src/themes/mediawiki/icons-movement.json
R src/themes/mediawiki/icons-notifications.json
M src/themes/mediawiki/icons-wikimedia.json
M src/themes/mediawiki/icons.json
R src/themes/mediawiki/images/icons/logo-wikimediaDiscovery.svg
13 files changed, 146 insertions(+), 119 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/42/319242/1

diff --git a/build/modules.yaml b/build/modules.yaml
index 70381b1..ec946de 100644
--- a/build/modules.yaml
+++ b/build/modules.yaml
@@ -200,30 +200,30 @@
],
"theme": "mediawiki"
},
-   "oojs-ui-{theme}-icons-movement": {
-   "styles": [
-   "src/themes/{theme}/icons-movement.json"
-   ]
-   },
"oojs-ui-{theme}-icons-content": {
"styles": [
"src/themes/{theme}/icons-content.json"
]
},
-   "oojs-ui-{theme}-icons-alerts": {
+   "oojs-ui-{theme}-icons-moderation": {
"styles": [
-   "src/themes/{theme}/icons-alerts.json"
+   "src/themes/{theme}/icons-moderation.json"
+   ]
+   },
+   "oojs-ui-{theme}-icons-movement": {
+   "styles": [
+   "src/themes/{theme}/icons-movement.json"
+   ]
+   },
+   "oojs-ui-{theme}-icons-notifications": {
+   "styles": [
+   "src/themes/{theme}/icons-notifications.json"
],
"theme": "mediawiki"
},
"oojs-ui-{theme}-icons-interactions": {
"styles": [
"src/themes/{theme}/icons-interactions.json"
-   ]
-   },
-   "oojs-ui-{theme}-icons-moderation": {
-   "styles": [
-   "src/themes/{theme}/icons-moderation.json"
]
},
"oojs-ui-{theme}-icons-editing-core": {
diff --git a/demos/demo.js b/demos/demo.js
index 7a39a9d..2230737 100644
--- a/demos/demo.js
+++ b/demos/demo.js
@@ -103,11 +103,12 @@
mediawiki: {
fileSuffix: '-mediawiki',
additionalSuffixes: [
-   '-icons-movement',
'-icons-content',
-   '-icons-alerts',
+   '-icons-messages',
+   '-icons-notifications',
'-icons-interactions',
'-icons-moderation',
+   '-icons-movement',
'-icons-editing-core',
'-icons-editing-styling',
'-icons-editing-list',
@@ -126,7 +127,7 @@
additionalSuffixes: [
'-icons-movement',
'-icons-content',
-   '-icons-alerts',
+   '-icons-notifications',
'-icons-interactions',
'-icons-moderation',
'-icons-editing-core',
diff --git a/demos/pages/icons.js b/demos/pages/icons.js
index 4c9bdc1..119f623 100644
--- a/demos/pages/icons.js
+++ b/demos/pages/icons.js
@@ -1,29 +1,11 @@
 OO.ui.Demo.static.pages.icons = function ( demo ) {
var i, len, iconSet, iconsFieldset, iconButton, selector,
icons = {
-   core: [
-   'add',
-   'advanced',
+   messages: [
'alert',
-   'cancel',
-   'check',
-   'circle',
-   'close',
-   'collapse',
-   'comment',
-   'ellipsis',
-   'expand',
'help',
-   'history',
'info',
-   'menu',
-   'next',
-   'notice',
-   'previous',
-   'search',
-   'settings',
-   'tag',
-   'window'
+   'notice'

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Better card logos for Adyen and Ingenico

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Better card logos for Adyen and Ingenico
..


Better card logos for Adyen and Ingenico

Still not really high resolution, but better.

Bug: T149370
Change-Id: I2c4fd863f9a1f112a965a37b3f6285d97d9d3701
---
M adyen_gateway/config/payment_submethods.yaml
D gateway_forms/includes/card-amex.png
A gateway_forms/includes/card-cb-lg.png
D gateway_forms/includes/card-cb.png
D gateway_forms/includes/card-dinersclub.png
A gateway_forms/includes/card-discover-lg.png
D gateway_forms/includes/card-discover.png
A gateway_forms/includes/card-jcb-lg.png
D gateway_forms/includes/card-jcb.png
D gateway_forms/includes/card-mc.png
D gateway_forms/includes/card-visa.png
M globalcollect_gateway/config/payment_submethods.yaml
12 files changed, 11 insertions(+), 11 deletions(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/adyen_gateway/config/payment_submethods.yaml 
b/adyen_gateway/config/payment_submethods.yaml
index ea80c1c..704ab97 100644
--- a/adyen_gateway/config/payment_submethods.yaml
+++ b/adyen_gateway/config/payment_submethods.yaml
@@ -2,7 +2,7 @@
 countries:
 FR: true
 group: cc
-logo: card-cb.png
+logo: card-cb-lg.png
 visa:
 countries:
 FR: true
@@ -12,13 +12,13 @@
 UA: true
 US: true
 group: cc
-logo: card-visa.png
+logo: card-visa-lg.png
 jcb:
 countries: {}
 # Disabled for T140691
 # JP: true
 group: cc
-logo: card-jcb.png
+logo: card-jcb-lg.png
 mc:
 countries:
 FR: true
@@ -28,7 +28,7 @@
 UA: true
 US: true
 group: cc
-logo: card-mc.png
+logo: card-mc-lg.png
 amex:
 countries:
 FR: true
@@ -37,12 +37,12 @@
 UA: true
 US: true
 group: cc
-logo: card-amex.png
+logo: card-amex-lg.png
 discover:
 countries:
 IL: true
 US: true
 group: cc
-logo: card-discover.png
+logo: card-discover-lg.png
 
 
diff --git a/gateway_forms/includes/card-amex.png 
b/gateway_forms/includes/card-amex.png
deleted file mode 100644
index 803eb9b..000
--- a/gateway_forms/includes/card-amex.png
+++ /dev/null
Binary files differ
diff --git a/gateway_forms/includes/card-cb-lg.png 
b/gateway_forms/includes/card-cb-lg.png
new file mode 100644
index 000..8cf97dc
--- /dev/null
+++ b/gateway_forms/includes/card-cb-lg.png
Binary files differ
diff --git a/gateway_forms/includes/card-cb.png 
b/gateway_forms/includes/card-cb.png
deleted file mode 100644
index 160a6af..000
--- a/gateway_forms/includes/card-cb.png
+++ /dev/null
Binary files differ
diff --git a/gateway_forms/includes/card-dinersclub.png 
b/gateway_forms/includes/card-dinersclub.png
deleted file mode 100644
index 1da35d9..000
--- a/gateway_forms/includes/card-dinersclub.png
+++ /dev/null
Binary files differ
diff --git a/gateway_forms/includes/card-discover-lg.png 
b/gateway_forms/includes/card-discover-lg.png
new file mode 100644
index 000..a7e4203
--- /dev/null
+++ b/gateway_forms/includes/card-discover-lg.png
Binary files differ
diff --git a/gateway_forms/includes/card-discover.png 
b/gateway_forms/includes/card-discover.png
deleted file mode 100644
index 60fa437..000
--- a/gateway_forms/includes/card-discover.png
+++ /dev/null
Binary files differ
diff --git a/gateway_forms/includes/card-jcb-lg.png 
b/gateway_forms/includes/card-jcb-lg.png
new file mode 100644
index 000..b85e8b6
--- /dev/null
+++ b/gateway_forms/includes/card-jcb-lg.png
Binary files differ
diff --git a/gateway_forms/includes/card-jcb.png 
b/gateway_forms/includes/card-jcb.png
deleted file mode 100644
index df356ad..000
--- a/gateway_forms/includes/card-jcb.png
+++ /dev/null
Binary files differ
diff --git a/gateway_forms/includes/card-mc.png 
b/gateway_forms/includes/card-mc.png
deleted file mode 100644
index ca642be..000
--- a/gateway_forms/includes/card-mc.png
+++ /dev/null
Binary files differ
diff --git a/gateway_forms/includes/card-visa.png 
b/gateway_forms/includes/card-visa.png
deleted file mode 100644
index bb11a32..000
--- a/gateway_forms/includes/card-visa.png
+++ /dev/null
Binary files differ
diff --git a/globalcollect_gateway/config/payment_submethods.yaml 
b/globalcollect_gateway/config/payment_submethods.yaml
index 22d0d52..cc99b9c 100644
--- a/globalcollect_gateway/config/payment_submethods.yaml
+++ b/globalcollect_gateway/config/payment_submethods.yaml
@@ -9,7 +9,7 @@
 label_key: donate_interface-card-name-visa
 group: cc
 keys: {  }
-logo: card-visa.png
+logo: card-visa-lg.png
 jcb:
 paymentproductid: 125
 label: JCB
@@ -46,13 +46,13 @@
 SK: true
 TH: true
 TW: true
-logo: card-jcb.png
+logo: card-jcb-lg.png
 mc:
 paymentproductid: 3
 label_key: donate_interface-card-name-mc
 group: cc
 keys: {  }
-

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Geocode existing US addresses

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Geocode existing US addresses
..


Geocode existing US addresses

Bug: T148578
Change-Id: I8c463f85816c2403361e77d293143e6e90c53bc0
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 25 insertions(+), 0 deletions(-)

Approvals:
  Eileen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index df542db..9fc3a35 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -2365,3 +2365,28 @@
 SET e.is_primary = 1
   ");
 }
+
+/**
+ * Update existing US addresses with latitude, longitude, and time zone
+ */
+function wmf_civicrm_update_7320() {
+  civicrm_initialize();
+  CRM_Core_DAO::executeQuery("
+CREATE TEMPORARY TABLE civicrm_address_geocode
+ SELECT id, LEFT(postal_code, 5) AS zip
+ FROM civicrm_address
+ WHERE country_id = (SELECT id FROM civicrm_country WHERE iso_code = 'US')
+  ");
+
+  CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_address_geocode ADD INDEX 
index_id(id)");
+  CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_address_geocode ADD INDEX 
index_zip(zip)");
+
+  CRM_Core_DAO::executeQuery("
+UPDATE civicrm_address a
+INNER JOIN civicrm_address_geocode c ON c.id = a.id
+INNER JOIN wmf_zip_geo g ON c.zip = g.zip
+SET a.geo_code_1 = g.latitude,
+  a.geo_code_2 = g.longitude,
+  a.timezone = g.timezone
+  ");
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/319125
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c463f85816c2403361e77d293143e6e90c53bc0
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update deprecated APIs

2016-11-01 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319241

Change subject: Update deprecated APIs
..

Update deprecated APIs

Bug: T144318
Change-Id: I9cdc208f2f61c940ba6aeedb153703ca16d83a05
---
M app/src/androidTest/java/org/wikipedia/test/TranslationTests.java
M app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
M app/src/main/java/org/wikipedia/ViewAnimations.java
M app/src/main/java/org/wikipedia/crash/hockeyapp/HockeyAppExceptionHandler.java
M app/src/main/java/org/wikipedia/editing/preview/EditPreviewFragment.java
M app/src/main/java/org/wikipedia/editing/richtext/SyntaxHighlighter.java
M app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
M app/src/main/java/org/wikipedia/editing/summaries/EditSummaryTag.java
M app/src/main/java/org/wikipedia/feed/continuereading/LastPageReadTask.java
M app/src/main/java/org/wikipedia/news/NewsFragment.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
M app/src/main/java/org/wikipedia/page/ToCHandler.java
M 
app/src/main/java/org/wikipedia/page/bottomcontent/MainPageReadMoreTopicTask.java
M app/src/main/java/org/wikipedia/page/gallery/GalleryActivity.java
M app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderImageView.java
M app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
M app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListDetailView.java
M app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java
M app/src/main/java/org/wikipedia/tooltip/ToolTipUtil.java
A app/src/main/java/org/wikipedia/util/ConfigurationCompat.java
A app/src/main/java/org/wikipedia/util/ContentProviderClientCompat.java
M app/src/main/java/org/wikipedia/util/L10nUtil.java
M app/src/main/java/org/wikipedia/util/StringUtil.java
M app/src/main/java/org/wikipedia/views/DontInterceptTouchListener.java
M app/src/main/java/org/wikipedia/views/DrawableItemDecoration.java
M app/src/main/java/org/wikipedia/views/FaceAndColorDetectImageView.java
M app/src/test/java/org/wikipedia/page/NamespaceTest.java
M app/src/test/java/org/wikipedia/zero/ZeroConfigTypeAdapterTest.java
30 files changed, 186 insertions(+), 163 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/41/319241/1

diff --git a/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java 
b/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java
index 0a9a15f..9b7df81 100644
--- a/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java
+++ b/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java
@@ -11,6 +11,7 @@
 import org.junit.Test;
 import org.wikipedia.R;
 import org.wikipedia.model.BaseModel;
+import org.wikipedia.util.ConfigurationCompat;
 import org.wikipedia.util.log.L;
 
 import java.lang.reflect.Field;
@@ -114,7 +115,7 @@
 Locale.setDefault(myLocale);
 DisplayMetrics dm = getResources().getDisplayMetrics();
 Configuration conf = getResources().getConfiguration();
-conf.locale = myLocale;
+ConfigurationCompat.setLocale(conf, myLocale);
 getResources().updateConfiguration(conf, dm);
 }
 
diff --git a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java 
b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
index 3373afc..bfe0b0b 100644
--- a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
@@ -12,7 +12,6 @@
 import android.support.annotation.StringRes;
 import android.support.test.InstrumentationRegistry;
 import android.support.v4.text.TextUtilsCompat;
-import android.support.v4.view.ViewCompat;
 import android.support.v7.view.ContextThemeWrapper;
 import android.view.View;
 import android.widget.TextView;
@@ -83,7 +82,7 @@
 protected void snap(@NonNull View subject, @Nullable String... dataPoints) 
{
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
 int rtl = layoutDirection == LayoutDirection.RTL
-? ViewCompat.LAYOUT_DIRECTION_RTL
+? View.LAYOUT_DIRECTION_RTL
 : TextUtilsCompat.getLayoutDirectionFromLocale(locale);
 //noinspection WrongConstant
 subject.setLayoutDirection(rtl);
diff --git a/app/src/main/java/org/wikipedia/ViewAnimations.java 
b/app/src/main/java/org/wikipedia/ViewAnimations.java
index 652ad32..731813d 100644
--- a/app/src/main/java/org/wikipedia/ViewAnimations.java
+++ b/app/src/main/java/org/wikipedia/ViewAnimations.java
@@ -1,12 +1,10 @@
 package org.wikipedia;
 
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
 import android.content.res.Resources;
-import android.support.v4.view.ViewCompat;
-import 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove unused member in EditTokenStorage

2016-11-01 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319240

Change subject: Hygiene: remove unused member in EditTokenStorage
..

Hygiene: remove unused member in EditTokenStorage

Bug: T144318
Change-Id: I673bf568ef64ed5a2b74254887857a110c83d6c5
---
M app/src/main/java/org/wikipedia/WikipediaApp.java
M app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
2 files changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/40/319240/1

diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index 3a19755..afc8854 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -176,7 +176,7 @@
 appLanguageState = new AppLanguageState(this);
 funnelManager = new FunnelManager(this);
 sessionFunnel = new SessionFunnel(this);
-editTokenStorage = new EditTokenStorage(this);
+editTokenStorage = new EditTokenStorage();
 database = new Database(this);
 
 enableWebViewDebugging();
diff --git 
a/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java 
b/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
index 3ca812e..b6b8caf 100644
--- a/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
+++ b/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
@@ -1,6 +1,5 @@
 package org.wikipedia.editing.token;
 
-import android.content.Context;
 import android.os.Looper;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -19,15 +18,13 @@
 private static final String DELIMITER = ";";
 
 private final Map tokenJar = new HashMap<>();
-private final Context context;
 
 public interface TokenRetrievedCallback {
 void onTokenRetrieved(String token);
 void onTokenFailed(Throwable caught);
 }
 
-public EditTokenStorage(Context context) {
-this.context = context;
+public EditTokenStorage() {
 List wikis = makeList(Prefs.getEditTokenWikis());
 for (String wiki : wikis) {
 tokenJar.put(wiki, Prefs.getEditTokenForWiki(wiki));

-- 
To view, visit https://gerrit.wikimedia.org/r/319240
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I673bf568ef64ed5a2b74254887857a110c83d6c5
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix ArrayAdapters to use parent when inflating

2016-11-01 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319238

Change subject: Fix ArrayAdapters to use parent when inflating
..

Fix ArrayAdapters to use parent when inflating

When inflating items, consider the parent attributes. This doesn't
appear to have any effect but perhaps the list item layouts may be
simplified in a future patch. Also reduce Activity dependency to
Context.

Bug: T144318
Change-Id: I229bba004799e835b9f3af2e24f8cee04a8c3fd5
---
M app/src/androidTest/java/org/wikipedia/editing/preview/EditPreviewTest.java
M app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
M app/src/main/java/org/wikipedia/page/IssuesListAdapter.java
3 files changed, 14 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/38/319238/1

diff --git 
a/app/src/androidTest/java/org/wikipedia/editing/preview/EditPreviewTest.java 
b/app/src/androidTest/java/org/wikipedia/editing/preview/EditPreviewTest.java
index 84506cf..ce37417 100644
--- 
a/app/src/androidTest/java/org/wikipedia/editing/preview/EditPreviewTest.java
+++ 
b/app/src/androidTest/java/org/wikipedia/editing/preview/EditPreviewTest.java
@@ -1,7 +1,7 @@
 package org.wikipedia.editing.preview;
 
 import android.support.annotation.NonNull;
-import android.support.test.filters.SmallTest;;
+import android.support.test.filters.SmallTest;
 
 import org.junit.Test;
 import org.wikipedia.dataclient.WikiSite;
diff --git a/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java 
b/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
index aaf1c96..69b4819 100644
--- a/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
+++ b/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
@@ -1,6 +1,6 @@
 package org.wikipedia.page;
 
-import android.app.Activity;
+import android.content.Context;
 import android.support.annotation.NonNull;
 import android.support.v4.util.LruCache;
 import android.view.LayoutInflater;
@@ -31,19 +31,16 @@
 class DisambigListAdapter extends ArrayAdapter {
 private static final int MAX_CACHE_SIZE_IMAGES = 24;
 @NonNull private final LruCache pageImagesCache = new 
LruCache<>(MAX_CACHE_SIZE_IMAGES);
-private final Activity activity;
 private final DisambigResult[] items;
 private final WikipediaApp app;
 private final WikiSite wiki;
 
 /**
  * Constructor
- * @param activity The current activity.
  * @param items The objects to represent in the ListView.
  */
-DisambigListAdapter(Activity activity, DisambigResult[] items) {
-super(activity, 0, items);
-this.activity = activity;
+DisambigListAdapter(@NonNull Context context, DisambigResult[] items) {
+super(context, 0, items);
 this.items = items;
 app = (WikipediaApp) getContext().getApplicationContext();
 wiki = app.getWikiSite();
@@ -118,12 +115,11 @@
 private TextView description;
 }
 
-@Override
-public View getView(int position, View convertView, ViewGroup parent) {
-LayoutInflater inflater = activity.getLayoutInflater();
+@NonNull @Override public View getView(int position, View convertView, 
@NonNull ViewGroup parent) {
+LayoutInflater inflater = LayoutInflater.from(parent.getContext());
 ViewHolder holder;
 if (convertView == null) {
-convertView = inflater.inflate(R.layout.item_page_list_entry, 
null);
+convertView = inflater.inflate(R.layout.item_page_list_entry, 
parent, false);
 holder = new ViewHolder();
 holder.icon = (SimpleDraweeView) 
convertView.findViewById(R.id.page_list_item_image);
 holder.title = (TextView) 
convertView.findViewById(R.id.page_list_item_title);
diff --git a/app/src/main/java/org/wikipedia/page/IssuesListAdapter.java 
b/app/src/main/java/org/wikipedia/page/IssuesListAdapter.java
index 6ef8d73..f98b208 100644
--- a/app/src/main/java/org/wikipedia/page/IssuesListAdapter.java
+++ b/app/src/main/java/org/wikipedia/page/IssuesListAdapter.java
@@ -1,6 +1,7 @@
 package org.wikipedia.page;
 
-import android.app.Activity;
+import android.content.Context;
+import android.support.annotation.NonNull;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -17,19 +18,16 @@
 class IssuesListAdapter extends ArrayAdapter {
 private static final String SEPARATOR = "(";
 private static final String SEPARATOR_END = ")";
-private final Activity activity;
 private final String[] items;
 
 private ViewHolder holder;
 
 /**
  * Constructor
- * @param activity The current activity.
  * @param items The objects to represent in the ListView.
  */
-IssuesListAdapter(Activity activity, String[] items) {
-super(activity, 0, items);
-this.activity = activity;
+

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove ParcelableLruCache

2016-11-01 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319237

Change subject: Hygiene: remove ParcelableLruCache
..

Hygiene: remove ParcelableLruCache

The functionality of the superclass, LruCache, seems sufficient now that
the search screen is hosted in a separate Activity.

Bug: T144318
Change-Id: I44d80cd8daab7c07f17e2570442af85b6846cd42
---
D app/src/main/java/org/wikipedia/ParcelableLruCache.java
M app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
M app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
M app/src/test/java/org/wikipedia/test/ParcelableTest.java
4 files changed, 6 insertions(+), 151 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/37/319237/1

diff --git a/app/src/main/java/org/wikipedia/ParcelableLruCache.java 
b/app/src/main/java/org/wikipedia/ParcelableLruCache.java
deleted file mode 100644
index 988c39f..000
--- a/app/src/main/java/org/wikipedia/ParcelableLruCache.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.wikipedia;
-
-import android.os.Bundle;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.support.v4.util.LruCache;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * An LRU Cache that can be parcelled.
- *
- * Will throw up a RuntimeError if passed things that are not parcellable.
- *
- * Can be considered sortof a messy hack, but grrr Android.
- *
- * FIXME: This also resets the LRUcounters when recreated.
- *
- * V can either be a String, Parcelable or a List
- */
-public class ParcelableLruCache extends LruCache implements 
Parcelable {
-private static final int TYPE_LIST = 1;
-private static final int TYPE_PARCELABLE = 2;
-private static final int TYPE_STRING = 3;
-
-private final int type;
-public ParcelableLruCache(int maxSize, Class valueClass) {
-super(maxSize);
-if (valueClass.equals(String.class)) {
-type = TYPE_STRING;
-} else if (valueClass.isAssignableFrom(List.class)) {
-type = TYPE_LIST;
-} else {
-type = TYPE_PARCELABLE;
-}
-}
-
-private ParcelableLruCache(Parcel in) {
-super(in.readInt());
-type = in.readInt();
-Bundle contents = in.readBundle();
-contents.setClassLoader(getClass().getClassLoader());
-Set keys = contents.keySet();
-for (String key : keys) {
-switch (type) {
-case TYPE_LIST:
-//noinspection unchecked
-put(key, (V) contents.getParcelableArrayList(key));
-break;
-case TYPE_PARCELABLE:
-//noinspection unchecked
-put(key, (V) contents.getParcelable(key));
-break;
-case TYPE_STRING:
-//noinspection unchecked
-put(key, (V) contents.getString(key));
-break;
-default:
-throw new RuntimeException("Unknown key type encountered " 
+ type);
-}
-}
-}
-
-@Override
-public int describeContents() {
-return 0;
-}
-
-@Override
-public void writeToParcel(Parcel dest, int flags) {
-dest.writeInt(maxSize());
-dest.writeInt(type);
-Map snapshot = snapshot();
-Bundle bundle = new Bundle();
-for (Map.Entry entry : snapshot.entrySet()) {
-switch (type) {
-case TYPE_LIST:
-//noinspection unchecked
-bundle.putParcelableArrayList(entry.getKey(),
-(ArrayList) 
entry.getValue());
-break;
-case TYPE_PARCELABLE:
-bundle.putParcelable(entry.getKey(), (Parcelable) 
entry.getValue());
-break;
-case TYPE_STRING:
-bundle.putString(entry.getKey(), (String) 
entry.getValue());
-break;
-default:
-throw new RuntimeException("Unknown key type encountered " 
+ type);
-}
-}
-dest.writeBundle(bundle);
-}
-
-public static final Parcelable.Creator CREATOR
-= new Parcelable.Creator() {
-@Override
-public ParcelableLruCache createFromParcel(Parcel in) {
-return new ParcelableLruCache<>(in);
-}
-
-@Override
-public ParcelableLruCache[] newArray(int size) {
-return new ParcelableLruCache[size];
-}
-};
-}
diff --git a/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java 
b/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
index 8406b1f..aaf1c96 100644

[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Removed use of smwInitProperties hook

2016-11-01 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Removed use of smwInitProperties hook
..


Removed use of smwInitProperties hook

Change-Id: I9c61c80911852c103c6a52c90a2b07ec26721770
---
M extension.json
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  Yaron Koren: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index fcfaf66..5e00e0a 100644
--- a/extension.json
+++ b/extension.json
@@ -371,9 +371,6 @@
"PFFormEditAction::displayTab2",
"PFHelperFormAction::displayTab2"
],
-   "smwInitProperties": [
-   "PFHooks::initProperties"
-   ],
"ArticlePurge": [
"PFFormUtils::purgeCache"
],

-- 
To view, visit https://gerrit.wikimedia.org/r/319236
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c61c80911852c103c6a52c90a2b07ec26721770
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
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...PageForms[master]: Removed use of smwInitProperties hook

2016-11-01 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319236

Change subject: Removed use of smwInitProperties hook
..

Removed use of smwInitProperties hook

Change-Id: I9c61c80911852c103c6a52c90a2b07ec26721770
---
M extension.json
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/36/319236/2

diff --git a/extension.json b/extension.json
index fcfaf66..5e00e0a 100644
--- a/extension.json
+++ b/extension.json
@@ -371,9 +371,6 @@
"PFFormEditAction::displayTab2",
"PFHelperFormAction::displayTab2"
],
-   "smwInitProperties": [
-   "PFHooks::initProperties"
-   ],
"ArticlePurge": [
"PFFormUtils::purgeCache"
],

-- 
To view, visit https://gerrit.wikimedia.org/r/319236
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c61c80911852c103c6a52c90a2b07ec26721770
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Adyen GB fix

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Adyen GB fix
..


Adyen GB fix

Prevent billing address incomplete error by sending value 'NA' for the unused
'houseNumberorName' field, as per Adyen's suggestion.

Bug: T147475
Change-Id: I3cdafc3ee9478491324e4749c0242009ebeed9d2
---
M adyen_gateway/adyen.adapter.php
M adyen_gateway/config/var_map.yaml
2 files changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index ae047e3..cb23081 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -108,11 +108,14 @@
'billingAddress.stateOrProvince',
'billingAddress.country',
'billingAddressType',
+   'billingAddress.houseNumberOrName',
);
 
if ( in_array( 'street', $this->getRequiredFields() ) )  {
$requestFields = array_merge( $requestFields, 
$addressFields );
}
+
+
 
$this->transactions[ 'donate' ] = array(
'request' => $requestFields,
@@ -125,8 +128,14 @@
'skinCode' => $this->accountInfo[ 'skinCode' ],
//'shopperLocale' => language _ country
),
+
'iframe' => TRUE,
);
+   // Hack to get required but unused field into GB form
+   if ( $this->getData_Unstaged_Escaped( 'country' ) == 'GB' )
+   {
+   $this->transactions[ 'donate' ]['values'][ 
'billingAddress.houseNumberOrName' ] = 'NA';
+   }
}
 
protected function getAllowedPaymentMethods() {
diff --git a/adyen_gateway/config/var_map.yaml 
b/adyen_gateway/config/var_map.yaml
index ce01b4a..5321ada 100644
--- a/adyen_gateway/config/var_map.yaml
+++ b/adyen_gateway/config/var_map.yaml
@@ -4,6 +4,7 @@
 billingAddress.postalCode: zip
 billingAddress.stateOrProvince: state
 billingAddress.street: street
+billingAddress.houseNumberOrName: street_supplemental
 billingAddressType: billing_address_type
 blockedMethods: blocked_methods
 card.cardHolderName: full_name

-- 
To view, visit https://gerrit.wikimedia.org/r/319235
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3cdafc3ee9478491324e4749c0242009ebeed9d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: XenoRyet 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
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...DonationInterface[master]: Adyen GB fix

2016-11-01 Thread XenoRyet (Code Review)
XenoRyet has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319235

Change subject: Adyen GB fix
..

Adyen GB fix

Prevent billing address incomplete error by sending value 'NA' for the unused
'houseNumberorName' field, as per Adyen's suggestion.

Bug: T147475
Change-Id: I3cdafc3ee9478491324e4749c0242009ebeed9d2
---
M adyen_gateway/adyen.adapter.php
M adyen_gateway/config/var_map.yaml
2 files changed, 10 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/35/319235/1

diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index ae047e3..cb23081 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -108,11 +108,14 @@
'billingAddress.stateOrProvince',
'billingAddress.country',
'billingAddressType',
+   'billingAddress.houseNumberOrName',
);
 
if ( in_array( 'street', $this->getRequiredFields() ) )  {
$requestFields = array_merge( $requestFields, 
$addressFields );
}
+
+
 
$this->transactions[ 'donate' ] = array(
'request' => $requestFields,
@@ -125,8 +128,14 @@
'skinCode' => $this->accountInfo[ 'skinCode' ],
//'shopperLocale' => language _ country
),
+
'iframe' => TRUE,
);
+   // Hack to get required but unused field into GB form
+   if ( $this->getData_Unstaged_Escaped( 'country' ) == 'GB' )
+   {
+   $this->transactions[ 'donate' ]['values'][ 
'billingAddress.houseNumberOrName' ] = 'NA';
+   }
}
 
protected function getAllowedPaymentMethods() {
diff --git a/adyen_gateway/config/var_map.yaml 
b/adyen_gateway/config/var_map.yaml
index ce01b4a..5321ada 100644
--- a/adyen_gateway/config/var_map.yaml
+++ b/adyen_gateway/config/var_map.yaml
@@ -4,6 +4,7 @@
 billingAddress.postalCode: zip
 billingAddress.stateOrProvince: state
 billingAddress.street: street
+billingAddress.houseNumberOrName: street_supplemental
 billingAddressType: billing_address_type
 blockedMethods: blocked_methods
 card.cardHolderName: full_name

-- 
To view, visit https://gerrit.wikimedia.org/r/319235
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cdafc3ee9478491324e4749c0242009ebeed9d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: XenoRyet 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fit mailcheck domain list to our donor population

2016-11-01 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319234

Change subject: Fit mailcheck domain list to our donor population
..

Fit mailcheck domain list to our donor population

Possible future TODO: ResourceLoader module to load different
lists based on donor country. Legal says domains with 1,000 or
more donors should be OK to include.

Bug: T148970
Change-Id: I5e8454c4441b8e3112f270360f31996624d72fcb
---
M modules/js/ext.donationInterface.validation.js
1 file changed, 22 insertions(+), 54 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/34/319234/1

diff --git a/modules/js/ext.donationInterface.validation.js 
b/modules/js/ext.donationInterface.validation.js
index d8bd96e..4ec44bb 100644
--- a/modules/js/ext.donationInterface.validation.js
+++ b/modules/js/ext.donationInterface.validation.js
@@ -57,60 +57,28 @@
$( this ).mailcheck( {
topLevelDomains: [],
domains: Mailcheck.defaultDomains.concat( [
-   /* Other global domains */
-   'email.com', 'games.com' /* AOL */, 'gmx.net', 
'hush.com',
-   'hushmail.com', 'icloud.com', 'inbox.com', 
'lavabit.com',
-   'love.com' /* AOL */, 'outlook.com', 
'pobox.com',
-   'rocketmail.com' /* Yahoo */, 'safe-mail.net',
-   'wow.com' /* AOL */, 'ygm.com' /* AOL */,
-   'ymail.com' /* Yahoo */, 'zoho.com', 
'fastmail.fm',
-   'yandex.com',
-
-   /* United States ISP domains */
-   'bellsouth.net', 'charter.net', 'comcast.net', 
'cox.net',
-   'earthlink.net', 'juno.com',
-
-   /* British ISP domains */
-   'btinternet.com', 'virginmedia.com', 
'blueyonder.co.uk',
-   'freeserve.co.uk', 'live.co.uk', 
'ntlworld.com', 'o2.co.uk',
-   'orange.net', 'sky.com', 'talktalk.co.uk', 
'tiscali.co.uk',
-   'virgin.net', 'wanadoo.co.uk', 'bt.com',
-
-   /* Domains used in Asia */
-   'sina.com', 'qq.com', 'naver.com', 
'hanmail.net', 'daum.net',
-   'nate.com', 'yahoo.co.jp', 'yahoo.co.kr', 
'yahoo.co.id',
-   'yahoo.co.in', 'yahoo.com.sg', 'yahoo.com.ph',
-
-   /* French ISP domains */
-   'hotmail.fr', 'live.fr', 'laposte.net', 
'yahoo.fr',
-   'wanadoo.fr', 'orange.fr', 'gmx.fr', 'sfr.fr', 
'neuf.fr',
-   'free.fr',
-
-   /* German ISP domains */
-   'gmx.de', 'hotmail.de', 'live.de', 'online.de',
-   't-online.de' /* T-Mobile */, 'web.de', 
'yahoo.de',
-
-   /* Russian ISP domains */
-   'mail.ru', 'rambler.ru', 'yandex.ru', 'ya.ru', 
'list.ru',
-
-   /* Belgian ISP domains */
-   'hotmail.be', 'live.be', 'skynet.be', 'voo.be',
-   'tvcablenet.be', 'telenet.be',
-
-   /* Argentinian ISP domains */
-   'hotmail.com.ar', 'live.com.ar', 'yahoo.com.ar',
-   'fibertel.com.ar', 'speedy.com.ar', 
'arnet.com.ar',
-
-   /* Domains used in Mexico */
-   'hotmail.com', 'gmail.com', 'yahoo.com.mx', 
'live.com.mx',
-   'yahoo.com', 'hotmail.es', 'live.com', 
'hotmail.com.mx',
-   'prodigy.net.mx', 'msn.com',
-
-   /* Domains used in Brazil */
-   'yahoo.com.br', 'hotmail.com.br', 
'outlook.com.br',
-   'uol.com.br', 'bol.com.br', 'terra.com.br', 
'ig.com.br',
-   'itelefonica.com.br', 'r7.com', 
'zipmail.com.br', 'globo.com',
-   'globomail.com', 'oi.com.br'
+   "aim.com", "alice.it", "aon.at", 
"bellsouth.net", "bigpond.com",
+   "bigpond.net.au", "blueyonder.co.uk", 
"btinternet.com",
+   "btopenworld.com", "charter.net", "cox.net", 
"docomo.ne.jp",
+   "earthlink.net", "email.it", "embarqmail.com", 
"ezweb.ne.jp",
+   "fastwebnet.it", "free.fr", "frontier.com", 
"gmx.at", "gmx.de",
+   

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Don't keep an Activity in DisambigList and IssuesList.

2016-11-01 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319233

Change subject: Hygiene: Don't keep an Activity in DisambigList and IssuesList.
..

Hygiene: Don't keep an Activity in DisambigList and IssuesList.

Change-Id: I983700722a028703c16250f36a95eb01643e46a9
---
M app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
M app/src/main/java/org/wikipedia/page/IssuesListAdapter.java
2 files changed, 12 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/33/319233/1

diff --git a/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java 
b/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
index 8406b1f..a50824c 100644
--- a/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
+++ b/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
@@ -1,6 +1,7 @@
 package org.wikipedia.page;
 
-import android.app.Activity;
+import android.content.Context;
+import android.support.annotation.NonNull;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -31,19 +32,12 @@
 private static final int MAX_CACHE_SIZE_IMAGES = 24;
 private final ParcelableLruCache pageImagesCache
 = new ParcelableLruCache<>(MAX_CACHE_SIZE_IMAGES, String.class);
-private final Activity activity;
 private final DisambigResult[] items;
 private final WikipediaApp app;
 private final WikiSite wiki;
 
-/**
- * Constructor
- * @param activity The current activity.
- * @param items The objects to represent in the ListView.
- */
-DisambigListAdapter(Activity activity, DisambigResult[] items) {
-super(activity, 0, items);
-this.activity = activity;
+DisambigListAdapter(@NonNull Context context, @NonNull DisambigResult[] 
items) {
+super(context, 0, items);
 this.items = items;
 app = (WikipediaApp) getContext().getApplicationContext();
 wiki = app.getWikiSite();
@@ -118,9 +112,8 @@
 private TextView description;
 }
 
-@Override
-public View getView(int position, View convertView, ViewGroup parent) {
-LayoutInflater inflater = activity.getLayoutInflater();
+@Override @NonNull public View getView(int position, View convertView, 
@NonNull ViewGroup parent) {
+LayoutInflater inflater = (LayoutInflater) 
parent.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 ViewHolder holder;
 if (convertView == null) {
 convertView = inflater.inflate(R.layout.item_page_list_entry, 
null);
diff --git a/app/src/main/java/org/wikipedia/page/IssuesListAdapter.java 
b/app/src/main/java/org/wikipedia/page/IssuesListAdapter.java
index 6ef8d73..9db3b20 100644
--- a/app/src/main/java/org/wikipedia/page/IssuesListAdapter.java
+++ b/app/src/main/java/org/wikipedia/page/IssuesListAdapter.java
@@ -1,6 +1,7 @@
 package org.wikipedia.page;
 
-import android.app.Activity;
+import android.content.Context;
+import android.support.annotation.NonNull;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -17,19 +18,12 @@
 class IssuesListAdapter extends ArrayAdapter {
 private static final String SEPARATOR = "(";
 private static final String SEPARATOR_END = ")";
-private final Activity activity;
 private final String[] items;
 
 private ViewHolder holder;
 
-/**
- * Constructor
- * @param activity The current activity.
- * @param items The objects to represent in the ListView.
- */
-IssuesListAdapter(Activity activity, String[] items) {
-super(activity, 0, items);
-this.activity = activity;
+IssuesListAdapter(@NonNull Context context, @NonNull String[] items) {
+super(context, 0, items);
 this.items = items;
 }
 
@@ -44,9 +38,8 @@
 return false; // don't make it appear clickable
 }
 
-@Override
-public View getView(int position, View convertView, ViewGroup parent) {
-LayoutInflater inflater = activity.getLayoutInflater();
+@Override @NonNull public View getView(int position, View convertView, 
@NonNull ViewGroup parent) {
+LayoutInflater inflater = (LayoutInflater) 
parent.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 if (convertView == null) {
 convertView = inflater.inflate(R.layout.item_issue, null);
 holder = new ViewHolder();

-- 
To view, visit https://gerrit.wikimedia.org/r/319233
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I983700722a028703c16250f36a95eb01643e46a9
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] operations/puppet[production]: quarry: Explicitly add python2 plugin

2016-11-01 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: quarry: Explicitly add python2 plugin
..


quarry: Explicitly add python2 plugin

Quarry is still python2

Change-Id: I9e11dc727977e8262936c36c5ffe02b18a896110
---
M modules/quarry/manifests/web.pp
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/quarry/manifests/web.pp b/modules/quarry/manifests/web.pp
index c3f0f21..31380e2 100644
--- a/modules/quarry/manifests/web.pp
+++ b/modules/quarry/manifests/web.pp
@@ -14,6 +14,7 @@
 require  => Git::Clone['analytics/quarry/web'],
 settings => {
 uwsgi => {
+'plugins'   => 'python',
 'socket'=> '/run/uwsgi/quarry-web.sock',
 'wsgi-file' => "${clone_path}/quarry.wsgi",
 'master'=> true,

-- 
To view, visit https://gerrit.wikimedia.org/r/319231
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e11dc727977e8262936c36c5ffe02b18a896110
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: quarry: Explicitly add python2 plugin

2016-11-01 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319231

Change subject: quarry: Explicitly add python2 plugin
..

quarry: Explicitly add python2 plugin

Quarry is still python2

Change-Id: I9e11dc727977e8262936c36c5ffe02b18a896110
---
M modules/quarry/manifests/web.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/319231/1

diff --git a/modules/quarry/manifests/web.pp b/modules/quarry/manifests/web.pp
index c3f0f21..31380e2 100644
--- a/modules/quarry/manifests/web.pp
+++ b/modules/quarry/manifests/web.pp
@@ -14,6 +14,7 @@
 require  => Git::Clone['analytics/quarry/web'],
 settings => {
 uwsgi => {
+'plugins'   => 'python',
 'socket'=> '/run/uwsgi/quarry-web.sock',
 'wsgi-file' => "${clone_path}/quarry.wsgi",
 'master'=> true,

-- 
To view, visit https://gerrit.wikimedia.org/r/319231
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e11dc727977e8262936c36c5ffe02b18a896110
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...dashboard[master]: Deploy metrics dash fix

2016-11-01 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Deploy metrics dash fix
..


Deploy metrics dash fix

Disables monthly metrics module in Search Metrics dashboard

Bug: T149735
Change-Id: Idf142b7af62c04a630e4795e08adae2b3666fd9a
---
M shiny-server/metrics
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bearloga: Verified; Looks good to me, approved



diff --git a/shiny-server/metrics b/shiny-server/metrics
index d4999e5..66a409c 16
--- a/shiny-server/metrics
+++ b/shiny-server/metrics
@@ -1 +1 @@
-Subproject commit d4999e5b6f387689c99895e58c98be1e3a9c58a9
+Subproject commit 66a409c7f7602772ea67de72025a623d68046c54

-- 
To view, visit https://gerrit.wikimedia.org/r/319232
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf142b7af62c04a630e4795e08adae2b3666fd9a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/dashboard
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Bearloga 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...dashboard[master]: Deploy metrics dash fix

2016-11-01 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319232

Change subject: Deploy metrics dash fix
..

Deploy metrics dash fix

Disables monthly metrics module in Search Metrics dashboard

Bug: T149735
Change-Id: Idf142b7af62c04a630e4795e08adae2b3666fd9a
---
M shiny-server/metrics
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/dashboard 
refs/changes/32/319232/1

diff --git a/shiny-server/metrics b/shiny-server/metrics
index d4999e5..66a409c 16
--- a/shiny-server/metrics
+++ b/shiny-server/metrics
@@ -1 +1 @@
-Subproject commit d4999e5b6f387689c99895e58c98be1e3a9c58a9
+Subproject commit 66a409c7f7602772ea67de72025a623d68046c54

-- 
To view, visit https://gerrit.wikimedia.org/r/319232
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf142b7af62c04a630e4795e08adae2b3666fd9a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/dashboard
Gerrit-Branch: master
Gerrit-Owner: Bearloga 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Don't require an Activity for EditSummaryHandler.

2016-11-01 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319230

Change subject: Hygiene: Don't require an Activity for EditSummaryHandler.
..

Hygiene: Don't require an Activity for EditSummaryHandler.

Change-Id: I2541bd864803c91ecf1b9b1eb3d9e953c57680ee
---
M app/src/main/java/org/wikipedia/editing/summaries/EditSummaryFragment.java
M app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
2 files changed, 11 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/30/319230/1

diff --git 
a/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryFragment.java 
b/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryFragment.java
index 76374b7..b27c92d 100644
--- a/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryFragment.java
+++ b/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryFragment.java
@@ -62,8 +62,7 @@
 summaryText.setText(savedInstanceState.getString("summaryText"));
 }
 parentActivity = (EditSectionActivity)getActivity();
-editSummaryHandler = new EditSummaryHandler(getActivity(), 
editSummaryContainer,
-summaryText, title);
+editSummaryHandler = new EditSummaryHandler(editSummaryContainer, 
summaryText, title);
 }
 
 /**
diff --git 
a/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java 
b/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
index 446c560..d41f90a 100644
--- a/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
+++ b/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
@@ -1,11 +1,12 @@
 package org.wikipedia.editing.summaries;
 
-import android.app.Activity;
 import android.content.ContentProviderClient;
 import android.content.Context;
 import android.database.Cursor;
 import android.net.Uri;
 import android.os.RemoteException;
+import android.support.annotation.NonNull;
+import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.AutoCompleteTextView;
@@ -21,13 +22,12 @@
 import static org.wikipedia.util.L10nUtil.setConditionalTextDirection;
 
 public class EditSummaryHandler {
-private final Activity activity;
 private final View container;
 private final AutoCompleteTextView summaryEdit;
 
-public EditSummaryHandler(final Activity activity, View container,
-  AutoCompleteTextView summaryEditText, PageTitle 
title) {
-this.activity = activity;
+public EditSummaryHandler(@NonNull View container,
+  @NonNull AutoCompleteTextView summaryEditText,
+  @NonNull PageTitle title) {
 this.container = container;
 this.summaryEdit = summaryEditText;
 
@@ -38,12 +38,13 @@
 }
 });
 
-EditSummaryAdapter adapter = new EditSummaryAdapter(activity, null, 
true);
+EditSummaryAdapter adapter = new 
EditSummaryAdapter(container.getContext(), null, true);
 summaryEdit.setAdapter(adapter);
 adapter.setFilterQueryProvider(new FilterQueryProvider() {
 @Override
 public Cursor runQuery(CharSequence charSequence) {
-ContentProviderClient client = 
EditSummary.DATABASE_TABLE.acquireClient(activity);
+ContentProviderClient client
+= 
EditSummary.DATABASE_TABLE.acquireClient(WikipediaApp.getInstance());
 Uri uri = EditHistoryContract.Summary.URI;
 final String[] projection = null;
 String selection = 
EditHistoryContract.Summary.SUMMARY.qualifiedName() + " like ?";
@@ -87,7 +88,8 @@
 
 @Override
 public View newView(Context context, Cursor cursor, ViewGroup parent) {
-return 
activity.getLayoutInflater().inflate(android.R.layout.simple_list_item_1, 
parent, false);
+return ((LayoutInflater) 
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
+.inflate(android.R.layout.simple_list_item_1, parent, 
false);
 }
 
 @Override

-- 
To view, visit https://gerrit.wikimedia.org/r/319230
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2541bd864803c91ecf1b9b1eb3d9e953c57680ee
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...rainbow[master]: Disable monthly metrics module

2016-11-01 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Disable monthly metrics module
..


Disable monthly metrics module

Stopped working on the labs instance but works on local
R installation. Disabling for now until we can figure out
what the heck is going on.

Bug: T149735
Change-Id: I39e5b82e95c4c21af1542497a1ab22a2d479c6ba
---
M server.R
M ui.R
2 files changed, 129 insertions(+), 126 deletions(-)

Approvals:
  Bearloga: Verified; Looks good to me, approved



diff --git a/server.R b/server.R
index 2267d0a..5c04b63 100644
--- a/server.R
+++ b/server.R
@@ -722,102 +722,102 @@
   dyEvent(as.Date("2016-07-12"), "A (schema switch)", labelLoc = "bottom")
   })
 
-  ## Monthly metrics
-  output$monthly_metrics_tbl <- renderUI({
-temp <- data.frame(
-  KPI = c("Load time", "Zero results rate", "API Usage", "User 
engagement"),
-  Units = c("ms", "%", "", "%")
-)
-
-prev_month <- as.Date(paste(input$monthy_metrics_year, which(month.name == 
input$monthy_metrics_month), "1", sep = "-"))
-prev_prev_month <- prev_month - months(1)
-prev_year <- prev_month - months(12)
-
-smoothed_load_times <- list(Desktop = desktop_load_data,
-Mobile = mobile_load_data,
-Android = android_load_data,
-iOS = ios_load_data) %>%
-  lapply(function(platform_load_data) {
-platform_load_data[, c("date", "Median")]
-  }) %>%
-  dplyr::bind_rows(.id = "platform") %>%
-  dplyr::group_by(date) %>%
-  dplyr::summarize(Median = median(Median)) %>%
-  polloi::smoother("month", rename = FALSE)
-smoothed_zrr <- polloi::smoother(failure_data_with_automata, "month", 
rename = FALSE)
-smoothed_api <- split_dataset %>%
-  lapply(function(platform_load_data) {
-platform_load_data[, c("date", "events")]
-  }) %>%
-  dplyr::bind_rows(.id = "api") %>%
-  dplyr::group_by(date) %>%
-  dplyr::summarize(total = sum(events)) %>%
-  polloi::smoother("month", rename = FALSE)
-smoothed_engagement <- augmented_clickthroughs[, c("date", 
"user_engagement")] %>%
-  polloi::smoother("month", rename = FALSE)
-temp$Current <- c(
-  smoothed_load_times$Median[smoothed_load_times$date == prev_month],
-  smoothed_zrr$rate[smoothed_zrr$date == prev_month],
-  smoothed_api$total[smoothed_api$date == prev_month],
-  smoothed_engagement$user_engagement[smoothed_engagement$date == 
prev_month]
-)
-temp$Previous_month <- c(
-  smoothed_load_times$Median[smoothed_load_times$date == prev_prev_month],
-  smoothed_zrr$rate[smoothed_zrr$date == prev_prev_month],
-  smoothed_api$total[smoothed_api$date == prev_prev_month],
-  smoothed_engagement$user_engagement[smoothed_engagement$date == 
prev_prev_month]
-)
-temp$Previous_year <- c(
-  ifelse(sum(smoothed_load_times$date == prev_year) == 0, NA, 
smoothed_load_times$Median[smoothed_load_times$date == prev_year]),
-  ifelse(sum(smoothed_zrr$date == prev_year) == 0, NA, 
smoothed_zrr$rate[smoothed_zrr$date == prev_year]),
-  ifelse(sum(smoothed_api$date == prev_year) == 0, NA, 
smoothed_api$total[smoothed_api$date == prev_year]),
-  ifelse(sum(smoothed_engagement$date == prev_year) == 0, NA, 
smoothed_engagement$user_engagement[smoothed_engagement$date == prev_year])
-)
-temp$Anchors <- c("kpi_load_time", "kpi_zero_results", "kpi_api_usage", 
"kpi_augmented_clickthroughs")
-
-# Compute month-over-month changes:
-temp$MoM <- c(
-  100 * (temp$Current - temp$Previous_month)/temp$Previous_month
-)
-# Compute year-over-year changes:
-temp$YoY <- c(
-  100 * (temp$Current - temp$Previous_year)/temp$Previous_year
-)
-# Affix units:
-temp$Current <- paste0(temp$Current, temp$Units)
-temp$Previous_month <- paste0(temp$Previous_month, temp$Units)
-temp$Previous_year <- paste0(temp$Previous_year, temp$Units)
-temp$MoM <- sprintf("%s%.2f%%", ifelse(temp$MoM > 0, "+", ""), temp$MoM)
-temp$YoY <- sprintf("%s%.2f%%", ifelse(temp$YoY > 0, "+", ""), temp$YoY)
-# API Usage units (K/M/B/T):
-temp[3, c("Current", "Previous_month", "Previous_year")] <- 
polloi::compress(as.numeric(temp[3, c("Current", "Previous_month", 
"Previous_year")]))
-# Rename columns to use month & year:
-names(temp) <- c("KPI", "Units", as.character(prev_month, "%B %Y"), 
as.character(prev_prev_month, "%B %Y"), as.character(prev_year, "%B %Y"), 
"Anchors", "MoM", "YoY")
-# Sanitize:
-temp[temp == "NA%" | temp == "NANA%" | temp == "NANA"] <- "--"
-temp$KPI <- paste0('', temp$KPI, '')
-cols_to_keep <- c(1, 5, 4, 3, 7, 8)
-if (!input$monthly_metrics_prev_month) {
-  cols_to_keep <- base::setdiff(cols_to_keep, 4)
-}
-if (!input$monthly_metrics_prev_year) {
-  cols_to_keep <- base::setdiff(cols_to_keep, 5)
-  

[MediaWiki-commits] [Gerrit] wikimedia...rainbow[master]: Disable monthly metrics module

2016-11-01 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319228

Change subject: Disable monthly metrics module
..

Disable monthly metrics module

Stopped working on the labs instance but works on local
R installation. Disabling for now until we can figure out
what the heck is going on.

Bug: T149735
Change-Id: I39e5b82e95c4c21af1542497a1ab22a2d479c6ba
---
M server.R
M ui.R
2 files changed, 129 insertions(+), 126 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/28/319228/1

diff --git a/server.R b/server.R
index 2267d0a..5c04b63 100644
--- a/server.R
+++ b/server.R
@@ -722,102 +722,102 @@
   dyEvent(as.Date("2016-07-12"), "A (schema switch)", labelLoc = "bottom")
   })
 
-  ## Monthly metrics
-  output$monthly_metrics_tbl <- renderUI({
-temp <- data.frame(
-  KPI = c("Load time", "Zero results rate", "API Usage", "User 
engagement"),
-  Units = c("ms", "%", "", "%")
-)
-
-prev_month <- as.Date(paste(input$monthy_metrics_year, which(month.name == 
input$monthy_metrics_month), "1", sep = "-"))
-prev_prev_month <- prev_month - months(1)
-prev_year <- prev_month - months(12)
-
-smoothed_load_times <- list(Desktop = desktop_load_data,
-Mobile = mobile_load_data,
-Android = android_load_data,
-iOS = ios_load_data) %>%
-  lapply(function(platform_load_data) {
-platform_load_data[, c("date", "Median")]
-  }) %>%
-  dplyr::bind_rows(.id = "platform") %>%
-  dplyr::group_by(date) %>%
-  dplyr::summarize(Median = median(Median)) %>%
-  polloi::smoother("month", rename = FALSE)
-smoothed_zrr <- polloi::smoother(failure_data_with_automata, "month", 
rename = FALSE)
-smoothed_api <- split_dataset %>%
-  lapply(function(platform_load_data) {
-platform_load_data[, c("date", "events")]
-  }) %>%
-  dplyr::bind_rows(.id = "api") %>%
-  dplyr::group_by(date) %>%
-  dplyr::summarize(total = sum(events)) %>%
-  polloi::smoother("month", rename = FALSE)
-smoothed_engagement <- augmented_clickthroughs[, c("date", 
"user_engagement")] %>%
-  polloi::smoother("month", rename = FALSE)
-temp$Current <- c(
-  smoothed_load_times$Median[smoothed_load_times$date == prev_month],
-  smoothed_zrr$rate[smoothed_zrr$date == prev_month],
-  smoothed_api$total[smoothed_api$date == prev_month],
-  smoothed_engagement$user_engagement[smoothed_engagement$date == 
prev_month]
-)
-temp$Previous_month <- c(
-  smoothed_load_times$Median[smoothed_load_times$date == prev_prev_month],
-  smoothed_zrr$rate[smoothed_zrr$date == prev_prev_month],
-  smoothed_api$total[smoothed_api$date == prev_prev_month],
-  smoothed_engagement$user_engagement[smoothed_engagement$date == 
prev_prev_month]
-)
-temp$Previous_year <- c(
-  ifelse(sum(smoothed_load_times$date == prev_year) == 0, NA, 
smoothed_load_times$Median[smoothed_load_times$date == prev_year]),
-  ifelse(sum(smoothed_zrr$date == prev_year) == 0, NA, 
smoothed_zrr$rate[smoothed_zrr$date == prev_year]),
-  ifelse(sum(smoothed_api$date == prev_year) == 0, NA, 
smoothed_api$total[smoothed_api$date == prev_year]),
-  ifelse(sum(smoothed_engagement$date == prev_year) == 0, NA, 
smoothed_engagement$user_engagement[smoothed_engagement$date == prev_year])
-)
-temp$Anchors <- c("kpi_load_time", "kpi_zero_results", "kpi_api_usage", 
"kpi_augmented_clickthroughs")
-
-# Compute month-over-month changes:
-temp$MoM <- c(
-  100 * (temp$Current - temp$Previous_month)/temp$Previous_month
-)
-# Compute year-over-year changes:
-temp$YoY <- c(
-  100 * (temp$Current - temp$Previous_year)/temp$Previous_year
-)
-# Affix units:
-temp$Current <- paste0(temp$Current, temp$Units)
-temp$Previous_month <- paste0(temp$Previous_month, temp$Units)
-temp$Previous_year <- paste0(temp$Previous_year, temp$Units)
-temp$MoM <- sprintf("%s%.2f%%", ifelse(temp$MoM > 0, "+", ""), temp$MoM)
-temp$YoY <- sprintf("%s%.2f%%", ifelse(temp$YoY > 0, "+", ""), temp$YoY)
-# API Usage units (K/M/B/T):
-temp[3, c("Current", "Previous_month", "Previous_year")] <- 
polloi::compress(as.numeric(temp[3, c("Current", "Previous_month", 
"Previous_year")]))
-# Rename columns to use month & year:
-names(temp) <- c("KPI", "Units", as.character(prev_month, "%B %Y"), 
as.character(prev_prev_month, "%B %Y"), as.character(prev_year, "%B %Y"), 
"Anchors", "MoM", "YoY")
-# Sanitize:
-temp[temp == "NA%" | temp == "NANA%" | temp == "NANA"] <- "--"
-temp$KPI <- paste0('', temp$KPI, '')
-cols_to_keep <- c(1, 5, 4, 3, 7, 8)
-if (!input$monthly_metrics_prev_month) {
-  cols_to_keep <- base::setdiff(cols_to_keep, 4)
-}
-if 

[MediaWiki-commits] [Gerrit] operations/dns[master]: add AAAA and PTR for eventlog1001.eqiad.wmnet

2016-11-01 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319150

Change subject: add  and PTR for eventlog1001.eqiad.wmnet
..

add  and PTR for eventlog1001.eqiad.wmnet

A mapped IPv6 address has been added to the host
in Change-Id: I3f5d90a66d5f9c20.

Now add the DNS records for it.

Change-Id: Ieeffd2e44ac0ec2453cd72fef645df1646ab4f98
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wmnet
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/50/319150/1

diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 18c8c3a..99f1fd8 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -138,6 +138,7 @@
 4.3.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   cp1057.eqiad.wmnet.
 
 0.5.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   iridium.eqiad.wmnet.
+7.6.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   eventlog1001.eqiad.wmnet.
 9.7.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   planet1001.eqiad.wmnet.
 6.8.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   iridium-vcs.eqiad.wmnet.
 
diff --git a/templates/wmnet b/templates/wmnet
index 509d97f..2952106 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -380,6 +380,7 @@
 etcd10061H  IN A10.64.32.218
 etherpad10011H  IN A10.64.32.177 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 eventlog10011H  IN A10.64.32.167
+eventlog10011H  IN  2620:0:861:103:10:64:32:167
 fluorine1H  IN A10.64.0.21
 francium1H  IN A10.64.32.168
 ganeti1001  1H  IN A10.64.32.169

-- 
To view, visit https://gerrit.wikimedia.org/r/319150
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieeffd2e44ac0ec2453cd72fef645df1646ab4f98
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: mtail: introduce systemd unit

2016-11-01 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: mtail: introduce systemd unit
..


mtail: introduce systemd unit

Allow mtail to ran as mtail:root. mtail requires being able to read log files
in /srv/syslog (duh!) and therefore either running as user root or group root.
The former is unnecessary for obvious reasons, and the latter isn't
straightforward without changing the sysv init script shipped with mtail.

Bug: T147923
Change-Id: I4cacc9d95dbf94ff3288408ef5b67138908e6709
---
M modules/mtail/manifests/init.pp
M modules/mtail/templates/default.erb
A modules/mtail/templates/initscripts/mtail.systemd.erb
3 files changed, 19 insertions(+), 7 deletions(-)

Approvals:
  Filippo Giunchedi: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/mtail/manifests/init.pp b/modules/mtail/manifests/init.pp
index 71e7c57..4c2e287 100644
--- a/modules/mtail/manifests/init.pp
+++ b/modules/mtail/manifests/init.pp
@@ -39,7 +39,8 @@
 notify  => Service['mtail'],
 }
 
-service { 'mtail':
-ensure => running,
+base::service_unit { 'mtail':
+ensure  => present,
+systemd => true
 }
 }
diff --git a/modules/mtail/templates/default.erb 
b/modules/mtail/templates/default.erb
index 1fa4b31..0dae7fb 100644
--- a/modules/mtail/templates/default.erb
+++ b/modules/mtail/templates/default.erb
@@ -1,5 +1,7 @@
-ENABLED=<%= @enabled %>
-GRAPHITE_HOSTPORT=<%= @graphite_hostport %>
-PORT=<%= @port %>
-LOGS=<%= @logs.join(',') %>
-EXTRA_ARGS="-graphite_prefix <%= @graphite_prefix %>"
+# Arguments used by SysV init script, systemd service file uses only EXTRA_ARGS
+#ENABLED=<%= @enabled %>
+#GRAPHITE_HOSTPORT=<%= @graphite_hostport %>
+#PORT=<%= @port %>
+#LOGS=<%= @logs.join(',') %>
+
+EXTRA_ARGS="-graphite_prefix <%= @graphite_prefix %> -graphite_host_port <%= 
@graphite_hostport %> -logs <%= @logs.join(',') %> -port <%= @port %> "
diff --git a/modules/mtail/templates/initscripts/mtail.systemd.erb 
b/modules/mtail/templates/initscripts/mtail.systemd.erb
new file mode 100644
index 000..2a7d3aa
--- /dev/null
+++ b/modules/mtail/templates/initscripts/mtail.systemd.erb
@@ -0,0 +1,9 @@
+[Unit]
+Description=Extract monitoring data from logs for collection in a timeseries 
database
+
+[Service]
+User=mtail
+Group=root
+EnvironmentFile=-/etc/default/mtail
+ExecStart=/usr/bin/mtail -progs /etc/mtail -logtostderr $EXTRA_ARGS
+Restart=on-failure

-- 
To view, visit https://gerrit.wikimedia.org/r/319138
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4cacc9d95dbf94ff3288408ef5b67138908e6709
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...rainbow[master]: Fixes error & adds KPI links to MM table

2016-11-01 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319139

Change subject: Fixes error & adds KPI links to MM table
..

Fixes error & adds KPI links to MM table

- For some reason, Sys.Date()-1-months(1) stopped working,
  possibly due to an update to lubridate. In any case,
  this update fixes the issue.
- Also makes the KPIs in the monthly metrics table clickable
  so that one can easily navigate to a KPI's time series

Bug: T149735
Change-Id: I68a4ad7ceb90c9388c7eee61fde90a04b6b8680e
---
M server.R
M tab_documentation/kpi_augmented_clickthroughs.md
M tab_documentation/kpi_load_time.md
M ui.R
4 files changed, 41 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/39/319139/1

diff --git a/server.R b/server.R
index 127b429..2267d0a 100644
--- a/server.R
+++ b/server.R
@@ -596,7 +596,8 @@
drawPoints = FALSE, pointSize = 3, labelsKMB = TRUE,
includeZero = TRUE) %>%
  dyCSS(css = system.file("custom.css", package = "polloi")) %>%
- dyRangeSelector)
+ dyRangeSelector %>%
+ dyEvent(as.Date("2016-07-12"), "A (schema switch)", labelLoc = 
"bottom"))
   })
   output$kpi_zero_results_series <- renderDygraph({
 smooth_level <- input$smoothing_kpi_zero_results
@@ -717,11 +718,12 @@
   dySeries(name = colnames(smoothed_data)[3], strokeWidth = 1.5, 
strokePattern = "dashed") %>%
   dyLegend(labelsDiv = "kpi_augmented_clickthroughs_series_legend") %>%
   dyRangeSelector(fillColor = "", strokeColor = "") %>%
-  dyEvent(as.Date("2016-03-16"), "Completion Suggester Deployed", labelLoc 
= "bottom")
+  dyEvent(as.Date("2016-03-16"), "Completion Suggester Deployed", labelLoc 
= "bottom") %>%
+  dyEvent(as.Date("2016-07-12"), "A (schema switch)", labelLoc = "bottom")
   })
 
   ## Monthly metrics
-  output$monthly_metrics_tbl <- renderTable({
+  output$monthly_metrics_tbl <- renderUI({
 temp <- data.frame(
   KPI = c("Load time", "Zero results rate", "API Usage", "User 
engagement"),
   Units = c("ms", "%", "", "%")
@@ -753,7 +755,6 @@
   polloi::smoother("month", rename = FALSE)
 smoothed_engagement <- augmented_clickthroughs[, c("date", 
"user_engagement")] %>%
   polloi::smoother("month", rename = FALSE)
-
 temp$Current <- c(
   smoothed_load_times$Median[smoothed_load_times$date == prev_month],
   smoothed_zrr$rate[smoothed_zrr$date == prev_month],
@@ -772,6 +773,7 @@
   ifelse(sum(smoothed_api$date == prev_year) == 0, NA, 
smoothed_api$total[smoothed_api$date == prev_year]),
   ifelse(sum(smoothed_engagement$date == prev_year) == 0, NA, 
smoothed_engagement$user_engagement[smoothed_engagement$date == prev_year])
 )
+temp$Anchors <- c("kpi_load_time", "kpi_zero_results", "kpi_api_usage", 
"kpi_augmented_clickthroughs")
 
 # Compute month-over-month changes:
 temp$MoM <- c(
@@ -790,19 +792,32 @@
 # API Usage units (K/M/B/T):
 temp[3, c("Current", "Previous_month", "Previous_year")] <- 
polloi::compress(as.numeric(temp[3, c("Current", "Previous_month", 
"Previous_year")]))
 # Rename columns to use month & year:
-names(temp) <- c("KPI", "Units", as.character(prev_month, "%B %Y"), 
as.character(prev_prev_month, "%B %Y"), as.character(prev_year, "%B %Y"), 
"MoM", "YoY")
+names(temp) <- c("KPI", "Units", as.character(prev_month, "%B %Y"), 
as.character(prev_prev_month, "%B %Y"), as.character(prev_year, "%B %Y"), 
"Anchors", "MoM", "YoY")
 # Sanitize:
 temp[temp == "NA%" | temp == "NANA%" | temp == "NANA"] <- "--"
-rownames(temp) <- temp$KPI
-cols_to_keep <- c(5, 4, 3, 6, 7)
+temp$KPI <- paste0('', temp$KPI, '')
+cols_to_keep <- c(1, 5, 4, 3, 7, 8)
 if (!input$monthly_metrics_prev_month) {
   cols_to_keep <- base::setdiff(cols_to_keep, 4)
 }
 if (!input$monthly_metrics_prev_year) {
   cols_to_keep <- base::setdiff(cols_to_keep, 5)
 }
-temp[, cols_to_keep]
-  }, rownames = TRUE, striped = TRUE)
+return(HTML(
+  knitr::kable(temp[, cols_to_keep], format = "html", table.attr = 
"class=\"table table-striped spacing-s\"", escape = FALSE),
+  "
+  
+  // Enables clicking on a kpi in the monthly metrics table:
+  $('a[id^=mm_kpi_]').click(function(){
+var target = $(this).attr('id').replace('mm_', '');
+$('a[data-value=\"'+target+'\"]').click();
+  });
+  // Visual feedback that the kpi in the monthly metrics table is 
clickable:
+  $('a[id^=mm_kpi_]').hover(function() {
+$(this).css('cursor','pointer');
+  });"
+))
+  })
 
   # Check datasets for missing data and notify user which datasets are missing 
data (if any)
   output$message_menu <- renderMenu({
diff --git a/tab_documentation/kpi_augmented_clickthroughs.md 

[MediaWiki-commits] [Gerrit] wikimedia...rainbow[master]: Fixes error & adds KPI links to MM table

2016-11-01 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Fixes error & adds KPI links to MM table
..


Fixes error & adds KPI links to MM table

- For some reason, Sys.Date()-1-months(1) stopped working,
  possibly due to an update to lubridate. In any case,
  this update fixes the issue.
- Also makes the KPIs in the monthly metrics table clickable
  so that one can easily navigate to a KPI's time series

Bug: T149735
Change-Id: I68a4ad7ceb90c9388c7eee61fde90a04b6b8680e
---
M server.R
M tab_documentation/kpi_augmented_clickthroughs.md
M tab_documentation/kpi_load_time.md
M ui.R
4 files changed, 41 insertions(+), 19 deletions(-)

Approvals:
  Bearloga: Verified; Looks good to me, approved



diff --git a/server.R b/server.R
index 127b429..2267d0a 100644
--- a/server.R
+++ b/server.R
@@ -596,7 +596,8 @@
drawPoints = FALSE, pointSize = 3, labelsKMB = TRUE,
includeZero = TRUE) %>%
  dyCSS(css = system.file("custom.css", package = "polloi")) %>%
- dyRangeSelector)
+ dyRangeSelector %>%
+ dyEvent(as.Date("2016-07-12"), "A (schema switch)", labelLoc = 
"bottom"))
   })
   output$kpi_zero_results_series <- renderDygraph({
 smooth_level <- input$smoothing_kpi_zero_results
@@ -717,11 +718,12 @@
   dySeries(name = colnames(smoothed_data)[3], strokeWidth = 1.5, 
strokePattern = "dashed") %>%
   dyLegend(labelsDiv = "kpi_augmented_clickthroughs_series_legend") %>%
   dyRangeSelector(fillColor = "", strokeColor = "") %>%
-  dyEvent(as.Date("2016-03-16"), "Completion Suggester Deployed", labelLoc 
= "bottom")
+  dyEvent(as.Date("2016-03-16"), "Completion Suggester Deployed", labelLoc 
= "bottom") %>%
+  dyEvent(as.Date("2016-07-12"), "A (schema switch)", labelLoc = "bottom")
   })
 
   ## Monthly metrics
-  output$monthly_metrics_tbl <- renderTable({
+  output$monthly_metrics_tbl <- renderUI({
 temp <- data.frame(
   KPI = c("Load time", "Zero results rate", "API Usage", "User 
engagement"),
   Units = c("ms", "%", "", "%")
@@ -753,7 +755,6 @@
   polloi::smoother("month", rename = FALSE)
 smoothed_engagement <- augmented_clickthroughs[, c("date", 
"user_engagement")] %>%
   polloi::smoother("month", rename = FALSE)
-
 temp$Current <- c(
   smoothed_load_times$Median[smoothed_load_times$date == prev_month],
   smoothed_zrr$rate[smoothed_zrr$date == prev_month],
@@ -772,6 +773,7 @@
   ifelse(sum(smoothed_api$date == prev_year) == 0, NA, 
smoothed_api$total[smoothed_api$date == prev_year]),
   ifelse(sum(smoothed_engagement$date == prev_year) == 0, NA, 
smoothed_engagement$user_engagement[smoothed_engagement$date == prev_year])
 )
+temp$Anchors <- c("kpi_load_time", "kpi_zero_results", "kpi_api_usage", 
"kpi_augmented_clickthroughs")
 
 # Compute month-over-month changes:
 temp$MoM <- c(
@@ -790,19 +792,32 @@
 # API Usage units (K/M/B/T):
 temp[3, c("Current", "Previous_month", "Previous_year")] <- 
polloi::compress(as.numeric(temp[3, c("Current", "Previous_month", 
"Previous_year")]))
 # Rename columns to use month & year:
-names(temp) <- c("KPI", "Units", as.character(prev_month, "%B %Y"), 
as.character(prev_prev_month, "%B %Y"), as.character(prev_year, "%B %Y"), 
"MoM", "YoY")
+names(temp) <- c("KPI", "Units", as.character(prev_month, "%B %Y"), 
as.character(prev_prev_month, "%B %Y"), as.character(prev_year, "%B %Y"), 
"Anchors", "MoM", "YoY")
 # Sanitize:
 temp[temp == "NA%" | temp == "NANA%" | temp == "NANA"] <- "--"
-rownames(temp) <- temp$KPI
-cols_to_keep <- c(5, 4, 3, 6, 7)
+temp$KPI <- paste0('', temp$KPI, '')
+cols_to_keep <- c(1, 5, 4, 3, 7, 8)
 if (!input$monthly_metrics_prev_month) {
   cols_to_keep <- base::setdiff(cols_to_keep, 4)
 }
 if (!input$monthly_metrics_prev_year) {
   cols_to_keep <- base::setdiff(cols_to_keep, 5)
 }
-temp[, cols_to_keep]
-  }, rownames = TRUE, striped = TRUE)
+return(HTML(
+  knitr::kable(temp[, cols_to_keep], format = "html", table.attr = 
"class=\"table table-striped spacing-s\"", escape = FALSE),
+  "
+  
+  // Enables clicking on a kpi in the monthly metrics table:
+  $('a[id^=mm_kpi_]').click(function(){
+var target = $(this).attr('id').replace('mm_', '');
+$('a[data-value=\"'+target+'\"]').click();
+  });
+  // Visual feedback that the kpi in the monthly metrics table is 
clickable:
+  $('a[id^=mm_kpi_]').hover(function() {
+$(this).css('cursor','pointer');
+  });"
+))
+  })
 
   # Check datasets for missing data and notify user which datasets are missing 
data (if any)
   output$message_menu <- renderMenu({
diff --git a/tab_documentation/kpi_augmented_clickthroughs.md 
b/tab_documentation/kpi_augmented_clickthroughs.md
index f92acee..c261e31 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't parse

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't parse 
..


Don't parse 

Which means we can't check if a parser limit was exceeded while trying
to expand the content of a tag, but that's probably not a huge loss.
It'll just result in potentially strange output rather than an exception.

Bug: T149622
Change-Id: I7910dfa0f61b1cc9168c7ed1498b2bda27c47f0e
---
M includes/parser/Parser.php
M tests/parser/parserTests.txt
2 files changed, 12 insertions(+), 4 deletions(-)

Approvals:
  Anomie: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 669e9fc1..27c9535 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3801,11 +3801,10 @@
return $attrText;
}
 
+   // We can't safely check if the expansion for $content resulted 
in an
+   // error, because the content could happen to be the error 
string
+   // (T149622).
$content = !isset( $params['inner'] ) ? null : $frame->expand( 
$params['inner'] );
-   if ( substr( $content, 0, $errorLen ) === $errorStr ) {
-   // See above
-   return $content;
-   }
 
$marker = self::MARKER_PREFIX . "-$name-"
. sprintf( '%08X', $this->mMarkerIndex++ ) . 
self::MARKER_SUFFIX;
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index ba7b0d4..103acc6 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -1421,6 +1421,15 @@
 !! end
 
 !! test
+Don't parse  (T149622)
+!! wikitext
+
+!! html/php
+span class="error"
+
+!! end
+
+!! test
 nowiki 3
 !! wikitext
 :There is not nowiki.

-- 
To view, visit https://gerrit.wikimedia.org/r/318985
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7910dfa0f61b1cc9168c7ed1498b2bda27c47f0e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
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...OAuth[master]: Remove unneeded backwards-compatibility code

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove unneeded backwards-compatibility code
..


Remove unneeded backwards-compatibility code

Since recent changes have dropped support for MW less than 1.28, we can
remove this backwards-compatibility code now.

* Remove support for MediaWiki without SessionManager.
* Remove the old OAuthGetUserNamesFromCentralIds,
  OAuthGetLocalUserFromCentralId, OAuthGetCentralIdFromLocalUser, and
  OAuthGetCentralIdFromUserName hooks that were replaced with
  CentralIdLookup.
* Remove the pre-1.23 i18n shim.

Change-Id: I622923f4581ae7724a655f8aab16fe4f7bfac2e8
---
M api/MWOAuthAPI.setup.php
M api/MWOAuthSessionProvider.php
M backend/MWOAuth.hooks.php
M backend/MWOAuthUtils.php
M extension.json
D frontend/language/MWOAuth.i18n.php
6 files changed, 26 insertions(+), 450 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/api/MWOAuthAPI.setup.php b/api/MWOAuthAPI.setup.php
index abc0c48..d71767c 100755
--- a/api/MWOAuthAPI.setup.php
+++ b/api/MWOAuthAPI.setup.php
@@ -9,289 +9,6 @@
const TTL_REFRESH_WINDOW = 600; // refresh if expiring in 10 minutes
 
/**
-* @todo: Remove all this when we drop support for MW core without 
SessionManager
-* @{
-*/
-
-   /**
-* Create the appropriate type of exception to throw, based on MW_API
-*
-* @param string $msgKey Key for the error message
-* Varargs: normal message parameters.
-* @return \UsageException|\ErrorPageError
-*/
-   private static function makeException( $msgKey /* ... */ ) {
-   $params = func_get_args();
-   array_shift( $params );
-   $msg = wfMessage( $msgKey, $params );
-   if ( defined( 'MW_API' ) ) {
-   $msg = $msg->inLanguage( 'en' )->useDatabase( false 
)->plain();
-   return new \UsageException( $msg, $msgKey );
-   } else {
-   return new \ErrorPageError( 
'mwoauth-invalid-authorization-title', $msg );
-   }
-   }
-
-   /**
-* Validate the OAuth headers and fetch the access token
-*
-* @throws \UsageException if the headers are invalid and MW_API is 
defined
-* @throws \ErrorPageError if the headers are invalid and MW_API is not 
defined
-* @return OAuthToken|null
-*/
-   private static function getOAuthAccessToken() {
-   static $result = false;
-   if ( $result === false ) {
-   $context = \RequestContext::getMain();
-   $request = $context->getRequest();
-   if ( !MWOAuthUtils::hasOAuthHeaders( $request ) || 
!defined( 'MW_API' ) ) {
-   $result = null;
-   } else {
-   try {
-   $server = 
MWOAuthUtils::newMWOAuthServer();
-   $oauthRequest = 
MWOAuthRequest::fromRequest( $request );
-   list( , $result ) = 
$server->verify_request( $oauthRequest );
-   } catch ( OAuthException $ex ) {
-   $result = $ex;
-   }
-   }
-   }
-
-   if ( $result instanceof OAuthException ) {
-   throw self::makeException( 
'mwoauth-invalid-authorization', $result->getMessage() );
-   }
-   return $result;
-   }
-
-   /**
-* User is being loaded from session data
-*
-* We need to validate the OAuth credentials, and tag this user object.
-*
-* @param \User $user
-* @param boolean|null &$result Set to a boolean to skip the normal 
loading
-* @throws \MWException
-* @return boolean
-*/
-   public static function onUserLoadFromSession( \User $user, &$result ) {
-   global $wgBlockDisablesLogin, $wgObjectCacheSessionExpiry;
-
-   $user->oAuthSessionData = [];
-   try {
-   $accesstoken = self::getOAuthAccessToken();
-   if ( $accesstoken !== null ) {
-   $wiki = wfWikiID();
-   $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE );
-
-   // Access token is for this wiki
-   $access = 
MWOAuthConsumerAcceptance::newFromToken( $dbr, $accesstoken->key );
-   if ( $access->get( 'wiki' ) !== '*' && 
$access->get( 'wiki' ) !== $wiki ) {
-   throw self::makeException( 
'mwoauth-invalid-authorization-wrong-wiki', $wiki );
-   }

[MediaWiki-commits] [Gerrit] operations/puppet[production]: mtail: introduce systemd unit

2016-11-01 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319138

Change subject: mtail: introduce systemd unit
..

mtail: introduce systemd unit

Allow mtail to ran as mtail:root. mtail requires being able to read log files
in /srv/syslog (duh!) and therefore either running as user root or group root.
The former is unnecessary for obvious reasons, and the latter isn't
straightforward without changing the sysv init script shipped with mtail.

Bug: T147923
Change-Id: I4cacc9d95dbf94ff3288408ef5b67138908e6709
---
M modules/mtail/manifests/init.pp
M modules/mtail/templates/default.erb
A modules/mtail/templates/initscripts/mtail.systemd.erb
3 files changed, 19 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/319138/1

diff --git a/modules/mtail/manifests/init.pp b/modules/mtail/manifests/init.pp
index 71e7c57..4c2e287 100644
--- a/modules/mtail/manifests/init.pp
+++ b/modules/mtail/manifests/init.pp
@@ -39,7 +39,8 @@
 notify  => Service['mtail'],
 }
 
-service { 'mtail':
-ensure => running,
+base::service_unit { 'mtail':
+ensure  => present,
+systemd => true
 }
 }
diff --git a/modules/mtail/templates/default.erb 
b/modules/mtail/templates/default.erb
index 1fa4b31..0dae7fb 100644
--- a/modules/mtail/templates/default.erb
+++ b/modules/mtail/templates/default.erb
@@ -1,5 +1,7 @@
-ENABLED=<%= @enabled %>
-GRAPHITE_HOSTPORT=<%= @graphite_hostport %>
-PORT=<%= @port %>
-LOGS=<%= @logs.join(',') %>
-EXTRA_ARGS="-graphite_prefix <%= @graphite_prefix %>"
+# Arguments used by SysV init script, systemd service file uses only EXTRA_ARGS
+#ENABLED=<%= @enabled %>
+#GRAPHITE_HOSTPORT=<%= @graphite_hostport %>
+#PORT=<%= @port %>
+#LOGS=<%= @logs.join(',') %>
+
+EXTRA_ARGS="-graphite_prefix <%= @graphite_prefix %> -graphite_host_port <%= 
@graphite_hostport %> -logs <%= @logs.join(',') %> -port <%= @port %> "
diff --git a/modules/mtail/templates/initscripts/mtail.systemd.erb 
b/modules/mtail/templates/initscripts/mtail.systemd.erb
new file mode 100644
index 000..2a7d3aa
--- /dev/null
+++ b/modules/mtail/templates/initscripts/mtail.systemd.erb
@@ -0,0 +1,9 @@
+[Unit]
+Description=Extract monitoring data from logs for collection in a timeseries 
database
+
+[Service]
+User=mtail
+Group=root
+EnvironmentFile=-/etc/default/mtail
+ExecStart=/usr/bin/mtail -progs /etc/mtail -logtostderr $EXTRA_ARGS
+Restart=on-failure

-- 
To view, visit https://gerrit.wikimedia.org/r/319138
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cacc9d95dbf94ff3288408ef5b67138908e6709
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations...adminbot[master]: Use page.text() instead of deprecated page.edit()

2016-11-01 Thread MtDu (Code Review)
MtDu has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319137

Change subject: Use page.text() instead of deprecated page.edit()
..

Use page.text() instead of deprecated page.edit()

Bug: T124852
Change-Id: I9560ccb27f8b32e662c2c8c02a56238b31359fb7
---
M adminlog.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/adminbot 
refs/changes/37/319137/1

diff --git a/adminlog.py b/adminlog.py
index d543092..04793df 100644
--- a/adminlog.py
+++ b/adminlog.py
@@ -24,7 +24,7 @@
 if page.redirect:
 page = next(page.links())
 
-text = page.edit()
+text = page.text()
 lines = text.split('\n')
 position = 0
 # Um, check the date

-- 
To view, visit https://gerrit.wikimedia.org/r/319137
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9560ccb27f8b32e662c2c8c02a56238b31359fb7
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/adminbot
Gerrit-Branch: master
Gerrit-Owner: MtDu 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Don't override message key in badpass log entries

2016-11-01 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319134

Change subject: Don't override message key in badpass log entries
..

Don't override message key in badpass log entries

This causes the log message to be the i18n message
which is not what is wanted.

Change-Id: I2d3bf9849186ae3191c49fd05e8d6b4cc65f5972
---
M wmf-config/CommonSettings.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/34/319134/1

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 57d844c..bd2b9df 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1511,13 +1511,13 @@
$headers = apache_request_headers();
 
$logger = LoggerFactory::getInstance( 'badpass' );
-   $logger->info( 'Login failed for sysop {name} from {ip} - {xff} 
- {ua}: {message}', [
+   $logger->info( 'Login failed for sysop {name} from {ip} - {xff} 
- {ua}: {messagestr}', [
'name' => $user->getName(),
'ip' => $wgRequest->getIP(),
'xff' => @$headers['X-Forwarded-For'],
'ua' => @$headers['User-Agent'],
'guessed' => $guessed,
-   'message' => $response->message->toString(),
+   'messagestr' => $response->message->toString(),
] );
}
 };

-- 
To view, visit https://gerrit.wikimedia.org/r/319134
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d3bf9849186ae3191c49fd05e8d6b4cc65f5972
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: Run purgeList maintenance script from /srv/mediawiki-staging

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Run purgeList maintenance script from /srv/mediawiki-staging
..


Run purgeList maintenance script from /srv/mediawiki-staging

When configuration is altered in such a way to use former configuration could
lead to notices and warnings, /srv/mediawiki on the deployment server isn't
the optimal environment to run a maintenance script, as it will raise such
notices or warnings.

Yet, it's here convenient to run only one operation instead to need to login
to Terbium to run the purge script.

We so call it directly from /srv/mediawiki-staging, which is by definition
up to date.

Change-Id: Id3b1df08c2bb4546fafd5b6771de857ccbe703a8
---
M sync-portals
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Jdrewniak: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/sync-portals b/sync-portals
index c12e55d..35dbaa6 100755
--- a/sync-portals
+++ b/sync-portals
@@ -5,5 +5,9 @@
 scap sync-dir portals/prod/wikipedia.org/assets $*
 scap sync-dir portals $*
 
+# purgeList is called from from /srv/mediawiki-staging and not /srv/mediawiki
+# to get an up-to-date version of the code and the config. That avoids any
+# notice or error when there are config changes.
+export MEDIAWIKI_STAGING_DIR=/srv/mediawiki-staging
 cat /srv/mediawiki-staging/portals/urls-to-purge.txt | mwscript purgeList.php
 

-- 
To view, visit https://gerrit.wikimedia.org/r/319076
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3b1df08c2bb4546fafd5b6771de857ccbe703a8
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/portals
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Jdrewniak 
Gerrit-Reviewer: Reedy 
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...MobileFrontend[master]: Hygiene: Make use of makeSectionHtml helper

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Make use of makeSectionHtml helper
..


Hygiene: Make use of makeSectionHtml helper

Preparation for changes to section html markup.

Additional changes:
* Helper now contains a flag for adding the reference section
marker

Change-Id: I0bac45a1e3cf8afecb59e157abd717cb4780dfdd
---
M tests/phpunit/MobileFormatterTest.php
1 file changed, 59 insertions(+), 73 deletions(-)

Approvals:
  Bmansurov: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/MobileFormatterTest.php 
b/tests/phpunit/MobileFormatterTest.php
index 2f4825f..db443d7 100644
--- a/tests/phpunit/MobileFormatterTest.php
+++ b/tests/phpunit/MobileFormatterTest.php
@@ -26,10 +26,12 @@
 *
 * @param string $sectionNumber
 * @param string $contentHtml
+* @param boolean $isReferenceSection whether the section contains 
references
 * @return string
 */
-   private function makeSectionHtml( $sectionNumber, $contentHtml='' ) {
-   return "$contentHtml";
+   private function makeSectionHtml( $sectionNumber, $contentHtml='', 
$isReferenceSection=false ) {
+   $attrs = $isReferenceSection ? ' data-is-reference-section="1"' 
: '';
+   return "$contentHtml";
}
 
/**
@@ -105,8 +107,7 @@
wfMessage( 'mobile-frontend-references-list' )
);
$refSectionHtml = $this->makeSectionHeading( 'h2', 'references' 
)
-   . ''
-   . $refplaceholder . '';
+   . $this->makeSectionHtml( 1, $refplaceholder, true );
 
return [
// # Lazy loading images
@@ -121,12 +122,11 @@
[
'' . $originalImage . 'heading 
1text'
. 'heading 2abc',
-   '' . 
$originalImage . ''
+   $this->makeSectionHtml( 0, '' . 
$originalImage . '' )
. $this->makeSectionHeading( 'h2', 
'heading 1' )
-   . 'text'
-   . ''
+   . $this->makeSectionHtml( 1, 
'text' )
. $this->makeSectionHeading( 'h2', 
'heading 2' )
-   . 'abc',
+   . $this->makeSectionHtml( 2, 'abc' ),
$enableSections,
false, false, true,
],
@@ -134,14 +134,13 @@
[
'textheading 1text' . 
$originalImage
. 'heading 2abc',
-   'text'
+   $this->makeSectionHtml( 0, 
'text' )
. $this->makeSectionHeading( 'h2', 
'heading 1' )
-   . 'text'
-   . $noscript
-   . $placeholder
-   . ''
+   . $this->makeSectionHtml( 1,
+   'text' . $noscript . 
$placeholder
+   )
. $this->makeSectionHeading( 'h2', 
'heading 2' )
-   . 'abc',
+   . $this->makeSectionHtml( 2, 'abc' ),
$enableSections,
false, false, true,
],
@@ -149,14 +148,13 @@
[
'textheading 1text' . 
$imageStyles
. 'heading 2abc',
-   'text'
+   $this->makeSectionHtml( 0, 'text' )
. $this->makeSectionHeading( 'h2', 
'heading 1' )
-   . 'text'
-   . $noscriptStyles
-   . $placeholderStyles
-   . ''
+   . $this->makeSectionHtml( 1,
+   'text' . $noscriptStyles 
. $placeholderStyles
+   )
. $this->makeSectionHeading( 'h2', 
'heading 2' )
-   . 'abc',
+   . $this->makeSectionHtml( 2, 'abc' ),
$enableSections,
false, false, 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Wikitech: Switching from using SemanticForms to PageForms ex...

2016-11-01 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319131

Change subject: Wikitech: Switching from using SemanticForms to PageForms 
extension
..

Switch Wikimedia's usage from SemanticForms to PageForms

As of today 01/11/16 SemanticForms is discontinued, will no longer recive 
updates or support.

The extension was renamed to PageForms since it no longer depends on 
SemanticMediaWiki but still supports SemanticMediaWiki.

Change-Id: I2dc62f7751d49b897d4ded3bef6fc43db919da5d
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/31/319131/1


-- 
To view, visit https://gerrit.wikimedia.org/r/319131
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dc62f7751d49b897d4ded3bef6fc43db919da5d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add RandomSummaryClientTest

2016-11-01 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319132

Change subject: Add RandomSummaryClientTest
..

Add RandomSummaryClientTest

Bug: T148897
Change-Id: If6c5dcedb8103685b4ace9a1e9d9c473135f35fc
---
M app/src/main/java/org/wikipedia/feed/random/RandomCardView.java
M app/src/main/java/org/wikipedia/random/RandomSummaryClient.java
A app/src/test/java/org/wikipedia/random/RandomSummaryClientTest.java
A app/src/test/res/raw/rb_page_summary_malformed.json
A app/src/test/res/raw/rb_page_summary_valid.json
5 files changed, 115 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/32/319132/1

diff --git a/app/src/main/java/org/wikipedia/feed/random/RandomCardView.java 
b/app/src/main/java/org/wikipedia/feed/random/RandomCardView.java
index 0214130..c9ea810 100644
--- a/app/src/main/java/org/wikipedia/feed/random/RandomCardView.java
+++ b/app/src/main/java/org/wikipedia/feed/random/RandomCardView.java
@@ -38,7 +38,7 @@
 @Override
 public void onClick(View view) {
 if (getCallback() != null && getCard() != null) {
-new RandomSummaryClient(getCard().wikiSite(), 
serviceCallback).request();
+new RandomSummaryClient().request(getCard().wikiSite(), 
serviceCallback);
 }
 }
 
diff --git a/app/src/main/java/org/wikipedia/random/RandomSummaryClient.java 
b/app/src/main/java/org/wikipedia/random/RandomSummaryClient.java
index 3aa6d90..26017ff 100644
--- a/app/src/main/java/org/wikipedia/random/RandomSummaryClient.java
+++ b/app/src/main/java/org/wikipedia/random/RandomSummaryClient.java
@@ -2,6 +2,7 @@
 
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
+import android.support.annotation.VisibleForTesting;
 
 import org.wikipedia.WikipediaApp;
 import org.wikipedia.dataclient.WikiSite;
@@ -9,7 +10,6 @@
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.server.restbase.RbPageSummary;
 import org.wikipedia.util.log.L;
-import org.wikipedia.zero.WikipediaZeroHandler;
 
 import java.io.IOException;
 
@@ -20,18 +20,15 @@
 public class RandomSummaryClient {
 @NonNull private final RbCachedService cachedService
 = new RbCachedService<>(Service.class);
-@NonNull private final WikipediaZeroHandler responseHeaderHandler;
-@NonNull private WikiSite wiki;
-@NonNull private Callback cb;
 
-public RandomSummaryClient(@NonNull WikiSite wiki, @NonNull Callback cb) {
-this.responseHeaderHandler = 
WikipediaApp.getInstance().getWikipediaZeroHandler();
-this.wiki = wiki;
-this.cb = cb;
+public Call request(@NonNull final WikiSite wiki, @NonNull 
final Callback cb) {
+return request(cachedService.service(wiki), wiki, cb);
 }
 
-public void request() {
-Call call = cachedService.service(wiki).get();
+@VisibleForTesting Call request(@NonNull Service service,
+   @NonNull final WikiSite 
wiki,
+   @NonNull final Callback cb) 
{
+Call call = service.get();
 call.enqueue(new retrofit2.Callback() {
 @Override
 public void onResponse(@NonNull Call call,
@@ -41,7 +38,7 @@
 cb.onSuccess(call, null);
 return;
 }
-responseHeaderHandler.onHeaderCheck(response);
+
WikipediaApp.getInstance().getWikipediaZeroHandler().onHeaderCheck(response);
 RbPageSummary item = response.body();
 PageTitle title = new PageTitle(null, item.getTitle(), 
wiki);
 cb.onSuccess(call, title);
@@ -57,9 +54,10 @@
 cb.onError(call, t);
 }
 });
+return call;
 }
 
-private interface Service {
+@VisibleForTesting interface Service {
 @GET("page/random/summary")
 @NonNull Call get();
 }
diff --git 
a/app/src/test/java/org/wikipedia/random/RandomSummaryClientTest.java 
b/app/src/test/java/org/wikipedia/random/RandomSummaryClientTest.java
new file mode 100644
index 000..b1d9723
--- /dev/null
+++ b/app/src/test/java/org/wikipedia/random/RandomSummaryClientTest.java
@@ -0,0 +1,79 @@
+package org.wikipedia.random;
+
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+
+import org.junit.Test;
+import org.wikipedia.dataclient.WikiSite;
+import org.wikipedia.page.PageTitle;
+import org.wikipedia.random.RandomSummaryClient.Callback;
+import org.wikipedia.random.RandomSummaryClient.Service;
+import org.wikipedia.server.restbase.RbPageSummary;
+import org.wikipedia.test.MockWebServerTest;
+
+import retrofit2.Call;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: add mapped IPv6 address for eventlog1001

2016-11-01 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: add mapped IPv6 address for eventlog1001
..


add mapped IPv6 address for eventlog1001

This would be nice because then we can do things
like Ia611b075d18a91630fd and have rules for v4 and v6
without needing a special case for this host.

Because other hosts like deployment and maintenance already
have v6 but this does not.

Change-Id: I3f5d90a66d5f9c205d80f73f4dc15b99442512f1
---
M manifests/site.pp
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Ottomata: Looks good to me, but someone else must approve
  Filippo Giunchedi: Looks good to me, but someone else must approve
  Alexandros Kosiaris: Looks good to me, but someone else must approve
  Dzahn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/site.pp b/manifests/site.pp
index 3380dfa..ebf6c72 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1078,6 +1078,7 @@
 
 include standard
 include base::firewall
+interface::add_ip6_mapped { 'main': interface => 'eth0', }
 }
 
 # EventLogging Analytics does not (yet?) run in codfw.

-- 
To view, visit https://gerrit.wikimedia.org/r/317192
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f5d90a66d5f9c205d80f73f4dc15b99442512f1
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Ottomata 
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...MobileFrontend[master]: Hygiene: Tests should make use of helpers

2016-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Tests should make use of helpers
..


Hygiene: Tests should make use of helpers

In preparation for altering the mark up of section headings, every
test case should make use of the common helper function. This
will allow making the change and adding a test case without
having to touch every single test.

Change-Id: I780977995c871452a3f6921a2f329a286c6ea136
---
M tests/phpunit/MobileFormatterTest.php
1 file changed, 49 insertions(+), 48 deletions(-)

Approvals:
  Bmansurov: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/MobileFormatterTest.php 
b/tests/phpunit/MobileFormatterTest.php
index 4c2c5f7..2f4825f 100644
--- a/tests/phpunit/MobileFormatterTest.php
+++ b/tests/phpunit/MobileFormatterTest.php
@@ -13,12 +13,12 @@
 * Helper function that creates section headings from a heading and 
title
 *
 * @param string $heading
-* @param string $title
+* @param string $innerHtml of the heading element
 * @return string
 */
-   private function makeSectionHeading( $heading, $title ) {
+   private function makeSectionHeading( $heading, $innerHtml ) {
return "<$heading class=\"section-heading\">" . 
self::SECTION_INDICATOR .
-   "$title";
+   "$innerHtml";
}
 
/**
@@ -104,8 +104,7 @@
],
wfMessage( 'mobile-frontend-references-list' )
);
-   $refSectionHtml = '' . 
self::SECTION_INDICATOR
-   . 'references'
+   $refSectionHtml = $this->makeSectionHeading( 'h2', 'references' 
)
. ''
. $refplaceholder . '';
 
@@ -123,12 +122,11 @@
'' . $originalImage . 'heading 
1text'
. 'heading 2abc',
'' . 
$originalImage . ''
-   . '' . 
self::SECTION_INDICATOR
-   . 'heading 1'
+   . $this->makeSectionHeading( 'h2', 
'heading 1' )
. 'text'
. ''
-   . '' . 
self::SECTION_INDICATOR
-   . 'heading 2abc',
+   . $this->makeSectionHeading( 'h2', 
'heading 2' )
+   . 'abc',
$enableSections,
false, false, true,
],
@@ -137,14 +135,13 @@
'textheading 1text' . 
$originalImage
. 'heading 2abc',
'text'
-   . '' . 
self::SECTION_INDICATOR
-   . 'heading 1'
+   . $this->makeSectionHeading( 'h2', 
'heading 1' )
. 'text'
. $noscript
. $placeholder
. ''
-   . '' . 
self::SECTION_INDICATOR
-   . 'heading 2abc',
+   . $this->makeSectionHeading( 'h2', 
'heading 2' )
+   . 'abc',
$enableSections,
false, false, true,
],
@@ -153,14 +150,13 @@
'textheading 1text' . 
$imageStyles
. 'heading 2abc',
'text'
-   . '' . 
self::SECTION_INDICATOR
-   . 'heading 1'
+   . $this->makeSectionHeading( 'h2', 
'heading 1' )
. 'text'
. $noscriptStyles
. $placeholderStyles
. ''
-   . '' . 
self::SECTION_INDICATOR
-   . 'heading 2abc',
+   . $this->makeSectionHeading( 'h2', 
'heading 2' )
+   . 'abc',
$enableSections,
false, false, true,
],
@@ -169,12 +165,12 @@
'textheading 1text' . 
$originalImage
.'heading 2' . $originalImage,
 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Don't require Context in PageToolbarHideHandler.

2016-11-01 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319130

Change subject: Hygiene: Don't require Context in PageToolbarHideHandler.
..

Hygiene: Don't require Context in PageToolbarHideHandler.

Change-Id: Ia26e9092bcb948d0cd348d214f76ccfb0dea2a09
---
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
2 files changed, 6 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/30/319130/1

diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index 990b62b..d6f67f0 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -143,7 +143,7 @@
 getSupportActionBar().setTitle("");
 getSupportActionBar().setDisplayHomeAsUpEnabled(true);
 
-toolbarHideHandler = new PageToolbarHideHandler(this, 
toolbarContainerView);
+toolbarHideHandler = new PageToolbarHideHandler(toolbarContainerView);
 
 boolean languageChanged = false;
 if (savedInstanceState != null) {
diff --git a/app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java 
b/app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
index 7dd12c5..d1546ed 100644
--- a/app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
+++ b/app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
@@ -1,12 +1,10 @@
 package org.wikipedia.page;
 
-import android.content.Context;
-import android.content.res.Resources;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.LayerDrawable;
 import android.support.annotation.ColorInt;
-import android.support.annotation.ColorRes;
 import android.support.annotation.NonNull;
+import android.support.v4.content.ContextCompat;
 import android.view.Gravity;
 import android.view.View;
 
@@ -17,20 +15,19 @@
 public class PageToolbarHideHandler extends ViewHideHandler {
 private static final int FULL_OPACITY = 255;
 
-@NonNull private final Context context;
 private boolean fadeEnabled;
 private boolean forceNoFade;
 @NonNull private final Drawable toolbarBackground;
 private Drawable toolbarGradient;
 @NonNull private final Drawable statusBar;
 
-public PageToolbarHideHandler(@NonNull Context context, @NonNull View 
hideableView) {
+public PageToolbarHideHandler(@NonNull View hideableView) {
 super(hideableView, Gravity.TOP);
-this.context = context;
 
 LayerDrawable toolbarBackgroundLayers = (LayerDrawable) 
hideableView.getBackground();
 toolbarBackground = 
toolbarBackgroundLayers.findDrawableByLayerId(R.id.toolbar_background_solid).mutate();
-initToolbarGradient(toolbarBackgroundLayers);
+initToolbarGradient(toolbarBackgroundLayers,
+ContextCompat.getColor(hideableView.getContext(), 
R.color.lead_gradient_start));
 
 statusBar = 
hideableView.findViewById(R.id.empty_status_bar).getBackground().mutate();
 }
@@ -63,8 +60,7 @@
 statusBar.setAlpha(opacity);
 }
 
-private void initToolbarGradient(LayerDrawable toolbarBackgroundLayers) {
-@ColorInt int baseColor = getColor(R.color.lead_gradient_start);
+private void initToolbarGradient(LayerDrawable toolbarBackgroundLayers, 
@ColorInt int baseColor) {
 toolbarGradient = GradientUtil.getCubicGradient(baseColor, 
Gravity.TOP);
 
toolbarBackgroundLayers.setDrawableByLayerId(R.id.toolbar_background_gradient, 
toolbarGradient);
 }
@@ -79,13 +75,5 @@
 opacity = Math.max(0, opacity);
 opacity = Math.min(FULL_OPACITY, opacity);
 return opacity;
-}
-
-@ColorInt private int getColor(@ColorRes int id) {
-return getResources().getColor(id);
-}
-
-@NonNull private Resources getResources() {
-return context.getResources();
 }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/319130
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia26e9092bcb948d0cd348d214f76ccfb0dea2a09
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Refactor SnippetImage to be fully static.

2016-11-01 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319128

Change subject: Hygiene: Refactor SnippetImage to be fully static.
..

Hygiene: Refactor SnippetImage to be fully static.

...so that it doesn't need to keep references to Contexts or Bitmaps.
Also solidify the contracts required by its methods.

Change-Id: I184cd4556308acc7bb0b5f7de42ef6dfb85d0d91
---
M app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
M app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
2 files changed, 47 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/28/319128/1

diff --git a/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java 
b/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
index 2774cd6..95c0f18 100755
--- a/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
+++ b/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
@@ -9,7 +9,6 @@
 import android.support.annotation.IntegerRes;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
-import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
@@ -51,7 +50,6 @@
  * Let user choose between sharing as text or as image.
  */
 public class ShareHandler {
-public static final String TAG = "ShareHandler";
 private static final String PAYLOAD_PURPOSE_KEY = "purpose";
 private static final String PAYLOAD_PURPOSE_SHARE = "share";
 private static final String PAYLOAD_PURPOSE_DEFINE = "define";
@@ -104,7 +102,7 @@
 fragment.showBottomSheet(WiktionaryDialog.newInstance(title, text));
 }
 
-private void onSharePayload(String text) {
+private void onSharePayload(@NonNull String text) {
 if (funnel == null) {
 createFunnel();
 }
@@ -125,7 +123,7 @@
 }
 
 /** Call #setFunnel before #shareSnippet. */
-private void shareSnippet(CharSequence input) {
+private void shareSnippet(@NonNull CharSequence input) {
 final String selectedText = StringUtil.sanitizeText(input.toString());
 final PageTitle title = fragment.getTitle();
 
@@ -137,21 +135,19 @@
 public void onFinish(@NonNull Map result) 
{
 ImageLicense leadImageLicense = (ImageLicense) 
result.values().toArray()[0];
 
-final SnippetImage snippetImage = new 
SnippetImage(fragment.getContext(),
+final Bitmap snippetBitmap = 
SnippetImage.getSnippetImage(fragment.getContext(),
 fragment.getLeadImageBitmap(),
 title.getDisplayText(),
 fragment.getPage().isMainPage() ? "" : 
title.getDescription(),
 selectedText,
 leadImageLicense);
 
-final Bitmap snippetBitmap = snippetImage.drawBitmap();
-
 fragment.showBottomSheet(new PreviewDialog(fragment, 
snippetBitmap, title, selectedText, funnel));
 }
 
 @Override
 public void onCatch(Throwable caught) {
-Log.d(TAG, "Error fetching image license info for " + 
title.getDisplayText() + ": " + caught.getMessage(), caught);
+L.d("Error fetching image license info for " + 
title.getDisplayText() + ": " + caught.getMessage(), caught);
 }
 }).execute();
 }
diff --git a/app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java 
b/app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
index 2f99a09..e889a31 100644
--- a/app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
+++ b/app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
@@ -11,6 +11,9 @@
 import android.graphics.Typeface;
 import android.graphics.drawable.Drawable;
 import android.os.Build;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v4.content.ContextCompat;
 import android.text.Layout;
 import android.text.Spanned;
 import android.text.StaticLayout;
@@ -46,52 +49,38 @@
 private static final Typeface SERIF = Typeface.create("serif", 
Typeface.NORMAL);
 private static final int QUARTER = 4;
 
-private final Context context;
-private final Bitmap leadImageBitmap;
-private final String title;
-private final String description;
-private final CharSequence textSnippet;
-private boolean isArticleRTL;
-private ImageLicense license;
-
-public SnippetImage(Context context, Bitmap leadImageBitmap, String title, 
String description,
-CharSequence textSnippet, ImageLicense license) {
-this.context = context;
-this.leadImageBitmap = leadImageBitmap;
-this.title = title;
-this.description = description;
-this.textSnippet 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Use Ruby yaml lib to render node::service deployment vars

2016-11-01 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319129

Change subject: Use Ruby yaml lib to render node::service deployment vars
..

Use Ruby yaml lib to render node::service deployment vars

This allows for more complex structures to be represented
in the deployment vars hash.  I'd use this for evenstreams configuration,
which map topic names to eventstreams routes.

https://gerrit.wikimedia.org/r/#/c/317981 depends on this

Bug: T148779
Change-Id: Iccfbf4a0ca2d5d4b10d1f9ebb041c99c7306056d
---
M modules/service/templates/node/config-vars.yaml.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/319129/1

diff --git a/modules/service/templates/node/config-vars.yaml.erb 
b/modules/service/templates/node/config-vars.yaml.erb
index 847f2a9..a650d26 100644
--- a/modules/service/templates/node/config-vars.yaml.erb
+++ b/modules/service/templates/node/config-vars.yaml.erb
@@ -38,5 +38,5 @@
 restbase_uri: <%= cvars['restbase'] %>
 <%- unless @deployment_vars.empty? -%>
 # deployment variables
-<%= @deployment_vars.map { |k, v| "#{k}: #{v}" }.join("\n") %>
-<%- end -%>
+<% require 'yaml' %>
+<%= @deployment_vars.to_yaml.sub('---\n', '') %>

-- 
To view, visit https://gerrit.wikimedia.org/r/319129
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccfbf4a0ca2d5d4b10d1f9ebb041c99c7306056d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Don't keep Context where not necessary.

2016-11-01 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319126

Change subject: Hygiene: Don't keep Context where not necessary.
..

Hygiene: Don't keep Context where not necessary.

Change-Id: Id466149fd50d0ef8355a1a43504ac7e2d0632465
---
M app/src/main/java/org/wikipedia/WikipediaApp.java
M app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
M app/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java
3 files changed, 3 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/26/319126/1

diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index 3a19755..afc8854 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -176,7 +176,7 @@
 appLanguageState = new AppLanguageState(this);
 funnelManager = new FunnelManager(this);
 sessionFunnel = new SessionFunnel(this);
-editTokenStorage = new EditTokenStorage(this);
+editTokenStorage = new EditTokenStorage();
 database = new Database(this);
 
 enableWebViewDebugging();
diff --git 
a/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java 
b/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
index 3ca812e..b6b8caf 100644
--- a/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
+++ b/app/src/main/java/org/wikipedia/editing/token/EditTokenStorage.java
@@ -1,6 +1,5 @@
 package org.wikipedia.editing.token;
 
-import android.content.Context;
 import android.os.Looper;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -19,15 +18,13 @@
 private static final String DELIMITER = ";";
 
 private final Map tokenJar = new HashMap<>();
-private final Context context;
 
 public interface TokenRetrievedCallback {
 void onTokenRetrieved(String token);
 void onTokenFailed(Throwable caught);
 }
 
-public EditTokenStorage(Context context) {
-this.context = context;
+public EditTokenStorage() {
 List wikis = makeList(Prefs.getEditTokenWikis());
 for (String wiki : wikis) {
 tokenJar.put(wiki, Prefs.getEditTokenForWiki(wiki));
diff --git 
a/app/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java 
b/app/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java
index 16f12fd..4f53608 100644
--- 
a/app/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java
+++ 
b/app/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java
@@ -19,7 +19,6 @@
 import org.wikipedia.views.ViewUtil;
 
 public class GalleryThumbnailScrollView extends RecyclerView {
-@NonNull private final Context mContext;
 @NonNull private final Animation mPressAnimation;
 @NonNull private final Animation mReleaseAnimation;
 @Nullable private GalleryViewListener mListener;
@@ -34,7 +33,6 @@
 
 public GalleryThumbnailScrollView(@NonNull Context context, AttributeSet 
attrs, int defStyle) {
 super(context, attrs, defStyle);
-this.mContext = context;
 setLayoutManager(new LinearLayoutManager(context, 
LinearLayoutManager.HORIZONTAL, false));
 
 mPressAnimation = AnimationUtils.loadAnimation(context, 
R.anim.thumbnail_item_press);
@@ -107,7 +105,7 @@
 
 @Override
 public GalleryItemHolder onCreateViewHolder(ViewGroup parent, int pos) 
{
-View view = LayoutInflater.from(mContext)
+View view = LayoutInflater.from(parent.getContext())
 .inflate(R.layout.item_gallery_thumbnail, parent, false);
 return new GalleryItemHolder(view);
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/319126
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id466149fd50d0ef8355a1a43504ac7e2d0632465
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


  1   2   3   >