[MediaWiki-commits] [Gerrit] integration/config[master]: Whitelist ShoutWiki and Uncyclomedia email addresses

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392492 )

Change subject: Whitelist ShoutWiki and Uncyclomedia email addresses
..


Whitelist ShoutWiki and Uncyclomedia email addresses

Change-Id: Ifbb23ff58ec0833252103a242a3a876224352c9b
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e215313..4c3dce5 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -45,6 +45,8 @@
 - |
   (?x) ^(?!(
 .*?@wikimedia\.(org|de)
+| .*?@shoutwiki\.com
+| .*?@uncyclomedia\.co
 | 0freerunning@gmail\.com
 | 01tonythomas@gmail\.com
 | 6020peaks@gmail\.com
@@ -301,6 +303,8 @@
 
   email: _whitelist
- .*?@wikimedia\.(org|de)$
+   - .*?@shoutwiki\.com$
+   - .*?@uncyclomedia\.co$
 
   # WMF staff & contractors:
- ^aarcos\.wiki@gmail\.com$

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbb23ff58ec0833252103a242a3a876224352c9b
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
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] mediawiki...wikidiff2[master]: Revert "Add placeholder for title tags to the moved indicators"

2017-11-20 Thread WMDE-Fisch (Code Review)
Hello Legoktm, Tobias Gritschacher, Jkroll, jenkins-bot, MaxSem,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "Add placeholder for title tags to the moved indicators"
..

Revert "Add placeholder for title tags to the moved indicators"

See discussion in T180602

This reverts commit 3dcda7efdd35c64ee31db47767f325d0ad2073da.

Change-Id: I0dfc947a627bc90fc905870c87b65b347d02b7b5
---
M TableDiff.cpp
M Wikidiff2.h
M tests/001.phpt
M tests/007.phpt
4 files changed, 14 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/php/wikidiff2 
refs/changes/88/392588/1

diff --git a/TableDiff.cpp b/TableDiff.cpp
index 3914811..964f1c8 100644
--- a/TableDiff.cpp
+++ b/TableDiff.cpp
@@ -39,7 +39,7 @@
if (printLeft) {
result += "  ";
if(dstAnchor != "")
-   result += "";
+   result += "";
else
result += "−";
result += "\n";
@@ -56,7 +56,7 @@
if (printRight) {
result += "  ";
if(dstAnchor != "")
-   result += "";
+   result += "";
else
result += "+";
result += "\n";
diff --git a/Wikidiff2.h b/Wikidiff2.h
index 5ae1c76..909e084 100644
--- a/Wikidiff2.h
+++ b/Wikidiff2.h
@@ -16,7 +16,7 @@
 #include 
 #include 
 
-#define WIKIDIFF2_VERSION_STRING   "1.5.2"
+#define WIKIDIFF2_VERSION_STRING   "1.5.1"
 
 class Wikidiff2 {
public:
diff --git a/tests/001.phpt b/tests/001.phpt
index 96271bd..716d470 100644
--- a/tests/001.phpt
+++ b/tests/001.phpt
@@ -171,7 +171,7 @@
   a
 
 
-  
+  
   ---line---
   
 
@@ -205,7 +205,7 @@
 
 
   
-  
+  
   ---line---
 
 
@@ -237,12 +237,12 @@
   a
 
 
-  
+  
   --line1--
   
 
 
-  
+  
   --line2--
   
 
@@ -276,12 +276,12 @@
 
 
   
-  
+  
   --line1--
 
 
   
-  
+  
   --line2--
 
 
@@ -395,4 +395,4 @@
   
   
   
-
\ No newline at end of file
+
diff --git a/tests/007.phpt b/tests/007.phpt
index ecc8364..f37fe16 100644
--- a/tests/007.phpt
+++ b/tests/007.phpt
@@ -43,7 +43,7 @@
   
 
 
-  
+  
   Substance, 
in the truest and primary and 
most definite sense of the word, is that which is neither predicable of a 
subject nor present in a subject; for instance, the individual man or horse. 
But in a secondary sense those things are called substances within which, as 
species, the primary substances are included; also those which, as genera, 
include the species. For instance, the individual man is included in the 
species 'man', and the genus to which the species belongs is 'animal'; these, 
therefore—that is to say, the species 'man' and the genus 'animal,-are termed 
secondary substances.
   
 
@@ -65,7 +65,7 @@
 
 
   
-  
+  
   Everything 
except primary substances is either predicable of a primary substance or 
present in a primary substance. This becomes evident by reference to particular 
instances which occur. 'Animal' is predicated of the species 'man', therefore 
of the individual man, for if there were no individual man of whom it could be 
predicated, it could not be predicated of the species 'man' at all. Again, 
colour is present in body, therefore in individual bodies, for if there were no 
individual body in which it was present, it could not be present in body at 
all. Thus everything except primary substances is either predicated of primary 
substances, or is present in them, and if these last did not exist, it would be 
impossible for anything else to exist. Never underestimate lawns.
 
 
@@ -86,7 +86,7 @@
   
 
 
-  
+  
   Everything 
except primary substances is either predicable of a primary substance or 
present in a primary substance. This becomes evident by reference to particular 
instances which occur. 'Animal' is predicated of the species 'man', therefore 
of the individual man, for if there were no individual man of whom it could be 
predicated, it could not be predicated of the species 'man' at all. Again, 
colour is present in body, therefore in individual bodies, for if there were no 
individual body in which it was present, it could not be present in body at 
all. Thus everything except primary substances is either predicated of primary 
substances, or is present in them, and if these last did not exist, it would be 
impossible for anything else to exist.
   
 
@@ -109,6 +109,6 @@
 
 
   
-  
+  
   Substance, 
in the truest and most definite sense of the word, is that which is neither 
predicable of a subject nor present in a subject; for instance, the individual 
man or horse. But in a secondary sense those things are called substances 
within which, as species, the primary substances are included; also those 
which, as genera, include the species. For instance, the 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Increase weight for db1109, db1110

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392587 )

Change subject: db-eqiad.php: Increase weight for db1109, db1110
..


db-eqiad.php: Increase weight for db1109, db1110

Bug: T180700
Change-Id: I9c2d1c1e7c4f8fc174a650e9ef8768de726b6013
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 43cd70a..f60ab0a 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -154,8 +154,8 @@
'db1100' => 1,   # C2 3.6TB 512GB, old master, vslow
'db1104' => 300,  # B3 3.6TB 512GB, api
'db1106' => 500,  # D3 3.6TB 512GB
-   'db1109' => 100,  # D8 3.6TB 512GB
-   'db1110' => 100,  # C3 3.6TB 512GB
+   'db1109' => 300,  # D8 3.6TB 512GB
+   'db1110' => 300,  # C3 3.6TB 512GB
],
's6' => [
'db1061' => 0,   # C3 2.8TB 128GB, master

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c2d1c1e7c4f8fc174a650e9ef8768de726b6013
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Use http scheme for Wikidata entity URIs

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/390872 )

Change subject: Use http scheme for Wikidata entity URIs
..


Use http scheme for Wikidata entity URIs

Wikidata's API currently responds with `http` URIs for entities.
This patch reverts Wikidata related parts of cf84e4f616372289239e76fa0ac08896
which were causing some tests to fail.

Bug: T102315
Change-Id: I769dca0bb9e62c2c5695f344d2757ea3ad50f53a
---
M pywikibot/families/wikidata_family.py
M tests/wikibase_tests.py
2 files changed, 62 insertions(+), 62 deletions(-)

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



diff --git a/pywikibot/families/wikidata_family.py 
b/pywikibot/families/wikidata_family.py
index 7e8b47e..f59fb12 100644
--- a/pywikibot/families/wikidata_family.py
+++ b/pywikibot/families/wikidata_family.py
@@ -54,7 +54,7 @@
 
 def calendarmodel(self, code):
 """Default calendar model for WbTime datatype."""
-return 'https://www.wikidata.org/entity/Q1985727'
+return 'http://www.wikidata.org/entity/Q1985727'
 
 def shared_geo_shape_repository(self, code):
 """Return Wikimedia Commons as the repository for geo-shapes."""
@@ -73,38 +73,38 @@
 def globes(self, code):
 """Supported globes for Coordinate datatype."""
 return {
-'ariel': 'https://www.wikidata.org/entity/Q3343',
-'callisto': 'https://www.wikidata.org/entity/Q3134',
-'ceres': 'https://www.wikidata.org/entity/Q596',
-'deimos': 'https://www.wikidata.org/entity/Q7548',
-'dione': 'https://www.wikidata.org/entity/Q15040',
-'earth': 'https://www.wikidata.org/entity/Q2',
-'enceladus': 'https://www.wikidata.org/entity/Q3303',
-'eros': 'https://www.wikidata.org/entity/Q16711',
-'europa': 'https://www.wikidata.org/entity/Q3143',
-'ganymede': 'https://www.wikidata.org/entity/Q3169',
-'gaspra': 'https://www.wikidata.org/entity/Q158244',
-'hyperion': 'https://www.wikidata.org/entity/Q15037',
-'iapetus': 'https://www.wikidata.org/entity/Q17958',
-'io': 'https://www.wikidata.org/entity/Q3123',
-'jupiter': 'https://www.wikidata.org/entity/Q319',
-'lutetia': 'https://www.wikidata.org/entity/Q107556',
-'mars': 'https://www.wikidata.org/entity/Q111',
-'mercury': 'https://www.wikidata.org/entity/Q308',
-'mimas': 'https://www.wikidata.org/entity/Q15034',
-'miranda': 'https://www.wikidata.org/entity/Q3352',
-'moon': 'https://www.wikidata.org/entity/Q405',
-'oberon': 'https://www.wikidata.org/entity/Q3332',
-'phobos': 'https://www.wikidata.org/entity/Q7547',
-'phoebe': 'https://www.wikidata.org/entity/Q17975',
-'pluto': 'https://www.wikidata.org/entity/Q339',
-'rhea': 'https://www.wikidata.org/entity/Q15050',
-'steins': 'https://www.wikidata.org/entity/Q150249',
-'tethys': 'https://www.wikidata.org/entity/Q15047',
-'titan': 'https://www.wikidata.org/entity/Q2565',
-'titania': 'https://www.wikidata.org/entity/Q3322',
-'triton': 'https://www.wikidata.org/entity/Q3359',
-'umbriel': 'https://www.wikidata.org/entity/Q3338',
-'venus': 'https://www.wikidata.org/entity/Q313',
-'vesta': 'https://www.wikidata.org/entity/Q3030',
+'ariel': 'http://www.wikidata.org/entity/Q3343',
+'callisto': 'http://www.wikidata.org/entity/Q3134',
+'ceres': 'http://www.wikidata.org/entity/Q596',
+'deimos': 'http://www.wikidata.org/entity/Q7548',
+'dione': 'http://www.wikidata.org/entity/Q15040',
+'earth': 'http://www.wikidata.org/entity/Q2',
+'enceladus': 'http://www.wikidata.org/entity/Q3303',
+'eros': 'http://www.wikidata.org/entity/Q16711',
+'europa': 'http://www.wikidata.org/entity/Q3143',
+'ganymede': 'http://www.wikidata.org/entity/Q3169',
+'gaspra': 'http://www.wikidata.org/entity/Q158244',
+'hyperion': 'http://www.wikidata.org/entity/Q15037',
+'iapetus': 'http://www.wikidata.org/entity/Q17958',
+'io': 'http://www.wikidata.org/entity/Q3123',
+'jupiter': 'http://www.wikidata.org/entity/Q319',
+'lutetia': 'http://www.wikidata.org/entity/Q107556',
+'mars': 'http://www.wikidata.org/entity/Q111',
+'mercury': 'http://www.wikidata.org/entity/Q308',
+'mimas': 'http://www.wikidata.org/entity/Q15034',
+'miranda': 'http://www.wikidata.org/entity/Q3352',
+'moon': 'http://www.wikidata.org/entity/Q405',
+'oberon': 'http://www.wikidata.org/entity/Q3332',
+'phobos': 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Increase weight for db1109, db1110

2017-11-20 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392587 )

Change subject: db-eqiad.php: Increase weight for db1109, db1110
..

db-eqiad.php: Increase weight for db1109, db1110

Bug: T180700
Change-Id: I9c2d1c1e7c4f8fc174a650e9ef8768de726b6013
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 43cd70a..f60ab0a 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -154,8 +154,8 @@
'db1100' => 1,   # C2 3.6TB 512GB, old master, vslow
'db1104' => 300,  # B3 3.6TB 512GB, api
'db1106' => 500,  # D3 3.6TB 512GB
-   'db1109' => 100,  # D8 3.6TB 512GB
-   'db1110' => 100,  # C3 3.6TB 512GB
+   'db1109' => 300,  # D8 3.6TB 512GB
+   'db1110' => 300,  # C3 3.6TB 512GB
],
's6' => [
'db1061' => 0,   # C3 2.8TB 128GB, master

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Update colors of betafeatures icons

2017-11-20 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392586 )

Change subject: Update colors of betafeatures icons
..

Update colors of betafeatures icons

* Light gray - Base80

Old: https://phabricator.wikimedia.org/F10913160
New: https://phabricator.wikimedia.org/F10913161

Bug: T180427
Change-Id: I1dc546a0df52ce9b0885d92b29a7c638ef618025
---
M images/betafeature-flow-ltr.svg
M images/betafeature-flow-rtl.svg
2 files changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/86/392586/1

diff --git a/images/betafeature-flow-ltr.svg b/images/betafeature-flow-ltr.svg
index 49870c7..da2d3d6 100644
--- a/images/betafeature-flow-ltr.svg
+++ b/images/betafeature-flow-ltr.svg
@@ -7,13 +7,13 @@
   
   
 
-
-
+
+
   
   
 
-
-
+
+
 
   
 
diff --git a/images/betafeature-flow-rtl.svg b/images/betafeature-flow-rtl.svg
index 9b3c00f..d4d6e3a 100644
--- a/images/betafeature-flow-rtl.svg
+++ b/images/betafeature-flow-rtl.svg
@@ -7,14 +7,14 @@



-   
-   
-   
+   
+   
+   



-   
-   
+   
+   


 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1dc546a0df52ce9b0885d92b29a7c638ef618025
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Pool db1109 and db1110

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392584 )

Change subject: db-eqiad.php: Pool db1109 and db1110
..


db-eqiad.php: Pool db1109 and db1110

Start giving traffic to the new servers db1109 and db1110

Bug: T180700
Change-Id: I1f8a02c97bbef18dc7f47e20b4bf82ae23f02ad0
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index d7c85fb..43cd70a 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -154,8 +154,8 @@
'db1100' => 1,   # C2 3.6TB 512GB, old master, vslow
'db1104' => 300,  # B3 3.6TB 512GB, api
'db1106' => 500,  # D3 3.6TB 512GB
-   # 'db1109' => 500,  # D8 3.6TB 512GB #provisioning
-   # 'db1110' => 500,  # C3 3.6TB 512GB #provisioning
+   'db1109' => 100,  # D8 3.6TB 512GB
+   'db1110' => 100,  # C3 3.6TB 512GB
],
's6' => [
'db1061' => 0,   # C3 2.8TB 128GB, master

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f8a02c97bbef18dc7f47e20b4bf82ae23f02ad0
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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]: mariadb: Enable notifications db1109, db1110

2017-11-20 Thread Marostegui (Code Review)
Marostegui has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392585 )

Change subject: mariadb: Enable notifications db1109,db1110
..


mariadb: Enable notifications db1109,db1110

These two servers are going to start getting traffic, so let's enable
their notifications

Bug: T180700
Change-Id: Ib57e9877f87332951f404fe1314909993f9dea87
---
M hieradata/hosts/db1109.yaml
M hieradata/hosts/db1110.yaml
2 files changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/hieradata/hosts/db1109.yaml b/hieradata/hosts/db1109.yaml
index 0ea867a..0d8bce2 100644
--- a/hieradata/hosts/db1109.yaml
+++ b/hieradata/hosts/db1109.yaml
@@ -1,2 +1 @@
 mariadb::shard: 's5'
-profile::base::notifications_enabled: '0'
diff --git a/hieradata/hosts/db1110.yaml b/hieradata/hosts/db1110.yaml
index 0ea867a..0d8bce2 100644
--- a/hieradata/hosts/db1110.yaml
+++ b/hieradata/hosts/db1110.yaml
@@ -1,2 +1 @@
 mariadb::shard: 's5'
-profile::base::notifications_enabled: '0'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib57e9877f87332951f404fe1314909993f9dea87
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
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]: mariadb: Enable notifications db1109, db1110

2017-11-20 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392585 )

Change subject: mariadb: Enable notifications db1109,db1110
..

mariadb: Enable notifications db1109,db1110

These two servers are going to start getting traffic, so let's enable
their notifications

Bug: T180700
Change-Id: Ib57e9877f87332951f404fe1314909993f9dea87
---
M hieradata/hosts/db1109.yaml
M hieradata/hosts/db1110.yaml
2 files changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/392585/1

diff --git a/hieradata/hosts/db1109.yaml b/hieradata/hosts/db1109.yaml
index 0ea867a..0d8bce2 100644
--- a/hieradata/hosts/db1109.yaml
+++ b/hieradata/hosts/db1109.yaml
@@ -1,2 +1 @@
 mariadb::shard: 's5'
-profile::base::notifications_enabled: '0'
diff --git a/hieradata/hosts/db1110.yaml b/hieradata/hosts/db1110.yaml
index 0ea867a..0d8bce2 100644
--- a/hieradata/hosts/db1110.yaml
+++ b/hieradata/hosts/db1110.yaml
@@ -1,2 +1 @@
 mariadb::shard: 's5'
-profile::base::notifications_enabled: '0'

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Pool db1109 and db1110

2017-11-20 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392584 )

Change subject: db-eqiad.php: Pool db1109 and db1110
..

db-eqiad.php: Pool db1109 and db1110

Start giving traffic to the new servers db1109 and db1110

Bug: T180700
Change-Id: I1f8a02c97bbef18dc7f47e20b4bf82ae23f02ad0
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 703c0b9..d25318f 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -154,8 +154,8 @@
'db1100' => 1,   # C2 3.6TB 512GB, old master, vslow
'db1104' => 300,  # B3 3.6TB 512GB, api
'db1106' => 500,  # D3 3.6TB 512GB
-   # 'db1109' => 500,  # D8 3.6TB 512GB #provisioning
-   # 'db1110' => 500,  # C3 3.6TB 512GB #provisioning
+   'db1109' => 100,  # D8 3.6TB 512GB
+   'db1110' => 500,  # C3 3.6TB 512GB
],
's6' => [
'db1061' => 0,   # C3 2.8TB 128GB, master

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1087"

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392583 )

Change subject: Revert "db-eqiad.php: Depool db1087"
..


Revert "db-eqiad.php: Depool db1087"

This reverts commit a6f2c458745e5618224c9cd16ce616e21bf57046.

Change-Id: I732a5b5605f97de503af7c2aa0962546aa148cf6
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 703c0b9..d7c85fb 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -147,7 +147,7 @@
# 'db1063' => 0,   # C5 2.8TB 128GB, master, crashed #T180714
# 'db1071' => 1,   # D1 2.8TB 160GB, future s8 master
'db1082' => 300, # A2 3.6TB 512GB, api
-   # 'db1087' => 500, # C2 3.6TB 512GB #T179106
+   'db1087' => 500, # C2 3.6TB 512GB
'db1092' => 500, # D2 3.6TB 512GB
# 'db1096' => 1,   # A6 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager #T178359
'db1099' => 1,   # B2 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I732a5b5605f97de503af7c2aa0962546aa148cf6
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1087"

2017-11-20 Thread Marostegui (Code Review)
Hello Urbanecm, jenkins-bot, Jcrespo, Zoranzoki21,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "db-eqiad.php: Depool db1087"
..

Revert "db-eqiad.php: Depool db1087"

This reverts commit a6f2c458745e5618224c9cd16ce616e21bf57046.

Change-Id: I732a5b5605f97de503af7c2aa0962546aa148cf6
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 703c0b9..d7c85fb 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -147,7 +147,7 @@
# 'db1063' => 0,   # C5 2.8TB 128GB, master, crashed #T180714
# 'db1071' => 1,   # D1 2.8TB 160GB, future s8 master
'db1082' => 300, # A2 3.6TB 512GB, api
-   # 'db1087' => 500, # C2 3.6TB 512GB #T179106
+   'db1087' => 500, # C2 3.6TB 512GB
'db1092' => 500, # D2 3.6TB 512GB
# 'db1096' => 1,   # A6 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager #T178359
'db1099' => 1,   # B2 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I732a5b5605f97de503af7c2aa0962546aa148cf6
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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/mediawiki-config[master]: db-eqiad.php: Depool db1087

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392582 )

Change subject: db-eqiad.php: Depool db1087
..


db-eqiad.php: Depool db1087

Alter table

Bug: T179106
Change-Id: I185516e4cc99d86df87514d3cdc0ae2b28461ae6
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index d7c85fb..703c0b9 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -147,7 +147,7 @@
# 'db1063' => 0,   # C5 2.8TB 128GB, master, crashed #T180714
# 'db1071' => 1,   # D1 2.8TB 160GB, future s8 master
'db1082' => 300, # A2 3.6TB 512GB, api
-   'db1087' => 500, # C2 3.6TB 512GB
+   # 'db1087' => 500, # C2 3.6TB 512GB #T179106
'db1092' => 500, # D2 3.6TB 512GB
# 'db1096' => 1,   # A6 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager #T178359
'db1099' => 1,   # B2 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I185516e4cc99d86df87514d3cdc0ae2b28461ae6
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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/mediawiki-config[master]: db-eqiad.php: Depool db1087

2017-11-20 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392582 )

Change subject: db-eqiad.php: Depool db1087
..

db-eqiad.php: Depool db1087

Alter table

Bug: T179106
Change-Id: I185516e4cc99d86df87514d3cdc0ae2b28461ae6
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index d7c85fb..703c0b9 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -147,7 +147,7 @@
# 'db1063' => 0,   # C5 2.8TB 128GB, master, crashed #T180714
# 'db1071' => 1,   # D1 2.8TB 160GB, future s8 master
'db1082' => 300, # A2 3.6TB 512GB, api
-   'db1087' => 500, # C2 3.6TB 512GB
+   # 'db1087' => 500, # C2 3.6TB 512GB #T179106
'db1092' => 500, # D2 3.6TB 512GB
# 'db1096' => 1,   # A6 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager #T178359
'db1099' => 1,   # B2 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Update colors of betafeatures icons

2017-11-20 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392581 )

Change subject: Update colors of betafeatures icons
..

Update colors of betafeatures icons

* Light gray - Base80

Old: https://phabricator.wikimedia.org/F10912613
New: https://phabricator.wikimedia.org/F10912612

Bug: T180427
Change-Id: I91e0495e922a1fcf094af14e424a410fad313ba0
---
M images/popups-ltr.svg
M images/popups-rtl.svg
2 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups 
refs/changes/81/392581/1

diff --git a/images/popups-ltr.svg b/images/popups-ltr.svg
index 1324c81..35ab989 100644
--- a/images/popups-ltr.svg
+++ b/images/popups-ltr.svg
@@ -7,13 +7,13 @@



-   
-   
+   
+   



-   
-   
+   
+   



diff --git a/images/popups-rtl.svg b/images/popups-rtl.svg
index 64082e7..5f21e0a 100644
--- a/images/popups-rtl.svg
+++ b/images/popups-rtl.svg
@@ -7,13 +7,13 @@



-   
-   
+   
+   



-   
-   
+   
+   




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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91e0495e922a1fcf094af14e424a410fad313ba0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1096

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392580 )

Change subject: db-eqiad.php: Depool db1096
..


db-eqiad.php: Depool db1096

db1096 will be used to clone db1101.s5

Bug: T178359
Change-Id: Ib2f4fc6e63577586b7581df515367ea109d18cbf
---
M wmf-config/db-eqiad.php
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 128dd9a..d7c85fb 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -149,7 +149,7 @@
'db1082' => 300, # A2 3.6TB 512GB, api
'db1087' => 500, # C2 3.6TB 512GB
'db1092' => 500, # D2 3.6TB 512GB
-   'db1096' => 1,   # A6 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager #T174569
+   # 'db1096' => 1,   # A6 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager #T178359
'db1099' => 1,   # B2 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager
'db1100' => 1,   # C2 3.6TB 512GB, old master, vslow
'db1104' => 300,  # B3 3.6TB 512GB, api
@@ -395,23 +395,23 @@
'db1104' => 1,
],
'watchlist' => [
-   'db1096' => 1,
+   # 'db1096' => 1,
'db1099' => 1,
],
'recentchanges' => [
-   'db1096' => 1,
+   # 'db1096' => 1,
'db1099' => 1,
],
'recentchangeslinked' => [
-   'db1096' => 1,
+   # 'db1096' => 1,
'db1099' => 1,
],
'contributions' => [
-   'db1096' => 1,
+   # 'db1096' => 1,
'db1099' => 1,
],
'logpager' => [
-   'db1096' => 1,
+   # 'db1096' => 1,
'db1099' => 1,
],
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2f4fc6e63577586b7581df515367ea109d18cbf
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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/mediawiki-config[master]: db-eqiad.php: Depool db1096

2017-11-20 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392580 )

Change subject: db-eqiad.php: Depool db1096
..

db-eqiad.php: Depool db1096

db1096 will be used to clone db1101.s5

Bug: T178359
Change-Id: Ib2f4fc6e63577586b7581df515367ea109d18cbf
---
M wmf-config/db-eqiad.php
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 128dd9a..d7c85fb 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -149,7 +149,7 @@
'db1082' => 300, # A2 3.6TB 512GB, api
'db1087' => 500, # C2 3.6TB 512GB
'db1092' => 500, # D2 3.6TB 512GB
-   'db1096' => 1,   # A6 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager #T174569
+   # 'db1096' => 1,   # A6 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager #T178359
'db1099' => 1,   # B2 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager
'db1100' => 1,   # C2 3.6TB 512GB, old master, vslow
'db1104' => 300,  # B3 3.6TB 512GB, api
@@ -395,23 +395,23 @@
'db1104' => 1,
],
'watchlist' => [
-   'db1096' => 1,
+   # 'db1096' => 1,
'db1099' => 1,
],
'recentchanges' => [
-   'db1096' => 1,
+   # 'db1096' => 1,
'db1099' => 1,
],
'recentchangeslinked' => [
-   'db1096' => 1,
+   # 'db1096' => 1,
'db1099' => 1,
],
'contributions' => [
-   'db1096' => 1,
+   # 'db1096' => 1,
'db1099' => 1,
],
'logpager' => [
-   'db1096' => 1,
+   # 'db1096' => 1,
'db1099' => 1,
],
],

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Restore original weight for db1082

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392579 )

Change subject: db-eqiad.php: Restore original weight for db1082
..


db-eqiad.php: Restore original weight for db1082

db1082 is fully back after being done to clone db1109 and db1110

Bug: T180700
Change-Id: I29806060e6c57d70c5d133e514d1ac64bee2b0f5
---
M wmf-config/db-eqiad.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index f9e4df1..128dd9a 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -146,13 +146,13 @@
'db1070' => 0,   # D1 2.8TB 160GB, master
# 'db1063' => 0,   # C5 2.8TB 128GB, master, crashed #T180714
# 'db1071' => 1,   # D1 2.8TB 160GB, future s8 master
-   'db1082' => 100, # A2 3.6TB 512GB, api #T177208
+   'db1082' => 300, # A2 3.6TB 512GB, api
'db1087' => 500, # C2 3.6TB 512GB
'db1092' => 500, # D2 3.6TB 512GB
'db1096' => 1,   # A6 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager #T174569
'db1099' => 1,   # B2 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager
'db1100' => 1,   # C2 3.6TB 512GB, old master, vslow
-   'db1104' => 100,  # B3 3.6TB 512GB, api #low weight
+   'db1104' => 300,  # B3 3.6TB 512GB, api
'db1106' => 500,  # D3 3.6TB 512GB
# 'db1109' => 500,  # D8 3.6TB 512GB #provisioning
# 'db1110' => 500,  # C3 3.6TB 512GB #provisioning
@@ -391,7 +391,7 @@
'db1100' => 1,
],
'api' => [
-   # 'db1082' => 1,
+   'db1082' => 1,
'db1104' => 1,
],
'watchlist' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29806060e6c57d70c5d133e514d1ac64bee2b0f5
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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/mediawiki-config[master]: db-eqiad.php: Restore original weight for db1082

2017-11-20 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392579 )

Change subject: db-eqiad.php: Restore original weight for db1082
..

db-eqiad.php: Restore original weight for db1082

db1082 is fully back after being done to clone db1109 and db1110

Bug: T180700
Change-Id: I29806060e6c57d70c5d133e514d1ac64bee2b0f5
---
M wmf-config/db-eqiad.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index f9e4df1..128dd9a 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -146,13 +146,13 @@
'db1070' => 0,   # D1 2.8TB 160GB, master
# 'db1063' => 0,   # C5 2.8TB 128GB, master, crashed #T180714
# 'db1071' => 1,   # D1 2.8TB 160GB, future s8 master
-   'db1082' => 100, # A2 3.6TB 512GB, api #T177208
+   'db1082' => 300, # A2 3.6TB 512GB, api
'db1087' => 500, # C2 3.6TB 512GB
'db1092' => 500, # D2 3.6TB 512GB
'db1096' => 1,   # A6 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager #T174569
'db1099' => 1,   # B2 3.6TB 512GB, watchlist, recentchanges, 
contributions, logpager
'db1100' => 1,   # C2 3.6TB 512GB, old master, vslow
-   'db1104' => 100,  # B3 3.6TB 512GB, api #low weight
+   'db1104' => 300,  # B3 3.6TB 512GB, api
'db1106' => 500,  # D3 3.6TB 512GB
# 'db1109' => 500,  # D8 3.6TB 512GB #provisioning
# 'db1110' => 500,  # C3 3.6TB 512GB #provisioning
@@ -391,7 +391,7 @@
'db1100' => 1,
],
'api' => [
-   # 'db1082' => 1,
+   'db1082' => 1,
'db1104' => 1,
],
'watchlist' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update colors betafeatures icon

2017-11-20 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392578 )

Change subject: Update colors betafeatures icon
..

Update colors betafeatures icon

Updated light gray (Base80) and light blue (Accent90).

Old: https://phabricator.wikimedia.org/F10912040
New: https://phabricator.wikimedia.org/F10912039

Change-Id: I88d74a0b7447a9a3effb0bb56f3666991558f1fd
---
M resources/images/compact-links-ltr.svg
M resources/images/compact-links-rtl.svg
2 files changed, 10 insertions(+), 10 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/78/392578/1

diff --git a/resources/images/compact-links-ltr.svg 
b/resources/images/compact-links-ltr.svg
index 3c53ba3..0151227 100644
--- a/resources/images/compact-links-ltr.svg
+++ b/resources/images/compact-links-ltr.svg
@@ -7,19 +7,19 @@



-   
+   





-   
+   



-   
-   
-   
+   
+   
+   



diff --git a/resources/images/compact-links-rtl.svg 
b/resources/images/compact-links-rtl.svg
index d9c33e6..678b2f1 100644
--- a/resources/images/compact-links-rtl.svg
+++ b/resources/images/compact-links-rtl.svg
@@ -7,19 +7,19 @@



-   
+   





-   
+   



-   
-   
-   
+   
+   
+   




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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88d74a0b7447a9a3effb0bb56f3666991558f1fd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] mediawiki...ThrottleOverride[master]: Add multi-wiki support

2017-11-20 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392577 )

Change subject: Add multi-wiki support
..

Add multi-wiki support

Add a $wgThrottleOverrideCentralWiki configuration setting  that can be used to
designate a single wiki in a wiki farm as the location for managing
ThrottleOverride exemptions.

Bug: T147364
Change-Id: I56fa0866133668a2151ce04510e0021f0ae3cbdd
---
M SpecialOverrideThrottle.php
M SpecialThrottleOverrideList.php
M ThrottleOverride.hooks.php
A ThrottleOverrideUtils.php
M extension.json
5 files changed, 77 insertions(+), 13 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ThrottleOverride 
refs/changes/77/392577/1

diff --git a/SpecialOverrideThrottle.php b/SpecialOverrideThrottle.php
index 7599ece..0785f9a 100644
--- a/SpecialOverrideThrottle.php
+++ b/SpecialOverrideThrottle.php
@@ -124,7 +124,7 @@
$data['Target']['default'] = $this->par;
 
// We need the most recent data here, we're about to 
change the throttle.
-   $dbw = wfGetDB( DB_MASTER );
+   $dbw = ThrottleOverrideUtils::getCentraDB( DB_MASTER );
$row = $dbw->selectRow(
'throttle_override',
[ 'thr_expiry', 'thr_reason', 'thr_type' ],
@@ -181,7 +181,7 @@
$logEntry->publish( $logId );
 
// Save the new exemption
-   $dbw = wfGetDB( DB_MASTER );
+   $dbw = ThrottleOverrideUtils::getCentraDB( DB_MASTER );
$row = [
'thr_target' => $this->target,
'thr_expiry' => $dbw->encodeExpiry( $data['Expiry'] ),
@@ -214,7 +214,7 @@
 * @return int
 */
public static function getThrottleOverrideId( $ip, $dbtype = DB_REPLICA 
) {
-   $db = wfGetDB( $dbtype );
+   $db = ThrottleOverrideUtils::getCentraDB( $dbtype );
$field = $db->selectField(
'throttle_override',
'thr_id',
diff --git a/SpecialThrottleOverrideList.php b/SpecialThrottleOverrideList.php
index 7113ce3..6edfe93 100644
--- a/SpecialThrottleOverrideList.php
+++ b/SpecialThrottleOverrideList.php
@@ -67,7 +67,7 @@
function onSubmit( array $data, HTMLForm $form = null ) {
if ( !wfReadOnly() && !mt_rand( 0, 10 ) ) {
// Purge expired entries on one in every 10 queries
-   $dbw = wfGetDB( DB_MASTER );
+   $dbw = ThrottleOverrideUtils::getCentraDB( DB_MASTER );
$method = __METHOD__;
$dbw->onTransactionIdle( function () use ( $dbw, 
$method ) {
$dbw->delete(
diff --git a/ThrottleOverride.hooks.php b/ThrottleOverride.hooks.php
index 6db4026..1dc4e59 100644
--- a/ThrottleOverride.hooks.php
+++ b/ThrottleOverride.hooks.php
@@ -44,7 +44,7 @@
 * @return bool
 */
public static function onPingLimiter( User &$user, $action, &$result, 
$ip = null ) {
-   global $wgRateLimits;
+   global $wgRateLimits, $wgThrottleOverrideCentralWiki;
 
if ( $action !== 'actcreate' && !isset( $wgRateLimits[$action] 
) ) {
return true;
@@ -59,10 +59,13 @@
 
$cache = 
MediaWikiServices::getInstance()->getMainWANObjectCache();
$expiry = $cache->getWithSetCallback(
-   $cache->makeKey( 'throttle_override', $action, $hexIp ),
+   $cache->makeKey(
+   'throttle_override',
+   $wgThrottleOverrideCentralWiki, $action, $hexIp
+   ),
$cache::TTL_HOUR,
function ( $cValue, &$ttl, &$setOpts, $asOf ) use ( 
$hexIp, $action ) {
-   $dbr = wfGetDB( DB_REPLICA );
+   $dbr = ThrottleOverrideUtils::getCentraDB( 
DB_REPLICA );
$setOpts += Database::getCacheSetOptions( $dbr 
);
 
$expiry = $dbr->selectField(
@@ -111,7 +114,7 @@
return false;
} elseif ( $expiry !== false ) {
// Expired exemption. Delete it from the DB.
-   $dbw = wfGetDB( DB_MASTER );
+   $dbw = ThrottleOverrideUtils::getCentraDB( DB_MASTER );
$dbw->delete(
'throttle_override',
self::makeConds( $dbw, $hexIp, $action ),
@@ -162,4 +165,18 @@
 
return true;
}
+
+   public static function onSetupAfterCache() {
+   global $wgThrottleOverrideCentralWiki;
+ 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Timeless everywhere

2017-11-20 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392576 )

Change subject: Enable Timeless everywhere
..

Enable Timeless everywhere

It has been tested in a few places, and there are requests at many
more. Given that it only enables an option in preferences, and is
not enabled by default unless the user selects the option, I think
it makes more sense to enable it everywhere, than to keep enabling
on an ever-expanding list of wikis.

Bug: T154371
Change-Id: I887eb8e30061e2e8fac448c7512ee420142b6213
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 11 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8eef61b..3c47dc3 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19708,17 +19708,7 @@
 ],
 
 'wmgUseTimeless' => [
-   'default' => false,
-   'testwiki' => true,
-   'test2wiki' => true,
-   'mediawikiwiki' => true,
-   'labswiki' => true,
-   'labtestwiki' => true,
-   'frwiki' => true, // T154371
-   'frwikinews' => true,
-   'frwikisource' => true,
-   'frwikiversity' => true,
-   'frwiktionary' => true,
+   'default' => true,
 ],
 
 // T152540

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I887eb8e30061e2e8fac448c7512ee420142b6213
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] mediawiki...TimedMediaHandler[master]: Fix audio/video player regression

2017-11-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392574 )

Change subject: Fix audio/video player regression
..

Fix audio/video player regression

Fixes regression from a mistaken overfix in I241d1e

Bug: T169385
Change-Id: I30c71e92f0b475f3cecc03c5a2b869e7002c0862
---
M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/74/392574/1

diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js 
b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
index 0b6871a..189485b 100644
--- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
+++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
@@ -745,7 +745,8 @@
}
// Set up the new embedObj
mw.log( 'EmbedPlayer::updatePlaybackInterface: 
embedding with ' + this.selectedPlayer.library );
-   this.selectedPlayer.on('load', function() {
+   // Note this is not a jQuery event handler, but a call 
with a callback:
+   this.selectedPlayer.load(function() {
_this.updateLoadedPlayerInterface( callback );
});
},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30c71e92f0b475f3cecc03c5a2b869e7002c0862
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Disable wasm, use asm.js codec modules for Safari/Edge

2017-11-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392575 )

Change subject: Disable wasm, use asm.js codec modules for Safari/Edge
..

Disable wasm, use asm.js codec modules for Safari/Edge

WebAssembly .wasm versions of the codec modules load faster, but
run about the same speed as the JS versions. Both are inscrutable. ;)

But having some trouble with the deployment and it should be tested
better first.

Also we should more thoroughly discuss implications of including
binary code modules for JS client-side code, and whether we should
be leaning on package managers for importing those.

Bug: T181022
Change-Id: I2ac297ca61fbf24c8c5b5428d3af5002b0925109
---
M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/75/392575/1

diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js 
b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js
index 3626307..e667b41 100644
--- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js
+++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js
@@ -42,7 +42,7 @@
 */
_ogvJsInit: function() {
var options = {
-   enableWebM: true
+   wasm: false
};
if ( this._iOSAudioContext ) {
// Reuse the audio context we opened earlier

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ac297ca61fbf24c8c5b5428d3af5002b0925109
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] marvin[master]: Fix: gracefully handle redirects to external sites

2017-11-20 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392573 )

Change subject: Fix: gracefully handle redirects to external sites
..

Fix: gracefully handle redirects to external sites

When redirected to externals sites such as Commons by the Mobile Content
Service API, don't report the redirect status to the client. Marvin only
supports English Wikipedia. This is a hack and probably will break under
certain scenarios but at least will unbreak File pages on Commons.

Bug: T177681
Change-Id: Idbb9803b36acd503d97ac666deb47a19b29eed57
---
M package.json
M src/common/http/page-http-client.ts
M src/common/http/page-summary-http-client.ts
M src/common/pages/home.tsx
M src/common/pages/summary.tsx
M src/common/pages/wiki.tsx
6 files changed, 79 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/73/392573/1

diff --git a/package.json b/package.json
index 33ff1af..1c928f5 100644
--- a/package.json
+++ b/package.json
@@ -123,11 +123,11 @@
 },
 {
   "path": "dist/public/pages/summary.*.js",
-  "maxSize": "2.3KB"
+  "maxSize": "2.4KB"
 },
 {
   "path": "dist/public/pages/wiki.*.js",
-  "maxSize": "2.9KB"
+  "maxSize": "3KB"
 }
   ]
 }
diff --git a/src/common/http/page-http-client.ts 
b/src/common/http/page-http-client.ts
index c7c015e..0326917 100644
--- a/src/common/http/page-http-client.ts
+++ b/src/common/http/page-http-client.ts
@@ -19,8 +19,9 @@
   revision?: number;
   redirect?: PageRedirect;
   random?: undefined;
+  init?: RequestInit;
 }
-export type Params = PageParams | { random: true };
+export type Params = PageParams | { random: true; init?: RequestInit };
 
 function url(params: Params, endpoint: string) {
   if (params.random) {
@@ -51,7 +52,7 @@
   unmarshal: (params: UnmarshalParams) => Type
 ): Promise {
   const headers = params.random ? RANDOM_HEADERS : PAGE_HEADERS;
-  return fetch(url(params, endpoint), { headers })
+  return fetch(url(params, endpoint), { headers, ...params.init })
 .then(response =>
   response
 .json()
diff --git a/src/common/http/page-summary-http-client.ts 
b/src/common/http/page-summary-http-client.ts
index 140fdc4..7e35d3d 100644
--- a/src/common/http/page-summary-http-client.ts
+++ b/src/common/http/page-summary-http-client.ts
@@ -13,8 +13,9 @@
   titlePath: PageTitlePath;
   redirect?: PageRedirect;
   random?: undefined;
+  init?: RequestInit;
 }
-export type Params = PageParams | { random: true };
+export type Params = PageParams | { random: true; init?: RequestInit };
 
 const url = (params: Params) => {
   if (params.random) {
@@ -34,7 +35,10 @@
 // todo: this can actually return an empty response when redirect is false. Do
 //   we want to support it? Same question for the other redirect usages.
 export const request = (params: Params): Promise =>
-  fetch(url(params), { headers: params.random ? RANDOM_HEADERS : PAGE_HEADERS 
})
+  fetch(url(params), {
+headers: params.random ? RANDOM_HEADERS : PAGE_HEADERS,
+...params.init
+  })
 .then(response =>
   response
 .json()
diff --git a/src/common/pages/home.tsx b/src/common/pages/home.tsx
index 20b1a64..d500b3b 100644
--- a/src/common/pages/home.tsx
+++ b/src/common/pages/home.tsx
@@ -61,6 +61,10 @@
 title: "Ice_cream_cake",
 revision: "24242119",
 text: "An arbitrary revision"
+  },
+  {
+title: "File:Vanilla_Ice_Cream_Cone_at_Camp_Manitoulin.jpg",
+text: "Redirect (external) and File page"
   }
 ];
 
diff --git a/src/common/pages/summary.tsx b/src/common/pages/summary.tsx
index cac2889..c6a5601 100644
--- a/src/common/pages/summary.tsx
+++ b/src/common/pages/summary.tsx
@@ -6,7 +6,7 @@
 import Page from "../components/page/page";
 import { RouteParams } from "../routers/route";
 import { summary } from "../routers/api";
-import { request } from "../http/page-summary-http-client";
+import { request as requestSummary } from "../http/page-summary-http-client";
 import ContentHeader from "../components/content-header/content-header";
 import ContentFooter from "../components/content-footer/content-footer";
 import HttpResponse from "../http/http-response";
@@ -30,26 +30,36 @@
   summary: PageSummaryModel;
 }
 
+function request(
+  params: Params = {},
+  init?: RequestInit
+): Promise {
+  return requestSummary(
+params.title === undefined
+  ? { random: true, init }
+  : { titlePath: params.title, init }
+  ).catch(error => {
+if (error instanceof RedirectError) {
+  const titleID = unmarshalPageTitleID(error.url);
+  if (params.title === encodeURIComponent(titleID)) {
+// URL is external. Follow it and don't report redirect status.
+return request(params, { redirect: "follow" });
+  }
+
+  const url = summary.toPath({ title: unmarshalPageTitleID(error.url) });
+  throw new 

[MediaWiki-commits] [Gerrit] marvin[master]: Chore: don't log redirects

2017-11-20 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392572 )

Change subject: Chore: don't log redirects
..

Chore: don't log redirects

RedirectErrors are exceptional but expected operation and should not be
printed. Add a conditional to guard against logging them.

Change-Id: I6ceb9ecb266afe777b59b1fb82c4c42ec377978c
---
M src/common/routers/router.ts
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/72/392572/1

diff --git a/src/common/routers/router.ts b/src/common/routers/router.ts
index d216737..a43c588 100644
--- a/src/common/routers/router.ts
+++ b/src/common/routers/router.ts
@@ -8,7 +8,11 @@
 } from "../../common/routers/route";
 import HttpResponse from "../http/http-response";
 import { PRODUCTION } from "../assets/config";
-import { ServerError, ClientError } from "../http/fetch-with-redirect";
+import {
+  ServerError,
+  ClientError,
+  RedirectError
+} from "../http/fetch-with-redirect";
 import * as notFoundModule from "../pages/not-found";
 import { notFound } from "./api";
 
@@ -62,7 +66,7 @@
 // todo: show 5xx page and log for Services / RI and
 // return response.status.
 console.error(message); // eslint-disable-line no-console
-  } else {
+  } else if (!(error instanceof RedirectError)) {
 // todo: show 5xx page and log for Marvin.
 console.error(message); // eslint-disable-line no-console
   }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ceb9ecb266afe777b59b1fb82c4c42ec377978c
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] marvin[master]: Update: capture wiki link clicks and navigation

2017-11-20 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392570 )

Change subject: Update: capture wiki link clicks and navigation
..

Update: capture wiki link clicks and navigation

Extract Link.onClick to link-on-click#onClick and use in ContentSection
so that visiting wiki pages only loads the minimal content needed
inline.

Bug: T177367
Change-Id: I5175d9473c128fce87820e9d11788db7b4dd6df1
---
M package.json
M src/common/components/content-section/content-section.tsx
A src/common/components/link-on-click.ts
M src/common/components/link.tsx
4 files changed, 58 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/70/392570/1

diff --git a/package.json b/package.json
index 2ff5df7..33ff1af 100644
--- a/package.json
+++ b/package.json
@@ -103,7 +103,7 @@
   "bundlesize": [
 {
   "path": "dist/public/index.*.js",
-  "maxSize": "3.1KB"
+  "maxSize": "3.2KB"
 },
 {
   "path": "dist/public/runtime.*.js",
diff --git a/src/common/components/content-section/content-section.tsx 
b/src/common/components/content-section/content-section.tsx
index a87ad83..601fa17 100644
--- a/src/common/components/content-section/content-section.tsx
+++ b/src/common/components/content-section/content-section.tsx
@@ -1,16 +1,25 @@
+import { History } from "history";
 import { h } from "preact";
 import { PageSection } from "../../models/page/page";
 import Content from "../content/content";
 import DynamicHeader from "../dynamic-header/dynamic-header";
+import { onClick } from "../link-on-click";
 import "./content-section.css";
 
 export interface Props {
   section: PageSection;
 }
 
-export default function ContentSection({ section }: Props): JSX.Element {
+export default function ContentSection(
+  { section }: Props,
+  context: { history?: History }
+): JSX.Element {
   return (
-
+ onClick(context, event)}
+  class="ContentSection"
+  id={section.fragment}
+>
   {section.titleHTML && ( // Omit empty headers such as the lead.
 
   
diff --git a/src/common/components/link-on-click.ts 
b/src/common/components/link-on-click.ts
new file mode 100644
index 000..85c6cc4
--- /dev/null
+++ b/src/common/components/link-on-click.ts
@@ -0,0 +1,43 @@
+import { History } from "history";
+
+function isModifiedEvent(event: MouseEvent): boolean {
+  return event.metaKey || event.altKey || event.ctrlKey || event.shiftKey;
+}
+
+function isInternalLink(link: HTMLAnchorElement) {
+  // N.B. link.href is used because browsers will transform relative paths to
+  // the full path when set on the HTML anchor, which is what is used to check
+  // against the current origin.
+  return link.href && link.href.indexOf(window.location.origin) === 0;
+}
+
+// TODO: add unit tests
+export function onClick(
+  context: { history?: History },
+  event: MouseEvent
+): void {
+  // When set on an anchor, currentTarget is the anchor. When set on a parent 
to
+  // capture all clicks, currentTarget may be something else. Use target and
+  // walk the DOM inclusively upwards until an anchor is found.
+  const link = (event.target as HTMLElement).closest(
+"a"
+  ) as HTMLAnchorElement | null;
+  if (
+link &&
+isInternalLink(link) &&
+// onClick not prevented default
+!event.defaultPrevented &&
+// Ignore everything but left clicks
+event.button === 0 &&
+// Let browser handle "target=_blank" etc.
+!link.target &&
+// Ignore clicks with modifier keys
+!isModifiedEvent(event) &&
+// We have a context history
+context.history
+  ) {
+event.preventDefault();
+const path = link.href.replace(window.location.origin, "");
+context.history.push(path);
+  }
+}
diff --git a/src/common/components/link.tsx b/src/common/components/link.tsx
index 75ec31c..668fb96 100644
--- a/src/common/components/link.tsx
+++ b/src/common/components/link.tsx
@@ -1,13 +1,10 @@
-import { h } from "preact";
 import { History } from "history";
+import { h } from "preact";
 import { ChildrenProps, classOf, ClassProps } from "./preact-utils";
+import { onClick } from "./link-on-click";
 
 export interface Props extends ClassProps, ChildrenProps {
   href: string;
-}
-
-function isModifiedEvent(event: MouseEvent): boolean {
-  return event.metaKey || event.altKey || event.ctrlKey || event.shiftKey;
 }
 
 /**
@@ -22,36 +19,7 @@
  {
-const origin = window.location.origin;
-// Use currentTarget as target may be other DOM elements inside the
-// anchor element
-const link = event.currentTarget as HTMLAnchorElement;
-// TODO: Move all the logic to check if an event should be captured to 
a
-// DOM utilities module and add unit tests
-if (
-  // Check if the href is internal
-  //
-  // N.B. link.href is used because browsers will transform relative
-  

[MediaWiki-commits] [Gerrit] marvin[master]: Fix: wiki and summary page title decoding

2017-11-20 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392571 )

Change subject: Fix: wiki and summary page title decoding
..

Fix: wiki and summary page title decoding

Wiki and summary page title decoding operates on URI segments not full
URIs. Replace mistaken calls to decodeURI() with decodeURIComponent().

Change-Id: I8d4183735ab0ae078b1620fe315d48b76ff54d33
---
M src/common/marshallers/page-base/page-base-unmarshaller.ts
M src/common/pages/summary.tsx
M src/common/pages/wiki.tsx
3 files changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/71/392571/1

diff --git a/src/common/marshallers/page-base/page-base-unmarshaller.ts 
b/src/common/marshallers/page-base/page-base-unmarshaller.ts
index f3cbd2b..416499c 100644
--- a/src/common/marshallers/page-base/page-base-unmarshaller.ts
+++ b/src/common/marshallers/page-base/page-base-unmarshaller.ts
@@ -13,7 +13,7 @@
   if (titlePath === undefined) {
 throw new Error("titlePath should be known at response time.");
   }
-  return decodeURI(titlePath);
+  return decodeURIComponent(titlePath);
 }
 
 export const unmarshalPageGeolocation = (json: JSONObject): PageGeolocation => 
{
diff --git a/src/common/pages/summary.tsx b/src/common/pages/summary.tsx
index 4d9c1c3..cac2889 100644
--- a/src/common/pages/summary.tsx
+++ b/src/common/pages/summary.tsx
@@ -45,9 +45,7 @@
 if (error instanceof RedirectError) {
   error = new RedirectError(
 error.status,
-summary.toPath({
-  title: decodeURIComponent(unmarshalPageTitleID(error.url))
-})
+summary.toPath({ title: unmarshalPageTitleID(error.url) })
   );
 }
 throw error;
diff --git a/src/common/pages/wiki.tsx b/src/common/pages/wiki.tsx
index cf914e1..ef011b8 100644
--- a/src/common/pages/wiki.tsx
+++ b/src/common/pages/wiki.tsx
@@ -55,7 +55,7 @@
   error = new RedirectError(
 error.status,
 wiki.toPath({
-  title: decodeURIComponent(unmarshalPageTitleID(error.url)),
+  title: unmarshalPageTitleID(error.url),
   revision: params.revision
 })
   );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d4183735ab0ae078b1620fe315d48b76ff54d33
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: [WIP] Remove editor switching infrastructure in favor of VE'...

2017-11-20 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392569 )

Change subject: [WIP] Remove editor switching infrastructure in favor of VE's 
source mode
..

[WIP] Remove editor switching infrastructure in favor of VE's source mode

This simplifies a lot of code.

TODO: add a textarea fallback for when VE is not available/supported

Bug: T155861
Change-Id: Ie8014a64eae5f1b24495d6108e720464a8e75d9c
---
M extension.json
M modules/editor/editors/visualeditor/mw.flow.ve.CommandRegistry.js
M modules/editor/editors/visualeditor/mw.flow.ve.Target.js
M modules/editor/editors/visualeditor/mw.flow.ve.Target.less
D 
modules/editor/editors/visualeditor/ui/actions/mw.flow.ve.ui.SwitchEditorAction.js
M modules/flow/ui/tools/mw.flow.ui.MWEditModeTool.js
D modules/flow/ui/widgets/editor/editors/mw.flow.ui.AbstractEditorWidget.js
D modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
D modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
D modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
M modules/flow/ui/widgets/editor/mw.flow.ui.EditorWidget.js
M modules/flow/ui/widgets/mw.flow.ui.BoardDescriptionWidget.js
M modules/flow/ui/widgets/mw.flow.ui.EditPostWidget.js
M modules/flow/ui/widgets/mw.flow.ui.EditTopicSummaryWidget.js
M modules/flow/ui/widgets/mw.flow.ui.NewTopicWidget.js
M modules/mw.flow.Initializer.js
M modules/styles/flow.variables.less
D 
modules/styles/flow/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.less
D modules/styles/flow/widgets/editor/mw.flow.ui.EditorSwitcherWidget.less
M modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less
M modules/styles/flow/widgets/editor/mw.flow.ui.editor-monobook.less
M modules/styles/flow/widgets/editor/mw.flow.ui.editor-vector.less
M modules/styles/flow/widgets/mw.flow.ui.NewTopicWidget.less
23 files changed, 521 insertions(+), 1,672 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/69/392569/1

diff --git a/extension.json b/extension.json
index 948e992..32a0192 100644
--- a/extension.json
+++ b/extension.json
@@ -487,12 +487,8 @@

"flow/ui/widgets/mw.flow.ui.SidebarExpandWidget.js",
"flow/ui/widgets/mw.flow.ui.NewTopicWidget.js",

"flow/ui/widgets/mw.flow.ui.TopicTitleWidget.js",
-   
"flow/ui/widgets/editor/editors/mw.flow.ui.AbstractEditorWidget.js",
-   
"flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js",
-   
"flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js",

"flow/ui/widgets/editor/mw.flow.ui.AnonWarningWidget.js",

"flow/ui/widgets/editor/mw.flow.ui.CanNotEditWidget.js",
-   
"flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js",

"flow/ui/widgets/editor/mw.flow.ui.EditorControlsWidget.js",

"flow/ui/widgets/editor/mw.flow.ui.EditorWidget.js",

"flow/ui/widgets/mw.flow.ui.BoardDescriptionWidget.js",
@@ -510,9 +506,7 @@

"styles/flow/widgets/editor/mw.flow.ui.AnonWarningWidget.less",

"styles/flow/widgets/editor/mw.flow.ui.CanNotEditWidget.less",

"styles/flow/widgets/editor/mw.flow.ui.EditorControlsWidget.less",
-   
"styles/flow/widgets/editor/mw.flow.ui.EditorSwitcherWidget.less",

"styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less",
-   
"styles/flow/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.less",

"styles/flow/widgets/mw.flow.ui.CategoryItemWidget.less",

"styles/flow/widgets/mw.flow.ui.CategoriesWidget.less",

"styles/flow/widgets/mw.flow.ui.TopicTitleWidget.less"
@@ -653,14 +647,6 @@
"mobile"
]
},
-   "ext.flow.switching": {
-   "scripts": [
-   "flow/ui/tools/mw.flow.ui.MWEditModeTool.js"
-   ],
-   "dependencies": [
-   "ext.visualEditor.switching"
-   ]
-   },
"ext.flow.visualEditor": {
"scripts": [

"editor/editors/visualeditor/mw.flow.ve.Target.js",
@@ -669,9 +655,9 @@

"editor/editors/visualeditor/ui/tools/mw.flow.ve.ui.MentionInspectorTool.js",


[MediaWiki-commits] [Gerrit] mediawiki...InputBox[master]: Have inputbox langconvert certain attributes

2017-11-20 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392568 )

Change subject: Have inputbox langconvert certain attributes
..

Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 52 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InputBox 
refs/changes/68/392568/1

diff --git a/InputBox.classes.php b/InputBox.classes.php
index f504468..d65a7ac 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -641,9 +641,19 @@
'searchfilter' => 'mSearchFilter',
'tour' => 'mTour'
];
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -695,4 +705,26 @@
private function shouldUseVE() {
return ExtensionRegistry::getInstance()->isLoaded( 
'VisualEditor' ) && $this->mUseVE !== null;
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }
diff --git a/tests/inputBoxParserTests.txt b/tests/inputBoxParserTests.txt
index 63e0d62..90ff429 100644
--- a/tests/inputBoxParserTests.txt
+++ b/tests/inputBoxParserTests.txt
@@ -328,4 +328,23 @@
 
 
 
-!! end
\ No newline at end of file
+!! end
+
+!! test
+InputBox langconvert
+!! options
+language=sr variant=sr-el
+!! wikitext
+
+type=create
+default=-{sr-el: Some latin; sr-ec: Not latin }-
+placeholder=-{sr-el: el; sr-ec: ec}-
+
+!! html+tidy
+
+
+
+
+
+
+!! end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
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] mediawiki/core[master]: Add WebAssembly application/wasm MIME type

2017-11-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392567 )

Change subject: Add WebAssembly application/wasm MIME type
..

Add WebAssembly application/wasm MIME type

Needed to get TimedMediaHandler's .wasm binaries for latest version
of ogv.js working via the static.php intermediary, which uses
StreamFile::contentTypeFromPath() to check MIME types and refuses
to serve out the file if it's unknown.

Bug: T179108
Bug: T181022
Change-Id: Ic15c4d985a9cac9e685b12876804504e6eb46171
---
M includes/libs/mime/mime.info
M includes/libs/mime/mime.types
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/67/392567/1

diff --git a/includes/libs/mime/mime.info b/includes/libs/mime/mime.info
index d8b8be7..3670243 100644
--- a/includes/libs/mime/mime.info
+++ b/includes/libs/mime/mime.info
@@ -87,6 +87,7 @@
 application/x-tcl  [EXECUTABLE]
 application/x-perl [EXECUTABLE]
 application/x-python   [EXECUTABLE]
+application/wasm   [EXECUTABLE]
 
 application/pdf application/acrobat[OFFICE]
 application/msword [OFFICE]
diff --git a/includes/libs/mime/mime.types b/includes/libs/mime/mime.types
index f1cd59d..ef6854c 100644
--- a/includes/libs/mime/mime.types
+++ b/includes/libs/mime/mime.types
@@ -187,3 +187,4 @@
 chemical/x-mdl-rgfile rg
 application/x-amf amf
 application/sla stl
+application/wasm wasm

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic15c4d985a9cac9e685b12876804504e6eb46171
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: [WIP] add stripe import

2017-11-20 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392566 )

Change subject: [WIP] add stripe import
..

[WIP] add stripe import

Bug: T172423

Change-Id: I63a85f352caec1d695724a9b1dd1129f9a29781c
---
A sites/all/modules/offline2civicrm/StripeFile.php
M sites/all/modules/offline2civicrm/offline2civicrm.info
M sites/all/modules/offline2civicrm/offline2civicrm.module
A sites/all/modules/offline2civicrm/tests/StripeFileTest.php
A sites/all/modules/offline2civicrm/tests/data/stripe.csv
5 files changed, 124 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/66/392566/1

diff --git a/sites/all/modules/offline2civicrm/StripeFile.php 
b/sites/all/modules/offline2civicrm/StripeFile.php
new file mode 100644
index 000..bcf6cac
--- /dev/null
+++ b/sites/all/modules/offline2civicrm/StripeFile.php
@@ -0,0 +1,85 @@
+ 'gateway_txn_id',
+  // utm_source
+  // utm_campaign
+  // utm_medium
+  'Card Address Line1' => 'street_address',
+  'Card Address Line2' => 'supplemental_address_1',
+  'Card Address City' => 'city',
+  'Converted Amount' => 'gross',
+  'Created (UTC)' => 'date',
+  'Customer Email' => 'email',
+  // use wmf_civicrm_janky_split_name in munge message (move up)
+  'Card Name' => 'full_name',
+  'Card Address State' => 'state_province',
+  'Card Address Zip' => 'postal_code',
+  'Card Address Country' => 'country',
+
+
+  //id,
+  //Description,
+  //Amount ,,
+  //Amount Refunded,
+  //Currency,
+  //Converted Amount,
+  //Converted Amount Refunded,Fee,
+  //Tax,
+  //Converted Currency,
+  //Mode,
+  //Status,
+  //Statement Descriptor,
+  //Customer ID,
+  //Customer Description,,
+  //Captured,Card ID,
+  //Card Last4,
+  //Card Brand,
+  //Card Funding,
+  //Card Exp Month,
+  //Card Exp Year,
+  //Card Issue Country,
+  //Card Fingerprint,
+  //Card CVC Status,
+  //Card AVS Zip Status,
+  //Card AVS Line1 Status,
+  //Card Tokenization Method,
+  //Disputed Amount,
+  //Dispute Status,
+  //Dispute Reason,
+  //Dispute Date (UTC),
+  //Dispute Evidence Due (UTC)
+  //Invoice ID,
+  //Payment Source Type,
+  //Destination,
+  //Transfer,
+  //Transfer Group,
+  //event_id (metadata),
+  //event_name (metadata),
+  //order_number (metadata)
+);
+  }
+
+  protected function getDefaultValues() {
+return parent::getDefaultValues() + array(
+'gateway' => 'stripe',
+'currency' => 'USD',
+'no_thank_you' => 'stripe',
+// @todo - should this be 'Stripe'
+'payment_instrument' => 'Credit Card',
+  );
+  }
+
+}
diff --git a/sites/all/modules/offline2civicrm/offline2civicrm.info 
b/sites/all/modules/offline2civicrm/offline2civicrm.info
index 4462913..058cd03 100644
--- a/sites/all/modules/offline2civicrm/offline2civicrm.info
+++ b/sites/all/modules/offline2civicrm/offline2civicrm.info
@@ -22,6 +22,7 @@
 files[] = PayPalChecksFile.php
 files[] = RefundFile.php
 files[] = SquareFile.php
+files[] = StripeFile.php
 files[] = TrilogyFile.php
 files[] = WmfImportFile.php
 files[] = WmfOrgImportFile.php
diff --git a/sites/all/modules/offline2civicrm/offline2civicrm.module 
b/sites/all/modules/offline2civicrm/offline2civicrm.module
index 71cb137..ed491c3 100644
--- a/sites/all/modules/offline2civicrm/offline2civicrm.module
+++ b/sites/all/modules/offline2civicrm/offline2civicrm.module
@@ -115,6 +115,7 @@
   'jpmorgan' => t('JP Morgan'),
   'paypal' => t('PayPal EFT'),
   'square' => t('Square'),
+  'stripe' => t('Stripe'),
   'trilogy' => t('Trilogy'),
 ),
   );
@@ -194,6 +195,11 @@
 case 'square':
   $importer = new SquareFile($file->uri);
   break;
+
+case 'stripe':
+  $importer = new StripeFile($file->uri);
+  break;
+
 case 'trilogy':
   $importer = new TrilogyFile($file->uri);
   break;
diff --git a/sites/all/modules/offline2civicrm/tests/StripeFileTest.php 
b/sites/all/modules/offline2civicrm/tests/StripeFileTest.php
new file mode 100644
index 000..6102101
--- /dev/null
+++ b/sites/all/modules/offline2civicrm/tests/StripeFileTest.php
@@ -0,0 +1,29 @@
+gateway = 'stripe';
+  }
+
+  /**
+   * Test basic import.
+   */
+  function testImport() {
+civicrm_initialize();
+
+$importer = new StripeFile(__DIR__ . "/data/stripe.csv");
+$importer->import();
+$firstGateWayID = 'ch_1Al1231231231231231231123';
+$contribution = 
wmf_civicrm_get_contributions_from_gateway_id($this->gateway, $firstGateWayID);
+$this->assertEquals(1, count($contribution));
+$this->assertEquals('STRIPE CH_1AL1231231231231231231123', 
$contribution[0]['trxn_id']);
+$this->assertEquals('500', 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Apply drupal formatting to offline2civicrm.module

2017-11-20 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392565 )

Change subject: Apply drupal formatting to offline2civicrm.module
..

Apply drupal formatting to offline2civicrm.module

Re-formatted using drupal rules in IDE

Change-Id: If7940b90edb13ab46df2cebf336c99ab8289f556
---
M sites/all/modules/offline2civicrm/offline2civicrm.module
1 file changed, 90 insertions(+), 90 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/65/392565/1

diff --git a/sites/all/modules/offline2civicrm/offline2civicrm.module 
b/sites/all/modules/offline2civicrm/offline2civicrm.module
index 18ff9fa..71cb137 100644
--- a/sites/all/modules/offline2civicrm/offline2civicrm.module
+++ b/sites/all/modules/offline2civicrm/offline2civicrm.module
@@ -70,59 +70,59 @@
 }
 
 function offline2civicrm_import_checks_form() {
-  $dir = drupal_get_path( 'module', 'offline2civicrm' );
-  drupal_add_js( $dir . '/upload_form.js' );
+  $dir = drupal_get_path('module', 'offline2civicrm');
+  drupal_add_js($dir . '/upload_form.js');
 
   $log_events = ChecksImportLog::recentEvents();
-  $headers = array( 'Time', 'Who', 'Done' );
+  $headers = array('Time', 'Who', 'Done');
   $rows = array();
-  foreach ( $log_events as $event ) {
+  foreach ($log_events as $event) {
 $rows[] = array(
   $event->time,
   $event->who,
   $event->done,
 );
   }
-  $log_html = theme_table( array(
-'header' => $headers,
-'rows' => $rows,
-'empty' => "No events yet.",
-'attributes' => array(),
-'caption' => t( 'Latest import events' ),
-'colgroups' => array(),
-'sticky' => true,
-  ) ).theme('pager');
+  $log_html = theme_table(array(
+  'header' => $headers,
+  'rows' => $rows,
+  'empty' => "No events yet.",
+  'attributes' => array(),
+  'caption' => t('Latest import events'),
+  'colgroups' => array(),
+  'sticky' => TRUE,
+)) . theme('pager');
 
   $form['import_upload_file'] = array(
-'#title' => t( 'Upload checks file' ),
+'#title' => t('Upload checks file'),
 '#type' => 'file',
   );
   $form['import_upload_submit'] = array(
 '#type' => 'submit',
-'#value' => t( 'Upload' ),
+'#value' => t('Upload'),
   );
   $form['import_upload_format'] = array(
-'#title' => t( 'File format' ),
+'#title' => t('File format'),
 '#type' => 'radios',
 '#default_value' => 'generic_ind',
 '#options' => array(
-'benevity' => t('Benevity'),
-'engage' => t( 'Engage' ),
-'coinbase' => t( 'Coinbase Merchant Orders' ),
-'foreign_checks' => t( 'Foreign Checks' ),
-'generic_ind' => t( 'Generic Individuals' ),
-'generic_org' => t( 'Generic Organizations' ),
-'jpmorgan' => t( 'JP Morgan' ),
-'paypal' => t( 'PayPal EFT' ),
-'square' => t( 'Square' ),
-'trilogy' => t( 'Trilogy' ),
+  'benevity' => t('Benevity'),
+  'engage' => t('Engage'),
+  'coinbase' => t('Coinbase Merchant Orders'),
+  'foreign_checks' => t('Foreign Checks'),
+  'generic_ind' => t('Generic Individuals'),
+  'generic_org' => t('Generic Organizations'),
+  'jpmorgan' => t('JP Morgan'),
+  'paypal' => t('PayPal EFT'),
+  'square' => t('Square'),
+  'trilogy' => t('Trilogy'),
 ),
   );
   $form['log'] = array(
 '#markup' => $log_html,
   );
 
-  $form['#attributes'] = array( 'enctype' => "multipart/form-data" );
+  $form['#attributes'] = array('enctype' => "multipart/form-data");
 
   return $form;
 }
@@ -133,88 +133,88 @@
  * @param $file_name
  */
 function offline2civicrm_download_csv($file_name) {
-global $user;
-if (!preg_match ('/\.' . $user->uid . '$/', $file_name)) {
-  return drupal_access_denied();
-}
-$fileURI = 'temporary://' . $file_name . '.csv';
-if ($file_name && file_exists($fileURI)) {
-  file_transfer($fileURI, array(
-'Content-Type' => 'text/csv',
-'Content-Disposition' => 'attachment; filename="' . $file_name . 
'.csv"',
-  ));
-}
-else {
-  return drupal_access_denied();
-}
+  global $user;
+  if (!preg_match('/\.' . $user->uid . '$/', $file_name)) {
+return drupal_access_denied();
+  }
+  $fileURI = 'temporary://' . $file_name . '.csv';
+  if ($file_name && file_exists($fileURI)) {
+file_transfer($fileURI, array(
+  'Content-Type' => 'text/csv',
+  'Content-Disposition' => 'attachment; filename="' . $file_name . '.csv"',
+));
+  }
+  else {
+return drupal_access_denied();
+  }
 }
 
-function offline2civicrm_import_checks_form_submit( $form, $form_state ) {
-  wmf_common_create_smashpig_context( 'offline2civicrm' );
-  if ( !empty( $form_state['values']['import_upload_submit'] ) ) {
+function offline2civicrm_import_checks_form_submit($form, $form_state) {
+  wmf_common_create_smashpig_context('offline2civicrm');
+  if 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: ganeti: create profiles, split monitoring/firewall classes

2017-11-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392564 )

Change subject: ganeti: create profiles, split monitoring/firewall classes
..

ganeti: create profiles, split monitoring/firewall classes

Change-Id: Ic930b7e63644acc74aa6b803a9360628803dc782
---
A modules/profile/manifests/ganeti.pp
A modules/profile/manifests/ganeti/firewall.pp
A modules/profile/manifests/ganeti/monitoring.pp
M modules/role/manifests/ganeti.pp
4 files changed, 113 insertions(+), 94 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/392564/1

diff --git a/modules/profile/manifests/ganeti.pp 
b/modules/profile/manifests/ganeti.pp
new file mode 100644
index 000..e20048e
--- /dev/null
+++ b/modules/profile/manifests/ganeti.pp
@@ -0,0 +1,33 @@
+class profile::ganeti {
+
+# Ganeti hosts have KSM enabled. So get stats about it
+diamond::collector { 'KSM': }
+
+# Ganeti needs intracluster SSH root access
+ssh::userkey { 'root-ganeti':
+ensure => present,
+user   => 'root',
+skey   => 'ganeti',
+source => 'puppet:///modules/role/ganeti/id_dsa.pub',
+}
+
+# And the private key
+file { '/root/.ssh/id_dsa':
+ensure=> present,
+owner => 'root',
+group => 'root',
+mode  => '0400',
+content   => secret('ganeti/id_dsa'),
+show_diff => false,
+}
+# This is here for completeness
+file { '/root/.ssh/id_dsa.pub':
+ensure => present,
+owner  => 'root',
+group  => 'root',
+mode   => '0400',
+source => 'puppet:///modules/role/ganeti/id_dsa.pub',
+}
+
+   class {'::ganeti': }
+}
diff --git a/modules/profile/manifests/ganeti/firewall.pp 
b/modules/profile/manifests/ganeti/firewall.pp
new file mode 100644
index 000..80566ae
--- /dev/null
+++ b/modules/profile/manifests/ganeti/firewall.pp
@@ -0,0 +1,57 @@
+class profile::ganeti::firewall {
+
+# Interpolate the ganeti_cluster fact to get the list of nodes in a
+# cluster
+$ganeti_nodes = hiera("ganeti::${::ganeti_cluster}::nodes")
+$ganeti_ferm_nodes = join($ganeti_nodes, ' ')
+
+# Same ganeti actions require SSH
+ferm::service { 'ganeti_ssh_cluster':
+proto  => 'tcp',
+port   => 'ssh',
+srange => "@resolve((${ganeti_ferm_nodes}))",
+}
+
+# RAPI is the API of ganeti
+ferm::service { 'ganeti_rapi_cluster':
+proto  => 'tcp',
+port   => 5080,
+srange => "@resolve((${ganeti_ferm_nodes}))",
+}
+
+# Ganeti noded is responsible for all cluster/node actions
+ferm::service { 'ganeti_noded_cluster':
+proto  => 'tcp',
+port   => 1811,
+srange => "@resolve((${ganeti_ferm_nodes}))",
+}
+
+# Ganeti confd provides a HA and fast way to query cluster configuration
+ferm::service { 'ganeti_confd_cluster':
+proto  => 'udp',
+port   => 1814,
+srange => "@resolve((${ganeti_ferm_nodes}))",
+}
+
+# Ganeti mond is the monitoring daemon. Data is available via port 1815
+ferm::service { 'ganeti_mond_cluster':
+proto  => 'tcp',
+port   => 1815,
+srange => "@resolve((${ganeti_ferm_nodes}))",
+}
+
+# DRBD is used for HA of disk images. Port range for ganeti is
+# 11000-14999
+ferm::service { 'ganeti_drbd':
+proto  => 'tcp',
+port   => '11000:14999',
+srange => "@resolve((${ganeti_ferm_nodes}))",
+}
+
+# Migration is done over TCP port
+ferm::service { 'ganeti_migration':
+proto  => 'tcp',
+port   => 8102,
+srange => "@resolve((${ganeti_ferm_nodes}))",
+}
+}
diff --git a/modules/profile/manifests/ganeti/monitoring.pp 
b/modules/profile/manifests/ganeti/monitoring.pp
new file mode 100644
index 000..98ea2fc
--- /dev/null
+++ b/modules/profile/manifests/ganeti/monitoring.pp
@@ -0,0 +1,18 @@
+class profile::ganeti::monitoring {
+
+nrpe::monitor_service{ 'ganeti-noded':
+description  => 'ganeti-noded running',
+nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 1:2 -c 1:2 -u 
root -C ganeti-noded'
+}
+
+nrpe::monitor_service{ 'ganeti-confd':
+description  => 'ganeti-confd running',
+nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u 
gnt-confd -C ganeti-confd'
+}
+
+nrpe::monitor_service{ 'ganeti-mond':
+description  => 'ganeti-mond running',
+nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u 
root -C ganeti-mond'
+}
+
+}
diff --git a/modules/role/manifests/ganeti.pp b/modules/role/manifests/ganeti.pp
index 0d4075f..9a7e159 100644
--- a/modules/role/manifests/ganeti.pp
+++ b/modules/role/manifests/ganeti.pp
@@ -1,107 +1,18 @@
 # Role classes for ganeti
 class role::ganeti {
-include ::standard
-include ::ganeti
-# Ganeti 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: test: use profile::base::firewall

2017-11-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392563 )

Change subject: test: use profile::base::firewall
..


test: use profile::base::firewall

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

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



diff --git a/modules/role/manifests/test.pp b/modules/role/manifests/test.pp
index 85c9c6c..e6f584e 100644
--- a/modules/role/manifests/test.pp
+++ b/modules/role/manifests/test.pp
@@ -3,7 +3,7 @@
 # filtertags: labs-project-puppet
 class role::test {
 include ::standard
-include ::base::firewall
+include ::profile::base::firewall
 
 system::role { 'test': description => 'Unpuppetised system for testing' }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5d2788d7d9000923e926b659356363ea638fa3a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
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]: test: use profile::base::firewall

2017-11-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392563 )

Change subject: test: use profile::base::firewall
..

test: use profile::base::firewall

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/63/392563/1

diff --git a/modules/role/manifests/test.pp b/modules/role/manifests/test.pp
index 85c9c6c..e6f584e 100644
--- a/modules/role/manifests/test.pp
+++ b/modules/role/manifests/test.pp
@@ -3,7 +3,7 @@
 # filtertags: labs-project-puppet
 class role::test {
 include ::standard
-include ::base::firewall
+include ::profile::base::firewall
 
 system::role { 'test': description => 'Unpuppetised system for testing' }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5d2788d7d9000923e926b659356363ea638fa3a
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/puppet[production]: mw_rc_irc: use ::profile::base::firewall

2017-11-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392562 )

Change subject: mw_rc_irc: use ::profile::base::firewall
..


mw_rc_irc: use ::profile::base::firewall

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

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



diff --git a/modules/role/manifests/mw_rc_irc.pp 
b/modules/role/manifests/mw_rc_irc.pp
index d8b28d0..8480360 100644
--- a/modules/role/manifests/mw_rc_irc.pp
+++ b/modules/role/manifests/mw_rc_irc.pp
@@ -4,7 +4,7 @@
 system::role { 'mw_rc_irc': description => 'MW Changes IRC Broadcast 
Server' }
 
 include ::standard
-include ::base::firewall
+include ::profile::base::firewall
 include ::passwords::udpmxircecho
 include ::profile::mw_rc_irc
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0b1aee4a572f5b3240c04da79ba89e10584470e
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
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]: mw_rc_irc: use ::profile::base::firewall

2017-11-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392562 )

Change subject: mw_rc_irc: use ::profile::base::firewall
..

mw_rc_irc: use ::profile::base::firewall

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/62/392562/1

diff --git a/modules/role/manifests/mw_rc_irc.pp 
b/modules/role/manifests/mw_rc_irc.pp
index d8b28d0..8480360 100644
--- a/modules/role/manifests/mw_rc_irc.pp
+++ b/modules/role/manifests/mw_rc_irc.pp
@@ -4,7 +4,7 @@
 system::role { 'mw_rc_irc': description => 'MW Changes IRC Broadcast 
Server' }
 
 include ::standard
-include ::base::firewall
+include ::profile::base::firewall
 include ::passwords::udpmxircecho
 include ::profile::mw_rc_irc
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0b1aee4a572f5b3240c04da79ba89e10584470e
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] mediawiki/core[master]: Reduce chance of pointless lock acquistion failures during e...

2017-11-20 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392560 )

Change subject: Reduce chance of pointless lock acquistion failures during edit 
stashing
..

Reduce chance of pointless lock acquistion failures during edit stashing

Bug: T180793
Change-Id: Ibc29a20329113c3ee54fd48cfe86ca8251e8098d
---
M includes/api/ApiStashEdit.php
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/60/392560/1

diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 4bd6a3f..fbe80ce 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -181,9 +181,14 @@
$title = $page->getTitle();
$key = self::getStashKey( $title, self::getContentHash( 
$content ), $user );
 
-   // Use the master DB for fast blocking locks
+   // Use the master DB to allow for fast blocking locks on the 
"save path" where this
+   // value might actually be used to complete a page edit. If the 
edit submission request
+   // happens before this edit stash requests finishes, then the 
submission will block until
+   // the stash request finishes parsing. For the lock acquisition 
below, there is not much
+   // need to duplicate parsing of the same content/user/summary 
bundle, so try to avoid
+   // blocking at all here.
$dbw = wfGetDB( DB_MASTER );
-   if ( !$dbw->lock( $key, __METHOD__, 1 ) ) {
+   if ( !$dbw->lockIsFree( $key, __METHOD__ ) || $dbw->lock( $key, 
__METHOD__, 1 ) ) {
// De-duplicate requests on the same key
return self::ERROR_BUSY;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc29a20329113c3ee54fd48cfe86ca8251e8098d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: multiversion: Assume --wiki=aawiki for purgeUrls.php

2017-11-20 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392561 )

Change subject: multiversion: Assume --wiki=aawiki for purgeUrls.php
..

multiversion: Assume --wiki=aawiki for purgeUrls.php

Similar to purgeList.php.

Change-Id: Id2d2edcd67890a4fe66d96413c5e745a44015b35
---
M multiversion/MWScript.php
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/multiversion/MWScript.php b/multiversion/MWScript.php
index 869c587..47c60eb 100644
--- a/multiversion/MWScript.php
+++ b/multiversion/MWScript.php
@@ -66,11 +66,12 @@
# other maintenance scripts we don't care what wiki DB is used...
$wikiless = [
'maintenance/purgeList.php',
-   'extensions/WikimediaMaintenance/addWiki.php', // 1.19
-   'extensions/WikimediaMaintenance/dumpInterwiki.php', // 1.19
+   'extensions/WikimediaMaintenance/addWiki.php',
+   'extensions/WikimediaMaintenance/dumpInterwiki.php',
'extensions/WikimediaMaintenance/getJobQueueLengths.php',
-   'extensions/WikimediaMaintenance/rebuildInterwiki.php', // 1.19
+   'extensions/WikimediaMaintenance/rebuildInterwiki.php',
'extensions/WikimediaMaintenance/filebackend/setZoneAccess.php',
+   'extensions/WikimediaMaintenance/purgeUrls.php',
'maintenance/mctest.php',
'maintenance/mcc.php',
];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2d2edcd67890a4fe66d96413c5e745a44015b35
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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/core[master]: objectcache: Make MemcachedBagOStuff::makeKeyInternal always...

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392544 )

Change subject: objectcache: Make MemcachedBagOStuff::makeKeyInternal always 
have a key class
..


objectcache: Make MemcachedBagOStuff::makeKeyInternal always have a key class

Even if a key is too long and shortened, it should still have some key class.

Change-Id: I006b6b03ad1302e9e49362bbd051332bc6105837
---
M includes/libs/objectcache/MemcachedBagOStuff.php
M tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/libs/objectcache/MemcachedBagOStuff.php 
b/includes/libs/objectcache/MemcachedBagOStuff.php
index 0188991..f7bf86b 100644
--- a/includes/libs/objectcache/MemcachedBagOStuff.php
+++ b/includes/libs/objectcache/MemcachedBagOStuff.php
@@ -137,7 +137,7 @@
);
 
if ( $charsLeft < 0 ) {
-   return $keyspace . ':##' . md5( implode( ':', $args ) );
+   return $keyspace . ':BagOStuff-long-key:##' . md5( 
implode( ':', $args ) );
}
 
return $keyspace . ':' . implode( ':', $args );
diff --git a/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php 
b/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
index 7814b83..9cb2f94 100644
--- a/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
+++ b/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
@@ -42,7 +42,7 @@
);
 
$this->assertEquals(
-   'test:##dc89dcb43b28614da27660240af478b5',
+   
'test:BagOStuff-long-key:##dc89dcb43b28614da27660240af478b5',
$this->cache->makeKey( '핖핧핖핟', '핚핗', '함핖', '필픻ퟝ', 
'핖핒핔학',
'핒핣하핦핞핖핟핥', '핥학핚핤', '한핖핪', '함할핦핝핕', '핤핥핚핝핝', 
'핓핖', '핥할할', '핝할핟하' )
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I006b6b03ad1302e9e49362bbd051332bc6105837
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
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/mediawiki-config[master]: noc: Remove more unused styles/images and update Vector

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392557 )

Change subject: noc: Remove more unused styles/images and update Vector
..


noc: Remove more unused styles/images and update Vector

No visible changes except for the underline going away from
the two H2 headings on the noc/index.html page, which aligns
with regular Vector.

All other changes are visual no-ops.

* Replace PNG images with gradients (match current Vector).
  Fallback to transparent or solid background color as needed.

* Remove unused style rules.

* Remove unused images.

* Remove redundant  element.

* Replace  element with gradient and padding
  directly on body.

* Replace need for  by merging
  its styles with  (and update padding
  to remain the effectively same, given it is relative to
  font-size).

Change-Id: Iae0cdeaf643b921ab58e61bc096fe4711f81f5e9
---
D docroot/noc/css/images/border.png
D docroot/noc/css/images/bullet-icon.png
D docroot/noc/css/images/page-base.png
D docroot/noc/css/images/page-fade.png
M docroot/noc/css/vector.css
M docroot/noc/index.html
6 files changed, 28 insertions(+), 72 deletions(-)

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



diff --git a/docroot/noc/css/images/border.png 
b/docroot/noc/css/images/border.png
deleted file mode 100644
index 54b4792..000
--- a/docroot/noc/css/images/border.png
+++ /dev/null
Binary files differ
diff --git a/docroot/noc/css/images/bullet-icon.png 
b/docroot/noc/css/images/bullet-icon.png
deleted file mode 100644
index cb925a7..000
--- a/docroot/noc/css/images/bullet-icon.png
+++ /dev/null
Binary files differ
diff --git a/docroot/noc/css/images/page-base.png 
b/docroot/noc/css/images/page-base.png
deleted file mode 100644
index 17d02a7..000
--- a/docroot/noc/css/images/page-base.png
+++ /dev/null
Binary files differ
diff --git a/docroot/noc/css/images/page-fade.png 
b/docroot/noc/css/images/page-fade.png
deleted file mode 100644
index 815a048..000
--- a/docroot/noc/css/images/page-fade.png
+++ /dev/null
Binary files differ
diff --git a/docroot/noc/css/vector.css b/docroot/noc/css/vector.css
index ec9a181..94029dd 100644
--- a/docroot/noc/css/vector.css
+++ b/docroot/noc/css/vector.css
@@ -1,37 +1,29 @@
 /* Framework */
 body {
-   background-color: #f3f3f3;
-   background-image: url(images/page-base.png);
+   background-color: #f6f6f6;
+   background-image: -webkit-linear-gradient(top, #ff 2.5em, #f6f6f6 
5em);
+   background-image: -moz-linear-gradient(top, #ff 2.5em, #f6f6f6 5em);
+   background-image: linear-gradient(#ff 2.5em, #f6f6f6 5em);
 
-   /* Vector: No outer padding */
-   padding: 0;
-   /* Vector: Larger base size, bodyContent resets */
+   /* Vector: Layout */
+   padding-top: 2.5em; /* Like Vector div#mw-page-base */
+   padding-right: 0;
+   padding-bottom: 0;
+   padding-left: 10em; /* Like Vector div#content */
+
+   /* Vector: Larger base size #bodyContent resets */
font-size: 100%;
 }
-/* Head */
-#page-base {
-   height: 2.5em;
-   background-color: white;
-   background-image: url(images/page-fade.png);
-   background-position: bottom left;
-   background-repeat: repeat-x;
-}
-#head-base {
-   margin-top: -2.5em;
-   margin-left: 10em;
-   height: 2.5em;
-   background-image: url(images/border.png);
-   background-position: bottom left;
-   background-repeat: repeat-x;
-}
 /* Content */
-#content-container {
-   margin-left: 10em;
-   padding: 1em;
-   background-image: url(images/border.png);
-   background-position: top left;
-   background-repeat: repeat-y;
+#bodyContent {
background-color: white;
+   border: 1px solid #a7d7f9;
+   border-right-width: 0;
+   padding: 1.25em;
+   font-size: 0.8em;
+   position: relative;
+   width: 100%;
+   line-height: 1.5em;
 }
 
 /* Panel */
@@ -90,9 +82,6 @@
margin-left: 10em;
margin-top: 0;
padding: 0.75em;
-   background-image: url(images/border.png);
-   background-position: top left;
-   background-repeat: repeat-x;
 }
 #footer ul {
list-style: none;
@@ -146,23 +135,6 @@
 }
 
 
-/* Content */
-#content-container {
-   line-height: 1.5em;
-}
-#bodyContent {
-   font-size: 0.8em;
-   position: relative;
-   width: 100%;
-   line-height: 1.5em;
-}
-#bodyContent table {
-   font-size: 100%;
-   border: none;
-}
-#bodyContent td, #bodyContent th {
-   border: none;
-}
 /* Inline Elements */
 hr {
height: 1px;
@@ -183,10 +155,6 @@
background: none;
cursor: help;
 }
-q {
-   font-family: Times, "Times New Roman", serif;
-   font-style: italic;
-}
 code {
background-color: #f9f9f9;
 }
@@ -197,17 +165,11 @@
background-color: #f9f9f9;
line-height: 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make CategoryMembershipChangeJob query more readable and use...

2017-11-20 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392559 )

Change subject: Make CategoryMembershipChangeJob query more readable and use 
exactly equality
..

Make CategoryMembershipChangeJob query more readable and use exactly equality

Previously, the INNER JOIN had "rc_timestamp >= rev_timestamp" which complicates
query planning. Instead just use EXISTS.

Bug: T180793
Change-Id: I1e9ae7c2ce0f95484e09e867550283d816d151f0
---
M includes/jobqueue/jobs/CategoryMembershipChangeJob.php
1 file changed, 14 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/59/392559/1

diff --git a/includes/jobqueue/jobs/CategoryMembershipChangeJob.php 
b/includes/jobqueue/jobs/CategoryMembershipChangeJob.php
index 55c1367..4251a25 100644
--- a/includes/jobqueue/jobs/CategoryMembershipChangeJob.php
+++ b/includes/jobqueue/jobs/CategoryMembershipChangeJob.php
@@ -25,6 +25,8 @@
 /**
  * Job to add recent change entries mentioning category membership changes
  *
+ * This allows users to easily scan categories for recent page membership 
changes
+ *
  * Parameters include:
  *   - pageId : page ID
  *   - revTimestamp : timestamp of the triggering revision
@@ -81,28 +83,28 @@
// between COMMIT and actual enqueueing of the 
CategoryMembershipChangeJob job.
$cutoffUnix -= self::ENQUEUE_FUDGE_SEC;
 
-   // Get the newest revision that has a SRC_CATEGORIZE row...
+   // Get the newest page revision that has a SRC_CATEGORIZE row.
+   // Assume that category changes before it were already handled.
$row = $dbr->selectRow(
-   [ 'revision', 'recentchanges' ],
+   'revision',
[ 'rev_timestamp', 'rev_id' ],
[
'rev_page' => $page->getId(),
-   'rev_timestamp >= ' . $dbr->addQuotes( 
$dbr->timestamp( $cutoffUnix ) )
-   ],
-   __METHOD__,
-   [ 'ORDER BY' => 'rev_timestamp DESC, rev_id DESC' ],
-   [
-   'recentchanges' => [
-   'INNER JOIN',
+   'rev_timestamp >= ' . $dbr->addQuotes( 
$dbr->timestamp( $cutoffUnix ) ),
+   'EXISTS (' . $dbr->selectSQLText(
+   'recentchanges',
+   '1',
[
'rc_this_oldid = rev_id',
'rc_source' => 
RecentChange::SRC_CATEGORIZE,
// Allow rc_cur_id or 
rc_timestamp index usage
'rc_cur_id = rev_page',
-   'rc_timestamp >= rev_timestamp'
+   'rc_timestamp = rev_timestamp'
]
-   ]
-   ]
+   ) . ')'
+   ],
+   __METHOD__,
+   [ 'ORDER BY' => 'rev_timestamp DESC, rev_id DESC' ]
);
// Only consider revisions newer than any such revision
if ( $row ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e9ae7c2ce0f95484e09e867550283d816d151f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Reduce lag waiting time spent in CategoryMembershipUpdateJob...

2017-11-20 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392558 )

Change subject: Reduce lag waiting time spent in CategoryMembershipUpdateJob 
critical section
..

Reduce lag waiting time spent in CategoryMembershipUpdateJob critical section

Bug: T180793
Change-Id: Icfe8dd16f4194c5d4f88d7547f732acae8b1cfe2
---
M includes/jobqueue/jobs/CategoryMembershipChangeJob.php
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/392558/1

diff --git a/includes/jobqueue/jobs/CategoryMembershipChangeJob.php 
b/includes/jobqueue/jobs/CategoryMembershipChangeJob.php
index 55c1367..cc81a96 100644
--- a/includes/jobqueue/jobs/CategoryMembershipChangeJob.php
+++ b/includes/jobqueue/jobs/CategoryMembershipChangeJob.php
@@ -59,6 +59,13 @@
return false; // deleted?
}
 
+   // Cut down on the time spent in safeWaitForMasterPos() in the 
critical section
+   $dbr = $lb->getConnection( DB_REPLICA, [ 'recentchanges' ] );
+   if ( !$lb->safeWaitForMasterPos( $dbr ) ) {
+   $this->setLastError( "Timed out while pre-waiting for 
replica DB to catch up" );
+   return false;
+   }
+
// Use a named lock so that jobs for this page see each others' 
changes
$lockKey = "CategoryMembershipUpdates:{$page->getId()}";
$scopedLock = $dbw->getScopedLockAndFlush( $lockKey, 
__METHOD__, 3 );
@@ -67,8 +74,7 @@
return false;
}
 
-   $dbr = $lb->getConnection( DB_REPLICA, [ 'recentchanges' ] );
-   // Wait till the replica DB is caught up so that jobs for this 
page see each others' changes
+   // Wait till replica DB is caught up so that jobs for this page 
see each others' changes
if ( !$lb->safeWaitForMasterPos( $dbr ) ) {
$this->setLastError( "Timed out while waiting for 
replica DB to catch up" );
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icfe8dd16f4194c5d4f88d7547f732acae8b1cfe2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: noc: Remove more unused styles/images and update Vector

2017-11-20 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392557 )

Change subject: noc: Remove more unused styles/images and update Vector
..

noc: Remove more unused styles/images and update Vector

No visible changes except for the underline going away from
the two H2 headings on the noc/index.html page, which aligns
with regular Vector.

All other changes are visual no-ops.

* Replace PNG images with gradients (match current Vector).
  Fallback to transparent or solid background color as needed.

* Remove unused style rules.

* Remove unused images.

* Remove redundant  element.

* Replace  element with gradient and padding
  directly on body.

* Replace need for  by merging
  its styles with  (and update padding
  to remain the effectively same, given it is relative to
  font-size).

Change-Id: Iae0cdeaf643b921ab58e61bc096fe4711f81f5e9
---
D docroot/noc/css/images/border.png
D docroot/noc/css/images/bullet-icon.png
D docroot/noc/css/images/page-base.png
D docroot/noc/css/images/page-fade.png
M docroot/noc/css/vector.css
M docroot/noc/index.html
6 files changed, 28 insertions(+), 72 deletions(-)


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

diff --git a/docroot/noc/css/images/border.png 
b/docroot/noc/css/images/border.png
deleted file mode 100644
index 54b4792..000
--- a/docroot/noc/css/images/border.png
+++ /dev/null
Binary files differ
diff --git a/docroot/noc/css/images/bullet-icon.png 
b/docroot/noc/css/images/bullet-icon.png
deleted file mode 100644
index cb925a7..000
--- a/docroot/noc/css/images/bullet-icon.png
+++ /dev/null
Binary files differ
diff --git a/docroot/noc/css/images/page-base.png 
b/docroot/noc/css/images/page-base.png
deleted file mode 100644
index 17d02a7..000
--- a/docroot/noc/css/images/page-base.png
+++ /dev/null
Binary files differ
diff --git a/docroot/noc/css/images/page-fade.png 
b/docroot/noc/css/images/page-fade.png
deleted file mode 100644
index 815a048..000
--- a/docroot/noc/css/images/page-fade.png
+++ /dev/null
Binary files differ
diff --git a/docroot/noc/css/vector.css b/docroot/noc/css/vector.css
index ec9a181..94029dd 100644
--- a/docroot/noc/css/vector.css
+++ b/docroot/noc/css/vector.css
@@ -1,37 +1,29 @@
 /* Framework */
 body {
-   background-color: #f3f3f3;
-   background-image: url(images/page-base.png);
+   background-color: #f6f6f6;
+   background-image: -webkit-linear-gradient(top, #ff 2.5em, #f6f6f6 
5em);
+   background-image: -moz-linear-gradient(top, #ff 2.5em, #f6f6f6 5em);
+   background-image: linear-gradient(#ff 2.5em, #f6f6f6 5em);
 
-   /* Vector: No outer padding */
-   padding: 0;
-   /* Vector: Larger base size, bodyContent resets */
+   /* Vector: Layout */
+   padding-top: 2.5em; /* Like Vector div#mw-page-base */
+   padding-right: 0;
+   padding-bottom: 0;
+   padding-left: 10em; /* Like Vector div#content */
+
+   /* Vector: Larger base size #bodyContent resets */
font-size: 100%;
 }
-/* Head */
-#page-base {
-   height: 2.5em;
-   background-color: white;
-   background-image: url(images/page-fade.png);
-   background-position: bottom left;
-   background-repeat: repeat-x;
-}
-#head-base {
-   margin-top: -2.5em;
-   margin-left: 10em;
-   height: 2.5em;
-   background-image: url(images/border.png);
-   background-position: bottom left;
-   background-repeat: repeat-x;
-}
 /* Content */
-#content-container {
-   margin-left: 10em;
-   padding: 1em;
-   background-image: url(images/border.png);
-   background-position: top left;
-   background-repeat: repeat-y;
+#bodyContent {
background-color: white;
+   border: 1px solid #a7d7f9;
+   border-right-width: 0;
+   padding: 1.25em;
+   font-size: 0.8em;
+   position: relative;
+   width: 100%;
+   line-height: 1.5em;
 }
 
 /* Panel */
@@ -90,9 +82,6 @@
margin-left: 10em;
margin-top: 0;
padding: 0.75em;
-   background-image: url(images/border.png);
-   background-position: top left;
-   background-repeat: repeat-x;
 }
 #footer ul {
list-style: none;
@@ -146,23 +135,6 @@
 }
 
 
-/* Content */
-#content-container {
-   line-height: 1.5em;
-}
-#bodyContent {
-   font-size: 0.8em;
-   position: relative;
-   width: 100%;
-   line-height: 1.5em;
-}
-#bodyContent table {
-   font-size: 100%;
-   border: none;
-}
-#bodyContent td, #bodyContent th {
-   border: none;
-}
 /* Inline Elements */
 hr {
height: 1px;
@@ -183,10 +155,6 @@
background: none;
cursor: help;
 }
-q {
-   font-family: Times, "Times New Roman", serif;
-   font-style: italic;
-}
 code {
background-color: #f9f9f9;
 }
@@ -197,17 +165,11 @@
background-color: #f9f9f9;

[MediaWiki-commits] [Gerrit] mediawiki...ThrottleOverride[master]: Use WANCache for throttle lookups

2017-11-20 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392556 )

Change subject: Use WANCache for throttle lookups
..

Use WANCache for throttle lookups

Check for throttle records in the configured WANCache instance and cache
new database lookup results on cache miss. Cached data is not purged
when the backing database record is edited, so the cache duration is low
(1 hour).

Bug: T147362
Change-Id: I11aa1eb5c13edb3638970fcba4d41a689bc106f7
---
D ThrottleOverride.hooks.php
A ThrottleOverrideHooks.php
M extension.json
3 files changed, 161 insertions(+), 121 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ThrottleOverride 
refs/changes/56/392556/1

diff --git a/ThrottleOverride.hooks.php b/ThrottleOverride.hooks.php
deleted file mode 100644
index c52a353..000
--- a/ThrottleOverride.hooks.php
+++ /dev/null
@@ -1,120 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
- */
-
-use MediaWiki\Logger\LoggerFactory;
-
-class ThrottleOverrideHooks {
-   /**
-* @param string $ip
-* @return bool
-*/
-   public static function onExemptFromAccountCreationThrottle( $ip ) {
-   $result = false;
-   $user = RequestContext::getMain()->getUser();
-   return self::onPingLimiter( $user, 'actcreate', $result, $ip );
-   }
-
-   /**
-* @throws InvalidArgumentException If $action is invalid
-*
-* @param User $user
-* @param string $action
-* @param $result
-* @param null|string $ip
-*
-* @return bool
-*/
-   public static function onPingLimiter( User &$user, $action, &$result, 
$ip = null ) {
-   global $wgRateLimits;
-
-   if ( $action !== 'actcreate' && !isset( $wgRateLimits[$action] 
) ) {
-   return true;
-   }
-
-   $dbr = wfGetDB( DB_REPLICA );
-
-   if ( $user->isAnon() && IP::isValid( $user->getName() ) ) {
-   $ip = $user->getName();
-   } elseif ( $ip === null ) {
-   $ip = RequestContext::getMain()->getRequest()->getIP();
-   }
-
-   $quotedIp = $dbr->addQuotes( IP::toHex( $ip ) );
-   $conds = [
-   "thr_range_start <= $quotedIp",
-   "thr_range_end >= $quotedIp",
-   'thr_type' . $dbr->buildLike( $dbr->anyString(), 
$action, $dbr->anyString() )
-   ];
-
-   $expiry = $dbr->selectField(
-   'throttle_override',
-   'thr_expiry',
-   $conds,
-   __METHOD__,
-   [ 'ORDER BY' => 'thr_expiry DESC' ]
-   );
-
-   if ( $expiry > wfTimestampNow() ) {
-   // Valid exemption. Disable the throttle.
-
-   $logger = LoggerFactory::getInstance( 
'throttleOverride' );
-   $logger->info( 'User {user} (ip: {ip}) exempted from 
throttle {action}', [
-   'user' => $user,
-   'ip' => $ip,
-   'action' => $action,
-   ] );
-
-   $result = false;
-   return false;
-   } elseif ( $expiry !== false ) {
-   // Expired exemption. Delete it from the DB.
-   wfGetDB( DB_MASTER )->delete(
-   'throttle_override',
-   $conds,
-   __METHOD__
-   );
-   }
-
-   return true;
-   }
-
-   /**
-* @param DatabaseUpdater $updater
-* @return bool
-*/
-   public static function onLoadExtensionSchemaUpdates( DatabaseUpdater 
$updater ) {
-   $updater->addExtensionTable(
-   'throttle_override',
-   __DIR__ . '/patches/table.sql'
-   );
-   $updater->addExtensionIndex(
-   'throttle_override',
-   'thr_expiry',
-   __DIR__ . '/patches/expiry_index.sql'
-  

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Move basic declaration of epochtime to parent.

2017-11-20 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392555 )

Change subject: Move basic declaration of epochtime to parent.
..

Move basic declaration of epochtime to parent.

Several classes are declaring this var & setting it to the same thing. Let's put
a basic declaration in the parent & override when needed.

(towards) Bug: T172423

Change-Id: I3da4f44ea84f6248877d8d6fd710ea4dcfbd6e62
---
M sites/all/modules/offline2civicrm/tests/BenevityTest.php
M sites/all/modules/offline2civicrm/tests/CoinBaseTest.php
M sites/all/modules/offline2civicrm/tests/JpMorganFileTest.php
M sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php
4 files changed, 7 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/55/392555/1

diff --git a/sites/all/modules/offline2civicrm/tests/BenevityTest.php 
b/sites/all/modules/offline2civicrm/tests/BenevityTest.php
index 8e1ff01..110bd0d 100644
--- a/sites/all/modules/offline2civicrm/tests/BenevityTest.php
+++ b/sites/all/modules/offline2civicrm/tests/BenevityTest.php
@@ -11,12 +11,9 @@
  */
 class BenevityTest extends BaseChecksFileTest {
 
-  protected $epochtime;
-
   function setUp() {
 parent::setUp();
 
-$this->epochtime = wmf_common_date_parse_string('2016-09-15');
 $this->setExchangeRates($this->epochtime, array('USD' => 1, 'BTC' => 3));
 $this->gateway = 'benevity';
 civicrm_initialize();
diff --git a/sites/all/modules/offline2civicrm/tests/CoinBaseTest.php 
b/sites/all/modules/offline2civicrm/tests/CoinBaseTest.php
index 0c71bbf..e21930b 100644
--- a/sites/all/modules/offline2civicrm/tests/CoinBaseTest.php
+++ b/sites/all/modules/offline2civicrm/tests/CoinBaseTest.php
@@ -6,12 +6,8 @@
  */
 class CoinBaseTest extends BaseChecksFileTest {
 
-  protected $epochtime;
-
   function setUp() {
 parent::setUp();
-
-$this->epochtime = wmf_common_date_parse_string('2016-09-15');
 $this->setExchangeRates($this->epochtime, array('USD' => 1, 'BTC' => 3));
 $this->gateway = 'coinbase';
   }
diff --git a/sites/all/modules/offline2civicrm/tests/JpMorganFileTest.php 
b/sites/all/modules/offline2civicrm/tests/JpMorganFileTest.php
index 411075c..cd9d0f3 100644
--- a/sites/all/modules/offline2civicrm/tests/JpMorganFileTest.php
+++ b/sites/all/modules/offline2civicrm/tests/JpMorganFileTest.php
@@ -6,8 +6,6 @@
  */
 class JpMorganFileTest extends BaseChecksFileTest {
 
-  protected $epochtime;
-
   protected $strtime;
 
   function setUp() {
diff --git 
a/sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php 
b/sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php
index 3060584..d69e203 100644
--- a/sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php
+++ b/sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php
@@ -19,6 +19,13 @@
*/
   protected $trxn_id;
 
+  protected $epochtime;
+
+  function setUp() {
+parent::setUp();
+$this->epochtime = wmf_common_date_parse_string('2016-09-15');
+  }
+
   /**
* Test and remove some dynamic fields, to simplify test fixtures.
*/

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Enable configuration for aliasing namespaces

2017-11-20 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392554 )

Change subject: Enable configuration for aliasing namespaces
..

Enable configuration for aliasing namespaces

For now, uses $data_dir/aliases.map as the map.
Also, allows the admins to restart nginx since
updating the map requires manual nginx restart.
Unfortunately, I don't see any way to make nginx
auto-load this file on change.

Bug: T181016
Change-Id: I1244b8c1da1dcdd13d38421e017f6c6d9a263cab
---
M modules/admin/data/data.yaml
M modules/wdqs/manifests/gui.pp
M modules/wdqs/templates/nginx.erb
3 files changed, 32 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/392554/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index b35cc2d..9636161 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -369,6 +369,7 @@
 members: [smalyshev, hoo]
 privileges: ['ALL = NOPASSWD: /usr/sbin/service wdqs-blazegraph *',
  'ALL = NOPASSWD: /usr/sbin/service wdqs-updater *',
+ 'ALL = NOPASSWD: /usr/sbin/service nginx *',
  'ALL = NOPASSWD: /bin/systemctl enable wdqs-updater',
  'ALL = NOPASSWD: /bin/systemctl disable wdqs-updater',
  'ALL = NOPASSWD: /bin/systemctl mask wdqs-updater',
diff --git a/modules/wdqs/manifests/gui.pp b/modules/wdqs/manifests/gui.pp
index d39dc1c..f593e1c 100644
--- a/modules/wdqs/manifests/gui.pp
+++ b/modules/wdqs/manifests/gui.pp
@@ -5,17 +5,29 @@
 # == Parameters:
 # - $package_dir:  Directory where the service is installed.
 # GUI files are expected to be under its gui/ directory.
-# - $log_aggregator: Where to send the logs for the service in syslog format.
+# - $data_dir: Where the data is installed.
+# - $logstash_host: Where to send the logs for the service in syslog format.
 #
 class wdqs::gui(
 $logstash_host = undef,
 $logstash_syslog_port = 10514,
 $package_dir = $::wdqs::package_dir,
+$data_dir = $::wdqs::data_dir,
+$username = $::wdqs::username,
 $port = 80,
 $additional_port = ,
 ) {
+$alias_map = "{$data_dir}/aliases.map"
 ::nginx::site { 'wdqs':
 content => template('wdqs/nginx.erb'),
+require => File[$alias_map],
+}
+
+file { $alias_map:
+ensure  => present,
+owner   => $username,
+group   => 'wikidev',
+mode=> '0664',  
 }
 
 # The directory for operator-controlled nginx flags
@@ -24,6 +36,5 @@
 owner   => 'root',
 group   => 'wikidev',
 mode=> '0775',
-require => Nginx::Site['wdqs'],
 }
 }
diff --git a/modules/wdqs/templates/nginx.erb b/modules/wdqs/templates/nginx.erb
index 23d3c5c..74c23ee 100644
--- a/modules/wdqs/templates/nginx.erb
+++ b/modules/wdqs/templates/nginx.erb
@@ -7,6 +7,14 @@
 
 limit_conn_zone $http_x_client_ip zone=byaddr:10m;
 
+# Namespace alias map: alias -> real namespace
+# http://nginx.org/en/docs/http/ngx_http_map_module.html states that
+# variables are evaluated on-demand, so we don't have to worry about 
+# resolution until later
+map $namespace $aliased {
+include <% @alias_map %>;
+}
+
 server {
 listen <%= @port %> default_server;
 listen [::]:<%= @port %> default_server;
@@ -58,7 +66,16 @@
 
 rewrite ^/sparql$ /bigdata/namespace/wdq/sparql last;
 
-location ~ ^/bigdata/(namespace/[a-zA-Z0-9]+/sparql|ldf|assets) {
+# Check whether we're dealing with a namespace
+if ( $uri ~ ^/bigdata/namespace/([a-zA-Z0-9_]+)/sparql$) {
+set $namespace $1;
+}
+# See if we have an alias. If we do, rewrite to use the alias.
+   if ( $aliased ) {
+rewrite ^ /bigdata/namespace/$aliased/sparql last;
+}
+
+location ~ ^/bigdata/(namespace/[a-zA-Z0-9_]+/sparql|ldf|assets) {
 if ( $uri ~ ^/bigdata/assets ) {
 add_header Cache-Control "public, max-age=604800, s-maxage=604800";
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[REL1_30]: Don't try to report update metrics if the response is not valid

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392001 )

Change subject: Don't try to report update metrics if the response is not valid
..


Don't try to report update metrics if the response is not valid

Seen in logs where a null $responseSet is being sent to reportUpdateMetrics.
The only case where it could happen is when we detect documentMissing
exceptions.

Bug: T180298
Change-Id: I6ca58270e2ab001fab02275636a237449c528fc8
(cherry picked from commit 81a99cd1478997d3b9764165511b14e9d4a13dff)
---
M includes/DataSender.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/DataSender.php b/includes/DataSender.php
index a539d5f..ac63484 100644
--- a/includes/DataSender.php
+++ b/includes/DataSender.php
@@ -207,10 +207,13 @@
$exception = $e;
}
 
+   // TODO: rewrite error handling, the logic here is hard to 
follow
$validResponse = $responseSet !== null && count( 
$responseSet->getBulkResponses() ) > 0;
if ( $exception === null && ( $justDocumentMissing || 
$validResponse ) ) {
$this->success();
-   $this->reportUpdateMetrics( $responseSet, $indexType, 
count( $data ) );
+   if ( $validResponse ) {
+   $this->reportUpdateMetrics( $responseSet, 
$indexType, count( $data ) );
+   }
return Status::newGood();
} else {
$this->failure( $exception );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ca58270e2ab001fab02275636a237449c528fc8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: REL1_30
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Smalyshev 
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[master]: Align whitespace to drupal std.

2017-11-20 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392553 )

Change subject: Align whitespace to drupal std.
..

Align whitespace to drupal std.

I simply ran phpstorm code formatter over the offline2civicrm/tests dir with 
code
formatting set to drupal standards & then eyeballed the changes as I committed 
them
to see that nothing weird was happening. I thought that doing the files around
the one I was about to start work on made sense

Change-Id: Ic13a06b65f85fb007c9938dccf838cf59eb2ea61
---
M sites/all/modules/offline2civicrm/tests/BenevityTest.php
M sites/all/modules/offline2civicrm/tests/ChecksFileTest.php
M sites/all/modules/offline2civicrm/tests/CoinBaseTest.php
M sites/all/modules/offline2civicrm/tests/ContributionConversionTest.php
M sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php
M sites/all/modules/offline2civicrm/tests/ForeignChecksFileTest.php
M sites/all/modules/offline2civicrm/tests/JpMorganFileTest.php
M sites/all/modules/offline2civicrm/tests/PayPalChecksFileTest.php
M sites/all/modules/offline2civicrm/tests/SquareFileTest.php
M sites/all/modules/offline2civicrm/tests/WmfImportTest.php
M sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php
M sites/all/modules/offline2civicrm/tests/includes/ChecksFileProbe.php
M sites/all/modules/offline2civicrm/tests/includes/EngageChecksFileProbe.php
M sites/all/modules/offline2civicrm/tests/includes/ForeignChecksFileProbe.php
M sites/all/modules/offline2civicrm/tests/includes/JpMorganFileProbe.php
M sites/all/modules/offline2civicrm/tests/includes/PayPalChecksFileProbe.php
M sites/all/modules/offline2civicrm/tests/includes/SquareFileProbe.php
17 files changed, 973 insertions(+), 774 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/53/392553/1

diff --git a/sites/all/modules/offline2civicrm/tests/BenevityTest.php 
b/sites/all/modules/offline2civicrm/tests/BenevityTest.php
index 78487a5..4d87605 100644
--- a/sites/all/modules/offline2civicrm/tests/BenevityTest.php
+++ b/sites/all/modules/offline2civicrm/tests/BenevityTest.php
@@ -59,9 +59,15 @@
* Test that all imports fail if the organization has multiple matches.
*/
   function testImportFailOrganizationContactAmbiguous() {
-$this->callAPISuccess('Contact', 'create', array('organization_name' => 
'Donald Duck Inc', 'contact_type' => 'Organization'));
-$this->callAPISuccess('Contact', 'create', array('organization_name' => 
'Donald Duck Inc', 'contact_type' => 'Organization'));
-$importer = new BenevityFile( __DIR__ . "/data/benevity.csv" );
+$this->callAPISuccess('Contact', 'create', array(
+  'organization_name' => 'Donald Duck Inc',
+  'contact_type' => 'Organization'
+));
+$this->callAPISuccess('Contact', 'create', array(
+  'organization_name' => 'Donald Duck Inc',
+  'contact_type' => 'Organization'
+));
+$importer = new BenevityFile(__DIR__ . "/data/benevity.csv");
 $importer->import();
 $messages = $importer->getMessages();
 $this->assertEquals('0 out of 4 rows were imported.', $messages['Result']);
@@ -71,7 +77,7 @@
* Test that all imports fail if the organization does not pre-exist.
*/
   function testImportFailNoOrganizationContactExists() {
-$importer = new BenevityFile( __DIR__ . "/data/benevity.csv" );
+$importer = new BenevityFile(__DIR__ . "/data/benevity.csv");
 $importer->import();
 $messages = $importer->getMessages();
 $this->assertEquals('0 out of 4 rows were imported.', $messages['Result']);
@@ -81,8 +87,11 @@
* Test that import passes for the contact if a single match is found.
*/
   function testImportSucceedOrganizationSingleContactExists() {
-$this->callAPISuccess('Contact', 'create', array('organization_name' => 
'Donald Duck Inc', 'contact_type' => 'Organization'));
-$importer = new BenevityFile( __DIR__ . "/data/benevity.csv" );
+$this->callAPISuccess('Contact', 'create', array(
+  'organization_name' => 'Donald Duck Inc',
+  'contact_type' => 'Organization'
+));
+$importer = new BenevityFile(__DIR__ . "/data/benevity.csv");
 $importer->import();
 $messages = $importer->getMessages();
 $this->assertEquals('1 out of 4 rows were imported.', $messages['Result']);
@@ -92,17 +101,26 @@
* Test that import passes for the Individual contact if a single match is 
found.
*/
   function testImportSucceedIndividualSingleContactExists() {
-$thaMouseMeister = $this->callAPISuccess('Contact', 'create', 
array('organization_name' => 'Mickey Mouse Inc', 'contact_type' => 
'Organization'));
-$minnie = $this->callAPISuccess('Contact', 'create', array(
-  'first_name' => 'Minnie', 'last_name' => 'Mouse', 'contact_type' => 
'Individual', 'email' => 'min...@mouse.org',
+$thaMouseMeister = $this->callAPISuccess('Contact', 'create', array(
+  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: planet: Fix syntax error with font size

2017-11-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392552 )

Change subject: planet: Fix syntax error with font size
..


planet: Fix syntax error with font size

Change-Id: I766bfb1986940b381e73d8790977410c71b4bcb8
---
M modules/planet/files/theme/rawdog_style.css
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/planet/files/theme/rawdog_style.css 
b/modules/planet/files/theme/rawdog_style.css
index 41a62515..91ca4ac 100644
--- a/modules/planet/files/theme/rawdog_style.css
+++ b/modules/planet/files/theme/rawdog_style.css
@@ -33,7 +33,7 @@
 
 h2 {
 margin-top: 1em;
-font-size: 1.5em;;
+font-size: 1.5em;
 }
 
 h3 {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I766bfb1986940b381e73d8790977410c71b4bcb8
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
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/puppet[production]: planet: Fix syntax error with font size

2017-11-20 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392552 )

Change subject: planet: Fix syntax error with font size
..

planet: Fix syntax error with font size

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


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


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: planet: Decrease size for h2 font to 1.5em

2017-11-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392551 )

Change subject: planet: Decrease size for h2 font to 1.5em
..


planet: Decrease size for h2 font to 1.5em

Change-Id: Icc4f05bbfa9d409d3bd420937fbaab2688eec726
---
M modules/planet/files/theme/rawdog_style.css
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/planet/files/theme/rawdog_style.css 
b/modules/planet/files/theme/rawdog_style.css
index 31a4f67..41a62515 100644
--- a/modules/planet/files/theme/rawdog_style.css
+++ b/modules/planet/files/theme/rawdog_style.css
@@ -33,7 +33,7 @@
 
 h2 {
 margin-top: 1em;
-font-size: 200%;
+font-size: 1.5em;;
 }
 
 h3 {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc4f05bbfa9d409d3bd420937fbaab2688eec726
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
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/puppet[production]: planet: Decrease size for h2 font to 1.5em

2017-11-20 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392551 )

Change subject: planet: Decrease size for h2 font to 1.5em
..

planet: Decrease size for h2 font to 1.5em

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/392551/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc4f05bbfa9d409d3bd420937fbaab2688eec726
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] mediawiki...ORES[master]: Use Wikimedia\Rdbms\IDatabase

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392550 )

Change subject: Use Wikimedia\Rdbms\IDatabase
..


Use Wikimedia\Rdbms\IDatabase

Change-Id: I374bd1fe701833b25810ec0ea304388fc670aa04
---
M includes/Hooks/ChangesListHooksHandler.php
M includes/WatchedItemQueryServiceExtension.php
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/includes/Hooks/ChangesListHooksHandler.php 
b/includes/Hooks/ChangesListHooksHandler.php
index 2c503d1..c5d7344 100644
--- a/includes/Hooks/ChangesListHooksHandler.php
+++ b/includes/Hooks/ChangesListHooksHandler.php
@@ -30,6 +30,7 @@
 use RecentChange;
 use SpecialRecentChanges;
 use SpecialWatchlist;
+use Wikimedia\Rdbms\IDatabase;
 
 class ChangesListHooksHandler {
 
@@ -571,7 +572,7 @@
$ranges
);
 
-   return \wfGetDB( DB_REPLICA )->makeList( 
$betweenConditions, \IDatabase::LIST_OR );
+   return \wfGetDB( DB_REPLICA )->makeList( 
$betweenConditions, IDatabase::LIST_OR );
}
}
 
diff --git a/includes/WatchedItemQueryServiceExtension.php 
b/includes/WatchedItemQueryServiceExtension.php
index a3340e5..99de1ae 100644
--- a/includes/WatchedItemQueryServiceExtension.php
+++ b/includes/WatchedItemQueryServiceExtension.php
@@ -18,10 +18,10 @@
 
 namespace ORES;
 
-use IDatabase;
 use ORES\Hooks\ApiHooksHandler;
 use ResultWrapper;
 use User;
+use Wikimedia\Rdbms\IDatabase;
 
 class WatchedItemQueryServiceExtension implements 
\WatchedItemQueryServiceExtension {
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I374bd1fe701833b25810ec0ea304388fc670aa04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Krinkle 
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...ORES[master]: Add 2 more GPL file headers

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392549 )

Change subject: Add 2 more GPL file headers
..


Add 2 more GPL file headers

Verified that all files in includes/ have a GPL v3 or later file header
with `licensecheck`.

Change-Id: I02bf7f5aa49f572f467b5798af467bc0dcf93ad5
---
M includes/Hooks/ChangesListHooksHandler.php
M includes/Hooks/ContributionsHooksHandler.php
2 files changed, 28 insertions(+), 0 deletions(-)

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



diff --git a/includes/Hooks/ChangesListHooksHandler.php 
b/includes/Hooks/ChangesListHooksHandler.php
index d211f18..2c503d1 100644
--- a/includes/Hooks/ChangesListHooksHandler.php
+++ b/includes/Hooks/ChangesListHooksHandler.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES\Hooks;
 
diff --git a/includes/Hooks/ContributionsHooksHandler.php 
b/includes/Hooks/ContributionsHooksHandler.php
index 903db4a..df2034e 100644
--- a/includes/Hooks/ContributionsHooksHandler.php
+++ b/includes/Hooks/ContributionsHooksHandler.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES\Hooks;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02bf7f5aa49f572f467b5798af467bc0dcf93ad5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Krinkle 
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...ORES[master]: Use Wikimedia\Rdbms\IDatabase

2017-11-20 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392550 )

Change subject: Use Wikimedia\Rdbms\IDatabase
..

Use Wikimedia\Rdbms\IDatabase

Change-Id: I374bd1fe701833b25810ec0ea304388fc670aa04
---
M includes/Hooks/ChangesListHooksHandler.php
M includes/WatchedItemQueryServiceExtension.php
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/includes/Hooks/ChangesListHooksHandler.php 
b/includes/Hooks/ChangesListHooksHandler.php
index 2c503d1..c5d7344 100644
--- a/includes/Hooks/ChangesListHooksHandler.php
+++ b/includes/Hooks/ChangesListHooksHandler.php
@@ -30,6 +30,7 @@
 use RecentChange;
 use SpecialRecentChanges;
 use SpecialWatchlist;
+use Wikimedia\Rdbms\IDatabase;
 
 class ChangesListHooksHandler {
 
@@ -571,7 +572,7 @@
$ranges
);
 
-   return \wfGetDB( DB_REPLICA )->makeList( 
$betweenConditions, \IDatabase::LIST_OR );
+   return \wfGetDB( DB_REPLICA )->makeList( 
$betweenConditions, IDatabase::LIST_OR );
}
}
 
diff --git a/includes/WatchedItemQueryServiceExtension.php 
b/includes/WatchedItemQueryServiceExtension.php
index a3340e5..99de1ae 100644
--- a/includes/WatchedItemQueryServiceExtension.php
+++ b/includes/WatchedItemQueryServiceExtension.php
@@ -18,10 +18,10 @@
 
 namespace ORES;
 
-use IDatabase;
 use ORES\Hooks\ApiHooksHandler;
 use ResultWrapper;
 use User;
+use Wikimedia\Rdbms\IDatabase;
 
 class WatchedItemQueryServiceExtension implements 
\WatchedItemQueryServiceExtension {
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I374bd1fe701833b25810ec0ea304388fc670aa04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Add 2 more GPL file headers

2017-11-20 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392549 )

Change subject: Add 2 more GPL file headers
..

Add 2 more GPL file headers

Verified that all files in includes/ have a GPL v3 or later file header
with `licensecheck`.

Change-Id: I02bf7f5aa49f572f467b5798af467bc0dcf93ad5
---
M includes/Hooks/ChangesListHooksHandler.php
M includes/Hooks/ContributionsHooksHandler.php
2 files changed, 28 insertions(+), 0 deletions(-)


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

diff --git a/includes/Hooks/ChangesListHooksHandler.php 
b/includes/Hooks/ChangesListHooksHandler.php
index d211f18..2c503d1 100644
--- a/includes/Hooks/ChangesListHooksHandler.php
+++ b/includes/Hooks/ChangesListHooksHandler.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES\Hooks;
 
diff --git a/includes/Hooks/ContributionsHooksHandler.php 
b/includes/Hooks/ContributionsHooksHandler.php
index 903db4a..df2034e 100644
--- a/includes/Hooks/ContributionsHooksHandler.php
+++ b/includes/Hooks/ContributionsHooksHandler.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES\Hooks;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02bf7f5aa49f572f467b5798af467bc0dcf93ad5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: planet: Replace div with a

2017-11-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392543 )

Change subject: planet: Replace div with a
..


planet: Replace div with a

i forgot this in my other change so this is fixing it.

Change-Id: Idc47bbead013b1f19209aab61d5ec290ccb7f32e
---
M modules/planet/templates/html/rd_item.html.tmpl.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/planet/templates/html/rd_item.html.tmpl.erb 
b/modules/planet/templates/html/rd_item.html.tmpl.erb
index 6d15b4d..444ace8 100644
--- a/modules/planet/templates/html/rd_item.html.tmpl.erb
+++ b/modules/planet/templates/html/rd_item.html.tmpl.erb
@@ -1,7 +1,7 @@
 
 
 
->> __title_no_link__
+>> __title_no_link__
 
   __if_author__by __authorendif__
   in __feed_title__

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc47bbead013b1f19209aab61d5ec290ccb7f32e
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
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...ORES[master]: Add missing GPL file headers

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392548 )

Change subject: Add missing GPL file headers
..


Add missing GPL file headers

This extension is licensed as GPL v3, or any later version (at your
option), so add the corresponding GPL file headers.

ApiQueryORES already had a GPL v2 or later file header, I updated it to
the v3 or later version for consistency with the rest of the extension.

WatchedItemQueryServiceExtension and ApiHooksHandler both had @author
tags for Brad, so I noted him as the copyright holder for both files.

Change-Id: Ie16893dbbe39fbd67b08f9da3d1e6dd3c69e454c
---
M includes/Api.php
M includes/ApiQueryORES.php
M includes/Cache.php
M includes/FetchScoreJob.php
M includes/Hooks.php
M includes/Hooks/ApiHooksHandler.php
M includes/Hooks/PreferencesHookHandler.php
M includes/Range.php
M includes/Scoring.php
M includes/Stats.php
M includes/WatchedItemQueryServiceExtension.php
11 files changed, 149 insertions(+), 15 deletions(-)

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



diff --git a/includes/Api.php b/includes/Api.php
index 709b653..7543d1d 100644
--- a/includes/Api.php
+++ b/includes/Api.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/ApiQueryORES.php b/includes/ApiQueryORES.php
index 6adeb59..12b4764 100644
--- a/includes/ApiQueryORES.php
+++ b/includes/ApiQueryORES.php
@@ -1,21 +1,17 @@
 http://www.gnu.org/copyleft/gpl.html
- *
- * @file
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
  */
 
 namespace ORES;
diff --git a/includes/Cache.php b/includes/Cache.php
index 3a8f9b8..f1e0f50 100644
--- a/includes/Cache.php
+++ b/includes/Cache.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/FetchScoreJob.php b/includes/FetchScoreJob.php
index f1475a3..6869ddc 100644
--- a/includes/FetchScoreJob.php
+++ b/includes/FetchScoreJob.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/Hooks.php b/includes/Hooks.php
index b0d53aa..3a83783 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/Hooks/ApiHooksHandler.php 
b/includes/Hooks/ApiHooksHandler.php
index 57c57de..48cb7cc 100644
--- a/includes/Hooks/ApiHooksHandler.php
+++ b/includes/Hooks/ApiHooksHandler.php
@@ -1,4 +1,20 @@
 
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
+ */
 
 namespace ORES\Hooks;
 
@@ -25,9 +41,6 @@
 use WatchedItem;
 use WatchedItemQueryService;
 
-/**
- * @author Brad Jorsch 
- */
 class ApiHooksHandler {
 
/**
diff --git a/includes/Hooks/PreferencesHookHandler.php 
b/includes/Hooks/PreferencesHookHandler.php
index 44a538b..19fb13e 100644
--- a/includes/Hooks/PreferencesHookHandler.php
+++ b/includes/Hooks/PreferencesHookHandler.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES\Hooks;
 
diff --git a/includes/Range.php b/includes/Range.php
index 5eb3980..1bae28e 100644
--- a/includes/Range.php
+++ b/includes/Range.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/Scoring.php b/includes/Scoring.php
index 0310d06..aea09d3 100644
--- a/includes/Scoring.php
+++ b/includes/Scoring.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/Stats.php b/includes/Stats.php
index 33189d2..8986f06 100644
--- a/includes/Stats.php
+++ b/includes/Stats.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/WatchedItemQueryServiceExtension.php 
b/includes/WatchedItemQueryServiceExtension.php
index a60d221..a3340e5 100644
--- a/includes/WatchedItemQueryServiceExtension.php
+++ b/includes/WatchedItemQueryServiceExtension.php
@@ -1,4 +1,20 @@
 
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that 

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Add missing GPL file headers

2017-11-20 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392548 )

Change subject: Add missing GPL file headers
..

Add missing GPL file headers

This extension is licensed as GPL v3, or any later version (at your
option), so add the corresponding GPL file headers.

ApiQueryORES already had a GPL v2 or later file header, I updated it to
the v3 or later version for consistency with the rest of the extension.

WatchedItemQueryServiceExtension and ApiHooksHandler both had @author
tags for Brad, so I noted him as the copyright holder for both files.

Change-Id: Ie16893dbbe39fbd67b08f9da3d1e6dd3c69e454c
---
M includes/Api.php
M includes/ApiQueryORES.php
M includes/Cache.php
M includes/FetchScoreJob.php
M includes/Hooks.php
M includes/Hooks/ApiHooksHandler.php
M includes/Hooks/PreferencesHookHandler.php
M includes/Range.php
M includes/Scoring.php
M includes/Stats.php
M includes/WatchedItemQueryServiceExtension.php
11 files changed, 149 insertions(+), 15 deletions(-)


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

diff --git a/includes/Api.php b/includes/Api.php
index 709b653..7543d1d 100644
--- a/includes/Api.php
+++ b/includes/Api.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/ApiQueryORES.php b/includes/ApiQueryORES.php
index 6adeb59..12b4764 100644
--- a/includes/ApiQueryORES.php
+++ b/includes/ApiQueryORES.php
@@ -1,21 +1,17 @@
 http://www.gnu.org/copyleft/gpl.html
- *
- * @file
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
  */
 
 namespace ORES;
diff --git a/includes/Cache.php b/includes/Cache.php
index 3a8f9b8..f1e0f50 100644
--- a/includes/Cache.php
+++ b/includes/Cache.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/FetchScoreJob.php b/includes/FetchScoreJob.php
index f1475a3..6869ddc 100644
--- a/includes/FetchScoreJob.php
+++ b/includes/FetchScoreJob.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/Hooks.php b/includes/Hooks.php
index b0d53aa..3a83783 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/Hooks/ApiHooksHandler.php 
b/includes/Hooks/ApiHooksHandler.php
index 57c57de..48cb7cc 100644
--- a/includes/Hooks/ApiHooksHandler.php
+++ b/includes/Hooks/ApiHooksHandler.php
@@ -1,4 +1,20 @@
 
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
+ */
 
 namespace ORES\Hooks;
 
@@ -25,9 +41,6 @@
 use WatchedItem;
 use WatchedItemQueryService;
 
-/**
- * @author Brad Jorsch 
- */
 class ApiHooksHandler {
 
/**
diff --git a/includes/Hooks/PreferencesHookHandler.php 
b/includes/Hooks/PreferencesHookHandler.php
index 44a538b..19fb13e 100644
--- a/includes/Hooks/PreferencesHookHandler.php
+++ b/includes/Hooks/PreferencesHookHandler.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES\Hooks;
 
diff --git a/includes/Range.php b/includes/Range.php
index 5eb3980..1bae28e 100644
--- a/includes/Range.php
+++ b/includes/Range.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/Scoring.php b/includes/Scoring.php
index 0310d06..aea09d3 100644
--- a/includes/Scoring.php
+++ b/includes/Scoring.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/Stats.php b/includes/Stats.php
index 33189d2..8986f06 100644
--- a/includes/Stats.php
+++ b/includes/Stats.php
@@ -1,4 +1,18 @@
 http://www.gnu.org/licenses/>.
+ */
 
 namespace ORES;
 
diff --git a/includes/WatchedItemQueryServiceExtension.php 
b/includes/WatchedItemQueryServiceExtension.php
index a60d221..a3340e5 100644
--- a/includes/WatchedItemQueryServiceExtension.php
+++ b/includes/WatchedItemQueryServiceExtension.php
@@ -1,4 +1,20 @@
 
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: port froezn_index_api.feature to nodejs

2017-11-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392547 )

Change subject: port froezn_index_api.feature to nodejs
..

port froezn_index_api.feature to nodejs

* Deleted test marked @expect_failure
* Converted `within` to plain search/check steps
* Had to add 3 second pauses for that to work. Not sure why :S
* Implemented missing steps

Change-Id: Ib93a3859334920a0363e1498b124c857c2632d24
---
A tests/integration/features/frozen_index_api.feature
M tests/integration/features/step_definitions/page_step_helpers.js
M tests/integration/features/step_definitions/page_steps.js
3 files changed, 76 insertions(+), 2 deletions(-)


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

diff --git a/tests/integration/features/frozen_index_api.feature 
b/tests/integration/features/frozen_index_api.feature
new file mode 100644
index 000..53657a1
--- /dev/null
+++ b/tests/integration/features/frozen_index_api.feature
@@ -0,0 +1,31 @@
+@frozen
+Feature: Mutations to frozen indexes are properly delayed
+  Scenario: Updates to frozen indexes are delayed
+   Given I delete FrozenTest
+ And a page named FrozenTest exists with contents foobarbaz
+ And I wait 3 seconds
+ And I api search for foobarbaz
+ And FrozenTest is the first api search result
+ And I globally freeze indexing
+ And a page named FrozenTest exists with contents superduperfrozen
+ And I wait 10 seconds
+ And I api search for superduperfrozen
+ And FrozenTest is not in the api search results
+When I globally thaw indexing
+ And I wait 10 seconds
+Then I api search for superduperfrozen yields FrozenTest as the first 
result
+
+  Scenario: Deletes to frozen indexes are delayed
+   Given a page named FrozenDeleteTest exists with contents bazbarfoo
+ And I wait 3 seconds
+ And I api search for bazbarfoo
+ And FrozenDeleteTest is the first api search result
+ And I globally freeze indexing
+ And I delete FrozenDeleteTest
+ And a page named FrozenDeleteTest exists with contents mrfreeze recreated 
this page to work around mediawiki's behavior of not showing deleted pages in 
search results.  mrfreeze is surprisingly helpful.
+ And I wait 10 seconds
+ And I api search for bazbarfoo
+ And FrozenDeleteTest is the first api search result
+When I globally thaw indexing
+ And I wait 10 seconds
+Then I api search for bazbarfoo yields no results
diff --git a/tests/integration/features/step_definitions/page_step_helpers.js 
b/tests/integration/features/step_definitions/page_step_helpers.js
index ca4a92b..07c1c71 100644
--- a/tests/integration/features/step_definitions/page_step_helpers.js
+++ b/tests/integration/features/step_definitions/page_step_helpers.js
@@ -13,7 +13,8 @@
 const expect = require( 'chai' ).expect,
fs = require( 'fs' ),
path = require( 'path' ),
-   Promise = require( 'bluebird' ); // jshint ignore:line
+   Promise = require( 'bluebird' ), // jshint ignore:line
+   articlePath = path.dirname(path.dirname(path.dirname(__dirname))) + 
'/browser/articles/';
 
 class StepHelpers {
constructor( world, wiki ) {
@@ -39,12 +40,23 @@
} );
}
 
+   uploadFile( title, fileName, description ) {
+   return Promise.coroutine( function* () {
+   let client = yield this.apiPromise;
+   let filePath = path.join( articlePath, fileName );
+   yield client.batch( [
+   [ 'upload', fileName, filePath, '', { text: 
description } ]
+   ] );
+   yield this.waitForOperation( 'upload', fileName );
+   } ).call( this );
+   }
+
editPage( title, text, append = false ) {
return Promise.coroutine( function* () {
let client = yield this.apiPromise;
 
if ( text[0] === '@' ) {
-   text = fs.readFileSync( path.join( __dirname, 
'articles', text.substr( 1 ) ) ).toString();
+   text = fs.readFileSync( path.join( articlePath, 
text.substr( 1 ) ) ).toString();
}
let fetchedText = yield this.getWikitext( title );
if ( append ) {
diff --git a/tests/integration/features/step_definitions/page_steps.js 
b/tests/integration/features/step_definitions/page_steps.js
index d7881db..f5349a7 100644
--- a/tests/integration/features/step_definitions/page_steps.js
+++ b/tests/integration/features/step_definitions/page_steps.js
@@ -309,4 +309,35 @@
this.searchVars[varname] = yield 
this.stepHelpers.pageIdOf( title );
} ).call( this );
} );
+
+   Then( /^I wait (\d+) seconds/, function ( seconds ) 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: port relevancy_api.feature to nodejs

2017-11-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392546 )

Change subject: port relevancy_api.feature to nodejs
..

port relevancy_api.feature to nodejs

* Removed 'within' steps. These are unnecessary now
 that we wait for pages to exist in cirrus after edits
* Removed one test marked @expect_failure

Change-Id: I1804bd4f13c110f960b8b7b04552beecb21658b8
---
A tests/integration/features/relevancy_api.feature
1 file changed, 104 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/46/392546/1

diff --git a/tests/integration/features/relevancy_api.feature 
b/tests/integration/features/relevancy_api.feature
new file mode 100644
index 000..4f40a5a
--- /dev/null
+++ b/tests/integration/features/relevancy_api.feature
@@ -0,0 +1,104 @@
+@clean @api @relevancy
+Feature: Results are ordered from most relevant to least.
+  Scenario: Words in order are worth more then words out of order
+When I api search for Relevancytwo Wordtest
+Then Relevancytwo Wordtest is the first api search result
+  And Wordtest Relevancytwo is the second api search result
+
+  Scenario: Results are sorted based on namespace: main, talk, file, help, 
file talk, etc
+When I api search for all:Relevancynamespacetest
+Then Relevancynamespacetest is the first api search result
+  And Talk:Relevancynamespacetest is the second api search result
+  And File:Relevancynamespacetest is the third api search result
+  And Help:Relevancynamespacetest is the fourth api search result
+  And File talk:Relevancynamespacetest is the fifth api search result
+  And User talk:Relevancynamespacetest is the sixth api search result
+  And Template:Relevancynamespacetest is the seventh api search result
+
+  Scenario: When the user doesn't set a language are sorted with wiki language 
ahead of other languages
+When I api search for Relevancylanguagetest
+Then Relevancylanguagetest/en is the first api search result
+
+  Scenario: Redirects count as incoming links
+Given a page named Relevancyredirecttest Smaller exists with contents 
Relevancyredirecttest A text text text text text text text text text text text 
text text
+  And a page named Relevancyredirecttest Smaller/A exists with contents 
[[Relevancyredirecttest Smaller]]
+  And a page named Relevancyredirecttest Smaller/B exists with contents 
[[Relevancyredirecttest Smaller]]
+  And a page named Relevancyredirecttest Larger exists with contents 
Relevancyredirecttest B text text text text text text text text text text text 
text text
+  And a page named Relevancyredirecttest Larger/Redirect exists with 
contents #REDIRECT [[Relevancyredirecttest Larger]]
+  And a page named Relevancyredirecttest Larger/A exists with contents 
[[Relevancyredirecttest Larger]]
+  And a page named Relevancyredirecttest Larger/B exists with contents 
[[Relevancyredirecttest Larger/Redirect]]
+  And a page named Relevancyredirecttest Larger/C exists with contents 
[[Relevancyredirecttest Larger/Redirect]]
+  And I api search for Relevancyredirecttest
+ Then Relevancyredirecttest Larger is the first api search result
+  And Relevancyredirecttest Smaller is the second api search result
+# Note that this test can fail spuriously in two ways:
+# 1. If the required pages are created as part of the hook for @relevancy 
its quite possible for the large influx
+# of jobs to cause the counting jobs to not pick up all the counts. I'm 
not super sure why that is but moving the
+# creation into its own section makes it pretty consistent.
+# 2. Its quite possible for the second result to be deeper in the result 
list for a few seconds after the pages are
+# created. It gets its position updated by the link counting job which has 
to wait for refreshing and undelaying.
+
+  # Last two tests use "sixth or seventh" because the current implementation 
of the all field
+  # and the copy_to hack will copy the content only one time for both text and 
auxiliary_text
+  # auxiliary_text is set to 0.5 but will be approximated to 1 (similar to 
text)
+  # phrase freq will be identical for both fields making length norms the sole 
discriminating
+  # criteria.
+  Scenario: Results are sorted based on what part of the page matches: title, 
redirect, category, etc
+When I api search with query independent profile classic_noboostlinks for 
"Relevancytestphrase phrase"
+Then Relevancytestphrase phrase is the first api search result
+  And Relevancytestphraseviaredirect is the second api search result
+  And Relevancytestphraseviacategory is the third api search result
+  And Relevancytestphraseviaheading is the fourth api search result
+  And Relevancytestphraseviaopening is the fifth api search result
+  And Relevancytestphraseviatext 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: HTMLCompletionProfileSettings: Use OOUI radios when in OOUI ...

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392541 )

Change subject: HTMLCompletionProfileSettings: Use OOUI radios when in OOUI form
..


HTMLCompletionProfileSettings: Use OOUI radios when in OOUI form

Bug: T180709
Change-Id: Ib3ff4e4c268e2e5aae4a0b8f1ca807a854e541d9
---
M includes/HTMLCompletionProfileSettings.php
1 file changed, 42 insertions(+), 22 deletions(-)

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



diff --git a/includes/HTMLCompletionProfileSettings.php 
b/includes/HTMLCompletionProfileSettings.php
index 2b2039e..cad7755 100644
--- a/includes/HTMLCompletionProfileSettings.php
+++ b/includes/HTMLCompletionProfileSettings.php
@@ -4,6 +4,8 @@
 
 use Html;
 use HTMLFormField;
+use OOUIHTMLForm;
+use OOUI;
 
 /**
  * Completion Suggester preferences UI.
@@ -76,28 +78,46 @@
 * @return string html
 */
private function addCompSuggestOption( $prof, $value ) {
-   $html = Html::openElement( 'div' );
-   $html .= Html::openElement( 'div', [ 'style' => 
'vertical-align:top; display:inline-block;' ] );
-   $radioId = $this->mID . "-$prof";
-   $radioAttrs = [
-   'id' => $radioId,
-   ];
-   if ( $prof === $value ) {
-   $radioAttrs['checked'] = 'checked';
+   if ( $this->mParent instanceof OOUIHTMLForm ) {
+   return new OOUI\FieldLayout(
+   new OOUI\RadioInputWidget( [
+   'inputId' => $this->mID . "-$prof",
+   'name' => $this->mName,
+   'value' => $prof,
+   'selected' => $prof === $value,
+   ] ),
+   [
+   'align' => 'inline',
+   'label' => new OOUI\HtmlSnippet(
+   Html::element( 'strong', [], 
wfMessage( "cirrussearch-completion-profile-$prof-pref-name" )->text() )
+   . '' . wfMessage( 
"cirrussearch-completion-profile-$prof-pref-desc" )->escaped()
+   )
+   ]
+   );
+   } else {
+   $html = Html::openElement( 'div' );
+   $html .= Html::openElement( 'div', [ 'style' => 
'vertical-align:top; display:inline-block;' ] );
+   $radioId = $this->mID . "-$prof";
+   $radioAttrs = [
+   'id' => $radioId,
+   ];
+   if ( $prof === $value ) {
+   $radioAttrs['checked'] = 'checked';
+   }
+   $html .= Html::input( $this->mName, $prof, 'radio', 
$radioAttrs );
+   $html .= Html::closeElement( 'div' );
+   $html .= Html::openElement( 'div', [ 'style' => 
'display:inline-block; width: 90%' ] );
+   $html .= Html::element( 'label',
+   [ 'for' => $radioId, 'style' => 'font-weight: 
bold' ],
+   wfMessage( 
"cirrussearch-completion-profile-$prof-pref-name" )->text()
+   );
+   $html .= Html::element( 'div',
+   [],
+   wfMessage( 
"cirrussearch-completion-profile-$prof-pref-desc" )->text()
+   );
+   $html .= Html::closeElement( 'div' );
+   $html .= Html::closeElement( 'div' );
+   return $html;
}
-   $html .= Html::input( $this->mName, $prof, 'radio', $radioAttrs 
);
-   $html .= Html::closeElement( 'div' );
-   $html .= Html::openElement( 'div', [ 'style' => 
'display:inline-block; width: 90%' ] );
-   $html .= Html::element( 'label',
-   [ 'for' => $radioId, 'style' => 'font-weight: bold' ],
-   wfMessage( 
"cirrussearch-completion-profile-$prof-pref-name" )->text()
-   );
-   $html .= Html::element( 'div',
-   [],
-   wfMessage( 
"cirrussearch-completion-profile-$prof-pref-desc" )->text()
-   );
-   $html .= Html::closeElement( 'div' );
-   $html .= Html::closeElement( 'div' );
-   return $html;
}
 }

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

[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.31.0-wmf.8]: RCFilters: Followup I08db859c571: Fix typo in "namespaces"

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392479 )

Change subject: RCFilters: Followup I08db859c571: Fix typo in "namespaces"
..


RCFilters: Followup I08db859c571: Fix typo in "namespaces"

Bug: T180863
Change-Id: I1b65ed5dfceb99bea98cbcadea11ddab367c6ca7
---
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ItemMenuOptionWidget.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ItemMenuOptionWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ItemMenuOptionWidget.js
index 97000d4..51fc9bc 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ItemMenuOptionWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ItemMenuOptionWidget.js
@@ -66,7 +66,7 @@
label: mw.msg( 'rcfilters-filter-excluded' )
} );
this.excludeLabel.toggle(
-   this.itemModel.getGroupModel().getView() === 
'namespace' &&
+   this.itemModel.getGroupModel().getView() === 
'namespaces' &&
this.itemModel.isSelected() &&
this.invertModel.isSelected()
);
@@ -138,7 +138,7 @@
 
this.highlightButton.toggle( 
this.filtersViewModel.isHighlightEnabled() );
this.excludeLabel.toggle(
-   this.itemModel.getGroupModel().getView() === 
'namespace' &&
+   this.itemModel.getGroupModel().getView() === 
'namespaces' &&
this.itemModel.isSelected() &&
this.invertModel.isSelected()
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b65ed5dfceb99bea98cbcadea11ddab367c6ca7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.31.0-wmf.8
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
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 the position of the date read text on the cards

2017-11-20 Thread Cooltey (Code Review)
Cooltey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392545 )

Change subject: Update the position of the date read text on the cards
..

Update the position of the date read text on the cards

- Update the position of the date read text on the `Continue reading` and 
`Because you read` cards
- Add a setSubtitle() to CardLargeHeaderView and adjust the 
view_card_header_large.xml layout
- Update the strings.xml and change the `Yesterday` and `Today` string to 
lowercase

Bug: T140685
Change-Id: I7e4b38dd5e2124e8c305e7da88c51f29dc76033f
---
M 
app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
M 
app/src/main/java/org/wikipedia/feed/continuereading/ContinueReadingCardView.java
M app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
M app/src/main/res/layout/view_card_header_large.xml
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
6 files changed, 31 insertions(+), 7 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
 
b/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
index 92adc7e..444c1b3 100644
--- 
a/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
+++ 
b/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
@@ -33,13 +33,13 @@
 int age = (int) card.daysOld();
 String subtitle = getSubtitle(age);
 headerView().setTitle(card.title())
-.setSubtitle(subtitle)
 .setImage(R.drawable.ic_restore_black_24dp)
 .setImageCircleColor(R.color.base30)
 .setCard(card)
 .setCallback(getCallback());
 largeHeaderView().setTitle(card.pageTitle())
 .setImage(card.image())
+.setSubtitle(subtitle)
 .onClickListener(new SelectPageCallbackAdapter(card))
 .setVisibility(VISIBLE);
 }
diff --git 
a/app/src/main/java/org/wikipedia/feed/continuereading/ContinueReadingCardView.java
 
b/app/src/main/java/org/wikipedia/feed/continuereading/ContinueReadingCardView.java
index f17dca9..ad7409a 100644
--- 
a/app/src/main/java/org/wikipedia/feed/continuereading/ContinueReadingCardView.java
+++ 
b/app/src/main/java/org/wikipedia/feed/continuereading/ContinueReadingCardView.java
@@ -32,13 +32,13 @@
 subtitle = getResources().getQuantityString(subtitlePlural, age, 
age);
 }
 headerView().setTitle(R.string.view_continue_reading_card_title)
-.setSubtitle(subtitle)
 .setImage(R.drawable.ic_arrow_forward_black_24dp)
 .setImageCircleColor(R.color.base30)
 .setCard(card)
 .setCallback(getCallback());
 largeHeaderView().setTitle(card.title())
 .setImage(card.image())
+.setSubtitle(subtitle)
 .onClickListener(new CardClickListener())
 .setVisibility(VISIBLE);
 }
diff --git a/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java 
b/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
index ea53217..fd4eb43 100644
--- a/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
+++ b/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
@@ -25,6 +25,7 @@
 @BindView(R.id.view_card_header_large_background) View backgroundView;
 @BindView(R.id.view_card_header_large_image) FaceAndColorDetectImageView 
imageView;
 @BindView(R.id.view_card_header_large_title) TextView titleView;
+@BindView(R.id.view_card_header_large_subtitle) TextView subtitleView;
 
 public CardLargeHeaderView(Context context) {
 super(context);
@@ -61,6 +62,11 @@
 return this;
 }
 
+@NonNull public CardLargeHeaderView setSubtitle(@Nullable CharSequence 
subtitle) {
+
subtitleView.setText(String.format(getResources().getString(R.string.view_continue_reading_card_subtitle_read_date),
 subtitle));
+return this;
+}
+
 @NonNull public CardLargeHeaderView onClickListener(@Nullable 
OnClickListener listener) {
 backgroundView.setOnClickListener(listener);
 return this;
diff --git a/app/src/main/res/layout/view_card_header_large.xml 
b/app/src/main/res/layout/view_card_header_large.xml
index 1c61bc1..c1498de 100644
--- a/app/src/main/res/layout/view_card_header_large.xml
+++ b/app/src/main/res/layout/view_card_header_large.xml
@@ -28,7 +28,10 @@
 android:layout_height="wrap_content"
 android:ellipsize="end"
 android:maxLines="2"
-android:padding="16dp"
+android:paddingTop="16dp"
+android:paddingLeft="16dp"
+android:paddingBottom="8dp"
+

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix card type selection spacing on mobile

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392536 )

Change subject: Fix card type selection spacing on mobile
..


Fix card type selection spacing on mobile

Fix
- card types wrapping onto new row
- logos going outside boxes
- inconsistent radio buttons between iOS and Android

Bug: T176419
Change-Id: I1ab130d8cc140241b592715d3ff7bedc5e4ac989
---
M gateway_forms/mustache/forms.css
1 file changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index 8265b69..c74fd0f 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -478,7 +478,6 @@
 #cards li {
 position: relative;
 background: #fff;
-margin-right: 2.5%;
 padding: 0;
 height: 96px;
 font-size: 13px;
@@ -486,11 +485,10 @@
 }
 #cards li input.cardradio {
 padding: 10px;
-margin: 10px;
+margin: 5px 0;
 display: block;
-width: 100%;
+width: auto;
 font-size: 13px;
-box-sizing: border-box;
 }
 #cards li label {
 margin: 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ab130d8cc140241b592715d3ff7bedc5e4ac989
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Pcoombe 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Mepps 
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]: planet: Replace div with a

2017-11-20 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392543 )

Change subject: planet: Replace div with a
..

planet: Replace div with a

i forgot this in my other change so this is fixing it.

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc47bbead013b1f19209aab61d5ec290ccb7f32e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] mediawiki/core[master]: Make MemcachedBagOStuff::makeKeyInternal always have a key c...

2017-11-20 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392544 )

Change subject: Make MemcachedBagOStuff::makeKeyInternal always have a key class
..

Make MemcachedBagOStuff::makeKeyInternal always have a key class

Even if a key is too long and shortened, it should still have some key class.

Change-Id: I006b6b03ad1302e9e49362bbd051332bc6105837
---
M includes/libs/objectcache/MemcachedBagOStuff.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/libs/objectcache/MemcachedBagOStuff.php 
b/includes/libs/objectcache/MemcachedBagOStuff.php
index 0188991..f7bf86b 100644
--- a/includes/libs/objectcache/MemcachedBagOStuff.php
+++ b/includes/libs/objectcache/MemcachedBagOStuff.php
@@ -137,7 +137,7 @@
);
 
if ( $charsLeft < 0 ) {
-   return $keyspace . ':##' . md5( implode( ':', $args ) );
+   return $keyspace . ':BagOStuff-long-key:##' . md5( 
implode( ':', $args ) );
}
 
return $keyspace . ':' . implode( ':', $args );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I006b6b03ad1302e9e49362bbd051332bc6105837
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: HTMLCompletionProfileSettings: Do not use `` tags

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392540 )

Change subject: HTMLCompletionProfileSettings: Do not use `` tags
..


HTMLCompletionProfileSettings: Do not use `` tags

This is invalid HTML, `` is only allowed as the first child of
a ``.

Change-Id: I774fca049d517bea72bed0a1b772008e12a3cddd
---
M includes/HTMLCompletionProfileSettings.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/HTMLCompletionProfileSettings.php 
b/includes/HTMLCompletionProfileSettings.php
index 94d7c93..2b2039e 100644
--- a/includes/HTMLCompletionProfileSettings.php
+++ b/includes/HTMLCompletionProfileSettings.php
@@ -37,7 +37,7 @@
 */
public function getInputHTML( $value ) {
$html = Html::openElement( 'div' );
-   $html .= Html::element( 'legend',
+   $html .= Html::element( 'p',
[],
wfMessage( 'cirrussearch-pref-completion-profile-help' )
);
@@ -46,7 +46,7 @@
[],
wfMessage( 'cirrussearch-pref-completion-section-desc' 
)->text()
);
-   $html .= Html::rawElement( 'legend',
+   $html .= Html::rawElement( 'p',
[],
wfMessage( 
'cirrussearch-pref-completion-section-legend' )->parse()
);
@@ -61,7 +61,7 @@
[],
wfMessage( 
'cirrussearch-pref-completion-legacy-section-desc' )->text()
);
-   $html .= Html::rawElement( 'legend',
+   $html .= Html::rawElement( 'p',
[],
wfMessage( 
'cirrussearch-pref-completion-legacy-section-legend' )->parse()
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I774fca049d517bea72bed0a1b772008e12a3cddd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Tjones 
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]: planet: Improve look and configuation updates

2017-11-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389498 )

Change subject: planet: Improve look and configuation updates
..


planet: Improve look and configuation updates

New features:

- Sidebar

- partially mobile responsive

- Links to other planet.wm.org langs in the sidebar. (Also makes them
https too instead of http).

- Reintroduces date to the header to make it easy to tell when each
blog was published.

This also reduces the amout of feeds we store to 100.

Planet venus number was alot smaller. Reason why 100 is 100+ was just
too high as it was making the page too break and possibly freezing
some users browsers.

Also update configuation.

With this update we are ready to switch prod to use rawdog now.

Bug: T180498
Change-Id: Ie82be0398e1fd23ad495243e4b79ee185862a9db
---
M modules/planet/files/theme/rawdog_style.css
M modules/planet/manifests/dirs.pp
M modules/planet/templates/feeds_rawdog/global.erb
M modules/planet/templates/html/rd_item.html.tmpl.erb
M modules/planet/templates/html/rd_page.html.tmpl.erb
5 files changed, 108 insertions(+), 39 deletions(-)

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



diff --git a/modules/planet/files/theme/rawdog_style.css 
b/modules/planet/files/theme/rawdog_style.css
index d931fa1..31a4f67 100644
--- a/modules/planet/files/theme/rawdog_style.css
+++ b/modules/planet/files/theme/rawdog_style.css
@@ -41,7 +41,7 @@
 }
 
 #items {
-margin: 0.6em;
+padding: 5px 15px 5px 230px;
 }
 
 .item {
@@ -102,11 +102,18 @@
 margin: 0;
 }
 
+.read a.titleName,
 .read {
 color: #14866d;
 }
+
+.unread a.titleName,
 .unread {
 color: #00af89;
+}
+
+.rightArrow {
+  color: #b32424;
 }
 
 .xmlbutton {
@@ -176,3 +183,26 @@
 color:#fafafa;
 background:#555;
 }
+
+.menu {
+position: absolute;
+top: 180px;
+left: 0px;
+margin: 5px;
+padding: 10px;
+border: 2px solid #ccc;
+/* background: #666; */
+width: 150px; /* ie5win fudge begins */
+voice-family: "\"}\"";
+voice-family: inherit;
+width: 120px;
+font-size: 12px;
+}
+
+html>body .menu {
+width: 195px; /* ie5win fudge ends */
+}
+
+.menuitem {
+margin-top: 15px;
+}
diff --git a/modules/planet/manifests/dirs.pp b/modules/planet/manifests/dirs.pp
index 7862f6d..ae28d60 100644
--- a/modules/planet/manifests/dirs.pp
+++ b/modules/planet/manifests/dirs.pp
@@ -1,4 +1,4 @@
-# sets up needed directories for a planet-venus intall
+# sets up needed directories for a planet-venus / rawdog install
 class planet::dirs {
 
 if os_version('debian == stretch') {
@@ -16,6 +16,13 @@
 mode   => '0755',
 }
 
+file { '/etc/rawdog/plugins':
+ensure => directory,
+owner  => 'planet',
+group  => 'planet',
+mode   => '0755',
+}
+
 file { '/etc/rawdog/config':
 ensure  => 'present',
 mode=> '0444',
diff --git a/modules/planet/templates/feeds_rawdog/global.erb 
b/modules/planet/templates/feeds_rawdog/global.erb
index 5e51290..330eac8 100644
--- a/modules/planet/templates/feeds_rawdog/global.erb
+++ b/modules/planet/templates/feeds_rawdog/global.erb
@@ -3,12 +3,12 @@
 
 plugindirs plugins
 splitstate true
-maxarticles 200
+maxarticles 100
 maxage 0
-expireage 7d
-keepmin 20
-currentonly false
-daysections false
+expireage 1d
+keepmin 3
+currentonly true
+daysections true
 
 dayformat %A, %d %B
 timesections false
@@ -18,7 +18,7 @@
 userefresh true
 showfeeds true
 
-numthreads 4
+numthreads 7
 timeout 30s
 
 ignoretimeouts false
@@ -31,7 +31,6 @@
 useids true
 
 hideduplicates id
-newfeedperiod 3h
+newfeedperiod 2h
 
 changeconfig false
-
diff --git a/modules/planet/templates/html/rd_item.html.tmpl.erb 
b/modules/planet/templates/html/rd_item.html.tmpl.erb
index 2e90bae..6d15b4d 100644
--- a/modules/planet/templates/html/rd_item.html.tmpl.erb
+++ b/modules/planet/templates/html/rd_item.html.tmpl.erb
@@ -1,11 +1,12 @@
 
 
-
->> 
__title_no_link__
+
+>> __title_no_link__
 
-__if_author__by __authorendif__
-in __feed_title__
-__if_date__at __dateendif__
+  __if_author__by __authorendif__
+  in __feed_title__
+  __if_date__at __dateendif__
+
 
 __if_description__
 __description__
diff --git a/modules/planet/templates/html/rd_page.html.tmpl.erb 
b/modules/planet/templates/html/rd_page.html.tmpl.erb
index f627af3..7f0f546 100644
--- a/modules/planet/templates/html/rd_page.html.tmpl.erb
+++ b/modules/planet/templates/html/rd_page.html.tmpl.erb
@@ -3,9 +3,9 @@
 
 
 
+
 <%= @title %>.planet.wikimedia.org
 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [DNM] Drop deprecated EnableAPI and EnableWriteAPI settings

2017-11-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392542 )

Change subject: [DNM] Drop deprecated EnableAPI and EnableWriteAPI settings
..

[DNM] Drop deprecated EnableAPI and EnableWriteAPI settings

Bug: T115414
Change-Id: I54ff9428b247ba203d67aba079149393f323d5a9
---
M api.php
M includes/DefaultSettings.php
M includes/OutputPage.php
M includes/Preferences.php
M includes/diff/DifferenceEngine.php
M includes/page/Article.php
M includes/resourceloader/ResourceLoaderStartUpModule.php
M includes/skins/Skin.php
M includes/specials/SpecialApiSandbox.php
M includes/specials/forms/UploadForm.php
M opensearch_desc.php
M tests/phpunit/includes/OutputPageTest.php
M tests/phpunit/includes/api/ApiTestCaseUpload.php
13 files changed, 48 insertions(+), 93 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/392542/1

diff --git a/api.php b/api.php
index d9a69db..9c5ac95 100644
--- a/api.php
+++ b/api.php
@@ -2,13 +2,10 @@
 /**
  * This file is the entry point for all API queries.
  *
- * It begins by checking whether the API is enabled on this wiki; if not,
- * it informs the user that s/he should set $wgEnableAPI to true and exits.
- * Otherwise, it constructs a new ApiMain using the parameter passed to it
- * as an argument in the URL ('?action=') and with write-enabled set to the
- * value of $wgEnableWriteAPI as specified in LocalSettings.php.
- * It then invokes "execute()" on the ApiMain object instance, which
- * produces output in the format specified in the URL.
+ * It begins by constructing a new ApiMain using the parameter passed to it
+ * as an argument in the URL ('?action='). It then invokes "execute()" on the
+ * ApiMain object instance, which produces output in the format specified in
+ * the URL.
  *
  * Copyright © 2006 Yuri Astrakhan @gmail.com
  *
@@ -55,14 +52,6 @@
die( 1 );
 }
 
-// Verify that the API has not been disabled
-if ( !$wgEnableAPI ) {
-   header( $_SERVER['SERVER_PROTOCOL'] . ' 500 MediaWiki configuration 
Error', true, 500 );
-   echo 'MediaWiki API is not enabled for this site. Add the following 
line to your LocalSettings.php'
-   . '$wgEnableAPI=true;';
-   die( 1 );
-}
-
 // Set a dummy $wgTitle, because $wgTitle == null breaks various things
 // In a perfect world this wouldn't be necessary
 $wgTitle = Title::makeTitle( NS_SPECIAL, 'Badtitle/dummy title for API calls 
set in api.php' );
@@ -76,7 +65,7 @@
 * is some form of an ApiMain, possibly even one that produces an error 
message,
 * but we don't care here, as that is handled by the constructor.
 */
-   $processor = new ApiMain( RequestContext::getMain(), $wgEnableWriteAPI 
);
+   $processor = new ApiMain( RequestContext::getMain(), true );
 
// Last chance hook before executing the API
Hooks::run( 'ApiBeforeMain', [ &$processor ] );
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 3cd7ef1..5c3ad63 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -7964,25 +7964,6 @@
  */
 
 /**
- * Enable the MediaWiki API for convenient access to
- * machine-readable data via api.php
- *
- * See https://www.mediawiki.org/wiki/API
- *
- * @deprecated since 1.31
- */
-$wgEnableAPI = true;
-
-/**
- * Allow the API to be used to perform write operations
- * (page edits, rollback, etc.) when an authorised user
- * accesses it
- *
- * @deprecated since 1.31
- */
-$wgEnableWriteAPI = true;
-
-/**
  *
  * WARNING: SECURITY THREAT - debug use only
  *
@@ -8136,7 +8117,7 @@
 $wgAjaxUploadDestCheck = true;
 
 /**
- * Enable previewing licences via AJAX. Also requires $wgEnableAPI to be true.
+ * Enable previewing licences via AJAX.
  */
 $wgAjaxLicensePreview = true;
 
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 4635f99..049335b 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3406,24 +3406,22 @@
'title' => $this->msg( 'opensearch-desc' 
)->inContentLanguage()->text(),
] );
 
-   if ( $config->get( 'EnableAPI' ) ) {
-   # Real Simple Discovery link, provides auto-discovery 
information
-   # for the MediaWiki API (and potentially additional 
custom API
-   # support such as WordPress or Twitter-compatible APIs 
for a
-   # blogging extension, etc)
-   $tags['rsd'] = Html::element( 'link', [
-   'rel' => 'EditURI',
-   'type' => 'application/rsd+xml',
-   // Output a protocol-relative URL here if 
$wgServer is protocol-relative.
-   // Whether RSD accepts relative or 
protocol-relative URLs is completely
-   // undocumented, though.
-   

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: HTMLCompletionProfileSettings: Use OOUI radios when in OOUI ...

2017-11-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392541 )

Change subject: HTMLCompletionProfileSettings: Use OOUI radios when in OOUI form
..

HTMLCompletionProfileSettings: Use OOUI radios when in OOUI form

Bug: T180709
Change-Id: Ib3ff4e4c268e2e5aae4a0b8f1ca807a854e541d9
---
M includes/HTMLCompletionProfileSettings.php
1 file changed, 42 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/41/392541/1

diff --git a/includes/HTMLCompletionProfileSettings.php 
b/includes/HTMLCompletionProfileSettings.php
index 2b2039e..cad7755 100644
--- a/includes/HTMLCompletionProfileSettings.php
+++ b/includes/HTMLCompletionProfileSettings.php
@@ -4,6 +4,8 @@
 
 use Html;
 use HTMLFormField;
+use OOUIHTMLForm;
+use OOUI;
 
 /**
  * Completion Suggester preferences UI.
@@ -76,28 +78,46 @@
 * @return string html
 */
private function addCompSuggestOption( $prof, $value ) {
-   $html = Html::openElement( 'div' );
-   $html .= Html::openElement( 'div', [ 'style' => 
'vertical-align:top; display:inline-block;' ] );
-   $radioId = $this->mID . "-$prof";
-   $radioAttrs = [
-   'id' => $radioId,
-   ];
-   if ( $prof === $value ) {
-   $radioAttrs['checked'] = 'checked';
+   if ( $this->mParent instanceof OOUIHTMLForm ) {
+   return new OOUI\FieldLayout(
+   new OOUI\RadioInputWidget( [
+   'inputId' => $this->mID . "-$prof",
+   'name' => $this->mName,
+   'value' => $prof,
+   'selected' => $prof === $value,
+   ] ),
+   [
+   'align' => 'inline',
+   'label' => new OOUI\HtmlSnippet(
+   Html::element( 'strong', [], 
wfMessage( "cirrussearch-completion-profile-$prof-pref-name" )->text() )
+   . '' . wfMessage( 
"cirrussearch-completion-profile-$prof-pref-desc" )->escaped()
+   )
+   ]
+   );
+   } else {
+   $html = Html::openElement( 'div' );
+   $html .= Html::openElement( 'div', [ 'style' => 
'vertical-align:top; display:inline-block;' ] );
+   $radioId = $this->mID . "-$prof";
+   $radioAttrs = [
+   'id' => $radioId,
+   ];
+   if ( $prof === $value ) {
+   $radioAttrs['checked'] = 'checked';
+   }
+   $html .= Html::input( $this->mName, $prof, 'radio', 
$radioAttrs );
+   $html .= Html::closeElement( 'div' );
+   $html .= Html::openElement( 'div', [ 'style' => 
'display:inline-block; width: 90%' ] );
+   $html .= Html::element( 'label',
+   [ 'for' => $radioId, 'style' => 'font-weight: 
bold' ],
+   wfMessage( 
"cirrussearch-completion-profile-$prof-pref-name" )->text()
+   );
+   $html .= Html::element( 'div',
+   [],
+   wfMessage( 
"cirrussearch-completion-profile-$prof-pref-desc" )->text()
+   );
+   $html .= Html::closeElement( 'div' );
+   $html .= Html::closeElement( 'div' );
+   return $html;
}
-   $html .= Html::input( $this->mName, $prof, 'radio', $radioAttrs 
);
-   $html .= Html::closeElement( 'div' );
-   $html .= Html::openElement( 'div', [ 'style' => 
'display:inline-block; width: 90%' ] );
-   $html .= Html::element( 'label',
-   [ 'for' => $radioId, 'style' => 'font-weight: bold' ],
-   wfMessage( 
"cirrussearch-completion-profile-$prof-pref-name" )->text()
-   );
-   $html .= Html::element( 'div',
-   [],
-   wfMessage( 
"cirrussearch-completion-profile-$prof-pref-desc" )->text()
-   );
-   $html .= Html::closeElement( 'div' );
-   $html .= Html::closeElement( 'div' );
-   return $html;
}
 }

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

Gerrit-MessageType: newchange

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: HTMLCompletionProfileSettings: Do not use `` tags

2017-11-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392540 )

Change subject: HTMLCompletionProfileSettings: Do not use `` tags
..

HTMLCompletionProfileSettings: Do not use `` tags

This is invalid HTML, `` is only allowed as the first child of
a ``.

Change-Id: I774fca049d517bea72bed0a1b772008e12a3cddd
---
M includes/HTMLCompletionProfileSettings.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/40/392540/1

diff --git a/includes/HTMLCompletionProfileSettings.php 
b/includes/HTMLCompletionProfileSettings.php
index 94d7c93..2b2039e 100644
--- a/includes/HTMLCompletionProfileSettings.php
+++ b/includes/HTMLCompletionProfileSettings.php
@@ -37,7 +37,7 @@
 */
public function getInputHTML( $value ) {
$html = Html::openElement( 'div' );
-   $html .= Html::element( 'legend',
+   $html .= Html::element( 'p',
[],
wfMessage( 'cirrussearch-pref-completion-profile-help' )
);
@@ -46,7 +46,7 @@
[],
wfMessage( 'cirrussearch-pref-completion-section-desc' 
)->text()
);
-   $html .= Html::rawElement( 'legend',
+   $html .= Html::rawElement( 'p',
[],
wfMessage( 
'cirrussearch-pref-completion-section-legend' )->parse()
);
@@ -61,7 +61,7 @@
[],
wfMessage( 
'cirrussearch-pref-completion-legacy-section-desc' )->text()
);
-   $html .= Html::rawElement( 'legend',
+   $html .= Html::rawElement( 'p',
[],
wfMessage( 
'cirrussearch-pref-completion-legacy-section-legend' )->parse()
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I774fca049d517bea72bed0a1b772008e12a3cddd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: webperf: Add missing mediaWikiLoad to navtiming2

2017-11-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392036 )

Change subject: webperf: Add missing mediaWikiLoad to navtiming2
..


webperf: Add missing mediaWikiLoad to navtiming2

Rename mediaWikiLoadComplete -> mediaWikiLoad (its a delta)

Bug: T180598
Change-Id: I2579fe7e4f1427b223b65875b9b608689e99e238
---
M modules/webperf/files/navtiming.py
M modules/webperf/files/navtiming_fixture.yaml
2 files changed, 35 insertions(+), 2 deletions(-)

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



diff --git a/modules/webperf/files/navtiming.py 
b/modules/webperf/files/navtiming.py
index ca5e13b..df1952e 100755
--- a/modules/webperf/files/navtiming.py
+++ b/modules/webperf/files/navtiming.py
@@ -450,7 +450,6 @@
 ('response', 'responseEnd', 'responseStart'),
 ('processing', 'domComplete', 'responseEnd'),
 ('onLoad', 'loadEventEnd', 'loadEventStart'),
-('mediaWikiLoad', 'mediaWikiLoadEnd', 'mediaWikiLoadStart'),
 ('ssl', 'connectEnd', 'secureConnectionStart'),
 ):
 if minuend in event and subtrahend in event:
@@ -464,6 +463,8 @@
 metrics_nav2['unload'] = event['unload']
 if 'redirecting' in event:
 metrics_nav2['redirect'] = event['redirecting']
+if 'mediaWikiLoadComplete' in event:
+metrics_nav2['mediaWikiLoad'] = event['mediaWikiLoadComplete']
 
 # If one of the metrics are wrong, don't send them at all
 for metric, value in metrics_nav2.items():
diff --git a/modules/webperf/files/navtiming_fixture.yaml 
b/modules/webperf/files/navtiming_fixture.yaml
index 3f9f408..8a60a17 100644
--- a/modules/webperf/files/navtiming_fixture.yaml
+++ b/modules/webperf/files/navtiming_fixture.yaml
@@ -150,6 +150,12 @@
   - frontend.navtiming2.domInteractive.by_browser.Firefox.55:955|ms
   - frontend.navtiming2.domInteractive.by_browser.Firefox.all:955|ms
   - frontend.navtiming2.domInteractive.by_continent.Europe:955|ms
+  - frontend.navtiming2.mediaWikiLoad.desktop.authenticated:1270|ms
+  - frontend.navtiming2.mediaWikiLoad.desktop.overall:1270|ms
+  - frontend.navtiming2.mediaWikiLoad.overall:1270|ms
+  - frontend.navtiming2.mediaWikiLoad.by_browser.Firefox.55:1270|ms
+  - frontend.navtiming2.mediaWikiLoad.by_browser.Firefox.all:1270|ms
+  - frontend.navtiming2.mediaWikiLoad.by_continent.Europe:1270|ms
 
 Cached page view from desktop:
  input: {"event": {"action": "view", "connectEnd": 0, "connectStart": 0, 
"dnsLookup": 0, "domComplete": 1201, "domInteractive": 576, "fetchStart": 0, 
"firstPaint": 635, "isAnon": true, "isHiDPI": false, "isHttp2": true, 
"loadEventEnd": 1203, "loadEventStart": 1201, "mediaWikiLoadComplete": 667, 
"mediaWikiVersion": "1.30.0-wmf.19", "namespaceId": 1, "originCountry": "MA", 
"originRegion": "01", "pageId": 1, "requestStart": 16, "responseEnd": 373, 
"responseStart": 360, "revId": 1, "unload": 0}, "recvFrom": "example", 
"revision": 1, "schema": "NavigationTiming", "seqId": 1, "timestamp": 1, 
"userAgent": "{\"os_minor\": null, \"is_bot\": false, \"os_major\": null, 
\"device_family\": \"Other\", \"os_family\": \"Windows 7\", \"browser_minor\": 
\"0\", \"wmf_app_version\": \"-\", \"browser_major\": \"60\", 
\"browser_family\": \"Chrome\", \"is_mediawiki\": false}", "uuid": "example", 
"webHost": "example", "wiki": "example"}
@@ -289,6 +295,12 @@
   - frontend.navtiming2.domInteractive.by_browser.Chrome.60:576|ms
   - frontend.navtiming2.domInteractive.by_browser.Chrome.all:576|ms
   - frontend.navtiming2.domInteractive.by_continent.Africa:576|ms
+  - frontend.navtiming2.mediaWikiLoad.desktop.anonymous:667|ms
+  - frontend.navtiming2.mediaWikiLoad.desktop.overall:667|ms
+  - frontend.navtiming2.mediaWikiLoad.overall:667|ms
+  - frontend.navtiming2.mediaWikiLoad.by_browser.Chrome.60:667|ms
+  - frontend.navtiming2.mediaWikiLoad.by_browser.Chrome.all:667|ms
+  - frontend.navtiming2.mediaWikiLoad.by_continent.Africa:667|ms
 
 Page view without NavTiming support:
  input: {"event": {"action": "delete", "isAnon": false, "isHiDPI": true, 
"isHttp2": true, "mediaWikiLoadComplete": 3513, "mediaWikiVersion": 
"1.30.0-wmf.19", "namespaceId": 1, "originCountry": "PL", "originRegion": "LD", 
"pageId": 1, "revId": 1}, "recvFrom": "example", "revision": 1, "schema": 
"NavigationTiming", "seqId": 1, "timestamp": 1, "userAgent": "{\"os_minor\": 
\"4\", \"is_bot\": false, \"os_major\": \"4\", \"device_family\": \"Samsung 
SM-T230\", \"os_family\": \"Android\", \"browser_minor\": \"0\", 
\"wmf_app_version\": \"-\", \"browser_major\": \"59\", \"browser_family\": 
\"Chrome\", \"is_mediawiki\": false}", "uuid": "example", "webHost": "example", 
"wiki": "example"}
@@ -299,6 +311,12 @@
   - frontend.navtiming.mediaWikiLoadComplete.by_browser.Chrome.59:3513|ms
   - frontend.navtiming.mediaWikiLoadComplete.by_browser.Chrome.all:3513|ms
   - 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Preferences: Don't show the watchlist token; just link to Re...

2017-11-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392539 )

Change subject: Preferences: Don't show the watchlist token; just link to 
ResetTokens
..

Preferences: Don't show the watchlist token; just link to ResetTokens

Also make both the PasswordReset and ResetTokens forms appropriately
flag their action buttons as destructive.

Bug: T180710
Change-Id: I26649900f9360e5175fa93b87dc7840a7c1d4f93
---
M includes/Preferences.php
M includes/specials/SpecialPasswordReset.php
M includes/specials/SpecialResetTokens.php
M languages/i18n/en.json
M languages/i18n/qqq.json
5 files changed, 16 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/39/392539/1

diff --git a/includes/Preferences.php b/includes/Preferences.php
index e383f03..924e3ad 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -1134,18 +1134,20 @@
$defaultPreferences['watchlisttoken'] = [
'type' => 'api',
];
+
+   $tokenButton = new OOUI\ButtonWidget( [
+   'href' => SpecialPage::getTitleFor( 
'ResetTokens' )->getLinkURL( [
+   'returnto' => SpecialPage::getTitleFor( 
'Preferences' )->getPrefixedText()
+   ] ),
+   'label' => $context->msg( 
'prefs-watchlist-managetokens' )->text(),
+   ] );
$defaultPreferences['watchlisttoken-info'] = [
'type' => 'info',
'section' => 'watchlist/tokenwatchlist',
'label-message' => 'prefs-watchlist-token',
-   'default' => $user->getTokenFromOption( 
'watchlisttoken' ),
-   'help-message' => 'prefs-help-watchlist-token2',
-   ];
-   $defaultPreferences['watchlisttoken-info2'] = [
-   'type' => 'info',
-   'section' => 'watchlist/tokenwatchlist',
+   'help-message' => 'prefs-help-tokenmanagement',
'raw' => true,
-   'default' => $context->msg( 
'prefs-help-watchlist-token2' )->parse(),
+   'default' => (string)$tokenButton,
];
}
}
diff --git a/includes/specials/SpecialPasswordReset.php 
b/includes/specials/SpecialPasswordReset.php
index a4f16bd..bf8dea6 100644
--- a/includes/specials/SpecialPasswordReset.php
+++ b/includes/specials/SpecialPasswordReset.php
@@ -110,6 +110,8 @@
public function alterForm( HTMLForm $form ) {
$resetRoutes = $this->getConfig()->get( 'PasswordResetRoutes' );
 
+   $form->setSubmitDestructive();
+
$form->addHiddenFields( $this->getRequest()->getValues( 
'returnto', 'returntoquery' ) );
 
$i = 0;
diff --git a/includes/specials/SpecialResetTokens.php 
b/includes/specials/SpecialResetTokens.php
index 964a261..d5b0903 100644
--- a/includes/specials/SpecialResetTokens.php
+++ b/includes/specials/SpecialResetTokens.php
@@ -121,6 +121,7 @@
 * @param HTMLForm $form
 */
protected function alterForm( HTMLForm $form ) {
+   $form->setSubmitDestructive();
if ( $this->getTokensList() ) {
$form->setSubmitTextMsg( 'resettokens-resetbutton' );
} else {
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 021a115..261f74b 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1025,6 +1025,7 @@
"prefs-watchlist-edits": "Maximum number of changes to show in 
watchlist:",
"prefs-watchlist-edits-max": "Maximum number: 1000",
"prefs-watchlist-token": "Watchlist token:",
+   "prefs-watchlist-managetokens": "Manage tokens",
"prefs-misc": "Misc",
"prefs-resetpass": "Change password",
"prefs-changeemail": "Change or remove email address",
@@ -1042,7 +1043,7 @@
"recentchangesdays-max": "Maximum $1 {{PLURAL:$1|day|days}}",
"recentchangescount": "Number of edits to show by default:",
"prefs-help-recentchangescount": "This includes recent changes, page 
histories, and logs.",
-   "prefs-help-watchlist-token2": "This is the secret key to the web feed 
of your watchlist.\nAnyone who knows it will be able to read your watchlist, so 
do not share it.\nIf you need to, [[Special:ResetTokens|you can reset it]].",
+   "prefs-help-tokenmanagement": "You can see and reset the secret key for 
your account that can access the Web feed of your watchlist. Anyone who knows 
the key will be able to read your watchlist, so do not share 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Port linksto and more_like tests to nodejs

2017-11-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392538 )

Change subject: Port linksto and more_like tests to nodejs
..

Port linksto and more_like tests to nodejs

Change-Id: I9edd45add51bfad56dd87650de520bfeb08b9a20
---
A tests/integration/features/linksto_api.feature
A tests/integration/features/more_like_api.feature
M tests/integration/features/step_definitions/page_steps.js
M tests/integration/features/support/hooks.js
4 files changed, 104 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/38/392538/1

diff --git a/tests/integration/features/linksto_api.feature 
b/tests/integration/features/linksto_api.feature
new file mode 100644
index 000..2503cc0
--- /dev/null
+++ b/tests/integration/features/linksto_api.feature
@@ -0,0 +1,23 @@
+@clean @filters @linksto @api
+Feature: Searches with the linksto filter
+  Scenario: linksto only includes pages with the links
+When I api search for linksto:"LinksToTest Target"
+Then LinksToTest Plain is in the api search results
+  And LinksToTest OtherText is in the api search results
+
+  Scenario: linksto can be combined with other text
+When I api search for linksto:"LinksToTest Target" text
+Then LinksToTest OtherText is the first api search result
+
+  Scenario: -linksto excludes pages with the link
+When I api search for -linksto:"LinksToTest Target" LinksToTest
+Then LinksToTest No Link is in the api search results
+  But LinksToTest Plain is not in the api search results
+
+  Scenario: linksto works on links from templates
+When I api search for linksto:"LinksToTest Target" Using Template
+Then LinksToTest Using Template is the first api search result
+
+  Scenario: linksto finds links in non-main namespace
+When I api search for linksto:"Template:LinksToTest Template"
+Then LinksToTest LinksToTemplate is the first api search result
diff --git a/tests/integration/features/more_like_api.feature 
b/tests/integration/features/more_like_api.feature
new file mode 100644
index 000..c04a321
--- /dev/null
+++ b/tests/integration/features/more_like_api.feature
@@ -0,0 +1,29 @@
+@clean @more_like_this @api
+Feature: More like an article
+  Scenario: Searching for morelike: returns no results
+When I api search for morelike:IDontExist
+Then there are no api search results
+
+  Scenario: Searching for morelike: returns pages that are "like" that 
page
+When I api search for morelike:More Like Me 1
+Then More Like Me is in the first api search result
+  But More Like Me 1 is not in the api search results
+
+  Scenario: Searching for morelike: returns pages that are "like" 
the page that it is a redirect to
+When I api search for morelike:More Like Me Rdir
+Then More Like Me is in the first api search result
+  But More Like Me 1 is not in the api search results
+
+  @redirect_loop
+  Scenario: Searching for morelike: returns no results
+When I api search for morelike:Redirect Loop
+Then there are no api search results
+
+  Scenario: Searching for morelike:|| returns pages that are 
"like" all those pages
+When I api search for morelike:More Like Me 1|More Like Me Set 2 Page 
1|More Like Me Set 3 Page 1
+Then More Like Me is part of the api search result
+  And More Like Me Set 2 is part of the api search result
+  And More Like Me Set 3 is part of the api search result
+  But More Like Me 1 is not in the api search results
+  And More Like Me Set 2 Page 1 is not in the api search results
+  And More Like Me Set 3 Page 1 is not in the api search results
diff --git a/tests/integration/features/step_definitions/page_steps.js 
b/tests/integration/features/step_definitions/page_steps.js
index 6763049..d7881db 100644
--- a/tests/integration/features/step_definitions/page_steps.js
+++ b/tests/integration/features/step_definitions/page_steps.js
@@ -147,9 +147,12 @@
}
} );
if ( in_ok ) {
-   // What exactly does this do?
-   // expect(found).to include(include(title))
-   throw new Error( 'Not Implemented' );
+   // Asserts that title is found within the 
strings that make up found.
+   // ex: found = ['foo bar baz'], title = 'bar' 
should pass.
+   // Chai doesnt (yet) have a native assertion 
for this:
+   // https://github.com/chaijs/chai/issues/858
+   let ok = found.reduce( ( a, b ) => a || 
b.indexOf( title ) > -1, false );
+   expect( ok, `expected ${JSON.stringify(found)} 
to include "${title}"` ).to.be.true; // jshint ignore:line
   

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Fixup unicode literals in feature files

2017-11-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392537 )

Change subject: Fixup unicode literals in feature files
..

Fixup unicode literals in feature files

And add all the tests that wern't passing because of it.

Change-Id: Ie371e2fca42cc3298cf06ccb5b29f71af5af108f
---
A tests/integration/features/incategory_api.feature
A tests/integration/features/insource_api.feature
A tests/integration/features/intitle_api.feature
A tests/integration/features/phrase_prefix_api.feature
M tests/integration/features/step_definitions/page_step_helpers.js
M tests/integration/features/step_definitions/page_steps.js
6 files changed, 297 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/37/392537/1

diff --git a/tests/integration/features/incategory_api.feature 
b/tests/integration/features/incategory_api.feature
new file mode 100644
index 000..aa31bfe
--- /dev/null
+++ b/tests/integration/features/incategory_api.feature
@@ -0,0 +1,86 @@
+@clean @filters @incategory @api
+Feature: Searches with the incategory filter
+
+  Scenario: incategory: only includes pages with the category
+When I api search for incategory:weaponry
+Then Catapult is in the api search results
+  And Amazing Catapult is in the api search results
+  But Two Words is not in the api search results
+
+  Scenario: incategory: splits on | to create an OR query
+When I api search for incategory:weaponry|nothing
+Then Catapult is in the api search results
+  And Amazing Catapult is in the api search results
+  But Two Words is not in the api search results
+
+  Scenario Outline: incategory: does not fail when the category is unknown
+When I api search for incategory:
+Then there are no api search results
+  Examples:
+|  category   |
+| doesnotexistatleastihopenot |
+| id:2147483600   |
+
+  Scenario: incategory: finds categories by page id
+When I locate the page id of Category:Weaponry and store it as 
%weaponry_id%
+ And I api search for incategory:id:%weaponry_id%
+Then Catapult is in the api search results
+  And Amazing Catapult is in the api search results
+  But Two Words is not in the api search results
+
+  Scenario: incategory: works on categories from templates
+When I api search for incategory:templatetagged incategory:twowords
+Then Two Words is the first api search result
+
+  Scenario: incategory works with multi word categories
+When I api search for incategory:"Categorywith Twowords"
+Then Two Words is the first api search result
+
+  Scenario: incategory can find categories containing quotes if the quote is 
escaped
+When I api search for incategory:"Categorywith \" Quote"
+Then Two Words is the first api search result
+
+  Scenario: incategory can be repeated
+When I api search for incategory:"Categorywith \" Quote" 
incategory:"Categorywith Twowords"
+Then Two Words is the first api search result
+
+  Scenario: incategory works with can find two word categories with spaces
+When I api search for incategory:Categorywith_Twowords
+Then Two Words is the first api search result
+
+  Scenario: incategory: when passed a quoted category that doesn't exist finds 
nothing even though there is a category that matches one of the words
+When I api search for incategory:"Dontfindme Weaponry"
+Then there are no api search results
+
+  Scenario: incategory when passed a single word category doesn't find a two 
word category that contains that word
+When I api search for incategory:ASpace
+Then there are no api search results
+
+  Scenario: incategory: finds a multiword category when it is surrounded by 
quotes
+When I api search for incategory:"CategoryWith ASpace"
+Then IHaveATwoWordCategory is the first api search result
+
+  Scenario: incategory: can be combined with other text
+When I api search for incategory:weaponry amazing
+Then Amazing Catapult is the first api search result
+
+  Scenario: -incategory: excludes pages with the category
+When I api search for -incategory:weaponry incategory:twowords
+Then Two Words is the first api search result
+
+  Scenario: incategory: can handle a space after the :
+When I api search for incategory: weaponry
+Then Catapult is in the api search results
+  And Amazing Catapult is in the api search results
+  But Two Words is not in the api search results
+
+  Scenario Outline: incategory: can handle multiple spaces between clauses
+When I api search for incategory:weaponryincategory:weaponry
+Then Catapult is in the api search results
+  And Amazing Catapult is in the api search results
+  And Two Words is not in the api search results
+  Examples:
+|   spaces   |
+|%{\u0020}%%{\u0020}%|
+

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Ores: Emergency disable on frwiki and ruwiki

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392535 )

Change subject: Ores: Emergency disable on frwiki and ruwiki
..


Ores: Emergency disable on frwiki and ruwiki

Bug: T181006
Change-Id: I887eb8e30061e2e8fac448c7512ee420142b6874
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c651927..8eef61b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18945,13 +18945,13 @@
'etwiki' => true, // T159609
'fawiki' => true, // T130211
'fiwiki' => true, // T163011
-   'frwiki' => true, // T165044
+   'frwiki' => false, // T181006
'hewiki' => true, // T161621
'nlwiki' => true, // T139432
'plwiki' => true, // T140005
'ptwiki' => true, // T139692
'rowiki' => true, // T170723
-   'ruwiki' => true, // T139541
+   'ruwiki' => false, // T181006
'sqwiki' => true, // T170723
'trwiki' => true, // T139992
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I887eb8e30061e2e8fac448c7512ee420142b6874
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jcrespo 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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]: Fix card type selection spacing on mobile

2017-11-20 Thread Pcoombe (Code Review)
Pcoombe has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392536 )

Change subject: Fix card type selection spacing on mobile
..

Fix card type selection spacing on mobile

Fix
- card types wrapping onto new row
- logos going outside boxes
- inconsistent radio buttons between iOS and Android

Bug: T176419
Change-Id: I1ab130d8cc140241b592715d3ff7bedc5e4ac989
---
M gateway_forms/mustache/forms.css
1 file changed, 2 insertions(+), 4 deletions(-)


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

diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index 8265b69..c74fd0f 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -478,7 +478,6 @@
 #cards li {
 position: relative;
 background: #fff;
-margin-right: 2.5%;
 padding: 0;
 height: 96px;
 font-size: 13px;
@@ -486,11 +485,10 @@
 }
 #cards li input.cardradio {
 padding: 10px;
-margin: 10px;
+margin: 5px 0;
 display: block;
-width: 100%;
+width: auto;
 font-size: 13px;
-box-sizing: border-box;
 }
 #cards li label {
 margin: 0;

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Ores: Emergency disable on frwiki and ruwiki

2017-11-20 Thread Jcrespo (Code Review)
Jcrespo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392535 )

Change subject: Ores: Emergency disable on frwiki and ruwiki
..

Ores: Emergency disable on frwiki and ruwiki

Bug: T181006
Change-Id: I887eb8e30061e2e8fac448c7512ee420142b6874
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c651927..8eef61b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18945,13 +18945,13 @@
'etwiki' => true, // T159609
'fawiki' => true, // T130211
'fiwiki' => true, // T163011
-   'frwiki' => true, // T165044
+   'frwiki' => false, // T181006
'hewiki' => true, // T161621
'nlwiki' => true, // T139432
'plwiki' => true, // T140005
'ptwiki' => true, // T139692
'rowiki' => true, // T170723
-   'ruwiki' => true, // T139541
+   'ruwiki' => false, // T181006
'sqwiki' => true, // T170723
'trwiki' => true, // T139992
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Use a Map instead of an array in order to avoid unexpected r...

2017-11-20 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392534 )

Change subject: Use a Map instead of an array in order to avoid unexpected 
running time.
..

Use a Map instead of an array in order to avoid unexpected running time.

Change-Id: Ib8367e51a96dd8fab3b3c2586c1ecc104f74d930
---
M lib/utils/jsutils.js
M lib/wt2html/pp/processors/wrapSections.js
M lib/wt2html/pp/processors/wrapTemplates.js
3 files changed, 15 insertions(+), 6 deletions(-)


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

diff --git a/lib/utils/jsutils.js b/lib/utils/jsutils.js
index fd772f0..ff5663b 100644
--- a/lib/utils/jsutils.js
+++ b/lib/utils/jsutils.js
@@ -26,6 +26,13 @@
return new Map(Object.entries(obj));
},
 
+   // Return a two-way Map that maps each element to its index (and 
vice-versa)
+   arrayMap: function(arr) {
+   var m = new Map(arr.map(function(e, i) { return [e, i]; }));
+   m.item = function(i) { return arr[i]; };
+   return m;
+   },
+
// ES6 maps/sets are still writable even when frozen, because they
// store data inside the object linked from an internal slot.
// This freezes a map by disabling the mutation methods, although
diff --git a/lib/wt2html/pp/processors/wrapSections.js 
b/lib/wt2html/pp/processors/wrapSections.js
index 15d2806..88583f0 100644
--- a/lib/wt2html/pp/processors/wrapSections.js
+++ b/lib/wt2html/pp/processors/wrapSections.js
@@ -4,6 +4,7 @@
 var Util = require('../../../utils/Util.js').Util;
 var JSUtils = require('../../../utils/jsutils.js').JSUtils;
 
+var arrayMap = JSUtils.arrayMap;
 var lastItem = JSUtils.lastItem;
 
 function createNewSection(state, rootNode, sectionStack, tplInfo, currSection, 
node, newLevel, pseudoSection) {
@@ -197,11 +198,11 @@
var s2 = tplInfo.lastSection.container;
 
// Find a common ancestor of s1 and s2 (could be s1)
-   var s2Ancestors = DU.pathToRoot(s2);
+   var s2Ancestors = arrayMap(DU.pathToRoot(s2));
var s1Ancestors = [s1];
var ancestor = s1;
var i;
-   while ((i = s2Ancestors.indexOf(ancestor)) < 0) {
+   while (!s2Ancestors.has(ancestor)) {
ancestor = ancestor.parentNode;
s1Ancestors.push(ancestor);
}
@@ -242,7 +243,7 @@
// Find children of the common ancestor that are on the
// path from s1 -> ancestor and s2 -> ancestor
var newS1 = s1Ancestors[s1Ancestors.length - 2]; // 
length >= 2 since we know ancestors != s1
-   var newS2 = s2Ancestors[i - 1]; // i >= 1 since we know 
s2 is not s1's ancestor
+   var newS2 = s2Ancestors.item(i - 1); // i >= 1 since we 
know s2 is not s1's ancestor
var newAbout = state.env.newAboutId(); // new about id 
for the new wrapping layer
 
// Ensure that all children from newS1 and newS2 have 
about attrs set
diff --git a/lib/wt2html/pp/processors/wrapTemplates.js 
b/lib/wt2html/pp/processors/wrapTemplates.js
index 15eb165..6a45123 100644
--- a/lib/wt2html/pp/processors/wrapTemplates.js
+++ b/lib/wt2html/pp/processors/wrapTemplates.js
@@ -40,6 +40,7 @@
 var JSUtils = require('../../../utils/jsutils.js').JSUtils;
 var Util = require('../../../utils/Util.js').Util;
 
+var arrayMap = JSUtils.arrayMap;
 var lastItem = JSUtils.lastItem;
 
 
@@ -142,11 +143,11 @@
};
 
// Find common ancestor of startElem and endElem
-   var startAncestors = DU.pathToRoot(startElem);
+   var startAncestors = arrayMap(DU.pathToRoot(startElem));
var elem = endElem;
var parentNode = endElem.parentNode;
while (parentNode && parentNode.nodeType !== doc.DOCUMENT_NODE) {
-   var i = startAncestors.indexOf(parentNode);
+   var i = startAncestors.get(parentNode);
if (i === 0) {
// widen the scope to include the full subtree
range.root = startElem;
@@ -155,7 +156,7 @@
break;
} else if (i > 0) {
range.root = parentNode;
-   range.start = startAncestors[i - 1];
+   range.start = startAncestors.item(i - 1);
range.end = elem;
break;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8367e51a96dd8fab3b3c2586c1ecc104f74d930
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Get mobile base URL from siteinfo and re-enable checks for m...

2017-11-20 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392533 )

Change subject: Get mobile base URL from siteinfo and re-enable checks for 
mobile URLs
..

Get mobile base URL from siteinfo and re-enable checks for mobile URLs

Bug: T177431
Change-Id: Ifdf545f345e24eefb16fba5ceda658e507fde1ff
---
M lib/mwapi.js
M spec.yaml
2 files changed, 9 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/33/392533/1

diff --git a/lib/mwapi.js b/lib/mwapi.js
index ef8c211..80f7bcb 100644
--- a/lib/mwapi.js
+++ b/lib/mwapi.js
@@ -116,7 +116,8 @@
 mainpage: general.mainpage,
 lang: general.lang,
 legaltitlechars: general.legaltitlechars,
-case: general.case
+case: general.case,
+mobileserver: general.mobileserver
 },
 namespaces: res.body.query.namespaces,
 namespacealiases: res.body.query.namespacealiases,
diff --git a/spec.yaml b/spec.yaml
index 033a999..dae621c 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -708,11 +708,11 @@
   revisions: /.+/
   edit: /.+/
   talk: /.+/
-#mobile:
-#  page: /.+/
-#  revisions: /.+/
-#  edit: /.+/
-#  talk: /.+/
+mobile:
+  page: /.+/
+  revisions: /.+/
+  edit: /.+/
+  talk: /.+/
   api_urls:
 summary: /.+/
 #read_html: /.+/
@@ -934,8 +934,8 @@
   content_urls:
 desktop:
   $ref: '#/definitions/content_urls'
-#mobile:
-#  $ref: '#/definitions/content_urls'
+mobile:
+  $ref: '#/definitions/content_urls'
   api_urls:
 $ref: '#/definitions/api_urls'
   coordinates:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdf545f345e24eefb16fba5ceda658e507fde1ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Update spec test results

2017-11-20 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392532 )

Change subject: Hygiene: Update spec test results
..

Hygiene: Update spec test results

Change-Id: I95824b6c5b99ed6350026b6670f54d0658cfbe71
---
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
2 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/32/392532/1

diff --git 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
index 36adda1..c494a6c 100644
--- 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
+++ 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
@@ -117,14 +117,14 @@
   },
   {
 "id": 14,
-"text": "\n\n\nShortcuts:\nMOS:ORDERMOS:SECTIONORDER\nSee also: Wikipedia:Manual of Style §Section 
headings\n\nA simple article should have at least a lead section 
and references. As editors add complexity where required, the elements (such as 
sections and templates) that are used typically appear in the following order, 
although they would not all appear in the same article at the same time: 
\n Before the lead section\n Hatnotes\n Deletion/Protection tags 
(CSD, PROD, AFD, 
PP notices)\n Appendices[1]\n Works or 
publications (for biographies only)\n Foo\n 
{{featured list}}, 
{{featured 
article}} and {{good 
article}} (where appropriate for article status) 
\n Defaultsort\n Categories[2]\n\n",
+"text": "\n\n\nShortcuts\nMOS:ORDERMOS:SECTIONORDER\nSee also: Wikipedia:Manual of Style §Section 
headings\n\nA simple article should have at least a lead section 
and references. As editors add complexity where required, the elements (such as 
sections and templates) that are used typically appear in the following order, 
although they would not all appear in the same article at the same time: 
\n Before the lead section\n Hatnotes\n Deletion/Protection tags 
(CSD, PROD, AFD, 
PP notices)\n Appendices[1]\n Works or 
publications (for biographies only)\n Foo\n 
{{featured list}}, 
{{featured 
article}} and {{good 
article}} (where appropriate for article status) 
\n Defaultsort\n Categories[2]\n\n",
 "toclevel": 2,
 "line": "Order of article elements",
 "anchor": "Order_of_article_elements"
   },
   {
 "id": 15,
-"text": "\n\nShortcut:\nMOS:BODY\nFurther information: 
Help:Section and Wikipedia:Manual of Style 
§Article titles, headings, and sections\n\nBody sections appear after the lead and table of 
contents (click on image for larger view).\n\nArticles 
longer than a stub are generally divided into sections...\n\n",
+"text": "\n\nShortcut\nMOS:BODY\nFurther information: 
Help:Section and Wikipedia:Manual of Style 
§Article titles, headings, and sections\n\nBody sections appear after the lead and table of 
contents (click on image for larger view).\n\nArticles 
longer than a stub are generally divided into sections...\n\n",
 "toclevel": 2,
 "line": "Body sections",
 "anchor": "Body_sections"
@@ -152,7 +152,7 @@
   },
   {
 "id": 19,
-"text": "\n\nShortcuts:\nMOS:APPENDIXMOS:FOOTERS\nFor the list and 
order of common appendices and footers, see 
 §Order of article elements.\n\n",
+"text": "\n\nShortcuts\nMOS:APPENDIXMOS:FOOTERS\nFor the list and 
order of common appendices and footers, see 
 §Order of article elements.\n\n",
 "toclevel": 1,
 "line": "Standard appendices and footers",
 "anchor": "Standard_appendices_and_footers"
@@ -173,7 +173,7 @@
   },
   {
 "id": 22,
-"text": "\n\nShortcuts:\nWP:ALSOMOS:SEEALSOMOS:ALSO\nFor \"other uses\" 
templates (such as this one), see Wikipedia:Hatnote.\nSee also: Wikipedia:Manual of 
Style/Embedded lists §See also lists\n\nFor 
example:\n\n Related person– made a similar 
achievement on April 4, 2005\n Ischemia– restriction in blood 
supply\n\n",
+"text": "\n\nShortcuts\nWP:ALSOMOS:SEEALSOMOS:ALSO\nFor \"other uses\" 
templates (such as this one), see Wikipedia:Hatnote.\nSee also: Wikipedia:Manual of 
Style/Embedded lists §See also lists\n\nFor 
example:\n\n Related person– made a similar 
achievement on April 4, 2005\n Ischemia– restriction in blood 
supply\n\n",
 "toclevel": 2,
 "line": "\"See also\" section",
 "anchor": ".22See_also.22_section"
@@ -187,7 +187,7 @@
   },
   {
 "id": 24,
-"text": "\n\nShortcuts:\nWP:LAYOUTNAVWP:NAVLAYOUT\nMain page: Wikipedia:Categories, lists, and 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Remove redundant default generator call

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/391972 )

Change subject: Remove redundant default generator call
..


Remove redundant default generator call

Change-Id: Ie98c12b336874e61b6996426b57156394973b531
---
M sites/all/modules/thank_you/make_thank_you.drush.inc
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/sites/all/modules/thank_you/make_thank_you.drush.inc 
b/sites/all/modules/thank_you/make_thank_you.drush.inc
index 7e3370a..a805774 100644
--- a/sites/all/modules/thank_you/make_thank_you.drush.inc
+++ b/sites/all/modules/thank_you/make_thank_you.drush.inc
@@ -17,7 +17,6 @@
 
 function drush_make_thank_you() {
 $generators = get_thank_you_generators();
-$default_gen = get_default_thank_you_generator();
 
 if (drush_get_option('listgen', false)) {
 drush_print(t('Available thank you generators'));

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie98c12b336874e61b6996426b57156394973b531
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
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] operations/mediawiki-config[master]: Revert "group2 to wmf.8"

2017-11-20 Thread Chad (Code Review)
Hello Urbanecm, jenkins-bot, Zoranzoki21,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "group2 to wmf.8"
..

Revert "group2 to wmf.8"

This reverts commit de22b99c6c38961d9d466f78d5d2b07ef314fc04.

Change-Id: I1a59610b79117ffb72b3a0dcdef685f93cd9ad74
---
M wikiversions.json
1 file changed, 304 insertions(+), 304 deletions(-)


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

diff --git a/wikiversions.json b/wikiversions.json
index 891d5bc..e875bc1 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,41 +1,41 @@
 {
-"aawiki": "php-1.31.0-wmf.8",
+"aawiki": "php-1.31.0-wmf.7",
 "aawikibooks": "php-1.31.0-wmf.8",
 "aawiktionary": "php-1.31.0-wmf.8",
-"abwiki": "php-1.31.0-wmf.8",
+"abwiki": "php-1.31.0-wmf.7",
 "abwiktionary": "php-1.31.0-wmf.8",
-"acewiki": "php-1.31.0-wmf.8",
+"acewiki": "php-1.31.0-wmf.7",
 "advisorywiki": "php-1.31.0-wmf.8",
-"adywiki": "php-1.31.0-wmf.8",
-"afwiki": "php-1.31.0-wmf.8",
+"adywiki": "php-1.31.0-wmf.7",
+"afwiki": "php-1.31.0-wmf.7",
 "afwikibooks": "php-1.31.0-wmf.8",
 "afwikiquote": "php-1.31.0-wmf.8",
 "afwiktionary": "php-1.31.0-wmf.8",
-"akwiki": "php-1.31.0-wmf.8",
+"akwiki": "php-1.31.0-wmf.7",
 "akwikibooks": "php-1.31.0-wmf.8",
 "akwiktionary": "php-1.31.0-wmf.8",
-"alswiki": "php-1.31.0-wmf.8",
+"alswiki": "php-1.31.0-wmf.7",
 "alswikibooks": "php-1.31.0-wmf.8",
 "alswikiquote": "php-1.31.0-wmf.8",
 "alswiktionary": "php-1.31.0-wmf.8",
-"amwiki": "php-1.31.0-wmf.8",
+"amwiki": "php-1.31.0-wmf.7",
 "amwikimedia": "php-1.31.0-wmf.8",
 "amwikiquote": "php-1.31.0-wmf.8",
 "amwiktionary": "php-1.31.0-wmf.8",
-"angwiki": "php-1.31.0-wmf.8",
+"angwiki": "php-1.31.0-wmf.7",
 "angwikibooks": "php-1.31.0-wmf.8",
 "angwikiquote": "php-1.31.0-wmf.8",
 "angwikisource": "php-1.31.0-wmf.8",
 "angwiktionary": "php-1.31.0-wmf.8",
-"anwiki": "php-1.31.0-wmf.8",
+"anwiki": "php-1.31.0-wmf.7",
 "anwiktionary": "php-1.31.0-wmf.8",
-"arbcom_cswiki": "php-1.31.0-wmf.8",
-"arbcom_dewiki": "php-1.31.0-wmf.8",
-"arbcom_enwiki": "php-1.31.0-wmf.8",
-"arbcom_fiwiki": "php-1.31.0-wmf.8",
-"arbcom_nlwiki": "php-1.31.0-wmf.8",
-"arcwiki": "php-1.31.0-wmf.8",
-"arwiki": "php-1.31.0-wmf.8",
+"arbcom_cswiki": "php-1.31.0-wmf.7",
+"arbcom_dewiki": "php-1.31.0-wmf.7",
+"arbcom_enwiki": "php-1.31.0-wmf.7",
+"arbcom_fiwiki": "php-1.31.0-wmf.7",
+"arbcom_nlwiki": "php-1.31.0-wmf.7",
+"arcwiki": "php-1.31.0-wmf.7",
+"arwiki": "php-1.31.0-wmf.7",
 "arwikibooks": "php-1.31.0-wmf.8",
 "arwikimedia": "php-1.31.0-wmf.8",
 "arwikinews": "php-1.31.0-wmf.8",
@@ -43,81 +43,81 @@
 "arwikisource": "php-1.31.0-wmf.8",
 "arwikiversity": "php-1.31.0-wmf.8",
 "arwiktionary": "php-1.31.0-wmf.8",
-"arzwiki": "php-1.31.0-wmf.8",
-"astwiki": "php-1.31.0-wmf.8",
+"arzwiki": "php-1.31.0-wmf.7",
+"astwiki": "php-1.31.0-wmf.7",
 "astwikibooks": "php-1.31.0-wmf.8",
 "astwikiquote": "php-1.31.0-wmf.8",
 "astwiktionary": "php-1.31.0-wmf.8",
-"aswiki": "php-1.31.0-wmf.8",
+"aswiki": "php-1.31.0-wmf.7",
 "aswikibooks": "php-1.31.0-wmf.8",
 "aswikisource": "php-1.31.0-wmf.8",
 "aswiktionary": "php-1.31.0-wmf.8",
-"atjwiki": "php-1.31.0-wmf.8",
+"atjwiki": "php-1.31.0-wmf.7",
 "auditcomwiki": "php-1.31.0-wmf.8",
-"avwiki": "php-1.31.0-wmf.8",
+"avwiki": "php-1.31.0-wmf.7",
 "avwiktionary": "php-1.31.0-wmf.8",
-"aywiki": "php-1.31.0-wmf.8",
+"aywiki": "php-1.31.0-wmf.7",
 "aywikibooks": "php-1.31.0-wmf.8",
 "aywiktionary": "php-1.31.0-wmf.8",
-"azbwiki": "php-1.31.0-wmf.8",
-"azwiki": "php-1.31.0-wmf.8",
+"azbwiki": "php-1.31.0-wmf.7",
+"azwiki": "php-1.31.0-wmf.7",
 "azwikibooks": "php-1.31.0-wmf.8",
 "azwikiquote": "php-1.31.0-wmf.8",
 "azwikisource": "php-1.31.0-wmf.8",
 "azwiktionary": "php-1.31.0-wmf.8",
-"barwiki": "php-1.31.0-wmf.8",
-"bat_smgwiki": "php-1.31.0-wmf.8",
-"bawiki": "php-1.31.0-wmf.8",
+"barwiki": "php-1.31.0-wmf.7",
+"bat_smgwiki": "php-1.31.0-wmf.7",
+"bawiki": "php-1.31.0-wmf.7",
 "bawikibooks": "php-1.31.0-wmf.8",
-"bclwiki": "php-1.31.0-wmf.8",
+"bclwiki": "php-1.31.0-wmf.7",
 "bdwikimedia": "php-1.31.0-wmf.8",
-"be_x_oldwiki": "php-1.31.0-wmf.8",
+"be_x_oldwiki": "php-1.31.0-wmf.7",
 "betawikiversity": "php-1.31.0-wmf.8",
-"bewiki": "php-1.31.0-wmf.8",
+"bewiki": "php-1.31.0-wmf.7",
 "bewikibooks": "php-1.31.0-wmf.8",
 "bewikimedia": "php-1.31.0-wmf.8",
 "bewikiquote": "php-1.31.0-wmf.8",
 "bewikisource": "php-1.31.0-wmf.8",
 "bewiktionary": 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "group2 to wmf.8"

2017-11-20 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392531 )

Change subject: Revert "group2 to wmf.8"
..


Revert "group2 to wmf.8"

This reverts commit de22b99c6c38961d9d466f78d5d2b07ef314fc04.

Change-Id: I1a59610b79117ffb72b3a0dcdef685f93cd9ad74
---
M wikiversions.json
1 file changed, 304 insertions(+), 304 deletions(-)

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



diff --git a/wikiversions.json b/wikiversions.json
index 891d5bc..e875bc1 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,41 +1,41 @@
 {
-"aawiki": "php-1.31.0-wmf.8",
+"aawiki": "php-1.31.0-wmf.7",
 "aawikibooks": "php-1.31.0-wmf.8",
 "aawiktionary": "php-1.31.0-wmf.8",
-"abwiki": "php-1.31.0-wmf.8",
+"abwiki": "php-1.31.0-wmf.7",
 "abwiktionary": "php-1.31.0-wmf.8",
-"acewiki": "php-1.31.0-wmf.8",
+"acewiki": "php-1.31.0-wmf.7",
 "advisorywiki": "php-1.31.0-wmf.8",
-"adywiki": "php-1.31.0-wmf.8",
-"afwiki": "php-1.31.0-wmf.8",
+"adywiki": "php-1.31.0-wmf.7",
+"afwiki": "php-1.31.0-wmf.7",
 "afwikibooks": "php-1.31.0-wmf.8",
 "afwikiquote": "php-1.31.0-wmf.8",
 "afwiktionary": "php-1.31.0-wmf.8",
-"akwiki": "php-1.31.0-wmf.8",
+"akwiki": "php-1.31.0-wmf.7",
 "akwikibooks": "php-1.31.0-wmf.8",
 "akwiktionary": "php-1.31.0-wmf.8",
-"alswiki": "php-1.31.0-wmf.8",
+"alswiki": "php-1.31.0-wmf.7",
 "alswikibooks": "php-1.31.0-wmf.8",
 "alswikiquote": "php-1.31.0-wmf.8",
 "alswiktionary": "php-1.31.0-wmf.8",
-"amwiki": "php-1.31.0-wmf.8",
+"amwiki": "php-1.31.0-wmf.7",
 "amwikimedia": "php-1.31.0-wmf.8",
 "amwikiquote": "php-1.31.0-wmf.8",
 "amwiktionary": "php-1.31.0-wmf.8",
-"angwiki": "php-1.31.0-wmf.8",
+"angwiki": "php-1.31.0-wmf.7",
 "angwikibooks": "php-1.31.0-wmf.8",
 "angwikiquote": "php-1.31.0-wmf.8",
 "angwikisource": "php-1.31.0-wmf.8",
 "angwiktionary": "php-1.31.0-wmf.8",
-"anwiki": "php-1.31.0-wmf.8",
+"anwiki": "php-1.31.0-wmf.7",
 "anwiktionary": "php-1.31.0-wmf.8",
-"arbcom_cswiki": "php-1.31.0-wmf.8",
-"arbcom_dewiki": "php-1.31.0-wmf.8",
-"arbcom_enwiki": "php-1.31.0-wmf.8",
-"arbcom_fiwiki": "php-1.31.0-wmf.8",
-"arbcom_nlwiki": "php-1.31.0-wmf.8",
-"arcwiki": "php-1.31.0-wmf.8",
-"arwiki": "php-1.31.0-wmf.8",
+"arbcom_cswiki": "php-1.31.0-wmf.7",
+"arbcom_dewiki": "php-1.31.0-wmf.7",
+"arbcom_enwiki": "php-1.31.0-wmf.7",
+"arbcom_fiwiki": "php-1.31.0-wmf.7",
+"arbcom_nlwiki": "php-1.31.0-wmf.7",
+"arcwiki": "php-1.31.0-wmf.7",
+"arwiki": "php-1.31.0-wmf.7",
 "arwikibooks": "php-1.31.0-wmf.8",
 "arwikimedia": "php-1.31.0-wmf.8",
 "arwikinews": "php-1.31.0-wmf.8",
@@ -43,81 +43,81 @@
 "arwikisource": "php-1.31.0-wmf.8",
 "arwikiversity": "php-1.31.0-wmf.8",
 "arwiktionary": "php-1.31.0-wmf.8",
-"arzwiki": "php-1.31.0-wmf.8",
-"astwiki": "php-1.31.0-wmf.8",
+"arzwiki": "php-1.31.0-wmf.7",
+"astwiki": "php-1.31.0-wmf.7",
 "astwikibooks": "php-1.31.0-wmf.8",
 "astwikiquote": "php-1.31.0-wmf.8",
 "astwiktionary": "php-1.31.0-wmf.8",
-"aswiki": "php-1.31.0-wmf.8",
+"aswiki": "php-1.31.0-wmf.7",
 "aswikibooks": "php-1.31.0-wmf.8",
 "aswikisource": "php-1.31.0-wmf.8",
 "aswiktionary": "php-1.31.0-wmf.8",
-"atjwiki": "php-1.31.0-wmf.8",
+"atjwiki": "php-1.31.0-wmf.7",
 "auditcomwiki": "php-1.31.0-wmf.8",
-"avwiki": "php-1.31.0-wmf.8",
+"avwiki": "php-1.31.0-wmf.7",
 "avwiktionary": "php-1.31.0-wmf.8",
-"aywiki": "php-1.31.0-wmf.8",
+"aywiki": "php-1.31.0-wmf.7",
 "aywikibooks": "php-1.31.0-wmf.8",
 "aywiktionary": "php-1.31.0-wmf.8",
-"azbwiki": "php-1.31.0-wmf.8",
-"azwiki": "php-1.31.0-wmf.8",
+"azbwiki": "php-1.31.0-wmf.7",
+"azwiki": "php-1.31.0-wmf.7",
 "azwikibooks": "php-1.31.0-wmf.8",
 "azwikiquote": "php-1.31.0-wmf.8",
 "azwikisource": "php-1.31.0-wmf.8",
 "azwiktionary": "php-1.31.0-wmf.8",
-"barwiki": "php-1.31.0-wmf.8",
-"bat_smgwiki": "php-1.31.0-wmf.8",
-"bawiki": "php-1.31.0-wmf.8",
+"barwiki": "php-1.31.0-wmf.7",
+"bat_smgwiki": "php-1.31.0-wmf.7",
+"bawiki": "php-1.31.0-wmf.7",
 "bawikibooks": "php-1.31.0-wmf.8",
-"bclwiki": "php-1.31.0-wmf.8",
+"bclwiki": "php-1.31.0-wmf.7",
 "bdwikimedia": "php-1.31.0-wmf.8",
-"be_x_oldwiki": "php-1.31.0-wmf.8",
+"be_x_oldwiki": "php-1.31.0-wmf.7",
 "betawikiversity": "php-1.31.0-wmf.8",
-"bewiki": "php-1.31.0-wmf.8",
+"bewiki": "php-1.31.0-wmf.7",
 "bewikibooks": "php-1.31.0-wmf.8",
 "bewikimedia": "php-1.31.0-wmf.8",
 "bewikiquote": "php-1.31.0-wmf.8",
 "bewikisource": "php-1.31.0-wmf.8",
 "bewiktionary": "php-1.31.0-wmf.8",
-"bgwiki": "php-1.31.0-wmf.8",
+"bgwiki": "php-1.31.0-wmf.7",
 "bgwikibooks": 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: (trivial) Fix index value for overall message age

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385080 )

Change subject: (trivial) Fix index value for overall message age
..


(trivial) Fix index value for overall message age

Change-Id: I68e7d6589638283fa2f9bf1178666b658238ba6d
---
M sites/all/modules/queue2civicrm/queue2civicrm.module
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/sites/all/modules/queue2civicrm/queue2civicrm.module 
b/sites/all/modules/queue2civicrm/queue2civicrm.module
index 3f2f4cc..c15367e 100644
--- a/sites/all/modules/queue2civicrm/queue2civicrm.module
+++ b/sites/all/modules/queue2civicrm/queue2civicrm.module
@@ -161,7 +161,7 @@
 
   if ($processed > 0) {
 watchdog('queue2civicrm', 'Successfully processed ' . $processed . ' 
contribution(s).');
-watchdog('queue2civicrm', 'Average message age: ' . $ageMetrics['overall'] 
. ' seconds.');
+watchdog('queue2civicrm', 'Average message age: ' . 
$ageMetrics['overall_message_age'] . ' seconds.');
   }
   else {
 watchdog('queue2civicrm', 'No contributions processed.');

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68e7d6589638283fa2f9bf1178666b658238ba6d
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
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] mediawiki/core[master]: Special:UserRights: Prevent FOUC on loading

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392376 )

Change subject: Special:UserRights: Prevent FOUC on loading
..


Special:UserRights: Prevent FOUC on loading

Implement the show/hide based on the group checkbox with CSS instead of
JavaScript.
Hide the expiry input field initially with CSS instead of JavaScript.

Change-Id: I33a4b0a13dab92156aeea96529573ad49fa2d616
---
M includes/specials/SpecialUserrights.php
M resources/src/mediawiki.special/mediawiki.special.userrights.css
M resources/src/mediawiki.special/mediawiki.special.userrights.js
3 files changed, 26 insertions(+), 14 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialUserrights.php 
b/includes/specials/SpecialUserrights.php
index 4e4394d..cf8c3f5 100644
--- a/includes/specials/SpecialUserrights.php
+++ b/includes/specials/SpecialUserrights.php
@@ -835,7 +835,10 @@
}
$ret .= "\t\n";
foreach ( $column as $group => $checkbox ) {
-   $attr = $checkbox['disabled'] ? [ 'disabled' => 
'disabled' ] : [];
+   $attr = [ 'class' => 
'mw-userrights-groupcheckbox' ];
+   if ( $checkbox['disabled'] ) {
+   $attr['disabled'] = 'disabled';
+   }
 
$member = 
UserGroupMembership::getGroupMemberName( $group, $user->getName() );
if ( $checkbox['irreversible'] ) {
@@ -847,10 +850,6 @@
}
$checkboxHtml = Xml::checkLabel( $text, 
"wpGroup-" . $group,
"wpGroup-" . $group, $checkbox['set'], 
$attr );
-   $ret .= "\t\t" . ( ( $checkbox['disabled'] && 
$checkbox['disabled-expiry'] )
-   ? Xml::tags( 'div', [ 'class' => 
'mw-userrights-disabled' ], $checkboxHtml )
-   : Xml::tags( 'div', [], $checkboxHtml )
-   ) . "\n";
 
if ( $this->canProcessExpiries() ) {
$uiUser = $this->getUser();
@@ -920,7 +919,10 @@
$expiryHtml .= 
$expiryFormOptions->getHTML() . '';
 
// Add custom expiry field
-   $attribs = [ 'id' => 
"mw-input-wpExpiry-$group-other" ];
+   $attribs = [
+   'id' => 
"mw-input-wpExpiry-$group-other",
+   'class' => 
'mw-userrights-expiryfield',
+   ];
if ( 
$checkbox['disabled-expiry'] ) {
$attribs['disabled'] = 
'disabled';
}
@@ -939,8 +941,12 @@
'id' => 
"mw-userrights-nested-wpGroup-$group",
'class' => 
'mw-userrights-nested',
];
-   $ret .= "\t\t\t" . Xml::tags( 'div', 
$divAttribs, $expiryHtml ) . "\n";
+   $checkboxHtml .= "\t\t\t" . Xml::tags( 
'div', $divAttribs, $expiryHtml ) . "\n";
}
+   $ret .= "\t\t" . ( ( $checkbox['disabled'] && 
$checkbox['disabled-expiry'] )
+   ? Xml::tags( 'div', [ 'class' => 
'mw-userrights-disabled' ], $checkboxHtml )
+   : Xml::tags( 'div', [], $checkboxHtml )
+   ) . "\n";
}
$ret .= "\t\n";
}
diff --git a/resources/src/mediawiki.special/mediawiki.special.userrights.css 
b/resources/src/mediawiki.special/mediawiki.special.userrights.css
index acfdb56..1ffdf70 100644
--- a/resources/src/mediawiki.special/mediawiki.special.userrights.css
+++ b/resources/src/mediawiki.special/mediawiki.special.userrights.css
@@ -22,3 +22,14 @@
 .mw-userrights-groups * th {
text-align: left;
 }
+
+/* Dynamically show/hide the expiry selection underneath each checkbox */
+input.mw-userrights-groupcheckbox:not( :checked ) ~ .mw-userrights-nested {
+   display: none;
+}
+
+/* Initial hide the expiry fields to prevent a FOUC on loading */
+/* The input fields gets unhidden by JavaScript when needed */
+.client-js .mw-userrights-expiryfield {
+   display: 

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392530 )

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..


Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

3cbf0818a75e21dd0eb5029c1ad8c0c721aa111c Add extended reports extension to add 
Address History tab option.
7292e063a2f0274415ac7066550b985a42022674 Enable extended report

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I38db002a3b2ca5cfb30b9a6fb1338da03cce26be
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
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] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...

2017-11-20 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392530 )

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..

Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

3cbf0818a75e21dd0eb5029c1ad8c0c721aa111c Add extended reports extension to add 
Address History tab option.
7292e063a2f0274415ac7066550b985a42022674 Enable extended report

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/30/392530/1


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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Enable extended report

2017-11-20 Thread Eileen (Code Review)
Eileen has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/391479 )

Change subject: Enable extended report
..


Enable extended report

This extension gives us the Address History tab.

Bug: T142549
Change-Id: I114c8ff324484c618be5be50f929ea15f6596a3c
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 40 insertions(+), 0 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved
  Eileen: Verified



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index b57666f..79c0b23 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -3330,3 +3330,43 @@
   civicrm_api3('extension', 'refresh', array());
   civicrm_api3('extension', 'install',  array('key' => 
'org.wikimedia.dedupetools'));
 }
+
+/**
+ * Enable extended report.
+ *
+ * This extension gives us the Address History tab.
+ *
+ * Bug: T142549
+ */
+function wmf_civicrm_update_7580() {
+  civicrm_initialize();
+  civicrm_api3('extension', 'refresh', array());
+  civicrm_api3('extension', 'install',  array('key' => 
'nz.co.fuzion.extendedreport'));
+}
+
+/**
+ * Add report for Address History tab.
+ *
+ * Bug: T142549
+ */
+function wmf_civicrm_update_7585() {
+  civicrm_initialize();
+  civicrm_api3('ReportInstance', 'create', array(
+'title' => ts('Address History'),
+'report_id' => 'contact/addresshistory',
+'description' => 'ContactAddress History',
+'permission' => 'access CiviReport',
+'form_values' => serialize(array(
+  'fields' => array(
+'address_display_address' => 1,
+'log_date' => 1,
+'address_location_type_id' => 1,
+'address_is_primary' => 1,
+'log_conn_id' => 1,
+'log_user_id' => 1,
+'log_action' => 1,
+  ),
+  'contact_dashboard_tab' => array('contact_dashboard_tab' => '1'),
+)),
+  ));
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I114c8ff324484c618be5be50f929ea15f6596a3c
Gerrit-PatchSet: 6
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
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] mediawiki...VisualEditor[master]: Move source mode newline hack down to ArticleTarget

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392476 )

Change subject: Move source mode newline hack down to ArticleTarget
..


Move source mode newline hack down to ArticleTarget

We need this hack when visually editing articles, but not in e.g. the
Flow integration. Move it down so that mw.Target has a clean
parseDocument method that can be used by Flow without undesirable
newlines being introduced.

Change-Id: I52bba88b3d33c3d6d16c4cf832f23f970a243abf
---
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
M modules/ve-mw/init/ve.init.mw.Target.js
2 files changed, 16 insertions(+), 3 deletions(-)

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



diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index 66889b7..781af06 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -209,6 +209,22 @@
'showWatchthis'
 ] );
 
+/* Static methods */
+
+/**
+ * @inheritdoc
+ */
+ve.init.mw.ArticleTarget.static.parseDocument = function ( documentString, 
mode ) {
+   // Add trailing linebreak to wikitext documents for consistency
+   // with old editor and usability. Will be stripped on save. T156609
+   if ( mode === 'source' ) {
+   documentString += '\n';
+   }
+
+   // Parent method
+   return ve.init.mw.ArticleTarget.super.static.parseDocument.call( this, 
documentString, mode );
+};
+
 /* Methods */
 
 /**
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 08d17f2..3663177 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -191,9 +191,6 @@
 ve.init.mw.Target.static.parseDocument = function ( documentString, mode ) {
var doc;
if ( mode === 'source' ) {
-   // Add trailing linebreak to wikitext documents for consistency
-   // with old editor and usability. Will be stripped on save. 
T156609
-   documentString += '\n';
// Parent method
doc = ve.init.mw.Target.super.static.parseDocument.call( this, 
documentString, mode );
} else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52bba88b3d33c3d6d16c4cf832f23f970a243abf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Jforrester 
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]: Crimean Tatar Transliteration

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/372479 )

Change subject: Crimean Tatar Transliteration
..


Crimean Tatar Transliteration

This is a first pass at Latin/Cyrillic translitertion for Crimean
Tatar (crh).

Includes transliteration tables, prefix/suffix mappings, regex
mappings, and exceptions lists for words and abbreviations.

Regularize CRH language name in messages/* files.

Fix "varient" typos in qqq.json.

Add unit tests for CRH transliteration.

Bug: T23582
Change-Id: I424703f99adf837f6217872b882d1ea26bfdd068
---
M autoload.php
M languages/LanguageConverter.php
A languages/classes/LanguageCrh.php
A languages/data/CrhExceptions.php
M languages/i18n/crh-cyrl.json
M languages/i18n/crh-latn.json
M languages/i18n/en.json
M languages/i18n/qqq.json
M languages/messages/MessagesCrh.php
M languages/messages/MessagesCrh_cyrl.php
M languages/messages/MessagesCrh_latn.php
A tests/phpunit/languages/classes/LanguageCrhTest.php
12 files changed, 1,227 insertions(+), 13 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index aef7e5e..fe28857 100644
--- a/autoload.php
+++ b/autoload.php
@@ -312,6 +312,7 @@
'CreateAndPromote' => __DIR__ . '/maintenance/createAndPromote.php',
'CreateFileOp' => __DIR__ . 
'/includes/libs/filebackend/fileop/CreateFileOp.php',
'CreditsAction' => __DIR__ . '/includes/actions/CreditsAction.php',
+   'CrhConverter' => __DIR__ . '/languages/classes/LanguageCrh.php',
'CryptHKDF' => __DIR__ . '/includes/libs/CryptHKDF.php',
'CryptRand' => __DIR__ . '/includes/libs/CryptRand.php',
'CssContent' => __DIR__ . '/includes/content/CssContent.php',
@@ -706,6 +707,7 @@
'LanguageBs' => __DIR__ . '/languages/classes/LanguageBs.php',
'LanguageCode' => __DIR__ . '/languages/LanguageCode.php',
'LanguageConverter' => __DIR__ . '/languages/LanguageConverter.php',
+   'LanguageCrh' => __DIR__ . '/languages/classes/LanguageCrh.php',
'LanguageCu' => __DIR__ . '/languages/classes/LanguageCu.php',
'LanguageDsb' => __DIR__ . '/languages/classes/LanguageDsb.php',
'LanguageEn' => __DIR__ . '/languages/classes/LanguageEn.php',
@@ -885,6 +887,7 @@
'MediaWiki\\Interwiki\\ClassicInterwikiLookup' => __DIR__ . 
'/includes/interwiki/ClassicInterwikiLookup.php',
'MediaWiki\\Interwiki\\InterwikiLookup' => __DIR__ . 
'/includes/interwiki/InterwikiLookup.php',
'MediaWiki\\Interwiki\\InterwikiLookupAdapter' => __DIR__ . 
'/includes/interwiki/InterwikiLookupAdapter.php',
+   'MediaWiki\\Languages\\Data\\CrhExceptions' => __DIR__ . 
'/languages/data/CrhExceptions.php',
'MediaWiki\\Languages\\Data\\Names' => __DIR__ . 
'/languages/data/Names.php',
'MediaWiki\\Languages\\Data\\ZhConversion' => __DIR__ . 
'/languages/data/ZhConversion.php',
'MediaWiki\\Linker\\LinkRenderer' => __DIR__ . 
'/includes/linker/LinkRenderer.php',
diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php
index 1f720af..a84c4b8 100644
--- a/languages/LanguageConverter.php
+++ b/languages/LanguageConverter.php
@@ -39,6 +39,7 @@
 */
static public $languagesWithVariants = [
'en',
+   'crh',
'gan',
'iu',
'kk',
diff --git a/languages/classes/LanguageCrh.php 
b/languages/classes/LanguageCrh.php
new file mode 100644
index 000..f384471
--- /dev/null
+++ b/languages/classes/LanguageCrh.php
@@ -0,0 +1,296 @@
+https://crh.wikipedia.org/wiki/Qullan%C4%B1c%C4%B1:Don_Alessandro/Translit
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Language
+ */
+
+/**
+ * Crimean Tatar (Qırımtatarca) converter routines
+ *
+ * @ingroup Language
+ */
+class CrhConverter extends LanguageConverter {
+   // Defines working character ranges
+   const WORD_BEGINS = '\r\s\"\'\(\)\-<>\[\]\/.,:;!?';
+   const WORD_ENDS = '\r\s\"\'\(\)\-<>\[\]\/.,:;!?';
+
+   // Cyrillic
+   const C_UC = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ'; # Crimean Tatar 
Cyrillic uppercase
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.31.0-wmf.7]: objectcache: make sure variant keys are namespaced as keys s...

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392527 )

Change subject: objectcache: make sure variant keys are namespaced as keys 
should be
..


objectcache: make sure variant keys are namespaced as keys should be

Change-Id: I02597d6dbc2febace25ef6d1981f69dc704efe8d
(cherry picked from commit f23fb835fc49dcb38f9ec898831921a908e8c6e4)
---
M includes/libs/objectcache/WANObjectCache.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index e19cf48..f39ac4b 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -912,7 +912,7 @@
// Value existed before with a 
different version; use variant key.
// Reflect purges to $key by requiring 
that this key value be newer.
$value = $this->doGetWithSetCallback(
-   'cache-variant:' . md5( $key ) 
. ":$version",
+   $this->makeGlobalKey( 
'WANCache-key-variant', md5( $key ), $version ),
$ttl,
$callback,
// Regenerate value if not 
newer than $key

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02597d6dbc2febace25ef6d1981f69dc704efe8d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.31.0-wmf.7
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
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...trending-edits[master]: Update the service template to 0.5.3

2017-11-20 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392529 )

Change subject: Update the service template to 0.5.3
..

Update the service template to 0.5.3

This updates to the latest version of
ServiceTemplateNode (0.5.3)

A forced merged with --allow-unrelated-histories
was necessary.

eslint rules are temporarily disabled in various files
not specific to the ServiceTemplate
and will be fixed in a follow up (076e54f)

Bug: T151395
Change-Id: I4c9320911d1f9ae356281382a7b42a367129b513
---
A .eslintrc.yml
M .gitignore
M .travis.yml
M app.js
M config.prod.yaml
M lib/EventProcessor.js
M lib/EventSource.js
M lib/api-util.js
M lib/score-pages.js
A lib/swagger-ui.js
M lib/util.js
M package.json
M routes/info.js
M routes/root.js
M routes/trending-v1.js
M server.js
M test/features/app/app.js
M test/features/app/spec.js
A test/features/info/info.js
M test/features/v1/trending.js
M test/index.js
M test/utils/logStream.js
M test/utils/server.js
23 files changed, 570 insertions(+), 393 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits 
refs/changes/29/392529/1

diff --git a/.eslintrc.yml b/.eslintrc.yml
new file mode 100644
index 000..9e2c225
--- /dev/null
+++ b/.eslintrc.yml
@@ -0,0 +1 @@
+extends: 'eslint-config-node-services'
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index b09b5ed..850a956 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 Dockerfile
 .idea/
 coverage
+config.yaml
 node_modules
 npm-debug.log
diff --git a/.travis.yml b/.travis.yml
index f33adc7..b6a9e5d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@
 sudo: false
 
 node_js:
-  - "0.10"
-  - "0.12"
   - "4"
-  - "5"
+  - "6"
+  - "8"
+  - "node"
diff --git a/app.js b/app.js
index 7f5cf81..e5cf485 100644
--- a/app.js
+++ b/app.js
@@ -1,20 +1,18 @@
 'use strict';
 
-
-require('core-js/shim');
-
-var http = require('http');
-var BBPromise = require('bluebird');
-var express = require('express');
-var compression = require('compression');
-var bodyParser = require('body-parser');
-var fs = BBPromise.promisifyAll(require('fs'));
-var sUtil = require('./lib/util');
-var apiUtil = require('./lib/api-util');
-var packageInfo = require('./package.json');
-var yaml = require('js-yaml');
-var EventSource = require('./lib/EventSource');
-var EventProcessor = require('./lib/EventProcessor');
+const http = require('http');
+const BBPromise = require('bluebird');
+const express = require('express');
+const compression = require('compression');
+const bodyParser = require('body-parser');
+const fs = BBPromise.promisifyAll(require('fs'));
+const sUtil = require('./lib/util');
+const apiUtil = require('./lib/api-util');
+const packageInfo = require('./package.json');
+const yaml = require('js-yaml');
+const addShutdown = require('http-shutdown');
+const EventSource = require('./lib/EventSource');
+const EventProcessor = require('./lib/EventProcessor');
 
 
 /**
@@ -25,7 +23,7 @@
 function initApp(options) {
 
 // the main application object
-var app = express();
+const app = express();
 
 // get the options and make them available in the app
 app.logger = options.logger;// the logging device
@@ -43,8 +41,8 @@
 if (app.conf.compression_level === undefined) { app.conf.compression_level 
= 3; }
 if (app.conf.cors === undefined) { app.conf.cors = '*'; }
 if (app.conf.csp === undefined) {
-app.conf.csp =
-"default-src 'self'; object-src 'none'; media-src *; img-src *; 
style-src *; frame-ancestors 'self'";
+// eslint-disable-next-line max-len
+app.conf.csp = "default-src 'self'; object-src 'none'; media-src *; 
img-src *; style-src *; frame-ancestors 'self'";
 }
 
 // set outgoing proxy
@@ -64,26 +62,26 @@
 // set up header whitelisting for logging
 if (!app.conf.log_header_whitelist) {
 app.conf.log_header_whitelist = [
-'cache-control', 'content-type', 'content-length', 'if-match',
-'user-agent', 'x-request-id'
+'cache-control', 'content-type', 'content-length', 'if-match',
+'user-agent', 'x-request-id'
 ];
 }
-app.conf.log_header_whitelist = new RegExp('^(?:' + 
app.conf.log_header_whitelist.map(function(item) {
+app.conf.log_header_whitelist = new 
RegExp(`^(?:${app.conf.log_header_whitelist.map((item) => {
 return item.trim();
-}).join('|') + ')$', 'i');
+}).join('|')})$`, 'i');
 
 // set up the request templates for the APIs
 apiUtil.setupApiTemplates(app);
 
 // set up the spec
 if (!app.conf.spec) {
-app.conf.spec = __dirname + '/spec.yaml';
+app.conf.spec = `${__dirname}/spec.yaml`;
 }
 if (app.conf.spec.constructor !== Object) {
 try {
 app.conf.spec = yaml.safeLoad(fs.readFileSync(app.conf.spec));
 } catch (e) {
-

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add extended reports extension to add Address History tab op...

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392488 )

Change subject: Add extended reports extension to add Address History tab 
option.
..


Add extended reports extension to add Address History tab option.

Bug: T142549

Change-Id: I78776543fee257aab0a742e6e8dbfbea71afa226
---
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/ActivityEditable.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/ActivityEditable.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/ActivityExtended.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/ActivityExtended.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/ActivityPivot.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/ActivityPivot.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Campaign/CampaignProgressReport.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Campaign/CampaignProgressReport.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Case/ActivityPivot.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Case/ActivityPivot.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Case/CasePivot.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Case/CasePivot.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Case/CaseWithActivityPivot.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Case/CaseWithActivityPivot.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contact/AddressHistory.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contact/AddressHistory.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contact/Basiccontact.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contact/Basiccontact.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contact/Extendedcontact.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contact/Extendedcontact.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contribute/BookkeepingExtended.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contribute/BookkeepingExtended.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contribute/ContributionPivot.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contribute/ContributionPivot.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contribute/DetailExtended.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contribute/DetailExtended.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contribute/LoggingSummary.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contribute/LoggingSummary.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contribute/Overview.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Contribute/Overview.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Event/Editableevents.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Event/Editableevents.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Event/EventOverview.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Event/EventOverview.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Event/EventPivot.mgd.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Event/EventPivot.php
A 
sites/default/civicrm/extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/Event/ParticipantExtended.mgd.php
A 

[MediaWiki-commits] [Gerrit] mediawiki...Collection[wmf/1.31.0-wmf.7]: Use a meaningful key name in getBookFromCache()

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392528 )

Change subject: Use a meaningful key name in getBookFromCache()
..


Use a meaningful key name in getBookFromCache()

Change-Id: I6bf80012505f3ba1c37c76d2934d6f086d735d1d
(cherry picked from commit 780e6ae5296e67f30238cd508fb53ae23ba298a4)
---
M includes/BookRenderingMediator.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/BookRenderingMediator.php 
b/includes/BookRenderingMediator.php
index 9d30550..9c7d068 100644
--- a/includes/BookRenderingMediator.php
+++ b/includes/BookRenderingMediator.php
@@ -95,7 +95,10 @@
return in_array( $key, [ 'type', 'title', 
'revision' ], true );
} );
}, $keyBase['items'] );
-   $key = $this->htmlCache->makeGlobalKey( md5( json_encode( 
$keyBase ) ) );
+   $key = $this->htmlCache->makeGlobalKey(
+   'collection-book',
+   md5( json_encode( $keyBase ) )
+   );
 
$book = $this->htmlCache->get( $key );
if ( !$book ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6bf80012505f3ba1c37c76d2934d6f086d735d1d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: wmf/1.31.0-wmf.7
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: C. Scott Ananian 
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...Collection[wmf/1.31.0-wmf.7]: Use a meaningful key name in getBookFromCache()

2017-11-20 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392528 )

Change subject: Use a meaningful key name in getBookFromCache()
..

Use a meaningful key name in getBookFromCache()

Change-Id: I6bf80012505f3ba1c37c76d2934d6f086d735d1d
(cherry picked from commit 780e6ae5296e67f30238cd508fb53ae23ba298a4)
---
M includes/BookRenderingMediator.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection 
refs/changes/28/392528/1

diff --git a/includes/BookRenderingMediator.php 
b/includes/BookRenderingMediator.php
index 9d30550..9c7d068 100644
--- a/includes/BookRenderingMediator.php
+++ b/includes/BookRenderingMediator.php
@@ -95,7 +95,10 @@
return in_array( $key, [ 'type', 'title', 
'revision' ], true );
} );
}, $keyBase['items'] );
-   $key = $this->htmlCache->makeGlobalKey( md5( json_encode( 
$keyBase ) ) );
+   $key = $this->htmlCache->makeGlobalKey(
+   'collection-book',
+   md5( json_encode( $keyBase ) )
+   );
 
$book = $this->htmlCache->get( $key );
if ( !$book ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bf80012505f3ba1c37c76d2934d6f086d735d1d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: wmf/1.31.0-wmf.7
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.31.0-wmf.7]: objectcache: make sure variant keys are namespaced as keys s...

2017-11-20 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392527 )

Change subject: objectcache: make sure variant keys are namespaced as keys 
should be
..

objectcache: make sure variant keys are namespaced as keys should be

Change-Id: I02597d6dbc2febace25ef6d1981f69dc704efe8d
(cherry picked from commit f23fb835fc49dcb38f9ec898831921a908e8c6e4)
---
M includes/libs/objectcache/WANObjectCache.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/27/392527/1

diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index e19cf48..f39ac4b 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -912,7 +912,7 @@
// Value existed before with a 
different version; use variant key.
// Reflect purges to $key by requiring 
that this key value be newer.
$value = $this->doGetWithSetCallback(
-   'cache-variant:' . md5( $key ) 
. ":$version",
+   $this->makeGlobalKey( 
'WANCache-key-variant', md5( $key ), $version ),
$ttl,
$callback,
// Regenerate value if not 
newer than $key

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02597d6dbc2febace25ef6d1981f69dc704efe8d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.31.0-wmf.7
Gerrit-Owner: Aaron Schulz 

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


  1   2   3   4   >