[MediaWiki-commits] [Gerrit] integration/commit-message-validator[master]: Update success message of tests

2018-01-12 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404068 )

Change subject: Update success message of tests
..

Update success message of tests

Bug: T184844
Change-Id: Ic4d48d1e6748a43a670283acb1f33a874a1928ef
---
M commit_message_validator/tests/data/check_message_ok.out
M commit_message_validator/tests/data/co-authored-by_ok.out
M commit_message_validator/tests/data/note-in-message_ok.out
M commit_message_validator/tests/data/really_long_url_ok.out
M commit_message_validator/tests/data/signed-off-by_ok.out
M commit_message_validator/tests/data/tag-like-in-message_ok.out
6 files changed, 12 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/commit-message-validator 
refs/changes/68/404068/1

diff --git a/commit_message_validator/tests/data/check_message_ok.out 
b/commit_message_validator/tests/data/check_message_ok.out
index 0f0c913..2678c43 12
--- a/commit_message_validator/tests/data/check_message_ok.out
+++ b/commit_message_validator/tests/data/check_message_ok.out
@@ -1 +1,2 @@
-success
\ No newline at end of file
+commit-message-validator v%version%
+Commit message is formatted properly! Keep up the good work!
diff --git a/commit_message_validator/tests/data/co-authored-by_ok.out 
b/commit_message_validator/tests/data/co-authored-by_ok.out
index 0f0c913..2678c43 12
--- a/commit_message_validator/tests/data/co-authored-by_ok.out
+++ b/commit_message_validator/tests/data/co-authored-by_ok.out
@@ -1 +1,2 @@
-success
\ No newline at end of file
+commit-message-validator v%version%
+Commit message is formatted properly! Keep up the good work!
diff --git a/commit_message_validator/tests/data/note-in-message_ok.out 
b/commit_message_validator/tests/data/note-in-message_ok.out
index 0f0c913..2678c43 12
--- a/commit_message_validator/tests/data/note-in-message_ok.out
+++ b/commit_message_validator/tests/data/note-in-message_ok.out
@@ -1 +1,2 @@
-success
\ No newline at end of file
+commit-message-validator v%version%
+Commit message is formatted properly! Keep up the good work!
diff --git a/commit_message_validator/tests/data/really_long_url_ok.out 
b/commit_message_validator/tests/data/really_long_url_ok.out
index 0f0c913..2678c43 12
--- a/commit_message_validator/tests/data/really_long_url_ok.out
+++ b/commit_message_validator/tests/data/really_long_url_ok.out
@@ -1 +1,2 @@
-success
\ No newline at end of file
+commit-message-validator v%version%
+Commit message is formatted properly! Keep up the good work!
diff --git a/commit_message_validator/tests/data/signed-off-by_ok.out 
b/commit_message_validator/tests/data/signed-off-by_ok.out
index 0f0c913..2678c43 12
--- a/commit_message_validator/tests/data/signed-off-by_ok.out
+++ b/commit_message_validator/tests/data/signed-off-by_ok.out
@@ -1 +1,2 @@
-success
\ No newline at end of file
+commit-message-validator v%version%
+Commit message is formatted properly! Keep up the good work!
diff --git a/commit_message_validator/tests/data/tag-like-in-message_ok.out 
b/commit_message_validator/tests/data/tag-like-in-message_ok.out
index 0f0c913..2678c43 12
--- a/commit_message_validator/tests/data/tag-like-in-message_ok.out
+++ b/commit_message_validator/tests/data/tag-like-in-message_ok.out
@@ -1 +1,2 @@
-success
\ No newline at end of file
+commit-message-validator v%version%
+Commit message is formatted properly! Keep up the good work!

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4d48d1e6748a43a670283acb1f33a874a1928ef
Gerrit-PatchSet: 1
Gerrit-Project: integration/commit-message-validator
Gerrit-Branch: master
Gerrit-Owner: Dalba 

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


[MediaWiki-commits] [Gerrit] mediawiki...SendGrid[master]: Updates to README.md

2018-01-12 Thread D3r1ck01 (Code Review)
D3r1ck01 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/401790 )

Change subject: Updates to README.md
..


Updates to README.md

The README file was still skeletal since the first release of the extension. 
This commit explains how to install
the extension and how to contribute to the project. Some usefull info have been 
added too: author, license, etc.

Bug: T176575
Change-Id: Ide0be5f81b4d45543b0b3ddf1635e35100931cdc
---
M README.md
1 file changed, 34 insertions(+), 10 deletions(-)

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



diff --git a/README.md b/README.md
index 4f26292..f8a38a6 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,39 @@
 # SendGrid MediaWiki Extension
 
-This is a Github mirror of MediaWiki extension SendGrid - our actual code is 
hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access 
for contributing).
+SendGrid is an extension that allows MediaWiki to send emails through SendGrid 
API service.
+* Author: Alangi Derick
+* Current release: 1.0
+* MediaWiki: 1.25+
+* PHP: 5.6+
+* License: GNU GPL2+
+
+## Installation
+
+* Make sure you have already a MediaWiki environment installed;
+* 
[Download](https://www.mediawiki.org/wiki/Special:ExtensionDistributor/SendGrid)
 the **SendGrid** extension;
+* Place the file(s) in a directory called ``SendGrid`` in your ``extensions/`` 
folder;
+* Add the following code at the bottom of your 
[LocalSettings.php](https://www.mediawiki.org/wiki/Manual:LocalSettings.php):
+```php
+ wfLoadExtension( 'SendGrid' );
+```
+
+For MediaWiki 1.24 or earlier:
+* Add the following code at the bottom of your 
[LocalSettings.php](https://www.mediawiki.org/wiki/Manual:LocalSettings.php):
+```php
+ require_once "$IP/extensions/SendGrid/SendGrid.php";
+```
+
+ **Note:** You will have to run composer update in extensions/SendGrid/ folder 
so that composer can pick up the required SendGrid dependencies for the 
extension to run smoothly.
+
+## Contribute
+
+Please refer to 
[https://phabricator.wikimedia.org/tag/mediawiki-extensions-sendgrid/](https://phabricator.wikimedia.org/tag/mediawiki-extensions-sendgrid/)
 for tasks on which you can contribute to.
+
+## More information
+
+Go to the extension's page on 
[MediaWiki](https://www.mediawiki.org/wiki/Extension:SendGrid) for further read.
 
 
+## License
 
-# View SendGrid package using the link below;
-
-Github SendGrid package: https://github.com/stephenb/sendgrid.
-
-
-
-# Installing the SendGrid Extension on MW
-
-To install this extension on MediaWiki (MW), follow the documentations here: 
https://www.mediawiki.org/wiki/Extension:SendGrid
\ No newline at end of file
+SendGrid is licensed under the terms of the GNU General Public License 2.0 or 
later.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide0be5f81b4d45543b0b3ddf1635e35100931cdc
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/SendGrid
Gerrit-Branch: master
Gerrit-Owner: BamLifa 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: D3r1ck01 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add Draft namespace to the Nepali Wikipedia.

2018-01-12 Thread Biplab Anand (Code Review)
Biplab Anand has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404067 )

Change subject: Add Draft namespace to the Nepali Wikipedia.
..

Add Draft namespace to the Nepali Wikipedia.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/67/404067/2

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a16e30c..55e0a0e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5861,6 +5861,8 @@
'newiki' => [
100 => 'पोर्टल', // T130108
101 => 'पोर्टल_वार्ता',
+   118 => 'मस्यौदा', // T184157
+   119 => 'मस्यौदा_वार्ता',
],
'newikibooks' => [
102 => 'पाकपुस्तक', // T131754, Cookbook

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I74afcbd1b790da6d7604635a1ee0bbae318720b0
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Biplab Anand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: DeprecationWarning: support for py2.6 and py3.3 will be dropped

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

Change subject: DeprecationWarning: support for py2.6 and py3.3 will be dropped
..


DeprecationWarning: support for py2.6 and py3.3 will be dropped

Bug: T154771
Bug: T184508
Change-Id: I548a75ac5e27131c06e2745446123801004d7a14
---
M HISTORY.rst
M pywikibot/__init__.py
2 files changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/HISTORY.rst b/HISTORY.rst
index c88b72a..e2bbd3c 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -4,6 +4,7 @@
 Current release
 ---
 
+* Deprecation warning: support for py2.6 and py3.3 will be dropped
 * Bugfixes and improvements
 * Localisation updates
 
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 8a593fb..508f8ba 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """The initialization file for the Pywikibot framework."""
 #
-# (C) Pywikibot team, 2008-2017
+# (C) Pywikibot team, 2008-2018
 #
 # Distributed under the terms of the MIT license.
 #
@@ -134,6 +134,13 @@
 deprecate_arg = redirect_func(_deprecate_arg)
 
 
+if sys.version_info[:2] in ((2, 6), (3, 3)):
+warn(
+'Pywikibot will soon drop support for Python 2.6 and 3.3',
+DeprecationWarning,
+)
+
+
 class Timestamp(datetime.datetime):
 
 """Class for handling MediaWiki timestamps.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I548a75ac5e27131c06e2745446123801004d7a14
Gerrit-PatchSet: 10
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update jquery.uls to fd41bbe5e16a

2018-01-12 Thread Petar.petkovic (Code Review)
Petar.petkovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404066 )

Change subject: Update jquery.uls to fd41bbe5e16a
..

Update jquery.uls to fd41bbe5e16a

Bug: T175769
Change-Id: Idf8a407523ed422658ed32ab23fa908494140e3d
---
M lib/jquery.uls/css/jquery.uls.css
M lib/jquery.uls/css/jquery.uls.grid.css
M lib/jquery.uls/css/jquery.uls.lcd.css
M lib/jquery.uls/css/jquery.uls.mobile.css
M lib/jquery.uls/i18n/cop.json
M lib/jquery.uls/i18n/mwl.json
D lib/jquery.uls/images/icon-language.png
D lib/jquery.uls/images/icon-language.svg
A lib/jquery.uls/images/language-ltr.png
A lib/jquery.uls/images/language-ltr.svg
A lib/jquery.uls/images/language-rtl.png
A lib/jquery.uls/images/language-rtl.svg
M lib/jquery.uls/src/jquery.uls.core.js
M lib/jquery.uls/src/jquery.uls.data.utils.js
M lib/jquery.uls/src/jquery.uls.languagefilter.js
M lib/jquery.uls/src/jquery.uls.lcd.js
M resources/css/ext.uls.pt.less
17 files changed, 288 insertions(+), 278 deletions(-)


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

diff --git a/lib/jquery.uls/css/jquery.uls.css 
b/lib/jquery.uls/css/jquery.uls.css
index 6af44a5..af531f2 100644
--- a/lib/jquery.uls/css/jquery.uls.css
+++ b/lib/jquery.uls/css/jquery.uls.css
@@ -1,8 +1,8 @@
 .uls-trigger {
-   background: url('../images/icon-language.png') no-repeat left center;
+   background: url( ../images/language-ltr.png ) no-repeat left center;
/* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url('../images/icon-language.svg');
-   padding-left: 30px;
+   background-image: linear-gradient( transparent, transparent ), url( 
../images/language-ltr.svg );
+   padding-left: 25px;
 }
 
 .uls-menu {
@@ -12,10 +12,10 @@
margin-top: 1px;
background-color: #fff;
border: 1px solid #ccc;
-   border-color: rgba(0, 0, 0, 0.2);
-   -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-   -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-   box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+   border-color: rgba( 0, 0, 0, 0.2 );
+   -webkit-box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 );
+   -moz-box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 );
+   box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 );
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
@@ -65,9 +65,9 @@
 }
 
 .uls-search-label {
-   background: url('../images/search.png') no-repeat center center;
+   background: url( ../images/search.png ) no-repeat center center;
/* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url('../images/search.svg');
+   background-image: linear-gradient( transparent, transparent ), url( 
../images/search.svg );
background-size: 20px;
height: 32px;
width: 44px;
@@ -88,7 +88,7 @@
width: 100%;
/* For the custom clear (X) icon */
padding: 6px 25px 6px 0;
-   outline: none;
+   outline: 0;
border: 0;
display: block;
position: absolute;
@@ -110,9 +110,9 @@
 }
 
 .uls-languagefilter-clear {
-   background: url('../images/clear.png') no-repeat left center;
+   background: url( ../images/clear.png ) no-repeat left center;
/* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url('../images/clear.svg');
+   background-image: linear-gradient( transparent, transparent ), url( 
../images/clear.svg );
background-size: 15px;
cursor: pointer;
height: 15px;
diff --git a/lib/jquery.uls/css/jquery.uls.grid.css 
b/lib/jquery.uls/css/jquery.uls.grid.css
index 9caf088..f068a86 100644
--- a/lib/jquery.uls/css/jquery.uls.grid.css
+++ b/lib/jquery.uls/css/jquery.uls.grid.css
@@ -32,15 +32,18 @@
 }
 
 .grid .highlight {
-   background: #99;
+   background: #ff9;
 }
 
 /* The Grid -- */
+
 .grid .row {
width: 100%;
max-width: none;
min-width: 600px;
margin: 0 auto;
+   /* Nicolas Gallagher's micro clearfix */
+   *zoom: 1;
 }
 
 .grid .row .row {
@@ -48,6 +51,14 @@
max-width: none;
min-width: 0;
margin: 0 -5px;
+}
+
+.grid .column,
+.grid .columns {
+   float: left;
+   min-height: 1px;
+   padding: 0 5px;
+   position: relative;
 }
 
 .grid .row.collapse .column,
@@ -55,25 +66,12 @@
padding: 0;
 }
 
-.grid .row .row {
-   width: auto;
-   max-width: none;
-   min-width: 0;
-   margin: 0 -5px;
-}
-
 .grid .row .row.collapse {
margin: 0;
 }
 
-.grid .column, .grid .columns {
-   float: left;
-   min-height: 1px;
-   padding: 0 5px;
-   position: relative;
-}
-
-.grid .column.centered, .grid .columns.centered {
+.grid .column.centered,
+.grid 

[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update jquery.uls to fd41bbe5e16a

2018-01-12 Thread Petar.petkovic (Code Review)
Petar.petkovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404065 )

Change subject: Update jquery.uls to fd41bbe5e16a
..

Update jquery.uls to fd41bbe5e16a

Bug: T175769
Change-Id: I4872d13204a221d592de42bf788fdb78e4ae4c21
---
M lib/jquery.uls/css/jquery.uls.css
M lib/jquery.uls/css/jquery.uls.grid.css
M lib/jquery.uls/css/jquery.uls.lcd.css
M lib/jquery.uls/css/jquery.uls.mobile.css
M lib/jquery.uls/i18n/cop.json
M lib/jquery.uls/i18n/mwl.json
D lib/jquery.uls/images/icon-language.png
D lib/jquery.uls/images/icon-language.svg
A lib/jquery.uls/images/language-ltr.png
A lib/jquery.uls/images/language-ltr.svg
A lib/jquery.uls/images/language-rtl.png
A lib/jquery.uls/images/language-rtl.svg
M lib/jquery.uls/src/jquery.uls.core.js
M lib/jquery.uls/src/jquery.uls.data.utils.js
M lib/jquery.uls/src/jquery.uls.languagefilter.js
M lib/jquery.uls/src/jquery.uls.lcd.js
M resources/css/ext.uls.pt.less
17 files changed, 288 insertions(+), 278 deletions(-)


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

diff --git a/lib/jquery.uls/css/jquery.uls.css 
b/lib/jquery.uls/css/jquery.uls.css
index 6af44a5..af531f2 100644
--- a/lib/jquery.uls/css/jquery.uls.css
+++ b/lib/jquery.uls/css/jquery.uls.css
@@ -1,8 +1,8 @@
 .uls-trigger {
-   background: url('../images/icon-language.png') no-repeat left center;
+   background: url( ../images/language-ltr.png ) no-repeat left center;
/* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url('../images/icon-language.svg');
-   padding-left: 30px;
+   background-image: linear-gradient( transparent, transparent ), url( 
../images/language-ltr.svg );
+   padding-left: 25px;
 }
 
 .uls-menu {
@@ -12,10 +12,10 @@
margin-top: 1px;
background-color: #fff;
border: 1px solid #ccc;
-   border-color: rgba(0, 0, 0, 0.2);
-   -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-   -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-   box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+   border-color: rgba( 0, 0, 0, 0.2 );
+   -webkit-box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 );
+   -moz-box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 );
+   box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 );
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
@@ -65,9 +65,9 @@
 }
 
 .uls-search-label {
-   background: url('../images/search.png') no-repeat center center;
+   background: url( ../images/search.png ) no-repeat center center;
/* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url('../images/search.svg');
+   background-image: linear-gradient( transparent, transparent ), url( 
../images/search.svg );
background-size: 20px;
height: 32px;
width: 44px;
@@ -88,7 +88,7 @@
width: 100%;
/* For the custom clear (X) icon */
padding: 6px 25px 6px 0;
-   outline: none;
+   outline: 0;
border: 0;
display: block;
position: absolute;
@@ -110,9 +110,9 @@
 }
 
 .uls-languagefilter-clear {
-   background: url('../images/clear.png') no-repeat left center;
+   background: url( ../images/clear.png ) no-repeat left center;
/* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url('../images/clear.svg');
+   background-image: linear-gradient( transparent, transparent ), url( 
../images/clear.svg );
background-size: 15px;
cursor: pointer;
height: 15px;
diff --git a/lib/jquery.uls/css/jquery.uls.grid.css 
b/lib/jquery.uls/css/jquery.uls.grid.css
index 9caf088..f068a86 100644
--- a/lib/jquery.uls/css/jquery.uls.grid.css
+++ b/lib/jquery.uls/css/jquery.uls.grid.css
@@ -32,15 +32,18 @@
 }
 
 .grid .highlight {
-   background: #99;
+   background: #ff9;
 }
 
 /* The Grid -- */
+
 .grid .row {
width: 100%;
max-width: none;
min-width: 600px;
margin: 0 auto;
+   /* Nicolas Gallagher's micro clearfix */
+   *zoom: 1;
 }
 
 .grid .row .row {
@@ -48,6 +51,14 @@
max-width: none;
min-width: 0;
margin: 0 -5px;
+}
+
+.grid .column,
+.grid .columns {
+   float: left;
+   min-height: 1px;
+   padding: 0 5px;
+   position: relative;
 }
 
 .grid .row.collapse .column,
@@ -55,25 +66,12 @@
padding: 0;
 }
 
-.grid .row .row {
-   width: auto;
-   max-width: none;
-   min-width: 0;
-   margin: 0 -5px;
-}
-
 .grid .row .row.collapse {
margin: 0;
 }
 
-.grid .column, .grid .columns {
-   float: left;
-   min-height: 1px;
-   padding: 0 5px;
-   position: relative;
-}
-
-.grid .column.centered, .grid .columns.centered {
+.grid .column.centered,
+.grid 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use cache set options in SqlBlobStore::getBlob

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

Change subject: Use cache set options in SqlBlobStore::getBlob
..


Use cache set options in SqlBlobStore::getBlob

This is useful for sanity in the case of DB rollback.

Change-Id: I2e50183835a97bc82efee53a407a624f0e35f53f
---
M includes/Storage/SqlBlobStore.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/includes/Storage/SqlBlobStore.php 
b/includes/Storage/SqlBlobStore.php
index 5ddbd34..ec66431 100644
--- a/includes/Storage/SqlBlobStore.php
+++ b/includes/Storage/SqlBlobStore.php
@@ -35,6 +35,7 @@
 use MWException;
 use WANObjectCache;
 use Wikimedia\Assert\Assert;
+use Wikimedia\Rdbms\Database;
 use Wikimedia\Rdbms\IDatabase;
 use Wikimedia\Rdbms\LoadBalancer;
 
@@ -269,7 +270,10 @@
// TODO: change key, since this is not necessarily 
revision text!
$this->cache->makeKey( 'revisiontext', 'textid', 
$blobAddress ),
$this->getCacheTTL(),
-   function () use ( $blobAddress, $queryFlags ) {
+   function ( $unused, &$ttl, &$setOpts ) use ( 
$blobAddress, $queryFlags ) {
+   list( $index ) = 
DBAccessObjectUtils::getDBOptions( $queryFlags );
+   $setOpts += Database::getCacheSetOptions( 
$this->getDBConnection( $index ) );
+
return $this->fetchBlob( $blobAddress, 
$queryFlags );
},
[ 'pcGroup' => self::TEXT_CACHE_GROUP, 'pcTTL' => 
IExpiringStore::TTL_PROC_LONG ]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e50183835a97bc82efee53a407a624f0e35f53f
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add SPARQL client to core

2018-01-12 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404064 )

Change subject: Add SPARQL client to core
..

Add SPARQL client to core

This will be used for deep category search implementation,
also Wikibase one in repo/maintenance will be changed
to use the same codebase.

Bug: T184840
Change-Id: Ie8dd4a5aff55d90f02426f1430ed5214c7327bbc
---
A includes/sparql/SPARQLClient.php
A includes/sparql/SPARQLException.php
2 files changed, 170 insertions(+), 0 deletions(-)


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

diff --git a/includes/sparql/SPARQLClient.php b/includes/sparql/SPARQLClient.php
new file mode 100644
index 000..e8ca478
--- /dev/null
+++ b/includes/sparql/SPARQLClient.php
@@ -0,0 +1,157 @@
+endpoint = $url;
+   }
+
+   /**
+* Set query timeout (in seconds)
+* @param int $timeout
+* @return $this
+*/
+   public function setTimeout( $timeout ) {
+   if ( $timeout >= 0 ) {
+   $this->timeout = $timeout;
+   }
+   return $this;
+   }
+
+   /**
+* Set client options
+* @param array $options
+* @return $this
+*/
+   public function setClientOptions( $options ) {
+   $this->options = $options;
+   return $this;
+   }
+
+   /**
+* Query SPARQL endpoint
+*
+* @param string $sparql query
+* @param bool   $rawData Whether to return only values or full data 
objects
+*
+* @return array List of results, one row per array element
+*   Each row will contain fields indexed by variable name.
+* @throws SPARQLException
+*/
+   public function query( $sparql, $rawData = false ) {
+   $queryData = [ "query" => $sparql, "format" => "json" ];
+   $options = array_merge( [ 'method' => 'GET' ], $this->options );
+
+   if ( empty( $options['userAgent'] ) ) {
+   $options['userAgent'] = self::SPARQL_USER_AGENT;
+   }
+
+   if ( $this->timeout >= 0 ) {
+   // Blazegraph setting, see 
https://wiki.blazegraph.com/wiki/index.php/REST_API
+   $queryData['maxQueryTimeMillis'] = $this->timeout * 
1000;
+   $options['timeout'] = $this->timeout;
+   }
+
+   if ( strlen($sparql) > self::MAX_GET_SIZE ) {
+   // big requests go to POST
+   $options['method'] = 'POST';
+   $options['postData'] = 'query=' . urlencode( $sparql );
+   unset( $queryData['query'] );
+   }
+
+   $url = $this->endpoint . '?' . http_build_query( $queryData );
+   $request = MWHttpRequest::factory( $url, $options );
+
+   $status = $request->execute();
+
+   if ( !$status->isOK() ) {
+   throw new SPARQLException( "HTTP error: 
{$status->getWikiText()}" );
+   }
+   $result = $request->getContent();
+   \MediaWiki\suppressWarnings();
+   $data = json_decode( $result, true );
+   \MediaWiki\restoreWarnings();
+   if ( !$data ) {
+   throw new SPARQLException( "HTTP request failed, 
response:\n" .
+  substr( $result, 1024 ) );
+   }
+
+   return $this->extractData( $data, $rawData );
+   }
+
+   /**
+* Extract data from SPARQL response format.
+* The response must be in format described in:
+* https://www.w3.org/TR/sparql11-results-json/
+*
+* @param array $data SPARQL result
+* @param bool  $rawData Whether to return only values or full data 
objects
+*
+* @return array List of results, one row per element.
+*/
+   private function extractData( $data, $rawData = false ) {
+   $result = [];
+   if ( $data && !empty( $data['results'] ) ) {
+   $vars = $data['head']['vars'];
+   $resrow = [];
+   foreach ( $data['results']['bindings'] as $row ) {
+   foreach ( $vars as $var ) {
+   if ( !isset( $row[$var] ) ) {
+   $resrow[$var] = null;
+   continue;
+   }
+   if ( $rawData ) {
+   $resrow[$var] = $row[$var];
+   } else {
+   $resrow[$var] = 
$row[$var]['value'];
+ 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: parsoid::testing: convert role to profile

2018-01-12 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404063 )

Change subject: parsoid::testing: convert role to profile
..

parsoid::testing: convert role to profile

Change-Id: Ic1ed5e6719e1ec2c5cf017a8667b8fd3fedd076e
---
A modules/profile/manifests/parsoid/testing.pp
M modules/role/manifests/parsoid/testing.pp
2 files changed, 63 insertions(+), 59 deletions(-)


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

diff --git a/modules/profile/manifests/parsoid/testing.pp 
b/modules/profile/manifests/parsoid/testing.pp
new file mode 100644
index 000..a7a3eb1
--- /dev/null
+++ b/modules/profile/manifests/parsoid/testing.pp
@@ -0,0 +1,62 @@
+# Parsoid roundtrip testing, Parsoid & PHP parser visual diff testing
+class profile::parsoid::testing (
+$parsoid_port = hiera('parsoid::testing::parsoid_port'),
+) {
+class { '::parsoid':
+port  => $parsoid_port,
+settings_file => '/srv/deployment/parsoid/deploy/src/localsettings.js',
+deployment=> 'git',
+}
+
+file { '/usr/local/bin/update_parsoid.sh':
+source => 
'puppet:///modules/parsoid/parsoid_testing.update_parsoid.sh',
+owner  => 'root',
+group  => 'root',
+mode   => '0555',
+}
+
+# Use this parsoid instance for parsoid rt-testing
+file { '/srv/deployment/parsoid/deploy/src/localsettings.js':
+content => 
template('testreduce/parsoid-rt-client.rttest.localsettings.js.erb'),
+owner   => 'root',
+group   => 'wikidev',
+mode=> '0444',
+before  => Service['parsoid'],
+}
+
+# mysql client and configuration to provide command line access to
+# parsoid testing database
+include ::passwords::testreduce::mysql
+$parsoid_cli_password = $passwords::testreduce::mysql::mysql_client_pass
+$parsoid_test_db_host = 'm5-master.eqiad.wmnet'
+
+package { [
+'mysql-client',
+]: ensure => present,
+}
+
+file { '/etc/my.cnf':
+content => 
template('role/mariadb/mysqld_config/parsoid_testing.my.cnf'),
+owner   => 'root',
+group   => 'parsoid-test-roots',
+mode=> '0440',
+}
+
+nginx::site { 'nginx-parsoid-testing':
+content => template('parsoid/parsoid-testing.nginx.conf.erb'),
+notify  => Service['nginx'],
+}
+
+ferm::service { 'nginx-parsoid-testing':
+proto  => 'tcp',
+port   => 8001,
+srange => '$PRODUCTION_NETWORKS',
+}
+
+# Presented by the @remote links shown on parsoid-rt-tests.wikimedia.org
+ferm::service { 'parsoid-testing':
+proto  => 'tcp',
+port   => 8142,
+srange => '$PRODUCTION_NETWORKS',
+}
+}
diff --git a/modules/role/manifests/parsoid/testing.pp 
b/modules/role/manifests/parsoid/testing.pp
index ec686c4..a2825b8 100644
--- a/modules/role/manifests/parsoid/testing.pp
+++ b/modules/role/manifests/parsoid/testing.pp
@@ -5,63 +5,5 @@
 description => 'Parsoid server (rt-testing, visual-diffing, etc.)'
 }
 
-$parsoid_port = hiera('parsoid::testing::parsoid_port')
-
-class { '::parsoid':
-port  => $parsoid_port,
-settings_file => '/srv/deployment/parsoid/deploy/src/localsettings.js',
-deployment=> 'git',
-}
-
-file { '/usr/local/bin/update_parsoid.sh':
-source => 
'puppet:///modules/parsoid/parsoid_testing.update_parsoid.sh',
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-}
-
-# Use this parsoid instance for parsoid rt-testing
-file { '/srv/deployment/parsoid/deploy/src/localsettings.js':
-content => 
template('testreduce/parsoid-rt-client.rttest.localsettings.js.erb'),
-owner   => 'root',
-group   => 'wikidev',
-mode=> '0444',
-before  => Service['parsoid'],
-}
-
-# mysql client and configuration to provide command line access to
-# parsoid testing database
-include ::passwords::testreduce::mysql
-$parsoid_cli_password = $passwords::testreduce::mysql::mysql_client_pass
-$parsoid_test_db_host = 'm5-master.eqiad.wmnet'
-
-package { [
-'mysql-client',
-]: ensure => present,
-}
-
-file { '/etc/my.cnf':
-content => 
template('role/mariadb/mysqld_config/parsoid_testing.my.cnf'),
-owner   => 'root',
-group   => 'parsoid-test-roots',
-mode=> '0440',
-}
-
-nginx::site { 'nginx-parsoid-testing':
-content => template('parsoid/parsoid-testing.nginx.conf.erb'),
-notify  => Service['nginx'],
-}
-
-ferm::service { 'nginx-parsoid-testing':
-proto  => 'tcp',
-port   => 8001,
-srange => '$PRODUCTION_NETWORKS',
-}
-
-# Presented by the @remote links shown on parsoid-rt-tests.wikimedia.org
-ferm::service { 'parsoid-testing':
-   

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Unit test NewsletterDb::getNewsletter

2018-01-12 Thread Ryan10145 (Code Review)
Ryan10145 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404062 )

Change subject: Unit test NewsletterDb::getNewsletter
..

Unit test NewsletterDb::getNewsletter

Bug: T183810
Change-Id: I59d331ddda77d527496c2d61d52c785b1ac3ebbf
---
M tests/NewsletterDbTest.php
1 file changed, 37 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/62/404062/1

diff --git a/tests/NewsletterDbTest.php b/tests/NewsletterDbTest.php
index 007e23c..44d9012 100644
--- a/tests/NewsletterDbTest.php
+++ b/tests/NewsletterDbTest.php
@@ -394,6 +394,43 @@
}
 
/**
+* @covers NewsletterDb::getNewsletter
+*/
+   public function testGetNewsletter() {
+   $mockWriteDb = $this->getMockIDatabase();
+   $newsletter = $this->getTestNewsletter();
+
+   $mockResWrapper = $this->getMockBuilder( 'ResultWrapper' )
+   ->disableOriginalConstructor()
+   ->getMock();
+   $mockResWrapper->expects( $this->once() )
+   ->method( 'current' )
+   ->will( $this->returnValue(
+   (Object)[
+   'nl_id' => $newsletter->getId(),
+   'nl_name' => $newsletter->getName(),
+   'nl_desc' => 
$newsletter->getDescription(),
+   'nl_main_page_id' => 
$newsletter->getPageId(),
+   ]
+   ) );
+
+   $mockWriteDb
+   ->expects( $this->once() )
+   ->method( 'select' )
+   ->with(
+   'nl_newsletters',
+   [ 'nl_id', 'nl_name', 'nl_desc', 
'nl_main_page_id' ],
+   [ 'nl_id' => $newsletter->getId(), 'nl_active' 
=> 1 ]
+   )
+   ->will( $this->returnValue( $mockResWrapper ) );
+
+   $table = new NewsletterDb( $this->getMockLoadBalancer( 
$mockWriteDb ) );
+
+   $result = $table->getNewsletter( $newsletter->getId() );
+   $this->assertEquals( $newsletter, $result );
+   }
+
+   /**
 * @covers NewsletterDb::getNewsletterFromName
 */
public function testGetNewsletterFromName() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59d331ddda77d527496c2d61d52c785b1ac3ebbf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Ryan10145 

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Remove ability to disable MP3 ingestion

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

Change subject: Remove ability to disable MP3 ingestion
..


Remove ability to disable MP3 ingestion

Change-Id: I3f1c9f93b2231d5c65c8b2821b6fd29f0e2c8623
---
M TimedMediaHandler.php
M TimedMediaHandlerHooks.php
2 files changed, 1 insertion(+), 12 deletions(-)

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



diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php
index f5ac8bb..4a2a1ae 100644
--- a/TimedMediaHandler.php
+++ b/TimedMediaHandler.php
@@ -197,9 +197,6 @@
// WebVideoTranscode::ENC_AAC,
 ];
 
-// If mp3 source assets can be ingested:
-$wgTmhEnableMp3Uploads = true;
-
 // If mp4 source assets can be ingested:
 $wgTmhEnableMp4Uploads = false;
 
diff --git a/TimedMediaHandlerHooks.php b/TimedMediaHandlerHooks.php
index 448f9b4..9559880 100644
--- a/TimedMediaHandlerHooks.php
+++ b/TimedMediaHandlerHooks.php
@@ -206,7 +206,7 @@
public static function register() {
global $wgHooks, $wgJobClasses, 
$wgJobTypesExcludedFromDefaultQueue, $wgMediaHandlers,
$wgResourceModules, $wgExcludeFromThumbnailPurge,
-   $wgFileExtensions, $wgTmhEnableMp3Uploads, 
$wgTmhEnableMp4Uploads, $wgExtensionAssetsPath,
+   $wgFileExtensions, $wgTmhEnableMp4Uploads, 
$wgExtensionAssetsPath,
$wgMwEmbedModuleConfig, $wgEnableLocalTimedText, 
$wgTmhFileExtensions,
$wgWikimediaJenkinsCI;
 
@@ -215,14 +215,6 @@
global $wgEnableTranscode, $wgFFmpegLocation;
$wgEnableTranscode = false;
$wgFFmpegLocation = '/usr/bin/ffmpeg';
-   }
-
-   // Remove mp3 if not enabled:
-   if ( $wgTmhEnableMp3Uploads === false ) {
-   $index = array_search( 'mp3', $wgFileExtensions );
-   if ( $index !== false ) {
-   array_splice( $wgFileExtensions, $index, 1 );
-   }
}
 
// Remove mp4 if not enabled:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f1c9f93b2231d5c65c8b2821b6fd29f0e2c8623
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix LoadBalancer::getMasterPos() callers to handle a non-obj...

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

Change subject: Fix LoadBalancer::getMasterPos() callers to handle a non-object 
being returned
..


Fix LoadBalancer::getMasterPos() callers to handle a non-object being returned

Change-Id: I3356057f27a051835734329afa339ea76842a389
---
M includes/libs/rdbms/ChronologyProtector.php
M includes/libs/rdbms/lbfactory/LBFactory.php
M includes/objectcache/SqlBagOStuff.php
3 files changed, 8 insertions(+), 3 deletions(-)

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



diff --git a/includes/libs/rdbms/ChronologyProtector.php 
b/includes/libs/rdbms/ChronologyProtector.php
index 152ff74..4fcd885 100644
--- a/includes/libs/rdbms/ChronologyProtector.php
+++ b/includes/libs/rdbms/ChronologyProtector.php
@@ -147,8 +147,10 @@
$masterName = $lb->getServerName( $lb->getWriterIndex() );
if ( $lb->getServerCount() > 1 ) {
$pos = $lb->getMasterPos();
-   $this->logger->info( __METHOD__ . ": LB for 
'$masterName' has pos $pos\n" );
-   $this->shutdownPositions[$masterName] = $pos;
+   if ( $pos ) {
+   $this->logger->info( __METHOD__ . ": LB for 
'$masterName' has pos $pos\n" );
+   $this->shutdownPositions[$masterName] = $pos;
+   }
} else {
$this->logger->info( __METHOD__ . ": DB '$masterName' 
touched\n" );
}
diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php 
b/includes/libs/rdbms/lbfactory/LBFactory.php
index 187527e..2324553 100644
--- a/includes/libs/rdbms/lbfactory/LBFactory.php
+++ b/includes/libs/rdbms/lbfactory/LBFactory.php
@@ -358,7 +358,7 @@
$failed = [];
foreach ( $lbs as $i => $lb ) {
if ( $masterPositions[$i] ) {
-   // The DBMS may not support getMasterPos()
+   // The RDBMS may not support getMasterPos()
if ( !$lb->waitForAll( $masterPositions[$i], 
$opts['timeout'] ) ) {
$failed[] = $lb->getServerName( 
$lb->getWriterIndex() );
}
diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index c286055..6691f73 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -808,6 +808,9 @@
 
// Main LB is used; wait for any replica DBs to catch up
$masterPos = $lb->getMasterPos();
+   if ( !$masterPos ) {
+   return true; // not applicable
+   }
 
$loop = new WaitConditionLoop(
function () use ( $lb, $masterPos ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3356057f27a051835734329afa339ea76842a389
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: rdbms: add LoadBalancer::getLocalDomainId() method

2018-01-12 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404060 )

Change subject: rdbms: add LoadBalancer::getLocalDomainId() method
..

rdbms: add LoadBalancer::getLocalDomainId() method

This returns the default domain without getting a connection

Change-Id: I351d42de38b3126222c5a40627a2a12f76a60939
---
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
M tests/phpunit/includes/db/LoadBalancerTest.php
2 files changed, 20 insertions(+), 2 deletions(-)


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

diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index a75dc4d..e80b952 100644
--- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@ -243,6 +243,17 @@
}
 
/**
+* Get the local (and default) database domain ID of connection handles
+*
+* @see DatabaseDomain
+* @return string Database domain ID; this specifies DB name, schema, 
and table prefix
+* @since 1.31
+*/
+   public function getLocalDomainID() {
+   return $this->localDomain->getId();
+   }
+
+   /**
 * Get a LoadMonitor instance
 *
 * @return ILoadMonitor
diff --git a/tests/phpunit/includes/db/LoadBalancerTest.php 
b/tests/phpunit/includes/db/LoadBalancerTest.php
index 5fd33dc..335d0d2 100644
--- a/tests/phpunit/includes/db/LoadBalancerTest.php
+++ b/tests/phpunit/includes/db/LoadBalancerTest.php
@@ -3,6 +3,7 @@
 use Wikimedia\Rdbms\DBError;
 use Wikimedia\Rdbms\IDatabase;
 use Wikimedia\Rdbms\LoadBalancer;
+use Wikimedia\Rdbms\DatabaseDomain;
 
 /**
  * Holds tests for LoadBalancer MediaWiki class.
@@ -29,11 +30,13 @@
  */
 class LoadBalancerTest extends MediaWikiTestCase {
public function testWithoutReplica() {
-   global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, 
$wgDBtype, $wgSQLiteDataDir;
+   global $wgDBserver, $wgDBname, $wgDBprefix, $wgDBuser, 
$wgDBpassword, $wgDBtype;
+   global $wgSQLiteDataDir;
 
$servers = [
[
'host'=> $wgDBserver,
+   'tablePrefix' => $wgDBprefix,
'dbname'  => $wgDBname,
'user'=> $wgDBuser,
'password'=> $wgDBpassword,
@@ -46,9 +49,13 @@
 
$lb = new LoadBalancer( [
'servers' => $servers,
-   'localDomain' => wfWikiID()
+   'localDomain' => new DatabaseDomain( $wgDBname, null, 
$wgDBprefix )
] );
 
+   $ld = DatabaseDomain::newFromId( $lb->getLocalDomainID() );
+   $this->assertEquals( $wgDBname, $ld->getDatabase(), 'local 
domain DB set' );
+   $this->assertEquals( $wgDBprefix, $ld->getTablePrefix(), 'local 
domain prefix set' );
+
$dbw = $lb->getConnection( DB_MASTER );
$this->assertTrue( $dbw->getLBInfo( 'master' ), 'master shows 
as master' );
$this->assertTrue( $dbw->getFlag( $dbw::DBO_TRX ), "DBO_TRX set 
on master" );

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Show message when article limit is reached on reading lists

2018-01-12 Thread Sharvaniharan (Code Review)
Sharvaniharan has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404059 )

Change subject: Show message when article limit is reached on reading lists
..

Show message when article limit is reached on reading lists

- 1000 articles is the limit per article, and users will be shown a message 
when trying to add >1000 articles.

Bug: T180230
Change-Id: I56b2c63f0ce5cbbfa210cca2ec10c94c6815736d
---
M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
3 files changed, 24 insertions(+), 5 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java 
b/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
index ef18d78..c697357 100644
--- a/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
+++ b/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
@@ -69,6 +69,7 @@
 private CreateButtonClickListener createClickListener = new 
CreateButtonClickListener();
 
 private List readingLists = new ArrayList<>();
+public static final int MAX_ARTICLE_LIMIT = 1000;
 
 @Nullable private DialogInterface.OnDismissListener dismissListener;
 private ReadingListItemCallback listItemCallback = new 
ReadingListItemCallback();
@@ -215,14 +216,21 @@
 String message;
 if (exists) {
 message = getString(R.string.reading_list_already_exists);
+showViewListSnackBar(readingList, message, true);
+
+} else if (readingList.pages().size() >= MAX_ARTICLE_LIMIT) {
+message = 
String.format(getString(R.string.reading_list_article_limit_message), 
readingList.title());
+showViewListSnackBar(readingList, message, false);
+
 } else {
 message = 
String.format(getString(R.string.reading_list_added_to_named),
 readingList.isDefault() ? 
getString(R.string.default_reading_list_name) : readingList.title());
 new 
ReadingListsFunnel(title.getWikiSite()).logAddToList(readingList, 
readingLists.size(), invokeSource);
 
 ReadingListDbHelper.instance().addPageToList(readingList, 
title, true);
+showViewListSnackBar(readingList, message, true);
+
 }
-showViewListSnackBar(readingList, message);
 dismiss();
 }
 });
@@ -232,6 +240,11 @@
 if (titles.size() == 1) {
 addAndDismiss(readingList, titles.get(0));
 return;
+}
+if (readingList.pages().size() + titles.size() > MAX_ARTICLE_LIMIT) {
+for (int i = MAX_ARTICLE_LIMIT - readingList.pages().size(); i < 
titles.size(); i++) {
+titles.remove(i);
+}
 }
 CallbackTask.execute(() -> 
ReadingListDbHelper.instance().addPagesToListIfNotExist(readingList, titles), 
new CallbackTask.DefaultCallback() {
 @Override
@@ -247,15 +260,19 @@
 readingList.isDefault() ? 
getString(R.string.default_reading_list_name) : readingList.title());
 new ReadingListsFunnel().logAddToList(readingList, 
readingLists.size(), invokeSource);
 }
-showViewListSnackBar(readingList, message);
+showViewListSnackBar(readingList, message, true);
 dismiss();
 }
 });
 }
 
-private void showViewListSnackBar(@NonNull final ReadingList list, 
@NonNull String message) {
-FeedbackUtil.makeSnackbar(getActivity(), message, 
FeedbackUtil.LENGTH_DEFAULT)
-.setAction(R.string.reading_list_added_view_button, v -> 
v.getContext().startActivity(ReadingListActivity.newIntent(v.getContext(), 
list))).show();
+private void showViewListSnackBar(@NonNull final ReadingList list, 
@NonNull String message, boolean showActionButton) {
+if (showActionButton) {
+FeedbackUtil.makeSnackbar(getActivity(), message, 
FeedbackUtil.LENGTH_DEFAULT)
+.setAction(R.string.reading_list_added_view_button, v -> 
v.getContext().startActivity(ReadingListActivity.newIntent(v.getContext(), 
list))).show();
+} else {
+FeedbackUtil.makeSnackbar(getActivity(), message, 
FeedbackUtil.LENGTH_DEFAULT).show();
+}
 }
 
 private class ReadingListItemCallback implements 
ReadingListItemView.Callback {
diff --git a/app/src/main/res/values-qq/strings.xml 
b/app/src/main/res/values-qq/strings.xml
index d2825a0..8e5cac6 100644
--- a/app/src/main/res/values-qq/strings.xml
+++ b/app/src/main/res/values-qq/strings.xml
@@ -369,6 +369,7 @@
   \"%1$s\" 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix LoadBalancer::getMasterPos() callers to handle a non-obj...

2018-01-12 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404057 )

Change subject: Fix LoadBalancer::getMasterPos() callers to handle a non-object 
being returned
..

Fix LoadBalancer::getMasterPos() callers to handle a non-object being returned

Change-Id: I3356057f27a051835734329afa339ea76842a389
---
M includes/libs/rdbms/ChronologyProtector.php
M includes/libs/rdbms/lbfactory/LBFactory.php
M includes/objectcache/SqlBagOStuff.php
3 files changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/57/404057/1

diff --git a/includes/libs/rdbms/ChronologyProtector.php 
b/includes/libs/rdbms/ChronologyProtector.php
index 152ff74..4fcd885 100644
--- a/includes/libs/rdbms/ChronologyProtector.php
+++ b/includes/libs/rdbms/ChronologyProtector.php
@@ -147,8 +147,10 @@
$masterName = $lb->getServerName( $lb->getWriterIndex() );
if ( $lb->getServerCount() > 1 ) {
$pos = $lb->getMasterPos();
-   $this->logger->info( __METHOD__ . ": LB for 
'$masterName' has pos $pos\n" );
-   $this->shutdownPositions[$masterName] = $pos;
+   if ( $pos ) {
+   $this->logger->info( __METHOD__ . ": LB for 
'$masterName' has pos $pos\n" );
+   $this->shutdownPositions[$masterName] = $pos;
+   }
} else {
$this->logger->info( __METHOD__ . ": DB '$masterName' 
touched\n" );
}
diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php 
b/includes/libs/rdbms/lbfactory/LBFactory.php
index 187527e..2324553 100644
--- a/includes/libs/rdbms/lbfactory/LBFactory.php
+++ b/includes/libs/rdbms/lbfactory/LBFactory.php
@@ -358,7 +358,7 @@
$failed = [];
foreach ( $lbs as $i => $lb ) {
if ( $masterPositions[$i] ) {
-   // The DBMS may not support getMasterPos()
+   // The RDBMS may not support getMasterPos()
if ( !$lb->waitForAll( $masterPositions[$i], 
$opts['timeout'] ) ) {
$failed[] = $lb->getServerName( 
$lb->getWriterIndex() );
}
diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index c286055..6691f73 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -808,6 +808,9 @@
 
// Main LB is used; wait for any replica DBs to catch up
$masterPos = $lb->getMasterPos();
+   if ( !$masterPos ) {
+   return true; // not applicable
+   }
 
$loop = new WaitConditionLoop(
function () use ( $lb, $masterPos ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: rdbms: specify DB name and table prefix even for the local d...

2018-01-12 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404056 )

Change subject: rdbms: specify DB name and table prefix even for the local 
domain
..

rdbms: specify DB name and table prefix even for the local domain

When LoadBalancer opens new local domain connections, it currently
assumes that the domain specified by the server info array is the
same. For sanity, make sure that the handle is set to the local
domain.

The main LBFactory/LoadBalancer use $wgDBname/$wgDBprefix as the
local domain, corresponding with wfWikiId(). This relation is set
automatically in MWLBFactory. If $wgLBFactoryConf/$wgDBservers is
manually configured in a way breaking this correspondance, then it
is misconfigured.

Change-Id: I56f8b32fe957f984b8c9753e6db3b20abe96b038
---
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
M includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php
2 files changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/56/404056/1

diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index a75dc4d..9977442 100644
--- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@ -810,9 +810,10 @@
$server = $this->mServers[$i];
$server['serverIndex'] = $i;
$server['autoCommitOnly'] = $autoCommit;
-   $conn = $this->reallyOpenConnection( $server, 
false );
+   $conn = $this->reallyOpenConnection( $server, 
$this->localDomain->getDatabase() );
$host = $this->getServerName( $i );
if ( $conn->isOpen() ) {
+   $conn->tablePrefix( 
$this->localDomain->getTablePrefix() ); // local domain
$this->connLogger->debug( "Connected to 
database $i at '$host'." );
$this->mConns[$connKey][$i][0] = $conn;
} else {
@@ -888,8 +889,9 @@
// Reuse a free connection from another domain
$conn = reset( $this->mConns[$connFreeKey][$i] );
$oldDomain = key( $this->mConns[$connFreeKey][$i] );
-   // The empty string as a DB name means "don't care".
-   // DatabaseMysqlBase::open() already handle this on 
connection.
+   // Change the domain of the handle to that of $domain. 
If $domain uses an empty
+   // string to specify the DB name, that means that the 
caller doesn't care what
+   // database is selected for use (e.g. leave it as is).
if ( strlen( $dbName ) && !$conn->selectDB( $dbName ) ) 
{
$this->mLastError = "Error selecting database 
'$dbName' on server " .
$conn->getServer() . " from client host 
{$this->host}";
@@ -918,7 +920,7 @@
$this->errorConnection = $conn;
$conn = false;
} else {
-   $conn->tablePrefix( $prefix );
+   $conn->tablePrefix( $prefix ); // as specified
$this->mConns[$connInUseKey][$i][$domain] = 
$conn;
$this->connLogger->debug( __METHOD__ . ": 
opened new connection for $i/$domain" );
}
@@ -949,24 +951,22 @@
}
 
/**
-* Really opens a connection. Uncached.
+* Open a new network connection to a server (uncached)
+*
 * Returns a Database object whether or not the connection was 
successful.
-* @access private
 *
 * @param array $server
-* @param string|bool $dbNameOverride Use "" to not select any database
+* @param string $dbNameOverride Use "" to not select any database
 * @return Database
 * @throws DBAccessError
 * @throws InvalidArgumentException
 */
-   protected function reallyOpenConnection( array $server, $dbNameOverride 
= false ) {
+   protected function reallyOpenConnection( array $server, $dbNameOverride 
) {
if ( $this->disabled ) {
throw new DBAccessError();
}
 
-   if ( $dbNameOverride !== false ) {
-   $server['dbname'] = $dbNameOverride;
-   }
+   $server['dbname'] = $dbNameOverride;
 
// Let the handle know what the cluster master is (e.g. 
"db1052")
$masterName = $this->getServerName( 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: DeprecationWarning: support for py2.6 and py3.3 will be dropped

2018-01-12 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404055 )

Change subject: DeprecationWarning: support for py2.6 and py3.3 will be dropped
..

DeprecationWarning: support for py2.6 and py3.3 will be dropped

Bug: T154771
Bug: T184508
Change-Id: I548a75ac5e27131c06e2745446123801004d7a14
---
M pywikibot/__init__.py
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 8a593fb..9caf168 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -133,6 +133,12 @@
 deprecated = redirect_func(__deprecated)
 deprecate_arg = redirect_func(_deprecate_arg)
 
+if (PY2 and sys.version_info[:2] < (2, 6)) or sys.version_info[:2] < (3, 4):
+warn(
+'Pywikibot will soon drop support for Python 2.6 and 3.3',
+DeprecationWarning,
+)
+
 
 class Timestamp(datetime.datetime):
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: DHCP: switch to using http to serve installer

2018-01-12 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404054 )

Change subject: DHCP: switch to using http to serve installer
..

DHCP: switch to using http to serve installer

Bug: T182215
Change-Id: I2786396822c64ee79b8a82402258ea03dac42da9
---
M modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 1,084 insertions(+), 1,084 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: DHCP: rm rm linux-host-entries.ttyS0-9600 (cameras)

2018-01-12 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404053 )

Change subject: DHCP: rm rm linux-host-entries.ttyS0-9600 (cameras)
..

DHCP: rm rm linux-host-entries.ttyS0-9600 (cameras)

This file only contains former IP-capable cameras that
have not been in use since a long time and are unmounted
per racktables.

as per Moritz on:
https://gerrit.wikimedia.org/r/#/c/399826/1/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-9600

Change-Id: I00fb64f3aad26fa2c78ea36c8748f1cc04aaa379
---
D modules/install_server/files/dhcpd/linux-host-entries.ttyS0-9600
1 file changed, 0 insertions(+), 34 deletions(-)


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

diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-9600 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-9600
deleted file mode 100644
index 9bddb82..000
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-9600
+++ /dev/null
@@ -1,34 +0,0 @@
-#
- THIS FILE IS MANAGED BY PUPPET
- puppet:///modules/install_server/dhcpd/linux-host-entries.ttyS0-9600
-##
-
-host cam1-a-eqiad {
-hardware ethernet 00:40:8c:a2:61:40;
-fixed-address cam1-a-eqiad.eqiad.wmnet;
-}
-
-host cam2-a-eqiad {
-hardware ethernet 00:40:8c:a2:68:ef;
-fixed-address cam2-a-eqiad.eqiad.wmnet;
-}
-
-host cam1-a-b-eqiad {
-hardware ethernet 00:40:8c:a2:3b:6e;
-fixed-address cam1-a-b-eqiad.eqiad.wmnet;
-}
-
-host cam2-a-b-eqiad {
-hardware ethernet 00:40:8c:a2:68:fa;
-fixed-address cam2-a-b-eqiad.eqiad.wmnet;
-}
-
-host cam1-b-c-eqiad {
-hardware ethernet 00:40:8c:a2:69:01;
-fixed-address cam1-b-c-eqiad.eqiad.wmnet;
-}
-
-host cam2-b-c-eqiad {
-hardware ethernet 00:40:8c:a2:61:25;
-fixed-address cam2-b-c-eqiad.eqiad.wmnet;
-}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ReadingLists[master]: Fix purge.php parameter handling

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

Change subject: Fix purge.php parameter handling
..


Fix purge.php parameter handling

Bug: T181107
Change-Id: I417eb64c9d044250a88129b601ac784875ba2235
---
M maintenance/purge.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/maintenance/purge.php b/maintenance/purge.php
index 85e571b..da0e2a3 100644
--- a/maintenance/purge.php
+++ b/maintenance/purge.php
@@ -26,7 +26,7 @@
parent::__construct();
$this->addDescription(
'Purge unneeded database rows (deleted lists/entries or 
orphaned sortkeys).' );
-   $this->addOption( 'before', 'Purge deleted lists/entries before 
this timestamp', true, true );
+   $this->addOption( 'before', 'Purge deleted lists/entries before 
this timestamp', false, true );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I417eb64c9d044250a88129b601ac784875ba2235
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ReadingLists
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: OOUI: Manually pull in fix from I99caad7b ahead of the relea...

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

Change subject: OOUI: Manually pull in fix from I99caad7b ahead of the release 
cycle
..


OOUI: Manually pull in fix from I99caad7b ahead of the release cycle

The .map file will be wrong, but those aren't used outside of an
experimental branch yet, so it's not the end of the world.

Bug: T184665
Change-Id: I9ff1ed80496ec61b836de4221dd36cde6d4a71ac
---
M resources/lib/oojs-ui/oojs-ui-toolbars.js
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  Esanders: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/lib/oojs-ui/oojs-ui-toolbars.js 
b/resources/lib/oojs-ui/oojs-ui-toolbars.js
index 59d6474..1b57f09 100644
--- a/resources/lib/oojs-ui/oojs-ui-toolbars.js
+++ b/resources/lib/oojs-ui/oojs-ui-toolbars.js
@@ -1978,7 +1978,7 @@
this.$element.addClass( 'oo-ui-popupToolGroup-active 
oo-ui-popupToolGroup-left' );
this.setFlags( { progressive: true } );
this.toggleClipping( true );
-   if ( this.isClippedHorizontally() || 
this.isFloatableOutOfView() ) {
+   if ( this.isClippedHorizontally() ) {
// Anchoring to the left caused the popup to 
clip, so anchor it to the right instead
this.toggleClipping( false );
this.$element
@@ -1986,7 +1986,7 @@
.addClass( 'oo-ui-popupToolGroup-right' 
);
this.toggleClipping( true );
}
-   if ( this.isClippedHorizontally() || 
this.isFloatableOutOfView() ) {
+   if ( this.isClippedHorizontally() ) {
// Anchoring to the right also caused the popup 
to clip, so just make it fill the container
containerWidth = 
this.$clippableScrollableContainer.width();
containerLeft = 
this.$clippableScrollableContainer[ 0 ] === document.documentElement ?

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ff1ed80496ec61b836de4221dd36cde6d4a71ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove --list-bundled option, pointless

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

Change subject: Remove --list-bundled option, pointless
..


Remove --list-bundled option, pointless

Made sense before we put them as submodules

Change-Id: I802525a497af9e599a34637fff55d0883116dde3
---
M make-release/makerelease.py
1 file changed, 0 insertions(+), 19 deletions(-)

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



diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 13da5c7..a6e3b80 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -82,11 +82,6 @@
 help='path to tar, we are expecting a GNU tar. (defaults to tar)'
 )
 parser.add_argument(
-'--list-bundled', dest='list_bundled',
-action='store_true',
-help='List all bundled extensions for the given version and quit'
-)
-parser.add_argument(
 '--patch-dir', dest='patch_dir', default=None,
 help='Where to source patch files from'
 )
@@ -340,24 +335,10 @@
 base.remove(repo)
 return sorted(extensions + list(base))
 
-def print_bundled(self, extensions):
-"""
-Print all bundled extensions and skins
-
-:param extensions: Extensions that are already being included
-:return: exit code
-"""
-for repo in self.get_extensions_for_version(self.version, extensions):
-print(repo)
-return 0
-
 def main(self):
 """return value should be usable as an exit code"""
 
 extensions = []
-
-if self.options.list_bundled:
-return self.print_bundled(extensions)
 
 logging.info("Doing release for %s", self.version.raw)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I802525a497af9e599a34637fff55d0883116dde3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove --list-bundled option, pointless

2018-01-12 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404052 )

Change subject: Remove --list-bundled option, pointless
..

Remove --list-bundled option, pointless

Made sense before we put them as submodules

Change-Id: I802525a497af9e599a34637fff55d0883116dde3
---
M make-release/makerelease.py
1 file changed, 0 insertions(+), 19 deletions(-)


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

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 13da5c7..a6e3b80 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -82,11 +82,6 @@
 help='path to tar, we are expecting a GNU tar. (defaults to tar)'
 )
 parser.add_argument(
-'--list-bundled', dest='list_bundled',
-action='store_true',
-help='List all bundled extensions for the given version and quit'
-)
-parser.add_argument(
 '--patch-dir', dest='patch_dir', default=None,
 help='Where to source patch files from'
 )
@@ -340,24 +335,10 @@
 base.remove(repo)
 return sorted(extensions + list(base))
 
-def print_bundled(self, extensions):
-"""
-Print all bundled extensions and skins
-
-:param extensions: Extensions that are already being included
-:return: exit code
-"""
-for repo in self.get_extensions_for_version(self.version, extensions):
-print(repo)
-return 0
-
 def main(self):
 """return value should be usable as an exit code"""
 
 extensions = []
-
-if self.options.list_bundled:
-return self.print_bundled(extensions)
 
 logging.info("Doing release for %s", self.version.raw)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I802525a497af9e599a34637fff55d0883116dde3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-wmf-branch: Remove patching support

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

Change subject: make-wmf-branch: Remove patching support
..


make-wmf-branch: Remove patching support

Patching is a post-branching activity. Plus this feature
encourages poor master/release behaviors.

Change-Id: I50dfea77ce86cea4550e7e4fcce39e9cc95bfda1
---
M make-wmf-branch/MakeWmfBranch.php
M make-wmf-branch/default.conf
2 files changed, 1 insertion(+), 18 deletions(-)

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



diff --git a/make-wmf-branch/MakeWmfBranch.php 
b/make-wmf-branch/MakeWmfBranch.php
index ab8761d..3cce03d 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -3,7 +3,7 @@
 class MakeWmfBranch {
public $dryRun;
public $newVersion, $oldVersion, $buildDir;
-   public $specialExtensions, $branchedExtensions, $patches;
+   public $specialExtensions, $branchedExtensions;
public $repoPath;
public $noisy;
 
@@ -32,7 +32,6 @@
$this->specialExtensions = $branchLists['special_extensions'];
$this->alreadyBranched = array();
$this->noisy = $noisy;
-   $this->patches = $patches;
$this->repoPath = $repoPath;
$this->branchPrefix = $branchPrefix;
}
@@ -228,14 +227,6 @@
 
# Do intermediate commit
$this->runCmd( 'git', 'commit', '-a', '-q', '-m', "Creating new 
WMF {$this->newVersion} branch" );
-
-   # Apply patches
-   foreach ( $this->patches as $patch => $subpath ) {
-   // git fetch https://gerrit.wikimedia.org/mediawiki/core
-   // refs/changes/06/7606/1 && git cherry-pick FETCH_HEAD
-   $this->runCmd( 'git', 'fetch', $this->repoPath . '/' . 
$subpath, $patch );
-   $this->runCmd( 'git', 'cherry-pick', 'FETCH_HEAD' );
-   }
 
$this->runWriteCmd(
'git', 'push', 'origin', 'wmf/' . $this->newVersion );
diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf
index 7b0bb46..4eadc97 100644
--- a/make-wmf-branch/default.conf
+++ b/make-wmf-branch/default.conf
@@ -12,13 +12,5 @@
 
 $branchPrefix = 'wmf/';
 
-# Map of custom patches (refs/*) to gerrit /mediawiki/ relative base paths 
(repos)
-# Example:
-# $patches = array(
-#  'refs/changes/65/274165/3' => 'core' // 
https://gerrit.wikimedia.org/r/#/c/274165/
-# );
-$patches = array(
-);
-
 $dryRun = false; // Don't actually push anything
 $noisy = false; // Output git commands

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50dfea77ce86cea4550e7e4fcce39e9cc95bfda1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Fix npm-browser-test docker tag

2018-01-12 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404051 )

Change subject: Fix npm-browser-test docker tag
..

Fix npm-browser-test docker tag

The Docker tag should not have a `v` prefix. I did the mistake in
54d0313 :(

Bug: T177276
Bug: T184810
Change-Id: I22f1b39ce6a588c37e4402872d31541e2232e39e
---
M jjb/job-templates.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/51/404051/1

diff --git a/jjb/job-templates.yaml b/jjb/job-templates.yaml
index af58338..d125f11 100644
--- a/jjb/job-templates.yaml
+++ b/jjb/job-templates.yaml
@@ -229,7 +229,7 @@
 - job-template:
 !!merge : *job_npm-node-6-docker
 name: '{name}-npm-browser-node-6-docker'
-docker_image_var: 
'docker-registry.wikimedia.org/releng/npm-browser-test:v0.1.0'
+docker_image_var: 
'docker-registry.wikimedia.org/releng/npm-browser-test:0.1.0'
 # Reinject Zuul parameters since JJB strip for some reason
 triggers:
  - zuul

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove pointless have_i18n variable, add some missing docstr...

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

Change subject: Remove pointless have_i18n variable, add some missing docstrings
..


Remove pointless have_i18n variable, add some missing docstrings

Change-Id: I347891c3323f80a6ea19f63778fa733beb62322a
---
M make-release/makerelease.py
1 file changed, 8 insertions(+), 4 deletions(-)

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



diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 0186724..13da5c7 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -405,6 +405,7 @@
 return 0
 
 def ask(self, question):
+"""What does the user want?"""
 if self.options.yes:
 return True
 
@@ -422,12 +423,14 @@
 return result
 
 def export(self, git_ref, export_dir, patches=None):
+"""Clone core and possibly apply some patches"""
 if patches:
 git_ref = self.version.branch
 get_git(export_dir, git_ref)
 maybe_apply_patches(export_dir, patches)
 
 def make_patch(self, dest_dir, patch_file_name, dir1, dir2, patch_type):
+"""Make a patch file, given two directories"""
 patch_file = open(os.path.join(dest_dir, patch_file_name), 'w')
 args = ['diff', '-Nruw']
 if patch_type == 'i18n':
@@ -458,6 +461,7 @@
 return diff_status == 1
 
 def make_tar(self, package, input_dir, build_dir, add_args=None):
+"""Tar up a directory"""
 tar = self.options.tar_command
 
 # Generate the .tar.gz file
@@ -483,7 +487,7 @@
 return filename
 
 def do_release(self, version, extensions=None):
-
+"""Do all the nasty work of building a release"""
 build_dir = self.options.buildroot
 patch_dir = self.options.patch_dir
 
@@ -543,7 +547,6 @@
 )
 
 # Patch
-have_i18n = False
 if not self.options.no_previous and prev_version is not None:
 prev_dir = 'mediawiki-' + prev_version
 prev_mw_version = MwVersion(prev_version)
@@ -562,7 +565,8 @@
 build_dir, i18n_patch, prev_dir, package, 'i18n')):
 out_files.append(i18n_patch)
 logging.info('%s written', i18n_patch)
-have_i18n = True
+else:
+i18n_patch = None
 
 # Sign
 for file_name in out_files:
@@ -597,7 +601,7 @@
 print()
 
 if prev_version is not None:
-if have_i18n:
+if i18n_patch:
 print("Patch to previous version (" + prev_version +
   "), without interface text:")
 print(server + package + '.patch.gz')

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove pointless have_i18n variable, add some missing docstr...

2018-01-12 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404050 )

Change subject: Remove pointless have_i18n variable, add some missing docstrings
..

Remove pointless have_i18n variable, add some missing docstrings

Change-Id: I347891c3323f80a6ea19f63778fa733beb62322a
---
M make-release/makerelease.py
1 file changed, 8 insertions(+), 4 deletions(-)


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

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 0186724..13da5c7 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -405,6 +405,7 @@
 return 0
 
 def ask(self, question):
+"""What does the user want?"""
 if self.options.yes:
 return True
 
@@ -422,12 +423,14 @@
 return result
 
 def export(self, git_ref, export_dir, patches=None):
+"""Clone core and possibly apply some patches"""
 if patches:
 git_ref = self.version.branch
 get_git(export_dir, git_ref)
 maybe_apply_patches(export_dir, patches)
 
 def make_patch(self, dest_dir, patch_file_name, dir1, dir2, patch_type):
+"""Make a patch file, given two directories"""
 patch_file = open(os.path.join(dest_dir, patch_file_name), 'w')
 args = ['diff', '-Nruw']
 if patch_type == 'i18n':
@@ -458,6 +461,7 @@
 return diff_status == 1
 
 def make_tar(self, package, input_dir, build_dir, add_args=None):
+"""Tar up a directory"""
 tar = self.options.tar_command
 
 # Generate the .tar.gz file
@@ -483,7 +487,7 @@
 return filename
 
 def do_release(self, version, extensions=None):
-
+"""Do all the nasty work of building a release"""
 build_dir = self.options.buildroot
 patch_dir = self.options.patch_dir
 
@@ -543,7 +547,6 @@
 )
 
 # Patch
-have_i18n = False
 if not self.options.no_previous and prev_version is not None:
 prev_dir = 'mediawiki-' + prev_version
 prev_mw_version = MwVersion(prev_version)
@@ -562,7 +565,8 @@
 build_dir, i18n_patch, prev_dir, package, 'i18n')):
 out_files.append(i18n_patch)
 logging.info('%s written', i18n_patch)
-have_i18n = True
+else:
+i18n_patch = None
 
 # Sign
 for file_name in out_files:
@@ -597,7 +601,7 @@
 print()
 
 if prev_version is not None:
-if have_i18n:
+if i18n_patch:
 print("Patch to previous version (" + prev_version +
   "), without interface text:")
 print(server + package + '.patch.gz')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I347891c3323f80a6ea19f63778fa733beb62322a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

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


[MediaWiki-commits] [Gerrit] mediawiki...ReadingLists[master]: Fix purge.php parameter handling

2018-01-12 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404049 )

Change subject: Fix purge.php parameter handling
..

Fix purge.php parameter handling

Bug: T181107
Change-Id: I417eb64c9d044250a88129b601ac784875ba2235
---
M maintenance/purge.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/maintenance/purge.php b/maintenance/purge.php
index 85e571b..da0e2a3 100644
--- a/maintenance/purge.php
+++ b/maintenance/purge.php
@@ -26,7 +26,7 @@
parent::__construct();
$this->addDescription(
'Purge unneeded database rows (deleted lists/entries or 
orphaned sortkeys).' );
-   $this->addOption( 'before', 'Purge deleted lists/entries before 
this timestamp', true, true );
+   $this->addOption( 'before', 'Purge deleted lists/entries before 
this timestamp', false, true );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I417eb64c9d044250a88129b601ac784875ba2235
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ReadingLists
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] integration/jenkins[master]: Revert "Add a note about mw debug file name"

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

Change subject: Revert "Add a note about mw debug file name"
..


Revert "Add a note about mw debug file name"

Sometime I am writing misleading comments :D

This reverts commit 9e5d751d5b19b60a6981593fce7a3f20a1120ef3.

Change-Id: I4b3df68efe8326b0ba259269229c96d873556e70
---
M mediawiki/conf.d/00_dev_settings.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/mediawiki/conf.d/00_dev_settings.php 
b/mediawiki/conf.d/00_dev_settings.php
index 8a8b59c..edb2883 100644
--- a/mediawiki/conf.d/00_dev_settings.php
+++ b/mediawiki/conf.d/00_dev_settings.php
@@ -32,7 +32,6 @@
 $wgDebugRawPage = true; // bug 47960
 
 // Debugging: Logging
-// Files must follow the pattern mw-*.log we then assert they are empty
 if ( $wgCommandLineMode ) {
$wgDebugLogFile = "$wmgMwLogDir/mw-debug-cli.log";
 } else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b3df68efe8326b0ba259269229c96d873556e70
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: OOjs UI: Fix z-index and font size for default overlay

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

Change subject: OOjs UI: Fix z-index and font size for default overlay
..

OOjs UI: Fix z-index and font size for default overlay

OOUI dropdown menus should appear on top of the fixed header
and their font size should match the body text.

For example, on Special:MovePage:
* Before: https://phabricator.wikimedia.org/F12517634
* After:  https://phabricator.wikimedia.org/F12517632

Bug: T183069
Change-Id: I291d852f49507e58082ac95e59cb115170aa809a
---
A resources/ooui.less
M skin.json
2 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/48/404048/1

diff --git a/resources/ooui.less b/resources/ooui.less
new file mode 100644
index 000..efa2c96
--- /dev/null
+++ b/resources/ooui.less
@@ -0,0 +1,4 @@
+.oo-ui-defaultOverlay {
+   z-index: 101;
+   font-size: 0.95em;
+}
diff --git a/skin.json b/skin.json
index 525ee10..cb2e151 100644
--- a/skin.json
+++ b/skin.json
@@ -80,6 +80,7 @@
},
"ResourceModuleSkinStyles": {
"timeless": {
+   "+oojs-ui-core.styles": "resources/ooui.less",
"+ext.echo.styles.badge": 
"resources/extensions/Echo.less",
"+ext.visualEditor.core": 
"resources/extensions/VisualEditor.core.less",
"+ext.visualEditor.desktopArticleTarget.noscript": 
"resources/extensions/VisualEditor.article.less"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I291d852f49507e58082ac95e59cb115170aa809a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add edit tags to list=watchlist

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

Change subject: Add edit tags to list=watchlist
..


Add edit tags to list=watchlist

It is using the same query as list=recentchanges by left joining
tag_summary

Bug: T181975
Change-Id: I9e9ab9753ec0f813e9e555106cc81fd15ad9fb4a
---
M includes/api/ApiQueryWatchlist.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
M includes/watcheditem/WatchedItemQueryService.php
4 files changed, 29 insertions(+), 1 deletion(-)

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



diff --git a/includes/api/ApiQueryWatchlist.php 
b/includes/api/ApiQueryWatchlist.php
index 1e3b2c7..710550a 100644
--- a/includes/api/ApiQueryWatchlist.php
+++ b/includes/api/ApiQueryWatchlist.php
@@ -53,7 +53,7 @@
$fld_flags = false, $fld_timestamp = false, $fld_user = false,
$fld_comment = false, $fld_parsedcomment = false, $fld_sizes = 
false,
$fld_notificationtimestamp = false, $fld_userid = false,
-   $fld_loginfo = false;
+   $fld_loginfo = false, $fld_tags;
 
/**
 * @param ApiPageSet $resultPageSet
@@ -82,6 +82,7 @@
$this->fld_patrol = isset( $prop['patrol'] );
$this->fld_notificationtimestamp = isset( 
$prop['notificationtimestamp'] );
$this->fld_loginfo = isset( $prop['loginfo'] );
+   $this->fld_tags = isset( $prop['tags'] );
 
if ( $this->fld_patrol ) {
if ( !$user->useRCPatrol() && 
!$user->useNPPatrol() ) {
@@ -243,6 +244,9 @@
if ( $this->fld_loginfo ) {
$includeFields[] = 
WatchedItemQueryService::INCLUDE_LOG_INFO;
}
+   if ( $this->fld_tags ) {
+   $includeFields[] = 
WatchedItemQueryService::INCLUDE_TAGS;
+   }
return $includeFields;
}
 
@@ -391,6 +395,16 @@
}
}
 
+   if ( $this->fld_tags ) {
+   if ( $recentChangeInfo['rc_tags'] ) {
+   $tags = explode( ',', 
$recentChangeInfo['rc_tags'] );
+   ApiResult::setIndexedTagName( $tags, 'tag' );
+   $vals['tags'] = $tags;
+   } else {
+   $vals['tags'] = [];
+   }
+   }
+
if ( $anyHidden && ( $recentChangeInfo['rc_deleted'] & 
Revision::DELETED_RESTRICTED ) ) {
$vals['suppressed'] = true;
}
@@ -453,6 +467,7 @@
'sizes',
'notificationtimestamp',
'loginfo',
+   'tags',
]
],
'show' => [
diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index cceed01..a897f06 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -1331,6 +1331,7 @@
"apihelp-query+watchlist-paramvalue-prop-sizes": "Adds the old and new 
lengths of the page.",
"apihelp-query+watchlist-paramvalue-prop-notificationtimestamp": "Adds 
timestamp of when the user was last notified about the edit.",
"apihelp-query+watchlist-paramvalue-prop-loginfo": "Adds log 
information where appropriate.",
+   "apihelp-query+watchlist-paramvalue-prop-tags": "Lists tags for the 
entry.",
"apihelp-query+watchlist-param-show": "Show only items that meet these 
criteria. For example, to see only minor edits done by logged-in users, set 
$1show=minor|!anon.",
"apihelp-query+watchlist-param-type": "Which types of changes to show:",
"apihelp-query+watchlist-paramvalue-type-edit": "Regular page edits.",
diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json
index d21f29c..1e4bfc8 100644
--- a/includes/api/i18n/qqq.json
+++ b/includes/api/i18n/qqq.json
@@ -1245,6 +1245,7 @@
"apihelp-query+watchlist-paramvalue-prop-sizes": 
"{{doc-apihelp-paramvalue|query+watchlist|prop|sizes}}",
"apihelp-query+watchlist-paramvalue-prop-notificationtimestamp": 
"{{doc-apihelp-paramvalue|query+watchlist|prop|notificationtimestamp}}",
"apihelp-query+watchlist-paramvalue-prop-loginfo": 
"{{doc-apihelp-paramvalue|query+watchlist|prop|loginfo}}",
+   "apihelp-query+watchlist-paramvalue-prop-tags": 
"{{doc-apihelp-paramvalue|query+watchlist|prop|tags}}",
"apihelp-query+watchlist-param-show": 
"{{doc-apihelp-param|query+watchlist|show}}",
"apihelp-query+watchlist-param-type": 
"{{doc-apihelp-param|query+watchlist|type}}",

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ApiSandbox: Use OO.ui.getDefaultOverlay()

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

Change subject: ApiSandbox: Use OO.ui.getDefaultOverlay()
..


ApiSandbox: Use OO.ui.getDefaultOverlay()

Mostly via the shortcut of passing true to the '$overlay' parameter.

Also use it instead of  as the container for fullscreen mode, so
we don't have to worry about different z indexes to not go over the
default overlay in different skins.

And rename our OptionalWidget's "$overlay" parameter to "$cover" since
it's not an overlay in the sense that OOUI uses that term.

Bug: T184790
Change-Id: Ia65400f4c8c5e0f44cdb30e09c854fa38590e39d
---
M resources/src/mediawiki.special/mediawiki.special.apisandbox.css
M resources/src/mediawiki.special/mediawiki.special.apisandbox.js
2 files changed, 18 insertions(+), 19 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, but someone else must approve



diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.css 
b/resources/src/mediawiki.special/mediawiki.special.apisandbox.css
index 928fa17..acb3998 100644
--- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.css
+++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.css
@@ -24,7 +24,6 @@
bottom: 0;
right: 0;
background: #fff;
-   z-index: 100;
 }
 
 .mw-apisandbox-fullscreen .mw-apisandbox-container {
@@ -52,10 +51,10 @@
 
 .mw-apisandbox-optionalWidget.oo-ui-widget-disabled {
position: relative;
-   z-index: 0; /* New stacking context to prevent the overlay from leaking 
out */
+   z-index: 0; /* New stacking context to prevent the cover from leaking 
out */
 }
 
-.mw-apisandbox-optionalWidget-overlay {
+.mw-apisandbox-optionalWidget-cover {
position: absolute;
left: 0;
right: 0;
diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js 
b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
index a6450e9..7ceb9e6 100644
--- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
+++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
@@ -339,7 +339,7 @@
widget = new 
OO.ui.CapsuleMultiselectWidget( {
allowArbitrary: true,
allowDuplicates: 
Util.apiBool( pi.allowsduplicates ),
-   $overlay: $( 
'#mw-apisandbox-ui' )
+   $overlay: true
} );
widget.paramInfo = pi;
$.extend( widget, 
WidgetMethods.capsuleWidget );
@@ -459,14 +459,14 @@
 
widget = new 
OO.ui.CapsuleMultiselectWidget( {
menu: { items: items },
-   $overlay: $( 
'#mw-apisandbox-ui' )
+   $overlay: true
} );
widget.paramInfo = pi;
$.extend( widget, 
WidgetMethods.capsuleWidget );
} else {
widget = new 
OO.ui.DropdownWidget( {
menu: { items: items },
-   $overlay: $( 
'#mw-apisandbox-ui' )
+   $overlay: true
} );
widget.paramInfo = pi;
$.extend( widget, 
WidgetMethods.dropdownWidget );
@@ -499,7 +499,7 @@
 
widget = new 
OO.ui.CapsuleMultiselectWidget( {
menu: { items: items },
-   $overlay: $( 
'#mw-apisandbox-ui' )
+   $overlay: true
} );
widget.paramInfo = pi;
$.extend( widget, 
WidgetMethods.capsuleWidget );
@@ -510,7 +510,7 @@
} else {
widget = new 
OO.ui.DropdownWidget( {
menu: { items: items },
- 

[MediaWiki-commits] [Gerrit] integration/jenkins[master]: Revert "Add a note about mw debug file name"

2018-01-12 Thread Hashar (Code Review)
Hello Paladox, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "Add a note about mw debug file name"
..

Revert "Add a note about mw debug file name"

Sometime I am writing misleading comments :D

This reverts commit 9e5d751d5b19b60a6981593fce7a3f20a1120ef3.

Change-Id: I4b3df68efe8326b0ba259269229c96d873556e70
---
M mediawiki/conf.d/00_dev_settings.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/47/404047/1

diff --git a/mediawiki/conf.d/00_dev_settings.php 
b/mediawiki/conf.d/00_dev_settings.php
index 8a8b59c..edb2883 100644
--- a/mediawiki/conf.d/00_dev_settings.php
+++ b/mediawiki/conf.d/00_dev_settings.php
@@ -32,7 +32,6 @@
 $wgDebugRawPage = true; // bug 47960
 
 // Debugging: Logging
-// Files must follow the pattern mw-*.log we then assert they are empty
 if ( $wgCommandLineMode ) {
$wgDebugLogFile = "$wmgMwLogDir/mw-debug-cli.log";
 } else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b3df68efe8326b0ba259269229c96d873556e70
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: SpecialProtectedtitles: Use 'comma-separator' instead of har...

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

Change subject: SpecialProtectedtitles: Use 'comma-separator' instead of 
hardcoded comma
..


SpecialProtectedtitles: Use 'comma-separator' instead of hardcoded comma

Also simplify the code.

Change-Id: Ib3914b618ba3a7f1fd3e9df5527653a28c3e4ef9
---
M includes/specials/SpecialProtectedtitles.php
1 file changed, 3 insertions(+), 6 deletions(-)

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



diff --git a/includes/specials/SpecialProtectedtitles.php 
b/includes/specials/SpecialProtectedtitles.php
index fa9033c..af2b81f 100644
--- a/includes/specials/SpecialProtectedtitles.php
+++ b/includes/specials/SpecialProtectedtitles.php
@@ -85,10 +85,8 @@
}
 
$link = $this->getLinkRenderer()->makeLink( $title );
-   $description_items = [];
// Messages: restriction-level-sysop, 
restriction-level-autoconfirmed
-   $protType = $this->msg( 'restriction-level-' . 
$row->pt_create_perm )->escaped();
-   $description_items[] = $protType;
+   $description = $this->msg( 'restriction-level-' . 
$row->pt_create_perm )->escaped();
$lang = $this->getLanguage();
$expiry = strlen( $row->pt_expiry ) ?
$lang->formatExpiry( $row->pt_expiry, TS_MW ) :
@@ -96,7 +94,7 @@
 
if ( $expiry !== 'infinity' ) {
$user = $this->getUser();
-   $description_items[] = $this->msg(
+   $description .= $this->msg( 'comma-separator' 
)->escaped() . $this->msg(
'protect-expiring-local',
$lang->userTimeAndDate( $expiry, $user ),
$lang->userDate( $expiry, $user ),
@@ -104,8 +102,7 @@
)->escaped();
}
 
-   // @todo i18n: This should use a comma separator instead of a 
hard coded comma, right?
-   return '' . $lang->specialList( $link, implode( 
$description_items, ', ' ) ) . "\n";
+   return '' . $lang->specialList( $link, $description ) . 
"\n";
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3914b618ba3a7f1fd3e9df5527653a28c3e4ef9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: SpecialProtectedpages: Remove options not used by HTMLForm

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

Change subject: SpecialProtectedpages: Remove options not used by HTMLForm
..


SpecialProtectedpages: Remove options not used by HTMLForm

HTMLForm gets the selected value from the request. The values
specified in the form descriptor were never used. (You can specify a
default value, but that uses the 'default' key anyway.)

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

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



diff --git a/includes/specials/SpecialProtectedpages.php 
b/includes/specials/SpecialProtectedpages.php
index 2ef9eaf..ac34996 100644
--- a/includes/specials/SpecialProtectedpages.php
+++ b/includes/specials/SpecialProtectedpages.php
@@ -101,7 +101,6 @@
'name' => 'namespace',
'id' => 'namespace',
'cssclass' => 'namespaceselector',
-   'selected' => $namespace,
'all' => '',
'label' => $this->msg( 'namespace' )->text(),
],
@@ -112,21 +111,18 @@
'label' => $this->msg( 'protectedpages-indef' 
)->text(),
'name' => 'indefonly',
'id' => 'indefonly',
-   'value' => $indefOnly
],
'cascadecheck' => [
'type' => 'check',
'label' => $this->msg( 'protectedpages-cascade' 
)->text(),
'name' => 'cascadeonly',
'id' => 'cascadeonly',
-   'value' => $cascadeOnly
],
'redirectcheck' => [
'type' => 'check',
'label' => $this->msg( 
'protectedpages-noredirect' )->text(),
'name' => 'noredirect',
'id' => 'noredirect',
-   'value' => $noRedirect,
],
'sizelimit' => [
'class' => 'HTMLSizeFilterField',
@@ -166,7 +162,6 @@
return [
'type' => 'select',
'options' => $options,
-   'value' => $pr_type,
'label' => $this->msg( 'restriction-type' )->text(),
'name' => $this->IdType,
'id' => $this->IdType,
@@ -200,7 +195,6 @@
return [
'type' => 'select',
'options' => $options,
-   'value' => $pr_level,
'label' => $this->msg( 'restriction-level' )->text(),
'name' => $this->IdLevel,
'id' => $this->IdLevel

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I095ee004cbe74470f33c72b391b22dd4395bff6e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: webperf: Introduce 'templates' in test fixture and use for m...

2018-01-12 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404046 )

Change subject: webperf: Introduce 'templates' in test fixture and use for 
mwload
..

webperf: Introduce 'templates' in test fixture and use for mwload

* Create a 'templates' key in the fixture that the test runner
  ignores.

* Move the existing 'expected_uncached_desktop' list there.

* Abstract another template list for 'expected_uncached_desktop_mwload'
  that is also used by the non-navtiming test.

* Add 'flatten()' utility method given the ref/merge ref/extend syntax
  only works for key-value objects (dict) in YAML, not for sequences (list).

Change-Id: Ib43ab6a2d21c3148a4ce8954cc81166ebc2c0237
---
M modules/webperf/files/navtiming_fixture.yaml
M modules/webperf/files/navtiming_test.py
2 files changed, 160 insertions(+), 156 deletions(-)


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

diff --git a/modules/webperf/files/navtiming_fixture.yaml 
b/modules/webperf/files/navtiming_fixture.yaml
index 494a6eb..8b56c54 100644
--- a/modules/webperf/files/navtiming_fixture.yaml
+++ b/modules/webperf/files/navtiming_fixture.yaml
@@ -14,148 +14,153 @@
 # - webHost: example
 # - wiki: example
 
+templates:
+  - _uncached_desktop_mwload
+- frontend.navtiming.mediaWikiLoadComplete.desktop.authenticated:1270|ms
+- frontend.navtiming.mediaWikiLoadComplete.desktop.overall:1270|ms
+- frontend.navtiming.mediaWikiLoadComplete.overall:1270|ms
+- frontend.navtiming.mediaWikiLoadComplete.by_browser.Firefox.55:1270|ms
+- frontend.navtiming.mediaWikiLoadComplete.by_browser.Firefox.all:1270|ms
+- frontend.navtiming.mediaWikiLoadComplete.by_continent.Europe:1270|ms
+- frontend.navtiming2.mediaWikiLoad.desktop.authenticated:1270|ms
+- frontend.navtiming2.mediaWikiLoad.desktop.overall:1270|ms
+- frontend.navtiming2.mediaWikiLoad.overall:1270|ms
+- frontend.navtiming2.mediaWikiLoad.by_browser.Firefox.55:1270|ms
+- frontend.navtiming2.mediaWikiLoad.by_browser.Firefox.all:1270|ms
+- frontend.navtiming2.mediaWikiLoad.by_continent.Europe:1270|ms
+  - _uncached_desktop
+- frontend.navtiming.loadEventStart.desktop.authenticated:1965|ms
+- frontend.navtiming.loadEventStart.desktop.overall:1965|ms
+- frontend.navtiming.loadEventStart.overall:1965|ms
+- frontend.navtiming.loadEventStart.by_browser.Firefox.55:1965|ms
+- frontend.navtiming.loadEventStart.by_browser.Firefox.all:1965|ms
+- frontend.navtiming.loadEventStart.by_continent.Europe:1965|ms
+- frontend.navtiming.dnsLookup.desktop.authenticated:1|ms
+- frontend.navtiming.dnsLookup.desktop.overall:1|ms
+- frontend.navtiming.dnsLookup.overall:1|ms
+- frontend.navtiming.dnsLookup.by_browser.Firefox.55:1|ms
+- frontend.navtiming.dnsLookup.by_browser.Firefox.all:1|ms
+- frontend.navtiming.dnsLookup.by_continent.Europe:1|ms
+- frontend.navtiming.loadEventEnd.desktop.authenticated:1968|ms
+- frontend.navtiming.loadEventEnd.desktop.overall:1968|ms
+- frontend.navtiming.loadEventEnd.overall:1968|ms
+- frontend.navtiming.loadEventEnd.by_browser.Firefox.55:1968|ms
+- frontend.navtiming.loadEventEnd.by_browser.Firefox.all:1968|ms
+- frontend.navtiming.loadEventEnd.by_continent.Europe:1968|ms
+- frontend.navtiming.waiting.desktop.authenticated:374|ms
+- frontend.navtiming.waiting.desktop.overall:374|ms
+- frontend.navtiming.waiting.overall:374|ms
+- frontend.navtiming.waiting.by_browser.Firefox.55:374|ms
+- frontend.navtiming.waiting.by_browser.Firefox.all:374|ms
+- frontend.navtiming.waiting.by_continent.Europe:374|ms
+- frontend.navtiming.connecting.by_continent.Europe:0|ms
+- frontend.navtiming.fetchStart.desktop.authenticated:1|ms
+- frontend.navtiming.fetchStart.desktop.overall:1|ms
+- frontend.navtiming.fetchStart.overall:1|ms
+- frontend.navtiming.fetchStart.by_browser.Firefox.55:1|ms
+- frontend.navtiming.fetchStart.by_browser.Firefox.all:1|ms
+- frontend.navtiming.fetchStart.by_continent.Europe:1|ms
+- frontend.navtiming.domComplete.desktop.authenticated:1965|ms
+- frontend.navtiming.domComplete.desktop.overall:1965|ms
+- frontend.navtiming.domComplete.overall:1965|ms
+- frontend.navtiming.domComplete.by_browser.Firefox.55:1965|ms
+- frontend.navtiming.domComplete.by_browser.Firefox.all:1965|ms
+- frontend.navtiming.domComplete.by_continent.Europe:1965|ms
+- frontend.navtiming.receiving.desktop.authenticated:35|ms
+- frontend.navtiming.receiving.desktop.overall:35|ms
+- frontend.navtiming.receiving.overall:35|ms
+- frontend.navtiming.receiving.by_browser.Firefox.55:35|ms
+- frontend.navtiming.receiving.by_browser.Firefox.all:35|ms
+- frontend.navtiming.receiving.by_continent.Europe:35|ms
+- frontend.navtiming.responseStart.desktop.authenticated:380|ms
+- 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: webperf: Re-use expected result by reference to simplify fix...

2018-01-12 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404045 )

Change subject: webperf: Re-use expected result by reference to simplify fixture
..

webperf: Re-use expected result by reference to simplify fixture

This makes it easier to review the fixture by knowing the addition
of isOversample=false produced the same output as without that key.

Change-Id: Ic7057f1818f3a25528b0cbd5da953c0e539b6cb4
---
M modules/webperf/files/navtiming_fixture.yaml
1 file changed, 2 insertions(+), 141 deletions(-)


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

diff --git a/modules/webperf/files/navtiming_fixture.yaml 
b/modules/webperf/files/navtiming_fixture.yaml
index 867cc13..494a6eb 100644
--- a/modules/webperf/files/navtiming_fixture.yaml
+++ b/modules/webperf/files/navtiming_fixture.yaml
@@ -16,7 +16,7 @@
 
 Uncached page view from desktop:
  input: {"event": {"action": "history", "connectEnd": 6, "connectStart": 6, 
"dnsLookup": 1, "domComplete": 1965, "domInteractive": 956, "fetchStart": 1, 
"isAnon": false, "isHiDPI": false, "isHttp2": true, "loadEventEnd": 1968, 
"loadEventStart": 1965, "mediaWikiLoadComplete": 1270, "mediaWikiVersion": 
"1.30.0-wmf.19", "namespaceId": 1, "originCountry": "RS", "originRegion": "VO", 
"pageId": 1, "requestStart": 6, "responseEnd": 415, "responseStart": 380, 
"revId": 1, "unload": 4}, "recvFrom": "example", "revision": 1, "schema": 
"NavigationTiming", "seqId": 1, "timestamp": 1, "userAgent": "{\"os_minor\": 
null, \"is_bot\": false, \"os_major\": null, \"device_family\": \"Other\", 
\"os_family\": \"Windows 8.1\", \"browser_minor\": \"0\", \"wmf_app_version\": 
\"-\", \"browser_major\": \"55\", \"browser_family\": \"Firefox\", 
\"is_mediawiki\": false}", "uuid": "example", "webHost": "example", "wiki": 
"example"}
- expect:
+ expect: _uncached_desktop
   - frontend.navtiming.loadEventStart.desktop.authenticated:1965|ms
   - frontend.navtiming.loadEventStart.desktop.overall:1965|ms
   - frontend.navtiming.loadEventStart.overall:1965|ms
@@ -620,146 +620,7 @@
 
 Uncached page view from desktop that includes isOversample=false:
  input: {"event": {"action": "history", "connectEnd": 6, "connectStart": 6, 
"dnsLookup": 1, "domComplete": 1965, "domInteractive": 956, "fetchStart": 1, 
"isAnon": false, "isHiDPI": false, "isHttp2": true, "isOversample": false, 
"loadEventEnd": 1968, "loadEventStart": 1965, "mediaWikiLoadComplete": 1270, 
"mediaWikiVersion": "1.30.0-wmf.19", "namespaceId": 1, "originCountry": "RS", 
"originRegion": "VO", "pageId": 1, "requestStart": 6, "responseEnd": 415, 
"responseStart": 380, "revId": 1, "unload": 4}, "recvFrom": "example", 
"revision": 1, "schema": "NavigationTiming", "seqId": 1, "timestamp": 1, 
"userAgent": "{\"os_minor\": null, \"is_bot\": false, \"os_major\": null, 
\"device_family\": \"Other\", \"os_family\": \"Windows 8.1\", 
\"browser_minor\": \"0\", \"wmf_app_version\": \"-\", \"browser_major\": 
\"55\", \"browser_family\": \"Firefox\", \"is_mediawiki\": false}", "uuid": 
"example", "webHost": "example", "wiki": "example"}
- expect:
-  - frontend.navtiming.loadEventStart.desktop.authenticated:1965|ms
-  - frontend.navtiming.loadEventStart.desktop.overall:1965|ms
-  - frontend.navtiming.loadEventStart.overall:1965|ms
-  - frontend.navtiming.loadEventStart.by_browser.Firefox.55:1965|ms
-  - frontend.navtiming.loadEventStart.by_browser.Firefox.all:1965|ms
-  - frontend.navtiming.loadEventStart.by_continent.Europe:1965|ms
-  - frontend.navtiming.dnsLookup.desktop.authenticated:1|ms
-  - frontend.navtiming.dnsLookup.desktop.overall:1|ms
-  - frontend.navtiming.dnsLookup.overall:1|ms
-  - frontend.navtiming.dnsLookup.by_browser.Firefox.55:1|ms
-  - frontend.navtiming.dnsLookup.by_browser.Firefox.all:1|ms
-  - frontend.navtiming.dnsLookup.by_continent.Europe:1|ms
-  - frontend.navtiming.mediaWikiLoadComplete.desktop.authenticated:1270|ms
-  - frontend.navtiming.mediaWikiLoadComplete.desktop.overall:1270|ms
-  - frontend.navtiming.mediaWikiLoadComplete.overall:1270|ms
-  - frontend.navtiming.mediaWikiLoadComplete.by_browser.Firefox.55:1270|ms
-  - frontend.navtiming.mediaWikiLoadComplete.by_browser.Firefox.all:1270|ms
-  - frontend.navtiming.mediaWikiLoadComplete.by_continent.Europe:1270|ms
-  - frontend.navtiming.loadEventEnd.desktop.authenticated:1968|ms
-  - frontend.navtiming.loadEventEnd.desktop.overall:1968|ms
-  - frontend.navtiming.loadEventEnd.overall:1968|ms
-  - frontend.navtiming.loadEventEnd.by_browser.Firefox.55:1968|ms
-  - frontend.navtiming.loadEventEnd.by_browser.Firefox.all:1968|ms
-  - frontend.navtiming.loadEventEnd.by_continent.Europe:1968|ms
-  - frontend.navtiming.waiting.desktop.authenticated:374|ms
-  - frontend.navtiming.waiting.desktop.overall:374|ms
-  - frontend.navtiming.waiting.overall:374|ms
-  - frontend.navtiming.waiting.by_browser.Firefox.55:374|ms
-  - 

[MediaWiki-commits] [Gerrit] mediawiki...release[master]: makerelease: Fix up return on all code paths, pylint complains

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

Change subject: makerelease: Fix up return on all code paths, pylint complains
..


makerelease: Fix up return on all code paths, pylint complains

Change-Id: I65d743441ee29a4fc05347c9ba3d1092fb0b5eff
---
M make-release/makerelease.py
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 3e09433..0186724 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -408,15 +408,18 @@
 if self.options.yes:
 return True
 
+result = False
 while True:
 print(question + ' [y/n] ')
 response = sys.stdin.readline()
 if response:
 if response[0].lower() == 'y':
-return True
+result = True
+break
 elif response[0].lower() == 'n':
-return False
+break
 print('Please type "y" for yes or "n" for no')
+return result
 
 def export(self, git_ref, export_dir, patches=None):
 if patches:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: makerelease: Fix up return on all code paths, pylint complains

2018-01-12 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404044 )

Change subject: makerelease: Fix up return on all code paths, pylint complains
..

makerelease: Fix up return on all code paths, pylint complains

Change-Id: I65d743441ee29a4fc05347c9ba3d1092fb0b5eff
---
M make-release/makerelease.py
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 3e09433..0186724 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -408,15 +408,18 @@
 if self.options.yes:
 return True
 
+result = False
 while True:
 print(question + ' [y/n] ')
 response = sys.stdin.readline()
 if response:
 if response[0].lower() == 'y':
-return True
+result = True
+break
 elif response[0].lower() == 'n':
-return False
+break
 print('Please type "y" for yes or "n" for no')
+return result
 
 def export(self, git_ref, export_dir, patches=None):
 if patches:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65d743441ee29a4fc05347c9ba3d1092fb0b5eff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: release: move get_git() to function, fix up export_dir

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

Change subject: release: move get_git() to function, fix up export_dir
..


release: move get_git() to function, fix up export_dir

Change-Id: If2465d382e291c45ba32b1ced771ce753947cee8
---
M make-release/makerelease.py
1 file changed, 37 insertions(+), 38 deletions(-)

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



diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 9b77938..3e09433 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -128,6 +128,40 @@
 os.chdir(old_dir)
 
 
+def get_git(target, git_ref):
+"""Clone core"""
+old_dir = os.getcwd()
+
+if os.path.exists(target):
+logging.info('Updating core in %s...', target)
+proc = subprocess.Popen(
+['sh', '-c', 'cd ' + target + '; git fetch -q --all'])
+else:
+logging.info('Cloning core into %s...', target)
+repo = 'https://gerrit.wikimedia.org/r/p/mediawiki/core'
+proc = subprocess.Popen(['git', 'clone', '--recursive', repo, target])
+
+if proc.wait() != 0:
+raise RuntimeError('git clone failed')
+
+os.chdir(target)
+
+logging.debug("Checking out %s in %s...", git_ref, target)
+proc = subprocess.Popen(['git', 'checkout', git_ref])
+
+if proc.wait() != 0:
+raise RuntimeError('git checkout failed')
+
+logging.debug("Checking out submodules in %s...", target)
+proc = subprocess.Popen(['git', 'submodule', 'update', '--init',
+ '--recursive'])
+
+if proc.wait() != 0:
+raise RuntimeError('git submodule update failed, exiting')
+
+os.chdir(old_dir)
+
+
 class MwVersion(object):
 """Abstract out a MediaWiki version"""
 
@@ -384,45 +418,10 @@
 return False
 print('Please type "y" for yes or "n" for no')
 
-def get_git(self, repo, target, git_ref):
-old_dir = os.getcwd()
-
-if os.path.exists(target):
-logging.info("Updating %s in %s...", repo, target)
-proc = subprocess.Popen(
-['sh', '-c', 'cd ' + target + '; git fetch -q --all'])
-else:
-logging.info("Cloning %s into %s...", repo, target)
-repo = 'https://gerrit.wikimedia.org/r/p/mediawiki/' + repo
-proc = subprocess.Popen(['git', 'clone', '--recursive', repo, 
target])
-
-if proc.wait() != 0:
-logging.error("git clone failed, exiting")
-sys.exit(1)
-
-os.chdir(target)
-
-logging.debug("Checking out %s in %s...", git_ref, target)
-proc = subprocess.Popen(['git', 'checkout', git_ref])
-
-if proc.wait() != 0:
-logging.error("git checkout failed, exiting")
-sys.exit(1)
-
-logging.debug("Checking out submodules in %s...", target)
-proc = subprocess.Popen(['git', 'submodule', 'update', '--init',
- '--recursive'])
-
-if proc.wait() != 0:
-logging.error("git submodule update failed, exiting")
-sys.exit(1)
-
-os.chdir(old_dir)
-
-def export(self, git_ref, module, export_dir, patches=None):
+def export(self, git_ref, export_dir, patches=None):
 if patches:
 git_ref = self.version.branch
-self.get_git('core', os.path.join(export_dir, module), git_ref)
+get_git(export_dir, git_ref)
 maybe_apply_patches(export_dir, patches)
 
 def make_patch(self, dest_dir, patch_file_name, dir1, dir2, patch_type):
@@ -505,7 +504,7 @@
 package = 'mediawiki-' + version.raw
 
 # Export the target
-self.export(tag, package, build_dir,
+self.export(tag, os.path.join(build_dir, package),
 get_patches_for_repo(patch_dir, 'core', version.branch))
 
 os.chdir(os.path.join(build_dir, package))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2465d382e291c45ba32b1ced771ce753947cee8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add unit test for NewsletterDb::getNewsletterSubscribersCount

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

Change subject: Add unit test for NewsletterDb::getNewsletterSubscribersCount
..


Add unit test for NewsletterDb::getNewsletterSubscribersCount

Bug: T183808
Depends-on: I413ee3d9bca3b5b20982f460621071027f399415
Change-Id: I65ad46213f747a992a9f0094c2fde2a964bcb0ef
---
M tests/NewsletterDbTest.php
1 file changed, 64 insertions(+), 0 deletions(-)

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



diff --git a/tests/NewsletterDbTest.php b/tests/NewsletterDbTest.php
index e7b1a34..007e23c 100644
--- a/tests/NewsletterDbTest.php
+++ b/tests/NewsletterDbTest.php
@@ -114,6 +114,70 @@
}
 
/**
+* @covers NewsletterDb::getNewsletterSubscribersCount
+*/
+   public function testGetSubscribersCount() {
+   $mockWriteDb = $this->getMockIDatabase();
+   $newsletter = $this->getTestNewsletter();
+   $firstUser = User::newFromName( 'TestUser1' );
+   $secondUser = User::newFromName( 'TestUser2' );
+   $firstUser->addToDatabase();
+   $secondUser->addToDatabase();
+
+   $mockWriteDb
+   ->expects( $this->once() )
+   ->method( 'insert' )
+   ->with(
+   'nl_subscriptions',
+   [
+   [
+   'nls_subscriber_id' => 
$firstUser->getId(),
+   'nls_newsletter_id' => 
$newsletter->getId()
+   ],
+   [
+   'nls_subscriber_id' => 
$secondUser->getId(),
+   'nls_newsletter_id' => 
$newsletter->getId()
+   ]
+   ]
+   );
+   $mockWriteDb->expects( $this->once() )
+   ->method( 'affectedRows' )
+   ->will( $this->returnValue( 2 ) );
+   $mockWriteDb
+   ->expects( $this->once() )
+   ->method( 'update' )
+   ->with(
+   'nl_newsletters',
+   // For index reasons, count is negative
+   [ 'nl_subscriber_count=nl_subscriber_count-2' ],
+   [ 'nl_id' => $newsletter->getId() ]
+   );
+   $mockWriteDb
+   ->expects( $this->once() )
+   ->method( 'selectField' )
+   ->with(
+   'nl_newsletters',
+   'nl_subscriber_count',
+   [ 'nl_id' => $newsletter->getId() ]
+   )->will(
+   // For index reasons, count is negative
+   $this->returnValue( -2 )
+   );
+
+   $table = new NewsletterDb( $this->getMockLoadBalancer( 
$mockWriteDb ) );
+
+   // Add two subscribers before checking subscribers count
+   $result = $table->addSubscription( $this->getTestNewsletter(), [
+   $firstUser->getId(),
+   $secondUser->getId()
+   ] );
+   $this->assertTrue( $result );
+
+   $result = $table->getNewsletterSubscribersCount( 
$newsletter->getId() );
+   $this->assertEquals( 2, $result );
+   }
+
+   /**
 * @covers NewsletterDb::addPublisher
 */
public function testAddPublisher() {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: releases: use os.path.join() in a few places

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

Change subject: releases: use os.path.join() in a few places
..


releases: use os.path.join() in a few places

Change-Id: I62da850f7a84184b580b43b41192a0944526e9ec
---
M make-release/makerelease.py
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 262f524..9b77938 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -426,12 +426,12 @@
 maybe_apply_patches(export_dir, patches)
 
 def make_patch(self, dest_dir, patch_file_name, dir1, dir2, patch_type):
-patch_file = open(dest_dir + "/" + patch_file_name, 'w')
+patch_file = open(os.path.join(dest_dir, patch_file_name), 'w')
 args = ['diff', '-Nruw']
 if patch_type == 'i18n':
 logging.debug("Generating i18n patch file...")
-dir1 += '/languages/messages'
-dir2 += '/languages/messages'
+dir1 = os.path.join(dir1, 'languages', 'messages')
+dir1 = os.path.join(dir2, 'languages', 'messages')
 else:
 logging.debug("Generating normal patch file...")
 for excl in self.config['diff']['ignore']:
@@ -460,7 +460,7 @@
 
 # Generate the .tar.gz file
 filename = package + '.tar.gz'
-out_file = open(build_dir + '/' + filename, "w")
+out_file = open(os.path.join(build_dir, filename), "w")
 args = [tar, '--format=gnu', '--exclude-vcs', '-C', build_dir]
 if self.config.get('tar', {}).get('ignore', []):
 for patt in self.config['tar']['ignore']:
@@ -554,7 +554,7 @@
 build_dir, package + '.patch.gz', prev_dir, package, 'normal')
 out_files.append(package + '.patch.gz')
 logging.debug('%s.patch.gz written', package)
-if os.path.exists(package + '/languages/messages'):
+if os.path.exists(os.path.join(package, 'languages', 'messages')):
 i18n_patch = 'mediawiki-i18n-' + version.raw + '.patch.gz'
 if (self.make_patch(
 build_dir, i18n_patch, prev_dir, package, 'i18n')):
@@ -567,7 +567,7 @@
 if self.options.sign:
 try:
 proc = subprocess.Popen([
-'gpg', '--detach-sign', build_dir + '/' + file_name])
+'gpg', '--detach-sign', os.path.join(build_dir, 
file_name)])
 except OSError as ose:
 logging.error("gpg failed, does it exist? Skip with " +
   "--dont-sign.")

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62da850f7a84184b580b43b41192a0944526e9ec
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: releases: Unify root_dir/build_dir

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

Change subject: releases: Unify root_dir/build_dir
..


releases: Unify root_dir/build_dir

Since we don't put ./patches or ./upload into the build directory
anymore, the required ./build subdirectory is kind of silly. Only
do that if we're operating in the same directory as the actual
script cuz that would get ugly/messy

Change-Id: I372a16c9a95eba589fbc21dffbcb7c5362cc
---
M make-release/makerelease.py
1 file changed, 8 insertions(+), 9 deletions(-)

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



diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index e822d19..262f524 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -104,6 +104,9 @@
 :param branch: branch we care about patching
 :return: all patches that are appropriate
 """
+# Sometimes patch_dir isn't given!
+if patch_dir is None:
+return []
 patch_path_pattern = os.path.join(patch_dir, branch, repo, '*.patch')
 return sorted(glob.glob(patch_path_pattern))
 
@@ -479,7 +482,7 @@
 
 def do_release(self, version, extensions=None):
 
-root_dir = self.options.buildroot
+build_dir = self.options.buildroot
 patch_dir = self.options.patch_dir
 
 # variables related to the version
@@ -488,14 +491,10 @@
 prev_version = version.prev_version
 major_ver = version.major
 
-if root_dir is None:
-root_dir = os.getcwd()
-
-if not os.path.exists(root_dir):
-logging.debug('Creating %s', root_dir)
-os.mkdir(root_dir)
-
-build_dir = root_dir + '/build'
+# If we're operating in the same repo as this script, kindly make it
+# in a subdirectory to avoid polluting things
+if build_dir == os.path.dirname(os.path.abspath(__file__)):
+build_dir = os.path.join(build_dir, 'build')
 
 if not os.path.exists(build_dir):
 logging.debug('Creating build dir: %s', build_dir)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I372a16c9a95eba589fbc21dffbcb7c5362cc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Performance: Shortcut Language::truncate if there's no need ...

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

Change subject: Performance: Shortcut Language::truncate if there's no need to 
truncate
..


Performance: Shortcut Language::truncate if there's no need to truncate

Return the unmodified string if there's no need to truncate it without
doing a not-so-trivial round of getting a message from the message
cache.

Change-Id: I11ac88672aeb9d1c4f5709b79ad2d17223bd64d8
---
M languages/Language.php
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/languages/Language.php b/languages/Language.php
index fdf2d05..27c9faf 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -3489,15 +3489,16 @@
 * @return string
 */
function truncate( $string, $length, $ellipsis = '...', $adjustLength = 
true ) {
+   # Check if there is no need to truncate
+   if ( strlen( $string ) <= abs( $length ) ) {
+   return $string; // no need to truncate
+   }
# Use the localized ellipsis character
if ( $ellipsis == '...' ) {
$ellipsis = wfMessage( 'ellipsis' )->inLanguage( $this 
)->escaped();
}
-   # Check if there is no need to truncate
if ( $length == 0 ) {
return $ellipsis; // convention
-   } elseif ( strlen( $string ) <= abs( $length ) ) {
-   return $string; // no need to truncate
}
$stringOriginal = $string;
# If ellipsis length is >= $length then we can't apply 
$adjustLength

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I11ac88672aeb9d1c4f5709b79ad2d17223bd64d8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Martineznovo 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: releases: make patch_dir configurable (and only configurable)

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

Change subject: releases: make patch_dir configurable (and only configurable)
..


releases: make patch_dir configurable (and only configurable)

Change-Id: I4012ae5f6379a88d407d1cf05a6401ec1198047b
---
M make-release/.gitignore
M make-release/makerelease.py
2 files changed, 13 insertions(+), 8 deletions(-)

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



diff --git a/make-release/.gitignore b/make-release/.gitignore
index b08d6de..41730ff 100644
--- a/make-release/.gitignore
+++ b/make-release/.gitignore
@@ -1,3 +1,2 @@
 *.gz
 /build/
-/patches/
diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 173a8b3..e822d19 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -86,6 +86,10 @@
 action='store_true',
 help='List all bundled extensions for the given version and quit'
 )
+parser.add_argument(
+'--patch-dir', dest='patch_dir', default=None,
+help='Where to source patch files from'
+)
 
 return parser.parse_args()
 
@@ -476,6 +480,7 @@
 def do_release(self, version, extensions=None):
 
 root_dir = self.options.buildroot
+patch_dir = self.options.patch_dir
 
 # variables related to the version
 branch = version.branch
@@ -491,7 +496,6 @@
 os.mkdir(root_dir)
 
 build_dir = root_dir + '/build'
-patch_dir = root_dir + '/patches'
 
 if not os.path.exists(build_dir):
 logging.debug('Creating build dir: %s', build_dir)
@@ -507,15 +511,17 @@
 
 os.chdir(os.path.join(build_dir, package))
 subprocess.check_output(['composer', 'update', '--no-dev'])
-maybe_apply_patches(
-os.path.join(package, 'vendor'),
-get_patches_for_repo(patch_dir, 'vendor', version.branch))
+if patch_dir:
+maybe_apply_patches(
+os.path.join(package, 'vendor'),
+get_patches_for_repo(patch_dir, 'vendor', version.branch))
 
 ext_exclude = []
 for ext in self.get_extensions_for_version(version, extensions):
-maybe_apply_patches(
-os.path.join(package, ext),
-get_patches_for_repo(patch_dir, ext, version.branch))
+if patch_dir:
+maybe_apply_patches(
+os.path.join(package, ext),
+get_patches_for_repo(patch_dir, ext, version.branch))
 ext_exclude.append("--exclude")
 ext_exclude.append(ext)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4012ae5f6379a88d407d1cf05a6401ec1198047b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceEditNotifyConnector[master]: Use SPDX 3.0 license identifier

2018-01-12 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/401872 )

Change subject: Use SPDX 3.0 license identifier
..


Use SPDX 3.0 license identifier

SPDX released version 3 of their license list (),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: If6571354cfd42ac63324621984ab5c5aa6334273
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Umherirrender: Verified
  Ladsgroup: Looks good to me, approved
  Addshore: Looks good to me, approved
  Legoktm: Looks good to me, approved



diff --git a/extension.json b/extension.json
index 351bc15..2301623 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "BlueSpiceEditNotifyConnector",
-   "license-name": "GPL-3.0",
+   "license-name": "GPL-3.0-only",
"version": "3.0.0-alpha",
"url": 
"https://www.mediawiki.org/wiki/Extension:BlueSpiceEditNotifyConnector;,
"descriptionmsg": "bluespiceeditnotifyconnector-desc",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6571354cfd42ac63324621984ab5c5aa6334273
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceEditNotifyConnector
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ArticleFeedbackv5[master]: Use SPDX 3.0 license identifier

2018-01-12 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/401845 )

Change subject: Use SPDX 3.0 license identifier
..


Use SPDX 3.0 license identifier

SPDX released version 3 of their license list (),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: Ia9906a1ae32383559cf3c7448962e53e80fa4062
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Umherirrender: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved



diff --git a/extension.json b/extension.json
index cd8ff0a..dd8de97 100644
--- a/extension.json
+++ b/extension.json
@@ -18,7 +18,7 @@
"Matthias Mullie",
"Jack Phoenix"
],
-   "license-name": "GPL-2.0+",
+   "license-name": "GPL-2.0-or-later",
"requires": {
"MediaWiki": ">= 1.28.0"
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia9906a1ae32383559cf3c7448962e53e80fa4062
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove "Created on" from file header comments

2018-01-12 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403992 )

Change subject: Remove "Created on" from file header comments
..

Remove "Created on" from file header comments

It is the job of git and svn to provide this information/metadata.
The form was different, some with short, some with long month name
some with leading zero at the day, some without.
The year is also present in the Copyright clause

Change-Id: If006907b82b9e45f13cfa2e45d41107a95570e1a
---
M includes/MergeHistory.php
M includes/api/ApiBase.php
M includes/api/ApiBlock.php
M includes/api/ApiCheckToken.php
M includes/api/ApiClearHasMsg.php
M includes/api/ApiDelete.php
M includes/api/ApiDisabled.php
M includes/api/ApiEditPage.php
M includes/api/ApiEmailUser.php
M includes/api/ApiExpandTemplates.php
M includes/api/ApiFeedContributions.php
M includes/api/ApiFeedWatchlist.php
M includes/api/ApiFileRevert.php
M includes/api/ApiFormatBase.php
M includes/api/ApiFormatFeedWrapper.php
M includes/api/ApiFormatJson.php
M includes/api/ApiFormatNone.php
M includes/api/ApiFormatPhp.php
M includes/api/ApiFormatRaw.php
M includes/api/ApiFormatXml.php
M includes/api/ApiHelp.php
M includes/api/ApiHelpParamValueMessage.php
M includes/api/ApiImageRotate.php
M includes/api/ApiLogin.php
M includes/api/ApiLogout.php
M includes/api/ApiMain.php
M includes/api/ApiMergeHistory.php
M includes/api/ApiModuleManager.php
M includes/api/ApiMove.php
M includes/api/ApiOptions.php
M includes/api/ApiPageSet.php
M includes/api/ApiParamInfo.php
M includes/api/ApiParse.php
M includes/api/ApiPatrol.php
M includes/api/ApiProtect.php
M includes/api/ApiQuery.php
M includes/api/ApiQueryAllCategories.php
M includes/api/ApiQueryAllDeletedRevisions.php
M includes/api/ApiQueryAllImages.php
M includes/api/ApiQueryAllLinks.php
M includes/api/ApiQueryAllMessages.php
M includes/api/ApiQueryAllPages.php
M includes/api/ApiQueryAllRevisions.php
M includes/api/ApiQueryAllUsers.php
M includes/api/ApiQueryBacklinks.php
M includes/api/ApiQueryBacklinksprop.php
M includes/api/ApiQueryBase.php
M includes/api/ApiQueryBlocks.php
M includes/api/ApiQueryCategories.php
M includes/api/ApiQueryCategoryInfo.php
M includes/api/ApiQueryCategoryMembers.php
M includes/api/ApiQueryContributors.php
M includes/api/ApiQueryDeletedRevisions.php
M includes/api/ApiQueryDeletedrevs.php
M includes/api/ApiQueryDisabled.php
M includes/api/ApiQueryDuplicateFiles.php
M includes/api/ApiQueryExtLinksUsage.php
M includes/api/ApiQueryExternalLinks.php
M includes/api/ApiQueryFilearchive.php
M includes/api/ApiQueryGeneratorBase.php
M includes/api/ApiQueryIWBacklinks.php
M includes/api/ApiQueryIWLinks.php
M includes/api/ApiQueryImageInfo.php
M includes/api/ApiQueryImages.php
M includes/api/ApiQueryInfo.php
M includes/api/ApiQueryLangBacklinks.php
M includes/api/ApiQueryLangLinks.php
M includes/api/ApiQueryLinks.php
M includes/api/ApiQueryLogEvents.php
M includes/api/ApiQueryPagePropNames.php
M includes/api/ApiQueryPageProps.php
M includes/api/ApiQueryPagesWithProp.php
M includes/api/ApiQueryProtectedTitles.php
M includes/api/ApiQueryQueryPage.php
M includes/api/ApiQueryRandom.php
M includes/api/ApiQueryRecentChanges.php
M includes/api/ApiQueryRevisions.php
M includes/api/ApiQueryRevisionsBase.php
M includes/api/ApiQuerySearch.php
M includes/api/ApiQuerySiteinfo.php
M includes/api/ApiQueryTags.php
M includes/api/ApiQueryTokens.php
M includes/api/ApiQueryUserContributions.php
M includes/api/ApiQueryUserInfo.php
M includes/api/ApiQueryUsers.php
M includes/api/ApiQueryWatchlist.php
M includes/api/ApiQueryWatchlistRaw.php
M includes/api/ApiRevisionDelete.php
M includes/api/ApiRollback.php
M includes/api/ApiSerializable.php
M includes/api/ApiSetNotificationTimestamp.php
M includes/api/ApiSetPageLanguage.php
M includes/api/ApiTokens.php
M includes/api/ApiUnblock.php
M includes/api/ApiUndelete.php
M includes/api/ApiUpload.php
M includes/api/ApiWatch.php
M includes/skins/SkinApi.php
M includes/skins/SkinApiTemplate.php
M tests/phpunit/includes/api/query/ApiQueryBasicTest.php
M tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
M tests/phpunit/includes/api/query/ApiQueryTestBase.php
102 files changed, 0 insertions(+), 356 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/403992/1

diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php
index b969e03..0e9bb46 100644
--- a/includes/MergeHistory.php
+++ b/includes/MergeHistory.php
@@ -1,10 +1,6 @@
 
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 4d7ef28..6ae45d4 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -1,9 +1,5 @@
 @gmail.com"
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php
index df30a2d..f4aea98 100644

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Added DonationStatsCollector class to record stats across Do...

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

Change subject: Added DonationStatsCollector class to record stats across 
Donation Queue Consumer.
..


Added DonationStatsCollector class to record stats across Donation
Queue Consumer.

This is the latest implementation adopting a more label-based naming
convention to resolve some of our prior Prometheus problems covered
here: https://phabricator.wikimedia.org/T183275

This update pulls in the latest version of the underlying stats-collector
library via composer, 1.4.1 at point of this patch.

Updates in stats-collector 1.4.1 since last patch (1.3) can be seen here:
https://github.com/jackgleeson/stats-collector/compare/v1.3.0...v1.4.1

To Test (you need donations in your queue locally):
1) from project root, in cli run `drush qc`
2) look at the output in /var/spool/prometheus/donations.prom

Should look similar to:
donations_average_enqueued_age{gateway="acme"} 1928340
donations_average_enqueued_age{gateway="all"} 1928340
donations_average_transaction_age{gateway="acme"} 96919463
donations_average_transaction_age{gateway="all"} 96733716.4
donations_count{gateway="acme"} 1
donations_count{gateway="all"} 5
donations_processing_rate{period="batch"} 1.2906119823456
donations_processing_rate{period="1s"} 3.8741310854041
donations_processing_rate{period="5s"} 19.37065542702
donations_processing_rate{period="10s"} 38.741310854041
donations_processing_rate{period="30s"} 116.22393256212

Change-Id: I39b7ecb7762b297fab313bcb1de3ff990afbbec1
---
M composer.json
M composer.lock
M sites/all/modules/queue2civicrm/DonationQueueConsumer.php
D sites/all/modules/queue2civicrm/DonationStats.php
A sites/all/modules/queue2civicrm/DonationStatsCollector.php
M sites/all/modules/queue2civicrm/queue2civicrm.info
M sites/all/modules/queue2civicrm/queue2civicrm.module
A sites/all/modules/queue2civicrm/tests/phpunit/DonationStatsCollectorTest.php
D sites/all/modules/queue2civicrm/tests/phpunit/DonationStatsTest.php
9 files changed, 712 insertions(+), 453 deletions(-)

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



diff --git a/composer.json b/composer.json
index c5f8286..1103a54 100644
--- a/composer.json
+++ b/composer.json
@@ -26,7 +26,7 @@
 "predis/predis": "1.*",
 "twig/twig": "1.*",
 "wikimedia/composer-merge-plugin": "^1.4",
-"jackgleeson/stats-collector": "1.*"
+"jackgleeson/stats-collector": "^1.4"
 },
 "repositories": [
   {
diff --git a/composer.lock b/composer.lock
index 5fcd631..7a009e4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"content-hash": "bd2091c92d660d342e8926ad9516ed03",
+"content-hash": "e351f53dce9229e4e79605f8985743ed",
 "packages": [
 {
 "name": "addshore/psr-6-mediawiki-bagostuff-adapter",
@@ -689,16 +689,16 @@
 },
 {
 "name": "jackgleeson/stats-collector",
-"version": "v1.1.0",
+"version": "v1.4.1",
 "source": {
 "type": "git",
 "url": "https://github.com/jackgleeson/stats-collector.git;,
-"reference": "bde2aee11f4cb09a3e0c43331c50cffa5d118c19"
+"reference": "4c2582d5e0df3926f868660d36b50b57f256ab55"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/jackgleeson/stats-collector/zipball/bde2aee11f4cb09a3e0c43331c50cffa5d118c19;,
-"reference": "bde2aee11f4cb09a3e0c43331c50cffa5d118c19",
+"url": 
"https://api.github.com/repos/jackgleeson/stats-collector/zipball/4c2582d5e0df3926f868660d36b50b57f256ab55;,
+"reference": "4c2582d5e0df3926f868660d36b50b57f256ab55",
 "shasum": ""
 },
 "require": {
@@ -724,7 +724,7 @@
 }
 ],
 "description": "Lightweight utility to record, combine, retrieve 
and export statistics and log data across any PHP process",
-"time": "2017-12-31T17:09:10+00:00"
+"time": "2018-01-12T16:15:42+00:00"
 },
 {
 "name": "league/csv",
diff --git a/sites/all/modules/queue2civicrm/DonationQueueConsumer.php 
b/sites/all/modules/queue2civicrm/DonationQueueConsumer.php
index 88a217c..0c0f882 100644
--- a/sites/all/modules/queue2civicrm/DonationQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/DonationQueueConsumer.php
@@ -5,7 +5,7 @@
 use SmashPig\Core\UtcDate;
 use wmf_common\TransactionalWmfQueueConsumer;
 use WmfException;
-use DonationStats;
+use DonationStatsCollector;
 
 class DonationQueueConsumer extends TransactionalWmfQueueConsumer {
 
@@ -69,9 +69,8 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Summary: update regex for finding parentheticals

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

Change subject: Summary: update regex for finding parentheticals
..


Summary: update regex for finding parentheticals

For the latin character case (stays the same):
Parentheticals which have at least one space inside should be removed.
I removed the useless escaping of parentheses in the latin variant.

For the non-latin character case:
Parentheticals which have at least a space, colon, or comma inside
should be removed.
Updated expected results for a couple of Asian test cases to be less
aggressive in removing parentheticals.

Change-Id: I39a62342456a214a341f2694ed32edc01eed6597
---
M lib/transformations/summarize.js
M test/lib/transformations/summarize.js
2 files changed, 11 insertions(+), 5 deletions(-)

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



diff --git a/lib/transformations/summarize.js b/lib/transformations/summarize.js
index c5775f4..2b70ece 100644
--- a/lib/transformations/summarize.js
+++ b/lib/transformations/summarize.js
@@ -119,20 +119,26 @@
 html = doc.body.innerHTML;
 html = removeNestedParentheticals(html);
 // 1. Replace any parentheticals which have at least one space inside
-html = html.replace(/\([^\)]+ [^\)]+\)/g, ' '); // eslint-disable-line 
no-useless-escape
+html = html.replace(/\([^)]+ [^)]+\)/g, ' ');
 // 2. Remove any empty parentheticals due to transformations
 html = html.replace(/\(\)/g, ' ');
 
 // 3. Remove content inside any other non-latin parentheticals. The 
behaviour is
-// the same as 1 but for languages that are not latin based
-html = html.replace(/(.+ .+)/g, ' ');
+// the same as 1 but for languages that are not latin based. The other 
difference
+// to #1 is that in addition to a space the non-latin colon or comma could 
also
+// trigger the removal of parentheticals.
+html = html.replace(/([^)]+[ :,][^)]+)/g, ' ');
 
 // 4. remove all double spaces created by the above
 html = html.replace(/ +/g, ' ');
 
 // 5. Replace any leading whitespace before commas
+// (which could be the result of earlier transformations)
 html = html.replace(/ , /g, ', ');
 
+// 6. Same as 5 but for non-latin comma and no space afterwards
+html = html.replace(/ ,/g, ',');
+
 doc.body.innerHTML = html;
 return {
 extract: doc.body.textContent,
diff --git a/test/lib/transformations/summarize.js 
b/test/lib/transformations/summarize.js
index abe6348..fe90123 100644
--- a/test/lib/transformations/summarize.js
+++ b/test/lib/transformations/summarize.js
@@ -115,7 +115,7 @@
 // Content inside Chinese parentheticals are also stripped
 [
 '台北101(TAIPEI 
101)是位於的,樓高509.2米(1,671英尺),樓層共有101層、另有5層,總樓地板面積37萬4千,由設計,團隊、韩国等承造,於1999年動工,2004年12月31日完工啟用;最初名稱為台北國際金融中心(Taipei World Financial 
Center),2003年改為現名,亦俗稱為101大樓。興建與經營機構為。其為,曾於2004年12月31日至2010年1月4日間擁有的紀錄,目前為以及環最高,完工以來即成為重要之一。此外,大樓內擁有全球第二大的(僅次)、全球唯二開放遊客觀賞的巨型阻尼器(另一個為上海中心之「上海慧眼」),以及全球起降速度第四快的,僅次於、與。',
-'台北101 ,以及全球起降速度第四快的,僅次於、與。'
+'台北101 
是位於的,樓高509.2米(1,671英尺),樓層共有101層、另有5層,總樓地板面積37萬4千,由設計,團隊、韩国等承造,於1999年動工,2004年12月31日完工啟用;最初名稱為台北國際金融中心,2003年改為現名,亦俗稱為101大樓。興建與經營機構為。其為,曾於2004年12月31日至2010年1月4日間擁有的紀錄,目前為以及環最高,完工以來即成為重要之一。此外,大樓內擁有全球第二大的(僅次)、全球唯二開放遊客觀賞的巨型阻尼器(另一個為上海中心之「上海慧眼」),以及全球起降速度第四快的,僅次於、與。',
 ],
 // Content inside Japanese parentheticals are also stripped
 [
@@ -135,7 +135,7 @@
 // Content inside parentheticals written in `gan` language variant 
are also stripped
 [
 
'亞細亞洲(古希臘文:Ασία),又簡稱亞洲,絕大部分都位到北半球,係全世界上最大,最多人嗰一隻洲。佢東頭一徑到白令海峽嗰傑日尼奧夫角(西經169度40分,北緯60度5分),南頭一徑到努沙登加拉群島(東經103度30分,南緯11度7分),西頭一徑到巴巴角(東經26度3分,北緯39度27分),北頭一徑到切柳斯金角(東經104度18分,北緯77度43分),最高嗰山係珠穆朗瑪峰。亞洲東西嗰時差係11小時。佢西首連到歐洲,箇就係世界上最大嗰大陸-歐亞大陸。',
-'亞細亞洲 
,最高嗰山係珠穆朗瑪峰。亞洲東西嗰時差係11小時。佢西首連到歐洲,箇就係世界上最大嗰大陸-歐亞大陸。'
+'亞細亞洲,又簡稱亞洲,絕大部分都位到北半球,係全世界上最大,最多人嗰一隻洲。佢東頭一徑到白令海峽嗰傑日尼奧夫角,南頭一徑到努沙登加拉群島,西頭一徑到巴巴角,北頭一徑到切柳斯金角,最高嗰山係珠穆朗瑪峰。亞洲東西嗰時差係11小時。佢西首連到歐洲,箇就係世界上最大嗰大陸-歐亞大陸。'
 ],
 // Content inside parentheticals is not stripped if it doesn't 
include any spaces
 [

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Custom error pages for scholarships

2018-01-12 Thread Nehajha (Code Review)
Nehajha has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403987 )

Change subject: Custom error pages for scholarships
..

Custom error pages for scholarships

Change-Id: I6e8de147820c86c5ed9da9891a217b4f30b27b5a
---
M puppet/modules/scholarships/templates/apache.conf.erb
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/87/403987/1

diff --git a/puppet/modules/scholarships/templates/apache.conf.erb 
b/puppet/modules/scholarships/templates/apache.conf.erb
index d8926d0..f12f150 100644
--- a/puppet/modules/scholarships/templates/apache.conf.erb
+++ b/puppet/modules/scholarships/templates/apache.conf.erb
@@ -18,3 +18,6 @@
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule .* index.php/$0 [L,PT]
 
+
+ErrorDocument 404 "Message for not found pages"
+ErrorDocument 500 "Sorry! Something went wrong."

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Summary: update regex for non-ASCII parentheses

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

Change subject: Summary: update regex for non-ASCII parentheses
..


Summary: update regex for non-ASCII parentheses

The previous version created character classes of three times the same
characters each.

((( -> \uFF08\uFF08\uFF08
))) -> \uFF09\uFF09\uFF09

This is redundant. Since there is only one character left we don't need
the character class for that anymore.

Change-Id: I5ece83d2d5bde8cfe3afc6694c26683dddae2e78
---
M lib/transformations/summarize.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/transformations/summarize.js b/lib/transformations/summarize.js
index 9bdb1d5..c5775f4 100644
--- a/lib/transformations/summarize.js
+++ b/lib/transformations/summarize.js
@@ -125,7 +125,7 @@
 
 // 3. Remove content inside any other non-latin parentheticals. The 
behaviour is
 // the same as 1 but for languages that are not latin based
-html = html.replace(/[(((].+ .+[)))]/g, ' ');
+html = html.replace(/(.+ .+)/g, ' ');
 
 // 4. remove all double spaces created by the above
 html = html.replace(/ +/g, ' ');

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix usage of string resource for "OK".

2018-01-12 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403986 )

Change subject: Fix usage of string resource for "OK".
..

Fix usage of string resource for "OK".

The resource "R.string.OK" should not be used, since this resource
actually comes from Mapbox, and isn't really under our control.

It's better to use Android's built-in resource "android.R.string.OK".

Change-Id: I1231c25434491feb01b3b12993e0cfe54787f10f
---
M app/src/main/java/org/wikipedia/activity/BaseActivity.java
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/src/main/java/org/wikipedia/activity/BaseActivity.java 
b/app/src/main/java/org/wikipedia/activity/BaseActivity.java
index a74d2ae..494f6e3 100644
--- a/app/src/main/java/org/wikipedia/activity/BaseActivity.java
+++ b/app/src/main/java/org/wikipedia/activity/BaseActivity.java
@@ -232,7 +232,7 @@
 @Subscribe public void on(SplitLargeListsEvent event) {
 new AlertDialog.Builder(BaseActivity.this)
 .setMessage(R.string.split_reading_list_message)
-.setPositiveButton(R.string.ok, null)
+.setPositiveButton(android.R.string.ok, null)
 .show();
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix alignment of Edit pencil when description editing is dis...

2018-01-12 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403985 )

Change subject: Fix alignment of Edit pencil when description editing is 
disabled.
..

Fix alignment of Edit pencil when description editing is disabled.

When an article has no description, and description editing is disabled,
the edit pencil wasn't properly aligned.

Bug: T184825
Change-Id: I7a71ec7b77e189e9b47ae96d7952b0afff859dd1
---
M app/src/main/java/org/wikipedia/page/leadimages/PageHeaderView.java
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/page/leadimages/PageHeaderView.java 
b/app/src/main/java/org/wikipedia/page/leadimages/PageHeaderView.java
index 8072167..6e04581 100644
--- a/app/src/main/java/org/wikipedia/page/leadimages/PageHeaderView.java
+++ b/app/src/main/java/org/wikipedia/page/leadimages/PageHeaderView.java
@@ -274,7 +274,7 @@
 subtitleText.setText(subtitleSpanned());
 subtitleText.setVisibility(VISIBLE);
 } else {
-subtitleText.setVisibility(GONE);
+subtitleText.setVisibility(INVISIBLE);
 }
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: CSSMin: Remove XML declaration from SVGs

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

Change subject: CSSMin: Remove XML declaration from SVGs
..


CSSMin: Remove XML declaration from SVGs

Removing unnecessary XML declaration prolog when embedding SVGs
as data URI and adding more complex elements & attributes to test.

Bug: T175318
Change-Id: Ibec8c2ab498554a6ad33b4420ae6258dcc80fcdf
---
M includes/libs/CSSMin.php
M tests/phpunit/data/cssmin/circle.svg
M tests/phpunit/includes/libs/CSSMinTest.php
3 files changed, 11 insertions(+), 5 deletions(-)

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



diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php
index e85f02d..f2c7ed2 100644
--- a/includes/libs/CSSMin.php
+++ b/includes/libs/CSSMin.php
@@ -132,6 +132,9 @@
 */
public static function encodeStringAsDataURI( $contents, $type, 
$ie8Compat = true ) {
// Try #1: Non-encoded data URI
+
+   // Remove XML declaration, it's not needed with data URI usage
+   $contents = preg_replace( "/<\\?xml.*?\\?>/", '', $contents );
// The regular expression matches ASCII whitespace and 
printable characters.
if ( preg_match( '/^[\r\n\t\x20-\x7e]+$/', $contents ) ) {
// Do not base64-encode non-binary files (sane SVGs).
@@ -151,6 +154,7 @@
$encoded = preg_replace( '/ {2,}/', ' ', $encoded );
// Remove leading and trailing spaces
$encoded = preg_replace( '/^ | $/', '', $encoded );
+
$uri = 'data:' . $type . ',' . $encoded;
if ( !$ie8Compat || strlen( $uri ) < 
self::DATA_URI_SIZE_LIMIT ) {
return $uri;
diff --git a/tests/phpunit/data/cssmin/circle.svg 
b/tests/phpunit/data/cssmin/circle.svg
index 4f7af21..415d992 100644
--- a/tests/phpunit/data/cssmin/circle.svg
+++ b/tests/phpunit/data/cssmin/circle.svg
@@ -1,4 +1,5 @@
 
-http://www.w3.org/2000/svg; width="8" height="8">
+http://www.w3.org/2000/svg; width="8" height="8" viewBox="0 0 8 8">

-
+   http://www.w3.org/1999/xlink; xlink:title="?>">test
+
\ No newline at end of file
diff --git a/tests/phpunit/includes/libs/CSSMinTest.php 
b/tests/phpunit/includes/libs/CSSMinTest.php
index 81ceb59..89cf68f 100644
--- a/tests/phpunit/includes/libs/CSSMinTest.php
+++ b/tests/phpunit/includes/libs/CSSMinTest.php
@@ -271,9 +271,10 @@
// data: URIs for red.gif, green.gif, circle.svg
$red   = 
'data:image/gif;base64,R0lGODlhAQABAIAAAP8AADAAACwAAQABAAACAkQBADs=';
$green = 
'data:image/gif;base64,R0lGODlhAQABAICAADAAACwAAQABAAACAkQBADs=';
-   $svg = 'data:image/svg+xml,%3C%3Fxml version=%221.0%22 
encoding=%22UTF-8%22%3F%3E '
-   . '%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 
width=%228%22 height='
-   . '%228%22%3E %3Ccircle cx=%224%22 cy=%224%22 
r=%222%22/%3E %3C/svg%3E';
+   $svg = 'data:image/svg+xml,%3Csvg 
xmlns=%22http://www.w3.org/2000/svg%22 width=%228'
+   . '%22 height=%228%22 viewBox=%220 0 8 8%22%3E 
%3Ccircle cx=%224%22 cy=%224%22 '
+   . 'r=%222%22/%3E %3Ca 
xmlns:xlink=%22http://www.w3.org/1999/xlink%22 xlink:title='
+   . '%22%3F%3E%22%3Etest%3C/a%3E %3C/svg%3E';
 
// phpcs:disable Generic.Files.LineLength
return [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibec8c2ab498554a6ad33b4420ae6258dcc80fcdf
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use native ES5 Array prototype methods instead of jQuery

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

Change subject: Use native ES5 Array prototype methods instead of jQuery
..


Use native ES5 Array prototype methods instead of jQuery

Replace
* $.each( array, function ( index, value ) { ... } ) by
  array.forEach( function ( value, index ) { ... } )

* $.grep( array, function ( value ) { ... } ) by
  array.filter( function ( value ) { ... } )

* $.map( array, function ( value ) { ... } ) by
  array.map( function ( value ) { ... } )

* $.inArray( value, array ) by
  array.indexOf( value )

This change is a follow-up to 1edba8029a561919febf8b90f5df689d090665dd.

Change-Id: I16134642c52002de0eacb987bed5143f528bf627
---
M resources/src/jquery/jquery.suggestions.js
M resources/src/jquery/jquery.tablesorter.js
M resources/src/mediawiki.action/mediawiki.action.edit.stash.js
M resources/src/mediawiki.special/mediawiki.special.apisandbox.js
M resources/src/mediawiki.special/mediawiki.special.block.js
M resources/src/mediawiki.special/mediawiki.special.upload.js
M resources/src/mediawiki/api.js
M resources/src/mediawiki/mediawiki.jqueryMsg.js
M resources/src/mediawiki/page/image-pagination.js
M tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
13 files changed, 37 insertions(+), 41 deletions(-)

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



diff --git a/resources/src/jquery/jquery.suggestions.js 
b/resources/src/jquery/jquery.suggestions.js
index 4f4edc9..39c601f 100644
--- a/resources/src/jquery/jquery.suggestions.js
+++ b/resources/src/jquery/jquery.suggestions.js
@@ -293,7 +293,7 @@

expandFrom = 'left';
 
// Catch 
invalid values, default to 'auto'
-   } else if ( 
$.inArray( expandFrom, [ 'left', 'right', 'start', 'end', 'auto' ] ) === -1 ) {
+   } else if ( [ 
'left', 'right', 'start', 'end', 'auto' ].indexOf( expandFrom ) === -1 ) {

expandFrom = 'auto';
}
 
@@ -757,7 +757,7 @@
];
if ( 
context.data.keypressedCount === 0 &&
e.which === 
context.data.keypressed &&
-   $.inArray( e.which, 
allowed ) !== -1
+   allowed.indexOf( 
e.which ) !== -1
) {
$.suggestions.keypress( 
e, context, context.data.keypressed );
}
diff --git a/resources/src/jquery/jquery.tablesorter.js 
b/resources/src/jquery/jquery.tablesorter.js
index 21209f6..6d67ade 100644
--- a/resources/src/jquery/jquery.tablesorter.js
+++ b/resources/src/jquery/jquery.tablesorter.js
@@ -289,8 +289,8 @@
 
function uniqueElements( array ) {
var uniques = [];
-   $.each( array, function ( i, elem ) {
-   if ( elem !== undefined && $.inArray( elem, uniques ) 
=== -1 ) {
+   array.forEach( function ( elem ) {
+   if ( elem !== undefined && uniques.indexOf( elem ) === 
-1 ) {
uniques.push( elem );
}
} );
@@ -925,9 +925,8 @@
cell = this;
// Get current column index
columns = 
config.headerToColumns[ $cell.data( 'headerIndex' ) ];
-   newSortList = $.map( columns, 
function ( c ) {
-   // jQuery "helpfully" 
flattens the arrays...
-   return [ [ c, 
$cell.data( 'order' ) ] ];
+   newSortList = columns.map( 
function ( c ) {
+   return [ c, $cell.data( 
'order' ) ];
} );
// Index of first column 
belonging to this header
   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: config: Increase coverage of EtcdConfig::parseDirectory()

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

Change subject: config: Increase coverage of EtcdConfig::parseDirectory()
..


config: Increase coverage of EtcdConfig::parseDirectory()

One of the error cases wasn't covered yet.

Change-Id: I762b37c7448c0f689248a99bad0b206d7cf63d73
---
M tests/phpunit/includes/config/EtcdConfigTest.php
1 file changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/includes/config/EtcdConfigTest.php 
b/tests/phpunit/includes/config/EtcdConfigTest.php
index 7a4d9d9..379eebd 100644
--- a/tests/phpunit/includes/config/EtcdConfigTest.php
+++ b/tests/phpunit/includes/config/EtcdConfigTest.php
@@ -461,6 +461,26 @@
false // retry
],
],
+   '200 OK - Directory with non-array "nodes" key' => [
+   'http' => [
+   'code' => 200,
+   'reason' => 'OK',
+   'headers' => [],
+   'body' => json_encode( [ 'node' => [ 
'nodes' => [
+   [
+   'key' => '/example/a',
+   'dir' => true,
+   'nodes' => 'not an 
array'
+   ],
+   ] ] ] ),
+   'error' => '',
+   ],
+   'expect' => [
+   null,
+   "Unexpected JSON response in dir 'a'; 
'nodes' is not an array.",
+   false // retry
+   ],
+   ],
'200 OK - Correctly encoded garbage response' => [
'http' => [
'code' => 200,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I762b37c7448c0f689248a99bad0b206d7cf63d73
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Imarlier 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[specialpages]: Merge remote-tracking branch 'origin/master' into specialpages

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

Change subject: Merge remote-tracking branch 'origin/master' into specialpages
..


Merge remote-tracking branch 'origin/master' into specialpages

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia52d75aa53f0ce7c92a2ac60745f2e79275c520d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: specialpages
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Remove unwanted nodes and attributes from summary

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

Change subject: Remove unwanted nodes and attributes from summary
..


Remove unwanted nodes and attributes from summary

There's now a whitelist of attributes to keep.
This is used for all elements except img elements.
If an allowed attribute has a parenthesis in its value it gets removed,
too.

There's also a blacklist of elements to remove.

Bug: T184557
Change-Id: Ib4f21f5f68913fa10b9005d10de23b94616dcc94
---
M lib/transformations/summarize.js
M test/lib/transformations/summarize.js
2 files changed, 100 insertions(+), 1 deletion(-)

Approvals:
  Gergő Tisza: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Mholloway: Looks good to me, approved



diff --git a/lib/transformations/summarize.js b/lib/transformations/summarize.js
index e0becc8..9bdb1d5 100644
--- a/lib/transformations/summarize.js
+++ b/lib/transformations/summarize.js
@@ -4,6 +4,84 @@
 const flattenElements = require('./flattenElements');
 const rmElementsWithSelector = require('./rmElementsWithSelector');
 const removeAttributes = require('./removeAttributes');
+const NodeType = require('../nodeType');
+
+const DISALLOWED_ELEMENTS = ['OBJECT', 'SCRIPT', 'STYLE'];
+const ALLOWED_ATTRIBUTES = ['class', 'style'];
+
+const ANY_PAREN_REGEX = /[()()]/;
+
+/**
+ * Removes blacklisted elements.
+ * @param {!Node} node the node to visit
+ */
+function rmDisallowedElements(node) {
+if (DISALLOWED_ELEMENTS.includes(node.tagName)) {
+node.remove();
+}
+}
+
+function nameAllowed(tagName, attributeName) {
+// every attribute in  or in ALLOWED_ATTRIBUTES
+return tagName === 'IMG' || ALLOWED_ATTRIBUTES.includes(attributeName);
+}
+
+function valueDisallowed(value) {
+return ANY_PAREN_REGEX.test(value);
+}
+
+/**
+ * Removes attributes except white-listed ones.
+ * @param {!Node} node the node to visit
+ * @param {!String} tagName the uppercase tag name of the DOM element
+ */
+function rmUnwantedAttributes(node, tagName) {
+const attrs = node.attributes;
+for (let i = attrs.length - 1; i >= 0; i--) {
+const attribute = attrs.item(i);
+if (!nameAllowed(tagName, attribute.localName) || 
valueDisallowed(attribute.data)) {
+node.removeAttribute(attribute.localName);
+}
+}
+}
+
+/**
+ * Visits one DOM node. Do the stuff that needs to be done when a single DOM 
node is handled.
+ * In this case, remove DOM nodes and some attributes we don't want to keep.
+ * @param {!Node} node the node to visit
+ */
+function visit(node) {
+if (node.nodeType === NodeType.ELEMENT_NODE) {
+rmDisallowedElements(node);
+rmUnwantedAttributes(node, node.tagName);
+} else if (node.nodeType !== NodeType.TEXT_NODE) {
+node.remove();
+}
+}
+
+/**
+ * Traverses DOM tree iteratively (depth first).
+ * @param {!Element} rootElement the root of the DOM tree which needs to be 
traversed
+ */
+function traverseDF(rootElement) {
+let nodesToVisit = [ rootElement ];
+while (nodesToVisit.length > 0) {
+const currentNode = nodesToVisit.shift();
+visit(currentNode);
+nodesToVisit = [
+...(currentNode.childNodes || []), // depth first
+...nodesToVisit,
+];
+}
+}
+
+/**
+ * Removes unwanted nodes and element attributes.
+ * @param {!Document} document the DOM document
+ */
+function removeUnwantedNodes(document) {
+traverseDF(document.body);
+}
 
 /**
  * Recursively discard any parentheticals that themselves are inside 
parentheticals
@@ -36,6 +114,7 @@
 rmElementsWithSelector(doc, '.noprint');
 rmElementsWithSelector(doc, 'math');
 rmElementsWithSelector(doc, 'span:empty,b:empty,i:empty,p:empty');
+removeUnwantedNodes(doc);
 
 html = doc.body.innerHTML;
 html = removeNestedParentheticals(html);
diff --git a/test/lib/transformations/summarize.js 
b/test/lib/transformations/summarize.js
index 6c9f3cf..abe6348 100644
--- a/test/lib/transformations/summarize.js
+++ b/test/lib/transformations/summarize.js
@@ -8,6 +8,26 @@
 describe('summarize', () => {
 it('matches the spec', () => {
 const testCases = [
+// Should remove unwanted elements
+[
+'.foo.',
+'..'
+],
+// Should remove unwanted attributes
+[
+'foo',
+'foo'
+],
+// Should keep white-listed attributes
+[
+'foo',
+'foo'
+],
+// Should remove comments
+[
+'foobar',
+'foobar'
+],
 // Should flatten empty nodes
 [
 'f',
@@ -46,7 +66,7 @@
 // math tags are stripped but any math images are shown
 [
 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Updating fonts list and sorting it

2018-01-12 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403984 )

Change subject: Updating fonts list and sorting it
..

Updating fonts list and sorting it

This is to reflect the recently added Noto fonts (and whatever else
has been added since 2014).

Used fc-list :fontformat=TrueType  on a scaler to generate

Bug: T184664
Change-Id: I9259ec705115a8f4952337d6ccde56cfc99cb7e3
---
M fc-list
1 file changed, 216 insertions(+), 45 deletions(-)


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

diff --git a/fc-list b/fc-list
index 186fd30..e0e9e40 100644
--- a/fc-list
+++ b/fc-list
@@ -6,9 +6,13 @@
 AlHor:style=Regular
 AlManzomah:style=Regular
 AlYarmook:style=Regular
+Amiri Quran:style=Regular,عادي
+Amiri:style=Bold Slanted,عريض مائل
+Amiri:style=Bold,عريض
+Amiri:style=Regular,عادي
+Amiri:style=Slanted,مائل
 Ani,অনি  Dvf:style=Regular
 AnjaliOldLipi:style=Regular
-Arab:style=Regular
 AR PL UKai CN:style=Book
 AR PL UKai HK:style=Book
 AR PL UKai TW MBE:style=Book
@@ -17,26 +21,82 @@
 AR PL UMing HK:style=Light
 AR PL UMing TW MBE:style=Light
 AR PL UMing TW:style=Light
+Arab:style=Regular
 Bandal,반달:style=Regular
 Bangwool,방울:style=Regular
+Caladea:style=Bold
+Caladea:style=Bold Italic,Italic
+Caladea:style=Italic
+Caladea:style=Regular
+Carlito:style=Bold
+Carlito:style=Bold Italic
+Carlito:style=Italic
+Carlito:style=Regular
 Chandas:style=Regular
 cmex10:style=Regular
 cmmi10:style=Regular
 cmr10:style=Regular
 cmsy10:style=Regular
+Comfortaa:style=Bold
+Comfortaa:style=Light
+Comfortaa:style=Regular
 Cortoba:style=Regular
 David CLM:style=Bold
 David CLM:style=BoldItalic
 David CLM:style=Medium
 David CLM:style=MediumItalic
 DejaVu Sans Mono:style=Bold
+DejaVu Sans Mono:style=Bold Oblique
 DejaVu Sans Mono:style=Book
+DejaVu Sans Mono:style=Oblique
+DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold Oblique,Bold Oblique
+DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold
+DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique
+DejaVu Sans,DejaVu Sans Condensed:style=Condensed,Book
+DejaVu Sans,DejaVu Sans Light:style=ExtraLight
 DejaVu Sans:style=Bold
+DejaVu Sans:style=Bold Oblique
 DejaVu Sans:style=Book
+DejaVu Sans:style=Oblique
+DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic
+DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold
+DejaVu Serif,DejaVu Serif Condensed:style=Condensed Italic,Italic
+DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book
 DejaVu Serif:style=Bold
+DejaVu Serif:style=Bold Italic
 DejaVu Serif:style=Book
+DejaVu Serif:style=Italic
 Dimnah:style=Regular
-Dyuthi:style=Regular,
+Droid Arabic Kufi:style=Bold
+Droid Arabic Kufi:style=Regular
+Droid Arabic Naskh:style=Bold
+Droid Arabic Naskh:style=Regular
+Droid Naskh Shift Alt:style=Regular
+Droid Sans Arabic:style=Regular
+Droid Sans Armenian:style=Regular
+Droid Sans Ethiopic:style=Bold
+Droid Sans Ethiopic:style=Regular
+Droid Sans Fallback:style=Regular
+Droid Sans Georgian:style=Regular
+Droid Sans Hebrew:style=Bold
+Droid Sans Hebrew:style=Regular
+Droid Sans Japanese:style=Regular
+Droid Sans Mono:style=Regular
+Droid Sans:style=Bold
+Droid Sans:style=Regular
+Droid Serif:style=Bold
+Droid Serif:style=Bold Italic
+Droid Serif:style=Italic
+Droid Serif:style=Regular
+Dyuthi:style=Regular,Book
+EB Garamond Initials Fill1:style=Regular
+EB Garamond Initials Fill2:style=Regular
+EB Garamond Initials:style=Regular
+EB Garamond,EB Garamond 08 SC:style=08 SC 
Regular,Normal,obyčejné,Standard,Κανονικά,SC,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
+EB Garamond,EB Garamond 08:style=08 
Italic,Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,Etzana
+EB Garamond,EB Garamond 08:style=08 
Regular,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
+EB Garamond,EB Garamond 12:style=12 Italic,Italic
+EB Garamond,EB Garamond 12:style=12 Regular,Regular
 Electron:style=Regular
 esint10:style=regular
 eufm10:style=Regular
@@ -44,14 +104,44 @@
 Eunjin,은진:style=Regular
 Ezra SIL SR:style=Regular
 Ezra SIL:style=Regular
+FontAwesome:style=Regular
+FontAwesome:style=Regular
+Frank Ruehl CLM:style=Bold
+Frank Ruehl CLM:style=BoldOblique
+Frank Ruehl CLM:style=Medium
+Frank Ruehl CLM:style=MediumOblique
+FreeMono:style=Bold Oblique,получерен наклонен,Negreta cursiva,tučné 
kurzíva,fed kursiv,Fett-Kursiv,Έντονα Πλάγια,Negrita Cursiva,Lihavoitu 
Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet 
Kursiv,Pogrubiona kursywa,Negrito Itálico,gros oblic,Полужирный Курсив,Tučná 
kurzíva,Fet Kursiv,Kalın İtalik,huruf tebal miring,жирний похилий,polkrepko 
ležeče,treknais slīpraksts,pusjuodis pasvirasis,Lodi etzana,धृष्ट-तिरछा

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[specialpages]: Merge remote-tracking branch 'origin/master' into specialpages

2018-01-12 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403983 )

Change subject: Merge remote-tracking branch 'origin/master' into specialpages
..

Merge remote-tracking branch 'origin/master' into specialpages

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


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


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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix Randomizer bookmark icon of first item upon screen rotat...

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

Change subject: Fix Randomizer bookmark icon of first item upon screen rotation.
..


Fix Randomizer bookmark icon of first item upon screen rotation.

Bug: T184671
Change-Id: Ie86d50565c58fa12db7edebb2b1cf5dd02320621
---
M app/src/main/java/org/wikipedia/random/RandomFragment.java
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/random/RandomFragment.java 
b/app/src/main/java/org/wikipedia/random/RandomFragment.java
index cb4dcda..29e2c2e 100644
--- a/app/src/main/java/org/wikipedia/random/RandomFragment.java
+++ b/app/src/main/java/org/wikipedia/random/RandomFragment.java
@@ -66,6 +66,9 @@
 randomPager.addOnPageChangeListener(viewPagerListener);
 
 updateBackButton(0);
+if (savedInstanceState != null && randomPager.getCurrentItem() == 0 && 
getTopTitle() != null) {
+updateSaveShareButton(getTopTitle());
+}
 
 funnel = new RandomizerFunnel(WikipediaApp.getInstance(), 
WikipediaApp.getInstance().getWikiSite(),
 
getActivity().getIntent().getIntExtra(RandomActivity.INVOKE_SOURCE_EXTRA, 0));

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Scribunto[master]: Don't use deprecated wfMemcKey() or wfGlobalCacheKey()

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

Change subject: Don't use deprecated wfMemcKey() or wfGlobalCacheKey()
..


Don't use deprecated wfMemcKey() or wfGlobalCacheKey()

Change-Id: I7fe5a45226a92ef19c25790a800a7ae7b7a3a57a
---
M common/ApiScribuntoConsole.php
M engines/LuaCommon/LuaCommon.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/common/ApiScribuntoConsole.php b/common/ApiScribuntoConsole.php
index 28a86c6..22f2966 100644
--- a/common/ApiScribuntoConsole.php
+++ b/common/ApiScribuntoConsole.php
@@ -22,8 +22,8 @@
$sessionId = mt_rand( 0, 0x7fff );
}
 
-   $sessionKey = wfMemcKey( 'scribunto-console', 
$this->getUser()->getId(), $sessionId );
$cache = ObjectCache::getInstance( CACHE_ANYTHING );
+   $sessionKey = $cache->makeKey( 'scribunto-console', 
$this->getUser()->getId(), $sessionId );
$session = null;
$sessionIsNew = false;
if ( $params['session'] ) {
diff --git a/engines/LuaCommon/LuaCommon.php b/engines/LuaCommon/LuaCommon.php
index 423c217..d6d47cc 100644
--- a/engines/LuaCommon/LuaCommon.php
+++ b/engines/LuaCommon/LuaCommon.php
@@ -345,7 +345,7 @@
throw new MWException( 'Lua file does not exist: ' . 
$fileName );
}
 
-   $cacheKey = wfGlobalCacheKey( __CLASS__, $fileName );
+   $cacheKey = $cache->makeGlobalKey( __CLASS__, $fileName );
$fileData = $cache->get( $cacheKey );
 
$code = false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7fe5a45226a92ef19c25790a800a7ae7b7a3a57a
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Use built GUI for distribution package

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

Change subject: Use built GUI for distribution package
..


Use built GUI for distribution package

Bug: T166246
Change-Id: I77f82b93e13e63e0d4d4a9fa02ceec47c40e5c0e
---
M dist/pom.xml
M dist/src/assembly/dist.xml
M docs/ChangeLog
M gui
M pom.xml
5 files changed, 20 insertions(+), 16 deletions(-)

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



diff --git a/dist/pom.xml b/dist/pom.xml
index bf0ff56..1175b09 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -34,6 +34,10 @@
 blazegraph-service
 war
 
+
+  org.wikidata.query.rdf
+  gui
+
 
 
 
diff --git a/dist/src/assembly/dist.xml b/dist/src/assembly/dist.xml
index a694704..d8a70a3 100644
--- a/dist/src/assembly/dist.xml
+++ b/dist/src/assembly/dist.xml
@@ -1,6 +1,6 @@
-http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0;
+http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
-  
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
 http://maven.apache.org/xsd/assembly-1.1.0.xsd;>
+  
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
 http://maven.apache.org/xsd/assembly-1.1.2.xsd;>
 
   dist
 
@@ -32,19 +32,7 @@
 
 
   gui
-  ${project.basedir}/../gui
-  
-Gruntfile.js
-.git*
-.js*
-.settings
-.project
-package.json
-jsduck.json
-README.md
-node_modules/**
-wikibase/tests/**
-  
+  ${project.basedir}/../gui/build
 
 
   
diff --git a/docs/ChangeLog b/docs/ChangeLog
index 352c1f6..6cdb392 100644
--- a/docs/ChangeLog
+++ b/docs/ChangeLog
@@ -2,6 +2,7 @@
 -
 Add more URIs used by Wikibase to vocabulary (requires data reload)
 Add wikibase:apiOrdinal for MWAPI queries
+Fix GUI build - now service.zip package contains full build of the GUI
 
 0.2.5
 -
diff --git a/gui b/gui
index ea009d7..fbbf879 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit ea009d7ba815e5ba4d87ea1dfecaca7ed3ab6b75
+Subproject commit fbbf879d44f76f946751bf489febff52449e3284
diff --git a/pom.xml b/pom.xml
index 7cef193..77f5af9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,6 +41,7 @@
 war
 tools
 dist
+gui
 
 
 
@@ -524,6 +525,11 @@
 ${project.version}
 
 
+org.wikidata.query.rdf
+  gui
+  ${project.version}
+
+
 xml-apis
 xml-apis
 1.4.01
@@ -742,6 +748,11 @@
 
 
 
+com.github.eirslett
+frontend-maven-plugin
+1.6
+
+
 org.apache.maven.plugins
 maven-javadoc-plugin
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I77f82b93e13e63e0d4d4a9fa02ceec47c40e5c0e
Gerrit-PatchSet: 10
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Fix POTD test

2018-01-12 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403981 )

Change subject: Hygiene: Fix POTD test
..

Hygiene: Fix POTD test

For some reason this test was changed at some point to request an
image that in fact has extmetadata, including ImageDescription. This
changes it back so it tests what it says it tests.

Change-Id: Ibe40bd56ac6f2cd371826a616ee185c1318360cd
---
M test/features/featured-image/pagecontent.js
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/test/features/featured-image/pagecontent.js 
b/test/features/featured-image/pagecontent.js
index 4b7cfdd..e9ccecd 100644
--- a/test/features/featured-image/pagecontent.js
+++ b/test/features/featured-image/pagecontent.js
@@ -32,15 +32,15 @@
 });
 });
 
-it('featured image with no extmetadata should have expected properties', 
() => {
-const uri = 
`${server.config.uri}en.wikipedia.org/v1/media/image/featured/2016/05/06`;
+it('description should be found for image with no extmetadata', () => {
+const uri = 
`${server.config.uri}en.wikipedia.org/v1/media/image/featured/2016/05/23`;
 return preq.get({ uri })
 .then((res) => {
 assert.status(res, 200);
-assert.equal(res.body.title, 'File:Kazakhstan Altay 3.jpg');
-assert.equal(res.body.thumbnail.source, 
'https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Kazakhstan_Altay_3.jpg/640px-Kazakhstan_Altay_3.jpg');
-assert.equal(res.body.image.source, 
'https://upload.wikimedia.org/wikipedia/commons/9/99/Kazakhstan_Altay_3.jpg');
-assert.contains(res.body.description.text, 'Altay mountains');
+assert.equal(res.body.title, 'File:Fra et romersk 
osteria.jpg');
+assert.equal(res.body.thumbnail.source, 
'https://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/Fra_et_romersk_osteria.jpg/640px-Fra_et_romersk_osteria.jpg');
+assert.equal(res.body.image.source, 
'https://upload.wikimedia.org/wikipedia/commons/7/7a/Fra_et_romersk_osteria.jpg');
+assert.contains(res.body.description.text, 'Roman Osteria');
 assert.equal(res.body.description.lang, 'en');
 });
 });

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Gadgets[master]: Localize namespaces to inh

2018-01-12 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403982 )

Change subject: Localize namespaces to inh
..

Localize namespaces to inh

Bug: T184515
Change-Id: I25a832ad3887446b3146101d25d7d7dab73305b2
---
M Gadgets.namespaces.php
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets 
refs/changes/82/403982/1

diff --git a/Gadgets.namespaces.php b/Gadgets.namespaces.php
index 899d736..417db6d 100644
--- a/Gadgets.namespaces.php
+++ b/Gadgets.namespaces.php
@@ -149,6 +149,13 @@
NS_GADGET_DEFINITION_TALK => 'שיחת_הגדרת_גאדג\'ט',
 ];
 
+$namespaceNames['inh'] = [
+   NS_GADGET => 'Гаджет',
+   NS_GADGET_TALK => 'Гаджет_ювцар',
+   NS_GADGET_DEFINITION => 'Гаджета_къоастадар',
+   NS_GADGET_DEFINITION_TALK => 'Гаджета_къоастадар_дувцар',
+];
+
 $namespaceNames['is'] = [
NS_GADGET => 'Smától',
NS_GADGET_TALK => 'Smátólaspjall',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25a832ad3887446b3146101d25d7d7dab73305b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 

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


[MediaWiki-commits] [Gerrit] mediawiki...Scribunto[master]: Remove no longer needed backwards-compatibility

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

Change subject: Remove no longer needed backwards-compatibility
..


Remove no longer needed backwards-compatibility

This extension requires 1.31 (it follows the release branches compatibility
policy), so we can remove a lot of legacy checks and code.

Change-Id: Ieb42073010caffb1f6811d3a2f629aa60c1d2034
---
M common/ApiScribuntoConsole.php
M common/Hooks.php
M common/ScribuntoContent.php
M engines/LuaCommon/LuaCommon.php
4 files changed, 10 insertions(+), 50 deletions(-)

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



diff --git a/common/ApiScribuntoConsole.php b/common/ApiScribuntoConsole.php
index 6bfb7d0..28a86c6 100644
--- a/common/ApiScribuntoConsole.php
+++ b/common/ApiScribuntoConsole.php
@@ -13,11 +13,7 @@
 
$title = Title::newFromText( $params['title'] );
if ( !$title ) {
-   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
-   $this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $params['title'] ) ] );
-   } else {
-   $this->dieUsageMsg( [ 'invalidtitle', 
$params['title'] ] );
-   }
+   $this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $params['title'] ) ] );
}
 
if ( $params['session'] ) {
@@ -59,14 +55,7 @@
}
 
if ( $newSession['size'] > self::SC_MAX_SIZE ) {
-   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
-   $this->dieWithError( 
'scribunto-console-too-large' );
-   } else {
-   $this->dieUsage(
-   $this->msg( 
'scribunto-console-too-large' )->text(),
-   'scribunto-console-too-large'
-   );
-   }
+   $this->dieWithError( 'scribunto-console-too-large' );
}
$result = $this->runConsole( [
'title' => $title,
diff --git a/common/Hooks.php b/common/Hooks.php
index ab75dd2..69d8b42 100644
--- a/common/Hooks.php
+++ b/common/Hooks.php
@@ -20,6 +20,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+use MediaWiki\MediaWikiServices;
 use RunningStat\PSquare;
 
 /**
@@ -195,12 +196,8 @@
static $cache;
 
if ( !$cache ) {
-   /// @todo: Clean up when support for MW < 1.27 is 
dropped
-   if ( is_callable( 'ObjectCache::getLocalServerInstance' 
) ) {
-   $cache = ObjectCache::getLocalServerInstance( 
CACHE_NONE );
-   } else {
-   $cache = ObjectCache::newAccelerator( 
CACHE_NONE );
-   }
+   $cache = ObjectCache::getLocalServerInstance( 
CACHE_NONE );
+
}
 
// To control the sampling rate, we keep a compact histogram of
@@ -228,16 +225,7 @@
static $stats;
 
if ( !$stats ) {
-   // check, if MediaWikiServices exists and has a 
StatsdDataFactory service for
-   // backward-compatibility with MediaWiki 1.25+
-   if (
-   class_exists( 'MediaWiki\\MediaWikiServices' ) 
&&
-   
\MediaWiki\MediaWikiServices::getInstance()->hasService( 'StatsdDataFactory' )
-   ) {
-   $stats = 
\MediaWiki\MediaWikiServices::getInstance()->getStatsdDataFactory();
-   } else {
-   $stats = RequestContext::getMain()->getStats();
-   }
+   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
}
 
$metricKey = sprintf( 'scribunto.traces.%s__%s__%s', 
wfWikiId(), $moduleName, $functionName );
diff --git a/common/ScribuntoContent.php b/common/ScribuntoContent.php
index dc4f3f4..29f4878 100644
--- a/common/ScribuntoContent.php
+++ b/common/ScribuntoContent.php
@@ -105,7 +105,7 @@
// category if it's invalid
$status = $this->validate( $title );
if ( !$status->isOK() ) {
-   $output->setText( self::getPOText( $output ) .
+   $output->setText( $output->getRawText() .
Html::rawElement( 'div', [ 'class' => 
'errorbox' ],
$status->getHTML( 
'scribunto-error-short', 'scribunto-error-long' )
)
@@ -143,31 +143,19 @@
if ( 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: config: Increase coverage of EtcdConfig::parseDirectory()

2018-01-12 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403980 )

Change subject: config: Increase coverage of EtcdConfig::parseDirectory()
..

config: Increase coverage of EtcdConfig::parseDirectory()

One of the error cases wasn't covered yet.

Change-Id: I762b37c7448c0f689248a99bad0b206d7cf63d73
---
M tests/phpunit/includes/config/EtcdConfigTest.php
1 file changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/403980/1

diff --git a/tests/phpunit/includes/config/EtcdConfigTest.php 
b/tests/phpunit/includes/config/EtcdConfigTest.php
index 7a4d9d9..379eebd 100644
--- a/tests/phpunit/includes/config/EtcdConfigTest.php
+++ b/tests/phpunit/includes/config/EtcdConfigTest.php
@@ -461,6 +461,26 @@
false // retry
],
],
+   '200 OK - Directory with non-array "nodes" key' => [
+   'http' => [
+   'code' => 200,
+   'reason' => 'OK',
+   'headers' => [],
+   'body' => json_encode( [ 'node' => [ 
'nodes' => [
+   [
+   'key' => '/example/a',
+   'dir' => true,
+   'nodes' => 'not an 
array'
+   ],
+   ] ] ] ),
+   'error' => '',
+   ],
+   'expect' => [
+   null,
+   "Unexpected JSON response in dir 'a'; 
'nodes' is not an array.",
+   false // retry
+   ],
+   ],
'200 OK - Correctly encoded garbage response' => [
'http' => [
'code' => 200,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I762b37c7448c0f689248a99bad0b206d7cf63d73
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] oojs/ui[master]: build, demos, docs: Use “OOUI” as unified name

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

Change subject: build, demos, docs: Use “OOUI” as unified name
..


build, demos, docs: Use “OOUI” as unified name

Bug: T182360
Change-Id: I005741ff06ff87725c29a9a4bb554572fc17594e
---
M .phpcs.xml
M Doxyfile
M Gruntfile.js
M LICENSE-MIT
M README.md
M build/banner.txt
M build/modules.yaml
M composer.json
M demos/demos.php
M demos/index.html
M jsduck.categories.json
M jsduck.eg-iframe.html
M jsduck.json
M package.json
M tests/QUnit.assert.equalDomElement.js
M tests/index.php
16 files changed, 24 insertions(+), 24 deletions(-)

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



diff --git a/.phpcs.xml b/.phpcs.xml
index 742566f..c117f3c 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,5 +1,5 @@
 
-
+



diff --git a/Doxyfile b/Doxyfile
index 938aa52..fe6bd6b 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,7 +1,7 @@
 # Configuration file for Doxygen
 
-PROJECT_NAME   = "OOjs UI"
-PROJECT_BRIEF  = "Object-Oriented JavaScript – User Interface"
+PROJECT_NAME   = "OOUI"
+PROJECT_BRIEF  = "Object-Oriented User Interface"
 
 OUTPUT_DIRECTORY   = doc
 
diff --git a/Gruntfile.js b/Gruntfile.js
index 0eeb524..9745817 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -17,7 +17,7 @@
concatJsFiles = {},
concatOmnibus = {},
rtlFiles = {},
-   minBanner = '/*! OOjs UI v<%= pkg.version %> | 
http://oojs.mit-license.org */';
+   minBanner = '/*! OOUI v<%= pkg.version %> | 
http://oojs.mit-license.org */';
 
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
diff --git a/LICENSE-MIT b/LICENSE-MIT
index 7648d4c..8f0984c 100644
--- a/LICENSE-MIT
+++ b/LICENSE-MIT
@@ -1,4 +1,4 @@
-Copyright 2011-2018 OOjs UI Team and other contributors.
+Copyright 2011-2018 OOUI Team and other contributors.
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
diff --git a/README.md b/README.md
index f10330f..6e98d42 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
 
[![npm](https://img.shields.io/npm/v/oojs-ui.svg?style=flat)](https://www.npmjs.com/package/oojs-ui)
 
[![Packagist](https://img.shields.io/packagist/v/oojs/oojs-ui.svg?style=flat)](https://packagist.org/packages/oojs/oojs-ui)
 
[![David](https://img.shields.io/david/dev/wikimedia/oojs-ui.svg?style=flat)](https://david-dm.org/wikimedia/oojs-ui#info=devDependencies)
 
-OOjs UI
+OOUI
 =
 
-OOjs UI is a component-based JavaScript UI library. Key features:
+OOUI is a component-based JavaScript UI library. Key features:
 
 * Common widgets, layouts, and dialogs
 * Classes, elements, and mixins to create custom interfaces
@@ -95,7 +95,7 @@
 * Join the Wikimedia Developers mailing list, 
[wikitech-l](https://lists.wikimedia.org/mailman/listinfo/wikitech-l).
 * Chat with the maintainers on `#wikimedia-dev` on `irc.freenode.net`.
 * Ask questions on 
[StackOverflow](https://stackoverflow.com/tags/oojs-ui/info).
-* Watchlist the [documentation](https://www.mediawiki.org/wiki/OOjs_UI) on 
MediaWiki to stay updated.
+* Watchlist the [documentation](https://www.mediawiki.org/wiki/OOUI) on 
MediaWiki to stay updated.
 
 
 Versioning
diff --git a/build/banner.txt b/build/banner.txt
index e648477..0b32af1 100644
--- a/build/banner.txt
+++ b/build/banner.txt
@@ -1,8 +1,8 @@
 /*!
- * OOjs UI v<%= pkg.version %>
- * https://www.mediawiki.org/wiki/OOjs_UI
+ * OOUI v<%= pkg.version %>
+ * https://www.mediawiki.org/wiki/OOUI
  *
- * Copyright 2011–<%= grunt.template.today("") %> OOjs UI Team and other 
contributors.
+ * Copyright 2011–<%= grunt.template.today("") %> OOUI Team and other 
contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
diff --git a/build/modules.yaml b/build/modules.yaml
index 009d003..4a71c31 100644
--- a/build/modules.yaml
+++ b/build/modules.yaml
@@ -15,7 +15,7 @@
"src/Widget.js",
"src/Theme.js",
 
-   # Basic element mixins. These should be the same 
classes that are supported in OOjs UI PHP.
+   # Basic element mixins. These should be the same 
classes that are supported in OOUI PHP.
"src/mixins/TabIndexedElement.js",
"src/mixins/ButtonElement.js",
"src/mixins/GroupElement.js",
@@ -26,8 +26,8 @@
"src/mixins/TitledElement.js",
"src/mixins/AccessKeyedElement.js",
 
-   # The basic widgets and layouts. These should be the 
same classes that are supported in OOjs
-   # UI PHP. (Continued below, as some 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Use SmashPig FinalStatus

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

Change subject: Use SmashPig FinalStatus
..


Use SmashPig FinalStatus

Change-Id: I50685fbbfa07d2886e433e07e5e7ba7ff0f1a111
---
M adyen_gateway/adyen.adapter.php
M amazon_gateway/amazon.adapter.php
M astropay_gateway/astropay.adapter.php
M composer.lock
M extension.json
D gateway_common/FinalStatus.php
M gateway_common/GatewayPage.php
M gateway_common/PaymentResult.php
M gateway_common/gateway.adapter.php
M globalcollect_gateway/globalcollect.adapter.php
M globalcollect_gateway/orphan.adapter.php
M paypal_gateway/express_checkout/paypal_express.adapter.php
M paypal_gateway/legacy/paypal_legacy.adapter.php
M tests/phpunit/Adapter/Amazon/AmazonTest.php
M tests/phpunit/Adapter/AstroPay/AstroPayTest.php
M tests/phpunit/Adapter/GlobalCollect/RecurringTest.php
M tests/phpunit/Adapter/Ingenico/RecurringTest.php
M tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
18 files changed, 22 insertions(+), 19 deletions(-)

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



diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index 9a68fdb..150f1c2 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -16,6 +16,7 @@
  *
  */
 use Psr\Log\LogLevel;
+use SmashPig\CrmLink\FinalStatus;
 
 /**
  * AdyenAdapter
diff --git a/amazon_gateway/amazon.adapter.php 
b/amazon_gateway/amazon.adapter.php
index 27c8920..c392d9c 100644
--- a/amazon_gateway/amazon.adapter.php
+++ b/amazon_gateway/amazon.adapter.php
@@ -4,6 +4,7 @@
 use PayWithAmazon\PaymentsClientInterface as PwaClientInterface;
 use Psr\Log\LogLevel;
 use SmashPig\Core\Context;
+use SmashPig\CrmLink\FinalStatus;
 
 /**
  * Wikimedia Foundation
diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index 1f747f1..bddd178 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -16,6 +16,7 @@
  *
  */
 use Psr\Log\LogLevel;
+use SmashPig\CrmLink\FinalStatus;
 
 /**
  * AstroPayAdapter
diff --git a/composer.lock b/composer.lock
index 5d275a2..51e03b3 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1281,29 +1281,31 @@
 ],
 "description": "Symfony Yaml Component",
 "homepage": "https://symfony.com;,
-"time": "2017-06-01T20:52:29+00:00"
+"time": "2018-01-03T07:36:31+00:00"
 },
 {
 "name": "wikimedia/smash-pig",
-"version": "0.5.0",
+"version": "v0.5.2",
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git;,
-"reference": "def9c6f3cfc8e3878aa74cf94ebb8287b08ac2cc"
+"reference": "af6a9bb52291d7cdc696009ede4b3c6271ffb983"
 },
 "require": {
 "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
 "coderkungfu/php-queue": "^1.0",
 "corneltek/getoptionkit": "^2.5",
-"php": ">=5.3.3",
+"php": ">=5.4",
 "phpmailer/phpmailer": "^5.2",
 "predis/predis": "^1.1",
 "psr/cache": "^1.0",
+"psr/log": "^1.0",
 "symfony/event-dispatcher": "^2.1",
 "symfony/http-foundation": "^2.1",
 "symfony/yaml": "^2.8"
 },
 "require-dev": {
+"ext-sqlite3": "*",
 "jakub-onderka/php-parallel-lint": "^0.9",
 "mediawiki/mediawiki-codesniffer": "0.11.0",
 "phpunit/phpunit": "^4.8"
diff --git a/extension.json b/extension.json
index d841370..035f86d 100644
--- a/extension.json
+++ b/extension.json
@@ -87,7 +87,6 @@
"DonorLocale": "gateway_common/DonorLocale.php",
"EncodingMangler": "gateway_common/EncodingMangler.php",
"ErrorState": "gateway_common/ErrorState.php",
-   "FinalStatus": "gateway_common/FinalStatus.php",
"FallbackLogPrefixer": "gateway_common/FallbackLogPrefixer.php",
"GatewayAdapter": "gateway_common/gateway.adapter.php",
"GatewayPage": "gateway_common/GatewayPage.php",
diff --git a/gateway_common/FinalStatus.php b/gateway_common/FinalStatus.php
deleted file mode 100644
index 2ae09cf..000
--- a/gateway_common/FinalStatus.php
+++ /dev/null
@@ -1,14 +0,0 @@
-https://gerrit.wikimedia.org/r/403757
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I50685fbbfa07d2886e433e07e5e7ba7ff0f1a111
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Mepps 
Gerrit-Reviewer: AndyRussG 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove various redundant '@license' tags in file headers

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

Change subject: Remove various redundant '@license' tags in file headers
..


Remove various redundant '@license' tags in file headers

Redundant given this is the project-wide license already,
especially in file headers that already include the GPL license
header.

This and other minor fixups based on feedback from Ie0cea0ef5027c7e5.

* Add @file where missing.
* Move @ingroup and @deprecated from file to class doc where needed.

Change-Id: I7067abb7abee1f0c238cb2536e16192e946d8daa
---
M includes/MWGrants.php
M includes/changes/ChangesListBooleanFilter.php
M includes/changes/ChangesListFilter.php
M includes/changes/ChangesListFilterGroup.php
M includes/changes/ChangesListStringOptionsFilterGroup.php
M includes/libs/rdbms/connectionmanager/ConnectionManager.php
M includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php
M includes/linkeddata/PageDataRequestHandler.php
M includes/linker/LinkRenderer.php
M includes/linker/LinkRendererFactory.php
M includes/linker/LinkTarget.php
M includes/specials/SpecialPageData.php
M includes/specials/formfields/Licenses.php
M includes/title/ForeignTitleFactory.php
M includes/title/ImportTitleFactory.php
M includes/title/MediaWikiTitleCodec.php
M includes/title/NaiveForeignTitleFactory.php
M includes/title/NaiveImportTitleFactory.php
M includes/title/NamespaceAwareForeignTitleFactory.php
M includes/title/NamespaceImportTitleFactory.php
M includes/title/SubpageImportTitleFactory.php
M includes/title/TitleFormatter.php
M includes/title/TitleParser.php
M includes/title/TitleValue.php
M tests/phpunit/includes/libs/http/HttpAcceptNegotiatorTest.php
M tests/phpunit/includes/libs/http/HttpAcceptParserTest.php
M tests/phpunit/includes/libs/rdbms/connectionmanager/ConnectionManagerTest.php
M 
tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
M tests/phpunit/includes/linkeddata/PageDataRequestHandlerTest.php
M tests/phpunit/includes/specials/SpecialPageDataTest.php
M tests/phpunit/languages/LanguageCodeTest.php
31 files changed, 86 insertions(+), 44 deletions(-)

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



diff --git a/includes/MWGrants.php b/includes/MWGrants.php
index c7c54fd..ba22590 100644
--- a/includes/MWGrants.php
+++ b/includes/MWGrants.php
@@ -1,7 +1,5 @@
 http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
  */
 use MediaWiki\MediaWikiServices;
 
diff --git a/includes/changes/ChangesListBooleanFilter.php 
b/includes/changes/ChangesListBooleanFilter.php
index 2a7ba88..f37ed2d 100644
--- a/includes/changes/ChangesListBooleanFilter.php
+++ b/includes/changes/ChangesListBooleanFilter.php
@@ -18,14 +18,13 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @license GPL 2+
  * @author Matthew Flaschen
  */
 
 use Wikimedia\Rdbms\IDatabase;
 
 /**
- * An individual filter in a boolean group
+ * Represents a hide-based boolean filter (used on ChangesListSpecialPage and 
descendants)
  *
  * @since 1.29
  */
diff --git a/includes/changes/ChangesListFilter.php 
b/includes/changes/ChangesListFilter.php
index d1ecd84..d191453 100644
--- a/includes/changes/ChangesListFilter.php
+++ b/includes/changes/ChangesListFilter.php
@@ -18,7 +18,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @license GPL 2+
  * @author Matthew Flaschen
  */
 
diff --git a/includes/changes/ChangesListFilterGroup.php 
b/includes/changes/ChangesListFilterGroup.php
index f569dca..3e2c464 100644
--- a/includes/changes/ChangesListFilterGroup.php
+++ b/includes/changes/ChangesListFilterGroup.php
@@ -18,7 +18,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @license GPL 2+
  * @author Matthew Flaschen
  */
 
diff --git a/includes/changes/ChangesListStringOptionsFilterGroup.php 
b/includes/changes/ChangesListStringOptionsFilterGroup.php
index 1497a44..8cd7ba8 100644
--- a/includes/changes/ChangesListStringOptionsFilterGroup.php
+++ b/includes/changes/ChangesListStringOptionsFilterGroup.php
@@ -18,7 +18,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @license GPL 2+
  * @author Matthew Flaschen
  */
 
diff --git a/includes/libs/rdbms/connectionmanager/ConnectionManager.php 
b/includes/libs/rdbms/connectionmanager/ConnectionManager.php
index 212ff31..4a497b0 100644
--- a/includes/libs/rdbms/connectionmanager/ConnectionManager.php
+++ b/includes/libs/rdbms/connectionmanager/ConnectionManager.php
@@ -1,4 +1,23 @@
 http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
 
 namespace Wikimedia\Rdbms;
 
@@ -11,7 +30,6 @@
  *
  * @since 1.29
  *
- * @license GPL-2.0+
  * @author Addshore
  */
 class ConnectionManager {
diff --git 
a/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php 
b/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[specialpages]: Special:MobileOptions should only list features in beta but ...

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

Change subject: Special:MobileOptions should only list features in beta but not 
stable
..


Special:MobileOptions should only list features in beta but not stable

Change-Id: Ic99fc2505748945b9e22527f40a7d2247aa7a1f4
---
M includes/features/Feature.php
M includes/features/IFeature.php
M includes/specials/SpecialMobileOptions.php
3 files changed, 24 insertions(+), 3 deletions(-)

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



diff --git a/includes/features/Feature.php b/includes/features/Feature.php
index b29cd13..17cb862 100644
--- a/includes/features/Feature.php
+++ b/includes/features/Feature.php
@@ -37,6 +37,13 @@
/**
 * @inheritDoc
 */
+   public function __toString() {
+   return $this->name;
+   }
+
+   /**
+* @inheritDoc
+*/
public function isAvailable( $mode ) {
return array_key_exists( $mode, $this->options ) ?
$this->options[ $mode ] : self::DEFAULT_ENABLED_MODE;
diff --git a/includes/features/IFeature.php b/includes/features/IFeature.php
index 1efae64..af9fd75 100644
--- a/includes/features/IFeature.php
+++ b/includes/features/IFeature.php
@@ -29,6 +29,14 @@
public function getGroup();
 
/**
+* Serialise the feature as a string so that the feature manager can 
perform array_diff
+* and array_intersect on results and identify where features are 
available and where they are not.
+* This should return the value of getId.
+* @return string
+*/
+   public function __toString();
+
+   /**
 * Check feature availability in given mode ( Stable, beta, alpha etc )
 * @param string $mode Mode
 * @return bool
diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 80cf3df..4d1aed9 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -1,5 +1,7 @@
 getService( 'MobileFrontend.FeaturesManager' )
-   ->getAvailable( MobileContext::MODE_BETA );
+   $manager = \MediaWiki\MediaWikiServices::getInstance()
+   ->getService( 'MobileFrontend.FeaturesManager' 
);
+
+   $features = array_diff(
+   $manager->getAvailable( IFeature::CONFIG_BETA ),
+   $manager->getAvailable( IFeature::CONFIG_STABLE 
)
+   );
 
$classNames = [ 'mobile-options-beta-feature' ];
if ( $isInBeta ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic99fc2505748945b9e22527f40a7d2247aa7a1f4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: specialpages
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Pmiazga 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...EtherpadLite[master]: Using the extension registration

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

Change subject: Using the extension registration
..


Using the extension registration

Bug: T184773
Change-Id: I2584f9fc81a570451295b1266dd796e9a358b3e2
---
M EtherpadLite.php
A README.md
A extension.json
3 files changed, 149 insertions(+), 108 deletions(-)

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



diff --git a/EtherpadLite.php b/EtherpadLite.php
index 1d19065..9405082 100644
--- a/EtherpadLite.php
+++ b/EtherpadLite.php
@@ -1,109 +1,14 @@
 
- * 
- * 
- * http://www.another-pad-server.org/p/; />
- *
- * Installation:
- *
- * Add the following lines in LocalSettings.php:
- *
- * require_once( "$IP/extensions/EtherpadLite/EtherpadLite.php" );
- * Etherpad Lite host server Url.
- * The shown one is a test server: it is not meant for production.
- * $wgEtherpadLiteDefaultPadUrl= "http://beta.etherpad.org/p/;;
- * $wgEtherpadLiteDefaultWidth = "600px";
- * $wgEtherpadLiteDefaultHeigth= "400px";
- *
- * Prerequisite:
- *
- * You need at least one Etherpad Lite host server
- * The shown one is a test server: it is not meant for production.
- * $wgEtherpadLiteDefaultPadUrl = "http://beta.etherpad.org/p/;;
- *
- * For setting up your own Etherpad Lite server (based on node.js) see
- * Etherpad Lite homepage https://github.com/Pita/etherpad-lite
- *
- * This extension is based on:
- *
- * https://github.com/johnyma22/etherpad-lite-jquery-plugin
- * https://github.com/Pita/etherpad-lite/wiki/Embed-Parameters
- *
- * The present MediaWiki extension does not require jquery. It adds an iframe.
- *
- * @author Thomas Gries
- * @license GPL v2
- * @license MIT
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- */
-
-# Check environment
-if ( !defined( 'MEDIAWIKI' ) ) {
-   echo( "This is an extension to MediaWiki and cannot be run 
standalone.\n" );
-   die( - 1 );
-}
-
-# Credits
-$wgExtensionCredits['parserhook'][] = array(
-   'path' => __FILE__,
-   'name' => 'EtherpadLite',
-   'author' => array( 'Thomas Gries' ),
-   'version' => '1.14.0 20140331',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:EtherpadLite',
-   'descriptionmsg' => 'etherpadlite-desc',
-);
-
-$dir = dirname( __FILE__ ) . '/';
-$wgMessagesDirs['EtherpadLite'] = __DIR__ . '/i18n';
-$wgAutoloadClasses['EtherpadLite'] = $dir . 'EtherpadLite_body.php';
-$wgHooks['ParserFirstCallInit'][] = 'EtherpadLite::EtherpadLiteParserInit';
-
-# for Special:TrackingCategories
-$wgTrackingCategories[] = 'etherpadlite-tracking-category';
-
-# Define a default Etherpad Lite server Url and base path
-# unless a different server is defined with the src= attribute
-$wgEtherpadLiteDefaultPadUrl= "http://beta.etherpad.org/p/;;
-
-$wgEtherpadLiteDefaultWidth = "300px";
-$wgEtherpadLiteDefaultHeight= "200px";
-$wgEtherpadLiteMonospacedFont   = false;
-$wgEtherpadLiteShowControls = true;
-$wgEtherpadLiteShowLineNumbers  = true;
-$wgEtherpadLiteShowChat = true;
-$wgEtherpadLiteShowAuthorColors = true;
-
-# Whitelist of allowed Etherpad Lite server Urls
-#
-# If there are items in the array, and the user supplied URL is not in the 
array,
-# the url will not be allowed
-#
-# Urls are case-sensitively tested against values in the array.
-# They must exactly match including any trailing "/" character.
-#
-# Warning: Allowing all urls (not setting a whitelist)
-# may be a security concern.
-#
-# an empty or non-existent array means: no whitelist defined
-# this is the default: an empty whitelist. No servers are allowed by default.
-
-$wgEtherpadLiteUrlWhitelist = array();
-
-# include "*" if you expressly want to allow all urls (you should not do this)
-# $wgEtherpadLiteUrlWhitelist = array( "*" );
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'EtherpadLite' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['EtherpadLite'] = __DIR__ . '/i18n';
+   wfWarn(
+   'Deprecated PHP entry point used for the EtherpadLite 
extension. ' .
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+} else {
+   die( 'This version of the EtherpadLite extension requires MediaWiki 
1.25+' );
+}
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 000..5576659
--- /dev/null
+++ b/README.md
@@ -0,0 +1,81 @@
+#EtherpadLite
+
+[View on mediawiki.org](https://www.mediawiki.org/wiki/Extension:EtherpadLite)
+
+The extension adds a tag "eplite" to the MediaWiki parser and
+provides a method to embed Etherpad Lite pads on MediaWiki pages.
+An Etherpad Lite server is not part 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Stop distributing the 2016 digicert unified certs

2018-01-12 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403979 )

Change subject: Stop distributing the 2016 digicert unified certs
..


Stop distributing the 2016 digicert unified certs

Change-Id: I2f337b3069ed11127b0b8a5bc2fad9a931e76714
---
M modules/profile/manifests/cache/ssl/unified.pp
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/modules/profile/manifests/cache/ssl/unified.pp 
b/modules/profile/manifests/cache/ssl/unified.pp
index 9396942..7aadbb9 100644
--- a/modules/profile/manifests/cache/ssl/unified.pp
+++ b/modules/profile/manifests/cache/ssl/unified.pp
@@ -32,7 +32,6 @@
 $certs = [
 'globalsign-2017-ecdsa-unified', 'globalsign-2017-rsa-unified',
 'digicert-2017-ecdsa-unified', 'digicert-2017-rsa-unified',
-'digicert-2016-ecdsa-unified', 'digicert-2016-rsa-unified',
 ]
 tlsproxy::localssl { 'unified':
 server_name=> 'www.wikimedia.org',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f337b3069ed11127b0b8a5bc2fad9a931e76714
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Stop distributing the 2016 digicert unified certs

2018-01-12 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403979 )

Change subject: Stop distributing the 2016 digicert unified certs
..

Stop distributing the 2016 digicert unified certs

Change-Id: I2f337b3069ed11127b0b8a5bc2fad9a931e76714
---
M modules/profile/manifests/cache/ssl/unified.pp
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/79/403979/1

diff --git a/modules/profile/manifests/cache/ssl/unified.pp 
b/modules/profile/manifests/cache/ssl/unified.pp
index 9396942..7aadbb9 100644
--- a/modules/profile/manifests/cache/ssl/unified.pp
+++ b/modules/profile/manifests/cache/ssl/unified.pp
@@ -32,7 +32,6 @@
 $certs = [
 'globalsign-2017-ecdsa-unified', 'globalsign-2017-rsa-unified',
 'digicert-2017-ecdsa-unified', 'digicert-2017-rsa-unified',
-'digicert-2016-ecdsa-unified', 'digicert-2016-rsa-unified',
 ]
 tlsproxy::localssl { 'unified':
 server_name=> 'www.wikimedia.org',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: mw-maintenance: move mariadb maintenance to tendril

2018-01-12 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403978 )

Change subject: mw-maintenance: move mariadb maintenance to tendril
..

mw-maintenance: move mariadb maintenance to tendril

As described by jynus on T184797:

The so called "mariadb maintenance" isn't really database
maintenance but just some scripts related to tendril.

Move it out of the Mediawiki maintenance role and servers
as unrelated.

Put into tendril role applied on dbmonitor servers instead.

Adjust Hiera and enable cron in eqiad while disabling it in codfw.

Bug: T184797
Change-Id: I6243444f27c37746b8e3793942d5396b9ddfa9ce
---
M hieradata/role/codfw/mediawiki_maintenance.yaml
A hieradata/role/codfw/tendril.yaml
M hieradata/role/common/mediawiki_maintenance.yaml
A hieradata/role/eqiad/tendril.yaml
M modules/role/manifests/mediawiki_maintenance.pp
M modules/role/manifests/tendril.pp
6 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/403978/1

diff --git a/hieradata/role/codfw/mediawiki_maintenance.yaml 
b/hieradata/role/codfw/mediawiki_maintenance.yaml
index 2ecbf52..e69de29 100644
--- a/hieradata/role/codfw/mediawiki_maintenance.yaml
+++ b/hieradata/role/codfw/mediawiki_maintenance.yaml
@@ -1 +0,0 @@
-profile::mariadb::maintenance::ensure: absent
diff --git a/hieradata/role/codfw/tendril.yaml 
b/hieradata/role/codfw/tendril.yaml
new file mode 100644
index 000..2ecbf52
--- /dev/null
+++ b/hieradata/role/codfw/tendril.yaml
@@ -0,0 +1 @@
+profile::mariadb::maintenance::ensure: absent
diff --git a/hieradata/role/common/mediawiki_maintenance.yaml 
b/hieradata/role/common/mediawiki_maintenance.yaml
index bc372b3..49b1344 100644
--- a/hieradata/role/common/mediawiki_maintenance.yaml
+++ b/hieradata/role/common/mediawiki_maintenance.yaml
@@ -17,7 +17,6 @@
   # Kill queries only after 1 day
   read_timeout: 8640
 nutcracker::verbosity: "4"
-profile::mariadb::maintenance::ensure: present
 
 # whitelist maintenance servers from screen monitoring
 # many users have permanent sessions here (T165348)
diff --git a/hieradata/role/eqiad/tendril.yaml 
b/hieradata/role/eqiad/tendril.yaml
new file mode 100644
index 000..70da1d8
--- /dev/null
+++ b/hieradata/role/eqiad/tendril.yaml
@@ -0,0 +1 @@
+profile::mariadb::maintenance::ensure: present
diff --git a/modules/role/manifests/mediawiki_maintenance.pp 
b/modules/role/manifests/mediawiki_maintenance.pp
index f7666c4..a2ecf6b 100644
--- a/modules/role/manifests/mediawiki_maintenance.pp
+++ b/modules/role/manifests/mediawiki_maintenance.pp
@@ -6,9 +6,6 @@
 include ::role::mediawiki::common
 include ::profile::mediawiki::maintenance
 
-# MariaDB (Tendril)
-include ::profile::mariadb::maintenance
-
 # NOC - https://noc.wikimedia.org/
 include ::role::noc::site
 
diff --git a/modules/role/manifests/tendril.pp 
b/modules/role/manifests/tendril.pp
index 8a63e00..3ecc1e3 100644
--- a/modules/role/manifests/tendril.pp
+++ b/modules/role/manifests/tendril.pp
@@ -31,6 +31,9 @@
 auth_name=> 'WMF Labs (use wiki login name not shell) - 
nda/ops/wmf',
 }
 
+# MariaDB (Tendril) maintenance
+include ::profile::mariadb::maintenance
+
 # Make tendril active-passive cross-datacenter until a local db backend is
 # available on codfw to avoid cross-dc queries or TLS is used to connect
 if hiera('do_acme', true) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Flatten DOM anchors if no attributes kept

2018-01-12 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403977 )

Change subject: Flatten DOM anchors if no attributes kept
..

Flatten DOM anchors if no attributes kept

The flattenElements method previously did not really flatten in a DOM
sense because it changed the  tags to another element ().
This patch proposes to really flatten the  tags to plain text,
but only if there is no (class) attribute to be retained.

Bug: T177007
Change-Id: Ib2e63e665d62e8a80215c456c7832a8e965caad1
---
M lib/transformations/flattenElements.js
A test/lib/transformations/flattenElements.test.js
M test/lib/transformations/summarize.js
3 files changed, 62 insertions(+), 19 deletions(-)


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

diff --git a/lib/transformations/flattenElements.js 
b/lib/transformations/flattenElements.js
index 42f9ea9..f3d917f 100644
--- a/lib/transformations/flattenElements.js
+++ b/lib/transformations/flattenElements.js
@@ -1,21 +1,45 @@
 'use strict';
 
+const KEEP_ATTRIBUTE = 'class';
+
 /**
- * Replace all elements in Document `content` that match the
- * css selector, replacing them with span tags.
- * @param {!Document} content
+ * Copies only select attributes from one DOM element to another.
+ * @param {!Element} oldElement the element to copy attributes from
+ * @param {!Element} newElement the element to copy attributes to
+ * @param {!String} name the name of the attribute
+ */
+function copyAttribute(oldElement, newElement, name) {
+if (oldElement.getAttribute(name)) {
+newElement.setAttribute(name, oldElement.getAttribute(name));
+}
+}
+
+function createReplacementNode(oldElement, document) {
+if (oldElement.getAttribute(KEEP_ATTRIBUTE)) {
+const spanElement = document.createElement('span');
+spanElement.innerHTML = oldElement.innerHTML;
+copyAttribute(oldElement, spanElement, KEEP_ATTRIBUTE);
+return spanElement;
+} else {
+return document.createTextNode(oldElement.innerHTML);
+}
+}
+
+/**
+ * Replaces all elements in the given Document which match the
+ * CSS selector, replacing them with span tags or text.
+ * If the resulting span tag doesn't have any attributes then
+ * the element is replaced with a TextNode of the same content.
+ * The main purpose of this is to disable certain  tags.
+ * @param {!Document} document
  * @param {string} selector
  */
-function flattenElements(content, selector) {
-const elements = content.querySelectorAll(selector);
+function flattenElements(document, selector) {
+const elements = document.querySelectorAll(selector);
 for (let i = 0; i < elements.length; i++) {
-const element = elements[i];
-const replacementSpan = content.createElement('span');
-replacementSpan.innerHTML = element.innerHTML;
-if (element.getAttribute('class')) {
-replacementSpan.setAttribute('class', 
element.getAttribute('class'));
-}
-element.parentNode.replaceChild(replacementSpan, element);
+const oldElement = elements[i];
+const newNode = createReplacementNode(oldElement, document);
+oldElement.parentNode.replaceChild(newNode, oldElement);
 }
 }
 
diff --git a/test/lib/transformations/flattenElements.test.js 
b/test/lib/transformations/flattenElements.test.js
new file mode 100644
index 000..4bd1726
--- /dev/null
+++ b/test/lib/transformations/flattenElements.test.js
@@ -0,0 +1,19 @@
+"use strict";
+
+const domino = require('domino');
+const assert = require('./../../utils/assert.js');
+const flattenElements = 
require('./../../../lib/transformations/flattenElements');
+
+describe('lib:flattenElements', () => {
+it('replaces a with span, keeps class attribute', () => {
+const document = domino.createDocument('foo');
+flattenElements(document, 'a');
+assert.deepEqual(document.body.innerHTML, 'foo');
+});
+
+it('replaces a tag with plain text if no attributes to keep', () => {
+const document = domino.createDocument('foo');
+flattenElements(document, 'a');
+assert.deepEqual(document.body.innerHTML, 'foo');
+});
+});
diff --git a/test/lib/transformations/summarize.js 
b/test/lib/transformations/summarize.js
index fe90123..ec25458 100644
--- a/test/lib/transformations/summarize.js
+++ b/test/lib/transformations/summarize.js
@@ -36,7 +36,7 @@
 // Should flatten links
 [
 'This is some content with a link.',
-'This is some content with a link.'
+'This is some content with a link.'
 ],
 // Should strip .noexcerpt
 [
@@ -125,22 +125,22 @@
 // Content inside Cantonese parentheticals are also stripped
 [
 '蔡英文(Tsai 
Ing-wen,1956年8月31號—)係現任中華民國總統,臺灣學者同埋政治人,民主進步黨主席。',
-

[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: Add skip-slave-start alias for jynus

2018-01-12 Thread Jcrespo (Code Review)
Jcrespo has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403976 )

Change subject: admin: Add skip-slave-start alias for jynus
..


admin: Add skip-slave-start alias for jynus

systemctl is so intuitive!

Change-Id: If0bd59de8db3004e34347cd79ca0e0c989b6133a
---
M modules/admin/files/home/jynus/.bashrc
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/admin/files/home/jynus/.bashrc 
b/modules/admin/files/home/jynus/.bashrc
index 45350ba..f2373fe 100644
--- a/modules/admin/files/home/jynus/.bashrc
+++ b/modules/admin/files/home/jynus/.bashrc
@@ -12,3 +12,4 @@
 alias my='mysql --disable-auto-rehash --skip-ssl --host=localhost --user=root 
--prompt="\u@$(hostname)[\d]> " --pager="grcat /etc/mysql/grcat.config | less 
-RSFXin"'
 alias mysqlbinlog='mysqlbinlog -vv --base64-output=DECODE-ROWS --skip-ssl'
 alias ls='ls --color=auto'
+alias skip-slave-start='systemctl set-environment 
MYSQLD_OPTS="--skip-slave-start"'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0bd59de8db3004e34347cd79ca0e0c989b6133a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
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] mediawiki...DeleteBatch[master]: Convert DeleteBatch to use extension registration

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

Change subject: Convert DeleteBatch to use extension registration
..


Convert DeleteBatch to use extension registration

Bug: T180818
Change-Id: Ibca3f2d3bbb4c9b6128a26ed6c95f50c1ea310f0
---
M DeleteBatch.php
A extension.json
2 files changed, 71 insertions(+), 40 deletions(-)

Approvals:
  Mainframe98: Looks good to me, but someone else must approve
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/DeleteBatch.php b/DeleteBatch.php
index fcd77ca..4f91483 100644
--- a/DeleteBatch.php
+++ b/DeleteBatch.php
@@ -1,43 +1,35 @@
 
- * @version 1.6.0
- * @license https://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
- * @link https://www.mediawiki.org/wiki/Extension:DeleteBatch Documentation
- */
-
-// Ensure that the script cannot be executed outside of MediaWiki.
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die( 'This is an extension to MediaWiki and cannot be run standalone.' 
);
+* DeleteBatch - a special page to delete a batch of pages
+*
+* Copyright (C) 2008, Bartek Łapiński 
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor,
+* Boston, MA  02110-1301, USA.
+*/
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'DeleteBatch' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['DeleteBatch'] = __DIR__ . '/i18n';
+   $wgExtensionMessagesFiles['DeleteBatchAlias'] = __DIR__ . 
'/DeleteBatch.alias.php';
+   wfWarn(
+   'Deprecated PHP entry point used for the DeleteBatch extension. 
' .
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+} else {
+   die( 'This version of the DeleteBatch extension requires MediaWiki 
1.29+' );
 }
-// Extension credits that will show up on Special:version
-$wgExtensionCredits['specialpage'][] = array(
-   'path' => __FILE__,
-   'name' => 'Delete Batch',
-   'version' => '1.6.0',
-   'author' => array(
-   'Bartek Łapiński',
-   '...'
-   ),
-   'url' => 'https://www.mediawiki.org/wiki/Extension:DeleteBatch',
-   'descriptionmsg' => 'deletebatch-desc',
-   'license-name' => 'GPL-2.0-or-later'
-);
-
-// New user right, required to use Special:DeleteBatch
-$wgAvailableRights[] = 'deletebatch';
-$wgGroupPermissions['bureaucrat']['deletebatch'] = true;
-
-// Set up the new special page
-$wgMessagesDirs['DeleteBatch'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['DeleteBatchAlias'] = __DIR__ . 
'/DeleteBatch.alias.php';
-$wgAutoloadClasses['SpecialDeleteBatch'] = __DIR__ . '/DeleteBatch.body.php';
-$wgAutoloadClasses['DeleteBatchForm'] = __DIR__ . '/DeleteBatch.body.php';
-$wgSpecialPages['DeleteBatch'] = 'SpecialDeleteBatch';
-
-// Hooks
-$wgHooks['AdminLinks'][] = 'SpecialDeleteBatch::addToAdminLinks'; // Admin 
Links extension
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..bd4cc0f
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,39 @@
+{
+   "name": "DeleteBatch",
+   "version": "1.7.0",
+   "author": [
+   "Bartek Łapiński",
+   "..."
+   ],
+   "url": "https://www.mediawiki.org/wiki/Extension:DeleteBatch;,
+   "descriptionmsg": "deletebatch-desc",
+   "license-name": "GPL-2.0-or-later",
+   "type": "specialpage",
+   "AvailableRights": [
+   "deletebatch"
+   ],
+   "GroupPermissions": {
+   "bureaucrat": {
+   "deletebatch": true
+   }
+   },
+   "SpecialPages": {
+   "DeleteBatch": "SpecialDeleteBatch"
+   },
+   "MessagesDirs": {
+   "DeleteBatch": [
+   "i18n"
+   ]
+   },
+   "ExtensionMessagesFiles": {
+   "DeleteBatchAlias": "DeleteBatch.alias.php"
+   },
+   "AutoloadClasses": {
+   "SpecialDeleteBatch": "DeleteBatch.body.php",
+   "DeleteBatchForm": "DeleteBatch.body.php"
+   },
+   "Hooks": {
+   "AdminLinks": 

[MediaWiki-commits] [Gerrit] mediawiki...CloseWikis[master]: Convert CloseWikis to use extension registration

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

Change subject: Convert CloseWikis to use extension registration
..


Convert CloseWikis to use extension registration

Bug: T172038
Change-Id: Ia373ef38e7df88151a11219b1d26534c111ee4a6
---
A CloseWikis.class.php
M CloseWikis.php
A CloseWikisHooks.php
A CloseWikisRow.php
A extension.json
5 files changed, 240 insertions(+), 199 deletions(-)

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



diff --git a/CloseWikis.class.php b/CloseWikis.class.php
new file mode 100644
index 000..b1cbf4f
--- /dev/null
+++ b/CloseWikis.class.php
@@ -0,0 +1,105 @@
+select( 'closedwikis', '*', false, __METHOD__ );
+   foreach( $result as $row ) {
+   $list[] = new CloseWikisRow( $row );
+   }
+   $dbr->freeResult( $result );
+   return $list;
+   }
+
+   /** Returns list of closed wikis in form of string array. Cached in 
CloseWikis::$cachedList */
+   static function getList() {
+   if( self::$cachedList ) {
+   return self::$cachedList;
+   }
+   $list = array();
+   $dbr = self::getMasterDB(); // Used only on writes
+   $result = $dbr->select( 'closedwikis', 'cw_wiki', false, 
__METHOD__ );
+   foreach( $result as $row ) {
+   $list[] = $row->cw_wiki;
+   }
+   $dbr->freeResult( $result );
+   self::$cachedList = $list;
+   return $list;
+   }
+
+   /** Returns list of unclosed wikis in form of string array. Based on 
getList() */
+   static function getUnclosedList() {
+   global $wgLocalDatabases;
+   return array_diff( $wgLocalDatabases, self::getList() );
+   }
+
+   /** Returns a CloseWikisRow for specific wiki. Cached in $wgMemc */
+   static function getClosedRow( $wiki ) {
+   global $wgMemc;
+   $memcKey = "closedwikis:{$wiki}";
+   $cached = $wgMemc->get( $memcKey );
+   if( is_object( $cached ) ) {
+   return $cached;
+   }
+   $dbr = self::getSlaveDB();
+   $result = new CloseWikisRow( $dbr->selectRow( 'closedwikis', 
'*', array( 'cw_wiki' => $wiki ), __METHOD__ ) );
+   $wgMemc->set( $memcKey, $result );
+   return $result;
+   }
+
+   /** Closes a wiki
+*
+* @param $by User
+*/
+   static function close( $wiki, $dispreason, $by ) {
+   global $wgMemc;
+   $dbw = self::getMasterDB();
+   $dbw->startAtomic( __METHOD__ );
+   $dbw->insert(
+   'closedwikis',
+   array(
+   'cw_wiki' => $wiki,
+   'cw_reason' => $dispreason,
+   'cw_timestamp' => $dbw->timestamp( 
wfTimestampNow() ),
+   'cw_by' => $by->getName(),
+   ),
+   __METHOD__,
+   array( 'IGNORE' )   // Better error handling
+   );
+   $result = (bool)$dbw->affectedRows();
+   $dbw->endAtomic( __METHOD__ );
+   $wgMemc->delete( "closedwikis:{$wiki}" );
+   self::$cachedList = null;
+   return $result;
+   }
+
+   /** Reopens a wiki */
+   static function reopen( $wiki ) {
+   global $wgMemc;
+   $dbw = self::getMasterDB();
+   $dbw->startAtomic( __METHOD__ );
+   $dbw->delete(
+   'closedwikis',
+   array( 'cw_wiki' => $wiki ),
+   __METHOD__
+   );
+   $result = (bool)$dbw->affectedRows();
+   $dbw->endAtomic( __METHOD__ );
+   $wgMemc->delete( "closedwikis:{$wiki}" );
+   self::$cachedList = null;
+   return $result;
+   }
+}
diff --git a/CloseWikis.php b/CloseWikis.php
index 28af227..e662178 100644
--- a/CloseWikis.php
+++ b/CloseWikis.php
@@ -18,203 +18,17 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA 02110-1301, USA.
  */
-
-if ( !defined( 'MEDIAWIKI' ) )
-   die();
-
-$wgExtensionCredits['other'][] = array(
-   'path'   => __FILE__,
-   'name'   => 'CloseWikis',
-   'author' => array( 'Victor Vasiliev', 'Hydriz Scholz' ),
-   'descriptionmsg' => 'closewikis-desc',
-   'url'=> 
'https://www.mediawiki.org/wiki/Extension:CloseWikis',
-   'license-name'   => 'GPL-2.0-or-later',
-);
-
-$dir = dirname( __FILE__ );
-$wgMessagesDirs['CloseWikis'] = __DIR__ . '/i18n';

[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Actually mark abusefilter creations as such in the AbuseFilt...

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

Change subject: Actually mark abusefilter creations as such in the AbuseFilter 
log
..


Actually mark abusefilter creations as such in the AbuseFilter log

Bug: T178283
Co-Authored-By: Matěj Suchánek 
Change-Id: I89776eff2fc420b1fe3e2c3b88671749fadb57b4
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/AbuseFilterModifyLogFormatter.php
M includes/Views/AbuseFilterViewEdit.php
5 files changed, 27 insertions(+), 3 deletions(-)

Approvals:
  Huji: Looks good to me, but someone else must approve
  Matěj Suchánek: Looks good to me, but someone else must approve
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index f4f3c7c..3003772 100644
--- a/extension.json
+++ b/extension.json
@@ -46,7 +46,18 @@
},
"LogActionsHandlers": {
"abusefilter/hit": "AbuseLogHitFormatter",
-   "abusefilter/modify": "AbuseFilterModifyLogFormatter"
+   "abusefilter/modify": "AbuseFilterModifyLogFormatter",
+   "abusefilter/create": "AbuseFilterModifyLogFormatter"
+   },
+   "ActionFilteredLogs": {
+   "abusefilter": {
+   "modify": [
+   "modify"
+   ],
+   "create": [
+   "create"
+   ]
+   }
},
"APIModules": {
"abusefilterchecksyntax": "ApiAbuseFilterCheckSyntax",
diff --git a/i18n/en.json b/i18n/en.json
index 1a6ccf5..3631a26 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -84,6 +84,9 @@
"abusefilter-logentry-suppress": "hid \"[[$1]]\"",
"abusefilter-logentry-unsuppress": "unhid \"[[$1]]\"",
"logentry-abusefilter-hit": "$1 {{GENDER:$2|triggered}} $4, 
{{GENDER:$2|performing}} the action \"$5\" on $3. Actions taken: $6 ($7)",
+   "log-action-filter-abusefilter": "Type of filter change:",
+   "log-action-filter-abusefilter-create": "New filter creation",
+   "log-action-filter-abusefilter-modify": "Filter modification",
"abusefilter-management": "Abuse filter management",
"abusefilter-list": "All filters",
"abusefilter-list-id": "Filter ID",
@@ -397,6 +400,7 @@
"abusefilter-topnav-import": "Import filter",
"abusefilter-log-name": "Abuse filter log",
"abusefilter-log-header": "This log shows a summary of changes made to 
filters.\nFor full details, see [[Special:AbuseFilter/history|the list]] of 
recent filter changes.",
+   "abusefilter-logentry-create": "$1 {{GENDER:$2|created}} $4 ($5)",
"abusefilter-logentry-modify": "$1 {{GENDER:$2|modified}} $4 ($5)",
"abusefilter-log-noresults": "No results",
"abusefilter-diff-title": "Differences between versions",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 522cc1b..2ca993a 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -115,6 +115,9 @@
"abusefilter-logentry-suppress": "Log entry when hiding an abuse filter 
log entry. Parameters:\n* $1 is a link to the log ID with the log ID as 
description.",
"abusefilter-logentry-unsuppress": "Log entry when unhiding an abuse 
filter log entry. Parameters:\n* $1 is a link to the log ID with the log ID as 
description.",
"logentry-abusefilter-hit": "This message is for a log entry. 
Parameters:\n* $1 - user who performed the action\n* $2 - user who performed 
the action (to be used with GENDER)\n* $3 - link to the page, that the action 
that triggered the filter was made on\n* $4 - link to filter\n* $5 - action by 
user, like 'edit', 'move', 'create' etc.\n* $6 - actions taken by the filter\n* 
$7 - action details link",
+   "log-action-filter-abusefilter": 
"{{doc-log-action-filter-action|abusefilter}}",
+   "log-action-filter-abusefilter-create": 
"{{doc-log-action-filter-action|abusefilter|create}}",
+   "log-action-filter-abusefilter-modify": 
"{{doc-log-action-filter-action|abusefilter|modify}}",
"abusefilter-management": "Title of [[Special:AbuseFilter]]",
"abusefilter-list": "Used as HTML  
heading.\n\nFollowed by the fieldset label 
{{msg-mw|Abusefilter-list-options}}.",
"abusefilter-list-id": "Column header in abuse filter overview for the 
filter identifier.\n{{Identical|Filter ID}}",
@@ -428,6 +431,7 @@
"abusefilter-topnav-import": "Used as link text in the navigation 
toolbar.\n\nThe link points to [[Special:AbuseLog]].",
"abusefilter-log-name": "{{doc-logpage}}",
"abusefilter-log-header": "Used as description on 
[[Special:Log/abusefilter]]",
+   "abusefilter-logentry-create": "Parameters:\n* $1 - a link to a user 
page with a user name as link text, followed by a series of related links\n* $2 
- raw username, 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: Add skip-slave-start alias for jynus

2018-01-12 Thread Jcrespo (Code Review)
Jcrespo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403976 )

Change subject: admin: Add skip-slave-start alias for jynus
..

admin: Add skip-slave-start alias for jynus

systemctl is so intuitive!

Change-Id: If0bd59de8db3004e34347cd79ca0e0c989b6133a
---
M modules/admin/files/home/jynus/.bashrc
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/403976/1

diff --git a/modules/admin/files/home/jynus/.bashrc 
b/modules/admin/files/home/jynus/.bashrc
index 45350ba..f2373fe 100644
--- a/modules/admin/files/home/jynus/.bashrc
+++ b/modules/admin/files/home/jynus/.bashrc
@@ -12,3 +12,4 @@
 alias my='mysql --disable-auto-rehash --skip-ssl --host=localhost --user=root 
--prompt="\u@$(hostname)[\d]> " --pager="grcat /etc/mysql/grcat.config | less 
-RSFXin"'
 alias mysqlbinlog='mysqlbinlog -vv --base64-output=DECODE-ROWS --skip-ssl'
 alias ls='ls --color=auto'
+alias skip-slave-start='systemctl set-environment 
MYSQLD_OPTS="--skip-slave-start"'

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

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

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


[MediaWiki-commits] [Gerrit] marvin[master]: Update: favor rem to em and use CSS variables

2018-01-12 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403975 )

Change subject: Update: favor rem to em and use CSS variables
..

Update: favor rem to em and use CSS variables

Replace em units with rems and clean up some hardcoded values.

Change-Id: I407ec38a840388d9b669722c7e133e2b0f6bb572
---
M src/common/components/content-section/content-section.css
M src/common/components/content/styles/images.css
M src/common/components/content/styles/tables.css
3 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/75/403975/1

diff --git a/src/common/components/content-section/content-section.css 
b/src/common/components/content-section/content-section.css
index 934e727..ce73b40 100644
--- a/src/common/components/content-section/content-section.css
+++ b/src/common/components/content-section/content-section.css
@@ -6,6 +6,6 @@
 
 .ContentSection-header {
   /* Add a bottom divider under each section header. */
-  border-bottom: 1px solid var(--wmui-color-base80);
+  border-bottom: var(--border-width-base) solid var(--wmui-color-base80);
   padding: var(--half-space);
 }
diff --git a/src/common/components/content/styles/images.css 
b/src/common/components/content/styles/images.css
index 48938fe..a53c995 100644
--- a/src/common/components/content/styles/images.css
+++ b/src/common/components/content/styles/images.css
@@ -49,7 +49,7 @@
 /* 
http://localhost:3000/wiki/Pablo_Picasso?oldid=804068218#Synthetic_cubism:_1912.E2.80.931919
 */
   .Content
   .gallerytext {
-  margin: 0.5em 0;
+  margin: 0.5rem 0;
   font-size: var(--font-size-caption);
   color: var(--wmui-color-base20);
 }
diff --git a/src/common/components/content/styles/tables.css 
b/src/common/components/content/styles/tables.css
index 78882eb..3026827 100644
--- a/src/common/components/content/styles/tables.css
+++ b/src/common/components/content/styles/tables.css
@@ -28,7 +28,7 @@
 
 .Content table th,
 .Content td {
-  padding: 0.2em 0.5em;
+  padding: 0.2rem 0.5rem;
   font-size: 80%;
 
   /* Keep cells wide enough to contain their contents. This resets the more
@@ -39,32 +39,32 @@
 
 .Content .infobox {
   background-color: var(--wmui-color-base90);
-  border: 1px solid var(--wmui-color-base80);
+  border: var(--border-width-base) solid var(--wmui-color-base80);
 
   /* http://localhost:3000/wiki/Wolverine?oldid=804085375 */
   width: auto !important;
-  max-width: 22em !important;
+  max-width: 22rem !important;
 }
 
 @media (min-width: var(--min-width-large)) {
   .Content .infobox {
 /* http://localhost:3000/wiki/Wolverine?oldid=804085375 */
 float: right;
-margin: 0 0 1em 1em;
+margin: 0 0 1rem 1rem;
   }
 }
 
 .Content .infobox caption {
   font-size: 125%;
   font-weight: var(--font-weight-semibold);
-  padding: 0.2em;
+  padding: 0.2rem;
 }
 
 .Content .infobox td,
 .Content .infobox th {
   /* http://localhost:3000/wiki/China?oldid=804850001 (under "Transcriptions") 
*/
   text-align: left;
-  border-top: 1px solid var(--wmui-color-base80);
+  border-top: var(--border-width-base) solid var(--wmui-color-base80);
 }
 
 .Content .infobox tr:first-child > td,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Add missing period in API parameter documentation

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

Change subject: Add missing period in API parameter documentation
..


Add missing period in API parameter documentation

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

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



diff --git a/i18n/en.json b/i18n/en.json
index 8c65861..2271b21 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -53,7 +53,7 @@
"apihelp-wbcheckconstraints-summary": "Performs constraint checks on 
any entity you want and returns the result.",
"apihelp-wbcheckconstraints-param-id": "ID list of the entities to get 
the data from. Separate values with '|' or alternative.",
"apihelp-wbcheckconstraints-param-claimid": "GUID list identifying a 
claim to check a constraint report.  Separate values with '|'.",
-   "apihelp-wbcheckconstraints-param-constraintid": "Optional filter to 
return only the constraints that have the specified constraint ID",
+   "apihelp-wbcheckconstraints-param-constraintid": "Optional filter to 
return only the constraints that have the specified constraint ID.",
"apihelp-wbcheckconstraintparameters-summary": "Checks the constraint 
parameters of constraint statements.",
"apihelp-wbcheckconstraintparameters-extended-description": "Either or 
both of the property and constraintid parameters may be 
specified; all constraints selected by either parameter will be checked.",
"apihelp-wbcheckconstraintparameters-param-propertyid": "List of 
property IDs to check. All constraint statements of these properties will be 
checked.\n\nIf this parameter is specified, it must be nonempty.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I521d4c2ffae0cd257c0e254e2b3308fd2f5126eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/software[master]: mariadb: Kill almost all wikiuser queries, including replica...

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

Change subject: mariadb: Kill almost all wikiuser queries, including replica 
control
..


mariadb: Kill almost all wikiuser queries, including replica control

Also avoid warnings due to truncated long queries on a 1024 byte
field.

Also some cosmetic changes (addition of s8 references, etc.).

Bug: T180918
Change-Id: I5168ce208ba023e961ccc17d7634250eeb410176
---
M dbtools/events_coredb_slave.sql
1 file changed, 6 insertions(+), 9 deletions(-)

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



diff --git a/dbtools/events_coredb_slave.sql b/dbtools/events_coredb_slave.sql
index 73419fc..8de65f7 100644
--- a/dbtools/events_coredb_slave.sql
+++ b/dbtools/events_coredb_slave.sql
@@ -1,4 +1,7 @@
--- Events for s[1-7] slaves
+-- Events for s[1-8] core replicas
+
+-- Avoid replicating event DDL. Coredb events should only be created
+-- on s[1-8] though they may rely on replicated tables like event_log.
 
 set @cache_sql_log_bin := @@session.sql_log_bin;
 set @@session.sql_log_bin = 0;
@@ -23,13 +26,9 @@
   index server_stamp (server_id, stamp)
 ) engine=innodb default charset=binary;
 
--- Avoid replicating event DDL. Coredb events should only be created
--- on s[1-7] though they may rely on replicated tables like event_log.
-
 delimiter ;;
 
 -- Housekeeping
-
 
 drop event if exists wmf_master_wikiuser_sleep;;
 drop event if exists wmf_master_purge;;
@@ -76,8 +75,6 @@
 AND ps.PROCESSLIST_COMMAND = 'Query'
 AND ps.processlist_time between 60 and 100
 AND not lower(ps.PROCESSLIST_INFO) like '%wikiexporter%'
-AND not lower(ps.PROCESSLIST_INFO) like '%master\_pos\_wait%'
-AND not lower(ps.PROCESSLIST_INFO) like '%master\_gtid\_wait%'
 AND lower(ps.PROCESSLIST_INFO) like '%select%'
 ORDER BY ps.processlist_time DESC;
 
@@ -100,7 +97,7 @@
 kill thread_id;
 
 insert into event_log values (sid, now(), 'wmf_slave_wikiuser_slow 
(>60)',
-concat('kill ',thread_id, '; ',thread_query)
+concat('kill ',thread_id, '; ',LEFT(thread_query, 997))
 );
 
 end if;
@@ -230,7 +227,7 @@
 kill thread_id;
 
 insert into event_log values (sid, now(), 
'wmf_slave_overload',
-concat('kill ',thread_id,'; ',thread_query)
+concat('kill ',thread_id,'; ',LEFT(thread_query, 997))
 );
 
 end if;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5168ce208ba023e961ccc17d7634250eeb410176
Gerrit-PatchSet: 4
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Jcrespo 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Initial profiler for Beta Cluster

2018-01-12 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403974 )

Change subject: Initial profiler for Beta Cluster
..

Initial profiler for Beta Cluster

* profiler-labs.php: Like profiler.php, but for labs.

* StartProfiler-labs.php: Like StartProfiler.php, but for labs.
  Beta Cluster app servers will need to be updated to actually
  load this file from /srv/mediawiki/php-master, similar to how
  we do for prod branches already. Right now that logic is missing.

* PhpAutoPrepend-labs.php: To be loaded via auto_prepend_file
  in Beta Cluster. This will help profiling be more complete by
  starting earlier instead of from Setup.php. Currently, the
  relatively late start causes the profiling stack to be unbalanced
  because it will encounter closing of stacks that opened before
  the profiling started.
  We still still need StartProfiler.php, but only for the setting
  of $wgProfiler. And for sanity, we still not rely on state
  left behind by auto_prepend_file, which is why StartProfiler
  will also require_once profiler.php in case it wasn't loaded
  by auto_prepend_file.

Bug: T180183
BUg: T180766
Change-Id: Ie823761e48a557b985397e3d25da4e099c8dcc9e
---
A wmf-config/PhpAutoPrepend-labs.php
A wmf-config/StartProfiler-labs.php
A wmf-config/profiler-labs.php
3 files changed, 79 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/PhpAutoPrepend-labs.php 
b/wmf-config/PhpAutoPrepend-labs.php
new file mode 100644
index 000..392f5a4
--- /dev/null
+++ b/wmf-config/PhpAutoPrepend-labs.php
@@ -0,0 +1,17 @@
+https://secure.php.net/manual/en/ini.core.php#ini.auto-prepend-file
+ */
+
+require_once __DIR__ . '/profiler-labs.php';
diff --git a/wmf-config/StartProfiler-labs.php 
b/wmf-config/StartProfiler-labs.php
new file mode 100644
index 000..c3aea55
--- /dev/null
+++ b/wmf-config/StartProfiler-labs.php
@@ -0,0 +1,18 @@
+https://www.mediawiki.org/wiki/Manual:Profiling
+*/
+   if (
+   ( isset( $_GET['forceprofile'] ) && isset( 
$_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) )
+   || PHP_SAPI === 'cli'
+   ) {
+   $wmgProfiler = [
+   'class'  => 'ProfilerXhprof',
+   'flags'  => XHPROF_FLAGS_NO_BUILTINS,
+   'output' => 'text',
+   ];
+
+   }
+}

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove unused PhpAutoPrepend.php file for now.

2018-01-12 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403973 )

Change subject: Remove unused PhpAutoPrepend.php file for now.
..

Remove unused PhpAutoPrepend.php file for now.

Follows-up 96de34769, which created this file but isn't being used
by anything yet. To avoid confusion, better to remove for now.

I'll do this for Beta Cluster first.

Bug: T180183
Change-Id: Icddf76486c248495859ba29a10bf9ffe32d0add3
---
D wmf-config/PhpAutoPrepend.php
1 file changed, 0 insertions(+), 17 deletions(-)


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

diff --git a/wmf-config/PhpAutoPrepend.php b/wmf-config/PhpAutoPrepend.php
deleted file mode 100644
index acb19ff..000
--- a/wmf-config/PhpAutoPrepend.php
+++ /dev/null
@@ -1,17 +0,0 @@
-https://secure.php.net/manual/en/ini.core.php#ini.auto-prepend-file
- */
-
-require_once __DIR__ . '/profiler.php';

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Reformat CheckConstraints::getAllowedParams

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

Change subject: Reformat CheckConstraints::getAllowedParams
..


Reformat CheckConstraints::getAllowedParams

Fix the strange double indentation, and while we’re at it, also add
trailing commas to make future diffs prettier.

Change-Id: Ie131aa140a54d37d901c7b683100fc0d3959258f
---
M src/Api/CheckConstraints.php
1 file changed, 12 insertions(+), 12 deletions(-)

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



diff --git a/src/Api/CheckConstraints.php b/src/Api/CheckConstraints.php
index bcee76f..5f0676f 100644
--- a/src/Api/CheckConstraints.php
+++ b/src/Api/CheckConstraints.php
@@ -290,18 +290,18 @@
 */
public function getAllowedParams() {
return [
-   self::PARAM_ID => [
-   ApiBase::PARAM_TYPE => 'string',
-   ApiBase::PARAM_ISMULTI => true
-   ],
-   self::PARAM_CLAIM_ID => [
-   ApiBase::PARAM_TYPE => 'string',
-   ApiBase::PARAM_ISMULTI => true
-   ],
-   self::PARAM_CONSTRAINT_ID => [
-   ApiBase::PARAM_TYPE => 'string',
-   ApiBase::PARAM_ISMULTI => true
-   ]
+   self::PARAM_ID => [
+   ApiBase::PARAM_TYPE => 'string',
+   ApiBase::PARAM_ISMULTI => true,
+   ],
+   self::PARAM_CLAIM_ID => [
+   ApiBase::PARAM_TYPE => 'string',
+   ApiBase::PARAM_ISMULTI => true,
+   ],
+   self::PARAM_CONSTRAINT_ID => [
+   ApiBase::PARAM_TYPE => 'string',
+   ApiBase::PARAM_ISMULTI => true,
+   ],
];
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie131aa140a54d37d901c7b683100fc0d3959258f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Adding mgmt dns for lvs1013-16

2018-01-12 Thread Cmjohnson (Code Review)
Cmjohnson has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403971 )

Change subject: Adding mgmt dns for lvs1013-16
..


Adding mgmt dns for lvs1013-16

Bug: T184293
Change-Id: I78db1ae1c3f4a20a446b96d9ad9c85eb37671ac4
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 16 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 f79d8d4..48f3b87 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2249,6 +2249,14 @@
 121 1H  IN PTR  labweb1001.mgmt.eqiad.wmnet.
 122 1H  IN PTR  wmf7097.mgmt.eqiad.wmnet.
 122 1H  IN PTR  labweb1002.mgmt.eqiad.wmnet.
+123 1H  IN PTR  wmf7311.mgmt.eqiad.wmnet.
+123 1H  IN PTR  lvs1013.mgmt.eqiad.wmnet.
+124 1H  IN PTR  wmf7312.mgmt.eqiad.wmnet.
+124 1H  IN PTR  lvs1014.mgmt.eqiad.wmnet.
+125 1H  IN PTR  wmf7313.mgmt.eqiad.wmnet.
+125 1H  IN PTR  lvs1015.mgmt.eqiad.wmnet.
+126 1H  IN PTR  wmf7314.mgmt.eqiad.wmnet.
+126 1H  IN PTR  lvs1016.mgmt.eqiad.wmnet.
 
 $ORIGIN 5.65.{{ zonename }}.
 
diff --git a/templates/wmnet b/templates/wmnet
index f812f39..c95174f 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2044,12 +2044,19 @@
 lvs1010 1H  IN A10.65.4.21
 lvs1011 1H  IN A10.65.4.22
 lvs1012 1H  IN A10.65.4.23
+lvs1013 1H  IN A10.65.4.123
+wmf7311 1H  IN A10.65.4.123
+lvs1014 1H  IN A10.65.4.124
+wmf7312 1H  IN A10.65.4.124
+lvs1015 1H  IN A10.65.4.125
+wmf7313 1H  IN A10.65.4.125
+lvs1016 1H  IN A10.65.4.126
+wmf7314 1H  IN A10.65.4.126
 ruthenium   1H  IN A10.65.3.56
 wmf3431 1H  IN A10.65.3.56
 rhodium 1H  IN A10.65.3.57
 wmf3432 1H  IN A10.65.3.57
 indium  1H  IN A10.65.3.117
-
 payments10011H  IN A10.65.3.55
 wmf6951 1H  IN A10.65.3.55
 payments10021H  IN A10.65.3.47

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78db1ae1c3f4a20a446b96d9ad9c85eb37671ac4
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] mediawiki...Math[master]: Fix auto-height when CodeMirror not available

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

Change subject: Fix auto-height when CodeMirror not available
..


Fix auto-height when CodeMirror not available

Change-Id: I0e88b12b0e67f471bac8ab767cdeca8ac7bafeec
---
M modules/ve-math/ve.ui.MWLatexDialog.js
1 file changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/modules/ve-math/ve.ui.MWLatexDialog.js 
b/modules/ve-math/ve.ui.MWLatexDialog.js
index 102500e..402976d 100644
--- a/modules/ve-math/ve.ui.MWLatexDialog.js
+++ b/modules/ve-math/ve.ui.MWLatexDialog.js
@@ -274,12 +274,11 @@
  */
 ve.ui.MWLatexDialog.prototype.onWindowManagerResize = function () {
var dialog = this;
-   this.input.loadingPromise.done( function () {
+   this.input.loadingPromise.always( function () {
var availableSpace, maxInputHeight, singleLineHeight, minRows,
border = 1,
padding = 3,
borderAndPadding = 2 * ( border + padding );
-
// Toggle short mode as necessary
// NB a change of mode triggers a transition...
dialog.menuLayout.$element.toggleClass(
@@ -293,7 +292,11 @@
singleLineHeight = 19;
maxInputHeight = availableSpace - borderAndPadding;
minRows = Math.floor( maxInputHeight / singleLineHeight 
);
-   dialog.input.setMinRows( minRows );
+   dialog.input.loadingPromise.done( function () {
+   dialog.input.setMinRows( minRows );
+   } ).fail( function () {
+   dialog.input.$input.attr( 'rows', minRows );
+   } );
}, OO.ui.theme.getDialogTransitionDuration() );
} );
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e88b12b0e67f471bac8ab767cdeca8ac7bafeec
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: DLynch 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Physikerwelt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: build, demos, docs: Use “OOUI” as unified name

2018-01-12 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403972 )

Change subject: build, demos, docs: Use “OOUI” as unified name
..

build, demos, docs: Use “OOUI” as unified name

Bug: T182360
Change-Id: I005741ff06ff87725c29a9a4bb554572fc17594e
---
M .phpcs.xml
M Doxyfile
M Gruntfile.js
M LICENSE-MIT
M README.md
M build/banner.txt
M build/modules.yaml
M composer.json
M demos/demos.php
M demos/index.html
M jsduck.categories.json
M jsduck.eg-iframe.html
M jsduck.json
M package.json
M tests/QUnit.assert.equalDomElement.js
M tests/index.php
16 files changed, 23 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/72/403972/1

diff --git a/.phpcs.xml b/.phpcs.xml
index 742566f..c117f3c 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,5 +1,5 @@
 
-
+



diff --git a/Doxyfile b/Doxyfile
index 938aa52..e746cb4 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,6 +1,6 @@
 # Configuration file for Doxygen
 
-PROJECT_NAME   = "OOjs UI"
+PROJECT_NAME   = "OOUI"
 PROJECT_BRIEF  = "Object-Oriented JavaScript – User Interface"
 
 OUTPUT_DIRECTORY   = doc
diff --git a/Gruntfile.js b/Gruntfile.js
index 0eeb524..9745817 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -17,7 +17,7 @@
concatJsFiles = {},
concatOmnibus = {},
rtlFiles = {},
-   minBanner = '/*! OOjs UI v<%= pkg.version %> | 
http://oojs.mit-license.org */';
+   minBanner = '/*! OOUI v<%= pkg.version %> | 
http://oojs.mit-license.org */';
 
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
diff --git a/LICENSE-MIT b/LICENSE-MIT
index 7648d4c..8f0984c 100644
--- a/LICENSE-MIT
+++ b/LICENSE-MIT
@@ -1,4 +1,4 @@
-Copyright 2011-2018 OOjs UI Team and other contributors.
+Copyright 2011-2018 OOUI Team and other contributors.
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
diff --git a/README.md b/README.md
index f10330f..6e98d42 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
 
[![npm](https://img.shields.io/npm/v/oojs-ui.svg?style=flat)](https://www.npmjs.com/package/oojs-ui)
 
[![Packagist](https://img.shields.io/packagist/v/oojs/oojs-ui.svg?style=flat)](https://packagist.org/packages/oojs/oojs-ui)
 
[![David](https://img.shields.io/david/dev/wikimedia/oojs-ui.svg?style=flat)](https://david-dm.org/wikimedia/oojs-ui#info=devDependencies)
 
-OOjs UI
+OOUI
 =
 
-OOjs UI is a component-based JavaScript UI library. Key features:
+OOUI is a component-based JavaScript UI library. Key features:
 
 * Common widgets, layouts, and dialogs
 * Classes, elements, and mixins to create custom interfaces
@@ -95,7 +95,7 @@
 * Join the Wikimedia Developers mailing list, 
[wikitech-l](https://lists.wikimedia.org/mailman/listinfo/wikitech-l).
 * Chat with the maintainers on `#wikimedia-dev` on `irc.freenode.net`.
 * Ask questions on 
[StackOverflow](https://stackoverflow.com/tags/oojs-ui/info).
-* Watchlist the [documentation](https://www.mediawiki.org/wiki/OOjs_UI) on 
MediaWiki to stay updated.
+* Watchlist the [documentation](https://www.mediawiki.org/wiki/OOUI) on 
MediaWiki to stay updated.
 
 
 Versioning
diff --git a/build/banner.txt b/build/banner.txt
index e648477..0b32af1 100644
--- a/build/banner.txt
+++ b/build/banner.txt
@@ -1,8 +1,8 @@
 /*!
- * OOjs UI v<%= pkg.version %>
- * https://www.mediawiki.org/wiki/OOjs_UI
+ * OOUI v<%= pkg.version %>
+ * https://www.mediawiki.org/wiki/OOUI
  *
- * Copyright 2011–<%= grunt.template.today("") %> OOjs UI Team and other 
contributors.
+ * Copyright 2011–<%= grunt.template.today("") %> OOUI Team and other 
contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
diff --git a/build/modules.yaml b/build/modules.yaml
index 009d003..4a71c31 100644
--- a/build/modules.yaml
+++ b/build/modules.yaml
@@ -15,7 +15,7 @@
"src/Widget.js",
"src/Theme.js",
 
-   # Basic element mixins. These should be the same 
classes that are supported in OOjs UI PHP.
+   # Basic element mixins. These should be the same 
classes that are supported in OOUI PHP.
"src/mixins/TabIndexedElement.js",
"src/mixins/ButtonElement.js",
"src/mixins/GroupElement.js",
@@ -26,8 +26,8 @@
"src/mixins/TitledElement.js",
"src/mixins/AccessKeyedElement.js",
 
-   # The basic widgets and layouts. These should be the 
same classes that are supported in OOjs
-   # UI PHP. (Continued below, as some dependencies below 
depend on these.)
+   # The basic widgets 

[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Remove direction from @param

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

Change subject: Remove direction from @param
..


Remove direction from @param

[in], [out] or [in,out] are not used in MediaWiki code style

https://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmdparam

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

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



diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php 
b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
index 450ef30..3c63e4b 100644
--- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
+++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
@@ -465,9 +465,6 @@
$maxVar = 0;
foreach ( $tokens[$commentStart]['comment_tags'] as $pos => 
$tag ) {
$tagContent = $tokens[$tag]['content'];
-   if ( $tagContent !== '@param' && $tagContent !== 
'@params' ) {
-   continue;
-   }
 
if ( $tagContent === '@params' ) {
$error = 'Use @param tag in function comment 
instead of @params';
@@ -475,6 +472,16 @@
if ( $fix === true ) {
$phpcsFile->fixer->replaceToken( $tag, 
'@param' );
}
+   } elseif ( $tagContent === '@param[in]' || $tagContent 
=== '@param[out]' ||
+   $tagContent === '@param[in,out]'
+   ) {
+   $error = 'Use @param tag in function comment 
instead of %s';
+   $fix = $phpcsFile->addFixableError( $error, 
$tag, 'DirectionParam', [ $tagContent ] );
+   if ( $fix === true ) {
+   $phpcsFile->fixer->replaceToken( $tag, 
'@param' );
+   }
+   } elseif ( $tagContent !== '@param' ) {
+   continue;
}
 
$paramSpace = 0;
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php 
b/MediaWiki/Tests/files/Commenting/commenting_function.php
index ae5a2d0..fc48879 100644
--- a/MediaWiki/Tests/files/Commenting/commenting_function.php
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php
@@ -175,6 +175,16 @@
public function testSyntaxDocTag( $a ) {
return $a;
}
+
+   /**
+* @param[in] int $in A comment
+* @param[out] int &$out A comment
+* @param[in,out] int &$inOut A comment
+*/
+   public function testDirectionParam( $in, &$out, &$inOut ) {
+   $out = $in * $inOut;
+   $inOut = $in / $out;
+   }
 }
 
 class TestPassedExamples {
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect 
b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
index ec3d468..eff5ead 100644
--- a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
@@ -190,10 +190,19 @@
  | | (MediaWiki.Commenting.FunctionComment.SpacingDocStar)
  173 | ERROR   | [x] Expected 1 spaces before @return; 2 found
  | | (MediaWiki.Commenting.FunctionComment.SpacingDocTag)
- 180 | ERROR   | [ ] Only one object structure is allowed in a file
+ 180 | ERROR   | [x] Use @param tag in function comment instead of
+ | | @param[in]
+ | | (MediaWiki.Commenting.FunctionComment.DirectionParam)
+ 181 | ERROR   | [x] Use @param tag in function comment instead of
+ | | @param[out]
+ | | (MediaWiki.Commenting.FunctionComment.DirectionParam)
+ 182 | ERROR   | [x] Use @param tag in function comment instead of
+ | | @param[in,out]
+ | | (MediaWiki.Commenting.FunctionComment.DirectionParam)
+ 190 | ERROR   | [ ] Only one object structure is allowed in a file
  | | (Generic.Files.OneObjectStructurePerFile.MultipleFound)
- 247 | ERROR   | [ ] Only one object structure is allowed in a file
+ 257 | ERROR   | [ ] Only one object structure is allowed in a file
  | | (Generic.Files.OneObjectStructurePerFile.MultipleFound)
- 253 | ERROR   | [ ] Only one object structure is allowed in a file
+ 263 | ERROR   | [ ] Only one object structure is allowed in a file
  | | 

[MediaWiki-commits] [Gerrit] labs/libraryupgrader[master]: Add mediawiki/tools/minus-x to upgrade list

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

Change subject: Add mediawiki/tools/minus-x to upgrade list
..


Add mediawiki/tools/minus-x to upgrade list

It is using mediawiki/codesniffer

Change-Id: Iab89ca2f8ab7b0cabb0af2a35cccf0a0c2f8c13e
---
M upgrade.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/upgrade.py b/upgrade.py
index f6ca6f0..844a587 100755
--- a/upgrade.py
+++ b/upgrade.py
@@ -50,6 +50,7 @@
 'css-sanitizer',
 'integration/docroot',
 'labs/tools/stewardbots',
+'mediawiki/tools/minus-x',
 'mediawiki/tools/phan/SecurityCheckPlugin',
 'oojs',
 'oojs/ui',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab89ca2f8ab7b0cabb0af2a35cccf0a0c2f8c13e
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Adding mgmt dns for lvs1013-16

2018-01-12 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403971 )

Change subject: Adding mgmt dns for lvs1013-16
..

Adding mgmt dns for lvs1013-16

Bug: T184293
Change-Id: I78db1ae1c3f4a20a446b96d9ad9c85eb37671ac4
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 16 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/71/403971/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index f79d8d4..48f3b87 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2249,6 +2249,14 @@
 121 1H  IN PTR  labweb1001.mgmt.eqiad.wmnet.
 122 1H  IN PTR  wmf7097.mgmt.eqiad.wmnet.
 122 1H  IN PTR  labweb1002.mgmt.eqiad.wmnet.
+123 1H  IN PTR  wmf7311.mgmt.eqiad.wmnet.
+123 1H  IN PTR  lvs1013.mgmt.eqiad.wmnet.
+124 1H  IN PTR  wmf7312.mgmt.eqiad.wmnet.
+124 1H  IN PTR  lvs1014.mgmt.eqiad.wmnet.
+125 1H  IN PTR  wmf7313.mgmt.eqiad.wmnet.
+125 1H  IN PTR  lvs1015.mgmt.eqiad.wmnet.
+126 1H  IN PTR  wmf7314.mgmt.eqiad.wmnet.
+126 1H  IN PTR  lvs1016.mgmt.eqiad.wmnet.
 
 $ORIGIN 5.65.{{ zonename }}.
 
diff --git a/templates/wmnet b/templates/wmnet
index f812f39..c95174f 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2044,12 +2044,19 @@
 lvs1010 1H  IN A10.65.4.21
 lvs1011 1H  IN A10.65.4.22
 lvs1012 1H  IN A10.65.4.23
+lvs1013 1H  IN A10.65.4.123
+wmf7311 1H  IN A10.65.4.123
+lvs1014 1H  IN A10.65.4.124
+wmf7312 1H  IN A10.65.4.124
+lvs1015 1H  IN A10.65.4.125
+wmf7313 1H  IN A10.65.4.125
+lvs1016 1H  IN A10.65.4.126
+wmf7314 1H  IN A10.65.4.126
 ruthenium   1H  IN A10.65.3.56
 wmf3431 1H  IN A10.65.3.56
 rhodium 1H  IN A10.65.3.57
 wmf3432 1H  IN A10.65.3.57
 indium  1H  IN A10.65.3.117
-
 payments10011H  IN A10.65.3.55
 wmf6951 1H  IN A10.65.3.55
 payments10021H  IN A10.65.3.47

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78db1ae1c3f4a20a446b96d9ad9c85eb37671ac4
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] mediawiki/core[master]: Replace cpPosTime cookie/parameter with cpPosIndex

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

Change subject: Replace cpPosTime cookie/parameter with cpPosIndex
..


Replace cpPosTime cookie/parameter with cpPosIndex

This handles multi-DB transactions properly, instead of causing wait
timeouts in the WaitConditionLoop. It also is more correct in using
a counter instead of relying on wall clocks.

In addition:
* Refactor related code in MediaWiki.php to be comprehensible.
* Always send the cookie even the "remote wiki redirect" case.
* Renamed ChronologyProtector field and constant to avoid any
  confusion of "wait for server X to reach Y" with "wait for Y
  to show up in position store".
* Add an "asOfTime" field to the position keys for debugging.

Bug: T182322
Change-Id: I5c73cd07eaf664f02ba00c38fab9f49b609f4284
---
M includes/MediaWiki.php
M includes/Setup.php
M includes/libs/rdbms/ChronologyProtector.php
M includes/libs/rdbms/lbfactory/ILBFactory.php
M includes/libs/rdbms/lbfactory/LBFactory.php
M tests/phpunit/includes/db/LBFactoryTest.php
6 files changed, 198 insertions(+), 139 deletions(-)

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



diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index beb9de5..b1b1a7a 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -603,51 +603,55 @@
DeferredUpdates::doUpdates( 'enqueue', DeferredUpdates::PRESEND 
);
wfDebug( __METHOD__ . ': pre-send deferred updates completed' );
 
-   // Decide when clients block on ChronologyProtector DB position 
writes
-   $urlDomainDistance = (
-   $request->wasPosted() &&
-   $output->getRedirect() &&
-   $lbFactory->hasOrMadeRecentMasterChanges( INF )
-   ) ? self::getUrlDomainDistance( $output->getRedirect() ) : 
false;
+   // Should the client return, their request should observe the 
new ChronologyProtector
+   // DB positions. This request might be on a foreign wiki 
domain, so synchronously update
+   // the DB positions in all datacenters to be safe. If this 
output is not a redirect,
+   // then OutputPage::output() will be relatively slow, meaning 
that running it in
+   // $postCommitWork should help mask the latency of those 
updates.
+   $flags = $lbFactory::SHUTDOWN_CHRONPROT_SYNC;
+   $strategy = 'cookie+sync';
 
$allowHeaders = !( $output->isDisabled() || headers_sent() );
-   if ( $urlDomainDistance === 'local' || $urlDomainDistance === 
'remote' ) {
-   // OutputPage::output() will be fast; $postCommitWork 
will not be useful for
-   // masking the latency of syncing DB positions accross 
all datacenters synchronously.
-   // Instead, make use of the RTT time of the client 
follow redirects.
-   $flags = $lbFactory::SHUTDOWN_CHRONPROT_ASYNC;
-   $cpPosTime = microtime( true );
-   // Client's next request should see 1+ positions with 
this DBMasterPos::asOf() time
-   if ( $urlDomainDistance === 'local' && $allowHeaders ) {
-   // Client will stay on this domain, so set an 
unobtrusive cookie
-   $expires = time() + 
ChronologyProtector::POSITION_TTL;
-   $options = [ 'prefix' => '' ];
-   $request->response()->setCookie( 'cpPosTime', 
$cpPosTime, $expires, $options );
-   } else {
-   // Cookies may not work across wiki domains, so 
use a URL parameter
-   $safeUrl = 
$lbFactory->appendPreShutdownTimeAsQuery(
-   $output->getRedirect(),
-   $cpPosTime
-   );
-   $output->redirect( $safeUrl );
-   }
-   } else {
-   // OutputPage::output() is fairly slow; run it in 
$postCommitWork to mask
-   // the latency of syncing DB positions accross all 
datacenters synchronously
-   $flags = $lbFactory::SHUTDOWN_CHRONPROT_SYNC;
-   if ( $lbFactory->hasOrMadeRecentMasterChanges( INF ) && 
$allowHeaders ) {
-   $cpPosTime = microtime( true );
-   // Set a cookie in case the DB position store 
cannot sync accross datacenters.
-   // This will at least cover the common case of 
the user staying on the 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Follow-up: Further simplify splitting of reading lists.

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

Change subject: Follow-up: Further simplify splitting of reading lists.
..


Follow-up: Further simplify splitting of reading lists.

Nothing wrong with the previous patch, but I saw a couple more
opportunities for optimization/simplicity:

- Move the logic to show the AlertDialog to BaseActivity, since
  BaseActivity already contains the logic to register for other types of
  Bus events.
- Simplify the logic of reshuffling super-large lists. It no longer
  requires any manipulation of ArrayLists or recursion.
- Don't use a string resource for the renamed names of lists. This is one
  particular case where we might not want to "trust" the translations to
  follow the formatting that we expect. If a certain localization
  translates this string incorrectly, then the procedure of renaming the
  list might fail.

Change-Id: I1ded79c3f74273526bfa43b188736518f7850ea3
---
M app/src/main/java/org/wikipedia/activity/BaseActivity.java
M app/src/main/java/org/wikipedia/main/MainActivity.java
M app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
5 files changed, 40 insertions(+), 71 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/activity/BaseActivity.java 
b/app/src/main/java/org/wikipedia/activity/BaseActivity.java
index 0c96404..a74d2ae 100644
--- a/app/src/main/java/org/wikipedia/activity/BaseActivity.java
+++ b/app/src/main/java/org/wikipedia/activity/BaseActivity.java
@@ -12,6 +12,7 @@
 import android.support.annotation.Nullable;
 import android.support.design.widget.Snackbar;
 import android.support.v4.content.ContextCompat;
+import android.support.v7.app.AlertDialog;
 import android.support.v7.app.AppCompatActivity;
 import android.view.MenuItem;
 import android.view.View;
@@ -25,6 +26,7 @@
 import org.wikipedia.WikipediaApp;
 import org.wikipedia.crash.CrashReportActivity;
 import org.wikipedia.events.NetworkConnectEvent;
+import org.wikipedia.events.SplitLargeListsEvent;
 import org.wikipedia.events.ThemeChangeEvent;
 import org.wikipedia.events.WikipediaZeroEnterEvent;
 import org.wikipedia.offline.Compilation;
@@ -226,6 +228,13 @@
 @Subscribe public void on(ThemeChangeEvent event) {
 recreate();
 }
+
+@Subscribe public void on(SplitLargeListsEvent event) {
+new AlertDialog.Builder(BaseActivity.this)
+.setMessage(R.string.split_reading_list_message)
+.setPositiveButton(R.string.ok, null)
+.show();
+}
 }
 
 }
diff --git a/app/src/main/java/org/wikipedia/main/MainActivity.java 
b/app/src/main/java/org/wikipedia/main/MainActivity.java
index 6ed0e4a..2454a32 100644
--- a/app/src/main/java/org/wikipedia/main/MainActivity.java
+++ b/app/src/main/java/org/wikipedia/main/MainActivity.java
@@ -1,22 +1,16 @@
 package org.wikipedia.main;
 
 import android.content.Context;
-import android.content.DialogInterface;
 import android.content.Intent;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
-import android.support.v7.app.AlertDialog;
 import android.support.v7.view.ActionMode;
 import android.view.View;
 
-import com.squareup.otto.Subscribe;
-
 import org.wikipedia.R;
-import org.wikipedia.WikipediaApp;
 import org.wikipedia.activity.SingleFragmentToolbarActivity;
 import org.wikipedia.appshortcuts.AppShortcuts;
-import org.wikipedia.events.SplitLargeListsEvent;
 import org.wikipedia.navtab.NavTab;
 import org.wikipedia.onboarding.InitialOnboardingActivity;
 import org.wikipedia.settings.Prefs;
@@ -29,8 +23,6 @@
 return new Intent(context, MainActivity.class);
 }
 
-private EventBusMethods busMethods;
-
 @Override
 public void onCreate(@Nullable Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
@@ -40,14 +32,6 @@
 if (Prefs.isInitialOnboardingEnabled() && savedInstanceState == null) {
 startActivity(InitialOnboardingActivity.newIntent(this));
 }
-busMethods = new EventBusMethods();
-registerBus();
-}
-
-@Override
-public void onDestroy() {
-unregisterBus();
-super.onDestroy();
 }
 
 @Override protected MainFragment createFragment() {
@@ -132,30 +116,5 @@
 return;
 }
 finish();
-}
-
-private void registerBus() {
-WikipediaApp.getInstance().getBus().register(busMethods);
-}
-
-private void unregisterBus() {
-if (WikipediaApp.getInstance().getBus() != null) {
-WikipediaApp.getInstance().getBus().unregister(busMethods);
-}
-}
-
-private class EventBusMethods {
-  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use native ES5 Array prototype methods instead of jQuery

2018-01-12 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403970 )

Change subject: Use native ES5 Array prototype methods instead of jQuery
..

Use native ES5 Array prototype methods instead of jQuery

Replace
* $.each( array, function ( index, value ) { ... } ) by
  array.forEach( function ( value, index ) { ... } )

* $.grep( array, function ( value ) { ... } ) by
  array.filter( function ( value ) { ... } )

* $.map( array, function ( value ) { ... } ) by
  array.map( function ( value ) { ... } )

* $.inArray( value, array ) by
  array.indexOf( value )

This change is a follow-up to 1edba8029a561919febf8b90f5df689d090665dd.

Change-Id: I16134642c52002de0eacb987bed5143f528bf627
---
M resources/src/jquery/jquery.suggestions.js
M resources/src/jquery/jquery.tablesorter.js
M resources/src/mediawiki.action/mediawiki.action.edit.stash.js
M resources/src/mediawiki.special/mediawiki.special.apisandbox.js
M resources/src/mediawiki.special/mediawiki.special.block.js
M resources/src/mediawiki.special/mediawiki.special.upload.js
M resources/src/mediawiki/api.js
M resources/src/mediawiki/mediawiki.jqueryMsg.js
M resources/src/mediawiki/page/image-pagination.js
M tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
13 files changed, 37 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/403970/1

diff --git a/resources/src/jquery/jquery.suggestions.js 
b/resources/src/jquery/jquery.suggestions.js
index 4f4edc9..39c601f 100644
--- a/resources/src/jquery/jquery.suggestions.js
+++ b/resources/src/jquery/jquery.suggestions.js
@@ -293,7 +293,7 @@

expandFrom = 'left';
 
// Catch 
invalid values, default to 'auto'
-   } else if ( 
$.inArray( expandFrom, [ 'left', 'right', 'start', 'end', 'auto' ] ) === -1 ) {
+   } else if ( [ 
'left', 'right', 'start', 'end', 'auto' ].indexOf( expandFrom ) === -1 ) {

expandFrom = 'auto';
}
 
@@ -757,7 +757,7 @@
];
if ( 
context.data.keypressedCount === 0 &&
e.which === 
context.data.keypressed &&
-   $.inArray( e.which, 
allowed ) !== -1
+   allowed.indexOf( 
e.which ) !== -1
) {
$.suggestions.keypress( 
e, context, context.data.keypressed );
}
diff --git a/resources/src/jquery/jquery.tablesorter.js 
b/resources/src/jquery/jquery.tablesorter.js
index 21209f6..6d67ade 100644
--- a/resources/src/jquery/jquery.tablesorter.js
+++ b/resources/src/jquery/jquery.tablesorter.js
@@ -289,8 +289,8 @@
 
function uniqueElements( array ) {
var uniques = [];
-   $.each( array, function ( i, elem ) {
-   if ( elem !== undefined && $.inArray( elem, uniques ) 
=== -1 ) {
+   array.forEach( function ( elem ) {
+   if ( elem !== undefined && uniques.indexOf( elem ) === 
-1 ) {
uniques.push( elem );
}
} );
@@ -925,9 +925,8 @@
cell = this;
// Get current column index
columns = 
config.headerToColumns[ $cell.data( 'headerIndex' ) ];
-   newSortList = $.map( columns, 
function ( c ) {
-   // jQuery "helpfully" 
flattens the arrays...
-   return [ [ c, 
$cell.data( 'order' ) ] ];
+   newSortList = columns.map( 
function ( c ) {
+   return [ c, $cell.data( 
'order' ) ];
} );
// Index of first column 
belonging to this header
i = columns[ 0 ];
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Fix mistakes and refactor FormDiffView and related

2018-01-12 Thread Thiemo Kreuz (WMDE) (Code Review)
Thiemo Kreuz (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403969 )

Change subject: Fix mistakes and refactor FormDiffView and related
..

Fix mistakes and refactor FormDiffView and related

I believe this is all very much trivial refactoring. This patch also
fixes a few mistakes, but these happened in comments.

Bug: T182424
Change-Id: I4e6b9531d56405e8d2c72d501c322ab71e6ead29
---
M src/Diff/FormDiffView.php
M src/Diff/LexemeDiffVisualizer.php
M tests/phpunit/mediawiki/Diff/FormDiffViewTest.php
3 files changed, 54 insertions(+), 60 deletions(-)


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

diff --git a/src/Diff/FormDiffView.php b/src/Diff/FormDiffView.php
index 1d82223..38c46e8 100644
--- a/src/Diff/FormDiffView.php
+++ b/src/Diff/FormDiffView.php
@@ -22,12 +22,12 @@
 class FormDiffView extends BasicDiffView {
 
/**
-* @var ClaimDiffer|null
+* @var ClaimDiffer
 */
private $claimDiffer;
 
/**
-* @var ClaimDifferenceVisualizer|null
+* @var ClaimDifferenceVisualizer
 */
private $claimDiffVisualizer;
 
@@ -61,26 +61,29 @@
 * @param string[] $path
 * @param DiffOp $op
 *
-* @return string
-* @throws MWException
+* @return string HTML
 */
protected function generateOpHtml( array $path, DiffOp $op ) {
-   $html = '';
if ( $op->isAtomic() ) {
return parent::generateOpHtml( $path, $op );
}
+
+   $html = '';
+
foreach ( $op as $key => $subOp ) {
-   if ( !$subOp instanceof ChangeFormDiffOp ) {
-   $html .= $this->generateOpHtml( array_merge( 
$path, [ $key ] ), $subOp );
-   } else {
+   if ( $subOp instanceof ChangeFormDiffOp ) {
$html .= $this->generateFormOpHtml( $path, 
$subOp, $key );
+   } else {
+   $html .= $this->generateOpHtml( array_merge( 
$path, [ $key ] ), $subOp );
}
}
+
return $html;
}
 
-   private function generateFormOpHtml( $path, ChangeFormDiffOp $op, $key 
) {
+   private function generateFormOpHtml( array $path, ChangeFormDiffOp $op, 
$key ) {
$html = '';
+
foreach ( $op->getStatementsDiffOps() as $claimDiffOp ) {
$html .= $this->getClaimDiffHtml(
$claimDiffOp,
@@ -108,33 +111,31 @@
}
 
/**
-* @param DiffOp $claimDiffOp
+* @param DiffOp $diffOp
 *
 * @return string HTML
 * @throws MWException
 */
-   protected function getClaimDiffHtml( DiffOp $claimDiffOp, array $path ) 
{
-   if ( $claimDiffOp instanceof DiffOpChange ) {
-   $claimDifference = $this->claimDiffer->diffClaims(
-   $claimDiffOp->getOldValue(),
-   $claimDiffOp->getNewValue()
-   );
-   return $this->claimDiffVisualizer->visualizeClaimChange(
-   $claimDifference,
-   $claimDiffOp->getNewValue(),
-   $path
-   );
-   }
+   private function getClaimDiffHtml( DiffOp $diffOp, array $path ) {
+   switch ( true ) {
+   case $diffOp instanceof DiffOpChange:
+   return 
$this->claimDiffVisualizer->visualizeClaimChange(
+   $this->claimDiffer->diffClaims(
+   $diffOp->getOldValue(),
+   $diffOp->getNewValue()
+   ),
+   $diffOp->getNewValue(),
+   $path
+   );
 
-   if ( $claimDiffOp instanceof DiffOpAdd ) {
-   return $this->claimDiffVisualizer->visualizeNewClaim( 
$claimDiffOp->getNewValue(), $path );
-   } elseif ( $claimDiffOp instanceof DiffOpRemove ) {
-   return 
$this->claimDiffVisualizer->visualizeRemovedClaim(
-   $claimDiffOp->getOldValue(),
-   $path
-   );
-   } else {
-   throw new MWException( 'Encountered an unexpected diff 
operation type for a claim' );
+   case $diffOp instanceof DiffOpAdd:
+   return 
$this->claimDiffVisualizer->visualizeNewClaim( 

[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Show Download button only on Android >= 5 & Chrome >= 41

2018-01-12 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403968 )

Change subject: Show Download button only on Android >= 5 & Chrome >= 41
..

Show Download button only on Android >= 5 & Chrome >= 41

Changes:
 - moved DownloadButtton checks & initialization to separate function
 - introduced supportedNamespaces variable for better readability
 - reorganized huge if(){} statement to set of smaller if's with
 nice comments why this configuration is not supported
 - introduced getAndroidVersion and getChromeVersion helper functions
 - added check to not allow Android < 5 or Chrome < 41

Bug: T182059
Change-Id: Ib5064459ee56aed68179389f37b4bc3b5c2c4492
---
M resources/skins.minerva.scripts/init.js
1 file changed, 47 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/68/403968/1

diff --git a/resources/skins.minerva.scripts/init.js 
b/resources/skins.minerva.scripts/init.js
index 327399f..1912b81 100644
--- a/resources/skins.minerva.scripts/init.js
+++ b/resources/skins.minerva.scripts/init.js
@@ -205,6 +205,15 @@
$tagline.text( msg );
}
}
+   function getAndroidVersion() {
+   var match = navigator.userAgent.toLowerCase().match( 
/android\s(\d\.]*)/ );
+   return match ? parseInt( match[1] ) : false;
+   }
+
+   function getChromeVersion() {
+   var match = navigator.userAgent.toLowerCase().match( 
/chrom(e|ium)\/(\d+)\./ );
+   return match ? parseInt( match[2] ) : false;
+   }
 
/**
 * Initialisation function for registration date on user page
@@ -220,6 +229,43 @@
} );
}
 
+   /**
+* Initialize and inject the download button
+*
+* There are many restrictions when we can show the download button, 
this function should handle
+* all device/os/operating system related checks and if device supports 
printing it will inject
+* the Download icon
+*/
+   function appendDownloadButton() {
+   var androidVersion = getAndroidVersion(),
+   chromeVersion = getChromeVersion(),
+   supportedNamespaces = config.get( 
'wgMinervaDownloadNamespaces', [ 0 ] );
+
+   // Download button is restricted to certain namespaces T181152.
+   // Defaults to 0, in case cached JS has been served.
+   if ( supportedNamespaces.indexOf( config.get( 
'wgNamespaceNumber' ) ) === -1 || page.isMainPage() ) {
+   // namespace is not supported or it's a main page
+   return;
+   }
+   if ( browser.isIos() || window.chrome === undefined ) {
+   // we support only chrome/chromium on desktop/android
+   return;
+   }
+   if ( androidVersion && androidVersion < 5 ||
+   chromeVersion && chromeVersion < 41 ) {
+   // we do not support android version older than 5 or 
Chrome older than version 541
+   return;
+   }
+   // Because the page actions are floated to the right, their 
order in the
+   // DOM is reversed in the display. The watchstar is last in the 
DOM and
+   // left-most in the display. Since we want the download button 
to be to
+   // the left of the watchstar, we put it after it in the DOM.
+   new DownloadIcon( skin ).$el.insertAfter( '#ca-watch' );
+   track( 'minerva.downloadAsPDF', {
+   action: 'buttonVisible'
+   } );
+   }
+
$( function () {
// Update anything else that needs enhancing (e.g. watchlist)
initModifiedInfo();
@@ -227,28 +273,7 @@
initHistoryLink( $( '.last-modifier-tagline a' ) );
M.on( 'resize', loadTabletModules );
loadTabletModules();
-
-   if (
-   // Download button is restricted to certain namespaces 
T181152.
-   // Defaults to 0, in case cached JS has been served.
-   config.get( 'wgMinervaDownloadNamespaces', [ 0 ] )
-   .indexOf( config.get( 'wgNamespaceNumber' ) ) > 
-1 &&
-   !page.isMainPage() &&
-   // The iOS print dialog does not provide pdf 
functionality (see T177215)
-   !browser.isIos() &&
-   // Currently restricted to Chrome (T179529) until we 
have good fallbacks for browsers
-   // which do not provide print functionality
-   window.chrome !== undefined
-   ) {
-   // Because the page actions are floated to 

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Add $statuses parameter to ResultsBuilder::getResults

2018-01-12 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403966 )

Change subject: Add $statuses parameter to ResultsBuilder::getResults
..

Add $statuses parameter to ResultsBuilder::getResults

This parameter filters the check results represented in the final result
to only those listed in the $statuses. CheckingResultsBuilder implements
this filtering, and CachingResultsBuilder caches only those results
where the $statuses are exactly those three statuses which are also
displayed in the gadget.

Bug: T183927
Change-Id: I3ff5f8d6b0a16a4aa2417b0f1e03b8634376a6dd
---
M src/Api/CachingResultsBuilder.php
M src/Api/CheckingResultsBuilder.php
M src/Api/ResultsBuilder.php
M tests/phpunit/Api/CachingResultsBuilderTest.php
M tests/phpunit/Api/CheckingResultsBuilderTest.php
5 files changed, 276 insertions(+), 37 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints
 refs/changes/66/403966/1

diff --git a/src/Api/CachingResultsBuilder.php 
b/src/Api/CachingResultsBuilder.php
index 00b788a..fc98fc6 100644
--- a/src/Api/CachingResultsBuilder.php
+++ b/src/Api/CachingResultsBuilder.php
@@ -11,6 +11,7 @@
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Cache\CachingMetadata;
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Cache\DependencyMetadata;
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Cache\Metadata;
+use WikibaseQuality\ConstraintReport\ConstraintCheck\Result\CheckResult;
 
 /**
  * A wrapper around another ResultsBuilder that caches results in a 
ResultsCache.
@@ -76,6 +77,15 @@
private $microtime = 'microtime';
 
/**
+* TODO: In PHP 5.6, make this a public class constant instead,
+* and also use it in CheckConstraints::getAllowedParams()
+* and in some of the tests.
+*
+* @var string[]
+*/
+   private $cachedStatuses;
+
+   /**
 * @param ResultsBuilder $resultsBuilder The ResultsBuilder that cache 
misses are delegated to.
 * @param ResultsCache $cache The cache where results can be stored.
 * @param WikiPageEntityMetaDataAccessor 
$wikiPageEntityMetaDataAccessor Used to get the latest revision ID.
@@ -101,22 +111,30 @@
$this->ttlInSeconds = $ttlInSeconds;
$this->possiblyStaleConstraintTypes = 
$possiblyStaleConstraintTypes;
$this->dataFactory = $dataFactory;
+
+   $this->cachedStatuses = [
+   CheckResult::STATUS_VIOLATION,
+   CheckResult::STATUS_WARNING,
+   CheckResult::STATUS_BAD_PARAMETERS,
+   ];
}
 
/**
 * @param EntityId[] $entityIds
 * @param string[] $claimIds
 * @param string[]|null $constraintIds
+* @param string[] $statuses
 * @return CachedCheckConstraintsResponse
 */
public function getResults(
array $entityIds,
array $claimIds,
-   array $constraintIds = null
+   array $constraintIds = null,
+   array $statuses
) {
$results = [];
$metadatas = [];
-   if ( $this->canUseStoredResults( $entityIds, $claimIds, 
$constraintIds ) ) {
+   if ( $this->canUseStoredResults( $entityIds, $claimIds, 
$constraintIds, $statuses ) ) {
$storedEntityIds = [];
foreach ( $entityIds as $entityId ) {
$storedResults = $this->getStoredResults( 
$entityId );
@@ -136,7 +154,7 @@

'wikibase.quality.constraints.cache.entity.miss',
count( $entityIds )
);
-   $response = $this->getAndStoreResults( $entityIds, 
$claimIds, $constraintIds );
+   $response = $this->getAndStoreResults( $entityIds, 
$claimIds, $constraintIds, $statuses );
$results += $response->getArray();
$metadatas[] = $response->getMetadata();
}
@@ -147,37 +165,58 @@
}
 
/**
-* We can only use cached constraint results if full constraint check 
results were requested:
+* We can only use cached constraint results
+* if exactly the problematic results of a full constraint check were 
requested:
 * constraint checks for the full entity (not just individual 
statements),
-* and without restricting the set of constraints to check.
+* without restricting the set of constraints to check,
+* and with exactly the 'violation', 'warning' and 'bad-parameters' 
statuses.
+*
+* (In theory, we could also use results for requests
+* that asked for a subset of these result statuses,
+* but removing the 

  1   2   3   >