[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "mariadb: Depool es1014 for mysql restart"

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

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

Change subject: Revert "mariadb: Depool es1014 for mysql restart"
..

Revert "mariadb: Depool es1014 for mysql restart"

This reverts commit 51d7164d79d7a28ec9f16d2490b27c2b25dcdeca.

Change-Id: I9210205cefaba4e51a4ac880893dbb6700bcb450
---
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/73/324673/1

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 89737bc..aa9b5bd 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -623,7 +623,7 @@
# es3
'cluster25' => [
'10.64.48.116' => 1, # es1019, master
-#  '10.64.16.187' => 1, # es1014
+   '10.64.16.187' => 1, # es1014
'10.64.48.114' => 1, # es1017
],
# ExtensionStore shard1 - initially for AFTv5

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9210205cefaba4e51a4ac880893dbb6700bcb450
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] operations/mediawiki-config[master]: Enable cookie blocking on English Wikipedia

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

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

Change subject: Enable cookie blocking on English Wikipedia
..

Enable cookie blocking on English Wikipedia

Bug: T152076
Change-Id: I62a214770de4ffe7047bab8432480aa2fbd820b5
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 09e306d..7931682 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7362,6 +7362,7 @@
 'wgCookieSetOnAutoblock' => [
'default' => false,
'testwiki' => true, // T150991
+   'enwiki' => true, // T152076
 ],
 
 # groupOverrides @{

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

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

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


[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Add fi.wikivoyage to the pageview whitelist

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

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

Change subject: Add fi.wikivoyage to the pageview whitelist
..

Add fi.wikivoyage to the pageview whitelist

Change-Id: Ib034f063c05616e7aa99c45eef46bbba8cf9ab69
---
M static_data/pageview/whitelist/whitelist.tsv
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/71/324671/1

diff --git a/static_data/pageview/whitelist/whitelist.tsv 
b/static_data/pageview/whitelist/whitelist.tsv
index 9d59f51..d8d3576 100644
--- a/static_data/pageview/whitelist/whitelist.tsv
+++ b/static_data/pageview/whitelist/whitelist.tsv
@@ -234,6 +234,7 @@
 projectfi.wikiquote2015-10-12 00:00:00
 projectfi.wikisource   2015-10-12 00:00:00
 projectfi.wikiversity  2015-10-12 00:00:00
+projectfi.wikivoyage   2015-12-01 00:00:00
 projectfi.wiktionary   2015-10-12 00:00:00
 projectfj.wikipedia2015-10-12 00:00:00
 projectfj.wiktionary   2015-10-12 00:00:00

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib034f063c05616e7aa99c45eef46bbba8cf9ab69
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: Elukey 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: mariadb: Depool es1014 for mysql restart

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

Change subject: mariadb: Depool es1014 for mysql restart
..


mariadb: Depool es1014 for mysql restart

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

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index aa9b5bd..89737bc 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -623,7 +623,7 @@
# es3
'cluster25' => [
'10.64.48.116' => 1, # es1019, master
-   '10.64.16.187' => 1, # es1014
+#  '10.64.16.187' => 1, # es1014
'10.64.48.114' => 1, # es1017
],
# ExtensionStore shard1 - initially for AFTv5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic67ea76fbe57d2b0c8d57c39cebd8ff6be9eb592
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jcrespo 
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] mediawiki...EducationProgram[master]: EducationProgram.i18n.ns for Bengali (bn)

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

Change subject: EducationProgram.i18n.ns for Bengali (bn)
..


EducationProgram.i18n.ns for Bengali (bn)

Bug: T151927
Change-Id: Iaeb3759569e117b1d96c29dfc2fe7de9501a07a1
---
M EducationProgram.i18n.ns.php
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/EducationProgram.i18n.ns.php b/EducationProgram.i18n.ns.php
index bab4beb..74e0c31 100644
--- a/EducationProgram.i18n.ns.php
+++ b/EducationProgram.i18n.ns.php
@@ -28,6 +28,11 @@
EP_NS_TALK => 'نقاش_برنامج_التعليم',
 );
 
+$namespaceNames['bn'] = array(
+   EP_NS  => 'শিক্ষা_কর্মসূচী',
+   EP_NS_TALK => 'শিক্ষা_কর্মসূচী_আলোচনা',
+);
+
 $namespaceNames['cs'] = array(
EP_NS  => 'Kurz',
EP_NS_TALK => 'Diskuse_ke_kurzu',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaeb3759569e117b1d96c29dfc2fe7de9501a07a1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Aftab 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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]: mariadb: Depool es1014 for mysql restart

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

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

Change subject: mariadb: Depool es1014 for mysql restart
..

mariadb: Depool es1014 for mysql restart

Bug: T151995
Change-Id: Ic67ea76fbe57d2b0c8d57c39cebd8ff6be9eb592
---
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/70/324670/1

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index aa9b5bd..89737bc 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -623,7 +623,7 @@
# es3
'cluster25' => [
'10.64.48.116' => 1, # es1019, master
-   '10.64.16.187' => 1, # es1014
+#  '10.64.16.187' => 1, # es1014
'10.64.48.114' => 1, # es1017
],
# ExtensionStore shard1 - initially for AFTv5

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic67ea76fbe57d2b0c8d57c39cebd8ff6be9eb592
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...GlobalUsage[master]: GlobalUsage.alias for Bengali (bn)

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

Change subject: GlobalUsage.alias for Bengali (bn)
..


GlobalUsage.alias for Bengali (bn)

Bug: T151927
Change-Id: Id7ee9b21ee2a63e4a04b41f571d4fb34a7815f52
---
M GlobalUsage.alias.php
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/GlobalUsage.alias.php b/GlobalUsage.alias.php
index f971fb1..1cfa50f 100644
--- a/GlobalUsage.alias.php
+++ b/GlobalUsage.alias.php
@@ -60,6 +60,13 @@
'GlobalUsage' => array( 'Pamakaian_global' ),
 );
 
+/** Bengali (বাংলা) */
+$specialPageAliases['bn'] = array(
+   'GlobalUsage' => array( 'বৈশ্বিক_ব্যবহার' ),
+   'MostGloballyLinkedFiles' => array( 'বৈশ্বিকভাবে_সর্বাধিক_সংযুক্ত_ফাইল' 
),
+   'GloballyWantedFiles' => array( 'বৈশ্বিকভাবে_আবশ্যিক_ফাইল' ),
+);
+
 /** Breton (brezhoneg) */
 $specialPageAliases['br'] = array(
'GlobalUsage' => array( 'ImplijHollek' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id7ee9b21ee2a63e4a04b41f571d4fb34a7815f52
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/GlobalUsage
Gerrit-Branch: master
Gerrit-Owner: Aftab 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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 "mariadb: Depool es1011 for mysql restart"

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

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

Change subject: Revert "mariadb: Depool es1011 for mysql restart"
..

Revert "mariadb: Depool es1011 for mysql restart"

This reverts commit 77f1131b862f16e5126755165d3d157a43bd9196.

Change-Id: I4b49abd474e140701a79324f9d3f365f278b1005
---
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/69/324669/1

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index aa9b5bd..a6f3c5b 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -617,7 +617,7 @@
# es2
'cluster24' => [
'10.64.32.184' => 1, # es1015, master
-#  '10.64.0.6'=> 1, # es1011
+   '10.64.0.6'=> 1, # es1011
'10.64.16.186' => 1, # es1013
],
# es3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b49abd474e140701a79324f9d3f365f278b1005
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...Echo[master]: Align echo alert colors to WikimediaUI color palette

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

Change subject: Align echo alert colors to WikimediaUI color palette
..


Align echo alert colors to WikimediaUI color palette

Change-Id: I4a6d53f7a5407838ce43f12b3a8ec6dde365ce4c
---
M modules/nojs/mw.echo.alert.less
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/nojs/mw.echo.alert.less b/modules/nojs/mw.echo.alert.less
index 2603398..5a9b7b1 100644
--- a/modules/nojs/mw.echo.alert.less
+++ b/modules/nojs/mw.echo.alert.less
@@ -1,7 +1,7 @@
 .mw-echo-alert {
border-radius: 2px;
-   background-color: #f9c557;
+   background-color: #fc3;
padding: 0.25em 0.8em 0.2em 0.8em;
-   color: #555;
+   color: #54595d;
font-weight: normal;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a6d53f7a5407838ce43f12b3a8ec6dde365ce4c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "mariadb: Depool es1016 for maintenance"

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

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

Change subject: Revert "mariadb: Depool es1016 for maintenance"
..

Revert "mariadb: Depool es1016 for maintenance"

This reverts commit 1c52ffa07ff10fccc026f9eaa8eddf78cc9f6bfb.

Change-Id: Ia7b9f4f2c1c698618874afb82c842dc5fcbec8e2
---
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/68/324668/1

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index a6f3c5b..dda1442 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -15,7 +15,7 @@
 
 $wmgOldExtTemplate = [
'10.64.0.7'=> 1, # es1012
-#  '10.64.32.185' => 1, # es1016
+   '10.64.32.185' => 1, # es1016
'10.64.48.115' => 1, # es1018
 ];
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7b9f4f2c1c698618874afb82c842dc5fcbec8e2
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] operations/mediawiki-config[master]: mariadb: Depool es1011 for mysql restart

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

Change subject: mariadb: Depool es1011 for mysql restart
..


mariadb: Depool es1011 for mysql restart

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

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index a6f3c5b..aa9b5bd 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -617,7 +617,7 @@
# es2
'cluster24' => [
'10.64.32.184' => 1, # es1015, master
-   '10.64.0.6'=> 1, # es1011
+#  '10.64.0.6'=> 1, # es1011
'10.64.16.186' => 1, # es1013
],
# es3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idcf974747fd4a222fdf0b03592e70f512217
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jcrespo 
Gerrit-Reviewer: Florianschmidtwelzow 
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/mediawiki-config[master]: mariadb: Depool es1011 for mysql restart

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

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

Change subject: mariadb: Depool es1011 for mysql restart
..

mariadb: Depool es1011 for mysql restart

Bug: T151995
Change-Id: Idcf974747fd4a222fdf0b03592e70f512217
---
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/67/324667/1

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index a6f3c5b..aa9b5bd 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -617,7 +617,7 @@
# es2
'cluster24' => [
'10.64.32.184' => 1, # es1015, master
-   '10.64.0.6'=> 1, # es1011
+#  '10.64.0.6'=> 1, # es1011
'10.64.16.186' => 1, # es1013
],
# es3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcf974747fd4a222fdf0b03592e70f512217
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...Interwiki[master]: Interwiki.alias for Bengali (bn)

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

Change subject: Interwiki.alias for Bengali (bn)
..


Interwiki.alias for Bengali (bn)

Bug: T151927
Change-Id: Idf1d6a60e76db6040248b858e6dc324d507542e5
---
M Interwiki.alias.php
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Interwiki.alias.php b/Interwiki.alias.php
index 2537f4d..7990aa4 100644
--- a/Interwiki.alias.php
+++ b/Interwiki.alias.php
@@ -44,6 +44,11 @@
'Interwiki' => array( 'مانجین_ویکی' ),
 );
 
+/** Bengali (বাংলা) */
+$specialPageAliases['bn'] = array(
+   'Interwiki' => array( 'আন্তঃউইকি' ),
+);
+
 /** Breton (brezhoneg) */
 $specialPageAliases['br'] = array(
'Interwiki' => array( 'Etrewiki' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf1d6a60e76db6040248b858e6dc324d507542e5
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Interwiki
Gerrit-Branch: master
Gerrit-Owner: Aftab 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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...Nuke[master]: Nuke.alias for Bengali (bn)

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

Change subject: Nuke.alias for Bengali (bn)
..


Nuke.alias for Bengali (bn)

Bug: T151927
Change-Id: I4b2dec4b8c94b8dbbb5a075c134176f5fbf4c2b6
---
M Nuke.alias.php
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Nuke.alias.php b/Nuke.alias.php
index b6cfc94..562d729 100644
--- a/Nuke.alias.php
+++ b/Nuke.alias.php
@@ -49,6 +49,11 @@
'Nuke' => array( 'Nuklir' ),
 );
 
+/** Bengali (বাংলা) */
+$specialPageAliases['bn'] = array(
+   'Nuke' => array( 'গণ_অপসারণ' ),
+);
+
 /** Chechen (нохчийн) */
 $specialPageAliases['ce'] = array(
'Nuke' => array( 'Дуккха_дӀаяхар' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b2dec4b8c94b8dbbb5a075c134176f5fbf4c2b6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Nuke
Gerrit-Branch: master
Gerrit-Owner: Aftab 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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...UploadWizard[master]: UploadWizard.alias for Bengali (bn)

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

Change subject: UploadWizard.alias for Bengali (bn)
..


UploadWizard.alias for Bengali (bn)

Bug: T151927
Change-Id: I5ca49df95e91614e28ee5b07d34886fc240f64b2
---
M UploadWizard.alias.php
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/UploadWizard.alias.php b/UploadWizard.alias.php
index 852b689..b6a8630 100644
--- a/UploadWizard.alias.php
+++ b/UploadWizard.alias.php
@@ -55,6 +55,14 @@
'UploadWizard' => array( 'جاوگرین_بُرز_کنۆک' ),
 );
 
+/** Bengali (বাংলা) */
+$specialPageAliases['bn'] = array(
+   'Campaigns' => array( 'ক্যাম্পেইন' ),
+   'UploadWizard' => array( 'আপলোড_উইজার্ড' ),
+   'UploadCampaigns' => array( 'আপলোড_ক্যাম্পেইনসমূহ' ),
+   'UploadCampaign' => array( 'আপলোড_ক্যাম্পেইন' ),
+);
+
 /** буряад (буряад) */
 $specialPageAliases['bxr'] = array(
'UploadWizard' => array( 'Ашаалха_Зэмсэг' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ca49df95e91614e28ee5b07d34886fc240f64b2
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Aftab 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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...TranslationNotifications[master]: TranslationNotifications.alias for Bengali (bn)

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

Change subject: TranslationNotifications.alias for Bengali (bn)
..


TranslationNotifications.alias for Bengali (bn)

Bug: T151927
Change-Id: I784986af440bbbe6fd4b59f13706ba69df9b
---
M TranslationNotifications.alias.php
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/TranslationNotifications.alias.php 
b/TranslationNotifications.alias.php
index 408cf8e..9482243 100644
--- a/TranslationNotifications.alias.php
+++ b/TranslationNotifications.alias.php
@@ -44,6 +44,12 @@
'TranslatorSignup' => array( 'ترجمه_کنۆک_ئی_سبت_نام' ),
 );
 
+/** Bengali (বাংলা) */
+$specialPageAliases['bn'] = array(
+   'NotifyTranslators' => array( 'অনুবাদককে_বিজ্ঞপ্তি', 
'অনুবাদকের_জন্য_বিজ্ঞপ্তি' ),
+   'TranslatorSignup' => array( 'অনুবাদকের_নিবন্ধন' ),
+);
+
 /** буряад (буряад) */
 $specialPageAliases['bxr'] = array(
'NotifyTranslators' => array( 'Оршуулагшада_мэдүүлхэ' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I784986af440bbbe6fd4b59f13706ba69df9b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/TranslationNotifications
Gerrit-Branch: master
Gerrit-Owner: Aftab 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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...TemplateSandbox[master]: TemplateSandbox.alias for Bengali (bn)

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

Change subject: TemplateSandbox.alias for Bengali (bn)
..


TemplateSandbox.alias for Bengali (bn)

Bug: T151927
Change-Id: I746fad31bac9aaef6dc50602d67774d6d110
---
M TemplateSandbox.alias.php
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/TemplateSandbox.alias.php b/TemplateSandbox.alias.php
index c251106..6f36eac 100644
--- a/TemplateSandbox.alias.php
+++ b/TemplateSandbox.alias.php
@@ -34,6 +34,11 @@
'TemplateSandbox' => array( 'تراشوانی_تمرینی_دیم' ),
 );
 
+/** Bengali (বাংলা) */
+$specialPageAliases['bn'] = array(
+   'TemplateSandbox' => array( 'টেমপ্লেট_খেলাঘর' ),
+);
+
 /** буряад (буряад) */
 $specialPageAliases['bxr'] = array(
'TemplateSandbox' => array( 'Загбарай_элһэн_хайрсаг' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I746fad31bac9aaef6dc50602d67774d6d110
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Aftab 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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]: registration: Provide credits information to callbacks

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

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

Change subject: registration: Provide credits information to callbacks
..

registration: Provide credits information to callbacks

Registration callbacks now provide basic credits information (name,
path, type, authors, license-name, version, etc.) as the first argument.
The main use case right now for this is to support extension VERSION
constants for backwards-compatibility.

In addition, callbacks now run *after* attributes are exposed, so
callbacks could use data from them if they wanted to.

Bug: T151136
Change-Id: Ic5965dd4e259e1f46222ac92b8e78750e67b51d6
---
M includes/registration/ExtensionProcessor.php
M includes/registration/ExtensionRegistry.php
2 files changed, 11 insertions(+), 6 deletions(-)


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

diff --git a/includes/registration/ExtensionProcessor.php 
b/includes/registration/ExtensionProcessor.php
index 207f884..bf6d188 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -141,6 +141,7 @@
 
/**
 * Things to be called once registration of these extensions are done
+* keyed by the name of the extension that it belongs to
 *
 * @var callable[]
 */
@@ -180,11 +181,11 @@
$this->extractResourceLoaderModules( $dir, $info );
$this->extractServiceWiringFiles( $dir, $info );
$this->extractParserTestFiles( $dir, $info );
+   $name = $this->extractCredits( $path, $info );
if ( isset( $info['callback'] ) ) {
-   $this->callbacks[] = $info['callback'];
+   $this->callbacks[$name] = $info['callback'];
}
 
-   $this->extractCredits( $path, $info );
foreach ( $info as $key => $val ) {
if ( in_array( $key, self::$globalSettings ) ) {
$this->storeToArray( $path, "wg$key", $val, 
$this->globals );
@@ -335,6 +336,7 @@
/**
 * @param string $path
 * @param array $info
+* @return string $name
 * @throws Exception
 */
protected function extractCredits( $path, array $info ) {
@@ -360,6 +362,8 @@
 
$this->credits[$name] = $credits;
$this->globals['wgExtensionCredits'][$credits['type']][] = 
$credits;
+
+   return $name;
}
 
/**
diff --git a/includes/registration/ExtensionRegistry.php 
b/includes/registration/ExtensionRegistry.php
index b5c70e9..01838dd 100644
--- a/includes/registration/ExtensionRegistry.php
+++ b/includes/registration/ExtensionRegistry.php
@@ -31,7 +31,7 @@
/**
 * Bump whenever the registration cache needs resetting
 */
-   const CACHE_VERSION = 3;
+   const CACHE_VERSION = 4;
 
/**
 * Special key that defines the merge strategy
@@ -285,9 +285,6 @@
foreach ( $info['autoloaderPaths'] as $path ) {
require_once $path;
}
-   foreach ( $info['callbacks'] as $cb ) {
-   call_user_func( $cb );
-   }
 
$this->loaded += $info['credits'];
if ( $info['attributes'] ) {
@@ -297,6 +294,10 @@
$this->attributes = array_merge_recursive( 
$this->attributes, $info['attributes'] );
}
}
+
+   foreach ( $info['callbacks'] as $name => $cb ) {
+   call_user_func( $cb, $info['credits'][$name] );
+   }
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5965dd4e259e1f46222ac92b8e78750e67b51d6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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...SecurePoll[master]: SecurePoll.alias for Bengali (bn)

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

Change subject: SecurePoll.alias for Bengali (bn)
..


SecurePoll.alias for Bengali (bn)

Bug: T151927
Change-Id: I69f1ff07b1303d96cc0fc66292961a74bd105b60
---
M SecurePoll.alias.php
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SecurePoll.alias.php b/SecurePoll.alias.php
index 90edb96..e765c26 100644
--- a/SecurePoll.alias.php
+++ b/SecurePoll.alias.php
@@ -39,6 +39,11 @@
'SecurePoll' => array( 'ایمنین_رای_گیره_گ' ),
 );
 
+/** Bengali (বাংলা) */
+$specialPageAliases['bn'] = array(
+   'SecurePoll' => array( 'সিকিউর_পোল' ),
+);
+
 /** Chechen (нохчийн) */
 $specialPageAliases['ce'] = array(
'SecurePoll' => array( 'Лардина_кхаж_тасар' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69f1ff07b1303d96cc0fc66292961a74bd105b60
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Aftab 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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]: mariadb: Depool es1016 for maintenance

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

Change subject: mariadb: Depool es1016 for maintenance
..


mariadb: Depool es1016 for maintenance

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

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index dda1442..a6f3c5b 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -15,7 +15,7 @@
 
 $wmgOldExtTemplate = [
'10.64.0.7'=> 1, # es1012
-   '10.64.32.185' => 1, # es1016
+#  '10.64.32.185' => 1, # es1016
'10.64.48.115' => 1, # es1018
 ];
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea2b6dc0bb29b7992a5289c7214a581a80ca169f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jcrespo 
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/mediawiki-config[master]: mariadb: Depool es1016 for maintenance

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

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

Change subject: mariadb: Depool es1016 for maintenance
..

mariadb: Depool es1016 for maintenance

Bug: T151995
Change-Id: Iea2b6dc0bb29b7992a5289c7214a581a80ca169f
---
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/65/324665/1

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index dda1442..a6f3c5b 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -15,7 +15,7 @@
 
 $wmgOldExtTemplate = [
'10.64.0.7'=> 1, # es1012
-   '10.64.32.185' => 1, # es1016
+#  '10.64.32.185' => 1, # es1016
'10.64.48.115' => 1, # es1018
 ];
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea2b6dc0bb29b7992a5289c7214a581a80ca169f
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/core[master]: registration: Refactor validation logic to avoid duplication

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

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

Change subject: registration: Refactor validation logic to avoid duplication
..

registration: Refactor validation logic to avoid duplication

Previously, logic to validate extension.json files was in two places:
validateRegistrationFile.php maintenance script, and the
ExtensionJsonValidationTest.php structure test. This caused duplication
as validation became more complex (e.g. usage of spdx-licenses library).

A generic ExtensionJsonValidator class now handles most of the
validation work, while the maintenance script and test case just wrap
around it for their output formats.

Change-Id: I47062a4ae19c58ee1b1f2bb4877913259bf19c8b
---
M autoload.php
A includes/registration/ExtensionJsonValidationError.php
A includes/registration/ExtensionJsonValidator.php
M maintenance/validateRegistrationFile.php
M tests/phpunit/structure/ExtensionJsonValidationTest.php
5 files changed, 168 insertions(+), 115 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/324664/1

diff --git a/autoload.php b/autoload.php
index 0d6407b..7604414 100644
--- a/autoload.php
+++ b/autoload.php
@@ -428,6 +428,8 @@
'ExplodeIterator' => __DIR__ . '/includes/libs/ExplodeIterator.php',
'ExportProgressFilter' => __DIR__ . '/maintenance/backup.inc',
'ExportSites' => __DIR__ . '/maintenance/exportSites.php',
+   'ExtensionJsonValidationError' => __DIR__ . 
'/includes/registration/ExtensionJsonValidationError.php',
+   'ExtensionJsonValidator' => __DIR__ . 
'/includes/registration/ExtensionJsonValidator.php',
'ExtensionLanguages' => __DIR__ . '/maintenance/language/languages.inc',
'ExtensionProcessor' => __DIR__ . 
'/includes/registration/ExtensionProcessor.php',
'ExtensionRegistry' => __DIR__ . 
'/includes/registration/ExtensionRegistry.php',
diff --git a/includes/registration/ExtensionJsonValidationError.php 
b/includes/registration/ExtensionJsonValidationError.php
new file mode 100644
index 000..897d284
--- /dev/null
+++ b/includes/registration/ExtensionJsonValidationError.php
@@ -0,0 +1,22 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+class ExtensionJsonValidationError extends Exception {
+}
diff --git a/includes/registration/ExtensionJsonValidator.php 
b/includes/registration/ExtensionJsonValidator.php
new file mode 100644
index 000..f6e76af
--- /dev/null
+++ b/includes/registration/ExtensionJsonValidator.php
@@ -0,0 +1,122 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+use Composer\Spdx\SpdxLicenses;
+use JsonSchema\Validator;
+
+/**
+ * @since 1.29
+ */
+class ExtensionJsonValidator {
+
+   /**
+* @var callable
+*/
+   private $missingDepCallback;
+
+   /**
+* @param callable $missingDepCallback
+*/
+   public function __construct( callable $missingDepCallback ) {
+   $this->missingDepCallback = $missingDepCallback;
+   }
+
+   /**
+* @return bool
+*/
+   public function checkDependencies() {
+   if ( !class_exists( Validator::class ) ) {
+   call_user_func( $this->missingDepCallback,
+   'The JsonSchema library cannot be found, please 
install it through composer.'
+   );
+   return false;
+   } elseif ( !class_exists( SpdxLicenses::class ) ) {
+   call_user_func( $this->missingDepCallback,
+   'The spdx-licenses library cannot be found, 
please install it through composer.'
+   );
+   return false;
+   }
+
+   return true;
+   }
+
+   /**
+* @param string $path file to validate
+* @return bool true if passes validation
+* @throws ExtensionJsonValidationError on any failure
+*/
+   public function validate( $path ) {
+   $data = json_decode( file_get_contents( $path ) );
+   if ( !is_object( $data ) ) {
+   throw new ExtensionJsonValidationError( "$path is not 
valid JSON" );
+   }
+
+   if ( !isset( $data->manifest_version ) ) {
+   throw new ExtensionJsonValidationError(
+   "$path does not have manifest_version set." );
+   }
+
+   $version = $data->manifest_version;
+   if ( $version !== ExtensionRegistry::MANIFEST_VERSION ) {
+   $schemaPath = __DIR__ . 
"/../../docs/extension.schema.v$version.json";
+   } else {
+   $schemaPath = __DIR__ . 
'/../../docs/extension.schema.json';
+   }
+
+   // Not too old
+   if ( $version < 

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

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

Change subject: db-eqiad.php: Depool db1070 for maintenance
..


db-eqiad.php: Depool db1070 for maintenance

db1070 needs an ALTER table. It is serving API, so in order to
help with the API load I have pooled db1082 in temporarily

Bug: T148967
Change-Id: If547dbc9676ffb634e84398937d14ae1e3ac949a
---
M wmf-config/db-eqiad.php
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 35c6566..dda1442 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -142,9 +142,9 @@
'db1049' => 0,   # 2.8TB  64GB, master
'db1026' => 1,   # 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1045' => 0,   # 1.4TB  64GB, vslow, dump
-   'db1070' => 50,  # 2.8TB 160GB, api, old master
+#  'db1070' => 50,  # 2.8TB 160GB, api, old master #T148967
'db1071' => 50,  # 2.8TB 160GB, api
-   'db1082' => 500, # 3.6TB 512GB
+   'db1082' => 300, # 3.6TB 512GB, api #Temporarily serving api 
#T148967
'db1087' => 500, # 3.6TB 512GB
'db1092' => 500, # 3.6TB 512GB
],
@@ -359,8 +359,9 @@
'db1045' => 1,
],
'api' => [
-   'db1070' => 1,
-   'db1071' => 1,
+   'db1082' => 1,
+#  'db1070' => 1,
+   'db1071' => 3,
],
'watchlist' => [
'db1026' => 1,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If547dbc9676ffb634e84398937d14ae1e3ac949a
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Florianschmidtwelzow 
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/mediawiki-config[master]: db-eqiad.php: Depool db1070 for maintenance

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

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

Change subject: db-eqiad.php: Depool db1070 for maintenance
..

db-eqiad.php: Depool db1070 for maintenance

db1070 needs an ALTER table. It is serving API, so in order to
help with the API load I have pooled db1082 in temporarily

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


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 35c6566..7fdad96 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -142,9 +142,9 @@
'db1049' => 0,   # 2.8TB  64GB, master
'db1026' => 1,   # 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1045' => 0,   # 1.4TB  64GB, vslow, dump
-   'db1070' => 50,  # 2.8TB 160GB, api, old master
+#  'db1070' => 50,  # 2.8TB 160GB, api, old master #T148967
'db1071' => 50,  # 2.8TB 160GB, api
-   'db1082' => 500, # 3.6TB 512GB
+   'db1082' => 300, # 3.6TB 512GB, api #Temporarily serving api 
#T148967
'db1087' => 500, # 3.6TB 512GB
'db1092' => 500, # 3.6TB 512GB
],
@@ -359,7 +359,8 @@
'db1045' => 1,
],
'api' => [
-   'db1070' => 1,
+   'db1082' => 3,
+#  'db1070' => 1,
'db1071' => 1,
],
'watchlist' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If547dbc9676ffb634e84398937d14ae1e3ac949a
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...PageAssessments[master]: Add new special page for searching assessments

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

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

Change subject: Add new special page for searching assessments
..

Add new special page for searching assessments

This adds Special:PageAssessments with a basic search form
and results table. The special page can also be transcluded,
in which case the search form isn't shown (all search and sort
parameters must be provided in the transclusion).

Bug: T120407
Change-Id: I6ee898059ffc62bb5f2788ad83a49b650cdb1335
---
M extension.json
M i18n/en.json
M i18n/qqq.json
A src/NamespaceSelect.php
A src/Pager.php
A src/SpecialPage.php
6 files changed, 304 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageAssessments 
refs/changes/57/324657/1

diff --git a/extension.json b/extension.json
index 49a9529..bd8ccd7 100644
--- a/extension.json
+++ b/extension.json
@@ -19,7 +19,10 @@
"PageAssessmentsHooks": "PageAssessments.hooks.php",
"PageAssessmentsBody": "PageAssessmentsBody.php",
"ApiQueryPageAssessments": "api/ApiQueryPageAssessments.php",
-   "ApiQueryProjectPages": "api/ApiQueryProjectPages.php"
+   "ApiQueryProjectPages": "api/ApiQueryProjectPages.php",
+   "PageAssessments\\SpecialPage": "src/SpecialPage.php",
+   "PageAssessments\\Pager": "src/Pager.php",
+   "PageAssessments\\NamespaceSelect": "src/NamespaceSelect.php"
},
"ExtensionMessagesFiles": {
"PageAssessmentsMagic": "PageAssessments.i18n.magic.php"
@@ -47,6 +50,9 @@
"localBasePath": "",
"remoteExtPath": "examples/PageAssessments"
},
+   "SpecialPages": {
+   "PageAssessments": "PageAssessments\\SpecialPage"
+   },
"config": {
"PageAssessmentsOnTalkPages": true
},
diff --git a/i18n/en.json b/i18n/en.json
index f5a0313..2125fc9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -16,5 +16,13 @@
"apihelp-query+projectpages-param-limit": "The maximum number of pages 
to return.",
"apihelp-query+projectpages-example-simple-1": "Get first 10 pages 
associated with any WikiProject.",
"apihelp-query+projectpages-example-simple-2": "Get first 10 pages 
associated with WikiProject Medicine, including assessment data.",
-   "apihelp-query+projectpages-example-generator": "Get page info for 
first 10 pages associated with WikiProject Textile Arts."
+   "apihelp-query+projectpages-example-generator": "Get page info for 
first 10 pages associated with WikiProject Textile Arts.",
+   "pageassessments-special": "Page assessments",
+   "pageassessments-project": "Project",
+   "pageassessments-page-namespace": "Page namespace",
+   "pageassessments-page-title": "Page title",
+   "pageassessments-search": "Search",
+   "pageassessments-importance": "Importance",
+   "pageassessments-class": "Class",
+   "pageassessments-timestamp": "Timestamp"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 6caf8ec..def5a22 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -16,5 +16,14 @@
"apihelp-query+projectpages-param-limit": 
"{{doc-apihelp-param|query+projectpages|limit}}",
"apihelp-query+projectpages-example-simple-1": 
"{{doc-apihelp-example|query+projectpages}}",
"apihelp-query+projectpages-example-simple-2": 
"{{doc-apihelp-example|query+projectpages}}",
-   "apihelp-query+projectpages-example-generator": 
"{{doc-apihelp-example|query+projectpages}}"
+   "apihelp-query+projectpages-example-generator": 
"{{doc-apihelp-example|query+projectpages}}",
+   "pageassessments-special": "Name of the Special page",
+   "pageassessments-project": "Form label for the WikiProject search field 
and the results table column header",
+   "pageassessments-page-namespace": "Form label for the page namespace 
dropdown select field",
+   "pageassessments-page-title": "Form label for the page title search 
field and the results table column header",
+   "pageassessments-search": "Search form submit button label",
+   "pageassessments-importance": "Label for the search form and the 
results table column header",
+   "pageassessments-class": "Label for the search form and the results 
table column header",
+   "pageassessments-timestamp": "Label for the search form and the results 
table column header"
+
 }
diff --git a/src/NamespaceSelect.php b/src/NamespaceSelect.php
new file mode 100644
index 000..49a09b4
--- /dev/null
+++ b/src/NamespaceSelect.php
@@ -0,0 +1,37 @@
+ $value,
+   'name' => $this->mName,
+   'id' => $this->mID,
+   'includeAllValue' => $this->mAllValue,
+   'exclude' => $excludedNsIds,
+   ] );
+   return $widget;
+

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: WIP dedupe throttling

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

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

Change subject: WIP dedupe throttling
..

WIP dedupe throttling

Change-Id: I388c43dcd704d04644f03a8ec1c0fb7af0704723
---
M sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
1 file changed, 28 insertions(+), 0 deletions(-)


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

diff --git a/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc 
b/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
index 02b005d..ce09c23 100644
--- a/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
+++ b/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
@@ -36,6 +36,11 @@
 function drush_civicrm_merge() {
   module_invoke('civicrm', 'initialize');
 
+  if (_drush_civicrm_queue_is_backed_up()) {
+drush_print('Early return as queue is backed up');
+return;
+  }
+
   $ruleGroupID = drush_get_option('rule_group_id');
   $groupID = drush_get_option('group_id');
   $startVariableName = 'civicrm_merge_batch_last_processed_id' . $ruleGroupID 
. '_' . $groupID;
@@ -69,3 +74,26 @@
   drush_print("Processed id range $start to " . $end . '
   Merged ' . count($result['values']['merged']) . ". Skipped " . 
count($result['values']['skipped']));
 }
+
+/**
+ * Check if the queue is backed up.
+ *
+ * @todo think about using a hook structure here so different modules can 
interact
+ * (and to keep it generic for others to use).
+ */
+function _drush_civicrm_queue_is_backed_up() {
+  $latestContribution = CRM_Core_DAO::executeQuery('
+SELECT id, receive_date FROM civicrm_contribution c
+WHERE receive_date = (SELECT max(receive_date) FROM 
civicrm.civicrm_contribution)
+LIMIT 1
+  ');
+  $latestContribution->fetch();
+  $result = db_select('contribution_tracking', 'ct')
+  ->fields('ts')
+  ->condition('contribution_id', $latestContribution->id,'=')
+  ->execute()
+  ->fetchAssoc();
+
+  $delay = strtotime($latestContribution->receive_date) - 
strtotime($result['ts']);
+  drush_print($delay . " id is " . $latestContribution->id);
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I388c43dcd704d04644f03a8ec1c0fb7af0704723
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] mediawiki...Linter[master]: Add integration tests for Database class

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

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

Change subject: Add integration tests for Database class
..

Add integration tests for Database class

These tests insert variations of fake lint errors into the database, and
then read out of the database to check they round-trip properly.

And while we're at it, improve the setForPage() return value.

These tests can be run with something like:
 php tests/phpunit/phpunit.php extensions/Linter/tests/phpunit/

Change-Id: Ifdba8a8a104d218a822f909bc5d7b3512aca499d
---
M includes/Database.php
A tests/phpunit/DatabaseTest.php
2 files changed, 90 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Linter 
refs/changes/54/324654/1

diff --git a/includes/Database.php b/includes/Database.php
index 216282b..27e13ae 100644
--- a/includes/Database.php
+++ b/includes/Database.php
@@ -128,7 +128,7 @@
 * database
 *
 * @param LintError[] $errors
-* @return array [ 'deleted' => int|bool, 'added' => int ]
+* @return array [ 'deleted' => int, 'added' => int ]
 */
public function setForPage( $errors ) {
$previous = $this->getForPage();
@@ -144,7 +144,7 @@
[ 'linter_page' => $this->pageId ],
__METHOD__
);
-   return [ 'deleted' => true, 'added' => 0 ];
+   return [ 'deleted' => count( $previous ), 'added' => 0 
];
} else {
$toInsert = [];
$toDelete = $previous;
diff --git a/tests/phpunit/DatabaseTest.php b/tests/phpunit/DatabaseTest.php
new file mode 100644
index 000..22215ac
--- /dev/null
+++ b/tests/phpunit/DatabaseTest.php
@@ -0,0 +1,88 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Linter\Test;
+
+use MediaWiki\Linter\Database;
+use MediaWiki\Linter\LintError;
+use MediaWikiTestCase;
+
+/**
+ * @group Database
+ * @covers MediaWiki\Linter\Database
+ */
+class DatabaseTest extends MediaWikiTestCase {
+
+   public function testConstructor() {
+   $this->assertInstanceOf( Database::class, new Database( 5 ) );
+   }
+
+   private function getDummyLintErrors() {
+   return [
+   new LintError(
+   'fostered', [ 0, 10 ], []
+   ),
+   new LintError(
+   'obsolete-tag', [ 15, 20 ], [ 'name' => 'big' ]
+   ),
+   ];
+   }
+
+   private function assertSetForPageResult( $result, $deleted, $added ) {
+   $this->assertArrayHasKey( 'deleted', $result );
+   $this->assertEquals( $deleted, $result['deleted'] );
+   $this->assertArrayHasKey( 'added', $result );
+   $this->assertEquals( $added, $result['added'] );
+   }
+
+   private function assertLintErrorsEqual( $expected, $actual ) {
+   $expectedIds = array_map( function( LintError $error ) {
+   return $error->id();
+   }, $expected );
+   $actualIds = array_map( function( LintError $error ) {
+   return $error->id();
+   }, $actual );
+   $this->assertArrayEquals( $expectedIds, $actualIds );
+   }
+
+   public function testSetForPage() {
+   $lintDb = new Database( 5 );
+   $dummyErrors = $this->getDummyLintErrors();
+   $result = $lintDb->setForPage( $dummyErrors );
+   $this->assertSetForPageResult( $result, 0, 2 );
+   $this->assertLintErrorsEqual( $dummyErrors, 
$lintDb->getForPage() );
+
+   // Should delete the second error
+   $result2 = $lintDb->setForPage( [ $dummyErrors[0] ] );
+   $this->assertSetForPageResult( $result2, 1, 0 );
+   $this->assertLintErrorsEqual( [ $dummyErrors[0] ], 
$lintDb->getForPage() );
+
+   // Insert the second error, delete the first
+   $result3 = $lintDb->setForPage( [ $dummyErrors[1] ] );
+   $this->assertSetForPageResult( $result3, 1, 1 );
+   $this->assertLintErrorsEqual( [ $dummyErrors[1] ], 
$lintDb->getForPage() );
+
+   // Delete the second (only) error
+   $result4 = $lintDb->setForPage( [] );
+   $this->assertSetForPageResult( $result4, 1, 0 );
+   $this->assertLintErrorsEqual( [], $lintDb->getForPage() );
+   }
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdba8a8a104d218a822f909bc5d7b3512aca499d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Linter

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Replace jshint, jscs, jsbeautify by eslint

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

Change subject: Replace jshint, jscs, jsbeautify by eslint
..


Replace jshint, jscs, jsbeautify by eslint

Bug: T151741
Change-Id: Id821b8cebc4d0b43d50aaa0ec46bab9f9538b0d4
---
A .eslintrc.json
D .jsbeautifyrc
D .jscs.json
D .jscsrc
D .jshintignore
D .jshintrc
A .stylelintrc
M Gruntfile.js
M modules/dashboard/ext.cx.recommendtool.client.js
M modules/dashboard/ext.cx.suggestionlist.js
M modules/dashboard/ext.cx.translationlist.js
M modules/editor/ext.cx.editor.js
M modules/entrypoint/ext.cx.contributions.js
M modules/entrypoint/ext.cx.entrypoint.js
M modules/eventlogging/ext.cx.eventlogging.js
M modules/publish/ext.cx.publish.dialog.js
M modules/publish/ext.cx.publish.js
M modules/publish/ext.cx.wikibase.link.js
M modules/source/ext.cx.source.js
M modules/source/ext.cx.source.selector.js
M modules/stats/ext.cx.stats.js
M modules/tools/ext.cx.tools.categories.js
M modules/tools/ext.cx.tools.dictionary.js
M modules/tools/ext.cx.tools.formatter.js
M modules/tools/ext.cx.tools.js
M modules/tools/ext.cx.tools.link.js
M modules/tools/ext.cx.tools.linter.js
M modules/tools/ext.cx.tools.manager.js
M modules/tools/ext.cx.tools.mt.card.js
M modules/tools/ext.cx.tools.mt.js
M modules/tools/ext.cx.tools.reference.js
M modules/translation/ext.cx.translation.aligner.js
M modules/translation/ext.cx.translation.js
M modules/translation/ext.cx.translation.loader.js
M modules/translation/ext.cx.translation.progress.js
M modules/translation/ext.cx.translation.storage.js
M modules/util/ext.cx.util.js
M modules/util/ext.cx.util.selection.js
M modules/widgets/callout/ext.cx.callout.js
M modules/widgets/feedback/ext.cx.feedback.js
M modules/widgets/overlay/ext.cx.overlay.js
M modules/widgets/progressbar/ext.cx.progressbar.js
M modules/widgets/translator/ext.cx.translator.js
M package.json
M tests/qunit/tools/ext.cx.tools.mtabuse.test.js
M tests/qunit/translation/ext.cx.translation.loader.test.js
46 files changed, 487 insertions(+), 420 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..ecc2e04
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,18 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "mediaWiki": false,
+   "moment": false,
+   "EasyDeflate": false,
+   "OO": false
+   },
+   "rules": {
+   "dot-notation": 0,
+   "wrap-iife": 0
+   }
+}
diff --git a/.jsbeautifyrc b/.jsbeautifyrc
deleted file mode 100644
index cfa5b27..000
--- a/.jsbeautifyrc
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-"preserve_newlines": true,
-"jslint_happy": true,
-"keep_array_indentation": true,
-"space_before_conditional": true,
-"max_preserve_newlines": 10,
-"brace_style": "collapse",
-"keep_function_indentation": false,
-"break_chained_methods": false,
-"eval_code": false,
-"unescape_strings": false,
-"wrap_line_length": 0,
-"space_in_paren": true,
-"git_happy": true,
-"indent_with_tabs": true,
-"end_with_newline": true
-}
diff --git a/.jscs.json b/.jscs.json
deleted file mode 100644
index 9d22e3f..000
--- a/.jscs.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-   "preset": "wikimedia"
-}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 9d22e3f..000
--- a/.jscsrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-   "preset": "wikimedia"
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 18be9f9..000
--- a/.jshintignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# upstream libs
-lib/*
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index dc06253..000
--- a/.jshintrc
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-   "bitwise": true,
-   "curly": true,
-   "eqeqeq": true,
-   "forin": false,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "strict": true,
-   "undef": true,
-   "unused": true,
-   "browser": true,
-   "predef": [
-   "EasyDeflate",
-   "mediaWiki",
-   "jQuery",
-   "QUnit",
-   "moment",
-   "OO"
-   ]
-}
diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000..905b08c
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,12 @@
+{
+   "extends": "stylelint-config-wikimedia",
+   "rules": {
+   "no-browser-hacks": [ true, {
+   "browsers": [ "Chrome >= 1", "Firefox >= 12", "Explorer 
>= 9", "Edge >= 12", "iOS >= 7", "Opera >= 12", "Safari >= 7", "ExplorerMobile 
>= 10", "Android >= 4", "not BlackBerry >= 1", "ChromeAndroid >= 1", 
"FirefoxAndroid >= 1", "OperaMobile >= 12", "not OperaMini 

[MediaWiki-commits] [Gerrit] labs...guc[master]: Fix hostname lookup limitation

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

Change subject: Fix hostname lookup limitation
..


Fix hostname lookup limitation

Previously, it stopped adding IPs if more than 10 were stored
after adding the first of each wiki.

Which means if there are many different IPs on different wikis,
it may still look up 200+ different IPs.

Change-Id: If2f1350d739888e0b33ad937784c58b49a26d4b2
---
M index.php
M src/Main.php
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/index.php b/index.php
index 6214bc5..762ab96 100644
--- a/index.php
+++ b/index.php
@@ -166,7 +166,7 @@
 . '';
 }
 if (count($infos) >= 10) {
-print '(Limited hostname 
lookups)';
+print '(Limited hostname 
lookups)';
 }
 print '';
 }
diff --git a/src/Main.php b/src/Main.php
index 4d971e0..138522b 100644
--- a/src/Main.php
+++ b/src/Main.php
@@ -104,10 +104,11 @@
 );
 if ($this->options['isPrefixPattern'] && 
!$contribs->getRegisteredUsers()) {
 foreach ($contribs->getContribs() as $rc) {
-$this->addIP($rc->rev_user_text);
+// Check before adding because this loop runs for each 
wiki
 if (count($this->ipInfos) > 10) {
 break;
 }
+$this->addIP($rc->rev_user_text);
 }
 }
 $data->contribs = $contribs;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2f1350d739888e0b33ad937784c58b49a26d4b2
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/guc
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
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] labs...guc[master]: Fix hostname lookup limitation

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

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

Change subject: Fix hostname lookup limitation
..

Fix hostname lookup limitation

Previously, it stopped adding IPs if more than 10 were stored
after adding the first of each wiki.

Which means if there are many different IPs on different wikis,
it may still look up 200+ different IPs.

Change-Id: If2f1350d739888e0b33ad937784c58b49a26d4b2
---
M src/Main.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/guc 
refs/changes/53/324653/1

diff --git a/src/Main.php b/src/Main.php
index 4d971e0..138522b 100644
--- a/src/Main.php
+++ b/src/Main.php
@@ -104,10 +104,11 @@
 );
 if ($this->options['isPrefixPattern'] && 
!$contribs->getRegisteredUsers()) {
 foreach ($contribs->getContribs() as $rc) {
-$this->addIP($rc->rev_user_text);
+// Check before adding because this loop runs for each 
wiki
 if (count($this->ipInfos) > 10) {
 break;
 }
+$this->addIP($rc->rev_user_text);
 }
 }
 $data->contribs = $contribs;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2f1350d739888e0b33ad937784c58b49a26d4b2
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/guc
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] labs...guc[master]: Add link for more information about the ASN/ISP.

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

Change subject: Add link for more information about the ASN/ISP.
..


Add link for more information about the ASN/ISP.

* Alternating table rows.

Change-Id: I572ba6e462e05c0839f86d35eb0d860dfc488660
---
M index.php
M resources/style.css
2 files changed, 24 insertions(+), 7 deletions(-)

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



diff --git a/index.php b/index.php
index 21379a5..6214bc5 100644
--- a/index.php
+++ b/index.php
@@ -147,13 +147,16 @@
 print '';
 foreach ($infos as $ip => $info) {
 print ''
-. '' . htmlspecialchars($ip) 
. ''
+. '' . 
htmlspecialchars($ip) . ''
 . '' . (isset($info['host'])
 ? (' ' . htmlspecialchars($info['host']) 
.'')
 : ''
 ) . ''
-. '' . (isset($info['description'])
-? (' ' . 
htmlspecialchars($info['description']))
+. '' . (isset($info['asn'])
+? (' http://bgp.he.net/AS' . 
htmlspecialchars($info['asn']) . '#_whois" target="_blank" rel="noopener 
noreferrer">AS' . htmlspecialchars($info['asn']) . '')
+: ''
+) . (isset($info['description'])
+? (' https://ipinfo.io/AS' . 
htmlspecialchars($info['asn']) . '" target="_blank" rel="noopener noreferrer">' 
. htmlspecialchars($info['description']) . '')
 : ''
 ) . ''
 . '' . (isset($info['range'])
diff --git a/resources/style.css b/resources/style.css
index 2d96be1..1c1d07a 100644
--- a/resources/style.css
+++ b/resources/style.css
@@ -40,10 +40,23 @@
 padding: 0 10px 10px 10px;
 }
 .maincontent .box {
+display: inline-block;
 margin: 1em 0;
-border: 1px solid #ccc;
 background-color: #fafafa;
-padding: .5em 1em .5em .5em;
+border-spacing: 0;
+border-collapse: collapse;
+}
+.maincontent .box tr {
+border-bottom: 1px solid #ccc;
+}
+.maincontent .box tr:first-child {
+border-top: 1px solid #ccc;
+}
+.maincontent .box td {
+padding: .2em .5em;
+}
+.maincontent .box tr:nth-child(even) {
+background-color: #fff;
 }
 .maincontent .error {
 margin: 1em 0;
@@ -71,8 +84,9 @@
 
 .maincontent .results a:visited { color: #5105ad; }
 .maincontent .results .hostname {
-background-image: url(img/icoInfo16.png);
-background-repeat: no-repeat;
+display: inline-block;
+background: url(img/icoInfo16.png) no-repeat;
+min-height: 16px;
 padding-left: 21px;
 }
  .results h1,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I572ba6e462e05c0839f86d35eb0d860dfc488660
Gerrit-PatchSet: 7
Gerrit-Project: labs/tools/guc
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
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/core[master]: [WIP] Enable supplying inline interwiki results

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

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

Change subject: [WIP] Enable supplying inline interwiki results
..

[WIP] Enable supplying inline interwiki results

Bug: T142795
Change-Id: I1c14179ee4fb72b6b84772074b6d231d1129ac14
---
M includes/api/ApiQuerySearch.php
1 file changed, 52 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/324652/1

diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php
index 9962d5e..609ee81 100644
--- a/includes/api/ApiQuerySearch.php
+++ b/includes/api/ApiQuerySearch.php
@@ -230,50 +230,20 @@
$result = $matches->next();
}
 
+   // Interwiki results
$hasInterwikiResults = false;
-   $totalhits = null;
-   if ( $interwiki && $resultPageSet === null && 
$matches->hasInterwikiResults() ) {
-   foreach ( $matches->getInterwikiResults() as 
$interwikiMatches ) {
-   $hasInterwikiResults = true;
-
-   // Include number of results if requested
-   if ( $resultPageSet === null && isset( 
$searchInfo['totalhits'] ) ) {
-   $totalhits += 
$interwikiMatches->getTotalHits();
-   }
-
-   $result = $interwikiMatches->next();
-   while ( $result ) {
-   $title = $result->getTitle();
-
-   if ( $resultPageSet === null ) {
-   $vals = [
-   'namespace' => 
$result->getInterwikiNamespaceText(),
-   'title' => 
$title->getText(),
-   'url' => 
$title->getFullURL(),
-   ];
-
-   // Add item to results and see 
whether it fits
-   $fit = $apiResult->addValue(
-   [ 'query', 'interwiki' 
. $this->getModuleName(), $result->getInterwikiPrefix() ],
-   null,
-   $vals
-   );
-
-   if ( !$fit ) {
-   // We hit the limit. We 
can't really provide any meaningful
-   // pagination info so 
just bail out
-   break;
-   }
-   } else {
-   $titles[] = $title;
-   }
-
-   $result = $interwikiMatches->next();
+   if ( $interwiki && $resultPageSet === null ) {
+   if ( $params['enablerewrites'] ) {
+   $totalhits = $this->addInterwikiResults( 
$matches, $apiResult,
+   SearchResultSet::INLINE_RESULTS );
+   if ( $totalhits ) {
+   $hasInterwikiResults = true;
}
}
-   if ( $totalhits !== null ) {
-   $apiResult->addValue( [ 'query', 
'interwikisearchinfo' ],
-   'totalhits', $totalhits );
+   $totalhits = $this->addInterwikiResults( $matches, 
$apiResult,
+   SearchResultSet::SECONDARY_RESULTS );
+   if ( $totalhits ) {
+   $hasInterwikiResults = true;
}
}
 
@@ -301,6 +271,47 @@
}
}
 
+   private function addInterwikiResults( SearchResultSet $matches, 
ApiResult $apiResult,
+ $type = 
SearchResultSet::SECONDARY_RESULTS ) {
+   $totalhits = null;
+   if ( $matches->hasInterwikiResults( $type ) ) {
+   foreach ( $matches->getInterwikiResults( $type ) as 
$interwikiMatches ) {
+   // Include number of results if requested
+   $totalhits += $interwikiMatches->getTotalHits();
+
+   $result = $interwikiMatches->next();
+   while ( $result ) {
+  

[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: Poke jenkins [DO NOT MERGE]

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

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

Change subject: Poke jenkins [DO NOT MERGE]
..

Poke jenkins [DO NOT MERGE]

to see if PropertySuggester tests are being run here

Change-Id: I0f4538c809f3fd1a565e42eb27ef03400b88efa2
---
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git 
a/extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
 
b/extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
index e7f8a88..b966197 100644
--- 
a/extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
+++ 
b/extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
@@ -32,6 +32,8 @@
}
 
public function testMergeWithTraditionalSearchResults() {
+   $this->assertTrue( false );
+
$suggesterResult = array(
array( 'id' =>  '8' ),
array( 'id' => '14' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f4538c809f3fd1a565e42eb27ef03400b88efa2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] labs...guc[master]: [WIP] Add link for more information about the ASN/ISP.

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

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

Change subject: [WIP] Add link for more information about the ASN/ISP.
..

[WIP] Add link for more information about the ASN/ISP.

Change-Id: I572ba6e462e05c0839f86d35eb0d860dfc488660
---
M index.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/guc 
refs/changes/50/324650/1

diff --git a/index.php b/index.php
index 21379a5..5c3b69a 100644
--- a/index.php
+++ b/index.php
@@ -152,8 +152,12 @@
 ? (' ' . htmlspecialchars($info['host']) 
.'')
 : ''
 ) . ''
+. '' . (isset($info['asn'])
+? (' http://bgp.he.net/AS' . 
htmlspecialchars($info['asn']) . '#_whois" target="_blank" rel="noopener 
noreferrer">AS' . htmlspecialchars($info['asn']) . '')
+: ''
+) . ''
 . '' . (isset($info['description'])
-? (' ' . 
htmlspecialchars($info['description']))
+? (' https://ipinfo.io/AS' . 
htmlspecialchars($info['asn']) . '" target="_blank" rel="noopener noreferrer">' 
. htmlspecialchars($info['description']) . '')
 : ''
 ) . ''
 . '' . (isset($info['range'])

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I572ba6e462e05c0839f86d35eb0d860dfc488660
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/guc
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] labs...guc[master]: Add ASN description and range to IP info message (+ IPv6 sup...

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

Change subject: Add ASN description and range to IP info message (+ IPv6 
support)
..


Add ASN description and range to IP info message (+ IPv6 support)

* Turn hostname box into a table with 3 columns:
  - host
  - ASN description
  - IP CIDR range belong to that ASN

* Add support for IPv6

* Ignore return value of gethostbyaddr() if it is the same as the input.
  This is how PHP indicates failure to resolve.
  "Returns the host name on success, unmodified ip_address on failure"
   – http://php.net/gethostbyaddr

Change-Id: I3a3bf9708519ae448340b083258dd0e9c9acf467
---
M index.php
M resources/style.css
A src/IPInfo.php
M src/Main.php
4 files changed, 176 insertions(+), 19 deletions(-)

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



diff --git a/index.php b/index.php
index 25f46d5..21379a5 100644
--- a/index.php
+++ b/index.php
@@ -142,16 +142,30 @@
 }
 print '.';
 print '';
-$hostnames = array_filter($guc->getHostnames());
-if ($hostnames) {
-print '';
-foreach ($guc->getHostnames() as $ip => $hostname) {
-print 'Hostname of ' . 
htmlspecialchars($ip) . ': ' . 
htmlspecialchars($hostname).'';
+$infos = array_filter($guc->getIPInfos());
+if ($infos) {
+print '';
+foreach ($infos as $ip => $info) {
+print ''
+. '' . htmlspecialchars($ip) 
. ''
+. '' . (isset($info['host'])
+? (' ' . htmlspecialchars($info['host']) 
.'')
+: ''
+) . ''
+. '' . (isset($info['description'])
+? (' ' . 
htmlspecialchars($info['description']))
+: ''
+) . ''
+. '' . (isset($info['range'])
+? (' ' . htmlspecialchars($info['range']) 
.'')
+: ''
+) . ''
+. '';
 }
-if (count($hostnames) >= 10) {
-print '(Limited hostname lookups)';
+if (count($infos) >= 10) {
+print '(Limited hostname 
lookups)';
 }
-print '';
+print '';
 }
 if ($data->options['by'] === 'date') {
 // Sort results by date
diff --git a/resources/style.css b/resources/style.css
index fdb36f3..2d96be1 100644
--- a/resources/style.css
+++ b/resources/style.css
@@ -40,7 +40,6 @@
 padding: 0 10px 10px 10px;
 }
 .maincontent .box {
-display: inline-block;
 margin: 1em 0;
 border: 1px solid #ccc;
 background-color: #fafafa;
diff --git a/src/IPInfo.php b/src/IPInfo.php
new file mode 100644
index 000..0114b23
--- /dev/null
+++ b/src/IPInfo.php
@@ -0,0 +1,145 @@
+http://www.gnu.org/licenses/>.
+ */
+
+namespace Guc;
+
+class IPInfo {
+
+/**
+ * @return array|bool
+ *  - string 'host' Reverse DNS lookup
+ *  - int 'asn'
+ *  - string 'description' ASN description text
+ *  - string 'range' IP CIDR range
+ */
+public static function get($ip) {
+// gethostbyaddr() usually doesn't give much for IPv6 addresses
+// Use ASN information to still provide some information that
+// may be useful to identify a group of related IP-adresses.
+$info = self::getAsnInfo($ip) ?: array();
+$host = self::getHost($ip);
+if ($host) {
+$info['host'] = $host;
+}
+return $info ?: false;
+}
+
+protected static function getHost($ip4) {
+$result = @gethostbyaddr($ip4);
+if (!$result || $result == $ip4) {
+return false;
+}
+return $result;
+}
+
+protected static function getAsnInfo($ip) {
+if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
+$result = self::getASNForIp6($ip);
+} else {
+$result = self::getASNForIp4($ip);
+}
+return $result;
+}
+
+/**
+ * Get reverse-DNS hostname for IPv4 address.
+ *
+ * See also:
+ * - 

+ * - RFC 3172 
+ * @param string $ip6
+ * @return string in-arpa
+ */
+private static function arpaForIp4($ip4, $suffix = '.in-addr.arpa') {
+return implode('.', array_reverse(explode('.', $ip4))) . $suffix;
+}
+
+/**
+ * Get reverse-DNS hostname for 

[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Replace jshint, jscs, jsbeautify with eslint

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

Change subject: Replace jshint, jscs, jsbeautify with eslint
..


Replace jshint, jscs, jsbeautify with eslint

Bug: T151741
Change-Id: I55051ff2d4e5d64a8cb5e8c8e2fd1e3e67a4a841
---
A .eslintrc.json
D .jsbeautifyrc
D .jscsrc
D .jshintignore
D .jshintrc
M app.js
M dictionary/dict/DictClient.js
M lineardoc/Doc.js
M lineardoc/Normalizer.js
M lineardoc/Parser.js
M lineardoc/TextBlock.js
M lineardoc/Utils.js
M lineardoc/index.js
M mt/Yandex.js
M mt/Youdao.js
M mt/annotationmapper/SubsequenceMatcher.js
M mt/index.js
M package.json
M pageloader/PageLoader.js
M routes/doc.js
M routes/info.js
M routes/root.js
M routes/v1.js
M segmentation/languages/index.js
M test/index.js
M utils/api-util.js
M utils/util.js
27 files changed, 84 insertions(+), 87 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..1cc15b0
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,16 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true,
+   "node": true
+   },
+   "globals": {
+   "require": false
+   },
+   "rules": {
+   "dot-notation": 0,
+   "wrap-iife": 0
+   }
+}
diff --git a/.jsbeautifyrc b/.jsbeautifyrc
deleted file mode 100644
index 0631808..000
--- a/.jsbeautifyrc
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-"preserve_newlines": true,
-"jslint_happy": true,
-"keep_array_indentation": true,
-"space_before_conditional": true,
-"max_preserve_newlines": 10,
-"brace_style": "collapse",
-"keep_function_indentation": false,
-"break_chained_methods": false,
-"eval_code": false,
-"unescape_strings": false,
-"wrap_line_length": 0,
-"space_in_paren": true,
-"space_in_square_bracket": true,
-"git_happy": true,
-"indent_with_tabs": true
-}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 9b13945..000
--- a/.jscsrc
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-   "preset": "wikimedia",
-   "requireVarDeclFirst": false,
-   "requireCamelCaseOrUpperCaseIdentifiers": {
-   "ignoreProperties": true
-   }
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index e3bef7f..000
--- a/.jshintignore
+++ /dev/null
@@ -1,2 +0,0 @@
-doc/
-node_modules
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 6245cdd..000
--- a/.jshintrc
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-   "strict": true,
-
-   // Environment
-   "node": true,
-   "jasmine": true,
-
-   "globals": {
-   "CX": false,
-   "QUnit": false,
-   "before": false,
-   "beforeEach": false,
-   "after": false,
-   "afterEach": false
-   }
-}
diff --git a/app.js b/app.js
index 816eba9..f6ddda8 100644
--- a/app.js
+++ b/app.js
@@ -1,7 +1,5 @@
 'use strict';
 
-require( 'core-js/shim' );
-
 var http = require( 'http' ),
BBPromise = require( 'bluebird' ),
express = require( 'express' ),
@@ -13,6 +11,8 @@
packageInfo = require( './package.json' ),
path = require( 'path' ),
yaml = require( 'js-yaml' );
+
+require( 'core-js/shim' );
 
 /**
  * Creates an express app and initialises it
@@ -36,6 +36,7 @@
app.conf.interface = '0.0.0.0';
}
if ( app.conf.compression_level === undefined ) {
+   /* eslint camelcase:off */
app.conf.compression_level = 3;
}
if ( app.conf.cors === undefined ) {
@@ -232,6 +233,9 @@
  * options and the logger and metrics-reporting objects from
  * service-runner and starts an HTTP server, attaching the application
  * object to it.
+ *
+ * @param {Object} options
+ * @return {Promise} a promise for an http server.
  */
 module.exports = function ( options ) {
return initApp( options )
diff --git a/dictionary/dict/DictClient.js b/dictionary/dict/DictClient.js
index 4f569f2..be40e48 100644
--- a/dictionary/dict/DictClient.js
+++ b/dictionary/dict/DictClient.js
@@ -39,6 +39,7 @@
  * Sanitize the words
  *
  * @param {Object} words
+ * @return {Object} result
  */
 function parseWords( words ) {
var i, word, db, nDb, dbIdx,
@@ -235,7 +236,7 @@
nextResponse();
}
// Continuing previous data
-
+   /* eslint no-fallthrough:off */
switch ( status ) {
// greetings

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Clean up http classes a bit

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

Change subject: Clean up http classes a bit
..


Clean up http classes a bit

* added integration tests. We probably don't want automated tests
  to make external requests but these make manual testing more
  convenient. Documented some oddities discovered by testing.
* made ::$status, ::proxySetup() and ::getHeaderList()
  protected; they were not referenced in any gerrit-hosted extension
  and they provide no useful functionality to external callers.
  Similarly, marked ::read() and ::errorHandler() as internal
  (these are used as callbacks so can't be protected)
* removed inheritance abuse in ::execute()
* documented ::execute() as returning a StatusValue (but
  keep returning a Status for now)
* changed setCookie argument defaults to ones that make sense
* replaced MWException
* moved unit tests to the correct location
* fixed some code style issues

Change-Id: I5852fc75badc5d475ae30ec2c9376bde7024bd95
---
M RELEASE-NOTES-1.29
M includes/http/CurlHttpRequest.php
M includes/http/Http.php
M includes/http/MWHttpRequest.php
M includes/http/PhpHttpRequest.php
M includes/libs/CookieJar.php
M tests/common/TestsAutoLoader.php
A tests/integration/includes/http/CurlHttpRequestTest.php
A tests/integration/includes/http/MWHttpRequestTestCase.php
A tests/integration/includes/http/PhpHttpRequestTest.php
R tests/phpunit/includes/http/HttpTest.php
11 files changed, 273 insertions(+), 31 deletions(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index ab52544..21a94c5 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -56,6 +56,8 @@
   SearchEngineFactory::getSearchEngineClass() instead.
 * $wgSessionsInMemcached (deprecated in 1.20) was removed. No replacement is
   required as all sessions are stored in Object Cache now.
+* MWHttpRequest::execute() should be considered to return a StatusValue; the
+  Status return type is deprecated.
 
 == Compatibility ==
 
diff --git a/includes/http/CurlHttpRequest.php 
b/includes/http/CurlHttpRequest.php
index f58c3a9..7fd3e83 100644
--- a/includes/http/CurlHttpRequest.php
+++ b/includes/http/CurlHttpRequest.php
@@ -38,11 +38,10 @@
}
 
public function execute() {
-
-   parent::execute();
+   $this->prepare();
 
if ( !$this->status->isOK() ) {
-   return $this->status;
+   return Status::wrap( $this->status ); // TODO B/C; move 
this to callers
}
 
$this->curlOptions[CURLOPT_PROXY] = $this->proxy;
@@ -102,7 +101,7 @@
$curlHandle = curl_init( $this->url );
 
if ( !curl_setopt_array( $curlHandle, $this->curlOptions ) ) {
-   throw new MWException( "Error setting curl options." );
+   throw new InvalidArgumentException( "Error setting curl 
options." );
}
 
if ( $this->followRedirects && $this->canFollowRedirects() ) {
@@ -140,7 +139,7 @@
$this->parseHeader();
$this->setStatus();
 
-   return $this->status;
+   return Status::wrap( $this->status );  // TODO B/C; move this 
to callers
}
 
/**
diff --git a/includes/http/Http.php b/includes/http/Http.php
index 43ae2d0..a68a63b 100644
--- a/includes/http/Http.php
+++ b/includes/http/Http.php
@@ -74,7 +74,7 @@
} else {
$errors = $status->getErrorsByType( 'error' );
$logger = LoggerFactory::getInstance( 'http' );
-   $logger->warning( $status->getWikiText( false, false, 
'en' ),
+   $logger->warning( Status::wrap( $status )->getWikiText( 
false, false, 'en' ),
[ 'error' => $errors, 'caller' => $caller, 
'content' => $req->getContent() ] );
return false;
}
diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php
index 08883ae..a42b6d0 100644
--- a/includes/http/MWHttpRequest.php
+++ b/includes/http/MWHttpRequest.php
@@ -46,9 +46,11 @@
protected $reqHeaders = [];
protected $url;
protected $parsedUrl;
+   /** @var callable  */
protected $callback;
protected $maxRedirects = 5;
protected $followRedirects = false;
+   protected $connectTimeout;
 
/**
 * @var CookieJar
@@ -60,7 +62,8 @@
protected $respStatus = "200 Ok";
protected $respHeaders = [];
 
-   public $status;
+   /** @var StatusValue */
+   protected $status;
 
/**
 * @var Profiler
@@ -98,9 +101,9 @@
}
 
if ( !$this->parsedUrl || !Http::isValidURI( $this->url ) ) {
-   $this->status = Status::newFatal( 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Always add wbc_entity_usage table when adding wikis

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

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

Change subject: Always add wbc_entity_usage table when adding wikis
..

Always add wbc_entity_usage table when adding wikis

The new wiki might not yet be in the wikidataclient dblist,
so removing the check and let's just always add the table.

Bug: T152062
Change-Id: Id29e6655df8218d78af585aca4881473239b0db0
---
M addWiki.php
1 file changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/addWiki.php b/addWiki.php
index 35e980d..6799769 100644
--- a/addWiki.php
+++ b/addWiki.php
@@ -104,6 +104,9 @@
$dbw->sourceFile( 
"$IP/extensions/BetaFeatures/sql/create_counts.sql" );
$dbw->sourceFile( "$IP/extensions/SecurePoll/SecurePoll.sql" );
 
+   // most wikis are wikibase client wikis and no harm to adding 
this everywhere
+   $dbw->sourceFile( 
"$IP/extensions/Wikidata/extensions/Wikibase/client/sql/entity_usage.sql" );
+
// Add project specific extension table additions here
switch ( $site ) {
case 'wikipedia':
@@ -128,10 +131,6 @@
case 'wikivoyage':
$dbw->sourceFile( 
"$IP/extensions/CreditsSource/schema/mysql/CreditsSource.sql" );
break;
-   }
-
-   if ( in_array( $dbName, MWWikiversions::readDbListFile( 
'wikidataclient' ) ) ) {
-   $dbw->sourceFile( 
"$IP/extensions/Wikidata/extensions/Wikibase/client/sql/entity_usage.sql" );
}
 
$dbw->query( "INSERT INTO site_stats(ss_row_id) VALUES (1)" );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id29e6655df8218d78af585aca4881473239b0db0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] labs...guc[master]: [WIP] Add support for IPv6 in IP info message

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

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

Change subject: [WIP] Add support for IPv6 in IP info message
..

[WIP] Add support for IPv6 in IP info message

Change-Id: I3a3bf9708519ae448340b083258dd0e9c9acf467
---
M index.php
A src/IPInfo.php
M src/Main.php
3 files changed, 156 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/guc 
refs/changes/48/324648/1

diff --git a/index.php b/index.php
index 25f46d5..d7aef73 100644
--- a/index.php
+++ b/index.php
@@ -142,13 +142,13 @@
 }
 print '.';
 print '';
-$hostnames = array_filter($guc->getHostnames());
-if ($hostnames) {
+$infos = array_filter($guc->getIPInfos());
+if ($infos) {
 print '';
-foreach ($guc->getHostnames() as $ip => $hostname) {
-print 'Hostname of ' . 
htmlspecialchars($ip) . ': ' . 
htmlspecialchars($hostname).'';
+foreach ($infos as $ip => $info) {
+print '' . htmlspecialchars($ip) 
. ': ' . htmlspecialchars($info).'';
 }
-if (count($hostnames) >= 10) {
+if (count($infos) >= 10) {
 print '(Limited hostname lookups)';
 }
 print '';
diff --git a/src/IPInfo.php b/src/IPInfo.php
new file mode 100644
index 000..41a1966
--- /dev/null
+++ b/src/IPInfo.php
@@ -0,0 +1,142 @@
+http://www.gnu.org/licenses/>.
+ */
+
+namespace Guc;
+
+class IPInfo {
+
+public static function get($ip) {
+// gethostbyaddr() usually doesn't give much for IPv6 addresses
+// Use ASN information to still provide some information that
+// may be useful to identify a group of related IP-adresses.
+return implode('  ', array_filter(array(
+self::getHost($ip),
+self::getAsnInfo($ip),
+))) ?: false;
+}
+
+protected static function getHost($ip4) {
+$result = @gethostbyaddr($ip4);
+if (!$result || $result == $ip4) {
+return false;
+}
+return $result;
+}
+
+protected static function getAsnInfo($ip) {
+if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
+$result = self::getASNForIp6($ip);
+} else {
+$result = self::getASNForIp4($ip);
+}
+if (!$result) {
+return false;
+}
+if (!$result['range']) {
+return $result['description'];
+}
+return "{$result['description']} (range: {$result['range']}";
+}
+
+/**
+ * Get reverse-DNS hostname for IPv4 address.
+ *
+ * See also:
+ * - 

+ * - RFC 3172 
+ * @param string $ip6
+ * @return string in-arpa
+ */
+private static function arpaForIp4($ip4, $suffix = '.in-addr.arpa') {
+return implode('.', array_reverse(explode('.',$ip4))) . $suffix;
+}
+
+/**
+ * Get reverse-DNS hostname for IPv6 address.
+ *
+ * See also:
+ * - 
+ * - RFC 3596 
+ * - RFC 3172 
+ * @param string $ip6
+ * @return string in-arpa
+ */
+private static function arpaForIp6($ip6, $suffix = '') {
+// Inspired by 
+$addr = inet_pton($ip6);
+$unpack = unpack('H*hex', $addr);
+$hex = $unpack['hex'];
+return implode('.', array_reverse(str_split($hex))) . $suffix;
+}
+
+private static function getDnsText($hostname) {
+$tmp = dns_get_record($hostname, DNS_TXT);
+if (!isset($tmp[0]['type']) || $tmp[0]['type'] !== 'TXT' || 
!isset($tmp[0]['txt'])) {
+return false;
+}
+return $tmp[0]['txt'];
+}
+
+private static function getAsnDescription($asn) {
+// Service: https://www.team-cymru.org/IP-ASN-mapping.html#dns
+$txt = self::getDnsText('AS' . intval($asn) . '.asn.cymru.com');
+if (!$txt) {
+return false;
+}
+// Result format:
+// "14907 | US | arin | 2006-09-27 | WIKIMEDIA - Wikimedia Foundation 
Inc., US"
+$matches = null;
+preg_match('/[^|]+$/', $txt, $matches);
+if (!isset($matches[0])) {
+return false;
+}
+return trim($matches[0]);
+}
+
+private static function getAsnForIp4($ip4) {
+// Service: https://www.team-cymru.org/IP-ASN-mapping.html#dns
+return self::getAsnFromCymru(
+self::arpaForIp4($ip4, '.origin.asn.cymru.com')
+);
+}
+
+private 

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Enforce category/page/position uniqueness constraint in the ...

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

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

Change subject: Enforce category/page/position uniqueness constraint in the 
database
..

Enforce category/page/position uniqueness constraint in the database

Move location to two separate columns in the database: linter_start and
linter_end. This allows us to have the database enforce the uniqueness
of those fields, instead of just relying upon the PHP code to do so,
which could be bypassed since we have multiple servers and concurrent
processes.

Change-Id: I3e67ce1b7cb3c93866a388ec3248af4cff2a81e0
---
M includes/ApiQueryLintErrors.php
M includes/ApiRecordLint.php
M includes/Database.php
M includes/LintError.php
M includes/LintErrorsPager.php
M includes/RecordLintJob.php
M linter.sql
7 files changed, 21 insertions(+), 7 deletions(-)


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

diff --git a/includes/ApiQueryLintErrors.php b/includes/ApiQueryLintErrors.php
index a305eb1..6e44ba6 100644
--- a/includes/ApiQueryLintErrors.php
+++ b/includes/ApiQueryLintErrors.php
@@ -50,6 +50,7 @@
$this->addJoinConds( [ 'page' => [ 'INNER JOIN', 
'page_id=linter_page' ] ] );
$this->addFields( [
'linter_id', 'linter_cat', 'linter_params',
+   'linter_start', 'linter_end',
'page_namespace', 'page_title',
] );
// Be explicit about ORDER BY
diff --git a/includes/ApiRecordLint.php b/includes/ApiRecordLint.php
index 6857fff..ae3fbe8 100644
--- a/includes/ApiRecordLint.php
+++ b/includes/ApiRecordLint.php
@@ -62,7 +62,7 @@
if ( !$categoryMgr->isKnownCategory( $info['type'] ) ) {
continue;
}
-   $info['params']['location'] = array_slice( 
$info['dsr'], 0, 2 );
+   $info['location'] = array_slice( $info['dsr'], 0, 2 );
if ( isset( $info['templateInfo'] ) && 
$info['templateInfo'] ) {
$info['params']['templateInfo'] = 
$info['templateInfo'];
}
diff --git a/includes/Database.php b/includes/Database.php
index 2e2f6e5..216282b 100644
--- a/includes/Database.php
+++ b/includes/Database.php
@@ -54,7 +54,7 @@
public function getFromId( $id ) {
$row = wfGetDB( DB_REPLICA )->selectRow(
'linter',
-   [ 'linter_cat', 'linter_params' ],
+   [ 'linter_cat', 'linter_params', 'linter_start', 
'linter_end' ],
[ 'linter_id' => $id, 'linter_page' => $this->pageId ],
__METHOD__
);
@@ -76,6 +76,7 @@
public static function makeLintError( $row ) {
return new LintError(
( new CategoryManager() )->getCategoryName( 
$row->linter_cat ),
+   [ (int)$row->linter_start, (int)$row->linter_end ],
$row->linter_params,
(int)$row->linter_id
);
@@ -89,7 +90,10 @@
public function getForPage() {
$rows = wfGetDB( DB_REPLICA )->select(
'linter',
-   [ 'linter_id', 'linter_cat', 'linter_params' ],
+   [
+   'linter_id', 'linter_cat', 'linter_start',
+   'linter_end', 'linter_params'
+   ],
[ 'linter_page' => $this->pageId ],
__METHOD__
);
@@ -114,6 +118,8 @@
'linter_page' => $this->pageId,
'linter_cat' => ( new CategoryManager() 
)->getCategoryId( $error->category ),
'linter_params' => FormatJson::encode( $error->params, 
false, FormatJson::ALL_OK ),
+   'linter_start' => $error->location[0],
+   'linter_end' => $error->location[1],
];
}
 
diff --git a/includes/LintError.php b/includes/LintError.php
index 932055b..0c5ea7d 100644
--- a/includes/LintError.php
+++ b/includes/LintError.php
@@ -53,18 +53,19 @@
 
/**
 * @param string $category
+* @param int[] $location [ start, end ]
 * @param string|array $params JSON string or already decoded array
 * @param int $lintId linter_id
 */
-   public function __construct( $category, $params, $lintId = 0 ) {
+   public function __construct( $category, $location, $params, $lintId = 0 
) {
$this->category = $category;
if ( is_string( $params ) ) {
$params = FormatJson::decode( $params, true );
}
$this->params = $params;
 

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Fix inserting errors if none exist for that page

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

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

Change subject: Fix inserting errors if none exist for that page
..

Fix inserting errors if none exist for that page

If no errors existed for the page, inserting new ones would fail with a
database error since $errors was key-ed by unique id, which the database
wrapper interpreted as field names, causing issues. Using array_values()
gets rid of the keys, fixing the issue.

Change-Id: I7645de4e5d3ac4462d7980374c8ef8be6280442b
---
M includes/Database.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/Database.php b/includes/Database.php
index 1c2e124..2e2f6e5 100644
--- a/includes/Database.php
+++ b/includes/Database.php
@@ -130,7 +130,7 @@
if ( !$previous && !$errors ) {
return [ 'deleted' => 0, 'added' => 0 ];
} elseif ( !$previous && $errors ) {
-   $toInsert = $errors;
+   $toInsert = array_values( $errors );
$toDelete = [];
} elseif ( $previous && !$errors ) {
$dbw->delete(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7645de4e5d3ac4462d7980374c8ef8be6280442b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Linter
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...RegexBlock[master]: Another old classic with a modern twist

2016-11-30 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Another old classic with a modern twist
..


Another old classic with a modern twist

Requires MW 1.25+, tested only against 1.28.

Change-Id: Ie27c0dd0ff2f057949bd8ea15bbbac6f02e419eb
---
M README
R RegexBlock.alias.php
A RegexBlockCore.php
A RegexBlockUITemplate.php
M SpecialRegexBlock.php
A extension.json
A i18n/af.json
A i18n/aln.json
A i18n/am.json
A i18n/an.json
A i18n/ar.json
A i18n/arc.json
A i18n/arz.json
A i18n/az.json
A i18n/be-tarask.json
A i18n/be.json
A i18n/bg.json
A i18n/bn.json
A i18n/br.json
A i18n/bs.json
A i18n/ca.json
A i18n/ce.json
A i18n/ch.json
A i18n/ckb.json
A i18n/cs.json
A i18n/cu.json
A i18n/cy.json
A i18n/da.json
A i18n/de-formal.json
A i18n/de.json
A i18n/diq.json
A i18n/dsb.json
A i18n/ee.json
A i18n/el.json
A i18n/en.json
A i18n/eo.json
A i18n/es.json
A i18n/et.json
A i18n/eu.json
A i18n/fa.json
A i18n/fi.json
A i18n/fr.json
A i18n/frp.json
A i18n/fy.json
A i18n/ga.json
A i18n/gl.json
A i18n/got.json
A i18n/grc.json
A i18n/gsw.json
A i18n/gv.json
A i18n/ha.json
A i18n/haw.json
A i18n/he.json
A i18n/hi.json
A i18n/hil.json
A i18n/hr.json
A i18n/hsb.json
A i18n/hu.json
A i18n/ia.json
A i18n/id.json
A i18n/ig.json
A i18n/io.json
A i18n/is.json
A i18n/it.json
A i18n/ja.json
A i18n/jv.json
A i18n/ka.json
A i18n/kl.json
A i18n/km.json
A i18n/kn.json
A i18n/ko.json
A i18n/kri.json
A i18n/krj.json
A i18n/ksh.json
A i18n/lb.json
A i18n/ltg.json
A i18n/mdf.json
A i18n/mhr.json
A i18n/mk.json
A i18n/ml.json
A i18n/mn.json
A i18n/mr.json
A i18n/ms.json
A i18n/mt.json
A i18n/myv.json
A i18n/mzn.json
A i18n/nah.json
A i18n/nb.json
A i18n/niu.json
A i18n/nl.json
A i18n/nn.json
A i18n/nov.json
A i18n/nso.json
A i18n/oc.json
A i18n/os.json
A i18n/pa.json
A i18n/pdc.json
A i18n/pl.json
A i18n/pms.json
A i18n/ps.json
A i18n/pt-br.json
A i18n/pt.json
A i18n/qqq.json
A i18n/qu.json
A i18n/rif.json
A i18n/ro.json
A i18n/roa-tara.json
A i18n/ru.json
A i18n/rue.json
A i18n/sdc.json
A i18n/si.json
A i18n/sk.json
A i18n/sl.json
A i18n/sr-ec.json
A i18n/sr-el.json
A i18n/su.json
A i18n/sv.json
A i18n/sw.json
A i18n/szl.json
A i18n/ta.json
A i18n/te.json
A i18n/tet.json
A i18n/tg-cyrl.json
A i18n/tg-latn.json
A i18n/th.json
A i18n/tk.json
A i18n/tl.json
A i18n/tly.json
A i18n/tr.json
A i18n/ug-arab.json
A i18n/ug-latn.json
A i18n/uk.json
A i18n/ur.json
A i18n/vep.json
A i18n/vi.json
A i18n/vo.json
A i18n/wuu.json
A i18n/yi.json
A i18n/zh-hans.json
A i18n/zh-hant.json
D patch-upgrade.sql
D regexBlock.i18n.php
D regexBlock.php
D regexBlockCore.php
A regexblock.css
A regexblock_schema.sql
D schema.sql
147 files changed, 4,849 insertions(+), 4,780 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie27c0dd0ff2f057949bd8ea15bbbac6f02e419eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RegexBlock
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...RegexBlock[master]: Another old classic with a modern twist

2016-11-30 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Another old classic with a modern twist
..

Another old classic with a modern twist

Requires MW 1.25+, tested only against 1.28.

Change-Id: Ie27c0dd0ff2f057949bd8ea15bbbac6f02e419eb
---
M README
R RegexBlock.alias.php
A RegexBlockCore.php
A RegexBlockUITemplate.php
M SpecialRegexBlock.php
A extension.json
A i18n/af.json
A i18n/aln.json
A i18n/am.json
A i18n/an.json
A i18n/ar.json
A i18n/arc.json
A i18n/arz.json
A i18n/az.json
A i18n/be-tarask.json
A i18n/be.json
A i18n/bg.json
A i18n/bn.json
A i18n/br.json
A i18n/bs.json
A i18n/ca.json
A i18n/ce.json
A i18n/ch.json
A i18n/ckb.json
A i18n/cs.json
A i18n/cu.json
A i18n/cy.json
A i18n/da.json
A i18n/de-formal.json
A i18n/de.json
A i18n/diq.json
A i18n/dsb.json
A i18n/ee.json
A i18n/el.json
A i18n/en.json
A i18n/eo.json
A i18n/es.json
A i18n/et.json
A i18n/eu.json
A i18n/fa.json
A i18n/fi.json
A i18n/fr.json
A i18n/frp.json
A i18n/fy.json
A i18n/ga.json
A i18n/gl.json
A i18n/got.json
A i18n/grc.json
A i18n/gsw.json
A i18n/gv.json
A i18n/ha.json
A i18n/haw.json
A i18n/he.json
A i18n/hi.json
A i18n/hil.json
A i18n/hr.json
A i18n/hsb.json
A i18n/hu.json
A i18n/ia.json
A i18n/id.json
A i18n/ig.json
A i18n/io.json
A i18n/is.json
A i18n/it.json
A i18n/ja.json
A i18n/jv.json
A i18n/ka.json
A i18n/kl.json
A i18n/km.json
A i18n/kn.json
A i18n/ko.json
A i18n/kri.json
A i18n/krj.json
A i18n/ksh.json
A i18n/lb.json
A i18n/ltg.json
A i18n/mdf.json
A i18n/mhr.json
A i18n/mk.json
A i18n/ml.json
A i18n/mn.json
A i18n/mr.json
A i18n/ms.json
A i18n/mt.json
A i18n/myv.json
A i18n/mzn.json
A i18n/nah.json
A i18n/nb.json
A i18n/niu.json
A i18n/nl.json
A i18n/nn.json
A i18n/nov.json
A i18n/nso.json
A i18n/oc.json
A i18n/os.json
A i18n/pa.json
A i18n/pdc.json
A i18n/pl.json
A i18n/pms.json
A i18n/ps.json
A i18n/pt-br.json
A i18n/pt.json
A i18n/qqq.json
A i18n/qu.json
A i18n/rif.json
A i18n/ro.json
A i18n/roa-tara.json
A i18n/ru.json
A i18n/rue.json
A i18n/sdc.json
A i18n/si.json
A i18n/sk.json
A i18n/sl.json
A i18n/sr-ec.json
A i18n/sr-el.json
A i18n/su.json
A i18n/sv.json
A i18n/sw.json
A i18n/szl.json
A i18n/ta.json
A i18n/te.json
A i18n/tet.json
A i18n/tg-cyrl.json
A i18n/tg-latn.json
A i18n/th.json
A i18n/tk.json
A i18n/tl.json
A i18n/tly.json
A i18n/tr.json
A i18n/ug-arab.json
A i18n/ug-latn.json
A i18n/uk.json
A i18n/ur.json
A i18n/vep.json
A i18n/vi.json
A i18n/vo.json
A i18n/wuu.json
A i18n/yi.json
A i18n/zh-hans.json
A i18n/zh-hant.json
D patch-upgrade.sql
D regexBlock.i18n.php
D regexBlock.php
D regexBlockCore.php
A regexblock.css
A regexblock_schema.sql
D schema.sql
147 files changed, 4,849 insertions(+), 4,780 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RegexBlock 
refs/changes/45/324645/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie27c0dd0ff2f057949bd8ea15bbbac6f02e419eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RegexBlock
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...SpamRegex[master]: An old classic with a modern twist

2016-11-30 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: An old classic with a modern twist
..


An old classic with a modern twist

Requires MW 1.25 or newer, probably; tested only against 1.28.

Change-Id: I7936f280696b81ffad3f43242e1cd509b6428134
---
M README
D SpamRegex.i18n.php
D SpamRegex.php
D SpamRegex.sql
D SpamRegexCore.php
D SpecialSpamRegex.php
A backend/SpamRegexHooks.php
A backend/SpecialSpamRegex.php
A backend/spamRegexForm.php
A backend/spamRegexList.php
A extension.json
A i18n/af.json
A i18n/am.json
A i18n/an.json
A i18n/ar.json
A i18n/arc.json
A i18n/arz.json
A i18n/ast.json
A i18n/az.json
A i18n/be-tarask.json
A i18n/be.json
A i18n/bg.json
A i18n/bn.json
A i18n/br.json
A i18n/bs.json
A i18n/ca.json
A i18n/ckb.json
A i18n/da.json
A i18n/de-formal.json
A i18n/de.json
A i18n/dsb.json
A i18n/el.json
A i18n/en.json
A i18n/eo.json
A i18n/es.json
A i18n/et.json
A i18n/eu.json
A i18n/fa.json
A i18n/fi.json
A i18n/fr.json
A i18n/frp.json
A i18n/fy.json
A i18n/ga.json
A i18n/gl.json
A i18n/grc.json
A i18n/gsw.json
A i18n/ha.json
A i18n/he.json
A i18n/hi.json
A i18n/hil.json
A i18n/hr.json
A i18n/hsb.json
A i18n/hu.json
A i18n/ia.json
A i18n/id.json
A i18n/is.json
A i18n/it.json
A i18n/ja.json
A i18n/jv.json
A i18n/ka.json
A i18n/kk-cyrl.json
A i18n/kk-latn.json
A i18n/km.json
A i18n/kn.json
A i18n/ksh.json
A i18n/ku-latn.json
A i18n/lb.json
A i18n/mdf.json
A i18n/mhr.json
A i18n/mk.json
A i18n/ml.json
A i18n/mn.json
A i18n/mr.json
A i18n/ms.json
A i18n/mt.json
A i18n/myv.json
A i18n/nah.json
A i18n/nb.json
A i18n/nds.json
A i18n/niu.json
A i18n/nl.json
A i18n/nn.json
A i18n/oc.json
A i18n/or.json
A i18n/pfl.json
A i18n/pl.json
A i18n/pms.json
A i18n/ps.json
A i18n/pt-br.json
A i18n/pt.json
A i18n/qqq.json
A i18n/rif.json
A i18n/ro.json
A i18n/roa-tara.json
A i18n/ru.json
A i18n/rue.json
A i18n/sdc.json
A i18n/si.json
A i18n/sk.json
A i18n/sl.json
A i18n/sma.json
A i18n/sr-ec.json
A i18n/sr-el.json
A i18n/su.json
A i18n/sv.json
A i18n/ta.json
A i18n/te.json
A i18n/tet.json
A i18n/tg-cyrl.json
A i18n/tg-latn.json
A i18n/tk.json
A i18n/tl.json
A i18n/tr.json
A i18n/uk.json
A i18n/ur.json
A i18n/vep.json
A i18n/vi.json
A i18n/vo.json
A i18n/yi.json
A i18n/zh-hans.json
A i18n/zh-hant.json
A resources/js/ext.spamRegex.js
A sql/spam_regex.sql
A templates/ui.tmpl.php
124 files changed, 2,921 insertions(+), 2,649 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7936f280696b81ffad3f43242e1cd509b6428134
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamRegex
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...SpamRegex[master]: An old classic with a modern twist

2016-11-30 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: An old classic with a modern twist
..

An old classic with a modern twist

Requires MW 1.25 or newer, probably; tested only against 1.28.

Change-Id: I7936f280696b81ffad3f43242e1cd509b6428134
---
M README
D SpamRegex.i18n.php
D SpamRegex.php
D SpamRegex.sql
D SpamRegexCore.php
D SpecialSpamRegex.php
A backend/SpamRegexHooks.php
A backend/SpecialSpamRegex.php
A backend/spamRegexForm.php
A backend/spamRegexList.php
A extension.json
A i18n/af.json
A i18n/am.json
A i18n/an.json
A i18n/ar.json
A i18n/arc.json
A i18n/arz.json
A i18n/ast.json
A i18n/az.json
A i18n/be-tarask.json
A i18n/be.json
A i18n/bg.json
A i18n/bn.json
A i18n/br.json
A i18n/bs.json
A i18n/ca.json
A i18n/ckb.json
A i18n/da.json
A i18n/de-formal.json
A i18n/de.json
A i18n/dsb.json
A i18n/el.json
A i18n/en.json
A i18n/eo.json
A i18n/es.json
A i18n/et.json
A i18n/eu.json
A i18n/fa.json
A i18n/fi.json
A i18n/fr.json
A i18n/frp.json
A i18n/fy.json
A i18n/ga.json
A i18n/gl.json
A i18n/grc.json
A i18n/gsw.json
A i18n/ha.json
A i18n/he.json
A i18n/hi.json
A i18n/hil.json
A i18n/hr.json
A i18n/hsb.json
A i18n/hu.json
A i18n/ia.json
A i18n/id.json
A i18n/is.json
A i18n/it.json
A i18n/ja.json
A i18n/jv.json
A i18n/ka.json
A i18n/kk-cyrl.json
A i18n/kk-latn.json
A i18n/km.json
A i18n/kn.json
A i18n/ksh.json
A i18n/ku-latn.json
A i18n/lb.json
A i18n/mdf.json
A i18n/mhr.json
A i18n/mk.json
A i18n/ml.json
A i18n/mn.json
A i18n/mr.json
A i18n/ms.json
A i18n/mt.json
A i18n/myv.json
A i18n/nah.json
A i18n/nb.json
A i18n/nds.json
A i18n/niu.json
A i18n/nl.json
A i18n/nn.json
A i18n/oc.json
A i18n/or.json
A i18n/pfl.json
A i18n/pl.json
A i18n/pms.json
A i18n/ps.json
A i18n/pt-br.json
A i18n/pt.json
A i18n/qqq.json
A i18n/rif.json
A i18n/ro.json
A i18n/roa-tara.json
A i18n/ru.json
A i18n/rue.json
A i18n/sdc.json
A i18n/si.json
A i18n/sk.json
A i18n/sl.json
A i18n/sma.json
A i18n/sr-ec.json
A i18n/sr-el.json
A i18n/su.json
A i18n/sv.json
A i18n/ta.json
A i18n/te.json
A i18n/tet.json
A i18n/tg-cyrl.json
A i18n/tg-latn.json
A i18n/tk.json
A i18n/tl.json
A i18n/tr.json
A i18n/uk.json
A i18n/ur.json
A i18n/vep.json
A i18n/vi.json
A i18n/vo.json
A i18n/yi.json
A i18n/zh-hans.json
A i18n/zh-hant.json
A resources/js/ext.spamRegex.js
A sql/spam_regex.sql
A templates/ui.tmpl.php
124 files changed, 2,921 insertions(+), 2,649 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamRegex 
refs/changes/44/324644/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7936f280696b81ffad3f43242e1cd509b6428134
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamRegex
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: CSS fixes for new c3 version

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

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

Change subject: CSS fixes for new c3 version
..

CSS fixes for new c3 version

IONO exactly what changed, but this makes the Big English chart
fit inside the white background again.

Change-Id: Ie81a2e3e7595cbd73579b34b5edbd179b3e3a530
---
M src/css/style.css
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/43/324643/1

diff --git a/src/css/style.css b/src/css/style.css
index 81d6bcd..0b2645b 100644
--- a/src/css/style.css
+++ b/src/css/style.css
@@ -284,9 +284,17 @@
margin-top: 10px;
 }
 
+.bigEnglish-updates {
+   overflow: hidden; /* gives it the height of floating kids */
+}
+
 .bigEnglish-updates .row {
margin: 0 0 10px 0;
border-bottom: 1px #ccc solid;
+}
+
+#totalsEarnedChart svg {
+   margin-left: -15px;
 }
 
 .transparent {
@@ -655,4 +663,4 @@
 
 #newBoard {
text-align: right;
-}
\ No newline at end of file
+}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: SpecialBrokenRedirects: fix up LinkRenderer conversion

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

Change subject: SpecialBrokenRedirects: fix up LinkRenderer conversion
..


SpecialBrokenRedirects: fix up LinkRenderer conversion

$options is no longer supported, use makeBrokenLink() instead.

Follows-up d8c56ec84f.

Change-Id: If2025232a2e09ab99b1bdc6d58a77f347f3dbf5e
---
M includes/specials/SpecialBrokenRedirects.php
1 file changed, 1 insertion(+), 7 deletions(-)

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



diff --git a/includes/specials/SpecialBrokenRedirects.php 
b/includes/specials/SpecialBrokenRedirects.php
index 8927fbf..b730ecd 100644
--- a/includes/specials/SpecialBrokenRedirects.php
+++ b/includes/specials/SpecialBrokenRedirects.php
@@ -136,13 +136,7 @@
[ 'action' => 'edit' ]
);
}
-   $to = $linkRenderer->makeLink(
-   $toObj,
-   null,
-   [],
-   [],
-   [ 'broken' ]
-   );
+   $to = $linkRenderer->makeBrokenLink( $toObj );
$arr = $this->getLanguage()->getArrow();
 
$out = $from . $this->msg( 'word-separator' )->escaped();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2025232a2e09ab99b1bdc6d58a77f347f3dbf5e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MtDu 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: nutcracker: listen on localhost for stats

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

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

Change subject: nutcracker: listen on localhost for stats
..

nutcracker: listen on localhost for stats

Bug: T111934
Change-Id: Idb2199485eef6bbde143cdf58dbd26ae0687f46e
---
M modules/nutcracker/templates/default.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/324642/1

diff --git a/modules/nutcracker/templates/default.erb 
b/modules/nutcracker/templates/default.erb
index cdea50d..64d8760 100644
--- a/modules/nutcracker/templates/default.erb
+++ b/modules/nutcracker/templates/default.erb
@@ -1,4 +1,4 @@
 # Default settings for nutcracker.
 # This file is managed by Puppet.
 
-DAEMON_OPTS="--verbose=<%= @verbosity %><%- if @mbuf_size -%> --mbuf-size=<%= 
scope.function_to_bytes [@mbuf_size] %><%- end %>"
+DAEMON_OPTS="--stats-addr=127.0.0.1 --verbose=<%= @verbosity %><%- if 
@mbuf_size -%> --mbuf-size=<%= scope.function_to_bytes [@mbuf_size] %><%- end 
%>"

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Make table caption node an active node

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

Change subject: Make table caption node an active node
..


Make table caption node an active node

Change-Id: I3d0b427c19da547adf0f78372f1112e605a9a78b
---
M src/ce/nodes/ve.ce.TableCaptionNode.js
M src/ce/styles/nodes/ve.ce.TableNode.css
2 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/src/ce/nodes/ve.ce.TableCaptionNode.js 
b/src/ce/nodes/ve.ce.TableCaptionNode.js
index bcf3e74..ba9cef1 100644
--- a/src/ce/nodes/ve.ce.TableCaptionNode.js
+++ b/src/ce/nodes/ve.ce.TableCaptionNode.js
@@ -17,6 +17,9 @@
// Parent constructor
ve.ce.TableCaptionNode.super.apply( this, arguments );
 
+   // Mixin constructor
+   ve.ce.ActiveNode.call( this );
+
// DOM changes
this.$element
.addClass( 've-ce-tableCaptionNode' )
@@ -27,6 +30,8 @@
 
 OO.inheritClass( ve.ce.TableCaptionNode, ve.ce.BranchNode );
 
+OO.mixinClass( ve.ce.TableCaptionNode, ve.ce.ActiveNode );
+
 /* Static Properties */
 
 ve.ce.TableCaptionNode.static.name = 'tableCaption';
diff --git a/src/ce/styles/nodes/ve.ce.TableNode.css 
b/src/ce/styles/nodes/ve.ce.TableNode.css
index 8bcc758..630e22b 100644
--- a/src/ce/styles/nodes/ve.ce.TableNode.css
+++ b/src/ce/styles/nodes/ve.ce.TableNode.css
@@ -14,7 +14,7 @@
cursor: text;
 }
 
-.ve-ce-tableCaptionNode:focus {
+.ve-ce-tableCaptionNode.ve-ce-activeNode-active {
border: 1px dotted #ccc;
border-bottom: 0;
margin-top: -1px;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d0b427c19da547adf0f78372f1112e605a9a78b
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
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...parsoid[master]: Convert cleanupFormattingTagFixup to the DOMTraverser interface

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

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

Change subject: Convert cleanupFormattingTagFixup to the DOMTraverser interface
..

Convert cleanupFormattingTagFixup to the DOMTraverser interface

Change-Id: I33544f68a4290daf544f6fe9090b31cd1b63fadd
---
M lib/utils/DOMTraverser.js
M lib/wt2html/DOMPostProcessor.js
A lib/wt2html/pp/handlers/cleanupFormattingTagFixup.js
D lib/wt2html/pp/processors/cleanupFormattingTagFixup.js
4 files changed, 78 insertions(+), 75 deletions(-)


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

diff --git a/lib/utils/DOMTraverser.js b/lib/utils/DOMTraverser.js
index 9352e6f..4cc37a4 100644
--- a/lib/utils/DOMTraverser.js
+++ b/lib/utils/DOMTraverser.js
@@ -23,6 +23,19 @@
 }
 
 /**
+ * Full pass w/ func
+ *
+ * @param {MWParserEnvironment} env
+ * @param {Function} func
+ * @return {Function}
+ */
+DOMTraverser.pass = function(env, func) {
+   var domVisitor = new DOMTraverser(env);
+   domVisitor.addHandler(null, func);
+   return domVisitor.traverse.bind(domVisitor);
+};
+
+/**
  * Add a handler to the DOM traversal
  *
  * @param {string} nodeName
diff --git a/lib/wt2html/DOMPostProcessor.js b/lib/wt2html/DOMPostProcessor.js
index 940ea1b..1a2b62b 100644
--- a/lib/wt2html/DOMPostProcessor.js
+++ b/lib/wt2html/DOMPostProcessor.js
@@ -16,7 +16,6 @@
 var handleUnbalancedTables = 
require('./pp/processors/handleUnbalancedTables.js').handleUnbalancedTables;
 var markTreeBuilderFixups = 
require('./pp/processors/markTreeBuilderFixups.js').markTreeBuilderFixups;
 var normalize = require('./pp/processors/normalize.js').normalize;
-var cleanupFormattingTagFixup = 
require('./pp/processors/cleanupFormattingTagFixup.js').cleanupFormattingTagFixup;
 var migrateTemplateMarkerMetas = 
require('./pp/processors/migrateTemplateMarkerMetas.js').migrateTemplateMarkerMetas;
 var handlePres = require('./pp/processors/handlePres.js').handlePres;
 var migrateTrailingNLs = 
require('./pp/processors/migrateTrailingNLs.js').migrateTrailingNLs;
@@ -31,6 +30,7 @@
 var TableFixups = require('./pp/handlers/tableFixups.js').TableFixups;
 var handleLinkNeighbours = 
require('./pp/handlers/handleLinkNeighbours.js').handleLinkNeighbours;
 var liFixups = require('./pp/handlers/liFixups.js');
+var cleanupFormattingTagFixup = 
require('./pp/handlers/cleanupFormattingTagFixup.js').cleanupFormattingTagFixup;
 
 // map from mediawiki metadata names to RDFa property names
 var metadataMap = {
@@ -101,17 +101,13 @@
});
};
 
-   // DOM traverser that runs before the in-order DOM handlers.
-   var dataParsoidLoader = new DOMTraverser(env);
-   dataParsoidLoader.addHandler(null, this.prepareDOM.bind(this));
-
// Common post processing
-   addPP('dpLoader', dataParsoidLoader.traverse.bind(dataParsoidLoader));
+   addPP('dpLoader', DOMTraverser.pass(env, this.prepareDOM.bind(this)));
addPP('markFosteredContent', markFosteredContent);
addPP('handleUnbalancedTables', handleUnbalancedTables);
addPP('markTreeBuilderFixups', markTreeBuilderFixups);
addPP('normalize', normalize);
-   addPP('cleanupFormattingTagFixup', cleanupFormattingTagFixup);
+   addPP('cleanupFormattingTagFixup', DOMTraverser.pass(env, 
cleanupFormattingTagFixup));
// Run this after 'markTreeBuilderFixups' because the mw:StartTag
// and mw:EndTag metas would otherwise interfere with the
// firstChild/lastChild check that this pass does.
@@ -139,14 +135,10 @@
}, this);
 
// Strip empty elements from template content
-   domVisitor = new DOMTraverser(env);
-   domVisitor.addHandler(null, CleanUp.stripEmptyElements);
-   addPP('stripEmptyElts', domVisitor.traverse.bind(domVisitor));
+   addPP('stripEmptyElts', DOMTraverser.pass(env, 
CleanUp.stripEmptyElements));
 
if (env.conf.parsoid.linting) {
-   domVisitor = new DOMTraverser(env);
-   domVisitor.addHandler(null, logWikitextFixup);
-   addPP('linter', domVisitor.traverse.bind(domVisitor));
+   addPP('linter', DOMTraverser.pass(env, logWikitextFixup));
}
 
domVisitor = new DOMTraverser(env);
diff --git a/lib/wt2html/pp/handlers/cleanupFormattingTagFixup.js 
b/lib/wt2html/pp/handlers/cleanupFormattingTagFixup.js
new file mode 100644
index 000..c0ccdd8
--- /dev/null
+++ b/lib/wt2html/pp/handlers/cleanupFormattingTagFixup.js
@@ -0,0 +1,60 @@
+'use strict';
+
+var DU = require('../../../utils/DOMUtils.js').DOMUtils;
+
+function cleanupFormattingTagFixup(node, env, atTopLevel, tplInfo) {
+   if (DU.isGeneratedFigure(node)) {
+   // Find path of formatting elements.
+   // NOTE:  is a formatting elts as well and should be 
explicitly skipped
+   var fpath = [];
+   var c = 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set $wgUserEmailUseReplyTo = true; on group0 wikis

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

Change subject: Set $wgUserEmailUseReplyTo = true; on group0 wikis
..


Set $wgUserEmailUseReplyTo = true; on group0 wikis

Due to popular mail hosts making their DMARC policies more strict,
trying to send email from the user's own email address often fails.

Instead, just send the email from w...@wikimedia.org, and have the
user's email be in the reply-to header.

This is just on group0 wikis for now, once it has been tested for a
while (maybe a week), we can roll it out everywhere.

Bug: T66795
Change-Id: Ib021047f005388c5ed0e1b7fc3404f70a8e25f10
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6b2c53e..09e306d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11859,6 +11859,7 @@
 ],
 
 'wgUserEmailUseReplyTo' => [
+   'group0' => true, // T66795
'default' => false, // T14655
 ],
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib021047f005388c5ed0e1b7fc3404f70a8e25f10
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Update c3 library to 4.11

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

Change subject: Update c3 library to 4.11
..


Update c3 library to 4.11

Fixes a Chrome click event bug: https://github.com/c3js/c3/issues/1566

Change-Id: If49f59d8e6b39c3535eca5fc10a767797803f2bd
---
M src/bower_modules
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/bower_modules b/src/bower_modules
index f776d8b..293db7e 16
--- a/src/bower_modules
+++ b/src/bower_modules
@@ -1 +1 @@
-Subproject commit f776d8b7f3152ceccfb02f425985c4612d957643
+Subproject commit 293db7e2efc4423452bf769987a5bec333bebf38

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If49f59d8e6b39c3535eca5fc10a767797803f2bd
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Cdentinger 
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...CirrusSearch[master]: Fix some typoes

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

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

Change subject: Fix some typoes
..

Fix some typoes

Just noticed a bunch of random typoes.

Change-Id: Id7a62661150124d1a73f890a7112c5d3f271d9a8
---
M includes/Query/FullTextSimpleMatchQueryBuilder.php
M includes/Util.php
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/Query/FullTextSimpleMatchQueryBuilder.php 
b/includes/Query/FullTextSimpleMatchQueryBuilder.php
index fd31ebe..12c4b02 100644
--- a/includes/Query/FullTextSimpleMatchQueryBuilder.php
+++ b/includes/Query/FullTextSimpleMatchQueryBuilder.php
@@ -62,7 +62,7 @@
/**
 * Build the primary query used for full text search.
 * If query_string syntax is not used the experimental query is built.
-* We fallback to parent implementation otherwize.
+* We fallback to parent implementation otherwise.
 *
 * @param SearchContext $context
 * @param string[] $fields
@@ -99,7 +99,7 @@
 * Tries to track queries that would need the auto_generate_phrase
 * from query string.
 * We don't try to mimic all the behaviors of the lucene tokenizers
-* but to detect the words we break explicitely with the wordbreaker.
+* but to detect the words we break explicitly with the wordbreaker.
 * This includes mainly search for acronyms.
 * Other chars may require a phrase query like hyphens...
 *
diff --git a/includes/Util.php b/includes/Util.php
index 1815677..3e7e720 100644
--- a/includes/Util.php
+++ b/includes/Util.php
@@ -393,7 +393,7 @@
$term = preg_replace( 
'/(?https://gerrit.wikimedia.org/r/324640
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7a62661150124d1a73f890a7112c5d3f271d9a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] wikimedia...bower_modules[master]: Update c3 to 4.11

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

Change subject: Update c3 to 4.11
..


Update c3 to 4.11

Get this fixed: https://github.com/c3js/c3/issues/1566

Change-Id: Ie430f8aafcddfd19245d065e455c745e9b7e9c40
---
M c3/.bower.json
A c3/CONTRIBUTING.md
M c3/README.md
M c3/bower.json
M c3/c3.css
M c3/c3.js
M c3/c3.min.css
M c3/c3.min.js
A c3/extensions/chart-bubble/bubble.js
A c3/extensions/chart-bubble/index.html
A c3/karma.conf.js
11 files changed, 1,632 insertions(+), 197 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie430f8aafcddfd19245d065e455c745e9b7e9c40
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash/src/bower_modules
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Update c3 library to 4.11

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

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

Change subject: Update c3 library to 4.11
..

Update c3 library to 4.11

Fixes a Chrome click event bug: https://github.com/c3js/c3/issues/1566

Change-Id: If49f59d8e6b39c3535eca5fc10a767797803f2bd
---
M src/bower_modules
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/39/324639/1

diff --git a/src/bower_modules b/src/bower_modules
index f776d8b..293db7e 16
--- a/src/bower_modules
+++ b/src/bower_modules
@@ -1 +1 @@
-Subproject commit f776d8b7f3152ceccfb02f425985c4612d957643
+Subproject commit 293db7e2efc4423452bf769987a5bec333bebf38

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...bower_modules[master]: Update c3 to 4.11

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

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

Change subject: Update c3 to 4.11
..

Update c3 to 4.11

Get this fixed: https://github.com/c3js/c3/issues/1566

Change-Id: Ie430f8aafcddfd19245d065e455c745e9b7e9c40
---
M c3/.bower.json
A c3/CONTRIBUTING.md
M c3/README.md
M c3/bower.json
M c3/c3.css
M c3/c3.js
M c3/c3.min.css
M c3/c3.min.js
A c3/extensions/chart-bubble/bubble.js
A c3/extensions/chart-bubble/index.html
A c3/karma.conf.js
11 files changed, 1,632 insertions(+), 197 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash/src/bower_modules 
refs/changes/38/324638/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie430f8aafcddfd19245d065e455c745e9b7e9c40
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash/src/bower_modules
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Add support for authenticated Action API use

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

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

Change subject: Add support for authenticated Action API use
..

Add support for authenticated Action API use

Upgrade to mwoauth >= 0.8.2 and add configuration for authenticating to
the MediaWiki Action API using OAuth. A method for getting an anonymous
client is also provided and used when checking for username availability
so that on wiki rights do not accidentally allow usernames that would
otherwise be blocked.

When this is deployed to production there will be private Puppet changes
needed to add configuration settings for the StrikerBot wikitech user.

Bug: T144712
Change-Id: Ibfc4b35498e59bf02da3c8562fea802a573f139c
---
M requirements.txt
M striker/mediawiki.py
M striker/register/utils.py
M striker/settings.py
M striker/striker.ini
5 files changed, 55 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/37/324637/1

diff --git a/requirements.txt b/requirements.txt
index e786a18..a2820f4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,7 +11,7 @@
 django-parsley>=0.6  # BSD
 django-ratelimit-backend>=1.0  # BSD
 idna>=2.1  # BSD
-mwclient>=0.8.1  # MIT
+mwclient>=0.8.2  # MIT
 mwoauth>=0.2.7  # MIT
 mysqlclient>=1.3.7  # GPLv2
 oauthlib>=1.1.2  # BSD
diff --git a/striker/mediawiki.py b/striker/mediawiki.py
index a306ad9..2439750 100644
--- a/striker/mediawiki.py
+++ b/striker/mediawiki.py
@@ -32,27 +32,59 @@
 class Client(object):
 """MediaWiki client"""
 _default_instance = None
+_anon_instance = None
 
 @classmethod
 def default_client(cls):
 """Get a MediaWiki client using the default credentials."""
 if cls._default_instance is None:
 logger.debug('Creating default instance')
-cls._default_instance = cls(settings.WIKITECH_URL)
+cls._default_instance = cls(
+settings.WIKITECH_URL,
+consumer_token=settings.WIKITECH_CONSUMER_TOKEN,
+consumer_secret=settings.WIKITECH_CONSUMER_SECRET,
+access_token=settings.WIKITECH_ACCESS_TOKEN,
+access_secret=settings.WIKITECH_ACCESS_SECRET
+)
 return cls._default_instance
 
-def __init__(self, url):
+@classmethod
+def anon_client(cls):
+"""Get a MediaWiki client that is not authenticated."""
+if cls._anon_instance is None:
+logger.debug('Creating anon instance')
+cls._anon_instance = cls(settings.WIKITECH_URL)
+return cls._anon_instance
+
+def __init__(
+self, url,
+consumer_token=None, consumer_secret=None,
+access_token=None, access_secret=None
+):
 self.url = url
-self.site = self._site_for_url(url)
-self.site.force_login = False
+self.site = self._site_for_url(
+url, consumer_token, consumer_secret, access_token, access_secret)
 
 @classmethod
-def _site_for_url(cls, url):
+def _site_for_url(
+cls, url,
+consumer_token=None, consumer_secret=None,
+access_token=None, access_secret=None
+):
 parts = urllib.parse.urlparse(url)
 host = parts.netloc
 if parts.scheme != 'https':
 host = (parts.scheme, parts.netloc)
-return mwclient.Site(host, clients_useragent='Striker')
+force_login = consumer_token is not None
+return mwclient.Site(
+host,
+consumer_token=consumer_token,
+consumer_secret=consumer_secret,
+access_token=access_token,
+access_secret=access_secret,
+clients_useragent='Striker',
+force_login=force_login
+)
 
 def query_users_cancreate(self, *users):
 """Check to see if the given usernames could be created or not.
diff --git a/striker/register/utils.py b/striker/register/utils.py
index cd411e2..2cacc45 100644
--- a/striker/register/utils.py
+++ b/striker/register/utils.py
@@ -31,7 +31,6 @@
 
 
 logger = logging.getLogger(__name__)
-mwapi = mediawiki.Client.default_client()
 
 
 def sul_available(name):
@@ -109,6 +108,9 @@
 - name : Canonicalized version of the given name
 - error : Error message if ok is False; None otherwise
 """
+# Make sure to use the anon client here because on-wiki rights can affect
+# the result of the cancreate check.
+mwapi = mediawiki.Client.anon_client()
 user = mwapi.query_users_cancreate(name)[0]
 # Example response:
 # [{'missing': True, 'name': 'Puppet',
@@ -141,6 +143,7 @@
 
 Returns a block reason or False if not blocked.
 """
+mwapi = mediawiki.Client.default_client()
 res = mwapi.query_blocks_ip(ip)
 for block in res:
 if block['nocreate']:
diff --git a/striker/settings.py b/striker/settings.py
index 3e0152b..87c6589 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...RelatedLinks[master]: new file: RelatedLinks.alias.php new file: RelatedLink...

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

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

Change subject: new file:   RelatedLinks.alias.php  new file:   
RelatedLinks.hooks.php  new file:   RelatedLinks.phpnew file:   
SpecialRelatedLinks.php new file:   extension.json  new file:   
i18n/en.jsonnew file:   i18n/ko.jsonnew file:   
modules/ext.related_lin
..

new file:   RelatedLinks.alias.php
new file:   RelatedLinks.hooks.php
new file:   RelatedLinks.php
new file:   SpecialRelatedLinks.php
new file:   extension.json
new file:   i18n/en.json
new file:   i18n/ko.json
new file:   modules/ext.related_links.css
new file:   modules/ext.related_links.js

Change-Id: Id3af28df4bf69efeb4253e480e811bae1e51bd9f
---
A RelatedLinks.alias.php
A RelatedLinks.hooks.php
A RelatedLinks.php
A SpecialRelatedLinks.php
A extension.json
A i18n/en.json
A i18n/ko.json
A modules/ext.related_links.css
A modules/ext.related_links.js
9 files changed, 470 insertions(+), 0 deletions(-)


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

diff --git a/RelatedLinks.alias.php b/RelatedLinks.alias.php
new file mode 100644
index 000..3dc8a76
--- /dev/null
+++ b/RelatedLinks.alias.php
@@ -0,0 +1,19 @@
+ array('RelatedLinks', 
'Related Links'));
+
+/** korean
+ * @author SleepingLion
+ */
+$specialPageAliases['ko'] = array('RelatedLinks' => array('연관사이트', '연관 사이트'));
diff --git a/RelatedLinks.hooks.php b/RelatedLinks.hooks.php
new file mode 100644
index 000..e9df922
--- /dev/null
+++ b/RelatedLinks.hooks.php
@@ -0,0 +1,83 @@
+tableName( 'related_links' ) 
. " ( " .
+   "   `id` INT(11) NOT NULL AUTO_INCREMENT, " .
+   "   `user_id` INT(11) NOT NULL DEFAULT 0, " .
+   "   `links_id` VARCHAR(50) NOT NULL DEFAULT '', " .
+   "   `links_order` TINYINT(3) NOT NULL DEFAULT 0, " .
+   "   `links_subject` VARCHAR(60) NOT NULL DEFAULT '', " .
+   "   `links_url` VARCHAR(255) NOT NULL DEFAULT '', " .
+   "   `links_enable` ENUM( 'true', 'false' ) NOT NULL DEFAULT 
'true', " .
+   "   `links_datetime` DATETIME NOT NULL DEFAULT '-00-00 
00:00:00', " .
+   "   `links_import_domain` VARCHAR(50) NOT NULL DEFAULT '', 
" .
+   "   PRIMARY KEY (`id`), " .
+   "   UNIQUE KEY (`user_id`, `links_id`, `links_url`), " .
+   "   KEY index_sort (`links_id`, `links_order`), " .
+   "   KEY index_enable (`user_id`, `links_enable`) " .
+   ")";
+   return $dbw->query( $query );
+} 
+  
+class RelatedLinksHooks
+{
+/*
+ * Draw Related Links Management
+ */
+   public static function SkinTemplateToolboxEnd($this) {
+   $dbr = wfGetDB( DB_SLAVE );
+   
+   if ($dbr->tableExists( 'related_links' )) {
+   $tbl_links = $dbr->tableName( 'related_links' );
+   } else {
+   $result = initiateSettingsForRelatedLinks();
+   
+   if (!$result ) {
+   die( 'Failed to create table Related Links' );
+   }
+   $tbl_links = $dbr->tableName( 'related_links' );
+   }
+   
+   $links_id = filter_var($_GET['title'],FILTER_SANITIZE_STRING);
+   
+   $fields = array( 'links_subject', 'links_url' );
+   $conds  = array('user_id'=> '','links_enable'   => 
'true','links_id'=> $links_id);
+   $opts   = array( 'ORDER BY' => 'links_order' );
+   $result = $dbr->select( $tbl_links, $fields, $conds, 
'Database::select', $opts );
+   $rows   = $dbr->numRows( $result );
+?>
+
+
+
+
+
+
+[]
+
+
+
+fetchObject( $result ) ) { ?>
+links_subject?>
+
+
+
+
+https://www.mediawiki.org/wiki/Extension:RelatedLinks
+ *  https://github.com/sleepinglion
+ *   http://www.sleepinglion.pe.kr
+ *  
+ *
+ * License:  MIT
+ *
+ ***
+ */
+
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'RelatedLinks' );
+   
+   /*
+   # Tell MediaWiki about the new special page and its class name
+   /* wfWarn(
+'Deprecated PHP entry point used for WikiEditor extension. Please use 
wfLoadExtension instead, ' .
+'see https://www.mediawiki.org/wiki/Extension_registration for more 
details.'
+);*/
+   
+   return true;
+} else {
+   //die( 'This version of the Nuke extension requires MediaWiki 1.25+' );
+   
+   $wgExtensionCredits['specialpage'][] = array(

[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[wmf_deploy]: Remove use of deprecated "json" module

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

Change subject: Remove use of deprecated "json" module
..


Remove use of deprecated "json" module

(cherry picked from commit 35532557268a9eeb013b9066de46fba78f8a43ed)

Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
---
M extension.json
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/extension.json b/extension.json
index 553a463..b69c585 100644
--- a/extension.json
+++ b/extension.json
@@ -116,8 +116,7 @@
"ext.centralNotice.adminUi": {
"dependencies": [
"jquery.ui.datepicker",
-   "jquery.ui.multiselect",
-   "json"
+   "jquery.ui.multiselect"
],
"scripts": "infrastructure/centralnotice.js",
"styles": [
@@ -263,7 +262,6 @@
"ext.centralNotice.geoIP",
"ext.centralNotice.kvStore",
"jquery.cookie",
-   "json",
"mediawiki.Uri"
],
"targets": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Citoid[wmf/1.29.0-wmf.4]: Remove use of deprecated "json" module

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

Change subject: Remove use of deprecated "json" module
..


Remove use of deprecated "json" module

Depends-On: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb
Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 1a01d7b..314cc47 100644
--- a/extension.json
+++ b/extension.json
@@ -38,7 +38,6 @@
],
"dependencies": [
"ext.cite.visualEditor",
-   "json",
"ext.visualEditor.mediawiki",
"mediawiki.api.options",
"ext.citoid.visualEditor.data"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Citoid
Gerrit-Branch: wmf/1.29.0-wmf.4
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
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] labs/striker[master]: Check request ip for account creation blocks on Wikitech

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

Change subject: Check request ip for account creation blocks on Wikitech
..


Check request ip for account creation blocks on Wikitech

Add a check for nocreate blocks tied to the remote ip on all account
creation steps.

Bug: T147024
Change-Id: I2a04b4d201d3e68f70f9f9dd88ab251fcb504ef4
---
M striker/mediawiki.py
M striker/register/utils.py
M striker/register/views.py
3 files changed, 59 insertions(+), 5 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/striker/mediawiki.py b/striker/mediawiki.py
index 2cd3992..a306ad9 100644
--- a/striker/mediawiki.py
+++ b/striker/mediawiki.py
@@ -82,7 +82,15 @@
 result = self.site.api(
 'query', formatversion=2,
 meta='allmessages',
-ammessages=message, amargs='|'.join(params), amlang=lang,
+ammessages=message, amargs='|'.join(params), amlang=lang
 )
 # TODO: error handling
 return result['query']['allmessages'][0]['content']
+
+def query_blocks_ip(self, ip):
+result = self.site.api(
+'query', formatversion=2,
+list='blocks',
+bkip=ip
+)
+return result['query']['blocks']
diff --git a/striker/register/utils.py b/striker/register/utils.py
index 3f2b21c..4c3aa27 100644
--- a/striker/register/utils.py
+++ b/striker/register/utils.py
@@ -94,3 +94,15 @@
 logger.exception('Failed to get expanded message for %s', user)
 ret['error'] = user['cancreateerror'][0]['message']
 return ret
+
+
+def check_ip_blocked_from_create(ip):
+"""Check to see if an ip address is banned from creating accounts.
+
+Returns a block reason or False if not blocked.
+"""
+res = mwapi.query_blocks_ip(ip)
+for block in res:
+if block['nocreate']:
+return block['reason']
+return False
diff --git a/striker/register/views.py b/striker/register/views.py
index 09a930b..41f662d 100644
--- a/striker/register/views.py
+++ b/striker/register/views.py
@@ -44,6 +44,7 @@
 
 
 def oauth_required(f):
+"""Decorator to ensure that OAuth data is present in session."""
 @functools.wraps(f)
 def decorated(*args, **kwargs):
 req = args[0]
@@ -56,15 +57,46 @@
 return decorated
 
 
+def anon_required(f):
+"""Decorator to ensure that user is not logged in."""
+@functools.wraps(f)
+def decorated(*args, **kwargs):
+req = args[0]
+if not req.user.is_anonymous():
+messages.error(
+req, _('Logged in users can not create new accounts.'))
+return shortcuts.redirect(urlresolvers.reverse('index'))
+return f(*args, **kwargs)
+return decorated
+
+
+def check_ip(f):
+"""Decorator to ensure that remote ip is not blocked."""
+@functools.wraps(f)
+def decorated(*args, **kwargs):
+req = args[0]
+block = utils.check_ip_blocked_from_create(req.META['REMOTE_ADDR'])
+if block is not False:
+messages.error(
+req,
+_(
+'Your IP address has been blocked from creating accounts. '
+'The reason given was: "%(reason)s"'
+) % {'reason': block})
+return shortcuts.redirect(urlresolvers.reverse('index'))
+return f(*args, **kwargs)
+return decorated
+
+
+@anon_required
+@check_ip
 def index(req):
 ctx = {}
-if not req.user.is_anonymous():
-messages.error(
-req, _('Logged in users can not create new accounts.'))
-return shortcuts.redirect(urlresolvers.reverse('index'))
 return shortcuts.render(req, 'register/index.html', ctx)
 
 
+@anon_required
+@check_ip
 @oauth_required
 def oauth(req):
 oauth = oauth_from_session(req.session)
@@ -120,6 +152,8 @@
 ('confirm', forms.Confirm),
 ]
 
+@method_decorator(anon_required)
+@method_decorator(check_ip)
 @method_decorator(oauth_required)
 def dispatch(self, *args, **kwargs):
 return super(AccountWizard, self).dispatch(*args, **kwargs)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a04b4d201d3e68f70f9f9dd88ab251fcb504ef4
Gerrit-PatchSet: 4
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] labs/striker[master]: Validate new usernames with action=query=users=c...

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

Change subject: Validate new usernames with 
action=query=users=cancreate
..


Validate new usernames with action=query=users=cancreate

Call the Action API on Wikitech to validate that a desired username is
not blacklisted via Titleblacklist or other means. This is much easier
than recreating all of the blacklisting logic in Striker itself and
trying to somehow keep it in sync with the Wikitech and Wikimedia global
rules.

This patch introduces a new dependency on the mwclient python library
which is used to talk to the Action API. Full production deployment will
require an associated update to the labs/striker/wheels.git repository.

Bug: T147024
Change-Id: Id79568880efe84bbd12c9cc130cdc5fc9c20541d
---
M requirements.txt
A striker/mediawiki.py
M striker/register/forms.py
M striker/register/utils.py
M striker/register/views.py
5 files changed, 157 insertions(+), 8 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/requirements.txt b/requirements.txt
index c17b1f4..e786a18 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,6 +11,7 @@
 django-parsley>=0.6  # BSD
 django-ratelimit-backend>=1.0  # BSD
 idna>=2.1  # BSD
+mwclient>=0.8.1  # MIT
 mwoauth>=0.2.7  # MIT
 mysqlclient>=1.3.7  # GPLv2
 oauthlib>=1.1.2  # BSD
diff --git a/striker/mediawiki.py b/striker/mediawiki.py
new file mode 100644
index 000..2cd3992
--- /dev/null
+++ b/striker/mediawiki.py
@@ -0,0 +1,88 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2016 Wikimedia Foundation and contributors.
+# All Rights Reserved.
+#
+# This file is part of Striker.
+#
+# Striker 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.
+#
+# Striker 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 Striker.  If not, see .
+
+import logging
+import urllib.parse
+
+import mwclient
+
+from django.conf import settings
+
+
+logger = logging.getLogger(__name__)
+
+
+class Client(object):
+"""MediaWiki client"""
+_default_instance = None
+
+@classmethod
+def default_client(cls):
+"""Get a MediaWiki client using the default credentials."""
+if cls._default_instance is None:
+logger.debug('Creating default instance')
+cls._default_instance = cls(settings.WIKITECH_URL)
+return cls._default_instance
+
+def __init__(self, url):
+self.url = url
+self.site = self._site_for_url(url)
+self.site.force_login = False
+
+@classmethod
+def _site_for_url(cls, url):
+parts = urllib.parse.urlparse(url)
+host = parts.netloc
+if parts.scheme != 'https':
+host = (parts.scheme, parts.netloc)
+return mwclient.Site(host, clients_useragent='Striker')
+
+def query_users_cancreate(self, *users):
+"""Check to see if the given usernames could be created or not.
+
+Note: if this Client is authenticated to the target wiki, the result
+that you get from this request may or may not be the same result that
+an anonymous user would get.
+"""
+result = self.site.api(
+'query', formatversion=2,
+list='users',
+usprop='cancreate', ususers='|'.join(users),
+)
+
+logger.debug(result)
+# Example result:
+# {'query': {'users': [{'missing': True, 'name': 'Puppet',
+# 'cancreate': False, 'cancreateerror': [{'message':
+# 'titleblacklist-forbidden-new-account', 'params': ['
+# ^(User:)?puppet$ ', 'Puppet'], 'type': 'error'}]}],
+# 'userinfo': {'anon': True, 'messages': False, 'name':
+# '137.164.12.107', 'id': 0}}, 'batchcomplete': True}
+# TODO: error handling
+return result['query']['users']
+
+def get_message(self, message, *params, lang='en'):
+result = self.site.api(
+'query', formatversion=2,
+meta='allmessages',
+ammessages=message, amargs='|'.join(params), amlang=lang,
+)
+# TODO: error handling
+return result['query']['allmessages'][0]['content']
diff --git a/striker/register/forms.py b/striker/register/forms.py
index 7101366..8f62a9b 100644
--- a/striker/register/forms.py
+++ b/striker/register/forms.py
@@ -92,14 +92,20 @@
 def clean_username(self):
 """Validate that username is available."""
 # 

[MediaWiki-commits] [Gerrit] labs/striker[master]: Update client side validation for username and shellname

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

Change subject: Update client side validation for username and shellname
..


Update client side validation for username and shellname

* Add client side regex validation for shellname
* Check username for invalid characters in ajax callback. This makes the
  error message a little more vague, but it improves feedback generally
  so I think it's ok.

Change-Id: I312ae6ba3e33806778e1a95f0b7116262f274d22
---
M striker/register/forms.py
M striker/register/utils.py
M striker/register/views.py
3 files changed, 61 insertions(+), 27 deletions(-)

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



diff --git a/striker/register/forms.py b/striker/register/forms.py
index 8f62a9b..8781da9 100644
--- a/striker/register/forms.py
+++ b/striker/register/forms.py
@@ -35,7 +35,6 @@
 
 @parsleyfy
 class LDAPUsername(forms.Form):
-IN_USE = _('Username is already in use.')
 username = forms.CharField(
 label=_('Username'),
 widget=forms.TextInput(
@@ -51,7 +50,8 @@
 'data-parsley-remote': mark_safe(
 '/register/api/username/{value}'),
 'data-parsley-trigger': 'focusin focusout input',
-'data-parsley-remote-message': IN_USE,
+'data-parsley-remote-message':  _(
+'Username is already in use or invalid.'),
 }
 ),
 max_length=255,
@@ -68,19 +68,8 @@
 regex='\S$',
 message=_('Must not end with whitespace')
 ),
-# See MediaWikiTitleCodec::getTitleInvalidRegex()
 validators.RegexValidator(
-regex=(
-# Any char that is not in $wgLegalTitleChars
-r'[^'
-r''' %!"$&'()*,\-./0-9:;=?@A-Z\^_`a-z~'''
-'\x80-\xFF'
-r'+]'
-# URL percent encoding sequences
-r'|%[0-9A-Fa-f]{2}'
-# XML/HTML entities
-'|&([A-Za-z0-9\x80-\xff]+|#([0-9]+|x[0-9A-Fa-f]+));'
-),
+regex=utils.get_username_invalid_regex(),
 inverse_match=True,
 message=_(
 'Value contains illegal characters or character sequences.'
@@ -97,7 +86,7 @@
 username = self.cleaned_data['username'].strip()
 username = username[0].upper() + username[1:]
 if not utils.username_available(username):
-raise forms.ValidationError(self.IN_USE)
+raise forms.ValidationError(_('Username is already in use.'))
 
 # Check that it isn't banned by some abusefilter type rule
 user = utils.check_username_create(username)
@@ -110,7 +99,14 @@
 
 @parsleyfy
 class ShellUsername(forms.Form):
-IN_USE = _('Shell username is already in use.')
+# Unix username regex suggested by useradd(8).
+# We don't allow a leading '_' or trailing '$' however.
+RE_NAME = r'^[a-z][a-z0-9_-]{0,31}$'
+NAME_ERR_MSG = _(
+'Must start with a-z, and can only contain '
+'lowercase a-z, 0-9, _, and - characters.'
+)
+
 shellname = forms.CharField(
 label=_('Shell username'),
 widget=forms.TextInput(
@@ -126,19 +122,15 @@
 'data-parsley-remote': mark_safe(
 '/register/api/shellname/{value}'),
 'data-parsley-trigger': 'focusin focusout input',
-'data-parsley-remote-message': IN_USE,
+'data-parsley-remote-message': _(
+'Shell username is already in use or invalid.'),
+'data-parsley-pattern': RE_NAME,
+'data-parsley-pattern-message': NAME_ERR_MSG,
 }
 ),
 max_length=32,
 validators=[
-validators.RegexValidator(
-# Unix username regex suggested by useradd(8).
-# We don't allow a leading '_' or trailing '$' however.
-regex=r'^[a-z][a-z0-9_-]{0,31}$',
-message=_(
-'Must start with a-z, and can only contain '
-'lowercase a-z, 0-9, _, and - characters.')
-)
+validators.RegexValidator(regex=RE_NAME, message=NAME_ERR_MSG),
 ]
 )
 
@@ -146,7 +138,7 @@
 """Validate that shellname is available."""
 shellname = self.cleaned_data['shellname']
 if not utils.shellname_available(shellname):
-raise forms.ValidationError(self.IN_USE)
+raise forms.ValidationError(_('Shell username is already in use.'))
 
 # Check that it isn't banned by some abusefilter type rule
 user = utils.check_username_create(shellname)
diff --git a/striker/register/utils.py b/striker/register/utils.py
index 4c3aa27..cd411e2 100644
--- 

[MediaWiki-commits] [Gerrit] analytics/reportupdater[master]: Don't record empty metrics

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

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

Change subject: Don't record empty metrics
..

Don't record empty metrics

Change-Id: I4da6e47ec90d87e04fd8e55a7ad9942a1ba8f1d7
---
M reportupdater/graphite.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/reportupdater 
refs/changes/35/324635/1

diff --git a/reportupdater/graphite.py b/reportupdater/graphite.py
index 84da9e8..2ba648a 100644
--- a/reportupdater/graphite.py
+++ b/reportupdater/graphite.py
@@ -60,7 +60,8 @@
 
 for metric in report.graphite['metrics']:
 (metric, value, timestamp) = self.get_graphite_data(report, row, 
metric)
-self.record(metric, value, timestamp)
+if value is not None:
+self.record(metric, value, timestamp)
 
 def get_graphite_data(self, report, row, metric):
 header = report.results['header']

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4da6e47ec90d87e04fd8e55a7ad9942a1ba8f1d7
Gerrit-PatchSet: 1
Gerrit-Project: analytics/reportupdater
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Factor out active node functionality from SectionNode for ca...

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

Change subject: Factor out active node functionality from SectionNode for 
captions
..


Factor out active node functionality from SectionNode for captions

Create a mixin we can use on other nodes that may have
active sections inside a ce=false.

Bug: T149753
Change-Id: I6ae92307a7260b4a7e092bdfe8104040df538363
---
M build/modules.json
M demos/ve/desktop.html
M demos/ve/mobile.html
A src/ce/nodes/ve.ce.ActiveNode.js
M src/ce/nodes/ve.ce.BlockImageCaptionNode.js
M src/ce/nodes/ve.ce.BlockImageNode.js
M src/ce/nodes/ve.ce.SectionNode.js
A src/ce/styles/nodes/ve.ce.ActiveNode.css
M src/ce/styles/nodes/ve.ce.SectionNode.css
M src/ce/ve.ce.FocusableNode.js
M src/ce/ve.ce.Surface.js
M src/dm/lineardata/ve.dm.ElementLinearData.js
M tests/dm/lineardata/ve.dm.ElementLinearData.test.js
M tests/dm/ve.dm.example.js
M tests/index.html
15 files changed, 139 insertions(+), 69 deletions(-)

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



diff --git a/build/modules.json b/build/modules.json
index b44c6e5..6a792c9 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -381,6 +381,7 @@

"src/ce/keydownhandlers/ve.ce.TableEnterKeyDownHandler.js",

"src/ce/keydownhandlers/ve.ce.LinearTabKeyDownHandler.js",
"src/ce/nodes/ve.ce.GeneratedContentNode.js",
+   "src/ce/nodes/ve.ce.ActiveNode.js",
"src/ce/nodes/ve.ce.AlienNode.js",
"src/ce/nodes/ve.ce.ArticleNode.js",
"src/ce/nodes/ve.ce.BlockquoteNode.js",
@@ -541,6 +542,7 @@
],
"styles": [
"src/ce/styles/nodes/ve.ce.FocusableNode.css",
+   "src/ce/styles/nodes/ve.ce.ActiveNode.css",
"src/ce/styles/nodes/ve.ce.AlienNode.css",
"src/ce/styles/nodes/ve.ce.BranchNode.css",
"src/ce/styles/nodes/ve.ce.ContentBranchNode.css",
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index 65a0865..b41430d 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -29,6 +29,7 @@
 


+   



@@ -328,6 +329,7 @@



+   



diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html
index 3b53217..662d0b6 100644
--- a/demos/ve/mobile.html
+++ b/demos/ve/mobile.html
@@ -29,6 +29,7 @@
 


+   



@@ -326,6 +327,7 @@



+   



diff --git a/src/ce/nodes/ve.ce.ActiveNode.js b/src/ce/nodes/ve.ce.ActiveNode.js
new file mode 100644
index 000..ebc4ca1
--- /dev/null
+++ b/src/ce/nodes/ve.ce.ActiveNode.js
@@ -0,0 +1,91 @@
+/*!
+ * VisualEditor ContentEditable ActiveNode class.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see 
http://ve.mit-license.org
+ */
+
+/**
+ * Active nodes are editable sections that are nested inside
+ * uneditable sections.
+ *
+ * @class
+ * @abstract
+ *
+ * @constructor
+ */
+ve.ce.ActiveNode = function VeCeActiveNode() {
+   // Properties
+   this.activeNodeSurface = null;
+   this.isActiveNodeSetup = false;
+
+   // Events
+   this.connect( this, {
+   setup: 'onActiveNodeSetup',
+   teardown: 'onActiveNodeTeardown'
+   } );
+
+   // DOM changes
+   this.$element
+   .addClass( 've-ce-activeNode' )
+   .prop( { contentEditable: 'true', spellcheck: true } );
+};
+
+/* Inheritance */
+
+OO.initClass( ve.ce.ActiveNode );
+
+/* Methods */
+
+/**
+ * Handle node setup
+ */
+ve.ce.ActiveNode.prototype.onActiveNodeSetup = function () {
+   // Exit if already setup or not attached
+   if ( this.isActiveNodeSetup || !this.root ) {
+   return;
+   }
+
+   this.activeNodeSurface = this.getRoot().getSurface();
+
+   // Events
+   this.activeNodeSurface.getModel().connect( this, { select: 
'onActiveNodeSurfaceModelSelect' } );
+
+   this.isActiveNodeSetup = true;
+};
+
+/**
+ * Handle node teardown
+ */
+ve.ce.ActiveNode.prototype.onActiveNodeTeardown = function () {
+   // Events
+   this.activeNodeSurface.getModel().disconnect( this );
+
+   this.isActiveNodeSetup = false;
+};
+
+/**
+ * Handle select events from the surface model.
+ *
+ * @param {ve.dm.Selection} selection Selection
+ */
+ve.ce.ActiveNode.prototype.onActiveNodeSurfaceModelSelect = function ( 
selection ) {
+   var coveringRange = 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix SessionConsistentConnectionManagerTest class and file name

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

Change subject: Fix SessionConsistentConnectionManagerTest class and file name
..


Fix SessionConsistentConnectionManagerTest class and file name

Change-Id: If60f081946b8f3bb564f2bb17fd1261af0cb7e3a
---
R 
tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git 
a/tests/phpunit/includes/libs/rdbms/connectionmanager/ConsistentReadConnectionManagerTest.php
 
b/tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
similarity index 97%
rename from 
tests/phpunit/includes/libs/rdbms/connectionmanager/ConsistentReadConnectionManagerTest.php
rename to 
tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
index 5ac97b2..4dcab82 100644
--- 
a/tests/phpunit/includes/libs/rdbms/connectionmanager/ConsistentReadConnectionManagerTest.php
+++ 
b/tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
@@ -13,7 +13,7 @@
  * @license GPL-2.0+
  * @author Daniel Kinzler
  */
-class ConsistentReadConnectionManagerTest extends \PHPUnit_Framework_TestCase {
+class SessionConsistentConnectionManagerTest extends 
\PHPUnit_Framework_TestCase {
 
/**
 * @return IDatabase|PHPUnit_Framework_MockObject_MockObject

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If60f081946b8f3bb564f2bb17fd1261af0cb7e3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Daniel Kinzler 
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]: ExtensionRegistryTest: Illustrate priority in array_replace_...

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

Change subject: ExtensionRegistryTest: Illustrate priority in 
array_replace_recursive test case
..


ExtensionRegistryTest: Illustrate priority in array_replace_recursive test case

When two keys have conflicting values, the value from extension.json wins
when using this merge strategy.

Change-Id: I0222682f3b3fb08f80afc7dda677da7bbfe8e5d1
---
M tests/phpunit/includes/registration/ExtensionRegistryTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/phpunit/includes/registration/ExtensionRegistryTest.php 
b/tests/phpunit/includes/registration/ExtensionRegistryTest.php
index 1de4265..9b57e1c 100644
--- a/tests/phpunit/includes/registration/ExtensionRegistryTest.php
+++ b/tests/phpunit/includes/registration/ExtensionRegistryTest.php
@@ -259,7 +259,7 @@
'JsonZeroConfig' => [
'namespace' => 480,
'nsName' => 'Zero',
-   'isLocal' => false,
+   'isLocal' => true,
],
],
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0222682f3b3fb08f80afc7dda677da7bbfe8e5d1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add fake user agent test case

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

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

Change subject: Add fake user agent test case
..

Add fake user agent test case

This test case will check if fake UA generation can be toggled on/off with the 
config file, and if the method generates a random UA every time.

Bug: T124005
Change-Id: Id9b6ff2d62917f84cfabb4af115cc7a887e42762
---
M tests/http_tests.py
1 file changed, 46 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/33/324633/1

diff --git a/tests/http_tests.py b/tests/http_tests.py
index 35d705f..5fc9a33 100644
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -11,6 +11,7 @@
 
 import re
 import warnings
+import pkgutil
 
 import requests
 
@@ -285,6 +286,51 @@
 self.assertIn('Python/' + str(PYTHON_VERSION[0]), http.user_agent())
 
 
+class FakeUserAgentTestCase(TestCase):
+
+"""Test the generation of fake user agents.
+
+If the method cannot import either broseragents or fake_useragent, the
+default user agent will be returned, causing tests to fail. Therefore tests
+will skip if neither is present.
+"""
+
+net = False
+
+def setUp(self):
+"""Set up unit test."""
+self.orig_fake_user_agent = config.fake_user_agent
+
+def tearDown(self):
+"""Tear down unit test."""
+config.fake_user_agent = self.orig_fake_user_agent
+
+@unittest.skipUnless(pkgutil.find_loader(
+'browseragents') or pkgutil.find_loader('fake_useragent'),
+'Fake UA modules not present.')
+def test_fake_user_agent_config(self):
+"Test if method honours configuration toggle."
+# ON: True and None in config are considered turned on.
+config.fake_user_agent = True
+self.assertNotEqual(http.get_fake_user_agent(), http.user_agent())
+config.fake_user_agent = None
+self.assertNotEqual(http.get_fake_user_agent(), http.user_agent())
+
+# OFF: All other values won't make it return random UA.
+config.fake_user_agent = False
+self.assertEqual(http.get_fake_user_agent(), http.user_agent())
+config.fake_user_agent = 'ArbitraryValue'
+self.assertEqual(http.get_fake_user_agent(), 'ArbitraryValue')
+
+@unittest.skipUnless(pkgutil.find_loader(
+'browseragents') or pkgutil.find_loader('fake_useragent'),
+'Fake UA modules not present.')
+def test_fake_user_agent_randomness(self):
+"""Test if user agent returns are randomized."""
+config.fake_user_agent = True
+self.assertNotEqual(http.get_fake_user_agent(), 
http.get_fake_user_agent())
+
+
 class CharsetTestCase(TestCase):
 
 """Test that HttpRequest correct handles the charsets given."""

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9b6ff2d62917f84cfabb4af115cc7a887e42762
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dargasia 

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


[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Rudiments of arbitrary campaigns

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

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

Change subject: Rudiments of arbitrary campaigns
..

Rudiments of arbitrary campaigns

Only visible improvement is that it shows that this year's is 33
days. But it'll be a small step to add the year selector back and
get the campaign start days aligned.

FIXME: will blow up for campaigns that include New Years' Day. Also
the final day special case thing is still as wrong as parent commit.

Bug: T151820
Change-Id: Iaae238b2e29b80da47e54f2c206ca09baa3f53f8
---
A src/app/campaign.js
M src/app/require.config.js
M src/components/widgets/totals-earned-chart/totals-earned-chart.js
M widgets/big-english.js
4 files changed, 60 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/34/324634/1

diff --git a/src/app/campaign.js b/src/app/campaign.js
new file mode 100644
index 000..629d0a1
--- /dev/null
+++ b/src/app/campaign.js
@@ -0,0 +1,45 @@
+define([
+   'momentjs'
+], function( moment ){
+
+   function msToDays( ms ) {
+   return Math.round( ms / ( 24 * 60 * 60 * 1000 ) );
+   }
+
+   function Campaign( params ){
+   var currentYear = new Date().getFullYear();
+
+   this.startDate = params.startDate ||
+   new Date( currentYear, 11, 1 );
+   this.endDate = params.endDate ||
+   new Date( currentYear + 1, 0, 1 );
+   }
+
+   Campaign.prototype.getDayOfYearOffset = function () {
+   var diff = startOfYear = new Date( this.startDate );
+
+   startOfYear.setMonth(0);
+   startOfYear.setDate(1);
+   diff = this.startDate.getTime() - startOfYear.getTime();
+
+   // Not a fencepost error - this should be 0 for Jan 1
+   return msToDays( diff );
+   }
+
+   Campaign.prototype.getDateFilter = function () {
+   var filter = '(DT gt \'' +
+   this.startDate.toISOString();
+   filter += '\') and (DT lt \'' +
+   this.endDate.toISOString() + '\')';
+
+   return filter;
+   }
+
+   Campaign.prototype.getLengthInDays = function () {
+   var diff = this.endDate.getTime() - this.startDate.getTime();
+
+   return msToDays( diff );
+   }
+
+   return Campaign;
+});
diff --git a/src/app/require.config.js b/src/app/require.config.js
index ea6a69d..bef3c2e 100644
--- a/src/app/require.config.js
+++ b/src/app/require.config.js
@@ -26,6 +26,7 @@
'numeraljs':'bower_modules/numeraljs/numeral',
'decemberData': 'bower_modules/fakeData/decemberData',
'WidgetBase':   'app/widgetBase',
+   'Campaign': 'app/campaign',
'operators':'components/filters/operators'
},
shim: {
diff --git a/src/components/widgets/totals-earned-chart/totals-earned-chart.js 
b/src/components/widgets/totals-earned-chart/totals-earned-chart.js
index ca05059..f0f6a08 100644
--- a/src/components/widgets/totals-earned-chart/totals-earned-chart.js
+++ b/src/components/widgets/totals-earned-chart/totals-earned-chart.js
@@ -4,14 +4,21 @@
'c3',
'numeraljs',
'momentjs',
+   'Campaign',
'WidgetBase'
-], function( ko, template, c3, numeral, moment, WidgetBase ){
+], function( ko, template, c3, numeral, moment, Campaign, WidgetBase ){
 
 
function TotalsEarnedChartViewModel( params ){
 
var self = this,
-   timeFormat = ',  Do , h:mm:ss a';
+   timeFormat = ',  Do , h:mm:ss a',
+   campaign = new Campaign({
+   startDate: new Date( 2016, 10, 29 ),
+   endDate: new Date( 2017, 0, 1 )
+   }),
+   days = campaign.getLengthInDays(),
+   offset = campaign.getDayOfYearOffset();
 
WidgetBase.call( this, params );
 
@@ -84,7 +91,7 @@
currentDate.setTime( timestamp );
self.displayDate( moment( currentDate ).format( 
timeFormat ) );
 
-   for (var d = 1; d < 32; d++) {
+   for (var d = 1; d < days + 1; d++) {
params.sharedContext.dailyDataArray[d] = 0;
params.sharedContext.dailyCountArray[d] = 0;
if (!params.sharedContext.dayObj[d]) {
@@ -101,7 +108,7 @@
for (var i = 0; i < dataCount; i++ ) {
 
var el = data[i],
-   day = el.day,
+   day 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fix "Add new image" button in the gallery dialog

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

Change subject: Fix "Add new image" button in the gallery dialog
..


Fix "Add new image" button in the gallery dialog

Make sure the button is always visible in the
gallery dialog menu by fixing it to the bottom.

Bug: T151506
Change-Id: I560b0dffbaad9e18c6f7f703cb155356470580ee
---
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
M modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css
2 files changed, 38 insertions(+), 9 deletions(-)

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index 63726c3..5267966 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -42,7 +42,8 @@
  * @inheritdoc
  */
 ve.ui.MWGalleryDialog.prototype.initialize = function () {
-   var imagesCard, optionsCard, menuLayout, menuPanel,
+   var imagesCard, optionsCard, menuLayout,
+   innerMenuLayout, innerMenuPanel, innerContentPanel,
modeField, captionField, widthsField, heightsField,
perrowField, showFilenameField, classesField, stylesField;
 
@@ -79,11 +80,21 @@
// Images card
 
// General layout
-   menuLayout = new OO.ui.MenuLayout();
-   menuPanel = new OO.ui.PanelLayout( {
+   menuLayout = new OO.ui.MenuLayout( {
+   classes: [ 've-ui-mwGalleryDialog-menuLayout' ]
+   } );
+   innerMenuLayout = new OO.ui.MenuLayout( {
+   menuPosition: 'bottom',
+   classes: [ 've-ui-mwGalleryDialog-innerMenuLayout' ]
+   } );
+   innerMenuPanel = new OO.ui.PanelLayout( {
padded: true,
expanded: true,
scrollable: true
+   } );
+   innerContentPanel = new OO.ui.PanelLayout( {
+   padded: true,
+   expanded: true
} );
this.editPanel = new OO.ui.PanelLayout( {
padded: true,
@@ -216,13 +227,20 @@
} );
 
// Append everything
-   menuLayout.$menu.append(
-   menuPanel.$element.append(
-   this.$emptyGalleryMessage,
-   this.galleryGroup.$element,
+   innerMenuLayout.$menu.append(
+   innerContentPanel.$element.append(
this.showSearchPanelButton.$element
)
);
+   innerMenuLayout.$content.append(
+   innerMenuPanel.$element.append(
+   this.$emptyGalleryMessage,
+   this.galleryGroup.$element
+   )
+   );
+   menuLayout.$menu.append(
+   innerMenuLayout.$element
+   );
menuLayout.$content.append(
this.editPanel.$element.append(
this.$highlightedImage,
diff --git a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css 
b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css
index 774220b..99e5d26 100644
--- a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css
+++ b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css
@@ -41,13 +41,24 @@
margin-top: 0.5em;
 }
 
-.ve-ui-mwGalleryDialog .oo-ui-menuLayout-menu {
+.ve-ui-mwGalleryDialog-menuLayout > .oo-ui-menuLayout-menu {
width: 14em;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
 }
 
-.ve-ui-mwGalleryDialog .oo-ui-menuLayout-content {
+.ve-ui-mwGalleryDialog-menuLayout > .oo-ui-menuLayout-content {
left: 14em;
right: 14em;
 }
+
+.ve-ui-mwGalleryDialog-innerMenuLayout > .oo-ui-menuLayout-content {
+   bottom: 5em;
+}
+
+.ve-ui-mwGalleryDialog-innerMenuLayout > .oo-ui-menuLayout-menu {
+   height: 5em;
+   border-top: 1px solid #e6e6e6;
+   box-shadow: 0 -1px 0 0 rgba( 0, 0, 0, 0.05 ); /* stylelint-disable-line 
no-unsupported-browser-features */
+   text-align: center;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I560b0dffbaad9e18c6f7f703cb155356470580ee
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Tchanders 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Tchanders 
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]: ExtensionRegistry: add array_plus_recursive merge strategy

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

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

Change subject: ExtensionRegistry: add array_plus_recursive merge strategy
..

ExtensionRegistry: add array_plus_recursive merge strategy

This is needed for deeply nested structures that get overridden in 
LocalSettings.php.
For example, the MW-Vagrant settings.d file for Echo uses:
$wgEchoConfig['eventlogging']['EchoMail']['enabled'] = true;
and the default value of $wgEchoConfig is a nested associative array structure
where 'enabled' has other siblings:
$wgEchoConfig = array(
...
'eventlogging' => array(
...
'EchoMail' => array(
'enabled' => false,
'revision' => 12345,
'client' => false
)
)
)

In this case, the default merge strategy wipes out most of the
config var. array_replace_recursive is the only one that leaves
the structure intact, but in that strategy conflicts are resolved
in favor of the extension.json value, which means overrides
aren't possible. The array_plus_recursive strategy just
calls array_replace_recursive with the arguments reversed, so that
conflicts are resolved in favor of the pre-existing global value.

Change-Id: I03f634ad8c9e568e707baa4a5017aa0d317c2799
---
M docs/extension.schema.json
M docs/extension.schema.v1.json
M includes/registration/ExtensionRegistry.php
M tests/phpunit/includes/registration/ExtensionRegistryTest.php
4 files changed, 46 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/324632/1

diff --git a/docs/extension.schema.json b/docs/extension.schema.json
index 30feaef..f3ca1bd 100644
--- a/docs/extension.schema.json
+++ b/docs/extension.schema.json
@@ -684,6 +684,7 @@
"enum": [

"array_merge_recursive",

"array_replace_recursive",
+   
"array_plus_recursive",
"array_plus_2d",
"array_plus",
"array_merge"
diff --git a/docs/extension.schema.v1.json b/docs/extension.schema.v1.json
index 421ea5c..edb95c9 100644
--- a/docs/extension.schema.v1.json
+++ b/docs/extension.schema.v1.json
@@ -672,6 +672,7 @@
"enum": [

"array_merge_recursive",

"array_replace_recursive",
+   
"array_plus_recursive",
"array_plus_2d",
"array_plus",
"array_merge"
diff --git a/includes/registration/ExtensionRegistry.php 
b/includes/registration/ExtensionRegistry.php
index b5c70e9..56a72dc 100644
--- a/includes/registration/ExtensionRegistry.php
+++ b/includes/registration/ExtensionRegistry.php
@@ -265,6 +265,11 @@
case 'array_replace_recursive':
$GLOBALS[$key] = 
array_replace_recursive( $GLOBALS[$key], $val );
break;
+   case 'array_plus_recursive':
+   // Implemented by calling 
array_replace_recursive() in reverse,
+   // because that's equivalent
+   $GLOBALS[$key] = 
array_replace_recursive( $val, $GLOBALS[$key] );
+   break;
case 'array_plus_2d':
$GLOBALS[$key] = wfArrayPlus2d( 
$GLOBALS[$key], $val );
break;
diff --git a/tests/phpunit/includes/registration/ExtensionRegistryTest.php 
b/tests/phpunit/includes/registration/ExtensionRegistryTest.php
index 9b57e1c..22c7b2d 100644
--- a/tests/phpunit/includes/registration/ExtensionRegistryTest.php
+++ b/tests/phpunit/includes/registration/ExtensionRegistryTest.php
@@ -287,6 +287,45 @@
],
],
],
+   [
+   'test array_plus_recursive',
+   [
+   

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: i18n: Kill last two uses of 'parameter' in lieu of 'field'

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

Change subject: i18n: Kill last two uses of 'parameter' in lieu of 'field'
..


i18n: Kill last two uses of 'parameter' in lieu of 'field'

Change-Id: I94fa70b17a210391b0444aca22c577b2e5e549e3
---
M modules/ve-mw/i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index c2204f5..14b9701 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -207,8 +207,8 @@
"visualeditor-dialog-transclusion-required-parameter-description": 
"Field is required.",
"visualeditor-dialog-transclusion-required-parameter-dialog-cancel": 
"Go back",
"visualeditor-dialog-transclusion-required-parameter-dialog-ok": 
"Continue anyway",
-   "visualeditor-dialog-transclusion-required-parameter-dialog-title": 
"Required {{PLURAL:$1|parameter|parameters}} missing",
-   "visualeditor-dialog-transclusion-required-parameter-is-blank": "Are 
you sure you want to continue without filling the $1 
{{PLURAL:$2|parameter|parameters}}?",
+   "visualeditor-dialog-transclusion-required-parameter-dialog-title": 
"Required {{PLURAL:$1|field|fields}} missing",
+   "visualeditor-dialog-transclusion-required-parameter-is-blank": "Are 
you sure you want to continue without filling the $1 
{{PLURAL:$2|field|fields}}?",
"visualeditor-dialog-transclusion-single-mode": "Hide options",
"visualeditor-dialog-transclusion-title": "Transclusion",
"visualeditor-dialogbutton-media-tooltip": "Media",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94fa70b17a210391b0444aca22c577b2e5e549e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Siebrand 
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...Newsletter[master]: Fix wrong Return-To URL

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

Change subject: Fix wrong Return-To URL
..


Fix wrong Return-To URL

Fix wrong Return-To URL in Special:Newsletter/xx/unsubscribe

Bug: T150097
Change-Id: I418d8c45cbd28e5f40853dec25c56c6479275310
---
M includes/specials/SpecialNewsletter.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index 39b670d..a82df8a 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -426,7 +426,7 @@
$form->addHeaderText( $txt );
$form->suppressDefaultSubmit();
$form->show();
-   $this->getOutput()->addReturnTo( $this->getPageTitle( 
$this->newsletter->getId() ) );
+   $this->getOutput()->addReturnTo( Title::makeTitleSafe( 
NS_NEWSLETTER, $this->newsletter->getName() ) );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I418d8c45cbd28e5f40853dec25c56c6479275310
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Phantom42 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Phantom42 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: DebugBar: Remove hard-coded i18n

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

Change subject: DebugBar: Remove hard-coded i18n
..


DebugBar: Remove hard-coded i18n

This is the only hard-coded i18n in /src, except for ''. /demos still
has some, but I think that can be ignored.

Change-Id: Iece456da292ded5a1483920d051c6a2848872d96
---
M i18n/en.json
M i18n/qqq.json
M src/ui/ve.ui.DebugBar.js
3 files changed, 22 insertions(+), 8 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 0e45b8a..a06f1cc 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -45,6 +45,13 @@
"visualeditor-content-select-all": "Select all",
"visualeditor-contextitemwidget-label-remove": "Delete",
"visualeditor-contextitemwidget-label-secondary": "Edit",
+   "visualeditor-debugbar-close": "Close",
+   "visualeditor-debugbar-inputdebug": "Input debugging",
+   "visualeditor-debugbar-logrange": "Log",
+   "visualeditor-debugbar-showmodel": "Show model",
+   "visualeditor-debugbar-startfilibuster": "Filibuster",
+   "visualeditor-debugbar-stopfilibuster": "Stop Filibuster",
+   "visualeditor-debugbar-updatemodel": "Update on changes",
"visualeditor-dialog-action-apply": "Apply changes",
"visualeditor-dialog-action-cancel": "Cancel",
"visualeditor-dialog-action-done": "Done",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 2ff56ed..996c67e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -53,6 +53,13 @@
"visualeditor-content-select-all": "Label for select all 
command.\n{{Identical|Select all}}",
"visualeditor-contextitemwidget-label-remove": "Label for the remove 
action on a context item.\n{{Identical|Delete}}",
"visualeditor-contextitemwidget-label-secondary": "Label for the edit 
action on a context item.\n{{Identical|Edit}}",
+   "visualeditor-debugbar-close": "Label for the button to dismiss the 
debug toolbar.",
+   "visualeditor-debugbar-inputdebug": "Label for the button in the debug 
toolbar to run keyboard input in debug mode.",
+   "visualeditor-debugbar-logrange": "Label for the button in the debug 
toolbar to output the current selection to the JavaScript console.",
+   "visualeditor-debugbar-showmodel": "Label for the button in the debug 
toolbar to show the document model.",
+   "visualeditor-debugbar-startfilibuster": "Label for the button in the 
debug toolbar to begin the input response trace debugger.",
+   "visualeditor-debugbar-stopfilibuster": "Label for the button in the 
debug toolbar to stop the input response trace debugger.",
+   "visualeditor-debugbar-updatemodel": "Label for the button in the debug 
toolbar to update the shown document model as it changes.",
"visualeditor-dialog-action-apply": "Label text for button to apply 
changes made in dialog.\n\nSee also:\n* 
{{msg-mw|Visualeditor-dialog-action-cancel}}\n* 
{{msg-mw|Visualeditor-dialog-action-done}}\n* 
{{msg-mw|Visualeditor-dialog-action-goback}}\n* 
{{msg-mw|Visualeditor-dialog-action-insert}}\n{{Identical|Apply change}}",
"visualeditor-dialog-action-cancel": "Label text for button to exit 
from dialog without making changes.\n\nSee also:\n* 
{{msg-mw|Visualeditor-dialog-action-apply}}\n* 
{{msg-mw|Visualeditor-dialog-action-done}}\n* 
{{msg-mw|Visualeditor-dialog-action-goback}}\n* 
{{msg-mw|Visualeditor-dialog-action-insert}}\n{{Identical|Cancel}}",
"visualeditor-dialog-action-done": "Label text for button to finish 
using a dialog.\n\nSee also:\n* {{msg-mw|Visualeditor-dialog-action-apply}}\n* 
{{msg-mw|Visualeditor-dialog-action-cancel}}\n* 
{{msg-mw|Visualeditor-dialog-action-goback}}\n* 
{{msg-mw|Visualeditor-dialog-action-insert}}\n{{Identical|Done}}",
diff --git a/src/ui/ve.ui.DebugBar.js b/src/ui/ve.ui.DebugBar.js
index 743772f..bb772ee 100644
--- a/src/ui/ve.ui.DebugBar.js
+++ b/src/ui/ve.ui.DebugBar.js
@@ -30,17 +30,17 @@
 
closeButton = new OO.ui.ButtonWidget( {
icon: 'close',
-   label: 'Close'
+   label: ve.msg( 'visualeditor-debugbar-close' )
} );
 
// Widgets
this.selectionLabel = new OO.ui.LabelWidget( { classes: [ 
've-ui-debugBar-selectionLabel' ] } );
 
-   this.logRangeButton = new OO.ui.ButtonWidget( { label: 'Log', disabled: 
true } );
-   this.showModelToggle = new OO.ui.ToggleButtonWidget( { label: 'Show 
model' } );
-   this.updateModelToggle = new OO.ui.ToggleButtonWidget( { label: 'Update 
on changes' } );
-   this.inputDebuggingToggle = new OO.ui.ToggleButtonWidget( { label: 
'Input debugging' } );
-   this.filibusterToggle = new OO.ui.ToggleButtonWidget( { label: 
'Filibuster' } );
+   this.logRangeButton = new OO.ui.ButtonWidget( { label: ve.msg( 
'visualeditor-debugbar-logrange' ), disabled: true } );
+   this.showModelToggle = new 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix SessionConsistentConnectionManagerTest class and file name

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

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

Change subject: Fix SessionConsistentConnectionManagerTest class and file name
..

Fix SessionConsistentConnectionManagerTest class and file name

Change-Id: If60f081946b8f3bb564f2bb17fd1261af0cb7e3a
---
R 
tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/324631/1

diff --git 
a/tests/phpunit/includes/libs/rdbms/connectionmanager/ConsistentReadConnectionManagerTest.php
 
b/tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
similarity index 97%
rename from 
tests/phpunit/includes/libs/rdbms/connectionmanager/ConsistentReadConnectionManagerTest.php
rename to 
tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
index 5ac97b2..4dcab82 100644
--- 
a/tests/phpunit/includes/libs/rdbms/connectionmanager/ConsistentReadConnectionManagerTest.php
+++ 
b/tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
@@ -13,7 +13,7 @@
  * @license GPL-2.0+
  * @author Daniel Kinzler
  */
-class ConsistentReadConnectionManagerTest extends \PHPUnit_Framework_TestCase {
+class SessionConsistentConnectionManagerTest extends 
\PHPUnit_Framework_TestCase {
 
/**
 * @return IDatabase|PHPUnit_Framework_MockObject_MockObject

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove Atomic methods from ConnectionManagers

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

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

Change subject: Remove Atomic methods from ConnectionManagers
..

Remove Atomic methods from ConnectionManagers

Change-Id: I697f63f45975b13af52bc22fced6e4d07e35115f
Depends-On: I4341a1b4ff6a67e4c1770faae38e9b126f1bf0bf
---
M includes/libs/rdbms/connectionmanager/ConnectionManager.php
M includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php
2 files changed, 0 insertions(+), 60 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/30/324630/1

diff --git a/includes/libs/rdbms/connectionmanager/ConnectionManager.php 
b/includes/libs/rdbms/connectionmanager/ConnectionManager.php
index 6d5d8ab..4f72f77 100644
--- a/includes/libs/rdbms/connectionmanager/ConnectionManager.php
+++ b/includes/libs/rdbms/connectionmanager/ConnectionManager.php
@@ -138,43 +138,4 @@
return $this->getConnectionRef( DB_REPLICA, $groups );
}
 
-   /**
-* Begins an atomic section and returns a database connection to the 
master DB, for updating.
-*
-* @since 1.29
-*
-* @param string $fname
-*
-* @return Database
-*/
-   public function beginAtomicSection( $fname ) {
-   $db = $this->getWriteConnection();
-   $db->startAtomic( $fname );
-
-   return $db;
-   }
-
-   /**
-* @since 1.29
-*
-* @param IDatabase $db
-* @param string $fname
-*/
-   public function commitAtomicSection( IDatabase $db, $fname ) {
-   $db->endAtomic( $fname );
-   $this->releaseConnection( $db );
-   }
-
-   /**
-* @since 1.29
-*
-* @param IDatabase $db
-* @param string $fname
-*/
-   public function rollbackAtomicSection( IDatabase $db, $fname ) {
-   // FIXME: there does not seem to be a clean way to roll back an 
atomic section?!
-   $db->rollback( $fname, 'flush' );
-   $this->releaseConnection( $db );
-   }
-
 }
diff --git 
a/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php 
b/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php
index 02972e5..e183823 100644
--- 
a/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php
+++ 
b/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php
@@ -37,7 +37,6 @@
/**
 * Forces all future calls to getReadConnection() to return a write 
connection.
 * Use this before performing read operations that are critical for a 
future update.
-* Calling beginAtomicSection() implies a call to prepareForUpdates().
 *
 * @since 1.29
 */
@@ -93,26 +92,6 @@
public function getWriteConnectionRef() {
$this->prepareForUpdates();
return parent::getWriteConnectionRef();
-   }
-
-   /**
-* Begins an atomic section and returns a database connection to the 
master DB, for updating.
-*
-* @since 1.29
-*
-* @note: This causes all future calls to getReadConnection() to return 
a connection
-* to the master DB, even after commitAtomicSection() or 
rollbackAtomicSection() have
-* been called.
-*
-* @param string $fname
-*
-* @return Database
-*/
-   public function beginAtomicSection( $fname ) {
-   // Once we have written to master, do not read from replica.
-   $this->prepareForUpdates();
-
-   return parent::beginAtomicSection( $fname );
}
 
 }

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: SourceSurfaceFragment: Check range is not collapsed

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

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

Change subject: SourceSurfaceFragment: Check range is not collapsed
..

SourceSurfaceFragment: Check range is not collapsed

Change-Id: Ib70b24e3dbe120fc90f4ab79341821c468220b2d
---
M src/dm/ve.dm.SourceSurfaceFragment.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/29/324629/1

diff --git a/src/dm/ve.dm.SourceSurfaceFragment.js 
b/src/dm/ve.dm.SourceSurfaceFragment.js
index bc8a5af..72f39da 100644
--- a/src/dm/ve.dm.SourceSurfaceFragment.js
+++ b/src/dm/ve.dm.SourceSurfaceFragment.js
@@ -30,7 +30,7 @@
originalDocument = this.getDocument(),
coveringRange = this.getSelection().getCoveringRange();
 
-   if ( coveringRange ) {
+   if ( !coveringRange.isCollapsed() ) {
tempDocument = originalDocument.shallowCloneFromRange( 
coveringRange );
rangeInDocument = tempDocument.originalRange;
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib70b24e3dbe120fc90f4ab79341821c468220b2d
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ExtensionRegistryTest: Illustrate priority in array_replace_...

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

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

Change subject: ExtensionRegistryTest: Illustrate priority in 
array_replace_recursive test case
..

ExtensionRegistryTest: Illustrate priority in array_replace_recursive test case

When two keys have conflicting values, the value from extension.json wins
when using this merge strategy.

Change-Id: I0222682f3b3fb08f80afc7dda677da7bbfe8e5d1
---
M tests/phpunit/includes/registration/ExtensionRegistryTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/28/324628/1

diff --git a/tests/phpunit/includes/registration/ExtensionRegistryTest.php 
b/tests/phpunit/includes/registration/ExtensionRegistryTest.php
index 1de4265..9b57e1c 100644
--- a/tests/phpunit/includes/registration/ExtensionRegistryTest.php
+++ b/tests/phpunit/includes/registration/ExtensionRegistryTest.php
@@ -259,7 +259,7 @@
'JsonZeroConfig' => [
'namespace' => 480,
'nsName' => 'Zero',
-   'isLocal' => false,
+   'isLocal' => true,
],
],
],

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "RESTBase configuration for fi.wikivoyage.org"

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

Change subject: Revert "RESTBase configuration for fi.wikivoyage.org"
..


Revert "RESTBase configuration for fi.wikivoyage.org"

This reverts commit ec32500b2014b469f4b293936e74b775de7f46e6.

Hasn't been applied to production.

Change-Id: Ib99152e53a9f427c0d99194d879b2cd1c899bdee
---
M modules/restbase/templates/config.yaml.erb
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/modules/restbase/templates/config.yaml.erb 
b/modules/restbase/templates/config.yaml.erb
index b1592ec..12baccc 100644
--- a/modules/restbase/templates/config.yaml.erb
+++ b/modules/restbase/templates/config.yaml.erb
@@ -823,7 +823,6 @@
 /{domain:es.wikivoyage.org}: *default_project
 /{domain:fa.wikivoyage.org}: *default_project
 /{domain:fr.wikivoyage.org}: *default_project
-/{domain:fi.wikivoyage.org}: *default_project
 /{domain:he.wikivoyage.org}: *default_project
 /{domain:it.wikivoyage.org}: *default_project
 /{domain:nl.wikivoyage.org}: *default_project

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib99152e53a9f427c0d99194d879b2cd1c899bdee
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Mobrovac 
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/dumps[master]: miscdumps: use log.info for verbose only

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

Change subject: miscdumps: use log.info for verbose only
..


miscdumps: use log.info for verbose only

this was the default log level for everything, woops

Change-Id: I6785d038432273b074277ef32b4575a924be48fd
---
M xmldumps-backup/generatemiscdumps.py
M xmldumps-backup/html_dumps.py
M xmldumps-backup/incr_dumps.py
M xmldumps-backup/miscdumplib.py
4 files changed, 19 insertions(+), 18 deletions(-)

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



diff --git a/xmldumps-backup/generatemiscdumps.py 
b/xmldumps-backup/generatemiscdumps.py
index 1afdea4..8fe6bdf 100644
--- a/xmldumps-backup/generatemiscdumps.py
+++ b/xmldumps-backup/generatemiscdumps.py
@@ -150,8 +150,8 @@
 stat_text = self.get_stat_text(dump_date, wikiname)
 
 except Exception as ex:
-log.info("Error encountered, no information available"
- " for wiki %s", wikiname, exc_info=ex)
+log.warning("Error encountered, no information available"
+" for wiki %s", wikiname, exc_info=ex)
 return ("%s Error encountered,"
 " no information available | %s" % (wikiname, 
other_runs_text))
 
@@ -163,8 +163,8 @@
 wiki_info = (wiki_info + "" + 
"\n".join(files_text))
 wiki_info = wiki_info + "\n" + other_runs_text
 except Exception as ex:
-log.info("Error encountered formatting information"
- " for wiki %s", wikiname, exc_info=ex)
+log.warning("Error encountered formatting information"
+" for wiki %s", wikiname, exc_info=ex)
 return ("Error encountered formatting information"
 " for wiki %s" % wikiname)
 
@@ -245,8 +245,8 @@
 index = Index(self.args)
 index.do_all_wikis()
 except Exception as ex:
-log.info("error from dump run"
- " for wiki %s", self.wiki.db_name, exc_info=ex)
+log.warning("error from dump run"
+" for wiki %s", self.wiki.db_name, exc_info=ex)
 if not self.flags['dryrun']:
 lock.unlock_if_owner()
 return STATUS_FAILED
@@ -435,6 +435,7 @@
 '''
 config_file = False
 wikiname = None
+logging.basicConfig(level=logging.WARNING)
 
 try:
 (options, remainder) = getopt.gnu_getopt(
diff --git a/xmldumps-backup/html_dumps.py b/xmldumps-backup/html_dumps.py
index 9d499fa..37c48bc 100644
--- a/xmldumps-backup/html_dumps.py
+++ b/xmldumps-backup/html_dumps.py
@@ -72,8 +72,8 @@
 if not self.dump_html():
 return False
 except Exception as ex:
-log.info("Error encountered runing dump for %s ", 
self.wiki.db_name,
- exc_info=ex)
+log.warning("Error encountered runing dump for %s ", 
self.wiki.db_name,
+exc_info=ex)
 return False
 return True
 
@@ -92,7 +92,7 @@
 log.info("running with no output: " + command_text)
 output = RunSimpleCommand.run_with_output(command_text, shell=True)
 if not output:
-log.info("error retrieving domain for wiki %s", self.wiki.db_name)
+log.warning("error retrieving domain for wiki %s", 
self.wiki.db_name)
 return None
 # rstrip gets rid of any trailing newlines from eval.php
 return output.split('//')[1].rstrip()
@@ -128,7 +128,7 @@
 timeout=self.get_lock_timeout_interval(),
 timeout_callback=self.periodic_callback)
 if not success:
-log.info("error producing html files for wiki %s", 
self.wiki.db_name)
+log.warning("error producing html files for wiki %s", 
self.wiki.db_name)
 return False
 return True
 
diff --git a/xmldumps-backup/incr_dumps.py b/xmldumps-backup/incr_dumps.py
index 67b6730..f175ad4 100644
--- a/xmldumps-backup/incr_dumps.py
+++ b/xmldumps-backup/incr_dumps.py
@@ -192,8 +192,8 @@
 if not self.dump_revs():
 return False
 except Exception as ex:
-log.info("Error encountered runing dump for %s ", 
self.wiki.db_name,
- exc_info=ex)
+log.warning("Error encountered runing dump for %s ", 
self.wiki.db_name,
+exc_info=ex)
 return False
 return True
 
@@ -328,7 +328,7 @@
 command, shell=False, timeout=self.get_lock_timeout_interval(),
 timeout_callback=self.periodic_callback)
 if not success:
-log.info("error producing stub files for wiki %s", 
self.wiki.db_name)
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] Align diff colors with Wikimedia color palette

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

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

Change subject: [WIP] Align diff colors with Wikimedia color palette
..

[WIP] Align diff colors with Wikimedia color palette

It's blocked on having yellow70 and accent70.
Bug: T152025

Change-Id: Ib89009da17f7725e4734dbb6046dcbfdbd3d1373
---
M resources/src/mediawiki/mediawiki.diff.styles.css
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/324626/1

diff --git a/resources/src/mediawiki/mediawiki.diff.styles.css 
b/resources/src/mediawiki/mediawiki.diff.styles.css
index 327c9c8..12cf82a 100644
--- a/resources/src/mediawiki/mediawiki.diff.styles.css
+++ b/resources/src/mediawiki/mediawiki.diff.styles.css
@@ -62,17 +62,17 @@
 }
 
 td.diff-addedline {
-   border-color: #a3d3ff;
+   border-color: #36c;
 }
 
 td.diff-deletedline {
-   border-color: #ffe49c;
+   border-color: #fc3;
 }
 
 td.diff-context {
-   background: #f9f9f9;
-   border-color: #e6e6e6;
-   color: #333;
+   background: #f8f9fa;
+   border-color: #eaecf0;
+   color: #222;
 }
 
 .diffchange {
@@ -87,11 +87,11 @@
 }
 
 td.diff-addedline .diffchange {
-   background: #d8ecff;
+   background: #eaf3ff;
 }
 
 td.diff-deletedline .diffchange {
-   background: #feeec8;
+   background: #fef6e7;
 }
 
 /* Correct user & content directionality when viewing a diff */

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: Clarify grant-mwoath-authonly and grant-mwoath-authonlypriva...

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

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

Change subject: Clarify grant-mwoath-authonly and grant-mwoath-authonlyprivate 
messages * Reword generic "API"  * Notify user of inability to read 
pages
..

Clarify grant-mwoath-authonly and grant-mwoath-authonlyprivate messages
* Reword generic "API"
* Notify user of inability to read pages

Bug: T145354
Change-Id: I69559c2cd5a059b3900ae2a92f12eb54b4ff37a6
---
M i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth 
refs/changes/27/324627/1

diff --git a/i18n/en.json b/i18n/en.json
index 939c8c5..12bf632 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -228,8 +228,8 @@
"mwoauth-grants-nogrants": "The application has not requested any 
permissions.",
"mwoauth-acceptance-cancelled": "You have chosen not to allow \"$1\" to 
access your account. \"$1\" will not work unless you allow it access. You can 
go back to \"$1\" or [[Special:OAuthManageMyGrants|manage]] your connected 
apps.",
"mwoauth-granttype-normal": "Request authorization for specific 
permissions.",
-   "grant-mwoauth-authonly": "Authentication only, no API access.",
-   "grant-mwoauth-authonlyprivate": "Authentication only with access to 
real name and email address via Special:OAuth/identify, no API access.",
+   "grant-mwoauth-authonly": "User identity verification only, no ability 
to read pages or act on a user's behalf.",
+   "grant-mwoauth-authonlyprivate": "User identity verification only with 
access to real name and email address via Special:OAuth/identify, no ability to 
read pages or act on a user's behalf.",
"mwoauth-listgrants-extra-summary": "== OAuth-specific grants 
==\n\nThese additional grants are applicable to OAuth consumers.",
"mwoauth-oauth-exception": "An error occurred in the OAuth protocol: 
$1",
"mwoauth-callback-not-oob": "oauth_callback must be set, and must be 
set to \"oob\" (case-sensitive)",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69559c2cd5a059b3900ae2a92f12eb54b4ff37a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: MtDu 

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: miscdumps: use log.info for verbose only

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

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

Change subject: miscdumps: use log.info for verbose only
..

miscdumps: use log.info for verbose only

this was the default log level for everything, woops

Change-Id: I6785d038432273b074277ef32b4575a924be48fd
---
M xmldumps-backup/generatemiscdumps.py
M xmldumps-backup/html_dumps.py
M xmldumps-backup/incr_dumps.py
M xmldumps-backup/miscdumplib.py
4 files changed, 19 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/25/324625/1

diff --git a/xmldumps-backup/generatemiscdumps.py 
b/xmldumps-backup/generatemiscdumps.py
index 1afdea4..8fe6bdf 100644
--- a/xmldumps-backup/generatemiscdumps.py
+++ b/xmldumps-backup/generatemiscdumps.py
@@ -150,8 +150,8 @@
 stat_text = self.get_stat_text(dump_date, wikiname)
 
 except Exception as ex:
-log.info("Error encountered, no information available"
- " for wiki %s", wikiname, exc_info=ex)
+log.warning("Error encountered, no information available"
+" for wiki %s", wikiname, exc_info=ex)
 return ("%s Error encountered,"
 " no information available | %s" % (wikiname, 
other_runs_text))
 
@@ -163,8 +163,8 @@
 wiki_info = (wiki_info + "" + 
"\n".join(files_text))
 wiki_info = wiki_info + "\n" + other_runs_text
 except Exception as ex:
-log.info("Error encountered formatting information"
- " for wiki %s", wikiname, exc_info=ex)
+log.warning("Error encountered formatting information"
+" for wiki %s", wikiname, exc_info=ex)
 return ("Error encountered formatting information"
 " for wiki %s" % wikiname)
 
@@ -245,8 +245,8 @@
 index = Index(self.args)
 index.do_all_wikis()
 except Exception as ex:
-log.info("error from dump run"
- " for wiki %s", self.wiki.db_name, exc_info=ex)
+log.warning("error from dump run"
+" for wiki %s", self.wiki.db_name, exc_info=ex)
 if not self.flags['dryrun']:
 lock.unlock_if_owner()
 return STATUS_FAILED
@@ -435,6 +435,7 @@
 '''
 config_file = False
 wikiname = None
+logging.basicConfig(level=logging.WARNING)
 
 try:
 (options, remainder) = getopt.gnu_getopt(
diff --git a/xmldumps-backup/html_dumps.py b/xmldumps-backup/html_dumps.py
index 9d499fa..37c48bc 100644
--- a/xmldumps-backup/html_dumps.py
+++ b/xmldumps-backup/html_dumps.py
@@ -72,8 +72,8 @@
 if not self.dump_html():
 return False
 except Exception as ex:
-log.info("Error encountered runing dump for %s ", 
self.wiki.db_name,
- exc_info=ex)
+log.warning("Error encountered runing dump for %s ", 
self.wiki.db_name,
+exc_info=ex)
 return False
 return True
 
@@ -92,7 +92,7 @@
 log.info("running with no output: " + command_text)
 output = RunSimpleCommand.run_with_output(command_text, shell=True)
 if not output:
-log.info("error retrieving domain for wiki %s", self.wiki.db_name)
+log.warning("error retrieving domain for wiki %s", 
self.wiki.db_name)
 return None
 # rstrip gets rid of any trailing newlines from eval.php
 return output.split('//')[1].rstrip()
@@ -128,7 +128,7 @@
 timeout=self.get_lock_timeout_interval(),
 timeout_callback=self.periodic_callback)
 if not success:
-log.info("error producing html files for wiki %s", 
self.wiki.db_name)
+log.warning("error producing html files for wiki %s", 
self.wiki.db_name)
 return False
 return True
 
diff --git a/xmldumps-backup/incr_dumps.py b/xmldumps-backup/incr_dumps.py
index 67b6730..f175ad4 100644
--- a/xmldumps-backup/incr_dumps.py
+++ b/xmldumps-backup/incr_dumps.py
@@ -192,8 +192,8 @@
 if not self.dump_revs():
 return False
 except Exception as ex:
-log.info("Error encountered runing dump for %s ", 
self.wiki.db_name,
- exc_info=ex)
+log.warning("Error encountered runing dump for %s ", 
self.wiki.db_name,
+exc_info=ex)
 return False
 return True
 
@@ -328,7 +328,7 @@
 command, shell=False, timeout=self.get_lock_timeout_interval(),
 timeout_callback=self.periodic_callback)
 if not success:
-log.info("error producing stub 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: fix usage message

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

Change subject: fix usage message
..


fix usage message

since the person who wrote this (me) can't remember options
they just added

Change-Id: I019f702e84718f93be603a0edefca444daef13f2
---
M xmldumps-backup/generatemiscdumps.py
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/xmldumps-backup/generatemiscdumps.py 
b/xmldumps-backup/generatemiscdumps.py
index aeb3355..1afdea4 100644
--- a/xmldumps-backup/generatemiscdumps.py
+++ b/xmldumps-backup/generatemiscdumps.py
@@ -320,10 +320,10 @@
 if message:
 print message
 usage_message = (
-"""Usage: python generatemiscdumps.py --dumptype  [options] 
[args] [wikidbname]
+"""Usage: python generatemiscdumps.py --dumptype  [options] 
[args]
 
 Options: --configfile, --date, --dumponly, --indexonly,
- --dryrun, --forcerun, --verbose
+ --dryrun, --forcerun, --verbose, --wiki
 
  --dumptype:type of dump to be run.  Known types include:
 {0}
@@ -336,8 +336,7 @@
  --forcerun:Do the run even if there is already a successful run in place.
  --verbose: Print error messages and other informative messages
 (normally the script runs silently).
-
- wikidbname:Run the dumps only for the specific wiki.
+ --wiki:Run the dumps only for the specific wiki.
 
 Args:  If your dump needs specific arguments passed to the class that
are not provided for here, you can pass them on the command line

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I019f702e84718f93be603a0edefca444daef13f2
Gerrit-PatchSet: 3
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
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]: Revert "RESTBase configuration for fi.wikivoyage.org"

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

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

Change subject: Revert "RESTBase configuration for fi.wikivoyage.org"
..

Revert "RESTBase configuration for fi.wikivoyage.org"

This reverts commit ec32500b2014b469f4b293936e74b775de7f46e6.

Hasn't been applied to production.

Change-Id: Ib99152e53a9f427c0d99194d879b2cd1c899bdee
---
M modules/restbase/templates/config.yaml.erb
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/24/324624/1

diff --git a/modules/restbase/templates/config.yaml.erb 
b/modules/restbase/templates/config.yaml.erb
index b1592ec..12baccc 100644
--- a/modules/restbase/templates/config.yaml.erb
+++ b/modules/restbase/templates/config.yaml.erb
@@ -823,7 +823,6 @@
 /{domain:es.wikivoyage.org}: *default_project
 /{domain:fa.wikivoyage.org}: *default_project
 /{domain:fr.wikivoyage.org}: *default_project
-/{domain:fi.wikivoyage.org}: *default_project
 /{domain:he.wikivoyage.org}: *default_project
 /{domain:it.wikivoyage.org}: *default_project
 /{domain:nl.wikivoyage.org}: *default_project

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: toollabs: remove host aliases for tools-exec-12[01-11]

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

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

Change subject: toollabs: remove host aliases for tools-exec-12[01-11]
..

toollabs: remove host aliases for tools-exec-12[01-11]

Bug: T151980
Change-Id: I85645fc71fdd9e06861e1285b8f8f423535f24f5
---
M modules/toollabs/files/host_aliases
1 file changed, 0 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/23/324623/1

diff --git a/modules/toollabs/files/host_aliases 
b/modules/toollabs/files/host_aliases
index 55abbd1..941139a 100644
--- a/modules/toollabs/files/host_aliases
+++ b/modules/toollabs/files/host_aliases
@@ -1,15 +1,5 @@
 tools-bastion-01.eqiad.wmflabs tools-bastion-01.tools.eqiad.wmflabs
 tools-checker-02.eqiad.wmflabs tools-checker-02.tools.eqiad.wmflabs
-tools-exec-1202.eqiad.wmflabs tools-exec-1202.tools.eqiad.wmflabs
-tools-exec-1203.eqiad.wmflabs tools-exec-1203.tools.eqiad.wmflabs
-tools-exec-1204.eqiad.wmflabs tools-exec-1204.tools.eqiad.wmflabs
-tools-exec-1205.eqiad.wmflabs tools-exec-1205.tools.eqiad.wmflabs
-tools-exec-1206.eqiad.wmflabs tools-exec-1206.tools.eqiad.wmflabs
-tools-exec-1207.eqiad.wmflabs tools-exec-1207.tools.eqiad.wmflabs
-tools-exec-1208.eqiad.wmflabs tools-exec-1208.tools.eqiad.wmflabs
-tools-exec-1209.eqiad.wmflabs tools-exec-1209.tools.eqiad.wmflabs
-tools-exec-1210.eqiad.wmflabs tools-exec-1210.tools.eqiad.wmflabs
-tools-exec-1211.eqiad.wmflabs tools-exec-1211.tools.eqiad.wmflabs
 tools-exec-1212.eqiad.wmflabs tools-exec-1212.tools.eqiad.wmflabs
 tools-exec-1213.eqiad.wmflabs tools-exec-1213.tools.eqiad.wmflabs
 tools-exec-1214.eqiad.wmflabs tools-exec-1214.tools.eqiad.wmflabs

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Update SiteMatrix data fork for last 3 wiki creations

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

Change subject: Update SiteMatrix data fork for last 3 wiki creations
..


Update SiteMatrix data fork for last 3 wiki creations

Bug: T151570
Change-Id: I9e8b1c67231e6b474b72bb78363a23ed44b0fcce
---
M lib/config/sitematrix.json
1 file changed, 24 insertions(+), 4 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/lib/config/sitematrix.json b/lib/config/sitematrix.json
index 056386a..242ec5e 100644
--- a/lib/config/sitematrix.json
+++ b/lib/config/sitematrix.json
@@ -763,7 +763,7 @@
"sitename": "উইকিসংকলন"
}
],
-   "localname": "Bengali"
+   "localname": "Bangla"
},
"31": {
"code": "bo",
@@ -1875,6 +1875,12 @@
"dbname": "fiwikiversity",
"code": "wikiversity",
"sitename": "Wikiopisto"
+   },
+   {
+   "url": "https://fi.wikivoyage.org;,
+   "dbname": "fiwikivoyage",
+   "code": "wikivoyage",
+   "sitename": "Wikimatkat"
}
],
"localname": "Finnish"
@@ -4591,7 +4597,7 @@
},
"194": {
"code": "olo",
-   "name": "Livvinкarjala",
+   "name": "Livvinkarjala",
"site": [
{
"url": "https://olo.wikipedia.org;,
@@ -4644,7 +4650,7 @@
"sitename": "ଉଇକିପାଠାଗାର"
}
],
-   "localname": "Oriya"
+   "localname": "Odia"
},
"197": {
"code": "os",
@@ -7019,7 +7025,7 @@
],
"localname": "Zulu"
},
-   "count": 898,
+   "count": 901,
"specials": [
{
"url": "https://advisory.wikimedia.org;,
@@ -7172,6 +7178,13 @@
"code": "donate",
"sitename": "Donate",
"fishbowl": ""
+   },
+   {
+   "url": "https://ec.wikimedia.org;,
+   "dbname": "ecwikimedia",
+   "code": "ecwikimedia",
+   "sitename": "Wikimedistas de Ecuador",
+   "private": ""
},
{
"url": "https://ee.wikimedia.org;,
@@ -7376,6 +7389,13 @@
"sitename": "Wikimedia"
},
{
+   "url": "https://projectcom.wikipedia.org;,
+   "dbname": "projectcomwiki",
+   "code": "projectcom",
+   "sitename": "Project Grants Committee",
+   "private": ""
+   },
+   {
"url": "https://quality.wikimedia.org;,
"dbname": "qualitywiki",
"code": "quality",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e8b1c67231e6b474b72bb78363a23ed44b0fcce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Subramanya Sastry 
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/dumps[master]: fix usage message

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

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

Change subject: fix usage message
..

fix usage message

since the person who wrote this (me) can't remember options
they just added

Change-Id: I019f702e84718f93be603a0edefca444daef13f2
---
M xmldumps-backup/generatemiscdumps.py
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/22/324622/1

diff --git a/xmldumps-backup/generatemiscdumps.py 
b/xmldumps-backup/generatemiscdumps.py
index aeb3355..68719b0 100644
--- a/xmldumps-backup/generatemiscdumps.py
+++ b/xmldumps-backup/generatemiscdumps.py
@@ -320,10 +320,10 @@
 if message:
 print message
 usage_message = (
-"""Usage: python generatemiscdumps.py --dumptype  [options] 
[args] [wikidbname]
+"""Usage: python generatemiscdumps.py --dumptype  [options] 
[args] [--wiki wikidbname]
 
 Options: --configfile, --date, --dumponly, --indexonly,
- --dryrun, --forcerun, --verbose
+ --dryrun, --forcerun, --verbose, --wiki
 
  --dumptype:type of dump to be run.  Known types include:
 {0}
@@ -336,8 +336,7 @@
  --forcerun:Do the run even if there is already a successful run in place.
  --verbose: Print error messages and other informative messages
 (normally the script runs silently).
-
- wikidbname:Run the dumps only for the specific wiki.
+--wiki: Run the dumps only for the specific wiki.
 
 Args:  If your dump needs specific arguments passed to the class that
are not provided for here, you can pass them on the command line

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I019f702e84718f93be603a0edefca444daef13f2
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace Linker::link() with LinkRenderer in some special pages

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

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

Change subject: Replace Linker::link() with LinkRenderer in some special pages
..

Replace Linker::link() with LinkRenderer in some special pages

* SpecialEditTags
* SpecialEmailuser
* SpecialFewestrevisions
* SpecialImport
* SpecialListgrouprights
* SpecialMediaStatistics
* SpecialMergeHistory
* SpecialMIMEsearch
* SpecialMostcategories
* SpecialMostinerwikis
* SpecialMostlinked

Bug: T149346
Change-Id: Idee566dbff87f2e8bf909ba8371d551aaf0dd08b
---
M includes/specials/SpecialEditTags.php
M includes/specials/SpecialEmailuser.php
M includes/specials/SpecialFewestrevisions.php
M includes/specials/SpecialFileDuplicateSearch.php
M includes/specials/SpecialImport.php
M includes/specials/SpecialListgrouprights.php
M includes/specials/SpecialMIMEsearch.php
M includes/specials/SpecialMediaStatistics.php
M includes/specials/SpecialMergeHistory.php
M includes/specials/SpecialMostcategories.php
M includes/specials/SpecialMostinterwikis.php
M includes/specials/SpecialMostlinked.php
12 files changed, 80 insertions(+), 45 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/324621/1

diff --git a/includes/specials/SpecialEditTags.php 
b/includes/specials/SpecialEditTags.php
index 252d076..b29bb0f 100644
--- a/includes/specials/SpecialEditTags.php
+++ b/includes/specials/SpecialEditTags.php
@@ -19,6 +19,8 @@
  * @ingroup SpecialPage
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Special page for adding and removing change tags to individual revisions.
  * A lot of this is copied out of SpecialRevisiondelete.
@@ -158,10 +160,11 @@
// Also set header tabs to be for the target.
$this->getSkin()->setRelevantTitle( $this->targetObj );
 
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
$links = [];
-   $links[] = Linker::linkKnown(
+   $links[] = $linkRenderer->makeKnownLink(
SpecialPage::getTitleFor( 'Log' ),
-   $this->msg( 'viewpagelogs' )->escaped(),
+   $this->msg( 'viewpagelogs' )->text(),
[],
[
'page' => 
$this->targetObj->getPrefixedText(),
@@ -170,17 +173,17 @@
);
if ( !$this->targetObj->isSpecialPage() ) {
// Give a link to the page history
-   $links[] = Linker::linkKnown(
+   $links[] = $linkRenderer->makeKnownLink(
$this->targetObj,
-   $this->msg( 'pagehist' )->escaped(),
+   $this->msg( 'pagehist' )->text(),
[],
[ 'action' => 'history' ]
);
}
// Link to Special:Tags
-   $links[] = Linker::linkKnown(
+   $links[] = $linkRenderer->makeKnownLink(
SpecialPage::getTitleFor( 'Tags' ),
-   $this->msg( 'tags-edit-manage-link' )->escaped()
+   $this->msg( 'tags-edit-manage-link' )->text()
);
// Logs themselves don't have histories or archived 
revisions
$this->getOutput()->addSubtitle( 
$this->getLanguage()->pipeList( $links ) );
diff --git a/includes/specials/SpecialEmailuser.php 
b/includes/specials/SpecialEmailuser.php
index a550e88..38395e8 100644
--- a/includes/specials/SpecialEmailuser.php
+++ b/includes/specials/SpecialEmailuser.php
@@ -53,13 +53,14 @@
}
 
protected function getFormFields() {
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
return [
'From' => [
'type' => 'info',
'raw' => 1,
-   'default' => Linker::link(
+   'default' => $linkRenderer->makeLink(
$this->getUser()->getUserPage(),
-   htmlspecialchars( 
$this->getUser()->getName() )
+   $this->getUser()->getName()
),
'label-message' => 'emailfrom',
'id' => 'mw-emailuser-sender',
@@ -67,9 +68,9 @@
'To' => [
'type' => 'info',
 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace makeLink() with makeBrokenLink() as [ 'broken' ] as ...

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

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

Change subject: Replace makeLink() with makeBrokenLink() as [ 'broken' ] as a 
5th parameter is no longer supported.
..

Replace makeLink() with makeBrokenLink() as [ 'broken' ] as a 5th parameter is 
no longer supported.

Change-Id: If2025232a2e09ab99b1bdc6d58a77f347f3dbf5e
---
M includes/specials/SpecialBrokenRedirects.php
1 file changed, 1 insertion(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/324620/1

diff --git a/includes/specials/SpecialBrokenRedirects.php 
b/includes/specials/SpecialBrokenRedirects.php
index 8927fbf..b730ecd 100644
--- a/includes/specials/SpecialBrokenRedirects.php
+++ b/includes/specials/SpecialBrokenRedirects.php
@@ -136,13 +136,7 @@
[ 'action' => 'edit' ]
);
}
-   $to = $linkRenderer->makeLink(
-   $toObj,
-   null,
-   [],
-   [],
-   [ 'broken' ]
-   );
+   $to = $linkRenderer->makeBrokenLink( $toObj );
$arr = $this->getLanguage()->getArrow();
 
$out = $from . $this->msg( 'word-separator' )->escaped();

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

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

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: tweak stale lock refresh interval for incr dumps

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

Change subject: tweak stale lock refresh interval for incr dumps
..


tweak stale lock refresh interval for incr dumps

Change-Id: I672eb4dae9c17e30e9c962ac4f76fa5637d84850
---
M xmldumps-backup/miscdumplib.py
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/xmldumps-backup/miscdumplib.py b/xmldumps-backup/miscdumplib.py
index d89fd71..8affa94 100644
--- a/xmldumps-backup/miscdumplib.py
+++ b/xmldumps-backup/miscdumplib.py
@@ -705,14 +705,14 @@
 '''
 how often in milliseconds should we try to refresh?
 sooner than the stale interval so it doesn't expire
-
-it would be nice if users configured the stale
-interval greater than 5 seconds, but just in case
-we try to be polite about that
 '''
 timeout_interval = self.wiki.config.lock_stale * 1000
 if timeout_interval > 5000:
-timeout_interval -= 3000
+# refresh every 5 seconds is plenty often, and not
+# too long to wait for a job to finish running
+timeout_interval = 5000
 elif timeout_interval > 0:
 timeout_interval -= 500
-return timeout_interval
+else:
+# be nice if they gave us bogus or no interval
+timeout_interval = 500

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I672eb4dae9c17e30e9c962ac4f76fa5637d84850
Gerrit-PatchSet: 2
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
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/dumps[master]: tweak stale lock refresh interval for incr dumps

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

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

Change subject: tweak stale lock refresh interval for incr dumps
..

tweak stale lock refresh interval for incr dumps

Change-Id: I672eb4dae9c17e30e9c962ac4f76fa5637d84850
---
M xmldumps-backup/miscdumplib.py
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/19/324619/1

diff --git a/xmldumps-backup/miscdumplib.py b/xmldumps-backup/miscdumplib.py
index d89fd71..eacb9e0 100644
--- a/xmldumps-backup/miscdumplib.py
+++ b/xmldumps-backup/miscdumplib.py
@@ -705,14 +705,14 @@
 '''
 how often in milliseconds should we try to refresh?
 sooner than the stale interval so it doesn't expire
-
-it would be nice if users configured the stale
-interval greater than 5 seconds, but just in case
-we try to be polite about that
 '''
 timeout_interval = self.wiki.config.lock_stale * 1000
-if timeout_interval > 5000:
-timeout_interval -= 3000
+if timeout_interval > 1:
+# refresh every 5 seconds is plenty often, and not
+# too long to wait for a job to finish running
+timeout_interval = 5000
 elif timeout_interval > 0:
 timeout_interval -= 500
-return timeout_interval
+else:
+# be nice if they gave us bogus or no interval
+timeout_interval = 500

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I672eb4dae9c17e30e9c962ac4f76fa5637d84850
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: start adds/changes dumps cron job earlier

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

Change subject: start adds/changes dumps cron job earlier
..


start adds/changes dumps cron job earlier

Late start time was left over from when there were two phases with many
hors delay between them.  Now we can run and complete it before the
end of day.

Change-Id: I763f7540fdd31e7d19d31d4221d04e14125579b6
---
M modules/snapshot/manifests/addschanges.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/snapshot/manifests/addschanges.pp 
b/modules/snapshot/manifests/addschanges.pp
index 4db4f5c..6458b24 100644
--- a/modules/snapshot/manifests/addschanges.pp
+++ b/modules/snapshot/manifests/addschanges.pp
@@ -32,6 +32,6 @@
 user=> $user,
 command => "python ${repodir}/generatemiscdumps.py --configfile 
${confsdir}/addschanges.conf --dumptype incrdumps",
 minute  => '50',
-hour=> '23',
+hour=> '20',
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I763f7540fdd31e7d19d31d4221d04e14125579b6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
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]: start adds/changes dumps cron job earlier

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

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

Change subject: start adds/changes dumps cron job earlier
..

start adds/changes dumps cron job earlier

Late start time was left over from when there were two phases with many
hors delay between them.  Now we can run and complete it before the
end of day.

Change-Id: I763f7540fdd31e7d19d31d4221d04e14125579b6
---
M modules/snapshot/manifests/addschanges.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/18/324618/1

diff --git a/modules/snapshot/manifests/addschanges.pp 
b/modules/snapshot/manifests/addschanges.pp
index 4db4f5c..6458b24 100644
--- a/modules/snapshot/manifests/addschanges.pp
+++ b/modules/snapshot/manifests/addschanges.pp
@@ -32,6 +32,6 @@
 user=> $user,
 command => "python ${repodir}/generatemiscdumps.py --configfile 
${confsdir}/addschanges.conf --dumptype incrdumps",
 minute  => '50',
-hour=> '23',
+hour=> '20',
 }
 }

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

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

___
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 "mariadb: depool db1017 for maintenance and general u...

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

Change subject: Revert "mariadb: depool db1017 for maintenance and general 
upgrade"
..


Revert "mariadb: depool db1017 for maintenance and general upgrade"

This reverts commit 41cf56debaf15981d279ae021d39a289d2250f0f.

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

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index e03440b..35c6566 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -623,7 +623,7 @@
'cluster25' => [
'10.64.48.116' => 1, # es1019, master
'10.64.16.187' => 1, # es1014
-#  '10.64.48.114' => 1, # es1017, depooled for maintenance T151995
+   '10.64.48.114' => 1, # es1017
],
# ExtensionStore shard1 - initially for AFTv5
'extension1' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic538de50c3312537218eb6c6b43e8f78c3cae5fa
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jcrespo 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jcrespo 
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]: make lock stale time for incremental dumps a lot shorter

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

Change subject: make lock stale time for incremental dumps a lot shorter
..


make lock stale time for incremental dumps a lot shorter

no need to wait 15 minutes, refreshes can happen a lot more often
than that

Change-Id: Ice3ead5a954373a48549edf2b7e25804ff53aaf9
---
M modules/snapshot/templates/addschanges.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/snapshot/templates/addschanges.conf.erb 
b/modules/snapshot/templates/addschanges.conf.erb
index b5eed12..a6bace0 100644
--- a/modules/snapshot/templates/addschanges.conf.erb
+++ b/modules/snapshot/templates/addschanges.conf.erb
@@ -23,7 +23,7 @@
 # revisions must be at least this much older than time of current run
 # (or from 23:59 on specified date) to be dumped
 delay=43200
-lockstale=900
+lockstale=30
 
 [database]
 max_allowed_packet=32M

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice3ead5a954373a48549edf2b7e25804ff53aaf9
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
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]: make lock stale time for incremental dumps a lot shorter

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

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

Change subject: make lock stale time for incremental dumps a lot shorter
..

make lock stale time for incremental dumps a lot shorter

no need to wait 15 minutes, refreshes can happen a lot more often
than that

Change-Id: Ice3ead5a954373a48549edf2b7e25804ff53aaf9
---
M modules/snapshot/templates/addschanges.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/324617/1

diff --git a/modules/snapshot/templates/addschanges.conf.erb 
b/modules/snapshot/templates/addschanges.conf.erb
index b5eed12..a6bace0 100644
--- a/modules/snapshot/templates/addschanges.conf.erb
+++ b/modules/snapshot/templates/addschanges.conf.erb
@@ -23,7 +23,7 @@
 # revisions must be at least this much older than time of current run
 # (or from 23:59 on specified date) to be dumped
 delay=43200
-lockstale=900
+lockstale=30
 
 [database]
 max_allowed_packet=32M

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: RESTBase configuration for fi.wikivoyage.org

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

Change subject: RESTBase configuration for fi.wikivoyage.org
..


RESTBase configuration for fi.wikivoyage.org

Bug: T151570
Change-Id: Ic960389da38a2fdd1753ab2eb42426f15fa12720
---
M modules/restbase/templates/config.yaml.erb
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Alex Monk: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Verified; Looks good to me, approved
  GWicke: Looks good to me, but someone else must approve



diff --git a/modules/restbase/templates/config.yaml.erb 
b/modules/restbase/templates/config.yaml.erb
index 12baccc..b1592ec 100644
--- a/modules/restbase/templates/config.yaml.erb
+++ b/modules/restbase/templates/config.yaml.erb
@@ -823,6 +823,7 @@
 /{domain:es.wikivoyage.org}: *default_project
 /{domain:fa.wikivoyage.org}: *default_project
 /{domain:fr.wikivoyage.org}: *default_project
+/{domain:fi.wikivoyage.org}: *default_project
 /{domain:he.wikivoyage.org}: *default_project
 /{domain:it.wikivoyage.org}: *default_project
 /{domain:nl.wikivoyage.org}: *default_project

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic960389da38a2fdd1753ab2eb42426f15fa12720
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Mobrovac 
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/vagrant[master]: Don't use constants in Flow config

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

Change subject: Don't use constants in Flow config
..


Don't use constants in Flow config

Once Flow is converted to extension registration, these
constants won't be available here.

Change-Id: I80b9d4dea6369d80c6175f1c34e0b18c2ec6a8a3
---
M puppet/modules/role/templates/flow/conf.php.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/puppet/modules/role/templates/flow/conf.php.erb 
b/puppet/modules/role/templates/flow/conf.php.erb
index fc3d510..7c1cac4 100644
--- a/puppet/modules/role/templates/flow/conf.php.erb
+++ b/puppet/modules/role/templates/flow/conf.php.erb
@@ -13,7 +13,7 @@
 $wgNamespacesWithSubpages[ NS_FLOW_TEST ] = true;
 $wgNamespacesWithSubpages[ NS_FLOW_TEST_TALK ] = true;
 
-$wgNamespaceContentModels[ NS_FLOW_TEST_TALK ] = CONTENT_MODEL_FLOW_BOARD;
+$wgNamespaceContentModels[ NS_FLOW_TEST_TALK ] = 'flow-board';
 
 $wgFlowEnableOptInBetaFeature = true;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80b9d4dea6369d80c6175f1c34e0b18c2ec6a8a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
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...PageForms[master]: Cosmetic improvements

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

Change subject: Cosmetic improvements
..


Cosmetic improvements

Change-Id: Iee2fe5d4095616124ab11bbf99ef6bc1d9ef3b92
---
M includes/PF_ParserFunctions.php
M includes/forminputs/PF_DatePickerInput.php
M specials/PF_FormEdit.php
3 files changed, 130 insertions(+), 141 deletions(-)

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



diff --git a/includes/PF_ParserFunctions.php b/includes/PF_ParserFunctions.php
index b18b9d5..6b0d5a4 100644
--- a/includes/PF_ParserFunctions.php
+++ b/includes/PF_ParserFunctions.php
@@ -258,7 +258,7 @@
// "Decode" any other HTML tags.
$inQueryStr = html_entity_decode( $inQueryStr, 
ENT_QUOTES );
 
-   parse_str($inQueryStr, $arr);
+   parse_str( $inQueryStr, $arr );
$inQueryArr = 
PFUtils::array_merge_recursive_distinct( $inQueryArr, $arr );
} elseif ( $paramName == 'autocomplete on category' ) {
$inAutocompletionSource = $value;
@@ -536,8 +536,7 @@
$editTime = 
$targetArticle->getTimestamp();
}
 
-   default :
-
+   default:
$value = $parser->recursiveTagParse( 
$value );
$arr = array( $key => $value );
$inQueryArr = 
PFUtils::array_merge_recursive_distinct( $inQueryArr, $arr );
@@ -617,7 +616,6 @@
// - support unlabelled params, for backwards compatibility
// - parse and sanitize all parameter values
foreach ( $params as $i => $param ) {
-
$elements = explode( '=', $param, 2 );
 
// set param_name and value
@@ -770,4 +768,4 @@
return true;
}
 
-}
+}
\ No newline at end of file
diff --git a/includes/forminputs/PF_DatePickerInput.php 
b/includes/forminputs/PF_DatePickerInput.php
index 829bd2d..65a16b7 100644
--- a/includes/forminputs/PF_DatePickerInput.php
+++ b/includes/forminputs/PF_DatePickerInput.php
@@ -47,8 +47,8 @@
/**
 * Returns the name of the input type this class handles.
 *
-* This is the name to be used in the field definition for the "input 
type"
-* parameter.
+* This is the name to be used in the field definition for the
+* "input type" parameter.
 *
 * @return String The name of the input type this class handles.
 */
@@ -59,8 +59,8 @@
/**
 * Returns the names of the resource modules this input type uses.
 *
-* Returns the names of the modules as an array or - if there is only 
one
-* module - as a string.
+* Returns the names of the modules as an array or - if there is only
+* one module - as a string.
 *
 * @return null|string|array
 */
@@ -73,7 +73,6 @@
 * Adds the Javascript config settings used by all datepickers.
 */
private static function setup() {
-
global $wgOut, $wgLang;
 
static $hasRun = false;
@@ -82,72 +81,72 @@
$hasRun = true;
 
$regional = array(
-   'closeText' => wfMessage( 
'pf-datepicker-close' )->text(),
-   'prevText'=> wfMessage( 
'pf-datepicker-prev' )->text(),
-   'nextText'=> wfMessage( 
'pf-datepicker-next' )->text(),
-   'currentText'=> wfMessage( 
'pf-datepicker-today' )->text(),
-   'monthNames' => array(
-   wfMessage( 'january' 
)->text(),
-   wfMessage( 'february' 
)->text(),
-   wfMessage( 'march' 
)->text(),
-   wfMessage( 'april' 
)->text(),
-   wfMessage( 'may_long' 
)->text(),
-   wfMessage( 'june' 
)->text(),
-   wfMessage( 'july' 
)->text(),
-   wfMessage( 'august' 
)->text(),
-   wfMessage( 'september' 
)->text(),
-   wfMessage( 'october' 
)->text(),
-   wfMessage( 'november' 
)->text(),
- 

  1   2   3   4   5   >