[MediaWiki-commits] [Gerrit] Update restbase to e9b661f - change (mediawiki...deploy)

2016-05-17 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Update restbase to e9b661f
..


Update restbase to e9b661f

List of changes:
d90a97f Start testing rate limiting on transform end points
f2e097c Set `log_only` option for rate limiter
2004b6a Limit the maximum rate of requests per IP
58f7909 Remove unused forwarded headers
e9b661f Update dependencies and release v0.13.0 (#615)
xxx Update node module dependencies

Change-Id: I406787829296149f91ebc2d4b456badda464f17d
---
M node_modules/bluebird/js/browser/bluebird.core.js
M node_modules/bluebird/js/browser/bluebird.core.min.js
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/release/map.js
M node_modules/bluebird/js/release/promise.js
M node_modules/bluebird/js/release/thenables.js
M node_modules/bluebird/js/release/using.js
M node_modules/bluebird/package.json
M node_modules/content-type/package.json
R node_modules/hoek/.npmignore
R node_modules/hoek/.travis.yml
R node_modules/hoek/LICENSE
R node_modules/hoek/images/hoek.png
R node_modules/hoek/lib/escape.js
R node_modules/hoek/lib/index.js
R node_modules/hoek/package.json
R node_modules/hoek/test/escaper.js
R node_modules/hoek/test/index.js
R node_modules/hoek/test/modules/test1.js
R node_modules/hoek/test/modules/test2.js
R node_modules/hoek/test/modules/test3.js
M node_modules/hyperswitch/lib/filters/http.js
M node_modules/hyperswitch/lib/filters/ratelimit_route.js
M node_modules/hyperswitch/lib/hyperswitch.js
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/hyperswitch/package.json
M node_modules/hyperswitch/test/hyperswitch/hyperswitch.js
M node_modules/hyperswitch/test/hyperswitch/test_config.yaml
M node_modules/js-yaml/bin/js-yaml.js
M node_modules/js-yaml/dist/js-yaml.js
M node_modules/js-yaml/dist/js-yaml.min.js
M node_modules/js-yaml/package.json
M node_modules/json-stable-stringify/package.json
M node_modules/jsonwebtoken/.jshintrc
M node_modules/jsonwebtoken/.travis.yml
A node_modules/jsonwebtoken/bin/changelog
M node_modules/jsonwebtoken/index.js
A node_modules/jsonwebtoken/node_modules/joi/.eslintignore
A node_modules/jsonwebtoken/node_modules/joi/.npmignore
A node_modules/jsonwebtoken/node_modules/joi/.travis.yml
A node_modules/jsonwebtoken/node_modules/joi/LICENSE
A node_modules/jsonwebtoken/node_modules/joi/examples/conditionalRequire.js
A node_modules/jsonwebtoken/node_modules/joi/examples/customMessage.js
A node_modules/jsonwebtoken/node_modules/joi/examples/multipleWhen.js
A node_modules/jsonwebtoken/node_modules/joi/generate-readme-toc.js
A node_modules/jsonwebtoken/node_modules/joi/images/joi.png
A node_modules/jsonwebtoken/node_modules/joi/images/validation.png
A node_modules/jsonwebtoken/node_modules/joi/lib/alternatives.js
A node_modules/jsonwebtoken/node_modules/joi/lib/any.js
A node_modules/jsonwebtoken/node_modules/joi/lib/array.js
A node_modules/jsonwebtoken/node_modules/joi/lib/binary.js
A node_modules/jsonwebtoken/node_modules/joi/lib/boolean.js
A node_modules/jsonwebtoken/node_modules/joi/lib/cast.js
A node_modules/jsonwebtoken/node_modules/joi/lib/date.js
A node_modules/jsonwebtoken/node_modules/joi/lib/errors.js
A node_modules/jsonwebtoken/node_modules/joi/lib/index.js
A node_modules/jsonwebtoken/node_modules/joi/lib/language.js
A node_modules/jsonwebtoken/node_modules/joi/lib/number.js
A node_modules/jsonwebtoken/node_modules/joi/lib/object.js
A node_modules/jsonwebtoken/node_modules/joi/lib/ref.js
A node_modules/jsonwebtoken/node_modules/joi/lib/string.js
A node_modules/jsonwebtoken/node_modules/joi/lib/string/ip.js
A node_modules/jsonwebtoken/node_modules/joi/lib/string/rfc3986.js
A node_modules/jsonwebtoken/node_modules/joi/lib/string/uri.js
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/.npmignore
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/.travis.yml
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/LICENSE
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/Makefile
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/index.js
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/lib/isemail.js
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/package.json
A 
node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/test/isemail.js
A 
node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/test/mocha.opts
A 
node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/test/tests.json
C node_modules/jsonwebtoken/node_modules/joi/node_modules/topo/.npmignore
A node_modules/jsonwebtoken/node_modules/joi/node_modules/topo/.travis.yml
A node_modules/jsonwebtoken/node_modules/joi/node_modules/topo/LICENSE
A node_modules/jsonwebtoken/node_modules/joi/node_modules/topo/lib/index.

[MediaWiki-commits] [Gerrit] Activate nosetrim to reduce repeated errors - change (pywikibot/core)

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

Change subject: Activate nosetrim to reduce repeated errors
..


Activate nosetrim to reduce repeated errors

The OAuth jobs for wmfbeta sites are failing due to an authentication
problem, causing mosts tests to fail.

Nose normally and helpfully emits a lot of logging information for failed jobs.
However when there is a systemic problem, as currently occurs with the
wmfbeta sites, the result is the job logs are very large, which affects
developers ability to understand the failures and it exceeds the Travis
maximum log size.

Change-Id: I048e04a9451d25bf6893755bf73007f944578191
---
M .travis.yml
M dev-requirements.txt
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index 90cbacb..1930065 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -91,9 +91,9 @@
   nosetests --version ;
   if [[ "$SITE_ONLY" == "1" ]]; then
 echo "Running site tests only code ${LANGUAGE} on family ${FAMILY}" ;
-python setup.py nosetests --tests tests --verbosity=2 -a 
"family=$FAMILY,code=$LANGUAGE" --with-coverage --cover-package=. ;
+python setup.py nosetests --tests tests --verbosity=2 -a 
"family=$FAMILY,code=$LANGUAGE" --with-trim --with-coverage --cover-package=. ;
   else
-python setup.py nosetests --tests tests --verbosity=2 --with-coverage 
--cover-package=. ;
+python setup.py nosetests --tests tests --verbosity=2 --with-trim 
--with-coverage --cover-package=. ;
   fi ;
 else
   coverage run setup.py test ;
diff --git a/dev-requirements.txt b/dev-requirements.txt
index d990436..8243906 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -5,6 +5,7 @@
 six
 
 nose
+git+https://github.com/jayvdb/nosetrim@py3
 
 pep257>=0.6
 pyflakes>=0.9

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I048e04a9451d25bf6893755bf73007f944578191
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update restbase to e9b661f - change (mediawiki...deploy)

2016-05-17 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

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

Change subject: Update restbase to e9b661f
..

Update restbase to e9b661f

List of changes:
d90a97f Start testing rate limiting on transform end points
f2e097c Set `log_only` option for rate limiter
2004b6a Limit the maximum rate of requests per IP
58f7909 Remove unused forwarded headers
e9b661f Update dependencies and release v0.13.0 (#615)
xxx Update node module dependencies

Change-Id: I406787829296149f91ebc2d4b456badda464f17d
---
M node_modules/bluebird/js/browser/bluebird.core.js
M node_modules/bluebird/js/browser/bluebird.core.min.js
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/release/map.js
M node_modules/bluebird/js/release/promise.js
M node_modules/bluebird/js/release/thenables.js
M node_modules/bluebird/js/release/using.js
M node_modules/bluebird/package.json
M node_modules/content-type/package.json
R node_modules/hoek/.npmignore
R node_modules/hoek/.travis.yml
R node_modules/hoek/LICENSE
R node_modules/hoek/images/hoek.png
R node_modules/hoek/lib/escape.js
R node_modules/hoek/lib/index.js
R node_modules/hoek/package.json
R node_modules/hoek/test/escaper.js
R node_modules/hoek/test/index.js
R node_modules/hoek/test/modules/test1.js
R node_modules/hoek/test/modules/test2.js
R node_modules/hoek/test/modules/test3.js
M node_modules/hyperswitch/lib/filters/http.js
M node_modules/hyperswitch/lib/filters/ratelimit_route.js
M node_modules/hyperswitch/lib/hyperswitch.js
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/hyperswitch/package.json
M node_modules/hyperswitch/test/hyperswitch/hyperswitch.js
M node_modules/hyperswitch/test/hyperswitch/test_config.yaml
M node_modules/js-yaml/bin/js-yaml.js
M node_modules/js-yaml/dist/js-yaml.js
M node_modules/js-yaml/dist/js-yaml.min.js
M node_modules/js-yaml/package.json
M node_modules/json-stable-stringify/package.json
M node_modules/jsonwebtoken/.jshintrc
M node_modules/jsonwebtoken/.travis.yml
A node_modules/jsonwebtoken/bin/changelog
M node_modules/jsonwebtoken/index.js
A node_modules/jsonwebtoken/node_modules/joi/.eslintignore
A node_modules/jsonwebtoken/node_modules/joi/.npmignore
A node_modules/jsonwebtoken/node_modules/joi/.travis.yml
A node_modules/jsonwebtoken/node_modules/joi/LICENSE
A node_modules/jsonwebtoken/node_modules/joi/examples/conditionalRequire.js
A node_modules/jsonwebtoken/node_modules/joi/examples/customMessage.js
A node_modules/jsonwebtoken/node_modules/joi/examples/multipleWhen.js
A node_modules/jsonwebtoken/node_modules/joi/generate-readme-toc.js
A node_modules/jsonwebtoken/node_modules/joi/images/joi.png
A node_modules/jsonwebtoken/node_modules/joi/images/validation.png
A node_modules/jsonwebtoken/node_modules/joi/lib/alternatives.js
A node_modules/jsonwebtoken/node_modules/joi/lib/any.js
A node_modules/jsonwebtoken/node_modules/joi/lib/array.js
A node_modules/jsonwebtoken/node_modules/joi/lib/binary.js
A node_modules/jsonwebtoken/node_modules/joi/lib/boolean.js
A node_modules/jsonwebtoken/node_modules/joi/lib/cast.js
A node_modules/jsonwebtoken/node_modules/joi/lib/date.js
A node_modules/jsonwebtoken/node_modules/joi/lib/errors.js
A node_modules/jsonwebtoken/node_modules/joi/lib/index.js
A node_modules/jsonwebtoken/node_modules/joi/lib/language.js
A node_modules/jsonwebtoken/node_modules/joi/lib/number.js
A node_modules/jsonwebtoken/node_modules/joi/lib/object.js
A node_modules/jsonwebtoken/node_modules/joi/lib/ref.js
A node_modules/jsonwebtoken/node_modules/joi/lib/string.js
A node_modules/jsonwebtoken/node_modules/joi/lib/string/ip.js
A node_modules/jsonwebtoken/node_modules/joi/lib/string/rfc3986.js
A node_modules/jsonwebtoken/node_modules/joi/lib/string/uri.js
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/.npmignore
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/.travis.yml
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/LICENSE
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/Makefile
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/index.js
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/lib/isemail.js
A node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/package.json
A 
node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/test/isemail.js
A 
node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/test/mocha.opts
A 
node_modules/jsonwebtoken/node_modules/joi/node_modules/isemail/test/tests.json
C node_modules/jsonwebtoken/node_modules/joi/node_modules/topo/.npmignore
A node_modules/jsonwebtoken/node_modules/joi/node_modules/topo/.travis.yml
A node_modules/jsonwebtoken/node_modules/joi/node_modules/topo/LICENSE
A node_modules/jsonwebtoken/node_modules

[MediaWiki-commits] [Gerrit] Remove access credentials for kleduc - change (operations/puppet)

2016-05-17 Thread Muehlenhoff (Code Review)
Muehlenhoff has submitted this change and it was merged.

Change subject: Remove access credentials for kleduc
..


Remove access credentials for kleduc

Change-Id: I82dc04353df6272c524f104604b3df357f64d7c2
---
M modules/admin/data/data.yaml
1 file changed, 7 insertions(+), 8 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index ea6ad11..447daf3 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -4,7 +4,7 @@
 members: [ananthrk, avar, bsitu, cmcmahon, csalvia, diederik, edenhill, 
erik, gage,
   handrade, howief, jdouglas, jgonera, jsahleen, mah, maryana, 
mglaser, mvolz,
   mwalker, nimishg, rainman, ssmith, swalling, sumanah, werdna, 
rmoen,
-  johnflewis, marc, jkrauska, akumar, mnoushad, spage, tnegrin, 
msyed]
+  johnflewis, marc, jkrauska, akumar, mnoushad, spage, tnegrin, 
msyed, kleduc]
   wikidev:
 gid: 500
 description: container group for primary user groups.
@@ -72,7 +72,7 @@
 gid: 707
 description: these folks are allowed bastion _only_ access
 members: [jforrester, jmorgan, dfoy, junikowski, cwdent,
-  haithams, mhurd, dbrant, kleduc, bsitzmann, deskana, chedasaurus,
+  haithams, mhurd, dbrant, bsitzmann, deskana, chedasaurus,
   jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, 
jkatz,
   bmansurov, west1, jhernandez, smalyshev, tbayer, zfilipin,
   joal, thcipriani, daisy, ashwinpp, jhobs, tomasz, lpintscher,
@@ -115,7 +115,7 @@
 members: [awight, bmansurov, catrope, dartar, declerambaul, deskana,
   dduvall, ellery, ezachte, gilles, haithams, halfak,
   ironholds, jforrester, jkatz, jmorgan, jzerebecki, kaldari,
-  kleduc, leila, mattflaschen, milimetric, nettrom, bearloga,
+  leila, mattflaschen, milimetric, nettrom, bearloga,
   nuria, ori, otto, springle, yurik, yuvipanda,
   mforns, jdlrobson, dr0ptp4kt, tgr, marktraceur, jhernandez, joal,
   daisy, tomasz, mholloway-shell, madhuvishy, ebernhardson, 
niedzielski,
@@ -188,7 +188,7 @@
  group.
 members: [haithams, ezachte, milimetric, dartar, yurik,
   halfak, awight, dr0ptp4kt, nuria, leila,
-  ironholds, kleduc, ellery, nettrom, mforns,
+  ironholds, ellery, nettrom, mforns,
   bmansurov, tbayer, joal, ashwinpp,
   madhuvishy, tjones, legoktm, dcausse, bearloga,
   dpatrick, atgomez, dstrine]
@@ -232,7 +232,7 @@
  Those files are group readable by the 
analytics-privatedata-users group.
 members: [dartar, milimetric, yurik, dfoy, aude, jforrester,
   halfak, dr0ptp4kt, ironholds, bearloga, cwdent, elukey,
-  kleduc, nuria, haithams, otto, deskana, zhousquared,
+  nuria, haithams, otto, deskana, zhousquared,
   bsitzmann, dbrant, declerambaul, ellery, nettrom, leila,
   ezachte, mforns, reedy, west1, phuedx, awight, junikowski,
   joal, jamesur, akosiaris, jhobs, lpintscher, jkatz, madhuvishy, 
gpaumier,
@@ -1259,12 +1259,11 @@
 ssh_keys: []
 uid: 1232
   kleduc:
-ensure: present
+ensure: absent
 gid: 500
 name: kleduc
 realname: Kevin Leduc
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDEN1wN2xn6tRzHBb0VrVMBE+ZQRvDFLyj2fPQpN2KQucMnXj8GlLzFJzXmW5Dwh0bAfhXUxAKudfAPLuRtnBz+gl/d17vmDRwgtqHIaMWWW8s9RFW3NmVj6wEA+KKV2A8MlHLaFUTL5egS7cAicK2EbEC4ej6+o4ONj/+Qo9h6niX8U0tMohTB/Ml6H08Oe9NJ6e3L8d/e9Acxmspc1id9bN8ek/MGwFGMYTC7WQHq8TVUgq5xpA6vbkct3sNON8ebHmaTR3ryPpr2Vpxz6h088eifDwRJMD5eSqFvLzt6iEdZEwNfqlbigGTwbbAUNBDNPNhzTZStDpa+T3OgIiOH
-kle...@wikimedia.org]
+ssh_keys: []
 uid: 4906
   sumanah:
 ensure: absent

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

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

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


[MediaWiki-commits] [Gerrit] Activate nosetrim to reduce repeated errors - change (pywikibot/core)

2016-05-17 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Activate nosetrim to reduce repeated errors
..

Activate nosetrim to reduce repeated errors

The OAuth jobs for wmfbeta sites are failing due to an authentication
problem, causing mosts tests to fail.

Nose normally and helpfully emits a lot of logging information for failed jobs.
However when there is a systemic problem, as currently occurs with the
wmfbeta sites, the result is the job logs are very large, which affects
developers ability to understand the failures and it exceeds the Travis
maximum log size.

Change-Id: I048e04a9451d25bf6893755bf73007f944578191
---
M .travis.yml
M dev-requirements.txt
2 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/55/289355/1

diff --git a/.travis.yml b/.travis.yml
index 90cbacb..1930065 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -91,9 +91,9 @@
   nosetests --version ;
   if [[ "$SITE_ONLY" == "1" ]]; then
 echo "Running site tests only code ${LANGUAGE} on family ${FAMILY}" ;
-python setup.py nosetests --tests tests --verbosity=2 -a 
"family=$FAMILY,code=$LANGUAGE" --with-coverage --cover-package=. ;
+python setup.py nosetests --tests tests --verbosity=2 -a 
"family=$FAMILY,code=$LANGUAGE" --with-trim --with-coverage --cover-package=. ;
   else
-python setup.py nosetests --tests tests --verbosity=2 --with-coverage 
--cover-package=. ;
+python setup.py nosetests --tests tests --verbosity=2 --with-trim 
--with-coverage --cover-package=. ;
   fi ;
 else
   coverage run setup.py test ;
diff --git a/dev-requirements.txt b/dev-requirements.txt
index d990436..8243906 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -5,6 +5,7 @@
 six
 
 nose
+git+https://github.com/jayvdb/nosetrim@py3
 
 pep257>=0.6
 pyflakes>=0.9

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I048e04a9451d25bf6893755bf73007f944578191
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

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


[MediaWiki-commits] [Gerrit] Move PropertyOrderProviders to Store directory - change (mediawiki...Wikibase)

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

Change subject: Move PropertyOrderProviders to Store directory
..


Move PropertyOrderProviders to Store directory

from "store" directory in WikibaseLib.

Change-Id: I5442697b5f4f8a495f5ee79bd96b7ec096573fb4
---
R lib/includes/Store/CachingPropertyOrderProvider.php
R lib/includes/Store/PropertyOrderProvider.php
R lib/includes/Store/PropertyOrderProviderException.php
R lib/includes/Store/WikiPagePropertyOrderProvider.php
4 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/lib/includes/store/CachingPropertyOrderProvider.php 
b/lib/includes/Store/CachingPropertyOrderProvider.php
similarity index 100%
rename from lib/includes/store/CachingPropertyOrderProvider.php
rename to lib/includes/Store/CachingPropertyOrderProvider.php
diff --git a/lib/includes/store/PropertyOrderProvider.php 
b/lib/includes/Store/PropertyOrderProvider.php
similarity index 100%
rename from lib/includes/store/PropertyOrderProvider.php
rename to lib/includes/Store/PropertyOrderProvider.php
diff --git a/lib/includes/store/PropertyOrderProviderException.php 
b/lib/includes/Store/PropertyOrderProviderException.php
similarity index 100%
rename from lib/includes/store/PropertyOrderProviderException.php
rename to lib/includes/Store/PropertyOrderProviderException.php
diff --git a/lib/includes/store/WikiPagePropertyOrderProvider.php 
b/lib/includes/Store/WikiPagePropertyOrderProvider.php
similarity index 100%
rename from lib/includes/store/WikiPagePropertyOrderProvider.php
rename to lib/includes/Store/WikiPagePropertyOrderProvider.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5442697b5f4f8a495f5ee79bd96b7ec096573fb4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Lucie Kaffee 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] CoreParserFunctions: Return 0 from {{PAGESIZE:}} when length... - change (mediawiki/core)

2016-05-17 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: CoreParserFunctions: Return 0 from {{PAGESIZE:}} when length is 
unknown
..

CoreParserFunctions: Return 0 from {{PAGESIZE:}} when length is unknown

Revision::getSize() might return null when the revision.rev_len field
is null. That should never happen normally (the field should get
backfilled as part of the update process), but we've also had a bug
where rev_len was not being recorded for empty pages (see T135414 for
details). It's saner to return a number here rather than empty string,
and 0 should actually be correct for all pages affected by that issue.

Bug: T20998
Change-Id: Ie12f0be24f00aaf8b90b25c4921a97df3b789369
---
M includes/parser/CoreParserFunctions.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/288997/1

diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index a55ddf3..f0b9207 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -766,6 +766,10 @@
// fetch revision from cache/database and return the value
$rev = self::getCachedRevisionObject( $parser, $title );
$length = $rev ? $rev->getSize() : 0;
+   if ( $length === null ) {
+   // We've had bugs where rev_len was not being recorded 
for empty pages, see T135414
+   $length = 0;
+   }
return self::formatRaw( $length, $raw );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie12f0be24f00aaf8b90b25c4921a97df3b789369
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] Add translate styles via addModuleStyles - change (mediawiki...Translate)

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

Change subject: Add translate styles via addModuleStyles
..


Add translate styles via addModuleStyles

Given ext.uls.buttons is a style only module it can
be added safely via addModuleStyles. This has the benefit
that it will not throw dependency errors in mobile at
the cost of the minor inconvenience of needing to add it
to the special pages that use it. On the long term rather
than using ext.uls.buttons we should use mediawiki.ui.button
or OOjs UI

Bug: T102922
Change-Id: I202f9aef491f357cefb44264093a894104692977
---
M Resources.php
M specials/SpecialManageTranslatorSandbox.php
M specials/SpecialTranslate.php
3 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index e55c636..99c564a 100644
--- a/Resources.php
+++ b/Resources.php
@@ -158,7 +158,6 @@
'ext.translate.hooks',
'ext.translate.loader',
'ext.translate.parsers',
-   'ext.uls.buttons',
'jquery.appear',
'jquery.textchange',
'mediawiki.Uri',
@@ -320,7 +319,6 @@
'dependencies' => array(
'ext.translate.loader',
'ext.translate.translationstashstorage',
-   'ext.uls.buttons',
'ext.uls.mediawiki',
'jquery.ui.dialog',
'mediawiki.api',
diff --git a/specials/SpecialManageTranslatorSandbox.php 
b/specials/SpecialManageTranslatorSandbox.php
index c729c12..b79e36e 100644
--- a/specials/SpecialManageTranslatorSandbox.php
+++ b/specials/SpecialManageTranslatorSandbox.php
@@ -38,6 +38,7 @@
$this->setHeaders();
$this->checkPermissions();
$out = $this->getOutput();
+   $out->addModuleStyles( 'ext.uls.buttons' );
$out->addModules( 
'ext.translate.special.managetranslatorsandbox' );
$this->stash = new TranslationStashStorage( wfGetDB( DB_MASTER 
) );
 
diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php
index 8212670..c64ce5d 100644
--- a/specials/SpecialTranslate.php
+++ b/specials/SpecialTranslate.php
@@ -87,6 +87,8 @@
$errors = $this->getFormErrors();
 
if ( $isBeta && $this->options['taction'] !== 'export' ) {
+   $out->addModuleStyles( 'ext.uls.buttons' );
+
$out->addHTML( Html::openElement( 'div', array(
'class' => 'grid ext-translate-container',
) ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I202f9aef491f357cefb44264093a894104692977
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Compact language links: Delay loading of jquery.uls module - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Compact language links: Delay loading of jquery.uls module
..


Compact language links: Delay loading of jquery.uls module

Load jquery.uls only when the trigger is clicked.
Reduces the initial footprint by 63.9 KB (uncompressed)

Bug: T135210
Change-Id: I972cb6ea1794485917ea530f7abe68bdddc2014f
---
M extension.json
M resources/js/ext.uls.compactlinks.js
2 files changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/extension.json b/extension.json
index 7fb2aa5..101d1f4 100644
--- a/extension.json
+++ b/extension.json
@@ -242,7 +242,6 @@
"styles": "css/ext.uls.compactlinks.less",
"dependencies": [
"es5-shim",
-   "jquery.uls.compact",
"mediawiki.language",
"mediawiki.ui.button"
],
diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index e1e6c3a..5fddbbb 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -69,7 +69,7 @@
return;
}
 
-   mw.loader.using( 'ext.uls.mediawiki' ).done( function 
() {
+   mw.loader.using( 'ext.uls.init' ).done( function () {
// If we're only a bit beyond max, limit to 7 
instead of 9.
// FIXME: This assumes the max is 9.
self.compactSize = ( self.listSize <= 12 ) ? 7 
: max;
@@ -187,8 +187,11 @@
var self = this;
 
this.$trigger.one( 'click', function () {
-   self.createSelector( self.$trigger );
-   self.$trigger.click();
+   // Load the ULS now.
+   mw.loader.using( 'ext.uls.mediawiki' ).done( 
function () {
+   self.createSelector( self.$trigger );
+   self.$trigger.click();
+   } );
} );
},
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I972cb6ea1794485917ea530f7abe68bdddc2014f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
Gerrit-Reviewer: Fomafix
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add stylelint and make required style fixes - change (mediawiki...Cite)

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

Change subject: Add stylelint and make required style fixes
..


Add stylelint and make required style fixes

Change-Id: I8a9def8056a72c3da0c066413e94311a1d839f5b
---
A .stylelintrc
M Gruntfile.js
M modules/ext.cite.a11y.css
M modules/ext.cite.style.css
M modules/ext.cite.style.fa.css
M modules/ext.cite.styles.css
A modules/ve-cite/.stylelintrc
M modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.css
M modules/ve-cite/ve.ui.MWReferenceIcons.css
M package.json
10 files changed, 116 insertions(+), 57 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000..2c90730
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,3 @@
+{
+   "extends": "stylelint-config-wikimedia"
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index bcccbea..4161ce9 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -11,6 +11,7 @@
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
jshint: {
options: {
@@ -38,6 +39,23 @@
src: '<%= jshint.all %>'
}
},
+   stylelint: {
+   core: {
+   src: [
+   '**/*.css',
+   '!modules/ve-cite/**',
+   '!node_modules/**'
+   ]
+   },
+   've-cite': {
+   options: {
+   configFile: 
'modules/ve-cite/.stylelintrc'
+   },
+   src: [
+   'modules/ve-cite/**/*.css'
+   ]
+   }
+   },
jsonlint: {
all: [
'**/*.json',
@@ -46,6 +64,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jscs:main', 'jsonlint', 
'banana' ] );
+   grunt.registerTask( 'test', [ 'jshint', 'jscs:main', 'stylelint', 
'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/ext.cite.a11y.css b/modules/ext.cite.a11y.css
index 4ea7a81..c267815 100644
--- a/modules/ext.cite.a11y.css
+++ b/modules/ext.cite.a11y.css
@@ -3,14 +3,16 @@
  * and 
https://en.wikipedia.org/w/index.php?oldid=572888139#Scrolling_past_the_bottom_of_the_page...
  */
 .cite-accessibility-label {
-   position: absolute !important;
/* Workaround a Webkit/Blink bug about positioning within columns as 
many wikis format references with several columns */
top: -9px;
-   clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
-   clip: rect(1px, 1px, 1px, 1px);
+   clip: rect( 1px 1px 1px 1px ); /* IE6, IE7 */
+   clip: rect( 1px, 1px, 1px, 1px );
+   /* stylelint-disable declaration-no-important */
+   position: absolute !important;
padding: 0 !important;
border: 0 !important;
height: 1px !important;
width: 1px !important;
+   /* stylelint-enable declaration-no-important */
overflow: hidden;
 }
diff --git a/modules/ext.cite.style.css b/modules/ext.cite.style.css
index 6a5e7b8..55f3e4f 100644
--- a/modules/ext.cite.style.css
+++ b/modules/ext.cite.style.css
@@ -11,39 +11,41 @@
 
 /* With a group set */
 span.mw-ref a[data-mw-group]::after {
-   content: "[" attr(data-mw-group) " " counter(mw-Ref, decimal) "]"}
+   content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, decimal ) ']';
+}
 
 /* Groups with special appearance */
-span.mw-ref a[data-mw-group="decimal"]::after {
-   content: "[" counter(mw-Ref, decimal) "]";
+span.mw-ref a[data-mw-group='decimal']::after {
+   content: '[' counter( mw-Ref, decimal ) ']';
 }
-span.mw-ref a[data-mw-group="lower-alpha"]::after {
-   content: "[" counter(mw-Ref, lower-alpha) "]";
+span.mw-ref a[data-mw-group='lower-alpha']::after {
+   content: '[' counter( mw-Ref, lower-alpha ) ']';
 }
-span.mw-ref a[data-mw-group="upper-alpha"]::after {
-   content: "[" counter(mw-Ref, upper-alpha) "]";
+span.mw-ref a[data-mw-group='upper-alpha']::after {
+   content: '[' counter( mw-Ref, upper-alpha ) ']';
 }
-span.mw-ref a[data-mw-group="lower-greek"]::after {
-   content: "[" counter(mw-Ref, lower-greek) "]";
+span.mw-ref a[data-mw-group='lower-greek']::after {
+   content: '[' counter( mw-Ref, lower-greek ) ']';
 }
-span.mw-ref a[data-mw-group="lower-roman"]::after {
-   content: "[" counter(mw-Ref, lower-roman) "]";
+span.mw-ref a[d

[MediaWiki-commits] [Gerrit] Avoid references to jquery.uls RL module from ext.uls.init - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Avoid references to jquery.uls RL module from ext.uls.init
..


Avoid references to jquery.uls RL module from ext.uls.init

Checks to see if language is supported can be also done using
jquery.uls.data

Bug: T135210
Change-Id: Ib6b0d31b33be10b38aba713c3c4ba5370a27a8f4
---
M resources/js/ext.uls.init.js
1 file changed, 3 insertions(+), 16 deletions(-)

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



diff --git a/resources/js/ext.uls.init.js b/resources/js/ext.uls.init.js
index 40ef11f..6cf4eee 100644
--- a/resources/js/ext.uls.init.js
+++ b/resources/js/ext.uls.init.js
@@ -20,8 +20,6 @@
 ( function ( $, mw ) {
'use strict';
 
-   var hasOwn = Object.prototype.hasOwnProperty;
-
mw.uls = mw.uls || {};
mw.uls.previousLanguagesStorageKey = 'uls-previous-languages';
mw.uls.languageSettingsModules = [ 'ext.uls.inputsettings', 
'ext.uls.displaysettings' ];
@@ -152,21 +150,10 @@
 
// Filter out unknown and unsupported languages
unique = $.grep( unique, function ( langCode ) {
-   var target;
-
-   // If the language is already known and defined, just 
use it
-   if ( hasOwn.call( $.fn.uls.defaults.languages, langCode 
) ) {
+   // If the language is already known and defined, just 
use it.
+   // $.uls.data.getAutonym will resolve redirects if any.
+   if ( $.uls.data.getAutonym( langCode ) !== langCode ) {
return true;
-   }
-
-   // If the language is not immediately known,
-   // try to check is as a redirect
-   target = $.uls.data.isRedirect( langCode );
-
-   if ( target ) {
-   // Check that the redirect's target is known
-   // to this instance of ULS
-   return hasOwn.call( 
$.fn.uls.defaults.languages, target );
}
 
return false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6b0d31b33be10b38aba713c3c4ba5370a27a8f4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mv files/misc/udp2log.init into modules/udp2log - change (operations/puppet)

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

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

Change subject: mv files/misc/udp2log.init into modules/udp2log
..

mv files/misc/udp2log.init into modules/udp2log

Change-Id: Ibc1488401b03e6b2ae252d5c0aae92d8aba22278
---
R modules/udp2log/files/udp2log.init
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/files/misc/udp2log.init b/modules/udp2log/files/udp2log.init
similarity index 93%
rename from files/misc/udp2log.init
rename to modules/udp2log/files/udp2log.init
index d361356..1587378 100755
--- a/files/misc/udp2log.init
+++ b/modules/udp2log/files/udp2log.init
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
-### THIS FILE IS MANAGED BY PUPPET 
-### puppet:///files/misc/udp2log.init
+### THIS FILE IS MANAGED BY PUPPET
+### puppet:///modules/udp2log/udp2log.init
 #
 
 # Start/stop the udp2log daemon.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc1488401b03e6b2ae252d5c0aae92d8aba22278
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] logging: move files/misc/demux.py to modules/udp2log - change (operations/puppet)

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

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

Change subject: logging: move files/misc/demux.py to modules/udp2log
..

logging: move files/misc/demux.py to modules/udp2log

Change-Id: I271ffe1998644756ef6c15e78a55eb17f8fec4c8
---
M manifests/role/logging.pp
R modules/udp2log/files/demux.py
2 files changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/53/289353/1

diff --git a/manifests/role/logging.pp b/manifests/role/logging.pp
index 4f7420d..ad58ade 100644
--- a/manifests/role/logging.pp
+++ b/manifests/role/logging.pp
@@ -42,7 +42,7 @@
 mode   => '0544',
 owner  => 'root',
 group  => 'root',
-source => 'puppet:///files/misc/demux.py',
+source => 'puppet:///modules/udp2log/demux.py',
 }
 
 $error_processor_host = $::realm ? {
diff --git a/files/misc/demux.py b/modules/udp2log/files/demux.py
similarity index 100%
rename from files/misc/demux.py
rename to modules/udp2log/files/demux.py

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I271ffe1998644756ef6c15e78a55eb17f8fec4c8
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] rm files/misc/scripts/rotate_fundraising_logs - change (operations/puppet)

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

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

Change subject: rm files/misc/scripts/rotate_fundraising_logs
..

rm files/misc/scripts/rotate_fundraising_logs

In the comment it says this is puppetized, but
then it seems like no puppet class is actually using it.

This is rather old, i think before FR switched to their
own puppet master. I assume it's just cruft in this repo.

But, Jeff Green, what do you say?

Change-Id: Idda8966735f2adf080701bdb4c85bbd3248ec48d
---
D files/misc/scripts/rotate_fundraising_logs
1 file changed, 0 insertions(+), 163 deletions(-)


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

diff --git a/files/misc/scripts/rotate_fundraising_logs 
b/files/misc/scripts/rotate_fundraising_logs
deleted file mode 100755
index 1e66e81..000
--- a/files/misc/scripts/rotate_fundraising_logs
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/perl
-# What? See 
http://wikitech.wikimedia.org/view/Fundraising_Analytics/Impression_Stats
-# this is puppetized, see files/misc/scripts/rotate_fundraising_logs
-use strict;
-use File::Copy 'move';
-use File::Find;
-use IO::Compress::Gzip qw(gzip $GzipError);
-use IO::Select;
-use IPC::Open3;
-use Sys::Syslog;
-
-my $ident = ($0 =~ /([^\/]+)$/) ? $1 : $0; # syslog identity
-my $udp2log_dir = '/a/log/fundraising/logs';   # local dir where udp2log 
collects logs
-my $archive_dir = "$udp2log_dir/fr_archive";   # netapp where logs are 
archived long term
-my $buffer_dir  = "$udp2log_dir/buffer";   # local buffer dir
-my $buffer_days = 3;   # days 
to retain buffered logs
-
-# list of log files (sans extension) to rotate
-my @logs_to_process = 
('beaconImpressions-sampled100.tsv','bannerImpressions-sampled100.tsv','landingpages.tsv','bannerRequests-sampled100.tsv');
-
-# keep the buffer_dir collated by year
-my $year = `/bin/date "+%Y"`;
-chomp $year;
-my $buffer_year_dir = "$buffer_dir/$year";
-unless (-d $buffer_year_dir) {
-   mkdir $buffer_year_dir or failboat("can't create $buffer_year_dir: $!");
-}
-
-failboat("$udp2log_dir is missing") unless -d $udp2log_dir;
-
-# move log files aside
-my $reload_udp2log;
-for my $file (@logs_to_process) {
-   if (-e "$udp2log_dir/$file.log") {
-   my $filesize = -s "$udp2log_dir/$file.log";
-   if ($filesize > 0) {
-   my $date = `/bin/date "+%Y%m%d-%H%M%S"`;
-   chomp $date;
-   printlog("move $udp2log_dir/$file.log (${filesize}b) to 
$buffer_year_dir/$file-$date.log");
-   move("$udp2log_dir/$file.log", 
"$buffer_year_dir/$file-$date.log") or failboat($!);
-   $reload_udp2log++;
-   } else {
-   printlog("skip $udp2log_dir/$file.log(${filesize}b)");
-   }
-   } else {
-   printlog("didn't find $udp2log_dir/$file.log?!");
-   }
-}
-
-# kick udp2log if any log files were moved
-if (defined $reload_udp2log) {
-
-   # restart udp2log
-   printlog('sudo /usr/bin/killall -HUP udp2log ' . `sudo /usr/bin/killall 
-HUP udp2log 2>&1`);
-
-   # wait for udp2log to switch to the new logs before touching the old 
ones
-   my $tries;
-   while (1) {
-   my $missing;
-   sleep 1;
-   for my $file (@logs_to_process) {
-   unless (-e "$udp2log_dir/$file.log") {
-   $missing .= " $file.log"
-   }
-   }
-   if (defined $missing) {
-   $tries++;
-   } elsif ($tries > 10) {
-   printlog("gave up waiting for udp2log to recreate 
$missing");
-   last;
-   } else {
-   last;
-   }
-   }
-}
-
-# walk $buffer_dir to cleanup/gzip contents
-find(\&process_buffer_files, $buffer_dir);
-
-# copy stuff to fr_archive if it's mounted
-if (!(-e "$archive_dir/.snapshot")) {
-
-   printlog("$archive_dir isn't mounted, logs are kept at $buffer_dir for 
$buffer_days days");
-
-} elsif (!(-w $archive_dir)) {
-
-   printlog("$archive_dir isn't writable, logs are kept at $buffer_dir for 
$buffer_days days");
-
-} else {
-
-   printlog("rsync -ar $buffer_dir/ $archive_dir/");
-
-   # open system call using open3 so we can cleanly address stderr vs 
stdout
-   my $child_pid = open3(*W, *R, *E, "rsync -ar $buffer_dir/ 
$archive_dir/");
-   close (W); # don't need the write handle at all, so we close that
-
-   # use IO::Select to loop through open3 filehandles until all output ends
-   my ($selector) = IO::Select->new();
-   $selector->add (*R, *E);
-   while (1) {
-   last if scalar ($selector->handles) == 0;
-   my @ready = $select

[MediaWiki-commits] [Gerrit] rm files/misc/scripts/Makefile - change (operations/puppet)

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

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

Change subject: rm files/misc/scripts/Makefile
..

rm files/misc/scripts/Makefile

This file has been added back in 2012,
but i'm wondering if anything actually uses it nowadays.

It's not used by a puppet class, but was added for convenience
it seems. I am just looking at it to see if it
can be moved out of files/misc/ into a module
(lint warning "puppet URL without module" etc)

hashar, since you added this. any thoughts?

Change-Id: If88ebfbfce44f8d5275daf61370a07e150a4ca39
---
D files/misc/scripts/Makefile
1 file changed, 0 insertions(+), 53 deletions(-)


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

diff --git a/files/misc/scripts/Makefile b/files/misc/scripts/Makefile
deleted file mode 100644
index 39a7590..000
--- a/files/misc/scripts/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# Makefile heavily based on the git project /Documentation/Makefile
-
-# AsciiDoc toolchain manager
-A2X=a2x
-A2X_EXTRA=
-
-ASCIIDOCS_DIR=asciidoc
-OUT_DIR=man
-
-RM ?= rm -f
-#SHELL += -x
-
-# List source files per sections
-# Ignore any asciidoc file not begining with a letter such as _
-MAN1_TXT= $(filter-out _%.txt,$(wildcard $(ASCIIDOCS_DIR)/[a-zA-Z]*.txt))
-
-# man files
-DOC_MAN1=$(patsubst $(ASCIIDOCS_DIR)/%.txt,$(OUT_DIR)/%.1,$(MAN1_TXT))
-DOC_MAN=$(DOC_MAN1)
-
-ifdef VERBOSE
-A2X_EXTRA += --verbose
-endif
-
-all: man
-
-clean: ; $(RM) $(OUT_DIR)/*.1
-
-clean-all: clean all
-
-man: prechecks $(DOC_MAN)
-
-# Conversion rule
-$(OUT_DIR)/%.1 : $(ASCIIDOCS_DIR)/%.txt
-   @if test -s $<; then \
-   echo "Converting '$<' to '$@'"; \
-   $(A2X) $(A2X_EXTRA) --destination-dir $(OUT_DIR) --doctype manpage 
--format manpage $<; fi
-
-prechecks: has_a2x
-   @echo "DOCMAN $(DOC_MAN)"
-   @echo "ASCIIDOCS_DIR: $(ASCIIDOCS_DIR)"
-
-has_a2x:
-   @echo "Checking if we have '$(A2X)'...\c"
-ifeq ("$(shell which $(A2X))","")
-   @echo "no"
-   @echo "\nRequires Asciidoc ($(A2X) not found). See README.\n" \
-   && exit 1
-else
-   @echo "ok"
-endif
-
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If88ebfbfce44f8d5275daf61370a07e150a4ca39
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] Update jquery.ime to d563f903c9e - change (mediawiki...UniversalLanguageSelector)

2016-05-17 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Update jquery.ime to d563f903c9e
..

Update jquery.ime to d563f903c9e

* Remove the undocumented Control+Enter shortcult for toggle

Bug: T106700
Bug: T134664
Change-Id: I1d62d751515016b3d028ecf6ae78a65eb1728391
---
M lib/jquery.ime/jquery.ime.js
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js
index 54e0bc0..3a8f59b 100644
--- a/lib/jquery.ime/jquery.ime.js
+++ b/lib/jquery.ime/jquery.ime.js
@@ -1,4 +1,4 @@
-/*! jquery.ime - v0.1.0+20160412
+/*! jquery.ime - v0.1.0+20160518
 * https://github.com/wikimedia/jquery.ime
 * Copyright (c) 2016 Santhosh Thottingal; Licensed GPL, MIT */
 ( function ( $ ) {
@@ -1538,8 +1538,7 @@
 */
function isShortcutKey( event ) {
// 77 - The letter M, for Ctrl-M
-   // 13 - The Enter key
-   return event.ctrlKey && !event.altKey && ( event.which === 77 
|| event.which === 13 );
+   return event.ctrlKey && !event.altKey && ( event.which === 77 );
}
 
function isDOMAttrModifiedSupported() {

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

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

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


[MediaWiki-commits] [Gerrit] Load Vector/Monobook editor styles for both editors, not jus... - change (mediawiki...Flow)

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

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

Change subject: Load Vector/Monobook editor styles for both editors, not just VE
..

Load Vector/Monobook editor styles for both editors, not just VE

Bug: T127244
Change-Id: I1772dad2196a5f891e9a1f27859a1df5a62eafd9
---
M Resources.php
R modules/styles/flow/widgets/editor/mw.flow.ui.editor-monobook.less
R modules/styles/flow/widgets/editor/mw.flow.ui.editor-vector.less
3 files changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index c6a872c..7c95ddd 100644
--- a/Resources.php
+++ b/Resources.php
@@ -414,6 +414,14 @@
'styles/flow/widgets/mw.flow.ui.CategoriesWidget.less',
'styles/flow/widgets/mw.flow.ui.TopicTitleWidget.less',
),
+   'skinStyles' => array(
+   'vector' => array(
+   
'styles/flow/widgets/editor/mw.flow.ui.editor-vector.less',
+   ),
+   'monobook' => array(
+   
'styles/flow/widgets/editor/mw.flow.ui.editor-monobook.less',
+   ),
+   ),
'messages' => array(
'flow-error-can-not-edit-logged-in',
'flow-error-can-not-edit-logged-out',
@@ -557,14 +565,6 @@
'styles' => array(
'editor/editors/visualeditor/mw.flow.ve.Target.less',

'editor/editors/visualeditor/ui/mw.flow.ve.ui.Icons.less',
-   ),
-   'skinStyles' => array(
-   'vector' => array(
-   
'editor/editors/visualeditor/mw.flow.ve.Target-vector.less',
-   ),
-   'monobook' => array(
-   
'editor/editors/visualeditor/mw.flow.ve.Target-monobook.less',
-   ),
),
'dependencies' => array(
'es5-shim',
diff --git 
a/modules/editor/editors/visualeditor/mw.flow.ve.Target-monobook.less 
b/modules/styles/flow/widgets/editor/mw.flow.ui.editor-monobook.less
similarity index 100%
rename from modules/editor/editors/visualeditor/mw.flow.ve.Target-monobook.less
rename to modules/styles/flow/widgets/editor/mw.flow.ui.editor-monobook.less
diff --git a/modules/editor/editors/visualeditor/mw.flow.ve.Target-vector.less 
b/modules/styles/flow/widgets/editor/mw.flow.ui.editor-vector.less
similarity index 100%
rename from modules/editor/editors/visualeditor/mw.flow.ve.Target-vector.less
rename to modules/styles/flow/widgets/editor/mw.flow.ui.editor-vector.less

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1772dad2196a5f891e9a1f27859a1df5a62eafd9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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] Get rid of email bundling - change (mediawiki...Echo)

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

Change subject: Get rid of email bundling
..


Get rid of email bundling

Bug: T135446
Change-Id: I95dc3d70c82c19d89b7a32be0c36294350d5c30d
---
M autoload.php
D includes/EmailBundler.php
M includes/Notifier.php
D includes/jobs/NotificationEmailBundleJob.php
4 files changed, 16 insertions(+), 367 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index ca77d8d..94047b0 100644
--- a/autoload.php
+++ b/autoload.php
@@ -108,11 +108,9 @@
'MWEchoDbFactory' => __DIR__ . '/includes/EchoDbFactory.php',
'MWEchoDbFactoryTest' => __DIR__ . 
'/tests/phpunit/EchoDbFactoryTest.php',
'MWEchoEmailBatch' => __DIR__ . '/includes/EmailBatch.php',
-   'MWEchoEmailBundler' => __DIR__ . '/includes/EmailBundler.php',
'MWEchoEventLogging' => __DIR__ . '/includes/EventLogging.php',
'MWEchoNotifUser' => __DIR__ . '/includes/NotifUser.php',
'MWEchoNotifUserTest' => __DIR__ . '/tests/phpunit/NotifUserTest.php',
-   'MWEchoNotificationEmailBundleJob' => __DIR__ . 
'/includes/jobs/NotificationEmailBundleJob.php',
'NotificationControllerTest' => __DIR__ . 
'/tests/phpunit/controller/NotificationControllerTest.php',
'NotificationsTest' => __DIR__ . '/tests/NotificationsTest.php',
'SpecialDisplayNotificationsConfiguration' => __DIR__ . 
'/includes/special/SpecialDisplayNotificationsConfiguration.php',
diff --git a/includes/EmailBundler.php b/includes/EmailBundler.php
deleted file mode 100644
index 0e114c7..000
--- a/includes/EmailBundler.php
+++ /dev/null
@@ -1,310 +0,0 @@
-mUser = $user;
-   $this->bundleHash = $hash;
-   $this->emailInterval = $wgEchoBundleEmailInterval;
-
-   if ( $this->emailInterval < 0 ) {
-   $this->emailInterval = 0;
-   }
-   }
-
-   /**
-* Factory method
-*/
-   public static function newFromUserHash( User $user, $hash ) {
-   if ( !$user->getId() ) {
-   return false;
-   }
-   if ( !$hash || !preg_match( '/^[a-f0-9]{32}$/', $hash ) ) {
-   return false;
-   }
-
-   return new self( $user, $hash );
-   }
-
-   /**
-* Check if a new notification should be added to the batch queue
-* true  - added to the queue for bundling email
-* false - not added, the client should send single email
-*
-* @param int $eventId
-* @param int $eventPriority
-*
-* @return bool
-*/
-   public function addToEmailBatch( $eventId, $eventPriority ) {
-   $this->retrieveLastEmailTimestamp();
-   $this->retrieveBaseEvent();
-
-   // send instant single notification email if there is no base 
event in the batch queue
-   // and the email is ready to send, otherwiase, add the email to 
batch and schedule
-   // a delayed job
-   if ( !$this->baseEvent && $this->shouldSendEmailNow() ) {
-   $this->timestamp = wfTimestampNow();
-   $this->updateEmailMetadata();
-
-   return false;
-   } else {
-   // add to email batch queue
-   MWEchoEmailBatch::addToQueue(
-   $this->mUser->getId(),
-   $eventId,
-   $eventPriority,
-   $this->bundleHash
-   );
-
-   // always push the job to job queue in case the 
previous job
-   // was lost, job queue will ignore duplicate
-   $this->pushToJobQueue( $this->getDelayTime() );
-
-   return true;
-   }
-   }
-
-   /**
-* Get the time diff since last email
-*/
-   protected function timeSinceLastEmail() {
-   // if there is no timestamp, next email should be sent right 
away
-   // set the time diff longer than the email interval
-   if ( !$this->timestamp ) {
-   return $this->emailInterval + 600;
-   }
-
-   $now = wfTimestamp( TS_UNIX );
-
-   return $now - wfTimestamp( TS_UNIX, $this->timestamp );
-   }
-
-   /**
-* Check if an email should be sent right away
-* @return bool
-*/
-   protected function shouldSendEmailNow() {
-   if ( $this->timeSinceLastEmail() > $this->emailInterval ) {
-   return true;
-   } else {
-   return false;
-   }
-   }
-
-   /**
-* Get the delay time
-* @return int
-   

[MediaWiki-commits] [Gerrit] Don't serve JS except on 'view' or 'history' - change (mediawiki...Flow)

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

Change subject: Don't serve JS except on 'view' or 'history'
..


Don't serve JS except on 'view' or 'history'

We have a history of JS errors on the secondary action pages (i.e. the
pages that links point to, used on no-JS or when people open things in
new windows).

Many of these pages have very bare-bones functionality.

This means that we can't be able to use things like VE
editors on these secondary pages, but in exchange we don't have to
worry about JS breakage on them.

(The data.flow[action] part of T73220 is fixed, not the whole bug)

Bug: T95468
Bug: T73220
Change-Id: I59b59abf73c14ff37ef92f77a4ef0f9e20077599
---
M FlowActions.php
M Resources.php
M modules/styles/js.less
A modules/styles/nojs.less
4 files changed, 36 insertions(+), 14 deletions(-)

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



diff --git a/FlowActions.php b/FlowActions.php
index 790a640..26b1410 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -39,7 +39,9 @@
  * * rc_title: Either 'article' or 'owner' to select between 
Workflow::getArticleTitle
  * or Workflow::getOwnerTitle being used as the related recentchanges 
entry on insert
  * * editcount: True to increment user's edit count for this action
- * * modules: Modules to insert with RL to html page for this action instead 
of the defaults
+ * * modules: Modules to insert with RL to html page for this action instead 
of the defaults.
+ * *   All actions other than view should have an array here, unless the 
default
+ * *   modules are known to work.  You can specify an empty array, or a custom 
set of modules.
  * * moduleStyles: Style modules to insert with RL to html page for this 
action instead of the defaults
  */
 $wgFlowActions = array(
@@ -81,6 +83,7 @@
'class' => 'flow-history-edit-header',
),
'handler-class' => 'Flow\Actions\FlowAction',
+   'modules' => array(),
'editcount' => true,
),
 
@@ -104,6 +107,7 @@
'class' => 'flow-history-edit-header',
),
'handler-class' => 'Flow\Actions\FlowAction',
+   'modules' => array(),
'editcount' => true,
// theis modules/moduleStyles is repeated in all the undo-* 
actions. Find a way to share.
'modules' => array( 'ext.flow.undo' ),
@@ -174,6 +178,7 @@
'class' => 'flow-history-edit-topic-summary',
),
'handler-class' => 'Flow\Actions\FlowAction',
+   'modules' => array(),
'editcount' => true,
),
 
@@ -205,6 +210,7 @@
'class' => 'flow-history-edit-topic-summary',
),
'handler-class' => 'Flow\Actions\FlowAction',
+   'modules' => array(),
'editcount' => true,
'modules' => array( 'ext.flow.undo' ),
'moduleStyles' => array(
@@ -239,13 +245,13 @@
'class' => 'flow-history-edit-title',
),
'handler-class' => 'Flow\Actions\FlowAction',
+   'modules' => array(),
'watch' => array(
'immediate' => array( 
'Flow\\Data\\Listener\\ImmediateWatchTopicListener', 'getCurrentUser' ),
),
'editcount' => true,
),
 
-   // Normal posts are the 'reply' type.
'new-topic' => array(
'performs-writes' => true,
'log_type' => false,
@@ -276,6 +282,7 @@
'class' => 'flow-history-new-post',
),
'handler-class' => 'Flow\Actions\FlowAction',
+   'modules' => array(),
'watch' => array(
'immediate' => array( 
'Flow\\Data\\Listener\\ImmediateWatchTopicListener', 'getCurrentUser' ),
),
@@ -308,6 +315,7 @@
'class' => 'flow-history-edit-post',
),
'handler-class' => 'Flow\Actions\FlowAction',
+   'modules' => array(),
'watch' => array(
'immediate' => array( 
'Flow\\Data\\Listener\\ImmediateWatchTopicListener', 'getCurrentUser' ),
),
@@ -341,6 +349,7 @@
'class' => 'flow-history-edit-post',
),
'handler-class' => 'Flow\Actions\FlowAction',
+   'modules' => array(),
'watch' => array(
'immediate' => array( 
'Flow\\Data\\Listener\\ImmediateWatchTopicListener', 'getCurrentUser' ),
),
@@ -536,6 +545,7 @@
'class' => 'flow-history-locked-topic',
),
'handler-class' => 'Flow\Actions\FlowAction',
+  

[MediaWiki-commits] [Gerrit] Improve diff docs - change (mediawiki/core)

2016-05-17 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Improve diff docs
..


Improve diff docs

Change-Id: I42332051f6f1b94f459b06d6c69625bc2a1fa9cf
---
M includes/diff/DiffEngine.php
1 file changed, 12 insertions(+), 2 deletions(-)

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



diff --git a/includes/diff/DiffEngine.php b/includes/diff/DiffEngine.php
index 75e8791..1853b86 100644
--- a/includes/diff/DiffEngine.php
+++ b/includes/diff/DiffEngine.php
@@ -67,6 +67,8 @@
}
 
/**
+* Performs diff
+*
 * @param string[] $from_lines
 * @param string[] $to_lines
 *
@@ -138,8 +140,12 @@
 * to be the "change".
 *
 * This is extracted verbatim from analyze.c (GNU diffutils-2.7).
+*
+* @param string[] $lines
+* @param string[] $changed
+* @param string[] $other_changed
 */
-   private function shiftBoundaries( $lines, &$changed, $other_changed ) {
+   private function shiftBoundaries( array $lines, array &$changed, array 
$other_changed ) {
$i = 0;
$j = 0;
 
@@ -256,7 +262,11 @@
}
}
 
-   protected function diffInternal( /*array*/ $from, /*array*/ $to ) {
+   /**
+* @param string[] $from
+* @param string[] $to
+*/
+   protected function diffInternal( array $from, array $to ) {
// remember initial lengths
$m = count( $from );
$n = count( $to );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42332051f6f1b94f459b06d6c69625bc2a1fa9cf
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Return the latest version for unacceptable match - change (mediawiki...parsoid)

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

Change subject: Return the latest version for unacceptable match
..


Return the latest version for unacceptable match

 * And log the accept header.

Change-Id: If69c92657e7866ee41c5aeba6a9a14bf090777a9
---
M lib/api/routes.js
M lib/config/ParsoidConfig.js
M tests/mocha/apitest.localsettings.js
3 files changed, 19 insertions(+), 4 deletions(-)

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



diff --git a/lib/api/routes.js b/lib/api/routes.js
index 7e54b79..513568b 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -381,10 +381,17 @@
 
// Validate and set the content version
if (!apiUtils.validateAndSetContentVersion(res)) {
-   var text = env.availableVersions.reduce(function(prev, 
curr) {
-   return prev + apiUtils[opts.format + 
'ContentType'](env, curr) + '\n';
-   }, 'Not acceptable.\n');
-   return apiUtils.fatalRequest(env, text, 406);
+   if (env.conf.parsoid.strictAcceptCheck) {
+   var text = 
env.availableVersions.reduce(function(prev, curr) {
+   return prev + apiUtils[opts.format + 
'ContentType'](env, curr) + '\n';
+   }, 'Not acceptable.\n');
+   return apiUtils.fatalRequest(env, text, 406);
+   } else {
+   // Be explicit about giving the default content 
version.
+   env.setContentVersion(env.availableVersions[0]);
+   env.log('error/api/version',
+   'Unacceptable profile string: ' + 
req.get('accept'));
+   }
}
 
var p = Promise.method(function() {
diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index 2c2dadb..4cce7fb 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -636,6 +636,12 @@
true /* don't require a 'parsoid' subdirectory */
 );
 
+/**
+ * @property {boolean} Return a 406 if unabled to provide suitable content.
+ */
+ParsoidConfig.prototype.strictAcceptCheck = false;
+
+
 if (typeof module === "object") {
module.exports.ParsoidConfig = ParsoidConfig;
 }
diff --git a/tests/mocha/apitest.localsettings.js 
b/tests/mocha/apitest.localsettings.js
index 6540409..9de6b6d 100644
--- a/tests/mocha/apitest.localsettings.js
+++ b/tests/mocha/apitest.localsettings.js
@@ -74,4 +74,6 @@
parsoidConfig.limits.wt2html.maxWikitextSize = 2;
parsoidConfig.limits.html2wt.maxHTMLSize = 1;
 
+   parsoidConfig.strictAcceptCheck = true;
+
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If69c92657e7866ee41c5aeba6a9a14bf090777a9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Merge Wikidiff3 into DiffEngine - change (mediawiki/core)

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

Change subject: Merge Wikidiff3 into DiffEngine
..


Merge Wikidiff3 into DiffEngine

Change-Id: Ib4d083a5200824e4d032de6921c375e455e77fb2
---
M autoload.php
M includes/diff/DairikiDiff.php
R includes/diff/DiffEngine.php
3 files changed, 199 insertions(+), 235 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 2f7a9ba..4875fcb 100644
--- a/autoload.php
+++ b/autoload.php
@@ -352,7 +352,7 @@
'DerivativeResourceLoaderContext' => __DIR__ . 
'/includes/resourceloader/DerivativeResourceLoaderContext.php',
'DescribeFileOp' => __DIR__ . '/includes/filebackend/FileOp.php',
'Diff' => __DIR__ . '/includes/diff/DairikiDiff.php',
-   'DiffEngine' => __DIR__ . '/includes/diff/DairikiDiff.php',
+   'DiffEngine' => __DIR__ . '/includes/diff/DiffEngine.php',
'DiffFormatter' => __DIR__ . '/includes/diff/DiffFormatter.php',
'DiffHistoryBlob' => __DIR__ . '/includes/HistoryBlob.php',
'DiffOp' => __DIR__ . '/includes/diff/DairikiDiff.php',
@@ -1087,7 +1087,7 @@
'RCFeedFormatter' => __DIR__ . '/includes/rcfeed/RCFeedFormatter.php',
'RSSFeed' => __DIR__ . '/includes/Feed.php',
'RandomPage' => __DIR__ . '/includes/specials/SpecialRandompage.php',
-   'RangeDifference' => __DIR__ . '/includes/diff/WikiDiff3.php',
+   'RangeDifference' => __DIR__ . '/includes/diff/DiffEngine.php',
'RawAction' => __DIR__ . '/includes/actions/RawAction.php',
'RawMessage' => __DIR__ . '/includes/Message.php',
'ReadOnlyError' => __DIR__ . '/includes/exception/ReadOnlyError.php',
@@ -1505,7 +1505,6 @@
'WebRequestUpload' => __DIR__ . '/includes/WebRequestUpload.php',
'WebResponse' => __DIR__ . '/includes/WebResponse.php',
'WikiCategoryPage' => __DIR__ . '/includes/page/WikiCategoryPage.php',
-   'WikiDiff3' => __DIR__ . '/includes/diff/WikiDiff3.php',
'WikiExporter' => __DIR__ . '/includes/export/WikiExporter.php',
'WikiFilePage' => __DIR__ . '/includes/page/WikiFilePage.php',
'WikiImporter' => __DIR__ . '/includes/import/WikiImporter.php',
diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php
index ec2689c..dbb32e6 100644
--- a/includes/diff/DairikiDiff.php
+++ b/includes/diff/DairikiDiff.php
@@ -192,235 +192,6 @@
 }
 
 /**
- * Class used internally by Diff to actually compute the diffs.
- *
- * The algorithm used here is mostly lifted from the perl module
- * Algorithm::Diff (version 1.06) by Ned Konz, which is available at:
- * http://www.perl.com/CPAN/authors/id/N/NE/NEDKONZ/Algorithm-Diff-1.06.zip
- *
- * More ideas are taken from:
- * http://www.ics.uci.edu/~eppstein/161/960229.html
- *
- * Some ideas (and a bit of code) are from analyze.c, from GNU
- * diffutils-2.7, which can be found at:
- * ftp://gnudist.gnu.org/pub/gnu/diffutils/diffutils-2.7.tar.gz
- *
- * closingly, some ideas (subdivision by NCHUNKS > 2, and some optimizations)
- * are my own.
- *
- * Line length limits for robustness added by Tim Starling, 2005-08-31
- * Alternative implementation added by Guy Van den Broeck, 2008-07-30
- *
- * @author Geoffrey T. Dairiki, Tim Starling, Guy Van den Broeck
- * @private
- * @ingroup DifferenceEngine
- */
-class DiffEngine {
-   protected $xchanged, $ychanged;
-
-   /**
-* @param string[] $from_lines
-* @param string[] $to_lines
-*
-* @return DiffOp[]
-*/
-   public function diff( $from_lines, $to_lines ) {
-
-   // Diff and store locally
-   $this->diffLocal( $from_lines, $to_lines );
-
-   // Merge edits when possible
-   $this->shiftBoundaries( $from_lines, $this->xchanged, 
$this->ychanged );
-   $this->shiftBoundaries( $to_lines, $this->ychanged, 
$this->xchanged );
-
-   // Compute the edit operations.
-   $n_from = count( $from_lines );
-   $n_to = count( $to_lines );
-
-   $edits = [];
-   $xi = $yi = 0;
-   while ( $xi < $n_from || $yi < $n_to ) {
-   assert( $yi < $n_to || $this->xchanged[$xi] );
-   assert( $xi < $n_from || $this->ychanged[$yi] );
-
-   // Skip matching "snake".
-   $copy = [];
-   while ( $xi < $n_from && $yi < $n_to
-   && !$this->xchanged[$xi] && 
!$this->ychanged[$yi]
-   ) {
-   $copy[] = $from_lines[$xi++];
-   ++$yi;
-   }
-   if ( $copy ) {
-   $edits[] = new DiffOpCopy( $copy );
-   }
-
-  

[MediaWiki-commits] [Gerrit] Remove unused stuff from diffs - change (mediawiki/core)

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

Change subject: Remove unused stuff from diffs
..


Remove unused stuff from diffs

Change-Id: Ie7d46b9ed290912039c88bbf4548d4c3d97153c9
---
M includes/diff/DairikiDiff.php
1 file changed, 0 insertions(+), 9 deletions(-)

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



diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php
index 72db5e1..ec2689c 100644
--- a/includes/diff/DairikiDiff.php
+++ b/includes/diff/DairikiDiff.php
@@ -216,16 +216,7 @@
  * @ingroup DifferenceEngine
  */
 class DiffEngine {
-   const MAX_XREF_LENGTH = 1;
-
protected $xchanged, $ychanged;
-
-   protected $xv = [], $yv = [];
-   protected $xind = [], $yind = [];
-
-   protected $seq = [], $in_seq = [];
-
-   protected $lcs = 0;
 
/**
 * @param string[] $from_lines

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7d46b9ed290912039c88bbf4548d4c3d97153c9
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Replace use of deprecated class - change (mediawiki...MobileFrontend)

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

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

Change subject: Replace use of deprecated class
..

Replace use of deprecated class

Change-Id: I39bd2f2178abece5d16aa743d429800150db425c
---
M includes/diff/InlineDiffFormatter.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/includes/diff/InlineDiffFormatter.php 
b/includes/diff/InlineDiffFormatter.php
index 8d27839..86da38a 100644
--- a/includes/diff/InlineDiffFormatter.php
+++ b/includes/diff/InlineDiffFormatter.php
@@ -3,6 +3,8 @@
  * InlineDiffFormatter.php
  */
 
+use MediaWiki\Diff\WordAccumulator;
+
 /**
  * Extends standard Table-formatted DiffFormatter of core to enable Inline-Diff
  * format of MF with only one column.
@@ -111,7 +113,7 @@
 * @return array Array of changed lines
 */
private function inlineWordDiff( $diff ) {
-   $inline = new HWLDFWordAccumulator;
+   $inline = new WordAccumulator;
$inline->insClass = $inline->delClass = '';
 
foreach ( $diff->edits as $edit ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39bd2f2178abece5d16aa743d429800150db425c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] Refactor diffs - change (mediawiki/core)

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

Change subject: Refactor diffs
..


Refactor diffs

* Merge MappedDiff into WordLevelDiff
* Rename WordAccumulator into WordAccumulator and namespace
* Better variable names

Change-Id: I5847f2bb89402d0537b9e99cccd24c547ce4e4e2
---
M autoload.php
M includes/diff/DairikiDiff.php
A includes/diff/WordAccumulator.php
A includes/diff/WordLevelDiff.php
4 files changed, 252 insertions(+), 233 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index cf0e417..2f7a9ba 100644
--- a/autoload.php
+++ b/autoload.php
@@ -779,7 +779,6 @@
'MalformedTitleException' => __DIR__ . 
'/includes/title/MalformedTitleException.php',
'ManualLogEntry' => __DIR__ . '/includes/logging/LogEntry.php',
'MapCacheLRU' => __DIR__ . '/includes/libs/MapCacheLRU.php',
-   'MappedDiff' => __DIR__ . '/includes/diff/DairikiDiff.php',
'MappedIterator' => __DIR__ . '/includes/libs/MappedIterator.php',
'MarkpatrolledAction' => __DIR__ . 
'/includes/actions/MarkpatrolledAction.php',
'McTest' => __DIR__ . '/maintenance/mctest.php',
@@ -829,6 +828,7 @@
'MediaWiki\\Auth\\Throttler' => __DIR__ . 
'/includes/auth/Throttler.php',
'MediaWiki\\Auth\\UserDataAuthenticationRequest' => __DIR__ . 
'/includes/auth/UserDataAuthenticationRequest.php',
'MediaWiki\\Auth\\UsernameAuthenticationRequest' => __DIR__ . 
'/includes/auth/UsernameAuthenticationRequest.php',
+   'MediaWiki\\Diff\\WordAccumulator' => __DIR__ . 
'/includes/diff/WordAccumulator.php',
'MediaWiki\\Languages\\Data\\Names' => __DIR__ . 
'/languages/data/Names.php',
'MediaWiki\\Languages\\Data\\ZhConversion' => __DIR__ . 
'/languages/data/ZhConversion.php',
'MediaWiki\\Linker\\LinkTarget' => __DIR__ . 
'/includes/linker/LinkTarget.php',
@@ -1518,7 +1518,7 @@
'WikitextContentHandler' => __DIR__ . 
'/includes/content/WikitextContentHandler.php',
'WinCacheBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/WinCacheBagOStuff.php',
'WithoutInterwikiPage' => __DIR__ . 
'/includes/specials/SpecialWithoutinterwiki.php',
-   'WordLevelDiff' => __DIR__ . '/includes/diff/DairikiDiff.php',
+   'WordLevelDiff' => __DIR__ . '/includes/diff/WordLevelDiff.php',
'WrapOldPasswords' => __DIR__ . '/maintenance/wrapOldPasswords.php',
'XCFHandler' => __DIR__ . '/includes/media/XCF.php',
'XCacheBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/XCacheBagOStuff.php',
diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php
index e5e082f..72db5e1 100644
--- a/includes/diff/DairikiDiff.php
+++ b/includes/diff/DairikiDiff.php
@@ -559,236 +559,7 @@
 }
 
 /**
- * @todo document, bad name.
- * @private
- * @ingroup DifferenceEngine
+ * @deprecated Alias for WordAccumulator, to be soon removed
  */
-class MappedDiff extends Diff {
-   /**
-* Constructor.
-*
-* Computes diff between sequences of strings.
-*
-* This can be used to compute things like
-* case-insensitve diffs, or diffs which ignore
-* changes in white-space.
-*
-* @param string[] $from_lines An array of strings.
-*   Typically these are lines from a file.
-* @param string[] $to_lines An array of strings.
-* @param string[] $mapped_from_lines This array should
-*   have the same size number of elements as $from_lines.
-*   The elements in $mapped_from_lines and
-*   $mapped_to_lines are what is actually compared
-*   when computing the diff.
-* @param string[] $mapped_to_lines This array should
-*   have the same number of elements as $to_lines.
-*/
-   public function __construct( $from_lines, $to_lines,
-   $mapped_from_lines, $mapped_to_lines ) {
-
-   assert( count( $from_lines ) == count( $mapped_from_lines ) );
-   assert( count( $to_lines ) == count( $mapped_to_lines ) );
-
-   parent::__construct( $mapped_from_lines, $mapped_to_lines );
-
-   $xi = $yi = 0;
-   $editCount = count( $this->edits );
-   for ( $i = 0; $i < $editCount; $i++ ) {
-   $orig = &$this->edits[$i]->orig;
-   if ( is_array( $orig ) ) {
-   $orig = array_slice( $from_lines, $xi, count( 
$orig ) );
-   $xi += count( $orig );
-   }
-
-   $closing = &$this->edits[$i]->closing;
-   if ( is_array( $closing ) ) {
-   $closing = array_slice( $to_lines, $yi, count( 
$closing ) );
-   $yi += count( $closing );
-   }
-   }
-   }
-}
-
-/**
-

[MediaWiki-commits] [Gerrit] toolserver: redirect some old tool URLs that still get 404s - change (operations/puppet)

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

Change subject: toolserver: redirect some old tool URLs that still get 404s
..


toolserver: redirect some old tool URLs that still get 404s

Redirect the following over to their counterpart on wmflabs.org,
these still showed up in toolserver.org logs with 404 and
exist on tools.wmflabs.org.

enwp10
geohack
mathbot
render
stewardbots
vvv
wikifeeds

Bug:T85167
Change-Id: I546fe7c97cf16e0047e2e7196239fa8913413570
---
M modules/toolserver_legacy/templates/www.toolserver.org.erb
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/modules/toolserver_legacy/templates/www.toolserver.org.erb 
b/modules/toolserver_legacy/templates/www.toolserver.org.erb
index 4799bb6..34321c0 100644
--- a/modules/toolserver_legacy/templates/www.toolserver.org.erb
+++ b/modules/toolserver_legacy/templates/www.toolserver.org.erb
@@ -113,8 +113,10 @@
 Redirect 301 /~emijrp/wlm/stats.php https://tools.wmflabs.org/wlm-stats
 Redirect 301 /~emijrp/wmcharts https://tools.wmflabs.org/wmcharts
 Redirect 301 /~emijrp/wlm/spain https://tools.wmflabs.org/wlm-maps/
+Redirect 301 /~enwp10 https://tools.wmflabs.org/enwp10/
 Redirect 301 /~erfgoed https://tools.wmflabs.org/heritage
 Redirect 301 /~erwin85 https://tools.wmflabs.org/erwin85
+Redirect 301 /~geohack https://tools.wmflabs.org/geohack/
 Redirect 301 /~hoo https://tools.wmflabs.org/hoo
 Redirect 301 /~jarry/svgtranslate/doc/index.html 
/~jarry/svgtranslate/doc/index.php
 Redirect 301 /~jarry/svgcheck https://tools.wmflabs.org/svgcheck
@@ -209,6 +211,7 @@
 Redirect 301 /~magnus/geo https://tools.wmflabs.org/geohack
 Redirect 301 /~magnus/joanjoc/sugart.php 
https://tools.wmflabs.org/joanjoc/sugart.php
 Redirect 301 /~master https://tools.wmflabs.org/wiwosm
+Redirect 303 /~mathbot https://tools.wmflabs.org/mathbot/
 Redirect 301 /~multichill/coordinates.php 
https://tools.wmflabs.org/locator/coordinates.php
 Redirect 301 /~multichill/coordinates2.php 
https://tools.wmflabs.org/locator/coordinates.php
 Redirect 301 /~multichill/monapi/api.php 
https://tools.wmflabs.org/heritage/api/api.php
@@ -246,6 +249,7 @@
 Redirect 301 /~phe https://tools.wmflabs.org/phetools
 Redirect 301 /~pietrodn/intersectContribs.php 
https://tools.wmflabs.org/intersect-contribs
 Redirect 301 /~quentinv57/tools 
https://tools.wmflabs.org/quentinv57-tools/tools
+Redirect 301 /~render https://tools.wmflabs.org/render
 Redirect 301 /~robin https://tools.wmflabs.org/robin
 Redirect 301 /~russell/cgi-bin/csd.py 
https://tools.wmflabs.org/russbot/csd.py
 Redirect 301 /~russell/cgi-bin/long_disambig_pages.py 
https://tools.wmflabs.org/russbot/long_disambig_pages.py
@@ -254,17 +258,20 @@
 Redirect 301 /~sk/checkwiki 
https://tools.wmflabs.org/checkwiki/cgi-bin/checkwiki.cgi
 Redirect 301 /~snottywong https://tools.wmflabs.org/jackbot/snottywong
 Redirect 301 /~soxred93 https://tools.wmflabs.org/xtools
+Redirect 301 /~stewardbots https://tools.wmflabs.org/stewardbots
 Redirect 301 /~timl/templatecheck.php 
https://tools.wmflabs.org/templatecheck
 Redirect 301 /~timl/wikilint https://tools.wmflabs.org/wikilint
 Redirect 301 /~timl https://de.wikipedia.org/wiki/Benutzer:Tim.landscheidt
 Redirect 301 /~tparis https://tools.wmflabs.org/xtools
 Redirect 301 /~verisimilus/Timeline 
https://tools.wmflabs.org/timescale/?Ma=
+Redirect 301 /~vvv/sulutil.php 
https://tools.wmflabs.org/quentinv57-tools/tools/sulinfo.php
 Redirect 301 /~vvv/adminstats.php 
https://tools.wmflabs.org/xtools/adminstats
 Redirect 301 /~vvv https://tools.wmflabs.org/quentinv57-tools/tools
 Redirect 301 /~webboy/wikirc https://tools.wmflabs.org/jeltebot
 Redirect 301 /~webboy/stats.php 
https://tools.wmflabs.org/unpatrollededitstats/nlwiki
 Redirect 301 /~webboy/nowiki/stats.php 
https://tools.wmflabs.org/unpatrollededitstats/nowiki
 Redirect 301 /~webboy/commonswiki/stats.php 
https://tools.wmflabs.org/unpatrollededitstats/commonswiki
+Redirect 301 /~wikifeeds https://tools.wmflabs.org/wikifeeds/
 
 # Redirects from stable.toolserver.org
 #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I546fe7c97cf16e0047e2e7196239fa8913413570
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Multichill 
Gerrit-Reviewer: Ricordisamoa 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot <>

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

[MediaWiki-commits] [Gerrit] toolserver: redirect some old tool URLs that still get 404s - change (operations/puppet)

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

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

Change subject: toolserver: redirect some old tool URLs that still get 404s
..

toolserver: redirect some old tool URLs that still get 404s

Bug:T85167
Change-Id: I546fe7c97cf16e0047e2e7196239fa8913413570
---
M modules/toolserver_legacy/templates/www.toolserver.org.erb
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/289347/1

diff --git a/modules/toolserver_legacy/templates/www.toolserver.org.erb 
b/modules/toolserver_legacy/templates/www.toolserver.org.erb
index 4799bb6..2843abe 100644
--- a/modules/toolserver_legacy/templates/www.toolserver.org.erb
+++ b/modules/toolserver_legacy/templates/www.toolserver.org.erb
@@ -113,8 +113,10 @@
 Redirect 301 /~emijrp/wlm/stats.php https://tools.wmflabs.org/wlm-stats
 Redirect 301 /~emijrp/wmcharts https://tools.wmflabs.org/wmcharts
 Redirect 301 /~emijrp/wlm/spain https://tools.wmflabs.org/wlm-maps/
+Redirect 301 /~enwp10 https://tools.wmflabs.org/enwp10/
 Redirect 301 /~erfgoed https://tools.wmflabs.org/heritage
 Redirect 301 /~erwin85 https://tools.wmflabs.org/erwin85
+Redirect 301 /~geohack https://tools.wmflabs.org/geohack/
 Redirect 301 /~hoo https://tools.wmflabs.org/hoo
 Redirect 301 /~jarry/svgtranslate/doc/index.html 
/~jarry/svgtranslate/doc/index.php
 Redirect 301 /~jarry/svgcheck https://tools.wmflabs.org/svgcheck
@@ -209,6 +211,7 @@
 Redirect 301 /~magnus/geo https://tools.wmflabs.org/geohack
 Redirect 301 /~magnus/joanjoc/sugart.php 
https://tools.wmflabs.org/joanjoc/sugart.php
 Redirect 301 /~master https://tools.wmflabs.org/wiwosm
+Redirect 303 /~mathbot https://tools.wmflabs.org/mathbot/
 Redirect 301 /~multichill/coordinates.php 
https://tools.wmflabs.org/locator/coordinates.php
 Redirect 301 /~multichill/coordinates2.php 
https://tools.wmflabs.org/locator/coordinates.php
 Redirect 301 /~multichill/monapi/api.php 
https://tools.wmflabs.org/heritage/api/api.php
@@ -246,6 +249,7 @@
 Redirect 301 /~phe https://tools.wmflabs.org/phetools
 Redirect 301 /~pietrodn/intersectContribs.php 
https://tools.wmflabs.org/intersect-contribs
 Redirect 301 /~quentinv57/tools 
https://tools.wmflabs.org/quentinv57-tools/tools
+Redirect 301 /~render https://tools.wmflabs.org/render
 Redirect 301 /~robin https://tools.wmflabs.org/robin
 Redirect 301 /~russell/cgi-bin/csd.py 
https://tools.wmflabs.org/russbot/csd.py
 Redirect 301 /~russell/cgi-bin/long_disambig_pages.py 
https://tools.wmflabs.org/russbot/long_disambig_pages.py
@@ -254,6 +258,7 @@
 Redirect 301 /~sk/checkwiki 
https://tools.wmflabs.org/checkwiki/cgi-bin/checkwiki.cgi
 Redirect 301 /~snottywong https://tools.wmflabs.org/jackbot/snottywong
 Redirect 301 /~soxred93 https://tools.wmflabs.org/xtools
+Redirect 301 /~stewardbots https://tools.wmflabs.org/stewardbots
 Redirect 301 /~timl/templatecheck.php 
https://tools.wmflabs.org/templatecheck
 Redirect 301 /~timl/wikilint https://tools.wmflabs.org/wikilint
 Redirect 301 /~timl https://de.wikipedia.org/wiki/Benutzer:Tim.landscheidt
@@ -265,6 +270,7 @@
 Redirect 301 /~webboy/stats.php 
https://tools.wmflabs.org/unpatrollededitstats/nlwiki
 Redirect 301 /~webboy/nowiki/stats.php 
https://tools.wmflabs.org/unpatrollededitstats/nowiki
 Redirect 301 /~webboy/commonswiki/stats.php 
https://tools.wmflabs.org/unpatrollededitstats/commonswiki
+Redirect 301 /~wikifeeds https://tools.wmflabs.org/wikifeeds/
 
 # Redirects from stable.toolserver.org
 #

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I546fe7c97cf16e0047e2e7196239fa8913413570
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] Bring back messages used by old email formatter system - change (mediawiki...Echo)

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

Change subject: Bring back messages used by old email formatter system
..


Bring back messages used by old email formatter system

Bug: T135446
Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62
(cherry picked from commit 46e69972c679f7fdab44bc914b9dfb2491a33fee)
---
M i18n/en.json
M i18n/qqq.json
M includes/EmailFormatter.php
3 files changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 267c17b..92fc41d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -190,6 +190,7 @@
"echo-email-subject-default": "New notification at {{SITENAME}}",
"echo-email-body-default": "You have a new notification at 
{{SITENAME}}:\n\n$1",
"echo-email-batch-body-default": "You have a new notification.",
+   "echo-email-footer-default": "$2\n\nTo control which emails we send 
you, check your 
preferences:\n{{canonicalurl:{{#special:Preferences}}#mw-prefsection-echo}}\n\n$1",
"echo-email-plain-footer": "To control which emails we send you, check 
your preferences:",
"echo-email-footer-default-html": "To control which emails we send you, 
check your 
preferences.\n$1",
"echo-notification-alert": "{{PLURAL:$1|Alert ($1)|Alerts 
($1)|100=Alerts (99+)}}",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 149020b..7cbc528 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -182,6 +182,7 @@
"echo-email-body-default": "Default message content for Echo email 
notifications. Parameters:\n* $1 - a plain text description of the 
notification",
"echo-email-batch-body-default": "Default message for Echo e-mail 
digest notifications",
"echo-email-plain-footer": "Footer content for Echo text e-mail 
notifications.\n\nFor HTML version, see 
{{msg-mw|echo-email-footer-default-html}}.",
+   "echo-email-footer-default": "Default footer content for Echo text 
e-mail notifications. Parameters:\n* $1 - the address of the organization that 
sent the email\n* $2 - \"---...\" 
({{msg-mw|echo-email-batch-separator}})\n\nFor HTML version, see 
{{msg-mw|echo-email-footer-default-html}}.",
"echo-email-footer-default-html": "Default footer content for Echo html 
e-mail notifications. Parameters:\n* $1 - the address of the organization that 
sent the email\n* $2 - the URL to the notification preference page\nFor 
plain-text version, see {{msg-mw|Echo-email-footer-default}}.",
"echo-notification-alert": "Label for alert notifications (= non 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread alerts. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-message}}\n{{Identical|Alert}}",
"echo-notification-message": "Label for message notifications (= 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread messages. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-alert}}\n{{Identical|Message}}",
diff --git a/includes/EmailFormatter.php b/includes/EmailFormatter.php
index 23d5851..1e65dc6 100644
--- a/includes/EmailFormatter.php
+++ b/includes/EmailFormatter.php
@@ -667,7 +667,7 @@
 * {@inheritDoc}
 */
public function decorateFooter( $address, User $user ) {
-   return EchoEmailMode::message( 'echo-email-plain-footer', $user 
)
+   return EchoEmailMode::message( 'echo-email-footer-default', 
$user )
->params(
$address,
EchoEmailMode::message( 
'echo-email-batch-separator', $user )->text()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.1
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Bring back messages used by old email formatter system - change (mediawiki...Echo)

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

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

Change subject: Bring back messages used by old email formatter system
..

Bring back messages used by old email formatter system

Bug: T135446
Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62
(cherry picked from commit 46e69972c679f7fdab44bc914b9dfb2491a33fee)
---
M i18n/en.json
M i18n/qqq.json
M includes/EmailFormatter.php
3 files changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 267c17b..92fc41d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -190,6 +190,7 @@
"echo-email-subject-default": "New notification at {{SITENAME}}",
"echo-email-body-default": "You have a new notification at 
{{SITENAME}}:\n\n$1",
"echo-email-batch-body-default": "You have a new notification.",
+   "echo-email-footer-default": "$2\n\nTo control which emails we send 
you, check your 
preferences:\n{{canonicalurl:{{#special:Preferences}}#mw-prefsection-echo}}\n\n$1",
"echo-email-plain-footer": "To control which emails we send you, check 
your preferences:",
"echo-email-footer-default-html": "To control which emails we send you, 
check your 
preferences.\n$1",
"echo-notification-alert": "{{PLURAL:$1|Alert ($1)|Alerts 
($1)|100=Alerts (99+)}}",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 149020b..7cbc528 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -182,6 +182,7 @@
"echo-email-body-default": "Default message content for Echo email 
notifications. Parameters:\n* $1 - a plain text description of the 
notification",
"echo-email-batch-body-default": "Default message for Echo e-mail 
digest notifications",
"echo-email-plain-footer": "Footer content for Echo text e-mail 
notifications.\n\nFor HTML version, see 
{{msg-mw|echo-email-footer-default-html}}.",
+   "echo-email-footer-default": "Default footer content for Echo text 
e-mail notifications. Parameters:\n* $1 - the address of the organization that 
sent the email\n* $2 - \"---...\" 
({{msg-mw|echo-email-batch-separator}})\n\nFor HTML version, see 
{{msg-mw|echo-email-footer-default-html}}.",
"echo-email-footer-default-html": "Default footer content for Echo html 
e-mail notifications. Parameters:\n* $1 - the address of the organization that 
sent the email\n* $2 - the URL to the notification preference page\nFor 
plain-text version, see {{msg-mw|Echo-email-footer-default}}.",
"echo-notification-alert": "Label for alert notifications (= non 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread alerts. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-message}}\n{{Identical|Alert}}",
"echo-notification-message": "Label for message notifications (= 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread messages. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-alert}}\n{{Identical|Message}}",
diff --git a/includes/EmailFormatter.php b/includes/EmailFormatter.php
index 23d5851..1e65dc6 100644
--- a/includes/EmailFormatter.php
+++ b/includes/EmailFormatter.php
@@ -667,7 +667,7 @@
 * {@inheritDoc}
 */
public function decorateFooter( $address, User $user ) {
-   return EchoEmailMode::message( 'echo-email-plain-footer', $user 
)
+   return EchoEmailMode::message( 'echo-email-footer-default', 
$user )
->params(
$address,
EchoEmailMode::message( 
'echo-email-batch-separator', $user )->text()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.1
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Sbisson 

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


[MediaWiki-commits] [Gerrit] Expand coverage of conformance test - change (mediawiki...NavigationTiming)

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

Change subject: Expand coverage of conformance test
..


Expand coverage of conformance test

Cover the full set of Navigation Timing markers in the attribute order
conformance test. Previously-omitted markers which are now included in
the test:

* domComplete
* domLoading
* domainLookupEnd
* domainLookupStart
* fetchStart
* navigationStart
* secureConnectionStart

Change-Id: I62e20087c1abddf8871d7b0235c32e81956723c5
---
M modules/ext.navigationTiming.js
1 file changed, 53 insertions(+), 16 deletions(-)

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



diff --git a/modules/ext.navigationTiming.js b/modules/ext.navigationTiming.js
index 0446020..bda58bb 100644
--- a/modules/ext.navigationTiming.js
+++ b/modules/ext.navigationTiming.js
@@ -36,26 +36,63 @@
}
 
/**
-* Assert that the attribute order complies with the W3C spec
+* Check if the order of Navigation Timing marker values conforms
+* to the specification.
+*
+* Markers may be undefined or zero if they are not implemented or not
+* applicable to the current page.  Markers which have a value must be
+* in ascending order.
 *
 * @return {boolean}
 */
function isCompliant() {
-   // Tests derived from
-   // 

-   return (
-   timing  
&&
-   timing.loadEventEnd   >= 
timing.loadEventStart  &&
-   timing.loadEventStart >= 
timing.domContentLoadedEventEnd&&
-   timing.domContentLoadedEventEnd   >= 
timing.domContentLoadedEventStart  &&
-   timing.domContentLoadedEventStart >= 
timing.domInteractive  &&
-   timing.domInteractive >= timing.responseEnd 
&&
-   timing.responseEnd>= 
timing.responseStart   &&
-   timing.responseStart  >= 
timing.requestStart&&
-   timing.requestStart   >= timing.connectEnd  
&&
-   timing.connectEnd >= 
timing.connectStart&&
-   timing.connectStart   >= 0
-   );
+   var sequences, markers, curr, prev;
+
+   if ( !timing ) {
+   return false;
+   }
+
+   sequences = [ [
+   'navigationStart',
+   'fetchStart',
+   'domainLookupStart',
+   'domainLookupEnd',
+   'connectStart',
+   'connectEnd',
+   'requestStart',
+   'responseStart',
+   'responseEnd',
+   'domInteractive',
+   'domContentLoadedEventStart',
+   'domContentLoadedEventEnd',
+   'loadEventStart',
+   'loadEventEnd'
+   ], [
+   'secureConnectionStart',
+   'requestStart'
+   ], [
+   'fetchStart',
+   'domLoading'
+   ], [
+   'domContentLoadedEventEnd',
+   'domComplete'
+   ] ];
+
+   while ( sequences.length ) {
+   markers = sequences.shift();
+   prev = null;
+   while ( markers.length ) {
+   curr = timing[ markers.shift() ];
+   if ( curr ) {
+   if ( curr < prev ) {
+   return false;
+   }
+   prev = curr;
+   }
+   }
+   }
+
+   return true;
}
 
function getNavTiming() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62e20087c1abddf8871d7b0235c32e81956723c5
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/NavigationTiming
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Phedenskog 
Gerrit-Reviewer: jenkins-bot <>

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

[MediaWiki-commits] [Gerrit] toolserver: add wiki.toolserver LE cert - change (operations/puppet)

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

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

Change subject: toolserver: add wiki.toolserver LE cert
..

toolserver: add wiki.toolserver LE cert

Bug:T134798
Change-Id: I4fcdb516f3af3714033b5fc49e9d5d41fab1ba4b
---
M modules/toolserver_legacy/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/289345/1

diff --git a/modules/toolserver_legacy/manifests/init.pp 
b/modules/toolserver_legacy/manifests/init.pp
index 050eb08..e3921b5 100644
--- a/modules/toolserver_legacy/manifests/init.pp
+++ b/modules/toolserver_legacy/manifests/init.pp
@@ -14,7 +14,7 @@
 system::role { 'toolserver_legacy': description => 'Toolserver legacy 
server' }
 
 letsencrypt::cert::integrated { 'toolserver':
-subjects   => 'toolserver.org,www.toolserver.org',
+subjects   => 'toolserver.org,www.toolserver.org,wiki.toolserver.org',
 puppet_svc => 'apache2',
 system_svc => 'apache2',
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fcdb516f3af3714033b5fc49e9d5d41fab1ba4b
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] planet: only run updates when in active datacenter - change (operations/puppet)

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

Change subject: planet: only run updates when in active datacenter
..


planet: only run updates when in active datacenter

Add a parameter to set the active datacenter, then
only actively run feed updates in the active dc.
We don't want to run them in both places for no reason.

Bug:T134507
Change-Id: Ib9f1cc485e08f22e3d1c2d5bb2bf1a963e3c3f76
---
M modules/planet/manifests/cronjob.pp
M modules/planet/manifests/init.pp
M modules/role/manifests/planet/venus.pp
3 files changed, 18 insertions(+), 2 deletions(-)

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



diff --git a/modules/planet/manifests/cronjob.pp 
b/modules/planet/manifests/cronjob.pp
index c1a125c..0f00b9f 100644
--- a/modules/planet/manifests/cronjob.pp
+++ b/modules/planet/manifests/cronjob.pp
@@ -8,8 +8,15 @@
 # randomize the minute crons run, using $title as seed
 $minute = fqdn_rand(60, $title)
 
+# crons only running if in active datacenter
+if $planet::planet_active_dc in $::domain {
+$cron_ensure = 'present'
+} else {
+$cron_ensure = 'absent'
+}
+
 cron { "update-${title}-planet":
-ensure  => 'present',
+ensure  => $cron_ensure,
 command => "http_proxy=\"${planet::planet_http_proxy}\" 
https_proxy=\$http_proxy ${planet_bin} -v ${planet_config} > ${planet_logfile} 
2>&1",
 user=> 'planet',
 minute  => $minute,
diff --git a/modules/planet/manifests/init.pp b/modules/planet/manifests/init.pp
index 2673fb5..4ca476a 100644
--- a/modules/planet/manifests/init.pp
+++ b/modules/planet/manifests/init.pp
@@ -13,11 +13,16 @@
 #   see the role class for this
 # $planet_meta_link - a protocol relative link
 #   example: meta.wikimedia.org/wiki/Planet_Wikimedia
+# $planet_http_proxy - set proxy to be used for downloading feeds
+#   example: http://url-downloader.${::site}.wikimedia.org:8080
+# $planet_active_dc - currently active datacenter, updates will only run here
+#   example: eqiad
 class planet (
 $planet_domain_name,
 $planet_languages,
 $planet_meta_link,
 $planet_http_proxy,
+$planet_active_dc,
 ) {
 
 # locales are essential for planet
diff --git a/modules/role/manifests/planet/venus.pp 
b/modules/role/manifests/planet/venus.pp
index f251410..b6a8fc7 100644
--- a/modules/role/manifests/planet/venus.pp
+++ b/modules/role/manifests/planet/venus.pp
@@ -215,12 +215,16 @@
 # since we are on a private IP now we need to proxy to fetch external URLs
 $planet_http_proxy = "http://url-downloader.${::site}.wikimedia.org:8080";
 
+# set to the currently active DC. feed updates are only running here.
+$planet_active_dc = 'eqiad'
+
 # the 'planet' class from modules/planet/init.pp does the setup
 class {'::planet':
 planet_domain_name => $planet_domain_name,
 planet_languages   => $planet_languages,
 planet_meta_link   => $planet_meta_link,
-planet_http_proxy  => $planet_http_proxy
+planet_http_proxy  => $planet_http_proxy,
+planet_active_dc   => $planet_active_dc
 }
 
 ferm::service { 'planet-http':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9f1cc485e08f22e3d1c2d5bb2bf1a963e3c3f76
Gerrit-PatchSet: 5
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] WIP: Experiment with collapsing references by default - change (mediawiki...MobileFrontend)

2016-05-17 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: WIP: Experiment with collapsing references by default
..

WIP: Experiment with collapsing references by default

Change-Id: I5ebe531a897524872a05ab44f6e82985cd9ecd2b
---
M resources/mobile.toggle/toggle.js
1 file changed, 6 insertions(+), 10 deletions(-)


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

diff --git a/resources/mobile.toggle/toggle.js 
b/resources/mobile.toggle/toggle.js
index 9a7ed17..72f02af 100644
--- a/resources/mobile.toggle/toggle.js
+++ b/resources/mobile.toggle/toggle.js
@@ -128,7 +128,7 @@
 * @ignore
 */
Toggler.prototype.toggle = function ( $heading ) {
-   var indicator, $content,
+   var indicator,
wasExpanded = $heading.is( '.open-block' ),
page = $heading.data( 'page' ),
sectionId = $heading.data( 'section-number' );
@@ -143,16 +143,14 @@
indicator = new Icon( arrowOptions ).prependTo( $heading );
$heading.data( 'indicator', indicator );
 
-   $content = $heading.next();
-   $content
+   $heading.next()
.toggleClass( 'open-block' )
.attr( {
'aria-pressed': !wasExpanded,
'aria-expanded': !wasExpanded
} );
 
-   M.emit( 'section-toggled', wasExpanded, sectionId,
-   $content.attr( 'data-reference-section' ) );
+   M.emit( 'section-toggled', wasExpanded, sectionId );
 
if ( !browser.isWideScreen() ) {
storeSectionToggleState( $heading, page );
@@ -217,7 +215,7 @@
 * @constructor
 */
Toggler.prototype._enable = function ( $container, prefix, page, 
isClosed ) {
-   var tagName, expandSections, indicator, $content,
+   var tagName, expandSections, indicator,
$firstHeading,
self = this,
collapseSectionsByDefault = mw.config.get( 
'wgMFCollapseSectionsByDefault' );
@@ -241,8 +239,6 @@
// Be sure there is a div wrapping the section content.
// Otherwise, collapsible sections for this page is not 
enabled.
if ( $heading.next().is( 'div' ) ) {
-   $content = $heading.next( 'div' );
-   isReferenceSection = Boolean( $content.attr( 
'data-reference-section' ) );
$heading
.addClass( 'collapsible-heading ' )
.data( 'section-number', i )
@@ -269,7 +265,7 @@
indicator.prependTo( $heading );
}
$heading.data( 'indicator', indicator.$el );
-   $content
+   $heading.next( 'div' )
.addClass( 'collapsible-block' )
.eq( 0 )
.attr( {
@@ -282,7 +278,7 @@
} );
 
enableKeyboardActions( self, $heading );
-   if ( !isReferenceSection && ( !isClosed && 
browser.isWideScreen() || expandSections ) ) {
+   if ( !isClosed && browser.isWideScreen() || 
expandSections ) {
// Expand sections by default on wide 
screen devices or if the expand sections setting is set
self.toggle.call( self, $heading );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ebe531a897524872a05ab44f6e82985cd9ecd2b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] Set prefer canvas option for leaflet - change (wikidata...gui)

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

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

Change subject: Set prefer canvas option for leaflet
..

Set prefer canvas option for leaflet

for faster rendering of points in the map view

Change-Id: I8c9361b04654019463418f23a036b06085622ff7
---
M index.html
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/95/288995/1

diff --git a/index.html b/index.html
index 8373f9a..2b344e3 100644
--- a/index.html
+++ b/index.html
@@ -79,7 +79,7 @@



-  

+   



@@ -179,7 +179,7 @@

 

- 
+



@@ -191,7 +191,11 @@



-
+
+   
+   L_PREFER_CANVAS = true;
+
+   

 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c9361b04654019463418f23a036b06085622ff7
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] make-wmf-branch: Stop branching Gather (undeployed) - change (mediawiki...release)

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

Change subject: make-wmf-branch: Stop branching Gather (undeployed)
..


make-wmf-branch: Stop branching Gather (undeployed)

Bug: T128568
Change-Id: I46d800f93b6ed9e83d7e8e63ddf0e613e5ee13f5
---
M make-wmf-branch/config.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json
index 0a45190..885ca76 100644
--- a/make-wmf-branch/config.json
+++ b/make-wmf-branch/config.json
@@ -50,7 +50,6 @@
"FundraiserLandingPage",
"FundraisingTranslateWorkflow",
"Gadgets",
-   "Gather",
"GeoCrumbs",
"GeoData",
"GettingStarted",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46d800f93b6ed9e83d7e8e63ddf0e613e5ee13f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add Puotal: namespace to jam.wikipedia - change (operations/mediawiki-config)

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

Change subject: Add Puotal: namespace to jam.wikipedia
..


Add Puotal: namespace to jam.wikipedia

Bug: T135479
Change-Id: I187b038648cf31573c1414e4778e0aff6f5c70a1
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3473732..a132681 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5033,6 +5033,10 @@
103 => 'プロジェクト‐ノート',
829 => 'モジュール‐ノート', // T49933
],
+   'jamwiki' => [
+   100 => 'Puotal', // T135479
+   101 => 'Puotal_diskoshan',
+   ],
'kawiki' => [
100 => 'პორტალი',
101 => 'პორტალი_განხილვა',

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

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

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


[MediaWiki-commits] [Gerrit] admin: add new group labnet-users - change (operations/puppet)

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

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

Change subject: admin: add new group labnet-users
..

admin: add new group labnet-users

Add a new admin group "labnet-users" for
unprivileged access to labnet servers.

Bug:T133992
Change-Id: I46a6eee8094bcfe4f5725dc3ada73212c4ce1432
---
M modules/admin/data/data.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index ea6ad11..ead9a2a 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -506,6 +506,10 @@
 gid: 780
 members: [madhuvishy]
 privileges: ['ALL = (ALL) NOPASSWD: ALL']
+  labnet-users:
+description: unprivileged access on labnet servers
+gid: 781
+members: []
 
 users:
   rush:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46a6eee8094bcfe4f5725dc3ada73212c4ce1432
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] make-wmf-branch: Stop branching Gather (undeployed) - change (mediawiki...release)

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

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

Change subject: make-wmf-branch: Stop branching Gather (undeployed)
..

make-wmf-branch: Stop branching Gather (undeployed)

Bug: T128568
Change-Id: I46d800f93b6ed9e83d7e8e63ddf0e613e5ee13f5
---
M make-wmf-branch/config.json
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json
index 0a45190..885ca76 100644
--- a/make-wmf-branch/config.json
+++ b/make-wmf-branch/config.json
@@ -50,7 +50,6 @@
"FundraiserLandingPage",
"FundraisingTranslateWorkflow",
"Gadgets",
-   "Gather",
"GeoCrumbs",
"GeoData",
"GettingStarted",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46d800f93b6ed9e83d7e8e63ddf0e613e5ee13f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
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] WIP: responsiveness in PHP - change (mediawiki...Kartographer)

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

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

Change subject: WIP: responsiveness in PHP
..

WIP: responsiveness in PHP

Change-Id: I661cfea6f28f00b88dae23950ede792254de9a3e
---
M includes/Tag/MapFrame.php
1 file changed, 31 insertions(+), 11 deletions(-)


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

diff --git a/includes/Tag/MapFrame.php b/includes/Tag/MapFrame.php
index 1ea7227..4406515 100644
--- a/includes/Tag/MapFrame.php
+++ b/includes/Tag/MapFrame.php
@@ -41,6 +41,20 @@
 
$output = $this->parser->getOutput();
 
+   $widthIsRelative = mb_substr( $this->width, -1 ) === '%';
+   if ( $widthIsRelative ) {
+   $width = is_numeric( $this->width ) ? 
"{$this->width}px" : $this->width;
+   $outerStyle =  "width:{$width}; 
height:{$this->height}px;";
+   $innerStyle = "height: {$this->height}";
+   } else {
+   $outerStyle = "max-width: {$this->width}; max-height: 
{$this->height}";
+   $width = intval( preg_replace( '/px$/', '', 
$this->width ) );
+   $height = intval( preg_replace( '/px$/', '', 
$this->height ) );
+   $padding = ( 100 * $height ) / $width;
+   $innerStyle = "padding-bottom: $padding%";
+   }
+
+
switch ( $wgKartographerFrameMode ) {
/* Not implemented in Kartotherian yet
case 'static':
@@ -81,28 +95,34 @@
$output->addModules( 'ext.kartographer.live' );
 
 
-   $attrs = $this->getDefaultAttributes();
-   $attrs['class'] .= ' 
mw-kartographer-interactive';
+   $outerAttrs = $this->getDefaultAttributes();
+   $outerAttrs['class'] .= ' 
mw-kartographer-interactive';
if ( isset( $alignClasses[$this->align] ) ) {
-   $attrs['class'] .= ' ' . 
$alignClasses[$this->align];
+   $outerAttrs['class'] .= ' ' . 
$alignClasses[$this->align];
}
-   $width = is_numeric( $this->width ) ? 
"{$this->width}px" : $this->width;
-   $attrs['style'] = "width:{$width}; 
height:{$this->height}px;";
-   $attrs['data-style'] = $this->mapStyle;
-   $attrs['data-zoom'] = $this->zoom;
-   $attrs['data-lat'] = $this->lat;
-   $attrs['data-lon'] = $this->lon;
+   $outerAttrs['style'] = $outerStyle;
+   $outerAttrs['data-style'] = $this->mapStyle;
+   $outerAttrs['data-zoom'] = $this->zoom;
+   $outerAttrs['data-lat'] = $this->lat;
+   $outerAttrs['data-lon'] = $this->lon;
if ( $this->showGroups ) {
-   $attrs['data-overlays'] = 
FormatJson::encode( $this->showGroups, false,
+   $outerAttrs['data-overlays'] = 
FormatJson::encode( $this->showGroups, false,
FormatJson::ALL_OK );
}
+
+   $innerDiv = Html::element( 'div',
+   [
+   'class' => 
'mw-kartographer-responder',
+   'style' => $innerStyle,
+   ]
+   );
 
$groups = $output->getExtensionData( 
'kartographer_interact' );
$groups = $groups ?: [];
$groups = array_merge( $groups, 
$this->showGroups );
$output->setExtensionData( 
'kartographer_interact', $groups );
 
-   return Html::rawElement( 'div', $attrs );
+   return Html::rawElement( 'div', $outerAttrs, 
$innerDiv );
break;
default:
throw new UnexpectedValueException(

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

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

__

[MediaWiki-commits] [Gerrit] Undeploy Gather extension - change (operations/mediawiki-config)

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

Change subject: Undeploy Gather extension
..


Undeploy Gather extension

Bug: T128568
Change-Id: I3472489db5873e81c398a8eba5a5e5de79b2c045
---
M wmf-config/InitialiseSettings-labs.php
M wmf-config/InitialiseSettings.php
M wmf-config/extension-list
M wmf-config/mobile-labs.php
M wmf-config/mobile.php
5 files changed, 0 insertions(+), 26 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 74941f7..3b7577e 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -294,11 +294,6 @@
]
],
 
-   // T97704
-   'wmgGatherAutohideFlagLimit' => [
-   'default' => 3,
-   ],
-
'wmgEnableGeoData' => [
'wikidatawiki' => true,
],
@@ -436,10 +431,6 @@
],
'wmgFlowEnableOptInBetaFeature' => [
'enwiki' => true,
-   ],
-
-   'wmgUseGather' => [
-   'default' => true,
],
 
'wmgUseWPB' => [
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3eb4d58..3473732 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13964,13 +13964,6 @@
'prefix' => 'wbs'
]
 ],
-'wmgUseGather' => [
-   'default' => false,
-   'testwiki' => true,
-   'test2wiki' => true,
-   'enwikivoyage' => true, // T97488
-   'hewiki' => true, // T97488
-],
 'wmgEnableTextExtracts' => [
'default' => true,
 ],
diff --git a/wmf-config/extension-list b/wmf-config/extension-list
index e29cd05..572bc33 100644
--- a/wmf-config/extension-list
+++ b/wmf-config/extension-list
@@ -47,7 +47,6 @@
 $IP/extensions/FundraiserLandingPage/FundraiserLandingPage.php
 $IP/extensions/FundraisingTranslateWorkflow/FundraisingTranslateWorkflow.php
 $IP/extensions/Gadgets/Gadgets.php
-$IP/extensions/Gather/Gather.php
 $IP/extensions/GeoCrumbs/GeoCrumbs.php
 $IP/extensions/GeoData/GeoData.php
 $IP/extensions/GettingStarted/GettingStarted.php
diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php
index 2bea97a..591ef99 100644
--- a/wmf-config/mobile-labs.php
+++ b/wmf-config/mobile-labs.php
@@ -11,10 +11,6 @@
$wgJsonConfigs['JsonZeroConfig']['remote']['url'] = 
'http://zero.wikimedia.beta.wmflabs.org/w/api.php';
}
}
-
-   if ( $wmgUseGather ) {
-   require_once "$IP/extensions/Gather/Gather.php";
-   }
 }
 
 // T114552
@@ -24,5 +20,4 @@
 $wgMFUseCentralAuthToken = $wmgMFUseCentralAuthToken;
 $wgMFSpecialCaseMainPage = $wmgMFSpecialCaseMainPage;
 
-$wgGatherAutohideFlagLimit = $wmgGatherAutohideFlagLimit;
 $wgMFMobileFormatterHeadings = $wmgMFMobileFormatterHeadings;
diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index 53d51d8..53d9271 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -131,10 +131,6 @@
 
// Brute-force bandwidth optimization by stripping srcset
$wgMFStripResponsiveImages = true;
-
-   if ( $wmgUseGather ) {
-   require_once "$IP/extensions/Gather/Gather.php";
-   }
 }
 
 if ( $wmfRealm === 'labs' ) {

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

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

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


[MediaWiki-commits] [Gerrit] planet: only run updates when in active datacenter - change (operations/puppet)

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

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

Change subject: planet: only run updates when in active datacenter
..

planet: only run updates when in active datacenter

Change-Id: Ib9f1cc485e08f22e3d1c2d5bb2bf1a963e3c3f76
---
M modules/planet/manifests/cronjob.pp
M modules/planet/manifests/init.pp
M modules/role/manifests/planet/venus.pp
3 files changed, 18 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/40/289340/1

diff --git a/modules/planet/manifests/cronjob.pp 
b/modules/planet/manifests/cronjob.pp
index c1a125c..0a2cf2b 100644
--- a/modules/planet/manifests/cronjob.pp
+++ b/modules/planet/manifests/cronjob.pp
@@ -8,8 +8,15 @@
 # randomize the minute crons run, using $title as seed
 $minute = fqdn_rand(60, $title)
 
+# crons only running if in active datacenter
+if $planet_active_dc in $domain {
+cron_ensure => 'present'
+} else {
+cron_ensure => 'absent'
+}
+
 cron { "update-${title}-planet":
-ensure  => 'present',
+ensure  => $cron_ensure,
 command => "http_proxy=\"${planet::planet_http_proxy}\" 
https_proxy=\$http_proxy ${planet_bin} -v ${planet_config} > ${planet_logfile} 
2>&1",
 user=> 'planet',
 minute  => $minute,
diff --git a/modules/planet/manifests/init.pp b/modules/planet/manifests/init.pp
index 2673fb5..4ca476a 100644
--- a/modules/planet/manifests/init.pp
+++ b/modules/planet/manifests/init.pp
@@ -13,11 +13,16 @@
 #   see the role class for this
 # $planet_meta_link - a protocol relative link
 #   example: meta.wikimedia.org/wiki/Planet_Wikimedia
+# $planet_http_proxy - set proxy to be used for downloading feeds
+#   example: http://url-downloader.${::site}.wikimedia.org:8080
+# $planet_active_dc - currently active datacenter, updates will only run here
+#   example: eqiad
 class planet (
 $planet_domain_name,
 $planet_languages,
 $planet_meta_link,
 $planet_http_proxy,
+$planet_active_dc,
 ) {
 
 # locales are essential for planet
diff --git a/modules/role/manifests/planet/venus.pp 
b/modules/role/manifests/planet/venus.pp
index f251410..b6a8fc7 100644
--- a/modules/role/manifests/planet/venus.pp
+++ b/modules/role/manifests/planet/venus.pp
@@ -215,12 +215,16 @@
 # since we are on a private IP now we need to proxy to fetch external URLs
 $planet_http_proxy = "http://url-downloader.${::site}.wikimedia.org:8080";
 
+# set to the currently active DC. feed updates are only running here.
+$planet_active_dc = 'eqiad'
+
 # the 'planet' class from modules/planet/init.pp does the setup
 class {'::planet':
 planet_domain_name => $planet_domain_name,
 planet_languages   => $planet_languages,
 planet_meta_link   => $planet_meta_link,
-planet_http_proxy  => $planet_http_proxy
+planet_http_proxy  => $planet_http_proxy,
+planet_active_dc   => $planet_active_dc
 }
 
 ferm::service { 'planet-http':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9f1cc485e08f22e3d1c2d5bb2bf1a963e3c3f76
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] WikibaseSearchItemPageGenerator non-verbose mode - change (pywikibot/core)

2016-05-17 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: WikibaseSearchItemPageGenerator non-verbose mode
..

WikibaseSearchItemPageGenerator non-verbose mode

Currently WikibaseSearchItemPageGenerator always
fetches all items twice in order to display an item count,
and then yield each item.

Also do not fetch all entities for test_searchitem*.

The test only needs to confirm one item is fetched,
and currently it can halt Travis builds due to fetching
~5000 items twice taking 10 mins without any output.

Change-Id: Ia8b0e97930a94945d3ed2cdf593887ebff8a3e5c
---
M pywikibot/pagegenerators.py
M tests/pagegenerators_tests.py
2 files changed, 20 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/39/289339/1

diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 6c7a2b2..e42ba58 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -838,7 +838,8 @@
 value = params[-1]
 lang = params[0] if len(params) == 2 else None
 gen = WikibaseSearchItemPageGenerator(value, language=lang,
-  site=self.site)
+  site=self.site,
+  
verbose=config.verbose_output)
 elif arg == '-search':
 if not value:
 value = pywikibot.input('What do you want to search for?')
@@ -2688,7 +2689,8 @@
 return WikidataPageFromItemGenerator(items_pages, site)
 
 
-def WikibaseSearchItemPageGenerator(text, language=None, total=None, 
site=None):
+def WikibaseSearchItemPageGenerator(text, language=None, total=None, site=None,
+verbose=None):
 """
 Generate pages that contain the provided text.
 
@@ -2702,6 +2704,8 @@
 @type total: int or None
 @param site: Site for generator results.
 @type site: L{pywikibot.site.BaseSite}
+@param verbose: Display an item count if True or None
+@type verbose: bool or None
 """
 if site is None:
 site = pywikibot.Site()
@@ -2710,7 +2714,9 @@
 repo = site.data_repository()
 
 data = repo.search_entities(text, language, limit=total)
-pywikibot.output(u'retrieved %d items' % len(list(data)))
+if verbose is None or verbose:
+data = list(data)
+pywikibot.output('retrieved %d items' % len(data))
 for item in data:
 yield pywikibot.ItemPage(repo, item['id'])
 
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index b1a0057..12caea2 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -970,7 +970,7 @@
 gf.handleArg('-searchitem:abc')
 gen = gf.getCombinedGenerator()
 self.assertIsNotNone(gen)
-self.assertGreater(len(set(gen)), 0)
+self.assertIsNotNone(next(gen))
 
 def test_searchitem_language(self):
 """Test -searchitem with custom language specified."""
@@ -978,13 +978,20 @@
 gf.handleArg('-searchitem:pl:abc')
 gen = gf.getCombinedGenerator()
 self.assertIsNotNone(gen)
-pages = set(gen)
+# ABC disambiguation
+page1 = next(gen)
+self.assertEqual(page1.title(), 'Q286874')
+
 gf = pagegenerators.GeneratorFactory(site=self.site)
 gf.handleArg('-searchitem:en:abc')
 gen = gf.getCombinedGenerator()
 self.assertIsNotNone(gen)
-pages2 = set(gen)
-self.assertNotEqual(pages, pages2)
+# American Broadcasting Company
+page1 = next(gen)
+self.assertEqual(page1.title(), 'Q169889')
+# ABC disambiguation
+page2 = next(gen)
+self.assertEqual(page2.title(), 'Q286874')
 
 
 class TestLogeventsFactoryGenerator(DefaultSiteTestCase,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8b0e97930a94945d3ed2cdf593887ebff8a3e5c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

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


[MediaWiki-commits] [Gerrit] Bring back messages used by old email formatter system - change (mediawiki...Echo)

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

Change subject: Bring back messages used by old email formatter system
..


Bring back messages used by old email formatter system

Bug: T135446
Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62
(cherry picked from commit 46e69972c679f7fdab44bc914b9dfb2491a33fee)
---
M i18n/en.json
M i18n/qqq.json
M includes/EmailFormatter.php
3 files changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 49a020b..16a99e2 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -194,6 +194,8 @@
"echo-email-subject-default": "New notification at {{SITENAME}}",
"echo-email-body-default": "You have a new notification at 
{{SITENAME}}:\n\n$1",
"echo-email-batch-body-default": "You have a new notification.",
+   "echo-email-footer-default-html": "To control which emails we send you, 
check your 
preferences.\n$1",
+   "echo-email-footer-default": "$2\n\nTo control which emails we send 
you, check your 
preferences:\n{{canonicalurl:{{#special:Preferences}}#mw-prefsection-echo}}\n\n$1",
"echo-email-plain-footer": "To control which emails we send you, check 
your preferences:",
"echo-email-html-footer": "To control which emails we send you, check your 
preferences.\n$1",
"echo-notification-alert": "{{PLURAL:$1|Alert ($1)|Alerts 
($1)|100=Alerts (99+)}}",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 7ab8302..c5a88e3 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -185,6 +185,8 @@
"echo-email-subject-default": "Default subject for Echo e-mail 
notifications",
"echo-email-body-default": "Default message content for Echo email 
notifications. Parameters:\n* $1 - a plain text description of the 
notification",
"echo-email-batch-body-default": "Default message for Echo e-mail 
digest notifications",
+   "echo-email-footer-default": "Default footer content for Echo text 
e-mail notifications. Parameters:\n* $1 - the address of the organization that 
sent the email\n* $2 - \"---...\" 
({{msg-mw|echo-email-batch-separator}})\n\nFor HTML version, see 
{{msg-mw|echo-email-footer-default-html}}.",
+   "echo-email-footer-default-html": "Default footer content for Echo html 
e-mail notifications. Parameters:\n* $1 - the address of the organization that 
sent the email\n* $2 - the URL to the notification preference page\nFor 
plain-text version, see {{msg-mw|Echo-email-footer-default}}.",
"echo-email-plain-footer": "Footer content for Echo text e-mail 
notifications.\n\nFor HTML version, see {{msg-mw|echo-email-html-footer}}.",
"echo-email-html-footer": "Default footer content for Echo html e-mail 
notifications. Parameters:\n* $1 - the address of the organization that sent 
the email\n* $2 - the URL to the notification preference page\nFor plain-text 
version, see {{msg-mw|Echo-email-footer-default}}.",
"echo-notification-alert": "Label for alert notifications (= non 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread alerts. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-message}}\n{{Identical|Alert}}",
diff --git a/includes/EmailFormatter.php b/includes/EmailFormatter.php
index 21bed12..2b79bd1 100644
--- a/includes/EmailFormatter.php
+++ b/includes/EmailFormatter.php
@@ -667,7 +667,7 @@
 * {@inheritDoc}
 */
public function decorateFooter( $address, User $user ) {
-   return EchoEmailMode::message( 'echo-email-plain-footer', $user 
)
+   return EchoEmailMode::message( 'echo-email-footer-default', 
$user )
->params(
$address,
EchoEmailMode::message( 
'echo-email-batch-separator', $user )->text()
@@ -770,7 +770,7 @@
$title = SpecialPage::getTitleFor( 'Preferences' );
$title->setFragment( "#mw-prefsection-echo" );
 
-   return EchoEmailMode::message( 'echo-email-html-footer', $user )
+   return EchoEmailMode::message( 
'echo-email-footer-default-html', $user )
->params( $address )
->rawParams( $title->getFullURL( '', false, PROTO_HTTPS 
) )
->text();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-co

[MediaWiki-commits] [Gerrit] Add selector whitespace to stylelint - change (oojs/ui)

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

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

Change subject: Add selector whitespace to stylelint
..

Add selector whitespace to stylelint

Adding selector whitespace rules, compare
https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS#Whitespace
Leaving single colon in to make IE 6-8 happy.

Change-Id: Ic0a3e39f47aeb110ef0b04743ecb71aab84e62e4
---
M .stylelintrc
M demos/styles/demo.css
M src/styles/common.less
M src/themes/apex/widgets.less
4 files changed, 22 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/38/289338/1

diff --git a/.stylelintrc b/.stylelintrc
index 4eddef9..68b3e4c 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -45,6 +45,17 @@
"block-closing-brace-space-before": [ "always-single-line" ],
"block-opening-brace-newline-after": [ "always-multi-line" ],
"block-opening-brace-space-after": [ "always-single-line" ],
-   "block-opening-brace-space-before": [ "always" ]
+   "block-opening-brace-space-before": [ "always" ],
+
+   "selector-combinator-space-after": [ "always" ],
+   "selector-combinator-space-before": [ "always" ],
+   "selector-no-vendor-prefix": true,
+   "selector-root-no-composition": true,
+   "selector-pseudo-element-colon-notation": [ "single" ],
+
+   "selector-list-comma-newline-after": [ "always" ],
+   "selector-list-comma-newline-before": [ "never-multi-line" ],
+   "selector-list-comma-space-after": [ "always-single-line" ],
+   "selector-list-comma-space-before": [ "never" ]
}
 }
\ No newline at end of file
diff --git a/demos/styles/demo.css b/demos/styles/demo.css
index be9dc89..b2a432d 100644
--- a/demos/styles/demo.css
+++ b/demos/styles/demo.css
@@ -97,7 +97,7 @@
 }
 
 /* Console */
-
+/* stylelint-disable selector-pseudo-element-colon-notation */
 .oo-ui-demo-console {
clear: both;
position: relative;
@@ -241,3 +241,4 @@
background: #eee;
color: #333;
 }
+/* stylelint-enable selector-pseudo-element-colon-notation */
\ No newline at end of file
diff --git a/src/styles/common.less b/src/styles/common.less
index 8d165e8..b3b425d 100644
--- a/src/styles/common.less
+++ b/src/styles/common.less
@@ -15,23 +15,23 @@
background-image: e( '/* @embed */' ) url( ~@{url} );
 }
 
-.oo-ui-background-image-svg2( @svg, @fallback ) when ( @oo-ui-distribution = 
mixed ) {
+.oo-ui-background-image-svg2( @svg, @fallback ) when ( @oo-ui-distribution = 
mixed ) { // stylelint-disable-line selector-list-comma-newline-after
background-image: url( @fallback );
background-image: -webkit-linear-gradient( transparent, transparent ), 
e( '/* @embed */' ) url( @svg );
background-image: linear-gradient( transparent, transparent ), e( '/* 
@embed */' ) url( @svg );
background-image: -o-linear-gradient( transparent, transparent ), url( 
@fallback );
 }
-.oo-ui-background-image-svg2( @svg, @fallback ) when ( @oo-ui-distribution = 
vector ) {
+.oo-ui-background-image-svg2( @svg, @fallback ) when ( @oo-ui-distribution = 
vector ) { // stylelint-disable-line selector-list-comma-newline-after
.oo-ui-background-image( @svg );
 }
-.oo-ui-background-image-svg2( @svg, @fallback ) when ( @oo-ui-distribution = 
raster ) {
+.oo-ui-background-image-svg2( @svg, @fallback ) when ( @oo-ui-distribution = 
raster ) { // stylelint-disable-line selector-list-comma-newline-after
.oo-ui-background-image( @fallback );
 }
 
 .oo-ui-background-image-svg( @url-without-extension ) {
@svg: '@{url-without-extension}.svg';
@fallback: '@{url-without-extension}.@{oo-ui-default-image-ext}';
-   .oo-ui-background-image-svg2( @svg, @fallback );
+   .oo-ui-background-image-svg2( @svg, @fallback ); // 
stylelint-disable-line selector-list-comma-newline-after
 }
 
 .oo-ui-force-webkit-gpu() {
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index 168ab39..3c5e0eb 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -274,7 +274,8 @@
}
 
// No close, no indicator:
-   &-empty, &-notsupported {
+   &-empty,
+   &-notsupported {
.oo-ui-selectFileWidget-info {
.oo-ui-selectFileWidget-label {
right: 0.5em;
@@ -283,7 +284,8 @@
}
 
// No close, with indicator:
-   &-empty.oo-ui-indicatorElement, &-notsupported.oo-ui-indicatorElement {
+   &-empty.oo-ui-indicatorElement,
+   &-notsupported.oo-ui-indicatorElement {
.oo-ui-selectFileWidget-info {
.oo-ui-selectFileWidget-label {
right: 2em;

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

[MediaWiki-commits] [Gerrit] WIP: exportRestrictions maintenance script - change (mediawiki/core)

2016-05-17 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: WIP: exportRestrictions maintenance script
..

WIP: exportRestrictions maintenance script

Bug: T135278
Change-Id: I74aec31c86557b1997e95bf435bca5227f93b0ef
---
A maintenance/exportRestrictions.php
1 file changed, 60 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/289337/1

diff --git a/maintenance/exportRestrictions.php 
b/maintenance/exportRestrictions.php
new file mode 100644
index 000..59a9406
--- /dev/null
+++ b/maintenance/exportRestrictions.php
@@ -0,0 +1,60 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ * @author Gabriel Wicke 
+ */
+
+require_once __DIR__ . '/Maintenance.php';
+
+/**
+ * Maintenance script to dump revision restrictions, one batch at a time.
+ *
+ * @ingroup Maintenance
+ */
+class ExportRevisionRestrictions extends Maintenance {
+
+   public function __construct() {
+   parent::__construct();
+   $this->addDescription( 'Dump revision restrictions, one batch 
at a time.' );
+   $this->addOption( 'start', 'Start from this revision.' );
+   $this->addOption( 'limit', 'Limit the batch size to this 
value.' );
+   }
+
+   public function execute() {
+   $dbr = $this->getDB( DB_SLAVE, 'vslow' );
+   $batchResult = $dbr->select( [ 'revision', 'page' ],
+   [ 'page_title', 'page_id', 'rev_id', 'rev_deleted' ],
+   [ 'rev_id > ' . intval( $this->getOption( 'start', '0' 
) ),
+   'rev_deleted != 0' ],
+   __METHOD__,
+   [ 'ORDER BY' => 'rev_id ASC',
+   'LIMIT' => intval( $this->getOption( 'limit', 
1000 ) ) ],
+   [ 'page_id' => 'rev_page' ] );
+   $rows = [];
+   forEach( $batchResult as $row ) {
+   $rows[] = $row;
+   }
+   $this->output(json_encode($rows));
+   }
+}
+
+$maintClass = "ExportRevisionRestrictions";
+require_once RUN_MAINTENANCE_IF_MAIN;

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

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

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


[MediaWiki-commits] [Gerrit] Don't load initialision edit or watch code on special pages - change (mediawiki...MobileFrontend)

2016-05-17 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Don't load initialision edit or watch code on special pages
..

Don't load initialision edit or watch code on special pages

Bug: T135542
Change-Id: I822df500ac2793b3ad9cc83d38e9cda97813b82f
---
M includes/skins/SkinMinerva.php
1 file changed, 11 insertions(+), 8 deletions(-)


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

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 96d5ba1..8172234 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -1002,6 +1002,17 @@
$campaign = $req->getVal( 'campaign' );
$title = $this->getTitle();
 
+
+   if ( !$title->isSpecialPage() ) {
+   if ( $this->isAllowedPageAction( 'watch' ) ) {
+   // Explicitly add the mobile watchstar code.
+   $modules[] = 'skins.minerva.watchstar';
+   }
+   if ( $this->isAllowedPageAction( 'edit' ) ) {
+   $modules[] = 'skins.minerva.editor';
+   }
+   }
+
if ( $user->isLoggedIn() ) {
if ( $this->useEcho() ) {
$modules[] = 'skins.minerva.notifications';
@@ -1043,14 +1054,6 @@
 
// Doing this unconditionally, prevents the desktop watchstar 
from ever leaking into mobile view.
$modules['watch'] = [];
-   if ( $this->isAllowedPageAction( 'watch' ) ) {
-   // Explicitly add the mobile watchstar code.
-   $modules['watch'] = [ 'skins.minerva.watchstar' ];
-   }
-
-   if ( $this->isAllowedPageAction( 'edit' ) ) {
-   $modules['editor'] = [ 'skins.minerva.editor' ];
-   }
 
$modules['context'] = $this->getContextSpecificModules();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I822df500ac2793b3ad9cc83d38e9cda97813b82f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] WIP: Beta: enhanced search bar for non-JS users - change (mediawiki...MobileFrontend)

2016-05-17 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: WIP: Beta: enhanced search bar for non-JS users
..

WIP: Beta: enhanced search bar for non-JS users

* Repurpose an obsolete template file to create the search form;
* Use a white magnifying glass instead of the word "Search" for
  the button label.

TODO: doesn't look good on firefox mobile v. 43 and 46.

Bug: T121734
Change-Id: Ia0c57dc542fa2abe0768b2fcb9cde03f6f23ec7b
---
M extension.json
M includes/skins/MinervaTemplate.php
D includes/skins/searchForm.mustache
A includes/skins/search_form.mustache
M resources/skins.minerva.base.styles/ui.less
M resources/skins.minerva.beta.styles/ui.less
A resources/skins.minerva.icons.beta.images/magnifying-glass-white.svg
7 files changed, 108 insertions(+), 20 deletions(-)


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

diff --git a/extension.json b/extension.json
index 099f62f..feb51e8 100644
--- a/extension.json
+++ b/extension.json
@@ -211,7 +211,8 @@
"prefix": "mw-ui",
"selector": ".mw-ui-icon-{name}:before",
"images": {
-   "language-switcher": 
"resources/skins.minerva.icons.beta.images/languageSwitcher.svg"
+   "language-switcher": 
"resources/skins.minerva.icons.beta.images/languageSwitcher.svg",
+   "magnifying-glass-white": 
"resources/skins.minerva.icons.beta.images/magnifying-glass-white.svg"
}
},
"mobile.overlay.images": {
diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index 60be3b6..1a1fb2c 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -35,20 +35,16 @@
 * @return string
 */
protected function getSearchForm( $data ) {
-   return Html::openElement( 'form',
-   [
-   'action' => $data['wgScript'],
-   'class' => 'search-box',
-   ]
-   ) .
-   $this->makeSearchInput( $this->getSearchAttributes() ) .
-   $this->makeSearchButton(
-   'fulltext',
-   [
-   'class' => MobileUI::buttonClass( 
'progressive', 'fulltext-search no-js-only' ),
-   ]
-   ) .
-   Html::closeElement( 'form' );
+   $args = [
+   'action' => $data['wgScript'],
+   'searchInput' => $this->makeSearchInput( 
$this->getSearchAttributes() ),
+   'searchButton' => $this->makeSearchButton( 'fulltext', [
+   'class' => MobileUI::buttonClass( 
'progressive', 'fulltext-search no-js-only' ),
+   ] ),
+   'isBeta' => 
MobileContext::singleton()->isBetaGroupMember()
+   ];
+   $templateParser = new TemplateParser( __DIR__ );
+   return $templateParser->processTemplate( 'search_form', $args );
}
 
/**
diff --git a/includes/skins/searchForm.mustache 
b/includes/skins/searchForm.mustache
deleted file mode 100644
index ecc4ef7..000
--- a/includes/skins/searchForm.mustache
+++ /dev/null
@@ -1,3 +0,0 @@
-
-   {{{searchForm}}}
-
diff --git a/includes/skins/search_form.mustache 
b/includes/skins/search_form.mustache
new file mode 100644
index 000..7073ccb
--- /dev/null
+++ b/includes/skins/search_form.mustache
@@ -0,0 +1,14 @@
+
+   {{# isBeta }}
+   
+   {{{ searchButton }}}
+   
+   
+   {{{ searchInput }}}
+   
+   {{/isBeta}}
+   {{^ isBeta }}
+   {{{ searchInput }}}
+   {{{ searchButton }}}
+   {{/isBeta}}
+
\ No newline at end of file
diff --git a/resources/skins.minerva.base.styles/ui.less 
b/resources/skins.minerva.base.styles/ui.less
index 8aa2438..e2050e3 100644
--- a/resources/skins.minerva.base.styles/ui.less
+++ b/resources/skins.minerva.base.styles/ui.less
@@ -114,7 +114,7 @@
 
 .client-use-basic-search,
 .client-nojs {
-   .header {
+   .search-box {
.search,
.fulltext-search {
float: left;
diff --git a/resources/skins.minerva.beta.styles/ui.less 
b/resources/skins.minerva.beta.styles/ui.less
index 1d2a7a3..b6eecf3 100644
--- a/resources/skins.minerva.beta.styles/ui.less
+++ b/resources/skins.minerva.beta.styles/ui.less
@@ -23,4 +23,31 @@
}
 }
 
-
+.client-use-basic-search,
+.client-nojs {
+   .

[MediaWiki-commits] [Gerrit] Add tasnimnews.com & khamenei.ir to wgCopyUploadsDomains - change (operations/mediawiki-config)

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

Change subject: Add tasnimnews.com & khamenei.ir to wgCopyUploadsDomains
..


Add tasnimnews.com & khamenei.ir to wgCopyUploadsDomains

Requested by Czar. Content claimed to be under CC-BY-4.0.

Bug: T134472
Change-Id: Idb5b936056006c952dce3ca5e12d947144d104a7
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d20c02c..3eb4d58 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12147,7 +12147,9 @@
'*.asc-test.nl',// African Studies Centre - 
T133286
'*.bn.br',  // National Digital Library 
of Brazil - T134584
'*.*.bn.br',
-   'museudaimigracao.org.br'   // Immigration museum in 
Brazil - T134566
+   'museudaimigracao.org.br',  // Immigration museum in 
Brazil - T134566
+   '*.tasnimnews.com', // CC-BY 4.0 content - 
T134472
+   '*.khamenei.ir',// CC-BY 4.0 content - 
T134472
],
 ],
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb5b936056006c952dce3ca5e12d947144d104a7
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] hiera: add variable for the active datacenter - change (operations/puppet)

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

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

Change subject: hiera: add variable for the active datacenter
..

hiera: add variable for the active datacenter

Can we add one global variable in common.yaml,
next to the list of datacenters, that is set to
the currently active data center?

Then we could use this in several places to make a
decision based on this and flip the switch in this one place.

For example, i have a misc. service on a VM and set it
up in both eqiad and codfw and want them both to use my
role and be up and running, but only one of them should be
active, in this case, some crons should only be running on the
active one. And "if this is $active_dc, then $ensure = ensure"
would make sense.

Change-Id: I1e150538e574ae476fe54fe818e52e2da8c9cfbd
---
M hieradata/common.yaml
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/34/289334/1

diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 26f25ae..90e98ea 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -5,6 +5,9 @@
   - esams
   - ulsfo
 
+# the datacenter that currently gets traffic
+active_datacenter: eqiad
+
 # Main statsd instance
 statsd: statsd.eqiad.wmnet:8125
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e150538e574ae476fe54fe818e52e2da8c9cfbd
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] Remove scap::clean now that scap is clean - change (operations/puppet)

2016-05-17 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review.

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

Change subject: Remove scap::clean now that scap is clean
..

Remove scap::clean now that scap is clean

Now that scap::clean has removed old scap code, scap::clean can be
removed.

Change-Id: I2c167cba9525fb59189dbb5f2cdcf60631e6c98b
---
D modules/scap/manifests/clean.pp
M modules/scap/manifests/init.pp
2 files changed, 0 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/33/289333/1

diff --git a/modules/scap/manifests/clean.pp b/modules/scap/manifests/clean.pp
deleted file mode 100644
index cfa2431..000
--- a/modules/scap/manifests/clean.pp
+++ /dev/null
@@ -1,26 +0,0 @@
-# == Class scap::clean
-#
-# This is a class that removes any vestiges of legacy scap from production
-# systems that may cause issues. This class can be removed after it is
-# run in production.
-#
-# Scap has a long history, let's make sure we hide that.
-
-class scap::clean {
-$old_binstubs = [
-'/usr/local/bin/mwversionsinuse',
-'/usr/local/bin/refreshCdbJsonFiles',
-'/usr/local/bin/scap-rebuild-cdbs',
-'/usr/local/bin/scap-recompile',
-'/usr/local/bin/sync-common',
-]
-
-file { $old_binstubs:
-ensure => absent,
-}
-
-file { '/srv/deployment/scap':
-ensure => absent,
-force  => true,
-}
-}
diff --git a/modules/scap/manifests/init.pp b/modules/scap/manifests/init.pp
index 5fc42e5..cdffa51 100644
--- a/modules/scap/manifests/init.pp
+++ b/modules/scap/manifests/init.pp
@@ -3,9 +3,6 @@
 # Common role for scap masters and targets
 
 class scap ($deployment_server = 'deployment') {
-# Temporarily included to clean legacy code, should be removed once run
-include scap::clean
-
 package { 'scap':
 ensure => '3.2.0-1',
 }

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

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

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


[MediaWiki-commits] [Gerrit] HTML email footer shows raw HTML - change (mediawiki...Echo)

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

Change subject: HTML email footer shows raw HTML
..


HTML email footer shows raw HTML

Change-Id: I45b8aa2b951c155a3f8c3c7be006604113cbc2ee
(cherry picked from commit 08fdaa0d22ef83a767abbcea293252d485f4e102)
---
M includes/formatters/EchoHtmlEmailFormatter.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/formatters/EchoHtmlEmailFormatter.php 
b/includes/formatters/EchoHtmlEmailFormatter.php
index 54d268d..3c4e4d2 100644
--- a/includes/formatters/EchoHtmlEmailFormatter.php
+++ b/includes/formatters/EchoHtmlEmailFormatter.php
@@ -127,7 +127,8 @@
 
return $this->msg( 'echo-email-html-footer' )
->params( $wgEchoEmailFooterAddress, $prefsUrl )
-   ->parse();
+   // This is a raw HTML message, so we need text() 
instead of parse() here
+   ->text();
}
 
private function renderLink( $link, $style ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45b8aa2b951c155a3f8c3c7be006604113cbc2ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Disable $wgCentralAuthCheckSULMigration functionality - change (operations/mediawiki-config)

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

Change subject: Disable $wgCentralAuthCheckSULMigration functionality
..


Disable $wgCentralAuthCheckSULMigration functionality

Bug: T127887
Change-Id: I74094ed359fd9f9917aecf506f4f630851171dbe
---
M wmf-config/CommonSettings.php
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 72cf3dd..43eeb24 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1332,9 +1332,6 @@
// Enables Special:GlobalRenameRequest
$wgCentralAuthEnableGlobalRenameRequest = true;
 
-   // Enables login using pre-SULF username and notification
-   $wgCentralAuthCheckSULMigration = true;
-
// temporary for testing -- legoktm 2015-07-02
if ( $wgDBname === 'metawiki' ) {
$wgCentralAuthEnableUserMerge = false;

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

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

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


[MediaWiki-commits] [Gerrit] Use CircleMarker in the map view - change (wikidata...gui)

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

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

Change subject: Use CircleMarker in the map view
..

Use CircleMarker in the map view

radius is specified in pixels, and make slight adjustment
to opacity.

Change-Id: I4eedc1eb90450d7d29a9b5d758ed747e5f3dcd84
---
M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
1 file changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/96/288996/1

diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
index a14308a..8e528f9 100644
--- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
@@ -99,7 +99,7 @@
lon = longLat[0],
lat = longLat[1];
 
-   var marker = L.circle( [ lat, lon ], 10 )
+   var marker = L.circleMarker( [ lat, lon ], 
self._getMarkerStyle() )
.bindPopup( popup );
 
marker.on( 'click', function() {
@@ -118,12 +118,20 @@
markers.push( marker );
}
 
-   return L.featureGroup( markers ).setStyle( {
+   return L.featureGroup( markers );
+   };
+
+   /**
+* @private
+*/
+   SELF.prototype._getMarkerStyle = function() {
+   return {
+   radius: 2,
color: '#e04545',
-   opacity: 0.9,
+   opacity: 0.8,
fillColor: '#e04545',
fillOpacity: 0.9
-   } );
+   };
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4eedc1eb90450d7d29a9b5d758ed747e5f3dcd84
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] Reimplement AsyncTask thread pool in SaneAsyncTask - change (apps...wikipedia)

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

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

Change subject: Reimplement AsyncTask thread pool in SaneAsyncTask
..

Reimplement AsyncTask thread pool in SaneAsyncTask

Copy the AsyncTask AOSP implementation to prevent low OEM
implementations. Test failure scenario by setting CPU_COUNT and
QUEUE_SIZE to 1.

Bug: T135572
Change-Id: I2ad6804a776a69d3a1dd2674a7ff8fbfcba71186
---
M app/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java
1 file changed, 30 insertions(+), 2 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java 
b/app/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java
index 0d0216a..7a1a396 100644
--- a/app/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java
+++ b/app/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java
@@ -1,11 +1,39 @@
 package org.wikipedia.concurrency;
 
 import android.os.AsyncTask;
+import android.support.annotation.NonNull;
 
 import org.wikipedia.util.log.L;
 
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Executor;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
 public abstract class SaneAsyncTask extends AsyncTask {
 private Throwable thrown;
+
+// Reimplement the stock AOSP AsyncTask implementation which may differ on 
OEM devices.
+private static final int CPU_COUNT = 
Runtime.getRuntime().availableProcessors();
+private static final int CORE_POOL_SIZE = CPU_COUNT + 1;
+private static final int MAXIMUM_POOL_SIZE = CPU_COUNT * 2 + 1;
+private static final int QUEUE_SIZE = 128;
+private static final int KEEP_ALIVE = 1;
+
+private static final ThreadFactory THREAD_FACTORY = new ThreadFactory() {
+private final AtomicInteger count = new AtomicInteger(1);
+@Override public Thread newThread(@NonNull Runnable runnable) {
+return new Thread(runnable, "AsyncTask #" + 
count.getAndIncrement());
+}
+};
+
+private static final BlockingQueue POOL_WORK_QUEUE = new 
LinkedBlockingQueue<>(QUEUE_SIZE);
+
+private static final Executor THREAD_POOL_EXECUTOR = new 
ThreadPoolExecutor(CORE_POOL_SIZE,
+MAXIMUM_POOL_SIZE, KEEP_ALIVE, TimeUnit.SECONDS, POOL_WORK_QUEUE, 
THREAD_FACTORY);
 
 public abstract T performTask() throws Throwable;
 
@@ -16,7 +44,7 @@
 public void onCatch(Throwable caught) { }
 
 public void execute() {
-super.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
+super.executeOnExecutor(THREAD_POOL_EXECUTOR);
 }
 
 public void cancel() {
@@ -57,4 +85,4 @@
 super.onPreExecute();
 onBeforeExecute();
 }
-}
\ No newline at end of file
+}

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

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

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


[MediaWiki-commits] [Gerrit] T135235 Turning off survey banner on wikipedia.org - change (operations/mediawiki-config)

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

Change subject: T135235 Turning off survey banner on wikipedia.org
..


T135235 Turning off survey banner on wikipedia.org

Bug: T135235
Change-Id: I5919c4fdbe373308f6dd288433dca822d105c6fd
---
M portals
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/portals b/portals
index 5912029..5e3f584 16
--- a/portals
+++ b/portals
-Subproject commit 5912029740d90ce28cfbff615d4e3929d10ca061
+Subproject commit 5e3f584b9ae4e317e68eec4d234d126dcda2b2ee

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5919c4fdbe373308f6dd288433dca822d105c6fd
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdrewniak 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add Puotal: namespace to jam.wikipedia - change (operations/mediawiki-config)

2016-05-17 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Add Puotal: namespace to jam.wikipedia
..

Add Puotal: namespace to jam.wikipedia

Bug: T135479
Change-Id: I187b038648cf31573c1414e4778e0aff6f5c70a1
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d20c02c..6961d5c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5033,6 +5033,10 @@
103 => 'プロジェクト‐ノート',
829 => 'モジュール‐ノート', // T49933
],
+   'jamwiki' => [
+   100 => 'Puotal', // T135479
+   101 => 'Puotal_diskoshan',
+   ],
'kawiki' => [
100 => 'პორტალი',
101 => 'პორტალი_განხილვა',

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

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

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


[MediaWiki-commits] [Gerrit] Add block formatting rules to stylelint - change (oojs/ui)

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

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

Change subject: Add block formatting rules to stylelint
..

Add block formatting rules to stylelint

See https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS#Whitespace

Change-Id: I011da395f9dae9773ba0355198f0be6473be275e
---
M .stylelintrc
M src/themes/apex/widgets.less
M src/themes/mediawiki/widgets.less
M src/themes/mediawiki/windows.less
4 files changed, 37 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/30/289330/1

diff --git a/.stylelintrc b/.stylelintrc
index df29c24..4eddef9 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -31,6 +31,20 @@
"string-no-newline": true,
 
"declaration-block-no-duplicate-properties": [ true, { ignore: 
[ "consecutive-duplicates" ] } ],
-   "declaration-block-no-shorthand-property-overrides": true
+   "declaration-block-no-shorthand-property-overrides": true,
+
+   "declaration-block-semicolon-newline-after": [ "always" ],
+   "declaration-block-semicolon-newline-before": [ 
"never-multi-line" ],
+   "declaration-block-semicolon-space-after": [ 
"always-single-line" ],
+   "declaration-block-semicolon-space-before": [ "never" ],
+   "declaration-block-single-line-max-declarations": 1,
+   "declaration-block-trailing-semicolon": [ "always" ],
+
+   "block-closing-brace-newline-after": [ "always" ],
+   "block-closing-brace-newline-before": [ "always-multi-line" ],
+   "block-closing-brace-space-before": [ "always-single-line" ],
+   "block-opening-brace-newline-after": [ "always-multi-line" ],
+   "block-opening-brace-space-after": [ "always-single-line" ],
+   "block-opening-brace-space-before": [ "always" ]
}
 }
\ No newline at end of file
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index fb39dbf..168ab39 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -1,4 +1,4 @@
-@import 'common';
+
 
 .theme-oo-ui-widget () {}
 
@@ -1053,10 +1053,20 @@
}
 
.oo-ui-progressBarWidget-slide-frames () {
-   from { margin-left: -40%; }
-   to { margin-left: 100%; }
+   from {
+   margin-left: -40%;
+   }
+   to {
+   margin-left: 100%;
+   }
}
-   @-webkit-keyframes oo-ui-progressBarWidget-slide { 
.oo-ui-progressBarWidget-slide-frames }
-   @-moz-keyframes oo-ui-progressBarWidget-slide { 
.oo-ui-progressBarWidget-slide-frames }
-   @keyframes oo-ui-progressBarWidget-slide { 
.oo-ui-progressBarWidget-slide-frames }
+   @-webkit-keyframes oo-ui-progressBarWidget-slide {
+   .oo-ui-progressBarWidget-slide-frames;
+   }
+   @-moz-keyframes oo-ui-progressBarWidget-slide {
+   .oo-ui-progressBarWidget-slide-frames;
+   }
+   @keyframes oo-ui-progressBarWidget-slide {
+   .oo-ui-progressBarWidget-slide-frames;
+   }
 }
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index da00318..b1cd7d8 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -390,7 +390,7 @@
border-radius: @border-radius-default;
}
 
-   &:checked + span  {
+   &:checked + span {
background-size: 100% 100%;
}
 
@@ -513,7 +513,7 @@
border-radius: 100%;
}
 
-   &:checked + span  {
+   &:checked + span {
background-size: 100% 100%;
}
 
@@ -1360,12 +1360,12 @@
}
}
@-webkit-keyframes oo-ui-progressBarWidget-slide {
-   .oo-ui-progressBarWidget-slide-frames
+   .oo-ui-progressBarWidget-slide-frames;
}
@-moz-keyframes oo-ui-progressBarWidget-slide {
-   .oo-ui-progressBarWidget-slide-frames
+   .oo-ui-progressBarWidget-slide-frames;
}
@keyframes oo-ui-progressBarWidget-slide {
-   .oo-ui-progressBarWidget-slide-frames
+   .oo-ui-progressBarWidget-slide-frames;
}
 }
diff --git a/src/themes/mediawiki/windows.less 
b/src/themes/mediawiki/windows.less
index f994380..a92fc22 100644
--- a/src/themes/mediawiki/windows.less
+++ b/src/themes/mediawiki/windows.less
@@ -280,7 +280,7 @@
}
 
&.oo-ui-window-ready {
-   > .oo-ui-window-frame  {
+   > .oo-ui-window-frame {
// Fade frame
opacity: 1;
 

[MediaWiki-commits] [Gerrit] Replace passCaptcha with passCaptchaFromRequest - change (mediawiki...ContactPage)

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

Change subject: Replace passCaptcha with passCaptchaFromRequest
..


Replace passCaptcha with passCaptchaFromRequest

See I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1.

Also replace wfSetupSession while we are at it.

Bug: Bug: T135477
Change-Id: I51915c7a65be61348bb62653292430782500bb42
(cherry picked from commit f39659bad40a1492224265687468acbddcb1c854)
---
M ContactPage_body.php
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ContactPage_body.php b/ContactPage_body.php
index bd96968..f853716 100644
--- a/ContactPage_body.php
+++ b/ContactPage_body.php
@@ -401,7 +401,7 @@
}
 
/* @var SimpleCaptcha $wgCaptcha */
-   if ( $this->useCaptcha() && !$wgCaptcha->passCaptcha() ) {
+   if ( $this->useCaptcha() && 
!$wgCaptcha->passCaptchaFromRequest( $request, $user ) ) {
return wfMessage( 'contactpage-captcha-error' 
)->plain();
}
 
@@ -484,11 +484,11 @@
 */
private function getCaptcha() {
// NOTE: make sure we have a session. May be required for 
CAPTCHAs to work.
-   wfSetupSession();
+   
\MediaWiki\Session\SessionManager::getGlobalSession()->persist();
 
$captcha = ConfirmEditHooks::getInstance();
-   $captcha->trigger = 'contactpage';
-   $captcha->action = 'contact';
+   $captcha->setTrigger( 'contactpage' );
+   $captcha->setAction( 'contact' );
 
return '' .
$captcha->getForm( $this->getOutput() ) .

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51915c7a65be61348bb62653292430782500bb42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContactPage
Gerrit-Branch: REL1_27
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Expose equivalent functionality for passCaptcha - change (mediawiki...ConfirmEdit)

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

Change subject: Expose equivalent functionality for passCaptcha
..


Expose equivalent functionality for passCaptcha

passCaptcha was made protected in I0da671a546700110d789b79a3089460abd9cce3b,
but some other extensions used it, provide passCaptchaFromRequest as a
replacement.

Bug: T135477
Change-Id: I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1
(cherry picked from commit f97212acbfcbc43c4c13cff0c22598e3b7dc7871)
---
M ReCaptcha/ReCaptcha.class.php
M ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php
M SimpleCaptcha/Captcha.php
3 files changed, 26 insertions(+), 7 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ReCaptcha/ReCaptcha.class.php b/ReCaptcha/ReCaptcha.class.php
index 9e6cffb..e92791a 100644
--- a/ReCaptcha/ReCaptcha.class.php
+++ b/ReCaptcha/ReCaptcha.class.php
@@ -27,13 +27,12 @@
   recaptcha_get_html( $wgReCaptchaPublicKey, 
$this->recaptcha_error, $useHttps );
}
 
-   function passCaptchaLimitedFromRequest( WebRequest $request, User $user 
) {
+   protected function getCaptchaParamsFromRequest( WebRequest $request ) {
// API is hardwired to return captchaId and captchaWord,
// so use that if the standard two are empty
$challenge = $request->getVal( 'recaptcha_challenge_field', 
$request->getVal( 'captchaId' ) );
$response = $request->getVal( 'recaptcha_response_field', 
$request->getVal( 'captchaWord' ) );
-
-   return $this->passCaptchaLimited( $challenge, $response, $user 
);
+   return [ $challenge, $response ];
}
 
/**
diff --git a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php 
b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php
index 759c5da..1d9130b 100644
--- a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php
+++ b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php
@@ -70,11 +70,11 @@
wfDebugLog( 'captcha', 'Unable to validate response: ' . $error 
);
}
 
-   public function passCaptchaLimitedFromRequest( WebRequest $request, 
User $user ) {
+   protected function getCaptchaParamsFromRequest( WebRequest $request ) {
$index = 'not used'; // ReCaptchaNoCaptcha combines captcha ID 
+ solution into a single value
// API is hardwired to return captchaWord, so use that if the 
standard isempty
$response = $request->getVal( 'g-recaptcha-response', 
$request->getVal( 'captchaWord' ) );
-   return $this->passCaptchaLimited( $index, $response, $user );
+   return [ $index, $response ];
}
 
/**
diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php
index 9b58259..63ed6d6 100755
--- a/SimpleCaptcha/Captcha.php
+++ b/SimpleCaptcha/Captcha.php
@@ -1059,10 +1059,18 @@
 * @return bool
 */
public function passCaptchaLimitedFromRequest( WebRequest $request, 
User $user ) {
+   list( $index, $word ) = $this->getCaptchaParamsFromRequest( 
$request );
+   return $this->passCaptchaLimited( $index, $word, $user );
+   }
+
+   /**
+* @param WebRequest $request
+* @return array [ captcha ID, captcha solution ]
+*/
+   protected function getCaptchaParamsFromRequest( WebRequest $request ) {
$index = $request->getVal( 'wpCaptchaId' );
$word = $request->getVal( 'wpCaptchaWord' );
-
-   return $this->passCaptchaLimited( $index, $word, $user );
+   return [ $index, $word ];
}
 
/**
@@ -1095,6 +1103,18 @@
/**
 * Given a required captcha run, test form input for correct
 * input on the open session.
+* @param WebRequest $request
+* @param User $user
+* @return bool if passed, false if failed or new session
+*/
+   public function passCaptchaFromRequest( WebRequest $request, User $user 
) {
+   list( $index, $word ) = $this->getCaptchaParamsFromRequest( 
$request );
+   return $this->passCaptcha( $index, $word, $user );
+   }
+
+   /**
+* Given a required captcha run, test form input for correct
+* input on the open session.
 * @param string $index Captcha idenitifier
 * @param string $word Captcha solution
 * @return bool if passed, false if failed or new session

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: REL1_27
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

___

[MediaWiki-commits] [Gerrit] Fix geo prop - change (mediawiki...mobileapps)

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

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

Change subject: Fix geo prop
..

Fix geo prop

• Don't return a null geo property or geo with a null latitude or
  longitude.

• Be more permissive in geo parser.

Bug: T135571
Change-Id: I22606b85bd60e1cc46105eae4b18e7be86d02ef4
---
M lib/parseProperty.js
M test/features/mobile-sections-lead/pagecontent.js
2 files changed, 24 insertions(+), 5 deletions(-)


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

diff --git a/lib/parseProperty.js b/lib/parseProperty.js
index 171745d..161b5bb 100644
--- a/lib/parseProperty.js
+++ b/lib/parseProperty.js
@@ -67,10 +67,11 @@
  * @returns {Geo} if latitude or longitude is truthy, else undefined.
  */
 function latLngStrToGeo(latLngStr) {
-var latLng = latLngStr && latLngStr.split('; ') || [];
-return latLng.length
-&& { "latitude": latLng[0] && parseFloat(latLng[0]),
-"longitude": latLng[1] && parseFloat(latLng[1]) };
+var latLng = latLngStr && latLngStr.split(/[;, ]+/) || [];
+var geo = latLng.length &&
+  { latitude: latLng[0] && parseFloat(latLng[0]),
+longitude: latLng[1] && parseFloat(latLng[1]) };
+return mUtil.defaultVal(mUtil.filterEmpty(geo));
 }
 
 /**
@@ -78,7 +79,10 @@
  */
 function parseGeo(lead, page) {
 var coordinates = lead.querySelector('span#coordinates .geo');
-page.geo = coordinates && latLngStrToGeo(coordinates.innerHTML);
+var geo = coordinates && latLngStrToGeo(coordinates.textContent);
+if (geo) {
+page.geo = geo;
+}
 }
 
 /**
diff --git a/test/features/mobile-sections-lead/pagecontent.js 
b/test/features/mobile-sections-lead/pagecontent.js
index 93c3d0f..9d933da 100644
--- a/test/features/mobile-sections-lead/pagecontent.js
+++ b/test/features/mobile-sections-lead/pagecontent.js
@@ -70,6 +70,21 @@
 assert.deepEqual(lead.geo.longitude, -122.417);
 });
 });
+it('es Savonlinna should have a lead object with a geo property', 
function() {
+return preq.get({ uri: server.config.uri + 
'es.wikipedia.org/v1/page/mobile-sections-lead/Savonlinna' })
+.then(function(res) {
+var lead = res.body;
+assert.deepEqual(lead.geo.latitude, 61.8667);
+assert.deepEqual(lead.geo.longitude, 28.88305556);
+});
+});
+it('es Gogland should not have a lead object with a geo property', 
function() {
+return preq.get({ uri: server.config.uri + 
'es.wikipedia.org/v1/page/mobile-sections-lead/Savonlinna' })
+.then(function(res) {
+var lead = res.body;
+assert.ok(!lead.hasOwnProperty(lead.geo));
+});
+});
 it('Barack Obama should have a pronunciation', function() {
 return preq.get({ uri: server.config.uri + 
'en.wikipedia.org/v1/page/mobile-sections-lead/Barack_Obama' })
 .then(function(res) {

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

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

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


[MediaWiki-commits] [Gerrit] Fix isEmpty util - change (mediawiki...mobileapps)

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

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

Change subject: Fix isEmpty util
..

Fix isEmpty util

isEmpty always returns false for booleans (even true) and numbers (even
nonzero) which may be unexpected. Return false for these types instead.

Change-Id: I13bc669471106548ae401c885766fb92fc0cb3f4
---
M lib/mobile-util.js
1 file changed, 10 insertions(+), 1 deletion(-)


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

diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 6c0db3d..7a438cc 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -3,7 +3,16 @@
 var underscore = require('underscore');
 var uuid = require('cassandra-uuid').TimeUuid;
 
-var isNonempty = underscore.negate(underscore.isEmpty);
+/**
+ *@returns true if val is null, undefined, an empty object, or an empty array.
+ */
+function isEmpty(val) {
+  return typeof val !== 'number'
+  && typeof val !== 'boolean'
+  && underscore.isEmpty(val);
+}
+
+var isNonempty = underscore.negate(isEmpty);
 
 /**
  * @param [fallback]

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

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

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


[MediaWiki-commits] [Gerrit] Replace passCaptcha with passCaptchaFromRequest - change (mediawiki...ContactPage)

2016-05-17 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Replace passCaptcha with passCaptchaFromRequest
..

Replace passCaptcha with passCaptchaFromRequest

See I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1.

Also replace wfSetupSession while we are at it.

Bug: Bug: T135477
Change-Id: I51915c7a65be61348bb62653292430782500bb42
(cherry picked from commit f39659bad40a1492224265687468acbddcb1c854)
---
M ContactPage_body.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/ContactPage_body.php b/ContactPage_body.php
index bd96968..f853716 100644
--- a/ContactPage_body.php
+++ b/ContactPage_body.php
@@ -401,7 +401,7 @@
}
 
/* @var SimpleCaptcha $wgCaptcha */
-   if ( $this->useCaptcha() && !$wgCaptcha->passCaptcha() ) {
+   if ( $this->useCaptcha() && 
!$wgCaptcha->passCaptchaFromRequest( $request, $user ) ) {
return wfMessage( 'contactpage-captcha-error' 
)->plain();
}
 
@@ -484,11 +484,11 @@
 */
private function getCaptcha() {
// NOTE: make sure we have a session. May be required for 
CAPTCHAs to work.
-   wfSetupSession();
+   
\MediaWiki\Session\SessionManager::getGlobalSession()->persist();
 
$captcha = ConfirmEditHooks::getInstance();
-   $captcha->trigger = 'contactpage';
-   $captcha->action = 'contact';
+   $captcha->setTrigger( 'contactpage' );
+   $captcha->setAction( 'contact' );
 
return '' .
$captcha->getForm( $this->getOutput() ) .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51915c7a65be61348bb62653292430782500bb42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContactPage
Gerrit-Branch: REL1_27
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] Expose equivalent functionality for passCaptcha - change (mediawiki...ConfirmEdit)

2016-05-17 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Expose equivalent functionality for passCaptcha
..

Expose equivalent functionality for passCaptcha

passCaptcha was made protected in I0da671a546700110d789b79a3089460abd9cce3b,
but some other extensions used it, provide passCaptchaFromRequest as a
replacement.

Bug: T135477
Change-Id: I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1
(cherry picked from commit f97212acbfcbc43c4c13cff0c22598e3b7dc7871)
---
M ReCaptcha/ReCaptcha.class.php
M ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php
M SimpleCaptcha/Captcha.php
3 files changed, 26 insertions(+), 7 deletions(-)


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

diff --git a/ReCaptcha/ReCaptcha.class.php b/ReCaptcha/ReCaptcha.class.php
index 9e6cffb..e92791a 100644
--- a/ReCaptcha/ReCaptcha.class.php
+++ b/ReCaptcha/ReCaptcha.class.php
@@ -27,13 +27,12 @@
   recaptcha_get_html( $wgReCaptchaPublicKey, 
$this->recaptcha_error, $useHttps );
}
 
-   function passCaptchaLimitedFromRequest( WebRequest $request, User $user 
) {
+   protected function getCaptchaParamsFromRequest( WebRequest $request ) {
// API is hardwired to return captchaId and captchaWord,
// so use that if the standard two are empty
$challenge = $request->getVal( 'recaptcha_challenge_field', 
$request->getVal( 'captchaId' ) );
$response = $request->getVal( 'recaptcha_response_field', 
$request->getVal( 'captchaWord' ) );
-
-   return $this->passCaptchaLimited( $challenge, $response, $user 
);
+   return [ $challenge, $response ];
}
 
/**
diff --git a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php 
b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php
index 759c5da..1d9130b 100644
--- a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php
+++ b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php
@@ -70,11 +70,11 @@
wfDebugLog( 'captcha', 'Unable to validate response: ' . $error 
);
}
 
-   public function passCaptchaLimitedFromRequest( WebRequest $request, 
User $user ) {
+   protected function getCaptchaParamsFromRequest( WebRequest $request ) {
$index = 'not used'; // ReCaptchaNoCaptcha combines captcha ID 
+ solution into a single value
// API is hardwired to return captchaWord, so use that if the 
standard isempty
$response = $request->getVal( 'g-recaptcha-response', 
$request->getVal( 'captchaWord' ) );
-   return $this->passCaptchaLimited( $index, $response, $user );
+   return [ $index, $response ];
}
 
/**
diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php
index 9b58259..63ed6d6 100755
--- a/SimpleCaptcha/Captcha.php
+++ b/SimpleCaptcha/Captcha.php
@@ -1059,10 +1059,18 @@
 * @return bool
 */
public function passCaptchaLimitedFromRequest( WebRequest $request, 
User $user ) {
+   list( $index, $word ) = $this->getCaptchaParamsFromRequest( 
$request );
+   return $this->passCaptchaLimited( $index, $word, $user );
+   }
+
+   /**
+* @param WebRequest $request
+* @return array [ captcha ID, captcha solution ]
+*/
+   protected function getCaptchaParamsFromRequest( WebRequest $request ) {
$index = $request->getVal( 'wpCaptchaId' );
$word = $request->getVal( 'wpCaptchaWord' );
-
-   return $this->passCaptchaLimited( $index, $word, $user );
+   return [ $index, $word ];
}
 
/**
@@ -1095,6 +1103,18 @@
/**
 * Given a required captcha run, test form input for correct
 * input on the open session.
+* @param WebRequest $request
+* @param User $user
+* @return bool if passed, false if failed or new session
+*/
+   public function passCaptchaFromRequest( WebRequest $request, User $user 
) {
+   list( $index, $word ) = $this->getCaptchaParamsFromRequest( 
$request );
+   return $this->passCaptcha( $index, $word, $user );
+   }
+
+   /**
+* Given a required captcha run, test form input for correct
+* input on the open session.
 * @param string $index Captcha idenitifier
 * @param string $word Captcha solution
 * @return bool if passed, false if failed or new session

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: REL1_27
Gerrit-Owner: Gergő Tisza 

___
M

[MediaWiki-commits] [Gerrit] Improve edit stash hit rate for logged-out users - change (mediawiki/core)

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

Change subject: Improve edit stash hit rate for logged-out users
..


Improve edit stash hit rate for logged-out users

Check whether they made intervening edits just like logged-in users.

Bug: T134620
Change-Id: Id1e0808caee0e474570c4f2e4b1cf845572e17e0
(cherry picked from commit ba6844e21c67158c268926c3ffe6ef6214eb3668)
---
M includes/api/ApiStashEdit.php
1 file changed, 26 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 3539eed..93003cc 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -294,9 +294,17 @@
$logger->debug( "Timestamp-based cache hit for key 
'$key' (age: $age sec)." );
return $editInfo; // assume nothing changed
} elseif ( isset( $editInfo->edits ) && $editInfo->edits === 
$user->getEditCount() ) {
+   // Logged-in user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit count based cache hit for key 
'$key' (age: $age sec)." );
-   return $editInfo; // use made no local upload/template 
edits in the meantime
+   return $editInfo;
+   } elseif ( $user->isAnon()
+   && self::lastEditTime( $user ) < 
$editInfo->output->getCacheTime()
+   ) {
+   // Logged-out user made no local upload/template edits 
in the meantime
+   $stats->increment( 
'editstash.cache_hits.presumed_fresh' );
+   $logger->debug( "Edit check based cache hit for key 
'$key' (age: $age sec)." );
+   return $editInfo;
}
 
$dbr = wfGetDB( DB_SLAVE );
@@ -360,6 +368,21 @@
}
 
/**
+* @param User $user
+* @return string|null TS_MW timestamp or null
+*/
+   private static function lastEditTime( User $user ) {
+   $time = wfGetDB( DB_SLAVE )->selectField(
+   'recentchanges',
+   'MAX(rc_timestamp)',
+   [ 'rc_user_text' => $user->getName() ],
+   __METHOD__
+   );
+
+   return wfTimestampOrNull( TS_MW, $time );
+   }
+
+   /**
 * Get the temporary prepared edit stash key for a user
 *
 * This key can be used for caching prepared edits provided:
@@ -371,7 +394,7 @@
 * @param User $user User to get parser options from
 * @return string
 */
-   protected static function getStashKey( Title $title, Content $content, 
User $user ) {
+   private static function getStashKey( Title $title, Content $content, 
User $user ) {
$hash = sha1( implode( ':', [
$content->getModel(),
$content->getDefaultFormat(),
@@ -394,7 +417,7 @@
 * @param User $user
 * @return array (stash info array, TTL in seconds) or (null, 0)
 */
-   protected static function buildStashValue(
+   private static function buildStashValue(
Content $pstContent, ParserOutput $parserOutput, $timestamp, 
User $user
) {
// If an item is renewed, mind the cache TTL determined by 
config and parser functions.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1e0808caee0e474570c4f2e4b1cf845572e17e0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.1
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use caching in TitleBlacklist::matches() for existing pages - change (mediawiki...TitleBlacklist)

2016-05-17 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Use caching in TitleBlacklist::matches() for existing pages
..

Use caching in TitleBlacklist::matches() for existing pages

The unicode normalization always shows up as a sizable chunk of call
stack time in flame graphs.

Change-Id: Iebbe6a90020d756e800ebf7b9b12d39b86190a48
---
M TitleBlacklist.list.php
1 file changed, 28 insertions(+), 10 deletions(-)


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

diff --git a/TitleBlacklist.list.php b/TitleBlacklist.list.php
index 9772679..9f99366 100755
--- a/TitleBlacklist.list.php
+++ b/TitleBlacklist.list.php
@@ -357,26 +357,40 @@
}
 
/**
-* Check whether a user can perform the specified action
-* on the specified Title
+* Check whether a user can perform the specified action on the 
specified Title
 *
-* @param $title string to check
-* @param $action %Action to check
+* @param string $title Title to check
+* @param string $action Action to check
 * @return bool TRUE if the the regex matches the title, and is not 
overridden
 * else false if it doesn't match (or was overridden)
 */
public function matches( $title, $action ) {
-   if ( !$title ) {
+   if ( $title == '' ) {
return false;
}
 
-   if( $action == 'new-account' && !$this->filtersNewAccounts() ) {
+   if ( $action === 'new-account' && !$this->filtersNewAccounts() 
) {
return false;
}
 
-   if ( isset( $this->mParams['antispoof'] ) && is_callable( 
'AntiSpoof::checkUnicodeString' ) ) {
-   list( $ok, $norm ) = AntiSpoof::checkUnicodeString( 
$title );
-   if ( $ok == "OK" ) {
+   if ( isset( $this->mParams['antispoof'] )
+   && is_callable( 'AntiSpoof::checkUnicodeString' )
+   ) {
+   if ( $action === 'edit' ) {
+   // Use process cache for frequently edited pages
+   $cache = ObjectCache::getMainWANInstance();
+   list( $ok, $norm ) = $cache->getWithSetCallback(
+   $cache->makeKey( 'titleblacklist', 
'normalized-unicode', md5( $title ) ),
+   $cache::TTL_MONTH,
+   function () use ( $title ) {
+   return 
AntiSpoof::checkUnicodeString( $title );
+   }
+   );
+   } else {
+   list( $ok, $norm ) = 
AntiSpoof::checkUnicodeString( $title );
+   }
+
+   if ( $ok === "OK" ) {
list( $ver, $title ) = explode( ':', $norm, 2 );
} else {
wfDebugLog( 'TitleBlacklist', 'AntiSpoof could 
not normalize "' . $title . '".' );
@@ -384,7 +398,10 @@
}
 
wfSuppressWarnings();
-   $match = preg_match( "/^(?:{$this->mRegex})$/us" . ( isset( 
$this->mParams['casesensitive'] ) ? '' : 'i' ), $title );
+   $match = preg_match(
+   "/^(?:{$this->mRegex})$/us" . ( isset( 
$this->mParams['casesensitive'] ) ? '' : 'i' ),
+   $title
+   );
wfRestoreWarnings();
 
if ( $match ) {
@@ -403,6 +420,7 @@
}
return true;
}
+
return false;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebbe6a90020d756e800ebf7b9b12d39b86190a48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TitleBlacklist
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Update BasePageLeadTest to reflect new page protection respo... - change (apps...wikipedia)

2016-05-17 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Update BasePageLeadTest to reflect new page protection response 
format
..

Update BasePageLeadTest to reflect new page protection response format

As a result of T69054, the value of a lead response's "protection" field
for an unprotected page is now an empty object rather than an empty array.
This updates BasePageLeadTest to reflect the same.

Change-Id: I2672066fd5dc8a279a5d877e2188943bbef7fec6
---
M app/src/test/java/org/wikipedia/server/BasePageLeadTest.java
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/src/test/java/org/wikipedia/server/BasePageLeadTest.java 
b/app/src/test/java/org/wikipedia/server/BasePageLeadTest.java
index d374cc6..30930a1 100644
--- a/app/src/test/java/org/wikipedia/server/BasePageLeadTest.java
+++ b/app/src/test/java/org/wikipedia/server/BasePageLeadTest.java
@@ -63,7 +63,7 @@
 protected String getUnprotectedDisambiguationPageJson() {
 return "{"
 + "\"disambiguation\":true,"
-+ "\"protection\":[]," // oh MediaWiki API
++ "\"protection\":{},"
 + "\"editable\":true"
 + "}";
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2672066fd5dc8a279a5d877e2188943bbef7fec6
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] [WIP] Use styles to hide player controls - change (mediawiki...Score)

2016-05-17 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: [WIP] Use styles to hide player controls
..

[WIP] Use styles to hide player controls

Remove usage of disablecontrols, since it makes much more sense to do
that with styling.

Still working on getting mwembed to pass along a class.

Change-Id: Ifb98b8cc7eb1f0cce41b55684043069a4f1d6df6
Depends-On: I4d14b6e7111db3c412b24e7e1faeb0b031fdc14f
Bug: T135537
---
M Score.body.php
M extension.json
A modules/ext.score.styles.less
3 files changed, 31 insertions(+), 1 deletion(-)


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

diff --git a/Score.body.php b/Score.body.php
index 8b70c7d..5972795 100644
--- a/Score.body.php
+++ b/Score.body.php
@@ -321,6 +321,8 @@
// to track all those pages.
$parser->getOutput()->setProperty( 'score' , true );
 
+   $parser->getOutput()->addModuleStyles( 'ext.score.styles' );
+
return $html;
}
 
@@ -440,6 +442,7 @@
if ( isset( $existingFiles[$imageFileName] ) ) {
list( $width, $height ) = 
$metaData[$imageFileName]['size'];
$link = Html::rawElement( 'img', array(
+   'class' => 'mw-score',
'src' => 
"{$options['dest_url']}/$imageFileName",
'width' => $width,
'height' => $height,
@@ -459,6 +462,7 @@
list( $width, $height ) = 
$metaData[$fileName]['size'];
$link .= Html::rawElement( 'img', array(
'src' => 
"{$options['dest_url']}/$fileName",
+   'class' => 'mw-score',
'width' => $width,
'height' => $height,
'alt' => $pageNumb,
@@ -481,6 +485,7 @@
$length = 
$metaData[basename($oggPath)]['length'];
if ( class_exists( 'TimedMediaTransformOutput' 
) ){
$player = new 
TimedMediaTransformOutput( array(
+   'playerClass' => 
'mw-score-player',
'length' => $length,
'sources' => array(
array(
@@ -488,7 +493,6 @@
'type' => 
'audio/ogg; codecs="vorbis"'
)
),
-   'disablecontrols' => 
'options,timedText',
'width' => 
self::DEFAULT_PLAYER_WIDTH
) );
} else /* class_exists( 'OggAudioDisplay' ) */ {
diff --git a/extension.json b/extension.json
index 9cb53b4..c83880f 100644
--- a/extension.json
+++ b/extension.json
@@ -17,6 +17,15 @@
"ScoreHooks": "Score.hooks.php"
},
"ResourceModules": {
+   "ext.score.styles": {
+   "styles": [
+   "ext.score.styles.less"
+   ],
+   "targets" : [
+   "desktop",
+   "mobile"
+   ]
+   },
"ext.score.visualEditor": {
"scripts": [
"ve-score/ve.dm.MWScoreNode.js",
diff --git a/modules/ext.score.styles.less b/modules/ext.score.styles.less
new file mode 100644
index 000..b4b04c2
--- /dev/null
+++ b/modules/ext.score.styles.less
@@ -0,0 +1,17 @@
+.video-js.mw-score-player {
+   display: block !important;
+
+   .mw-info-button {
+   display: none;
+   }
+}
+
+.k-player.mw-score-player {
+   .k-options,
+   .timed-text {
+   display: none;
+   }
+   .play_head {
+   right: 85px !important;
+   }
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb98b8cc7eb1f0cce41b55684043069a4f1d6df6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Score
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wi

[MediaWiki-commits] [Gerrit] Add no duplicate property rule to stylelint - change (oojs/ui)

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

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

Change subject: Add no duplicate property rule to stylelint
..

Add no duplicate property rule to stylelint

Adding rule to prevent duplication of CSS properties within the same
rule. Also adding exception for consecutive overrides for addressing
browser disparities.

Change-Id: I3f3379ccce03f1bf92152cc3fc4de4c242662cd2
---
M .stylelintrc
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/22/289322/1

diff --git a/.stylelintrc b/.stylelintrc
index 3d03de2..df29c24 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -28,6 +28,9 @@
"declaration-colon-space-after": [ "always" ],
"declaration-colon-space-before": [ "never" ],
 
-   "string-no-newline": true
+   "string-no-newline": true,
+
+   "declaration-block-no-duplicate-properties": [ true, { ignore: 
[ "consecutive-duplicates" ] } ],
+   "declaration-block-no-shorthand-property-overrides": true
}
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f3379ccce03f1bf92152cc3fc4de4c242662cd2
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] Rev 0.6 common part for ns_doc Ok - change (labs...fr-wikiversity-ns)

2016-05-17 Thread Youni Verciti (Code Review)
Youni Verciti has uploaded a new change for review.

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

Change subject: Rev 0.6 common part for ns_doc Ok
..

Rev 0.6 common part for ns_doc Ok

Change-Id: I8ef92039c14e379113abcf265d897bf51399777f
---
M hlp.py
M namespaceLib.py
D ns4.py
R pjt.py
A wkt.py
5 files changed, 114 insertions(+), 133 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/fr-wikiversity-ns 
refs/changes/21/289321/1

diff --git a/hlp.py b/hlp.py
index 7eeb21e..4cc86b8 100755
--- a/hlp.py
+++ b/hlp.py
@@ -1,61 +1,20 @@
 #!/usr/bin/env python
 # -*- coding: utf-8  -*-
 
-import pywikibot, re, sys
+import pywikibot, re #, sys
+from namespaceLib import *
 ### Outil d'analyse et report de données sur l'espace de noms Aide de la 
Wikiversité francophone
 lang = 'fr'   
 family = 'wikiversity'
 site = pywikibot.Site(lang, family)  
 
-# scan namespace return total, racines, sous-pages niveau 1 et 2,  
-# scan pages prop redir, cible, 
-def ns_prop(ns_id):
-  gen_hlp = site.allpages(namespace=ns_id)
-  c, c_redir, c_racine, c1, c2, c3= 0, 0, 0, 0, 0, 0
-  resep = re.compile('/')
-  dict_page = {}
-  cible = ''
-  for page in gen_hlp:
-cible = ''
-nb_sep = 0
-page_prop = []
-c=c+1
-redir = page.isRedirectPage()
-if redir == True:
- cible= page.getRedirectTarget()
- c_redir = c_redir +1
- #print '###' + str(cible)
-regen = re.findall(resep, str(page))
-nb_sep = len(regen)
-if nb_sep<1 :
-  c_racine = c_racine + 1  
-elif nb_sep==1:
-  c1 = c1+1
-elif nb_sep>1:
-  c2 = c2+1
-else:  
-  c3 = c3 +1
-page_prop = [nb_sep, cible]
-dict_page[page] = page_prop
-  verif = (c-c_racine-c1-c2-c3)
-  prop=[c, c_redir, c_racine, c1,c2, c3, verif, dict_page]
-  return prop
-### ns_list_page() ettend un titre et un commentaire
-#   retourne la page de titre indiqué contenant
-#   un tableau triable des pages et leurs propriétés
-### index, nom, nombre de separateur, cible si redirection SANS CATÉGORIE
-def ns_list_page(title, comment):
-  index = 0
-  witxt = u'{{Titre| {{SUBPAGENAME}} }}\n'
-  witxt = witxt + '{|class="wikitable sortable"\n!Index\n!Nom\n!Nombre de 
separateurs\n!Cible'
-  for page in sorted(dict_page):
-index = index + 1
-[nb_sep, cible] = dict_page[page]
-#witxt = witxt + ''
-witxt = witxt +  u'\n|-\n|' + str(index) + '\n|' + unicode(page) + '\n|' + 
str(nb_sep) + '\n|' + unicode(cible)
-  witxt = witxt + '\n|}'
-  return witxt
-prop = ns_prop(sys.argv[1])
+ns_id = 12   #Rev.5
+ns_label = site.namespace(ns_id) # Label local du namespace
+title = u' Projet:Laboratoire/Espaces de noms/' # Chemin de base pour les 
listes Python
+
+prop = ns_prop(ns_id)
+[c, c_redir, c_racine, c1,c2, c3, verif, dict_page, ns_id] = prop
+
 print prop[0]
 print prop[1]
 print prop[2]
@@ -64,16 +23,24 @@
 print prop[5]
 print '-'
 print prop[6] 
-dict_page = prop[7] #TUPLE
-### LA fonction liste_page()
-#   index, nom, cible, sp, (niv) niveau de profondeur de la sous-page
-comment = u'Ecrit la liste des pages de l\'espace de noms Aide via hlp.py'
-title = u' Projet:Laboratoire/Espaces de noms/Aide/Liste des pages ns'
-title = title + sys.argv[1]
 
-witxt = ns_list_page(title, comment)
-witxt = witxt + u'[[Catégorie:Laboratoire]]'
-#print witxt # TEST
-page = pywikibot.Page(site, title)
-page.text = witxt
-page.save(comment)  # ATTENTION
\ No newline at end of file
+page_prop = dict_page # Toute les pages et leur propriétés
+lua_code = write_t_prop(ns_id, prop)  
+table_code =  write_t_pages(page_prop)
+lua_code = lua_code + table_code
+# Concatener le code Lua ici
+
+lua_code = unicode(lua_code, 'utf-8')
+print lua_code ### TEST
+module_name = u'ns_' + ns_label
+write_module(module_name, lua_code) ### ATTENTION
+
+#dict_racine = get_root(dict_page)
+#witxt = write_list_root(dict_racine)
+#title = title + 'Liste des pages'
+#comment = u'Ecrit la liste des pages racines de l\'espace de noms avec le 
nombre sous-pages - https://tools.wmflabs.org/fr-wikiversity-ns'
+#witxt = witxt + u'[[Catégorie:Laboratoire]]'
+##print witxt # TEST
+#page = pywikibot.Page(site, title)
+#page.text = witxt
+#page.save(comment)  # ATTENTION
\ No newline at end of file
diff --git a/namespaceLib.py b/namespaceLib.py
index f9489f6..fa479b1 100644
--- a/namespaceLib.py
+++ b/namespaceLib.py
@@ -55,7 +55,7 @@
 witxt = witxt +  u'\n|-\n|' + str(index) + '\n|' + unicode(page) + '\n|' + 
str(nb_sep) + '\n|' + unicode(cible)
   witxt = witxt + '\n|}'
   return witxt
-### La fonction ghet_root() 
+### La fonction get_root() 
 #   Isole les pages racines dans dict_racine, les sous-pages dans dict_sub
 ### Retourne un dictionnaire des pages root aves la liste des sous-pages 
associée
 dict_racine = {}
@@ -95,4 +95,45 @@
 list_sub = dict_racine[racine]
 witxt = witxt +  u'\n|-\n|' + str(index) + '\n|' + unicode(racine) + '\n|' 

[MediaWiki-commits] [Gerrit] Fix tests to reflect updated page protection response format - change (mediawiki...mobileapps)

2016-05-17 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Fix tests to reflect updated page protection response format
..

Fix tests to reflect updated page protection response format

As a result of T69054, the value of a lead response's "protection" field
for an unprotected page is now an empty object rather than an empty array,
which confused a couple of our tests; this fixes them.

Change-Id: I09cea13e797c71345c408eb336ebd96286646366
---
M test/features/mobile-sections-lead/pagecontent.js
M test/features/mobile-sections/pagecontent.js
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/test/features/mobile-sections-lead/pagecontent.js 
b/test/features/mobile-sections-lead/pagecontent.js
index 93c3d0f..b2d0abf 100644
--- a/test/features/mobile-sections-lead/pagecontent.js
+++ b/test/features/mobile-sections-lead/pagecontent.js
@@ -21,7 +21,7 @@
 assert.deepEqual(res.status, 200);
 assert.ok(lead.lastmodified.startsWith('201'), 
lead.lastmodified + ' should start with 201'); // 2015-
 assert.deepEqual(lead.displaytitle, 'Sections/deep');
-assert.ok(!lead.protection, 'Page should not be protected');
+assert.ok(!lead.protection.length, 'Page should not be 
protected');
 assert.deepEqual(lead.editable, true);
 assert.ok(lead.sections.length >= 6, 'Expected at least six 
section elements');
 assert.deepEqual(lead.sections[0].id, 0);
diff --git a/test/features/mobile-sections/pagecontent.js 
b/test/features/mobile-sections/pagecontent.js
index b7c5a35..d24d797 100644
--- a/test/features/mobile-sections/pagecontent.js
+++ b/test/features/mobile-sections/pagecontent.js
@@ -29,10 +29,11 @@
 return preq.get({ uri: server.config.uri + 
'test.wikipedia.org/v1/page/mobile-sections/Sections%2Fdeep' })
 .then(function(res) {
 var lead = res.body.lead;
+console.log(lead.protection);
 assert.deepEqual(res.status, 200);
 assert.ok(lead.lastmodified.startsWith('201'), 
lead.lastmodified + ' should start with 201'); // 2015-
 assert.deepEqual(lead.displaytitle, 'Sections/deep');
-assert.ok(!lead.protection, 'Page should not be protected');
+assert.ok(!lead.protection.length, 'Page should not be 
protected');
 assert.deepEqual(lead.editable, true);
 assert.ok(lead.sections.length >= 6, 'Expected at least six 
section elements');
 assert.deepEqual(lead.sections[0].id, 0);

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

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

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


[MediaWiki-commits] [Gerrit] notebook: add base::firewall to stub role - change (operations/puppet)

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

Change subject: notebook: add base::firewall to stub role
..


notebook: add base::firewall to stub role

Adds standard firewall rules on experimental notebook servers.
Madhuvishy will be root on this and is aware, said we'll
just need to open a single proxy port later.

Bug:T134716
Change-Id: Ie51d50d42cc09dd248688848bfd5c0a8af13cfa7
---
M modules/role/manifests/notebook/server.pp
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/modules/role/manifests/notebook/server.pp 
b/modules/role/manifests/notebook/server.pp
index 74fb87c..dd27064 100644
--- a/modules/role/manifests/notebook/server.pp
+++ b/modules/role/manifests/notebook/server.pp
@@ -1,3 +1,5 @@
+# stub role for experimental notebook servers
 class role::notebook::server {
-# Hello I'm a stub, nice to meet you
+
+include base::firewall
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie51d50d42cc09dd248688848bfd5c0a8af13cfa7
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add whitespace rules to stylelint - change (oojs/ui)

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

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

Change subject: Add whitespace rules to stylelint
..

Add whitespace rules to stylelint

See https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS#Whitespace

Change-Id: Id7908c1ada0a3dd0de400e917ebb7cde7c761c25
---
M .stylelintrc
M src/styles/common.less
M src/themes/apex/common.less
M src/themes/apex/elements.less
M src/themes/apex/layouts.less
M src/themes/apex/tools.less
M src/themes/apex/widgets.less
M src/themes/apex/windows.less
8 files changed, 87 insertions(+), 67 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/19/289319/1

diff --git a/.stylelintrc b/.stylelintrc
index 7a2ce55..a711196 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -6,6 +6,26 @@
"color-no-invalid-hex": true,
 
"font-family-name-quotes": [ "double-where-recommended" ],
-   "font-weight-notation": [ "named-where-possible" ]
+   "font-weight-notation": [ "named-where-possible" ],
+
+   "function-calc-no-unspaced-operator": true,
+   "function-comma-newline-after": "never-multi-line",
+   "function-comma-newline-before": "never-multi-line",
+   "function-comma-space-after": [ "always" ],
+   "function-comma-space-before": [ "never" ],
+   "function-parentheses-newline-inside": [ "never-multi-line" ],
+   "function-parentheses-space-inside": [ "always" ],
+   "function-url-quotes": [ "none" ],
+   "function-whitespace-after": [ "always" ],
+
+   "value-list-comma-newline-after": [ "never-multi-line" ],
+   "value-list-comma-newline-before": [ "never-multi-line" ],
+   "value-list-comma-space-after": [ "always-single-line" ],
+   "value-list-comma-space-before": [ "never" ],
+
+   "declaration-bang-space-after": [ "never" ],
+   "declaration-bang-space-before": [ "always" ],
+   "declaration-colon-space-after": [ "always" ],
+   "declaration-colon-space-before": [ "never" ]
}
 }
\ No newline at end of file
diff --git a/src/styles/common.less b/src/styles/common.less
index 537fb7a..8d165e8 100644
--- a/src/styles/common.less
+++ b/src/styles/common.less
@@ -12,7 +12,7 @@
 // Mixins
 
 .oo-ui-background-image( @url ) {
-   background-image: e( '/* @embed */' ) url(~'@{url}');
+   background-image: e( '/* @embed */' ) url( ~@{url} );
 }
 
 .oo-ui-background-image-svg2( @svg, @fallback ) when ( @oo-ui-distribution = 
mixed ) {
@@ -39,14 +39,14 @@
 }
 
 .oo-ui-animation( @value1, @value2: X, ... ) {
-   @value: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;
+   @value: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`; // 
stylelint-disable-line
-webkit-animation: @value;
-moz-animation: @value;
animation: @value;
 }
 
 .oo-ui-transition( @value1, @value2: X, ... ) {
-   @value: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;
+   @value: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`; // 
stylelint-disable-line
-webkit-transition: @value;
-moz-transition: @value;
transition: @value;
@@ -70,6 +70,7 @@
 // Safari 3.1-5.0, iOS 3.2-4.3, Android 2.1-3.0
 // @see https://phabricator.wikimedia.org/T125925
 
+// stylelint-disable function-parentheses-space-inside, 
declaration-colon-space-after
 .oo-ui-vertical-gradient( @start: #eee, @stop: #fff ) {
background-color: average( @start, @stop );
background-image: -webkit-gradient( linear, right top, right bottom, 
color-stop( 0, @start ), color-stop( 100%, @stop ) );
@@ -83,6 +84,7 @@
@stop-ie: argb( rgba( red( @stop ), green( @stop ), blue( @stop ), 
alpha( @stop ) ) );
-ms-filter: "progid:DXImageTransform.Microsoft.gradient( 
startColorstr='@{start-ie}', endColorstr='@{stop-ie}' )";
 }
+// stylelint-enable function-parentheses-space-inside, 
declaration-colon-space-after
 
 .oo-ui-unselectable() {
-webkit-touch-callout: none;
diff --git a/src/themes/apex/common.less b/src/themes/apex/common.less
index 81237ca..e6a3b5e 100644
--- a/src/themes/apex/common.less
+++ b/src/themes/apex/common.less
@@ -22,8 +22,8 @@
 
 @size-icon-min: 24px;
 @size-indicator-min: 12px;
-@size-icon: unit(24 / 16 / 0.8, em);
-@size-indicator: unit(12 / 16 / 0.8, em);
+@size-icon: unit( 24 / 16 / 0.8, em );
+@size-indicator: unit( 12 / 16 / 0.8, em );
 
 // Theme animation variables
 @quick-ease: 100ms ease;
diff --git a/src/themes/apex/elements.less b/src/themes/apex/elements.less
index ba90281..1b6d8bf 100644
--- a/src/themes/apex/elements.less
+++ b/src/themes/apex/elements.less
@@ -90,7 +90,7 @@
> .oo-ui-buttonElement-button {
padding: 0.2em 0.8em;
border-radius: 0.3em;
-   te

[MediaWiki-commits] [Gerrit] Allow transform callers to add a classname - change (mediawiki...TimedMediaHandler)

2016-05-17 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: Allow transform callers to add a classname
..

Allow transform callers to add a classname

This can be used by callers of this transform, to provide a specific
class to be used by the player, to modify the styling.

Bug: T135501
Change-Id: I4d14b6e7111db3c412b24e7e1faeb0b031fdc14f
---
M TimedMediaTransformOutput.php
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php
index 31008e4..6451dc5 100644
--- a/TimedMediaTransformOutput.php
+++ b/TimedMediaTransformOutput.php
@@ -14,6 +14,7 @@
public $start;
public $end;
public $fillwindow;
+   protected $playerClass;
 
// The prefix for player ids
const PLAYER_ID_PREFIX = 'mwe_player_';
@@ -21,7 +22,7 @@
function __construct( $conf ) {
$options = [ 'file', 'dstPath', 'sources', 'thumbUrl', 'start', 
'end',
'width', 'height', 'length', 'offset', 'isVideo', 
'path', 'fillwindow',
-   'sources', 'disablecontrols' ];
+   'sources', 'disablecontrols', 'playerClass' ];
foreach ( $options as $key ) {
if ( isset( $conf[ $key ] ) ) {
$this->$key = $conf[$key];
@@ -462,6 +463,11 @@
}
}
 
+   // Additional class-name provided by Transform caller
+   if ( $this->playerClass ) {
+   $mediaAttr[ 'class' ] .= ' ' . $this->playerClass;
+   }
+
if ( $this->file ) {
// Custom data-attributes
$mediaAttr += [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d14b6e7111db3c412b24e7e1faeb0b031fdc14f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

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


[MediaWiki-commits] [Gerrit] Add properties that will be logged with each EL request - change (mediawiki...Popups)

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

Change subject: Add properties that will be logged with each EL request
..


Add properties that will be logged with each EL request

Bug: T131315
Change-Id: I16f5f8170174200bb20c6bcc2835efd136d752ff
---
M Popups.hooks.php
M resources/ext.popups.renderer.article.js
M resources/ext.popups.renderer/desktopRenderer.js
M resources/ext.popups.schemaPopups.js
4 files changed, 58 insertions(+), 5 deletions(-)

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



diff --git a/Popups.hooks.php b/Popups.hooks.php
index e868af7..7db5a8f 100644
--- a/Popups.hooks.php
+++ b/Popups.hooks.php
@@ -75,6 +75,7 @@
$schemaPopups += [
'dependencies' => [
'schema.Popups',
+   'mediawiki.user'
],
'scripts' => [
'resources/ext.popups.schemaPopups.js',
diff --git a/resources/ext.popups.renderer.article.js 
b/resources/ext.popups.renderer.article.js
index ff24b94..9aaef01 100644
--- a/resources/ext.popups.renderer.article.js
+++ b/resources/ext.popups.renderer.article.js
@@ -149,6 +149,7 @@
 
mw.popups.render.cache[ href ].settings = {
title: page.title,
+   namespace: page.ns,
tall: ( tall === undefined ) ? false : tall,
thumbnail: ( thumbnail === undefined ) ? false : 
thumbnail
};
diff --git a/resources/ext.popups.renderer/desktopRenderer.js 
b/resources/ext.popups.renderer/desktopRenderer.js
index 2d47012..a62c399 100644
--- a/resources/ext.popups.renderer/desktopRenderer.js
+++ b/resources/ext.popups.renderer/desktopRenderer.js
@@ -187,7 +187,7 @@
// Event logging
mw.popups.logData = {
pageTitleHover: cache.settings.title,
-   pageTitleSource: mw.config.get( 'wgTitle' ),
+   namespaceIdHover: cache.settings.namespace,
popupEnabled: mw.popups.enabled,
time: mw.now()
};
diff --git a/resources/ext.popups.schemaPopups.js 
b/resources/ext.popups.schemaPopups.js
index 9deb2fb..60b0cff 100644
--- a/resources/ext.popups.schemaPopups.js
+++ b/resources/ext.popups.schemaPopups.js
@@ -1,15 +1,66 @@
 ( function ( $, mw ) {
+   var schemaPopups,
+   defaults;
+
/**
-* Log the popup event as defined in the schema
+* Return the sampling rate for the Schema:Popups
 *
-* https://meta.wikimedia.org/wiki/Schema:Popups
+* The sampling rate is always 0 if the browser doesn't support
+* `navigator.sendBeacon`.
+*
+* @return {number}
 */
-   var schemaPopups = new mw.eventLog.Schema(
+   function getSamplingRate() {
+   return $.isFunction( navigator.sendBeacon ) ?
+   mw.config.get( 'wgPopupsSchemaPopupsSamplingRate', 0 ) 
: 0;
+   }
+
+   /**
+* Return edit count bucket based on the number of edits
+*
+* @return {string}
+*/
+   function getEditCountBucket( editCount ) {
+   var bucket;
+
+   if ( editCount === 0 ) {
+   bucket = '0';
+   } else if ( editCount >= 1 && editCount <= 4 ) {
+   bucket = '1-4';
+   } else if ( editCount >= 5 && editCount <= 99 ) {
+   bucket = '5-99';
+   } else if ( editCount >= 100 && editCount <= 999 ) {
+   bucket = '100-999';
+   } else if ( editCount >= 1000 ) {
+   bucket = '1000+';
+   }
+
+   return bucket + ' edits';
+   }
+
+   // Data that will be logged with each EL request
+   defaults = {
+   pageTitleSource: mw.config.get( 'wgPageName' ),
+   namespaceIdSource: mw.config.get( 'wgNamespaceNumber' ),
+   pageIdSource: mw.config.get( 'wgArticleId' ),
+   isAnon: mw.user.isAnon()
+   };
+
+   // Include edit count bucket if the user is logged in.
+   if ( !mw.user.isAnon() ) {
+   defaults.editCountBucket = getEditCountBucket( mw.config.get( 
'wgUserEditCount' ) );
+   }
+
+   // Log the popup event as defined in the schema
+   // https://meta.wikimedia.org/wiki/Schema:Popups
+   schemaPopups = new mw.eventLog.Schema(
'Popups',
-   mw.config.get( 'wgPopupsSchemaPopupsSamplingRate', 0 )
+   getSamplingRate(),
+   defaults
);
 
mw.trackSubscribe( 'ext.popups.schemaPopups', function ( topic, data ) {
sc

[MediaWiki-commits] [Gerrit] T135235 Turning off survey banner on wikipedia.org - change (operations/mediawiki-config)

2016-05-17 Thread Jdrewniak (Code Review)
Jdrewniak has uploaded a new change for review.

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

Change subject: T135235 Turning off survey banner on wikipedia.org
..

T135235 Turning off survey banner on wikipedia.org

Bug: T135235
Change-Id: I5919c4fdbe373308f6dd288433dca822d105c6fd
---
M portals
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/portals b/portals
index 5912029..5e3f584 16
--- a/portals
+++ b/portals
-Subproject commit 5912029740d90ce28cfbff615d4e3929d10ca061
+Subproject commit 5e3f584b9ae4e317e68eec4d234d126dcda2b2ee

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

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

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


[MediaWiki-commits] [Gerrit] exception: Create generic BadRequestError based on ErrorPage... - change (mediawiki/core)

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

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

Change subject: exception: Create generic BadRequestError based on 
ErrorPageError
..

exception: Create generic BadRequestError based on ErrorPageError

Ideally this would be an option in ErrorPageError (perhaps even the default),
but it's constructor isn't very suitable for that.

After this lands, uses of ErrorPageError should be audited to see if it makes
sense to emit a 400 status code.

Change-Id: I4beb6a4f256446b98b66d5e4bcdbab8f247441a8
---
M autoload.php
A includes/exception/BadRequestError.php
M includes/exception/BadTitleError.php
3 files changed, 39 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/16/289316/1

diff --git a/autoload.php b/autoload.php
index cf0e417..e16708f 100644
--- a/autoload.php
+++ b/autoload.php
@@ -164,6 +164,7 @@
'BacklinkJobUtils' => __DIR__ . 
'/includes/jobqueue/utils/BacklinkJobUtils.php',
'BackupDumper' => __DIR__ . '/maintenance/backup.inc',
'BackupReader' => __DIR__ . '/maintenance/importDump.php',
+   'BadRequestError' => __DIR__ . 
'/includes/exception/BadRequestError.php',
'BadTitleError' => __DIR__ . '/includes/exception/BadTitleError.php',
'BagOStuff' => __DIR__ . '/includes/libs/objectcache/BagOStuff.php',
'BaseDump' => __DIR__ . '/maintenance/backupPrefetch.inc',
diff --git a/includes/exception/BadRequestError.php 
b/includes/exception/BadRequestError.php
new file mode 100644
index 000..5fcf0e6
--- /dev/null
+++ b/includes/exception/BadRequestError.php
@@ -0,0 +1,34 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * An error page that emits an HTTP 400 Bad Request status code.
+ *
+ * @since 1.28
+ * @ingroup Exception
+ */
+class BadRequestError extends ErrorPageError {
+
+   public function report() {
+   global $wgOut;
+   $wgOut->setStatusCode( 400 );
+   parent::report();
+   }
+}
diff --git a/includes/exception/BadTitleError.php 
b/includes/exception/BadTitleError.php
index 3f4c213..f24045b 100644
--- a/includes/exception/BadTitleError.php
+++ b/includes/exception/BadTitleError.php
@@ -20,13 +20,14 @@
 
 /**
  * Show an error page on a badtitle.
- * Similar to ErrorPage, but emit a 400 HTTP error code to let mobile
- * browser it is not really a valid content.
+ *
+ * Uses BadRequestError to emit a 400 HTTP error code to let mobile
+ * browser it is not really a valid content. (T35646)
  *
  * @since 1.19
  * @ingroup Exception
  */
-class BadTitleError extends ErrorPageError {
+class BadTitleError extends BadRequestError {
/**
 * @param string|Message|MalformedTitleException $msg A message key 
(default: 'badtitletext'), or
 * a MalformedTitleException to figure out things from
@@ -44,18 +45,5 @@
} else {
parent::__construct( 'badtitle', $msg, $params );
}
-   }
-
-   /**
-* Just like ErrorPageError::report() but additionally set
-* a 400 HTTP status code (bug 33646).
-*/
-   public function report() {
-   global $wgOut;
-
-   // bug 33646: a badtitle error page need to return an error code
-   // to let mobile browser now that it is not a normal page.
-   $wgOut->setStatusCode( 400 );
-   parent::report();
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] T135235 Removing survey banner - change (wikimedia/portals)

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

Change subject: T135235 Removing survey banner
..


T135235 Removing survey banner

Bug: T135235
Change-Id: I168d664186f5939651182863593a4b48a26da680
---
M dev/wikipedia.org/assets/css/style.css
M dev/wikipedia.org/assets/js/wm-test.js
D dev/wikipedia.org/assets/postcss/_survey-banner.css
M dev/wikipedia.org/assets/postcss/style.css
M dev/wikipedia.org/assets/rev-manifest.json
M dev/wikipedia.org/index.handlebars
D dev/wikipedia.org/templates/survey-banner.handlebars
A prod/wikipedia.org/assets/js/index-1a803501de.js
D prod/wikipedia.org/assets/js/index-25047ca0f0.js
M prod/wikipedia.org/index.html
10 files changed, 7 insertions(+), 326 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I168d664186f5939651182863593a4b48a26da680
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/portals
Gerrit-Branch: master
Gerrit-Owner: Jdrewniak 
Gerrit-Reviewer: Jdrewniak 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Organize Ganglia cluster names for labs - change (operations/puppet)

2016-05-17 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Organize Ganglia cluster names for labs
..

Organize Ganglia cluster names for labs

Previously we had some, but not all, labs hosts grouped
into the 'Virtualization cluster.'  That was inconsistent
and also not very useful for auditing VM capacity.

Now we have two clusters:

'labvirt' aka 'Labs virt hosts' which contains only the
compute nodes

'labs' aka 'Labs services' which contains all other Labs-related
hosts, excluding the compute nodes.

Change-Id: I654eb47cad184bf972db5e237b620771e8aafec8
---
M hieradata/common.yaml
M hieradata/hosts/holmium.yaml
D hieradata/hosts/labcontrol1001.yaml
D hieradata/hosts/labcontrol1002.yaml
M hieradata/hosts/labmon1001.yaml
D hieradata/hosts/labnet1001.yaml
D hieradata/hosts/labnet1002.yaml
D hieradata/hosts/nembus.yaml
D hieradata/hosts/neptunium.yaml
M hieradata/hosts/silver.yaml
M hieradata/regex.yaml
M hieradata/role/common/nova/compute.yaml
12 files changed, 18 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/15/289315/1

diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 26f25ae..acc89d0 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -105,11 +105,16 @@
   eqiad: []
   codfw: []
   esams: []
-  virt:
-name: "Virtualization cluster"
+  labvirt:
+name: "Labs virt hosts"
 id: 29
 sites:
   eqiad: []
+  labs:
+name: "Labs services"
+id: 30
+sites:
+  eqiad: []
   jobrunner:
 name: "Jobrunners"
 id: 31
diff --git a/hieradata/hosts/holmium.yaml b/hieradata/hosts/holmium.yaml
index 781125d..d41687e 100644
--- a/hieradata/hosts/holmium.yaml
+++ b/hieradata/hosts/holmium.yaml
@@ -1,4 +1,4 @@
-cluster: virt
+cluster: labs
 
 labsdnsconfig:
   host: 'labs-ns1.wikimedia.org'
diff --git a/hieradata/hosts/labcontrol1001.yaml 
b/hieradata/hosts/labcontrol1001.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/labcontrol1001.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/labcontrol1002.yaml 
b/hieradata/hosts/labcontrol1002.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/labcontrol1002.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/labmon1001.yaml b/hieradata/hosts/labmon1001.yaml
index ae478d3..04132c7 100644
--- a/hieradata/hosts/labmon1001.yaml
+++ b/hieradata/hosts/labmon1001.yaml
@@ -1,3 +1,3 @@
 statsite::instance::graphite_host: 'localhost'
 statsite::instance::extended_counters: 1
-cluster: "virt"
+cluster: labs
diff --git a/hieradata/hosts/labnet1001.yaml b/hieradata/hosts/labnet1001.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/labnet1001.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/labnet1002.yaml b/hieradata/hosts/labnet1002.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/labnet1002.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/nembus.yaml b/hieradata/hosts/nembus.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/nembus.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/neptunium.yaml b/hieradata/hosts/neptunium.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/neptunium.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/silver.yaml b/hieradata/hosts/silver.yaml
index 7a9b1ad..ff76c55 100644
--- a/hieradata/hosts/silver.yaml
+++ b/hieradata/hosts/silver.yaml
@@ -1,4 +1,4 @@
-cluster: virt
+cluster: labs
 admin::groups:
   - deployment
 
diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 767375d..837750a 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -66,9 +66,13 @@
   __regex: !ruby/regexp 
/^(db20[0-9][0-9]|dbstore200[1-2]|es201[1-9])\.codfw\.wmnet$/
   cluster: mysql
 
-virtualization:
-  __regex: !ruby/regexp /^(labnet|labvirt|virt)100[1-9]\.eqiad\.wmnet$/
-  cluster: "virt"
+labvirt:
+  __regex: !ruby/regexp /^labvirt10[0-9][0-9]\.eqiad\.wmnet$/
+  cluster: labvirt
+
+labs:
+  __regex: !ruby/regexp 
/^(labnet|labservices|labnodepool|labsdb|labstore|labcontrol)100[1-9]\.eqiad\.wmnet$/
+  cluster: labs
 
 cassandra_test_eqiad:
   __regex: !ruby/regexp /^(cerium|praseodymium|xenon)\.eqiad\.wmnet$/
diff --git a/hieradata/role/common/nova/compute.yaml 
b/hieradata/role/common/nova/compute.yaml
index 981749b..cd73d8c 100644
--- a/hieradata/role/common/nova/compute.yaml
+++ b/hieradata/role/common/nova/compute.yaml
@@ -1,4 +1,4 @@
-cluster: virt
+cluster: labvirt
 debdeploy::grains:
   debdeploy-nova-compute:
 value: standard

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

Gerrit-MessageType: newchange
Gerrit-Change-I

[MediaWiki-commits] [Gerrit] Improve edit stash hit rate for logged-out users - change (mediawiki/core)

2016-05-17 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Improve edit stash hit rate for logged-out users
..

Improve edit stash hit rate for logged-out users

Check whether they made intervening edits just like logged-in users.

Bug: T134620
Change-Id: Id1e0808caee0e474570c4f2e4b1cf845572e17e0
(cherry picked from commit ba6844e21c67158c268926c3ffe6ef6214eb3668)
---
M includes/api/ApiStashEdit.php
1 file changed, 26 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/289313/1

diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 3539eed..93003cc 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -294,9 +294,17 @@
$logger->debug( "Timestamp-based cache hit for key 
'$key' (age: $age sec)." );
return $editInfo; // assume nothing changed
} elseif ( isset( $editInfo->edits ) && $editInfo->edits === 
$user->getEditCount() ) {
+   // Logged-in user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit count based cache hit for key 
'$key' (age: $age sec)." );
-   return $editInfo; // use made no local upload/template 
edits in the meantime
+   return $editInfo;
+   } elseif ( $user->isAnon()
+   && self::lastEditTime( $user ) < 
$editInfo->output->getCacheTime()
+   ) {
+   // Logged-out user made no local upload/template edits 
in the meantime
+   $stats->increment( 
'editstash.cache_hits.presumed_fresh' );
+   $logger->debug( "Edit check based cache hit for key 
'$key' (age: $age sec)." );
+   return $editInfo;
}
 
$dbr = wfGetDB( DB_SLAVE );
@@ -360,6 +368,21 @@
}
 
/**
+* @param User $user
+* @return string|null TS_MW timestamp or null
+*/
+   private static function lastEditTime( User $user ) {
+   $time = wfGetDB( DB_SLAVE )->selectField(
+   'recentchanges',
+   'MAX(rc_timestamp)',
+   [ 'rc_user_text' => $user->getName() ],
+   __METHOD__
+   );
+
+   return wfTimestampOrNull( TS_MW, $time );
+   }
+
+   /**
 * Get the temporary prepared edit stash key for a user
 *
 * This key can be used for caching prepared edits provided:
@@ -371,7 +394,7 @@
 * @param User $user User to get parser options from
 * @return string
 */
-   protected static function getStashKey( Title $title, Content $content, 
User $user ) {
+   private static function getStashKey( Title $title, Content $content, 
User $user ) {
$hash = sha1( implode( ':', [
$content->getModel(),
$content->getDefaultFormat(),
@@ -394,7 +417,7 @@
 * @param User $user
 * @return array (stash info array, TTL in seconds) or (null, 0)
 */
-   protected static function buildStashValue(
+   private static function buildStashValue(
Content $pstContent, ParserOutput $parserOutput, $timestamp, 
User $user
) {
// If an item is renewed, mind the cache TTL determined by 
config and parser functions.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1e0808caee0e474570c4f2e4b1cf845572e17e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.1
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Expand coverage of conformance test - change (mediawiki...NavigationTiming)

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

Change subject: Expand coverage of conformance test
..


Expand coverage of conformance test

Cover the full set of Navigation Timing markers in the attribute order
conformance test. Previously-omitted markers which are now included in
the test:

* domComplete
* domLoading
* domainLookupEnd
* domainLookupStart
* fetchStart
* navigationStart
* secureConnectionStart

Change-Id: I62e20087c1abddf8871d7b0235c32e81956723c5
(cherry picked from commit 708f512eddfb5c9880f8b12f28021ba5831bc0d3)
---
M modules/ext.navigationTiming.js
1 file changed, 53 insertions(+), 16 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ext.navigationTiming.js b/modules/ext.navigationTiming.js
index 4298bbf..5c45e64 100644
--- a/modules/ext.navigationTiming.js
+++ b/modules/ext.navigationTiming.js
@@ -36,26 +36,63 @@
}
 
/**
-* Assert that the attribute order complies with the W3C spec
+* Check if the order of Navigation Timing marker values conforms
+* to the specification.
+*
+* Markers may be undefined or zero if they are not implemented or not
+* applicable to the current page.  Markers which have a value must be
+* in ascending order.
 *
 * @return {boolean}
 */
function isCompliant() {
-   // Tests derived from
-   // 

-   return (
-   timing  
&&
-   timing.loadEventEnd   >= 
timing.loadEventStart  &&
-   timing.loadEventStart >= 
timing.domContentLoadedEventEnd&&
-   timing.domContentLoadedEventEnd   >= 
timing.domContentLoadedEventStart  &&
-   timing.domContentLoadedEventStart >= 
timing.domInteractive  &&
-   timing.domInteractive >= timing.responseEnd 
&&
-   timing.responseEnd>= 
timing.responseStart   &&
-   timing.responseStart  >= 
timing.requestStart&&
-   timing.requestStart   >= timing.connectEnd  
&&
-   timing.connectEnd >= 
timing.connectStart&&
-   timing.connectStart   >= 0
-   );
+   var sequences, markers, curr, prev;
+
+   if ( !timing ) {
+   return false;
+   }
+
+   sequences = [ [
+   'navigationStart',
+   'fetchStart',
+   'domainLookupStart',
+   'domainLookupEnd',
+   'connectStart',
+   'connectEnd',
+   'requestStart',
+   'responseStart',
+   'responseEnd',
+   'domInteractive',
+   'domContentLoadedEventStart',
+   'domContentLoadedEventEnd',
+   'loadEventStart',
+   'loadEventEnd'
+   ], [
+   'secureConnectionStart',
+   'requestStart'
+   ], [
+   'fetchStart',
+   'domLoading'
+   ], [
+   'domContentLoadedEventEnd',
+   'domComplete'
+   ] ];
+
+   while ( sequences.length ) {
+   markers = sequences.shift();
+   prev = null;
+   while ( markers.length ) {
+   curr = timing[ markers.shift() ];
+   if ( curr ) {
+   if ( curr < prev ) {
+   return false;
+   }
+   prev = curr;
+   }
+   }
+   }
+
+   return true;
}
 
function getNavTiming() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62e20087c1abddf8871d7b0235c32e81956723c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NavigationTiming
Gerrit-Branch: wmf/1.28.0-wmf.1
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@list

[MediaWiki-commits] [Gerrit] Add lang and project to statistic reports - change (labs...heritage)

2016-05-17 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review.

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

Change subject: Add lang and project to statistic reports
..

Add lang and project to statistic reports

Also drops the empty fixEncoding() method in favour of stripping
wikitext using CommonFunctions.processWikitext().

Bug: T135502
Bug: T55688
Change-Id: I454a5a4822c85b95e11aec5ec478055cfa886983
---
M api/includes/Statistics.php
M api/includes/StatsBuilder.php
2 files changed, 22 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/14/289314/1

diff --git a/api/includes/Statistics.php b/api/includes/Statistics.php
index 2de8b3a..298fe13 100644
--- a/api/includes/Statistics.php
+++ b/api/includes/Statistics.php
@@ -17,7 +17,9 @@
static $fieldPrefix = 'st_';
 
var $lastDay = '';
-   static $aItems = array('address', 'address_pct', 'coordinates', 
'coordinates_pct', 'image', 'image_pct', 'municipality', 'municipality_pct', 
'name', 'name_pct', 'total' );
+   static $aItems = array(
+   'address', 'address_pct', 'coordinates', 'coordinates_pct', 
'image',
+   'image_pct', 'municipality', 'municipality_pct', 'name', 
'name_pct', 'total' );
 
 
function getLatestDay() {
@@ -79,10 +81,11 @@
//var_dump($row);
$group[$row[$gc]] = 1;
$idxs[$row[$gi]] = 1;
-   list($country,$municipality) = explode(':', $row[$gi], 
2);
+   list($country,$municipality,$lang,$project) = 
explode(':', $row[$gi], 4);
$this->report[$row[$gi]]['country'] = $country;
-   $this->report[$row[$gi]]['lang'] = $country == 'us' ? 
'en' : $country;
$this->report[$row[$gi]]['municipality'] = 
$municipality;
+   $this->report[$row[$gi]]['lang'] = $lang;
+   $this->report[$row[$gi]]['project'] = $project;
$this->report[$row[$gi]][$row[$gc]] = $row['value'];
}
//var_dump($this->report);
diff --git a/api/includes/StatsBuilder.php b/api/includes/StatsBuilder.php
index d90b653..bbb2b2c 100644
--- a/api/includes/StatsBuilder.php
+++ b/api/includes/StatsBuilder.php
@@ -7,7 +7,8 @@
  *
  * NOTE May be optimized by INSERTing in batches
  */
-
+//functions: processWikitext
+require_once('CommonFunctions.php');
 
 /*
 *
@@ -71,24 +72,19 @@
}
 
 
-   /** Helper to fix encoding
-   */
-   static function fixEncoding($sString, $bToUTF8=true) {
-   /*
-   if ( $bToUTF8 ) {
-   return utf8_encode($sString);
-   }
-   */
-   return $sString;
+   /** Helper to make idx identifier
+*/
+   static function makeIdx($row) {
+   return $row[0] . ':' . processWikitext($row[2], $row[1], False) 
. ':' .
+   $row[2] . ':' . $row[3];
}
-
 
/** Calculate totals
 * @return false on error, true otherwise
 */
private function getTotals() {
$this->debug('Determining Totals');
-   $sql = 'SELECT country, municipality, COUNT(1) AS total
+   $sql = 'SELECT country, municipality, lang, project, COUNT(1) 
AS total
FROM '.Monuments::$dbTable.'
GROUP BY country, municipality';
$wres = new ResultWrapper( $this->db, $this->db->query( $sql ) 
);
@@ -97,8 +93,9 @@
}
 
while ($row = $wres->fetchRow()) {
-   $idx = 
$this->db->sanitize($row[0].':'.StatsBuilder::fixEncoding($row[1], true));
-   $this->setReportItem(Statistics::$fieldPrefix.'total', 
$idx, $row[2]);
+   $idx = $this->db->sanitize(StatsBuilder::makeIdx($row));
+   $count = $row[4];  // update if makeIdx changes
+   $this->setReportItem(Statistics::$fieldPrefix.'total', 
$idx, $count);
}
return true;
}
@@ -133,7 +130,7 @@
$sql = 'ALTER TABLE '.$tmp_table.' ADD UNIQUE INDEX 
idx1(country,municipality)';
$this->db->query($sql);
 
-   $sql = 'SELECT m1.country, m1.municipality, IF(m2.non_blank IS 
NULL,0,m2.non_blank) AS non_blank
+   $sql = 'SELECT m1.country, m1.municipality, m1.lang, 
m1.project, IF(m2.non_blank IS NULL,0,m2.non_blank) AS non_blank
  FROM '.Monuments::$dbTable.' m1
  LEFT JOIN '.$tmp_table.' m2 ON m2.country = m1.country AND 
m2.municipality = m1.municipality
  GROUP BY m1.country, m1.municipality';
@@ -144,9 +141,10 @@
}
 
while ( $row = $oRes->fetchRow() ) {
-   $

[MediaWiki-commits] [Gerrit] Improve edit stash hit rate for logged-out users - change (mediawiki/core)

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

Change subject: Improve edit stash hit rate for logged-out users
..


Improve edit stash hit rate for logged-out users

Check whether they made intervening edits just like logged-in users.

Bug: T134620
Change-Id: Id1e0808caee0e474570c4f2e4b1cf845572e17e0
(cherry picked from commit ba6844e21c67158c268926c3ffe6ef6214eb3668)
---
M includes/api/ApiStashEdit.php
1 file changed, 26 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 3539eed..93003cc 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -294,9 +294,17 @@
$logger->debug( "Timestamp-based cache hit for key 
'$key' (age: $age sec)." );
return $editInfo; // assume nothing changed
} elseif ( isset( $editInfo->edits ) && $editInfo->edits === 
$user->getEditCount() ) {
+   // Logged-in user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit count based cache hit for key 
'$key' (age: $age sec)." );
-   return $editInfo; // use made no local upload/template 
edits in the meantime
+   return $editInfo;
+   } elseif ( $user->isAnon()
+   && self::lastEditTime( $user ) < 
$editInfo->output->getCacheTime()
+   ) {
+   // Logged-out user made no local upload/template edits 
in the meantime
+   $stats->increment( 
'editstash.cache_hits.presumed_fresh' );
+   $logger->debug( "Edit check based cache hit for key 
'$key' (age: $age sec)." );
+   return $editInfo;
}
 
$dbr = wfGetDB( DB_SLAVE );
@@ -360,6 +368,21 @@
}
 
/**
+* @param User $user
+* @return string|null TS_MW timestamp or null
+*/
+   private static function lastEditTime( User $user ) {
+   $time = wfGetDB( DB_SLAVE )->selectField(
+   'recentchanges',
+   'MAX(rc_timestamp)',
+   [ 'rc_user_text' => $user->getName() ],
+   __METHOD__
+   );
+
+   return wfTimestampOrNull( TS_MW, $time );
+   }
+
+   /**
 * Get the temporary prepared edit stash key for a user
 *
 * This key can be used for caching prepared edits provided:
@@ -371,7 +394,7 @@
 * @param User $user User to get parser options from
 * @return string
 */
-   protected static function getStashKey( Title $title, Content $content, 
User $user ) {
+   private static function getStashKey( Title $title, Content $content, 
User $user ) {
$hash = sha1( implode( ':', [
$content->getModel(),
$content->getDefaultFormat(),
@@ -394,7 +417,7 @@
 * @param User $user
 * @return array (stash info array, TTL in seconds) or (null, 0)
 */
-   protected static function buildStashValue(
+   private static function buildStashValue(
Content $pstContent, ParserOutput $parserOutput, $timestamp, 
User $user
) {
// If an item is renewed, mind the cache TTL determined by 
config and parser functions.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1e0808caee0e474570c4f2e4b1cf845572e17e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] WIP: Test new MathJax-node version - change (mediawiki...mathoid)

2016-05-17 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: WIP: Test new MathJax-node version
..

WIP: Test new MathJax-node version

Change-Id: Iea7c82d693dae8289e00fbdc00a7855edc3c92c3
---
M package.json
M test/files/mathjax-texvc/svg/36.svg
M test/files/mathjax-texvc/svg/38.svg
M test/files/mathjax-texvc/svg/91.svg
4 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid 
refs/changes/12/289312/1

diff --git a/package.json b/package.json
index e179578..1a0c8e0 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
 "js-yaml": "^3.6.0",
 "preq": "^0.4.9",
 "service-runner": "^1.2.2",
-"mathoid-mathjax-node": "^0.6.4",
+"mathoid-mathjax-node": 
"git+ssh://g...@github.com/physikerwelt/MathJax-Node#jsdom-fixes",
 "texvcinfo": "^0.4.2",
 "svgo": "^0.6.0"
   },
diff --git a/test/files/mathjax-texvc/svg/36.svg 
b/test/files/mathjax-texvc/svg/36.svg
index 60daab3..717842b 100644
--- a/test/files/mathjax-texvc/svg/36.svg
+++ b/test/files/mathjax-texvc/svg/36.svg
@@ -1 +1 @@
-http://www.w3.org/1999/xlink"; width="1.173ex" 
height="1.509ex" style="vertical-align:.105ex" viewBox="0 -576.1 505 649.8" 
xmlns="http://www.w3.org/2000/svg";>
\ No newline at end of file
+http://www.w3.org/1999/xlink"; width="1.173ex" 
height="1.509ex" style="vertical-align:.105ex;margin-bottom:-.276ex" viewBox="0 
-576.1 505 649.8" xmlns="http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/test/files/mathjax-texvc/svg/38.svg 
b/test/files/mathjax-texvc/svg/38.svg
index 2b79735..3d27197 100644
--- a/test/files/mathjax-texvc/svg/38.svg
+++ b/test/files/mathjax-texvc/svg/38.svg
@@ -1 +1 @@
-http://www.w3.org/1999/xlink"; width=".657ex" 
height="1.176ex" style="vertical-align:.418ex" viewBox="0 -432.6 283 506.3" 
xmlns="http://www.w3.org/2000/svg";>
\ No newline at end of file
+http://www.w3.org/1999/xlink"; width=".657ex" 
height="1.176ex" style="vertical-align:.418ex;margin-bottom:-.589ex" viewBox="0 
-432.6 283 506.3" xmlns="http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/test/files/mathjax-texvc/svg/91.svg 
b/test/files/mathjax-texvc/svg/91.svg
index 220b897..cf2d11d 100644
--- a/test/files/mathjax-texvc/svg/91.svg
+++ b/test/files/mathjax-texvc/svg/91.svg
@@ -1 +1 @@
-http://www.w3.org/1999/xlink"; width=".789ex" 
height="3.343ex" style="vertical-align:0" viewBox="0 -1006.6 339.6 1439.2" 
xmlns="http://www.w3.org/2000/svg";>
\ No newline at end of file
+http://www.w3.org/1999/xlink"; width=".789ex" 
height="3.343ex" 
style="vertical-align:0;margin-top:-2.338ex;margin-bottom:-1.005ex" viewBox="0 
-1006.6 339.6 1439.2" xmlns="http://www.w3.org/2000/svg";>
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea7c82d693dae8289e00fbdc00a7855edc3c92c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mathoid
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 

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


[MediaWiki-commits] [Gerrit] Improve edit stash hit rate for logged-out users - change (mediawiki/core)

2016-05-17 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Improve edit stash hit rate for logged-out users
..

Improve edit stash hit rate for logged-out users

Check whether they made intervening edits just like logged-in users.

Bug: T134620
Change-Id: Id1e0808caee0e474570c4f2e4b1cf845572e17e0
(cherry picked from commit ba6844e21c67158c268926c3ffe6ef6214eb3668)
---
M includes/api/ApiStashEdit.php
1 file changed, 26 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/289310/1

diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 3539eed..93003cc 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -294,9 +294,17 @@
$logger->debug( "Timestamp-based cache hit for key 
'$key' (age: $age sec)." );
return $editInfo; // assume nothing changed
} elseif ( isset( $editInfo->edits ) && $editInfo->edits === 
$user->getEditCount() ) {
+   // Logged-in user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit count based cache hit for key 
'$key' (age: $age sec)." );
-   return $editInfo; // use made no local upload/template 
edits in the meantime
+   return $editInfo;
+   } elseif ( $user->isAnon()
+   && self::lastEditTime( $user ) < 
$editInfo->output->getCacheTime()
+   ) {
+   // Logged-out user made no local upload/template edits 
in the meantime
+   $stats->increment( 
'editstash.cache_hits.presumed_fresh' );
+   $logger->debug( "Edit check based cache hit for key 
'$key' (age: $age sec)." );
+   return $editInfo;
}
 
$dbr = wfGetDB( DB_SLAVE );
@@ -360,6 +368,21 @@
}
 
/**
+* @param User $user
+* @return string|null TS_MW timestamp or null
+*/
+   private static function lastEditTime( User $user ) {
+   $time = wfGetDB( DB_SLAVE )->selectField(
+   'recentchanges',
+   'MAX(rc_timestamp)',
+   [ 'rc_user_text' => $user->getName() ],
+   __METHOD__
+   );
+
+   return wfTimestampOrNull( TS_MW, $time );
+   }
+
+   /**
 * Get the temporary prepared edit stash key for a user
 *
 * This key can be used for caching prepared edits provided:
@@ -371,7 +394,7 @@
 * @param User $user User to get parser options from
 * @return string
 */
-   protected static function getStashKey( Title $title, Content $content, 
User $user ) {
+   private static function getStashKey( Title $title, Content $content, 
User $user ) {
$hash = sha1( implode( ':', [
$content->getModel(),
$content->getDefaultFormat(),
@@ -394,7 +417,7 @@
 * @param User $user
 * @return array (stash info array, TTL in seconds) or (null, 0)
 */
-   protected static function buildStashValue(
+   private static function buildStashValue(
Content $pstContent, ParserOutput $parserOutput, $timestamp, 
User $user
) {
// If an item is renewed, mind the cache TTL determined by 
config and parser functions.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1e0808caee0e474570c4f2e4b1cf845572e17e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Expand coverage of conformance test - change (mediawiki...NavigationTiming)

2016-05-17 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Expand coverage of conformance test
..

Expand coverage of conformance test

Cover the full set of Navigation Timing markers in the attribute order
conformance test. Previously-omitted markers which are now included in
the test:

* domComplete
* domLoading
* domainLookupEnd
* domainLookupStart
* fetchStart
* navigationStart
* secureConnectionStart

Change-Id: I62e20087c1abddf8871d7b0235c32e81956723c5
(cherry picked from commit 708f512eddfb5c9880f8b12f28021ba5831bc0d3)
---
M modules/ext.navigationTiming.js
1 file changed, 53 insertions(+), 16 deletions(-)


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

diff --git a/modules/ext.navigationTiming.js b/modules/ext.navigationTiming.js
index 4298bbf..5c45e64 100644
--- a/modules/ext.navigationTiming.js
+++ b/modules/ext.navigationTiming.js
@@ -36,26 +36,63 @@
}
 
/**
-* Assert that the attribute order complies with the W3C spec
+* Check if the order of Navigation Timing marker values conforms
+* to the specification.
+*
+* Markers may be undefined or zero if they are not implemented or not
+* applicable to the current page.  Markers which have a value must be
+* in ascending order.
 *
 * @return {boolean}
 */
function isCompliant() {
-   // Tests derived from
-   // 

-   return (
-   timing  
&&
-   timing.loadEventEnd   >= 
timing.loadEventStart  &&
-   timing.loadEventStart >= 
timing.domContentLoadedEventEnd&&
-   timing.domContentLoadedEventEnd   >= 
timing.domContentLoadedEventStart  &&
-   timing.domContentLoadedEventStart >= 
timing.domInteractive  &&
-   timing.domInteractive >= timing.responseEnd 
&&
-   timing.responseEnd>= 
timing.responseStart   &&
-   timing.responseStart  >= 
timing.requestStart&&
-   timing.requestStart   >= timing.connectEnd  
&&
-   timing.connectEnd >= 
timing.connectStart&&
-   timing.connectStart   >= 0
-   );
+   var sequences, markers, curr, prev;
+
+   if ( !timing ) {
+   return false;
+   }
+
+   sequences = [ [
+   'navigationStart',
+   'fetchStart',
+   'domainLookupStart',
+   'domainLookupEnd',
+   'connectStart',
+   'connectEnd',
+   'requestStart',
+   'responseStart',
+   'responseEnd',
+   'domInteractive',
+   'domContentLoadedEventStart',
+   'domContentLoadedEventEnd',
+   'loadEventStart',
+   'loadEventEnd'
+   ], [
+   'secureConnectionStart',
+   'requestStart'
+   ], [
+   'fetchStart',
+   'domLoading'
+   ], [
+   'domContentLoadedEventEnd',
+   'domComplete'
+   ] ];
+
+   while ( sequences.length ) {
+   markers = sequences.shift();
+   prev = null;
+   while ( markers.length ) {
+   curr = timing[ markers.shift() ];
+   if ( curr ) {
+   if ( curr < prev ) {
+   return false;
+   }
+   prev = curr;
+   }
+   }
+   }
+
+   return true;
}
 
function getNavTiming() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62e20087c1abddf8871d7b0235c32e81956723c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NavigationTiming
Gerrit-Branch: wmf/1.28.0-wmf.1
Gerrit-Owner: Ori.livneh 

___
MediaWiki-commits mailing list
MediaWiki-commit

[MediaWiki-commits] [Gerrit] Adding mgmt dns entries for mw1305-6 - change (operations/dns)

2016-05-17 Thread Cmjohnson (Code Review)
Cmjohnson has submitted this change and it was merged.

Change subject: Adding mgmt dns entries for mw1305-6
..


Adding mgmt dns entries for mw1305-6

Change-Id: Ifd3f64d095ded288adaf27b4e7a4ee14ca0a08b6
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index f313516..d9b17d2 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -1314,7 +1314,10 @@
 68  1H  IN PTR  wmf6942.mgmt.eqiad.wmnet.
 69  1H  IN PTR  mw1304.mgmt.eqiad.wmnet.
 69  1H  IN PTR  wmf6943.mgmt.eqiad.wmnet.
-
+70  1H  IN PTR  mw1305.mgmt.eqiad.wmnet.
+70  1H  IN PTR  wmf6944.mgmt.eqiad.wmnet.
+71  1H  IN PTR  mw1306.mgmt.eqiad.wmnet.
+71  1H  IN PTR  wmf6945.mgmt.eqiad.wmnet.
 90  1H  IN PTR  mw1090.mgmt.eqiad.wmnet.
 90  1H  IN PTR  wmf3310.mgmt.eqiad.wmnet.
 91  1H  IN PTR  mw1091.mgmt.eqiad.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 4e5564c..b9da044 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -1574,6 +1574,10 @@
 WMF6942 1H  IN A10.65.1.68
 mw1304  1H  IN A10.65.1.69
 WMF6943 1H  IN A10.65.1.69
+mw1305  1H  IN A10.65.1.70
+WMF6944 1H  IN A10.65.1.70
+mw1306  1H  IN A10.65.1.71
+WMF6945 1H  IN A10.65.1.71
 mw1090  1H  IN A10.65.1.90
 WMF3310 1H  IN A10.65.1.90
 mw1091  1H  IN A10.65.1.91

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

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

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


[MediaWiki-commits] [Gerrit] Adding mgmt dns entries for mw1305-6 - change (operations/dns)

2016-05-17 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review.

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

Change subject: Adding mgmt dns entries for mw1305-6
..

Adding mgmt dns entries for mw1305-6

Change-Id: Ifd3f64d095ded288adaf27b4e7a4ee14ca0a08b6
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/09/289309/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index f313516..d9b17d2 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -1314,7 +1314,10 @@
 68  1H  IN PTR  wmf6942.mgmt.eqiad.wmnet.
 69  1H  IN PTR  mw1304.mgmt.eqiad.wmnet.
 69  1H  IN PTR  wmf6943.mgmt.eqiad.wmnet.
-
+70  1H  IN PTR  mw1305.mgmt.eqiad.wmnet.
+70  1H  IN PTR  wmf6944.mgmt.eqiad.wmnet.
+71  1H  IN PTR  mw1306.mgmt.eqiad.wmnet.
+71  1H  IN PTR  wmf6945.mgmt.eqiad.wmnet.
 90  1H  IN PTR  mw1090.mgmt.eqiad.wmnet.
 90  1H  IN PTR  wmf3310.mgmt.eqiad.wmnet.
 91  1H  IN PTR  mw1091.mgmt.eqiad.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 4e5564c..b9da044 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -1574,6 +1574,10 @@
 WMF6942 1H  IN A10.65.1.68
 mw1304  1H  IN A10.65.1.69
 WMF6943 1H  IN A10.65.1.69
+mw1305  1H  IN A10.65.1.70
+WMF6944 1H  IN A10.65.1.70
+mw1306  1H  IN A10.65.1.71
+WMF6945 1H  IN A10.65.1.71
 mw1090  1H  IN A10.65.1.90
 WMF3310 1H  IN A10.65.1.90
 mw1091  1H  IN A10.65.1.91

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

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

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


[MediaWiki-commits] [Gerrit] group0 to 1.28.0-wmf.2 - change (operations/mediawiki-config)

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

Change subject: group0 to 1.28.0-wmf.2
..


group0 to 1.28.0-wmf.2

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

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



diff --git a/wikiversions.json b/wikiversions.json
index f4256d7..a20aae1 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -478,7 +478,7 @@
 "maiwiki": "php-1.28.0-wmf.1",
 "map_bmswiki": "php-1.28.0-wmf.1",
 "mdfwiki": "php-1.28.0-wmf.1",
-"mediawikiwiki": "php-1.28.0-wmf.1",
+"mediawikiwiki": "php-1.28.0-wmf.2",
 "metawiki": "php-1.28.0-wmf.1",
 "mgwiki": "php-1.28.0-wmf.1",
 "mgwikibooks": "php-1.28.0-wmf.1",
@@ -745,9 +745,9 @@
 "tawikisource": "php-1.28.0-wmf.1",
 "tawiktionary": "php-1.28.0-wmf.1",
 "tenwiki": "php-1.28.0-wmf.1",
-"test2wiki": "php-1.28.0-wmf.1",
-"testwiki": "php-1.28.0-wmf.1",
-"testwikidatawiki": "php-1.28.0-wmf.1",
+"test2wiki": "php-1.28.0-wmf.2",
+"testwiki": "php-1.28.0-wmf.2",
+"testwikidatawiki": "php-1.28.0-wmf.2",
 "tetwiki": "php-1.28.0-wmf.1",
 "tewiki": "php-1.28.0-wmf.1",
 "tewikibooks": "php-1.28.0-wmf.1",
@@ -877,7 +877,7 @@
 "zawikiquote": "php-1.28.0-wmf.1",
 "zawiktionary": "php-1.28.0-wmf.1",
 "zeawiki": "php-1.28.0-wmf.1",
-"zerowiki": "php-1.28.0-wmf.1",
+"zerowiki": "php-1.28.0-wmf.2",
 "zh_classicalwiki": "php-1.28.0-wmf.1",
 "zh_min_nanwiki": "php-1.28.0-wmf.1",
 "zh_min_nanwikibooks": "php-1.28.0-wmf.1",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e05679581f08962d0391c044c15d2a6abc67472
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: 20after4 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] V4 XFF Fixup 3/3 - change (operations/puppet)

2016-05-17 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: V4 XFF Fixup 3/3
..


V4 XFF Fixup 3/3

This moves varnish3 set_xff above fe_ip_processing, so that v3 and
v4 cases are identical on entry (XFF has already been created or
appended-to), and then re-factors the logic within to handle the
fact that XFF has already been locally appended-to.

Change-Id: I1572c9d30b54ba7315b90a794f1a825c07078b77
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 54 insertions(+), 58 deletions(-)

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



diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 33562eb..b147e53 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -109,71 +109,68 @@
unset req.http.X-Connection-Properties;
}
 
-   if (req.http.X-Forwarded-For) {
-   // To make further parsing/sanitizing simpler, convert all 
whitespace
-   // in XFF to single spaces, and make sure all commas have a 
space
-   // suffix but no space prefix.
-   set req.http.X-Forwarded-For = 
regsuball(req.http.X-Forwarded-For, "[ \t]+", " ");
-   set req.http.X-Forwarded-For = 
regsuball(req.http.X-Forwarded-For, " ?, ?", ", ");
+   // To make further parsing/sanitizing simpler, convert all whitespace
+   // in XFF to single spaces, and make sure all commas have a space
+   // suffix but no space prefix.
+   set req.http.X-Forwarded-For = regsuball(req.http.X-Forwarded-For, "[ 
\t]+", " ");
+   set req.http.X-Forwarded-For = regsuball(req.http.X-Forwarded-For, " ?, 
?", ", ");
 
-   // Now fully-sanitize it to only the strict form "X(, X)*", 
where X is
-   // a string of legal characters in IPv[46] addresses.  Note
-   // that injections can still leave well-formed junk on the
-   // left, but it's up to the trusted proxy code to ignore that,
-   // e.g.:
-   // "junk2, 123.123.123.123" -> "2, 123.123.123.123"
-   set req.http.X-Forwarded-For = regsub(req.http.X-Forwarded-For,
-   "^.*?([0-9A-Fa-f:.]+(, [0-9A-Fa-f:.]+)*)? ?$", "\1");
-
-   // Clear header if empty after all the above, to avoid messing
-   // up our normal XFF-append code later
-   if (req.http.X-Forwarded-For == "") {
-   unset req.http.X-Forwarded-For;
-   }
-   }
+   // Now fully-sanitize it to only the strict form "X(, X)*", where X is
+   // a string of legal characters in IPv[46] addresses.  Note
+   // that injections can still leave well-formed junk on the
+   // left, but it's up to the trusted proxy code to ignore that,
+   // e.g.:
+   // "junk2, 123.123.123.123" -> "2, 123.123.123.123"
+   set req.http.X-Forwarded-For = regsub(req.http.X-Forwarded-For,
+   "^.*?([0-9A-Fa-f:.]+(, [0-9A-Fa-f:.]+)*)? ?$", "\1");
 
// There are two possible cases here: either nginx acted as our TLS
// proxy and already set X-Client-IP (as well as appended the same value
-   // to XFF), or the traffic was direct to varnish-fe, in which case
-   // XCIP is not yet set and XFF is directly from external.
+   // to XFF, and we appended nginx's IP to XFF already as well...), or the
+   // traffic was direct to varnish-fe, in which case XCIP is not yet set
+   // and XFF is external + our addition of client.ip.
+
if (!req.http.X-Client-IP) {
-   // direct-to-port-80 case, set XCIP ourselves
set req.http.X-Client-IP = client.ip;
-   set req.http.X-Trusted-Proxy = netmapper.map("proxies", 
req.http.X-Client-IP);
-   // normalize to boolean post-netmapper (varnish-3.0.4...)
-   if (req.http.X-Trusted-Proxy == "") {
-   unset req.http.X-Trusted-Proxy;
-   }
-   if (req.http.X-Trusted-Proxy && req.http.X-Forwarded-For) {
-   // get last from trusted-proxy-supplied XFF
-   set req.http.maybe-xcip = 
regsub(req.http.X-Forwarded-For, "^([^,]+, )+", "");
-   if(<%= @std_ipcast %>.ip(req.http.maybe-xcip, 
"127.0.0.1") !~ wikimedia_nets) {
-   set req.http.X-Client-IP = req.http.maybe-xcip;
-   }
-   unset req.http.maybe-xcip;
-   }
+   unset req.http.via-nginx;
} else {
-   // XCIP from nginx, XFF set/appended by nginx and contains at
-   // least XCIP at the end, possibly prepended by other addrs
-   // set externally by some proxy.
-   set req.

[MediaWiki-commits] [Gerrit] Fix the disablecontrols option for videojs - change (mediawiki...TimedMediaHandler)

2016-05-17 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: Fix the disablecontrols option for videojs
..

Fix the disablecontrols option for videojs

This should disable specific controls, not all of the controls.
Hope to deprecate this in the future (T135537).

Bug: T135516
Change-Id: I013f68df6a696d6f3f6d8a2d9fbc29703b6275a9
---
M TimedMediaTransformOutput.php
1 file changed, 4 insertions(+), 7 deletions(-)


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

diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php
index 31008e4..c32af54 100644
--- a/TimedMediaTransformOutput.php
+++ b/TimedMediaTransformOutput.php
@@ -443,10 +443,6 @@
unset( $mediaAttr['height'] );
unset( $mediaAttr['poster'] );
}
-
-   if ( $this->disablecontrols ) {
-   $mediaAttr[ 'controls' ] = false;
-   }
} else {
$mediaAttr['style'] = "width:{$width}";
 
@@ -456,10 +452,11 @@
 
// MediaWiki uses the kSkin class
$mediaAttr['class'] = 'kskin';
+   }
 
-   if ( $this->disablecontrols ) {
-   $mediaAttr[ 'data-disablecontrols' ] = 
$this->disablecontrols;
-   }
+   // Used by Score extension and to disable specific controls 
from wikicode
+   if ( $this->disablecontrols ) {
+   $mediaAttr[ 'data-disablecontrols' ] = 
$this->disablecontrols;
}
 
if ( $this->file ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I013f68df6a696d6f3f6d8a2d9fbc29703b6275a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

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


[MediaWiki-commits] [Gerrit] LinkerTest: Fix passing test description to $this->assertEqu... - change (mediawiki/core)

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

Change subject: LinkerTest: Fix passing test description to 
$this->assertEquals()
..


LinkerTest: Fix passing test description to $this->assertEquals()

It was being passed to Linker::userLink() by accident.

Change-Id: I13ba5014193e91a467511259a0c7c1659d8bc0e6
---
M tests/phpunit/includes/LinkerTest.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/tests/phpunit/includes/LinkerTest.php 
b/tests/phpunit/includes/LinkerTest.php
index 6edf034..1bf8729 100644
--- a/tests/phpunit/includes/LinkerTest.php
+++ b/tests/phpunit/includes/LinkerTest.php
@@ -15,8 +15,10 @@
'wgArticlePath' => '/wiki/$1',
] );
 
-   $this->assertEquals( $expected,
-   Linker::userLink( $userId, $userName, $altUserName, 
$msg )
+   $this->assertEquals(
+   $expected,
+   Linker::userLink( $userId, $userName, $altUserName ),
+   $msg
);
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13ba5014193e91a467511259a0c7c1659d8bc0e6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] add CQL interface and port to descriptors - change (operations/puppet)

2016-05-17 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: add CQL interface and port to descriptors
..


add CQL interface and port to descriptors

Bug: T132958
Change-Id: Iaf845ad9923c52193a499e0017868a2ab663c940
---
M modules/cassandra/manifests/instance.pp
M modules/cassandra/templates/instance.yaml.erb
2 files changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/cassandra/manifests/instance.pp 
b/modules/cassandra/manifests/instance.pp
index 064cb93..ed18514 100644
--- a/modules/cassandra/manifests/instance.pp
+++ b/modules/cassandra/manifests/instance.pp
@@ -81,6 +81,7 @@
 
 $tls_cluster_name   = $::cassandra::tls_cluster_name
 $application_username   = $::cassandra::application_username
+$native_transport_port  = $::cassandra::native_transport_port
 
 file { $config_directory:
 ensure  => directory,
diff --git a/modules/cassandra/templates/instance.yaml.erb 
b/modules/cassandra/templates/instance.yaml.erb
index 979f43d..055dfee 100644
--- a/modules/cassandra/templates/instance.yaml.erb
+++ b/modules/cassandra/templates/instance.yaml.erb
@@ -4,3 +4,5 @@
 service_name: <%= @service_name %>
 config_directory: <%= @config_directory %>
 data_file_directories: [<%= Array(@data_file_directories).join(',') %>]
+rpc_address: <%= @rpc_address %>
+native_transport_port: <%= @native_transport_port %>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf845ad9923c52193a499e0017868a2ab663c940
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Eevans 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make SVG thumbnails show for Internet Explorer - change (mediawiki...Popups)

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

Change subject: Make SVG thumbnails show for Internet Explorer
..


Make SVG thumbnails show for Internet Explorer

IE9 does support SVG if you use  setAttributeNS.
Thus stop whitelisting SVG support there.

Don't worry about fallback rendering of SVG for IE < 9
- those that do not support SVG also do not
enjoy ResourceLoader JavaScript support.

Bug: T134979
Change-Id: I1d3d9c4c622e98df19a5e9dc4101b44242e07178
---
M resources/ext.popups.renderer.article.js
M resources/ext.popups.targets/desktopTarget.js
2 files changed, 8 insertions(+), 10 deletions(-)

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



diff --git a/resources/ext.popups.renderer.article.js 
b/resources/ext.popups.renderer.article.js
index ff24b94..508df9c 100644
--- a/resources/ext.popups.renderer.article.js
+++ b/resources/ext.popups.renderer.article.js
@@ -378,13 +378,16 @@
article.createSvgImageThumbnail = function (
className, url, x, y, thumbnailWidth, thumbnailHeight, width, 
height, clipPath
) {
-   var $thumbnailSVGImage, $thumbnail;
+   var $thumbnailSVGImage, $thumbnail,
+   ns = 'http://www.w3.org/2000/svg',
+   svgElement = article.createSVGTag( 'image' );
 
-   $thumbnailSVGImage = $( article.createSVGTag( 'image' ) );
+   // certain browsers e.g. ie9 will not correctly set attributes 
from foreign namespaces (T134979)
+   svgElement.setAttributeNS( ns, 'xlink:href', url );
+   $thumbnailSVGImage = $( svgElement );
$thumbnailSVGImage
.addClass( className )
.attr( {
-   'xlink:href': url,
x: x,
y: y,
width: thumbnailWidth,
@@ -394,7 +397,7 @@
 
$thumbnail = $( '' )
.attr( {
-   xmlns: 'http://www.w3.org/2000/svg',
+   xmlns: ns,
width: width,
height: height
} )
diff --git a/resources/ext.popups.targets/desktopTarget.js 
b/resources/ext.popups.targets/desktopTarget.js
index 2df503e..bc56207 100644
--- a/resources/ext.popups.targets/desktopTarget.js
+++ b/resources/ext.popups.targets/desktopTarget.js
@@ -12,14 +12,9 @@
/**
 * Checks SVG support on the browser
 *
-* Set to false on Internet Explorer because adding SVGs
-* through JavaScript in IE is failing. Thus, falling back to PNGs
-*
 * @property {boolean} supportsSVG
 */
-   mw.popups.supportsSVG = ( $.client.profile().name === 'msie' ) ?
-   false :
-   !!(
+   mw.popups.supportsSVG = !!(
// Check if we can create an  element.
// If yes, check if drawing a rectangle inside the 
element is supported.
// We could have also checked for the existence of any 
similar method,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d3d9c4c622e98df19a5e9dc4101b44242e07178
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 1dc780b..29148d0 - change (mediawiki/extensions)

2016-05-17 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 1dc780b..29148d0
..

Syncronize VisualEditor: 1dc780b..29148d0

Change-Id: Ib26f0660e665dc1fd62f78640453d5fd0c8f62de
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/07/289307/1

diff --git a/VisualEditor b/VisualEditor
index 1dc780b..29148d0 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 1dc780bcbdfa3fb1834504fd08d8c62936bde6e6
+Subproject commit 29148d0e49ae865d06afe5bcd5cce1fffc89f79b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib26f0660e665dc1fd62f78640453d5fd0c8f62de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 1dc780b..29148d0 - change (mediawiki/extensions)

2016-05-17 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 1dc780b..29148d0
..


Syncronize VisualEditor: 1dc780b..29148d0

Change-Id: Ib26f0660e665dc1fd62f78640453d5fd0c8f62de
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 1dc780b..29148d0 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 1dc780bcbdfa3fb1834504fd08d8c62936bde6e6
+Subproject commit 29148d0e49ae865d06afe5bcd5cce1fffc89f79b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib26f0660e665dc1fd62f78640453d5fd0c8f62de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Echo: Use cross-wiki notifications by default, disable BetaF... - change (mediawiki/vagrant)

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

Change subject: Echo: Use cross-wiki notifications by default, disable 
BetaFeature
..


Echo: Use cross-wiki notifications by default, disable BetaFeature

Matches current production config

Change-Id: I7dfdcde45c1652876358c3a61f4e0e9eac5b162f
---
M puppet/modules/role/manifests/echo.pp
1 file changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/puppet/modules/role/manifests/echo.pp 
b/puppet/modules/role/manifests/echo.pp
index bdf89ca..d32bc9f 100644
--- a/puppet/modules/role/manifests/echo.pp
+++ b/puppet/modules/role/manifests/echo.pp
@@ -39,14 +39,16 @@
 mediawiki::extension { 'Echo':
 needs_update => true,
 settings => {
-wgEchoSharedTrackingCluster   => $shared_tracking_cluster,
-wgEchoSharedTrackingDB=> $shared_tracking_db,
+wgEchoCrossWikiNotifications  => true,
+wgEchoSharedTrackingCluster   => 
$shared_tracking_cluster,
+wgEchoSharedTrackingDB=> 
$shared_tracking_db,
 # For now, we don't use the extension cluster for
 # wgEchoCluster, until we solve update.php.
 
-wgEchoEnableEmailBatch=> false,
-wgAllowHTMLEmail  => true,
-wgEchoUseCrossWikiBetaFeature => true,
+wgEchoEnableEmailBatch=> false,
+wgAllowHTMLEmail  => true,
+wgEchoUseCrossWikiBetaFeature => false,
+'wgDefaultUserOptions[\'echo-cross-wiki-notifications\']' => true,
 },
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7dfdcde45c1652876358c3a61f4e0e9eac5b162f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] LinkerTest: Fix passing test description to $this->assertEqu... - change (mediawiki/core)

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

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

Change subject: LinkerTest: Fix passing test description to 
$this->assertEquals()
..

LinkerTest: Fix passing test description to $this->assertEquals()

It was being passed to Linker::userLink() by accident.

Change-Id: I13ba5014193e91a467511259a0c7c1659d8bc0e6
---
M tests/phpunit/includes/LinkerTest.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/289278/1

diff --git a/tests/phpunit/includes/LinkerTest.php 
b/tests/phpunit/includes/LinkerTest.php
index d701a81..860f29e 100644
--- a/tests/phpunit/includes/LinkerTest.php
+++ b/tests/phpunit/includes/LinkerTest.php
@@ -16,8 +16,10 @@
'wgWellFormedXml' => true,
] );
 
-   $this->assertEquals( $expected,
-   Linker::userLink( $userId, $userName, $altUserName, 
$msg )
+   $this->assertEquals(
+   $expected,
+   Linker::userLink( $userId, $userName, $altUserName ),
+   $msg
);
}
 

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

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

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


[MediaWiki-commits] [Gerrit] Show "Not logged in" message - change (mediawiki...MonoBook)

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

Change subject: Show "Not logged in" message
..


Show "Not logged in" message

Show "Not logged in" message left (or right depending on language) of an anon
user's personal tools in case general edit permission is given.

The display of the message was previously done in MW core
(SkinTemplate::buildPersonalUrls, introduced by I6f44e3e5d), which needs to be
reverted first (done in I5cfa9b4e).

Bug: T127758
Depends-on: I5cfa9b4e
Change-Id: I7001e311a8d5ed70129500ab1a3e99369d4a1d9d
---
M MonoBookTemplate.php
1 file changed, 11 insertions(+), 1 deletion(-)

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



diff --git a/MonoBookTemplate.php b/MonoBookTemplate.php
index adffa58..c4ff806 100644
--- a/MonoBookTemplate.php
+++ b/MonoBookTemplate.php
@@ -119,7 +119,17 @@
 

html( 
'userlangattributes' ) ?>>
-   getPersonalTools() as $key => $item ) { ?>
+   getSkin()->getUser()->isLoggedIn() &&
+   
User::groupHasPermission( '*', 'edit' ) ) {
+
+   echo Html::rawElement( 
'li', array(
+   'id' => 
'pt-anonuserpage'
+   ), $this->getMsg( 
'notloggedin' )->escaped() );
+
+   }
+
+   foreach ( 
$this->getPersonalTools() as $key => $item ) { ?>
makeListItem( $key, $item ); ?>
 
https://gerrit.wikimedia.org/r/273104
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7001e311a8d5ed70129500ab1a3e99369d4a1d9d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/skins/MonoBook
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove "Not logged in" from the personal URLs array - change (mediawiki/core)

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

Change subject: Remove "Not logged in" from the personal URLs array
..


Remove "Not logged in" from the personal URLs array

The array of personal URLs should only contain links to the personal tools of 
the
user. "Not logged in" is a status message, not a personal URL, so it should not
appear in that array. The status should instead be indicated to the user by the
skin itself in whatever way seems best for the skin in question.

The following patches depend on this one to reintroduce the message:
* Vector skin: Ic560d3fd
* Monobook skin: I7001e311

Bug: T121793
Bug: T127758
Change-Id: I5cfa9b4e2f4eb420d5fda6b1c6ce28926cb8e738
---
M includes/skins/SkinTemplate.php
1 file changed, 0 insertions(+), 5 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index 10d9cb9..cefc5bc 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -695,11 +695,6 @@
 
// No need to show Talk and Contributions to anons if 
they can't contribute!
if ( User::groupHasPermission( '*', 'edit' ) ) {
-   // Show the text "Not logged in"
-   $personal_urls['anonuserpage'] = [
-   'text' => $this->msg( 'notloggedin' 
)->text()
-   ];
-
// Because of caching, we can't link directly 
to the IP talk and
// contributions pages. Instead we use the 
special page shortcuts
// (which work correctly regardless of 
caching). This means we can't

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5cfa9b4e2f4eb420d5fda6b1c6ce28926cb8e738
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Foxtrott 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Show "Not logged in" message - change (mediawiki...Vector)

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

Change subject: Show "Not logged in" message
..


Show "Not logged in" message

Show "Not logged in" message left or right (depending on language) of an anon
user's personal tools in case general edit permission is given.

The display of the message was previously done in MW core
(SkinTemplate::buildPersonalUrls, introduced by I6f44e3e5d), which needs to be
reverted first (done in I5cfa9b4e).

Bug: T127758
Depends-on: I5cfa9b4e
Change-Id: Ic560d3fd4e9f6ad194e6ff928c8749084af311b5
---
M VectorTemplate.php
1 file changed, 22 insertions(+), 0 deletions(-)

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



diff --git a/VectorTemplate.php b/VectorTemplate.php
index 5203926..7a02b36 100644
--- a/VectorTemplate.php
+++ b/VectorTemplate.php
@@ -499,10 +499,32 @@
msg( 'personaltools' ) ?>
html( 
'userlangattributes' ) ?>>
getSkin()->getUser()->isLoggedIn() &&
+   
User::groupHasPermission( '*', 'edit' ) ){
+
+   $notLoggedIn =
+   
Html::rawElement( 'li',
+   
[ 'id' => 'pt-anonuserpage' ],
+   
$this->getMsg( 'notloggedin' )->escaped()
+   );
+
+   }
+
+   if ( !$this->data[ 
'rtl' ] ) {
+   echo 
$notLoggedIn;
+   }
+
$personalTools = 
$this->getPersonalTools();
foreach ( 
$personalTools as $key => $item ) {
echo 
$this->makeListItem( $key, $item );
}
+
+   if ( $this->data[ 'rtl' 
] ) {
+   echo 
$notLoggedIn;
+   }
?>



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic560d3fd4e9f6ad194e6ff928c8749084af311b5
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/skins/Vector
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Foxtrott 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   >