[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add more top-pages lists

2017-09-15 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378372 )

Change subject: Add more top-pages lists
..

Add more top-pages lists

Chose the top WP projects based on number of users.

Change-Id: Ie60ecea877ef345fd4dc52aa220f30ba5369c66c
---
A private/top-pages/top-pages.ar.json
A private/top-pages/top-pages.bg.json
A private/top-pages/top-pages.bn.json
A private/top-pages/top-pages.ca.json
A private/top-pages/top-pages.cs.json
A private/top-pages/top-pages.da.json
A private/top-pages/top-pages.de.json
A private/top-pages/top-pages.el.json
A private/top-pages/top-pages.es.json
A private/top-pages/top-pages.fa.json
A private/top-pages/top-pages.fi.json
A private/top-pages/top-pages.fr.json
A private/top-pages/top-pages.he.json
A private/top-pages/top-pages.hi.json
A private/top-pages/top-pages.hr.json
A private/top-pages/top-pages.hu.json
A private/top-pages/top-pages.id.json
A private/top-pages/top-pages.it.json
A private/top-pages/top-pages.ja.json
A private/top-pages/top-pages.ko.json
A private/top-pages/top-pages.ms.json
A private/top-pages/top-pages.nl.json
A private/top-pages/top-pages.no.json
A private/top-pages/top-pages.pl.json
A private/top-pages/top-pages.pt.json
A private/top-pages/top-pages.ro.json
A private/top-pages/top-pages.ru.json
A private/top-pages/top-pages.sk.json
A private/top-pages/top-pages.sl.json
A private/top-pages/top-pages.sr.json
A private/top-pages/top-pages.sv.json
A private/top-pages/top-pages.th.json
A private/top-pages/top-pages.tr.json
A private/top-pages/top-pages.uk.json
A private/top-pages/top-pages.vi.json
M private/top-pages/top-pages.zh.json
A scripts/dummy.js
37 files changed, 34,627 insertions(+), 0 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add multi-lang.js script

2017-09-15 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378369 )

Change subject: Add multi-lang.js script
..

Add multi-lang.js script

This script allows you to execute another given executable over a list
of languages.

Example:
./multi-lang.js ./compare-extracts.js bg de en es fr

Change-Id: I05af5477ebbcd6a4f49edf75349fff3857168ef7
---
A scripts/multi-lang.js
1 file changed, 43 insertions(+), 0 deletions(-)


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

diff --git a/scripts/multi-lang.js b/scripts/multi-lang.js
new file mode 100755
index 000..75b19fc
--- /dev/null
+++ b/scripts/multi-lang.js
@@ -0,0 +1,43 @@
+#!/usr/bin/env node
+
+'use strict';
+
+const BBPromise = require('bluebird');
+const exec = BBPromise.promisify(require('child_process').exec);
+const underscore = require('underscore');
+
+const wikipediaLanguagesRawList = require('../private/languages_list.json');
+const prepareWikipediaLanguageCodes = () => {
+delete wikipediaLanguagesRawList['Simplified Chinese']; // skip lang 
variants
+delete wikipediaLanguagesRawList['Traditional Chinese'];
+return underscore.values(wikipediaLanguagesRawList).sort();
+};
+const wikipediaLanguages = prepareWikipediaLanguageCodes();
+
+function isWikipediaLanguage(lang) {
+return wikipediaLanguages.includes(lang);
+}
+
+function processOneLanguage(script, lang) {
+const cmd = `${script} ${lang}`;
+return exec(cmd)
+.then((rsp) => {
+process.stdout.write(`\n${lang}: ${rsp}\n`);
+return BBPromise.resolve();
+}).catch((err) => {
+process.stderr.write(`ERROR processing language ${lang}: ${err}`);
+return BBPromise.resolve();
+});
+}
+
+// MAIN
+const [,, script, ...languages] = process.argv; // skip over first two items
+
+BBPromise.each(languages, (lang) => {
+if (isWikipediaLanguage(lang)) {
+process.stdout.write(`${lang}\n`);
+processOneLanguage(script, lang);
+} else {
+process.stderr.write(`ERROR: ${lang} not a Wikipedia project code\n`);
+}
+});

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: move some files from static to private folder

2017-09-15 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378365 )

Change subject: Hygiene: move some files from static to private folder
..

Hygiene: move some files from static to private folder

The static folder is for serving static content.
The files moved in this patch should not be served at all.

Also start a subfolder for the lists of top pages since there
will be many more in the future.

Change-Id: Iaa438fd19555635c577d3a2bcc40303e641be517
---
M lib/parseDefinition.js
R private/languages_list.json
R private/mainpages.csv
R private/top-pages/top-pages.en.json
R private/top-pages/top-pages.zh.json
R private/wikiquotes.json
R private/wiktionaries.json
M scripts/check-featured-feed.js
M scripts/measure-payloads.js
M test/features/most-read/page-filtering.js
10 files changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/lib/parseDefinition.js b/lib/parseDefinition.js
index 176b13e..9b67809 100644
--- a/lib/parseDefinition.js
+++ b/lib/parseDefinition.js
@@ -9,7 +9,7 @@
 
 const sUtil = require('./util');
 const transforms = require('./transforms');
-const languageList = require('../static/languages_list.json');
+const languageList = require('../private/languages_list.json');
 
 /* This list has expanded beyond parts of speech to something more like 
"whatever
categories of terms the Wiktionary editors decided to include", but we'll
diff --git a/static/languages_list.json b/private/languages_list.json
similarity index 100%
rename from static/languages_list.json
rename to private/languages_list.json
diff --git a/static/mainpages.csv b/private/mainpages.csv
similarity index 99%
rename from static/mainpages.csv
rename to private/mainpages.csv
index 2ec154c..4925831 100644
--- a/static/mainpages.csv
+++ b/private/mainpages.csv
@@ -1 +1 @@
-Саҳифаи Аслӣ,Pėrms poslapis,Halaman 
Utama,Haaptsäit,Wikipedia:Houptsyte,ᎤᎵᎮᎵᏍᏗ,Glavna stran,הויפט זייט,Գլխավոր 
էջ,עמוד ראשי,Hēafodtramet,Kaca Utama,Баш бит,Portála:Ovdasiidu,Forsíða,पमुख 
पत्त Pamukha patta,پہلا صفہ,Коьрта агӀо,Hayani,Wikipedia:Strona 
główna,Hovudside,Prìomh-Dhuilleag,Нүр халх,Forside,Asebtar amenzu,Ana Sayfa,Ôn 
Keuë,Галоўная старонка,Calīxatl,Qhapaq p'anqa,Portada,Va'ohtama,La Primera 
Hoja,Unang Panid,Медшӧр лист бок,முதற் பக்கம்,མ་ཤོག།,Acuèlh,گتˇ ولگ,Vòblad,Baş 
yaprak,Fa’ari’ira’a,維基大典:卷首,Fuula Dura,ໜ້າຫຼັກ,Pajina 
prinsipałe,Degemer,Portalada,سأرآسوٙنە,Cifapad,Hello jaɓɓorgo,Páigina 
Percipal,Przédnô starna,Azala,Ikhasi Elikhulu,मुख्य 
पृष्ठ,Wikipedia:Hoodsid,Itūlau Muamua,ಮುಖ್ಯ ಪುಟ,ទំព័រដើម,Vouiquipèdia:Reçua 
principâla,Página prencipal,Axa do Ŋgɔ,Gä nzönî,Сүрүн сирэй,Pájina 
Mahuluk,Главна страница,Fanhaluman,Suoku puslopa,ਮੁੱਖ ਸਫ਼ਾ,Folen 
dre,Thèu-Ya̍p,मुख्यपृष्ठम्,Mappadecéŋ,Mukânda ya ngudi,Pagina maestra,Pagina 
principală,Voorblad,Нүүр хуудас,Ana Səhifə,Iphepha Elingundoqo,اہم صَفہٕ,Umuna 
a Panid,Wikipedia:首页,Hoofdpagina,دەستپێک,Кьилин ччин,Pagene Prengepále,ዋናው 
ገጽ,Glavna stranica,uikipedi'as:ralju,Wikipedia:Houpsigk,Unang 
Pahina,Marhabin,मुखेल पान,Pagjine principâl,Ihü Mbu,Mien Paij,Leqephe la 
pele,Yiebdaeuz,Wikipedia:Haubdsaid,මුල් පිටුව,Veurblad,मुखपृष्ठ,మొదటి 
పేజీ,Thâu-ia̍h,ᓃᔥᑕᒻᐹᔅᑌᒋᓂᑲᓐ,หน้าหลัก,صفحۂ اول,Početna strana,Letlakala la 
pele,Makpiġaaq Kanna,БетӀераб гьумер,Pagrindinis puslapis,Głowny 
bok,Haaptblatt,Portal:Forside,Заглавная страница,Tàu Hiĕk,Кутскон 
бам,НапэкӀуэцӀ нэхъыщхьэ,ئۇيغۇرچە ۋىكىپىدىيە,Αρχικόν σελίδα,ପ୍ରଧାନ ପୃଷ୍ଠା,Ka 
papa kinohi,დუდხასჷლა,Laman Utama,Laman Utamo,Hafan,Veurblaad,Пондӧтчан 
листбок,Vikipedio:Ĉefpaĝo,Kezdőlap,གཙོ་ངོས།,Krataafa Titiriw,Chefi 
pagine,Hłowna strona,Panginot na Pahina,Íiyisíí Naaltsoos,Hlavná stránka,لومړی 
مخ,Тӱҥ лаштык,Прявтлопа,പ്രധാന താൾ,Ojúewé Àkọ́kọ́,Fran pes,НэкӀубгъо 
шъхьаӀ,Πύλη:Κύρια,Главьна страница,ꀨꏾꌠ,ဗဟိုစာမျက်နှာ,Peji 
Rekutanga,Portal:Huvudsida,Агьаммур лажин,Wikipedia:Portada,مُک 
صفحو,Башбарак,Pàggina principali,Intrada,Likhasi Lelikhulu,Pun Bulung,Pàgina 
printzipale,ܦܐܬܐ ܪܝܫܝܬܐ,Сæйраг фарс,ᐊᒥᖅ,Tungkaran Tatambaian,Головна 
сторінка,Ard-ghuillag,Wikipedia:Fandraisana,Principal págine,گت صفحه,Hlavní 
strana,Nayriri uñstawi,Saqqaa,Wikipédia:Página principal,Tuisblad,Bosh 
Sahifa,Mwanzo,Faqja kryesore,メインページ,सम्मुख पन्ना,Тĕп страницă,Ихадоу 
адаҟьа,صفحهٔ اصلی,Olupapula Olusooka,Peesi tali fiefia,Bwiema 
peij,Wikipedia:Pagina principala,آنا صفحه,މައި ޞަފްޙާ,Hoamseitn,Tepas,Басты 
бет,Тӹнг ӹлӹштӓш,الصفحه الرئيسيه,Pahila Panna,Sākumlapa,Fesipapira,मू 
पौ,મુખપૃષ્ઠ,Syahan nga Pakli,الصفحة الرئيسية,Vicipaedia:Pagina 
prima,Frontispico,Intangiriro,Tsamba Lalikulu,Haudsiede,পয়লা পাতা,Начална 
страница,Wikipédia:Accueil principal,Page dé garde,Bogga Hore,封面,Nambawan 
Pej,Prota frãndzã,Паӂина принчипалэ,მთავარი გვერდი,Pagina prinçipâ,Пря 
лопа,Lokásá ya libosó,Wikipedia:Etusivu,Haadside,Baş Sahypa,መበገሲ ገጽ,Paggena 
prencepale,Xët wu njëkk,Arapan ya Bolong,Baş Saife,Nyɛ 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Make top-pages script take language commandline parameter

2017-09-15 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378370 )

Change subject: Make top-pages script take language commandline parameter
..

Make top-pages script take language commandline parameter

Delay defining the language specific variables until reading the
process parameters.

Change-Id: Iee46c1744cea2bc80623da424302f3c475fae925
Also: use the same blacklist as for the most-read endpoint.
---
M scripts/top-pages-list.js
1 file changed, 19 insertions(+), 15 deletions(-)


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

diff --git a/scripts/top-pages-list.js b/scripts/top-pages-list.js
index 92511a8..2cd6122 100755
--- a/scripts/top-pages-list.js
+++ b/scripts/top-pages-list.js
@@ -7,26 +7,21 @@
 const fs = require("fs");
 const preq = require('preq');
 
-const lang = 'en'; // prepped for 'en' and 'zh'
-const topMonthlyPageViews = 
`https://wikimedia.org/api/rest_v1/metrics/pageviews/top/${lang}.wikipedia/all-access/2017/06/all-days`;
 // eslint-disable-line max-len
-const blacklist = [
-'Main_Page', // en: main page
-'Special%3ASearch', // already encoded
-'xHamster',
-'Wikipedia:首页', // zh: main page
-'台灣Youtuber訂閱人數排行榜' // zh: deleted page
-];
-const TOP_PAGES_FILE = `../private/top-pages/top-pages.${lang}.json`;
+const BLACKLIST = require('../etc/feed/blacklist');
 const SPECIAL = 'Special:';
 const SPECIAL2 = 'special:';
-const PARSOID_BASE_URI = `https://${lang}.wikipedia.org/api/rest_v1/page/html`;
+
+let lang = 'en'; // prepped for 'en' and 'zh'
+let topMonthlyPageViews = 
`https://wikimedia.org/api/rest_v1/metrics/pageviews/top/${lang}.wikipedia/all-access/2017/06/all-days`;
 // eslint-disable-line max-len
+let topPagesFile = `../private/top-pages/top-pages.${lang}.json`;
+let parsoidBaseUri = `https://${lang}.wikipedia.org/api/rest_v1/page/html`;
 
 const fixTitleForRequest = (pageTitle) => {
 return encodeURIComponent(pageTitle);
 };
 
 const writePages = (myPages) => {
-const logger = fs.createWriteStream(TOP_PAGES_FILE, { flags: 'w' });
+const logger = fs.createWriteStream(topPagesFile, { flags: 'w' });
 logger.write(`{ "items": [\n`);
 myPages.forEach((page, index, array) => {
 if (page) {
@@ -41,7 +36,7 @@
 
 const getETags = (myPages) => {
 return BBPromise.map(myPages, (page) => {
-const cmd = `curl --head 
"${PARSOID_BASE_URI}/${fixTitleForRequest(page.title)}"`;
+const cmd = `curl --head 
"${parsoidBaseUri}/${fixTitleForRequest(page.title)}"`;
 return exec(cmd)
 .then((rsp) => {
 if (!/^HTTP\/1.1 200 OK$/m.test(rsp)) {
@@ -68,7 +63,7 @@
 return rsp.body.items[0].articles.filter((article) => {
 const title = article.article;
 return (title.indexOf(SPECIAL) !== 0 && title.indexOf(SPECIAL2) 
!== 0
-&& !blacklist.includes(title));
+&& !BLACKLIST.includes(title));
 }).map((article) => {
 return { "title": article.article };
 });
@@ -79,4 +74,13 @@
 });
 };
 
-getTopPageViews();
+// MAIN
+const arg = process.argv[2];
+if (arg) {
+lang = arg;
+topMonthlyPageViews = 
`https://wikimedia.org/api/rest_v1/metrics/pageviews/top/${lang}.wikipedia/all-access/2017/06/all-days`;
 // eslint-disable-line max-len
+topPagesFile = `../private/top-pages/top-pages.${lang}.json`;
+parsoidBaseUri = `https://${lang}.wikipedia.org/api/rest_v1/page/html`;
+
+getTopPageViews();
+}
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Split off script to compile top-pages

2017-09-15 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378367 )

Change subject: Split off script to compile top-pages
..

Split off script to compile top-pages

This script is used in several places and but several other scripts now.
Time to make it independent.

Change-Id: Iebeec6c814fdd12f1350cb2802b17f36a88efa5a
---
M scripts/measure-payloads.js
A scripts/top-pages-list.js
2 files changed, 86 insertions(+), 72 deletions(-)


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

diff --git a/scripts/measure-payloads.js b/scripts/measure-payloads.js
index b83b070..beb88e3 100755
--- a/scripts/measure-payloads.js
+++ b/scripts/measure-payloads.js
@@ -5,20 +5,10 @@
 const BBPromise = require('bluebird');
 const exec = BBPromise.promisify(require('child_process').exec);
 const fs = require("fs");
-const preq = require('preq');
 
 const lang = 'en'; // prepped for 'en' and 'zh'
-const topMonthlyPageViews = 
`https://wikimedia.org/api/rest_v1/metrics/pageviews/top/${lang}.wikipedia/all-access/2017/06/all-days`;
 // eslint-disable-line max-len
-const blacklist = [
-'Main_Page', // en: main page
-'Special%3ASearch', // already encoded
-'Wikipedia:首页', // zh: main page
-'台灣Youtuber訂閱人數排行榜' // zh: deleted page
-];
-const PAGE_FILE = `../private/top-pages/top-pages.${lang}.json`;
+const TOP_PAGES_FILE = `../private/top-pages/top-pages.${lang}.json`;
 const GZIP = 'gzip -6';
-const SPECIAL = 'Special:';
-const SPECIAL2 = 'special:';
 const PARSOID_BASE_URI = `https://${lang}.wikipedia.org/api/rest_v1/page/html`;
 const LOCAL_MCS_BASE_URI = 
`http://localhost:6927/${lang}.wikipedia.org/v1/page/read-html`;
 
@@ -67,7 +57,7 @@
 };
 
 const processAllPages = () => {
-const pages = require(PAGE_FILE).items;
+const pages = require(TOP_PAGES_FILE).items;
 BBPromise.map(pages, (page) => {
 const measurement = [ page.title ];
 return processParsoid(page, measurement)
@@ -85,69 +75,11 @@
 });
 };
 
-const writePages = (myPages) => {
-const logger = fs.createWriteStream(PAGE_FILE, { flags: 'w' });
-logger.write(`{ "items": [\n`);
-myPages.forEach((page, index, array) => {
-if (page) {
-const comma = (index < array.length - 1) ? ',' : '';
-const title = page.title && page.title.replace(/"/g, '\\"');
-logger.write(`  { "title": "${title}", "rev": "${page.rev}" 
}${comma}\n`);
-}
-});
-logger.write(`]}\n`);
-logger.end();
-};
-
-const getETags = (myPages) => {
-return BBPromise.map(myPages, (page) => {
-const cmd = `curl --head 
"${PARSOID_BASE_URI}/${fixTitleForRequest(page.title)}"`;
-return exec(cmd)
-.then((rsp) => {
-if (!/^HTTP\/1.1 200 OK$/m.test(rsp)) {
-process.stderr.write(`WARNING: skipping parsoid for 
${page.title}`);
-return BBPromise.resolve();
-}
-const etagMatch = /^ETag:\s+W\/"(\S+?)"$/m.exec(rsp);
-process.stdout.write('.');
-page.rev = etagMatch[1];
-return page;
-})
-.catch((err) => {
-process.stderr.write(`ERROR getting parsoid ${page.title}: 
${err}`);
-});
-}, { concurrency: 1 })
-.then((myPages) => {
-writePages(myPages);
-});
-};
-
-const getTopPageViews = () => {
-return preq.get({ uri: topMonthlyPageViews })
-.then((rsp) => {
-return rsp.body.items[0].articles.filter((article) => {
-const title = article.article;
-return (title.indexOf(SPECIAL) !== 0 && title.indexOf(SPECIAL2) 
!== 0
-&& !blacklist.includes(title));
-}).map((article) => {
-return { "title": article.article };
-});
-}).catch((err) => {
-process.stderr.write(`ERROR: could not get top monthly page views: 
${err}`);
-}).then((myPages) => {
-getETags(myPages);
-});
-};
-
 // MAIN
 const arg = process.argv[2];
 if (arg) {
-if (arg === '-s') {
-getTopPageViews();
-} else {
-process.stderr.write(`Error: unrecognized parameter!`);
-process.exit(-1);
-}
+process.stderr.write(`Error: unrecognized parameter!`);
+process.exit(-1);
 } else {
 processAllPages();
 }
diff --git a/scripts/top-pages-list.js b/scripts/top-pages-list.js
new file mode 100755
index 000..92511a8
--- /dev/null
+++ b/scripts/top-pages-list.js
@@ -0,0 +1,82 @@
+#!/usr/bin/env node
+
+'use strict';
+
+const BBPromise = require('bluebird');
+const exec = BBPromise.promisify(require('child_process').exec);
+const fs = require("fs");
+const preq = require('preq');
+
+const lang = 'en'; // prepped for 'en' and 'zh'
+const topMonthlyPageViews = 
`https://wikimedia.org/api/rest_v1/metrics/pageviews/top/${lang}.wikipedia/all-access/2017/06/all-days`;
 // eslint-disable-line 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: More top-pages script improvements

2017-09-15 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378371 )

Change subject: More top-pages script improvements
..

More top-pages script improvements

Get rid of curl call. Use preq instead.
Add redirect handling.
Add timeout output + delay to avoid timeouts.

Change-Id: Ia4d06cc9ec2074185b45a77163ffe1a78b4f1c17
---
M scripts/top-pages-list.js
1 file changed, 40 insertions(+), 15 deletions(-)


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

diff --git a/scripts/top-pages-list.js b/scripts/top-pages-list.js
index 2cd6122..cae3951 100755
--- a/scripts/top-pages-list.js
+++ b/scripts/top-pages-list.js
@@ -20,6 +20,10 @@
 return encodeURIComponent(pageTitle);
 };
 
+const uriForParsoid = (pageTitle) => {
+return `${parsoidBaseUri}/${fixTitleForRequest(pageTitle)}`;
+};
+
 const writePages = (myPages) => {
 const logger = fs.createWriteStream(topPagesFile, { flags: 'w' });
 logger.write(`{ "items": [\n`);
@@ -34,29 +38,50 @@
 logger.end();
 };
 
+const processOnePage = (page) => {
+process.stdout.write('.');
+return preq.get({ uri: uriForParsoid(page.title) })
+.then((rsp) => {
+return BBPromise.delay(300, rsp); // avoid timeouts
+}).then((rsp) => {
+if (rsp.status !== 200) {
+if (rsp.status === 302) {
+page.title = rsp.headers.location;
+return processOnePage(page);
+}
+process.stderr.write(` WARNING: skipping parsoid for 
${page.title}!`);
+return BBPromise.resolve();
+}
+const etag = rsp.headers.etag;
+const revMatch = /"(\S+?)"/m.exec(etag);
+page.rev = revMatch[1];
+return page;
+}).catch((err) => {
+if (err.status === 504) {
+process.stderr.write(` Timeout for ${page.title}: 
${uriForParsoid(page.title)}! `);
+// time out encountered: wait a few seconds and try again
+return BBPromise.delay(2000).then(() => processOnePage(page));
+} else {
+process.stderr.write(` ERROR getting metadata ${page.title}: 
${err.status}! `);
+}
+});
+};
+
 const getETags = (myPages) => {
 return BBPromise.map(myPages, (page) => {
-const cmd = `curl --head 
"${parsoidBaseUri}/${fixTitleForRequest(page.title)}"`;
-return exec(cmd)
-.then((rsp) => {
-if (!/^HTTP\/1.1 200 OK$/m.test(rsp)) {
-process.stderr.write(`WARNING: skipping parsoid for 
${page.title}`);
-return BBPromise.resolve();
-}
-const etagMatch = /^ETag:\s+W\/"(\S+?)"$/m.exec(rsp);
-process.stdout.write('.');
-page.rev = etagMatch[1];
-return page;
-})
-.catch((err) => {
-process.stderr.write(`ERROR getting parsoid ${page.title}: 
${err}`);
-});
+return processOnePage(page);
 }, { concurrency: 1 })
 .then((myPages) => {
 writePages(myPages);
 });
 };
 
+const fixedPageList = () => {
+return BBPromise.resolve(
+[ { "title": "木乃伊3:龙帝之墓" } ]
+);
+};
+
 const getTopPageViews = () => {
 return preq.get({ uri: topMonthlyPageViews })
 .then((rsp) => {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Make script to compile top-pages more generic

2017-09-15 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378366 )

Change subject: Make script to compile top-pages more generic
..

Make script to compile top-pages more generic

Better error handling. Check for response code.

Change-Id: Ia405c6d5a59d120431adc3a9fef374e62e3d194e
---
M scripts/measure-payloads.js
1 file changed, 9 insertions(+), 3 deletions(-)


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

diff --git a/scripts/measure-payloads.js b/scripts/measure-payloads.js
index c8e9ad9..b83b070 100755
--- a/scripts/measure-payloads.js
+++ b/scripts/measure-payloads.js
@@ -89,9 +89,11 @@
 const logger = fs.createWriteStream(PAGE_FILE, { flags: 'w' });
 logger.write(`{ "items": [\n`);
 myPages.forEach((page, index, array) => {
-const comma = (index < array.length - 1) ? ',' : '';
-const title = page.title && page.title.replace(/"/g, '\\"');
-logger.write(`  { "title": "${title}", "rev": "${page.rev}" 
}${comma}\n`);
+if (page) {
+const comma = (index < array.length - 1) ? ',' : '';
+const title = page.title && page.title.replace(/"/g, '\\"');
+logger.write(`  { "title": "${title}", "rev": "${page.rev}" 
}${comma}\n`);
+}
 });
 logger.write(`]}\n`);
 logger.end();
@@ -102,6 +104,10 @@
 const cmd = `curl --head 
"${PARSOID_BASE_URI}/${fixTitleForRequest(page.title)}"`;
 return exec(cmd)
 .then((rsp) => {
+if (!/^HTTP\/1.1 200 OK$/m.test(rsp)) {
+process.stderr.write(`WARNING: skipping parsoid for 
${page.title}`);
+return BBPromise.resolve();
+}
 const etagMatch = /^ETag:\s+W\/"(\S+?)"$/m.exec(rsp);
 process.stdout.write('.');
 page.rev = etagMatch[1];

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Remove spam entry from top pages

2017-09-15 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378364 )

Change subject: Remove spam entry from top pages
..

Remove spam entry from top pages

Change-Id: Iabffa6d7ec972c707a255789e68407683626765b
---
M static/top-pages.en.json
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/static/top-pages.en.json b/static/top-pages.en.json
index 5515d2c..ba1d9c3 100644
--- a/static/top-pages.en.json
+++ b/static/top-pages.en.json
@@ -1,5 +1,4 @@
 { "items": [
-  { "title": "XHamster", "rev": 
"789256547/6b57b8e6-665d-11e7-800c-ae2a671b7ff7" },
   { "title": "Charles_Darwin", "rev": 
"790039763/a478c2b0-6740-11e7-be35-ca253ecac598" },
   { "title": "Gal_Gadot", "rev": 
"789710227/05df8688-665f-11e7-8ccc-56aede515f34" },
   { "title": "Wonder_Woman_(2017_film)", "rev": 
"790312726/6e2e8516-6753-11e7-a375-e39485719106" },

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add compare script for old and new extracts

2017-09-15 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378368 )

Change subject: Add compare script for old and new extracts
..

Add compare script for old and new extracts

Compare the top 1000 pages viewed on enwiki, and compares
HTML version of the extract of old and new summary implementations.

Arguments: provide a single argument which is the language code for
the Wikipedia project.

Execute the comparison script with a command like this:
cd scripts
node ./compare-extracts.js en

The output will be three files in the diff subfolder:
* en.html
* en.v1.txt
* en.v2.txt

The HTML file is good for an overview of the visible quality. The two
txt files are better when using a good diff tool, and allow more control
and show details better. Compare the txt files if you are concerned
about how the HTML tags compare.

Bug: T175286
Change-Id: Ia217c9613c8458352882862b43a6005cb6092158
---
A scripts/compare-extracts.js
A scripts/diff/static/compare-table.css
2 files changed, 169 insertions(+), 0 deletions(-)


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

diff --git a/scripts/compare-extracts.js b/scripts/compare-extracts.js
new file mode 100755
index 000..45ada80
--- /dev/null
+++ b/scripts/compare-extracts.js
@@ -0,0 +1,142 @@
+#!/usr/bin/env node
+
+'use strict';
+
+/*
+  Arguments: provide a single argument which is the language code for
+  the Wikipedia project.
+*/
+
+const BBPromise = require('bluebird');
+const fs = require("fs");
+const preq = require('preq');
+
+let lang;
+let topPages;
+
+let oldFileName;
+let newFileName;
+let htmlFileName;
+
+let oldFile;
+let newFile;
+let htmlFile;
+
+const uriForWikiLink = (title, lang) => {
+return `https://${lang}.m.wikipedia.org/wiki/${title}`;
+};
+
+const uriForProdSummary = (title, lang) => {
+return `https://${lang}.wikipedia.org/api/rest_v1/page/summary/${title}`;
+};
+
+const uriForLocalSummary = (title, lang) => {
+return 
`http://localhost:6927/${lang}.wikipedia.org/v1/page/summary/${title}`;
+};
+
+const outputStart = () => {
+htmlFile.write(`\n`);
+htmlFile.write(`\n`);
+htmlFile.write(`\n`);
+htmlFile.write(`\n`);
+htmlFile.write(`\n`);
+htmlFile.write(`\n`);
+htmlFile.write(`Extract comparison for top pages in 
${lang}.wikipedia.org\n`);
+htmlFile.write(`\n`);
+htmlFile.write(`\n`);
+htmlFile.write(`Title\n`);
+htmlFile.write(`Old\n`);
+htmlFile.write(`New\n`);
+htmlFile.write(`\n`);
+};
+
+const outputEnd = () => {
+htmlFile.write(`\n`);
+htmlFile.write(`\n`);
+htmlFile.write(`\n`);
+
+oldFile.end();
+newFile.end();
+htmlFile.end();
+};
+
+const compareExtractsHTML = (oldExtract, newExtract, counter, title, lang) => {
+const displayTitle = title.replace(/_/g, ' ');
+const wikiLink = uriForWikiLink(title, lang);
+const counterTag = `${counter}`;
+htmlFile.write(`${counterTag} ${displayTitle}\n`);
+if (oldExtract !== newExtract) {
+htmlFile.write(`${oldExtract}\n`);
+htmlFile.write(`${newExtract}\n`);
+} else {
+htmlFile.write(`${oldExtract}\n`);
+htmlFile.write(`${newExtract}\n`);
+}
+htmlFile.write(`\n`);
+};
+
+const writeFile = (file, title, value) => {
+file.write(`== ${title}\n`);
+file.write(`${value}\n`);
+};
+
+const getExtractHtml = (response) => {
+if (response.status !== 200) {
+return `!! STATUS = ${response.status} !!\n`;
+}
+return response.body && response.body.extract_html;
+};
+
+const compareExtracts = (oldSummaryResponse, newSummaryResponse, counter, 
title, lang) => {
+const oldExtract = getExtractHtml(oldSummaryResponse);
+const newExtract = getExtractHtml(newSummaryResponse);
+compareExtractsHTML(oldExtract, newExtract, counter, title, lang);
+writeFile(oldFile, title, oldExtract);
+writeFile(newFile, title, newExtract);
+};
+
+const fetchAndVerify = (title, counter, lang) => {
+process.stdout.write('.');
+let newSummaryResponse;
+const uri = uriForLocalSummary(title, lang);
+return preq.get({ uri })
+.then((response) => {
+newSummaryResponse = response;
+return preq.get(uriForProdSummary(title, lang));
+}).then((oldSummaryResponse) => {
+compareExtracts(oldSummaryResponse, newSummaryResponse, counter, 
title, lang);
+}).catch((err) => {
+process.stderr.write(`${err}\n`);
+});
+};
+
+const processOneLanguage = (lang) => {
+let counter = 0;
+outputStart();
+BBPromise.each(topPages, (page) => {
+return fetchAndVerify(page.title, ++counter, lang);
+})
+.then(() => {
+outputEnd();
+});
+};
+
+// MAIN
+const arg = process.argv[2];
+if (arg) {
+lang = arg;
+topPages = require(`../private/top-pages.${lang}.json`).items;
+
+oldFileName = `diff/${lang}.v1.txt`;
+newFileName 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Derive hostname from directory name

2017-09-15 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378363 )

Change subject: Derive hostname from directory name
..

Derive hostname from directory name

When multiple terminal windows with SSH sessions to different
Vagrant boxes are open, it's hard to know which is which since
the hostname (and thus the shell prompt) is so generic. Use
a hostname based on the host directory name instead.

Change-Id: If3c314be95395c09f5dea2a3e671945cf3105646
---
M Vagrantfile
M lib/mediawiki-vagrant/environment.rb
2 files changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/63/378363/1

diff --git a/Vagrantfile b/Vagrantfile
index 4398c72..4c9e177 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -49,7 +49,7 @@
 settings = mwv.load_settings
 
 Vagrant.configure('2') do |config|
-  config.vm.hostname = 'mediawiki-vagrant.dev'
+  config.vm.hostname = mwv.boxname + '.mediawiki-vagrant.dev'
   config.package.name = 'mediawiki.box'
 
   config.ssh.forward_agent = settings[:forward_agent]
diff --git a/lib/mediawiki-vagrant/environment.rb 
b/lib/mediawiki-vagrant/environment.rb
index 952b347..d7f2c9c 100644
--- a/lib/mediawiki-vagrant/environment.rb
+++ b/lib/mediawiki-vagrant/environment.rb
@@ -278,6 +278,15 @@
   end
 end
 
+# name of MWV root directory, sanitized to be usable in a domain name
+#
+# @return [String]
+#
+def boxname
+  @path.basename().to_s.downcase.
+gsub(/[^a-z0-9-]+/, '-')[0..62].gsub(/^-|-/, '')
+end
+
 private
 
 def module_path(*subpaths)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3c314be95395c09f5dea2a3e671945cf3105646
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Fix Apache port number in Vagrant role

2017-09-15 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378362 )

Change subject: Fix Apache port number in Vagrant role
..

Fix Apache port number in Vagrant role

Change-Id: I4e1a20fc7d3186558f3161058e41598eaeeba19d
---
M puppet/modules/varnish/manifests/init.pp
R puppet/modules/varnish/templates/default-subs.vcl.erb
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/62/378362/1

diff --git a/puppet/modules/varnish/manifests/init.pp 
b/puppet/modules/varnish/manifests/init.pp
index de1638f..4e2051e 100644
--- a/puppet/modules/varnish/manifests/init.pp
+++ b/puppet/modules/varnish/manifests/init.pp
@@ -116,7 +116,7 @@
 
 varnish::backend { 'default':
 host  => '127.0.0.1',
-port  => '8080',
+port  => $::forwarded_port,
 order => 20,
 }
 
@@ -127,7 +127,7 @@
 }
 
 varnish::config { 'default-subs':
-source => 'puppet:///modules/varnish/default-subs.vcl',
+content => template('varnish/default-subs.vcl.erb'),
 order  => 50,
 }
 
diff --git a/puppet/modules/varnish/files/default-subs.vcl 
b/puppet/modules/varnish/templates/default-subs.vcl.erb
similarity index 96%
rename from puppet/modules/varnish/files/default-subs.vcl
rename to puppet/modules/varnish/templates/default-subs.vcl.erb
index ffada70..d164e41 100644
--- a/puppet/modules/varnish/files/default-subs.vcl
+++ b/puppet/modules/varnish/templates/default-subs.vcl.erb
@@ -7,8 +7,8 @@
 # Since we expose varnish on the default port (6081) we need to rewrite
 # requests that are generated using the default wiki port (8080)
 # This needs to be done early because it's needed for PURGE calls
-if (req.url ~ ":8080") {
-set req.url = regsub(req.url, "(.*):8080/(.*)", "\1:6081/\2");
+if (req.url ~ ":<%= scope[':forwarded_port'] %>") {
+set req.url = regsub(req.url, "(.*):<%= scope[':forwarded_port'] 
%>/(.*)", "\1:6081/\2");
 }
 
 # This uses the ACL action called "purge". Basically if a request to

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e1a20fc7d3186558f3161058e41598eaeeba19d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Make `box-sizing: border-box` the default on wigets

2017-09-15 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378361 )

Change subject: Make `box-sizing: border-box` the default on wigets
..

Make `box-sizing: border-box` the default on wigets

Setting `box-sizing: border-box` as default on all widgets and
clean up with the insane mish-mash in the library.

Bug: T147692
Change-Id: I12b6431f9c3430e992f60f61429eb9f9bb3ac228
---
M src/styles/Widget.less
M src/styles/widgets/DropdownInputWidget.less
M src/styles/widgets/ProgressBarWidget.less
M src/styles/widgets/TabOptionWidget.less
M src/styles/widgets/TextInputWidget.less
M src/styles/widgets/ToggleSwitchWidget.less
M src/themes/apex/widgets.less
M src/themes/wikimediaui/widgets.less
8 files changed, 2 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/61/378361/1

diff --git a/src/styles/Widget.less b/src/styles/Widget.less
index 107bc42..8d8f1f3 100644
--- a/src/styles/Widget.less
+++ b/src/styles/Widget.less
@@ -1,5 +1,7 @@
 @import 'common';
 
 .oo-ui-widget {
+   .oo-ui-box-sizing( border-box );
+
.theme-oo-ui-widget();
 }
diff --git a/src/styles/widgets/DropdownInputWidget.less 
b/src/styles/widgets/DropdownInputWidget.less
index 72037df..02405f8 100644
--- a/src/styles/widgets/DropdownInputWidget.less
+++ b/src/styles/widgets/DropdownInputWidget.less
@@ -4,7 +4,6 @@
position: relative;
// Necessary for proper alignment when used with `display: inline-block`
vertical-align: middle;
-   .oo-ui-box-sizing( border-box );
 
.oo-ui-dropdownWidget,
select {
diff --git a/src/styles/widgets/ProgressBarWidget.less 
b/src/styles/widgets/ProgressBarWidget.less
index 6231368..82993fc 100644
--- a/src/styles/widgets/ProgressBarWidget.less
+++ b/src/styles/widgets/ProgressBarWidget.less
@@ -1,7 +1,5 @@
 @import '../common';
 
 .oo-ui-progressBarWidget {
-   .oo-ui-box-sizing( border-box );
-
.theme-oo-ui-progressBarWidget();
 }
diff --git a/src/styles/widgets/TabOptionWidget.less 
b/src/styles/widgets/TabOptionWidget.less
index fdc3bf0..0b83154 100644
--- a/src/styles/widgets/TabOptionWidget.less
+++ b/src/styles/widgets/TabOptionWidget.less
@@ -2,7 +2,6 @@
 
 .oo-ui-tabOptionWidget {
display: inline-block;
-   .oo-ui-box-sizing( border-box );
vertical-align: bottom;
 
.theme-oo-ui-tabOptionWidget();
diff --git a/src/styles/widgets/TextInputWidget.less 
b/src/styles/widgets/TextInputWidget.less
index 1b60524..1164e8c 100644
--- a/src/styles/widgets/TextInputWidget.less
+++ b/src/styles/widgets/TextInputWidget.less
@@ -4,7 +4,6 @@
position: relative;
// Necessary for proper alignment when used with `display: inline-block`
vertical-align: middle;
-   .oo-ui-box-sizing( border-box );
 
input,
textarea {
diff --git a/src/styles/widgets/ToggleSwitchWidget.less 
b/src/styles/widgets/ToggleSwitchWidget.less
index 6c8a36d..6b1a169 100644
--- a/src/styles/widgets/ToggleSwitchWidget.less
+++ b/src/styles/widgets/ToggleSwitchWidget.less
@@ -5,7 +5,6 @@
display: inline-block;
vertical-align: middle;
overflow: hidden;
-   .oo-ui-box-sizing( border-box );
.oo-ui-force-gpu-composite-layer();
 
&.oo-ui-widget-enabled {
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index ea8f67a..e63bbde 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -171,7 +171,6 @@
 .theme-oo-ui-capsuleItemWidget () {
width: auto;
max-width: 100%;
-   .oo-ui-box-sizing( border-box );
vertical-align: middle;
padding: 0 0.4em;
margin: 0.1em;
@@ -1108,7 +1107,6 @@
 .theme-oo-ui-tagItemWidget () {
width: auto;
max-width: 100%;
-   .oo-ui-box-sizing( border-box );
vertical-align: middle;
padding: 0 0.4em;
margin: 0.1em;
diff --git a/src/themes/wikimediaui/widgets.less 
b/src/themes/wikimediaui/widgets.less
index 4a9bed7..d7e956b 100644
--- a/src/themes/wikimediaui/widgets.less
+++ b/src/themes/wikimediaui/widgets.less
@@ -152,7 +152,6 @@
 }
 
 .theme-oo-ui-capsuleItemWidget () {
-   .oo-ui-box-sizing( border-box );
width: auto;
max-width: 100%;
height: @height-tagitem;
@@ -672,7 +671,6 @@
// Remove user agent styles
-webkit-appearance: none;
-moz-appearance: none;
-   .oo-ui-box-sizing( border-box );
border: @border-base;
border-radius: @border-radius-base;
padding: @padding-base;
@@ -1558,7 +1556,6 @@
 }
 
 .theme-oo-ui-tagItemWidget () {
-   .oo-ui-box-sizing( border-box );
width: auto;
max-width: 100%;
height: @height-tagitem;

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

[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerrit: fix host for TLS cert/monitoring if on slave

2017-09-15 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378360 )

Change subject: gerrit: fix host for TLS cert/monitoring if on slave
..

gerrit: fix host for TLS cert/monitoring if on slave

Ensure that the right hostname (gerrit-slave vs gerrit) is
used for the Letsencrypt cert and also Icinga monitoring if
on a slave host.

Add the $slave parameter that was already used in init also in
the proxy class and pass it through to be able to set host
based on slave status.

Add $domain parameter to reduced hardcoded "wikimedia.org".

Change-Id: Ib541f1c39ebb7f74088666034ebd3f4b2054fef4
---
M modules/gerrit/manifests/init.pp
M modules/gerrit/manifests/proxy.pp
2 files changed, 15 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/60/378360/1

diff --git a/modules/gerrit/manifests/init.pp b/modules/gerrit/manifests/init.pp
index eb04d71..4c407fd 100644
--- a/modules/gerrit/manifests/init.pp
+++ b/modules/gerrit/manifests/init.pp
@@ -14,6 +14,7 @@
 class { '::gerrit::proxy':
 require => Class['gerrit::jetty'],
 slave_hosts => $slave_hosts,
+slave   => $slave,
 }
 
 if !$slave {
diff --git a/modules/gerrit/manifests/proxy.pp 
b/modules/gerrit/manifests/proxy.pp
index ea32251..1238f93 100644
--- a/modules/gerrit/manifests/proxy.pp
+++ b/modules/gerrit/manifests/proxy.pp
@@ -1,25 +1,33 @@
 class gerrit::proxy(
-$host = $::gerrit::host,
-$slave_hosts  = [],
-$maint_mode   = false,
+$host = $::gerrit::host,
+$domain = 'wikimedia.org'
+$slave_hosts = [],
+$slave = false,
+$maint_mode = false,
 ) {
 
+if $slave {
+$tls_host = "gerrit-slave.${domain}"
+} else {
+$tls_host = $host
+}
+
 letsencrypt::cert::integrated { 'gerrit':
-subjects   => $host,
+subjects   => $tls_host,
 puppet_svc => 'apache2',
 system_svc => 'apache2',
 }
 
 monitoring::service { 'https':
 description   => 'HTTPS',
-check_command => "check_ssl_http_letsencrypt!${host}",
+check_command => "check_ssl_http_letsencrypt!${tls_host}",
 contact_group => 'admins,gerrit',
 }
 
 $ssl_settings = ssl_ciphersuite('apache', 'mid', true)
 
 apache::site { $host:
-content => template('gerrit/gerrit.wikimedia.org.erb'),
+content => template("gerrit/gerrit.${domain}.erb'),
 }
 
 # Error page stuff

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib541f1c39ebb7f74088666034ebd3f4b2054fef4
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] oojs/ui[master]: Toolbar: Move `unselectable` up & concatenate selectors

2017-09-15 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378359 )

Change subject: Toolbar: Move `unselectable` up & concatenate selectors
..

Toolbar: Move `unselectable` up & concatenate selectors

Moving `unselectable` mixin up as there are no other elements in
a toolbar which should be selectable. Also saving extra selector
with same property.

Change-Id: Iacf484f6d27a3d685019e63ec1e68872c319f6c4
---
M src/styles/Toolbar.less
1 file changed, 2 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/59/378359/1

diff --git a/src/styles/Toolbar.less b/src/styles/Toolbar.less
index 10a4d21..7bfc959 100644
--- a/src/styles/Toolbar.less
+++ b/src/styles/Toolbar.less
@@ -6,10 +6,6 @@
&-bar {
line-height: 1;
position: relative;
-   }
-
-   &-tools,
-   &-actions {
.oo-ui-unselectable();
}
 
@@ -17,12 +13,8 @@
display: inline;
white-space: nowrap;
 
-   .oo-ui-toolbar-narrow & {
-   white-space: normal;
-   }
-
-   // Tools like PopupToolGroup can have a lot of content, which 
should be wrapped normally
-   .oo-ui-tool {
+   .oo-ui-toolbar-narrow &,
+   .oo-ui-tool { // Tools like PopupToolGroup can have a lot of 
content, which should be wrapped normally
white-space: normal;
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacf484f6d27a3d685019e63ec1e68872c319f6c4
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use ::class instead of hardcoding a class name

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

Change subject: Use ::class instead of hardcoding a class name
..


Use ::class instead of hardcoding a class name

Change-Id: I4f41239d8f87ee233f76defa62fafd5349721597
---
M api/ApiContentTranslationToken.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/api/ApiContentTranslationToken.php 
b/api/ApiContentTranslationToken.php
index c20f543..ea940d9 100644
--- a/api/ApiContentTranslationToken.php
+++ b/api/ApiContentTranslationToken.php
@@ -25,7 +25,7 @@
}
 
// Do not fatal out
-   if ( !class_exists( 'Firebase\JWT\JWT' ) ) {
+   if ( !class_exists( JWT::class ) ) {
$this->dieWithError( 'apierror-cx-jwtmissing', 
'token-impossible' );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f41239d8f87ee233f76defa62fafd5349721597
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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...cxserver[master]: MWApiRequest: Make GET requests work correctly

2017-09-15 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378358 )

Change subject: MWApiRequest: Make GET requests work correctly
..

MWApiRequest: Make GET requests work correctly

Doing GET requests crashed because:
* config.*.yaml explicitly set method:'post' in the request template
* If method='get', MWApiRequest doesn't overwrite this
* The template also sets body={}, but no content-type
* Using a non-string body without a special content-type causes an error

Work around this by explictly setting request.method, and by
deleting request.body for GET.

Change-Id: I1cb72fadba80216ae7cb002b4c8bae9c34d78f5c
---
M lib/mw/ApiRequest.js
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/58/378358/1

diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index d540cad..be97281 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -48,8 +48,11 @@
}
} );
if ( method === 'get' ) {
+   request.method = 'get';
request.query = query;
+   delete request.body;
} else if ( method === 'post' ) {
+   request.method = 'post';
request.body = query;
request.headers[ 'content-type' ] = 
'application/x-www-form-urlencoded';
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cb72fadba80216ae7cb002b4c8bae9c34d78f5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Start migration to Unicode sections everywhere

2017-09-15 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378357 )

Change subject: Start migration to Unicode sections everywhere
..

Start migration to Unicode sections everywhere

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f96d715..dddc956 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19496,12 +19496,9 @@
'frwiktionary' => true,
 ],
 
-// T175725
+// T152540
 'wgFragmentMode' => [
-   'default' => [ 'legacy' ],
-   'testwiki' => [ 'legacy', 'html5' ],
-   'test2wiki' => [ 'legacy', 'html5' ],
-   'testwikidatawiki' => [ 'legacy', 'html5' ],
+   'default' => [ 'legacy', 'html5' ],
 ],
 
 ];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia50331e4e9d832965e92f8257f6a730a0034a97c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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...LandingCheck[master]: Better language fallback for unsupported locales

2017-09-15 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378356 )

Change subject: Better language fallback for unsupported locales
..

Better language fallback for unsupported locales

If language is given as an unsupported lang-country combination,
try the unsuffixed language before falling back to English.

Bug: T174693
Change-Id: Iaa628d49c6cac434b52a1bc913d6e986d3025ebb
---
M SpecialLandingCheck.php
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/SpecialLandingCheck.php b/SpecialLandingCheck.php
index a1a7858..a3e01d7 100644
--- a/SpecialLandingCheck.php
+++ b/SpecialLandingCheck.php
@@ -56,6 +56,15 @@
$language = 'en';
}
 
+   // if it's not a supported language, but the section before a
+   // dash or underscore is, use that
+   if ( !Language::isSupportedLanguage( $language ) ) {
+   $parts = preg_split( '/[-_]/', $language );
+   if ( Language::isSupportedLanguage( $parts[0] ) ) {
+   $language = $parts[0];
+   }
+   }
+
// Use the GeoIP cookie if available.
if ( !$country ) {
$geoip = $request->getCookie( 'GeoIP', '' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa628d49c6cac434b52a1bc913d6e986d3025ebb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LandingCheck
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] wikidata...rdf[master]: Move "all category wikis" script to more generic form

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

Change subject: Move "all category wikis" script to more generic form
..


Move "all category wikis" script to more generic form

Change-Id: I4dbc0aaf5240d38bc7e2944104bb6cae23409e00
---
R dist/src/script/forAllCategoryWikis.sh
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/dist/src/script/loadAllCategories.sh 
b/dist/src/script/forAllCategoryWikis.sh
similarity index 78%
rename from dist/src/script/loadAllCategories.sh
rename to dist/src/script/forAllCategoryWikis.sh
index 22e37d7..1f4521e 100755
--- a/dist/src/script/loadAllCategories.sh
+++ b/dist/src/script/forAllCategoryWikis.sh
@@ -1,6 +1,7 @@
 #!/bin/bash
 DUMP_LIST=${DUMP_LIST:-"https://noc.wikimedia.org/conf/categories-rdf.dblist"}
 DIR=${DIR:-`dirname $0`}
+COMMAND="$1"
 
 if [ -f $DUMP_LIST ]; then
fetch="cat"
@@ -9,6 +10,6 @@
 fi
 
 $fetch $DUMP_LIST | while read wiki; do
-   echo "Loading $wiki..."
-   $DIR/loadCategoryDump.sh $wiki
-done 
\ No newline at end of file
+   echo "Processing $wiki..."
+   $DIR/$COMMAND $wiki
+done 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dbc0aaf5240d38bc7e2944104bb6cae23409e00
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
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/puppet[production]: Generate daily diffs for categories RDF

2017-09-15 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378355 )

Change subject: Generate daily diffs for categories RDF
..

Generate daily diffs for categories RDF

It works this way:
- The diffs are SPARQL Update and live in /other/categoriesrdf/daily/MMDD
- In that directory, each wiki would have a dump like
  WIKI-MMDD-daily.sparql.gz
- In /other/categoriesrdf/lasdump there would be timestamp
  of the last completed diff as WIKI-daily.last
- If there was a full dump between the time of the last diff and now,
  additional file fromDumpYYYMMDD-WIKI-MMDD-categories.sparql.gz will be 
created,
  containing changes from last dump to now. The first date in the filename is
  the date for the dump.

NOTE: there should be at least one full dump existing before dailies can be 
initiated!
Otherwise it will fail as there's no reference point to start diffs from.

Bug: T173774
Change-Id: I946740a7468be82e8c0b71844076d63a89e6263d
Depends-On: I9867ad566c0619b55a48a011bd3c55321b1bfcff
---
M modules/dataset/manifests/dirs.pp
A modules/snapshot/files/cron/dumpcategoriesrdf-daily.sh
M modules/snapshot/files/cron/dumpcategoriesrdf.sh
M modules/snapshot/manifests/cron/categoriesrdf.pp
4 files changed, 186 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/378355/1

diff --git a/modules/dataset/manifests/dirs.pp 
b/modules/dataset/manifests/dirs.pp
index 3a4831c..0e82ccb 100644
--- a/modules/dataset/manifests/dirs.pp
+++ b/modules/dataset/manifests/dirs.pp
@@ -137,4 +137,11 @@
 owner  => 'datasets',
 group  => 'datasets',
 }
+
+file { "${categoriesrdf}/daily":
+ensure => 'directory',
+mode   => '0755',
+owner  => 'datasets',
+group  => 'datasets',
+}
 }
diff --git a/modules/snapshot/files/cron/dumpcategoriesrdf-daily.sh 
b/modules/snapshot/files/cron/dumpcategoriesrdf-daily.sh
new file mode 100755
index 000..91750e1
--- /dev/null
+++ b/modules/snapshot/files/cron/dumpcategoriesrdf-daily.sh
@@ -0,0 +1,158 @@
+#!/bin/bash
+#
+# This file is maintained by puppet!
+# modules/snapshot/cron/dumpcategoriesrdf-daily.sh
+#
+#
+# Generate a daily list of changes for all wikis in
+# categories-rdf list and remove old ones.
+
+source /usr/local/etc/dump_functions.sh
+
+usage() {
+   echo "Usage: $0 --list wikis.dblist [--config ] [--dryrun]"
+   echo
+   echo "  --config  path to configuration file for dump generation"
+   echo "(default value: ${confsdir}/wikidump.conf"
+   echo "  --listfile containing list of the wikis to dump"
+   echo "  --dryrun  don't run dump, show what would have been done"
+   exit 1
+}
+
+configFile="${confsdir}/wikidump.conf"
+dryrun="false"
+dbList="categories-rdf"
+
+while [ $# -gt 0 ]; do
+   if [ $1 == "--config" ]; then
+   configFile="$2"
+   shift; shift;
+   elif [ $1 == "--dryrun" ]; then
+   dryrun="true"
+   shift
+   elif [ $1 == "--list" ]; then
+   dbList="$2"
+   shift; shift;
+   else
+   echo "$0: Unknown option $1"
+   usage
+   fi
+done
+
+if [ -z "$dbList" -o ! -f "$dbList" ]; then
+   echo "Valid wiki list must be specified"
+   echo "Exiting..."
+   exit 1
+fi
+
+if [ ! -f "$configFile" ]; then
+   echo "Could not find config file: $configFile"
+   echo "Exiting..."
+   exit 1
+fi
+
+args="wiki:dir,privatelist;tools:gzip;output:public"
+results=`python "${repodir}/getconfigvals.py" --configfile "$configFile" 
--args "$args"`
+
+deployDir=`getsetting "$results" "wiki" "dir"` || exit 1
+privateList=`getsetting "$results" "wiki" "privatelist"` || exit 1
+gzip=`getsetting "$results" "tools" "gzip"` || exit 1
+publicDir=`getsetting "$results" "output" "public"` || exit 1
+
+for settingname in "deployDir" "gzip" "privateList" "publicDir"; do
+checkval "$settingname" "${!settingname}"
+done
+
+today=$(date -u +'%Y%m%d')
+ts=$(date -u +'%Y%m%d%H%M%S')
+fullDumpDirBase="${publicDir}/other/categoriesrdf"
+timestampsDir="${fullDumpDirBase}/lastdump"
+targetDir="${fullDumpDirBase}/daily/${today}"
+multiVersionScript="${deployDir}/multiversion/MWScript.php"
+
+# remove old datasets
+daysToKeep=15
+cutOff=$(( $(date +%s) - $(( $daysToKeep + 1 )) * 24 * 3600))
+if [ -d "$targetDirBase" ]; then
+   for folder in $(ls -d -r "${targetDirBase}/"*); do
+   creationTime=$(date --utc --date="$(basename $folder)" +%s 
2>/dev/null)
+   if [ -n "$creationTime" ]; then
+   if [ "$cutOff" -gt "$creationTime" ]; then
+   if [ "$dryrun" == "true" ]; then
+   echo rm "${folder}/"*".sparql.gz"
+  

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Fix for function mw.toolbar.insertTags in chrome and IE

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

Change subject: Fix for function mw.toolbar.insertTags in chrome and IE
..


Fix for function mw.toolbar.insertTags in chrome and IE

Bug: T164905
Change-Id: I15b60944a95f94b4a2e3b929fe4d00fe757961bd
---
M resources/ext.CodeMirror.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index e58a5f3..4dd2729 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -21,7 +21,7 @@
function cmTextSelection( command, options ) {
var fn, retval;
 
-   if ( !codeMirror || codeMirror.getTextArea() !== this[ 0 ] ) {
+   if ( !codeMirror ) {
return origTextSelection.call( this, command, options );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15b60944a95f94b4a2e3b929fe4d00fe757961bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Pastakhov 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Niharika29 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Concatenate constructive & progressive se...

2017-09-15 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378354 )

Change subject: WikimediaUI theme: Concatenate constructive & progressive 
selectors
..

WikimediaUI theme: Concatenate constructive & progressive selectors

Concatenating deprecated constructive with progressive selectors to
save a few bytes on output.

Change-Id: I824e98dca420013274ac97e1e5dfec09be336e65
---
M src/themes/wikimediaui/elements.less
M src/themes/wikimediaui/tools.less
M src/themes/wikimediaui/windows.less
3 files changed, 10 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/54/378354/1

diff --git a/src/themes/wikimediaui/elements.less 
b/src/themes/wikimediaui/elements.less
index 77e6560..4643658 100644
--- a/src/themes/wikimediaui/elements.less
+++ b/src/themes/wikimediaui/elements.less
@@ -227,13 +227,9 @@
}
 
&.oo-ui-flaggedElement {
-   &-progressive {
+   &-progressive,
+   &-constructive { // `constructive` got 
deprecated in 0.16.1, see T110555
.mw-frameless-button-colored( 
~'.oo-ui-buttonElement-button',  @color-progressive, @color-progressive--hover, 
@color-progressive--active, @color-progressive--focus );
-   }
-
-   // Deprecated in 0.16.1, see T110555
-   &-constructive {
-   .mw-frameless-button-colored( 
~'.oo-ui-buttonElement-button', @color-progressive, @color-progressive--hover, 
@color-progressive--active, @color-progressive--focus );
}
 
&-destructive {
@@ -379,12 +375,8 @@
}
 
&.oo-ui-flaggedElement {
-   &-progressive {
-   .mw-framed-button-colored( 
~'.oo-ui-buttonElement-button', @color-progressive, 
@background-color-framed--hover, @border-color-framed-progressive--hover, 
@color-progressive--active, @color-progressive--focus );
-   }
-
-   // Deprecated in 0.16.1
-   &-constructive {
+   &-progressive,
+   &-constructive { // `constructive` got 
deprecated in 0.16.1
.mw-framed-button-colored( 
~'.oo-ui-buttonElement-button', @color-progressive, 
@background-color-framed--hover, @border-color-framed-progressive--hover, 
@color-progressive--active, @color-progressive--focus );
}
 
@@ -395,12 +387,8 @@
 
&.oo-ui-flaggedElement-primary {
&.oo-ui-flaggedElement {
-   &-progressive {
-   
.mw-framed-primary-button-colored( ~'.oo-ui-buttonElement-button', 
@color-progressive, @color-progressive--hover, @color-progressive--active, 
@color-progressive--focus );
-   }
-
-   // Deprecated in 0.16.1
-   &-constructive {
+   &-progressive,
+   &-constructive { // `constructive` got 
deprecated in 0.16.1

.mw-framed-primary-button-colored( ~'.oo-ui-buttonElement-button', 
@color-progressive, @color-progressive--hover, @color-progressive--active, 
@color-progressive--focus );
}
 
diff --git a/src/themes/wikimediaui/tools.less 
b/src/themes/wikimediaui/tools.less
index 817c81d..41c47ed 100644
--- a/src/themes/wikimediaui/tools.less
+++ b/src/themes/wikimediaui/tools.less
@@ -426,12 +426,8 @@
}
 
&.oo-ui-flaggedElement {
-   &-progressive {
-   .mw-framed-primary-button-colored( 
~'.oo-ui-popupToolGroup-handle', @color-progressive, @color-progressive--hover, 
@color-progressive--active, @color-progressive--focus );
-   }
-
-   // Deprecated in 0.16.1, see T110555
-   &-constructive {
+   &-progressive,
+   &-constructive { // `constructive` got deprecated in 0.16.1, 
see T110555
.mw-framed-primary-button-colored( 
~'.oo-ui-popupToolGroup-handle', @color-progressive, @color-progressive--hover, 
@color-progressive--active, @color-progressive--focus );
}
 
diff --git a/src/themes/wikimediaui/windows.less 
b/src/themes/wikimediaui/windows.less
index c2cc97e..4707ed7 100644
--- a/src/themes/wikimediaui/windows.less
+++ b/src/themes/wikimediaui/windows.less
@@ -95,8 +95,7 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Show progress indicator after clicking on the placeholder se...

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

Change subject: Show progress indicator after clicking on the placeholder 
section
..


Show progress indicator after clicking on the placeholder section

Change-Id: I01cbd9090c4ad1094ca1554631102d7ecaad143d
---
M modules/ve-cx/ce/ve.ce.CXPlaceholderNode.js
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/modules/ve-cx/ce/ve.ce.CXPlaceholderNode.js 
b/modules/ve-cx/ce/ve.ce.CXPlaceholderNode.js
index 88de981..aee26d6 100644
--- a/modules/ve-cx/ce/ve.ce.CXPlaceholderNode.js
+++ b/modules/ve-cx/ce/ve.ce.CXPlaceholderNode.js
@@ -48,9 +48,14 @@
 
 ve.ce.CXPlaceholderNode.prototype.executeCommand = function () {
this.active = true;
+   this.showProgressIndicator();
this.getDocument().emit( 'activatePlaceholder', this );
 };
 
+ve.ce.CXPlaceholderNode.prototype.showProgressIndicator = function () {
+   this.$element.empty().append( mw.cx.widgets.spinner() );
+};
+
 ve.ce.CXPlaceholderNode.prototype.createHighlights = function () {
 };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01cbd9090c4ad1094ca1554631102d7ecaad143d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
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] oojs/ui[master]: demos: Avoid menu's `box-shadow` from lurkin into toolbar

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

Change subject: demos: Avoid menu's `box-shadow` from lurkin into toolbar
..


demos: Avoid menu's `box-shadow` from lurkin into toolbar

Change-Id: Iedf7e54842484a52a7dab54905b53f32abb23a8e
---
M demos/styles/demo.css
1 file changed, 17 insertions(+), 4 deletions(-)

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



diff --git a/demos/styles/demo.css b/demos/styles/demo.css
index 3a101a8..76cebb1 100644
--- a/demos/styles/demo.css
+++ b/demos/styles/demo.css
@@ -254,8 +254,8 @@
 /* Toolbars demo */
 
 .demo-container.demo-toolbars {
+   margin-top: 4em;
padding: 0;
-   margin-bottom: 2em;
 }
 
 .demo-toolbars-contents {
@@ -420,8 +420,13 @@
}
 
/* This needs extra specificity to beat PanelLayout styles */
-   .demo-container.oo-ui-panelLayout {
+   .demo-menu + .demo-container.oo-ui-panelLayout {
margin-top: 11.4em;
+   }
+
+   /* Avoid `box-shadow` from menu lurkin into toolbar demo, 
+1.2em to be harmonious with menu */
+   .demo-menu + .demo-container.oo-ui-panelLayout.demo-toolbars {
+   margin-top: 12.6em;
}
}
 }
@@ -436,8 +441,12 @@
display: inline-block;
}
 
-   .demo-container.oo-ui-panelLayout {
+   .demo-menu + .demo-container.oo-ui-panelLayout {
margin-top: 7.5em;
+   }
+
+   .demo-menu + .demo-container.oo-ui-panelLayout.demo-toolbars {
+   margin-top: 8.7em;
}
 
.demo-console-expanded .demo-console-toggle {
@@ -490,9 +499,13 @@
right: auto;
}
 
-   .demo-container.oo-ui-panelLayout {
+   .demo-menu + .demo-container.oo-ui-panelLayout {
margin-top: 4.5em;
}
+
+   .demo-menu + .demo-container.oo-ui-panelLayout.demo-toolbars {
+   margin-top: 5.7em;
+   }
}
 }
 /* stylelint-enable selector-pseudo-element-colon-notation */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iedf7e54842484a52a7dab54905b53f32abb23a8e
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Prtksxna 
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...ContentTranslation[master]: Make Translation::getConflictingTranslations() static

2017-09-15 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378353 )

Change subject: Make Translation::getConflictingTranslations() static
..

Make Translation::getConflictingTranslations() static

It's already being called as such (which causes notices),
and doesn't use $this.

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


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

diff --git a/includes/Translation.php b/includes/Translation.php
index 5027eaf..43da941 100644
--- a/includes/Translation.php
+++ b/includes/Translation.php
@@ -194,7 +194,7 @@
 * @param TranslationWork $work
 * @return array
 */
-   public function getConflictingTranslations( TranslationWork $work ) {
+   public static function getConflictingTranslations( TranslationWork 
$work ) {
// Use the fact that find returns all items when given array of 
titles.
$drafts = self::find(
$work->getSourceLanguage(),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id044c0447d2fd435bec2e4e726fc22e1a02f8320
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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...ContentTranslation[master]: Provide a clearer error message when JWT is not installed

2017-09-15 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378352 )

Change subject: Provide a clearer error message when JWT is not installed
..

Provide a clearer error message when JWT is not installed

The previous error message made it sound like the request should
have specified a JWT.

Change-Id: I7b6b68aedaf255a52291c1d4486a5b799bf564f7
---
M i18n/api/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/i18n/api/en.json b/i18n/api/en.json
index 9ca9768..e357de4 100644
--- a/i18n/api/en.json
+++ b/i18n/api/en.json
@@ -109,7 +109,7 @@
"apierror-cx-invalidsourcelanguage": "Invalid source language.",
"apierror-cx-invalidtargetlanguage": "Invalid target language.",
"apierror-cx-invalidtranslator": "Invalid translator name",
-   "apierror-cx-jwtmissing": "JWT missing.",
+   "apierror-cx-jwtmissing": "JWT is not installed.",
"apierror-cx-keynotconfigured": "Key not configured.",
"apierror-cx-missingdraft": "Draft does not exist.",
"apierror-cx-mustbeloggedin-suggestions": "You must be logged-in to 
manage your suggestions.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b6b68aedaf255a52291c1d4486a5b799bf564f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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] wikidata...rdf[master]: Move "all category wikis" script to more generic form

2017-09-15 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378351 )

Change subject: Move "all category wikis" script to more generic form
..

Move "all category wikis" script to more generic form

Change-Id: I4dbc0aaf5240d38bc7e2944104bb6cae23409e00
---
R dist/src/script/forAllCategoryWikis.sh
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/51/378351/1

diff --git a/dist/src/script/loadAllCategories.sh 
b/dist/src/script/forAllCategoryWikis.sh
similarity index 78%
rename from dist/src/script/loadAllCategories.sh
rename to dist/src/script/forAllCategoryWikis.sh
index 22e37d7..1f4521e 100755
--- a/dist/src/script/loadAllCategories.sh
+++ b/dist/src/script/forAllCategoryWikis.sh
@@ -1,6 +1,7 @@
 #!/bin/bash
 DUMP_LIST=${DUMP_LIST:-"https://noc.wikimedia.org/conf/categories-rdf.dblist"}
 DIR=${DIR:-`dirname $0`}
+COMMAND="$1"
 
 if [ -f $DUMP_LIST ]; then
fetch="cat"
@@ -9,6 +10,6 @@
 fi
 
 $fetch $DUMP_LIST | while read wiki; do
-   echo "Loading $wiki..."
-   $DIR/loadCategoryDump.sh $wiki
-done 
\ No newline at end of file
+   echo "Processing $wiki..."
+   $DIR/$COMMAND $wiki
+done 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4dbc0aaf5240d38bc7e2944104bb6cae23409e00
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update bundled style resources

2017-09-15 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378350 )

Change subject: Update bundled style resources
..

Update bundled style resources

Change-Id: I4fd6c5036d3c308258402b1eca890f4caf99351b
---
M app/src/main/assets/preview.css
M app/src/main/assets/styles.css
2 files changed, 22 insertions(+), 60 deletions(-)


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

diff --git a/app/src/main/assets/preview.css b/app/src/main/assets/preview.css
index 584bd99..96275cd 100644
--- a/app/src/main/assets/preview.css
+++ b/app/src/main/assets/preview.css
@@ -2,7 +2,6 @@
v2.0 | 20110126
License: none (public domain)
 */
-/* GOAL: Upstream all these variables to core */
 /* stylelint-disable selector-no-vendor-prefix, at-rule-no-unknown */
 /* stylelint-enable selector-no-vendor-prefix, at-rule-no-unknown */
 html,
@@ -93,8 +92,7 @@
 }
 table {
   border-collapse: collapse;
-}/* GOAL: Upstream all these variables to core */
-/* stylelint-disable selector-no-vendor-prefix, at-rule-no-unknown */
+}/* stylelint-disable selector-no-vendor-prefix, at-rule-no-unknown */
 /* stylelint-enable selector-no-vendor-prefix, at-rule-no-unknown */
 html {
   -webkit-text-size-adjust: none;
@@ -110,7 +108,7 @@
   line-height: 1.65;
   word-wrap: break-word;
 }
-@media all and (max-width: 280px) {
+@media all and (max-width: 320px) {
   body {
 font-size: 0.8em;
   }
@@ -240,27 +238,6 @@
   padding: 1em 25px 1em 30px;
   position: relative;
   overflow: hidden;
-}
-/**
- * This tweaks the default mediawiki.hlist module to provide performance 
optimisations
- * as well as subtle tweaks to the appearance. It's a work in progress.
- */
-.hlist > ul li,
-.hlist > dl li,
-.hlist > ul li,
-ul.hlist li {
-  display: inline-block;
-  margin-right: 8px;
-}
-.hlist-separated li:after {
-  content: '•';
-  padding-left: 8px;
-  color: #002bb8;
-  font-size: 16px;
-  line-height: 1;
-}
-.hlist-separated :last-child:after {
-  content: '';
 }
 .content {
   /* stylelint-disable no-descending-specificity */
@@ -434,8 +411,6 @@
 
 FIXME: Review all of these hacks to see if they still apply.
 */
-/* GOAL: Upstream all these variables to core */
-/* GOAL: Upstream all these variables to core */
 /* stylelint-disable selector-no-vendor-prefix, at-rule-no-unknown */
 /* stylelint-enable selector-no-vendor-prefix, at-rule-no-unknown */
 .collapsible td {
@@ -508,10 +483,16 @@
 .hatnote,
 .dablink,
 .rellink {
-  padding: 0 0 0.6em 0;
-  color: #72777d;
+  padding: 5px 7px;
+  color: #54595d;
   font-size: 0.8em;
-  font-style: italic;
+  background-color: #f8f9fa;
+  margin-bottom: 1px;
+}
+.hatnote a,
+.dablink a,
+.rellink a {
+  color: #3366cc;
 }
 .quotebox {
   margin: 0 0 0.8em !important;
diff --git a/app/src/main/assets/styles.css b/app/src/main/assets/styles.css
index 36cf902..0be3a30 100644
--- a/app/src/main/assets/styles.css
+++ b/app/src/main/assets/styles.css
@@ -2,7 +2,6 @@
v2.0 | 20110126
License: none (public domain)
 */
-/* GOAL: Upstream all these variables to core */
 /* stylelint-disable selector-no-vendor-prefix, at-rule-no-unknown */
 /* stylelint-enable selector-no-vendor-prefix, at-rule-no-unknown */
 html,
@@ -93,8 +92,7 @@
 }
 table {
   border-collapse: collapse;
-}/* GOAL: Upstream all these variables to core */
-/* stylelint-disable selector-no-vendor-prefix, at-rule-no-unknown */
+}/* stylelint-disable selector-no-vendor-prefix, at-rule-no-unknown */
 /* stylelint-enable selector-no-vendor-prefix, at-rule-no-unknown */
 html {
   -webkit-text-size-adjust: none;
@@ -110,7 +108,7 @@
   line-height: 1.65;
   word-wrap: break-word;
 }
-@media all and (max-width: 280px) {
+@media all and (max-width: 320px) {
   body {
 font-size: 0.8em;
   }
@@ -240,27 +238,6 @@
   padding: 1em 25px 1em 30px;
   position: relative;
   overflow: hidden;
-}
-/**
- * This tweaks the default mediawiki.hlist module to provide performance 
optimisations
- * as well as subtle tweaks to the appearance. It's a work in progress.
- */
-.hlist > ul li,
-.hlist > dl li,
-.hlist > ul li,
-ul.hlist li {
-  display: inline-block;
-  margin-right: 8px;
-}
-.hlist-separated li:after {
-  content: '•';
-  padding-left: 8px;
-  color: #002bb8;
-  font-size: 16px;
-  line-height: 1;
-}
-.hlist-separated :last-child:after {
-  content: '';
 }
 .content {
   /* stylelint-disable no-descending-specificity */
@@ -434,8 +411,6 @@
 
 FIXME: Review all of these hacks to see if they still apply.
 */
-/* GOAL: Upstream all these variables to core */
-/* GOAL: Upstream all these variables to core */
 /* stylelint-disable selector-no-vendor-prefix, at-rule-no-unknown */
 /* stylelint-enable selector-no-vendor-prefix, at-rule-no-unknown */
 .collapsible td {
@@ -508,10 +483,16 @@
 .hatnote,
 .dablink,
 .rellink {
-  padding: 0 0 0.6em 0;
-  color: #72777d;
+  padding: 5px 7px;
+  color: #54595d;
   

[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Simplify disabled tool opacity rules

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

Change subject: WikimediaUI theme: Simplify disabled tool opacity rules
..


WikimediaUI theme: Simplify disabled tool opacity rules

Simplifying tools by generalizing them into `.oo-ui-tool` and
`.oo-ui-toolGroup`.

Change-Id: I543c764b0c38b113dd16d971220b443fc2fd67cd
---
M src/themes/wikimediaui/tools.less
1 file changed, 9 insertions(+), 12 deletions(-)

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



diff --git a/src/themes/wikimediaui/tools.less 
b/src/themes/wikimediaui/tools.less
index a448d4c..0d0fba0 100644
--- a/src/themes/wikimediaui/tools.less
+++ b/src/themes/wikimediaui/tools.less
@@ -75,6 +75,10 @@
.oo-ui-transition( color @transition-ease-quick );
}
}
+
+   &.oo-ui-widget-disabled .oo-ui-iconElement-icon {
+   opacity: @opacity-tool--disabled;
+   }
 }
 
 .theme-oo-ui-popupTool () {
@@ -110,6 +114,11 @@
+ .oo-ui-toolGroup {
margin-left: 0;
}
+   }
+
+   &.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
+   &.oo-ui-widget-disabled .oo-ui-iconElement-icon {
+   opacity: @opacity-tool--disabled;
}
 }
 
@@ -209,12 +218,6 @@
.oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-title {
color: @color-base--disabled;
}
-
-   &.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
-   &.oo-ui-widget-disabled .oo-ui-iconElement-icon,
-   .oo-ui-tool.oo-ui-widget-disabled .oo-ui-iconElement-icon {
-   opacity: @opacity-tool--disabled;
-   }
 }
 
 .theme-oo-ui-menuToolGroup () {
@@ -254,12 +257,6 @@
&.oo-ui-widget-disabled,
.oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-title {
color: @color-base--disabled;
-   }
-
-   &.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
-   &.oo-ui-widget-disabled .oo-ui-iconElement-icon,
-   .oo-ui-tool.oo-ui-widget-disabled .oo-ui-iconElement-icon {
-   opacity: @opacity-tool--disabled;
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I543c764b0c38b113dd16d971220b443fc2fd67cd
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
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] oojs/ui[master]: WikimediaUI theme: Remove unnecessary properties

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

Change subject: WikimediaUI theme: Remove unnecessary properties
..


WikimediaUI theme: Remove unnecessary properties

Removing `transition` properties from parent element as they are only
needed on the `-handle`.

Change-Id: I15863f71079aadd6649deba680d38ee76f615e34
---
M src/themes/wikimediaui/tools.less
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/src/themes/wikimediaui/tools.less 
b/src/themes/wikimediaui/tools.less
index 0d0fba0..8f8a4c6 100644
--- a/src/themes/wikimediaui/tools.less
+++ b/src/themes/wikimediaui/tools.less
@@ -394,11 +394,6 @@
}
 
&.oo-ui-widget-enabled {
-   .oo-ui-transition(
-   background-color @transition-ease-quick,
-   box-shadow @transition-ease-quick
-   );
-
&.oo-ui-popupToolGroup-active {
box-shadow: inset 0 0.07em 0.07em 0 rgba( 0, 0, 0, 0.07 
);
background-color: @background-color-tool--hover;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15863f71079aadd6649deba680d38ee76f615e34
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
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] apps...wikipedia[master]: Update pagelib to 4.5.11

2017-09-15 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378349 )

Change subject: Update pagelib to 4.5.11
..

Update pagelib to 4.5.11

Change-Id: Ia4445887585b6ccb64ebc58a64cb3901131e24ad
---
M app/src/main/assets/bundle.js
M app/src/main/assets/preview.js
M app/src/main/assets/wikimedia-page-library.css
M www/package-lock.json
M www/package.json
5 files changed, 258 insertions(+), 260 deletions(-)


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

diff --git a/app/src/main/assets/bundle.js b/app/src/main/assets/bundle.js
index 92097b8..962d48b 100644
--- a/app/src/main/assets/bundle.js
+++ b/app/src/main/assets/bundle.js
@@ -1202,13 +1202,13 @@
 // Elements marked with these classes indicate certain ancestry constraints 
that are
 // difficult to describe as CSS selectors.
 var CONSTRAINT = {
-  IMAGE_PRESUMES_WHITE_BACKGROUND: 
'pagelib-theme-image-presumes-white-background',
-  DIV_DO_NOT_APPLY_BASELINE: 'pagelib-theme-div-do-not-apply-baseline'
+  IMAGE_PRESUMES_WHITE_BACKGROUND: 
'pagelib_theme_image_presumes_white_background',
+  DIV_DO_NOT_APPLY_BASELINE: 'pagelib_theme_div_do_not_apply_baseline'
 };
 
 // Theme to CSS classes.
 var THEME = {
-  DEFAULT: 'pagelib-theme-default', DARK: 'pagelib-theme-dark', SEPIA: 
'pagelib-theme-sepia'
+  DEFAULT: 'pagelib_theme_default', DARK: 'pagelib_theme_dark', SEPIA: 
'pagelib_theme_sepia'
 };
 
 /**
@@ -1357,9 +1357,9 @@
   var collapsed = table.style.display !== 'none';
   if (collapsed) {
 table.style.display = 'none';
-header.classList.remove('app_table_collapse_close'); // todo: use 
app_table_collapsed_collapsed
-header.classList.remove('app_table_collapse_icon'); // todo: use 
app_table_collapsed_icon
-header.classList.add('app_table_collapsed_open'); // todo: use 
app_table_collapsed_expanded
+header.classList.remove('pagelib_collapse_table_collapsed');
+header.classList.remove('pagelib_collapse_table_icon');
+header.classList.add('pagelib_collapse_table_expanded');
 if (caption) {
   caption.style.visibility = 'visible';
 }
@@ -1370,9 +1370,9 @@
 }
   } else {
 table.style.display = 'block';
-header.classList.remove('app_table_collapsed_open'); // todo: use 
app_table_collapsed_expanded
-header.classList.add('app_table_collapse_close'); // todo: use 
app_table_collapsed_collapsed
-header.classList.add('app_table_collapse_icon'); // todo: use 
app_table_collapsed_icon
+header.classList.remove('pagelib_collapse_table_expanded');
+header.classList.add('pagelib_collapse_table_collapsed');
+header.classList.add('pagelib_collapse_table_icon');
 if (caption) {
   caption.style.visibility = 'hidden';
 }
@@ -1408,8 +1408,8 @@
  */
 var newCollapsedHeaderDiv = function newCollapsedHeaderDiv(document, content) {
   var div = document.createElement('div');
-  div.classList.add('app_table_collapsed_container');
-  div.classList.add('app_table_collapsed_open');
+  div.classList.add('pagelib_collapse_table_collapsed_container');
+  div.classList.add('pagelib_collapse_table_expanded');
   div.innerHTML = content || '';
   return div;
 };
@@ -1421,8 +1421,8 @@
  */
 var newCollapsedFooterDiv = function newCollapsedFooterDiv(document, content) {
   var div = document.createElement('div');
-  div.classList.add('app_table_collapsed_bottom');
-  div.classList.add('app_table_collapse_icon'); // todo: use collapsed 
everywhere
+  div.classList.add('pagelib_collapse_table_collapsed_bottom');
+  div.classList.add('pagelib_collapse_table_icon');
   div.innerHTML = content || '';
   return div;
 };
@@ -1435,7 +1435,7 @@
 var newCaption = function newCaption(title, headerText) {
   var caption = '' + title + '';
 
-  caption += '';
+  caption += '';
   if (headerText.length > 0) {
 caption += ': ' + headerText[0];
   }
@@ -1471,7 +1471,7 @@
   var _loop = function _loop(i) {
 var table = tables[i];
 
-if (elementUtilities.findClosestAncestor(table, '.app_table_container') || 
!shouldTableBeCollapsed(table)) {
+if (elementUtilities.findClosestAncestor(table, 
'.pagelib_collapse_table_container') || !shouldTableBeCollapsed(table)) {
   return 'continue';
 }
 
@@ -1485,7 +1485,7 @@
 // create the container div that will contain both the original table
 // and the collapsed version.
 var containerDiv = window.document.createElement('div');
-containerDiv.className = 'app_table_container';
+containerDiv.className = 'pagelib_collapse_table_container';
 table.parentNode.insertBefore(containerDiv, table);
 table.parentNode.removeChild(table);
 
@@ -1547,11 +1547,11 @@
 */
 var expandCollapsedTableIfItContainsElement = function 
expandCollapsedTableIfItContainsElement(element) {
   if (element) {
-var containerSelector = '[class*="app_table_container"]';
+var containerSelector = 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Improve ListToolGroup's color and opacity...

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

Change subject: WikimediaUI theme: Improve ListToolGroup's color and opacity 
handling
..


WikimediaUI theme: Improve ListToolGroup's color and opacity handling

As ListToolGroup's tool –inverse to most other widgets– gets a
lighter shade of grey as background-color on `:hover`, we want to
make sure that it follows the inverse principle of icon opacity and
color as well (all sligthly darker) and consume base variables.

Change-Id: I45a122f0cc487b61dfda0f6838d55c9a57cd55bb
---
M src/themes/wikimediaui/common.less
M src/themes/wikimediaui/tools.less
2 files changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/src/themes/wikimediaui/common.less 
b/src/themes/wikimediaui/common.less
index c96b07f..baba4bb 100644
--- a/src/themes/wikimediaui/common.less
+++ b/src/themes/wikimediaui/common.less
@@ -35,6 +35,7 @@
 @background-color-tool--hover: @background-color-base--hover;
 @background-color-tool--active: @background-color-progressive;
 @background-color-tool--active-hover: @background-color-progressive--hover;
+@color-tool--hover: @color-base--emphasized; // Used here in combination with 
`:hover` background-color turning light grey
 @color-tool--active: @color-progressive;
 @border-toolbar: @border-width-base solid #c8ccd1;
 
diff --git a/src/themes/wikimediaui/tools.less 
b/src/themes/wikimediaui/tools.less
index 817c81d..a448d4c 100644
--- a/src/themes/wikimediaui/tools.less
+++ b/src/themes/wikimediaui/tools.less
@@ -178,9 +178,10 @@
&.oo-ui-widget-enabled {
&:hover {
background-color: @background-color-tool--hover;
+   color: @color-tool--hover;
 
.oo-ui-tool-link .oo-ui-iconElement-icon {
-   opacity: 0.9;
+   opacity: @opacity-base;
}
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45a122f0cc487b61dfda0f6838d55c9a57cd55bb
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
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] oojs/ui[master]: WikimediaUI theme: Remove unnecessarily duplicated properties

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

Change subject: WikimediaUI theme: Remove unnecessarily duplicated properties
..


WikimediaUI theme: Remove unnecessarily duplicated properties

Removing properties on `.oo-ui-toolGroupTool .oo-ui-popupToolGroup-handle`
as it is already set in `.oo-ui-popupToolGroup`.

Change-Id: I941300ae51431c0e4426acb324fe23828c2de099
---
M src/themes/wikimediaui/tools.less
1 file changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/src/themes/wikimediaui/tools.less 
b/src/themes/wikimediaui/tools.less
index 817c81d..3f1d97f 100644
--- a/src/themes/wikimediaui/tools.less
+++ b/src/themes/wikimediaui/tools.less
@@ -87,9 +87,6 @@
 
> .oo-ui-popupToolGroup {
> .oo-ui-popupToolGroup-handle {
-   height: 2.5em;
-   padding: 0.3125em;
-
.oo-ui-iconElement-icon {
height: 2.5em;
width: 1.875em;
@@ -324,8 +321,8 @@
}
 
&-handle {
-   padding: 0.3125em;
height: 2.5em;
+   padding: 0.3125em;
 
.oo-ui-indicatorElement-indicator {
top: 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I941300ae51431c0e4426acb324fe23828c2de099
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: HtmlSnippet: Throw exception if given non-string content

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

Change subject: HtmlSnippet: Throw exception if given non-string content
..


HtmlSnippet: Throw exception if given non-string content

Otherwise we will end up with a PHP fatal error somewhere later when
we try to stringify the HtmlSnippet object. An exception when
constructing it is easier to debug.

Change-Id: Id6e0d92a97b8f427e6ae886bb7930660d0e32fbc
---
M php/HtmlSnippet.php
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/php/HtmlSnippet.php b/php/HtmlSnippet.php
index 6ffe908..e6091d1 100644
--- a/php/HtmlSnippet.php
+++ b/php/HtmlSnippet.php
@@ -22,6 +22,9 @@
 * @param string $content HTML snippet
 */
public function __construct( $content ) {
+   if ( !is_string( $content ) ) {
+   throw new Exception( 'Content passed to HtmlSnippet 
must be a string' );
+   }
$this->content = $content;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id6e0d92a97b8f427e6ae886bb7930660d0e32fbc
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Lint fix: fix abuse filter container layout height

2017-09-15 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378348 )

Change subject: Lint fix: fix abuse filter container layout height
..

Lint fix: fix abuse filter container layout height

Change-Id: I55fa7f34c70ce21ef1c488e7ed2dbcfe76bc6060
---
M app/src/main/res/layout/activity_edit_section.xml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/src/main/res/layout/activity_edit_section.xml 
b/app/src/main/res/layout/activity_edit_section.xml
index e6c42c5..1a852d0 100644
--- a/app/src/main/res/layout/activity_edit_section.xml
+++ b/app/src/main/res/layout/activity_edit_section.xml
@@ -69,7 +69,7 @@
 
+android:layout_height="wrap_content">
 https://gerrit.wikimedia.org/r/378348
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] marvin[master]: Chore: upgrade Prettier to v1.7.0

2017-09-15 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378347 )

Change subject: Chore: upgrade Prettier to v1.7.0
..

Chore: upgrade Prettier to v1.7.0

Fix broken CI due to lack of package lock support by upgrading Prettier.
Some nice enhancements listed for JSX mostly:

  https://github.com/prettier/prettier/releases/tag/1.7.0

Change-Id: I172a0bdca65add27223b608138eb219fbcf3aaf9
---
M package-lock.json
M package.json
2 files changed, 13 insertions(+), 920 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/47/378347/1

diff --git a/package-lock.json b/package-lock.json
index 319c07a..4241530 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -711,7 +711,6 @@
   "requires": {
 "anymatch": "1.3.2",
 "async-each": "1.0.1",
-"fsevents": "1.1.2",
 "glob-parent": "2.0.0",
 "inherits": "2.0.3",
 "is-binary-path": "1.0.1",
@@ -2118,905 +2117,6 @@
   "resolved": 
"https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz;,
   "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
   "dev": true
-},
-"fsevents": {
-  "version": "1.1.2",
-  "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz;,
-  "integrity": 
"sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==",
-  "dev": true,
-  "optional": true,
-  "requires": {
-"nan": "2.7.0",
-"node-pre-gyp": "0.6.36"
-  },
-  "dependencies": {
-"abbrev": {
-  "version": "1.1.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"ajv": {
-  "version": "4.11.8",
-  "bundled": true,
-  "dev": true,
-  "optional": true,
-  "requires": {
-"co": "4.6.0",
-"json-stable-stringify": "1.0.1"
-  }
-},
-"ansi-regex": {
-  "version": "2.1.1",
-  "bundled": true,
-  "dev": true
-},
-"aproba": {
-  "version": "1.1.1",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"are-we-there-yet": {
-  "version": "1.1.4",
-  "bundled": true,
-  "dev": true,
-  "optional": true,
-  "requires": {
-"delegates": "1.0.0",
-"readable-stream": "2.2.9"
-  }
-},
-"asn1": {
-  "version": "0.2.3",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"assert-plus": {
-  "version": "0.2.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"asynckit": {
-  "version": "0.4.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"aws-sign2": {
-  "version": "0.6.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"aws4": {
-  "version": "1.6.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"balanced-match": {
-  "version": "0.4.2",
-  "bundled": true,
-  "dev": true
-},
-"bcrypt-pbkdf": {
-  "version": "1.0.1",
-  "bundled": true,
-  "dev": true,
-  "optional": true,
-  "requires": {
-"tweetnacl": "0.14.5"
-  }
-},
-"block-stream": {
-  "version": "0.0.9",
-  "bundled": true,
-  "dev": true,
-  "requires": {
-"inherits": "2.0.3"
-  }
-},
-"boom": {
-  "version": "2.10.1",
-  "bundled": true,
-  "dev": true,
-  "requires": {
-"hoek": "2.16.3"
-  }
-},
-"brace-expansion": {
-  "version": "1.1.7",
-  "bundled": true,
-  "dev": true,
-  "requires": {
-"balanced-match": "0.4.2",
-"concat-map": "0.0.1"
-  }
-},
-"buffer-shims": {
-  "version": "1.0.0",
-  "bundled": true,
-  "dev": true
-},
-"caseless": {
-  "version": "0.12.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"co": {
-  "version": "4.6.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"code-point-at": {
-  "version": "1.1.0",
-  "bundled": true,
-  "dev": true
-},
-"combined-stream": {
-  "version": "1.0.5",
-  "bundled": true,
-  "dev": true,
-  "requires": {
-"delayed-stream": "1.0.0"
-  }
-},
-"concat-map": {
-  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage::getCheckboxes: Stop respecting wgUseMediaWikiUIEve...

2017-09-15 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378346 )

Change subject: EditPage::getCheckboxes: Stop respecting 
wgUseMediaWikiUIEverywhere
..

EditPage::getCheckboxes: Stop respecting wgUseMediaWikiUIEverywhere

Change-Id: Ie61c523290c0eef324870f82a90fa852a57aac23
---
M includes/EditPage.php
1 file changed, 0 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/46/378346/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 12966e5..248378c 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4185,8 +4185,6 @@
 * @return array
 */
public function getCheckboxes( &$tabindex, $checked ) {
-   global $wgUseMediaWikiUIEverywhere;
-
$checkboxes = [];
$checkboxesDef = $this->getCheckboxesDefinition( $checked );
 
@@ -4220,10 +4218,6 @@
Xml::check( $name, $options['default'], 
$attribs ) .
'' .
Xml::tags( 'label', $labelAttribs, $label );
-
-   if ( $wgUseMediaWikiUIEverywhere ) {
-   $checkboxHtml = Html::rawElement( 'div', [ 
'class' => 'mw-ui-checkbox' ], $checkboxHtml );
-   }
 
$checkboxes[ $legacyName ] = $checkboxHtml;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie61c523290c0eef324870f82a90fa852a57aac23
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] wikimedia...crm[master]: Update omnimail to validate dates & silverpop package to val...

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

Change subject: Update omnimail to validate dates & silverpop package to 
validate returning xml
..


Update omnimail to validate dates & silverpop package to validate returning xml

With this change an exception is thrown, including the xml

https://github.com/mrmarkfrench/silverpop-php-connector/commit/70c374ef75ef1c7ee588ee41a9d1d797a0c42732

I thought the error was their xml but it's our xml wrt dates. Kept both checks

Bug: T175394
Change-Id: Ib469665a2d981a7fc7d1cc6dae2db55c40604937
---
M composer.lock
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
2 files changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index a2467ae..5fee106 100644
--- a/composer.lock
+++ b/composer.lock
@@ -697,7 +697,7 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/eileenmcnaughton/silverpop-php-connector;,
-"reference": "6cbb9e1760c3927f871109ed588e6056b58fd7d2"
+"reference": "70c374ef75ef1c7ee588ee41a9d1d797a0c42732"
 },
 "require": {
 "ext-curl": "*",
@@ -733,7 +733,7 @@
 "keywords": [
 "Silverpop"
 ],
-"time": "2017-07-24 07:31:30"
+"time": "2017-09-14 06:37:59"
 },
 {
 "name": "neitanod/forceutf8",
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
index 3a53948..921bb50 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
@@ -48,6 +48,9 @@
   $request->setRetrievalParameters($jobSettings['retrieval_parameters']);
 }
 elseif ($startTimestamp) {
+  if ($this->endTimeStamp < $startTimestamp) {
+throw new CiviCRM_API3_Exception(ts("End timestamp: " . date('Y-m-d 
H:i:s', $this->endTimeStamp) . " is before " . "Start timestamp: " . 
date('Y-m-d H:i:s', $startTimestamp)));
+  }
   $request->setStartTimeStamp($startTimestamp);
   $request->setEndTimeStamp($this->endTimeStamp);
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib469665a2d981a7fc7d1cc6dae2db55c40604937
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Remove unnecessary properties

2017-09-15 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378345 )

Change subject: WikimediaUI theme: Remove unnecessary properties
..

WikimediaUI theme: Remove unnecessary properties

Removing `transition` properties from parent element as they are only
needed on the `-handle`.

Change-Id: I15863f71079aadd6649deba680d38ee76f615e34
---
M src/themes/wikimediaui/tools.less
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/45/378345/1

diff --git a/src/themes/wikimediaui/tools.less 
b/src/themes/wikimediaui/tools.less
index 0d0fba0..8f8a4c6 100644
--- a/src/themes/wikimediaui/tools.less
+++ b/src/themes/wikimediaui/tools.less
@@ -394,11 +394,6 @@
}
 
&.oo-ui-widget-enabled {
-   .oo-ui-transition(
-   background-color @transition-ease-quick,
-   box-shadow @transition-ease-quick
-   );
-
&.oo-ui-popupToolGroup-active {
box-shadow: inset 0 0.07em 0.07em 0 rgba( 0, 0, 0, 0.07 
);
background-color: @background-color-tool--hover;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15863f71079aadd6649deba680d38ee76f615e34
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Cut timestamp to day only

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

Change subject: Cut timestamp to day only
..


Cut timestamp to day only

Change-Id: Ia5737414da734d7dc29d5c10cda1485fff92db41
---
M dist/src/script/loadCategoryDump.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/dist/src/script/loadCategoryDump.sh 
b/dist/src/script/loadCategoryDump.sh
index 25cb738..21fa663 100755
--- a/dist/src/script/loadCategoryDump.sh
+++ b/dist/src/script/loadCategoryDump.sh
@@ -15,7 +15,7 @@
exit 1
 fi
 
-TS=$(curl -s -XGET $SOURCE/lastdump/$WIKI-categories.last)
+TS=$(curl -s -XGET $SOURCE/lastdump/$WIKI-categories.last | cut -c1-8)
 if [ -z "$TS" ]; then
echo "Could not load timestamp"
exit 1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5737414da734d7dc29d5c10cda1485fff92db41
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
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]: Fix JS DOC for QueryExampleDialog class

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

Change subject: Fix JS DOC for QueryExampleDialog class
..


Fix JS DOC for QueryExampleDialog class

Change-Id: I18d20efb984d31c46cb2068f277ac1d080118216
---
M wikibase/queryService/ui/QueryExampleDialog.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wikibase/queryService/ui/QueryExampleDialog.js 
b/wikibase/queryService/ui/QueryExampleDialog.js
index 208aad1..b36fca5 100644
--- a/wikibase/queryService/ui/QueryExampleDialog.js
+++ b/wikibase/queryService/ui/QueryExampleDialog.js
@@ -10,7 +10,7 @@
/**
 * A ui dialog for selecting a query example
 *
-* @class wikibase.queryService.ui.App
+* @class wikibase.queryService.ui.QueryExampleDialog
 * @license GNU GPL v2+
 *
 * @author Jonas Kress

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18d20efb984d31c46cb2068f277ac1d080118216
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (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] oojs/ui[master]: WikimediaUI theme: Simplify disabled tool opacity rules

2017-09-15 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378344 )

Change subject: WikimediaUI theme: Simplify disabled tool opacity rules
..

WikimediaUI theme: Simplify disabled tool opacity rules

Simplifying tools by generalizing them into `.oo-ui-tool` and
`.oo-ui-toolGroup`.

Change-Id: I543c764b0c38b113dd16d971220b443fc2fd67cd
---
M src/themes/wikimediaui/tools.less
1 file changed, 9 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/44/378344/1

diff --git a/src/themes/wikimediaui/tools.less 
b/src/themes/wikimediaui/tools.less
index a448d4c..0d0fba0 100644
--- a/src/themes/wikimediaui/tools.less
+++ b/src/themes/wikimediaui/tools.less
@@ -75,6 +75,10 @@
.oo-ui-transition( color @transition-ease-quick );
}
}
+
+   &.oo-ui-widget-disabled .oo-ui-iconElement-icon {
+   opacity: @opacity-tool--disabled;
+   }
 }
 
 .theme-oo-ui-popupTool () {
@@ -110,6 +114,11 @@
+ .oo-ui-toolGroup {
margin-left: 0;
}
+   }
+
+   &.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
+   &.oo-ui-widget-disabled .oo-ui-iconElement-icon {
+   opacity: @opacity-tool--disabled;
}
 }
 
@@ -209,12 +218,6 @@
.oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-title {
color: @color-base--disabled;
}
-
-   &.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
-   &.oo-ui-widget-disabled .oo-ui-iconElement-icon,
-   .oo-ui-tool.oo-ui-widget-disabled .oo-ui-iconElement-icon {
-   opacity: @opacity-tool--disabled;
-   }
 }
 
 .theme-oo-ui-menuToolGroup () {
@@ -254,12 +257,6 @@
&.oo-ui-widget-disabled,
.oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-title {
color: @color-base--disabled;
-   }
-
-   &.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
-   &.oo-ui-widget-disabled .oo-ui-iconElement-icon,
-   .oo-ui-tool.oo-ui-widget-disabled .oo-ui-iconElement-icon {
-   opacity: @opacity-tool--disabled;
}
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I543c764b0c38b113dd16d971220b443fc2fd67cd
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Don't use $wgUser

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

Change subject: EditPage: Don't use $wgUser
..


EditPage: Don't use $wgUser

Bug: T144366
Change-Id: Ia8b7ae5ec73241478d51c57aca376e5bb50ef874
---
M includes/EditPage.php
1 file changed, 85 insertions(+), 94 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 9f3f586..12966e5 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -527,7 +527,7 @@
 * the newly-edited page.
 */
public function edit() {
-   global $wgRequest, $wgUser;
+   global $wgRequest;
// Allow extensions to modify/prevent this form or submission
if ( !Hooks::run( 'AlternateEdit', [ $this ] ) ) {
return;
@@ -570,9 +570,8 @@
wfDebug( __METHOD__ . ": User can't edit\n" );
// Auto-block user's IP if the account was "hard" 
blocked
if ( !wfReadOnly() ) {
-   $user = $wgUser;
-   DeferredUpdates::addCallableUpdate( function () 
use ( $user ) {
-   $user->spreadAnyEditBlock();
+   DeferredUpdates::addCallableUpdate( function () 
{
+   
$this->context->getUser()->spreadAnyEditBlock();
} );
}
$this->displayPermissionsError( $permErrors );
@@ -657,15 +656,14 @@
 * @return array
 */
protected function getEditPermissionErrors( $rigor = 'secure' ) {
-   global $wgUser;
-
-   $permErrors = $this->mTitle->getUserPermissionsErrors( 'edit', 
$wgUser, $rigor );
+   $user = $this->context->getUser();
+   $permErrors = $this->mTitle->getUserPermissionsErrors( 'edit', 
$user, $rigor );
# Can this title be created?
if ( !$this->mTitle->exists() ) {
$permErrors = array_merge(
$permErrors,
wfArrayDiff2(
-   
$this->mTitle->getUserPermissionsErrors( 'create', $wgUser, $rigor ),
+   
$this->mTitle->getUserPermissionsErrors( 'create', $user, $rigor ),
$permErrors
)
);
@@ -787,7 +785,7 @@
 * @return bool
 */
protected function previewOnOpen() {
-   global $wgRequest, $wgUser, $wgPreviewOnOpenNamespaces;
+   global $wgRequest, $wgPreviewOnOpenNamespaces;
if ( $wgRequest->getVal( 'preview' ) == 'yes' ) {
// Explicit override from request
return true;
@@ -798,7 +796,7 @@
// Nothing *to* preview for new sections
return false;
} elseif ( ( $wgRequest->getVal( 'preload' ) !== null || 
$this->mTitle->exists() )
-   && $wgUser->getOption( 'previewonfirst' )
+   && $this->context->getUser()->getOption( 
'previewonfirst' )
) {
// Standard preference behavior
return true;
@@ -851,8 +849,6 @@
 * @throws ErrorPageError
 */
public function importFormData( &$request ) {
-   global $wgUser;
-
# Section edit can come from either the form or a link
$this->section = $request->getVal( 'wpSection', 
$request->getVal( 'section' ) );
 
@@ -961,14 +957,15 @@
$this->minoredit = $request->getCheck( 'wpMinoredit' );
$this->watchthis = $request->getCheck( 'wpWatchthis' );
 
+   $user = $this->context->getUser();
# Don't force edit summaries when a user is editing 
their own user or talk page
if ( ( $this->mTitle->mNamespace == NS_USER || 
$this->mTitle->mNamespace == NS_USER_TALK )
-   && $this->mTitle->getText() == 
$wgUser->getName()
+   && $this->mTitle->getText() == $user->getName()
) {
$this->allowBlankSummary = true;
} else {
$this->allowBlankSummary = $request->getBool( 
'wpIgnoreBlankSummary' )
-   || !$wgUser->getOption( 
'forceeditsummary' );
+   || !$user->getOption( 
'forceeditsummary' );
}
 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Zuul: Add systemd script for zuul

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

Change subject: Zuul: Add systemd script for zuul
..


Zuul: Add systemd script for zuul

Bug: T167833
Bug: T167845
Change-Id: I9188c0170d777a3875b37a774ec80e7104d28312
---
M modules/zuul/manifests/server.pp
M modules/zuul/templates/initscripts/zuul-merger.systemd.erb
A modules/zuul/templates/initscripts/zuul.systemd.erb
3 files changed, 29 insertions(+), 7 deletions(-)

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



diff --git a/modules/zuul/manifests/server.pp b/modules/zuul/manifests/server.pp
index 5235c51..3595030 100644
--- a/modules/zuul/manifests/server.pp
+++ b/modules/zuul/manifests/server.pp
@@ -122,12 +122,15 @@
 'unmanaged' => undef,
 default => $service_ensure,
 }
-service { 'zuul':
-ensure => $real_ensure,
-name   => 'zuul',
-enable => $service_enable,
-hasrestart => true,
-require=> [
+
+base::service_unit { 'zuul':
+ensure => 'present',
+systemd=> systemd_template('zuul'),
+service_params => {
+ensure => $real_ensure,
+hasrestart => true,
+},
+require=> [
 File['/etc/default/zuul'],
 File['/etc/zuul/zuul-server.conf'],
 File['/etc/zuul/gearman-logging.conf'],
@@ -135,7 +138,7 @@
 }
 
 exec { 'zuul-reload':
-command => '/etc/init.d/zuul reload',
+command => '/bin/systemctl reload zuul',
 refreshonly => true,
 }
 }
diff --git a/modules/zuul/templates/initscripts/zuul-merger.systemd.erb 
b/modules/zuul/templates/initscripts/zuul-merger.systemd.erb
index 2e5b1fd..9f207f1 100644
--- a/modules/zuul/templates/initscripts/zuul-merger.systemd.erb
+++ b/modules/zuul/templates/initscripts/zuul-merger.systemd.erb
@@ -3,6 +3,7 @@
 
 [Service]
 User=zuul
+Group=zuul
 ExecStart=/usr/bin/zuul-merger -d -c /etc/zuul/zuul-merger.conf
 EnvironmentFile=/etc/default/zuul-merger
 
diff --git a/modules/zuul/templates/initscripts/zuul.systemd.erb 
b/modules/zuul/templates/initscripts/zuul.systemd.erb
new file mode 100644
index 000..d70c566
--- /dev/null
+++ b/modules/zuul/templates/initscripts/zuul.systemd.erb
@@ -0,0 +1,18 @@
+[Unit]
+Description=Zuul Server
+After=syslog.target network.target
+
+[Service]
+User=zuul
+Group=zuul
+<% if @statsd_host != "" %>
+Environment=STATSD_HOST=<%= @statsd_host %>
+Environment=STATSD_PORT=8125
+<% end %>
+ExecStart=/usr/bin/zuul-server -d -c /etc/zuul/zuul-server.conf
+ExecReload=/bin/kill -HUP $MAINPID
+ExecStop=/bin/kill -USR1 $MAINPID
+TimeoutStopSec=infinity
+
+[Install]
+WantedBy=multi-user.target

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9188c0170d777a3875b37a774ec80e7104d28312
Gerrit-PatchSet: 24
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: Paladox 
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] mediawiki...VisualEditor[master]: Enable preload in VisualEditor

2017-09-15 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378343 )

Change subject: Enable preload in VisualEditor
..

Enable preload in VisualEditor

This allows the use of the preload and preloadparams query parameters. They
should behave as they do in the old editor, loading substituted content in
visual and source modes.

Bug: T51622
Change-Id: I522fb5b480d17912f6d6116be6aa043ead855b52
---
M ApiVisualEditor.php
M VisualEditor.hooks.php
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
M modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
4 files changed, 43 insertions(+), 7 deletions(-)


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

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index f479f15..6ab6425 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -285,6 +285,28 @@
if ( $content !== '' ) {
$content = 
$this->parseWikitextFragment( $title, $content );
}
+   if ( $content === '' && 
$params['preload'] ) {
+   $preloadTitle = 
Title::newFromText( $params['preload'] );
+   # Check for existence to avoid 
getting MediaWiki:Noarticletext
+   if ( $preloadTitle instanceof 
Title && $preloadTitle->exists() && $preloadTitle->userCan( 'read' ) ) {
+
+   $preloadPage = 
WikiPage::factory( $preloadTitle );
+   if ( 
$preloadPage->isRedirect() ) {
+   $preloadTitle = 
$preloadPage->getRedirectTarget();
+   $preloadPage = 
WikiPage::factory( $preloadTitle );
+   }
+
+   $content = 
$preloadPage->getContent( Revision::RAW );
+   $parserOptions = 
ParserOptions::newFromUser( $wgUser );
+
+   $content = 
$content->preloadTransform( $preloadTitle, $parserOptions, 
$params['preloadparams'] )->serialize();
+
+   if ( $params['paction'] 
!== 'wikitext' ) {
+   // We need to 
turn this transformed wikitext into parsoid html
+   $content = 
$this->parseWikitextFragment( $title, $content );
+   }
+   }
+   }
$baseTimestamp = wfTimestampNow();
$oldid = 0;
$restoring = false;
@@ -524,7 +546,7 @@
'oldid' => $oldid,
 
];
-   if ( $params['paction'] === 'parse' || 
$params['paction'] === 'wikitext' ) {
+   if ( $params['paction'] === 'parse' || 
$params['paction'] === 'wikitext' || $params['preload'] ) {
$result['content'] = $content;
}
break;
@@ -657,6 +679,8 @@
'oldid' => null,
'editintro' => null,
'pst' => false,
+   'preload' => null,
+   'preloadparams' => null,
];
}
 
diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index af932c1..c3b1aa6 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -16,8 +16,6 @@
// TODO: Other params too?
// Known-good parameters: edit, veaction, section, oldid, lintid
private static $unsupportedEditParams = [
-   'preload',
-   'preloadparams',
'preloadtitle',
'undo',
'undoafter',
diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index 0f79fb8..41dd4b7 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -251,6 +251,8 @@
oldId: oldId,
targetName: 'article', // 
ve.init.mw.DesktopArticleTarget.static.name

[MediaWiki-commits] [Gerrit] operations...gerrit[master]: Bump core and all plugins to 2.13.9

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

Change subject: Bump core and all plugins to 2.13.9
..


Bump core and all plugins to 2.13.9

Change-Id: I76edf0e9a6b91171829050eaa07730e4565ffb1f
---
M gerrit.war
M plugins/commit-message-length-validator.jar
A plugins/its-phabricator.jar
M plugins/replication.jar
M plugins/reviewnotes.jar
5 files changed, 5 insertions(+), 4 deletions(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  Chad: Verified; Looks good to me, approved



diff --git a/gerrit.war b/gerrit.war
index af2de9c..ca023c5 100644
--- a/gerrit.war
+++ b/gerrit.war
@@ -1 +1 @@
-#$# git-fat 5d688379e7c6b219645d874de54edac833b4e37a 51262165
+#$# git-fat ffe0a60170ad298e9525df9238fc4ebde1d533a4 52560761
diff --git a/plugins/commit-message-length-validator.jar 
b/plugins/commit-message-length-validator.jar
index 9bc6e96..362a51d 100644
--- a/plugins/commit-message-length-validator.jar
+++ b/plugins/commit-message-length-validator.jar
@@ -1 +1 @@
-#$# git-fat cc93672c7896532e8e11d7538ece712397663454 4316
+#$# git-fat 26aa79661819ad2f4d6a185d12cf6ba6384a2c54 4315
diff --git a/plugins/its-phabricator.jar b/plugins/its-phabricator.jar
new file mode 100644
index 000..55f5102
--- /dev/null
+++ b/plugins/its-phabricator.jar
@@ -0,0 +1 @@
+#$# git-fat f2dfa16182f8e4468c2b80a5e0b965b738d49866  1445881
diff --git a/plugins/replication.jar b/plugins/replication.jar
index 91ca080..6deac4c 100644
--- a/plugins/replication.jar
+++ b/plugins/replication.jar
@@ -1 +1 @@
-#$# git-fat 1aba9efd991aa924b7d0c98915b771dcb24e510d   210135
+#$# git-fat 3acc66f2cf5283f5b5f79198855e4a16ac4b9394   210135
diff --git a/plugins/reviewnotes.jar b/plugins/reviewnotes.jar
index 07267b3..eb964c7 100644
--- a/plugins/reviewnotes.jar
+++ b/plugins/reviewnotes.jar
@@ -1 +1 @@
-#$# git-fat 1dcfc64ff86760c737a815ed3587515380ae049824583
+#$# git-fat 0e6f882616c654644320b510b2748434ca2daff724583

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76edf0e9a6b91171829050eaa07730e4565ffb1f
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/gerrit
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 

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


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

2017-09-15 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378342 )

Change subject: Hygiene: remove unused translations
..

Hygiene: remove unused translations

Some of these look awfully familiar.  It's time to figure out what sync
step isn't happening with TWN...

Change-Id: I32cd073604dcce26938ed836faeb1ef13b60ebed
---
M app/src/main/res/values-as/strings.xml
M app/src/main/res/values-br/strings.xml
M app/src/main/res/values-bs/strings.xml
M app/src/main/res/values-ckb/strings.xml
M app/src/main/res/values-el/strings.xml
M app/src/main/res/values-eu/strings.xml
M app/src/main/res/values-ja/strings.xml
M app/src/main/res/values-lt/strings.xml
M app/src/main/res/values-sah/strings.xml
M app/src/main/res/values-shn/strings.xml
M app/src/main/res/values-sr/strings.xml
M app/src/main/res/values-uk/strings.xml
M app/src/main/res/values-vi/strings.xml
13 files changed, 0 insertions(+), 23 deletions(-)


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

diff --git a/app/src/main/res/values-as/strings.xml 
b/app/src/main/res/values-as/strings.xml
index 0950432..0eede1f 100644
--- a/app/src/main/res/values-as/strings.xml
+++ b/app/src/main/res/values-as/strings.xml
@@ -293,8 +293,6 @@
   আন এখন পঢ়া তালিকাত যোগ 
দিয়ক
   %s পৰা 
আঁতৰাওক
   পঢ়া তালিকাৰ পৰা 
আঁতৰাওক
-  এই 
প্ৰবন্ধটো এতিয়া অফলাইন উপলব্ধ হ\'ব।
-  এই 
প্ৰবন্ধটো এতিয়া অফলাইন উপলব্ধ নহ\'ব।
   পছন্দসমূহ
   সদস্যৰ লগত কথা পাতক
   ৱিকিপিডিয়াত নতুন বাৰ্তা
diff --git a/app/src/main/res/values-br/strings.xml 
b/app/src/main/res/values-br/strings.xml
index efdd13e..961d65d 100644
--- a/app/src/main/res/values-br/strings.xml
+++ b/app/src/main/res/values-br/strings.xml
@@ -340,7 +340,6 @@
   Er roll emañ an holl 
bajennoù dibabet dija.
   %d pennad 
ouzhpennet d\'ar roll lenn.
   %1$d pennad 
ouzhpennet da %2$s
-  {[PLURAL|one=Gallout a 
reot gwelet ar pennad-mañ ezlinenn hiviziken|Gallout a reot gwelet ar 
pennadoù-mañ ezlinenn hiviziken.
   
 Ne c\'hallor ket gwelet ar pennadoù-mañ ezlinenn 
pelloc\'h
 e c\'hallor ket gwelet ar pennad-mañ ezlinenn 
pelloc\'h.
diff --git a/app/src/main/res/values-bs/strings.xml 
b/app/src/main/res/values-bs/strings.xml
index 0a28c7e..5446d5f 100644
--- a/app/src/main/res/values-bs/strings.xml
+++ b/app/src/main/res/values-bs/strings.xml
@@ -321,8 +321,6 @@
   Spiskove za čitanje od sada 
možete sačuvati na svoj račun na Wikipediji. Jednostavno se prijavite na svoj 
račun i spiskovi za čitanje automatski će se sinhronizirati.
   Ovim ćete obrisati 
prethodno sinhonizirane spiskove s daljinskog skladištenja? Da 
nastavim?
   Preuzimanje članka je u 
toku i bit će dostupan van mreže kada se završi.
-  Ovaj članak 
sad će biti dostupan van mreže.
-  Ovaj 
članak više neće biti dostupan van mreže.
   Postavke
   Razgovaraj s korisnikom
   Nova poruka na Wikipediji
diff --git a/app/src/main/res/values-ckb/strings.xml 
b/app/src/main/res/values-ckb/strings.xml
index a17d29a..fb4ce14 100644
--- a/app/src/main/res/values-ckb/strings.xml
+++ b/app/src/main/res/values-ckb/strings.xml
@@ -312,8 +312,6 @@
   پێڕستی خوێندنەوەت دەخرێنە ناو 
ھەژماری ویکیپیدیاکەتەوە گەر ڕێگە بە خەزێنەکرن بدەیت لە ڕێکخستنەکانی 
ئاپەکەوە.
   بیخە کار
   خەزێنەکردنی پێڕستی 
خوێندنەوە
-  ئەم وتارە 
ئێستا بەبێ ئینتەرنێت بەردەستە
-  ئەم 
وتارە چی تر بەردەست نابێت بەبێ ئینتەرنێت.
   ھەڵبژاردەکان
   لێدوان بۆ بەکارھێنەر
   پەیامی نوێ لە ویکیپیدیا
diff --git a/app/src/main/res/values-el/strings.xml 
b/app/src/main/res/values-el/strings.xml
index 96b0081..401c48e 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -211,7 +211,6 @@
   Το 
διάστημα!
   Κατάλαβα
   Χωρίς περιγραφή...
-  Αυτό το 
άρθρο δεν θα είναι πλέον διαθέσιμο εκτός σύνδεσης.
   Προτιμήσεις
   Λήψη
   Στις ειδήσεις
diff --git a/app/src/main/res/values-eu/strings.xml 
b/app/src/main/res/values-eu/strings.xml
index 1bccf0e..9b28067 100644
--- a/app/src/main/res/values-eu/strings.xml
+++ b/app/src/main/res/values-eu/strings.xml
@@ -266,8 +266,6 @@
   Kendu %s-tik
   Kendu 
irakurketa-zerrendetatik
   Artikulua jaisten ari 
da, bukatzean konexiorik gabe erabiltzeko prest egongo da.
-  {{PLURALA|bat=Artikulu 
hau konexiorik gabe erabiltzeko eskuragarri dago.|Artikulu hauek ez dira 
eskuragarriak izango konexiorik gabe.}}
-  {{PLURALA|bat=Artikulu hau ez 
da eskuragarri izango konexiorik gabe.|Artikulu hauek ez dira eskuragarri 
izango konexiorik gabe.}}
   Hobespenak
   Hitz egin erabiltzeari
   Mezu berria Wikipedian
diff --git a/app/src/main/res/values-ja/strings.xml 
b/app/src/main/res/values-ja/strings.xml
index 60dc992..fdd6d95 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -312,8 +312,6 @@
   別のあとで読むリストに追加
   %sから削除
   あとで読むリストから削除
-  この記事はオフラインで利用できるようになりました。
-  この記事はオフラインでは利用できなくなりました。
   設定
   ウィキペディアで新しいメッセージがあります
   em%1$s/em があなたのトークページ 

[MediaWiki-commits] [Gerrit] integration/config[master]: dib: jsduck is now in operations/puppet

2017-09-15 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378341 )

Change subject: dib: jsduck is now in operations/puppet
..

dib: jsduck is now in operations/puppet

It is now included in contint::packages::ruby since
https://gerrit.wikimedia.org/r/#/c/377746/

Bug: T175764
Change-Id: I6bf5f2190527274776a711f76b2c8089a85c9fc7
---
M dib/puppet/ciimage.pp
1 file changed, 0 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/41/378341/1

diff --git a/dib/puppet/ciimage.pp b/dib/puppet/ciimage.pp
index db1dc84..51e5c3a 100644
--- a/dib/puppet/ciimage.pp
+++ b/dib/puppet/ciimage.pp
@@ -102,16 +102,6 @@
 
 include contint::packages::ruby
 
-# Install from gem
-package { 'jsduck':
-ensure   => present,
-provider => 'gem',
-require  => [
-Class['::contint::packages::ruby'],
-Package['build-essential'],
-],
-}
-
 # Overrides
 class standard {
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bf5f2190527274776a711f76b2c8089a85c9fc7
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Don't use $wgUser

2017-09-15 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378340 )

Change subject: EditPage: Don't use $wgUser
..

EditPage: Don't use $wgUser

Change-Id: Ia8b7ae5ec73241478d51c57aca376e5bb50ef874
---
M includes/EditPage.php
1 file changed, 85 insertions(+), 94 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/378340/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 9f3f586..12966e5 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -527,7 +527,7 @@
 * the newly-edited page.
 */
public function edit() {
-   global $wgRequest, $wgUser;
+   global $wgRequest;
// Allow extensions to modify/prevent this form or submission
if ( !Hooks::run( 'AlternateEdit', [ $this ] ) ) {
return;
@@ -570,9 +570,8 @@
wfDebug( __METHOD__ . ": User can't edit\n" );
// Auto-block user's IP if the account was "hard" 
blocked
if ( !wfReadOnly() ) {
-   $user = $wgUser;
-   DeferredUpdates::addCallableUpdate( function () 
use ( $user ) {
-   $user->spreadAnyEditBlock();
+   DeferredUpdates::addCallableUpdate( function () 
{
+   
$this->context->getUser()->spreadAnyEditBlock();
} );
}
$this->displayPermissionsError( $permErrors );
@@ -657,15 +656,14 @@
 * @return array
 */
protected function getEditPermissionErrors( $rigor = 'secure' ) {
-   global $wgUser;
-
-   $permErrors = $this->mTitle->getUserPermissionsErrors( 'edit', 
$wgUser, $rigor );
+   $user = $this->context->getUser();
+   $permErrors = $this->mTitle->getUserPermissionsErrors( 'edit', 
$user, $rigor );
# Can this title be created?
if ( !$this->mTitle->exists() ) {
$permErrors = array_merge(
$permErrors,
wfArrayDiff2(
-   
$this->mTitle->getUserPermissionsErrors( 'create', $wgUser, $rigor ),
+   
$this->mTitle->getUserPermissionsErrors( 'create', $user, $rigor ),
$permErrors
)
);
@@ -787,7 +785,7 @@
 * @return bool
 */
protected function previewOnOpen() {
-   global $wgRequest, $wgUser, $wgPreviewOnOpenNamespaces;
+   global $wgRequest, $wgPreviewOnOpenNamespaces;
if ( $wgRequest->getVal( 'preview' ) == 'yes' ) {
// Explicit override from request
return true;
@@ -798,7 +796,7 @@
// Nothing *to* preview for new sections
return false;
} elseif ( ( $wgRequest->getVal( 'preload' ) !== null || 
$this->mTitle->exists() )
-   && $wgUser->getOption( 'previewonfirst' )
+   && $this->context->getUser()->getOption( 
'previewonfirst' )
) {
// Standard preference behavior
return true;
@@ -851,8 +849,6 @@
 * @throws ErrorPageError
 */
public function importFormData( &$request ) {
-   global $wgUser;
-
# Section edit can come from either the form or a link
$this->section = $request->getVal( 'wpSection', 
$request->getVal( 'section' ) );
 
@@ -961,14 +957,15 @@
$this->minoredit = $request->getCheck( 'wpMinoredit' );
$this->watchthis = $request->getCheck( 'wpWatchthis' );
 
+   $user = $this->context->getUser();
# Don't force edit summaries when a user is editing 
their own user or talk page
if ( ( $this->mTitle->mNamespace == NS_USER || 
$this->mTitle->mNamespace == NS_USER_TALK )
-   && $this->mTitle->getText() == 
$wgUser->getName()
+   && $this->mTitle->getText() == $user->getName()
) {
$this->allowBlankSummary = true;
} else {
$this->allowBlankSummary = $request->getBool( 
'wpIgnoreBlankSummary' )
-   || !$wgUser->getOption( 
'forceeditsummary' );
+   || !$user->getOption( 
'forceeditsummary' );
}
 
$this->autoSumm = 

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Cut timestamp to day only

2017-09-15 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378339 )

Change subject: Cut timestamp to day only
..

Cut timestamp to day only

Change-Id: Ia5737414da734d7dc29d5c10cda1485fff92db41
---
M dist/src/script/loadCategoryDump.sh
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/39/378339/1

diff --git a/dist/src/script/loadCategoryDump.sh 
b/dist/src/script/loadCategoryDump.sh
index 25cb738..21fa663 100755
--- a/dist/src/script/loadCategoryDump.sh
+++ b/dist/src/script/loadCategoryDump.sh
@@ -15,7 +15,7 @@
exit 1
 fi
 
-TS=$(curl -s -XGET $SOURCE/lastdump/$WIKI-categories.last)
+TS=$(curl -s -XGET $SOURCE/lastdump/$WIKI-categories.last | cut -c1-8)
 if [ -z "$TS" ]; then
echo "Could not load timestamp"
exit 1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5737414da734d7dc29d5c10cda1485fff92db41
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix: Clear deleted offline pages from the save cache

2017-09-15 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378338 )

Change subject: Fix: Clear deleted offline pages from the save cache
..

Fix: Clear deleted offline pages from the save cache

SavedPageSyncService contains code to remove offline pages from the saved
page cache when they are deleted or toggled online-only. While investigat-
ing this issue, I noticed that toggling pages online-only resulted in them
being correctly removed from the save cache, but deleting the page or en-
tire list outright did not.

The cause is this: previously, when a reading list page was deleted, its
related DB entries would be deleted, and then we would kick off the sync
service. The trouble is that the sync service needs the page's db entry in
order to construct an OkHttp Request object to give to the CacheDelegate
for removal from the cache. If the DB entry is missing (say, because it's
already been deleted), the cache removal is skipped.

My proposed solution: stop deleting entries from the DB when their listKeys
field is empty. DB entries are cheap, especially compared to full saved
articles, and their hanging around even if the page is removed from all
lists will have only a vanishingly small effect on the user's disk space.

Also updates ReadingListData.findPageInAnyList to reflect that rows may
now be present in the DB but not in any list.

Bug: T164585
Change-Id: I60bf86f12a84faccdc532c30b2508bc1b3b42398
---
M app/src/main/java/org/wikipedia/readinglist/ReadingListData.java
M 
app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
2 files changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java 
b/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java
index 8793fe6..bee536a 100644
--- a/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java
+++ b/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java
@@ -212,7 +212,10 @@
 try {
 if (cursor.getCount() != 0) {
 cursor.moveToFirst();
-return ReadingListPage.fromCursor(cursor);
+ReadingListPage page = ReadingListPage.fromCursor(cursor);
+if (!page.listKeys().isEmpty()) {
+return ReadingListPage.fromCursor(cursor);
+}
 }
 } finally {
 cursor.close();
diff --git 
a/app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
 
b/app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
index bdb67da..830a151 100644
--- 
a/app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
+++ 
b/app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
@@ -99,7 +99,6 @@
 if (row.listKeys().isEmpty()) {
 httpDao.markDeleted(new ReadingListPageHttpRow(row));
 diskDao.markDeleted(new ReadingListPageDiskRow(row));
-delete(row);
 } else {
 httpDao.markUpserted(new ReadingListPageHttpRow(row));
 if (row.diskStatus() == DiskStatus.OUTDATED) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...FileImporter[master]: [WIP] FileImporter behaviour when suppressed FILE revision d...

2017-09-15 Thread Andrew-WMDE (Code Review)
Andrew-WMDE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378323 )

Change subject: [WIP] FileImporter behaviour when suppressed FILE revision data 
needs to be imported
..

[WIP] FileImporter behaviour when suppressed FILE revision data needs to be 
imported

Bug: T173836
Change-Id: I6eb1c1bcef01b8549949ec38591ce23904955596
---
M i18n/en.json
M i18n/qqq.json
M src/Remote/MediaWiki/ApiDetailRetriever.php
3 files changed, 21 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FileImporter 
refs/changes/23/378323/1

diff --git a/i18n/en.json b/i18n/en.json
index e9857b2..86d932b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -17,6 +17,7 @@
"fileimporter-cantimporturl": "Can't import the given URL",
"fileimporter-cantimportfromsharedrepo": "Can't import a file from a 
shared repository.",
"fileimporter-cantimportmissingfile": "Can't import a missing file.",
+   "fileimporter-cantimportfilehidden": "Can't import file because at 
least one of its revisions contains a suppressed file (filehidden flag set).",
"fileimporter-badtoken": "CSRF token does not match",
"fileimporter-badimporthash": "Import hash does not match. Please 
restart the import.",
"fileimporter-filenameerror-default" : "There is an unknown issue with 
your filename.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f6919e4..e00f48a 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -19,6 +19,7 @@
"fileimporter-cantimporturl": "Error message shown on the special page 
when the URL entered can not be imported from.",
"fileimporter-cantimportfromsharedrepo": "Error message when the file 
import target comes from a shared or remote repository.",
"fileimporter-cantimportmissingfile": "Error message when the file 
import target is missing.",
+   "fileimporter-cantimportfilehidden": "Error message when the file 
contains at least one revision with a suppressed file.",
"fileimporter-badtoken": "Error message shown on the special page when 
the CSRF token for the request does not match the expected token.",
"fileimporter-badimporthash": "Error message shown on the special page 
when the import hash for the request does not match the expected hash.",
"fileimporter-filenameerror-default": "Error message shown on the 
special page when the file name to be imported to has an issue we have no 
special handling for.",
diff --git a/src/Remote/MediaWiki/ApiDetailRetriever.php 
b/src/Remote/MediaWiki/ApiDetailRetriever.php
index 9a3ca4b..963daf8 100644
--- a/src/Remote/MediaWiki/ApiDetailRetriever.php
+++ b/src/Remote/MediaWiki/ApiDetailRetriever.php
@@ -175,6 +175,18 @@
private function getFileRevisionsFromImageInfo( array $imageInfo, 
$pageTitle ) {
$revisions = [];
foreach ( $imageInfo as $revisionInfo ) {
+   if ( array_key_exists( 'filehidden', $revisionInfo ) ) {
+   throw new LocalizedImportException( 
'fileimporter-cantimportfilehidden' );
+   }
+
+   if ( array_key_exists( 'userhidden', $revisionInfo ) ) {
+   $revisionInfo['user'] = '0.0.0.0';
+   }
+
+   if ( array_key_exists( 'sha1hidden', $revisionInfo ) ) {
+   $revisionInfo['sha1'] = sha1( 
$revisionInfo['*'] );
+   }
+
/**
 * Convert from API sha1 format to DB sha1 format.
 * The conversion can be se inside ApiQueryImageInfo.
@@ -182,6 +194,13 @@
 *  - DB sha1 format is base 36 padded to 31 chars
 */
$revisionInfo['sha1'] = \Wikimedia\base_convert( 
$revisionInfo['sha1'], 16, 36, 31 );
+
+   if ( array_key_exists( 'commenthidden', $revisionInfo ) 
) {
+   $revisionInfo['comment'] = (
+   new Message( 
'fileimporter-revision-removed-comment' )
+   )->plain();
+   }
+
$revisionInfo['bits'] = $revisionInfo['size'];
$revisionInfo['name'] = $pageTitle;
$revisionInfo['description'] = $revisionInfo['comment'];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6eb1c1bcef01b8549949ec38591ce23904955596
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FileImporter
Gerrit-Branch: master
Gerrit-Owner: Andrew-WMDE 

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

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Add support for Schema:Print

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

Change subject: Add support for Schema:Print
..


Add support for Schema:Print

Bug: T169730
Change-Id: Id506d44f572687ff9c26118ceaa69c6146fedf86
---
M WikimediaEventsHooks.php
M extension.json
A modules/ext.wikimediaEvents.print.js
3 files changed, 117 insertions(+), 1 deletion(-)

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



diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index 709eb12..ff1836c 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -413,10 +413,15 @@
}
 
public static function onResourceLoaderGetConfigVars( &$vars ) {
-   global $wgWMEStatsdBaseUri, $wgWMEReadingDepthSamplingRate, 
$wgWMEReadingDepthEnabled;
+   global $wgWMEStatsdBaseUri, $wgWMEReadingDepthSamplingRate,
+   $wgWMEReadingDepthEnabled, $wgWMEPrintSamplingRate,
+   $wgWMEPrintEnabled;
+
$vars['wgWMEStatsdBaseUri'] = $wgWMEStatsdBaseUri;
$vars['wgWMEReadingDepthSamplingRate'] = 
$wgWMEReadingDepthSamplingRate;
$vars['wgWMEReadingDepthEnabled'] = $wgWMEReadingDepthEnabled;
+   $vars['wgWMEPrintSamplingRate'] = $wgWMEPrintSamplingRate;
+   $vars['wgWMEPrintEnabled'] = $wgWMEPrintEnabled;
}
 
/**
diff --git a/extension.json b/extension.json
index db369ac..ed8b003 100644
--- a/extension.json
+++ b/extension.json
@@ -94,6 +94,11 @@
"schema": "DeprecatedUsage",
"revision": 7906187
},
+   "schema.Print": {
+   "class": "ResourceLoaderSchemaModule",
+   "schema": "Print",
+   "revision": 17199246
+   },
"schema.ReadingDepth": {
"class": "ResourceLoaderSchemaModule",
"schema": "ReadingDepth",
@@ -164,6 +169,7 @@
"ext.wikimediaEvents.events.js",
"ext.wikimediaEvents.statsd.js",
"ext.wikimediaEvents.kartographer.js",
+   "ext.wikimediaEvents.print.js",
"ext.wikimediaEvents.readingDepth.js",
"ext.wikimediaEvents.geoFeatures.js",
"ext.wikimediaEvents.recentChangesClicks.js"
@@ -221,6 +227,8 @@
"remoteExtPath": "WikimediaEvents/modules"
},
"config": {
+   "WMEPrintSamplingRate": 0.1,
+   "WMEPrintEnabled": false,
"WMEReadingDepthSamplingRate": 0.005,
"WMEReadingDepthEnabled": false,
"WMEStatsdBaseUri": false,
diff --git a/modules/ext.wikimediaEvents.print.js 
b/modules/ext.wikimediaEvents.print.js
new file mode 100644
index 000..b9c1ddf
--- /dev/null
+++ b/modules/ext.wikimediaEvents.print.js
@@ -0,0 +1,103 @@
+/*
+ * Track browser print events
+ *
+ * Each action is only logged once per page view. That is, no matter how many
+ * times the user clicks on 'Printable Version', only one
+ * 'clickPrintableVersion' action is logged for that page until the page is
+ * refreshed. Ditto the `onBeforePrint` action.
+ *
+ * @see https://phabricator.wikimedia.org/T169730
+ * @see https://meta.wikimedia.org/wiki/Schema:Print
+ */
+( function ( $, track, config, user, mwExperiments ) {
+   /**
+   * Log an event to the Schema:Print
+   *
+   * @param {string} action a valid value for the action property inside 
the
+   *   schema Schema:Print
+   */
+   function logEvent( action ) {
+   track( 'event.Print', {
+   sessionToken: user.sessionId(),
+   isAnon: user.isAnon(),
+   pageTitle: config.get( 'wgPageName' ),
+   namespaceId: config.get( 'wgNamespaceNumber' ),
+   skin: config.get( 'skin' ),
+   action: action
+   } );
+   }
+
+   /**
+* Whether the user session is sampled
+*
+* @param {number} samplingRate - a float between 0 and 1 for which 
events
+*   in the schema should be logged.
+* @return {boolean}
+*/
+   function isInSample( samplingRate ) {
+   var bucket = mwExperiments.getBucket( {
+   name: 'WMEPrint',
+   enabled: true,
+   buckets: {
+   control: 1 - samplingRate,
+   A: samplingRate
+   }
+   }, user.sessionId() );
+   return bucket === 'A';
+   }
+
+   /**
+* Log the click on the 

[MediaWiki-commits] [Gerrit] mediawiki...LoginNotify[master]: Make LoginNotify email notifications on by default

2017-09-15 Thread Niharika29 (Code Review)
Niharika29 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378286 )

Change subject: Make LoginNotify email notifications on by default
..

Make LoginNotify email notifications on by default

Bug: T174263
Change-Id: Idd086904a419ac2ba65707b5c90ceae5e79c35ec
---
M extension.json
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/extension.json b/extension.json
index 84334b1..90920e8 100644
--- a/extension.json
+++ b/extension.json
@@ -15,9 +15,9 @@
},
"DefaultUserOptions": {
"echo-subscriptions-web-login-fail": true,
-   "echo-subscriptions-email-login-fail": false,
+   "echo-subscriptions-email-login-fail": true,
"echo-subscriptions-web-login-success": false,
-   "echo-subscriptions-email-login-success": false
+   "echo-subscriptions-email-login-success": true
},
"MessagesDirs": {
"LoginNotify": [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Adding placeholder emulation for hierarchy structure textarea

2017-09-15 Thread Fz-29 (Code Review)
Fz-29 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378277 )

Change subject: Adding placeholder emulation for hierarchy structure textarea
..

Adding placeholder emulation for hierarchy structure textarea

Change-Id: Ic8f39fff95fb5cd86ea4b29c405a7bb768daf243
---
M PageForms.php
M libs/PF_CreateClass.js
M specials/PF_CreateClass.php
3 files changed, 34 insertions(+), 3 deletions(-)


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

diff --git a/PageForms.php b/PageForms.php
index 9d12d22..8cef744 100644
--- a/PageForms.php
+++ b/PageForms.php
@@ -456,6 +456,9 @@
'scripts' => array(
'libs/PF_CreateClass.js',
),
+   'messages' => array(
+   'pf_createtemplate_hierarchystructureplaceholder',
+   ),
),
'ext.pageforms.PF_CreateForm' => $wgPageFormsResourceTemplate + array(
'scripts' => array(
diff --git a/libs/PF_CreateClass.js b/libs/PF_CreateClass.js
index 89fa021..9df0ca7 100644
--- a/libs/PF_CreateClass.js
+++ b/libs/PF_CreateClass.js
@@ -1,4 +1,5 @@
 var rowNum = mediaWiki.config.get( '$numStartingRows');
+var hierarchyPlaceholder = '*replace\n**placeholder\n***using\n*i18n'; 
//mediaWiki.msg( 'pf_createtemplate_hierarchystructureplaceholder' );
 function createClassAddRow() {
rowNum++;
var newRow = jQuery('#starterRow').clone().css('display', '');
@@ -42,10 +43,27 @@
if (containerElement.find( "input[name*='is_hierarchy_']" 
).prop('checked')) {
containerElement.find( "input[name*='allowed_values_']" 
).hide('medium');
containerElement.find( "textarea[name*='hierarchy_structure_']" 
).show('medium');
+   if (containerElement.find( 
"textarea[name*='hierarchy_structure_']" ).val() === "") {
+   setHierarchyPlaceholder( containerElement.find( 
"textarea[name*='hierarchy_structure_']" ) );
+   }
} else {
containerElement.find( "textarea[name*='hierarchy_structure_']" 
).hide('medium');
containerElement.find( "input[name*='allowed_values_']" 
).show('medium');
}
+}
+
+function setHierarchyPlaceholder( textareaElement ) {
+   if (textareaElement.val() === "") {
+   textareaElement.val( hierarchyPlaceholder );
+   textareaElement.css( 'color', 'gray' );
+   textareaElement.attr( 'validInput', 'false' );
+   }
+}
+
+function removeHierarchyPlaceholder( textareaElement ) {
+   textareaElement.val( '' );
+   textareaElement.css( 'color', 'black' );
+   textareaElement.attr( 'validInput', 'true' );
 }
 
 jQuery( document ).ready( function () {
@@ -61,4 +79,15 @@
jQuery( "input[name*='is_hierarchy_']" ).click( function () {
toggleHierarchyInput(jQuery( this ).closest( "tr" ));
} );
-} );
+   jQuery( "input[name*='is_hierarchy_']" ).click( function () {
+   toggleHierarchyInput(jQuery( this ).closest( "tr" ));
+   } );
+   jQuery( "textarea[name*='hierarchy_structure_']" ).blur( function () {
+   setHierarchyPlaceholder( jQuery( this ) );
+   } );
+   jQuery( "textarea[name*='hierarchy_structure_']" ).click( function () {
+   if (jQuery( this ).attr( 'validInput' ) === undefined || 
jQuery( this ).attr( 'validInput' ) !== 'true') {
+   removeHierarchyPlaceholder( jQuery( this ) );
+   }
+   } );
+} );
\ No newline at end of file
diff --git a/specials/PF_CreateClass.php b/specials/PF_CreateClass.php
index f52d308..93d9132 100644
--- a/specials/PF_CreateClass.php
+++ b/specials/PF_CreateClass.php
@@ -384,9 +384,8 @@

 END;
if ( defined( 'CARGO_VERSION' ) ) {
-   $hierarchyStructurePlaceholder = wfMessage( 
'pf_createtemplate_hierarchystructureplaceholder' )->escaped();
$text .= <<
+   
 END;
}
$text .= <

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use ::class instead of hardcoding a class name

2017-09-15 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378270 )

Change subject: Use ::class instead of hardcoding a class name
..

Use ::class instead of hardcoding a class name

Change-Id: I4f41239d8f87ee233f76defa62fafd5349721597
---
M api/ApiContentTranslationToken.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/api/ApiContentTranslationToken.php 
b/api/ApiContentTranslationToken.php
index c20f543..ea940d9 100644
--- a/api/ApiContentTranslationToken.php
+++ b/api/ApiContentTranslationToken.php
@@ -25,7 +25,7 @@
}
 
// Do not fatal out
-   if ( !class_exists( 'Firebase\JWT\JWT' ) ) {
+   if ( !class_exists( JWT::class ) ) {
$this->dieWithError( 'apierror-cx-jwtmissing', 
'token-impossible' );
}
 

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Improve ListToolGroup's color and opacity...

2017-09-15 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378269 )

Change subject: WikimediaUI theme: Improve ListToolGroup's color and opacity 
handling
..

WikimediaUI theme: Improve ListToolGroup's color and opacity handling

As ListToolGroup's tool –inverse to most other widgets– gets a
lighter shade of grey as background-color on `:hover`, we want to
make sure that it follows the inverse principle of icon opacity and
color as well (all sligthly darker) and consume base variables.

Change-Id: I45a122f0cc487b61dfda0f6838d55c9a57cd55bb
---
M src/themes/wikimediaui/common.less
M src/themes/wikimediaui/tools.less
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/69/378269/1

diff --git a/src/themes/wikimediaui/common.less 
b/src/themes/wikimediaui/common.less
index c96b07f..40d2cdb 100644
--- a/src/themes/wikimediaui/common.less
+++ b/src/themes/wikimediaui/common.less
@@ -35,6 +35,7 @@
 @background-color-tool--hover: @background-color-base--hover;
 @background-color-tool--active: @background-color-progressive;
 @background-color-tool--active-hover: @background-color-progressive--hover;
+@color-tool--hover: @color-emphasized; // Used here in combination with 
`:hover` background-color turning light grey
 @color-tool--active: @color-progressive;
 @border-toolbar: @border-width-base solid #c8ccd1;
 
diff --git a/src/themes/wikimediaui/tools.less 
b/src/themes/wikimediaui/tools.less
index 817c81d..a448d4c 100644
--- a/src/themes/wikimediaui/tools.less
+++ b/src/themes/wikimediaui/tools.less
@@ -178,9 +178,10 @@
&.oo-ui-widget-enabled {
&:hover {
background-color: @background-color-tool--hover;
+   color: @color-tool--hover;
 
.oo-ui-tool-link .oo-ui-iconElement-icon {
-   opacity: 0.9;
+   opacity: @opacity-base;
}
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45a122f0cc487b61dfda0f6838d55c9a57cd55bb
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Remove unused dependency easy-deflate.deflate

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

Change subject: Remove unused dependency easy-deflate.deflate
..


Remove unused dependency easy-deflate.deflate

Not used in this script.

Change-Id: I36b752ac7540cec240b485569ce90f2d6e5ed202
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 6668e38..d23e836 100644
--- a/extension.json
+++ b/extension.json
@@ -739,7 +739,6 @@
"translation/ext.cx.translation.loader.js"
],
"dependencies": [
-   "easy-deflate.deflate",
"ext.cx.model",
"mediawiki.api",
"mediawiki.user"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36b752ac7540cec240b485569ce90f2d6e5ed202
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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...codesniffer[master]: Add sniff for @cover instead of @covers

2017-09-15 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378268 )

Change subject: Add sniff for @cover instead of @covers
..

Add sniff for @cover instead of @covers

Change-Id: Ief227924d36a739674549df0937439f1a68af8df
---
M MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
M MediaWiki/Tests/files/Commenting/commenting_function.php
M MediaWiki/Tests/files/Commenting/commenting_function.php.expect
M MediaWiki/Tests/files/Commenting/commenting_function.php.fixed
4 files changed, 43 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer 
refs/changes/68/378268/1

diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php 
b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
index 1d3b1b3..8bd2db2 100644
--- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
+++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
@@ -167,6 +167,7 @@
$this->processReturn( $phpcsFile, $stackPtr, $commentStart );
$this->processThrows( $phpcsFile, $stackPtr, $commentStart );
$this->processParams( $phpcsFile, $stackPtr, $commentStart );
+   $this->processCovers( $phpcsFile, $stackPtr, $commentStart );
}
// end process()
 
@@ -372,6 +373,36 @@
// end processThrows()
 
/**
+* Process any covers tags that this function comment has.
+*
+* @param File $phpcsFile The file being scanned.
+* @param int $stackPtr The position of the current token in the stack 
passed in $tokens.
+* @param int $commentStart The position in the stack where the comment 
started.
+*
+* @return void
+*/
+   protected function processCovers( File $phpcsFile, $stackPtr, 
$commentStart ) {
+   $tokens = $phpcsFile->getTokens();
+   $throws = [];
+   foreach ( $tokens[$commentStart]['comment_tags'] as $tag ) {
+   $tagContent = $tokens[$tag]['content'];
+   if ( $tagContent !== '@covers' && $tagContent !== 
'@cover' ) {
+   continue;
+   }
+   if ( $tagContent === '@cover' ) {
+   $error = 'Use @covers tag in function comment 
instead of @cover';
+   $fix = $phpcsFile->addFixableError( $error, 
$tag, 'SingularCover' );
+   if ( $fix === true ) {
+   $phpcsFile->fixer->replaceToken( $tag, 
'@covers' );
+   }
+   }
+   // TODO: Asset that the item being covered is valid.
+   }
+   // end foreach
+   }
+   // end processThrows()
+
+   /**
 * Process the function parameter comments.
 *
 * @param File $phpcsFile The file being scanned.
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php 
b/MediaWiki/Tests/files/Commenting/commenting_function.php
index fd19e6b..ffa889a 100644
--- a/MediaWiki/Tests/files/Commenting/commenting_function.php
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php
@@ -97,6 +97,7 @@
 * @param int $anInt An int
 * @returns bool And some text
 * @throw \Exception
+* @cover this::testTagTypos()
 */
public function testTagTypos( $aBool, $anInt ) {
return $aBool;
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect 
b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
index 5241614..a140814 100644
--- a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
@@ -72,16 +72,19 @@
   99 | ERROR | [x] Use @throws tag in function comment instead of
  |   | @throw
  |   | (MediaWiki.Commenting.FunctionComment.SingularThrow)
- 106 | ERROR | [x] Param name should not end with punctuation ":"
- |   | (MediaWiki.Commenting.FunctionComment.NotPunctuationParam)
+ 100 | ERROR | [x] Use @covers tag in function comment instead of
+ |   | @cover
+ |   | (MediaWiki.Commenting.FunctionComment.SingularCover)
  107 | ERROR | [x] Param name should not end with punctuation ":"
  |   | (MediaWiki.Commenting.FunctionComment.NotPunctuationParam)
- 108 | ERROR | [x] Return type should not end with punctuation ":"
+ 108 | ERROR | [x] Param name should not end with punctuation ":"
+ |   | (MediaWiki.Commenting.FunctionComment.NotPunctuationParam)
+ 109 | ERROR | [x] Return type should not end with punctuation ":"
  |   | (MediaWiki.Commenting.FunctionComment.NotPunctuationReturn)
- 115 | ERROR | [x] Incorrect capitalization of @inheritDoc
+ 116 | ERROR | [x] Incorrect 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Remove EasyDeflate modules

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

Change subject: Remove EasyDeflate modules
..


Remove EasyDeflate modules

Now that we depend on VE, these are duplicates

Change-Id: If0f977f473d0dbbeb84d803014a1e41b55e1a461
---
M extension.json
D lib/Base64.js/LICENSE
D lib/Base64.js/README.md
D lib/Base64.js/base64.js
D lib/Easy-Deflate/README.md
D lib/Easy-Deflate/deflate.js
D lib/Easy-Deflate/easydeflate.js
D lib/Easy-Deflate/typedarrays.js
8 files changed, 0 insertions(+), 2,603 deletions(-)

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



diff --git a/extension.json b/extension.json
index 9c506e3..6668e38 100644
--- a/extension.json
+++ b/extension.json
@@ -168,46 +168,6 @@
"ContentTranslationVersion": "1"
},
"ResourceModules": {
-   "Base64.js": {
-   "localBasePath": "lib",
-   "remoteExtPath": "ContentTranslation/lib",
-   "scripts": [
-   "Base64.js/base64.js"
-   ],
-   "targets": [
-   "desktop",
-   "mobile"
-   ]
-   },
-   "easy-deflate.core": {
-   "localBasePath": "lib",
-   "remoteExtPath": "ContentTranslation/lib",
-   "scripts": [
-   "Easy-Deflate/easydeflate.js",
-   "Easy-Deflate/typedarrays.js"
-   ],
-   "dependencies": [
-   "Base64.js"
-   ],
-   "targets": [
-   "desktop",
-   "mobile"
-   ]
-   },
-   "easy-deflate.deflate": {
-   "localBasePath": "lib",
-   "remoteExtPath": "ContentTranslation/lib",
-   "scripts": [
-   "Easy-Deflate/deflate.js"
-   ],
-   "dependencies": [
-   "easy-deflate.core"
-   ],
-   "targets": [
-   "desktop",
-   "mobile"
-   ]
-   },
"ext.cx.contributions": {
"scripts": [
"entrypoint/ext.cx.contributions.js"
diff --git a/lib/Base64.js/LICENSE b/lib/Base64.js/LICENSE
deleted file mode 100644
index 4832767..000
--- a/lib/Base64.js/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-Version 2, December 2004
-
- Copyright (c) 2011..2012 David Chambers 
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. You just DO WHAT THE FUCK YOU WANT TO.
diff --git a/lib/Base64.js/README.md b/lib/Base64.js/README.md
deleted file mode 100644
index e5dafed..000
--- a/lib/Base64.js/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Base64.js
-
-≈ 500 byte* polyfill for browsers which don't provide [`window.btoa`][1] and
-[`window.atob`][2].
-
-Although the script does no harm in browsers which do provide these functions,
-a conditional script loader such as [yepnope][3] can prevent unnecessary HTTP
-requests.
-
-```javascript
-yepnope({
-  test: window.btoa && window.atob,
-  nope: 'base64.js',
-  callback: function () {
-// `btoa` and `atob` are now safe to use
-  }
-})
-```
-
-Base64.js stems from a [gist][4] by [yahiko][5].
-
-### Running the test suite
-
-make setup
-make test
-
-\* Minified and gzipped. Run `make bytes` to verify.
-
-
-[1]: https://developer.mozilla.org/en/DOM/window.btoa
-[2]: https://developer.mozilla.org/en/DOM/window.atob
-[3]: http://yepnopejs.com/
-[4]: https://gist.github.com/229984
-[5]: https://github.com/yahiko
diff --git a/lib/Base64.js/base64.js b/lib/Base64.js/base64.js
deleted file mode 100644
index b82dded..000
--- a/lib/Base64.js/base64.js
+++ /dev/null
@@ -1,61 +0,0 @@
-;(function () {
-
-  var object = typeof exports != 'undefined' ? exports : this; // #8: web 
workers
-  var chars = 
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
-
-  function InvalidCharacterError(message) {
-this.message = message;
-  }
-  InvalidCharacterError.prototype = new Error;
-  InvalidCharacterError.prototype.name = 'InvalidCharacterError';
-
-  // encoder
-  // [https://gist.github.com/999166] by 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use new ApiVisualEditorEdit::tryDeflate method

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

Change subject: Use new ApiVisualEditorEdit::tryDeflate method
..


Use new ApiVisualEditorEdit::tryDeflate method

Change-Id: Ib121e1a6ddbd3be876ab943486f3843c3681f6de
---
M api/ApiContentTranslationPublish.php
M api/ApiContentTranslationSave.php
2 files changed, 8 insertions(+), 29 deletions(-)

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



diff --git a/api/ApiContentTranslationPublish.php 
b/api/ApiContentTranslationPublish.php
index ec1d0b5..9c6d0d4 100644
--- a/api/ApiContentTranslationPublish.php
+++ b/api/ApiContentTranslationPublish.php
@@ -171,7 +171,10 @@
}
 
try {
-   $wikitext = 
$this->restbaseClient->convertHtmlToWikitext( $targetTitle, $this->getHtml() );
+   $wikitext = 
$this->restbaseClient->convertHtmlToWikitext(
+   $targetTitle,
+   ApiVisualEditorEdit::tryDeflate( 
$params['html'] )
+   );
} catch ( MWException $e ) {
if ( is_callable( [ $this, 'dieWithError' ] ) ) {
$this->dieWithError(
@@ -259,25 +262,6 @@

ContentTranslation\Notification::hundredthTranslation( $user );
break;
}
-   }
-
-   /**
-* Get the HTML content from request and abstract the compression it 
may have.
-* @return string The HTML content in the request. Decompressed, if it 
was compressed.
-*/
-   protected function getHtml() {
-   $params = $this->extractRequestParams();
-   $data = $params['html'];
-
-   if ( substr( $params['html'], 0, 11 ) === 'rawdeflate,' ) {
-   $data = gzinflate( base64_decode( substr( $params[ 
'html' ], 11 ) ) );
-   // gzinflate returns false on error.
-   if ( $data === false ) {
-   throw new InvalidArgumentException( 'Invalid 
HTML content.' );
-   }
-   }
-
-   return $data;
}
 
public function getAllowedParams() {
diff --git a/api/ApiContentTranslationSave.php 
b/api/ApiContentTranslationSave.php
index 6933221..9924ff2 100644
--- a/api/ApiContentTranslationSave.php
+++ b/api/ApiContentTranslationSave.php
@@ -45,7 +45,10 @@
$translation = $this->saveTranslation( $params, $translator );
$translationId = $translation->getTranslationId();
 
-   $translationUnits = $this->getTranslationUnits( 
$params['content'], $translationId );
+   $translationUnits = $this->getTranslationUnits(
+   ApiVisualEditorEdit::tryDeflate( $params['content'] ),
+   $translationId
+   );
$this->saveTranslationUnits( $translationUnits, $translation );
$validationResults = $this->validateTranslationUnits( 
$translationUnits, $translation );
 
@@ -160,14 +163,6 @@
$translationUnits = [];
if ( trim( $content ) === '' ) {
$this->dieWithError( [ 'apierror-paramempty', 'content' 
], 'invalidcontent' );
-   }
-
-   if ( substr( $content, 0, 11 ) === 'rawdeflate,' ) {
-   $content = gzinflate( base64_decode( substr( $content, 
11 ) ) );
-   // gzinflate returns false on error.
-   if ( $content === false ) {
-   $this->dieWithError( 
'apierror-cx-invalidsectioncontent', 'invalidcontent' );
-   }
}
 
$units = json_decode( $content, true );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib121e1a6ddbd3be876ab943486f3843c3681f6de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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]: Fix a few minor mistakes in PHPDoc tags

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

Change subject: Fix a few minor mistakes in PHPDoc tags
..


Fix a few minor mistakes in PHPDoc tags

Change-Id: I2d5f876c9945ba21f8748562230170e3c7ea2ff2
---
M includes/XmlJsCode.php
M includes/rcfeed/RedisPubSubFeedEngine.php
M includes/search/SearchNearMatcher.php
M tests/phpunit/includes/libs/CSSMinTest.php
4 files changed, 5 insertions(+), 6 deletions(-)

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



diff --git a/includes/XmlJsCode.php b/includes/XmlJsCode.php
index 35a0607..1b90a1f 100644
--- a/includes/XmlJsCode.php
+++ b/includes/XmlJsCode.php
@@ -26,7 +26,7 @@
  * @par Example:
  * @code
  * Xml::encodeJsVar( new XmlJsCode( 'a + b' ) );
- * @encode
+ * @endcode
  *
  * This returns "a + b".
  *
diff --git a/includes/rcfeed/RedisPubSubFeedEngine.php 
b/includes/rcfeed/RedisPubSubFeedEngine.php
index f0fcd7d..5960989 100644
--- a/includes/rcfeed/RedisPubSubFeedEngine.php
+++ b/includes/rcfeed/RedisPubSubFeedEngine.php
@@ -33,7 +33,7 @@
  *  'formatter' => 'JSONRCFeedFormatter',
  *  'uri'   => "redis://127.0.0.1:6379/rc.$wgDBname",
  * );
- * @encode
+ * @endcode
  *
  * @since 1.22
  */
diff --git a/includes/search/SearchNearMatcher.php 
b/includes/search/SearchNearMatcher.php
index 8e86865..27046f3 100644
--- a/includes/search/SearchNearMatcher.php
+++ b/includes/search/SearchNearMatcher.php
@@ -6,8 +6,7 @@
  */
 class SearchNearMatcher {
/**
-* Configuration object.
-* @param Config $config
+* @var Config
 */
protected $config;
 
diff --git a/tests/phpunit/includes/libs/CSSMinTest.php 
b/tests/phpunit/includes/libs/CSSMinTest.php
index d0121b1..0127c26 100644
--- a/tests/phpunit/includes/libs/CSSMinTest.php
+++ b/tests/phpunit/includes/libs/CSSMinTest.php
@@ -163,7 +163,7 @@
 
/**
 * @dataProvider provideIsRemoteUrl
-* @cover CSSMin::isRemoteUrl
+* @covers CSSMin::isRemoteUrl
 */
public function testIsRemoteUrl( $expect, $url ) {
$this->assertEquals( CSSMinTestable::isRemoteUrl( $url ), 
$expect );
@@ -180,7 +180,7 @@
 
/**
 * @dataProvider provideIsLocalUrls
-* @cover CSSMin::isLocalUrl
+* @covers CSSMin::isLocalUrl
 */
public function testIsLocalUrl( $expect, $url ) {
$this->assertEquals( CSSMinTestable::isLocalUrl( $url ), 
$expect );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d5f876c9945ba21f8748562230170e3c7ea2ff2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: Legoktm 
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] apps...wikipedia[master]: [COUNTERPOINT] Fix screenshot tests.

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

Change subject: [COUNTERPOINT] Fix screenshot tests.
..


[COUNTERPOINT] Fix screenshot tests.

Will this work?

Change-Id: If4fffd3956ee02a21d30a331e0a96b4bda700b52
---
M app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java 
b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
index 521cdd0..1d384e8 100644
--- a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
@@ -10,7 +10,6 @@
 import android.support.annotation.Nullable;
 import android.support.annotation.StringRes;
 import android.support.v4.text.TextUtilsCompat;
-import android.view.ContextThemeWrapper;
 import android.view.View;
 import android.widget.TextView;
 
@@ -22,6 +21,7 @@
 import org.junit.experimental.theories.DataPoints;
 import org.junit.experimental.theories.Theories;
 import org.junit.runner.RunWith;
+import org.wikipedia.R;
 import org.wikipedia.theme.Theme;
 import org.wikipedia.util.ResourceUtil;
 
@@ -93,7 +93,9 @@
 this.layoutDirection = layoutDirection;
 this.fontScale = fontScale;
 this.theme = theme;
-ctx = new ContextThemeWrapper(getTargetContext(), 
theme.getResourceId());
+ctx = getTargetContext();
+ctx.setTheme(R.style.AppTheme);
+ctx.setTheme(theme.getResourceId());
 config();
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: I6524eb89aba10e8eae377a0e262f17721eb654c0
---
M includes/MobileContext.php
M includes/MobileFrontend.hooks.php
M includes/api/ApiMobileView.php
M includes/api/ApiParseExtender.php
M includes/content-providers/DefaultContentProvider.php
M includes/content-providers/McsContentProvider.php
M includes/content-providers/MwApiContentProvider.php
M includes/devices/AMFDeviceDetector.php
M includes/devices/CustomHeaderDeviceDetector.php
M includes/devices/DeviceDetectorService.php
M includes/devices/UADeviceDetector.php
M includes/models/MobileCollection.php
M includes/models/MobilePage.php
M includes/modules/MFResourceLoaderParsedMessageModule.php
M includes/specials/SpecialMobileContributions.php
M phpcs.xml
16 files changed, 59 insertions(+), 63 deletions(-)

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



diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index 263291e..a4078df 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -177,7 +177,7 @@
 * $context->getConfigVariable( 'Corge' ); // => null
 * ```
 *
-* @param $variableName
+* @param string $variableName
 * @return mixed|null
 * @throws ConfigException If the config variable doesn't exist
 *
@@ -736,7 +736,7 @@
 *
 * Eg if a desktop domain is en.wikipedia.org, but the mobile variant is
 * en.m.wikipedia.org, the mobile token is 'm.'
-* @param $mobileUrlHostTemplate string
+* @param string $mobileUrlHostTemplate
 * @return string
 */
public function getMobileHostToken( $mobileUrlHostTemplate ) {
@@ -746,6 +746,7 @@
/**
 * Get the template for mobile URLs.
 * @see $wgMobileUrlTemplate
+* @return string
 */
public function getMobileUrlTemplate() {
if ( !$this->mobileUrlTemplate ) {
@@ -829,7 +830,7 @@
 
/**
 * Update host of given URL to conform to mobile URL template.
-* @param array $parsedUrl
+* @param array &$parsedUrl
 *  Result of parseUrl() or wfParseUrl()
 */
protected function updateMobileUrlHost( &$parsedUrl ) {
@@ -866,7 +867,7 @@
 
/**
 * Update the host of a given URL to strip out any mobile tokens
-* @param array $parsedUrl
+* @param array &$parsedUrl
 *  Result of parseUrl() or wfParseUrl()
 */
protected function updateDesktopUrlHost( &$parsedUrl ) {
@@ -883,7 +884,7 @@
 
/**
 * Update the query portion of a given URL to remove any 'useformat' 
params
-* @param array $parsedUrl
+* @param array &$parsedUrl
 *  Result of parseUrl() or wfParseUrl()
 */
protected function updateDesktopUrlQuery( &$parsedUrl ) {
@@ -902,7 +903,7 @@
 * this is intended to provide. This will hopefully be implemented 
someday
 * in the not to distant future.
 *
-* @param array $parsedUrl
+* @param array &$parsedUrl
 *  Result of parseUrl() or wfParseUrl()
 */
protected function updateMobileUrlPath( &$parsedUrl ) {
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 4b8e6d9..747dacb 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -67,7 +67,7 @@
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/RequestContextCreateSkin
 *
 * @param IContextSource $context
-* @param Skin|null|string $skin
+* @param Skin|null|string &$skin
 * @return bool
 */
public static function onRequestContextCreateSkin( $context, &$skin ) {
@@ -156,8 +156,8 @@
 *
 * Adds a link to view the current page in 'mobile view' to the desktop 
footer.
 *
-* @param SkinTemplate $skin
-* @param QuickTemplate $tpl
+* @param SkinTemplate &$skin
+* @param QuickTemplate &$tpl
 * @return bool
 */
public static function onSkinTemplateOutputPageBeforeExec( &$skin, 
&$tpl ) {
@@ -186,8 +186,8 @@
 * Also enables Related Articles in the footer in the beta mode.
 * Adds inline script to allow opening of sections while JS is still 
loading
 *
-* @param OutputPage $out
-* @param string $text the HTML to be wrapped inside the 
#mw-content-text element
+* @param OutputPage &$out
+* @param string &$text the HTML to be wrapped inside the 
#mw-content-text element
 * @return bool
 */
public static function onOutputPageBeforeHTML( &$out, 

[MediaWiki-commits] [Gerrit] marvin[master]: New: add page summaries fetcher and UI

2017-09-15 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378267 )

Change subject: New: add page summaries fetcher and UI
..

New: add page summaries fetcher and UI

Bug: T173323
Change-Id: I7456e654e24db34343bd8e108bc990be8fff31fe
---
M docs/development.md
M package-lock.json
M package.json
M src/client/tsconfig.json
M src/common/components/app/app.tsx
M src/common/components/link.tsx
A src/common/components/page-summary/page-summary.css
A src/common/components/page-summary/page-summary.tsx
M src/common/components/paper/paper.tsx
A src/common/data-clients/page-data-client.ts
M src/common/models/page.ts
M src/common/pages/wiki.tsx
M src/common/routers/api.ts
M src/common/routers/route.ts
M src/common/routers/router.ts
A src/common/types/isomorphic-unfetch.d.ts
M src/common/types/preact.d.ts
M src/server/components/page.tsx
M src/server/index.tsx
M src/server/tsconfig.json
M tsconfig.json
M webpack.config.ts
22 files changed, 227 insertions(+), 967 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/67/378267/1

diff --git a/docs/development.md b/docs/development.md
index 4d2..bf1b6f3 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -124,8 +124,13 @@
 - Static constants should be written in `SHOUTING_SNAKE_CASE`. All other
   variables should be written in `camelCase`.
 - Preact components should be written in PascalCase.
-- Preact component properties variables and types, especially
-  `ComponentProps` implementations, should be called "props" and "Props".
+
+ Abbreviations
+
+Marvin uses the following abbreviations:
+
+- Properties => props
+- Parameters => params
 
 ### Filenaming
 
diff --git a/package-lock.json b/package-lock.json
index 319c07a..4b41755 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -711,7 +711,6 @@
   "requires": {
 "anymatch": "1.3.2",
 "async-each": "1.0.1",
-"fsevents": "1.1.2",
 "glob-parent": "2.0.0",
 "inherits": "2.0.3",
 "is-binary-path": "1.0.1",
@@ -1445,6 +1444,14 @@
   "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz;,
   "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA="
 },
+"encoding": {
+  "version": "0.1.12",
+  "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz;,
+  "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
+  "requires": {
+"iconv-lite": "0.4.18"
+  }
+},
 "end-of-stream": {
   "version": "1.4.0",
   "resolved": 
"https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz;,
@@ -2119,905 +2126,6 @@
   "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
   "dev": true
 },
-"fsevents": {
-  "version": "1.1.2",
-  "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz;,
-  "integrity": 
"sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==",
-  "dev": true,
-  "optional": true,
-  "requires": {
-"nan": "2.7.0",
-"node-pre-gyp": "0.6.36"
-  },
-  "dependencies": {
-"abbrev": {
-  "version": "1.1.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"ajv": {
-  "version": "4.11.8",
-  "bundled": true,
-  "dev": true,
-  "optional": true,
-  "requires": {
-"co": "4.6.0",
-"json-stable-stringify": "1.0.1"
-  }
-},
-"ansi-regex": {
-  "version": "2.1.1",
-  "bundled": true,
-  "dev": true
-},
-"aproba": {
-  "version": "1.1.1",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"are-we-there-yet": {
-  "version": "1.1.4",
-  "bundled": true,
-  "dev": true,
-  "optional": true,
-  "requires": {
-"delegates": "1.0.0",
-"readable-stream": "2.2.9"
-  }
-},
-"asn1": {
-  "version": "0.2.3",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"assert-plus": {
-  "version": "0.2.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"asynckit": {
-  "version": "0.4.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"aws-sign2": {
-  "version": "0.6.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"aws4": {
-  "version": "1.6.0",
-  "bundled": true,
-  "dev": true,
-  "optional": true
-},
-"balanced-match": {
-  "version": "0.4.2",
-  "bundled": true,
-  "dev": true
-},
-"bcrypt-pbkdf": {

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: [COUNTERPOINT] Fix screenshot tests.

2017-09-15 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378266 )

Change subject: [COUNTERPOINT] Fix screenshot tests.
..

[COUNTERPOINT] Fix screenshot tests.

Will this work?

Change-Id: If4fffd3956ee02a21d30a331e0a96b4bda700b52
---
M app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java 
b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
index 521cdd0..1d384e8 100644
--- a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
@@ -10,7 +10,6 @@
 import android.support.annotation.Nullable;
 import android.support.annotation.StringRes;
 import android.support.v4.text.TextUtilsCompat;
-import android.view.ContextThemeWrapper;
 import android.view.View;
 import android.widget.TextView;
 
@@ -22,6 +21,7 @@
 import org.junit.experimental.theories.DataPoints;
 import org.junit.experimental.theories.Theories;
 import org.junit.runner.RunWith;
+import org.wikipedia.R;
 import org.wikipedia.theme.Theme;
 import org.wikipedia.util.ResourceUtil;
 
@@ -93,7 +93,9 @@
 this.layoutDirection = layoutDirection;
 this.fontScale = fontScale;
 this.theme = theme;
-ctx = new ContextThemeWrapper(getTargetContext(), 
theme.getResourceId());
+ctx = getTargetContext();
+ctx.setTheme(R.style.AppTheme);
+ctx.setTheme(theme.getResourceId());
 config();
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable structured change filters by default on all wikis

2017-09-15 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378265 )

Change subject: Enable structured change filters by default on all wikis
..

Enable structured change filters by default on all wikis

Bug: T157642
Change-Id: I5505fb77b889c7bafbbaaf7b53defae68b128e2a
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c7e10fc..90edfa9 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18988,10 +18988,7 @@
'default' => true,
 ],
 'wgStructuredChangeFiltersShowPreference' => [
-   'default' => false,
-   'cawiki' => true,
-   'frwiki' => true,
-   'hewiki' => true,
+   'default' => true,
 ],
 
 ### End (roughly) of general extensions 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable structured change filters by default on cawiki, frwik...

2017-09-15 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378264 )

Change subject: Enable structured change filters by default on cawiki, frwiki 
and hewiki
..

Enable structured change filters by default on cawiki, frwiki and hewiki

Bug: T157642
Change-Id: I317b3efe3846d9df7376323b93f896848da7926a
---
M wmf-config/InitialiseSettings.php
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a91b440..c7e10fc 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18987,6 +18987,12 @@
 'wgStructuredChangeFiltersOnWatchlist' => [
'default' => true,
 ],
+'wgStructuredChangeFiltersShowPreference' => [
+   'default' => false,
+   'cawiki' => true,
+   'frwiki' => true,
+   'hewiki' => true,
+],
 
 ### End (roughly) of general extensions 
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable $wgStructuredChangeFiltersOnWatchlist on all wikis

2017-09-15 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378263 )

Change subject: Enable $wgStructuredChangeFiltersOnWatchlist on all wikis
..

Enable $wgStructuredChangeFiltersOnWatchlist on all wikis

Bug: T164234
Change-Id: I5224476faa4563ba295d7f981fcab525e01a927b
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f96d715..a91b440 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18985,7 +18985,7 @@
'default' => true,
 ],
 'wgStructuredChangeFiltersOnWatchlist' => [
-   'default' => false,
+   'default' => true,
 ],
 
 ### End (roughly) of general extensions 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admins: remove zhousquared's SSH key

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

Change subject: admins: remove zhousquared's SSH key
..


admins: remove zhousquared's SSH key

On T175959 it has been stated they lost their laptop recently
and had to create a new key.

This means the old key should be revoked ASAP.

Change-Id: If2a47fd460249a110091c914e7d16e68575a6e45
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index e94a3aa..f83416a 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1977,7 +1977,7 @@
 gid: 500
 name: zhousquared
 realname: Zhou Zhou
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCZXHi14Nxr38Pck4Gqg13rUX3S3mbPo38eEdYrwS7WAMFEKMavkPnuv6qUeicN4IkC6e2AbTt+UFaxfXU3TBqa9SQfrqw/xb431T8wmjnwCSGBw+uCO2U6BHAG4ky3irMnqh+FxZ+Y6QUNwAB++QofLql3h4FEt9vEhpH8bKqQBA4gDOV6xUR4Uwu20uN7yEDDzQCpdJB+ZZsfg7gWnFkDQksgtbuDTdOWUT4MkBss5hiRrMpGN91Y/KPLkNeuAjYDSUnjpNt6AkfV1KtpFaqKH5DmvkJHbfq3FerS3Gp+HNXaB3AAMm2+MxPANgC2efhidvwG3ae/tb5ND4hzFfYT
 zz...@wikimedia.org]
+ssh_keys: []
 uid: 12576
 email: zz...@wikimedia.org
   dfoy:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2a47fd460249a110091c914e7d16e68575a6e45
Gerrit-PatchSet: 1
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] operations/puppet[production]: admins: remove zhousquared's SSH key

2017-09-15 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378262 )

Change subject: admins: remove zhousquared's SSH key
..

admins: remove zhousquared's SSH key

On T175959 it has been stated they lost their laptop recently
and had to create a new key.

This means the old key should be revoked ASAP.

Change-Id: If2a47fd460249a110091c914e7d16e68575a6e45
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index e94a3aa..f83416a 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1977,7 +1977,7 @@
 gid: 500
 name: zhousquared
 realname: Zhou Zhou
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCZXHi14Nxr38Pck4Gqg13rUX3S3mbPo38eEdYrwS7WAMFEKMavkPnuv6qUeicN4IkC6e2AbTt+UFaxfXU3TBqa9SQfrqw/xb431T8wmjnwCSGBw+uCO2U6BHAG4ky3irMnqh+FxZ+Y6QUNwAB++QofLql3h4FEt9vEhpH8bKqQBA4gDOV6xUR4Uwu20uN7yEDDzQCpdJB+ZZsfg7gWnFkDQksgtbuDTdOWUT4MkBss5hiRrMpGN91Y/KPLkNeuAjYDSUnjpNt6AkfV1KtpFaqKH5DmvkJHbfq3FerS3Gp+HNXaB3AAMm2+MxPANgC2efhidvwG3ae/tb5ND4hzFfYT
 zz...@wikimedia.org]
+ssh_keys: []
 uid: 12576
 email: zz...@wikimedia.org
   dfoy:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2a47fd460249a110091c914e7d16e68575a6e45
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...mobileapps[master]: Hygiene: move generate_wiktionary_languages.py to script folder

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

Change subject: Hygiene: move generate_wiktionary_languages.py to script folder
..


Hygiene: move generate_wiktionary_languages.py to script folder

Not sure how this one ended up in the static folder.

Change-Id: Ic5367ac131bbf4d7a0b6e99e363659038b5f7eb7
---
R scripts/generate_wiktionary_languages.py
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/static/generate_wiktionary_languages.py 
b/scripts/generate_wiktionary_languages.py
similarity index 100%
rename from static/generate_wiktionary_languages.py
rename to scripts/generate_wiktionary_languages.py

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5367ac131bbf4d7a0b6e99e363659038b5f7eb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Inspectors for editing LanguageConverter markup

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

Change subject: Inspectors for editing LanguageConverter markup
..


Inspectors for editing LanguageConverter markup

Basic inspectors for editing.  Changing from block to inline, or
adding "hidden" or "describe" flags not supported.

The UI layout for two-way and one-way rules could certainly be improved.

Bug: T49411
Change-Id: I5ce29e4bf47abf509afde0a57f64b5d1189f5185
---
M extension.json
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/ui/contextitems/ve.ui.MWLanguageVariantNodeContextItem.js
A modules/ve-mw/ui/inspectors/ve.ui.MWLanguageVariantInspector.js
5 files changed, 938 insertions(+), 3 deletions(-)

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



diff --git a/extension.json b/extension.json
index f986095..92aa105 100644
--- a/extension.json
+++ b/extension.json
@@ -1973,7 +1973,8 @@
"scripts": [

"modules/ve-mw/dm/nodes/ve.dm.MWLanguageVariantNode.js",

"modules/ve-mw/ce/nodes/ve.ce.MWLanguageVariantNode.js",
-   
"modules/ve-mw/ui/contextitems/ve.ui.MWLanguageVariantNodeContextItem.js"
+   
"modules/ve-mw/ui/contextitems/ve.ui.MWLanguageVariantNodeContextItem.js",
+   
"modules/ve-mw/ui/inspectors/ve.ui.MWLanguageVariantInspector.js"
],
"styles": [

"modules/ve-mw/ui/styles/contextitems/ve.ui.MWLanguageVariantNodeContextItem.css",
@@ -2004,7 +2005,24 @@

"visualeditor-mwlanguagevariantcontextitem-title-name",

"visualeditor-mwlanguagevariantcontextitem-title-oneway",

"visualeditor-mwlanguagevariantcontextitem-title-twoway",
-   
"visualeditor-mwlanguagevariantcontextitem-title-unknown"
+   
"visualeditor-mwlanguagevariantcontextitem-title-unknown",
+   
"visualeditor-mwlanguagevariantinspector-disabled-placeholder",
+   
"visualeditor-mwlanguagevariantinspector-filter-langs-label",
+   
"visualeditor-mwlanguagevariantinspector-filter-langs-placeholder",
+   
"visualeditor-mwlanguagevariantinspector-filter-text-label",
+   
"visualeditor-mwlanguagevariantinspector-filter-text-placeholder",
+   
"visualeditor-mwlanguagevariantinspector-oneway-add-button",
+   
"visualeditor-mwlanguagevariantinspector-oneway-clear-button",
+   
"visualeditor-mwlanguagevariantinspector-oneway-from-text-placeholder",
+   
"visualeditor-mwlanguagevariantinspector-oneway-to-text-placeholder",
+   
"visualeditor-mwlanguagevariantinspector-title-disabled",
+   
"visualeditor-mwlanguagevariantinspector-title-filter",
+   
"visualeditor-mwlanguagevariantinspector-title-name",
+   
"visualeditor-mwlanguagevariantinspector-title-oneway",
+   
"visualeditor-mwlanguagevariantinspector-title-twoway",
+   
"visualeditor-mwlanguagevariantinspector-twoway-add-button",
+   
"visualeditor-mwlanguagevariantinspector-twoway-clear-button",
+   
"visualeditor-mwlanguagevariantinspector-twoway-text-placeholder"
],
"targets": [
"desktop",
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index fb9af38..77362bc 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -343,6 +343,23 @@
"visualeditor-mwlanguagevariantcontextitem-title-oneway": "One-way 
conversion rule",
"visualeditor-mwlanguagevariantcontextitem-title-twoway": "Language 
conversion rule",
"visualeditor-mwlanguagevariantcontextitem-title-unknown": "Language 
variant",
+   "visualeditor-mwlanguagevariantinspector-disabled-placeholder": "Text 
protected from variant conversion",
+   "visualeditor-mwlanguagevariantinspector-filter-langs-label": 
"Languages",
+   "visualeditor-mwlanguagevariantinspector-filter-langs-placeholder": 
"Language code",
+   "visualeditor-mwlanguagevariantinspector-filter-text-label": "Contents",
+   "visualeditor-mwlanguagevariantinspector-filter-text-placeholder": 
"Filtered text",
+   "visualeditor-mwlanguagevariantinspector-oneway-add-button": "Add new 
case",
+   

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Remove unused polyfills from EasyDeflate lib

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

Change subject: Remove unused polyfills from EasyDeflate lib
..


Remove unused polyfills from EasyDeflate lib

Base64 and TypedArrays polyfills were required to
support IE9, but VE now requires IE10.

* http://www.caniuse.com/#feat=atob-btoa
* http://www.caniuse.com/#feat=typedarrays

Change-Id: I311a16f98fb1d091f55dda52d97bebfc012e2a14
---
M extension.json
D lib/Base64.js/LICENSE
D lib/Base64.js/README.md
D lib/Base64.js/base64.js
D lib/Easy-Deflate/typedarrays.js
5 files changed, 1 insertion(+), 234 deletions(-)

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



diff --git a/extension.json b/extension.json
index f986095..42529c1 100644
--- a/extension.json
+++ b/extension.json
@@ -186,22 +186,9 @@
]
},
"ResourceModules": {
-   "Base64.js": {
-   "scripts": [
-   "lib/Base64.js/base64.js"
-   ],
-   "targets": [
-   "desktop",
-   "mobile"
-   ]
-   },
"easy-deflate.core": {
"scripts": [
-   "lib/Easy-Deflate/easydeflate.js",
-   "lib/Easy-Deflate/typedarrays.js"
-   ],
-   "dependencies": [
-   "Base64.js"
+   "lib/Easy-Deflate/easydeflate.js"
],
"targets": [
"desktop",
diff --git a/lib/Base64.js/LICENSE b/lib/Base64.js/LICENSE
deleted file mode 100644
index 4832767..000
--- a/lib/Base64.js/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-Version 2, December 2004
-
- Copyright (c) 2011..2012 David Chambers 
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. You just DO WHAT THE FUCK YOU WANT TO.
diff --git a/lib/Base64.js/README.md b/lib/Base64.js/README.md
deleted file mode 100644
index e5dafed..000
--- a/lib/Base64.js/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Base64.js
-
-≈ 500 byte* polyfill for browsers which don't provide [`window.btoa`][1] and
-[`window.atob`][2].
-
-Although the script does no harm in browsers which do provide these functions,
-a conditional script loader such as [yepnope][3] can prevent unnecessary HTTP
-requests.
-
-```javascript
-yepnope({
-  test: window.btoa && window.atob,
-  nope: 'base64.js',
-  callback: function () {
-// `btoa` and `atob` are now safe to use
-  }
-})
-```
-
-Base64.js stems from a [gist][4] by [yahiko][5].
-
-### Running the test suite
-
-make setup
-make test
-
-\* Minified and gzipped. Run `make bytes` to verify.
-
-
-[1]: https://developer.mozilla.org/en/DOM/window.btoa
-[2]: https://developer.mozilla.org/en/DOM/window.atob
-[3]: http://yepnopejs.com/
-[4]: https://gist.github.com/229984
-[5]: https://github.com/yahiko
diff --git a/lib/Base64.js/base64.js b/lib/Base64.js/base64.js
deleted file mode 100644
index b82dded..000
--- a/lib/Base64.js/base64.js
+++ /dev/null
@@ -1,61 +0,0 @@
-;(function () {
-
-  var object = typeof exports != 'undefined' ? exports : this; // #8: web 
workers
-  var chars = 
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
-
-  function InvalidCharacterError(message) {
-this.message = message;
-  }
-  InvalidCharacterError.prototype = new Error;
-  InvalidCharacterError.prototype.name = 'InvalidCharacterError';
-
-  // encoder
-  // [https://gist.github.com/999166] by [https://github.com/nignag]
-  object.btoa || (
-  object.btoa = function (input) {
-var str = String(input);
-for (
-  // initialize result and counter
-  var block, charCode, idx = 0, map = chars, output = '';
-  // if the next str index does not exist:
-  //   change the mapping table to "="
-  //   check if d has no fractional digits
-  str.charAt(idx | 0) || (map = '=', idx % 1);
-  // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
-  output += map.charAt(63 & block >> 8 - idx % 1 * 8)
-) {
-  charCode = str.charCodeAt(idx += 3/4);
-  if (charCode > 0xFF) {
-throw new InvalidCharacterError("'btoa' failed: The string to be 
encoded contains characters outside of the Latin1 range.");
-  }
-  block = block << 8 | charCode;
-}
-return output;
-  });
-
-  // decoder
-  // [https://gist.github.com/1020396] by 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add "IF NOT EXISTS" to PostgreSQL patch-add-3d.sql

2017-09-15 Thread Anomie (Code Review)
Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378261 )

Change subject: Add "IF NOT EXISTS" to PostgreSQL patch-add-3d.sql
..

Add "IF NOT EXISTS" to PostgreSQL patch-add-3d.sql

If updates are run for the first time on an installation that already
has '3D' in the enum (e.g. because it's a fresh install), the update
fails. We can avoid that easily enough with "IF NOT EXISTS".

Change-Id: Iad10cb88cf1cb35cfb95ce98a556b33688158a88
---
M maintenance/postgres/archives/patch-add-3d.sql
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/maintenance/postgres/archives/patch-add-3d.sql 
b/maintenance/postgres/archives/patch-add-3d.sql
index f892755..104162e 100644
--- a/maintenance/postgres/archives/patch-add-3d.sql
+++ b/maintenance/postgres/archives/patch-add-3d.sql
@@ -1 +1 @@
-ALTER TYPE media_type ADD VALUE '3D';
+ALTER TYPE media_type ADD VALUE IF NOT EXISTS '3D';

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

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

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


[MediaWiki-commits] [Gerrit] operations...production-images[master]: Improvements to the build script

2017-09-15 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378259 )

Change subject: Improvements to the build script
..

Improvements to the build script

* Add --no-install-recommends to the apt command
* Use stretch as a base now
* Do not add a newline at the end of the apt command.

Change-Id: I551f87a695285fccc105fab284d826edb5eba355
---
M build
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/docker-images/production-images 
refs/changes/59/378259/1

diff --git a/build b/build
index c9d2af8..a7b18c4 100755
--- a/build
+++ b/build
@@ -26,9 +26,8 @@
 return """
 RUN apt-get update && \
 DEBIAN_FRONTEND=noninteractive \
-apt-get install --yes {packages} \
-&& apt-get clean && rm -rf /var/lib/apt/lists/*
-""".format(packages=pkgs)
+apt-get install --yes {packages} --no-install-recommends \
+&& apt-get clean && rm -rf /var/lib/apt/lists/* """.format(packages=pkgs)
 
 
 class DockerImage(object):
@@ -64,7 +63,7 @@
 self.config = {
 'registry': 'docker-registry.wikimedia.org',
 'username': None, 'password': None,
-'seed_image': 'wikimedia-jessie'
+'seed_image': 'wikimedia-stretch'
 }
 self.config.update(self._read_config(configfile))
 self.client = docker.from_env(version='auto')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I551f87a695285fccc105fab284d826edb5eba355
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/production-images
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] operations...production-images[master]: Add fluent-bit image

2017-09-15 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378260 )

Change subject: Add fluent-bit image
..

Add fluent-bit image

Bug: T175527
Change-Id: Ie43b9ca615a335e8cc25dc17eaffa48728780006
---
A images/fluent-bit/Dockerfile.template
A images/fluent-bit/changelog
2 files changed, 19 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/docker-images/production-images 
refs/changes/60/378260/1

diff --git a/images/fluent-bit/Dockerfile.template 
b/images/fluent-bit/Dockerfile.template
new file mode 100644
index 000..7a7f030
--- /dev/null
+++ b/images/fluent-bit/Dockerfile.template
@@ -0,0 +1,14 @@
+FROM {{ registry }}/{{ seed_image }}:latest
+LABEL Description="Fluent-bit image to run as a sidecar container" \
+  maintainer="j...@wikimedia.org"
+
+{{ "td-agent-bit" | apt_install }} \
+&& mkdir -p /etc/fluent-bit/
+
+COPY fluent-bit.conf /etc/fluent-bit/
+COPY parsers.conf   /etc/fluent-bit/
+COPY parsers-wmf.conf /etc/fluent-bit/
+
+
+# Entry point
+CMD ["/opt/td-agent-bit/bin/td-agent-bit", "-c", 
"/etc/fluent-bit/fluent-bit.conf"]
diff --git a/images/fluent-bit/changelog b/images/fluent-bit/changelog
new file mode 100644
index 000..ee15d64
--- /dev/null
+++ b/images/fluent-bit/changelog
@@ -0,0 +1,5 @@
+fluent-bit (0.12.2) wikimedia; urgency=medium
+
+  * Initial release.
+
+ -- Giuseppe Lavagetto   Fri, 15 Sep 2017 18:05:41 
+0200

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie43b9ca615a335e8cc25dc17eaffa48728780006
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/production-images
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] operations...prometheus-jmx-exporter[debian]: Versionless .jar symlink fix

2017-09-15 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378258 )

Change subject: Versionless .jar symlink fix
..


Versionless .jar symlink fix

Change-Id: I51958c3c87f4c30490be86e54fdcc78aa274bf2f
---
M debian/README.Debian
M debian/changelog
A debian/prometheus-jmx-exporter.links
M debian/rules
4 files changed, 14 insertions(+), 9 deletions(-)

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



diff --git a/debian/README.Debian b/debian/README.Debian
index 0d332c0..47dd0a5 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -10,6 +10,11 @@
   - jmx_prometheus_javaagent.jar
   - jmx_prometheus_httpserver.jar
 
+NOTE: If you are building a new upstream version, in addition to merging the 
tags
+into this debian branch and updating debian/changelog, you must also edit
+debian/prometheus-jmx-exporter.links to change the versionless .jar symlink.
+
+
 == Building with WMF package_builder
 
 WMF uses a custom setup of pbuilder and cowbuilder to build packages.  In our 
setup
diff --git a/debian/changelog b/debian/changelog
index 3cf553a..57a60ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+prometheus-jmx-exporter (0.10-2) stretch-wikimedia; urgency=low
+
+  * Versionless .jar symlink fix
+
+ -- Andrew Otto (WMF)   Fri, 15 Sep 2017 15:51:00 +
+
+
 prometheus-jmx-exporter (0.10-1) stretch-wikimedia; urgency=low
 
   * Initial release of 0.10
diff --git a/debian/prometheus-jmx-exporter.links 
b/debian/prometheus-jmx-exporter.links
new file mode 100644
index 000..c5748a8
--- /dev/null
+++ b/debian/prometheus-jmx-exporter.links
@@ -0,0 +1,2 @@
+usr/share/java/prometheus/jmx_prometheus_javaagent-0.10.jar 
usr/share/java/prometheus/jmx_prometheus_javaagent.jar
+usr/share/java/prometheus/jmx_prometheus_httpserver-0.10.jar 
usr/share/java/prometheus/jmx_prometheus_httpserver.jar
diff --git a/debian/rules b/debian/rules
index 315b064..7e8aeb7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,23 +15,14 @@
dh_auto_build
 
 override_dh_install:
-   # NOTE: We use ln here below rather than 
debian/prometheus-jmx-exporter.links to create
-   # versionless symlinks to avoid hardcoding DEB_VERSION_UPSTREAM into 
the .links file.
-
# Install jmx_prometheus_javaagent.jar
install -o root -g root -m 644 \

$(CURDIR)/jmx_prometheus_javaagent/target/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
 \

$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
-   ln -s \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
 \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent.jar
 
# Install jmx_prometheus_httpserver.jar
install -o root -g root -m 644 \

$(CURDIR)/jmx_prometheus_httpserver/target/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
 \

$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
-   ln -s \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
 \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver.jar
 
dh_install

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51958c3c87f4c30490be86e54fdcc78aa274bf2f
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/prometheus-jmx-exporter
Gerrit-Branch: debian
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 

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


[MediaWiki-commits] [Gerrit] operations...prometheus-jmx-exporter[debian]: Versionless .jar symlink fix

2017-09-15 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378258 )

Change subject: Versionless .jar symlink fix
..

Versionless .jar symlink fix

Change-Id: I51958c3c87f4c30490be86e54fdcc78aa274bf2f
---
M debian/README.Debian
M debian/changelog
A debian/prometheus-jmx-exporter.links
M debian/rules
4 files changed, 14 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/prometheus-jmx-exporter 
refs/changes/58/378258/1

diff --git a/debian/README.Debian b/debian/README.Debian
index 0d332c0..47dd0a5 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -10,6 +10,11 @@
   - jmx_prometheus_javaagent.jar
   - jmx_prometheus_httpserver.jar
 
+NOTE: If you are building a new upstream version, in addition to merging the 
tags
+into this debian branch and updating debian/changelog, you must also edit
+debian/prometheus-jmx-exporter.links to change the versionless .jar symlink.
+
+
 == Building with WMF package_builder
 
 WMF uses a custom setup of pbuilder and cowbuilder to build packages.  In our 
setup
diff --git a/debian/changelog b/debian/changelog
index 3cf553a..57a60ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+prometheus-jmx-exporter (0.10-2) stretch-wikimedia; urgency=low
+
+  * Versionless .jar symlink fix
+
+ -- Andrew Otto (WMF)   Fri, 15 Sep 2017 15:51:00 +
+
+
 prometheus-jmx-exporter (0.10-1) stretch-wikimedia; urgency=low
 
   * Initial release of 0.10
diff --git a/debian/prometheus-jmx-exporter.links 
b/debian/prometheus-jmx-exporter.links
new file mode 100644
index 000..c5748a8
--- /dev/null
+++ b/debian/prometheus-jmx-exporter.links
@@ -0,0 +1,2 @@
+usr/share/java/prometheus/jmx_prometheus_javaagent-0.10.jar 
usr/share/java/prometheus/jmx_prometheus_javaagent.jar
+usr/share/java/prometheus/jmx_prometheus_httpserver-0.10.jar 
usr/share/java/prometheus/jmx_prometheus_httpserver.jar
diff --git a/debian/rules b/debian/rules
index 315b064..7e8aeb7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,23 +15,14 @@
dh_auto_build
 
 override_dh_install:
-   # NOTE: We use ln here below rather than 
debian/prometheus-jmx-exporter.links to create
-   # versionless symlinks to avoid hardcoding DEB_VERSION_UPSTREAM into 
the .links file.
-
# Install jmx_prometheus_javaagent.jar
install -o root -g root -m 644 \

$(CURDIR)/jmx_prometheus_javaagent/target/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
 \

$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
-   ln -s \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
 \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent.jar
 
# Install jmx_prometheus_httpserver.jar
install -o root -g root -m 644 \

$(CURDIR)/jmx_prometheus_httpserver/target/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
 \

$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
-   ln -s \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
 \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver.jar
 
dh_install

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51958c3c87f4c30490be86e54fdcc78aa274bf2f
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/prometheus-jmx-exporter
Gerrit-Branch: debian
Gerrit-Owner: Ottomata 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Adding getStatus tests

2017-09-15 Thread Mepps (Code Review)
Mepps has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378257 )

Change subject: Adding getStatus tests
..

Adding getStatus tests

Change-Id: Ie9eb0d1b7cab92acda1f01112aa93d3c2e0a74f8
---
M tests/phpunit/Adapter/Ingenico/IngenicoTest.php
M tests/phpunit/BaseIngenicoTestCase.php
2 files changed, 20 insertions(+), 9 deletions(-)


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

diff --git a/tests/phpunit/Adapter/Ingenico/IngenicoTest.php 
b/tests/phpunit/Adapter/Ingenico/IngenicoTest.php
index 225d261..8b1998c 100644
--- a/tests/phpunit/Adapter/Ingenico/IngenicoTest.php
+++ b/tests/phpunit/Adapter/Ingenico/IngenicoTest.php
@@ -95,10 +95,9 @@
}
 
/**
-* Just run the GET_ORDERSTATUS transaction and make sure we load the 
data
+* Just run the getHostedCheckoutStatus transaction and make sure we 
load the data
 */
-   function testGetOrderStatus() {
-   $this->markTestSkipped( 'OrderStatus not implemented' );
+   function testGetHostedCheckoutStatus() {
$init = $this->getDonorTestData();
$init['payment_method'] = 'cc';
$init['payment_submethod'] = 'visa';
@@ -106,11 +105,11 @@
 
$gateway = $this->getFreshGatewayObject( $init );
 
-   $gateway->do_transaction( 'GET_ORDERSTATUS' );
+   $gateway->do_transaction( 'getHostedCheckoutStatus' );
 
$data = $gateway->getTransactionData();
 
-   $this->assertEquals( 'N', $data['CVVRESULT'], 'CVV Result not 
loaded from XML response' );
+   $this->assertEquals( 'N', $data['CVVRESULT'], 'CVV Result not 
loaded from JSON response' );
}
 
/**
@@ -119,7 +118,6 @@
 * @group CvvResult
 */
function testConfirmCreditCardStatus25() {
-   $this->markTestSkipped( 'OrderStatus not implemented' );
$init = $this->getDonorTestData();
$init['payment_method'] = 'cc';
$init['payment_submethod'] = 'visa';
@@ -128,7 +126,11 @@
$this->setUpRequest( array( 'CVVRESULT' => 'M' ) );
 
$gateway = $this->getFreshGatewayObject( $init );
-   $gateway::setDummyGatewayResponseCode( '25' );
+$this->hostedCheckoutProvider->expects( $this->once() )
+->method( 'Confirm_CreditCard' )
+->willReturn(
+'25'
+);
 
$gateway->do_transaction( 'Confirm_CreditCard' );
$action = $gateway->getValidationAction();
@@ -140,7 +142,6 @@
 * fraud scores.
 */
function testGetOrderstatusPostProcessFraud() {
-   $this->markTestSkipped( 'OrderStatus not implemented' );
$this->setMwGlobals( array(
'wgDonationInterfaceEnableCustomFilters' => true,
'wgIngenicoGatewayCustomFiltersFunctions' => array(
@@ -157,7 +158,11 @@
$init['payment_method'] = 'cc';
$gateway = $this->getFreshGatewayObject( $init );
 
-   $gateway::setDummyGatewayResponseCode( '600_badCvv' );
+$this->hostedCheckoutProvider->expects( $this->once() )
+->method( 'Confirm_CreditCard' )
+->willReturn(
+'600_badCvv'
+);
 
$gateway->do_transaction( 'Confirm_CreditCard' );
$action = $gateway->getValidationAction();
diff --git a/tests/phpunit/BaseIngenicoTestCase.php 
b/tests/phpunit/BaseIngenicoTestCase.php
index e6c8901..c9d336a 100644
--- a/tests/phpunit/BaseIngenicoTestCase.php
+++ b/tests/phpunit/BaseIngenicoTestCase.php
@@ -81,4 +81,10 @@
),
) );
}
+
+   public static function getDonorTestData($country = ''){
+   $data = parent::getDonorTestData($country);
+   $data['gateway_session_id'] = mt_rand();
+   return $data;
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations...prometheus-jmx-exporter[debian]: Versionless .jar symlink fix

2017-09-15 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378256 )

Change subject: Versionless .jar symlink fix
..


Versionless .jar symlink fix

Change-Id: I78e5d0bbb239ba3e3b6efe28fbb870839279d023
---
M debian/README.Debian
M debian/changelog
A debian/prometheus-jmx-exporter.links
M debian/rules
4 files changed, 14 insertions(+), 9 deletions(-)

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



diff --git a/debian/README.Debian b/debian/README.Debian
index 0d332c0..47dd0a5 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -10,6 +10,11 @@
   - jmx_prometheus_javaagent.jar
   - jmx_prometheus_httpserver.jar
 
+NOTE: If you are building a new upstream version, in addition to merging the 
tags
+into this debian branch and updating debian/changelog, you must also edit
+debian/prometheus-jmx-exporter.links to change the versionless .jar symlink.
+
+
 == Building with WMF package_builder
 
 WMF uses a custom setup of pbuilder and cowbuilder to build packages.  In our 
setup
diff --git a/debian/changelog b/debian/changelog
index 3cf553a..57a60ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+prometheus-jmx-exporter (0.10-2) stretch-wikimedia; urgency=low
+
+  * Versionless .jar symlink fix
+
+ -- Andrew Otto (WMF)   Fri, 15 Sep 2017 15:51:00 +
+
+
 prometheus-jmx-exporter (0.10-1) stretch-wikimedia; urgency=low
 
   * Initial release of 0.10
diff --git a/debian/prometheus-jmx-exporter.links 
b/debian/prometheus-jmx-exporter.links
new file mode 100644
index 000..c5748a8
--- /dev/null
+++ b/debian/prometheus-jmx-exporter.links
@@ -0,0 +1,2 @@
+usr/share/java/prometheus/jmx_prometheus_javaagent-0.10.jar 
usr/share/java/prometheus/jmx_prometheus_javaagent.jar
+usr/share/java/prometheus/jmx_prometheus_httpserver-0.10.jar 
usr/share/java/prometheus/jmx_prometheus_httpserver.jar
diff --git a/debian/rules b/debian/rules
index 315b064..7e8aeb7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,23 +15,14 @@
dh_auto_build
 
 override_dh_install:
-   # NOTE: We use ln here below rather than 
debian/prometheus-jmx-exporter.links to create
-   # versionless symlinks to avoid hardcoding DEB_VERSION_UPSTREAM into 
the .links file.
-
# Install jmx_prometheus_javaagent.jar
install -o root -g root -m 644 \

$(CURDIR)/jmx_prometheus_javaagent/target/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
 \

$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
-   ln -s \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
 \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent.jar
 
# Install jmx_prometheus_httpserver.jar
install -o root -g root -m 644 \

$(CURDIR)/jmx_prometheus_httpserver/target/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
 \

$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
-   ln -s \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
 \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver.jar
 
dh_install

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78e5d0bbb239ba3e3b6efe28fbb870839279d023
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/prometheus-jmx-exporter
Gerrit-Branch: debian
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 

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


[MediaWiki-commits] [Gerrit] operations...prometheus-jmx-exporter[debian]: Versionless .jar symlink fix

2017-09-15 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378256 )

Change subject: Versionless .jar symlink fix
..

Versionless .jar symlink fix

Change-Id: I78e5d0bbb239ba3e3b6efe28fbb870839279d023
---
M debian/README.Debian
M debian/changelog
A debian/prometheus-jmx-exporter.links
M debian/rules
4 files changed, 14 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/prometheus-jmx-exporter 
refs/changes/56/378256/1

diff --git a/debian/README.Debian b/debian/README.Debian
index 0d332c0..47dd0a5 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -10,6 +10,11 @@
   - jmx_prometheus_javaagent.jar
   - jmx_prometheus_httpserver.jar
 
+NOTE: If you are building a new upstream version, in addition to merging the 
tags
+into this debian branch and updating debian/changelog, you must also edit
+debian/prometheus-jmx-exporter.links to change the versionless .jar symlink.
+
+
 == Building with WMF package_builder
 
 WMF uses a custom setup of pbuilder and cowbuilder to build packages.  In our 
setup
diff --git a/debian/changelog b/debian/changelog
index 3cf553a..57a60ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+prometheus-jmx-exporter (0.10-2) stretch-wikimedia; urgency=low
+
+  * Versionless .jar symlink fix
+
+ -- Andrew Otto (WMF)   Fri, 15 Sep 2017 15:51:00 +
+
+
 prometheus-jmx-exporter (0.10-1) stretch-wikimedia; urgency=low
 
   * Initial release of 0.10
diff --git a/debian/prometheus-jmx-exporter.links 
b/debian/prometheus-jmx-exporter.links
new file mode 100644
index 000..c5748a8
--- /dev/null
+++ b/debian/prometheus-jmx-exporter.links
@@ -0,0 +1,2 @@
+usr/share/java/prometheus/jmx_prometheus_javaagent-0.10.jar 
usr/share/java/prometheus/jmx_prometheus_javaagent.jar
+usr/share/java/prometheus/jmx_prometheus_httpserver-0.10.jar 
usr/share/java/prometheus/jmx_prometheus_httpserver.jar
diff --git a/debian/rules b/debian/rules
index 315b064..7e8aeb7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,23 +15,14 @@
dh_auto_build
 
 override_dh_install:
-   # NOTE: We use ln here below rather than 
debian/prometheus-jmx-exporter.links to create
-   # versionless symlinks to avoid hardcoding DEB_VERSION_UPSTREAM into 
the .links file.
-
# Install jmx_prometheus_javaagent.jar
install -o root -g root -m 644 \

$(CURDIR)/jmx_prometheus_javaagent/target/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
 \

$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
-   ln -s \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent-$(DEB_VERSION_UPSTREAM).jar
 \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_javaagent.jar
 
# Install jmx_prometheus_httpserver.jar
install -o root -g root -m 644 \

$(CURDIR)/jmx_prometheus_httpserver/target/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
 \

$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
-   ln -s \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver-$(DEB_VERSION_UPSTREAM).jar
 \
-   
$(CURDIR)/debian/prometheus-jmx-exporter/usr/share/java/prometheus/jmx_prometheus_httpserver.jar
 
dh_install

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78e5d0bbb239ba3e3b6efe28fbb870839279d023
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/prometheus-jmx-exporter
Gerrit-Branch: debian
Gerrit-Owner: Ottomata 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: [DONOTMERGE] Demo: View test breakage

2017-09-15 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378255 )

Change subject: [DONOTMERGE] Demo: View test breakage
..

[DONOTMERGE] Demo: View test breakage

The recent patches reworking our theme structure broke most if not all of
the view tests running on our periodic CI testing job.  The issue is that
various attributes are no longer being found.  This patch demonstates the
steps I've taken so far in attempting to fix them, including:

* Creating our ContextThemeWrapper objects from AppTheme rather than
  Theme.LIGHT or Theme.DARK, since these latter no longer inherit from a
  system theme;

* Then explicitly setting the new light or dark theme on the ContextTheme-
  Wrapper, which seems to work cumulatively, as expected.

Still, it seems certain attributes are still not being found, e.g.,
?attr/selectableItemBackground.

For exploratory purposes I'm focusing on the first test in DescriptionEdit-
HelpViewTest.  This is currently only passing because I've removed the
reference to ?attr/selectableItemBackground.

(Note that this code is solely exploratory in nature and not close to
production-quality!)

Change-Id: I28ca8aba11c836ac799f1e1448ff11397f494ebe
---
M 
app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditHelpViewTest.java
M app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
M app/src/main/res/layout/view_description_edit_help.xml
3 files changed, 35 insertions(+), 17 deletions(-)


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

diff --git 
a/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditHelpViewTest.java
 
b/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditHelpViewTest.java
index 580acee..3640095 100644
--- 
a/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditHelpViewTest.java
+++ 
b/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditHelpViewTest.java
@@ -4,6 +4,7 @@
 
 import org.junit.experimental.theories.Theory;
 import org.junit.experimental.theories.suppliers.TestedOn;
+import org.wikipedia.R;
 import org.wikipedia.test.theories.TestedOnBool;
 import org.wikipedia.test.view.FontScale;
 import org.wikipedia.test.view.LayoutDirection;
@@ -19,11 +20,11 @@
 
 @Theory public void testWidth(@TestedOn(ints = {WIDTH_DP_XL, WIDTH_DP_L}) 
int widthDp,
   @NonNull FontScale fontScale) {
-setUp(widthDp, LayoutDirection.LOCALE, fontScale, Theme.LIGHT);
+setUp(widthDp, LayoutDirection.LOCALE, fontScale, R.style.AppTheme);
 snap(subject);
 }
 
-@Theory public void testLayoutDirection(@NonNull LayoutDirection 
direction) {
+/*@Theory public void testLayoutDirection(@NonNull LayoutDirection 
direction) {
 setUp(WIDTH_DP_L, direction, FontScale.DEFAULT, Theme.LIGHT);
 snap(subject);
 }
@@ -50,16 +51,17 @@
 verify(callback).onAboutClick();
 verify(callback).onGuideClick();
 }
-}
+}*/
 
 private void defaultSetUp() {
-setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FontScale.DEFAULT, 
Theme.LIGHT);
+setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FontScale.DEFAULT, 
R.style.AppTheme);
 }
 
 @Override
 protected void setUp(int widthDp, @NonNull LayoutDirection layoutDirection,
-   @NonNull FontScale fontScale, @NonNull Theme theme) {
-super.setUp(widthDp, layoutDirection, fontScale, theme);
+   @NonNull FontScale fontScale, @NonNull int themeResId) {
+super.setUp(widthDp, layoutDirection, fontScale, themeResId);
+setColorTheme(R.style.ThemeLight);
 subject = new DescriptionEditHelpView(ctx());
 }
 }
diff --git a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java 
b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
index 521cdd0..eba6009 100644
--- a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
@@ -9,6 +9,7 @@
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.support.annotation.StringRes;
+import android.support.annotation.StyleRes;
 import android.support.v4.text.TextUtilsCompat;
 import android.view.ContextThemeWrapper;
 import android.view.View;
@@ -71,30 +72,47 @@
 private Locale locale;
 private LayoutDirection layoutDirection;
 private FontScale fontScale;
-private Theme theme;
+@StyleRes private int themeResId;
 private Context ctx;
 
+// TODO: REMOVE?
 protected void setUp(int widthDp, @NonNull LayoutDirection layoutDirection,
  @NonNull FontScale fontScale, @NonNull Theme theme) {
-setUp(widthDp, null, LOCALES[0], layoutDirection, fontScale, theme);
+setUp(widthDp, null, LOCALES[0], layoutDirection, 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Remove EasyDeflate modules

2017-09-15 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378253 )

Change subject: Remove EasyDeflate modules
..

Remove EasyDeflate modules

Now that we depend on VE, these are duplicates

Change-Id: If0f977f473d0dbbeb84d803014a1e41b55e1a461
---
M extension.json
D lib/Base64.js/LICENSE
D lib/Base64.js/README.md
D lib/Base64.js/base64.js
D lib/Easy-Deflate/README.md
D lib/Easy-Deflate/deflate.js
D lib/Easy-Deflate/easydeflate.js
D lib/Easy-Deflate/typedarrays.js
8 files changed, 0 insertions(+), 2,603 deletions(-)


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

diff --git a/extension.json b/extension.json
index 9c506e3..6668e38 100644
--- a/extension.json
+++ b/extension.json
@@ -168,46 +168,6 @@
"ContentTranslationVersion": "1"
},
"ResourceModules": {
-   "Base64.js": {
-   "localBasePath": "lib",
-   "remoteExtPath": "ContentTranslation/lib",
-   "scripts": [
-   "Base64.js/base64.js"
-   ],
-   "targets": [
-   "desktop",
-   "mobile"
-   ]
-   },
-   "easy-deflate.core": {
-   "localBasePath": "lib",
-   "remoteExtPath": "ContentTranslation/lib",
-   "scripts": [
-   "Easy-Deflate/easydeflate.js",
-   "Easy-Deflate/typedarrays.js"
-   ],
-   "dependencies": [
-   "Base64.js"
-   ],
-   "targets": [
-   "desktop",
-   "mobile"
-   ]
-   },
-   "easy-deflate.deflate": {
-   "localBasePath": "lib",
-   "remoteExtPath": "ContentTranslation/lib",
-   "scripts": [
-   "Easy-Deflate/deflate.js"
-   ],
-   "dependencies": [
-   "easy-deflate.core"
-   ],
-   "targets": [
-   "desktop",
-   "mobile"
-   ]
-   },
"ext.cx.contributions": {
"scripts": [
"entrypoint/ext.cx.contributions.js"
diff --git a/lib/Base64.js/LICENSE b/lib/Base64.js/LICENSE
deleted file mode 100644
index 4832767..000
--- a/lib/Base64.js/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-Version 2, December 2004
-
- Copyright (c) 2011..2012 David Chambers 
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. You just DO WHAT THE FUCK YOU WANT TO.
diff --git a/lib/Base64.js/README.md b/lib/Base64.js/README.md
deleted file mode 100644
index e5dafed..000
--- a/lib/Base64.js/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Base64.js
-
-≈ 500 byte* polyfill for browsers which don't provide [`window.btoa`][1] and
-[`window.atob`][2].
-
-Although the script does no harm in browsers which do provide these functions,
-a conditional script loader such as [yepnope][3] can prevent unnecessary HTTP
-requests.
-
-```javascript
-yepnope({
-  test: window.btoa && window.atob,
-  nope: 'base64.js',
-  callback: function () {
-// `btoa` and `atob` are now safe to use
-  }
-})
-```
-
-Base64.js stems from a [gist][4] by [yahiko][5].
-
-### Running the test suite
-
-make setup
-make test
-
-\* Minified and gzipped. Run `make bytes` to verify.
-
-
-[1]: https://developer.mozilla.org/en/DOM/window.btoa
-[2]: https://developer.mozilla.org/en/DOM/window.atob
-[3]: http://yepnopejs.com/
-[4]: https://gist.github.com/229984
-[5]: https://github.com/yahiko
diff --git a/lib/Base64.js/base64.js b/lib/Base64.js/base64.js
deleted file mode 100644
index b82dded..000
--- a/lib/Base64.js/base64.js
+++ /dev/null
@@ -1,61 +0,0 @@
-;(function () {
-
-  var object = typeof exports != 'undefined' ? exports : this; // #8: web 
workers
-  var chars = 
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
-
-  function InvalidCharacterError(message) {
-this.message = message;
-  }
-  InvalidCharacterError.prototype = new Error;
-  InvalidCharacterError.prototype.name = 'InvalidCharacterError';
-
-  // encoder
-  // 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Remove unused dependency easy-deflate.deflate

2017-09-15 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378254 )

Change subject: Remove unused dependency easy-deflate.deflate
..

Remove unused dependency easy-deflate.deflate

Not used in this script.

Change-Id: I36b752ac7540cec240b485569ce90f2d6e5ed202
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index 6668e38..d23e836 100644
--- a/extension.json
+++ b/extension.json
@@ -739,7 +739,6 @@
"translation/ext.cx.translation.loader.js"
],
"dependencies": [
-   "easy-deflate.deflate",
"ext.cx.model",
"mediawiki.api",
"mediawiki.user"

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Add pageviews info to New translation dialog

2017-09-15 Thread Petar.petkovic (Code Review)
Petar.petkovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378252 )

Change subject: Add pageviews info to New translation dialog
..

Add pageviews info to New translation dialog

- Add box shadow to New translation dialog.
- Add icon next to selected item title in New translation dialog,
indicating that article can be opened in new tab.
- Add pageviews info to selected item in New translation dialog.

Bug: T111094
Change-Id: I07ab03de98ead3fd758a76bc8d17edc76f1225df
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/source/ext.cx.source.selector.js
A modules/source/images/newwindow.png
A modules/source/images/newwindow.svg
M modules/source/styles/ext.cx.source.selector.less
7 files changed, 131 insertions(+), 52 deletions(-)


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

diff --git a/extension.json b/extension.json
index 9c506e3..5192cde 100644
--- a/extension.json
+++ b/extension.json
@@ -405,6 +405,7 @@
"cx-sourceselector-dialog-error-page-exists",
"cx-sourceselector-dialog-error-title-in-use",

"cx-sourceselector-dialog-error-no-source-article",
+   
"cx-sourceselector-embedded-selected-item-pageviews",
"cx-license-agreement",
"cx-error-server-connection"
]
diff --git a/i18n/en.json b/i18n/en.json
index 89a02a4..7ad6484 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -98,6 +98,7 @@
"cx-sourceselector-dialog-error-title-in-use": "The title for the new 
page is [$1 already in use]",
"cx-sourceselector-dialog-error-no-source-article": "The page to 
translate does not exist in $1",
"cx-sourceselector-missing-in-target-language": "Missing in $1",
+   "cx-sourceselector-embedded-selected-item-pageviews": "$1 visits per 
week",
"cx-mt-abuse-warning-title": "Your translation {{PLURAL:$1|contains}} 
$1% of unmodified machine-translated text",
"cx-mt-abuse-warning-text": "Machine translation is provided only as a 
starting point. You need to make sure that the content is accurate and reads 
naturally in your language.",
"cx-publish-captcha-title": "Security question",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 75efdff..9ff38e6 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -107,6 +107,7 @@
"cx-sourceselector-dialog-error-title-in-use": "Error that indicates 
there is already a page in the target wiki with the same title as the proposed 
target title.\n\nParameters:\n* $1 - link to target page with same title",
"cx-sourceselector-dialog-error-no-source-article": "Error that 
indicates there is no page with the specified title in the source language to 
translate.\n\nParameters:\n* $1 - the source language",
"cx-sourceselector-missing-in-target-language": "Label appended to 
search result in Special:ContentTranslation when using the \"Start new 
article\" feature, which indicates that matching article is missing in target 
language.\n\nParameters:\n* $1 - The autonym of the language",
+   "cx-sourceselector-embedded-selected-item-pageviews": "Label appended 
to selected item in New translation embedded dialog on Content Translation 
dashboard, used for representing number of page visits in the last week.\n$1 - 
number of visits per week",
"cx-mt-abuse-warning-title": "Title text shown in machine translation 
abuse card.\n* $1: Percentage of machine translation",
"cx-mt-abuse-warning-text": "Detailed explanation of machine 
translation abuse.",
"cx-publish-captcha-title": "Title of captcha form while publishing the 
translation",
diff --git a/modules/source/ext.cx.source.selector.js 
b/modules/source/ext.cx.source.selector.js
index eac283c..b7db90b 100644
--- a/modules/source/ext.cx.source.selector.js
+++ b/modules/source/ext.cx.source.selector.js
@@ -45,7 +45,7 @@
this.$selectedItem = null;
this.$selectedItemImage = null;
this.$selectedItemLink = null;
-   this.$selectedItemInfo = null;
+   this.$selectedItemMetrics = null;
this.$languageFilter = null;
this.$sourceLanguage = null;
this.$targetLanguage = null;
@@ -420,6 +420,8 @@
 
if ( this.isEmbedded ) {
this.changeSelectedItemTitle( language );
+   this.$selectedItemMetrics.children( 
'.cx-sourceselector-embedded-selected-item__pageviews' ).remove();
+   this.getSelectedItemData( this.sourceTitles[ language ] 
);
}
 
this.check();
@@ -692,7 +694,7 @@
}
 
this.overlay.show();
-   

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: [WIP] Lint multiple colon escaped links

2017-09-15 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378250 )

Change subject: [WIP] Lint multiple colon escaped links
..

[WIP] Lint multiple colon escaped links

 * From the wikitech-ambassador's thread,
   
https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2017-September/001675.html

Change-Id: Ibee7875bb93b11d80099b3f690b0a61824e36c24
---
M lib/wt2html/tt/LinkHandler.js
M tests/mocha/linter.js
2 files changed, 37 insertions(+), 3 deletions(-)


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

diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js
index 554f5f4..2787851 100644
--- a/lib/wt2html/tt/LinkHandler.js
+++ b/lib/wt2html/tt/LinkHandler.js
@@ -72,7 +72,7 @@
  *
  * @return {Object} The target info
  */
-WikiLinkHandler.prototype.getWikiLinkTargetInfo = function(hrefKV) {
+WikiLinkHandler.prototype.getWikiLinkTargetInfo = function(token, hrefKV) {
var env = this.manager.env;
 
var info = {
@@ -86,6 +86,21 @@
info.href = info.href.substr(1);
}
if (/^:/.test(info.href)) {
+   if (env.conf.parsoid.linting) {
+   var lint;
+   if (this.options.inTemplate) {
+   lint = {
+   // FIXME: Pass tsr info to the frame, 
but note that
+   // the transclusion cache will prevent 
us from being
+   // able to lint multiple occurrances.
+   dsr: [null, null],
+   templateInfo: { name: 
this.manager.frame.title },
+   };
+   } else {
+   lint = { dsr: token.dataAttribs.tsr };
+   }
+   env.log('lint/multi-colon-escape', lint);
+   }
// This will get caught by the caller, and mark the target as 
invalid
throw new Error('Multiple colons prefixing href.');
}
@@ -112,7 +127,7 @@
// Recurse!
hrefKV = new KV('href', (/:/.test(info.href) ? 
':' : '') + info.href);
hrefKV.vsrc = info.hrefSrc;
-   info = this.getWikiLinkTargetInfo(hrefKV);
+   info = this.getWikiLinkTargetInfo(token, 
hrefKV);
info.localprefix = nsPrefix +
(info.localprefix ? (':' + 
info.localprefix) : '');
}
@@ -199,7 +214,7 @@
var target, tokens, tsr;
 
try {
-   target = this.getWikiLinkTargetInfo(hrefKV);
+   target = this.getWikiLinkTargetInfo(token, hrefKV);
} catch (e) {
// Invalid title
target = null;
diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index f1ad362..9edc798 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -600,4 +600,23 @@
return expectEmptyResults(wt, { tweakEnv: tweakEnv });
});
});
+
+   describe.only('MULTIPLE COLON ESCAPE', function() {
+   it('should lint links prefixed with multiple colons', 
function() {
+   return 
parseWT('[[None]]\n[[:One]]\n[[::Two]]\n[[:::Three]]')
+   .then(function(result) {
+   result.should.have.length(2);
+   result[0].dsr.should.deep.equal([ 18, 27 ]);
+   result[1].dsr.should.deep.equal([ 28, 40 ]);
+   });
+   });
+   it('should lint links prefixed with multiple colons from 
templates', function() {
+   return parseWT('{{1x|[[:One]]}}\n{{1x|[[::Two]]}}')
+   .then(function(result) {
+   result.should.have.length(1);
+   console.log(result)
+   });
+   });
+   });
+
 });

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibee7875bb93b11d80099b3f690b0a61824e36c24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
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] mediawiki...DonationInterface[master]: Ingenico Connect: getHostedCheckoutStatus

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

Change subject: Ingenico Connect: getHostedCheckoutStatus
..


Ingenico Connect: getHostedCheckoutStatus

Bug: T163948
Change-Id: I3d11fba2d4c900752c6e35d2182f412d95735696
---
M globalcollect_gateway/config/var_map.yaml
M globalcollect_gateway/globalcollect.adapter.php
M ingenico_gateway/config/var_map.yaml
M ingenico_gateway/ingenico.adapter.php
M tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
5 files changed, 108 insertions(+), 20 deletions(-)

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



diff --git a/globalcollect_gateway/config/var_map.yaml 
b/globalcollect_gateway/config/var_map.yaml
index 60fd28c..abb616a 100644
--- a/globalcollect_gateway/config/var_map.yaml
+++ b/globalcollect_gateway/config/var_map.yaml
@@ -50,6 +50,7 @@
 RETURNURL: returnto
 SPECIALID: special_id
 STATE: state_province
+STATUSID: gateway_status
 STREET: street_address
 SURNAME: last_name
 SWIFTCODE: swift_code
diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index 4acb35d..36eab0b 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -372,6 +372,7 @@
'AMOUNT',
'AVSRESULT',
'CVVRESULT',
+   'STATUSID',
),
);
 
@@ -641,7 +642,7 @@
$status_response = null;
 
for ( $loops = 0; $loops < $loopcount && !$cancelflag && 
!$problemflag; ++$loops ) {
-   $status_result = $this->do_transaction( 
'GET_ORDERSTATUS' );
+   $status_result = $this->getOrderStatusFromProcessor();
$validationAction = $this->getValidationAction();
$cvv_result = $this->getData_Unstaged_Escaped( 
'cvv_result' );
$gotCVV = strlen( $cvv_result ) > 0;
@@ -667,13 +668,12 @@
 
$order_status_results = false;
if ( !$cancelflag && !$problemflag ) {
-   // $order_status_results = $this->getFinalStatus();
-   $txn_data = $this->getTransactionData();
-   if ( isset( $txn_data['STATUSID'] ) ) {
+   $statusCode = $this->getData_Unstaged_Escaped( 
'gateway_status' );
+   if ( $statusCode ) {
if ( is_null( $original_status_code ) ) 
{
-   $original_status_code = 
$txn_data['STATUSID'];
+   $original_status_code = 
$statusCode;
}
-   $order_status_results = 
$this->findCodeAction( 'GET_ORDERSTATUS', 'STATUSID', $txn_data['STATUSID'] );
+   $order_status_results = 
$this->findCodeAction( 'GET_ORDERSTATUS', 'STATUSID', $statusCode );
}
if ( $loops === 0 && $is_orphan && !is_null( 
$original_status_code ) ) {
// save stats.
@@ -704,7 +704,7 @@
}
 
// none of this should ever 
execute for a transaction that doesn't use 3d secure...
-   if ( $txn_data['STATUSID'] === 
'200' && ( $loops < $loopcount - 1 ) ) {
+   if ( $statusCode === '200' && ( 
$loops < $loopcount - 1 ) ) {
$this->logger->info( 
"Running DO_FINISHPAYMENT ($loops)" );
 
$dopayment_result = 
$this->do_transaction( 'DO_FINISHPAYMENT' );
@@ -724,7 +724,7 @@
break;
}
 
-   if ( $txn_data['STATUSID'] !== 
'200' ) {
+   if ( $statusCode !== '200' ) {
break 2; // no need to 
loop.
}
// FIXME: explicit that we want 
to fall through?
@@ -801,6 +801,10 @@
 
 // return something better... if we need to!
return $status_result;
+   }
+
+   protected function getOrderStatusFromProcessor() {
+   return $this->do_transaction( 'GET_ORDERSTATUS' );
}
 
/**
@@ -1322,7 +1326,7 @@
// set the transaction result message
 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: Removing ExtJS v4 - step #1

2017-09-15 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378249 )

Change subject: Removing ExtJS v4 - step #1
..

Removing ExtJS v4 - step #1

BlueSpice 3 will build upon ExtJS v6 provided by [[mw:Extension:ExtJSBase]].

Change-Id: I28de28629debd7810b7834876b23eb5e859d2d0a
---
M extension.json
D includes/resourceloader/ResourceLoaderExtJSModule.php
D resources/bluespice.extjs/Ext.ux/BoxReorderer.js
D resources/bluespice.extjs/Ext.ux/CellDragDrop.js
D resources/bluespice.extjs/Ext.ux/DataTip.js
D resources/bluespice.extjs/Ext.ux/DataView/Animated.js
D resources/bluespice.extjs/Ext.ux/DataView/DragSelector.css
D resources/bluespice.extjs/Ext.ux/DataView/DragSelector.js
D resources/bluespice.extjs/Ext.ux/DataView/Draggable.js
D resources/bluespice.extjs/Ext.ux/DataView/LabelEditor.js
D resources/bluespice.extjs/Ext.ux/DataViewTransition.js
D resources/bluespice.extjs/Ext.ux/FieldReplicator.js
D resources/bluespice.extjs/Ext.ux/GMapPanel.js
D resources/bluespice.extjs/Ext.ux/GroupTabPanel.js
D resources/bluespice.extjs/Ext.ux/GroupTabRenderer.js
D resources/bluespice.extjs/Ext.ux/IFrame.js
D resources/bluespice.extjs/Ext.ux/LiveSearchGridPanel.js
D resources/bluespice.extjs/Ext.ux/PreviewPlugin.js
D resources/bluespice.extjs/Ext.ux/ProgressBarPager.js
D resources/bluespice.extjs/Ext.ux/README
D resources/bluespice.extjs/Ext.ux/RowExpander.js
D resources/bluespice.extjs/Ext.ux/SlidingPager.js
D resources/bluespice.extjs/Ext.ux/Spotlight.js
D resources/bluespice.extjs/Ext.ux/TabCloseMenu.js
D resources/bluespice.extjs/Ext.ux/TabReorderer.js
D resources/bluespice.extjs/Ext.ux/TabScrollerMenu.js
D resources/bluespice.extjs/Ext.ux/ToolbarDroppable.js
D resources/bluespice.extjs/Ext.ux/TreePicker.js
D resources/bluespice.extjs/Ext.ux/ajax/DataSimlet.js
D resources/bluespice.extjs/Ext.ux/ajax/JsonSimlet.js
D resources/bluespice.extjs/Ext.ux/ajax/SimManager.js
D resources/bluespice.extjs/Ext.ux/ajax/SimXhr.js
D resources/bluespice.extjs/Ext.ux/ajax/Simlet.js
D resources/bluespice.extjs/Ext.ux/ajax/XmlSimlet.js
D resources/bluespice.extjs/Ext.ux/css/GroupTabPanel.css
D resources/bluespice.extjs/Ext.ux/css/ItemSelector.css
D resources/bluespice.extjs/Ext.ux/css/LiveSearchGridPanel.css
D resources/bluespice.extjs/Ext.ux/css/TabScrollerMenu.css
D resources/bluespice.extjs/Ext.ux/css/images/border.gif
D resources/bluespice.extjs/Ext.ux/css/images/bottom2.gif
D resources/bluespice.extjs/Ext.ux/css/images/checked.gif
D resources/bluespice.extjs/Ext.ux/css/images/down2.gif
D resources/bluespice.extjs/Ext.ux/css/images/elbow-minus-nl.gif
D resources/bluespice.extjs/Ext.ux/css/images/elbow-plus-nl.gif
D resources/bluespice.extjs/Ext.ux/css/images/left2.gif
D resources/bluespice.extjs/Ext.ux/css/images/right2.gif
D resources/bluespice.extjs/Ext.ux/css/images/tab-collapsed.gif
D resources/bluespice.extjs/Ext.ux/css/images/tab-first.gif
D resources/bluespice.extjs/Ext.ux/css/images/tab-last.gif
D resources/bluespice.extjs/Ext.ux/css/images/tab-scroller-menu.gif
D resources/bluespice.extjs/Ext.ux/css/images/top2.gif
D resources/bluespice.extjs/Ext.ux/css/images/unchecked.gif
D resources/bluespice.extjs/Ext.ux/css/images/up2.gif
D resources/bluespice.extjs/Ext.ux/css/images/x-grouptabs-corners.gif
D resources/bluespice.extjs/Ext.ux/dd/CellFieldDropZone.js
D resources/bluespice.extjs/Ext.ux/dd/PanelFieldDragZone.js
D resources/bluespice.extjs/Ext.ux/event/Driver.js
D resources/bluespice.extjs/Ext.ux/event/Maker.js
D resources/bluespice.extjs/Ext.ux/event/Player.js
D resources/bluespice.extjs/Ext.ux/event/Recorder.js
D resources/bluespice.extjs/Ext.ux/event/RecorderManager.html
D resources/bluespice.extjs/Ext.ux/event/RecorderManager.js
D resources/bluespice.extjs/Ext.ux/form/ItemSelector.js
D resources/bluespice.extjs/Ext.ux/form/MultiSelect.js
D resources/bluespice.extjs/Ext.ux/form/SearchField.js
D resources/bluespice.extjs/Ext.ux/form/field/BoxSelect.AUTHORS.txt
D resources/bluespice.extjs/Ext.ux/form/field/BoxSelect.CHANGELOG.txt
D resources/bluespice.extjs/Ext.ux/form/field/BoxSelect.MIT-LICENSE.txt
D resources/bluespice.extjs/Ext.ux/form/field/BoxSelect.README
D resources/bluespice.extjs/Ext.ux/form/field/BoxSelect.css
D resources/bluespice.extjs/Ext.ux/form/field/BoxSelect.js
D resources/bluespice.extjs/Ext.ux/form/field/GridPicker.README
D resources/bluespice.extjs/Ext.ux/form/field/GridPicker.README.md
D resources/bluespice.extjs/Ext.ux/form/field/GridPicker.js
D resources/bluespice.extjs/Ext.ux/form/field/GridPickerKeyNav.js
D resources/bluespice.extjs/Ext.ux/form/field/GridPickerSearch.js
D resources/bluespice.extjs/Ext.ux/grid/FiltersFeature.js
D resources/bluespice.extjs/Ext.ux/grid/TransformGrid.js
D resources/bluespice.extjs/Ext.ux/grid/css/GridFilters.css
D resources/bluespice.extjs/Ext.ux/grid/css/RangeMenu.css
D resources/bluespice.extjs/Ext.ux/grid/filter/BooleanFilter.js
D 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: varnishxcps: generate new hierarchical TLS stats

2017-09-15 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378246 )

Change subject: varnishxcps: generate new hierarchical TLS stats
..


varnishxcps: generate new hierarchical TLS stats

One of the main problems with our current TLS stats is that the
TLS attributes of a given request are counted up independently.

For example, with the current stats we know these two independent
facts:
1) That 0.7% of clients use DHE-RSA-AES128-SHA
2) That 95.6% use TLSv1.2, 0.3% use TLSv1.1, and 4.1% use TLSv1.0

But we can't answer questions like: "What percentage of
DHE-RSA-AES128-SHA negotiators used TLSv1.0?"

This hierarchical dataset can answer that question, and many
others like it (e.g. what percentage of chapoly negotiators also
use x25519?).  It will require a few new grafana boards to make
sense of it in different ways.

Change-Id: I7a1d33ff3c195a9b9c218910ede6b1b2160e7da3
---
M modules/varnish/files/varnishxcps
1 file changed, 41 insertions(+), 5 deletions(-)

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



diff --git a/modules/varnish/files/varnishxcps 
b/modules/varnish/files/varnishxcps
index 9fbaf85..5b40f79 100755
--- a/modules/varnish/files/varnishxcps
+++ b/modules/varnish/files/varnishxcps
@@ -34,6 +34,19 @@
 from cachestats import CacheStatsSender
 
 
+# Our newer hierarchical stats are structured like:
+# tls
+# Where the legal values look like:
+# tls-version: tlsv1, tlsv1_1, tlsv1_2, tlsv1_3
+# key-exchange: x25519, prime256v1, ffdhe (?), dhe, rsa
+# auth: ecdsa, rsa
+# cipher: aes128-gcm-sha256 (stripped of kx-auth|tls13- prefix)
+# Note also that our current parsing and interpretation assumes:
+# 1) TLSv1.3 clients use ECDSA exclusively (we'll need to modify some nginx
+#stuff to do any differently...), or at least are capable...
+# 2) That if TLSv1.3+FFDHE gets used, the ffdhe will show up as the named curve
+#via openssl? (unlikely to be a problem?)
+
 class XcpsCacheStatsSender(CacheStatsSender):
 
 cmd = ['/usr/bin/varnishncsa', '-n', 'frontend',
@@ -47,19 +60,42 @@
 def __init__(self, argument_list):
 super(XcpsCacheStatsSender, self).__init__(argument_list)
 self.key_value_pairs = re.compile('([A-Z][A-Z0-9]*)=([^;]+)')
+self.kxa = re.compile('^(ecdhe-(ecdsa|rsa)|dhe-rsa|tls13)-')
 
 def gen_stats(self, record):
-for k, v in self.key_value_pairs.findall(record):
-if k == 'SSR':
+d = {k.lower(): v.lower() for
+ (k, v) in self.key_value_pairs.findall(record)}
+if 'ssl' not in d:
+return
+# This creates the legacy split stats:
+for (k, v) in d.items():
+if k == 'ssr':
 k = 'ssl_sessions'
 v = 'reused' if v == '1' else 'negotiated'
-elif k == 'C':
+elif k == 'c':
 k = 'ssl_cipher'
-elif k == 'EC':
+elif k == 'ec':
 k = 'ssl_ecdhe_curve'
 v = v.replace('.', '_')
-s = '.'.join((k, v)).lower()
+s = '.'.join((k, v))
 self.stats[s] = self.stats.get(s, 0) + 1
+# This creates the new hierarchical stats (one stat bump per record)
+parts = ('tls', d['ssl'].replace('.', '_'))
+kxam = self.kxa.match(d['c'])
+if kxam:
+ciph = self.kxa.sub('', d['c'])
+if kxam.group(1) == 'ecdhe-ecdsa':
+parts += (d['ec'], 'ecdsa', ciph)
+elif kxam.group(1) == 'ecdhe-rsa':
+parts += (d['ec'], 'rsa', ciph)
+elif kxam.group(1) == 'dhe-rsa':
+parts += ('dhe', 'rsa', ciph)
+else:  # TLS13
+parts += (d['ec'], 'ecdsa', ciph)
+else:
+parts += ('rsa', 'rsa', d['c'])
+s = '.'.join(parts)
+self.stats[s] = self.stats.get(s, 0) + 1
 
 
 if __name__ == "__main__":

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a1d33ff3c195a9b9c218910ede6b1b2160e7da3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Ema 
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...prometheus-jmx-exporter[debian]: Initial debian commit

2017-09-15 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378037 )

Change subject: Initial debian commit
..


Initial debian commit

Bug: T175922
Change-Id: I1f1f634360e77ec60e5181e4f10263769b33f955
---
A debian/README.Debian
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/gbp.conf
A debian/patches/series
A debian/patches/wmf_archiva.patch
A debian/prometheus-jmx-exporter.dirs
A debian/rules
A debian/source/format
11 files changed, 139 insertions(+), 0 deletions(-)

Approvals:
  Muehlenhoff: Looks good to me, but someone else must approve
  Ottomata: Verified; Looks good to me, approved



diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 000..0d332c0
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,24 @@
+prometheus-jmx-exporter for Debian
+--
+
+This debian package will patch pom.xml to use the Wikimedia Archiva repository
+when running mvn package.  This allows us to build this package without
+reaching out to the external internet, as dependencies are mirrored internally.
+
+This builds and installs 2 .jar files into /usr/share/java/prometheus:
+
+  - jmx_prometheus_javaagent.jar
+  - jmx_prometheus_httpserver.jar
+
+== Building with WMF package_builder
+
+WMF uses a custom setup of pbuilder and cowbuilder to build packages.  In our 
setup
+(via the package_builder Puppet module), networking is disabled by default.  
In order
+for the build processes to reach archiva.wikimedia.org, you must set 
USENETWORK=yes
+in either your ~/.pbuilderrc file, or in /etc/pbuilderrc.  This variable
+will not work if you just set it on the CLI.
+
+Once done, run
+
+  DIST=stretch gbp buildpackage -us -uc
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..3cf553a
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+prometheus-jmx-exporter (0.10-1) stretch-wikimedia; urgency=low
+
+  * Initial release of 0.10
+
+ -- Andrew Otto (WMF)   Wed, 13 Sep 2017 19:45:37 +
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..6819359
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,16 @@
+Source: prometheus-jmx-exporter
+Priority: optional
+Maintainer: Andrew Otto (WMF) 
+Build-Depends: debhelper (>= 9), default-jdk, maven
+Standards-Version: 3.9.5
+Section: libs
+Homepage: https://github.com/prometheus/jmx_exporter
+
+Package: prometheus-jmx-exporter
+Architecture: all
+Depends: default-jre
+Description: JMX to Prometheus exporter
+ .
+ A Collector that can configurably scrape and expose mBeans of a JMX target.
+ It meant to be run as a Java Agent, exposing an HTTP server and scraping the 
local JVM.
+ This can be also run as an independent HTTP server and scrape remote JMX 
targets.
diff --git a/debian/copyright b/debian/copyright
new file mode 12
index 000..7a694c9
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1 @@
+LICENSE
\ No newline at end of file
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 000..2795046
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,7 @@
+[buildpackage]
+upstream-tree=tag
+upstream-branch=master
+debian-branch=debian
+upstream-tag=parent-%(version)s
+debian-tag=debian/%(version)s
+builder=GIT_PBUILDER_AUTOCONF=no git-pbuilder -sa
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 000..ff8ee56
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+wmf_archiva.patch
diff --git a/debian/patches/wmf_archiva.patch b/debian/patches/wmf_archiva.patch
new file mode 100644
index 000..aad21a0
--- /dev/null
+++ b/debian/patches/wmf_archiva.patch
@@ -0,0 +1,45 @@
+Index: prometheus_jmx_exporter/pom.xml
+===
+--- prometheus_jmx_exporter.orig/pom.xml   2017-09-13 21:33:03.620188336 
+
 prometheus_jmx_exporter/pom.xml2017-09-13 21:33:34.312556367 +
+@@ -33,6 +33,40 @@
+   
+   
+ 
++  
++ 
++   central
++   http://repo1.maven.org/maven2
++   
++ false
++   
++   
++ false
++   
++ 
++ 
++   wmf-mirrored
++   https://archiva.wikimedia.org/repository/mirrored/
++ 
++   
++
++   
++ 
++   central
++   http://repo1.maven.org/maven2
++   
++ false
++   
++   
++ false
++   
++ 
++ 
++   wmf-mirrored
++   https://archiva.wikimedia.org/repository/mirrored/
++ 
++   
++
+   
+   
+   The Apache Software License, Version 2.0
diff --git a/debian/prometheus-jmx-exporter.dirs 
b/debian/prometheus-jmx-exporter.dirs
new file mode 100644
index 000..15de8e3
--- /dev/null
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Remove unused polyfills from EasyDeflate lib

2017-09-15 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378248 )

Change subject: Remove unused polyfills from EasyDeflate lib
..

Remove unused polyfills from EasyDeflate lib

Base64 and TypedArrays polyfills were required to
support IE9, but VE now requires IE10.

* http://www.caniuse.com/#feat=atob-btoa
* http://www.caniuse.com/#feat=typedarrays

Change-Id: I311a16f98fb1d091f55dda52d97bebfc012e2a14
---
M extension.json
D lib/Base64.js/LICENSE
D lib/Base64.js/README.md
D lib/Base64.js/base64.js
D lib/Easy-Deflate/typedarrays.js
5 files changed, 1 insertion(+), 234 deletions(-)


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

diff --git a/extension.json b/extension.json
index f986095..42529c1 100644
--- a/extension.json
+++ b/extension.json
@@ -186,22 +186,9 @@
]
},
"ResourceModules": {
-   "Base64.js": {
-   "scripts": [
-   "lib/Base64.js/base64.js"
-   ],
-   "targets": [
-   "desktop",
-   "mobile"
-   ]
-   },
"easy-deflate.core": {
"scripts": [
-   "lib/Easy-Deflate/easydeflate.js",
-   "lib/Easy-Deflate/typedarrays.js"
-   ],
-   "dependencies": [
-   "Base64.js"
+   "lib/Easy-Deflate/easydeflate.js"
],
"targets": [
"desktop",
diff --git a/lib/Base64.js/LICENSE b/lib/Base64.js/LICENSE
deleted file mode 100644
index 4832767..000
--- a/lib/Base64.js/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-Version 2, December 2004
-
- Copyright (c) 2011..2012 David Chambers 
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. You just DO WHAT THE FUCK YOU WANT TO.
diff --git a/lib/Base64.js/README.md b/lib/Base64.js/README.md
deleted file mode 100644
index e5dafed..000
--- a/lib/Base64.js/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Base64.js
-
-≈ 500 byte* polyfill for browsers which don't provide [`window.btoa`][1] and
-[`window.atob`][2].
-
-Although the script does no harm in browsers which do provide these functions,
-a conditional script loader such as [yepnope][3] can prevent unnecessary HTTP
-requests.
-
-```javascript
-yepnope({
-  test: window.btoa && window.atob,
-  nope: 'base64.js',
-  callback: function () {
-// `btoa` and `atob` are now safe to use
-  }
-})
-```
-
-Base64.js stems from a [gist][4] by [yahiko][5].
-
-### Running the test suite
-
-make setup
-make test
-
-\* Minified and gzipped. Run `make bytes` to verify.
-
-
-[1]: https://developer.mozilla.org/en/DOM/window.btoa
-[2]: https://developer.mozilla.org/en/DOM/window.atob
-[3]: http://yepnopejs.com/
-[4]: https://gist.github.com/229984
-[5]: https://github.com/yahiko
diff --git a/lib/Base64.js/base64.js b/lib/Base64.js/base64.js
deleted file mode 100644
index b82dded..000
--- a/lib/Base64.js/base64.js
+++ /dev/null
@@ -1,61 +0,0 @@
-;(function () {
-
-  var object = typeof exports != 'undefined' ? exports : this; // #8: web 
workers
-  var chars = 
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
-
-  function InvalidCharacterError(message) {
-this.message = message;
-  }
-  InvalidCharacterError.prototype = new Error;
-  InvalidCharacterError.prototype.name = 'InvalidCharacterError';
-
-  // encoder
-  // [https://gist.github.com/999166] by [https://github.com/nignag]
-  object.btoa || (
-  object.btoa = function (input) {
-var str = String(input);
-for (
-  // initialize result and counter
-  var block, charCode, idx = 0, map = chars, output = '';
-  // if the next str index does not exist:
-  //   change the mapping table to "="
-  //   check if d has no fractional digits
-  str.charAt(idx | 0) || (map = '=', idx % 1);
-  // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
-  output += map.charAt(63 & block >> 8 - idx % 1 * 8)
-) {
-  charCode = str.charCodeAt(idx += 3/4);
-  if (charCode > 0xFF) {
-throw new InvalidCharacterError("'btoa' failed: The string to be 
encoded contains characters outside of the Latin1 range.");
-  }
-  block = block << 8 | charCode;
-}
-return output;
-  });
-
-  // decoder
-  // [https://gist.github.com/1020396] by 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Prevent openssl downgrade error

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

Change subject: Prevent openssl downgrade error
..


Prevent openssl downgrade error

Temporary workaround to prevent puppet from throwing errors.
openssl has (apparently) recently been pinned to an older version
in the WMF repo, and apt is not happy that it has to downgrade it.

Bug: T175717
Change-Id: I76b495d8f626c6457b514be97857402cdc4e5662
---
M puppet/modules/postfix/manifests/init.pp
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/puppet/modules/postfix/manifests/init.pp 
b/puppet/modules/postfix/manifests/init.pp
index 24d9405..9282bbb 100644
--- a/puppet/modules/postfix/manifests/init.pp
+++ b/puppet/modules/postfix/manifests/init.pp
@@ -9,8 +9,9 @@
 # to handle this unless we switch to using an exec block and actually
 # checking the currently installed version against some minimum.
 package { 'openssl':
-ensure => 'latest',
-before => Package['postfix'],
+ensure  => 'latest',
+before  => Package['postfix'],
+install_options => [ '--force-yes' ],
 }
 
 package { 'postfix': }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76b495d8f626c6457b514be97857402cdc4e5662
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
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...MinervaNeue[master]: Use 'remoteSkinPath' for qunit tests

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

Change subject: Use 'remoteSkinPath' for qunit tests
..


Use 'remoteSkinPath' for qunit tests

This isn't in an extension anymore :-)

Bug: T175863
Change-Id: I7d8846d0eb0f92c2e419a1e1b76e94ae19ff1137
---
M includes/Minerva.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Pmiazga: Looks good to me, approved
  jenkins-bot: Verified
  Phuedx: Looks good to me, approved
  Samtar: Looks good to me, but someone else must approve



diff --git a/includes/Minerva.hooks.php b/includes/Minerva.hooks.php
index 0d7f297..334f002 100644
--- a/includes/Minerva.hooks.php
+++ b/includes/Minerva.hooks.php
@@ -57,7 +57,7 @@
'skins.minerva.notifications.badge'
],
'localBasePath' => dirname( __DIR__ ),
-   'remoteExtPath' => 'MinervaNeue',
+   'remoteSkinPath' => 'MinervaNeue',
'targets' => [ 'mobile', 'desktop' ],
'scripts' => [

'tests/qunit/skins.minerva.notifications.badge/test_NotificationBadge.js'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d8846d0eb0f92c2e419a1e1b76e94ae19ff1137
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: Pmiazga 
Gerrit-Reviewer: Samtar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Updated patch for TinyMCEMerge branch 'master' of ssh://gerr...

2017-09-15 Thread Duncancrane (Code Review)
Duncancrane has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378247 )

Change subject: Updated patch for TinyMCEMerge branch 'master' of 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms into PFTINYMCE
..

Updated patch for TinyMCEMerge branch 'master' of 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms into PFTINYMCE

Conflicts:
PageForms.php
extension.json

Change-Id: I021ba8d1b35b3e14c5711879045529c46636d2c1
---
M PageForms.php
M extension.json
M libs/tinymce/PF_tinymce.js
D libs/tinymce/jquery.tinymce.min.js
D libs/tinymce/langs/readme.md
D libs/tinymce/plugins/advlist/plugin.min.js
D libs/tinymce/plugins/anchor/plugin.min.js
D libs/tinymce/plugins/autolink/plugin.min.js
D libs/tinymce/plugins/autoresize/plugin.js
D libs/tinymce/plugins/autoresize/plugin.min.js
D libs/tinymce/plugins/autosave/plugin.js
D libs/tinymce/plugins/autosave/plugin.min.js
D libs/tinymce/plugins/bbcode/plugin.js
D libs/tinymce/plugins/bbcode/plugin.min.js
D libs/tinymce/plugins/bswikicode/plugin.js
D libs/tinymce/plugins/charmap/plugin.min.js
D libs/tinymce/plugins/code/plugin.js
D libs/tinymce/plugins/code/plugin.min.js
D libs/tinymce/plugins/codesample/css/prism.css
D libs/tinymce/plugins/codesample/plugin.js
D libs/tinymce/plugins/codesample/plugin.min.js
D libs/tinymce/plugins/colorpicker/plugin.min.js
D libs/tinymce/plugins/compat3x/css/dialog.css
D libs/tinymce/plugins/compat3x/img/buttons.png
D libs/tinymce/plugins/compat3x/img/icons.gif
D libs/tinymce/plugins/compat3x/img/items.gif
D libs/tinymce/plugins/compat3x/img/menu_arrow.gif
D libs/tinymce/plugins/compat3x/img/menu_check.gif
D libs/tinymce/plugins/compat3x/img/progress.gif
D libs/tinymce/plugins/compat3x/img/tabs.gif
D libs/tinymce/plugins/compat3x/plugin.js
D libs/tinymce/plugins/compat3x/plugin.min.js
D libs/tinymce/plugins/compat3x/tiny_mce_popup.js
D libs/tinymce/plugins/compat3x/utils/editable_selects.js
D libs/tinymce/plugins/compat3x/utils/form_utils.js
D libs/tinymce/plugins/compat3x/utils/mctabs.js
D libs/tinymce/plugins/compat3x/utils/validate.js
D libs/tinymce/plugins/contextmenu/plugin.min.js
D libs/tinymce/plugins/directionality/plugin.js
D libs/tinymce/plugins/directionality/plugin.min.js
D libs/tinymce/plugins/emoticons/img/smiley-cool.gif
D libs/tinymce/plugins/emoticons/img/smiley-cry.gif
D libs/tinymce/plugins/emoticons/img/smiley-embarassed.gif
D libs/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif
D libs/tinymce/plugins/emoticons/img/smiley-frown.gif
D libs/tinymce/plugins/emoticons/img/smiley-innocent.gif
D libs/tinymce/plugins/emoticons/img/smiley-kiss.gif
D libs/tinymce/plugins/emoticons/img/smiley-laughing.gif
D libs/tinymce/plugins/emoticons/img/smiley-money-mouth.gif
D libs/tinymce/plugins/emoticons/img/smiley-sealed.gif
D libs/tinymce/plugins/emoticons/img/smiley-smile.gif
D libs/tinymce/plugins/emoticons/img/smiley-surprised.gif
D libs/tinymce/plugins/emoticons/img/smiley-tongue-out.gif
D libs/tinymce/plugins/emoticons/img/smiley-undecided.gif
D libs/tinymce/plugins/emoticons/img/smiley-wink.gif
D libs/tinymce/plugins/emoticons/img/smiley-yell.gif
D libs/tinymce/plugins/emoticons/plugin.js
D libs/tinymce/plugins/emoticons/plugin.min.js
D libs/tinymce/plugins/fullpage/plugin.js
D libs/tinymce/plugins/fullpage/plugin.min.js
D libs/tinymce/plugins/fullscreen/plugin.js
D libs/tinymce/plugins/fullscreen/plugin.min.js
D libs/tinymce/plugins/help/img/logo.png
D libs/tinymce/plugins/help/plugin.js
D libs/tinymce/plugins/help/plugin.min.js
D libs/tinymce/plugins/hr/plugin.js
D libs/tinymce/plugins/hr/plugin.min.js
D libs/tinymce/plugins/image/plugin.js
D libs/tinymce/plugins/image/plugin.min.js
D libs/tinymce/plugins/imagetools/plugin.js
D libs/tinymce/plugins/imagetools/plugin.min.js
D libs/tinymce/plugins/importcss/plugin.js
D libs/tinymce/plugins/importcss/plugin.min.js
D libs/tinymce/plugins/insertdatetime/plugin.min.js
D libs/tinymce/plugins/legacyoutput/plugin.js
D libs/tinymce/plugins/legacyoutput/plugin.min.js
D libs/tinymce/plugins/link/plugin.js
D libs/tinymce/plugins/link/plugin.min.js
D libs/tinymce/plugins/lists/plugin.min.js
D libs/tinymce/plugins/media/plugin.js
D libs/tinymce/plugins/media/plugin.min.js
D libs/tinymce/plugins/nonbreaking/plugin.min.js
D libs/tinymce/plugins/noneditable/plugin.min.js
D libs/tinymce/plugins/pagebreak/plugin.js
D libs/tinymce/plugins/pagebreak/plugin.min.js
D libs/tinymce/plugins/paste/plugin.js
D libs/tinymce/plugins/paste/plugin.min.js
M libs/tinymce/plugins/pf_wikicode/plugin.js
D libs/tinymce/plugins/preview/plugin.min.js
D libs/tinymce/plugins/print/plugin.js
D libs/tinymce/plugins/print/plugin.min.js
D libs/tinymce/plugins/save/plugin.min.js
D libs/tinymce/plugins/searchreplace/plugin.min.js
D libs/tinymce/plugins/spellchecker/plugin.js
D libs/tinymce/plugins/spellchecker/plugin.min.js
D libs/tinymce/plugins/tabfocus/plugin.js
D 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: varnishxcps: generate new hierarchical TLS stats

2017-09-15 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378246 )

Change subject: varnishxcps: generate new hierarchical TLS stats
..

varnishxcps: generate new hierarchical TLS stats

One of the main problems with our current TLS stats is that the
TLS attributes of a given request are counted up independently.

For example, with the current stats we know these two independent
facts:
1) That 0.7% of clients use DHE-RSA-AES128-SHA
2) That 95.6% use TLSv1.2, 0.3% use TLSv1.1, and 4.1% use TLSv1.0

But we can't answer questions like: "What percentage of
DHE-RSA-AES128-SHA negotiators used TLSv1.0?"

This hierarchical dataset can answer that question, and many
others like it (e.g. what percentage of chapoly negotiators also
use x25519?).  It will require a few new grafana boards to make
sense of it in different ways.

Change-Id: I7a1d33ff3c195a9b9c218910ede6b1b2160e7da3
---
M modules/varnish/files/varnishxcps
1 file changed, 41 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/378246/1

diff --git a/modules/varnish/files/varnishxcps 
b/modules/varnish/files/varnishxcps
index 9fbaf85..5b40f79 100755
--- a/modules/varnish/files/varnishxcps
+++ b/modules/varnish/files/varnishxcps
@@ -34,6 +34,19 @@
 from cachestats import CacheStatsSender
 
 
+# Our newer hierarchical stats are structured like:
+# tls
+# Where the legal values look like:
+# tls-version: tlsv1, tlsv1_1, tlsv1_2, tlsv1_3
+# key-exchange: x25519, prime256v1, ffdhe (?), dhe, rsa
+# auth: ecdsa, rsa
+# cipher: aes128-gcm-sha256 (stripped of kx-auth|tls13- prefix)
+# Note also that our current parsing and interpretation assumes:
+# 1) TLSv1.3 clients use ECDSA exclusively (we'll need to modify some nginx
+#stuff to do any differently...), or at least are capable...
+# 2) That if TLSv1.3+FFDHE gets used, the ffdhe will show up as the named curve
+#via openssl? (unlikely to be a problem?)
+
 class XcpsCacheStatsSender(CacheStatsSender):
 
 cmd = ['/usr/bin/varnishncsa', '-n', 'frontend',
@@ -47,19 +60,42 @@
 def __init__(self, argument_list):
 super(XcpsCacheStatsSender, self).__init__(argument_list)
 self.key_value_pairs = re.compile('([A-Z][A-Z0-9]*)=([^;]+)')
+self.kxa = re.compile('^(ecdhe-(ecdsa|rsa)|dhe-rsa|tls13)-')
 
 def gen_stats(self, record):
-for k, v in self.key_value_pairs.findall(record):
-if k == 'SSR':
+d = {k.lower(): v.lower() for
+ (k, v) in self.key_value_pairs.findall(record)}
+if 'ssl' not in d:
+return
+# This creates the legacy split stats:
+for (k, v) in d.items():
+if k == 'ssr':
 k = 'ssl_sessions'
 v = 'reused' if v == '1' else 'negotiated'
-elif k == 'C':
+elif k == 'c':
 k = 'ssl_cipher'
-elif k == 'EC':
+elif k == 'ec':
 k = 'ssl_ecdhe_curve'
 v = v.replace('.', '_')
-s = '.'.join((k, v)).lower()
+s = '.'.join((k, v))
 self.stats[s] = self.stats.get(s, 0) + 1
+# This creates the new hierarchical stats (one stat bump per record)
+parts = ('tls', d['ssl'].replace('.', '_'))
+kxam = self.kxa.match(d['c'])
+if kxam:
+ciph = self.kxa.sub('', d['c'])
+if kxam.group(1) == 'ecdhe-ecdsa':
+parts += (d['ec'], 'ecdsa', ciph)
+elif kxam.group(1) == 'ecdhe-rsa':
+parts += (d['ec'], 'rsa', ciph)
+elif kxam.group(1) == 'dhe-rsa':
+parts += ('dhe', 'rsa', ciph)
+else:  # TLS13
+parts += (d['ec'], 'ecdsa', ciph)
+else:
+parts += ('rsa', 'rsa', d['c'])
+s = '.'.join(parts)
+self.stats[s] = self.stats.get(s, 0) + 1
 
 
 if __name__ == "__main__":

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] maps: move to vector tiles and cleartables

2017-09-15 Thread Gehel (Code Review)
Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378245 )

Change subject: [WIP] maps: move to vector tiles and cleartables
..

[WIP] maps: move to vector tiles and cleartables

* new OSM update script
* new database name

Bug: T157613
Change-Id: Ida723dee967cffb4ed44b46b14f7257f0a146ffd
---
A hieradata/role/common/maps/test/vectortiles_master.yaml
A modules/osm/files/process-osm-data.sh
A modules/osm/manifests/cleartables_sync.pp
A modules/osm/manifests/meddo.pp
M modules/profile/manifests/maps/osm_master.pp
M modules/profile/templates/maps/grants-gis.sql.erb
A modules/role/manifests/maps/test/vectortiles_master.pp
7 files changed, 456 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/378245/1

diff --git a/hieradata/role/common/maps/test/vectortiles_master.yaml 
b/hieradata/role/common/maps/test/vectortiles_master.yaml
new file mode 100644
index 000..6833913
--- /dev/null
+++ b/hieradata/role/common/maps/test/vectortiles_master.yaml
@@ -0,0 +1,32 @@
+# the following passwords are defined in private repo:
+#profile::maps::osm_master::kartotherian_pass: some_password
+#profile::maps::osm_master::tilerator_pass: some_password
+#profile::maps::osm_master::tileratorui_pass: some_password
+#profile::maps::osm_master::osmimporter_pass: some_password
+#profile::maps::osm_master::osmupdater_pass: some_password
+#profile::maps::osm_master::replication_pass: some_password
+#profile::maps::cassandra::kartotherian_pass: some_password
+#profile::maps::cassandra::tilerator_pass: some_password
+#profile::maps::cassandra::tileratorui_pass: some_password
+#profile::cassandra::single_instance::super_pass: some_password
+
+admin::groups:
+  - maps-admins
+  - kartotherian-admin
+  - tilerator-admin
+
+cluster: 'maps-test-vector'
+
+profile::cassandra::single_instance::graphite_host: 'graphite-in.eqiad.wmnet'
+service::configuration::statsd_host: 'statsd.eqiad.wmnet'
+
+cassandra::metrics::blacklist:
+  - .*\.metrics\.Table\..*$
+
+profile::redis::master::instances: ['6379']
+profile::redis::master::settings:
+  bind: "0.0.0.0"
+
+profile::maps::postgresql_common::shared_buffers: '4GB'
+profile::maps::postgresql_common::maintenance_work_mem: '3GB'
+profile::maps::osm_master::cleartables: true
diff --git a/modules/osm/files/process-osm-data.sh 
b/modules/osm/files/process-osm-data.sh
new file mode 100644
index 000..db79fea
--- /dev/null
+++ b/modules/osm/files/process-osm-data.sh
@@ -0,0 +1,283 @@
+#!/usr/bin/env bash
+
+# This script will
+# 1. Download OSM data and load it into a DB
+# 2. Update that DB
+# 3. Keep a local copy of the planet up to date
+
+# Requirements
+# - osmium-tool
+# - osmosis
+# - osm2pgsql
+# - ClearTables
+# - meddo
+
+set -e
+
+CREATE_DB=false
+
+BASE_DIR="/srv/osm_replication"
+CLEARTABLES="/srv/deployment/tilerator/deploy/ClearTables"
+MEDDO="/srv/deployment/tilerator/deploy/meddo"
+
+DATABASE="ct"
+
+PLANET_DIR="$BASE_DIR/planet"
+PLANET_REPLICATION_BASE="$PLANET_DIR/planet-replication"
+DATABASE_REPLICATION_BASE="$PLANET_DIR/database-replication"
+
+# -E 3857 is not required on newer versions of osm2pgsql
+osm2pgsql_common_opts="-E 3857  --flat-nodes $PLANET_DIR/nodes.bin"
+osm2pgsql_import_opts="--cache 1 --number-processes 2"
+osm2pgsql_update_opts="--cache 1000 --number-processes 1"
+
+function show_setup_help() {
+  cat << EOF
+Usage: ${0##*/} setup data_url state_url replication_url
+
+Examples:
+  ${0##*/} setup 
http://download.geofabrik.de/north-america/canada/british-columbia-170101.osm.pbf
 \\
+
http://download.geofabrik.de/north-america/canada/british-columbia-updates/000/001/384.state.txt
 \\
+http://download.geofabrik.de/north-america/canada/british-columbia-updates
+
+EOF
+exit 1
+}
+
+function setup_data() {
+  if [ -z "$1" ]; then
+echo "data_url not set"
+show_setup_help
+exit 0
+  fi
+  if [ -z "$2" ]; then
+echo "state_url not set"
+show_setup_help
+exit 0
+  fi
+  if [ -z "$3" ]; then
+echo "replication_url not set"
+show_setup_help
+exit 0
+  fi
+  PLANET_URL="$1"
+  STATE_URL="$2"
+  REPLICATION_BASE="$3"
+
+  mkdir -p "$PLANET_DIR"
+  mkdir -p "$PLANET_REPLICATION_BASE"
+
+  cat < "$PLANET_REPLICATION_BASE/configuration.txt"
+# The URL of the directory containing change files.
+baseUrl=$REPLICATION_BASE
+
+# Allow 3 days of downloads
+maxInterval = 259200
+EOF
+
+  echo "Downloading files"
+  curl --retry 5 -o "$PLANET_DIR/osm-data.osm.pbf" "$PLANET_URL"
+  curl --retry 5 -o "$PLANET_REPLICATION_BASE/state.txt" "$STATE_URL"
+
+  # Call a function here to update the planet later
+}
+
+function onplanetupdateexit {
+[ -f "$PLANET_REPLICATION_BASE/state-prev.txt" ] && mv 
"$PLANET_REPLICATION_BASE/state-prev.txt" "$PLANET_REPLICATION_BASE/state.txt"
+}
+
+function load_borders() {
+  echo "Loading borders"
+  psql -d ct -v ON_ERROR_STOP=1 -Xq 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use new ApiVisualEditorEdit::tryDeflate method

2017-09-15 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378244 )

Change subject: Use new ApiVisualEditorEdit::tryDeflate method
..

Use new ApiVisualEditorEdit::tryDeflate method

Change-Id: Ib121e1a6ddbd3be876ab943486f3843c3681f6de
---
M api/ApiContentTranslationPublish.php
M api/ApiContentTranslationSave.php
2 files changed, 8 insertions(+), 29 deletions(-)


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

diff --git a/api/ApiContentTranslationPublish.php 
b/api/ApiContentTranslationPublish.php
index ec1d0b5..9c6d0d4 100644
--- a/api/ApiContentTranslationPublish.php
+++ b/api/ApiContentTranslationPublish.php
@@ -171,7 +171,10 @@
}
 
try {
-   $wikitext = 
$this->restbaseClient->convertHtmlToWikitext( $targetTitle, $this->getHtml() );
+   $wikitext = 
$this->restbaseClient->convertHtmlToWikitext(
+   $targetTitle,
+   ApiVisualEditorEdit::tryDeflate( 
$params['html'] )
+   );
} catch ( MWException $e ) {
if ( is_callable( [ $this, 'dieWithError' ] ) ) {
$this->dieWithError(
@@ -259,25 +262,6 @@

ContentTranslation\Notification::hundredthTranslation( $user );
break;
}
-   }
-
-   /**
-* Get the HTML content from request and abstract the compression it 
may have.
-* @return string The HTML content in the request. Decompressed, if it 
was compressed.
-*/
-   protected function getHtml() {
-   $params = $this->extractRequestParams();
-   $data = $params['html'];
-
-   if ( substr( $params['html'], 0, 11 ) === 'rawdeflate,' ) {
-   $data = gzinflate( base64_decode( substr( $params[ 
'html' ], 11 ) ) );
-   // gzinflate returns false on error.
-   if ( $data === false ) {
-   throw new InvalidArgumentException( 'Invalid 
HTML content.' );
-   }
-   }
-
-   return $data;
}
 
public function getAllowedParams() {
diff --git a/api/ApiContentTranslationSave.php 
b/api/ApiContentTranslationSave.php
index 6933221..9924ff2 100644
--- a/api/ApiContentTranslationSave.php
+++ b/api/ApiContentTranslationSave.php
@@ -45,7 +45,10 @@
$translation = $this->saveTranslation( $params, $translator );
$translationId = $translation->getTranslationId();
 
-   $translationUnits = $this->getTranslationUnits( 
$params['content'], $translationId );
+   $translationUnits = $this->getTranslationUnits(
+   ApiVisualEditorEdit::tryDeflate( $params['content'] ),
+   $translationId
+   );
$this->saveTranslationUnits( $translationUnits, $translation );
$validationResults = $this->validateTranslationUnits( 
$translationUnits, $translation );
 
@@ -160,14 +163,6 @@
$translationUnits = [];
if ( trim( $content ) === '' ) {
$this->dieWithError( [ 'apierror-paramempty', 'content' 
], 'invalidcontent' );
-   }
-
-   if ( substr( $content, 0, 11 ) === 'rawdeflate,' ) {
-   $content = gzinflate( base64_decode( substr( $content, 
11 ) ) );
-   // gzinflate returns false on error.
-   if ( $content === false ) {
-   $this->dieWithError( 
'apierror-cx-invalidsectioncontent', 'invalidcontent' );
-   }
}
 
$units = json_decode( $content, true );

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Bump celery ores worker # files limit

2017-09-15 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378239 )

Change subject: Bump celery ores worker # files limit
..


Bump celery ores worker # files limit

Bump to 8192 for now, since 4096 seems it's not enough

Bug: T174402
Change-Id: I2d68b23f352720e044d155350e1e04ffb43b760b
---
M modules/celery/templates/initscripts/celery.systemd.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/celery/templates/initscripts/celery.systemd.erb 
b/modules/celery/templates/initscripts/celery.systemd.erb
index 948fa7b..c87fd47 100644
--- a/modules/celery/templates/initscripts/celery.systemd.erb
+++ b/modules/celery/templates/initscripts/celery.systemd.erb
@@ -10,6 +10,7 @@
 --app <%= @app %> \
 --loglevel <%= @log_level %>
 SyslogIdentifier=celery-<%= @title %>
+LimitNOFILE=8192
 
 [Install]
 WantedBy=multi-user.target

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d68b23f352720e044d155350e1e04ffb43b760b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 
Gerrit-Reviewer: Alexandros Kosiaris 
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...BlueSpiceFoundation[master]: [WIP]: BSFoundation: DynamicFileDisplatcher initial

2017-09-15 Thread Pwirth (Code Review)
Pwirth has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378243 )

Change subject: [WIP]: BSFoundation: DynamicFileDisplatcher initial
..

[WIP]: BSFoundation: DynamicFileDisplatcher initial

Change-Id: I0289c32020607414db921499e3e16f331b9fae9b
---
A dynamic_file.php
M extension.json
A src/DynamicFileDispatcher.php
A src/DynamicFileDispatcher/UserProfileImage.php
4 files changed, 272 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/43/378243/1

diff --git a/dynamic_file.php b/dynamic_file.php
new file mode 100644
index 000..9b213e6
--- /dev/null
+++ b/dynamic_file.php
@@ -0,0 +1,46 @@
+checkUrlExtension() ) {
+   return;
+}
+
+// Set a dummy $wgTitle, because $wgTitle == null breaks various things
+// In a perfect world this wouldn't be necessary
+$wgTitle = Title::makeTitle(
+   NS_SPECIAL,
+   'Badtitle/dummy title for dynamic file calls set in dynamic_file.php'
+);
+
+// RequestContext will read from $wgTitle, but it will also whine about it.
+// In a perfect world this wouldn't be necessary either.
+RequestContext::getMain()->setTitle( $wgTitle );
+$fileDispatcher = null;
+try {
+   $fileDispatcher = DynamicFileDispatcher::newFromRequest(
+   RequestContext::getMain()
+   );
+
+   if ( !$fileDispatcher instanceof DynamicFileDispatcher ) {
+   throw new MWException( 'Bad file dispatcher module' );
+   }
+   header( 'Content-type: '.$fileDispatcher->getMimeType() );
+   readfile( $fileDispatcher->getInternalUrl() );
+   //$fileDispatcher->getContent();
+} catch ( Exception $e ) {
+   echo $e;
+}
+
+$mediawiki = new MediaWiki();
+$mediawiki->doPostOutputShutdown( 'fast' );
diff --git a/extension.json b/extension.json
index a3bc9b2..83da09c 100644
--- a/extension.json
+++ b/extension.json
@@ -435,6 +435,9 @@
"[http://www.hallowelt.com Hallo Welt! GmbH]"
]
},
+   "DynamicFileRegistry": {
+   "userprofileimage": 
"\\BlueSpice\\DynamicFileDispatcher\\UserProfileImage"
+   },
"ConfigFiles": []
},
"ConfigRegistry": {
diff --git a/src/DynamicFileDispatcher.php b/src/DynamicFileDispatcher.php
new file mode 100644
index 000..b82260a
--- /dev/null
+++ b/src/DynamicFileDispatcher.php
@@ -0,0 +1,179 @@
+getRequest()->getVal(
+   static::MODULE,
+   ''
+   );
+   }
+   $instance = static::factory( $params, $context );
+   $instance->extractParamsFromRequest();
+   return $instance;
+   }
+
+   protected static function getModule( $moduleName ) {
+   $modules = static::getModules();
+   if( !isset( $modules[$moduleName] ) ) {
+   return false;
+   }
+   return $modules[$moduleName];
+   }
+
+   protected static function getModules() {
+   if( static::$modules ) {
+   return static::$modules;
+   }
+   $config = \MediaWiki\MediaWikiServices::getInstance()
+   ->getConfigFactory()->makeConfig( 'bsg' );
+   static::$modules = $config->get( 'DynamicFileRegistry' );
+   return static::$modules;
+   }
+
+   protected function __construct( $params, $context ) {
+   $this->context = $context;
+   $this->extractParams( $params );
+   }
+
+   public function getParamDefinition() {
+   return [
+   static::MODULE => [
+   static::PARAM_TYPE => static::TYPE_STRING,
+   static::PARAM_DEFAULT => '',
+   ]
+   ];
+   }
+
+   protected function extractParams( $params ) {
+   $this->module = $params[ static::MODULE ];
+   foreach( $this->getParamDefinition() as $paramName => 
$definition ) {
+   if( $paramName === static::MODULE ) {
+   continue;
+   }
+   if( isset( $params[$paramName] ) ) {
+   $this->$paramName = $params[$paramName];
+   continue;
+   }
+   $this->$paramName = $definition[static::PARAM_DEFAULT];
+   }
+   }
+
+   protected function extractParamsFromRequest() {
+   $request = $this->getContext()->getRequest();
+   foreach( $this->getParamDefinition() as $paramName => 
$definition ) {
+   if( $paramName === static::MODULE ) {
+   continue;
+   }
+ 

  1   2   >