[MediaWiki-commits] [Gerrit] mediawiki...examples[master]: This change is made from UI by kwc

2017-09-13 Thread Kowsalya (Code Review)
Kowsalya has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377954 )

Change subject: This change is made from UI by kwc
..

This change is made from UI by kwc

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5bdb693ddff9beb0d6d2c9939b3a14db0220eddd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/examples
Gerrit-Branch: master
Gerrit-Owner: Kowsalya 

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


[MediaWiki-commits] [Gerrit] mediawiki...examples[master]: made changes to example.php file

2017-09-13 Thread Kowsalya (Code Review)
Kowsalya has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377950 )

Change subject: made changes to example.php file
..

made changes to example.php file

Change-Id: I3ad8579663a0866dcf11f3bb364df9b69a5eefd6
---
M examples.php
A kowc.txt
2 files changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/examples.php b/examples.php
index c54628c..db66865 100644
--- a/examples.php
+++ b/examples.php
@@ -6,3 +6,4 @@
 require_once __DIR__ . '/DataPages/DataPages.php';
 
 require_once __DIR__ . '/Example/Example.php';
+var a='kowc'
diff --git a/kowc.txt b/kowc.txt
new file mode 100644
index 000..8ae19b6
--- /dev/null
+++ b/kowc.txt
@@ -0,0 +1 @@
+This is a sample file added to check diff by kowc.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ad8579663a0866dcf11f3bb364df9b69a5eefd6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/examples
Gerrit-Branch: master
Gerrit-Owner: Kowsalya 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Require `future` for Python versions older than 2.7.3

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

Change subject: Require `future` for Python versions older than 2.7.3
..


Require `future` for Python versions older than 2.7.3

site_detect.py tries `from future.backports.html.parser import HTMLParser`.
Requiring future for older versions of Python ensures that the issues in
older versions of HTMLParser will not occure in site_detect.

Bug: T175873
Change-Id: I1c239c7abdd7e7c5e107ed30adf84ab01613f16f
---
M requirements.txt
M setup.py
2 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/requirements.txt b/requirements.txt
index ddda7fc..98c9c0d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -28,7 +28,7 @@
 # https://github.com/eliben/pycparser/issues/147
 pycparser != 2.14
 
-future>=0.15.0 ; python_version < '2.7'
+future>=0.15.0 ; python_full_version < '2.7.3'
 
 ipaddr>=2.1.10 ; python_version < '3'
 
diff --git a/setup.py b/setup.py
index de64c83..6fc833c 100644
--- a/setup.py
+++ b/setup.py
@@ -133,6 +133,9 @@
 # ipaddr 2.1.10+ is distributed with Debian and Fedora. See T105443.
 dependencies.append('ipaddr>=2.1.10')
 
+if sys.version_info < (2, 7, 3):
+dependencies.append('future>=0.15.0')  # Bug fixes for HTMLParser
+
 if sys.version_info < (2, 7, 9):
 # Python versions before 2.7.9 will cause urllib3 to trigger
 # InsecurePlatformWarning warnings for all HTTPS requests. By

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: appveyor.yml: Remove Python 3.5.0 and 3.6.0 from build matrix

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

Change subject: appveyor.yml: Remove Python 3.5.0 and 3.6.0 from build matrix
..


appveyor.yml: Remove Python 3.5.0 and 3.6.0 from build matrix

Bug: T175575
Change-Id: I1954ec5f758afd3b75b061b39c268f5458ef2311
---
M .appveyor.yml
1 file changed, 0 insertions(+), 16 deletions(-)

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



diff --git a/.appveyor.yml b/.appveyor.yml
index ec7842e..d45d987 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -38,14 +38,6 @@
   PYTHON_VERSION: "3.4.0"
   PYTHON_ARCH: "32"
 
-- PYTHON: "C:\\Python350"
-  PYTHON_VERSION: "3.5.0"
-  PYTHON_ARCH: "32"
-
-- PYTHON: "C:\\Python360"
-  PYTHON_VERSION: "3.6.0"
-  PYTHON_ARCH: "32"
-
 - PYTHON: "C:\\Python272-x64"
   PYTHON_VERSION: "2.7.2"
   PYTHON_ARCH: "64"
@@ -56,14 +48,6 @@
 
 - PYTHON: "C:\\Python340-x64"
   PYTHON_VERSION: "3.4.0"
-  PYTHON_ARCH: "64"
-
-- PYTHON: "C:\\Python350-x64"
-  PYTHON_VERSION: "3.5.0"
-  PYTHON_ARCH: "64"
-
-- PYTHON: "C:\\Python360-x64"
-  PYTHON_VERSION: "3.6.0"
   PYTHON_ARCH: "64"
 
 # Appveyor pre-installs these versions onto build machines

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...jouncebot[master]: Make jouncebot evil

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

Change subject: Make jouncebot evil
..


Make jouncebot evil

Change-Id: I961ec920658c0d435299bc61d9253e498dd6e538
---
M DefaultConfig.yaml
M jouncebot.py
2 files changed, 9 insertions(+), 7 deletions(-)

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



diff --git a/DefaultConfig.yaml b/DefaultConfig.yaml
index 43483d2..0094c41 100644
--- a/DefaultConfig.yaml
+++ b/DefaultConfig.yaml
@@ -22,9 +22,12 @@
   generic:
 - 'Deploy window {event.window} ({event.url})'
   deployer:
-- '{deployers}: Dear anthropoid, the time has come. Please deploy 
{event.window} ({event.url}).'
-- '{deployers}: Respected human, time to deploy {event.window} 
({event.url}). Please do the needful.'
+- '{deployers}: How many deployers does it take to do {event.window} 
deploy? ({event.url}).'
+- '{deployers}: Time to pull up your socks and deploy {event.window}. Get 
on with it. ({event.url}).'
+- '{deployers}: Dear deployers, time to do the {event.window} deploy. Dont 
look at me like that. You signed up for it. ({event.url}).'
+- '{deployers}: It is that lovely time of the day again! You are hereby 
commanded to deploy {event.window}. ({event.url}).'
+- '{deployers}: (Dis)respected human, time to deploy {event.window} 
({event.url}). Please do the needful.'
   owner:
-- '{owners}: A patch you scheduled for {event.window} is about to be 
deployed. Please be available during the process.'
+- '{owners}: A patch you scheduled for {event.window} is about to be 
deployed. Please be around during the process. Note: If you break the wikis, 
you will be rewarded with a sticker.'
 
 debug: false
diff --git a/jouncebot.py b/jouncebot.py
index ec8fb06..0f35456 100755
--- a/jouncebot.py
+++ b/jouncebot.py
@@ -205,11 +205,10 @@
 deployers = False
 msg = random.choice(self.config['messages']['generic'])
 
+self.connection.privmsg(
+   self.channel, msg.format(deployers=deployers, event=event)
+)
 if len(event.owners) > 0:
-# Don't ping deployers unless there are patches to be deployed
-self.connection.privmsg(
-self.channel, msg.format(deployers=deployers, event=event)
-)
 owners = comma_join(event.owners)
 msg = random.choice(self.config['messages']['owner'])
 self.connection.privmsg(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I961ec920658c0d435299bc61d9253e498dd6e538
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/bots/jouncebot
Gerrit-Branch: master
Gerrit-Owner: Niharika29 
Gerrit-Reviewer: Niharika29 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: appveyor.yml: Remove Python 3.5.0 and 3.6.0 from build matrix

2017-09-13 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377946 )

Change subject: appveyor.yml: Remove Python 3.5.0 and 3.6.0 from build matrix
..

appveyor.yml: Remove Python 3.5.0 and 3.6.0 from build matrix

Bug: T175575
Change-Id: I1954ec5f758afd3b75b061b39c268f5458ef2311
---
M .appveyor.yml
1 file changed, 0 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/46/377946/1

diff --git a/.appveyor.yml b/.appveyor.yml
index ec7842e..d45d987 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -38,14 +38,6 @@
   PYTHON_VERSION: "3.4.0"
   PYTHON_ARCH: "32"
 
-- PYTHON: "C:\\Python350"
-  PYTHON_VERSION: "3.5.0"
-  PYTHON_ARCH: "32"
-
-- PYTHON: "C:\\Python360"
-  PYTHON_VERSION: "3.6.0"
-  PYTHON_ARCH: "32"
-
 - PYTHON: "C:\\Python272-x64"
   PYTHON_VERSION: "2.7.2"
   PYTHON_ARCH: "64"
@@ -56,14 +48,6 @@
 
 - PYTHON: "C:\\Python340-x64"
   PYTHON_VERSION: "3.4.0"
-  PYTHON_ARCH: "64"
-
-- PYTHON: "C:\\Python350-x64"
-  PYTHON_VERSION: "3.5.0"
-  PYTHON_ARCH: "64"
-
-- PYTHON: "C:\\Python360-x64"
-  PYTHON_VERSION: "3.6.0"
   PYTHON_ARCH: "64"
 
 # Appveyor pre-installs these versions onto build machines

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1954ec5f758afd3b75b061b39c268f5458ef2311
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] mediawiki...ContentTranslation[master]: Follow-up 7a33405a9ca: fix JS error

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

Change subject: Follow-up 7a33405a9ca: fix JS error
..


Follow-up 7a33405a9ca: fix JS error

Change-Id: I499c7522b80d8e0975c8f0415cf3ab5274eae660
---
M modules/widgets/translator/ext.cx.translator.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/widgets/translator/ext.cx.translator.js 
b/modules/widgets/translator/ext.cx.translator.js
index f9a79ab..6f58b95 100644
--- a/modules/widgets/translator/ext.cx.translator.js
+++ b/modules/widgets/translator/ext.cx.translator.js
@@ -76,7 +76,7 @@
// thisMonthKey, but not guaranteed.
if ( !lastMonthKey ) {
// There is no month with non-zero 
contributions.
-   this.$widget.remove();
+   self.$widget.remove();
return;
}
total = publishTrend[ lastMonthKey ].count || 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I499c7522b80d8e0975c8f0415cf3ab5274eae660
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Petar.petkovic 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...jouncebot[master]: Make jouncebot evil

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

Change subject: Make jouncebot evil
..

Make jouncebot evil

Change-Id: I961ec920658c0d435299bc61d9253e498dd6e538
---
M DefaultConfig.yaml
M jouncebot.py
2 files changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bots/jouncebot 
refs/changes/45/377945/1

diff --git a/DefaultConfig.yaml b/DefaultConfig.yaml
index 43483d2..0094c41 100644
--- a/DefaultConfig.yaml
+++ b/DefaultConfig.yaml
@@ -22,9 +22,12 @@
   generic:
 - 'Deploy window {event.window} ({event.url})'
   deployer:
-- '{deployers}: Dear anthropoid, the time has come. Please deploy 
{event.window} ({event.url}).'
-- '{deployers}: Respected human, time to deploy {event.window} 
({event.url}). Please do the needful.'
+- '{deployers}: How many deployers does it take to do {event.window} 
deploy? ({event.url}).'
+- '{deployers}: Time to pull up your socks and deploy {event.window}. Get 
on with it. ({event.url}).'
+- '{deployers}: Dear deployers, time to do the {event.window} deploy. Dont 
look at me like that. You signed up for it. ({event.url}).'
+- '{deployers}: It is that lovely time of the day again! You are hereby 
commanded to deploy {event.window}. ({event.url}).'
+- '{deployers}: (Dis)respected human, time to deploy {event.window} 
({event.url}). Please do the needful.'
   owner:
-- '{owners}: A patch you scheduled for {event.window} is about to be 
deployed. Please be available during the process.'
+- '{owners}: A patch you scheduled for {event.window} is about to be 
deployed. Please be around during the process. Note: If you break the wikis, 
you will be rewarded with a sticker.'
 
 debug: false
diff --git a/jouncebot.py b/jouncebot.py
index ec8fb06..0f35456 100755
--- a/jouncebot.py
+++ b/jouncebot.py
@@ -205,11 +205,10 @@
 deployers = False
 msg = random.choice(self.config['messages']['generic'])
 
+self.connection.privmsg(
+   self.channel, msg.format(deployers=deployers, event=event)
+)
 if len(event.owners) > 0:
-# Don't ping deployers unless there are patches to be deployed
-self.connection.privmsg(
-self.channel, msg.format(deployers=deployers, event=event)
-)
 owners = comma_join(event.owners)
 msg = random.choice(self.config['messages']['owner'])
 self.connection.privmsg(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I961ec920658c0d435299bc61d9253e498dd6e538
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/bots/jouncebot
Gerrit-Branch: master
Gerrit-Owner: Niharika29 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Require `future` for Python versions older than 2.7.3

2017-09-13 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377944 )

Change subject: Require `future` for Python versions older than 2.7.3
..

Require `future` for Python versions older than 2.7.3

site_detect.py tries `from future.backports.html.parser import HTMLParser`.
Requiring future for older versions of Python ensures that the issues in
older versions of HTMLParser will not occure in site_detect.

Bug: T175873
Change-Id: I1c239c7abdd7e7c5e107ed30adf84ab01613f16f
---
M requirements.txt
M setup.py
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/44/377944/1

diff --git a/requirements.txt b/requirements.txt
index ddda7fc..98c9c0d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -28,7 +28,7 @@
 # https://github.com/eliben/pycparser/issues/147
 pycparser != 2.14
 
-future>=0.15.0 ; python_version < '2.7'
+future>=0.15.0 ; python_full_version < '2.7.3'
 
 ipaddr>=2.1.10 ; python_version < '3'
 
diff --git a/setup.py b/setup.py
index de64c83..6fc833c 100644
--- a/setup.py
+++ b/setup.py
@@ -133,6 +133,9 @@
 # ipaddr 2.1.10+ is distributed with Debian and Fedora. See T105443.
 dependencies.append('ipaddr>=2.1.10')
 
+if sys.version_info < (2, 7, 3):
+dependencies.append('future>=0.15.0')  # Bug fixes for HTMLParser
+
 if sys.version_info < (2, 7, 9):
 # Python versions before 2.7.9 will cause urllib3 to trigger
 # InsecurePlatformWarning warnings for all HTTPS requests. By

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c239c7abdd7e7c5e107ed30adf84ab01613f16f
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/mediawiki-config[master]: Use RemexHtml instead of Tidy on mediawikiwiki, testwiki

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

Change subject: Use RemexHtml instead of Tidy on mediawikiwiki, testwiki
..

Use RemexHtml instead of Tidy on mediawikiwiki, testwiki

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 0fe9069..b8c17a6 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19025,6 +19025,12 @@
'donatewiki' => false,
 ],
 
+'wgTidyConfig' => [
+   'default' => null,
+   'mediawikiwiki' => [ 'driver' => 'RemexHtml' ],
+   'testwiki' => [ 'driver' => 'RemexHtml' ],
+],
+
 // Cache ResourceLoader modules in localStorage
 'wgResourceLoaderStorageEnabled' => [
'default' => true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97c6eab07c827fb558b8467f605c3ae3cf4f23dd
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Improve flaky SiteStatsTest

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

Change subject: Improve flaky SiteStatsTest
..


Improve flaky SiteStatsTest

SiteStatsTest::testJobsCountGetCached() is somewhat flaky in that if it
runs after a test that adds a page (thereby producing htmlCacheUpdate
and recentChangesUpdate jobs) but doesn't have the CI framework reset
the `page` tables (which has the side effect of clearing all such jobs),
it will fail.

This change manually clears those jobs so it doesn't depend on test
ordering.

Change-Id: I1277e633c81b29bda7564fa12d23f13ded7298c7
---
M tests/phpunit/includes/SiteStatsTest.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/includes/SiteStatsTest.php 
b/tests/phpunit/includes/SiteStatsTest.php
index ea476a7..cdbf9fd 100644
--- a/tests/phpunit/includes/SiteStatsTest.php
+++ b/tests/phpunit/includes/SiteStatsTest.php
@@ -11,6 +11,11 @@
$cache = 
\MediaWiki\MediaWikiServices::getInstance()->getMainWANObjectCache();
$jobq = JobQueueGroup::singleton();
 
+   // Delete EditPage jobs that might have been left behind by 
other tests
+   $jobq->get( 'htmlCacheUpdate' )->delete();
+   $jobq->get( 'recentChangesUpdate' )->delete();
+   $cache->delete( $cache->makeKey( 'SiteStats', 'jobscount' ) );
+
$jobq->push( new NullJob( Title::newMainPage(), [] ) );
$this->assertEquals( 1, SiteStats::jobs(),
 'A single job enqueued bumps jobscount stat to 1' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1277e633c81b29bda7564fa12d23f13ded7298c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Hashar 
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]: JobQueueMemory: Actually return values in MappedIterator cal...

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

Change subject: JobQueueMemory: Actually return values in MappedIterator 
callback
..


JobQueueMemory: Actually return values in MappedIterator callback

Change-Id: Ie489d43ba3e9f4a10580716f38ec0f123d9ab5bb
---
M includes/jobqueue/JobQueueMemory.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/jobqueue/JobQueueMemory.php 
b/includes/jobqueue/JobQueueMemory.php
index 649e2af..f9e2c3d 100644
--- a/includes/jobqueue/JobQueueMemory.php
+++ b/includes/jobqueue/JobQueueMemory.php
@@ -177,7 +177,7 @@
return new MappedIterator(
$unclaimed,
function ( $value ) {
-   $this->jobFromSpecInternal( $value );
+   return $this->jobFromSpecInternal( $value );
}
);
}
@@ -196,7 +196,7 @@
return new MappedIterator(
$claimed,
function ( $value ) {
-   $this->jobFromSpecInternal( $value );
+   return $this->jobFromSpecInternal( $value );
}
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie489d43ba3e9f4a10580716f38ec0f123d9ab5bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Aaron Schulz 
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]: API: Pass revid when parsing text

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

Change subject: API: Pass revid when parsing text
..

API: Pass revid when parsing text

Change-Id: I310d0778d74c46f15385cd411d2462b541ed339a
---
M includes/api/ApiParse.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
3 files changed, 19 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/377942/1

diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index 031fbf7..05efeca 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -165,9 +165,18 @@
);
}
} else { // Not $oldid, $pageid, $page. Hence based on $text
-   $titleObj = Title::newFromText( $title );
-   if ( !$titleObj || $titleObj->isExternal() ) {
-   $this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $title ) ] );
+   $revid = $params['revid'];
+   if ( $revid !== null ) {
+   $rev = Revision::newFromId( $revid );
+   if ( !$rev ) {
+   $this->dieWithError( [ 
'apierror-nosuchrevid', $revid ] );
+   }
+   $titleObj = $rev->getTitle();
+   } else {
+   $titleObj = Title::newFromText( $title );
+   if ( !$titleObj || $titleObj->isExternal() ) {
+   $this->dieWithError( [ 
'apierror-invalidtitle', wfEscapeWikiText( $title ) ] );
+   }
}
$wgTitle = $titleObj;
if ( $titleObj->canExist() ) {
@@ -247,9 +256,9 @@
 
// Not cached (save or load)
if ( $params['pst'] ) {
-   $p_result = $this->pstContent->getParserOutput( 
$titleObj, null, $popts );
+   $p_result = $this->pstContent->getParserOutput( 
$titleObj, $revid, $popts );
} else {
-   $p_result = $this->content->getParserOutput( 
$titleObj, null, $popts );
+   $p_result = $this->content->getParserOutput( 
$titleObj, $revid, $popts );
}
}
 
@@ -785,6 +794,9 @@
'text' => [
ApiBase::PARAM_TYPE => 'text',
],
+   'revid' => [
+   ApiBase::PARAM_TYPE => 'integer',
+   ],
'summary' => null,
'page' => null,
'pageid' => [
diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index 9fbc012..fcc3e2a 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -346,6 +346,7 @@
"apihelp-parse-extended-description": "See the various prop-modules of 
[[Special:ApiHelp/query|action=query]] to get information from the 
current version of a page.\n\nThere are several ways to specify the text to 
parse:\n# Specify a page or revision, using $1page, 
$1pageid, or $1oldid.\n# Specify content explicitly, 
using $1text, $1title, and $1contentmodel.\n# 
Specify only a summary to parse. $1prop should be given an empty 
value.",
"apihelp-parse-param-title": "Title of page the text belongs to. If 
omitted, $1contentmodel must be specified, and [[API]] will be used 
as the title.",
"apihelp-parse-param-text": "Text to parse. Use $1title or 
$1contentmodel to control the content model.",
+   "apihelp-parse-param-revid": "Revision ID, for 
{{REVISIONID}} and similar variables.",
"apihelp-parse-param-summary": "Summary to parse.",
"apihelp-parse-param-page": "Parse the content of this page. Cannot be 
used together with $1text and $1title.",
"apihelp-parse-param-pageid": "Parse the content of this page. 
Overrides $1page.",
diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json
index c878a53..e2e6f11 100644
--- a/includes/api/i18n/qqq.json
+++ b/includes/api/i18n/qqq.json
@@ -326,6 +326,7 @@
"apihelp-parse-extended-description": 
"{{doc-apihelp-extended-description|parse}}",
"apihelp-parse-param-title": "{{doc-apihelp-param|parse|title}}",
"apihelp-parse-param-text": "{{doc-apihelp-param|parse|text}}",
+   "apihelp-parse-param-revid": 
"{{doc-apihelp-param|parse|revid}}\n{{doc-important|Do not translate 
{{REVISIONID}}}}",
"apihelp-parse-param-summary": "{{doc-apihelp-param|parse|summary}}",
"apihelp-parse-param-page": 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Allow users to restrict who can send them direct emails via ...

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

Change subject: Allow users to restrict who can send them direct emails via 
Special:EmailUser
..


Allow users to restrict who can send them direct emails via Special:EmailUser

Users can now specify a blacklist of users who are prevented from sending them 
a direct email.

Bug: T138166
Change-Id: Ifa26153f593b0ca3a9121e1e29961911c616c9e4
---
M RELEASE-NOTES-1.30
M includes/DefaultSettings.php
M includes/Preferences.php
M includes/api/ApiEmailUser.php
M includes/skins/Skin.php
M includes/specials/SpecialEmailuser.php
M includes/user/CentralIdLookup.php
M includes/user/User.php
M languages/i18n/en.json
M languages/i18n/qqq.json
10 files changed, 147 insertions(+), 14 deletions(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index 67a449a..8517a8f 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -70,6 +70,9 @@
 ** This is currently gated by $wgCommentTableSchemaMigrationStage. Most wikis
can set this to MIGRATION_NEW and run maintenance/migrateComments.php as
soon as any necessary extensions are updated.
+* (T138166) Added ability for users to prohibit other users from sending them
+  emails with Special:Emailuser. Can be enabled by setting
+  $wgEnableUserEmailBlacklist to true.
 
 === External library changes in 1.30 ===
 
@@ -216,6 +219,8 @@
 * wfUsePHP() is deprecated.
 * wfFixSessionID() was removed.
 * wfShellExec() and related functions are deprecated, use Shell::command().
+* (T138166) SpecialEmailUser::getTarget() now requires a second argument, the 
sending
+  user object. Using the method without the second argument is deprecated.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 5b77d16..40bcf79 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1604,6 +1604,13 @@
 $wgEnableUserEmail = true;
 
 /**
+ * Set to true to enable user-to-user e-mail blacklist.
+ *
+ * @since 1.30
+ */
+$wgEnableUserEmailBlacklist = false;
+
+/**
  * If true put the sending user's email in a Reply-To header
  * instead of From (false). ($wgPasswordSender will be used as From.)
  *
diff --git a/includes/Preferences.php b/includes/Preferences.php
index 0bb1d28..3db6d0f 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -554,6 +554,22 @@
'label-message' => 'tog-ccmeonemails',
'disabled' => $disableEmailPrefs,
];
+
+   if ( $config->get( 'EnableUserEmailBlacklist' )
+&& !$disableEmailPrefs
+&& !(bool)$user->getOption( 
'disablemail' )
+   ) {
+   $lookup = CentralIdLookup::factory();
+   $ids = $user->getOption( 
'email-blacklist', [] );
+   $names = $ids ? 
$lookup->namesFromCentralIds( $ids, $user ) : [];
+
+   $defaultPreferences['email-blacklist'] 
= [
+   'type' => 'usersmultiselect',
+   'label-message' => 
'email-blacklist-label',
+   'section' => 'personal/email',
+   'default' => implode( "\n", 
$names ),
+   ];
+   }
}
 
if ( $config->get( 'EnotifWatchlist' ) ) {
diff --git a/includes/api/ApiEmailUser.php b/includes/api/ApiEmailUser.php
index 4b4b76b..edea266 100644
--- a/includes/api/ApiEmailUser.php
+++ b/includes/api/ApiEmailUser.php
@@ -34,7 +34,7 @@
$params = $this->extractRequestParams();
 
// Validate target
-   $targetUser = SpecialEmailUser::getTarget( $params['target'] );
+   $targetUser = SpecialEmailUser::getTarget( $params['target'], 
$this->getUser() );
if ( !( $targetUser instanceof User ) ) {
switch ( $targetUser ) {
case 'notarget':
diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php
index eaee0d2..40aa247 100644
--- a/includes/skins/Skin.php
+++ b/includes/skins/Skin.php
@@ -1057,10 +1057,10 @@
$targetUser = User::newFromId( $id );
}
 
-   # The sending user must have a confirmed email address and the 
target
-   # user must have a confirmed email address and allow emails 
from 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Pass revid to parse request

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

Change subject: Pass revid to parse request
..

Pass revid to parse request

Depends-On: I54d38ce423d702dbf4e446ee902fe55df08846cb
Change-Id: Ie28f434eceec2ef2ea65677a779e1c75feb1a028
---
M lib/mw/ApiRequest.js
M lib/mw/Batcher.js
2 files changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index e5e40ba..b63d884 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -743,6 +743,10 @@
apiargs.title = title;
}
 
+   if (env.page.meta.revision.revid) {
+   apiargs.revid = env.page.meta.revision.revid;
+   }
+
this.requestOptions = {
// Use POST since we are passing a bit of source, and GET has a 
very
// limited length. You'll be greeted by "HTTP Error 414 Request 
URI
diff --git a/lib/mw/Batcher.js b/lib/mw/Batcher.js
index e11b737..dbd3a52 100644
--- a/lib/mw/Batcher.js
+++ b/lib/mw/Batcher.js
@@ -259,6 +259,7 @@
title: title,
text: text,
hash: hash,
+   revid: env.page.meta.revision.revid,
});
}
 });

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie28f434eceec2ef2ea65677a779e1c75feb1a028
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] mediawiki...ParsoidBatchAPI[master]: Pass revid to parse request

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

Change subject: Pass revid to parse request
..

Pass revid to parse request

Change-Id: I54d38ce423d702dbf4e446ee902fe55df08846cb
---
M includes/ApiParsoidBatch.php
1 file changed, 23 insertions(+), 13 deletions(-)


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

diff --git a/includes/ApiParsoidBatch.php b/includes/ApiParsoidBatch.php
index 76643ce..b0a04a1 100644
--- a/includes/ApiParsoidBatch.php
+++ b/includes/ApiParsoidBatch.php
@@ -113,21 +113,30 @@
foreach ( $batch as $itemIndex => $itemParams ) {
$action = $itemParams['action'];
if ( $action === 'parse' || $action === 'preprocess' ) {
-   $title = Title::newFromText( 
$itemParams['title'] );
-   if ( !$title ) {
-   if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
-   $this->dieWithError(
-   [ 
'apierror-parsoid-batch-invalidtitle', wfEscapeWikiText( $itemIndex ) ], 
'invalid_title'
-   );
-   } else {
-   $this->dieUsage( "Invalid title 
($itemIndex)", 'invalid_title' );
+   $revid = null;
+   if ( isset( $itemParams['revid'] ) ) {
+   $revid = intval( $itemParams['revid'] );
+   $rev = Revision::newFromId( $revid );
+   if ( !$rev ) {
+   $this->dieUsage( "There is no 
revision ID $revid", 'missingrev' );
+   }
+   $title = $rev->getTitle();
+   } else {
+   $title = Title::newFromText( 
$itemParams['title'] );
+   if ( !$title ) {
+   if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
+   $this->dieWithError(
+   [ 
'apierror-parsoid-batch-invalidtitle', wfEscapeWikiText( $itemIndex ) ], 
'invalid_title'
+   );
+   } else {
+   $this->dieUsage( 
"Invalid title ($itemIndex)", 'invalid_title' );
+   }
}
}
$text = $itemParams['text'];
-   $revid = isset( $itemParams['revid'] ) ? 
intval( $itemParams['revid'] ) : false;
switch ( $action ) {
case 'parse':
-   $itemResult = $this->parse( 
$text, $title );
+   $itemResult = $this->parse( 
$text, $title, $revid );
break;
case 'preprocess':
$itemResult = 
$this->preprocess( $text, $title, $revid );
@@ -212,12 +221,13 @@
/**
 * @param string $text
 * @param Title $title
+* @param int|null $revid
 *
 * @return array
 * @throws MWException
 * @throws MWUnknownContentModelException
 */
-   protected function parse( $text, Title $title ) {
+   protected function parse( $text, Title $title, $revid ) {
global $wgParser;
 
$contentHandler = ContentHandler::getForModelID( 
CONTENT_MODEL_WIKITEXT );
@@ -226,7 +236,7 @@
if ( is_callable( [ $options, 'setWrapOutputClass' ] ) ) {
$options->setWrapOutputClass( false ); // Parsoid 
doesn't want the output wrapper
}
-   $out = $wgParser->parse( $text, $title, $options );
+   $out = $wgParser->parse( $text, $title, $options, true, true, 
$revid );
return [
'text' => $out->getText(),
'modules' => array_values( array_unique( 
$out->getModules() ) ),
@@ -239,7 +249,7 @@
/**
 * @param string $text
 * @param Title $title
-* @param int|bool $revid
+* @param int|null $revid
 *
 * @return array
 * @throws MWException

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Rename to Structured Discussions II: Special pages

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

Change subject: Rename to Structured Discussions II: Special pages
..


Rename to Structured Discussions II: Special pages

Bug: T174137
Change-Id: Icaa42179035e1465e98aa5d69b9e81acf984ee44
---
M Flow.alias.php
M extension.json
R includes/Specials/SpecialEnableStructuredDiscussions.php
R includes/Specials/SpecialStructuredDiscussions.php
4 files changed, 37 insertions(+), 37 deletions(-)

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



diff --git a/Flow.alias.php b/Flow.alias.php
index 71a1ba3..2f45fa6 100644
--- a/Flow.alias.php
+++ b/Flow.alias.php
@@ -1,6 +1,6 @@
 http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
@@ -9,104 +9,104 @@
 
 /** English (English) */
 $specialPageAliases['en'] = [
-   'Flow' => [ 'Flow' ],
-   'EnableFlow' => [ 'EnableFlow' ],
+   'StructuredDiscussions' => [ 'StructuredDiscussions', 'Flow' ],
+   'EnableStructuredDiscussions' => [ 'EnableStructuredDiscussions', 
'EnableFlow' ],
 ];
 
 /** Arabic (العربية) */
 $specialPageAliases['ar'] = [
-   'Flow' => [ 'سريان' ],
-   'EnableFlow' => [ 'فعل_سريان' ],
+   'StructuredDiscussions' => [ 'سريان' ],
+   'EnableStructuredDiscussions' => [ 'فعل_سريان' ],
 ];
 
 /** Egyptian Arabic (مصرى) */
 $specialPageAliases['arz'] = [
-   'Flow' => [ 'سريان' ],
+   'StructuredDiscussions' => [ 'سريان' ],
 ];
 
 /** Bengali (বাংলা) */
 $specialPageAliases['bn'] = [
-   'Flow' => [ 'ফ্লো' ],
-   'EnableFlow' => [ 'ফ্লো_সক্রিয়করণ' ],
+   'StructuredDiscussions' => [ 'ফ্লো' ],
+   'EnableStructuredDiscussions' => [ 'ফ্লো_সক্রিয়করণ' ],
 ];
 
 /** German (Deutsch) */
 $specialPageAliases['de'] = [
-   'EnableFlow' => [ 'Flow_aktivieren' ],
+   'EnableStructuredDiscussions' => [ 'Flow_aktivieren' ],
 ];
 
 /** Zazaki (Zazaki) */
 $specialPageAliases['diq'] = [
-   'Flow' => [ 'Rodayış' ],
+   'StructuredDiscussions' => [ 'Rodayış' ],
 ];
 
 /** Persian (فارسی) */
 $specialPageAliases['fa'] = [
-   'Flow' => [ 'جریان' ],
-   'EnableFlow' => [ 'فعال‌سازی_جریان' ],
+   'StructuredDiscussions' => [ 'جریان' ],
+   'EnableStructuredDiscussions' => [ 'فعال‌سازی_جریان' ],
 ];
 
 /** Hebrew (עברית) */
 $specialPageAliases['he'] = [
-   'Flow' => [ 'זרימה' ],
-   'EnableFlow' => [ 'הפעלת_זרימה' ],
+   'StructuredDiscussions' => [ 'זרימה' ],
+   'EnableStructuredDiscussions' => [ 'הפעלת_זרימה' ],
 ];
 
 /** Hungarian (magyar) */
 $specialPageAliases['hu'] = [
-   'EnableFlow' => [ 'Flow bekapcsolása' ],
+   'EnableStructuredDiscussions' => [ 'Flow bekapcsolása' ],
 ];
 
 /** Korean (한국어) */
 $specialPageAliases['ko'] = [
-   'Flow' => [ '플로우' ],
-   'EnableFlow' => [ '플로우활성화' ],
+   'StructuredDiscussions' => [ '플로우' ],
+   'EnableStructuredDiscussions' => [ '플로우활성화' ],
 ];
 
 /** Northern Luri (لۊری شومالی) */
 $specialPageAliases['lrc'] = [
-   'Flow' => [ 'جأریان' ],
+   'StructuredDiscussions' => [ 'جأریان' ],
 ];
 
 /** Macedonian (македонски) */
 $specialPageAliases['mk'] = [
-   'Flow' => [ 'Тек' ],
-   'EnableFlow' => [ 'ОвозможиТек' ],
+   'StructuredDiscussions' => [ 'Тек' ],
+   'EnableStructuredDiscussions' => [ 'ОвозможиТек' ],
 ];
 
 /** Malayalam (മലയാളം) */
 $specialPageAliases['ml'] = [
-   'Flow' => [ 'പ്രവാഹം' ],
+   'StructuredDiscussions' => [ 'പ്രവാഹം' ],
 ];
 
 /** Portuguese (português) */
 $specialPageAliases['pt'] = [
-   'Flow' => [ 'Fluência', 'Fluencia' ],
+   'StructuredDiscussions' => [ 'Fluência', 'Fluencia' ],
 ];
 
 /** Brazilian Portuguese (português do Brasil) */
 $specialPageAliases['pt-br'] = [
-   'EnableFlow' => [ 'Habilitar_Flow' ],
+   'EnableStructuredDiscussions' => [ 'Habilitar_Flow' ],
 ];
 
 /** Swedish (svenska) */
 $specialPageAliases['sv'] = [
-   'Flow' => [ 'Flöde' ],
+   'StructuredDiscussions' => [ 'Flöde' ],
 ];
 
 /** Vietnamese (Tiếng Việt) */
 $specialPageAliases['vi'] = [
-   'Flow' => [ 'Flow' ],
-   'EnableFlow' => [ 'Kích_hoạt_Flow' ],
+   'StructuredDiscussions' => [ 'Flow' ],
+   'EnableStructuredDiscussions' => [ 'Kích_hoạt_Flow' ],
 ];
 
 /** Simplified Chinese (中文(简体)‎) */
 $specialPageAliases['zh-hans'] = [
-   'EnableFlow' => [ '启用Flow' ],
+   'EnableStructuredDiscussions' => [ '启用Flow' ],
 ];
 
 /** Traditional Chinese (中文(繁體)‎) */
 $specialPageAliases['zh-hant'] = [
-   'Flow' => [ '流動量' ],
-   'EnableFlow' => [ '啟用流動量' ],
+   'StructuredDiscussions' => [ '流動量' ],
+   'EnableStructuredDiscussions' => [ '啟用流動量' ],
 ];
diff --git a/extension.json b/extension.json
index 2ffcdaa..948e992 100644
--- a/extension.json
+++ b/extension.json
@@ -81,8 +81,8 @@
"import/lqt-to-flow-topic": "Flow\\Log\\LqtImportFormatter"
},

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Remove another unneeded API level check

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

Change subject: Hygiene: Remove another unneeded API level check
..

Hygiene: Remove another unneeded API level check

No need to fall back in the case of API levels we no longer support.

Change-Id: I4a4200c3b9642717b1ff358da3618d9874a4443c
---
M app/src/main/java/org/wikipedia/page/FindInPageActionProvider.java
1 file changed, 19 insertions(+), 24 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/FindInPageActionProvider.java 
b/app/src/main/java/org/wikipedia/page/FindInPageActionProvider.java
index ee1f170..9d116ab 100644
--- a/app/src/main/java/org/wikipedia/page/FindInPageActionProvider.java
+++ b/app/src/main/java/org/wikipedia/page/FindInPageActionProvider.java
@@ -119,30 +119,25 @@
 }
 
 public void findInPage(String s) {
-if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
-fragment.getWebView().setFindListener(new FindListener() {
-@Override
-public void onFindResultReceived(int activeMatchOrdinal, int 
numberOfMatches, boolean isDoneCounting) {
-if (!isDoneCounting) {
-return;
-}
-if (numberOfMatches > 0) {
-
findInPageMatch.setText(fragment.getString(R.string.find_in_page_result,
-activeMatchOrdinal + 1, numberOfMatches));
-findInPageNext.setEnabled(true);
-findInPagePrev.setEnabled(true);
-} else {
-findInPageMatch.setText("0/0");
-findInPageNext.setEnabled(false);
-findInPagePrev.setEnabled(false);
-}
-findInPageMatch.setVisibility(View.VISIBLE);
+fragment.getWebView().setFindListener(new FindListener() {
+@Override
+public void onFindResultReceived(int activeMatchOrdinal, int 
numberOfMatches, boolean isDoneCounting) {
+if (!isDoneCounting) {
+return;
 }
-});
-fragment.getWebView().findAllAsync(s);
-} else {
-//noinspection deprecation
-fragment.getWebView().findAll(s);
-}
+if (numberOfMatches > 0) {
+
findInPageMatch.setText(fragment.getString(R.string.find_in_page_result,
+activeMatchOrdinal + 1, numberOfMatches));
+findInPageNext.setEnabled(true);
+findInPagePrev.setEnabled(true);
+} else {
+findInPageMatch.setText("0/0");
+findInPageNext.setEnabled(false);
+findInPagePrev.setEnabled(false);
+}
+findInPageMatch.setVisibility(View.VISIBLE);
+}
+});
+fragment.getWebView().findAllAsync(s);
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Rename to Structured Discussions I: i18n

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

Change subject: Rename to Structured Discussions I: i18n
..


Rename to Structured Discussions I: i18n

Bug: T174137
Change-Id: Id41a8272b658381ba374193a911f8e2c6b1f2cfe
---
M Flow.alias.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 122 insertions(+), 122 deletions(-)

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



diff --git a/Flow.alias.php b/Flow.alias.php
index 83ff303..71a1ba3 100644
--- a/Flow.alias.php
+++ b/Flow.alias.php
@@ -1,6 +1,6 @@
 http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
diff --git a/i18n/en.json b/i18n/en.json
index 88a..cab84ce 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -13,7 +13,7 @@
"Amir E. Aharoni"
]
},
-   "enableflow": "Enable Flow",
+   "enableflow": "Enable Structured Discussions",
"notification-dynamic-actions-flow-board-unwatch": "{{GENDER:$3|Stop}} 
watching new activity on \"$1\"",
"notification-dynamic-actions-flow-board-unwatch-confirmation": 
"{{GENDER:$3|You}} are no longer watching the page \"$1\"",

"notification-dynamic-actions-flow-board-unwatch-confirmation-description": 
"This will not affect individual topics {{GENDER:$3|you}} are watching. You can 
watch [$2 this page] anytime.",
@@ -21,8 +21,8 @@
"notification-dynamic-actions-flow-topic-unwatch-confirmation": 
"{{GENDER:$3|You}} are no longer watching \"$1\"",

"notification-dynamic-actions-flow-topic-unwatch-confirmation-description": 
"{{GENDER:$3|You}} can watch [$2 this topic] anytime.",
"flow-desc": "Discussion system",
-   "flow-talk-taken-over-comment": "/* This page has been converted into a 
Flow discussion board */",
-   "log-name-flow": "Flow activity log",
+   "flow-talk-taken-over-comment": "/* This page has been converted into a 
Structured Discussions board */",
+   "log-name-flow": "Structured Discussions activity log",
"logentry-delete-flow-delete-post": "$1 {{GENDER:$2|deleted}} a [$4 
post] on \"[[$3|$5]]\" on [[$6]]",
"logentry-delete-flow-delete-post-topic-title-not-visible": "$1 
{{GENDER:$2|deleted}} a post on a topic on [[$3]]",
"logentry-delete-flow-restore-post": "$1 {{GENDER:$2|restored}} a [$4 
post] on \"[[$3|$5]]\" on [[$6]]",
@@ -43,11 +43,11 @@
"logentry-lock-flow-lock-topic-topic-title-not-visible": "$1 
{{GENDER:$2|marked}} a topic as resolved on [[$3]]",
"logentry-lock-flow-restore-topic": "$1 {{GENDER:$2|reopened}} topic 
\"[[$3|$5]]\" on [[$6]]",
"logentry-lock-flow-restore-topic-topic-title-not-visible": "$1 
{{GENDER:$2|reopened}} a topic on [[$3]]",
-   "logentry-import-lqt-to-flow-topic": "[[$1|$2]] on [[$3]] was imported 
from LiquidThreads to Flow",
-   "abusefilter-edit-builder-vars-board-articleid": "Page ID of Flow 
board",
-   "abusefilter-edit-builder-vars-board-namespace": "Namespace of Flow 
board",
-   "abusefilter-edit-builder-vars-board-text": "Title of Flow board",
-   "abusefilter-edit-builder-vars-board-prefixedtext": "Full title of Flow 
board",
+   "logentry-import-lqt-to-flow-topic": "[[$1|$2]] on [[$3]] was imported 
from LiquidThreads to Structured Discussions",
+   "abusefilter-edit-builder-vars-board-articleid": "Page ID of Structured 
Discussions board",
+   "abusefilter-edit-builder-vars-board-namespace": "Namespace of 
Structured Discussions board",
+   "abusefilter-edit-builder-vars-board-text": "Title of Structured 
Discussions board",
+   "abusefilter-edit-builder-vars-board-prefixedtext": "Full title of 
Structured Discussions board",
"flow-user-moderated": "Moderated user",
"flow-board-header-browse-topics-link": "Browse topics",
"flow-board-header": "About this board",
@@ -148,8 +148,8 @@
"flow-board-notification-subscribe-description": "{{GENDER:$1|You}} 
will get a notification when a new topic is created on this board.",
"flow-topic-action-watchlist-add": "Subscribe to this topic",
"flow-topic-action-watchlist-remove": "Unsubscribe",
-   "flow-error-allowcreation-no-usedb": "Enabling Flow on a specific page 
requires $wgContentHandlerUseDB to be true.",
-   "flow-error-allowcreation-already-exists": "Page already exists at 
destination, so a Flow board can not be moved there.",
+   "flow-error-allowcreation-no-usedb": "Enabling Structured Discussions 
on a specific page requires $wgContentHandlerUseDB to be 
true.",
+   "flow-error-allowcreation-already-exists": "Page already exists at 
destination, so a Structured Discussions board can not be moved there.",
"flow-error-allowcreation-flow-create-board": "User does not have the 
\"{{int:right-flow-create-board}}\" permission",

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Revert dev build language randomization

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

Change subject: Revert dev build language randomization
..


Revert dev build language randomization

A worthy experiment, but one whose time has passed.

Reverts Id86349d230b521ddc56e9f1c21d0a57b25bc210a.

Change-Id: I368df6c751a57da7860c53759b934d9e3a8ee842
---
M app/src/main/java/org/wikipedia/WikipediaApp.java
1 file changed, 1 insertion(+), 18 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index 197a50f..cdfa64e 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -38,7 +38,6 @@
 import org.wikipedia.events.ThemeChangeEvent;
 import org.wikipedia.history.HistoryEntry;
 import org.wikipedia.language.AcceptLanguageUtil;
-import org.wikipedia.language.AppLanguageLookUpTable;
 import org.wikipedia.language.AppLanguageState;
 import org.wikipedia.login.UserIdClient;
 import org.wikipedia.notifications.NotificationPollBroadcastReceiver;
@@ -151,7 +150,7 @@
 ViewAnimations.init(getResources());
 currentTheme = unmarshalCurrentTheme();
 
-initAppLang();
+appLanguageState = new AppLanguageState(this);
 funnelManager = new FunnelManager(this);
 sessionFunnel = new SessionFunnel(this);
 database = new Database(this);
@@ -483,22 +482,6 @@
 if (!Prefs.suppressNotificationPolling()) {
 notificationReceiver.startPollTask(this);
 }
-}
-
-private void initAppLang() {
-appLanguageState = new AppLanguageState(this);
-boolean langNotSet = getAppLanguageCode() == null;
-if (ReleaseUtil.isDevRelease() && langNotSet) {
-setRandomAppLangCode();
-}
-}
-
-private void setRandomAppLangCode() {
-AppLanguageLookUpTable lut = new AppLanguageLookUpTable(this);
-List codes = lut.getCodes();
-int index = new Random().nextInt(codes.size());
-String code = codes.get(index);
-setAppLanguageCode(code);
 }
 
 private void initExceptionHandling() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I368df6c751a57da7860c53759b934d9e3a8ee842
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Cooltey 
Gerrit-Reviewer: Dbrant 
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] operations/puppet[production]: Lists: Add zen.spamhaus.org DNSBL check to MTA rcpt acl

2017-09-13 Thread Herron (Code Review)
Herron has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377938 )

Change subject: Lists: Add zen.spamhaus.org DNSBL check to MTA rcpt acl
..

Lists: Add zen.spamhaus.org DNSBL check to MTA rcpt acl

Today messages from hosts listed in zen.spamhaus.org are given a spam score
of ~3.5. In some cases this allows messages from known spam sources to
continue onward towards delivery.

This change will warn (for the purposes of testing) if a blacklisted host
connects directly to the lists.wikimedia.org system. Pending successful
testing, a follow-up change will update the acl action from warn to delay
and drop (with a useful 5xx error message).

Bug: T175878
Change-Id: I8d4f469aefb0f5b7bc954efb7b9bbeb69fae161d
---
M modules/profile/templates/exim/exim4.conf.mailman.erb
1 file changed, 11 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/377938/1

diff --git a/modules/profile/templates/exim/exim4.conf.mailman.erb 
b/modules/profile/templates/exim/exim4.conf.mailman.erb
index e5b52da..0b98a2c 100644
--- a/modules/profile/templates/exim/exim4.conf.mailman.erb
+++ b/modules/profile/templates/exim/exim4.conf.mailman.erb
@@ -116,7 +116,7 @@
# Accept mail for postmaster without further policy checking,
# for compliance with the RFCs
accept local_parts = postmaster : abuse
-   set acl_m2 = skip_spamd
+   set acl_m2 = skip_spam_checks
 
# Verify the recipient address for local domains, or require the
# recipient domain to exist for remote domains
@@ -135,12 +135,19 @@
accept hosts = +wikimedia_nets
set acl_m0 = trusted relay
 
+   # Skip if so requested
+   accept condition = ${if eq{$acl_m2}{skip_spam_checks}}
+
+   # Reject messages from IP addresses listed in DNSBL
+   # This is a warn for testing.  For production...
+   #   * Change to delay & drop
+   #   * Change log_message to message
+   warn log_message = $sender_host_address is listed by $dnslist_domain 
($dnslist_value: $dnslist_text)
+   dnslists = zen.spamhaus.org
+
# Only run through SpamAssassin if requested for this domain and
# the message is not too large
accept condition = ${if >{$message_size}{400K}}
-
-   # Skip if so requested
-   accept condition = ${if eq{$acl_m2}{skip_spamd}}
 
# Add spam headers if score >= 1
warn spam = nonexistent:true

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove unneeded API level check

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

Change subject: Hygiene: remove unneeded API level check
..

Hygiene: remove unneeded API level check

No need to check for API 16 since it's the lowest version we currently
support. Removes the whole utility method and replaces it with direct
platform method calls.

Change-Id: I8b32e317fba6599dd680b8a067b270fae09675f1
---
M app/src/main/java/org/wikipedia/feed/news/NewsFragment.java
M app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
M app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java
M app/src/main/java/org/wikipedia/page/leadimages/PageHeaderImageView.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListHeaderView.java
M app/src/main/java/org/wikipedia/views/ViewUtil.java
6 files changed, 5 insertions(+), 20 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/feed/news/NewsFragment.java 
b/app/src/main/java/org/wikipedia/feed/news/NewsFragment.java
index 9649e08..9a402a0 100644
--- a/app/src/main/java/org/wikipedia/feed/news/NewsFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/news/NewsFragment.java
@@ -33,7 +33,6 @@
 import org.wikipedia.views.DefaultViewHolder;
 import org.wikipedia.views.DrawableItemDecoration;
 import org.wikipedia.views.FaceAndColorDetectImageView;
-import org.wikipedia.views.ViewUtil;
 
 import java.util.List;
 
@@ -73,7 +72,7 @@
 View view = inflater.inflate(R.layout.fragment_news, container, false);
 unbinder = ButterKnife.bind(this, view);
 
-ViewUtil.setBackgroundDrawable(gradientView, 
GradientUtil.getPowerGradient(R.color.lead_gradient_start, Gravity.TOP));
+
gradientView.setBackground(GradientUtil.getPowerGradient(R.color.lead_gradient_start,
 Gravity.TOP));
 getAppCompatActivity().setSupportActionBar(toolbar);
 
getAppCompatActivity().getSupportActionBar().setDisplayHomeAsUpEnabled(true);
 getAppCompatActivity().getSupportActionBar().setTitle("");
diff --git a/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java 
b/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
index 6549a76..5ab02bc 100644
--- a/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
+++ b/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
@@ -627,7 +627,7 @@
 }
 
 private void setBackgroundGradient(View view, int gravity) {
-ViewUtil.setBackgroundDrawable(view, 
GradientUtil.getPowerGradient(R.color.lead_gradient_start, gravity));
+
view.setBackground(GradientUtil.getPowerGradient(R.color.lead_gradient_start, 
gravity));
 }
 
 private void initToolbar() {
diff --git 
a/app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java 
b/app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java
index a3d96b3..6e8736f 100644
--- a/app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java
+++ b/app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java
@@ -26,7 +26,6 @@
 import org.wikipedia.util.GradientUtil;
 import org.wikipedia.util.log.L;
 import org.wikipedia.views.FaceAndColorDetectImageView;
-import org.wikipedia.views.ViewUtil;
 
 import java.io.IOException;
 
@@ -79,8 +78,7 @@
 compilation = GsonUnmarshaller.unmarshal(Compilation.class,
 getActivity().getIntent().getStringExtra(EXTRA_COMPILATION));
 
-ViewUtil.setBackgroundDrawable(gradientView, 
GradientUtil.getPowerGradient(R.color.lead_gradient_start, Gravity.TOP));
-
+
gradientView.setBackground(GradientUtil.getPowerGradient(R.color.lead_gradient_start,
 Gravity.TOP));
 imageView.loadImage(compilation.featureImageUri());
 nameView.setText(compilation.name());
 
dateSizeView.setText(String.format(getString(R.string.offline_compilation_detail_date_size),
diff --git 
a/app/src/main/java/org/wikipedia/page/leadimages/PageHeaderImageView.java 
b/app/src/main/java/org/wikipedia/page/leadimages/PageHeaderImageView.java
index b9b084a..df76704 100644
--- a/app/src/main/java/org/wikipedia/page/leadimages/PageHeaderImageView.java
+++ b/app/src/main/java/org/wikipedia/page/leadimages/PageHeaderImageView.java
@@ -14,7 +14,6 @@
 
 import org.wikipedia.R;
 import org.wikipedia.views.FaceAndColorDetectImageView;
-import org.wikipedia.views.ViewUtil;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
@@ -86,6 +85,6 @@
 inflate(getContext(), R.layout.view_page_header_image, this);
 ButterKnife.bind(this);
 
-ViewUtil.setBackgroundDrawable(gradientView, 
getPowerGradient(R.color.new_lead_gradient_start, Gravity.TOP));
+
gradientView.setBackground(getPowerGradient(R.color.new_lead_gradient_start, 
Gravity.TOP));
 }
 }
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...Collection[wmf/1.30.0-wmf.18]: Concatenate pages and send to Electron

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

Change subject: Concatenate pages and send to Electron
..

Concatenate pages and send to Electron

Fetches pages in a collection from RESTBase, sends them through
RemexHTML to fix heading levels and ensure id uniqueness, adds
cover page, table of contents and contributors, then outputs or
sends to Electron.

The functionality can be accessed at Special:RenderBook/test,
but (short of typing in the URL by hand) that is not
exposed to the user. Integrating it will happen in a
follow-up patch.

Bug: T171838
Change-Id: I686736e0b2c9f98a7c37046336219a0f852179b0
Depends-On: Ie37105a9f1ff92e1a79bfcd9f8578965e3d347f0
(cherry picked from commit c9a8c0063808ba10a178b468847b08e9ebccf79c)
---
M Collection.alias.php
M Collection.php
A SpecialRenderBook.php
M i18n/en.json
M i18n/qqq.json
A includes/BookRenderer.php
A includes/BookRenderingMediator.php
A includes/DataProvider.php
A includes/ElectronVirtualRestService.php
A includes/HeadingCounter.php
A includes/RemexCollectionMunger.php
A resources/ext.collection.offline/offline.less
A templates/toc.mustache
A templates/tocitem.mustache
A tests/data/BookRendererTest/chapters.html
A tests/data/BookRendererTest/chapters.php
A tests/data/BookRendererTest/header_conflict.html
A tests/data/BookRendererTest/header_conflict.php
A tests/data/BookRendererTest/id_conflict.html
A tests/data/BookRendererTest/id_conflict.php
A tests/data/BookRendererTest/single_page.html
A tests/data/BookRendererTest/single_page.php
A tests/data/BookRendererTest/two_pages.html
A tests/data/BookRendererTest/two_pages.php
A tests/phpunit/includes/BookRendererTest.php
A tests/phpunit/includes/DataProviderTest.php
A tests/phpunit/includes/HeadingCounterTest.php
27 files changed, 2,686 insertions(+), 2 deletions(-)


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

diff --git a/Collection.alias.php b/Collection.alias.php
index 770ffc6..28c961e 100644
--- a/Collection.alias.php
+++ b/Collection.alias.php
@@ -11,6 +11,7 @@
 /** English (English) */
 $specialPageAliases['en'] = [
'Book' => [ 'Book', 'Collection' ],
+   'RenderBook' => [ 'RenderBook' ],
 ];
 
 /** Afrikaans (Afrikaans) */
diff --git a/Collection.php b/Collection.php
index 9f95178..1dcb39e 100644
--- a/Collection.php
+++ b/Collection.php
@@ -179,6 +179,20 @@
 $wgAutoloadClasses['CollectionSuggest'] = __DIR__ . '/Collection.suggest.php';
 $wgAutoloadClasses['CollectionProposals'] = __DIR__ . 
'/Collection.suggest.php';
 
+$wgAutoloadClasses['SpecialRenderBook'] = __DIR__ . '/SpecialRenderBook.php';
+$wgAutoloadClasses[\MediaWiki\Extensions\Collection\DataProvider::class]
+   = __DIR__ . '/includes/DataProvider.php';
+$wgAutoloadClasses[\MediaWiki\Extensions\Collection\ElectronVirtualRestService::class]
+   = __DIR__ . '/includes/ElectronVirtualRestService.php';
+$wgAutoloadClasses[\MediaWiki\Extensions\Collection\BookRenderer::class]
+   = __DIR__ . '/includes/BookRenderer.php';
+$wgAutoloadClasses[MediaWiki\Extensions\Collection\RemexCollectionMunger::class]
+   = __DIR__ . '/includes/RemexCollectionMunger.php';
+$wgAutoloadClasses[\MediaWiki\Extensions\Collection\HeadingCounter::class]
+   = __DIR__ . '/includes/HeadingCounter.php';
+$wgAutoloadClasses[\MediaWiki\Extensions\Collection\BookRenderingMediator::class]
+   = __DIR__ . '/includes/BookRenderingMediator.php';
+
 $wgAutoloadClasses['CollectionPageTemplate'] = __DIR__ . 
'/templates/CollectionPageTemplate.php';
 $wgAutoloadClasses['CollectionListTemplate'] = __DIR__ . 
'/templates/CollectionListTemplate.php';
 $wgAutoloadClasses['CollectionLoadOverwriteTemplate'] =
@@ -202,6 +216,7 @@
 $wgExtensionMessagesFiles['CollectionAlias'] = __DIR__ . 
'/Collection.alias.php';
 
 $wgSpecialPages['Book'] = 'SpecialCollection';
+$wgSpecialPages['RenderBook'] = 'SpecialRenderBook';
 
 $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 
'CollectionHooks::buildNavUrls';
 $wgHooks['SidebarBeforeOutput'][] = 'CollectionHooks::buildSidebar';
@@ -248,6 +263,9 @@
'scripts' => 'ext.collection.suggest/suggest.js',
'dependencies' => 'ext.collection.bookcreator'
],
+   'ext.collection.offline' => $collResourceTemplate + [
+   'styles' => 'ext.collection.offline/offline.less',
+   ],
 ];
 
 # register global Ajax functions:
diff --git a/SpecialRenderBook.php b/SpecialRenderBook.php
new file mode 100644
index 000..270115a
--- /dev/null
+++ b/SpecialRenderBook.php
@@ -0,0 +1,96 @@
+setListed( false );
+   }
+
+   public function execute( $subPage ) {
+   $key = null;
+   if ( strpos( $subPage, '/' ) !== false ) {
+   list( $subPage, $key ) = explode( '/', $subPage, 2 );
+   }
+
+   $services = 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Output namespace class on log actions as well

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

Change subject: RCFilters: Output namespace class on log actions as well
..


RCFilters: Output namespace class on log actions as well

Bug: T174732
Change-Id: Icaf7117d9566bb2bb31c69cf86078491d6c217cc
---
M includes/changes/ChangesList.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php
index cac4769..bc50096 100644
--- a/includes/changes/ChangesList.php
+++ b/includes/changes/ChangesList.php
@@ -182,9 +182,9 @@
$classes[] = self::CSS_CLASS_PREFIX . 'edit';
$classes[] = Sanitizer::escapeClass( 
self::CSS_CLASS_PREFIX . 'ns' .
$rc->mAttribs['rc_namespace'] . '-' . 
$rc->mAttribs['rc_title'] );
-   $classes[] = Sanitizer::escapeClass( 
self::CSS_CLASS_PREFIX . 'ns-' .
-   $rc->mAttribs['rc_namespace'] );
}
+   $classes[] = Sanitizer::escapeClass( self::CSS_CLASS_PREFIX . 
'ns-' .
+   $rc->mAttribs['rc_namespace'] );
 
// Indicate watched status on the line to allow for more
// comprehensive styling.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icaf7117d9566bb2bb31c69cf86078491d6c217cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Fix CX namespace config

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

Change subject: Fix CX namespace config
..


Fix CX namespace config

This config var takes a number, not a namespace name;
and even then, "Main" isn't a valid namespace name anyway.

Change-Id: Iee1f598742d2d830311497940366690177e551f1
---
M puppet/hieradata/common.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index b2290ee..9683949 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -34,7 +34,7 @@
 contenttranslation::eventlogging: false
 contenttranslation::betafeature: false
 contenttranslation::intarget: false
-contenttranslation::namespace: 'Main'
+contenttranslation::namespace: 0
 contenttranslation::suggestions: true
 contenttranslation::wikis:
   en:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee1f598742d2d830311497940366690177e551f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Output namespace class on log actions as well

2017-09-13 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377935 )

Change subject: RCFilters: Output namespace class on log actions as well
..

RCFilters: Output namespace class on log actions as well

Bug: T174732
Change-Id: Icaf7117d9566bb2bb31c69cf86078491d6c217cc
---
M includes/changes/ChangesList.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/35/377935/1

diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php
index cac4769..bc50096 100644
--- a/includes/changes/ChangesList.php
+++ b/includes/changes/ChangesList.php
@@ -182,9 +182,9 @@
$classes[] = self::CSS_CLASS_PREFIX . 'edit';
$classes[] = Sanitizer::escapeClass( 
self::CSS_CLASS_PREFIX . 'ns' .
$rc->mAttribs['rc_namespace'] . '-' . 
$rc->mAttribs['rc_title'] );
-   $classes[] = Sanitizer::escapeClass( 
self::CSS_CLASS_PREFIX . 'ns-' .
-   $rc->mAttribs['rc_namespace'] );
}
+   $classes[] = Sanitizer::escapeClass( self::CSS_CLASS_PREFIX . 
'ns-' .
+   $rc->mAttribs['rc_namespace'] );
 
// Indicate watched status on the line to allow for more
// comprehensive styling.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Set mw_host for cxserver

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

Change subject: Set mw_host for cxserver
..

Set mw_host for cxserver

Otherwise it'll try to ask RESTbase for domains like es.wikipedia.org

Change-Id: Iadb0d4085a36a0b4b76ccabe377758f1e0f82d68
Depends-On: I8196b70280a9d2b756c1a4b2e877288d79ce3fa7
---
M puppet/modules/contenttranslation/templates/cxserver.config.yaml.erb
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/34/377934/1

diff --git 
a/puppet/modules/contenttranslation/templates/cxserver.config.yaml.erb 
b/puppet/modules/contenttranslation/templates/cxserver.config.yaml.erb
index 485b1f8..a4dd902 100644
--- a/puppet/modules/contenttranslation/templates/cxserver.config.yaml.erb
+++ b/puppet/modules/contenttranslation/templates/cxserver.config.yaml.erb
@@ -28,5 +28,7 @@
 key: '<%= @youdao_api_key %>'
   <% end -%>
 
+mw_host: "{lang}.wiki.local.wmftest.net"
+
 # registry to use
 registry: registry.yaml

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Fix CX namespace config

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

Change subject: Fix CX namespace config
..

Fix CX namespace config

This config var takes a number, not a namespace name;
and even then, "Main" isn't a valid namespace name anyway.

Change-Id: Iee1f598742d2d830311497940366690177e551f1
---
M puppet/hieradata/common.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/33/377933/1

diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index b2290ee..9683949 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -34,7 +34,7 @@
 contenttranslation::eventlogging: false
 contenttranslation::betafeature: false
 contenttranslation::intarget: false
-contenttranslation::namespace: 'Main'
+contenttranslation::namespace: 0
 contenttranslation::suggestions: true
 contenttranslation::wikis:
   en:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Allow empty saved query

2017-09-13 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377932 )

Change subject: RCFilters: Allow empty saved query
..

RCFilters: Allow empty saved query

For this, we also need to check for saved query visibility on the
saved query model initialization, because since the model starts
its life all-empty, if the saved query is also all-empty, it will
not trigger any item updates on the main model.

Bug: T172387
Change-Id: Ibc536b577e4c3abcc04fa229f9978b651b2f9e61
---
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
1 file changed, 12 insertions(+), 5 deletions(-)


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

diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
index b15b034..97e0002 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
@@ -97,7 +97,10 @@
click: 'onSaveQueryButtonClick',
saveCurrent: 'setSavedQueryVisibility'
} );
-   this.queriesModel.connect( this, { itemUpdate: 
'onSavedQueriesItemUpdate' } );
+   this.queriesModel.connect( this, {
+   itemUpdate: 'onSavedQueriesItemUpdate',
+   initialize: 'onSavedQueriesInitialize'
+   } );
}
 
this.emptyFilterMessage = new OO.ui.LabelWidget( {
@@ -257,6 +260,13 @@
};
 
/**
+* Respond to save query model initialization
+*/
+   
mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onSavedQueriesInitialize = 
function () {
+   this.setSavedQueryVisibility();
+   };
+
+   /**
 * Respond to save query item change. Mainly this is done to update the 
label in case
 * a query item has been edited
 *
@@ -393,10 +403,7 @@
this.matchingQuery ? this.matchingQuery.getLabel() : ''
);
this.savedQueryTitle.toggle( !!this.matchingQuery );
-   this.saveQueryButton.toggle(
-   !this.isEmpty() &&
-   !this.matchingQuery
-   );
+   this.saveQueryButton.toggle(!this.matchingQuery );
 
if ( this.matchingQuery ) {
this.emphasize();

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

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

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


[MediaWiki-commits] [Gerrit] labs...cdnjs-index[master]: Add link to source for our cdnjs.

2017-09-13 Thread Quiddity (Code Review)
Quiddity has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377930 )

Change subject: Add link to source for our cdnjs.
..

Add link to source for our cdnjs.

Change-Id: I93152acac0a68b7d73baae66a7aa11f50af59262
---
M template.html
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/cdnjs-index 
refs/changes/30/377930/2

diff --git a/template.html b/template.html
index 481d3c7..7b5e9f1 100644
--- a/template.html
+++ b/template.html
@@ -54,7 +54,7 @@
 
 
 Mirror of cdnjs.com for use by Wikimedia Tool Labs
-Collection of very useful JS / CSS libraries served in a fast, 
Wikimedia Privacy 
Policy friendly way.
+Collection of very useful JS / CSS libraries served in a fast, 
Wikimedia Privacy 
Policy friendly way. (https://gerrit.wikimedia.org/r/#/admin/projects/labs/tools/cdnjs-index,branches;>source)
 Thanks to the https://github.com/cdnjs/cdnjs;>cdnjs community for maintaining and 
curating the libraries!. https://github.com/cdnjs/cdnjs#adding-a-new-or-updating-an-existing-library;>You
 can add your favorite libraries too.
 
 Tip: Use your browser's search function to 
search! The libraries are ordered by popularity. Clicking 'Use latest' will 
show you the list of files distributed with the library and allows you to 
include them as you see fit

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93152acac0a68b7d73baae66a7aa11f50af59262
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/cdnjs-index
Gerrit-Branch: master
Gerrit-Owner: Quiddity 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Remove unused method

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

Change subject: Hygiene: Remove unused method
..

Hygiene: Remove unused method

Change-Id: Id6631e4aeb7d1857d93c0486d475719ffd7c00ac
---
M app/src/main/java/org/wikipedia/views/ViewUtil.java
1 file changed, 0 insertions(+), 16 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/views/ViewUtil.java 
b/app/src/main/java/org/wikipedia/views/ViewUtil.java
index 7a61176..0f365bf 100644
--- a/app/src/main/java/org/wikipedia/views/ViewUtil.java
+++ b/app/src/main/java/org/wikipedia/views/ViewUtil.java
@@ -10,7 +10,6 @@
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.text.TextUtils;
-import android.view.ActionMode;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewManager;
@@ -21,8 +20,6 @@
 
 import org.wikipedia.WikipediaApp;
 import org.wikipedia.util.DimenUtil;
-
-import java.lang.reflect.Field;
 
 public final class ViewUtil {
 public static void setBackgroundDrawable(View view, Drawable drawable) {
@@ -58,19 +55,6 @@
 view.clearAnimation();
 animation.setDuration(0);
 view.setAnimation(animation);
-}
-
-/**
- * Find the originating view of an ActionMode.
- * @param mode The ActionMode in question.
- * @return The view from which the ActionMode originated.
- * @throws NoSuchFieldException
- * @throws IllegalAccessException
- */
-public static View getOriginatingView(ActionMode mode) throws 
NoSuchFieldException, IllegalAccessException {
-Field originatingView = 
mode.getClass().getDeclaredField("mOriginatingView");
-originatingView.setAccessible(true);
-return (View) originatingView.get(mode);
 }
 
 public static void loadImageUrlInto(@NonNull SimpleDraweeView drawee, 
@Nullable String url) {

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Temporarily prevent users from accessing Special:RenderBook

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

Change subject: Temporarily prevent users from accessing Special:RenderBook
..

Temporarily prevent users from accessing Special:RenderBook

There is no way to show an error with SpecialPageBeforeExecute
so this will look ugly but the test page is not discoverable
(short of reading the source code) so no need to look nice.

Bug: T175868
Change-Id: If7ffe868546733315412e737fefe7cbe7cfe29d7
---
M wmf-config/CommonSettings.php
1 file changed, 10 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index ff86517..b341567 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2268,6 +2268,16 @@
'accessKey' => $wmgElectronSecret, // set in private 
repo
],
];
+
+   // HACK T175868 prevent random users from accessing the test page
+   $wgHooks['SpecialPageBeforeExecute'][] = function ( SpecialPage 
$special, $subPage ) {
+   if (
+   $special->getName() === 'RenderBook' && $subPage === 
'test'
+   && !preg_match( '/ \(WMF\)$/', 
$special->getUser()->getName() )
+   ) {
+   return false;
+   }
+   };
 }
 
 if ( $wmgUseVisualEditor ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7ffe868546733315412e737fefe7cbe7cfe29d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] operations/mediawiki-config[master]: Add VirtualRestService config for Electron

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

Change subject: Add VirtualRestService config for Electron
..

Add VirtualRestService config for Electron

The URLs are copied from puppet: profile::restbase::pdfrender_uri in
* hieradata/labs/deployment-prep/common.yaml (labs)
* hieradata/role/common/restbase/production.yaml (production)

$wmgElectronSecret must be set in the private repo before deploying this.

Bug: T175868
Change-Id: I9709b0548413d95b972fdfe95008f62aeaee5f60
---
M wmf-config/CommonSettings.php
M wmf-config/LabsServices.php
M wmf-config/ProductionServices.php
3 files changed, 16 insertions(+), 4 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 3e89c98..ff86517 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2226,7 +2226,7 @@
wfLoadExtension( 'Linter' );
 }
 
-if ( !isset( $wgVirtualRestConfig ) && ( $wmgUseRestbaseVRS || $wmgUseParsoid 
) ) {
+if ( !isset( $wgVirtualRestConfig ) && ( $wmgUseRestbaseVRS || $wmgUseParsoid 
|| $wmgUseCollection ) ) {
$wgVirtualRestConfig = [
'modules' => [],
'global' => [
@@ -2261,6 +2261,15 @@
];
 }
 
+if ( $wmgUseCollection ) {
+   $wgVirtualRestConfig['modules']['electron'] = [
+   'url' => $wmfLocalServices['electron'],
+   'options' => [
+   'accessKey' => $wmgElectronSecret, // set in private 
repo
+   ],
+   ];
+}
+
 if ( $wmgUseVisualEditor ) {
wfLoadExtension( 'VisualEditor' );
 
diff --git a/wmf-config/LabsServices.php b/wmf-config/LabsServices.php
index 816392b..70b5455 100644
--- a/wmf-config/LabsServices.php
+++ b/wmf-config/LabsServices.php
@@ -35,7 +35,8 @@
],
'etcd' => 'deployment-etcd-01.deployment-prep.eqiad.wmflabs:2379',
'mediaSwiftAuth' => 
'http://deployment-ms-fe02.deployment-prep.eqiad.wmflabs/auth',
-   'mediaSwiftStore' => 
'http://deployment-ms-fe02.deployment-prep.eqiad.wmflabs/v1/AUTH_mw'
+   'mediaSwiftStore' => 
'http://deployment-ms-fe02.deployment-prep.eqiad.wmflabs/v1/AUTH_mw',
+   'electron' => 
'http://deployment-pdfrender02.deployment-prep.eqiad.wmflabs:5252',
 ];
 
 ### Logstash
diff --git a/wmf-config/ProductionServices.php 
b/wmf-config/ProductionServices.php
index 06ef67b..cef9c6d 100644
--- a/wmf-config/ProductionServices.php
+++ b/wmf-config/ProductionServices.php
@@ -25,7 +25,8 @@
'cxserver' => 'http://cxserver.discovery.wmnet:8080',
'etcd' => '_etcd._tcp.eqiad.wmnet',
'mediaSwiftAuth' => 'https://ms-fe.svc.eqiad.wmnet/auth',
-   'mediaSwiftStore' => 'https://ms-fe.svc.eqiad.wmnet/v1/AUTH_mw'
+   'mediaSwiftStore' => 'https://ms-fe.svc.eqiad.wmnet/v1/AUTH_mw',
+   'electron' => 'http://pdfrender.discovery.wmnet:5252',
 ];
 
 $wmfAllServices['codfw'] = [
@@ -42,7 +43,8 @@
'cxserver' => 'http://cxserver.discovery.wmnet:8080',
'etcd' => '_etcd._tcp.codfw.wmnet',
'mediaSwiftAuth' => 'https://ms-fe.svc.codfw.wmnet/auth',
-   'mediaSwiftStore' => 'https://ms-fe.svc.codfw.wmnet/v1/AUTH_mw'
+   'mediaSwiftStore' => 'https://ms-fe.svc.codfw.wmnet/v1/AUTH_mw',
+   'electron' => 'http://pdfrender.discovery.wmnet:5252',
 ];
 
 ### Logstash

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9709b0548413d95b972fdfe95008f62aeaee5f60
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] labs...heritage[master]: Ensure all added categories are pywikibot.Category objects

2017-09-13 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377927 )

Change subject: Ensure all added categories are pywikibot.Category objects
..

Ensure all added categories are pywikibot.Category objects

Also enumerate third category acquisition method

Bug: T175839
Change-Id: Ibf92088b1e60c6d808f1a79c78c0fe3d2165fb20
---
M erfgoedbot/categorize_images.py
1 file changed, 16 insertions(+), 6 deletions(-)


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

diff --git a/erfgoedbot/categorize_images.py b/erfgoedbot/categorize_images.py
index 2566416..d94e4cc 100644
--- a/erfgoedbot/categorize_images.py
+++ b/erfgoedbot/categorize_images.py
@@ -282,12 +282,13 @@
 
 
 def get_categories_from_source_page(page, commonsCatTemplates):
-'''
+"""
 Get Commons categories based on page.
+
 1. If page contains a Commonscat template, use that category
 2. Else, try getting it from Wikidata
 3. Else pull Commonscat links from upper categories
-'''
+"""
 new_categories = set()
 categorisation_method = ''
 for commonsCatTemplateName in commonsCatTemplates:
@@ -298,7 +299,10 @@
 categorisation_method = 'C1: CommonsCat on the monument list page'
 if not len(new_categories):
 try:
-new_categories.add(get_Commons_category_via_Wikidata(page))
+site = pywikibot.Site(u'commons', u'commons')
+cat_title = get_Commons_category_via_Wikidata(page)
+cat = pywikibot.Category(site, cat_title)
+new_categories.add(cat)
 categorisation_method = 'C2: via Wikidata on the monument list 
page'
 except NoCommonsCatFromWikidataItemException:
 pass
@@ -328,9 +332,14 @@
 
 
 def getCategoryFromCommonscat(page, commonsCatTemplates):
-'''
-Get a Commons category based on a page with a Commonscat template
-'''
+"""
+Get a Commons category based on a page.
+
+1. Get category from commonscat template on page
+2. Get category from commonscat property or Commons category sitelink on
+   the Wikidata object corresponding to the page
+3. Get category with same name as page
+"""
 cat_title = None
 categorisation_method = '1'  # By 'default', we do not rely on Wikidata
 (template, params) = get_commonscat_template_in_page(page, 
commonsCatTemplates)
@@ -346,6 +355,7 @@
 pass
 
 if not cat_title:
+categorisation_method = '3'
 cat_title = page.title(withNamespace=False)
 
 site = pywikibot.Site(u'commons', u'commons')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf92088b1e60c6d808f1a79c78c0fe3d2165fb20
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil 

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


[MediaWiki-commits] [Gerrit] mediawiki...ArticleCreationWorkflow[master]: Register Eventlogging schema

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

Change subject: Register Eventlogging schema
..

Register Eventlogging schema

Bug: T175756
Change-Id: Icf48d609ce7dd6117137a066e87eb08fe8ee981d
---
M extension.json
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index 7b53a0e..ac0cd7a 100644
--- a/extension.json
+++ b/extension.json
@@ -34,6 +34,9 @@
]
}
},
+   "EventLoggingSchemas": {
+   "ArticleCreationWorkflow": 17145434
+   },
"config": {
"ArticleCreationWorkflows": {
"description": "Describes conditions when new page 
creation should be intercepted. See doc/config.txt for details.",

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: WikipediaApp cleanup

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

Change subject: Hygiene: WikipediaApp cleanup
..

Hygiene: WikipediaApp cleanup

* Remove methods that simply wrap other static methods; this class is long
  enough without them

* Move getters to the top

* Reorder methods by access protection level

No functional changes intended.

Change-Id: Ibc66102a1c3e6d54a6fbfb265fb308c50124d560
---
M app/src/main/java/org/wikipedia/WikipediaApp.java
M app/src/main/java/org/wikipedia/analytics/EventLoggingService.java
M app/src/main/java/org/wikipedia/csrf/CsrfTokenClient.java
M 
app/src/main/java/org/wikipedia/dataclient/okhttp/CommonHeaderRequestInterceptor.java
M app/src/main/java/org/wikipedia/dataclient/okhttp/OkHttpConnectionFactory.java
M app/src/main/java/org/wikipedia/feed/announcement/GeoIPCookieUnmarshaller.java
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
M app/src/main/java/org/wikipedia/page/ToCHandler.java
M app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
M app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
M app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
M app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java
M app/src/main/java/org/wikipedia/util/GeoUtil.java
M app/src/main/java/org/wikipedia/views/FaceAndColorDetectImageView.java
M app/src/main/java/org/wikipedia/views/ViewUtil.java
M app/src/main/java/org/wikipedia/widgets/WidgetProviderFeaturedPage.java
20 files changed, 182 insertions(+), 203 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index 197a50f..709da9e 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -73,6 +73,7 @@
 import retrofit2.Call;
 
 import static org.apache.commons.lang3.StringUtils.defaultString;
+import static org.wikipedia.settings.Prefs.getTextSizeMultiplier;
 import static org.wikipedia.util.DimenUtil.getFontSizeFromSp;
 import static org.wikipedia.util.ReleaseUtil.getChannel;
 
@@ -90,43 +91,123 @@
 private SessionFunnel sessionFunnel;
 private NotificationPollBroadcastReceiver notificationReceiver = new 
NotificationPollBroadcastReceiver();
 private NetworkConnectivityReceiver connectivityReceiver = new 
NetworkConnectivityReceiver();
-
 private Database database;
 private String userAgent;
 private WikiSite wiki;
-@NonNull private UserIdClient userIdClient = new UserIdClient();
-
+private UserIdClient userIdClient = new UserIdClient();
 private CrashReporter crashReporter;
 private RefWatcher refWatcher;
-
-public SessionFunnel getSessionFunnel() {
-return sessionFunnel;
-}
-
-/**
- * Singleton instance of WikipediaApp
- */
-private static WikipediaApp INSTANCE;
-
 private Bus bus;
-@NonNull private Theme currentTheme = Theme.getFallback();
-
+private Theme currentTheme = Theme.getFallback();
 private WikipediaZeroHandler zeroHandler;
-public WikipediaZeroHandler getWikipediaZeroHandler() {
-return zeroHandler;
-}
+
+private static WikipediaApp INSTANCE;
 
 public WikipediaApp() {
 INSTANCE = this;
 }
 
-/**
- * Returns the singleton instance of the WikipediaApp
- *
- * This is ok, since android treats it as a singleton anyway.
- */
 public static WikipediaApp getInstance() {
 return INSTANCE;
+}
+
+public SessionFunnel getSessionFunnel() {
+return sessionFunnel;
+}
+
+public RefWatcher getRefWatcher() {
+return refWatcher;
+}
+
+public Bus getBus() {
+return bus;
+}
+
+public Database getDatabase() {
+return database;
+}
+
+public FunnelManager getFunnelManager() {
+return funnelManager;
+}
+
+public WikipediaZeroHandler getWikipediaZeroHandler() {
+return zeroHandler;
+}
+
+public RemoteConfig getRemoteConfig() {
+return remoteConfig;
+}
+
+/**
+ * Gets the currently-selected theme for the app.
+ * @return Theme that is currently selected, which is the actual theme ID 
that can
+ * be passed to setTheme() when creating an activity.
+ */
+@NonNull
+public Theme getCurrentTheme() {
+return currentTheme;
+}
+
+public boolean isCurrentThemeLight() {
+return getCurrentTheme().isLight();
+}
+
+public boolean isCurrentThemeDark() {
+  

[MediaWiki-commits] [Gerrit] labs...cdnjs-index[master]: Fix the wording in the cdnjs UI.

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

Change subject: Fix the wording in the cdnjs UI.
..


Fix the wording in the cdnjs UI.

Change-Id: I665cf0241643c0c4f38c39422397c625b9cbaddd
---
M template.html
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/template.html b/template.html
index 4b7908e..481d3c7 100644
--- a/template.html
+++ b/template.html
@@ -57,7 +57,7 @@
 Collection of very useful JS / CSS libraries served in a fast, 
Wikimedia Privacy 
Policy friendly way.
 Thanks to the https://github.com/cdnjs/cdnjs;>cdnjs community for maintaining and 
curating the libraries!. https://github.com/cdnjs/cdnjs#adding-a-new-or-updating-an-existing-library;>You
 can add your favorite libraries too.
 
-Tip: Use your browser's search function to 
search! The libraries are ordered by popularity. Clicking 'Use' will take show 
you list of files distributed with the library and allows you to include them 
as you see fit
+Tip: Use your browser's search function to 
search! The libraries are ordered by popularity. Clicking 'Use latest' will 
show you the list of files distributed with the library and allows you to 
include them as you see fit
 
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I665cf0241643c0c4f38c39422397c625b9cbaddd
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/cdnjs-index
Gerrit-Branch: master
Gerrit-Owner: Quiddity 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Zhuyifei1999 

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


[MediaWiki-commits] [Gerrit] labs...cdnjs-index[master]: Fix the wording in the cdnjs UI.

2017-09-13 Thread Quiddity (Code Review)
Quiddity has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377923 )

Change subject: Fix the wording in the cdnjs UI.
..

Fix the wording in the cdnjs UI.

Change-Id: I665cf0241643c0c4f38c39422397c625b9cbaddd
---
M template.html
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/cdnjs-index 
refs/changes/23/377923/2

diff --git a/template.html b/template.html
index 4b7908e..481d3c7 100644
--- a/template.html
+++ b/template.html
@@ -57,7 +57,7 @@
 Collection of very useful JS / CSS libraries served in a fast, 
Wikimedia Privacy 
Policy friendly way.
 Thanks to the https://github.com/cdnjs/cdnjs;>cdnjs community for maintaining and 
curating the libraries!. https://github.com/cdnjs/cdnjs#adding-a-new-or-updating-an-existing-library;>You
 can add your favorite libraries too.
 
-Tip: Use your browser's search function to 
search! The libraries are ordered by popularity. Clicking 'Use' will take show 
you list of files distributed with the library and allows you to include them 
as you see fit
+Tip: Use your browser's search function to 
search! The libraries are ordered by popularity. Clicking 'Use latest' will 
show you the list of files distributed with the library and allows you to 
include them as you see fit
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I665cf0241643c0c4f38c39422397c625b9cbaddd
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/cdnjs-index
Gerrit-Branch: master
Gerrit-Owner: Quiddity 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.18]: populateIpChanges.php: Insert rows in batches

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

Change subject: populateIpChanges.php: Insert rows in batches
..


populateIpChanges.php: Insert rows in batches

Change-Id: I0233b5a17fc64751514ec6d0701f155a73906873
(cherry picked from commit 1116ebe298e9048218019d429d4caa5e13ac1996)
---
M maintenance/populateIpChanges.php
1 file changed, 13 insertions(+), 10 deletions(-)

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



diff --git a/maintenance/populateIpChanges.php 
b/maintenance/populateIpChanges.php
index eb60f80..004b6bc 100644
--- a/maintenance/populateIpChanges.php
+++ b/maintenance/populateIpChanges.php
@@ -82,19 +82,15 @@
$this->output( "...checking $this->mBatchSize revisions 
for IP edits that need copying, " .
"starting with rev_id $blockStart\n" );
 
+   $insertRows = [];
foreach ( $rows as $row ) {
// Double-check to make sure this is an IP, 
e.g. not maintenance user or imported revision.
if ( IP::isValid( $row->rev_user_text ) ) {
-   $dbw->insert(
-   'ip_changes',
-   [
-   'ipc_rev_id' => 
$row->rev_id,
-   'ipc_rev_timestamp' => 
$row->rev_timestamp,
-   'ipc_hex' => IP::toHex( 
$row->rev_user_text ),
-   ],
-   __METHOD__,
-   'IGNORE'
-   );
+   $insertRows[] = [
+   'ipc_rev_id' => $row->rev_id,
+   'ipc_rev_timestamp' => 
$row->rev_timestamp,
+   'ipc_hex' => IP::toHex( 
$row->rev_user_text ),
+   ];
 
$revCount++;
}
@@ -104,6 +100,13 @@
 
$blockStart++;
 
+   $dbw->insert(
+   'ip_changes',
+   $insertRows,
+   __METHOD__,
+   'IGNORE'
+   );
+
$lbFactory->waitForReplication();
usleep( $throttle * 1000 );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0233b5a17fc64751514ec6d0701f155a73906873
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.18
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Parent5446 
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/event-schemas[master]: [Job Schema] Allow @ in the request id

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

Change subject: [Job Schema] Allow @ in the request id
..


[Job Schema] Allow @ in the request id

Change-Id: I3e6909d113969201e7942c6069a295d568c7760f
---
M jsonschema/mediawiki/job/1.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/jsonschema/mediawiki/job/1.yaml b/jsonschema/mediawiki/job/1.yaml
index 1325223..1928940 100644
--- a/jsonschema/mediawiki/job/1.yaml
+++ b/jsonschema/mediawiki/job/1.yaml
@@ -25,7 +25,7 @@
   request_id:
 description: The unique UUID v1 ID of the event derived from the 
X-Request-Id header.
 type: string
-pattern: '^[a-zA-Z0-9\-]+$'
+pattern: '^[a-zA-Z0-9\-@]+$'
   id:
 description: The unique ID of this event; should match the dt field.
 type: string

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e6909d113969201e7942c6069a295d568c7760f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/event-schemas
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ottomata 
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]: Revert dev build language randomization

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

Change subject: Revert dev build language randomization
..

Revert dev build language randomization

A worthy experiment, but one whose time has passed.

Reverts Id86349d230b521ddc56e9f1c21d0a57b25bc210a.

Change-Id: I368df6c751a57da7860c53759b934d9e3a8ee842
---
M app/src/main/java/org/wikipedia/WikipediaApp.java
1 file changed, 1 insertion(+), 18 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index 197a50f..cdfa64e 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -38,7 +38,6 @@
 import org.wikipedia.events.ThemeChangeEvent;
 import org.wikipedia.history.HistoryEntry;
 import org.wikipedia.language.AcceptLanguageUtil;
-import org.wikipedia.language.AppLanguageLookUpTable;
 import org.wikipedia.language.AppLanguageState;
 import org.wikipedia.login.UserIdClient;
 import org.wikipedia.notifications.NotificationPollBroadcastReceiver;
@@ -151,7 +150,7 @@
 ViewAnimations.init(getResources());
 currentTheme = unmarshalCurrentTheme();
 
-initAppLang();
+appLanguageState = new AppLanguageState(this);
 funnelManager = new FunnelManager(this);
 sessionFunnel = new SessionFunnel(this);
 database = new Database(this);
@@ -483,22 +482,6 @@
 if (!Prefs.suppressNotificationPolling()) {
 notificationReceiver.startPollTask(this);
 }
-}
-
-private void initAppLang() {
-appLanguageState = new AppLanguageState(this);
-boolean langNotSet = getAppLanguageCode() == null;
-if (ReleaseUtil.isDevRelease() && langNotSet) {
-setRandomAppLangCode();
-}
-}
-
-private void setRandomAppLangCode() {
-AppLanguageLookUpTable lut = new AppLanguageLookUpTable(this);
-List codes = lut.getCodes();
-int index = new Random().nextInt(codes.size());
-String code = codes.get(index);
-setAppLanguageCode(code);
 }
 
 private void initExceptionHandling() {

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

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

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


[MediaWiki-commits] [Gerrit] labs...heritage[master]: Include tools directory in php linting

2017-09-13 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377921 )

Change subject: Include tools directory in php linting
..

Include tools directory in php linting

Includes the tools directory (with the exception of the browser
sub-directory) in the php linting.

Also fixes any violations of the linting rules.

Change-Id: I758dd5a83beea050c4ee9d1ea2f1547770b7cf6c
---
M phpcs.xml
M tools/export_as_text.php
M tools/id_checker.php
M tools/rankings.php
M tools/stress-test.php
M tools/wlm-latest.php
M tools/wlm/gallery-all.php
M tools/wlmlast.php
8 files changed, 397 insertions(+), 399 deletions(-)


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

diff --git a/phpcs.xml b/phpcs.xml
index 1c220f6..e23f03e 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,6 +1,6 @@
 
 
-
+   



@@ -11,14 +11,14 @@



-.
-
-
-node_modules
-vendor
-api/tripplanner
-common
-map
-prox_search/cls
-tools
+   .
+   
+   
+   node_modules
+   vendor
+   api/tripplanner
+   common
+   map
+   prox_search/cls
+   tools/browser
 
diff --git a/tools/export_as_text.php b/tools/export_as_text.php
index 579bd10..3b75b0f 100644
--- a/tools/export_as_text.php
+++ b/tools/export_as_text.php
@@ -1,5 +1,5 @@
 fetch_assoc() ) {
$columns = 0;
-   foreach( $row as $value ) {
+   foreach ( $row as $value ) {
if ( $columns++ ) {
echo "\t";
}
@@ -41,7 +41,6 @@
 }
 
 mysqli_close( $db );
-
 
 /**
  * Helper function for handling MySQL errors
diff --git a/tools/id_checker.php b/tools/id_checker.php
index 964ab11..07c27b4 100644
--- a/tools/id_checker.php
+++ b/tools/id_checker.php
@@ -6,7 +6,6 @@
 require_once dirname( __DIR__ ) . '/api/common.php';
 require_once ( '/api/includes/CommonFunctions.php' );
 
-
 $db = Database::getDb();
 print '';
 print '
diff --git a/tools/rankings.php b/tools/rankings.php
index 85ad92a..73479e8 100644
--- a/tools/rankings.php
+++ b/tools/rankings.php
@@ -3,288 +3,288 @@
  * By default from 
http://commons.wikimedia.org/wiki/Category:Images_from_Wiki_Loves_Monuments_2011
  * if country if given, one of the subcategories.
  */
-header("Cache-Control: no-cache, must-revalidate");
-header("Expires: Thu, 01 Jan 1970 00:00:00 GMT");
-header('Content-type: text/html;; charset=utf-8');
+header( "Cache-Control: no-cache, must-revalidate" );
+header( "Expires: Thu, 01 Jan 1970 00:00:00 GMT" );
+header( 'Content-type: text/html;; charset=utf-8' );
 ?>
 
-
-
-* {
-margin:0;
-padding:0;
-}
-#photos-wlm {
-margin: 0;
-padding: 0;
-}
+   
+