[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update jquery.uls from upstream

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

Change subject: Update jquery.uls from upstream
..


Update jquery.uls from upstream

* Localization update for Chechen
* Made all autonyms unique. See https://github.com/wikimedia/jquery.uls/pull/265
* Fix tkr autonym

Change-Id: I6c80b28dacaeb26cc158e6c8e715d1f04122b9f9
---
M lib/jquery.uls/i18n/ce.json
M lib/jquery.uls/src/jquery.uls.data.js
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/lib/jquery.uls/i18n/ce.json b/lib/jquery.uls/i18n/ce.json
index f47dcb6..c75559c 100644
--- a/lib/jquery.uls/i18n/ce.json
+++ b/lib/jquery.uls/i18n/ce.json
@@ -5,10 +5,17 @@
]
},
"uls-region-WW": "Дерригдуьненан",
+   "uls-region-SP": "Леррина",
+   "uls-region-AM": "Америка",
+   "uls-region-AF": "Африка",
+   "uls-region-EU": "Европа",
"uls-region-AS": "Ази",
"uls-region-ME": "Гергара Малхбале",
"uls-region-PA": "Океани",
+   "uls-region-all": "Берриге меттанаш",
"uls-no-results-found": "Цакарийна",
"uls-common-languages": "Ша дӀанисбелла меттанаш",
+   "uls-no-results-suggestion-title": "Хьуна хӀара меттанаш хьашта хила 
мега:",
+   "uls-search-help": "Хьа таро ю меттан я йозанан цӀарца лаха, меттан 
ISO-кодаца я регионаца хьажа.",
"uls-search-placeholder": "Лаха мотт"
 }
diff --git a/lib/jquery.uls/src/jquery.uls.data.js 
b/lib/jquery.uls/src/jquery.uls.data.js
index 04b59d9..210c85d 100644
--- a/lib/jquery.uls/src/jquery.uls.data.js
+++ b/lib/jquery.uls/src/jquery.uls.data.js
@@ -3,5 +3,5 @@
'use strict';
$.uls = $.uls || {};
//noinspection JSHint
-   $.uls.data = {"languages":{"aa":["Latn",["AF"],"Qafár 
af"],"ab":["Cyrl",["EU"],"Аҧсшәа"],"abs":["Latn",["AS"],"Bahasa 
Ambon"],"ace":["Latn",["AS","PA"],"Acèh"],"acf":["Latn",["AM"],"kwéyòl"],"ady":["Cyrl",["EU","ME"],"Адыгабзэ"],"ady-cyrl":["ady"],"ady-latn":["Latn",["EU","ME"],"Adygabze"],"aeb":["aeb-arab"],"aeb-arab":["Arab",["AF"],"تونسي"],"aeb-latn":["Latn",["AF"],"Tûnsî"],"af":["Latn",["AF"],"Afrikaans"],"ahr":["Deva",["AS"],"अहिराणी"],"ais":["Latn",["AS"],"Sakizaya"],"ak":["Latn",["AF"],"Akan"],"akz":["Latn",["AM"],"Albaamo
 
innaaɬiilka"],"aln":["Latn",["EU"],"Gegë"],"am":["Ethi",["AF"],"አማርኛ"],"ami":["Latn",["AS"],"Pangcah"],"an":["Latn",["EU"],"aragonés"],"ang":["Latn",["EU"],"Ænglisc"],"anp":["Deva",["AS"],"अङ्गिका"],"ar":["Arab",["ME"],"العربية"],"arc":["Syrc",["ME"],"ܐܪܡܝܐ"],"arn":["Latn",["AM"],"mapudungun"],"aro":["Latn",["AM"],"Araona"],"arq":["Arab",["AF"],"جازايرية"],"ary":["Latn",["ME"],"Maġribi"],"arz":["Arab",["ME"],"مصرى"],"as":["Beng",["AS"],"অসমীয়া"],"ase":["Sgnw",["AM"],"American
 sign 
language"],"ast":["Latn",["EU"],"asturianu"],"atj":["Latn",["AM"],"atikamekw"],"av":["Cyrl",["EU"],"авар"],"avk":["Latn",["WW"],"Kotava"],"ay":["Latn",["AM"],"Aymar
 
aru"],"az":["az-latn"],"az-arab":["Arab",["AS","ME"],"تۆرکجه"],"az-latn":["Latn",["EU","ME"],"azərbaycanca"],"az-cyrl":["Cyrl",["EU","ME"],"азәрбајҹанҹа"],"azb":["az-arab"],"azj":["az-latn"],"ba":["Cyrl",["EU"],"башҡортса"],"ban":["Bali",["AS"],"ᬩᬲᬩᬮᬶ"],"bar":["Latn",["EU"],"Boarisch"],"bat-smg":["sgs"],"bbc-latn":["Latn",["AS"],"Batak
 Toba"],"bbc-batk":["Batk",["AS"],"Batak Toba"],"bbc":["Latn",["AS"],"Batak 
Toba"],"bcc":["Arab",["AS","ME"],"جهلسری بلوچی"],"bcl":["Latn",["AS"],"Bikol 
Central"],"be-tarask":["Cyrl",["EU"],"беларуская 
(тарашкевіца)"],"be-x-old":["be-tarask"],"be":["Cyrl",["EU"],"беларуская"],"bew":["Latn",["AS"],"Bahasa
 
Betawi"],"bfa":["Latn",["AF"],"Bari"],"bft":["Arab",["AS"],"بلتی"],"bfq":["Taml",["AS"],"படகா"],"bg":["Cyrl",["EU"],"български"],"bgn":["Arab",["AS","ME"],"روچ
 کپتین 
بلوچی"],"bh":["bho"],"bho":["Deva",["AS"],"भोजपुरी"],"bi":["Latn",["PA"],"Bislama"],"bjn":["Latn",["AS"],"Bahasa
 
Banjar"],"bm":["Latn",["AF"],"bamanankan"],"bn":["Beng",["AS"],"বাংলা"],"bo":["Tibt",["AS"],"བོད་ཡིག"],"bpy":["Beng",["AS"],"বিষ্ণুপ্রিয়া
 
মণিপুরী"],"bqi":["Arab",["AS","ME"],"بختیاری"],"br":["Latn",["EU"],"brezhoneg"],"brh":["Latn",["ME","AS"],"Bráhuí"],"brx":["Deva",["AS"],"बड़ो"],"bs":["Latn",["EU"],"bosanski"],"bto":["Latn",["AS"],"Iriga
 Bicolano"],"bug":["Bugi",["AS"],"ᨅᨔ 
ᨕᨘᨁᨗ"],"bxr":["Cyrl",["AS"],"буряад"],"byn":["Ethi",["AF"],"ብሊን"],"ca":["Latn",["EU"],"català"],"cbk-zam":["Latn",["AS"],"Chavacano
 de 
Zamboanga"],"cdo":["Latn",["AS"],"Mìng-dĕ̤ng-ngṳ̄"],"ce":["Cyrl",["EU"],"нохчийн"],"ceb":["Latn",["AS"],"Cebuano"],"ch":["Latn",["PA"],"Chamoru"],"chm":["mhr"],"cho":["Latn",["AM"],"Choctaw"],"chr":["Cher",["AM"],"ᏣᎳᎩ"],"chy":["Latn",["AM"],"Tsetsêhestâhese"],"ciw":["Latn",["AM"],"Ojibwemowin"],"cjy":["cjy-hant"],"cjy-hans":["Hans",["AS"],"晋语(简化字)"],"cjy-hant":["Hant",["AS"],"晉語"],"ckb":["Arab",["ME"],"کوردیی
 ناوەندی"],"cnh":["Latn",["AS"],"Lai 

[MediaWiki-commits] [Gerrit] operations...apertium-ita[master]: apertium-ita: New upstream release

2017-06-12 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358515 )

Change subject: apertium-ita: New upstream release
..

apertium-ita: New upstream release

Bug: T167247
Change-Id: I829008f19164bbf632fa0e5a22d2493ae78d2dfc
---
M debian/changelog
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium-ita
 refs/changes/15/358515/1

diff --git a/debian/changelog b/debian/changelog
index c70fac6..c302e2e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+apertium-ita (0.9.0~r78828-1+wmf1) jessie-wikimedia; urgency=low
+
+  * New upstream release.
+
+ -- Kartik Mistry   Tue, 13 Jun 2017 11:24:52 +0530
+
 apertium-ita (0.9.0~r72553-1+wmf1) jessie-wikimedia; urgency=low
 
   * Rebuild for Jessie

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I829008f19164bbf632fa0e5a22d2493ae78d2dfc
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/contenttranslation/apertium-ita
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: CX2: Add oojs as dependency to mw.cx.dm module

2017-06-12 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358514 )

Change subject: CX2: Add oojs as dependency to mw.cx.dm module
..

CX2: Add oojs as dependency to mw.cx.dm module

mw.cx.dm is the base RL module for CX2 modules. Since all other
classes inherits from OOJS, it is better to have oojs loaded in the
very beginning of the dependency chain.

Currently it is loaded as dependency to mw.cx.dm.Model. I get random
OO undefined error from mw.cx.dm.SourcePage module in debug mode now.
This patch prevents it.

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/14/358514/1

diff --git a/extension.json b/extension.json
index 52b5b6f..3df9b61 100644
--- a/extension.json
+++ b/extension.json
@@ -1199,7 +1199,8 @@
"dm/mw.cx.dm.js"
],
"dependencies": [
-   "ext.cx.model"
+   "ext.cx.model",
+   "oojs"
]
},
"mw.cx.dm.Model": {
@@ -1209,8 +1210,7 @@
"dm/mw.cx.dm.ModelFactory.js"
],
"dependencies": [
-   "mw.cx.dm",
-   "oojs"
+   "mw.cx.dm"
]
},
"mw.cx.dm.Translation": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7092a279236bd5132cf3b79dc85315e21f75631b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] mediawiki...ArticleFeedbackv5[master]: Add missing dependencies on module 'mediawiki.user'

2017-06-12 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358513 )

Change subject: Add missing dependencies on module 'mediawiki.user'
..

Add missing dependencies on module 'mediawiki.user'

The function mw.user.isAnon() is used in the files:
* ext.articleFeedbackv5/ext.articleFeedbackv5.watchlist.js
* jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
* jquery.articleFeedbackv5/jquery.articleFeedbackv5.js

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 
refs/changes/13/358513/1

diff --git a/extension.json b/extension.json
index bd9fcee..1d4ab22 100644
--- a/extension.json
+++ b/extension.json
@@ -168,6 +168,9 @@
"styles": 
"ext.articleFeedbackv5/ext.articleFeedbackv5.watchlist.css",
"messages": [
"articlefeedbackv5-watchlist-view-feedback"
+   ],
+   "dependencies": [
+   "mediawiki.user"
]
},
"jquery.articleFeedbackv5": {
@@ -276,6 +279,7 @@
"mediawiki.jqueryMsg",
"jquery.effects.highlight",
"mediawiki.Uri",
+   "mediawiki.user",
"mediawiki.util"
]
},
@@ -411,6 +415,7 @@
"articlefeedbackv5-settings-status-disable"
],
"dependencies": [
+   "mediawiki.user",
"mediawiki.util",
"jquery.tipsy",
"jquery.localize",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacd3da4b97268e1b67d409a11f5096c8e49ede08
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] operations...apertium-spa[master]: apertium-spa: New upstream release

2017-06-12 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358512 )

Change subject: apertium-spa: New upstream release
..

apertium-spa: New upstream release

Bug: T167247
Change-Id: Idd43abd500b6a18221f5bcca2ee42c36f3fb5053
---
M debian/changelog
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium-spa
 refs/changes/12/358512/1

diff --git a/debian/changelog b/debian/changelog
index b8e790e..47bf731 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+apertium-spa (1.0.0~r78827-1+wmf1) jessie-wikimedia; urgency=low
+
+  * New upstream release.
+
+ -- Kartik Mistry   Tue, 13 Jun 2017 11:00:17 +0530
+
 apertium-spa (1.0.0~r77293-1+wmf1) jessie-wikimedia; urgency=low
 
   * New upstream release.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd43abd500b6a18221f5bcca2ee42c36f3fb5053
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/contenttranslation/apertium-spa
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeEditor[master]: Add dependency on module 'mediawiki.user'

2017-06-12 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358511 )

Change subject: Add dependency on module 'mediawiki.user'
..

Add dependency on module 'mediawiki.user'

jquery.codeEditor.js uses mw.user.isAnon().

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeEditor 
refs/changes/11/358511/1

diff --git a/extension.json b/extension.json
index 2349736..10d0e14 100644
--- a/extension.json
+++ b/extension.json
@@ -55,6 +55,7 @@
"jquery.ui.resizable",
"mediawiki.api",
"mediawiki.api.options",
+   "mediawiki.user",
"user.options",
"mediawiki.cookie",
"jquery.textSelection",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dd2219bf241a67aefa46efa8f552dea56b3b67d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update jquery.uls from upstream

2017-06-12 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358510 )

Change subject: Update jquery.uls from upstream
..

Update jquery.uls from upstream

* Localization update for Chechen
* Made all autonyms unique. See https://github.com/wikimedia/jquery.uls/pull/265
* Fix tkr autonym

Change-Id: I6c80b28dacaeb26cc158e6c8e715d1f04122b9f9
---
M lib/jquery.uls/i18n/ce.json
M lib/jquery.uls/src/jquery.uls.data.js
2 files changed, 8 insertions(+), 1 deletion(-)


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

diff --git a/lib/jquery.uls/i18n/ce.json b/lib/jquery.uls/i18n/ce.json
index f47dcb6..c75559c 100644
--- a/lib/jquery.uls/i18n/ce.json
+++ b/lib/jquery.uls/i18n/ce.json
@@ -5,10 +5,17 @@
]
},
"uls-region-WW": "Дерригдуьненан",
+   "uls-region-SP": "Леррина",
+   "uls-region-AM": "Америка",
+   "uls-region-AF": "Африка",
+   "uls-region-EU": "Европа",
"uls-region-AS": "Ази",
"uls-region-ME": "Гергара Малхбале",
"uls-region-PA": "Океани",
+   "uls-region-all": "Берриге меттанаш",
"uls-no-results-found": "Цакарийна",
"uls-common-languages": "Ша дӀанисбелла меттанаш",
+   "uls-no-results-suggestion-title": "Хьуна хӀара меттанаш хьашта хила 
мега:",
+   "uls-search-help": "Хьа таро ю меттан я йозанан цӀарца лаха, меттан 
ISO-кодаца я регионаца хьажа.",
"uls-search-placeholder": "Лаха мотт"
 }
diff --git a/lib/jquery.uls/src/jquery.uls.data.js 
b/lib/jquery.uls/src/jquery.uls.data.js
index 04b59d9..210c85d 100644
--- a/lib/jquery.uls/src/jquery.uls.data.js
+++ b/lib/jquery.uls/src/jquery.uls.data.js
@@ -3,5 +3,5 @@
'use strict';
$.uls = $.uls || {};
//noinspection JSHint
-   $.uls.data = {"languages":{"aa":["Latn",["AF"],"Qafár 
af"],"ab":["Cyrl",["EU"],"Аҧсшәа"],"abs":["Latn",["AS"],"Bahasa 
Ambon"],"ace":["Latn",["AS","PA"],"Acèh"],"acf":["Latn",["AM"],"kwéyòl"],"ady":["Cyrl",["EU","ME"],"Адыгабзэ"],"ady-cyrl":["ady"],"ady-latn":["Latn",["EU","ME"],"Adygabze"],"aeb":["aeb-arab"],"aeb-arab":["Arab",["AF"],"تونسي"],"aeb-latn":["Latn",["AF"],"Tûnsî"],"af":["Latn",["AF"],"Afrikaans"],"ahr":["Deva",["AS"],"अहिराणी"],"ais":["Latn",["AS"],"Sakizaya"],"ak":["Latn",["AF"],"Akan"],"akz":["Latn",["AM"],"Albaamo
 
innaaɬiilka"],"aln":["Latn",["EU"],"Gegë"],"am":["Ethi",["AF"],"አማርኛ"],"ami":["Latn",["AS"],"Pangcah"],"an":["Latn",["EU"],"aragonés"],"ang":["Latn",["EU"],"Ænglisc"],"anp":["Deva",["AS"],"अङ्गिका"],"ar":["Arab",["ME"],"العربية"],"arc":["Syrc",["ME"],"ܐܪܡܝܐ"],"arn":["Latn",["AM"],"mapudungun"],"aro":["Latn",["AM"],"Araona"],"arq":["Arab",["AF"],"جازايرية"],"ary":["Latn",["ME"],"Maġribi"],"arz":["Arab",["ME"],"مصرى"],"as":["Beng",["AS"],"অসমীয়া"],"ase":["Sgnw",["AM"],"American
 sign 
language"],"ast":["Latn",["EU"],"asturianu"],"atj":["Latn",["AM"],"atikamekw"],"av":["Cyrl",["EU"],"авар"],"avk":["Latn",["WW"],"Kotava"],"ay":["Latn",["AM"],"Aymar
 
aru"],"az":["az-latn"],"az-arab":["Arab",["AS","ME"],"تۆرکجه"],"az-latn":["Latn",["EU","ME"],"azərbaycanca"],"az-cyrl":["Cyrl",["EU","ME"],"азәрбајҹанҹа"],"azb":["az-arab"],"azj":["az-latn"],"ba":["Cyrl",["EU"],"башҡортса"],"ban":["Bali",["AS"],"ᬩᬲᬩᬮᬶ"],"bar":["Latn",["EU"],"Boarisch"],"bat-smg":["sgs"],"bbc-latn":["Latn",["AS"],"Batak
 Toba"],"bbc-batk":["Batk",["AS"],"Batak Toba"],"bbc":["Latn",["AS"],"Batak 
Toba"],"bcc":["Arab",["AS","ME"],"جهلسری بلوچی"],"bcl":["Latn",["AS"],"Bikol 
Central"],"be-tarask":["Cyrl",["EU"],"беларуская 
(тарашкевіца)"],"be-x-old":["be-tarask"],"be":["Cyrl",["EU"],"беларуская"],"bew":["Latn",["AS"],"Bahasa
 
Betawi"],"bfa":["Latn",["AF"],"Bari"],"bft":["Arab",["AS"],"بلتی"],"bfq":["Taml",["AS"],"படகா"],"bg":["Cyrl",["EU"],"български"],"bgn":["Arab",["AS","ME"],"روچ
 کپتین 
بلوچی"],"bh":["bho"],"bho":["Deva",["AS"],"भोजपुरी"],"bi":["Latn",["PA"],"Bislama"],"bjn":["Latn",["AS"],"Bahasa
 
Banjar"],"bm":["Latn",["AF"],"bamanankan"],"bn":["Beng",["AS"],"বাংলা"],"bo":["Tibt",["AS"],"བོད་ཡིག"],"bpy":["Beng",["AS"],"বিষ্ণুপ্রিয়া
 
মণিপুরী"],"bqi":["Arab",["AS","ME"],"بختیاری"],"br":["Latn",["EU"],"brezhoneg"],"brh":["Latn",["ME","AS"],"Bráhuí"],"brx":["Deva",["AS"],"बड़ो"],"bs":["Latn",["EU"],"bosanski"],"bto":["Latn",["AS"],"Iriga
 Bicolano"],"bug":["Bugi",["AS"],"ᨅᨔ 
ᨕᨘᨁᨗ"],"bxr":["Cyrl",["AS"],"буряад"],"byn":["Ethi",["AF"],"ብሊን"],"ca":["Latn",["EU"],"català"],"cbk-zam":["Latn",["AS"],"Chavacano
 de 
Zamboanga"],"cdo":["Latn",["AS"],"Mìng-dĕ̤ng-ngṳ̄"],"ce":["Cyrl",["EU"],"нохчийн"],"ceb":["Latn",["AS"],"Cebuano"],"ch":["Latn",["PA"],"Chamoru"],"chm":["mhr"],"cho":["Latn",["AM"],"Choctaw"],"chr":["Cher",["AM"],"ᏣᎳᎩ"],"chy":["Latn",["AM"],"Tsetsêhestâhese"],"ciw":["Latn",["AM"],"Ojibwemowin"],"cjy":["cjy-hant"],"cjy-hans":["Hans",["AS"],"晋语(简化字)"],"cjy-hant":["Hant",["AS"],"晉語"],"ckb":["Arab",["ME"],"کوردیی
 ناوەندی"],"cnh":["Latn",["AS"],"Lai 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Update vmware image to 8.8.0

2017-06-12 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358509 )

Change subject: Update vmware image to 8.8.0
..

Update vmware image to 8.8.0

Change-Id: Ia4f5e175bd96d6ef30516a6ebf33ca05a4a556c5
---
M Vagrantfile
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/09/358509/1

diff --git a/Vagrantfile b/Vagrantfile
index 04c5e31..4398c72 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -63,7 +63,7 @@
 
   # VMWare Fusion provider. Enable with `--provider=vmware_fusion`
   config.vm.provider :vmware_fusion do |_vw, override|
-override.vm.box = 'dhoppe/debian-8.7.1-amd64-nocm'
+override.vm.box = 'dhoppe/debian-8.8.0-amd64-nocm'
 override.vm.network :private_network, ip: settings[:static_ip]
   end
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: base/puppet: add "daemonize = no" to agent config

2017-06-12 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358501 )

Change subject: base/puppet: add "daemonize = no" to agent config
..


base/puppet: add "daemonize = no" to agent config

This setting prevents puppet from daemonizing.

Tested with a typo like "puppet agent 0tv" as described
on T166371 it works and prevents it from running.

So instead of adding the monitoring for this, i suggest to
add this to the config and prevent it from happening in the
first place.

https://docs.puppet.com/puppet/latest/man/agent.html

"Do not send the process into the background.
(This is a Puppet setting, and can go in puppet.conf.
Note the special 'no-' prefix for boolean settings on the command line.)"

Bug: T166371
Change-Id: Ie3e3a02b193380cddd9d80465fee16d80fe7644f
---
M modules/base/templates/puppet.conf.d/10-main.conf.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/base/templates/puppet.conf.d/10-main.conf.erb 
b/modules/base/templates/puppet.conf.d/10-main.conf.erb
index fd6dfc0..8a475b4 100644
--- a/modules/base/templates/puppet.conf.d/10-main.conf.erb
+++ b/modules/base/templates/puppet.conf.d/10-main.conf.erb
@@ -20,6 +20,7 @@
 <%- end -%>
 <% if @certname %>certname = <%= @certname %><% end %>
 <% if @dns_alt_names %>dns_alt_names = <%= @dns_alt_names %><% end %>
+daemonize = no
 configtimeout = 960
 usecacheonfailure = false
 splay = true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3e3a02b193380cddd9d80465fee16d80fe7644f
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Volans 
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...RemexHtml[master]: Add contributor list

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

Change subject: Add contributor list
..


Add contributor list

Change-Id: I8a5548d760dc0be7ae6142538c9e94e777fa9709
---
A CREDITS
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/CREDITS b/CREDITS
new file mode 100644
index 000..094293a
--- /dev/null
+++ b/CREDITS
@@ -0,0 +1,3 @@
+- Tim Starling: main developer
+- C. Scott Ananian: many ideas and some code were taken from his Balancer
+  library.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a5548d760dc0be7ae6142538c9e94e777fa9709
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 
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] mediawiki...RemexHtml[master]: Add contributor list

2017-06-12 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358508 )

Change subject: Add contributor list
..

Add contributor list

Change-Id: I8a5548d760dc0be7ae6142538c9e94e777fa9709
---
A CREDITS
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/RemexHtml 
refs/changes/08/358508/1

diff --git a/CREDITS b/CREDITS
new file mode 100644
index 000..094293a
--- /dev/null
+++ b/CREDITS
@@ -0,0 +1,3 @@
+- Tim Starling: main developer
+- C. Scott Ananian: many ideas and some code were taken from his Balancer
+  library.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a5548d760dc0be7ae6142538c9e94e777fa9709
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.4]: Do not try to parse empty argument in getErrorsOrWarnings in...

2017-06-12 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358507 )

Change subject: Do not try to parse empty argument in getErrorsOrWarnings in 
OOUI
..

Do not try to parse empty argument in getErrorsOrWarnings in OOUI

Bug: T167644
Change-Id: I0dcb9bd51ad0cecbdab868fed056b4077d1c9fa8
---
M includes/htmlform/OOUIHTMLForm.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/358507/1

diff --git a/includes/htmlform/OOUIHTMLForm.php 
b/includes/htmlform/OOUIHTMLForm.php
index 6650321..ed99802 100644
--- a/includes/htmlform/OOUIHTMLForm.php
+++ b/includes/htmlform/OOUIHTMLForm.php
@@ -191,6 +191,10 @@
 * @return string
 */
public function getErrorsOrWarnings( $elements, $elementsType ) {
+   if ( $elements === '' ) {
+   return '';
+   }
+
if ( !in_array( $elementsType, [ 'error', 'warning' ], true ) ) 
{
throw new DomainException( $elementsType . ' is not a 
valid type.' );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0dcb9bd51ad0cecbdab868fed056b4077d1c9fa8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.4
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Expose all toolinfo data for indexing

2017-06-12 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358506 )

Change subject: Expose all toolinfo data for indexing
..

Expose all toolinfo data for indexing

Publish all ToolInfo models at an URL that can be registered with Hay's
Directory. Hay's spec allows a single toolinfo.json file to aggregate
multiple tools, so this will let us publish all toolinfo data managed
via Striker for that tool and others to index themselves.

Bug: T149458
Change-Id: I679062cf218266db8a6132ffc3f6fa7afe9043f6
---
M striker/tools/models.py
M striker/tools/urls.py
M striker/tools/views.py
3 files changed, 46 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/06/358506/1

diff --git a/striker/tools/models.py b/striker/tools/models.py
index b1e67da..59c1204 100644
--- a/striker/tools/models.py
+++ b/striker/tools/models.py
@@ -18,6 +18,8 @@
 # You should have received a copy of the GNU General Public License
 # along with Striker.  If not, see .
 
+import collections
+
 from django.conf import settings
 from django.core import urlresolvers
 from django.db import models
@@ -186,3 +188,23 @@
 
 def __str__(self):
 return self.name
+
+def toolinfo(self):
+if self.is_webservice:
+url = 'https://tools.wmflabs.org/{}/{}'.format(
+self.tool,
+self.suburl
+)
+else:
+url = self.docs
+
+return collections.OrderedDict([
+('name', self.name),
+('title', self.title),
+('description', self.description),
+('url', url),
+('keywords', ", ".join(tag.name for tag in self.tags.all())),
+('author', ", ".join(
+a.get_full_name() for a in self.authors.all())),
+('repository', self.repository),
+])
diff --git a/striker/tools/urls.py b/striker/tools/urls.py
index 72bed6b..ceadb76 100644
--- a/striker/tools/urls.py
+++ b/striker/tools/urls.py
@@ -112,4 +112,9 @@
 striker.tools.views.ToolInfoTagAutocomplete.as_view(),
 name='tags_autocomplete'
 ),
+urls.url(
+r'toolinfo/v1/toolinfo.json$',
+'striker.tools.views.toolinfo',
+name='toolinfo'
+),
 ]
diff --git a/striker/tools/views.py b/striker/tools/views.py
index 2f8b853..89f2295 100644
--- a/striker/tools/views.py
+++ b/striker/tools/views.py
@@ -29,9 +29,11 @@
 from django.core import paginator
 from django.core import urlresolvers
 from django.core.exceptions import ObjectDoesNotExist
+from django.core.serializers.json import DjangoJSONEncoder
 from django.db import transaction
 from django.db.utils import DatabaseError
 from django.http import HttpResponseRedirect
+from django.http import JsonResponse
 from django.utils import timezone
 from django.utils.text import slugify
 from django.utils.translation import ugettext_lazy as _
@@ -687,3 +689,20 @@
 
 def create_object(self, text):
 return ToolInfoTag.objects.create(name=text, slug=slugify(text))
+
+
+def toolinfo(req):
+class PrettyPrintJSONEncoder(DjangoJSONEncoder):
+def __init__(self, *args, **kwargs):
+kwargs['indent'] = 2
+kwargs['separators'] = (',', ':')
+super(PrettyPrintJSONEncoder, self).__init__(*args, **kwargs)
+
+return JsonResponse(
+[
+info.toolinfo()
+for info in ToolInfo.objects.all().order_by('name')
+],
+encoder=PrettyPrintJSONEncoder,
+safe=False,
+)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I679062cf218266db8a6132ffc3f6fa7afe9043f6
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

___
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 "tagging" toolinfo records

2017-06-12 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358505 )

Change subject: Add support for "tagging" toolinfo records
..

Add support for "tagging" toolinfo records

Add the ability to create and associate keyword tags with toolinfo
records.

Bug: T149458
Change-Id: Ic2947a1c2e8b44e19804c72d89f95bcd1bf37c0e
---
A contrib/collectstatic.sh
M requirements.txt
M static/css/site.css
M static/js/site.js
M striker/settings.py
M striker/templates/tools/info/create.html
M striker/templates/tools/info/revision/body.html
M striker/templates/tools/info/update.html
M striker/tools/forms.py
A striker/tools/migrations/0007_toolinfo_tags.py
M striker/tools/models.py
M striker/tools/urls.py
M striker/tools/views.py
13 files changed, 115 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/05/358505/1

diff --git a/contrib/collectstatic.sh b/contrib/collectstatic.sh
new file mode 100755
index 000..b79ebaa
--- /dev/null
+++ b/contrib/collectstatic.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+# Ugly collectstatic command to keep django-autocomplete-light from making
+# a mess of the staticfiles directory.
+#
+# Django's collect static maintenance script has an --ignore option, but
+# strangely the way that it is implemented inside the script you can only
+# exclude based on the name of a single directory or file. Ideally you would be
+# able to exclude a more descriptive path such as
+# django-autocomplete-light/vendor/vendor
+#
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+$DIR/manage.sh collectstatic -c --noinput \
+--ignore i18n \
+--ignore src \
+--ignore tests \
+--ignore *.json \
+--ignore Gruntfile.js
diff --git a/requirements.txt b/requirements.txt
index b9812b8..717f196 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,6 +3,7 @@
 diff-match-patch>=20121119  # Apache 2.0
 Django<1.9,>=1.8.14  # BSD
 django-auth-ldap>=1.2.8  # BSD
+django-autocomplete-light>=3.2.8  # MIT
 django-bootstrap3<8.0.0,>=7.0.0  # Apache 2.0
 django-csp>=2.0.3  # BSD
 django-formtools>=1.0  # BSD
diff --git a/static/css/site.css b/static/css/site.css
index 2876a38..f665940 100644
--- a/static/css/site.css
+++ b/static/css/site.css
@@ -151,6 +151,12 @@
 .toolinfo-details {
   margin-top:.5em;
 }
+.toolinfo-tags .label-default {
+  background-color:#fdf3da;
+  border-radius:3px;
+  border:1px solid #e9dbcd;
+  color:#726f56;
+}
 .diff del,
 .diff ins {
   color:#333;
diff --git a/static/js/site.js b/static/js/site.js
index d99edcf..1e172a6 100644
--- a/static/js/site.js
+++ b/static/js/site.js
@@ -10,4 +10,11 @@
 notify_refresh_period=6;
 notify_api_url='/alerts/api/unread_count/';
 register_notifier(fill_notification_badge);
+
+// Work around for
+// https://github.com/yourlabs/django-autocomplete-light/issues/772
+var $csrf = $('form :input[name="csrfmiddlewaretoken"]');
+if ($csrf.length > 0) {
+document.csrftoken = $csrf[0].value;
+}
 })
diff --git a/striker/settings.py b/striker/settings.py
index 63c0abf..1b5c312 100644
--- a/striker/settings.py
+++ b/striker/settings.py
@@ -130,6 +130,8 @@
 
 INSTALLED_APPS = (
 'bootstrap3',
+'dal',
+'dal_select2',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
diff --git a/striker/templates/tools/info/create.html 
b/striker/templates/tools/info/create.html
index d401569..28c8df6 100644
--- a/striker/templates/tools/info/create.html
+++ b/striker/templates/tools/info/create.html
@@ -25,7 +25,7 @@
 
   
   
-
+
   {% csrf_token %}
   {% bootstrap_form form %}
   {% buttons %}
@@ -42,4 +42,5 @@
 {{ block.super }}
 
 
+{{ form.media }}
 {% endblock %}
diff --git a/striker/templates/tools/info/revision/body.html 
b/striker/templates/tools/info/revision/body.html
index 5f9a3e8..cc40ff4 100644
--- a/striker/templates/tools/info/revision/body.html
+++ b/striker/templates/tools/info/revision/body.html
@@ -1,3 +1,4 @@
+{% load bootstrap3 %}
 {% load i18n %}
 
   {{ toolinfo.description|striptags }}
@@ -19,4 +20,9 @@
   {% endif %}
 
   
+  
+{% for tag in toolinfo.tags.all %}
+{% bootstrap_icon "tag" %} {{ tag.name 
}}
+{% endfor %}
+  
 
diff --git a/striker/templates/tools/info/update.html 
b/striker/templates/tools/info/update.html
index 7cf2b28..6a32fe3 100644
--- a/striker/templates/tools/info/update.html
+++ b/striker/templates/tools/info/update.html
@@ -38,7 +38,7 @@
 
   
   
-
+
   {% csrf_token %}
   {% bootstrap_form form %}
   {% buttons %}
@@ -55,4 +55,5 @@
 {{ block.super }}
 
 
+{{ form.media }}
 {% endblock %}
diff --git a/striker/tools/forms.py b/striker/tools/forms.py
index edc4612..47a821f 100644
--- a/striker/tools/forms.py
+++ b/striker/tools/forms.py
@@ -23,6 +23,7 @@
 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: lists/icinga: remove mailman I/O stat CRITs

2017-06-12 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358504 )

Change subject: lists/icinga: remove mailman I/O stat CRITs
..

lists/icinga: remove mailman I/O stat CRITs

Change-Id: I72f78f4e9846bbd51e3042f1c82c4011f1a35b81
---
M modules/profile/manifests/lists.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/358504/1

diff --git a/modules/profile/manifests/lists.pp 
b/modules/profile/manifests/lists.pp
index 573e7dc..e5b3a87 100644
--- a/modules/profile/manifests/lists.pp
+++ b/modules/profile/manifests/lists.pp
@@ -127,7 +127,7 @@
 nrpe::monitor_service { 'mailman_iostat':
 description  => 'mailman I/O stats',
 nrpe_command => "/usr/local/lib/nagios/plugins/check_iostat \
--i -w 250,350,300,14000,7500 -c 
500,400,600,28000,11000 -d ${iostat_device}",
+-i -w 250,350,300,14000,7500 -d ${iostat_device}",
 timeout  => '30',
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wikistats: move dump dir out of define, duplicate declaration

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

Change subject: wikistats: move dump dir out of define, duplicate declaration
..


wikistats: move dump dir out of define, duplicate declaration

Change-Id: Icf3e9b1e306139043f3ac49b99b1592a96dd160f
---
M modules/wikistats/manifests/cronjob/xmldump.pp
M modules/wikistats/manifests/init.pp
2 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/modules/wikistats/manifests/cronjob/xmldump.pp 
b/modules/wikistats/manifests/cronjob/xmldump.pp
index 6877864..eb515f7 100644
--- a/modules/wikistats/manifests/cronjob/xmldump.pp
+++ b/modules/wikistats/manifests/cronjob/xmldump.pp
@@ -15,13 +15,6 @@
 
 $command = "mysql -X -u ${db_user} -p${db_pass} -e '${query}' ${db_name} > 
${file_path}/${table}.xml"
 
-file { $file_path:
-ensure => directory,
-owner  => 'wikistatsuser',
-group  => '-data',
-mode   => '0644',
-}
-
 cron { "cron-wikistats-xmldump-${name}":
 ensure  => present,
 command => $command,
diff --git a/modules/wikistats/manifests/init.pp 
b/modules/wikistats/manifests/init.pp
index 715822d..a2c7e8d 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -79,6 +79,13 @@
 }
 
 # scripts and crons to update data and dump XML files
+file { '/var/www/wikistats/xml':
+ensure => directory,
+owner  => 'wikistatsuser',
+group  => '-data',
+mode   => '0644',
+}
+
 class { 'wikistats::updates':
 db_pass => $db_pass,
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf3e9b1e306139043f3ac49b99b1592a96dd160f
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wikistats: move dump dir out of define, duplicate declaration

2017-06-12 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358503 )

Change subject: wikistats: move dump dir out of define, duplicate declaration
..

wikistats: move dump dir out of define, duplicate declaration

Change-Id: Icf3e9b1e306139043f3ac49b99b1592a96dd160f
---
M modules/wikistats/manifests/cronjob/xmldump.pp
M modules/wikistats/manifests/init.pp
2 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/358503/1

diff --git a/modules/wikistats/manifests/cronjob/xmldump.pp 
b/modules/wikistats/manifests/cronjob/xmldump.pp
index 6877864..eb515f7 100644
--- a/modules/wikistats/manifests/cronjob/xmldump.pp
+++ b/modules/wikistats/manifests/cronjob/xmldump.pp
@@ -15,13 +15,6 @@
 
 $command = "mysql -X -u ${db_user} -p${db_pass} -e '${query}' ${db_name} > 
${file_path}/${table}.xml"
 
-file { $file_path:
-ensure => directory,
-owner  => 'wikistatsuser',
-group  => '-data',
-mode   => '0644',
-}
-
 cron { "cron-wikistats-xmldump-${name}":
 ensure  => present,
 command => $command,
diff --git a/modules/wikistats/manifests/init.pp 
b/modules/wikistats/manifests/init.pp
index 715822d..9e91519 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -79,6 +79,13 @@
 }
 
 # scripts and crons to update data and dump XML files
+file { $file_path:
+ensure => directory,
+owner  => 'wikistatsuser',
+group  => '-data',
+mode   => '0644',
+}
+
 class { 'wikistats::updates':
 db_pass => $db_pass,
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wikistats: add cron jobs for XML dumps

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

Change subject: wikistats: add cron jobs for XML dumps
..


wikistats: add cron jobs for XML dumps

Bug:T165879
Change-Id: I76c4390342ca8347229e2e781292a3f2f9f54369
---
A modules/wikistats/manifests/cronjob/xmldump.pp
M modules/wikistats/manifests/init.pp
M modules/wikistats/manifests/updates.pp
3 files changed, 48 insertions(+), 4 deletions(-)

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



diff --git a/modules/wikistats/manifests/cronjob/xmldump.pp 
b/modules/wikistats/manifests/cronjob/xmldump.pp
new file mode 100644
index 000..6877864
--- /dev/null
+++ b/modules/wikistats/manifests/cronjob/xmldump.pp
@@ -0,0 +1,32 @@
+# define a cronjob to dump xml tables
+define wikistats::cronjob::xmldump(
+$table,
+$minute,
+$db_pass,
+$db_user = 'wikistatsuser',
+$db_name = 'wikistats',
+$file_path = '/var/www/wikistats/xml',
+){
+
+$query = $table ? {
+'wikipedias' => 'SELECT *,good/total AS ratio FROM wikipedias WHERE 
lang NOT LIKE \"%articles%\" ORDER BY good desc,total desc',
+default  => "SELECT *,good/total AS ratio FROM ${table} ORDER BY 
good desc,total desc",
+}
+
+$command = "mysql -X -u ${db_user} -p${db_pass} -e '${query}' ${db_name} > 
${file_path}/${table}.xml"
+
+file { $file_path:
+ensure => directory,
+owner  => 'wikistatsuser',
+group  => '-data',
+mode   => '0644',
+}
+
+cron { "cron-wikistats-xmldump-${name}":
+ensure  => present,
+command => $command,
+user=> 'wikistatsuser',
+minute  => $minute,
+}
+}
+
diff --git a/modules/wikistats/manifests/init.pp 
b/modules/wikistats/manifests/init.pp
index c3e30f1..715822d 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -71,12 +71,16 @@
 wikistats_host => $wikistats_host,
 }
 
-# data update scripts/crons for wikistats
-class { 'wikistats::updates': }
+$db_pass = fqdn_rand_string(23, 'Random9Fn0rd8Seed')
 
 # install a db on localhost
 class { 'wikistats::db':
-db_pass => fqdn_rand_string(23, 'Random9Fn0rd8Seed'),
+db_pass => $db_pass,
+}
+
+# scripts and crons to update data and dump XML files
+class { 'wikistats::updates':
+db_pass => $db_pass,
 }
 }
 
diff --git a/modules/wikistats/manifests/updates.pp 
b/modules/wikistats/manifests/updates.pp
index 1d94d8d..4c51ed0 100644
--- a/modules/wikistats/manifests/updates.pp
+++ b/modules/wikistats/manifests/updates.pp
@@ -2,7 +2,9 @@
 # and writing it to local mariadb
 #FIXME - this was used in labs in the past but is gone unfortunately
 #require misc::mariadb::server
-class wikistats::updates {
+class wikistats::updates (
+$db_pass,
+) {
 
 # update scripts are PHP-cli
 if os_version('debian >= stretch') {
@@ -55,6 +57,12 @@
 'w3@23', # W3C
 ]: }
 
+# dump xml data: usage: @
+wikistats::cronjob::xmldump {
+'wp' : db_pass => $db_pass, table => 'wikipedias',   minute => '3';
+'wt' : db_pass => $db_pass, table => 'wiktionaries', minute => '5';
+}
+
 # imports (fetching lists of wikis itself) usage: @
 wikistats::cronjob::import { [
 'miraheze@5', # https://phabricator.wikimedia.org/T153930

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76c4390342ca8347229e2e781292a3f2f9f54369
Gerrit-PatchSet: 8
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RandomFeaturedUser[master]: Version 1.5: add CSS

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

Change subject: Version 1.5: add CSS
..


Version 1.5: add CSS

This CSS was originally bundled with some Wikia/ArmchairGM skins, such as
Nimbus and Monaco.

Change-Id: I9c0f1375b5f15b83fe3bc4859841735bfbe0a0df
---
M RandomFeaturedUser.class.php
A RandomFeaturedUser.css
M extension.json
3 files changed, 45 insertions(+), 4 deletions(-)

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



diff --git a/RandomFeaturedUser.class.php b/RandomFeaturedUser.class.php
index 7e13023..8629915 100644
--- a/RandomFeaturedUser.class.php
+++ b/RandomFeaturedUser.class.php
@@ -43,6 +43,9 @@
return '';
}
 
+   // Add CSS
+   $parser->getOutput()->addModuleStyles( 
'ext.RandomFeaturedUser.css' );
+
$user_list = array();
$count = 20;
$realCount = 10;
diff --git a/RandomFeaturedUser.css b/RandomFeaturedUser.css
new file mode 100644
index 000..5984f45
--- /dev/null
+++ b/RandomFeaturedUser.css
@@ -0,0 +1,30 @@
+.random-featured-user {
+   font-size: 11px;
+   color: #333;
+   line-height: 14px;
+   margin: 10px 0 0 0;
+}
+
+.random-featured-user img {
+   float: left;
+   border: 1px solid #dcdcdc;
+   padding: 3px;
+   background-color: #fff;
+   display: block;
+   text-align: justify;
+   margin: 0 10px 0 0;
+}
+
+.random-featured-user-title {
+   margin: 0 0 6px 0;
+}
+
+.random-featured-user-title a {
+   text-decoration: none;
+   font-size: 14px;
+   font-weight: bold;
+}
+
+.random-featured-user-about-title {
+   font-weight: bold;
+}
\ No newline at end of file
diff --git a/extension.json b/extension.json
index bd057ae..56db04e 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "RandomFeaturedUser",
-   "version": "1.4",
+   "version": "1.5",
"author": [
"David Pean",
"Jack Phoenix"
@@ -25,9 +25,17 @@
"RandomFeaturedUser": "RandomFeaturedUser.class.php"
},
"Hooks": {
-   "ParserFirstCallInit": [
-   "RandomFeaturedUser::onParserFirstCallInit"
-   ]
+   "ParserFirstCallInit": 
"RandomFeaturedUser::onParserFirstCallInit"
+   },
+   "ResourceModules": {
+   "ext.RandomFeaturedUser.css": {
+   "styles": "RandomFeaturedUser.css",
+   "position": "top"
+   }
+   },
+   "ResourceFileModulePaths": {
+   "localBasePath": "",
+   "remoteExtPath": "RandomFeaturedUser"
},
"manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c0f1375b5f15b83fe3bc4859841735bfbe0a0df
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/RandomFeaturedUser
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
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...Nimbus[master]: Removing CSS related to the ImageImport & VideoImport extens...

2017-06-12 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358502 )

Change subject: Removing CSS related to the ImageImport & VideoImport extensions
..

Removing CSS related to the ImageImport & VideoImport extensions

ImageImport was essentially a reworked version of the ImportFreeImages
extension and VideoImport is nowadays broken due to internal YouTube API
changes, and hence neither of those extensions will make a comeback, and
as such, there's no point in keeping their styles around.

Change-Id: Iaa1aca2c71b4af4443d1d2699f335c4e71f3e521
---
M nimbus/Nimbus.css
1 file changed, 0 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Nimbus 
refs/changes/02/358502/1

diff --git a/nimbus/Nimbus.css b/nimbus/Nimbus.css
index f4744d2..f5f2d42 100644
--- a/nimbus/Nimbus.css
+++ b/nimbus/Nimbus.css
@@ -852,50 +852,6 @@
color: #002BB8;
 }
 
-/** Import Video/Image **/
-.loading-message {
-   background-color: #F15A3A;
-   position: absolute;
-   z-index: 1000;
-   padding: 1px 3px;
-}
-
-.import-subtitle {
-   margin: 10px 0px 0px 0px;
-   font-size: 12px;
-   font-weight: normal;
-}
-
-.image-options, .video-options {
-   padding: 15px 0px;
-}
-
-.selected-photos, .selected-videos {
-   margin: 20px 0px;
-}
-
-.video-options-button, .image-options-button {
-   background-color: orange;
-   border: 1px solid orange;
-}
-
-.video-options-button a, .image-options-button a {
-   color: #FFF;
-   font-weight: normal;
-}
-
-.video-options-button a:hover, .image-options-button a:hover {
-   text-decoration: none;
-}
-
-.import-left-content {
-   width: 60%;
-}
-
-.import-search, .flickr-image-container, .youtube-video-container, 
.youtube-results {
-   width: 100%;
-}
-
 /** Top Lists **/
 .top-users {
margin: 15px 0px 0px !important;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa1aca2c71b4af4443d1d2699f335c4e71f3e521
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Nimbus
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/core[master]: ApiParse: Clean up parsing code

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

Change subject: ApiParse: Clean up parsing code
..


ApiParse: Clean up parsing code

Now that ParserOptions->isSafeToCache() exists, use it where necessary.
This also moves the use inside the makeParserOptions() method so other
callers can pick it up as well.

Then pass the flag as $forceParse into WikiPage::getParserOutput()
instead of duplicating the logic in several cases, and generally clean
up the logic in the module to let WikiPage decide when to use the cache
in more cases.

Change-Id: I0079e10a40997e4a3b59ac21ef6c92246a147736
---
M includes/api/ApiParse.php
M tests/phpunit/includes/api/ApiParseTest.php
2 files changed, 169 insertions(+), 81 deletions(-)

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



diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index 91e49ab..402494c 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -38,6 +38,9 @@
/** @var Content $pstContent */
private $pstContent = null;
 
+   /** @var bool */
+   private $contentIsDeleted = false, $contentIsSuppressed = false;
+
public function execute() {
// The data is hot but user-dependent, like page views, so we 
set vary cookies
$this->getMain()->setCacheMode( 'anon-public-user-private' );
@@ -110,27 +113,9 @@
$wgTitle = $titleObj;
$pageObj = WikiPage::factory( $titleObj );
list( $popts, $reset, $suppressCache ) = 
$this->makeParserOptions( $pageObj, $params );
-
-   // If for some reason the "oldid" is actually 
the current revision, it may be cached
-   // Deliberately comparing $pageObj->getLatest() 
with $rev->getId(), rather than
-   // checking $rev->isCurrent(), because $pageObj 
is what actually ends up being used,
-   // and if its ->getLatest() is outdated, 
$rev->isCurrent() won't tell us that.
-   if ( !$suppressCache && $rev->getId() == 
$pageObj->getLatest() ) {
-   // May get from/save to parser cache
-   $p_result = $this->getParsedContent( 
$pageObj, $popts,
-   $pageid, isset( 
$prop['wikitext'] ) );
-   } else { // This is an old revision, so get the 
text differently
-   $this->content = $rev->getContent( 
Revision::FOR_THIS_USER, $this->getUser() );
-
-   if ( $this->section !== false ) {
-   $this->content = 
$this->getSectionContent(
-   $this->content, 
$this->msg( 'revid', $rev->getId() )
-   );
-   }
-
-   // Should we save old revision parses 
to the parser cache?
-   $p_result = 
$this->content->getParserOutput( $titleObj, $rev->getId(), $popts );
-   }
+   $p_result = $this->getParsedContent(
+   $pageObj, $popts, $suppressCache, 
$pageid, $rev, isset( $prop['wikitext'] )
+   );
} else { // Not $oldid, but $pageid or $page
if ( $params['redirects'] ) {
$reqParams = [
@@ -172,25 +157,9 @@
}
 
list( $popts, $reset, $suppressCache ) = 
$this->makeParserOptions( $pageObj, $params );
-
-   // Don't pollute the parser cache when setting 
options that aren't
-   // in ParserOptions::optionsHash()
-   /// @todo: This should be handled closer to the 
actual cache instead of here, see T110269
-   $suppressCache = $suppressCache ||
-   $params['disablepp'] ||
-   $params['disablelimitreport'] ||
-   $params['preview'] ||
-   $params['sectionpreview'] ||
-   $params['disabletidy'];
-
-   if ( $suppressCache ) {
-   $this->content = $this->getContent( 
$pageObj, $pageid );
-   $p_result = 
$this->content->getParserOutput( $titleObj, null, $popts );
-  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: base/puppet: add "daemonize = no" to agent config

2017-06-12 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358501 )

Change subject: base/puppet: add "daemonize = no" to agent config
..

base/puppet: add "daemonize = no" to agent config

This setting prevents puppet from daemonizing.

Tested with a typo like "puppet agent 0tv" as described
on T166371 it works and prevents it from running.

So instead of adding the monitoring for this, i suggest to
add this to the config and prevent it from happening in the
first place.

Bug: T166371
Change-Id: Ie3e3a02b193380cddd9d80465fee16d80fe7644f
---
M modules/base/templates/puppet.conf.d/10-main.conf.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/358501/1

diff --git a/modules/base/templates/puppet.conf.d/10-main.conf.erb 
b/modules/base/templates/puppet.conf.d/10-main.conf.erb
index fd6dfc0..8a475b4 100644
--- a/modules/base/templates/puppet.conf.d/10-main.conf.erb
+++ b/modules/base/templates/puppet.conf.d/10-main.conf.erb
@@ -20,6 +20,7 @@
 <%- end -%>
 <% if @certname %>certname = <%= @certname %><% end %>
 <% if @dns_alt_names %>dns_alt_names = <%= @dns_alt_names %><% end %>
+daemonize = no
 configtimeout = 960
 usecacheonfailure = false
 splay = true

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: replace references to RT tickets with Phab ticket numbers

2017-06-12 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358500 )

Change subject: replace references to RT tickets with Phab ticket numbers
..

replace references to RT tickets with Phab ticket numbers

..where possible. (tickets that were not in the "ops-request" or
"core-ops" queues in RT have not been imported)

Unlike with Bugzilla tickets there is no fixed offset for imported
RT tickets. They can be found by using "advanced search" and
"rt1234" in the "reference" field.

Bug: T165733
Change-Id: I153eb240464cf65763a0f9359e39a85cd46a24f6
---
M modules/deployment/files/umask-wikidev-profile-d.sh
M modules/mediawiki/files/apache/sites/main.conf
M modules/mediawiki/files/apache/sites/redirects/redirects.dat
M modules/mediawiki/files/apache/sites/wikimedia.conf
M modules/mediawiki/manifests/maintenance/refreshlinks.pp
M modules/phabricator/templates/community_metrics.sh.erb
M modules/swift/manifests/storage/monitoring.pp
7 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/358500/1

diff --git a/modules/deployment/files/umask-wikidev-profile-d.sh 
b/modules/deployment/files/umask-wikidev-profile-d.sh
index 2406f4e..cd156dd 100644
--- a/modules/deployment/files/umask-wikidev-profile-d.sh
+++ b/modules/deployment/files/umask-wikidev-profile-d.sh
@@ -1,6 +1,6 @@
 # !this file is managed by puppet!
 # set umask to 0002 for wikidev users
-# to prevent broken repos per RT-804
+# to prevent broken repos per T79400
 if groups | grep -w -q wikidev; then
   umask 0002
 else
diff --git a/modules/mediawiki/files/apache/sites/main.conf 
b/modules/mediawiki/files/apache/sites/main.conf
index a433f3a..d5edb6e 100644
--- a/modules/mediawiki/files/apache/sites/main.conf
+++ b/modules/mediawiki/files/apache/sites/main.conf
@@ -117,7 +117,7 @@
 ProxyPassMatch  ^/w/(.*\.(php|hh))$  
fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wiktionary.org/w/$1
 RewriteRule ^/w/wiki\.phtml$ /w/index.php [L,QSA,NE]
 
-# ShortURL redirect RT-2121
+# ShortURL redirect T80309
 RewriteRule ^/s/.*$ /w/index.php
 
 # Uploads to the host-specific directory
diff --git a/modules/mediawiki/files/apache/sites/redirects/redirects.dat 
b/modules/mediawiki/files/apache/sites/redirects/redirects.dat
index 1e6885a0..5df3fee 100644
--- a/modules/mediawiki/files/apache/sites/redirects/redirects.dat
+++ b/modules/mediawiki/files/apache/sites/redirects/redirects.dat
@@ -164,7 +164,7 @@
 rewrite*wikiknihy.cz   //cs.wikibooks.org
 rewrite*wikisource.pl  //pl.wikisource.org
 
-# RT-3244
+# T81228
 override   *wikipedie.cz/Experti_na_prirodu
//cs.wikipedia.org/wiki/Wikipedie:WikiProjekt_Chráněná_území/Experti_na_přírodu
 override   *wikipedie.cz/Experti-na-prirodu
//cs.wikipedia.org/wiki/Wikipedie:WikiProjekt_Chráněná_území/Experti_na_přírodu
 override   *wikipedie.cz/experti_na_prirodu
//cs.wikipedia.org/wiki/Wikipedie:WikiProjekt_Chráněná_území/Experti_na_přírodu
diff --git a/modules/mediawiki/files/apache/sites/wikimedia.conf 
b/modules/mediawiki/files/apache/sites/wikimedia.conf
index 796e7ea..c3521eb 100644
--- a/modules/mediawiki/files/apache/sites/wikimedia.conf
+++ b/modules/mediawiki/files/apache/sites/wikimedia.conf
@@ -31,7 +31,7 @@
 Include "sites-enabled/wikimedia-common.incl"
 
 
-# transitionteam private wiki - RT-4850
+# transitionteam private wiki - T82329
 
 ServerName transitionteam.wikimedia.org
 
@@ -41,7 +41,7 @@
 Include "sites-enabled/wikimedia-common.incl"
 
 
-# iegcom private wiki - RT-5042
+# iegcom private wiki - T82498
 
 ServerName iegcom.wikimedia.org
 
diff --git a/modules/mediawiki/manifests/maintenance/refreshlinks.pp 
b/modules/mediawiki/manifests/maintenance/refreshlinks.pp
index d76475f..8d6ba5b 100644
--- a/modules/mediawiki/manifests/maintenance/refreshlinks.pp
+++ b/modules/mediawiki/manifests/maintenance/refreshlinks.pp
@@ -1,4 +1,4 @@
-# Include this to add cron jobs calling refreshLinks.php on all clusters. 
(RT-2355)
+# Include this to add cron jobs calling refreshLinks.php on all clusters. 
(T80599)
 class mediawiki::maintenance::refreshlinks( $ensure = present ) {
 
 require ::mediawiki
diff --git a/modules/phabricator/templates/community_metrics.sh.erb 
b/modules/phabricator/templates/community_metrics.sh.erb
index e2a3555..389cb2c 100644
--- a/modules/phabricator/templates/community_metrics.sh.erb
+++ b/modules/phabricator/templates/community_metrics.sh.erb
@@ -1,7 +1,7 @@
 #!/bin/bash
 # send the number of active users on Bugzilla Phabricator
 # in the last month to "community metrics" team
-# per RT-3962 - dzahn 20121219
+# per T81784 - dzahn 20121219
 # per T1003 - dzahn,aklapper 20141205
 # ! this file is managed by puppet !
 # ./modules/phabricator/templates/<%= @script_name %>.erb
diff --git a/modules/swift/manifests/storage/monitoring.pp 

[MediaWiki-commits] [Gerrit] performance/WebPageTest[master]: Increase wait time to second view to 30s

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

Change subject: Increase wait time to second view to 30s
..


Increase wait time to second view to 30s

Bug: T166711
Change-Id: I526ab68ae2e9bdc23bc99791ed104763bbc4d4a4
---
M scripts/wptscripts/second-view-desktop-enwiki-elizabeth.txt
M scripts/wptscripts/second-view-desktop-enwiki-facebook.txt
M scripts/wptscripts/second-view-mobile-enwiki-elizabeth.txt
M scripts/wptscripts/second-view-mobile-enwiki-facebook.txt
4 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/scripts/wptscripts/second-view-desktop-enwiki-elizabeth.txt 
b/scripts/wptscripts/second-view-desktop-enwiki-elizabeth.txt
index 3687705..733adf7 100644
--- a/scripts/wptscripts/second-view-desktop-enwiki-elizabeth.txt
+++ b/scripts/wptscripts/second-view-desktop-enwiki-elizabeth.txt
@@ -3,7 +3,7 @@
 
 // Erase the current HTML to make the video easier to understand
 exec document.body.innerHTML = "";
-sleep  1
+sleep  30
 
 logData 1
 navigate https://en.wikipedia.org/wiki/Elizabeth_I_of_England
diff --git a/scripts/wptscripts/second-view-desktop-enwiki-facebook.txt 
b/scripts/wptscripts/second-view-desktop-enwiki-facebook.txt
index 221ebf8..ec3b832 100644
--- a/scripts/wptscripts/second-view-desktop-enwiki-facebook.txt
+++ b/scripts/wptscripts/second-view-desktop-enwiki-facebook.txt
@@ -3,7 +3,7 @@
 
 // Erase the current HTML to make the video easier to understand
 exec document.body.innerHTML = "";
-sleep  1
+sleep  30
 
 logData 1
 navigate https://en.wikipedia.org/wiki/Facebook
diff --git a/scripts/wptscripts/second-view-mobile-enwiki-elizabeth.txt 
b/scripts/wptscripts/second-view-mobile-enwiki-elizabeth.txt
index 88ff392..98472f8 100644
--- a/scripts/wptscripts/second-view-mobile-enwiki-elizabeth.txt
+++ b/scripts/wptscripts/second-view-mobile-enwiki-elizabeth.txt
@@ -3,7 +3,7 @@
 
 // Erase the current HTML to make the video easier to understand
 exec document.body.innerHTML = "";
-sleep  1
+sleep  30
 
 logData 1
 navigate https://en.m.wikipedia.org/wiki/Elizabeth_I_of_England
diff --git a/scripts/wptscripts/second-view-mobile-enwiki-facebook.txt 
b/scripts/wptscripts/second-view-mobile-enwiki-facebook.txt
index de6bd12..c0aa40b 100644
--- a/scripts/wptscripts/second-view-mobile-enwiki-facebook.txt
+++ b/scripts/wptscripts/second-view-mobile-enwiki-facebook.txt
@@ -3,7 +3,7 @@
 
 // Erase the current HTML to make the video easier to understand
 exec document.body.innerHTML = "";
-sleep  1
+sleep  30
 
 logData 1
 navigate https://en.m.wikipedia.org/wiki/Facebook

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I526ab68ae2e9bdc23bc99791ed104763bbc4d4a4
Gerrit-PatchSet: 1
Gerrit-Project: performance/WebPageTest
Gerrit-Branch: master
Gerrit-Owner: Phedenskog 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Phedenskog 
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...DeepSea[master]: Clean up CSS per MediaWiki coding conventions, removed BOMs

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

Change subject: Clean up CSS per MediaWiki coding conventions, removed BOMs
..


Clean up CSS per MediaWiki coding conventions, removed BOMs

Change-Id: I843161da9a51dfffe4471ae437fc1c767e74e5b5
---
M deepsea/big.css
M deepsea/interactive.css
M deepsea/screen.css
M deepsea/small.css
M deepsea/special.preferences.styles.css
M skin.json
6 files changed, 739 insertions(+), 586 deletions(-)

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



diff --git a/deepsea/big.css b/deepsea/big.css
index 9694bec..7b8b16f 100644
--- a/deepsea/big.css
+++ b/deepsea/big.css
@@ -1 +1,49 @@
-div#mw-panel {
left: 0px;
top: 170px !important;
}

div#content {
margin-left: 15%;
margin-right: 1em;
}


/* Navigation Containers */
#left-navigation {
left: 15%;
top: 3.5em;
}
#right-navigation {
margin-top: 3.5em;
margin-right: 1em;
}

#p-logo {
position: absolute;
top: -9em;
left: 0;
width: 100%;
height: 6em;
}

.mobile {
display:none !important;
}

#p-search {
border-top-right-radius: 1em;
}

#p-ad-container {
margin-right: 1.25em;
}
#p-ad-ad {
margin: auto;
width: 120px;
}

#footer ins {
display: block !important;
}
\ No newline at end of file
+div#mw-panel {
+   left: 0;
+   top: 170px !important;
+}
+
+div #content {
+   margin-left: 15%;
+   margin-right: 1em;
+}
+
+/* Navigation Containers */
+#left-navigation {
+   left: 15%;
+   top: 3.5em;
+}
+
+#right-navigation {
+   margin-top: 3.5em;
+   margin-right: 1em;
+}
+
+#p-logo {
+   position: absolute;
+   top: -9em;
+   left: 0;
+   width: 100%;
+   height: 6em;
+}
+
+.mobile {
+   display: none !important;
+}
+
+#p-search {
+   border: 0 1em 0 0;
+}
+
+#p-ad-container {
+   margin-right: 1.25em;
+}
+
+#p-ad-ad {
+   margin: auto;
+   width: 120px;
+}
+
+#footer ins {
+   display: block !important;
+}
diff --git a/deepsea/interactive.css b/deepsea/interactive.css
index fcbecf9..3e4eaba 100644
--- a/deepsea/interactive.css
+++ b/deepsea/interactive.css
@@ -1,4 +1,3 @@
-/* INTERACTIVE.CSS */
 .vectorTabs li,
 .vectorMenu li,
 .vectorMenu {
diff --git a/deepsea/screen.css b/deepsea/screen.css
index daa4ff5..c866278 100644
--- a/deepsea/screen.css
+++ b/deepsea/screen.css
@@ -23,404 +23,450 @@
font-family: sans-serif;
font-size: 1em;
 }
+
 /* Content */
 div#content {
-   border-right: 0px;
+   border-right: 0;
padding: 1em;
direction: ltr;
-   background-color: white;
+   background-color: #fff;
line-height: 1.5em;
color: #252525;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
 }
+
 /* Head */
 #mw-page-base {
height: 6em;
 }
+
 #mw-head-base {
margin-top: -6em;
margin-left: 15%;
height: 6em;
 }
+
 div#mw-head {
position: absolute;
top: 0;
right: 0;
width: 100%;
 }
+
 div#mw-head h5 {
margin: 0;
padding: 0;
 }
-   /* Hide empty portlets */
-   div.emptyPortlet {
-   display: none;
-   }
-   /* Personal */
-   #p-personal {
-   position: absolute;
-   top: 0;
-   right: 0;
-   border-bottom-left-radius: 1em;
-   }
-   #p-personal h5 {
-   display: none;
-   }
-   #p-personal ul {
-   list-style: none;
-   margin: 0;
-   }
-   #p-personal li:first-child {
-   border-bottom-left-radius: 1em;
-   }
-   #p-personal li:last-child {
-   padding-right: 10px;
-   }
 
-   /* @noflip */
-   div.top-nav li {
-   line-height: 1.125em;
-   float: left;
-   }
-   /* This flips! */
-   div.top-nav li {
-   padding: 0.5em;
-   padding-right: 0.25em;
-   padding-left: 0.25em;
-   font-size: 0.75em;
-   white-space: nowrap;
-   }
-   div.top-nav li a {
-   padding: 0.5em;
-   }
-   div.top-nav li a:hover {
-   text-decoration: none;
-   }
+/* Hide empty portlets */
+div.emptyPortlet {
+   display: none;
+}
 
-   /* Navigation Containers */
-   #left-navigation {
-   position: absolute;
-   }
-   #right-navigation {
-   float: right;
-   }
-   /* Navigation Labels */
-   div.vectorTabs h5,
-   div.vectorMenu h5 span {
-   display: none;
-   }
-   /* Namespaces and Views */
-   /* @noflip */
-   div.vectorTabs {
-   float: left;
-   height: 2.5em;
-   }
-   /* @noflip */
-   

[MediaWiki-commits] [Gerrit] oojs/ui[master]: MenuSelectWidget: Fix item hiding when menu contents change

2017-06-12 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358499 )

Change subject: MenuSelectWidget: Fix item hiding when menu contents change
..

MenuSelectWidget: Fix item hiding when menu contents change

updateItemVisibility() adds a CSS class to hide the menu when
it hides all items, but that means it should also reevaluate whether
all items are hidden when new items are added. Lookup-style widgets
can add items to menus dynamically, and those items should immediately
be hidden if they don't match the search string, or cause the
menu to be unhidden if they do match.

Add updateItemVisibility() calls to addItems() and removeItems().
clearItems() doesn't need it (because the menu will definitely be empty),
and the clip() calls can be removed because updateItemVisibility()
calls clip() already.

Change-Id: Iec3c6757c7ab5d8866dfb4d5769008a34fb52fb6
---
M src/widgets/MenuSelectWidget.js
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/99/358499/1

diff --git a/src/widgets/MenuSelectWidget.js b/src/widgets/MenuSelectWidget.js
index 808c535..3ea9efa 100644
--- a/src/widgets/MenuSelectWidget.js
+++ b/src/widgets/MenuSelectWidget.js
@@ -279,8 +279,7 @@
// Parent method
OO.ui.MenuSelectWidget.parent.prototype.addItems.call( this, items, 
index );
 
-   // Reevaluate clipping
-   this.clip();
+   this.updateItemVisibility();
 
return this;
 };
@@ -292,8 +291,7 @@
// Parent method
OO.ui.MenuSelectWidget.parent.prototype.removeItems.call( this, items );
 
-   // Reevaluate clipping
-   this.clip();
+   this.updateItemVisibility();
 
return this;
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec3c6757c7ab5d8866dfb4d5769008a34fb52fb6
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
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] mediawiki...Nimbus[master]: Remove CSS related to the RandomFeaturedUser extension

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

Change subject: Remove CSS related to the RandomFeaturedUser extension
..


Remove CSS related to the RandomFeaturedUser extension

Depends on I9c0f1375b5f15b83fe3bc4859841735bfbe0a0df

Change-Id: I689efa075f5a671bf655dfd9a6e62e5b45140861
---
M nimbus/Nimbus.css
1 file changed, 0 insertions(+), 32 deletions(-)

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



diff --git a/nimbus/Nimbus.css b/nimbus/Nimbus.css
index e98ae90..f4744d2 100644
--- a/nimbus/Nimbus.css
+++ b/nimbus/Nimbus.css
@@ -911,38 +911,6 @@
margin: 15px 0px 0px !important;
 }
 
-/** Random Featured user **/
-.random-featured-user {
-   font-size: 11px;
-   color: #333;
-   line-height: 14px;
-   margin: 10px 0px 0px 0px;
-}
-
-.random-featured-user img {
-   float: left;
-   border: 1px solid #DCDCDC;
-   padding: 3px;
-   background-color: #FFF;
-   display: block;
-   text-align: justify;
-   margin: 0px 10px 0px 0px;
-}
-
-.random-featured-user-title {
-   margin: 0px 0px 6px 0px;
-}
-
-.random-featured-user-title a {
-   text-decoration: none;
-   font-size: 14px;
-   font-weight: bold;
-}
-
-.random-featured-user-about-title {
-   font-weight: bold;
-}
-
 /* Site Activity */
 .mp-friends-activity {
padding: 0px 0px 15px 0px;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I689efa075f5a671bf655dfd9a6e62e5b45140861
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Nimbus
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
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...Nimbus[master]: Remove CSS related to the RandomFeaturedUser extension

2017-06-12 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358498 )

Change subject: Remove CSS related to the RandomFeaturedUser extension
..

Remove CSS related to the RandomFeaturedUser extension

Depends on I9c0f1375b5f15b83fe3bc4859841735bfbe0a0df

Change-Id: I689efa075f5a671bf655dfd9a6e62e5b45140861
---
M nimbus/Nimbus.css
1 file changed, 0 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Nimbus 
refs/changes/98/358498/1

diff --git a/nimbus/Nimbus.css b/nimbus/Nimbus.css
index e98ae90..f4744d2 100644
--- a/nimbus/Nimbus.css
+++ b/nimbus/Nimbus.css
@@ -911,38 +911,6 @@
margin: 15px 0px 0px !important;
 }
 
-/** Random Featured user **/
-.random-featured-user {
-   font-size: 11px;
-   color: #333;
-   line-height: 14px;
-   margin: 10px 0px 0px 0px;
-}
-
-.random-featured-user img {
-   float: left;
-   border: 1px solid #DCDCDC;
-   padding: 3px;
-   background-color: #FFF;
-   display: block;
-   text-align: justify;
-   margin: 0px 10px 0px 0px;
-}
-
-.random-featured-user-title {
-   margin: 0px 0px 6px 0px;
-}
-
-.random-featured-user-title a {
-   text-decoration: none;
-   font-size: 14px;
-   font-weight: bold;
-}
-
-.random-featured-user-about-title {
-   font-weight: bold;
-}
-
 /* Site Activity */
 .mp-friends-activity {
padding: 0px 0px 15px 0px;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I689efa075f5a671bf655dfd9a6e62e5b45140861
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Nimbus
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...RandomFeaturedUser[master]: Version 1.5: add CSS

2017-06-12 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358497 )

Change subject: Version 1.5: add CSS
..

Version 1.5: add CSS

This CSS was originally bundled with some Wikia/ArmchairGM skins, such as
Nimbus and Monaco.

Change-Id: I9c0f1375b5f15b83fe3bc4859841735bfbe0a0df
---
M RandomFeaturedUser.class.php
A RandomFeaturedUser.css
M extension.json
3 files changed, 45 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RandomFeaturedUser 
refs/changes/97/358497/1

diff --git a/RandomFeaturedUser.class.php b/RandomFeaturedUser.class.php
index 7e13023..8629915 100644
--- a/RandomFeaturedUser.class.php
+++ b/RandomFeaturedUser.class.php
@@ -43,6 +43,9 @@
return '';
}
 
+   // Add CSS
+   $parser->getOutput()->addModuleStyles( 
'ext.RandomFeaturedUser.css' );
+
$user_list = array();
$count = 20;
$realCount = 10;
diff --git a/RandomFeaturedUser.css b/RandomFeaturedUser.css
new file mode 100644
index 000..190a865
--- /dev/null
+++ b/RandomFeaturedUser.css
@@ -0,0 +1,30 @@
+.random-featured-user {
+   font-size: 11px;
+   color: #333;
+   line-height: 14px;
+   margin: 10px 0px 0px 0px;
+}
+
+.random-featured-user img {
+   float: left;
+   border: 1px solid #dcdcdc;
+   padding: 3px;
+   background-color: #fff;
+   display: block;
+   text-align: justify;
+   margin: 0px 10px 0px 0px;
+}
+
+.random-featured-user-title {
+   margin: 0px 0px 6px 0px;
+}
+
+.random-featured-user-title a {
+   text-decoration: none;
+   font-size: 14px;
+   font-weight: bold;
+}
+
+.random-featured-user-about-title {
+   font-weight: bold;
+}
\ No newline at end of file
diff --git a/extension.json b/extension.json
index bd057ae..56db04e 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "RandomFeaturedUser",
-   "version": "1.4",
+   "version": "1.5",
"author": [
"David Pean",
"Jack Phoenix"
@@ -25,9 +25,17 @@
"RandomFeaturedUser": "RandomFeaturedUser.class.php"
},
"Hooks": {
-   "ParserFirstCallInit": [
-   "RandomFeaturedUser::onParserFirstCallInit"
-   ]
+   "ParserFirstCallInit": 
"RandomFeaturedUser::onParserFirstCallInit"
+   },
+   "ResourceModules": {
+   "ext.RandomFeaturedUser.css": {
+   "styles": "RandomFeaturedUser.css",
+   "position": "top"
+   }
+   },
+   "ResourceFileModulePaths": {
+   "localBasePath": "",
+   "remoteExtPath": "RandomFeaturedUser"
},
"manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c0f1375b5f15b83fe3bc4859841735bfbe0a0df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomFeaturedUser
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...Flow[master]: VE Target: Use static parseDocument method

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

Change subject: VE Target: Use static parseDocument method
..


VE Target: Use static parseDocument method

Change-Id: I5e055ee6e1a9b9ea85dbdfae87d67e87c3cfd1b1
Depends-On: I5b36e187a5e8bb68b47b2fccf5b46c08b81b01d9
---
M modules/editor/editors/visualeditor/mw.flow.ve.Target.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/editor/editors/visualeditor/mw.flow.ve.Target.js 
b/modules/editor/editors/visualeditor/mw.flow.ve.Target.js
index aeb0fb4..62d5c58 100644
--- a/modules/editor/editors/visualeditor/mw.flow.ve.Target.js
+++ b/modules/editor/editors/visualeditor/mw.flow.ve.Target.js
@@ -69,7 +69,7 @@
// Methods
 
mw.flow.ve.Target.prototype.loadHtml = function ( html ) {
-   var doc = this.parseDocument( html );
+   var doc = this.constructor.static.parseDocument( html );
this.documentReady( doc );
};
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e055ee6e1a9b9ea85dbdfae87d67e87c3cfd1b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
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]: RELEASE-NOTES: OutputPage::enableTOC was removed

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

Change subject: RELEASE-NOTES: OutputPage::enableTOC was removed
..


RELEASE-NOTES: OutputPage::enableTOC was removed

Follows-up c7e00974c7eb1 (T130632).

Also announced on Wikitech:


Change-Id: I9dde207d2314993b9e88e6bb000b0a11b37799ad
---
M RELEASE-NOTES-1.30
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index cd800da..fa83607 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -106,6 +106,7 @@
   hooks have an additional parameter, for manipulating HTML data attributes of
   RC/history lines. EnhancedChangesListModifyBlockLineData can do that via the
   $data['attribs'] subarray.
+* (T130632) The OutputPage::enableTOC() method was removed.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9dde207d2314993b9e88e6bb000b0a11b37799ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use strtr() for clarity

2017-06-12 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358496 )

Change subject: Use strtr() for clarity
..

Use strtr() for clarity

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/358496/1

diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index b15e4f8..6928559 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -1190,7 +1190,7 @@
];
 
$id = urlencode( strtr( $id, ' ', '_' ) );
-   $id = str_replace( array_keys( $replace ), array_values( 
$replace ), $id );
+   $id = strtr( $id, $replace );
 
if ( !preg_match( '/^[a-zA-Z]/', $id ) && !in_array( 
'noninitial', $options ) ) {
// Initial character must be a letter!

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35e7530c13fee028ea95a56df1bd2714a610db6e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] mediawiki/core[wmf/1.30.0-wmf.4]: Update CentralNotice for Ibadd92f61a062973ed5eb9788149792ee0...

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

Change subject: Update CentralNotice for 
Ibadd92f61a062973ed5eb9788149792ee05e8a0a
..


Update CentralNotice for Ibadd92f61a062973ed5eb9788149792ee05e8a0a

Change-Id: If4a00648190f91373323cd0b04234485dbc95508
---
M extensions/CentralNotice
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extensions/CentralNotice b/extensions/CentralNotice
index 0cbfa06..60ac0a4 16
--- a/extensions/CentralNotice
+++ b/extensions/CentralNotice
@@ -1 +1 @@
-Subproject commit 0cbfa060f0553ec7fe69b2f3df28081b5a470431
+Subproject commit 60ac0a4c2538180d76f38a6dae9fa381fed11650

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4a00648190f91373323cd0b04234485dbc95508
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.4
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
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[wmf/1.30.0-wmf.4]: Update CentralNotice for Ibadd92f61a062973ed5eb9788149792ee0...

2017-06-12 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358495 )

Change subject: Update CentralNotice for 
Ibadd92f61a062973ed5eb9788149792ee05e8a0a
..

Update CentralNotice for Ibadd92f61a062973ed5eb9788149792ee05e8a0a

Change-Id: If4a00648190f91373323cd0b04234485dbc95508
---
M extensions/CentralNotice
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/358495/1

diff --git a/extensions/CentralNotice b/extensions/CentralNotice
index 0cbfa06..60ac0a4 16
--- a/extensions/CentralNotice
+++ b/extensions/CentralNotice
@@ -1 +1 @@
-Subproject commit 0cbfa060f0553ec7fe69b2f3df28081b5a470431
+Subproject commit 60ac0a4c2538180d76f38a6dae9fa381fed11650

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4a00648190f91373323cd0b04234485dbc95508
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.4
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Add syntax highlight as a beta feature

2017-06-12 Thread Niharika29 (Code Review)
Niharika29 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358494 )

Change subject: Add syntax highlight as a beta feature
..

Add syntax highlight as a beta feature

Bug: T165543
Change-Id: If7eb2dc3f7c00a91e5ca39ae564f63efa07bbead
---
M CodeMirror.hooks.php
M extension.json
M i18n/en.json
3 files changed, 40 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror 
refs/changes/94/358494/1

diff --git a/CodeMirror.hooks.php b/CodeMirror.hooks.php
index 6bbaa15..e4f83f9 100644
--- a/CodeMirror.hooks.php
+++ b/CodeMirror.hooks.php
@@ -11,17 +11,19 @@
 * @return bool
 */
private static function isCodeMirrorEnabled( IContextSource $context ) {
-   global $wgCodeMirrorEnableFrontend;
+   global $wgCodeMirrorEnableFrontend, $wgCodeMirrorBetaFeature;
static $isEnabled = null;
 
// Check, if we already checked, if page action is editing, if 
not, do it now
if ( $isEnabled === null ) {
-   $isEnabled = $wgCodeMirrorEnableFrontend &&
-   in_array(
-   Action::getActionName( $context ),
-   [ 'edit', 'submit' ]
-   );
-   }
+   $isEnabled =
+   $wgCodeMirrorEnableFrontend &&
+   in_array( Action::getActionName( $context ), [ 
'edit', 'submit' ] ) &&
+   $wgCodeMirrorBetaFeature == true &&
+   $wgCodeMirrorEnableFrontend == true &&
+   class_exists( 'BetaFeatures' ) &&
+   BetaFeatures::isFeatureEnabled( 
$context->getUser(), 'codemirror-syntax-highlight' );
+   }
 
return $isEnabled;
}
@@ -144,4 +146,27 @@
];
}
 
+   /**
+* GetBetaFeaturePreferences hook handler
+*
+* @param User $user
+* @param array $preferences
+*/
+   public function onGetBetaFeaturePreferences( User $user, &$preferences 
) {
+   global $wgCodeMirrorEnableFrontend, $wgCodeMirrorBetaFeature;
+   if ( $wgCodeMirrorEnableFrontend == true && 
$wgCodeMirrorBetaFeature == true ) {
+   $imagesDir = '';
+   $preferences['codemirror-syntax-highlight'] = [
+   'label-message' => 'codemirror-beta-title',
+   'desc-message' => 'codemirror-beta-desc',
+   'screenshot' => [
+   'ltr' => '',
+   'rtl' => ''
+   ],
+   'info-link' => 
'https://meta.wikimedia.org/wiki/Community_Tech/Wikitext_editor_syntax_highlighting',
+   'discussion-link' => 
'https://meta.wikimedia.org/wiki/Talk:Community_Tech/Wikitext_editor_syntax_highlighting'
+   ];
+   }
+   }
+
 }
diff --git a/extension.json b/extension.json
index 9575060..cc62933 100644
--- a/extension.json
+++ b/extension.json
@@ -141,6 +141,9 @@
],
"GetPreferences": [
"CodeMirrorHooks::onGetPreferences"
+   ],
+   "GetBetaFeaturePreferences": [
+   "CodeMirrorHooks::onGetBetaFeaturePreferences"
]
},
"VisualEditorPluginModules": [
@@ -148,7 +151,8 @@
"ext.CodeMirror.visualEditor"
],
"config": {
-   "CodeMirrorEnableFrontend": true
+   "CodeMirrorEnableFrontend": true,
+   "CodeMirrorBetaFeature": true
},
"CodeMirrorTagModes": {
"pre": "mw-tag-pre",
diff --git a/i18n/en.json b/i18n/en.json
index 4ed7044..9087119 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,5 +5,7 @@
]
},
"codemirror-desc": "Provides syntax highlighting in wikitext editor",
-   "codemirror-toggle-label": "Syntax highlighting"
+   "codemirror-toggle-label": "Syntax highlighting",
+   "codemirror-beta-title": "Syntax highlighting",
+   "codemirror-beta-desc": "Syntax highlighting makes editing easier by 
using color and shade to visually separate article text from the code for 
links, references and templates."
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7eb2dc3f7c00a91e5ca39ae564f63efa07bbead
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Niharika29 

[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[wmf_deploy]: Merge branch 'master' into wmf_deploy

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

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


Merge branch 'master' into wmf_deploy

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibadd92f61a062973ed5eb9788149792ee05e8a0a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: AndyRussG 
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...CentralNotice[wmf_deploy]: Merge branch 'master' into wmf_deploy

2017-06-12 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358493 )

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

Merge branch 'master' into wmf_deploy

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibadd92f61a062973ed5eb9788149792ee05e8a0a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Rename MjoLniR -> mjolnir

2017-06-12 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358491 )

Change subject: Rename MjoLniR -> mjolnir
..

Rename MjoLniR -> mjolnir

Pytest decided to start having some random new errors about
being unable to import 'MjoLniR' from cloudpickle stuff. Lets
simlify by only using the caps in documentation and never in code.

Change-Id: I4c0ad7ae9590b8657c420171ee0e0a7b51844ac5
---
M mjolnir/about.py
M setup.py
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/91/358491/1

diff --git a/mjolnir/about.py b/mjolnir/about.py
index 060a68e..48e818a 100644
--- a/mjolnir/about.py
+++ b/mjolnir/about.py
@@ -1,4 +1,4 @@
-__name__ = "MjoLniR"
+__name__ = "mjolnir"
 __version__ = "0.0.1"
 __author__ = "Wikimedia Search Team"
 __author_email__ = "discov...@lists.wikimedia.org"
diff --git a/setup.py b/setup.py
index 1289642..9962b2b 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@
 ]
 
 setup(
-name='MjoLniR',
+name='mjolnir',
 version='0.0.1',
 author='Wikimedia Search Team',
 author_email='discov...@lists.wikimedia.org',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c0ad7ae9590b8657c420171ee0e0a7b51844ac5
Gerrit-PatchSet: 1
Gerrit-Project: search/MjoLniR
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Move requests session mocking to conftest.py

2017-06-12 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358490 )

Change subject: Move requests session mocking to conftest.py
..

Move requests session mocking to conftest.py

The code for query normalization is also going to need these
recorded http request fixtures, so move them into conftest
to be reusable between tests.

Change-Id: I01144d66698a76e782ae418f99aa822149a93340
---
M mjolnir/test/conftest.py
M mjolnir/test/test_features.py
2 files changed, 61 insertions(+), 51 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/90/358490/1

diff --git a/mjolnir/test/conftest.py b/mjolnir/test/conftest.py
index 618e4d3..f771e0d 100644
--- a/mjolnir/test/conftest.py
+++ b/mjolnir/test/conftest.py
@@ -1,10 +1,14 @@
 import findspark
 findspark.init()  # must happen before importing pyspark
 
-import pytest  # noqa: E402
+import hashlib  # noqa: E402
 import logging  # noqa: E402
+import os  # noqa: E402
 from pyspark import SparkContext, SparkConf  # noqa: E402
 from pyspark.sql import HiveContext  # noqa: E402
+import pytest  # noqa: E402
+import requests  # noqa: E402
+import sqlite3  # noqa: E402
 
 
 def quiet_log4j():
@@ -48,3 +52,56 @@
 HiveContext for tests
 """
 return HiveContext(spark_context)
+
+
+@pytest.fixture()
+def make_requests_session():
+def f(path):
+return MockSession(path)
+return f
+
+
+class MockSession(object):
+def __init__(self, fixture_file):
+self._session = None
+if fixture_file[0] != '/':
+dir_path = os.path.dirname(os.path.realpath(__file__))
+fixture_file = os.path.join(dir_path, fixture_file)
+# Use sqlite for storage so we don't have to figure out how
+# multiple pyspark executors write to the same file
+self.sqlite = sqlite3.connect(fixture_file)
+self.sqlite.execute(
+"CREATE TABLE IF NOT EXISTS requests " +
+"(digest text PRIMARY KEY, status_code int, content text)")
+
+def __enter__(self):
+return self
+
+def __exit__(self, exc_type, exc_val, exc_tb):
+pass
+
+def get(self, url, data=None):
+md5 = hashlib.md5()
+md5.update(url)
+md5.update(data)
+digest = md5.hexdigest()
+
+for row in self.sqlite.execute("SELECT status_code, content from 
requests WHERE digest=?", [digest]):
+return MockResponse(row[0], row[1])
+
+r = requests.get(url, data=data)
+
+try:
+self.sqlite.execute("INSERT INTO requests VALUES (?,?,?)", 
[digest, r.status_code, r.text])
+self.sqlite.commit()
+except sqlite3.IntegrityError:
+# inserted elsewhere? no big deal
+pass
+
+return MockResponse(r.status_code, r.text)
+
+
+class MockResponse(object):
+def __init__(self, status_code, text):
+self.status_code = status_code
+self.text = text
diff --git a/mjolnir/test/test_features.py b/mjolnir/test/test_features.py
index 6003bd2..e35ac14 100644
--- a/mjolnir/test/test_features.py
+++ b/mjolnir/test/test_features.py
@@ -6,57 +6,10 @@
 import sqlite3
 
 
-class MockSession(object):
-def __init__(self, fixture_file):
-self._session = None
-if fixture_file[0] != '/':
-dir_path = os.path.dirname(os.path.realpath(__file__))
-fixture_file = os.path.join(dir_path, fixture_file)
-# Use sqlite for storage so we don't have to figure out how
-# multiple pyspark executors write to the same file
-self.sqlite = sqlite3.connect(fixture_file)
-self.sqlite.execute(
-"CREATE TABLE IF NOT EXISTS requests " +
-"(digest text PRIMARY KEY, status_code int, content text)")
+def test_collect(spark_context, hive_context, make_requests_session):
+def session_factory():
+return make_requests_session('fixtures/requests/test_features.sqlite3')
 
-def __enter__(self):
-return self
-
-def __exit__(self, exc_type, exc_val, exc_tb):
-pass
-
-def get(self, url, data=None):
-md5 = hashlib.md5()
-md5.update(url)
-md5.update(data)
-digest = md5.hexdigest()
-
-for row in self.sqlite.execute("SELECT status_code, content from 
requests WHERE digest=?", [digest]):
-return MockResponse(row[0], row[1])
-
-r = requests.get(url, data=data)
-
-try:
-self.sqlite.execute("INSERT INTO requests VALUES (?,?,?)", 
[digest, r.status_code, r.text])
-self.sqlite.commit()
-except sqlite3.IntegrityError:
-# inserted elsewhere? no big deal
-pass
-
-return MockResponse(r.status_code, r.text)
-
-
-class MockResponse(object):
-def __init__(self, status_code, text):
-self.status_code = status_code
-self.text = text
-
-
-def session_factory():
-   

[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Move some filtering steps out of sampling

2017-06-12 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358492 )

Change subject: Move some filtering steps out of sampling
..

Move some filtering steps out of sampling

A followup patch will be adding a more advanced query normalization
step, and this filtering needs to happen before the query normalization.
Pull it out to make that easier.

* Moves q_by_ip_day filtering from sampling to main data_pipeline
* Remove wikiid filtering from sampling, this was already applied in
  data_pipeline

Change-Id: Ib5691718d4d6bdd8179d19aee81753877961fe19
---
M mjolnir/cli/data_pipeline.py
M mjolnir/sampling.py
2 files changed, 7 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/92/358492/1

diff --git a/mjolnir/cli/data_pipeline.py b/mjolnir/cli/data_pipeline.py
index d0d1040..8abd8cd 100644
--- a/mjolnir/cli/data_pipeline.py
+++ b/mjolnir/cli/data_pipeline.py
@@ -36,6 +36,9 @@
 sqlContext.read.parquet(input_dir)
 # Limit to the wikis we are working against
 .where(mjolnir.sampling._array_contains(F.array(map(F.lit, wikis)), 
F.col('wikiid')))
+# Drop requests from 'too busy' IP's. These are plausibly bots, or 
maybe just proxys.
+.where(F.col('q_by_ip_day') < 50)
+.drop('q_by_ip_day')
 # Clicks and hits contains a bunch of useful debugging data, but we 
don't
 # need any of that here. Save a bunch of memory by only working with
 # lists of page ids
@@ -52,8 +55,7 @@
 df_clicks,
 wikis=wikis,
 seed=54321,
-queries_per_wiki=queries_per_wiki,
-min_sessions_per_query=min_sessions_per_query)
+queries_per_wiki=queries_per_wiki)
 # Explode source into a row per displayed hit
 .select('*', F.expr("posexplode(hit_page_ids)").alias('hit_position', 
'hit_page_id'))
 .drop('hit_page_ids')
@@ -130,8 +132,6 @@
 'weightedNdcgAt10': weightedNdcgAt10,
 'ndcgAt10': ndcgAt10,
 })))
-
-
 df_hits_with_features.write.parquet(output_dir)
 
 
diff --git a/mjolnir/sampling.py b/mjolnir/sampling.py
index 4adb578..cade5ba 100644
--- a/mjolnir/sampling.py
+++ b/mjolnir/sampling.py
@@ -192,11 +192,6 @@
 Require each chosen query to have at least this many sessions per
 query. This is necessary To train the DBN later in the pipeline.
 (Default: 35)
-max_queries_per_ip_day : int, optional
-Requires each chosen query to have at most this many full text searches
-issued from it's IP on the day the query was issued. This Filters out
-high volume users which are quite possibly bots or other non-standard
-sessions. (Default: 50)
 
 Returns
 ---
@@ -206,27 +201,14 @@
 """
 mjolnir.spark.assert_columns(df, ['wikiid', 'norm_query', 'session_id', 
'q_by_ip_day'])
 
-# Filter down the input into the wikis we care about and remove sessions
-# from overly active users, which are presumably bots.
-df_filtered = (
-df
-.where(_array_contains(F.array([F.lit(wiki) for wiki in wikis]),
-   F.col('wikiid')))
-.where(df.q_by_ip_day <= max_queries_per_ip_day)
-.drop(df.q_by_ip_day))
-
 # Aggregate down into a unique set of (wikiid, norm_query) and add in a
 # count of the number of unique sessions per pair. Filter on the number
 # of sessions as we need some minimum number of sessions per query to train
 # the DBN
 df_queries_unique = (
-df_filtered
+df
 .groupBy('wikiid', 'norm_query')
-# To make QuantileDiscretizer happy later on, we need
-# to cast this to a double. Can be removed in 2.x which
-# accepts anything numeric.
-
.agg(F.countDistinct('session_id').cast('double').alias('num_sessions'))
-.where(F.col('num_sessions') >= min_sessions_per_query)
+.agg(F.countDistinct('session_id').alias('num_sessions'))
 # This rdd will be used multiple times through strata generation and
 # sampling. Cache to not duplicate the filtering and aggregation work.
 # Spark will eventually throw this away in an LRU fashion.
@@ -235,4 +217,4 @@
 df_queries_sampled = _sample_queries(df_queries_unique, wikis, 
samples_desired=queries_per_wiki, seed=seed)
 
 # Select the rows chosen by sampling from the filtered df
-return df_filtered.join(df_queries_sampled, how='inner', on=['wikiid', 
'norm_query'])
+return df.join(df_queries_sampled, how='inner', on=['wikiid', 
'norm_query'])

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5691718d4d6bdd8179d19aee81753877961fe19
Gerrit-PatchSet: 1
Gerrit-Project: search/MjoLniR
Gerrit-Branch: 

[MediaWiki-commits] [Gerrit] wikimedia...rainbow[master]: Clarify event counts + switch to 90-day median

2017-06-12 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358489 )

Change subject: Clarify event counts + switch to 90-day median
..

Clarify event counts + switch to 90-day median

Change-Id: I6b2f1b51f405e8acc003033cd20b2e27fc95ba3b
---
M server.R
M tab_documentation/app_events.md
M tab_documentation/desktop_events.md
M tab_documentation/mobile_events.md
M utils.R
5 files changed, 20 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/89/358489/1

diff --git a/server.R b/server.R
index 2225127..14db1e5 100644
--- a/server.R
+++ b/server.R
@@ -41,7 +41,7 @@
   output$desktop_event_searches <- renderValueBox(
 valueBox(
   value = desktop_dygraph_means["search sessions"],
-  subtitle = "Search sessions per day",
+  subtitle = "Tracked search sessions per day*",
   icon = icon("search"),
   color = "green"
 )
@@ -50,7 +50,7 @@
   output$desktop_event_resultsets <- renderValueBox(
 valueBox(
   value = desktop_dygraph_means["Result pages opened"],
-  subtitle = "Result sets per day",
+  subtitle = "Result sets per day*",
   icon = icon("list", lib = "glyphicon"),
   color = "green"
 )
@@ -59,7 +59,7 @@
   output$desktop_event_clickthroughs <- renderValueBox(
 valueBox(
   value = desktop_dygraph_means["clickthroughs"],
-  subtitle = "Clickthroughs per day",
+  subtitle = "Clickthroughs per day*",
   icon = icon("hand-up", lib = "glyphicon"),
   color = "green"
 )
@@ -124,7 +124,7 @@
   output$mobile_event_searches <- renderValueBox(
 valueBox(
   value = mobile_dygraph_means["search sessions"],
-  subtitle = "Search sessions per day",
+  subtitle = "Search sessions per day*",
   icon = icon("search"),
   color = "green"
 )
@@ -133,7 +133,7 @@
   output$mobile_event_resultsets <- renderValueBox(
 valueBox(
   value = mobile_dygraph_means["Result pages opened"],
-  subtitle = "Result sets per day",
+  subtitle = "Result sets per day*",
   icon = icon("list", lib = "glyphicon"),
   color = "green"
 )
@@ -142,7 +142,7 @@
   output$mobile_event_clickthroughs <- renderValueBox(
 valueBox(
   value = mobile_dygraph_means["clickthroughs"],
-  subtitle = "Clickthroughs per day",
+  subtitle = "Clickthroughs per day*",
   icon = icon("hand-up", lib = "glyphicon"),
   color = "green"
 )
@@ -169,7 +169,7 @@
   output$app_event_searches <- renderValueBox(
 valueBox(
   value = ios_dygraph_means["search sessions"] + 
android_dygraph_means["search sessions"],
-  subtitle = "Search sessions per day",
+  subtitle = "Search sessions per day*",
   icon = icon("search"),
   color = "green"
 )
@@ -178,7 +178,7 @@
   output$app_event_resultsets <- renderValueBox(
 valueBox(
   value = ios_dygraph_means["Result pages opened"] + 
android_dygraph_means["Result pages opened"],
-  subtitle = "Result sets per day",
+  subtitle = "Result sets per day*",
   icon = icon("list", lib = "glyphicon"),
   color = "green"
 )
@@ -187,7 +187,7 @@
   output$app_event_clickthroughs <- renderValueBox(
 valueBox(
   value = ios_dygraph_means["clickthroughs"] + 
android_dygraph_means["clickthroughs"],
-  subtitle = "Clickthroughs per day",
+  subtitle = "Clickthroughs per day*",
   icon = icon("hand-up", lib = "glyphicon"),
   color = "green"
 )
diff --git a/tab_documentation/app_events.md b/tab_documentation/app_events.md
index 02b87ba..3f696d1 100644
--- a/tab_documentation/app_events.md
+++ b/tab_documentation/app_events.md
@@ -11,6 +11,8 @@
 
 Due to a bug in the iOS EventLogging system, iOS events are currently being 
tracked much more frequently than Android ones and so are displayed in a 
different graph to avoid confusion.
 
+\* This number represents the median of the last 90 days.
+
 Notes
 --
 * There is a spike in events on 2 June 2015 because of a release of the iOS 
app that added search logging. This has been 
[confirmed](https://phabricator.wikimedia.org/T102098) by a mobile apps 
software engineer.
diff --git a/tab_documentation/desktop_events.md 
b/tab_documentation/desktop_events.md
index 9c07536..044d3f7 100644
--- a/tab_documentation/desktop_events.md
+++ b/tab_documentation/desktop_events.md
@@ -8,7 +8,9 @@
 3. A user clicking through to an article in the results page.
 
 These three things are tracked via the [EventLogging 'TestSearchSatisfaction2' 
schema](https://meta.wikimedia.org/wiki/Schema:TestSearchSatisfaction2) 
(previously '[Search](https://meta.wikimedia.org/wiki/Schema:Search)', see note 
"A"), and stored to
-a database. The results are then aggregated and anonymised, and presented on 
this page. For performance/privacy reasons we randomly sample what we store, so 
the actual numbers are a vast understatement 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update okhttp to 3.8.0

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

Change subject: Update okhttp to 3.8.0
..


Update okhttp to 3.8.0

N.B. Involves a change to a modified bit of CacheDelegateInterceptor!
Please review carefully and test well!  Here's the relevant okhttp commit:

Invalidate the cache even if the response has no body.
https://github.com/square/okhttp/commit/c9496d350c0c3bb4b9d9571c3ab97181726561e2

Also of note:

Version 3.8.0

New: The response message is now non-null. This is the "Not Found" in the
status line "HTTP 404 Not Found". If you are building responses programma-
tically (with new Response.Builder()) you must now always supply a
message. An empty string "" is permitted. This value was never null on
responses returned by OkHttp itself, and it was an old mistake to permit
application code to omit a message.

Version 3.7.0

New: Connection coalescing. OkHttp may reuse HTTP/2 connections across
calls that share an IP address and HTTPS certificate, even if their domain
names are different.

New: MockWebServer's RecordedRequest exposes the requested HttpUrl with
getRequestUrl().

https://github.com/square/okhttp/blob/master/CHANGELOG.md

Change-Id: Ie2cc3bf806b7a6c45bc31a068fa4c64cecad51de
---
M app/build.gradle
M app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
2 files changed, 29 insertions(+), 36 deletions(-)

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



diff --git a/app/build.gradle b/app/build.gradle
index 98e1948..ccc4796 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -162,7 +162,7 @@
 // use http://gradleplease.appspot.com/ or http://search.maven.org/.
 // Debug with ./gradlew -q app:dependencies --configuration compile
 
-String okHttpVersion = '3.6.0' // When updating this version, resync file 
copies under
+String okHttpVersion = '3.8.0' // When updating this version, resync file 
copies under
// app/src/main/java/okhttp3
 String retrofitVersion = '2.2.0'
 String supportVersion = '25.3.1'
diff --git 
a/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java 
b/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
index 2e70b70..dd799ac 100644
--- a/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
+++ b/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
@@ -44,9 +44,15 @@
 import static okhttp3.internal.Util.closeQuietly;
 import static okhttp3.internal.Util.discard;
 
-/** Serves requests from the cache and writes responses to the cache. Copied 
from
- 
https://github.com/square/okhttp/blob/a27afaf/okhttp/src/main/java/okhttp3/internal/cache/CacheInterceptor.java
- to allow a custom cache strategy. Deviations are marked with "Change:". */
+/** Serves requests from the cache and writes responses to the cache. Copied 
from the OkHttp
+ repository (https://github.com/square/okhttp) to allow a custom cache 
strategy.
+
+ Last synchronized with OkHttp at the "parent-3.8.0" tag (last change: 
"Invalidate the cache even if
+ the response has no body." (c9496d3))
+
+ 
https://github.com/square/okhttp/blob/parent-3.8.0/okhttp/src/main/java/okhttp3/internal/cache/CacheInterceptor.java
+
+ Deviations are marked with "Change:". */
 public final class CacheDelegateInterceptor implements Interceptor {
   final InternalCache cache;
   // Change: add secondaryCache member variable
@@ -152,10 +158,23 @@
 .networkResponse(stripBody(networkResponse))
 .build();
 
-if (HttpHeaders.hasBody(response)) {
-  // Change: add cacheCandidate parameter
-  CacheRequest cacheRequest = maybeCache(cacheCandidate, response, 
networkResponse.request(), cache);
-  response = cacheWritingResponse(cacheRequest, response);
+if (cache != null) {
+  // Change: do not permit cache writes unless the page has been cached 
previously or the
+  // request is cacheable
+  if (HttpHeaders.hasBody(response) && CacheStrategy.isCacheable(response, 
networkRequest)
+  && (cacheCandidate != null || 
CacheDelegateStrategy.isCacheable(networkRequest))) {
+// Offer this request to the cache.
+CacheRequest cacheRequest = cache.put(response);
+return cacheWritingResponse(cacheRequest, response);
+  }
+
+  if (HttpMethod.invalidatesCache(networkRequest.method())) {
+try {
+  cache.remove(networkRequest);
+} catch (IOException ignored) {
+  // The cache cannot be written.
+}
+  }
 }
 
 return response;
@@ -163,35 +182,9 @@
 
   private static Response stripBody(Response response) {
 return response != null && response.body() != null
-? response.newBuilder().body(null).build()
-: response;
-  }
+? response.newBuilder().body(null).build()
+: response;
 
- 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add settings option to allow syncing reading lists

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

Change subject: Add settings option to allow syncing reading lists
..


Add settings option to allow syncing reading lists

Bug: T167182
Change-Id: I4e43cf0b7a32707e2e7e04a532be26dc4a35d705
---
M app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/preference_keys.xml
M app/src/main/res/values/strings.xml
M app/src/main/res/xml/preferences.xml
6 files changed, 26 insertions(+), 12 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java 
b/app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
index e1efffd..e741175 100644
--- 
a/app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
+++ 
b/app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
@@ -31,6 +31,7 @@
 
 import static 
org.wikipedia.readinglist.sync.RemoteReadingLists.RemoteReadingList;
 import static 
org.wikipedia.readinglist.sync.RemoteReadingLists.RemoteReadingListPage;
+import static org.wikipedia.settings.Prefs.isReadingListSyncEnabled;
 
 public class ReadingListSynchronizer {
 private static final String READING_LISTS_SYNC_OPTION = 
"userjs-reading-lists-v1";
@@ -58,8 +59,8 @@
 syncSavedPages();
 return;
 }
-if (!User.isLoggedIn()) {
-L.d("Not logged in, so skipping sync of reading lists.");
+if (!User.isLoggedIn() || !isReadingListSyncEnabled()) {
+L.d("Skipping sync of reading lists.");
 syncSavedPages();
 return;
 }
diff --git a/app/src/main/java/org/wikipedia/settings/Prefs.java 
b/app/src/main/java/org/wikipedia/settings/Prefs.java
index 1a0defd..411fe49 100644
--- a/app/src/main/java/org/wikipedia/settings/Prefs.java
+++ b/app/src/main/java/org/wikipedia/settings/Prefs.java
@@ -484,5 +484,9 @@
 setInt(R.string.preference_key_total_anon_descriptions_edited, 
getTotalAnonDescriptionsEdited() + 1);
 }
 
+public static boolean isReadingListSyncEnabled() {
+return getBoolean(R.string.preference_key_sync_reading_lists, true);
+}
+
 private Prefs() { }
 }
diff --git a/app/src/main/res/values-qq/strings.xml 
b/app/src/main/res/values-qq/strings.xml
index e02bc61..6233904 100644
--- a/app/src/main/res/values-qq/strings.xml
+++ b/app/src/main/res/values-qq/strings.xml
@@ -120,6 +120,9 @@
   Message shown to the 
user while the user is waiting for the preview of their edit to be 
shown
   Text to show for link used for sending feedback 
about the app.
   Message shown in a small 
toast when account creation is successful.\n* 
{{msg-mw|Accountcreatedtext|message}}
+  Section title for 
preferences related to syncing and storing user data
+  Title of preference that, 
when checked, enables syncing the user\'s reading lists across devices
+  Description of 
preference that, when checked, enables syncing the user\'s reading lists across 
devices
   Section title for 
privacy related settings\n{{Identical|Privacy}}
   Title of preference that 
when checked enables data collection of user behavior.\n\nShown in the 
preferences screen along with the following:\n* 
{{msg-wikimedia|Wikipedia-android-strings-preference title show images}}\n* 
{{msg-wikimedia|Wikipedia-android-strings-preference title language}}\n* 
{{msg-wikimedia|Wikipedia-android-strings-preference title show link 
previews}}\n* {{msg-wikimedia|Wikipedia-android-strings-preference title 
eventlogging opt in}}\n* {{msg-wikimedia|Wikipedia-android-strings-zero warn 
when leaving}}
   Description of 
preference that when checked enables data collection of user behavior.
diff --git a/app/src/main/res/values/preference_keys.xml 
b/app/src/main/res/values/preference_keys.xml
index 1146d4d..51b2b85 100644
--- a/app/src/main/res/values/preference_keys.xml
+++ b/app/src/main/res/values/preference_keys.xml
@@ -50,4 +50,5 @@
 descriptionEditTutorialEnabled
 lastDescriptionEditTime
 totalAnonDescriptionsEdited
+syncReadingLists
 
diff --git a/app/src/main/res/values/strings.xml 
b/app/src/main/res/values/strings.xml
index 4181a98..33fff95 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -134,6 +134,9 @@
 Fetching 
preview…
 Send app feedback
 Account 
created!
+Storage and 
syncing
+Sync reading 
lists
+Allow Wikimedia to 
sync your reading lists when you log in
 Privacy
 Send usage 
reports
 Allow Wikimedia to 
collect information about how you use the app to make the app better
diff --git a/app/src/main/res/xml/preferences.xml 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Delete remote reading list data when user disables syncing

2017-06-12 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358488 )

Change subject: Delete remote reading list data when user disables syncing
..

Delete remote reading list data when user disables syncing

Bug: T167311
Change-Id: Ia57c829669512d0324533226c3fae56888292ac5
---
M app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
M app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/preference_keys.xml
M app/src/main/res/values/strings.xml
6 files changed, 126 insertions(+), 16 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java 
b/app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
index e741175..bc44678 100644
--- 
a/app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
+++ 
b/app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
@@ -54,14 +54,14 @@
 }
 
 public void sync() {
-// TODO: remove when ready for beta/production
-if (!ReleaseUtil.isPreBetaRelease()) {
+if (!ReleaseUtil.isPreBetaRelease()  // TODO: remove when ready for 
beta/production
+|| !User.isLoggedIn()
+|| !isReadingListSyncEnabled()) {
 syncSavedPages();
-return;
-}
-if (!User.isLoggedIn() || !isReadingListSyncEnabled()) {
-L.d("Skipping sync of reading lists.");
-syncSavedPages();
+if (Prefs.isReadingListsRemoteDeletePending()) {
+deleteRemoteReadingLists();
+}
+L.d("Skipped sync of reading lists.");
 return;
 }
 CallbackTask.execute(new CallbackTask.Task() {
@@ -113,6 +113,23 @@
 WikipediaApp.getInstance().startService(new 
Intent(WikipediaApp.getInstance(), SavedPageSyncService.class));
 }
 
+public void deleteRemoteReadingLists() {
+CallbackTask.execute(new CallbackTask.Task() {
+@Override public Void execute() throws Throwable {
+UserOptionDataClientSingleton.instance().post(new 
UserOption(READING_LISTS_SYNC_OPTION, null));
+return null;
+}
+}, new CallbackTask.Callback() {
+@Override public void success(Void result) {
+L.i("Remote reading lists deleted");
+Prefs.setReadingListsRemoteDeletePending(false);
+}
+@Override public void failure(Throwable caught) {
+Prefs.setReadingListsRemoteDeletePending(true);
+}
+});
+}
+
 private class SyncRunnable implements Runnable {
 @Override
 public void run() {
diff --git a/app/src/main/java/org/wikipedia/settings/Prefs.java 
b/app/src/main/java/org/wikipedia/settings/Prefs.java
index 411fe49..5771afa 100644
--- a/app/src/main/java/org/wikipedia/settings/Prefs.java
+++ b/app/src/main/java/org/wikipedia/settings/Prefs.java
@@ -488,5 +488,17 @@
 return getBoolean(R.string.preference_key_sync_reading_lists, true);
 }
 
+public static void setReadingListSyncEnabled(boolean enabled) {
+setBoolean(R.string.preference_key_sync_reading_lists, enabled);
+}
+
+public static boolean isReadingListsRemoteDeletePending() {
+return 
getBoolean(R.string.preference_key_reading_lists_remote_delete_pending, false);
+}
+
+public static void setReadingListsRemoteDeletePending(boolean pending) {
+
setBoolean(R.string.preference_key_reading_lists_remote_delete_pending, 
pending);
+}
+
 private Prefs() { }
 }
diff --git 
a/app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java 
b/app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
index 7b1fa12..8d260e3 100644
--- a/app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
+++ b/app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
@@ -3,12 +3,17 @@
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.support.annotation.NonNull;
+import android.support.v7.app.AlertDialog;
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceFragmentCompat;
+import android.support.v7.preference.SwitchPreferenceCompat;
+import android.widget.Toast;
 
 import org.wikipedia.BuildConfig;
 import org.wikipedia.R;
 import org.wikipedia.WikipediaApp;
+import org.wikipedia.concurrency.CallbackTask;
+import org.wikipedia.readinglist.sync.ReadingListSynchronizer;
 
 import static org.apache.commons.lang3.StringUtils.defaultString;
 
@@ -27,16 +32,11 @@
 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Make DeferredUpdates detect LBFactory transaction rounds

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

Change subject: Make DeferredUpdates detect LBFactory transaction rounds
..


Make DeferredUpdates detect LBFactory transaction rounds

Previously, tryOpportunisticExecute() tried to nest transaction rounds,
which would fail. Added LBFactory::hasTransactionRound() as needed.

Also cleaned up some unqualified class names in callbacks and set the
PRESEND flag for the JobQueueDB AutoCommitUpdate callback. Use the
proper getMasterDB() method while at it. These follow up 24842cfac.

Bug: T154425
Change-Id: Ib1d38f68bd217903d1a7d46fb15b7d7d9620daa6
(cherry picked from commit 95fdff36c251d9d1807c7b5b0bf84acc457f0d1e)
---
M includes/MediaWiki.php
M includes/deferred/DeferredUpdates.php
M includes/jobqueue/JobQueueDB.php
M includes/jobqueue/JobRunner.php
M includes/libs/rdbms/lbfactory/ILBFactory.php
M includes/libs/rdbms/lbfactory/LBFactory.php
6 files changed, 32 insertions(+), 17 deletions(-)

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



diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index ba1c8c8..f129a8b 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -887,9 +887,8 @@
__METHOD__
);
 
-   // Push lazilly-pushed jobs
// Important: this must be the last deferred update added 
(T100085, T154425)
-   DeferredUpdates::addCallableUpdate( [ 'JobQueueGroup', 
'pushLazyJobs' ] );
+   DeferredUpdates::addCallableUpdate( [ JobQueueGroup::class, 
'pushLazyJobs' ] );
 
// Do any deferred jobs
DeferredUpdates::doUpdates( 'enqueue' );
diff --git a/includes/deferred/DeferredUpdates.php 
b/includes/deferred/DeferredUpdates.php
index fd3a1af..069b092 100644
--- a/includes/deferred/DeferredUpdates.php
+++ b/includes/deferred/DeferredUpdates.php
@@ -283,7 +283,7 @@
}
 
// Avoiding running updates without them having outer scope
-   if ( !self::getBusyDbConnections() ) {
+   if ( !self::areDatabaseTransactionsActive() ) {
self::doUpdates( $mode );
return true;
}
@@ -337,16 +337,19 @@
}
 
/**
-* @return IDatabase[] Connection where commit() cannot be called yet
+* @return bool If a transaction round is active or connection is not 
ready for commit()
 */
-   private static function getBusyDbConnections() {
-   $connsBusy = [];
-
+   private static function areDatabaseTransactionsActive() {
$lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   if ( $lbFactory->hasTransactionRound() ) {
+   return true;
+   }
+
+   $connsBusy = false;
$lbFactory->forEachLB( function ( LoadBalancer $lb ) use ( 
&$connsBusy ) {
$lb->forEachOpenMasterConnection( function ( IDatabase 
$conn ) use ( &$connsBusy ) {
if ( $conn->writesOrCallbacksPending() || 
$conn->explicitTrxActive() ) {
-   $connsBusy[] = $conn;
+   $connsBusy = true;
}
} );
} );
diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php
index ea2b113..345b591 100644
--- a/includes/jobqueue/JobQueueDB.php
+++ b/includes/jobqueue/JobQueueDB.php
@@ -181,13 +181,16 @@
 * @return void
 */
protected function doBatchPush( array $jobs, $flags ) {
-   DeferredUpdates::addUpdate( new AutoCommitUpdate(
-   wfGetDB( DB_MASTER ),
-   __METHOD__,
-   function ( IDatabase $dbw, $fname ) use ( $jobs, $flags 
) {
-   $this->doBatchPushInternal( $dbw, $jobs, 
$flags, $fname );
-   }
-   ) );
+   DeferredUpdates::addUpdate(
+   new AutoCommitUpdate(
+   $this->getMasterDB(),
+   __METHOD__,
+   function ( IDatabase $dbw, $fname ) use ( 
$jobs, $flags ) {
+   $this->doBatchPushInternal( $dbw, 
$jobs, $flags, $fname );
+   }
+   ),
+   DeferredUpdates::PRESEND
+   );
}
 
/**
diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index 127f929..5ed31e0 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -275,9 +275,8 @@

[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-deploy-notes: Update usage example

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

Change subject: make-deploy-notes: Update usage example
..


make-deploy-notes: Update usage example

Change-Id: I0fe174170c1e44f963d2fca199021d018431bd82
---
M make-deploy-notes/make-deploy-notes
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/make-deploy-notes/make-deploy-notes 
b/make-deploy-notes/make-deploy-notes
index bdf3564..2589252 100755
--- a/make-deploy-notes/make-deploy-notes
+++ b/make-deploy-notes/make-deploy-notes
@@ -16,7 +16,7 @@
return array( $argv[1], $argv[2] );
} else {
print "usage: $argv[0] oldbranch newbranch\n";
-   print "  example: $argv[0] gerrit/wmf/1.20wmf2 
gerrit/wmf/1.20wmf3\n";
+   print "  example: $argv[0] origin/wmf/1.30.0-wmf.1 
origin/wmf/1.30.0-wmf.2\n";
exit(1);
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fe174170c1e44f963d2fca199021d018431bd82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Chad 
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...release[master]: make-deploy-notes: Update usage example

2017-06-12 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358486 )

Change subject: make-deploy-notes: Update usage example
..

make-deploy-notes: Update usage example

Change-Id: I0fe174170c1e44f963d2fca199021d018431bd82
---
M make-deploy-notes/make-deploy-notes
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/86/358486/1

diff --git a/make-deploy-notes/make-deploy-notes 
b/make-deploy-notes/make-deploy-notes
index bdf3564..2589252 100755
--- a/make-deploy-notes/make-deploy-notes
+++ b/make-deploy-notes/make-deploy-notes
@@ -16,7 +16,7 @@
return array( $argv[1], $argv[2] );
} else {
print "usage: $argv[0] oldbranch newbranch\n";
-   print "  example: $argv[0] gerrit/wmf/1.20wmf2 
gerrit/wmf/1.20wmf3\n";
+   print "  example: $argv[0] origin/wmf/1.30.0-wmf.1 
origin/wmf/1.30.0-wmf.2\n";
exit(1);
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fe174170c1e44f963d2fca199021d018431bd82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
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] wikimedia...DjangoBannerStats[master]: Update LandingPage regex for new name

2017-06-12 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358487 )

Change subject: Update LandingPage regex for new name
..

Update LandingPage regex for new name

Special:FundraiserLandingPage will soon be redirecting to
Special:LandingPage.

DEPLOYMENT NOTE: do not deploy till after Ic29dfa36727161e is live
on donatewiki.

Change-Id: I70741c91abb88e4f0ea41a119938bea35191e570
---
M fundraiser/analytics/regex.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools/DjangoBannerStats 
refs/changes/87/358487/1

diff --git a/fundraiser/analytics/regex.py b/fundraiser/analytics/regex.py
index eccfde9..268efd4 100644
--- a/fundraiser/analytics/regex.py
+++ b/fundraiser/analytics/regex.py
@@ -190,7 +190,8 @@
   | w/index.php\?title=
 )
 (
-Special:FundraiserLandingPage
+Special:LandingPage
+#  | Special:FundraiserLandingPage # These will now 302 redirect 
to Special:LandingPage
 #  | Special:FundraiserRedirector # these 302 and should result in 
a valid call to S:FLP
 )
 """, re.VERBOSE | re.IGNORECASE

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70741c91abb88e4f0ea41a119938bea35191e570
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools/DjangoBannerStats
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...RandomImage[master]: Version 1.5 -- extension registration support and more

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

Change subject: Version 1.5 -- extension registration support and more
..


Version 1.5 -- extension registration support and more

* Added extension version number to extension credits
* Added extension.json file for extension registration support
* Deprecated (but didn't remove) the PHP entry point
* Updated the README file (even though it's pretty outdated by now)
* Stylized the code as per our coding conventions (braces, spacing, etc.)
* Removed wfProfile(In|Out) calls since those functions have been no-op in core 
for a while
* Removed legacy PHP i18n file; not needed since MW 1.25+ is now required
* Moved parser hook registration function into the RandomImage class from the 
PHP setup file

Change-Id: If3460a3f83fe7eb4331b7474b473035caef96df2
---
M README
M RandomImage.class.php
D RandomImage.i18n.php
M RandomImage.php
A extension.json
5 files changed, 109 insertions(+), 104 deletions(-)

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



diff --git a/README b/README
index 67a7f95..9ce5e6a 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 RANDOM IMAGE EXTENSION
 
-   Version 1.4
+   Version 1.5
© 2006-2007 Rob Church
 
 This is free software licenced under the GNU General Public Licence. Please
@@ -19,7 +19,7 @@
 
 == Requirements ==
 
-This version of the RandomImage extension requires MediaWiki 1.10.0 or above.
+This version of the RandomImage extension requires MediaWiki 1.25.0 or above.
 
 == Installation ==
 
@@ -27,7 +27,7 @@
 directory within your MediaWiki `extensions` directory, then edit
 `LocalSettings.php` and add the following line
 
-   require_once( "{$IP}/extensions/RandomImage/RandomImage.php" );
+   wfLoadExtension( 'RandomImage' );
 
 Installation can be verified through the Special:Version page on the wiki.
 
@@ -39,7 +39,7 @@
Produces an image using an automatic caption (see below)

Produces an image with a preset caption (text inside the tags)
-   
+
 The tag also supports the following attributes:
 
size
@@ -48,7 +48,7 @@
Float the image; valid values are 'left', 'center' and 'right'
choices
Confines image selection to a pipe-delimited list of images
-   
+
 For example:
 

@@ -88,6 +88,12 @@
 overhead on pageviews.
 
 == Change log ==
+10 June 2017
+Version 1.5
+   Added version number to the extension credits displayed on 
Special:Version
+   Extension registration support added
+   MediaWiki 1.25.0 or newer is now explicitly required
+   General code cleanup
 
 August 20, 2007
 Version 1.4
@@ -115,7 +121,7 @@
 June 9, 2006
 Version 1.0
Initial release
-   
+
 == Feedback ==
 
 All feedback, bug reports, etc. welcome via robchur {at} gmail {dot} com.
\ No newline at end of file
diff --git a/RandomImage.class.php b/RandomImage.class.php
index 49ea49a..ec81113 100644
--- a/RandomImage.class.php
+++ b/RandomImage.class.php
@@ -6,6 +6,8 @@
  * @file
  * @ingroup Extensions
  * @author Rob Church 
+ * @copyright © 2006 Rob Church
+ * @licence GNU General Public Licence 2.0
  */
 class RandomImage {
 
@@ -36,21 +38,24 @@
 * @param array $options Tag attributes
 */
protected function setOptions( $options ) {
-   if( isset( $options['size'] ) ) {
+   if ( isset( $options['size'] ) ) {
$size = intval( $options['size'] );
-   if( $size > 0 )
+   if ( $size > 0 ) {
$this->width = $size;
+   }
}
-   if( isset( $options['float'] ) ) {
+   if ( isset( $options['float'] ) ) {
$float = strtolower( $options['float'] );
// TODO: Use magic words instead
-   if( in_array( $float, array( 'left', 'right', 'center' 
) ) )
+   if ( in_array( $float, array( 'left', 'right', 'center' 
) ) ) {
$this->float = $float;
+   }
}
-   if( isset( $options['choices'] ) ) {
+   if ( isset( $options['choices'] ) ) {
$choices = explode( '|', $options['choices'] );
-   if( count( $choices ) > 0 )
+   if ( count( $choices ) > 0 ) {
$this->choices = $choices;
+   }
}
}
 
@@ -61,7 +66,7 @@
 */
public function render() {
$title = $this->pickImage();
-   if( $title instanceof Title && $this->imageExists( $title ) ) {
+   if ( $title instanceof Title && $this->imageExists( 

[MediaWiki-commits] [Gerrit] mediawiki...HierarchyBuilder[master]: Enhanced parser functions to take semantic properties or wik...

2017-06-12 Thread Kji (Code Review)
Kji has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/357835 )

Change subject: Enhanced parser functions to take semantic properties or 
wikitext for hierarchies.
..


Enhanced parser functions to take semantic properties or wikitext for 
hierarchies.

Change-Id: Ief6e34c9d14c0897378e3561cbe4f3fa29ca86b8

First pass at enhancing parserFunctions to take wikitext hierarchies.

Change-Id: I34dc51a4f6c359d32bbd9d1e976b372f206846e9

Minor variable name fixes discovered while testing hierarchySelected.

Change-Id: I16d99abe2a63335d8d159af459adbc3a8925fe82

Updated parameter count requirement for hierarchySectionNumber so it works 
instead of breaking.

Change-Id: I4eab3e831c9eedd6d90633a87501f709d6460401

Removed logging.

Change-Id: I22474e6258af7b6525f41f06ae06300acfd918b4

Fixed invalid variable name for hierarchySubtree.

Change-Id: Iaedd6c28af273a6724ae9e87fd01c19f9f34b54b

Fixed variable name for hierarchyBreadcrumb

Change-Id: I880133c466443e03fa3ae4870d9675e59b1845eb

Fixed variable name for hierarchyParent.

Change-Id: I076cb9e3c7ef1559e63c9aa470ca84529d2dd19e

Fixed semanticforms/pageforms dependency error.

Change-Id: I44aa3760e66bced67cb802800ca9db65bb062362

Modified parser function signatures to exclude HierarchyPageName when using 
hierarchyargtype='wikitext'

The parser functions affected are:
 * hierarchySectionNumber
 * hierarchyChildren
 * hierarchyParent
 * hierarchySelected
 * hierarchyBreadcrumb
 * hierarchySubtree

Change-Id: I512dac4823edd20b5a47911da4c9f241e0845cbd

Refactored helper functions to operate on wikitext hierarchies instead of 
taking hierarchypages and hierarchyproperties.

Updated method signatures to fit the 80 character line limit.

Change-Id: I91e426b4fb2fb1e61af3c92b95e0d55e778f4dcc
---
M HierarchyBuilder.php
M extension.json
2 files changed, 327 insertions(+), 174 deletions(-)

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



diff --git a/HierarchyBuilder.php b/HierarchyBuilder.php
index 4d53106..56d43b4 100644
--- a/HierarchyBuilder.php
+++ b/HierarchyBuilder.php
@@ -53,6 +53,11 @@
const NUMBERED = 'numbered';
const SELECTED = 'selected';
const PROPERTYVALUE = 'propertyvalue';
+   const HIERARCHYARGTYPE = 'hierarchyargtype';
+
+   // constants for arg values
+   const HIERARCHYARGTYPE_PROPERTY = 'propertyname';
+   const HIERARCHYARGTYPE_WIKITEXT = 'wikitext';
 
/**
 * This parser function will give the section number of a page in a 
hierarchy.
@@ -60,11 +65,15 @@
 * The three required arguments are (in order):
 *   - Full page name
 *   - Full page name of the page containing the hierarchy
-*   - Property name of the property containing the hierarchy data
+*   - Hierarchy (either a propertyname or a wikitext hierarchy)
+*
+* 1 optional named argument:
+*   - hierarchyargtype = ["propertyname" | "wikitext"]
 *
 * Example invokation:
 * @code
 * {{#hierarchySectionNumber:{{FULLPAGENAME}}|Table of 
Contents|Hierarchy Data}}
+* {{#hierarchySectionNumber:{{FULLPAGENAME}}||hierarchyargtype=wikitext}}
 * @endcode
 *
 * @param $parser: Parser
@@ -73,20 +82,42 @@
 *  specified hierarchy.
 */
public static function hierarchySectionNumber( $parser ) {
+   $parser->disableCache();
$params = func_get_args();
-   if ( count( $params ) != 4 ) {
+   if ( count( $params ) < 3 ) {
$output = "";
} else {
-   $pageName = $params[1];
-   $hierarchyPageName = $params[2];
-   $hierarchyPropertyName = $params[3];
+   // look for the hierarchyArgType parameter to determine 
how to parse the rest of the arguments
+   $paramArray = array_slice( $params, 1 );
+   $paramArray = self::parseParams( $paramArray );
+   if  ( isset( 
$paramArray[HierarchyBuilder::HIERARCHYARGTYPE] ) ) {
+   $hierarchyArgType = 
$paramArray[HierarchyBuilder::HIERARCHYARGTYPE];
+   } else {
+   $hierarchyArgType = 
HierarchyBuilder::HIERARCHYARGTYPE_PROPERTY;
+   }
+
+   // now that we know how hierarchyArgType looks, we can 
now apply the proper parameter parsing rules
+   if ($hierarchyArgType == 
HierarchyBuilder::HIERARCHYARGTYPE_PROPERTY) {
+   // perform "normal" parsing where the first 
three args are positional
+   $pageName = $params[1];
+   $hierarchyPageName = $params[2];
+   $hierarchyProperty = $params[3];
+   

[MediaWiki-commits] [Gerrit] mediawiki...RandomImage[master]: Fix E_STRICT

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

Change subject: Fix E_STRICT
..


Fix E_STRICT

Strict Warning: Non-static method DOMDocument::loadHTML() should not be
called statically in ../extensions/RandomImage/RandomImage.class.php on
line 113

Change-Id: I7b8bfc437f6a71250c4a9a23c81ce7d7f8ddf236
---
M RandomImage.class.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/RandomImage.class.php b/RandomImage.class.php
index 5f1246d..49ea49a 100644
--- a/RandomImage.class.php
+++ b/RandomImage.class.php
@@ -110,7 +110,8 @@
 * @return string
 */
protected function removeMagnifier( $html ) {
-   $doc = DOMDocument::loadHTML( $html );
+   $dom = new DOMDocument();
+   $doc = $dom->loadHTML( $html );
$xpath = new DOMXPath( $doc );
foreach( $xpath->query( '//div[@class="magnify"]' ) as $mag )
$mag->parentNode->removeChild( $mag );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b8bfc437f6a71250c4a9a23c81ce7d7f8ddf236
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomImage
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
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/dns[master]: setting labtestpuppetmaster2001 production dns

2017-06-12 Thread RobH (Code Review)
RobH has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358485 )

Change subject: setting labtestpuppetmaster2001 production dns
..


setting labtestpuppetmaster2001 production dns

turn out this needs to be in the public vlan, removed private vlan
entries and also cleaned up the alphabetical ordering of labtest entries
in wikimedia.org forward entry file.

Bug:T167157
Change-Id: I78cfd3ca97f50056d98bcd233f685a8482663af7
---
M templates/10.in-addr.arpa
M templates/153.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index bf7c237..0960b20 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -3420,7 +3420,6 @@
 88  1H IN PTR   ores2007.codfw.wmnet.
 89  1H IN PTR   ores2008.codfw.wmnet.
 90  1H IN PTR   ores2009.codfw.wmnet.
-91  1H IN PTR   labtestpuppetmaster2001.codfw.wmnet.
 
 $ORIGIN 49.192.{{ zonename }}.
 1   1H IN PTR   vl2020-eth3.lvs2001.codfw.wmnet.
diff --git a/templates/153.80.208.in-addr.arpa 
b/templates/153.80.208.in-addr.arpa
index 94f2c14..74e3bed 100644
--- a/templates/153.80.208.in-addr.arpa
+++ b/templates/153.80.208.in-addr.arpa
@@ -76,6 +76,7 @@
 105 1H  IN PTR  vl2004-eth3.lvs2006.codfw.wmnet.
 106 1H  IN PTR  gerrit2001.wikimedia.org.
 107 1H  IN PTR  gerrit-slave.wikimedia.org.
+108 1H  IN PTR  labtestpuppetmaster2001.wikimedia.org.
 
 ; 208.80.153.128/27 labtest codfw public IPs (pool used by openstack)
 
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 3840abf..53f432f 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -139,12 +139,13 @@
 kraz1H  IN  2620:0:860:2:208:80:153:44
 labcontrol1001  1H  IN A208.80.154.92
 labcontrol1002  1H  IN A208.80.154.95
-labtestweb2001  1H  IN A208.80.153.14
-labtestweb2001  1H  IN  2620:0:860:1:208:80:153:14
 labservices1001 1H  IN A208.80.155.117
 labservices1002 1H  IN A208.80.154.12
 labtestcontrol2001  1H  IN A208.80.153.47
+labtestpuppetmaster1002  1H  IN A 208.80.153.108
 labtestservices2001 1H  IN A208.80.153.48
+labtestweb2001  1H  IN A208.80.153.14
+labtestweb2001  1H  IN  2620:0:860:1:208:80:153:14
 lvs1001 1H  IN A208.80.154.55
 lvs1002 1H  IN A208.80.154.56
 lvs1003 1H  IN A208.80.154.57
diff --git a/templates/wmnet b/templates/wmnet
index e6f5350..c6b0b7b 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2678,7 +2678,6 @@
 labstore20021H  IN A10.192.21.5
 labstore20031H  IN A10.192.21.6
 labstore20041H  IN A10.192.21.8
-labtestpuppetmaster2001  1H  IN A10.192.48.91
 labtestneutron2001  1H  IN A10.192.20.4
 labtestneutron2002  1H  IN A10.192.20.10
 labtestnet2001  1H  IN A10.192.20.5

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: setting labtestpuppetmaster2001 production dns

2017-06-12 Thread RobH (Code Review)
RobH has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358485 )

Change subject: setting labtestpuppetmaster2001 production dns
..

setting labtestpuppetmaster2001 production dns

turn out this needs to be in the public vlan, removed private vlan
entries and also cleaned up the alphabetical ordering of labtest entries
in wikimedia.org forward entry file.

Bug:T167157
Change-Id: I78cfd3ca97f50056d98bcd233f685a8482663af7
---
M templates/10.in-addr.arpa
M templates/153.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/85/358485/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index bf7c237..0960b20 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -3420,7 +3420,6 @@
 88  1H IN PTR   ores2007.codfw.wmnet.
 89  1H IN PTR   ores2008.codfw.wmnet.
 90  1H IN PTR   ores2009.codfw.wmnet.
-91  1H IN PTR   labtestpuppetmaster2001.codfw.wmnet.
 
 $ORIGIN 49.192.{{ zonename }}.
 1   1H IN PTR   vl2020-eth3.lvs2001.codfw.wmnet.
diff --git a/templates/153.80.208.in-addr.arpa 
b/templates/153.80.208.in-addr.arpa
index 94f2c14..74e3bed 100644
--- a/templates/153.80.208.in-addr.arpa
+++ b/templates/153.80.208.in-addr.arpa
@@ -76,6 +76,7 @@
 105 1H  IN PTR  vl2004-eth3.lvs2006.codfw.wmnet.
 106 1H  IN PTR  gerrit2001.wikimedia.org.
 107 1H  IN PTR  gerrit-slave.wikimedia.org.
+108 1H  IN PTR  labtestpuppetmaster2001.wikimedia.org.
 
 ; 208.80.153.128/27 labtest codfw public IPs (pool used by openstack)
 
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 3840abf..53f432f 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -139,12 +139,13 @@
 kraz1H  IN  2620:0:860:2:208:80:153:44
 labcontrol1001  1H  IN A208.80.154.92
 labcontrol1002  1H  IN A208.80.154.95
-labtestweb2001  1H  IN A208.80.153.14
-labtestweb2001  1H  IN  2620:0:860:1:208:80:153:14
 labservices1001 1H  IN A208.80.155.117
 labservices1002 1H  IN A208.80.154.12
 labtestcontrol2001  1H  IN A208.80.153.47
+labtestpuppetmaster1002  1H  IN A 208.80.153.108
 labtestservices2001 1H  IN A208.80.153.48
+labtestweb2001  1H  IN A208.80.153.14
+labtestweb2001  1H  IN  2620:0:860:1:208:80:153:14
 lvs1001 1H  IN A208.80.154.55
 lvs1002 1H  IN A208.80.154.56
 lvs1003 1H  IN A208.80.154.57
diff --git a/templates/wmnet b/templates/wmnet
index e6f5350..c6b0b7b 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2678,7 +2678,6 @@
 labstore20021H  IN A10.192.21.5
 labstore20031H  IN A10.192.21.6
 labstore20041H  IN A10.192.21.8
-labtestpuppetmaster2001  1H  IN A10.192.48.91
 labtestneutron2001  1H  IN A10.192.20.4
 labtestneutron2002  1H  IN A10.192.20.10
 labtestnet2001  1H  IN A10.192.20.5

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: rancid: drop "server" suffix, apply on netmon1002

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

Change subject: rancid: drop "server" suffix, apply on netmon1002
..


rancid: drop "server" suffix, apply on netmon1002

Apply the rancid role on netmon1002, migrating from netmon1001.

Drop the "::server" suffix from the role name.

Later this will become a profile and be combined with the other
monitoring tool profiles into a single "role netmon_server" or similar.

Move the "::standard"-include into rancid role, remove from node level.

Bug: T159756
Change-Id: Ic9d39690a79aa748ed594782a9198b722291a1f0
---
M manifests/site.pp
R modules/role/manifests/rancid.pp
2 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 74caf85..b7d3edc 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2156,9 +2156,8 @@
 
 # network monitoring tool server
 node 'netmon1001.wikimedia.org' {
-role(rancid::server, librenms, servermon::wmf, smokeping,
+role(rancid, librenms, servermon::wmf, smokeping,
   network::monitor)
-include ::standard
 include ::passwords::network
 include ::base::firewall
 
@@ -2171,11 +2170,11 @@
 
 # network monitoring tool server - replacement server (T125020)
 node 'netmon1002.wikimedia.org' {
-# role(rancid::server, librenms, servermon::wmf, torrus, smokeping)
-include ::standard
+# role(rancid, librenms, servermon::wmf, torrus, smokeping)
+role(rancid)
+
 include ::passwords::network
 include ::base::firewall
-
 interface::add_ip6_mapped { 'main': }
 }
 
diff --git a/modules/role/manifests/rancid/server.pp 
b/modules/role/manifests/rancid.pp
similarity index 74%
rename from modules/role/manifests/rancid/server.pp
rename to modules/role/manifests/rancid.pp
index 24c8e7e..f0d00b3 100644
--- a/modules/role/manifests/rancid/server.pp
+++ b/modules/role/manifests/rancid.pp
@@ -1,10 +1,11 @@
 # Really Awful Notorious CIsco config Differ
-class role::rancid::server {
+class role::rancid {
 
-system::role { 'rancid::server':
+system::role { 'rancid':
 description => 'Really Awful Notorious CIsco config Differ (sp)'
 }
 
+include ::standard
 include ::rancid
 include ::profile::backup::host
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9d39690a79aa748ed594782a9198b722291a1f0
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Split testLinkMethods in seperate methods

2017-06-12 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358484 )

Change subject: Split testLinkMethods in seperate methods
..

Split testLinkMethods in seperate methods

Plus other refactoring:
 - .issuperset() calls have been replaces by self.assertLessEqual
 - assertEqual(all(...)) have been replaced by for loops calling
   multiple self.assertX(...) functions
 - T69931 is marked as resolved, so the tests has been re-activated for
   beta; if it still fails, we can de-activate specific tests rather
   than the whole block.

Change-Id: I986d80d64c0909e43cbbee23d068602faecc6ecb
---
M tests/site_tests.py
1 file changed, 90 insertions(+), 66 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/84/358484/1

diff --git a/tests/site_tests.py b/tests/site_tests.py
index 07c1b1a..569f0e3 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -452,10 +452,14 @@
 
 
 class TestSiteGenerators(DefaultSiteTestCase):
-
 """Test cases for Site methods."""
 
 cached = True
+
+def setUp(self):
+super(self).setUp()
+self.site = self.get_site()
+self.mainpage = self.get_mainpage()
 
 def test_generator_namespace(self):
 """Test site._generator with namespaces."""
@@ -469,62 +473,101 @@
   namespaces=1)
 self.assertEqual(gen.request['gblnamespace'], [1])
 
-def testLinkMethods(self):
-"""Test site methods for getting links to and from a page."""
-if self.site.family.name == 'wpbeta':
-raise unittest.SkipTest('Test fails on betawiki; T69931')
-mysite = self.get_site()
-mainpage = self.get_mainpage()
-backlinks = set(mysite.pagebacklinks(mainpage, namespaces=[0]))
+def test_pagereferences(self):
+# pagereferences includes both backlinks and embeddedin
+backlinks = set(self.site.pagebacklinks(self.mainpage, namespaces=[0]))
+embedded = set(self.site.page_embeddedin(self.mainpage, 
namespaces=[0]))
+refs = set(self.site.pagereferences(self.mainpage, namespaces=[0]))
+
+self.assertLessEqual(backlinks, refs)
+self.assertLessEqual(embedded, refs)
+self.assertEqual(refs, backlinks | embedded)
+
+def test_backlinks(self):
+backlinks_ns_0 = set(self.site.pagebacklinks(
+self.mainpage, namespaces=[0]))
+backlinks_ns_0_2 = set(self.site.pagebacklinks(
+self.mainpage, namespaces=[0, 2]))
+
 # only non-redirects:
-filtered = set(mysite.pagebacklinks(mainpage, namespaces=0,
-filterRedirects=False))
+filtered = set(self.site.pagebacklinks(
+self.mainpage, namespaces=0, filterRedirects=False))
 # only redirects:
-redirs = set(mysite.pagebacklinks(mainpage, namespaces=0,
-  filterRedirects=True))
+redirs = set(self.site.pagebacklinks(
+self.mainpage, namespaces=0, filterRedirects=True))
 # including links to redirect pages (but not the redirects):
-indirect = set(mysite.pagebacklinks(mainpage, namespaces=[0],
-followRedirects=True,
-filterRedirects=False))
+indirect = set(self.site.pagebacklinks(
+self.mainpage, namespaces=[0], followRedirects=True, 
filterRedirects=False))
+
+for bl in backlinks_ns_0:
+self.assertIsInstance(bl, pywikibot.Page)
+
 self.assertEqual(filtered & redirs, set([]))
 self.assertEqual(indirect & redirs, set([]))
 self.assertLessEqual(filtered, indirect)
-self.assertLessEqual(filtered, backlinks)
-self.assertLessEqual(redirs, backlinks)
-self.assertLessEqual(
-backlinks,
-set(self.site.pagebacklinks(mainpage, namespaces=[0, 2])))
+self.assertLessEqual(filtered, backlinks_ns_0)
+self.assertLessEqual(redirs, backlinks_ns_0)
+self.assertLessEqual(backlinks_ns_0, backlinks_ns_0_2)
 
-# pagereferences includes both backlinks and embeddedin
-embedded = set(mysite.page_embeddedin(mainpage, namespaces=[0]))
-refs = set(mysite.pagereferences(mainpage, namespaces=[0]))
-self.assertTrue(backlinks.issubset(refs))
-self.assertTrue(embedded.issubset(refs))
-for bl in backlinks:
-self.assertIsInstance(bl, pywikibot.Page)
-self.assertIn(bl, refs)
-for ei in embedded:
+def test_embeddedin(self):
+embedded_ns_0 = set(self.site.page_embeddedin(
+self.mainpage, namespaces=[0]))
+embedded_ns_0_2 = set(self.site.page_embeddedin(
+self.mainpage, namespaces=[0, 2]))
+redirs = set(self.site.page_embeddedin(
+self.mainpage, 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: rancid: drop "server" suffix, apply on netmon1002

2017-06-12 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358483 )

Change subject: rancid: drop "server" suffix, apply on netmon1002
..

rancid: drop "server" suffix, apply on netmon1002

Apply the rancid role on netmon1002, migrating from netmon1001.

Drop the "::server" suffix from the role name.

Later this will become a profile and be combined with the other
monitoring tool profiles into a single "role netmon_server" or similar.

Bug: T159756
Change-Id: Ic9d39690a79aa748ed594782a9198b722291a1f0
---
M manifests/site.pp
R modules/role/manifests/rancid.pp
2 files changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/83/358483/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 74caf85..9f8252c 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2156,7 +2156,7 @@
 
 # network monitoring tool server
 node 'netmon1001.wikimedia.org' {
-role(rancid::server, librenms, servermon::wmf, smokeping,
+role(rancid, librenms, servermon::wmf, smokeping,
   network::monitor)
 include ::standard
 include ::passwords::network
@@ -2172,6 +2172,7 @@
 # network monitoring tool server - replacement server (T125020)
 node 'netmon1002.wikimedia.org' {
 # role(rancid::server, librenms, servermon::wmf, torrus, smokeping)
+role(rancid)
 include ::standard
 include ::passwords::network
 include ::base::firewall
diff --git a/modules/role/manifests/rancid/server.pp 
b/modules/role/manifests/rancid.pp
similarity index 74%
rename from modules/role/manifests/rancid/server.pp
rename to modules/role/manifests/rancid.pp
index 24c8e7e..f0d00b3 100644
--- a/modules/role/manifests/rancid/server.pp
+++ b/modules/role/manifests/rancid.pp
@@ -1,10 +1,11 @@
 # Really Awful Notorious CIsco config Differ
-class role::rancid::server {
+class role::rancid {
 
-system::role { 'rancid::server':
+system::role { 'rancid':
 description => 'Really Awful Notorious CIsco config Differ (sp)'
 }
 
+include ::standard
 include ::rancid
 include ::profile::backup::host
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Add phpcs and make pass

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

Change subject: Add phpcs and make pass
..


Add phpcs and make pass

Short array syntax will be used in follow ups
to keep this patch set small
Long lines will be break in follow ups

Change-Id: I22a717097a7e107be08159e4290d9387a60d4e43
---
M AntiSpoof/batchCAAntiSpoof.php
M CentralAuth.php
M composer.json
M includes/CentralAuthUser.php
M includes/GlobalRename/GlobalRenameRequest.php
M includes/GlobalRename/GlobalUserMerge.php
M includes/GlobalRename/GlobalUserMergeLogFormatter.php
M includes/api/ApiQueryGlobalAllUsers.php
M includes/api/ApiQueryWikiSets.php
A phpcs.xml
M tests/phpunit/CentralAuthPluginUsingDatabaseTest.php
M tests/phpunit/CentralAuthPreAuthManagerHooksUsingDatabaseTest.php
M tests/phpunit/CentralAuthSessionProviderTest.php
M tests/phpunit/CentralAuthUserUsingDatabaseTest.php
14 files changed, 47 insertions(+), 27 deletions(-)

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



diff --git a/AntiSpoof/batchCAAntiSpoof.php b/AntiSpoof/batchCAAntiSpoof.php
index dabba84..3890118 100644
--- a/AntiSpoof/batchCAAntiSpoof.php
+++ b/AntiSpoof/batchCAAntiSpoof.php
@@ -5,7 +5,7 @@
 if ( $IP === false ) {
$IP = __DIR__ . '/../../..';
 }
-require_once( "$IP/extensions/AntiSpoof/maintenance/BatchAntiSpoofClass.php" );
+require_once "$IP/extensions/AntiSpoof/maintenance/BatchAntiSpoofClass.php";
 
 class BatchCAAntiSpoof extends BatchAntiSpoof {
 
@@ -51,4 +51,4 @@
 }
 
 $maintClass = "BatchCAAntiSpoof";
-require_once( DO_MAINTENANCE );
+require_once DO_MAINTENANCE;
diff --git a/CentralAuth.php b/CentralAuth.php
index 8b6dde6..426045f 100644
--- a/CentralAuth.php
+++ b/CentralAuth.php
@@ -6,11 +6,11 @@
$wgMessagesDirs['CentralAuth'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['CentralAuthAlias'] = __DIR__ . 
'/CentralAuth.alias.php';
$wgExtensionMessagesFiles['SpecialCentralAuthAliasesNoTranslate'] = 
__DIR__ . '/CentralAuth.notranslate-alias.php';
-   //wfWarn(
-   //  'Deprecated PHP entry point used for CentralAuth extension. ' .
-   //  'Please use wfLoadExtension instead, ' .
-   //  'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   //);
+   // wfWarn(
+   // 'Deprecated PHP entry point used for CentralAuth extension. ' .
+   // 'Please use wfLoadExtension instead, ' .
+   // 'see https://www.mediawiki.org/wiki/Extension_registration for more 
details.'
+   // );
return;
 } else {
die( 'This version of the CentralAuth extension requires MediaWiki 
1.25+' );
diff --git a/composer.json b/composer.json
index 686b65b..b8f68fb 100644
--- a/composer.json
+++ b/composer.json
@@ -1,11 +1,14 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/mediawiki-codesniffer": "0.7.2"
},
"scripts": {
+   "fix": "phpcbf",
"test": [
-   "parallel-lint . --exclude vendor"
+   "parallel-lint . --exclude vendor",
+   "phpcs -p -s"
]
}
 }
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 690cd23..b668ca1 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -976,7 +976,6 @@
// we can use it to match other accounts. If it doesn't,
// we can't be sure that the other accounts with no mail
// are the same person, so err on the side of caution.
-   //
// For additional safety, we'll only let the mail check
// propagate from a confirmed account
$passingMail = array();
@@ -1024,7 +1023,6 @@
$method = 'password';
} else {
// Can't automatically resolve this account.
-   //
// If the password matches, it will be 
automigrated
// at next login. If no match, user will have 
to input
// the conflicting password or deal with the 
conflict.
@@ -1601,7 +1599,7 @@
 
if ( $oldHiddenLevel != $setHidden ) {
$hideStatus = $this->adminSetHidden( $setHidden );
-   switch( $setHidden ) {
+   switch ( $setHidden ) {
case self::HIDDEN_NONE:
if ( $oldHiddenLevel == 
self::HIDDEN_OVERSIGHT ) {
$removed[] = $context->msg( 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: Add Atikamekw Wikipedia to project names and search results

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

Change subject: Add Atikamekw Wikipedia to project names and search results
..


Add Atikamekw Wikipedia to project names and search results

Bug: T167714
Change-Id: I6f1f24c466d0936f50390943908bc2e369b8b24b
---
M i18n/wikimediainterwikisearchresults/en.json
M i18n/wikimediainterwikisearchresults/qqq.json
M i18n/wikimediaprojectnames/en.json
M i18n/wikimediaprojectnames/qqq.json
4 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/i18n/wikimediainterwikisearchresults/en.json 
b/i18n/wikimediainterwikisearchresults/en.json
index d928ffa..7dbcc9c 100644
--- a/i18n/wikimediainterwikisearchresults/en.json
+++ b/i18n/wikimediainterwikisearchresults/en.json
@@ -18,6 +18,7 @@
"search-interwiki-results-arzwiki": "Showing results from 
[[:arz:|Egyptian Arabic Wikipedia]].",
"search-interwiki-results-astwiki": "Showing results from 
[[:ast:|Asturian Wikipedia]].",
"search-interwiki-results-aswiki": "Showing results from 
[[:as:|Assamese Wikipedia]].",
+   "search-interwiki-results-atjwiki": "Showing results from 
[[:atj:|Atikamekw Wikipedia]].",
"search-interwiki-results-avwiki": "Showing results from [[:av:|Avar 
Wikipedia]].",
"search-interwiki-results-aywiki": "Showing results from [[:ay:|Aymara 
Wikipedia]].",
"search-interwiki-results-azwiki": "Showing results from 
[[:az:|Azerbaijani Wikipedia]].",
diff --git a/i18n/wikimediainterwikisearchresults/qqq.json 
b/i18n/wikimediainterwikisearchresults/qqq.json
index eea9004..c5211b6 100644
--- a/i18n/wikimediainterwikisearchresults/qqq.json
+++ b/i18n/wikimediainterwikisearchresults/qqq.json
@@ -25,6 +25,7 @@
"search-interwiki-results-arzwiki": "Search results description for 
Egyptian Arabic Wikipedia.\n{{LanguageNameTip|arz}}",
"search-interwiki-results-astwiki": "Search results description for 
Asturian Wikipedia.\n{{LanguageNameTip|ast}}",
"search-interwiki-results-aswiki": "Search results description for 
Assamese Wikipedia.\n{{LanguageNameTip|as}}",
+   "search-interwiki-results-atjwiki": "Search results description for 
Atikamekw Wikipedia.\n{{LanguageNameTip|atj}}",
"search-interwiki-results-avwiki": "Search results description for Avar 
Wikipedia.\n{{LanguageNameTip|av}}",
"search-interwiki-results-aywiki": "Search results description for 
Aymara Wikipedia.\n{{LanguageNameTip|ay}}",
"search-interwiki-results-azwiki": "Search results description for 
Azerbaijani Wikipedia.\n{{LanguageNameTip|az}}",
diff --git a/i18n/wikimediaprojectnames/en.json 
b/i18n/wikimediaprojectnames/en.json
index 121cc29..e4967c5 100644
--- a/i18n/wikimediaprojectnames/en.json
+++ b/i18n/wikimediaprojectnames/en.json
@@ -45,6 +45,7 @@
"project-localized-name-astwiktionary": "Asturian Wiktionary",
"project-localized-name-astwikibooks": "Asturian Wikibooks",
"project-localized-name-astwikiquote": "Asturian Wikiquote",
+   "project-localized-name-atjwiki": "Atikamekw Wikipedia",
"project-localized-name-avwiki": "Avaric Wikipedia",
"project-localized-name-avwiktionary": "Avaric Wiktionary",
"project-localized-name-aywiki": "Aymara Wikipedia",
diff --git a/i18n/wikimediaprojectnames/qqq.json 
b/i18n/wikimediaprojectnames/qqq.json
index 3e82ceb..f82c0b6 100644
--- a/i18n/wikimediaprojectnames/qqq.json
+++ b/i18n/wikimediaprojectnames/qqq.json
@@ -53,6 +53,7 @@
"project-localized-name-astwiktionary": 
"{{ProjectNameDocumentation|url=https://ast.wiktionary.org|name=Asturian 
Wiktionary|language=ast}}",
"project-localized-name-astwikibooks": 
"{{ProjectNameDocumentation|url=https://ast.wikibooks.org|name=Asturian 
Wikibooks|language=ast}}",
"project-localized-name-astwikiquote": 
"{{ProjectNameDocumentation|url=https://ast.wikiquote.org|name=Asturian 
Wikiquote|language=ast}}",
+   "project-localized-name-atjwiki": 
"{{ProjectNameDocumentation|url=https://atj.wikipedia.org|name=Atikamekw 
Wikipedia|language=atj}}",
"project-localized-name-avwiki": 
"{{ProjectNameDocumentation|url=https://av.wikipedia.org|name=Avaric 
Wikipedia|language=av}}",
"project-localized-name-avwiktionary": 
"{{ProjectNameDocumentation|url=https://av.wiktionary.org|name=Avaric 
Wiktionary|language=av}}",
"project-localized-name-aywiki": 
"{{ProjectNameDocumentation|url=https://ay.wikipedia.org|name=Aymara 
Wikipedia|language=ay}}",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f1f24c466d0936f50390943908bc2e369b8b24b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Amire80 

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Fix indent of some lines

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

Change subject: Fix indent of some lines
..


Fix indent of some lines

Changes spaces to tabs or remove tabs or spaces

Change-Id: I1a189600561fe244337091f811adf899e2440cab
---
M Flow.namespaces.php
M FlowActions.php
M defines.php
M includes/Api/ApiFlowBase.php
M includes/Block/Topic.php
M includes/Conversion/Utils.php
M includes/Import/LiquidThreadsApi/Objects.php
M includes/Model/Reference.php
M includes/SpamFilter/AbuseFilter.php
M maintenance/repair_missing_revision_content.php
M maintenance/repair_missing_revision_content_from_parent.php
M scripts/pre-commit
M tests/phpunit/TalkpageManagerTest.php
13 files changed, 55 insertions(+), 55 deletions(-)

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



diff --git a/Flow.namespaces.php b/Flow.namespaces.php
index cf83b49..543babe 100644
--- a/Flow.namespaces.php
+++ b/Flow.namespaces.php
@@ -105,7 +105,7 @@
 
 /** Italian */
 $namespaceNames['it'] = array(
-NS_TOPIC =>  'Argomento',
+   NS_TOPIC =>  'Argomento',
 );
 
 /** Korean */
diff --git a/FlowActions.php b/FlowActions.php
index fd53bc0..792054d 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -299,8 +299,8 @@
'permissions' => array(
// no permissions needed for own posts
PostRevision::MODERATED_NONE => function( PostRevision 
$post, RevisionActionPermissions $permissions ) {
-   return $post->isCreator( 
$permissions->getUser() ) ? '' : 'flow-edit-post';
-   }
+   return $post->isCreator( 
$permissions->getUser() ) ? '' : 'flow-edit-post';
+   }
),
'root-permissions' => array(
PostRevision::MODERATED_NONE => '',
@@ -333,8 +333,8 @@
'permissions' => array(
// no permissions needed for own posts
PostRevision::MODERATED_NONE => function( PostRevision 
$post, RevisionActionPermissions $permissions ) {
-   return $post->isCreator( 
$permissions->getUser() ) ? '' : 'flow-edit-post';
-   }
+   return $post->isCreator( 
$permissions->getUser() ) ? '' : 'flow-edit-post';
+   }
),
'root-permissions' => array(
PostRevision::MODERATED_NONE => '',
@@ -621,17 +621,17 @@
return '';
},
'rc_insert' => function( PostRevision $revision, 
RecentChangesListener $recentChanges ) {
-   $post = $revision->getCollection();
-   $previousRevision = $post->getPrevRevision( 
$revision );
-   if ( $previousRevision ) {
-   // * if topic was hidden/deleted, 
restore can go to RC
-   // * if topic was suppressed, restore 
can not go to RC
-   global $wgFlowActions;
-   return 
$wgFlowActions[$previousRevision->getModerationState() . '-topic']['rc_insert'];
-   }
+   $post = $revision->getCollection();
+   $previousRevision = $post->getPrevRevision( $revision );
+   if ( $previousRevision ) {
+   // * if topic was hidden/deleted, restore can 
go to RC
+   // * if topic was suppressed, restore can not 
go to RC
+   global $wgFlowActions;
+   return 
$wgFlowActions[$previousRevision->getModerationState() . '-topic']['rc_insert'];
+   }
 
-   return true;
-   },
+   return true;
+   },
'permissions' => array(
PostRevision::MODERATED_LOCKED => array( 'flow-lock', 
'flow-delete', 'flow-suppress' ),
PostRevision::MODERATED_HIDDEN => array( 'flow-hide', 
'flow-delete', 'flow-suppress' ),
diff --git a/defines.php b/defines.php
index fdcf722..cd30028 100644
--- a/defines.php
+++ b/defines.php
@@ -3,7 +3,7 @@
 // Constants
 define( 'RC_FLOW', 142 ); // Random number chosen.  Can be replaced with 
rc_source; see bug 72157.
 if ( !defined( 'NS_TOPIC' ) ) {
-define( 'NS_TOPIC', 2600 );
+   define( 'NS_TOPIC', 2600 );
 }
 define( 'CONTENT_MODEL_FLOW_BOARD', 'flow-board' );
 define( 'FLOW_TALK_PAGE_MANAGER_USER', 'Flow talk page manager' );
diff --git a/includes/Api/ApiFlowBase.php b/includes/Api/ApiFlowBase.php
index c9e58f1..02bef8d 

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Make phpcs pass - includes / specials

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

Change subject: Make phpcs pass - includes / specials
..


Make phpcs pass - includes / specials

Change-Id: Ic586c18802f26d0bde5c97a0732b1e8ae6b0256a
---
M includes/CentralAuthHooks.php
M includes/CentralAuthPlugin.php
M includes/CentralAuthPrimaryAuthenticationProvider.php
M includes/CentralAuthReadOnlyError.php
M includes/specials/SpecialCentralAuth.php
M includes/specials/SpecialCentralLogin.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameProgress.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialGlobalRenameRequest.php
M includes/specials/SpecialGlobalUsers.php
M includes/specials/SpecialMergeAccount.php
M includes/specials/SpecialMultiLock.php
M includes/specials/SpecialWikiSets.php
14 files changed, 35 insertions(+), 39 deletions(-)

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



diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index f57a102..95d0d43 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -13,7 +13,7 @@
$wgAuthManagerAutoConfig;
 
// Override $wgCentralAuthDatabase for Wikimedia Jenkins.
-   if( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI ) {
+   if ( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI ) {
$wgCentralAuthDatabase = $wgDBname;
}
 
@@ -168,7 +168,7 @@
$link = $params[0];
}
 
-   switch( $action ) {
+   switch ( $action ) {
case 'newset':
$args = array( WikiSet::formatType( $params[1] 
), $params[2] );
break;
@@ -182,7 +182,7 @@
$args = array( $params[1]
? $params[1] : wfMessage( 'rightsnone' 
)->text(), $params[2] ? $params[2] : wfMessage( 'rightsnone' )->text() );
break;
-   default: //'deleteset'
+   default: // 'deleteset'
$args = array();
}
 
@@ -191,7 +191,7 @@
// centralauth-rightslog-entry-setnewtype, 
centralauth-rightslog-entry-setchange,
// centralauth-rightslog-entry-deleteset
$msg = wfMessage( "centralauth-rightslog-entry-{$action}", 
$link )->params( $args );
-   if( $skin ) {
+   if ( $skin ) {
return $msg->text();
} else {
return $msg->inContentLanguage()->text();
@@ -349,7 +349,7 @@
}
 
$firstUser = $users[0];
-   if( !$firstUser->getID() ) {
+   if ( !$firstUser->getID() ) {
$centralUser = CentralAuthUser::getInstance( $firstUser 
);
if ( $centralUser->exists() ) {
$abortError = array( 
'centralauth-account-exists-reset', $centralUser->getName() );
@@ -797,7 +797,7 @@
if ( $latestCa->isAttached() ) {
$latestCa->setEmailAuthenticationTimestamp( 
$timestamp );
$latestCa->saveSettings();
-}
+   }
}
 
return true;
@@ -974,7 +974,7 @@
}
$centralUser = CentralAuthUser::getInstance( $user );
 
-   if ($wgDisableUnmergedEditing
+   if ( $wgDisableUnmergedEditing
&& ( $action === 'edit' || $action === 'delete' )
&& !$centralUser->exists()
&& !$title->inNamespaces( NS_USER_TALK, NS_PROJECT_TALK 
)
diff --git a/includes/CentralAuthPlugin.php b/includes/CentralAuthPlugin.php
index e984a6d..d134012 100644
--- a/includes/CentralAuthPlugin.php
+++ b/includes/CentralAuthPlugin.php
@@ -110,9 +110,7 @@
// If the user passed in the global password, we can 
identify
// any remaining local accounts with a matching password
// and migrate them in transparently.
-   //
// That may or may not include the current wiki.
-   //
wfDebugLog( 'CentralAuth',
"plugin: attempting wgCentralAuthAutoMigrate 
for '$username'" );
$central->attemptPasswordMigration( $password );
@@ -136,12 +134,10 @@
 */
protected function checkAttached( CentralAuthUser $central, $username ) 
{
// Several possible states here:
- 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: K8s: Add the Dockerfile and config used for the official image

2017-06-12 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358480 )

Change subject: K8s: Add the Dockerfile and config used for the official image
..


K8s: Add the Dockerfile and config used for the official image

Change-Id: I5507a4308bc5bb4458975ef44eb97165e86ccdb3
---
M .gitignore
A dist/Dockerfile
A dist/config.yaml
3 files changed, 88 insertions(+), 2 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index aa4cc12..28e4a2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,8 @@
-Dockerfile
+/Dockerfile
 /.eslintcache
 .idea/
 coverage
-config.yaml
+/config.yaml
 node_modules
 npm-debug.log
 .DS_Store
diff --git a/dist/Dockerfile b/dist/Dockerfile
new file mode 100644
index 000..acdf15c
--- /dev/null
+++ b/dist/Dockerfile
@@ -0,0 +1,9 @@
+FROM wikimedia/nodejs
+RUN mkdir /opt/service
+ADD . /opt/service
+COPY dist/config.yaml /opt/service/
+WORKDIR /opt/service
+ENV HOME=/root LINK=g++
+RUN npm install && npm dedupe
+ENV IN_DOCKER=1
+CMD npm start
diff --git a/dist/config.yaml b/dist/config.yaml
new file mode 100644
index 000..708bde9
--- /dev/null
+++ b/dist/config.yaml
@@ -0,0 +1,77 @@
+# Number of worker processes to spawn.
+# Set to 0 to run everything in a single process without clustering.
+# Use 'ncpu' to run as many workers as there are CPU units
+num_workers: ncpu
+
+# Log error messages and gracefully restart a worker if v8 reports that it
+# uses more heap (note: not RSS) than this many mb.
+worker_heap_limit_mb: 250
+
+# Logger info
+logging:
+  level: info
+#  streams:
+#  # Use gelf-stream -> logstash
+#  - type: gelf
+#host: logstash1003.eqiad.wmnet
+#port: 12201
+
+# Statsd metrics reporter
+metrics:
+  #type: log
+  #host: localhost
+  #port: 8125
+
+services:
+  - name: mobileapps
+# a relative path or the name of an npm package, if different from name
+module: ./app.js
+# optionally, a version constraint of the npm package
+# version: ^0.4.0
+# per-service config
+conf:
+  port: 
+  # interface: localhost # uncomment to only listen on localhost
+  # more per-service config settings
+  # the location of the spec, defaults to spec.yaml if not specified
+  # spec: ./spec.yaml
+  # allow cross-domain requests to the API (default '*')
+  cors: '*'
+  # to disable use:
+  # cors: false
+  # to restrict to a particular domain, use:
+  # cors: restricted.domain.org
+  # content for the CSP headers
+  # csp: false  # uncomment this line to disable sending them
+  # URL of the outbound proxy to use (complete with protocol)
+  # proxy: http://my.proxy.org:8080
+  # the list of domains for which not to use the proxy defined above
+  # no_proxy_list:
+  #   - domain1.com
+  #   - domain2.org
+  # the list of incoming request headers that can be logged; if left empty,
+  # the following headers are allowed: cache-control, content-length,
+  # content-type, if-match, user-agent, x-request-id
+  # log_header_whitelist:
+  #   - cache-control
+  #   - content-length
+  #   - content-type
+  #   - if-match
+  #   - user-agent
+  #   - x-request-id
+  # the user agent to use when issuing requests
+  user_agent: WMF Mobile Content Service (k8s)
+  # the template used for contacting the MW API
+  mwapi_req:
+method: post
+uri: '{env(MWAPI_URI,http://localhost/w/api.php)}'
+headers:
+  user-agent: '{{user-agent}}'
+body: '{{ default(request.query, {}) }}'
+  # the template used for contacting RESTBase
+  restbase_req:
+method: '{{request.method}}'
+uri: '{env(RESTBASE_URI,https://{{domain}}/api/rest_v1/{+path})}'
+query: '{{ default(request.query, {}) }}'
+headers: '{{request.headers}}'
+body: '{{request.body}}'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5507a4308bc5bb4458975ef44eb97165e86ccdb3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: bs4 shall be used as import

2017-06-12 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358481 )

Change subject: bs4 shall be used as import
..

bs4 shall be used as import

Change-Id: Iac827381cf3034dda7cd58686ab4414de6b782a9
---
M tests/script_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/81/358481/1

diff --git a/tests/script_tests.py b/tests/script_tests.py
index b305a2b..893964b 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -41,7 +41,7 @@
 'script_wui': ['crontab', 'lua'],
 # Note: package 'lunatic-python' provides module 'lua'
 'flickrripper': ['flickrapi'],
-'imageharvest': ['beautifulsoup4'],
+'imageharvest': ['bs4'],
 'match_images': ['PIL.ImageTk'],
 'states_redirect': ['pycountry'],
 'patrol': ['mwparserfromhell'],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: K8s: Add the Dockerfile and config used for the official image

2017-06-12 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358480 )

Change subject: K8s: Add the Dockerfile and config used for the official image
..

K8s: Add the Dockerfile and config used for the official image

Change-Id: I5507a4308bc5bb4458975ef44eb97165e86ccdb3
---
M .gitignore
A dist/Dockerfile
A dist/config.yaml
3 files changed, 88 insertions(+), 2 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index aa4cc12..28e4a2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,8 @@
-Dockerfile
+/Dockerfile
 /.eslintcache
 .idea/
 coverage
-config.yaml
+/config.yaml
 node_modules
 npm-debug.log
 .DS_Store
diff --git a/dist/Dockerfile b/dist/Dockerfile
new file mode 100644
index 000..acdf15c
--- /dev/null
+++ b/dist/Dockerfile
@@ -0,0 +1,9 @@
+FROM wikimedia/nodejs
+RUN mkdir /opt/service
+ADD . /opt/service
+COPY dist/config.yaml /opt/service/
+WORKDIR /opt/service
+ENV HOME=/root LINK=g++
+RUN npm install && npm dedupe
+ENV IN_DOCKER=1
+CMD npm start
diff --git a/dist/config.yaml b/dist/config.yaml
new file mode 100644
index 000..708bde9
--- /dev/null
+++ b/dist/config.yaml
@@ -0,0 +1,77 @@
+# Number of worker processes to spawn.
+# Set to 0 to run everything in a single process without clustering.
+# Use 'ncpu' to run as many workers as there are CPU units
+num_workers: ncpu
+
+# Log error messages and gracefully restart a worker if v8 reports that it
+# uses more heap (note: not RSS) than this many mb.
+worker_heap_limit_mb: 250
+
+# Logger info
+logging:
+  level: info
+#  streams:
+#  # Use gelf-stream -> logstash
+#  - type: gelf
+#host: logstash1003.eqiad.wmnet
+#port: 12201
+
+# Statsd metrics reporter
+metrics:
+  #type: log
+  #host: localhost
+  #port: 8125
+
+services:
+  - name: mobileapps
+# a relative path or the name of an npm package, if different from name
+module: ./app.js
+# optionally, a version constraint of the npm package
+# version: ^0.4.0
+# per-service config
+conf:
+  port: 
+  # interface: localhost # uncomment to only listen on localhost
+  # more per-service config settings
+  # the location of the spec, defaults to spec.yaml if not specified
+  # spec: ./spec.yaml
+  # allow cross-domain requests to the API (default '*')
+  cors: '*'
+  # to disable use:
+  # cors: false
+  # to restrict to a particular domain, use:
+  # cors: restricted.domain.org
+  # content for the CSP headers
+  # csp: false  # uncomment this line to disable sending them
+  # URL of the outbound proxy to use (complete with protocol)
+  # proxy: http://my.proxy.org:8080
+  # the list of domains for which not to use the proxy defined above
+  # no_proxy_list:
+  #   - domain1.com
+  #   - domain2.org
+  # the list of incoming request headers that can be logged; if left empty,
+  # the following headers are allowed: cache-control, content-length,
+  # content-type, if-match, user-agent, x-request-id
+  # log_header_whitelist:
+  #   - cache-control
+  #   - content-length
+  #   - content-type
+  #   - if-match
+  #   - user-agent
+  #   - x-request-id
+  # the user agent to use when issuing requests
+  user_agent: WMF Mobile Content Service (k8s)
+  # the template used for contacting the MW API
+  mwapi_req:
+method: post
+uri: '{env(MWAPI_URI,http://localhost/w/api.php)}'
+headers:
+  user-agent: '{{user-agent}}'
+body: '{{ default(request.query, {}) }}'
+  # the template used for contacting RESTBase
+  restbase_req:
+method: '{{request.method}}'
+uri: '{env(RESTBASE_URI,https://{{domain}}/api/rest_v1/{+path})}'
+query: '{{ default(request.query, {}) }}'
+headers: '{{request.headers}}'
+body: '{{request.body}}'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...EducationProgram[master]: ViewCourseAction: Fix "Add students" menu not being expandable

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

Change subject: ViewCourseAction: Fix "Add students" menu not being expandable
..

ViewCourseAction: Fix "Add students" menu not being expandable

Just remove `href="#"` from the menu custom toggle.
It does nothing and was never needed, and since change
2d95d36a8ed296813e686e9b756c2bb7c306950f in MediaWiki clicks
on such toggles are ignored by jquery.makeCollapsible code.

I think all this could be a made a lot simpler, eh.

Bug: T167651
Change-Id: I64d9b7c4a187c1ebbd1de74ac958c822470de9c4
---
M includes/actions/ViewCourseAction.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram 
refs/changes/79/358479/1

diff --git a/includes/actions/ViewCourseAction.php 
b/includes/actions/ViewCourseAction.php
index 73dc2d4..d1bed5a 100644
--- a/includes/actions/ViewCourseAction.php
+++ b/includes/actions/ViewCourseAction.php
@@ -352,7 +352,6 @@
'a',
[
'class' => 
'mw-customtoggle-addstudents',
-   'href' => '#'
],
$expandMsg
)

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Add atjwiki

2017-06-12 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358417 )

Change subject: Add atjwiki
..


Add atjwiki

Bug: T167714
Change-Id: If15d3d76ad1f979f8db7c0f0679a74bbdfc3e9b5
---
M scap/vars.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/scap/vars.yaml b/scap/vars.yaml
index 867a9f1..9ed0f5d 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -73,6 +73,7 @@
 arz.wikipedia.org: default_project
 as.wikipedia.org: default_project
 ast.wikipedia.org: default_project
+atj.wikipedia.org: default_project
 av.wikipedia.org: default_project
 ay.wikipedia.org: default_project
 az.wikipedia.org: default_project

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If15d3d76ad1f979f8db7c0f0679a74bbdfc3e9b5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Sync up with Parsoid parserTests.txt

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

Change subject: Sync up with Parsoid parserTests.txt
..


Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 108eed81b3eb78b77ade5ba5daac71fb43fff6de

Change-Id: Ib2b31f008adaf16866de16ef963bc58d6cabb088
---
M tests/parser/parserTests.txt
1 file changed, 91 insertions(+), 17 deletions(-)

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



diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 69fee30..0247dd7 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -8302,6 +8302,21 @@
 !! end
 
 !! test
+Serialization of purely hash wikilink
+!! options
+title=[[User:Test/123]]
+subpage
+parsoid=html2wt
+!! html/parsoid
+[[
+!! wikitext
+[[#a|[[]]
+!! html/php
+[[
+
+!! end
+
+!! test
 1. Interaction of linktrail and template encapsulation
 !! wikitext
 {{echo|[[Foo]]}}l
@@ -17896,6 +17911,19 @@
 !! end
 
 !! test
+Sanitizer: Strip comments from CSS attributes
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+2013
+!! html/php
+2013
+
+!! html/parsoid
+2013
+!! end
+
+!! test
 Language converter: output gets cut off unexpectedly (T7757)
 !! options
 language=zh
@@ -23420,26 +23448,26 @@
 
 !! end
 
-## The unconventional output is the result of `usePHPPreProcessor` being
-## disabled in parserTests.js.  This test is mainly just to show  is
-## recognized as an extension tag w/o a native handler.
 !! test
 LST Sections: Newfangled approach
 !! wikitext
 
 
 !! html/parsoid
-section begin="2011-05-16" />
-section end="2014-04-10 (MW 1.23wmf22)" 
/>
+
+
+
+
 !! end
 
 #- Test stripping of empty nodes in template content --
-!!test
+
+!! test
 Empty LI and TR nodes should be stripped from template content
-!!wikitext
+!! wikitext
 {{EmptyLITest}}
 {{EmptyTRTest}}
-!!html/parsoid
+!! html/parsoid
 
 a
 b
@@ -23454,11 +23482,11 @@
 
 
 
-!!end
+!! end
 
-!!test
+!! test
 Empty LI and TR nodes should not be stripped from top-level content
-!!wikitext
+!! wikitext
 * a
 *
 * b
@@ -23467,7 +23495,7 @@
 |-
 |foo
 |}
-!!html/parsoid
+!! html/parsoid
 
  a
 
@@ -23481,20 +23509,20 @@
 
 
 
-!!end
+!! end
 
-!!test
+!! test
 Empty TR nodes should not be stripped if they have any attributes set
-!!wikitext
+!! wikitext
 {{EmptyTRWithHTMLAttrTest}}
-!!html/parsoid
+!! html/parsoid
 
 
 foo
 
 bar
 
-!!end
+!! end
 
  
  The following section of tests are primarily to test
@@ -25911,6 +25939,41 @@
 [[Foo]]
 !! end
 
+!! test
+Parsoid should accept interwiki shortcuts
+!! options
+parsoid=html2wt
+!! html/parsoid
+Foo
+Foo
+Foo
+Foo
+Foo
+Foo
+!! wikitext
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+!! end
+
+!! test
+Parsoid should not accept invalid interwiki shortcuts
+!! options
+parsoid=html2wt
+!! html/parsoid
+Foo
+Foo
+Foo
+!! wikitext
+[news:Foo Foo]
+[news:Foo Foo]
+[news:Foo Foo]
+!! end
+
 # See T93839
 !! test
 New wikilinks should be serialized properly
@@ -28082,6 +28145,17 @@
 
 !! end
 
+!! test
+New transclusion added after a list should be serialized after the list
+!! options
+parsoid=html2wt
+!! html/parsoid
+afoo
+!! wikitext
+* a
+{{echo|foo}}
+!! end
+
 # -
 # End of section for Parsoid-only html2wt tests for serialization
 # of new content

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2b31f008adaf16866de16ef963bc58d6cabb088
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Jackmcbarn 
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] mediawiki...CreateUserPage[master]: Initial commit.

2017-06-12 Thread Cicalese (Code Review)
Cicalese has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358364 )

Change subject: Initial commit.
..


Initial commit.

Change-Id: I55698ed4028c6d6cca3cc531bf75ec1b267a69d8
---
A CODE_OF_CONDUCT.md
A COPYING
A Gruntfile.js
A extension.json
A i18n/en.json
A i18n/qqq.json
A includes/CreateUserPageHooks.php
A package.json
8 files changed, 134 insertions(+), 0 deletions(-)

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



diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000..d8e5d08
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1 @@
+The development of this software is covered by a [Code of 
Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).
diff --git a/COPYING b/COPYING
new file mode 100644
index 000..5eb4ac0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 The MITRE Corporation
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..a45071e
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,21 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**',
+   '!vendor/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..4cb4a59
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,28 @@
+{
+   "name": "CreateUserPage",
+   "version": "1.0",
+   "author": [
+   "[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy 
Cicalese]"
+   ],
+   "url": "https://www.mediawiki.org/wiki/Extension:Create_User_Page;,
+   "descriptionmsg": "createuserpage-desc",
+   "license-name": "MIT",
+   "type": "other",
+   "MessagesDirs": {
+   "CreateUserPage": [
+   "i18n"
+   ]
+   },
+   "AutoloadClasses": {
+   "CreateUserPageHooks": "includes/CreateUserPageHooks.php"
+   },
+   "Hooks": {
+   "UserLoginComplete": [
+   "CreateUserPageHooks::checkForUserPage"
+   ]
+   },
+   "config": {
+   "CreateUserPage_PageContent": "{{User}}"
+   },
+   "manifest_version": 1
+}
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 000..a9ad1a1
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "cicalese"
+   ]
+   },
+   "createuserpage-desc": "Create user page for a user if it does not 
exist when the user logs in."
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..7124385
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "cicalese"
+   ]
+   },
+   "createuserpage-desc": "{{desc|name=Create User 
Page|url=https://www.mediawiki.org/wiki/Extension:Create_User_Page}};
+}
diff --git a/includes/CreateUserPageHooks.php b/includes/CreateUserPageHooks.php
new file mode 100755
index 000..d29a223
--- /dev/null
+++ b/includes/CreateUserPageHooks.php
@@ -0,0 +1,36 @@
+mName );
+   if ( !is_null( $title ) && !$title->exists() ) {
+   $page = new WikiPage( $title );
+   $page->doEdit( 

[MediaWiki-commits] [Gerrit] mediawiki...EmailAuthorization[master]: Spaces to tabs.

2017-06-12 Thread Cicalese (Code Review)
Cicalese has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358450 )

Change subject: Spaces to tabs.
..


Spaces to tabs.

Change-Id: I281b612939563a0e243176175f9732383b846099
---
M Gruntfile.js
M package.json
2 files changed, 27 insertions(+), 27 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index aa66d75..a45071e 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,21 +1,21 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
-grunt.loadNpmTasks( 'grunt-jsonlint' );
-grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
 
-grunt.initConfig( {
-banana: {
-all: 'i18n/'
-},
-jsonlint: {
-all: [
-'**/*.json',
-'!node_modules/**',
-'!vendor/**'
-]
-}
-} );
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**',
+   '!vendor/**'
+   ]
+   }
+   } );
 
-grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
-grunt.registerTask( 'default', 'test' );
-};
\ No newline at end of file
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
index 375c25d..bcf5b13 100644
--- a/package.json
+++ b/package.json
@@ -1,11 +1,11 @@
 {
-  "private": true,
-  "scripts": {
-"test": "grunt test"
-  },
-  "devDependencies": {
-"grunt": "1.0.1",
-"grunt-banana-checker": "0.5.0",
-"grunt-jsonlint": "1.1.0"
-  }
-}
\ No newline at end of file
+   "private": true,
+   "scripts": {
+   "test": "grunt test"
+   },
+   "devDependencies": {
+   "grunt": "1.0.1",
+   "grunt-banana-checker": "0.5.0",
+   "grunt-jsonlint": "1.1.0"
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I281b612939563a0e243176175f9732383b846099
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EmailAuthorization
Gerrit-Branch: master
Gerrit-Owner: Cicalese 
Gerrit-Reviewer: Cicalese 
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[REL1_28]: Make DeferredUpdates detect LBFactory transaction rounds

2017-06-12 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358461 )

Change subject: Make DeferredUpdates detect LBFactory transaction rounds
..

Make DeferredUpdates detect LBFactory transaction rounds

Previously, tryOpportunisticExecute() tried to nest transaction rounds,
which would fail. Added LBFactory::hasTransactionRound() as needed.

Also cleaned up some unqualified class names in callbacks and set the
PRESEND flag for the JobQueueDB AutoCommitUpdate callback. Use the
proper getMasterDB() method while at it. These follow up 24842cfac.

Bug: T154425
Change-Id: Ib1d38f68bd217903d1a7d46fb15b7d7d9620daa6
(cherry picked from commit 95fdff36c251d9d1807c7b5b0bf84acc457f0d1e)
---
M includes/MediaWiki.php
M includes/deferred/DeferredUpdates.php
M includes/jobqueue/JobQueueDB.php
M includes/jobqueue/JobRunner.php
M includes/libs/rdbms/lbfactory/ILBFactory.php
M includes/libs/rdbms/lbfactory/LBFactory.php
6 files changed, 32 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/358461/1

diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index ba1c8c8..f129a8b 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -887,9 +887,8 @@
__METHOD__
);
 
-   // Push lazilly-pushed jobs
// Important: this must be the last deferred update added 
(T100085, T154425)
-   DeferredUpdates::addCallableUpdate( [ 'JobQueueGroup', 
'pushLazyJobs' ] );
+   DeferredUpdates::addCallableUpdate( [ JobQueueGroup::class, 
'pushLazyJobs' ] );
 
// Do any deferred jobs
DeferredUpdates::doUpdates( 'enqueue' );
diff --git a/includes/deferred/DeferredUpdates.php 
b/includes/deferred/DeferredUpdates.php
index fd3a1af..069b092 100644
--- a/includes/deferred/DeferredUpdates.php
+++ b/includes/deferred/DeferredUpdates.php
@@ -283,7 +283,7 @@
}
 
// Avoiding running updates without them having outer scope
-   if ( !self::getBusyDbConnections() ) {
+   if ( !self::areDatabaseTransactionsActive() ) {
self::doUpdates( $mode );
return true;
}
@@ -337,16 +337,19 @@
}
 
/**
-* @return IDatabase[] Connection where commit() cannot be called yet
+* @return bool If a transaction round is active or connection is not 
ready for commit()
 */
-   private static function getBusyDbConnections() {
-   $connsBusy = [];
-
+   private static function areDatabaseTransactionsActive() {
$lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   if ( $lbFactory->hasTransactionRound() ) {
+   return true;
+   }
+
+   $connsBusy = false;
$lbFactory->forEachLB( function ( LoadBalancer $lb ) use ( 
&$connsBusy ) {
$lb->forEachOpenMasterConnection( function ( IDatabase 
$conn ) use ( &$connsBusy ) {
if ( $conn->writesOrCallbacksPending() || 
$conn->explicitTrxActive() ) {
-   $connsBusy[] = $conn;
+   $connsBusy = true;
}
} );
} );
diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php
index ea2b113..345b591 100644
--- a/includes/jobqueue/JobQueueDB.php
+++ b/includes/jobqueue/JobQueueDB.php
@@ -181,13 +181,16 @@
 * @return void
 */
protected function doBatchPush( array $jobs, $flags ) {
-   DeferredUpdates::addUpdate( new AutoCommitUpdate(
-   wfGetDB( DB_MASTER ),
-   __METHOD__,
-   function ( IDatabase $dbw, $fname ) use ( $jobs, $flags 
) {
-   $this->doBatchPushInternal( $dbw, $jobs, 
$flags, $fname );
-   }
-   ) );
+   DeferredUpdates::addUpdate(
+   new AutoCommitUpdate(
+   $this->getMasterDB(),
+   __METHOD__,
+   function ( IDatabase $dbw, $fname ) use ( 
$jobs, $flags ) {
+   $this->doBatchPushInternal( $dbw, 
$jobs, $flags, $fname );
+   }
+   ),
+   DeferredUpdates::PRESEND
+   );
}
 
/**
diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index 127f929..5ed31e0 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -275,9 +275,8 @@
$status = $job->run();
$error = 

[MediaWiki-commits] [Gerrit] mediawiki...EmailAuthorization[master]: Spaces to tabs.

2017-06-12 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358450 )

Change subject: Spaces to tabs.
..

Spaces to tabs.

Change-Id: I281b612939563a0e243176175f9732383b846099
---
M Gruntfile.js
M package.json
2 files changed, 27 insertions(+), 27 deletions(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index aa66d75..a45071e 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,21 +1,21 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
-grunt.loadNpmTasks( 'grunt-jsonlint' );
-grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
 
-grunt.initConfig( {
-banana: {
-all: 'i18n/'
-},
-jsonlint: {
-all: [
-'**/*.json',
-'!node_modules/**',
-'!vendor/**'
-]
-}
-} );
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**',
+   '!vendor/**'
+   ]
+   }
+   } );
 
-grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
-grunt.registerTask( 'default', 'test' );
-};
\ No newline at end of file
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
index 375c25d..bcf5b13 100644
--- a/package.json
+++ b/package.json
@@ -1,11 +1,11 @@
 {
-  "private": true,
-  "scripts": {
-"test": "grunt test"
-  },
-  "devDependencies": {
-"grunt": "1.0.1",
-"grunt-banana-checker": "0.5.0",
-"grunt-jsonlint": "1.1.0"
-  }
-}
\ No newline at end of file
+   "private": true,
+   "scripts": {
+   "test": "grunt test"
+   },
+   "devDependencies": {
+   "grunt": "1.0.1",
+   "grunt-banana-checker": "0.5.0",
+   "grunt-jsonlint": "1.1.0"
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I281b612939563a0e243176175f9732383b846099
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EmailAuthorization
Gerrit-Branch: master
Gerrit-Owner: Cicalese 

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


[MediaWiki-commits] [Gerrit] mediawiki...EmailAuthorization[master]: Initial commit.

2017-06-12 Thread Cicalese (Code Review)
Cicalese has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358363 )

Change subject: Initial commit.
..


Initial commit.

Change-Id: Idebbba10a54ede48ef74db3edbc04589eac85ca7
---
A CODE_OF_CONDUCT.md
A COPYING
A Gruntfile.js
A extension.json
A i18n/en.json
A i18n/qqq.json
A includes/ConfigEmailAuthorization.alias.php
A includes/ConfigEmailAuthorization.php
A includes/EmailAuthorization.php
A includes/EmailAuthorizationHooks.php
A package.json
A resources/EmailAuthorization.css
A sql/EmailAuthorization.sql
13 files changed, 877 insertions(+), 0 deletions(-)

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



diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000..d8e5d08
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1 @@
+The development of this software is covered by a [Code of 
Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).
diff --git a/COPYING b/COPYING
new file mode 100644
index 000..5eb4ac0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 The MITRE Corporation
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..aa66d75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,21 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+grunt.loadNpmTasks( 'grunt-jsonlint' );
+grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+grunt.initConfig( {
+banana: {
+all: 'i18n/'
+},
+jsonlint: {
+all: [
+'**/*.json',
+'!node_modules/**',
+'!vendor/**'
+]
+}
+} );
+
+grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+grunt.registerTask( 'default', 'test' );
+};
\ No newline at end of file
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..2a80704
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,49 @@
+{
+   "name": "Email Authorization",
+   "version": "1.0",
+   "author": [
+   "[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy 
Cicalese]"
+   ],
+   "url": "https://www.mediawiki.org/wiki/Extension:Email_Authorization;,
+   "descriptionmsg": "emailauthorization-desc",
+   "license-name": "MIT",
+   "type": "other",
+   "SpecialPages": {
+   "ConfigEmailAuthorization": "ConfigEmailAuthorization"
+   },
+   "MessagesDirs": {
+   "EmailAuthorization": [
+   "i18n"
+   ]
+   },
+   "ExtensionMessagesFiles": {
+   "EmailAuthorizationAlias": 
"includes/ConfigEmailAuthorization.alias.php"
+   },
+   "ResourceModules": {
+   "ext.EmailAuthorization": {
+   "styles": [
+   "EmailAuthorization.css"
+   ],
+   "targets": [
+   "desktop",
+   "mobile"
+   ]
+   }
+   },
+   "ResourceFileModulePaths": {
+   "localBasePath": "resources",
+   "remoteExtPath": "EmailAuthorization/resources"
+   },
+   "AutoloadClasses": {
+   "EmailAuthorization": "includes/EmailAuthorization.php",
+   "EmailAuthorizationHooks": 
"includes/EmailAuthorizationHooks.php",
+   "ConfigEmailAuthorization": 
"includes/ConfigEmailAuthorization.php"
+   },
+   "Hooks": {
+   "PluggableAuthUserAuthorization": [ 
"EmailAuthorizationHooks::authorize" ],
+   "LoadExtensionSchemaUpdates": [
+   

[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: eventLogging: Use base 32 instead of 16 for fnv-encoded hash

2017-06-12 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358447 )

Change subject: eventLogging: Use base 32 instead of 16 for fnv-encoded hash
..

eventLogging: Use base 32 instead of 16 for fnv-encoded hash

Follows-up 79f3b318d03d.

Number#toString supports up to Base 32.
Same collision behaviour but with a shorter string.
Typical length with Base 32: 7 (max: 11)
Typical length with Base 16: 9 (max: 14)

Change-Id: I91e91341cbecdec24549ace6a6300550f5b449ee
---
M src/changeListeners/eventLogging.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/src/changeListeners/eventLogging.js 
b/src/changeListeners/eventLogging.js
index 3b7635e..06077fe 100644
--- a/src/changeListeners/eventLogging.js
+++ b/src/changeListeners/eventLogging.js
@@ -84,8 +84,8 @@
//
// ...
//
-   // It's also remarkably easy to implement!!1
-   hash = fnv1a32( JSON.stringify( event ) ).toString( 16 );
+   // It's also remarkably easy to implement!
+   hash = fnv1a32( JSON.stringify( event ) ).toString( 32 );
 
// Has the event been seen before?
if ( hashToSeenMap[ hash ] === true ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91e91341cbecdec24549ace6a6300550f5b449ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
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] operations/puppet[production]: planet: cleanup en_config.erb

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

Change subject: planet: cleanup en_config.erb
..


planet: cleanup en_config.erb

Change-Id: I25960b5eb29ca5bfe432c25bf3aae0cc010c59bf
---
M modules/planet/templates/feeds/en_config.erb
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/planet/templates/feeds/en_config.erb 
b/modules/planet/templates/feeds/en_config.erb
index fb8f1b4..95d833b 100644
--- a/modules/planet/templates/feeds/en_config.erb
+++ b/modules/planet/templates/feeds/en_config.erb
@@ -1,5 +1,5 @@
-# ! This file is managed by puppet ! en.planet.wm - Planet Venus
-# configuration file
+# ! This file is managed by puppet !
+# en.planet.wm - Planet Venus configuration file
 
 # Documentation: 
 # Examples:  

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25960b5eb29ca5bfe432c25bf3aae0cc010c59bf
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Framawiki 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: system::role: remove leading 'role::' to avoid role-role

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

Change subject: system::role: remove leading 'role::' to avoid role-role
..


system::role: remove leading 'role::' to avoid role-role

system::role already adds "role-" to the title but we have many
cases where system::role is used with titles like "role::foo",
and then we end up with "role-role::foo".

In I43a208fdc616e4d3e all these are fixed but as suggested there
by Alex, we are additionally adding this regsubst line to avoid
getting them again in the future.

Change-Id: I5ad03fb1322e88f7a404b022d6da83fbc70796da
---
M modules/system/manifests/role.pp
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/modules/system/manifests/role.pp b/modules/system/manifests/role.pp
index c2cc496..34bf5d4 100644
--- a/modules/system/manifests/role.pp
+++ b/modules/system/manifests/role.pp
@@ -26,7 +26,9 @@
 default => "${::hostname} is a ${description} (${title})",
 }
 
-motd::script { "role-${title}":
+$role_title = regsubst($title, '^role::', '')
+
+motd::script { "role-${role_title}":
 ensure   => $ensure,
 priority => 05,
 content  => "#!/bin/sh\necho '${message}'\n",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ad03fb1322e88f7a404b022d6da83fbc70796da
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Introduce shor-term rate limiter to fight error bursts

2017-06-12 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358435 )

Change subject: Config: Introduce shor-term rate limiter to fight error bursts
..

Config: Introduce shor-term rate limiter to fight error bursts

Change-Id: I39dff7f9c37255c959359eab81fb09fe8679b2ef
Depends-On: https://github.com/wikimedia/change-propagation/pull/187
---
M scap/templates/config.yaml.j2
1 file changed, 9 insertions(+), 2 deletions(-)


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

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index abb5f31..7ca082d 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -19,8 +19,15 @@
   password: <%= redis_pass if redis_pass else '' %>
 limiters:
   blacklist:
-interval: 604800
-limit: 100
+# First, allow no more then 100 errors per week
+# The precision parameter controls the step a sliding window 
moves by
+- interval: 604800
+  limit: 100
+  precision: 86400
+# Secondly to avoid bursts in case of outages, don't allow 
more then 10
+# errors per hour
+- interval: 3600
+  limit: 10
 <%- endif %>
 /{api:sys}/purge:
   x-modules:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39dff7f9c37255c959359eab81fb09fe8679b2ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Avoid to hardcode /srv/mediawiki

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

Change subject: Avoid to hardcode /srv/mediawiki
..


Avoid to hardcode /srv/mediawiki

On the Wikimedia Cluster, this script is called from mwscript,
which uses the MEDIAWIKI_DEPLOYMENT_DIR environment variable to
represent the /srv/mediawiki path.

We now use also this environment variable to allow this script
to be used on machines with path another configuration, for example
to allow interwiki map update from a developer machine.

Change-Id: Icb8a1d7ffea739b6cfe631edebe00ca70127972d
---
M dumpInterwiki.php
1 file changed, 9 insertions(+), 3 deletions(-)

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



diff --git a/dumpInterwiki.php b/dumpInterwiki.php
index 61810c5..14e4b04 100644
--- a/dumpInterwiki.php
+++ b/dumpInterwiki.php
@@ -222,13 +222,19 @@
}
 
function execute() {
-   $default_all_dblist = getRealmSpecificFilename( 
'/srv/mediawiki/dblists/all.dblist' );
-   $default_special_dblist = getRealmSpecificFilename( 
'/srv/mediawiki/dblists/special.dblist' );
+   $root = getenv( 'MEDIAWIKI_DEPLOYMENT_DIR' ) ?: 
'/srv/mediawiki';
+
+   if ( !file_exists( "$root/dblists" ) ) {
+   throw new Exception( "Can't run script: 
MEDIAWIKI_DEPLOYMENT_DIR environment variable must be set to MediaWiki root 
directory." );
+   }
+
+   $default_all_dblist = getRealmSpecificFilename( 
"$root/dblists/all.dblist" );
+   $default_special_dblist = getRealmSpecificFilename( 
"$root/dblists/special.dblist" );
 
// List of language prefixes likely to be found in 
multi-language sites
$this->langlist = array_map( "trim", file( $this->getOption(
'langlist',
-   getRealmSpecificFilename( "/srv/mediawiki/langlist" )
+   getRealmSpecificFilename( "$root/langlist" )
) ) );
 
// List of all database names

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb8a1d7ffea739b6cfe631edebe00ca70127972d
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Fix indent and trailing spaces of some lines

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

Change subject: Fix indent and trailing spaces of some lines
..


Fix indent and trailing spaces of some lines

Changes spaces to tabs or remove tabs or spaces

Change-Id: If14f2b747495e1a61656eebd0fc6d9763d75ab15
---
M includes/Api/SettingsDump.php
M includes/BuildDocument/Builder.php
M includes/CirrusSearch.php
M includes/CompletionSuggester.php
M includes/Elastica/MatchNone.php
M includes/Extra/Query/SourceRegex.php
M includes/Query/RegexInSourceFeature.php
M maintenance/forceSearchIndex.php
M maintenance/freezeWritesToCluster.php
M tests/relforge/RelForgeSettings.php
M tests/relforge/en-wp-bm25-wp10-normal-sugg/misc.inc
M tests/relforge/en-wp-bm25-wp10/misc.inc
M tests/unit/Search/CirrusSearchIndexFieldFactoryTest.php
M tests/unit/SuggestBuilderTest.php
14 files changed, 59 insertions(+), 53 deletions(-)

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



diff --git a/includes/Api/SettingsDump.php b/includes/Api/SettingsDump.php
index 3c1c20d..c034904 100644
--- a/includes/Api/SettingsDump.php
+++ b/includes/Api/SettingsDump.php
@@ -27,7 +27,7 @@
$conn = $this->getCirrusConnection();
$indexPrefix = $this->getSearchConfig()->get( 
SearchConfig::INDEX_BASE_NAME );
foreach( $conn->getAllIndexTypes() as $index ) {
-   $this->getResult()->addValue( 
+   $this->getResult()->addValue(
[ $index, 'page' ],
'index',
$conn->getIndex( $indexPrefix, $index 
)->getSettings()->get()
diff --git a/includes/BuildDocument/Builder.php 
b/includes/BuildDocument/Builder.php
index 5c59b53..16a9357 100644
--- a/includes/BuildDocument/Builder.php
+++ b/includes/BuildDocument/Builder.php
@@ -79,7 +79,7 @@
 * @param Title|null $title The title to build a document for
 * @param Content $content The page content to build a document from
 * @param ParserOutput $parserOutput The parser output to build a 
document from
-*/ 
+*/
public function __construct( \Elastica\Document $doc, Title $title = 
null, Content $content, ParserOutput $parserOutput ) {
parent::__construct( $doc, $title );
$this->content = $content;
diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php
index dbf50b3..2416298 100644
--- a/includes/CirrusSearch.php
+++ b/includes/CirrusSearch.php
@@ -81,10 +81,10 @@
 */
private $request;
 
-/**
- * CirrusSearchIndexFieldFactory
- */
-private $searchIndexFieldFactory;
+   /**
+* CirrusSearchIndexFieldFactory
+*/
+   private $searchIndexFieldFactory;
 
/**
 * Sets the behaviour for the dump query, dump result, etc debugging 
features.
@@ -100,14 +100,14 @@
// This is useful to do tests accross multiple clusters
UserTesting::getInstance();
$this->config = MediaWikiServices::getInstance()
-   ->getConfigFactory()
-   ->makeConfig( 'CirrusSearch' );
+   ->getConfigFactory()
+   ->makeConfig( 'CirrusSearch' );
$this->indexBaseName = $baseName === null
? $this->config->get( SearchConfig::INDEX_BASE_NAME )
: $baseName;
$this->connection = new Connection( $this->config );
$this->request = RequestContext::getMain()->getRequest();
-$this->searchIndexFieldFactory = new CirrusSearchIndexFieldFactory( 
$this->config );
+   $this->searchIndexFieldFactory = new 
CirrusSearchIndexFieldFactory( $this->config );
 
// enable interwiki by default
$this->features['interwiki'] = true;
@@ -170,7 +170,8 @@
}
 
if ( $this->isFeatureEnabled( 'rewrite' ) &&
-   $matches->isQueryRewriteAllowed( 
$GLOBALS['wgCirrusSearchInterwikiThreshold'] ) ) {
+   $matches->isQueryRewriteAllowed( 
$GLOBALS['wgCirrusSearchInterwikiThreshold'] )
+   ) {
$status = $this->searchTextSecondTry( $term, $status );
}
ElasticsearchIntermediary::setResultPages( [ 
$status->getValue() ] );
diff --git a/includes/CompletionSuggester.php b/includes/CompletionSuggester.php
index 84523d9..4d4e07d 100644
--- a/includes/CompletionSuggester.php
+++ b/includes/CompletionSuggester.php
@@ -323,7 +323,7 @@
 * @param int $queryLen the original query length
 * @return array new variant profiles
 */
-protected function 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Disable imageharvest tests

2017-06-12 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358434 )

Change subject: Disable imageharvest tests
..

Disable imageharvest tests

The error is unreproducable on my machine, and script_tests
is difficult to comprehend. Therefore go for the quick and
dirty fix: disable the tests altogether.

Change-Id: I4adf834ba224acd5979133d611c314a997b366c5
Task: T167726
---
M tests/script_tests.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/34/358434/1

diff --git a/tests/script_tests.py b/tests/script_tests.py
index b305a2b..fd4dcf9 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -75,6 +75,7 @@
 unrunnable_script_list = [
 'version',  # does not use global args
 'script_wui',   # depends on lua compiling
+'imageharvest', # T167726
 ]
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4adf834ba224acd5979133d611c314a997b366c5
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_29]: CryptRand: only use random_bytes on php 7 and HHVM

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

Change subject: CryptRand: only use random_bytes on php 7 and HHVM
..


CryptRand: only use random_bytes on php 7 and HHVM

This avoids random_bytes polyfills used on older versions of PHP or
HHVM. HHVM has had random_bytes longer than PHP so treat it separately.

Bug: T143788
Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
(cherry picked from commit 9272d7717d8b526e966928e851451a257a26b0a5)
---
M includes/libs/CryptRand.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/libs/CryptRand.php b/includes/libs/CryptRand.php
index 0d3613a..4b4a913 100644
--- a/includes/libs/CryptRand.php
+++ b/includes/libs/CryptRand.php
@@ -247,8 +247,11 @@
// On Linux, getrandom syscall will be used if 
available.
// On Windows CryptGenRandom will always be used
// On other platforms, /dev/urandom will be used.
+   // Avoids polyfills from before php 7.0
// All error situations will throw Exceptions and or 
Errors
-   if ( function_exists( 'random_bytes' ) ) {
+   if ( PHP_VERSION_ID >= 7
+   || ( defined( 'HHVM_VERSION_ID' ) && 
HHVM_VERSION_ID >= 31101 )
+   ) {
$rem = $bytes - strlen( $buffer );
$buffer .= random_bytes( $rem );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_29
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: TheDJ 
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]: [WIP] mediawiki: Fix error page template issues

2017-06-12 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358430 )

Change subject: [WIP] mediawiki: Fix error page template issues
..

[WIP] mediawiki: Fix error page template issues

Follows-up f8c7814308d2.

See http://tools.wmflabs.org/.error/banned.html
and http://tools.wmflabs.org/.error/errorpage.html

* Fix logo being stretched.
  Make height implicit so logos naturally resize proportionally.

* (TODO) Fix errorpage.html having an empty footer (should be omitted)
  - dynamicproxy/init has a default of '$error_details = undef'.
  - It is called by toollabs without setting 'error_details'.
  - dynamixproxy calls mediawiki::errorpage with 'footer => $error_details'
  - Inside mediawiki::errorpage, an ERB template is called
At that point, instead of being nil, it has become the empy string.

* (TODO) Fix banned.html having "undef" printed as footer
  - dynamixproxy calls mediawiki::errorpage without footer.
  - errorpage has a default of '$footer = undef'.
  - Inside the RB template it has somehow become the string "undef"
instead of the Ruby nil value.

Bug: T113114
Change-Id: I4b3e7879b363cabd218338ec60334281ed641e2e
---
M modules/mediawiki/templates/errorpage.html.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/358430/1

diff --git a/modules/mediawiki/templates/errorpage.html.erb 
b/modules/mediawiki/templates/errorpage.html.erb
index 8643f4a..0835a3e 100644
--- a/modules/mediawiki/templates/errorpage.html.erb
+++ b/modules/mediawiki/templates/errorpage.html.erb
@@ -18,7 +18,7 @@
 .text-muted { color: #777; }
 
 
-<% if @errorpage['logo_link'] %><% 
end %><% if @errorpage['logo_link'] %><% end %>
+<% if @errorpage['logo_link'] %><% 
end %><% if @errorpage['logo_link'] %><% end %>
 <%= @errorpage['pagetitle'] %>
 <%= @errorpage['content'] %>
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (8b8bc2f70)

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

Change subject: Update VE core submodule to master (8b8bc2f70)
..


Update VE core submodule to master (8b8bc2f70)

New changes:
74b7e109b Allow special character items to be marked as source mode only
c0cd7624f Localisation updates from https://translatewiki.net.
edb1f05d8 [DEPRECATING CHANGE] Make Target#parseDocument static
a3348fdad Fix check for CSS overflow on focusable nodes
f6cbe23fc ve.fixupBase: handle Safari behavior

Bug: T154113
Bug: T166593
Bug: T167438
Change-Id: Ia5739d5eda2e71da889de34a3a5dcc759512ce70
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/ve b/lib/ve
index aec7813..8b8bc2f 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit aec7813fb0d5d33a31ec702119bfd6ce5be42ba3
+Subproject commit 8b8bc2f70044f509b60d501b51ebc25cfe891ce3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5739d5eda2e71da889de34a3a5dcc759512ce70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: DLynch 
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 indent and trailing spaces of some lines

2017-06-12 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358428 )

Change subject: Fix indent and trailing spaces of some lines
..

Fix indent and trailing spaces of some lines

Changes spaces to tabs or remove tabs or spaces

Change-Id: If14f2b747495e1a61656eebd0fc6d9763d75ab15
---
M includes/Api/SettingsDump.php
M includes/BuildDocument/Builder.php
M includes/CirrusSearch.php
M includes/CompletionSuggester.php
M includes/Elastica/MatchNone.php
M includes/Extra/Query/SourceRegex.php
M includes/Query/RegexInSourceFeature.php
M maintenance/forceSearchIndex.php
M maintenance/freezeWritesToCluster.php
M tests/relforge/RelForgeSettings.php
M tests/relforge/en-wp-bm25-wp10-normal-sugg/misc.inc
M tests/relforge/en-wp-bm25-wp10/misc.inc
M tests/unit/Search/CirrusSearchIndexFieldFactoryTest.php
M tests/unit/SuggestBuilderTest.php
14 files changed, 59 insertions(+), 53 deletions(-)


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

diff --git a/includes/Api/SettingsDump.php b/includes/Api/SettingsDump.php
index 3c1c20d..c034904 100644
--- a/includes/Api/SettingsDump.php
+++ b/includes/Api/SettingsDump.php
@@ -27,7 +27,7 @@
$conn = $this->getCirrusConnection();
$indexPrefix = $this->getSearchConfig()->get( 
SearchConfig::INDEX_BASE_NAME );
foreach( $conn->getAllIndexTypes() as $index ) {
-   $this->getResult()->addValue( 
+   $this->getResult()->addValue(
[ $index, 'page' ],
'index',
$conn->getIndex( $indexPrefix, $index 
)->getSettings()->get()
diff --git a/includes/BuildDocument/Builder.php 
b/includes/BuildDocument/Builder.php
index 5c59b53..16a9357 100644
--- a/includes/BuildDocument/Builder.php
+++ b/includes/BuildDocument/Builder.php
@@ -79,7 +79,7 @@
 * @param Title|null $title The title to build a document for
 * @param Content $content The page content to build a document from
 * @param ParserOutput $parserOutput The parser output to build a 
document from
-*/ 
+*/
public function __construct( \Elastica\Document $doc, Title $title = 
null, Content $content, ParserOutput $parserOutput ) {
parent::__construct( $doc, $title );
$this->content = $content;
diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php
index dbf50b3..2416298 100644
--- a/includes/CirrusSearch.php
+++ b/includes/CirrusSearch.php
@@ -81,10 +81,10 @@
 */
private $request;
 
-/**
- * CirrusSearchIndexFieldFactory
- */
-private $searchIndexFieldFactory;
+   /**
+* CirrusSearchIndexFieldFactory
+*/
+   private $searchIndexFieldFactory;
 
/**
 * Sets the behaviour for the dump query, dump result, etc debugging 
features.
@@ -100,14 +100,14 @@
// This is useful to do tests accross multiple clusters
UserTesting::getInstance();
$this->config = MediaWikiServices::getInstance()
-   ->getConfigFactory()
-   ->makeConfig( 'CirrusSearch' );
+   ->getConfigFactory()
+   ->makeConfig( 'CirrusSearch' );
$this->indexBaseName = $baseName === null
? $this->config->get( SearchConfig::INDEX_BASE_NAME )
: $baseName;
$this->connection = new Connection( $this->config );
$this->request = RequestContext::getMain()->getRequest();
-$this->searchIndexFieldFactory = new CirrusSearchIndexFieldFactory( 
$this->config );
+   $this->searchIndexFieldFactory = new 
CirrusSearchIndexFieldFactory( $this->config );
 
// enable interwiki by default
$this->features['interwiki'] = true;
@@ -170,7 +170,8 @@
}
 
if ( $this->isFeatureEnabled( 'rewrite' ) &&
-   $matches->isQueryRewriteAllowed( 
$GLOBALS['wgCirrusSearchInterwikiThreshold'] ) ) {
+   $matches->isQueryRewriteAllowed( 
$GLOBALS['wgCirrusSearchInterwikiThreshold'] )
+   ) {
$status = $this->searchTextSecondTry( $term, $status );
}
ElasticsearchIntermediary::setResultPages( [ 
$status->getValue() ] );
diff --git a/includes/CompletionSuggester.php b/includes/CompletionSuggester.php
index 84523d9..4d4e07d 100644
--- a/includes/CompletionSuggester.php
+++ b/includes/CompletionSuggester.php
@@ -323,7 +323,7 @@
 * @param int $queryLen the original query length
 * @return array new variant profiles
 */
-protected function handleVariants( array $profiles, $queryLen ) {
+  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Sync up with Parsoid parserTests.txt

2017-06-12 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358429 )

Change subject: Sync up with Parsoid parserTests.txt
..

Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 108eed81b3eb78b77ade5ba5daac71fb43fff6de

Change-Id: Ib2b31f008adaf16866de16ef963bc58d6cabb088
---
M tests/parser/parserTests.txt
1 file changed, 91 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/29/358429/1

diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 69fee30..0247dd7 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -8302,6 +8302,21 @@
 !! end
 
 !! test
+Serialization of purely hash wikilink
+!! options
+title=[[User:Test/123]]
+subpage
+parsoid=html2wt
+!! html/parsoid
+[[
+!! wikitext
+[[#a|[[]]
+!! html/php
+[[
+
+!! end
+
+!! test
 1. Interaction of linktrail and template encapsulation
 !! wikitext
 {{echo|[[Foo]]}}l
@@ -17896,6 +17911,19 @@
 !! end
 
 !! test
+Sanitizer: Strip comments from CSS attributes
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+2013
+!! html/php
+2013
+
+!! html/parsoid
+2013
+!! end
+
+!! test
 Language converter: output gets cut off unexpectedly (T7757)
 !! options
 language=zh
@@ -23420,26 +23448,26 @@
 
 !! end
 
-## The unconventional output is the result of `usePHPPreProcessor` being
-## disabled in parserTests.js.  This test is mainly just to show  is
-## recognized as an extension tag w/o a native handler.
 !! test
 LST Sections: Newfangled approach
 !! wikitext
 
 
 !! html/parsoid
-section begin="2011-05-16" />
-section end="2014-04-10 (MW 1.23wmf22)" 
/>
+
+
+
+
 !! end
 
 #- Test stripping of empty nodes in template content --
-!!test
+
+!! test
 Empty LI and TR nodes should be stripped from template content
-!!wikitext
+!! wikitext
 {{EmptyLITest}}
 {{EmptyTRTest}}
-!!html/parsoid
+!! html/parsoid
 
 a
 b
@@ -23454,11 +23482,11 @@
 
 
 
-!!end
+!! end
 
-!!test
+!! test
 Empty LI and TR nodes should not be stripped from top-level content
-!!wikitext
+!! wikitext
 * a
 *
 * b
@@ -23467,7 +23495,7 @@
 |-
 |foo
 |}
-!!html/parsoid
+!! html/parsoid
 
  a
 
@@ -23481,20 +23509,20 @@
 
 
 
-!!end
+!! end
 
-!!test
+!! test
 Empty TR nodes should not be stripped if they have any attributes set
-!!wikitext
+!! wikitext
 {{EmptyTRWithHTMLAttrTest}}
-!!html/parsoid
+!! html/parsoid
 
 
 foo
 
 bar
 
-!!end
+!! end
 
  
  The following section of tests are primarily to test
@@ -25911,6 +25939,41 @@
 [[Foo]]
 !! end
 
+!! test
+Parsoid should accept interwiki shortcuts
+!! options
+parsoid=html2wt
+!! html/parsoid
+Foo
+Foo
+Foo
+Foo
+Foo
+Foo
+!! wikitext
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+!! end
+
+!! test
+Parsoid should not accept invalid interwiki shortcuts
+!! options
+parsoid=html2wt
+!! html/parsoid
+Foo
+Foo
+Foo
+!! wikitext
+[news:Foo Foo]
+[news:Foo Foo]
+[news:Foo Foo]
+!! end
+
 # See T93839
 !! test
 New wikilinks should be serialized properly
@@ -28082,6 +28145,17 @@
 
 !! end
 
+!! test
+New transclusion added after a list should be serialized after the list
+!! options
+parsoid=html2wt
+!! html/parsoid
+afoo
+!! wikitext
+* a
+{{echo|foo}}
+!! end
+
 # -
 # End of section for Parsoid-only html2wt tests for serialization
 # of new content

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: DHCP: Add MAC address for labtestpuppetmaster2001, labtestnet...

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

Change subject: DHCP: Add MAC address for 
labtestpuppetmaster2001,labtestnet2002 and labtestneutron2002 Bug:T167157 
Bug:T167159 Bug:T167160
..


DHCP: Add MAC address for labtestpuppetmaster2001,labtestnet2002 and 
labtestneutron2002
Bug:T167157
Bug:T167159
Bug:T167160

Change-Id: I7ba4668418d2eb94215ea68e08d629242e3f16f2
---
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 21 insertions(+), 0 deletions(-)

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



diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 3a400ed..27980f5 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -2763,6 +2763,13 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host labtestnet2002 {
+hardware ethernet 30:e1:71:63:e6:c4;
+fixed-address labtestnet2002.codfw.wmnet;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
 host labtestneutron2001 {
 hardware ethernet 78:2b:cb:48:f9:61;
 fixed-address labtestneutron2001.codfw.wmnet;
@@ -2770,6 +2777,20 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host labtestneutron2002 {
+hardware ethernet 30:e1:71:55:a2:40;
+fixed-address labtestneutron2002.codfw.wmnet;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestpuppetmaster2001 {
+hardware ethernet 30:e1:71:63:5e:5c;
+fixed-address labtestpuppetmaster2001.wikimedia.org;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
 host labtestservices2001 {
 hardware ethernet d4:be:d9:af:68:4f;
 fixed-address labtestservices2001.wikimedia.org;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ba4668418d2eb94215ea68e08d629242e3f16f2
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: RobH 
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...WikimediaMessages[master]: Add Atikamekw Wikipedia to project names

2017-06-12 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358427 )

Change subject: Add Atikamekw Wikipedia to project names
..

Add Atikamekw Wikipedia to project names

Bug: T167714
Change-Id: I6f1f24c466d0936f50390943908bc2e369b8b24b
---
M i18n/wikimediaprojectnames/en.json
M i18n/wikimediaprojectnames/qqq.json
2 files changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/i18n/wikimediaprojectnames/en.json 
b/i18n/wikimediaprojectnames/en.json
index 121cc29..e4967c5 100644
--- a/i18n/wikimediaprojectnames/en.json
+++ b/i18n/wikimediaprojectnames/en.json
@@ -45,6 +45,7 @@
"project-localized-name-astwiktionary": "Asturian Wiktionary",
"project-localized-name-astwikibooks": "Asturian Wikibooks",
"project-localized-name-astwikiquote": "Asturian Wikiquote",
+   "project-localized-name-atjwiki": "Atikamekw Wikipedia",
"project-localized-name-avwiki": "Avaric Wikipedia",
"project-localized-name-avwiktionary": "Avaric Wiktionary",
"project-localized-name-aywiki": "Aymara Wikipedia",
diff --git a/i18n/wikimediaprojectnames/qqq.json 
b/i18n/wikimediaprojectnames/qqq.json
index 3e82ceb..f82c0b6 100644
--- a/i18n/wikimediaprojectnames/qqq.json
+++ b/i18n/wikimediaprojectnames/qqq.json
@@ -53,6 +53,7 @@
"project-localized-name-astwiktionary": 
"{{ProjectNameDocumentation|url=https://ast.wiktionary.org|name=Asturian 
Wiktionary|language=ast}}",
"project-localized-name-astwikibooks": 
"{{ProjectNameDocumentation|url=https://ast.wikibooks.org|name=Asturian 
Wikibooks|language=ast}}",
"project-localized-name-astwikiquote": 
"{{ProjectNameDocumentation|url=https://ast.wikiquote.org|name=Asturian 
Wikiquote|language=ast}}",
+   "project-localized-name-atjwiki": 
"{{ProjectNameDocumentation|url=https://atj.wikipedia.org|name=Atikamekw 
Wikipedia|language=atj}}",
"project-localized-name-avwiki": 
"{{ProjectNameDocumentation|url=https://av.wikipedia.org|name=Avaric 
Wikipedia|language=av}}",
"project-localized-name-avwiktionary": 
"{{ProjectNameDocumentation|url=https://av.wiktionary.org|name=Avaric 
Wiktionary|language=av}}",
"project-localized-name-aywiki": 
"{{ProjectNameDocumentation|url=https://ay.wikipedia.org|name=Aymara 
Wikipedia|language=ay}}",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f1f24c466d0936f50390943908bc2e369b8b24b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (8b8bc2f70)

2017-06-12 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358426 )

Change subject: Update VE core submodule to master (8b8bc2f70)
..

Update VE core submodule to master (8b8bc2f70)

New changes:
74b7e109b Allow special character items to be marked as source mode only
c0cd7624f Localisation updates from https://translatewiki.net.
edb1f05d8 [DEPRECATING CHANGE] Make Target#parseDocument static
a3348fdad Fix check for CSS overflow on focusable nodes
f6cbe23fc ve.fixupBase: handle Safari behavior

Bug: T154113
Bug: T166593
Bug: T167438
Change-Id: Ia5739d5eda2e71da889de34a3a5dcc759512ce70
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/26/358426/1

diff --git a/lib/ve b/lib/ve
index aec7813..8b8bc2f 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit aec7813fb0d5d33a31ec702119bfd6ce5be42ba3
+Subproject commit 8b8bc2f70044f509b60d501b51ebc25cfe891ce3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5739d5eda2e71da889de34a3a5dcc759512ce70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki...ParserMigration[master]: Fix the exception thrown when using the tool on unsupported ...

2017-06-12 Thread Mainframe98 (Code Review)
Mainframe98 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358425 )

Change subject: Fix the exception thrown when using the tool on unsupported 
content models
..

Fix the exception thrown when using the tool on unsupported content models

The exception appears when the ParserMigration tool is used on pages with
the flowboard content model. Since ParserMigration aims to migrate to a
new parser, it should only target pages that actually utilize the
parser, so anything that does not use the wikitext content model has no
reason to use the migration tool.

The error message is borrowed from RawAction.php to remain consistent.

Bug: T167722
Change-Id: Ib129e61c04288da366bc018625be2dddc8bdb687
---
M extension.json
M includes/Hooks.php
M includes/MigrationEditPage.php
3 files changed, 16 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserMigration 
refs/changes/25/358425/1

diff --git a/extension.json b/extension.json
index 0f9c888..bdb3d99 100644
--- a/extension.json
+++ b/extension.json
@@ -1,7 +1,7 @@
 {
"name": "ParserMigration",
"author": "Tim Starling",
-   "version": "1.0.0",
+   "version": "1.0.1",
"url": "https://www.mediawiki.org/wiki/Extension:ParserMigration;,
"descriptionmsg": "parsermigration-desc",
"license-name": "CC0-1.0",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 4b95588..ca75be0 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -27,7 +27,8 @@
$out = $skin->getOutput();
$title = $skin->getTitle();
$user = $skin->getUser();
-   if ( $out->isArticleRelated() && $user->getOption( 
'parsermigration' ) ) {
+   if ( $out->isArticleRelated() && $title->getContentModel() === 
CONTENT_MODEL_WIKITEXT &&
+$user->getOption( 'parsermigration' ) ) {
$toolbox['parsermigration'] = [
'href' => $title->getLocalURL( [ 'action' => 
'parsermigration-edit' ] ),
'text' => $skin->msg( 
'parsermigration-toolbox-label' )->text(),
diff --git a/includes/MigrationEditPage.php b/includes/MigrationEditPage.php
index a42ad14..a8b8da8 100644
--- a/includes/MigrationEditPage.php
+++ b/includes/MigrationEditPage.php
@@ -5,6 +5,19 @@
 class MigrationEditPage extends \EditPage {
 
public function __construct( \IContextSource $context, \Title $title ) {
+   // Display an error if the action is not possible for content 
model associated with this
+   // title as is not wikitext (similar to RawAction::getRawText())
+   if ( $title->getContentModel() !== CONTENT_MODEL_WIKITEXT ) {
+   $contentModel = \ContentHandler::getLocalizedName( 
CONTENT_MODEL_WIKITEXT,
+   \Language::factory( 'en' ) );
+
+   wfHttpError( 415, "Unsupported Media Type",
+   "The requested page uses the content model `" .
+$contentModel . "` which is not supported via this 
interface."
+   );
+   die();
+   }
+
$article = \Article::newFromTitle( $title, $context );
parent::__construct( $article );
$this->setContextTitle( $title );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib129e61c04288da366bc018625be2dddc8bdb687
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserMigration
Gerrit-Branch: master
Gerrit-Owner: Mainframe98 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Delete CologneBlue messages

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

Change subject: Delete CologneBlue messages
..


Delete CologneBlue messages

They are moved to the CologneBlue repo.

Bug: T159921
Depends-On: Ide5c96b418f6abfb4244efa777c57ec2ffa9f087
Depends-On: Ib46d62e2464d7292482e8ea63ce187987104c59d
Depends-On: I522a52e548b88d0904f6890ddc7d0adb5d54eba2
Change-Id: Ib262d89e4485dfff2ef7ee9bbaa1152604626c4c
---
M languages/i18n/en.json
M languages/i18n/qqq.json
2 files changed, 0 insertions(+), 32 deletions(-)

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



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index b1baa53..9f34b7b 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -149,13 +149,7 @@
"anontalk": "Talk",
"navigation": "Navigation",
"and": "and",
-   "qbfind": "Find",
-   "qbbrowse": "Browse",
-   "qbedit": "Edit",
-   "qbpageoptions": "This page",
-   "qbmyoptions": "My pages",
"faq": "FAQ",
-   "faqpage": "Project:FAQ",
"sitetitle": "{{SITENAME}}",
"sitesubtitle": "",
"actions": "Actions",
@@ -184,33 +178,23 @@
"edit-local": "Edit local description",
"create": "Create",
"create-local": "Add local description",
-   "editthispage": "Edit this page",
-   "create-this-page": "Create this page",
"delete": "Delete",
-   "deletethispage": "Delete this page",
-   "undeletethispage": "Undelete this page",
"undelete_short": "Undelete {{PLURAL:$1|one edit|$1 edits}}",
"viewdeleted_short": "View {{PLURAL:$1|one deleted edit|$1 deleted 
edits}}",
"protect": "Protect",
"protect_change": "change",
-   "protectthispage": "Protect this page",
"unprotect": "Change protection",
-   "unprotectthispage": "Change protection of this page",
"newpage": "New page",
-   "talkpage": "Discuss this page",
"talkpagelinktext": "talk",
"specialpage": "Special page",
"personaltools": "Personal tools",
"addsection": "+",
-   "articlepage": "View content page",
"talk": "Discussion",
"views": "Views",
"toolbox": "Tools",
"tool-link-userrights": "Change {{GENDER:$1|user}} groups",
"tool-link-userrights-readonly": "View {{GENDER:$1|user}} groups",
"tool-link-emailuser": "Email this {{GENDER:$1|user}}",
-   "userpage": "View user page",
-   "projectpage": "View project page",
"imagepage": "View file page",
"mediawikipage": "View message page",
"templatepage": "View template page",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 12309d2..6dfd73f 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -339,13 +339,7 @@
"anontalk": "Same as {{msg-mw|mytalk}} but used for non-logged-in 
users.\n{{Identical|Talk}}\n\nSee also:\n* {{msg-mw|Accesskey-pt-anontalk}}\n* 
{{msg-mw|Tooltip-pt-anontalk}}",
"navigation": "This is shown as a section header in the sidebar of most 
skins.\n\n{{Identical|Navigation}}",
"and": "The translation for \"and\" appears in the [[Special:Version]] 
page, between the last two items of a list. If a comma is needed, add it at the 
beginning without a gap between it and the \"&\". #32; is a blank space, 
one character long. Please leave it as it is.\n\nThis can also appear in the 
credits page if the credits feature is enabled,for example 
[{{canonicalurl:Support|action=credits}} the credits of the support page]. (To 
view any credits page type =credits at the end of any 
URL in the address bar.)\n{{Identical|And}}",
-   "qbfind": "Alternative for \"search\" as used in Cologne Blue 
skin.\n{{Identical|Find}}",
-   "qbbrowse": "Heading in sidebar menu in CologneBlue skin as seen in 
[[File:CologneBlue sidebar qqx.png]]\n{{Identical|Browse}}",
-   "qbedit": "Heading in sidebar menu in CologneBlue skin as seen in 
http://i.imgur.com/I08Y3jW.png\n{{Identical|Edit}}",
-   "qbpageoptions": "Heading in sidebar menu in CologneBlue skin as seen 
in http://i.imgur.com/I08Y3jW.png\n{{Identical|This page}}",
-   "qbmyoptions": "Heading in the Cologne Blue skin user menu containing 
links to user (talk) page, preferences, watchlist, etc.\n{{Identical|My 
pages}}",
"faq": "FAQ is short for ''frequently asked 
questions''.\n{{Identical|FAQ}}",
-   "faqpage": "{{doc-important|Do not translate Project: 
part.}}\n\"FAQ\" is short for \"frequently asked questions\".\n\nThis page is 
only linked in CologneBlue (an old skin), not in Monobook or Vector.",
"sitetitle": "{{Ignore}}",
"sitesubtitle": "{{Ignore}}",
"actions": "{{Identical|Action}}",
@@ -374,33 +368,23 @@
"edit-local": "The text on the tab going to the edit form for the local 

[MediaWiki-commits] [Gerrit] wikimedia...DjangoBannerStats[master]: Remove web app bits of DjangoBannerStats

2017-06-12 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358424 )

Change subject: Remove web app bits of DjangoBannerStats
..

Remove web app bits of DjangoBannerStats

Not actually used, and preventing the app from running on newer versions
of Django

Change-Id: I5389a26266c4a24a6ed76733cc0dc72d41ea277d
---
D fundraiser/analytics/urls.py
D fundraiser/analytics/views.py
M fundraiser/settings.py
D fundraiser/templates/analytics/campaign_ecom.html
D fundraiser/templates/wmf_base.html
M fundraiser/urls.py
D fundraiser/wsgi.py
7 files changed, 0 insertions(+), 211 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools/DjangoBannerStats 
refs/changes/24/358424/1

diff --git a/fundraiser/analytics/urls.py b/fundraiser/analytics/urls.py
deleted file mode 100644
index a6946a9..000
--- a/fundraiser/analytics/urls.py
+++ /dev/null
@@ -1,14 +0,0 @@
-from django.conf.urls import patterns, include, url
-
-# Uncomment the next two lines to enable the admin:
-from django.contrib import admin
-admin.autodiscover()
-
-urlpatterns = patterns('fundraiser.analytics',
-# Examples:
-# url(r'^$', 'fundraiser.views.home', name='home'),
-
-url(r'^$', 'views.hello_world', name='hello_world'),
-url(u'campaign_ecom/$', 'views.campaign_ecom', 
name='fundraiser.analytics.campaign_ecom'),
-
-)
diff --git a/fundraiser/analytics/views.py b/fundraiser/analytics/views.py
deleted file mode 100644
index ea9d1a6..000
--- a/fundraiser/analytics/views.py
+++ /dev/null
@@ -1,36 +0,0 @@
-from django.http import HttpResponse
-from django.shortcuts import render_to_response
-from django.template import RequestContext
-
-import fundraiser.analytics.forms as forms
-
-# Create your views here.
-
-def hello_world(request):
-
-#return HttpResponse("Hello World")
-return render_to_response(
-"wmf_base.html",
-{'text':"Hello World"},
-context_instance=RequestContext(request)
-)
-
-def campaign_ecom(request):
-if request.method == 'POST': # If the form has been submitted...
-form = forms.CampaignForm(request.POST) # A form bound to the POST data
-if form.is_valid(): # All validation rules pass
-return render_to_response(
-"analytics/campaign_ecom.html",
-{ 'form' : form,
-  'campaign' : form.cleaned_data['campaign']
-},
-context_instance=RequestContext(request)
-)
-else:
-form = forms.CampaignForm() # An unbound form
-
-return render_to_response(
-"analytics/campaign_ecom.html",
-{ 'form' : form },
-context_instance=RequestContext(request)
-)
\ No newline at end of file
diff --git a/fundraiser/settings.py b/fundraiser/settings.py
index 338644f..47de14b 100644
--- a/fundraiser/settings.py
+++ b/fundraiser/settings.py
@@ -3,12 +3,6 @@
 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
 
-ADMINS = (
-# ('Your Name', 'your_em...@example.com'),
-)
-
-MANAGERS = ADMINS
-
 DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 
'mysql', 'sqlite3' or 'oracle'.
@@ -46,84 +40,11 @@
 # If you set this to False, Django will not use timezone-aware datetimes.
 USE_TZ = False
 
-# Absolute filesystem path to the directory that will hold user-uploaded files.
-# Example: "/home/media/media.lawrence.com/media/"
-MEDIA_ROOT = ''
-
-# URL that handles the media served from MEDIA_ROOT. Make sure to use a
-# trailing slash.
-# Examples: "http://media.lawrence.com/media/;, "http://example.com/media/;
-MEDIA_URL = ''
-
-# Absolute path to the directory static files should be collected to.
-# Don't put anything in this directory yourself; store your static files
-# in apps' "static/" subdirectories and in STATICFILES_DIRS.
-# Example: "/home/media/media.lawrence.com/static/"
-STATIC_ROOT = 'static/'
-
-# URL prefix for static files.
-# Example: "http://media.lawrence.com/static/;
-STATIC_URL = '/static/'
-
-# Additional locations of static files
-STATICFILES_DIRS = (
-# Put strings here, like "/home/html/static" or "C:/www/django/static".
-# Always use forward slashes, even on Windows.
-# Don't forget to use absolute paths, not relative paths.
-)
-
-# List of finder classes that know how to find static files in
-# various locations.
-STATICFILES_FINDERS = (
-'django.contrib.staticfiles.finders.FileSystemFinder',
-'django.contrib.staticfiles.finders.AppDirectoriesFinder',
-#'django.contrib.staticfiles.finders.DefaultStorageFinder',
-)
-
 # Make this unique, and don't share it with anybody.
 SECRET_KEY = 'bcsz$xo#=a__75o4g$stg6s*+d$cpelg$mrp)kgsvm1eqkv@4^'
 
-# List of callables that know how to import templates from various sources.
-TEMPLATE_LOADERS = (
-'django.template.loaders.filesystem.Loader',
-'django.template.loaders.app_directories.Loader',
-# 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add Title::isValid method.

2017-06-12 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358423 )

Change subject: Add Title::isValid method.
..

Add Title::isValid method.

Make the notion of Title objects representing invalid titles explicit.

Bug: T165149
Change-Id: I89aaabdff9614fe63bd1244784a1d677dbc26f9e
---
M includes/Title.php
M tests/phpunit/includes/TitleTest.php
2 files changed, 78 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/358423/1

diff --git a/includes/Title.php b/includes/Title.php
index d34da7d..6e9c32c 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -253,6 +253,9 @@
 * Create a new Title from text, such as what one would find in a link. 
De-
 * codes any HTML entities in the text.
 *
+* Title objects returned by this method are guaranteed to be valid, and
+* thus return true from the isValid() method.
+*
 * @param string|int|null $text The link text; spaces, prefixes, and an
 *   initial ':' indicating the main namespace are accepted.
 * @param int $defaultNamespace The namespace to use if none is 
specified
@@ -283,6 +286,9 @@
 * rather than returning null.
 *
 * The exception subclasses encode detailed information about why the 
title is invalid.
+*
+* Title objects returned by this method are guaranteed to be valid, and
+* thus return true from the isValid() method.
 *
 * @see Title::newFromText
 *
@@ -500,10 +506,19 @@
 
/**
 * Create a new Title from a namespace index and a DB key.
-* It's assumed that $ns and $title are *valid*, for instance when
-* they came directly from the database or a special page name.
-* For convenience, spaces are converted to underscores so that
-* eg user_text fields can be used directly.
+*
+* It's assumed that $ns and $title are safe, for instance when
+* they came directly from the database or a special page name,
+* not from user input.
+*
+* To validation is applied. For convenience, spaces are normalized
+* to underscores, so that e.g. user_text fields can be used directly.
+*
+* @note This method may return Title objects that are "invalid"
+* according to the isValid() method. This is usually caused by
+* configuration changes: e.g. a namespace that was once defined is
+* no longer configured, or a character that was once allowed in
+* titles is now forbidden.
 *
 * @param int $ns The namespace of the article
 * @param string $title The unprefixed database key form
@@ -529,6 +544,10 @@
 * The parameters will be checked for validity, which is a bit slower
 * than makeTitle() but safer for user-provided data.
 *
+* Title objects returned by makeTitleSafe() are guaranteed to be valid,
+* that is, they return true from the isValid() method. If no valid 
Title
+* can be constructed from the input, this method returns null.
+*
 * @param int $ns The namespace of the article
 * @param string $title Database key form
 * @param string $fragment The link fragment (after the "#")
@@ -536,6 +555,9 @@
 * @return Title|null The new object, or null on an error
 */
public static function makeTitleSafe( $ns, $title, $fragment = '', 
$interwiki = '' ) {
+   // NOTE: ideally, this would just call makeTitle() and then 
isValid(),
+   // but presently, that means more overhead on a potential 
performance hotspot.
+
if ( !MWNamespace::exists( $ns ) ) {
return null;
}
@@ -776,6 +798,36 @@
}
 
/**
+* Returns true if the title is valid, false if it is invalid.
+*
+* Valid titles can be round-tripped via makeTitleSafe() and 
newFromText().
+* Invalid titles may get returned from makeTitle(), and it may be 
useful to
+* allow them to exist, e.g. in order to process log entries about 
pages in
+* namespaces that belong to extensions that are no longer installed.
+*
+* @note that this method is relatively expensive. When constructing 
Title
+* objects that need to be valid, use an instantiator method that is 
guaranteed
+* to return valid titles, such as makeTitleSafe() or newFromText().
+*
+* @return bool
+*/
+   public function isValid() {
+   $ns = $this->getNamespace();
+
+   if ( !MWNamespace::exists( $ns ) ) {
+   return false;
+   }
+
+   try {
+   $parser = 
MediaWikiServices::getInstance()->getTitleParser();
+  

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Auto install npm packages in grunt build

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

Change subject: Auto install npm packages in grunt build
..


Auto install npm packages in grunt build

Change-Id: I32161079220e192115c5ff3be4e6c52bfb786ef3
---
M Gruntfile.js
M package.json
2 files changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Smalyshev: Looks good to me, approved
  Lucas Werkmeister (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Gruntfile.js b/Gruntfile.js
index 6a01590..cccdf80 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -199,6 +199,9 @@
'git review'
].join( '&&' )
}
+   },
+   'auto_install': {
+   local: {}
}
} );
 
@@ -216,7 +219,7 @@
'jshint', 'jscs', 'jsonlint', 'banana', 'qunit'
] );
grunt.registerTask( 'build', [
-   'clean', 'test', 'create_build'
+   'clean', 'auto_install', 'test', 'create_build'
] );
grunt.registerTask( 'create_build', [
'copy', 'useminPrepare', 'concat', 'cssmin', 'uglify', 
'filerev', 'usemin', 'htmlmin', 'merge-i18n'
diff --git a/package.json b/package.json
index 4cc827f..35d50bf 100644
--- a/package.json
+++ b/package.json
@@ -40,6 +40,7 @@
   },
   "devDependencies": {
 "grunt": "0.4.5",
+"grunt-auto-install": "^0.3.1",
 "grunt-banana-checker": "~0.5.0",
 "grunt-cli": "0.1.13",
 "grunt-contrib-clean": "^1.0.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32161079220e192115c5ff3be4e6c52bfb786ef3
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Run tests before creating build

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

Change subject: Run tests before creating build
..


Run tests before creating build

This avoids a broken build if cause is covered by a test.
For example when npm package is missing.

Change-Id: I0d13a6bbe27d1a81464b42143e563ba33dead4a0
---
M Gruntfile.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Smalyshev: Looks good to me, approved
  Lucas Werkmeister (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Gruntfile.js b/Gruntfile.js
index 7c9b20f..6a01590 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -216,7 +216,7 @@
'jshint', 'jscs', 'jsonlint', 'banana', 'qunit'
] );
grunt.registerTask( 'build', [
-   'clean', 'create_build'
+   'clean', 'test', 'create_build'
] );
grunt.registerTask( 'create_build', [
'copy', 'useminPrepare', 'concat', 'cssmin', 'uglify', 
'filerev', 'usemin', 'htmlmin', 'merge-i18n'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d13a6bbe27d1a81464b42143e563ba33dead4a0
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fix throttle rule for Scotland University editathon

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

Change subject: Fix throttle rule for Scotland University editathon
..


Fix throttle rule for Scotland University editathon

Change-Id: I41463c17259c8b3dd5f0adfa9ed34774095fa35a
---
M wmf-config/throttle.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index c555bb1..97504ae 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -52,7 +52,7 @@
 
 $wmgThrottlingExceptions[] = [ // T167517
'from'=> '2017-06-13T07:30 UTC',
-   'to' => '2017-06-06T10:30 UTC',
+   'to' => '2017-06-13T10:30 UTC',
'IP' => [
'130.209.6.43',
'130.209.6.40',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41463c17259c8b3dd5f0adfa9ed34774095fa35a
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Thcipriani 
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]: Fix throttle rule for Scotland University editathon

2017-06-12 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358422 )

Change subject: Fix throttle rule for Scotland University editathon
..

Fix throttle rule for Scotland University editathon

Change-Id: I41463c17259c8b3dd5f0adfa9ed34774095fa35a
---
M wmf-config/throttle.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 992d420..64557b6 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -60,7 +60,7 @@
 
 $wmgThrottlingExceptions[] = [ // T167517
'from'=> '2017-06-13T07:30 UTC',
-   'to' => '2017-06-06T10:30 UTC',
+   'to' => '2017-06-13T10:30 UTC',
'IP' => [
'130.209.6.43',
'130.209.6.40',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Fix indent of some lines

2017-06-12 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358421 )

Change subject: Fix indent of some lines
..

Fix indent of some lines

Changes spaces to tabs or remove tabs or spaces

Change-Id: I1a189600561fe244337091f811adf899e2440cab
---
M Flow.namespaces.php
M FlowActions.php
M defines.php
M includes/Api/ApiFlowBase.php
M includes/Block/Topic.php
M includes/Conversion/Utils.php
M includes/Import/LiquidThreadsApi/Objects.php
M includes/Model/Reference.php
M includes/SpamFilter/AbuseFilter.php
M maintenance/repair_missing_revision_content.php
M maintenance/repair_missing_revision_content_from_parent.php
M scripts/pre-commit
M tests/phpunit/TalkpageManagerTest.php
13 files changed, 55 insertions(+), 55 deletions(-)


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

diff --git a/Flow.namespaces.php b/Flow.namespaces.php
index cf83b49..543babe 100644
--- a/Flow.namespaces.php
+++ b/Flow.namespaces.php
@@ -105,7 +105,7 @@
 
 /** Italian */
 $namespaceNames['it'] = array(
-NS_TOPIC =>  'Argomento',
+   NS_TOPIC =>  'Argomento',
 );
 
 /** Korean */
diff --git a/FlowActions.php b/FlowActions.php
index fd53bc0..792054d 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -299,8 +299,8 @@
'permissions' => array(
// no permissions needed for own posts
PostRevision::MODERATED_NONE => function( PostRevision 
$post, RevisionActionPermissions $permissions ) {
-   return $post->isCreator( 
$permissions->getUser() ) ? '' : 'flow-edit-post';
-   }
+   return $post->isCreator( 
$permissions->getUser() ) ? '' : 'flow-edit-post';
+   }
),
'root-permissions' => array(
PostRevision::MODERATED_NONE => '',
@@ -333,8 +333,8 @@
'permissions' => array(
// no permissions needed for own posts
PostRevision::MODERATED_NONE => function( PostRevision 
$post, RevisionActionPermissions $permissions ) {
-   return $post->isCreator( 
$permissions->getUser() ) ? '' : 'flow-edit-post';
-   }
+   return $post->isCreator( 
$permissions->getUser() ) ? '' : 'flow-edit-post';
+   }
),
'root-permissions' => array(
PostRevision::MODERATED_NONE => '',
@@ -621,17 +621,17 @@
return '';
},
'rc_insert' => function( PostRevision $revision, 
RecentChangesListener $recentChanges ) {
-   $post = $revision->getCollection();
-   $previousRevision = $post->getPrevRevision( 
$revision );
-   if ( $previousRevision ) {
-   // * if topic was hidden/deleted, 
restore can go to RC
-   // * if topic was suppressed, restore 
can not go to RC
-   global $wgFlowActions;
-   return 
$wgFlowActions[$previousRevision->getModerationState() . '-topic']['rc_insert'];
-   }
+   $post = $revision->getCollection();
+   $previousRevision = $post->getPrevRevision( $revision );
+   if ( $previousRevision ) {
+   // * if topic was hidden/deleted, restore can 
go to RC
+   // * if topic was suppressed, restore can not 
go to RC
+   global $wgFlowActions;
+   return 
$wgFlowActions[$previousRevision->getModerationState() . '-topic']['rc_insert'];
+   }
 
-   return true;
-   },
+   return true;
+   },
'permissions' => array(
PostRevision::MODERATED_LOCKED => array( 'flow-lock', 
'flow-delete', 'flow-suppress' ),
PostRevision::MODERATED_HIDDEN => array( 'flow-hide', 
'flow-delete', 'flow-suppress' ),
diff --git a/defines.php b/defines.php
index fdcf722..cd30028 100644
--- a/defines.php
+++ b/defines.php
@@ -3,7 +3,7 @@
 // Constants
 define( 'RC_FLOW', 142 ); // Random number chosen.  Can be replaced with 
rc_source; see bug 72157.
 if ( !defined( 'NS_TOPIC' ) ) {
-define( 'NS_TOPIC', 2600 );
+   define( 'NS_TOPIC', 2600 );
 }
 define( 'CONTENT_MODEL_FLOW_BOARD', 'flow-board' );
 define( 'FLOW_TALK_PAGE_MANAGER_USER', 'Flow talk page manager' );
diff --git a/includes/Api/ApiFlowBase.php b/includes/Api/ApiFlowBase.php
index 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Lift IP throttle for Wikipedia workshop (14 June 2017)

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

Change subject: Lift IP throttle for Wikipedia workshop (14 June 2017)
..


Lift IP throttle for Wikipedia workshop (14 June 2017)

Wikis: enwiki, commons, wikidata (I suppose, see the task)
Date: 2017-06-14
Time: 09:00 (UTC+1) to 14:00 (UTC+1)
Expected number of attendees: 20
IP addresses: 212.132.132.0/24 and 195.188.243.0/24

Bug: T167011
Change-Id: I4a5263f90b783c00c0c7b4377ac9f6c90edfa683
---
M wmf-config/throttle.php
1 file changed, 11 insertions(+), 8 deletions(-)

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



diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 992d420..c555bb1 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -39,14 +39,6 @@
'value' => 200,
 ];
 
-$wmgThrottlingExceptions[] = [ // T166619
-   'from' => '2017-06-01T17:00 UTC',
-   'to' => '2017-06-01T21:00 UTC',
-   'IP' => '189.90.160.22',
-   'dbname' => [ 'ptwiki', 'wikidatawiki', 'commonswiki' ],
-   'value' => 20 // 10 expected
-];
-
 $wmgThrottlingExceptions[] = [ // T167201
'from'=> '2017-06-16T15:00 UTC',
'to' => '2017-06-16T22:00 UTC',
@@ -70,6 +62,17 @@
'value' => 40 // 30 expected
 ];
 
+$wmgThrottlingExceptions[] = [ // T167011
+   'from' => '2017-06-14T08:00 UTC',
+   'to' => '2017-06-14T13:00 UTC',
+   'IP' => [
+   '212.132.132.0/24',
+   '195.188.243.0/24',
+   ],
+   'dbname' => [ 'enwiki', 'wikidatawiki', 'commonswiki' ],
+   'value' => 30 // 20 expected
+];
+
 ## Add throttling definitions above.
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a5263f90b783c00c0c7b4377ac9f6c90edfa683
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Framawiki 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Thcipriani 
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...DjangoBannerStats[master]: Correct default log path, make TEMPLATE_DIRS an array

2017-06-12 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358420 )

Change subject: Correct default log path, make TEMPLATE_DIRS an array
..

Correct default log path, make TEMPLATE_DIRS an array

Change-Id: Ib2d07e53ef5b6110286772b58424ff9ddc97e868
---
M fundraiser/settings.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools/DjangoBannerStats 
refs/changes/20/358420/1

diff --git a/fundraiser/settings.py b/fundraiser/settings.py
index 8e145a2..338644f 100644
--- a/fundraiser/settings.py
+++ b/fundraiser/settings.py
@@ -109,7 +109,7 @@
 # Put strings here, like "/home/html/django_templates" or 
"C:/www/django/templates".
 # Always use forward slashes, even on Windows.
 # Don't forget to use absolute paths, not relative paths.
-'fundraiser/templates'
+'fundraiser/templates',
 )
 
 INSTALLED_APPS = (
@@ -160,7 +160,7 @@
 }
 }
 
-UDP_LOG_PATH = "/archive/banner_logs"
+UDP_LOG_PATH = "/srv/archive/banner_logs"
 
 try:
 from local_settings import *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2d07e53ef5b6110286772b58424ff9ddc97e868
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools/DjangoBannerStats
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...VisualEditor[master]: Update VE core submodule to master (aec7813fb)

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

Change subject: Update VE core submodule to master (aec7813fb)
..


Update VE core submodule to master (aec7813fb)

New changes:
7989d8c27 Rename local variables to distinguish between DM nodes and 
orderedNodes
fde924971 Localisation updates from https://translatewiki.net.
f07dede07 DiffElement: Pass through config argument
f4b755c4c Fix mixing in of TableCellableNode to AlienTableCellNode
f0f5692eb Remove unused table editor CSS
975bb09b8 Remove unused MWImage-specific CSS
baddb48dc Remove unused filibuster CSS
38baa16a2 Don't let jQuery 3 remove top-level text nodes from generated content

Bug: T167150
Bug: T167335
Change-Id: I51911e404ca32292a9db4bd5d8b0627368177df4
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/ve b/lib/ve
index 05375f3..aec7813 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 05375f32400ee2bff9c8d524aecb41efb9cffb50
+Subproject commit aec7813fb0d5d33a31ec702119bfd6ce5be42ba3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51911e404ca32292a9db4bd5d8b0627368177df4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
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...Cargo[master]: Added Hierarchy option to #cargo_declare

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

Change subject: Added Hierarchy option to #cargo_declare
..


Added Hierarchy option to #cargo_declare

Added Hierarchy option to #cargo_declare in order to complete the first step in 
the task T161034. Code Reviews incorporated.

Change-Id: I53e57ab6b09773d99c983ebbcb7cc50991420014
---
M CargoFieldDescription.php
1 file changed, 11 insertions(+), 2 deletions(-)

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



diff --git a/CargoFieldDescription.php b/CargoFieldDescription.php
index 982826a..2cc3202 100644
--- a/CargoFieldDescription.php
+++ b/CargoFieldDescription.php
@@ -14,6 +14,7 @@
private $mDelimiter;
public $mAllowedValues = null;
public $mIsHidden = false;
+   public $mIsHierarchy = false;
public $mOtherParams = array();
 
/**
@@ -27,7 +28,7 @@
 
if ( strpos( $fieldDescriptionStr, 'List' ) === 0 ) {
$matches = array();
-   $foundMatch = preg_match( '/List \((.*)\) of (.*)/', 
$fieldDescriptionStr, $matches );
+   $foundMatch = preg_match( '/List \((.*)\) of (.*)/s', 
$fieldDescriptionStr, $matches );
if ( !$foundMatch ) {
// Return a true error message here?
return null;
@@ -39,7 +40,7 @@
 
// There may be additional parameters, in/ parentheses.
$matches = array();
-   $foundMatch2 = preg_match( '/([^(]*)\s*\((.*)\)/', 
$fieldDescriptionStr, $matches );
+   $foundMatch2 = preg_match( '/([^(]*)\s*\((.*)\)/s', 
$fieldDescriptionStr, $matches );
if ( $foundMatch2 ) {
$fieldDescriptionStr = trim( $matches[1] );
$extraParamsString = $matches[2];
@@ -48,6 +49,9 @@
$extraParamParts = explode( '=', $extraParam, 2 
);
if ( count( $extraParamParts ) == 1 ) {
$paramKey = trim( $extraParamParts[0] );
+   if ( $paramKey == 'hierarchy' ) {
+   $mIsHierarchy = true;
+   }

$fieldDescription->mOtherParams[$paramKey] = true;
} else {
$paramKey = trim( $extraParamParts[0] );
@@ -108,6 +112,8 @@
$fieldDescription->mAllowedValues = $value;
} elseif ( $param == 'hidden' ) {
$fieldDescription->mIsHidden = true;
+   } elseif ( $param == 'hierarchy' ) {
+   $fieldDescription->mIsHierarchy = true;
}
}
return $fieldDescription;
@@ -144,6 +150,9 @@
if ( $this->mIsHidden ) {
$descriptionData['hidden'] = true;
}
+   if ( $this->mIsHierarchy ) {
+   $descriptionData['hierarchy'] = true;
+   }
foreach ( $this->mOtherParams as $otherParam => $value ) {
$descriptionData[$otherParam] = $value;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53e57ab6b09773d99c983ebbcb7cc50991420014
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Fz-29 
Gerrit-Reviewer: Nemo bis 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...DjangoBannerStats[master]: Update transactions for django 1.6+

2017-06-12 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358419 )

Change subject: Update transactions for django 1.6+
..

Update transactions for django 1.6+

Examples online show setting autocommit back to true at the end of
functions, but it looks like we actually want it off everywhere we
write to a db.

Change-Id: Ic35fdc2013e108fbac10123f03cd720381d99f58
---
M fundraiser/analytics/management/commands/AggregateBannerImpressions.py
M fundraiser/analytics/management/commands/LoadBannerImpressions.py
M fundraiser/analytics/management/commands/LoadBannerImpressions2Aggregate.py
M fundraiser/analytics/management/commands/LoadLPImpressions.py
4 files changed, 5 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools/DjangoBannerStats 
refs/changes/19/358419/1

diff --git 
a/fundraiser/analytics/management/commands/AggregateBannerImpressions.py 
b/fundraiser/analytics/management/commands/AggregateBannerImpressions.py
index 8edb4a6..57b4d62 100644
--- a/fundraiser/analytics/management/commands/AggregateBannerImpressions.py
+++ b/fundraiser/analytics/management/commands/AggregateBannerImpressions.py
@@ -80,8 +80,8 @@
 print "Aggregated %d rounds of %d each in %d.%d seconds" % (rounds, 
batch, (endtime - starttime).seconds, (endtime - starttime).microseconds)
 
 
-@transaction.commit_manually
 def run(self, batchSize=1000):
+transaction.set_autocommit(False)
 if not isinstance(batchSize, int):
 raise TypeError("Invalid batch size %s" % batchSize)
 
diff --git a/fundraiser/analytics/management/commands/LoadBannerImpressions.py 
b/fundraiser/analytics/management/commands/LoadBannerImpressions.py
index fa92580..fd3dbc8 100644
--- a/fundraiser/analytics/management/commands/LoadBannerImpressions.py
+++ b/fundraiser/analytics/management/commands/LoadBannerImpressions.py
@@ -444,13 +444,13 @@
 return results
 
 
-@transaction.commit_manually
 def write(self, impressions):
 """
 Commits a batch of transactions. Attempts a single query per model by 
splitting the
 tuples of each banner impression and grouping by model.  If that 
fails, the function
 falls back to a single transaction per banner impression
 """
+transaction.set_autocommit(False)
 cursor = connections['default'].cursor()
 
 i_len = len(impressions)
@@ -491,13 +491,13 @@
 for i in impressions:
 self.write([i])
 
-@transaction.commit_manually
 def write_hidden(self, impressions):
 """
 Commits a batch of transactions. Attempts a single query per model by 
splitting the
 tuples of each banner impression and grouping by model.  If that 
fails, the function
 falls back to a single transaction per banner impression
 """
+transaction.set_autocommit(False)
 cursor = connections['default'].cursor()
 
 i_len = len(impressions)
diff --git 
a/fundraiser/analytics/management/commands/LoadBannerImpressions2Aggregate.py 
b/fundraiser/analytics/management/commands/LoadBannerImpressions2Aggregate.py
index ee83ede..3b67b04 100644
--- 
a/fundraiser/analytics/management/commands/LoadBannerImpressions2Aggregate.py
+++ 
b/fundraiser/analytics/management/commands/LoadBannerImpressions2Aggregate.py
@@ -389,9 +389,8 @@
 
 return results
 
-@transaction.commit_manually
 def write(self, impressions):
-
+transaction.set_autocommit(False)
 insert_sql = "INSERT INTO bannerimpressions (timestamp, banner, 
campaign, project_id, language_id, country_id, count) VALUES (%s) ON DUPLICATE 
KEY update count=count+%d"
 
 cursor = connections['default'].cursor()
diff --git a/fundraiser/analytics/management/commands/LoadLPImpressions.py 
b/fundraiser/analytics/management/commands/LoadLPImpressions.py
index 3ee30d6..710171f 100644
--- a/fundraiser/analytics/management/commands/LoadLPImpressions.py
+++ b/fundraiser/analytics/management/commands/LoadLPImpressions.py
@@ -442,13 +442,13 @@
 
 return results
 
-@transaction.commit_manually
 def write(self, base_sql, impressions):
 """
 Commits a batch of transactions. Attempts a single query per model by 
splitting the
 tuples of each banner impression and grouping by model.  If that 
fails, the function
 falls back to a single transaction per banner impression
 """
+transaction.set_autocommit(False)
 i_len = len(impressions)
 
 if not i_len:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic35fdc2013e108fbac10123f03cd720381d99f58
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools/DjangoBannerStats
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

  1   2   3   4   >