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

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

Change subject: Use SPDX 3.0 license identifier
..


Use SPDX 3.0 license identifier

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

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

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



diff --git a/extension.json b/extension.json
index d36d21d..cc650b0 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "BlueSpiceDashboards",
-   "license-name": "GPL-3.0",
+   "license-name": "GPL-3.0-only",
"version": "3.0.0-alpha",
"url": "https://help.bluespice.com/index.php/DashBoards;,
"author": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9ae3670aec5cbbe00d5974136f14befd55e8ebd
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceDashboards
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
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...ORES[master]: Use SPDX 3.0 license identifier

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

Change subject: Use SPDX 3.0 license identifier
..


Use SPDX 3.0 license identifier

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

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

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



diff --git a/extension.json b/extension.json
index 587e2b1..9745ffb 100644
--- a/extension.json
+++ b/extension.json
@@ -1,7 +1,7 @@
 {
"name": "ORES",
"descriptionmsg": "ores-desc",
-   "license-name": "GPL-3.0+",
+   "license-name": "GPL-3.0-or-later",
"author": [
"Kunal Mehta",
"Amir Sarabadani",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9dae6a6de65c514b648df9edbd82ae9b20bf8ca8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: add labs lvm setup for dumps snapshot instances without nfs ...

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

Change subject: add labs lvm setup for dumps snapshot instances without nfs 
filesystems
..


add labs lvm setup for dumps snapshot instances without nfs filesystems

This will give us space to write dumps for testing.

Change-Id: I80426a5972f6d6743ba304e6a7b157b01bd83d73
---
A modules/profile/manifests/labs/lvm/data.pp
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/modules/profile/manifests/labs/lvm/data.pp 
b/modules/profile/manifests/labs/lvm/data.pp
new file mode 100644
index 000..f1e04ff
--- /dev/null
+++ b/modules/profile/manifests/labs/lvm/data.pp
@@ -0,0 +1,8 @@
+# Allocate all of the instance's extra space as /data
+#
+# filtertags: labs-common
+class profile::labs::lvm::data {
+labs_lvm::volume { 'data-local-disk':
+mountat => '/data',
+}
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80426a5972f6d6743ba304e6a7b157b01bd83d73
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
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]: add labs lvm setup for dumps snapshot instances without nfs ...

2018-01-05 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402489 )

Change subject: add labs lvm setup for dumps snapshot instances without nfs 
filesystems
..

add labs lvm setup for dumps snapshot instances without nfs filesystems

This will give us space to write dumps for testing.

Change-Id: I80426a5972f6d6743ba304e6a7b157b01bd83d73
---
A modules/profile/manifests/labs/lvm/data.pp
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/89/402489/1

diff --git a/modules/profile/manifests/labs/lvm/data.pp 
b/modules/profile/manifests/labs/lvm/data.pp
new file mode 100644
index 000..f1e04ff
--- /dev/null
+++ b/modules/profile/manifests/labs/lvm/data.pp
@@ -0,0 +1,8 @@
+# Allocate all of the instance's extra space as /data
+#
+# filtertags: labs-common
+class profile::labs::lvm::data {
+labs_lvm::volume { 'data-local-disk':
+mountat => '/data',
+}
+}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Split Hooks::onChangesListSpecialPageStructuredFilters

2018-01-05 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402488 )

Change subject: Split Hooks::onChangesListSpecialPageStructuredFilters
..

Split Hooks::onChangesListSpecialPageStructuredFilters

This monster of a method needs to be split to way more methods
This is the first step and it's just moving code around.

Change-Id: I9d85f6e5561d409b89fd2d579aa2244c45776987
---
M includes/Hooks/ChangesListHooksHandler.php
1 file changed, 119 insertions(+), 106 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/88/402488/1

diff --git a/includes/Hooks/ChangesListHooksHandler.php 
b/includes/Hooks/ChangesListHooksHandler.php
index b6a722e..c8ff331 100644
--- a/includes/Hooks/ChangesListHooksHandler.php
+++ b/includes/Hooks/ChangesListHooksHandler.php
@@ -60,59 +60,9 @@
$highlightDefault = false;
}
 
-   $damagingLevels = $stats->getThresholds( 'damaging' );
-   $filters = [];
-   if ( isset( $damagingLevels[ 'likelygood' ] ) ) {
-   $filters[ 'likelygood' ] = [
-   'name' => 'likelygood',
-   'label' => 
'ores-rcfilters-damaging-likelygood-label',
-   'description' => 
'ores-rcfilters-damaging-likelygood-desc',
-   'cssClassSuffix' => 
'damaging-likelygood',
-   'isRowApplicableCallable' => 
self::makeApplicableCallback(
-   'damaging',
-   $damagingLevels['likelygood']
-   ),
-   ];
-   }
-   if ( isset( $damagingLevels[ 'maybebad' ] ) ) {
-   $filters[ 'maybebad' ] = [
-   'name' => 'maybebad',
-   'label' => 
'ores-rcfilters-damaging-maybebad-label',
-   'description' => 
'ores-rcfilters-damaging-maybebad-desc',
-   'cssClassSuffix' => 'damaging-maybebad',
-   'isRowApplicableCallable' => 
self::makeApplicableCallback(
-   'damaging',
-   $damagingLevels['maybebad']
-   ),
-   ];
-   }
-   if ( isset( $damagingLevels[ 'likelybad' ] ) ) {
-   $descMsg = isset( $filters[ 'maybebad' ] ) ?
-   
'ores-rcfilters-damaging-likelybad-desc-low' :
-   
'ores-rcfilters-damaging-likelybad-desc-high';
-   $filters[ 'likelybad' ] = [
-   'name' => 'likelybad',
-   'label' => 
'ores-rcfilters-damaging-likelybad-label',
-   'description' => $descMsg,
-   'cssClassSuffix' => 
'damaging-likelybad',
-   'isRowApplicableCallable' => 
self::makeApplicableCallback(
-   'damaging',
-   $damagingLevels['likelybad']
-   ),
-   ];
-   }
-   if ( isset( $damagingLevels[ 'verylikelybad' ] ) ) {
-   $filters[ 'verylikelybad' ] = [
-   'name' => 'verylikelybad',
-   'label' => 
'ores-rcfilters-damaging-verylikelybad-label',
-   'description' => 
'ores-rcfilters-damaging-verylikelybad-desc',
-   'cssClassSuffix' => 
'damaging-verylikelybad',
-   'isRowApplicableCallable' => 
self::makeApplicableCallback(
-   'damaging',
-   $damagingLevels['verylikelybad']
-   ),
-   ];
-   }
+   $filters = 
self::getDamagingStructuredFiltersOnChangesList(
+   $stats->getThresholds( 'damaging' )
+   );
 
if ( $filters ) {
$newDamagingGroup = new 
ChangesListStringOptionsFilterGroup( [
@@ -238,59 +188,9 @@

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

2018-01-05 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402487 )

Change subject: Use SPDX 3.0 license identifier
..

Use SPDX 3.0 license identifier

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

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/87/402487/1

diff --git a/extension.json b/extension.json
index 587e2b1..9745ffb 100644
--- a/extension.json
+++ b/extension.json
@@ -1,7 +1,7 @@
 {
"name": "ORES",
"descriptionmsg": "ores-desc",
-   "license-name": "GPL-3.0+",
+   "license-name": "GPL-3.0-or-later",
"author": [
"Kunal Mehta",
"Amir Sarabadani",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dae6a6de65c514b648df9edbd82ae9b20bf8ca8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [TEST] Add tests to a bot account for User class

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

Change subject: [TEST] Add tests to a bot account for User class
..


[TEST] Add tests to a bot account for User class

Bug: T60941
Change-Id: I91ddbe72f1b8d55cc3fe1c59e3937b25eed95551
---
M tests/user_tests.py
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/tests/user_tests.py b/tests/user_tests.py
index 1ffb626..ace810a 100644
--- a/tests/user_tests.py
+++ b/tests/user_tests.py
@@ -122,6 +122,12 @@
 self.assertIn('invalid', user.getprops())
 self.assertFalse(user.is_thankable)
 
+def test_bot_user(self):
+"""Test bot user."""
+user = User(self.site, 'Xqbot')
+self.assertIn('bot', user.groups())
+self.assertFalse(user.is_thankable)
+
 
 if __name__ == '__main__':  # pragma: no cover
 try:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Add tests for HashModelLookup

2018-01-05 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402486 )

Change subject: Add tests for HashModelLookup
..

Add tests for HashModelLookup

Bug: T184140
Change-Id: I34fadbf859e8f101f17ee3f699af24acc124d38c
---
A tests/phpunit/includes/Storage/HashModelLookupTest.php
1 file changed, 74 insertions(+), 0 deletions(-)


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

diff --git a/tests/phpunit/includes/Storage/HashModelLookupTest.php 
b/tests/phpunit/includes/Storage/HashModelLookupTest.php
new file mode 100644
index 000..3285f4d
--- /dev/null
+++ b/tests/phpunit/includes/Storage/HashModelLookupTest.php
@@ -0,0 +1,74 @@
+ [ 'id' => 2, 'version' => '0.0.1' ],
+   'damaging' => [ 'id' => 3, 'version' => '0.0.2' ],
+   ];
+   $this->storage = new HashModelLookup( $modelData );
+   }
+
+   /**
+* @covers ORES\Storage\HashModelLookup::getModels
+*/
+   public function testGetModels() {
+   $models = $this->storage->getModels();
+   $expected = [
+   'reverted' => [ 'id' => 2, 'version' => '0.0.1' ],
+   'damaging' => [ 'id' => 3, 'version' => '0.0.2' ]
+   ];
+   $this->assertEquals( $expected, $models );
+   }
+
+   /**
+* @covers ORES\Storage\HashModelLookup::getModelId
+*/
+   public function testGetModelId() {
+   $this->assertEquals( 2, $this->storage->getModelId( 'reverted' 
) );
+   $this->assertEquals( 3, $this->storage->getModelId( 'damaging' 
) );
+   }
+
+   /**
+* @covers ORES\Storage\HashModelLookup::getModelId
+*/
+   public function testGetInvalidModelId() {
+   $this->setExpectedException( InvalidArgumentException::class );
+   $this->storage->getModelId( 'foo' );
+   }
+
+   /**
+* @covers ORES\Storage\HashModelLookup::getModelVersion
+*/
+   public function testGetModelVersion() {
+   $this->assertEquals( '0.0.1', $this->storage->getModelVersion( 
'reverted' ) );
+   $this->assertEquals( '0.0.2', $this->storage->getModelVersion( 
'damaging' ) );
+   }
+
+   /**
+* @covers ORES\Storage\HashModelLookup::getModelVersion
+*/
+   public function testGetInvalidModelVersion() {
+   $this->setExpectedException( InvalidArgumentException::class );
+   $this->storage->getModelVersion( 'foo' );
+   }
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34fadbf859e8f101f17ee3f699af24acc124d38c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Tests for FetchScoreJob

2018-01-05 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402485 )

Change subject: Tests for FetchScoreJob
..

Tests for FetchScoreJob

Bug: T184140
Change-Id: Ic68979c7927c3544dca25d0432f479e068c8c05e
---
M includes/FetchScoreJob.php
A tests/phpunit/includes/FetchScoreJobTest.php
2 files changed, 166 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/85/402485/1

diff --git a/includes/FetchScoreJob.php b/includes/FetchScoreJob.php
index 6bdc88b..db7fc72 100644
--- a/includes/FetchScoreJob.php
+++ b/includes/FetchScoreJob.php
@@ -24,6 +24,11 @@
 class FetchScoreJob extends Job {
 
/**
+* @var ScoreFetcher
+*/
+   private $scoreFetcher;
+
+   /**
 * @param Title $title
 * @param array $params
 *   - 'revid': (int|int[]) revision IDs for which to fetch the score
@@ -40,6 +45,16 @@
parent::__construct( 'ORESFetchScoreJob', $title, $params );
 
$this->removeDuplicates = $expensive;
+   $this->scoreFetcher = ScoreFetcher::instance();
+   }
+
+   /**
+* Service override for testing
+*
+* @param ScoreFetcher $scoreFetcher
+*/
+   public function overrideServices( ScoreFetcher $scoreFetcher ) {
+   $this->scoreFetcher = $scoreFetcher;
}
 
public function run() {
@@ -68,16 +83,19 @@
}
 
$logger->info( 'Fetching scores for revision ' . json_encode( 
$this->params ) );
-   $scoring = ScoreFetcher::instance();
if ( isset( $this->params['originalRequest'] ) ) {
-   $scoring->setOriginalRequest( 
$this->params['originalRequest'] );
+   $this->scoreFetcher->setOriginalRequest( 
$this->params['originalRequest'] );
}
if ( isset( $this->params['models'] ) ) {
$models = $this->params['models'];
} else {
$models = null;
}
-   $scores = $scoring->getScores( $this->params['revid'], $models, 
$this->params['precache'] );
+   $scores = $this->scoreFetcher->getScores(
+   $this->params['revid'],
+   $models,
+   $this->params['precache']
+   );
$scoreStorage = MediaWikiServices::getInstance()->getService( 
'ORESScoreStorage' );
 
$success = true;
diff --git a/tests/phpunit/includes/FetchScoreJobTest.php 
b/tests/phpunit/includes/FetchScoreJobTest.php
new file mode 100644
index 000..e7bd93b
--- /dev/null
+++ b/tests/phpunit/includes/FetchScoreJobTest.php
@@ -0,0 +1,145 @@
+tablesUsed[] = 'ores_classification';
+   $this->setMwGlobals( [
+   'wgOresWikiId' => 'testwiki',
+   ] );
+
+   $modelData = [
+   'damaging' => [ 'id' => 5, 'version' => '0.0.2' ],
+   'goodfaith' => [ 'id' => 7, 'version' => '0.0.3' ],
+   ];
+   $this->setService( 'ORESModelLookup', new HashModelLookup( 
$modelData ) );
+   }
+
+   public function testDeduplicationInfo() {
+   $params = [
+   'revid' => 12345,
+   'originalRequest' => [
+   'ip' => '127.0.0.1',
+   'userAgent' => 'A Really dummy user agent',
+   ],
+   'models' => 'damaging|badfaith',
+   'precache' => true,
+   ];
+
+   $title = Title::makeTitle( NS_MAIN, 'Bar' );
+
+   $expected = [
+   'type' => 'ORESFetchScoreJob',
+   'namespace' => NS_MAIN,
+   'title' => 'Bar',
+   'params' => [
+   'revid' => 12345,
+   'precache' => true,
+   'models' => 'damaging|badfaith',
+   'originalRequest' => 'Dummy data'
+   ],
+   ];
+
+   $jobInfo = ( new FetchScoreJob( $title, $params ) 
)->getDeduplicationInfo();
+   $jobInfo['params']['originalRequest'] = 'Dummy data';
+
+   $this->assertEquals( $expected, $jobInfo );
+   }
+
+   /**
+* @covers ORES\FetchScoreJob::run()
+*/
+   public function testRun() {
+   $dbw = \wfGetDB( DB_MASTER );
+   $dbw->delete( 'ores_classification', '*' );
+
+   $params = [
+   'revid' => 17,
+   'models' => [ 'damaging', 'goodfaith' ],
+   'precache' => true
+   ];
+
+   $scoreFetcher 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Change "Special:近易" to "Special:監修" in zh-classical

2018-01-05 Thread Jayprakash12345 (Code Review)
Jayprakash12345 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402484 )

Change subject: Change "Special:近易" to "Special:監修" in zh-classical
..

Change "Special:近易" to "Special:監修" in zh-classical

Change-Id: I9dcd1829901ae4010feefd875f619db723d8dc20
---
M languages/messages/MessagesLzh.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/402484/2

diff --git a/languages/messages/MessagesLzh.php 
b/languages/messages/MessagesLzh.php
index 1850d67..ad0816b 100644
--- a/languages/messages/MessagesLzh.php
+++ b/languages/messages/MessagesLzh.php
@@ -76,7 +76,7 @@
'Protectedpages'=> [ '頁錮' ],
'Randompage'=> [ '清風翻書' ],
'Randomredirect'=> [ '任渡' ],
-   'Recentchanges' => [ '近易' ],
+   'Recentchanges' => [ '監修' ],
'Recentchangeslinked'   => [ '援引' ],
'Search'=> [ '尋' ],
'Shortpages'=> [ '短篇' ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dcd1829901ae4010feefd875f619db723d8dc20
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>

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


[MediaWiki-commits] [Gerrit] integration/jenkins[master]: Don't manually set $wgScribuntoDefaultEngine anymore

2018-01-05 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402483 )

Change subject: Don't manually set $wgScribuntoDefaultEngine anymore
..

Don't manually set $wgScribuntoDefaultEngine anymore

Ever since 11cf41c74c0b, Scribunto supports autodetection and will
automatically use LuaSandbox if it is installed.

Change-Id: Ie460532b78858a9275753c3983a0787fa6ea5dba
---
D mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php
1 file changed, 0 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/83/402483/1

diff --git a/mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php 
b/mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php
deleted file mode 100644
index 541aa41..000
--- a/mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php
+++ /dev/null
@@ -1,10 +0,0 @@
-https://gerrit.wikimedia.org/r/402483
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie460532b78858a9275753c3983a0787fa6ea5dba
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] integration/docroot[master]: Add breadcrumb navigation for finding extension coverage index

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

Change subject: Add breadcrumb navigation for finding extension coverage index
..


Add breadcrumb navigation for finding extension coverage index

Change-Id: I9fcb2b8d7308c94d68ff32a0578bf1d8d58667f4
---
M shared/CoveragePage.php
1 file changed, 18 insertions(+), 0 deletions(-)

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



diff --git a/shared/CoveragePage.php b/shared/CoveragePage.php
index 01fad1d..67d583a 100644
--- a/shared/CoveragePage.php
+++ b/shared/CoveragePage.php
@@ -46,6 +46,24 @@
// Get list of directories with clover.xml
$results = glob( $this->coverageDir . '/*/clover.xml' );
$this->embedCSS( file_get_contents( __DIR__ . '/cover.css' ) );
+
+   if ( $this->pageName === 'Test coverage' ) {
+   $breadcrumbs = <<
+   Coverage home
+   MediaWiki extensions
+
+HTML;
+   } else {
+   $breadcrumbs = <<
+   Coverage home
+   MediaWiki extensions
+
+HTML;
+   }
+   $this->addHtmlContent( $breadcrumbs );
+
$intro = <<
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9fcb2b8d7308c94d68ff32a0578bf1d8d58667f4
Gerrit-PatchSet: 1
Gerrit-Project: integration/docroot
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/docroot[master]: Add breadcrumb navigation for finding extension coverage index

2018-01-05 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402482 )

Change subject: Add breadcrumb navigation for finding extension coverage index
..

Add breadcrumb navigation for finding extension coverage index

Change-Id: I9fcb2b8d7308c94d68ff32a0578bf1d8d58667f4
---
M shared/CoveragePage.php
1 file changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/docroot 
refs/changes/82/402482/1

diff --git a/shared/CoveragePage.php b/shared/CoveragePage.php
index 01fad1d..67d583a 100644
--- a/shared/CoveragePage.php
+++ b/shared/CoveragePage.php
@@ -46,6 +46,24 @@
// Get list of directories with clover.xml
$results = glob( $this->coverageDir . '/*/clover.xml' );
$this->embedCSS( file_get_contents( __DIR__ . '/cover.css' ) );
+
+   if ( $this->pageName === 'Test coverage' ) {
+   $breadcrumbs = <<
+   Coverage home
+   MediaWiki extensions
+
+HTML;
+   } else {
+   $breadcrumbs = <<
+   Coverage home
+   MediaWiki extensions
+
+HTML;
+   }
+   $this->addHtmlContent( $breadcrumbs );
+
$intro = <<
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9fcb2b8d7308c94d68ff32a0578bf1d8d58667f4
Gerrit-PatchSet: 1
Gerrit-Project: integration/docroot
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Rewrite README file

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

Change subject: Rewrite README file
..


Rewrite README file

It's outdated and practically doesn't serve any purpose.
Let's point people to the mediawiki page and focus documentations in one place

Change-Id: I0cf6bd0d3dd5a164abededd8eb82a81b03bdd7a2
---
M README
1 file changed, 3 insertions(+), 16 deletions(-)

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



diff --git a/README b/README
index aa03f4c..176ab17 100644
--- a/README
+++ b/README
@@ -1,17 +1,4 @@
-New globals:
+This is a MediaWiki extension to integrate data from the ORES service
+() with the MediaWiki database and recent 
changes.
 
-$wgOresBaseUrl - API endpoint base URL for ORES requests.  The specific
-route and parameters will be appended to this URL.
-
-$wgOresModels - Array of models we want to fetch from the server and cache in
-the database.
-TODO: Should we default to fetching all available models?
-
-$wgOresDamagingThreshold - Score cutoff above which an edit is flagged as
-possibly damaging in the Recent Changes feed.
-
-$wgOresWikiId - Optional database ID for making ORES requests to a different
-wiki ID.  An important special name is "testwiki", which accesses a pseudomodel
-available for testing without setting up an ORES server to score your wiki.
-This pseudomodel will emit scores deterministically correlated to the revision 
ID,
-e.g. 
https://ores.wikimedia.org/scores/testwiki/reverted/?revids=1|2|3|4|5|6|7|8|9
+See the wiki page for more information: 
.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cf6bd0d3dd5a164abededd8eb82a81b03bdd7a2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Use Promise.async/yield for html2wt/LanguageVariantHandler

2018-01-05 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402481 )

Change subject: Use Promise.async/yield for html2wt/LanguageVariantHandler
..

Use Promise.async/yield for html2wt/LanguageVariantHandler

Change-Id: If42db8ada1e6579b555bd717e357eafa1f8ccc86
---
M lib/html2wt/LanguageVariantHandler.js
M lib/html2wt/WikitextSerializer.js
2 files changed, 43 insertions(+), 57 deletions(-)


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

diff --git a/lib/html2wt/LanguageVariantHandler.js 
b/lib/html2wt/LanguageVariantHandler.js
index c9b652b..faac4cd 100644
--- a/lib/html2wt/LanguageVariantHandler.js
+++ b/lib/html2wt/LanguageVariantHandler.js
@@ -23,20 +23,20 @@
 };
 
 // should be called with this == instance of WikitextSerializer
-var LanguageVariantHandler = function(node) {
+var languageVariantHandler = Promise.async(function *(node) {
var state = this.state;
var dataMWV = DU.getJSONAttribute(node, 'data-mw-variant', {});
var dp = DU.getDataParsoid(node);
var flSp = expandSpArray(dp.flSp);
var textSp = expandSpArray(dp.tSp);
var trailingSemi = false;
-   var textP;
+   var text;
var flags;
var originalFlags = (dp.fl || []).reduce(function(m, k, idx) {
if (!m.has(k)) { m.set(k, idx); }
return m;
}, new Map());
-   var resultP = Promise.resolve('$E|'); // "error" flag
+   var result = '$E|'; // "error" flag
 
// Backwards-compatibility: `bidir` => `twoway` ; `unidir` => `oneway`
if (dataMWV.bidir) {
@@ -145,23 +145,19 @@
 
if (dataMWV.filter && dataMWV.filter.l) {
// "Restrict possible variants to a limited set"
-   textP = ser(dataMWV.filter.t, { protect: /\}-/ });
-   resultP = textP.then(function(text) {
-   console.assert(flags.size === 0);
-   return combine(
-   sortedFlags(dataMWV.filter.l, true, 
protectLang),
-   text,
-   false /* no trailing semi */);
-   });
+   text = yield ser(dataMWV.filter.t, { protect: /\}-/ });
+   console.assert(flags.size === 0);
+   result = combine(
+   sortedFlags(dataMWV.filter.l, true, protectLang),
+   text,
+   false /* no trailing semi */);
} else if (dataMWV.disabled || dataMWV.name) {
// "Raw" / protect contents from language converter
-   textP = ser((dataMWV.disabled || dataMWV.name).t, { protect: 
/\}-/ });
-   resultP = textP.then(function(text) {
-   if (!/[:;|]/.test(text)) {
-   maybeDeleteFlag('R');
-   }
-   return combine(sortedFlags(flags), text, false);
-   });
+   text = yield ser((dataMWV.disabled || dataMWV.name).t, { 
protect: /\}-/ });
+   if (!/[:;|]/.test(text)) {
+   maybeDeleteFlag('R');
+   }
+   result = combine(sortedFlags(flags), text, false);
} else if (Array.isArray(dataMWV.twoway)) {
// Two-way rules (most common)
if (textSp.length % 3 === 1) {
@@ -170,49 +166,39 @@
var b = (dataMWV.twoway[0] && dataMWV.twoway[0].l === '*') ?
dataMWV.twoway.slice(0, 1) :
dataMWV.twoway;
-   textP = Promise.all(b.map(function(rule, idx) {
-   return ser(rule.t, { protect: /;|\}-/ 
}).then(function(text) {
-   if (rule.l === '*') {
-   trailingSemi = false;
-   return text;
-   }
-   var ws = (3 * idx + 2 < textSp.length) ?
-   textSp.slice(3 * idx, 3 * (idx + 1)) :
-   [ (idx > 0) ? ' ' : '', '', '' ];
-   return ws[0] + protectLang(rule.l) + ws[1] + 
':' + ws[2] + text;
-   });
-   })).then(function(arr) { return arr.join(';'); });
-   resultP = textP.then(function(text) {
-   // suppress output of default flag ('S')
-   maybeDeleteFlag('$S');
-   return combine(sortedFlags(flags), text, trailingSemi);
-   });
+   text = (yield Promise.all(b.map(Promise.async(function *(rule, 
idx) {
+   var text = yield ser(rule.t, { protect: /;|\}-/ });
+   if (rule.l === '*') {
+   trailingSemi = false;
+  

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Use Promise.async/yield in lib/ext/Gallery

2018-01-05 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402480 )

Change subject: Use Promise.async/yield in lib/ext/Gallery
..

Use Promise.async/yield in lib/ext/Gallery

We didn't promisify `tokenHandler` (yet) because that requires changing
the callback signature for the token hanlder in the extension interface.

Change-Id: I34a8f29c5f4f497050d8cc6efb8b76e1f76e3efd
---
M lib/ext/Gallery/index.js
1 file changed, 83 insertions(+), 93 deletions(-)


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

diff --git a/lib/ext/Gallery/index.js b/lib/ext/Gallery/index.js
index 6687985..cb29f1d 100644
--- a/lib/ext/Gallery/index.js
+++ b/lib/ext/Gallery/index.js
@@ -54,13 +54,13 @@
 // FIXME: This is too permissive.  The php implementation only calls
 // `replaceInternalLinks` on the gallery caption.  We should have a new
 // tokenizing rule that only tokenizes text / wikilink.
-var pCaption = Promise.method(function(data) {
+var pCaption = Promise.async(function *(data) {
var options = data.extToken.getAttribute('options');
var caption = options.find(function(kv) {
return kv.k === 'caption';
});
if (caption === undefined || !caption.v) { return null; }
-   return Util.promiseToProcessContent(
+   var doc = yield Util.promiseToProcessContent(
data.manager.env,
data.manager.frame,
caption.v,
@@ -74,15 +74,13 @@
},
srcOffsets: caption.srcOffsets.slice(2),
}
-   )
-   .then(function(doc) {
-   // Store before `migrateChildrenBetweenDocs` in render
-   DU.visitDOM(doc.body, DU.storeDataAttribs);
-   return doc.body;
-   });
+   );
+   // Store before `migrateChildrenBetweenDocs` in render
+   DU.visitDOM(doc.body, DU.storeDataAttribs);
+   return doc.body;
 });
 
-var pLine = function(data, obj) {
+var pLine = Promise.async(function *(data, obj) {
var env = data.manager.env;
var opts = data.opts;
 
@@ -120,7 +118,7 @@
var startOffset = obj.offset - start.length - diff - middle.length;
var srcOffsets = [startOffset, startOffset + wt.length];
 
-   return Util.promiseToProcessContent(env, data.manager.frame, wt, {
+   var doc = yield Util.promiseToProcessContent(env, data.manager.frame, 
wt, {
pipelineType: 'text/x-mediawiki/full',
pipelineOpts: {
extTag: 'gallery',
@@ -129,44 +127,42 @@
noPWrapping: true,
},
srcOffsets: srcOffsets,
-   })
-   .then(function(doc) {
-   var body = doc.body;
-
-   var thumb = body.firstChild;
-   if (thumb.nodeName !== 'FIGURE') {
-   return null;
-   }
-
-   var rdfaType = thumb.getAttribute('typeof');
-
-   // Clean it out for reuse later
-   while (body.firstChild) { body.firstChild.remove(); }
-
-   var figcaption = thumb.querySelector('figcaption');
-   if (!figcaption) {
-   figcaption = doc.createElement('figcaption');
-   } else {
-   figcaption.remove();
-   }
-
-   if (opts.showfilename) {
-   var galleryfilename = doc.createElement('a');
-   galleryfilename.setAttribute('href', 
env.makeLink(title));
-   galleryfilename.setAttribute('class', 'galleryfilename 
galleryfilename-truncate');
-   galleryfilename.setAttribute('title', file);
-   galleryfilename.appendChild(doc.createTextNode(file));
-   figcaption.insertBefore(galleryfilename, 
figcaption.firstChild);
-   }
-
-   var gallerytext = !/^\s*$/.test(figcaption.innerHTML) && 
figcaption;
-   if (gallerytext) {
-   // Store before `migrateChildrenBetweenDocs` in render
-   DU.visitDOM(gallerytext, DU.storeDataAttribs);
-   }
-   return { thumb: thumb, gallerytext: gallerytext, rdfaType: 
rdfaType };
});
-};
+   var body = doc.body;
+
+   var thumb = body.firstChild;
+   if (thumb.nodeName !== 'FIGURE') {
+   return null;
+   }
+
+   var rdfaType = thumb.getAttribute('typeof');
+
+   // Clean it out for reuse later
+   while (body.firstChild) { body.firstChild.remove(); }
+
+   var figcaption = thumb.querySelector('figcaption');
+   if (!figcaption) {
+   figcaption = doc.createElement('figcaption');
+   } else {
+   figcaption.remove();
+   }
+
+   if (opts.showfilename) {
+   

[MediaWiki-commits] [Gerrit] oojs/ui[master]: [DEPRECATING CHANGE] icons: Flag indicators 'previous' & 'ne...

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

Change subject: [DEPRECATING CHANGE] icons: Flag indicators 'previous' & 'next' 
as to be removed
..

[DEPRECATING CHANGE] icons: Flag indicators 'previous' & 'next' as to be removed

Bug: T184329
Change-Id: Ib15e76fe8e6725ca8b1763c34121f5c4b23b1591
---
M demos/pages/icons.js
M src/themes/apex/indicators.json
M src/themes/wikimediaui/indicators.json
3 files changed, 12 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/79/402479/1

diff --git a/demos/pages/icons.js b/demos/pages/icons.js
index 4551f41..2ae10f9 100644
--- a/demos/pages/icons.js
+++ b/demos/pages/icons.js
@@ -199,8 +199,6 @@
'alert',
'clear',
'down',
-   'next',
-   'previous',
'required',
'search',
'up'
diff --git a/src/themes/apex/indicators.json b/src/themes/apex/indicators.json
index 9a9afa8..da4fc12 100644
--- a/src/themes/apex/indicators.json
+++ b/src/themes/apex/indicators.json
@@ -9,11 +9,15 @@
"next": { "file": {
"ltr": "images/indicators/arrow-ltr.svg",
"rtl": "images/indicators/arrow-rtl.svg"
-   } },
+   },
+   "deprecated": "This will be removed in v0.26.0."
+   },
"previous": { "file": {
"ltr": "images/indicators/arrow-rtl.svg",
"rtl": "images/indicators/arrow-ltr.svg"
-   } },
+   },
+   "deprecated": "This will be removed in v0.26.0."
+   },
"required": { "file": "images/indicators/required.svg" },
"search": { "file": {
"ltr": "images/indicators/search-ltr.svg",
diff --git a/src/themes/wikimediaui/indicators.json 
b/src/themes/wikimediaui/indicators.json
index 1b99365..4dfbefd 100644
--- a/src/themes/wikimediaui/indicators.json
+++ b/src/themes/wikimediaui/indicators.json
@@ -16,11 +16,15 @@
"next": { "file": {
"ltr": "images/indicators/arrow-ltr.svg",
"rtl": "images/indicators/arrow-rtl.svg"
-   } },
+   },
+   "deprecated": "This will be removed in v0.26.0."
+   },
"previous": { "file": {
"ltr": "images/indicators/arrow-rtl.svg",
"rtl": "images/indicators/arrow-ltr.svg"
-   } },
+   },
+   "deprecated": "This will be removed in v0.26.0."
+   },
"required": { "file": "images/indicators/required.svg" },
"search": { "file": {
"ltr": "images/indicators/search-ltr.svg",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Rewrite README file

2018-01-05 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402478 )

Change subject: Rewrite README file
..

Rewrite README file

It's outdated and practically doesn't serve any purpose.
Let's point people to the mediawiki page and focus documentations in one place

Change-Id: I0cf6bd0d3dd5a164abededd8eb82a81b03bdd7a2
---
M README
1 file changed, 2 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/78/402478/1

diff --git a/README b/README
index aa03f4c..385fc72 100644
--- a/README
+++ b/README
@@ -1,17 +1,3 @@
-New globals:
+The mediawiki extension to integrate data from ORES service 
(https://www.mediawiki.org/wiki/ORES) with mediawiki database and recent 
changes.
 
-$wgOresBaseUrl - API endpoint base URL for ORES requests.  The specific
-route and parameters will be appended to this URL.
-
-$wgOresModels - Array of models we want to fetch from the server and cache in
-the database.
-TODO: Should we default to fetching all available models?
-
-$wgOresDamagingThreshold - Score cutoff above which an edit is flagged as
-possibly damaging in the Recent Changes feed.
-
-$wgOresWikiId - Optional database ID for making ORES requests to a different
-wiki ID.  An important special name is "testwiki", which accesses a pseudomodel
-available for testing without setting up an ORES server to score your wiki.
-This pseudomodel will emit scores deterministically correlated to the revision 
ID,
-e.g. 
https://ores.wikimedia.org/scores/testwiki/reverted/?revids=1|2|3|4|5|6|7|8|9
+See mediawiki page for more information: 
https://www.mediawiki.org/wiki/Extension:ORES

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cf6bd0d3dd5a164abededd8eb82a81b03bdd7a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Rename Api class to ORESService

2018-01-05 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402477 )

Change subject: Rename Api class to ORESService
..

Rename Api class to ORESService

Api is a very generic name that bears virtually no meaning
and can be misleading. Per Daniel's suggestion, ORESService seems good
like the Database class.

Change-Id: I9a536222a4ca46dae1acad04153e312c433caa4a
---
R includes/ORESService.php
M includes/ScoreFetcher.php
M includes/ServiceWiring.php
M includes/ThresholdLookup.php
M maintenance/DumpThresholds.php
R tests/phpunit/includes/ORESServiceTest.php
M tests/phpunit/includes/ThresholdLookupTest.php
7 files changed, 39 insertions(+), 39 deletions(-)


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

diff --git a/includes/Api.php b/includes/ORESService.php
similarity index 98%
rename from includes/Api.php
rename to includes/ORESService.php
index 552816e..12bd468 100644
--- a/includes/Api.php
+++ b/includes/ORESService.php
@@ -26,14 +26,14 @@
 /**
  * Common methods for accessing an ORES server.
  */
-class Api {
+class ORESService {
/** @var WebRequest|string[]|null */
private $originalRequest;
 
const API_VERSION = 3;
 
/**
-* @return Api
+* @return ORESService
 */
public static function newFromContext() {
$self = new self();
diff --git a/includes/ScoreFetcher.php b/includes/ScoreFetcher.php
index 1fbd843..918640e 100644
--- a/includes/ScoreFetcher.php
+++ b/includes/ScoreFetcher.php
@@ -50,15 +50,15 @@
}
 
if ( $this->originalRequest === null ) {
-   $api = Api::newFromContext();
+   $oresService = ORESService::newFromContext();
} else {
-   $api = new Api();
-   $api->setOriginalRequest( $this->originalRequest );
+   $oresService = new ORESService();
+   $oresService->setOriginalRequest( 
$this->originalRequest );
}
 
-   $wireData = $api->request( $params );
+   $wireData = $oresService->request( $params );
 
-   $wikiId = Api::getWikiID();
+   $wikiId = ORESService::getWikiID();
if ( array_key_exists( 'models', $wireData[$wikiId] ) ) {
$this->checkAndUpdateModels( 
$wireData[$wikiId]['models'] );
}
diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php
index b71ddfc..e8b22de 100644
--- a/includes/ServiceWiring.php
+++ b/includes/ServiceWiring.php
@@ -28,7 +28,7 @@
 
'ORESThresholdLookup' => function ( MediaWikiServices $services ) {
return new ThresholdLookup(
-   Api::newFromContext(),
+   ORESService::newFromContext(),
$services->getMainWANObjectCache(),
LoggerFactory::getInstance( 'ORES' ),
$services->getService( 'ORESModelLookup' ),
diff --git a/includes/ThresholdLookup.php b/includes/ThresholdLookup.php
index 82716b8..ba69340 100644
--- a/includes/ThresholdLookup.php
+++ b/includes/ThresholdLookup.php
@@ -25,9 +25,9 @@
 class ThresholdLookup {
 
/**
-* @var Api
+* @var ORESService
 */
-   private $api;
+   private $oresService;
 
/**
 * @var WANObjectCache
@@ -55,7 +55,7 @@
private $statsdDataFactory;
 
/**
-* @param Api $api
+* @param ORESService $oresService
 * @param WANObjectCache $cache
 * @param LoggerInterface $logger
 * @param ModelLookup $modelLookup
@@ -63,14 +63,14 @@
 * @param StatsdDataFactoryInterface $statsdDataFactory
 */
public function __construct(
-   Api $api,
+   ORESService $oresService,
WANObjectCache $cache,
LoggerInterface $logger,
ModelLookup $modelLookup,
ThresholdParser $thresholdParser,
StatsdDataFactoryInterface $statsdDataFactory
) {
-   $this->api = $api;
+   $this->oresService = $oresService;
$this->cache = $cache;
$this->logger = $logger;
$this->modelLookup = $modelLookup;
@@ -143,11 +143,11 @@
return [];
}
 
-   $data = $this->api->request(
+   $data = $this->oresService->request(
[ 'models' => $model, 'model_info' => implode( "|", 
$calculatedThresholds ) ]
);
 
-   $prefix = [ Api::getWikiID(), 'models', $model, 'statistics', 
'thresholds' ];
+   $prefix = [ ORESService::getWikiID(), 'models', $model, 
'statistics', 'thresholds' ];
$resultMap = [];
 
 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove X-MW-Patrol-Status header when file is patrolled/purged

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

Change subject: Remove X-MW-Patrol-Status header when file is patrolled/purged
..

Remove X-MW-Patrol-Status header when file is patrolled/purged

The purge part is to avoid the X-MediaWiki-Patrol-Status
header getting stuck forever in an unpatrolled state when
the file expires from recent changes without getting patrolled.

It would be possible to automatically remove the header instead in
RecentChangesUpdateJob when the expiring row was the last upload
log entry for the file, but it would be expensive compared to
how rarely it is useful (if no one bothered to check the file for
all of $wgRCMaxAge, the wiki probably shouldn't use file patrolling
in the first place). Also, this makes purge behave like
refreshFileHeaders.php which enables editors to work around issues
like T178849.

Bug: T167400
Change-Id: Ie87cc0ddb88d4bce30cfc5143dddbee45e8a803e
---
M includes/changes/RecentChange.php
M includes/filerepo/file/LocalFile.php
M includes/page/WikiFilePage.php
3 files changed, 83 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/402475/1

diff --git a/includes/changes/RecentChange.php 
b/includes/changes/RecentChange.php
index a471865..c690254 100644
--- a/includes/changes/RecentChange.php
+++ b/includes/changes/RecentChange.php
@@ -571,6 +571,16 @@
}
// Actually set the 'patrolled' flag in RC
$this->reallyMarkPatrolled();
+   // If it's a file, notify it.
+   if ( $wgUseFilePatrol && $this->getTitle()->inNamespace( 
NS_FILE ) ) {
+   $file = wfFindFile( $this->getTitle() );
+   if ( !$file ) {
+   $file = wfFindFile( $this->getTitle(), [ 
'latest' => true ] );
+   }
+   if ( $file && $file instanceof LocalFile ) {
+   $file->onMarkPatrolled();
+   }
+   }
// Log this patrol event
PatrolLog::record( $this, $auto, $user, $tags );
 
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 7c8575d..1a27967 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -2171,6 +2171,76 @@
}
 
/**
+* Called when a file was marked as patrolled.
+* Removes the X-MediaWiki-Patrol-Status header from current and old 
versions of the file.
+* @param bool $purgeThumbnails Also purge thumbnails for affected file 
versions. Normally
+*   this should be done to keep headers consistent; the flag is 
provided in case other code
+*   did it already.
+* @since 1.31
+*/
+   public function onMarkPatrolled( $purgeThumbnails = true ) {
+   if ( !$this->getRepo()->getBackend()->hasFeatures( 
FileBackend::ATTR_HEADERS ) ) {
+   return;
+   }
+   DeferredUpdates::addCallableUpdate( function () use ( 
$purgeThumbnails ) {
+   $fileVersions = $this->getHistory();
+   array_unshift( $fileVersions, $this );
+
+   // Deleting thumbnails is costly, try avoid it if we 
can, by fetching
+   // current headers (can be done in a single parallel 
HTTP request) and
+   // only updating / deleting thumbnails when there is an 
XMPS header that
+   // needs to be removed.
+   $srcs = [];
+   foreach ( $fileVersions as $file ) {
+   $srcs[] = $file->getPath();
+   }
+   $file->getRepo()->getBackend()->preloadFileStat( [ 
'srcs' => $srcs ] );
+   foreach ( $fileVersions as $file ) {
+   $stat = 
$file->getRepo()->getBackend()->getFileStat( [ 'src' => $file->getPath() ] );
+   if ( !isset( 
$stat['xattr']['headers']['x-mediawiki-patrol-status'] ) ) {
+   continue;
+   }
+   $file->getRepo()->getBackend()->describe( [
+   'src' => $file->getPath(),
+   'headers' => [
+   'X-MediaWiki-Patrol-Status' => 
'',
+   ],
+   ] );
+   if ( $purgeThumbnails ) {
+   $file->purgeCache( [ 'forThumbRefresh' 
=> true ] );
+   }
+   }
+   } );
+   }
+
+   /**
+* Update the 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add X-MediaWiki-Patrol-Status to file content headers

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

Change subject: Add X-MediaWiki-Patrol-Status to file content headers
..

Add X-MediaWiki-Patrol-Status to file content headers

Add "X-MediaWiki-Patrol-Status: unpatrolled" to File::getContentHeaders
when file patrol is enabled and dealing with an unpatrolled file.
Also introduce LocalFile::getContentHeadersForNewFile to avoid code
duplication for generating headers when a File object cannot be used.

Refactor Article::showPatrolFooter/purgePatrolFooterCache to make
the logic for checking patrol status available to other classes.
Those methods considered a page patrolled if it was either
new-page-patrolled or file-patrolled. That is not ideal for our
purposes (when the file gets patrolled via new file patrol, we
don't want to hide it from readers, even if it wasn't
new-page-patrolled) so split it into two separate checks.

This means the old cache key, 'unpatrollable-page', has been split
into two , 'unpatrollable-page' and 'unpatrollable-file' (the old
name is being reused to avoid excessive DB load when the new code
gets deployed). This introduces some potential problems:
* In case the new code gets applied and later reverted (such as a
  train rollback), files that are file-patrollable but not
  new-page-patrollable will be considered not patrollable at all.
  The new code sets a different value so in the unlikely event
  that happens it can be dealt with.
* The file patrol check starts with a cold cache so a stampede is
  still possible. Given that it only gets called when a user with
  patrol rights looks at a file page, plus in certain maintenance
  scrips, that seems OK. (Future patches will add lookups for
  thumbnail streaming, but that should still be infrequent enough.)
* Doing the check for a huge number of files (such as running
  refreshFileHeaders.php) might result in cache pollution and/or
  slow down the script.

Also fix a bug where a select options array was passed to
RecentChange::newFromConds where it expected a DB index.

Bug: T167400
Change-Id: If488170949a8102b0eb5c044eb57bb789728b816
---
M includes/filerepo/file/File.php
M includes/filerepo/file/LocalFile.php
M includes/page/Article.php
M maintenance/importImages.php
4 files changed, 262 insertions(+), 147 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/402472/1

diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index 4e79de2..d67a81f 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -2177,10 +2177,16 @@
}
 
/**
-* @return array HTTP header name/value map to use for HEAD/GET request 
responses
+* The HTTP headers with which the file should be served.
+* Note that depending on configuration, the headers might not be 
applied consistently.
+* To guarantee they are always there, the wiki must either be 
configured to always serve
+* files through PHP, ore use a FileBackend that can store headers 
(e.g. SwiftFileBackend).
+* @return array Name/value map.
 * @since 1.30
+* @see LocalFile::getContentHeadersForNewFile()
+* @see MediaHandler::getContentHeaders()
 */
-   function getContentHeaders() {
+   public function getContentHeaders() {
$handler = $this->getHandler();
if ( $handler ) {
$metadata = $this->getMetadata();
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 4248f95..b65aedd 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -1289,19 +1289,9 @@
}
}
 
-   $options = [];
-   $handler = MediaHandler::getHandler( $props['mime'] );
-   if ( $handler ) {
-   $metadata = MediaWiki\quietCall( 'unserialize', 
$props['metadata'] );
-
-   if ( !is_array( $metadata ) ) {
-   $metadata = [];
-   }
-
-   $options['headers'] = $handler->getContentHeaders( 
$metadata );
-   } else {
-   $options['headers'] = [];
-   }
+   $options = [
+   'headers' => LocalFile::getContentHeadersForNewFile( 
$props, $user ),
+   ];
 
// Trim spaces on user supplied text
$comment = trim( $comment );
@@ -1668,7 +1658,7 @@

$wikiPage->getTitle()->invalidateCache();

$wikiPage->getTitle()->purgeSquid();
# Allow the new file version to 
be patrolled from the page footer
-

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Avoid replag errors in Article::getFilePatrolChange()

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

Change subject: Avoid replag errors in Article::getFilePatrolChange()
..

Avoid replag errors in Article::getFilePatrolChange()

Ignore Article::getNewPagePatrolChange() which is not used in a way
where occasonially failing to report a page as unpatrolled would matter.

Adds some master lookups which will be triggered on recently-expired-from-RC
files, while fixing a bug that's only relevant on small wikis which use
no external caching for files at all. Not sure if that's a good tradeoff.

Change-Id: I1e8cc0d292256481b42a4577dff5e9cf36e48396
---
M includes/filerepo/file/LocalFile.php
M includes/page/Article.php
2 files changed, 35 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/402473/1

diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index b65aedd..7c8575d 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -2124,11 +2124,6 @@
 
$headers = parent::getContentHeaders();
 
-   // If file patrolling is enabled, and file is unpatrolled, mark 
it so.
-   // Note that this is unreliable for very recently (re)uploaded 
files, due to the way
-   // Article::getFilePatrolChange works. If the file backend can 
remember headers, this
-   // method won't be used much, and if it can't, 
getContentHeaders() is not reliable anyway,
-   // so this should be good enough.
if ( $wgUseFilePatrol ) {
$article = Article::newFromTitle( $this->getTitle(), 
RequestContext::getMain() );
if ( $article->getFilePatrolChange() ) {
diff --git a/includes/page/Article.php b/includes/page/Article.php
index d4e8198..b414266 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1076,11 +1076,28 @@
[ 'img_name' => $title->getDBkey() ],
__METHOD__
);
+   if ( !$newestUploadTimestamp ) {
+   // Might be a remote file with a local file page 
override.
+   $file = wfFindFile( $title );
+   if ( $file && !$file->isLocal() ) {
+   $cache->set( $key, '1' );
+   return false;
+   }
+
+   // Otherwise, must be a recent upload that's not 
visible due to replication lag.
+   $dbw = wfGetDB( DB_MASTER );
+   $newestUploadTimestamp = $dbw->selectField(
+   'image',
+   'MAX( img_timestamp )',
+   [ 'img_name' => $title->getDBkey() ],
+   __METHOD__
+   );
+   }
if ( !$newestUploadTimestamp
|| !RecentChange::isInRCLifespan( 
$newestUploadTimestamp, self::$rcTolerance )
) {
-   // Not a local file or too old to be patrollable. This 
only changes when a new
-   // version is uploaded, and we clear the cache then, so 
safe to cache forever.
+   // Too old to be patrollable. This only changes when a 
new version is uploaded, and
+   // we clear the cache then, so safe to cache forever.
$cache->set( $key, '1' );
return false;
}
@@ -1095,7 +1112,22 @@
__METHOD__
);
if ( !$rc ) {
-   // RC entry probably too new to be visible due to 
replication lag. Fail but don't cache.
+   // Like above, check for replag.
+   $rc = RecentChange::newFromConds(
+   [
+   'rc_type' => RC_LOG,
+   'rc_log_type' => 'upload',
+   'rc_timestamp' => 
$newestUploadTimestamp,
+   'rc_namespace' => NS_FILE,
+   'rc_cur_id' => $title->getArticleID()
+   ],
+   __METHOD__,
+   DB_MASTER
+   );
+   }
+   if ( !$rc ) {
+   // Change is probably in the tolerance interval and was 
deleted from RC recently.
+   $cache->set( $key, '1' );
return false;
}
 

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

Gerrit-MessageType: newchange

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Pass through X-MediaWiki- headers in SwiftFileBackend

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

Change subject: Pass through X-MediaWiki- headers in SwiftFileBackend
..

Pass through X-MediaWiki- headers in SwiftFileBackend

Also simplify sanitizeHdrsStrict logic a bit.

For this to have any effect, Swift needs to be configured
to accept the header. Patches:
* operations/puppet: Ic7a940a0b74f83f2de507ecbaccd09d73180b140
* mediawiki/vagrant: Iea170f59a07c2cf57540a5011a6ae24871cd609b

Bug: T167400
Change-Id: Ic6a9e763f2e1d2e55612ec75cce921a8120f833d
---
M includes/libs/filebackend/SwiftFileBackend.php
1 file changed, 3 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/74/402474/1

diff --git a/includes/libs/filebackend/SwiftFileBackend.php 
b/includes/libs/filebackend/SwiftFileBackend.php
index 27ce212..4a61783 100644
--- a/includes/libs/filebackend/SwiftFileBackend.php
+++ b/includes/libs/filebackend/SwiftFileBackend.php
@@ -182,13 +182,8 @@
 * @return array Sanitized value of 'headers' field in $params
 */
protected function sanitizeHdrsStrict( array $params ) {
-   if ( !isset( $params['headers'] ) ) {
-   return [];
-   }
-
-   $headers = $this->getCustomHeaders( $params['headers'] );
+   $headers = $this->sanitizeHdrs( $params );
unset( $headers[ 'content-type' ] );
-
return $headers;
}
 
@@ -224,6 +219,8 @@
continue; // blacklisted
} elseif ( preg_match( '/^(x-)?content-/', $name ) ) {
$headers[$name] = $value; // allowed
+   } elseif ( preg_match( '/^x-mediawiki-/', $name ) ) {
+   $headers[$name] = $value; // allowed
} elseif ( preg_match( '/^content-(disposition)/', 
$name ) ) {
$headers[$name] = $value; // allowed
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add hooks for modifying file content headers

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

Change subject: Add hooks for modifying file content headers
..

Add hooks for modifying file content headers

Adds FileGetContentHeaders and FileGetContentHeadersNew hooks
for modifying what HTTP headers get sent (the first is for
existing files streamed via PHP, the second is for sending
the headers to the backend when creating a new file).

Mainly intended for extensions which provide some alternative
way of file patrolling and want to take over handling of the
X-MediaWiki-Patrol-Status header.

Bug: T167400
Change-Id: I5f30aa06401affcbad6b7be289f3b8893a4b4e1c
---
M RELEASE-NOTES-1.31
M docs/hooks.txt
M includes/filerepo/file/File.php
M includes/filerepo/file/LocalFile.php
4 files changed, 32 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/402476/1

diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31
index a496b02..ce4eb3c 100644
--- a/RELEASE-NOTES-1.31
+++ b/RELEASE-NOTES-1.31
@@ -37,6 +37,11 @@
   users during an import.
 * Added a hook, ParserOutputPostCacheTransform, to allow extensions to affect
   the ParserOutput::getText() post-cache transformations.
+* For certain file repo/backend configurations, unpatrolled files are served 
with
+  an 'X-MediaWiki-Patrol-Status: unpatrolled' header. This allows CDNs to limit
+  access to recent uploads until they get reviewed. The FileGetContentHeaders 
and
+  FileGetContentHeadersNew hooks and LocalFile::onMarkPatrolled method have 
been
+  added to aid extensions which want to interact with that.
 
 === External library changes in 1.31 ===
 
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 45387a3..8a3e175 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1553,6 +1553,25 @@
 &$user: user who performed the deletion
 &$reason: reason
 
+'FileGetContentHeaders': Modify HTTP headers returned when a file is requested.
+Custom headers should start with 'X-MediaWiki-'. Unless MediaWiki is configured
+to stream files via PHP, this hook will not be used most of the time a file is
+served; for certain backends, the FileGetContentHeadersNew can be used to cover
+those cases.
+$file: the File in question.
+&$headers: headers as an associative array. See the documentation for the
+  'headers' parameter of FileBackend::doOperations for details.
+
+'FileGetContentHeadersNew': Modify what HTTP headers should be returned when
+a file is requested. Called when the file is created (so the hook should not
+rely on the File object already existing). The headers will be passed to the
+backend (so this hook is only useful with a FileBackend with the ATTR_HEADERS
+feature).
+$props: array of file properties (in the format returned by MWFileProps).
+$user: the User uploading the file.
+&$headers: headers as an associative array. See the documentation for the
+  'headers' parameter of FileBackend::doOperations for details.
+
 'FileTransformed': When a file is transformed and moved into storage.
 $file: reference to the File object
 $thumb: the MediaTransformOutput object
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index d67a81f..62b52de 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -2187,6 +2187,8 @@
 * @see MediaHandler::getContentHeaders()
 */
public function getContentHeaders() {
+   $headers = [];
+
$handler = $this->getHandler();
if ( $handler ) {
$metadata = $this->getMetadata();
@@ -2199,10 +2201,12 @@
$metadata = [];
}
 
-   return $handler->getContentHeaders( $metadata );
+   $headers = $handler->getContentHeaders( $metadata );
}
 
-   return [];
+   Hooks::run( 'FileGetContentHeaders', [ $this, &$headers ] );
+
+   return $headers;
}
 
/**
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 1a27967..0f7912c 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -2167,6 +2167,8 @@
];
}
 
+   Hooks::run( 'FileGetContentHeadersNew', [ $props, $user, 
&$headers ] );
+
return $headers;
}
 

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

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

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

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Whitelist X-MediaWiki-Patrol-Status header in Swift

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

Change subject: Whitelist X-MediaWiki-Patrol-Status header in Swift
..

Whitelist X-MediaWiki-Patrol-Status header in Swift

See If488170949a8102b0eb5c044eb57bb789728b816 for background.

Bug: T167400
Change-Id: Ic7a940a0b74f83f2de507ecbaccd09d73180b140
---
M modules/swift/templates/object-server.conf.erb
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/402471/1

diff --git a/modules/swift/templates/object-server.conf.erb 
b/modules/swift/templates/object-server.conf.erb
index 38e9f2a..4ef4d93 100644
--- a/modules/swift/templates/object-server.conf.erb
+++ b/modules/swift/templates/object-server.conf.erb
@@ -27,7 +27,8 @@
x-delete-at,
x-object-manifest,
x-content-duration,
-   x-content-dimensions
+   x-content-dimensions,
+   x-mediawiki-patrol-status
 
 [object-replicator]
 concurrency = 3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7a940a0b74f83f2de507ecbaccd09d73180b140
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Whitelist X-MediaWiki-Patrol-Status header in Swift

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

Change subject: Whitelist X-MediaWiki-Patrol-Status header in Swift
..

Whitelist X-MediaWiki-Patrol-Status header in Swift

See If488170949a8102b0eb5c044eb57bb789728b816 and
for background.

Bug: T167400
Change-Id: Iea170f59a07c2cf57540a5011a6ae24871cd609b
---
M puppet/modules/swift/templates/ring.conf.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/70/402470/1

diff --git a/puppet/modules/swift/templates/ring.conf.erb 
b/puppet/modules/swift/templates/ring.conf.erb
index 54986dd..2ad2d52 100644
--- a/puppet/modules/swift/templates/ring.conf.erb
+++ b/puppet/modules/swift/templates/ring.conf.erb
@@ -13,7 +13,7 @@
 [app:<%= @ring_type %>-server]
 use = egg:swift#<%= @ring_type %>
 # Only for object-server
-allowed_headers = content-disposition, content-encoding, x-delete-at, 
x-object-manifest, x-content-duration, x-content-dimensions, xkey
+allowed_headers = content-disposition, content-encoding, x-delete-at, 
x-object-manifest, x-content-duration, x-content-dimensions, xkey, 
x-mediawiki-patrol-status
 
 [<%= @ring_type %>-replicator]
 vm_test_mode = yes
@@ -26,4 +26,4 @@
 [<%= @ring_type %>-sync]
 
 # Same for account-reaper
-[<%= @ring_type %>-reaper]
\ No newline at end of file
+[<%= @ring_type %>-reaper]

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...GlobalCssJs[master]: Add missing copyright headers

2018-01-05 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402469 )

Change subject: Add missing copyright headers
..

Add missing copyright headers

Change-Id: Iafdc1a24c3e39647dc9b8086690473048e1f36b5
---
M includes/Hooks.php
M maintenance/removeOldManualUserPages.php
2 files changed, 38 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalCssJs 
refs/changes/69/402469/1

diff --git a/includes/Hooks.php b/includes/Hooks.php
index e863979..7508974 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -1,4 +1,23 @@
 https://gerrit.wikimedia.org/r/402469
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] mediawiki...GlobalCssJs[master]: [WIP] Namespace this extension and move into includes

2018-01-05 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402468 )

Change subject: [WIP] Namespace this extension and move into includes
..

[WIP] Namespace this extension and move into includes

Change-Id: If19086e80f3f04bc677fc95de3416d0ad2352fb2
---
M .phpcs.xml
M extension.json
R includes/Hooks.php
R includes/ResourceLoaderGlobalModule.php
R includes/ResourceLoaderGlobalSiteModule.php
R includes/ResourceLoaderGlobalUserModule.php
M maintenance/removeOldManualUserPages.php
M tests/phpunit/RemoveOldManualUserPagesTest.php
M tests/phpunit/ResourceLoaderGlobalModuleTest.php
M tests/phpunit/ResourceLoaderGlobalModuleTestCase.php
M tests/phpunit/ResourceLoaderGlobalSiteModuleTest.php
M tests/phpunit/ResourceLoaderGlobalUserModuleTest.php
12 files changed, 111 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalCssJs 
refs/changes/68/402468/1

diff --git a/.phpcs.xml b/.phpcs.xml
index 5f94480..1f6d143 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -7,9 +7,6 @@



-   
-   */maintenance/*
-   
.


diff --git a/extension.json b/extension.json
index 416a70f..b077f1a 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "GlobalCssJs",
-   "version": "3.3.0",
+   "version": "3.4.0",
"author": [
"Ryan Schmidt",
"Szymon Świerkosz",
@@ -12,21 +12,13 @@
"license-name": "GPL-2.0+",
"type": "other",
"requires": {
-   "MediaWiki": ">= 1.27.0"
+   "MediaWiki": ">= 1.31.0"
},
"Hooks": {
-   "BeforePageDisplay": [
-   "GlobalCssJsHooks::onBeforePageDisplay"
-   ],
-   "ResourceLoaderRegisterModules": [
-   "GlobalCssJsHooks::onResourceLoaderRegisterModules"
-   ],
-   "EditPage::showEditForm:initial": [
-   "GlobalCssJsHooks::onEditPageshowEditForminitial"
-   ],
-   "GetPreferences": [
-   "GlobalCssJsHooks::onGetPreferences"
-   ]
+   "BeforePageDisplay": 
"MediaWiki\\GlobalCssJs\\Hooks::onBeforePageDisplay",
+   "ResourceLoaderRegisterModules": 
"MediaWiki\\GlobalCssJs\\Hooks::onResourceLoaderRegisterModules",
+   "EditPage::showEditForm:initial": 
"MediaWiki\\GlobalCssJs\\Hooks::onEditPageshowEditForminitial",
+   "GetPreferences": 
"MediaWiki\\GlobalCssJs\\Hooks::onGetPreferences"
},
"MessagesDirs": {
"GlobalCssJs": [
@@ -46,15 +38,13 @@
"ext.globalCssJs.user"
],
"ExtensionFunctions": [
-   "GlobalCssJsHooks::onExtensionFunctions"
+   "MediaWiki\\GlobalCssJs\\Hooks::onExtensionFunctions"
],
+   "AutoloadNamespaces": {
+   "MediaWiki\\GlobalCssJs\\": "includes/"
+   },
"AutoloadClasses": {
-   "ResourceLoaderGlobalModule": "ResourceLoaderGlobalModule.php",
-   "ResourceLoaderGlobalSiteModule": 
"ResourceLoaderGlobalSiteModule.php",
-   "ResourceLoaderGlobalUserModule": 
"ResourceLoaderGlobalUserModule.php",
-   "GlobalCssJsHooks": "GlobalCssJsHooks.php",
-   "ResourceLoaderGlobalModuleTestCase": 
"tests/phpunit/ResourceLoaderGlobalModuleTestCase.php",
-   "RemoveOldManualUserPages": 
"maintenance/removeOldManualUserPages.php"
+   
"MediaWiki\\GlobalCssJs\\Test\\ResourceLoaderGlobalModuleTestCase": 
"tests/phpunit/ResourceLoaderGlobalModuleTestCase.php"
},
"ConfigRegistry": {
"globalcssjs": "GlobalVarConfig::newInstance"
diff --git a/GlobalCssJsHooks.php b/includes/Hooks.php
similarity index 96%
rename from GlobalCssJsHooks.php
rename to includes/Hooks.php
index fe6efb7..e863979 100644
--- a/GlobalCssJsHooks.php
+++ b/includes/Hooks.php
@@ -1,6 +1,19 @@
 makeConfig( 
'globalcssjs' );
diff --git a/ResourceLoaderGlobalModule.php 
b/includes/ResourceLoaderGlobalModule.php
similarity index 94%
rename from ResourceLoaderGlobalModule.php
rename to includes/ResourceLoaderGlobalModule.php
index c8f0050..1e87370 100644
--- a/ResourceLoaderGlobalModule.php
+++ b/includes/ResourceLoaderGlobalModule.php
@@ -20,6 +20,12 @@
  * @author Kunal Mehta
  */
 
+namespace MediaWiki\GlobalCssJs;
+
+use IDatabase;
+use InvalidArgumentException;
+use ResourceLoaderWikiModule;
+
 /**
  * Base class for global modules.
  *
diff --git a/ResourceLoaderGlobalSiteModule.php 
b/includes/ResourceLoaderGlobalSiteModule.php
similarity index 95%
rename from ResourceLoaderGlobalSiteModule.php
rename to includes/ResourceLoaderGlobalSiteModule.php
index da58639..acd5a89 100644
--- a/ResourceLoaderGlobalSiteModule.php
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Avoid use of $wgLang global in UserProfilePage

2018-01-05 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402467 )

Change subject: Avoid use of $wgLang global in UserProfilePage
..

Avoid use of $wgLang global in UserProfilePage

Change-Id: I18b5d7b60e5e22830679c8b163a2b65ef783d6b8
---
M UserProfile/UserProfilePage.php
1 file changed, 16 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/67/402467/1

diff --git a/UserProfile/UserProfilePage.php b/UserProfile/UserProfilePage.php
index 53a5b75..043180f 100644
--- a/UserProfile/UserProfilePage.php
+++ b/UserProfile/UserProfilePage.php
@@ -161,9 +161,11 @@
function getUserStatsRow( $label, $value ) {
$output = ''; // Prevent E_NOTICE
 
+   $context = $this->getContext();
+   $language = $context->getLanguage();
+
if ( $value != 0 ) {
-   global $wgLang;
-   $formattedValue = $wgLang->formatNum( $value );
+   $formattedValue = $language->formatNum( $value );
$output = "
{$label}
{$formattedValue}
@@ -918,10 +920,11 @@
 * @param $user_name String: user name
 */
function getProfileTop( $user_id, $user_name ) {
-   global $wgLang, $wgUserLevels;
+   global $wgUserLevels;
 
$context = $this->getContext();
$userContext = $context->getUser();
+   $language = $context->getLanguage();
 
$stats = new UserStats( $user_id, $user_name );
$stats_data = $stats->getUserStats();
@@ -994,7 +997,7 @@
' .
wfMessage(
'user-profile-points',
-   $wgLang->formatNum( 
$stats_data['points'] )
+   $language->formatNum( 
$stats_data['points'] )
)->escaped() .
'

@@ -1007,7 +1010,7 @@
';
 
if ( $this->isOwner() ) {
-   $output .= $wgLang->pipeList( array(
+   $output .= $language->pipeList( array(
'' . wfMessage( 'user-edit-profile' 
)->escaped() . '',
'' . wfMessage( 'user-upload-avatar' 
)->escaped() . '',
'' . wfMessage( 'user-watchlist' )->escaped() . 
'',
@@ -1015,20 +1018,20 @@
) );
} elseif ( $userContext->isLoggedIn() ) {
if ( $relationship == false ) {
-   $output .= $wgLang->pipeList( array(
+   $output .= $language->pipeList( array(
'' . wfMessage( 'user-add-friend' )->escaped() . '',
'' . wfMessage( 'user-add-foe' )->escaped() . '',
''
) );
} else {
if ( $relationship == 1 ) {
-   $output .= $wgLang->pipeList( array(
+   $output .= $language->pipeList( array(
'' . wfMessage( 
'user-remove-friend' )->escaped() . '',
''
) );
}
if ( $relationship == 2 ) {
-   $output .= $wgLang->pipeList( array(
+   $output .= $language->pipeList( array(
'' . wfMessage( 
'user-remove-foe' )->escaped() . '',
''
) );
@@ -1114,7 +1117,10 @@
 *   foes
 */
function getRelationships( $user_name, $rel_type ) {
-   global $wgMemc, $wgUserProfileDisplay, $wgLang;
+   global $wgMemc, $wgUserProfileDisplay;
+
+   $context = $this->getContext();
+   $language = $context->getLanguage();
 
// If not enabled in site settings, don't display
if ( $rel_type == 1 ) {
@@ -1186,7 +1192,7 @@
$avatar = new wAvatar( $friend['user_id'], 'ml' 
);
 
// Chop down username that gets displayed
-   $user_name 

[MediaWiki-commits] [Gerrit] analytics/wikistats2[master]: Add documentation links to each metric

2018-01-05 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402466 )

Change subject: Add documentation links to each metric
..

Add documentation links to each metric

As part of this, a new landing page has been created at
https://meta.wikimedia.org/wiki/Research:Wikistats_metrics and sub-pages
that define each metric were linked from each metric configuration.
These pages should be improved going forward, but this change fixes the
more immediate problem that right now metrics don't link anywhere.

Bug: T183188
Change-Id: Ib580427b341b104b2f47289b41a19b2dd3593fa6
---
M src/components/detail/GraphPanel.vue
M src/config/metrics/content.js
M src/config/metrics/contributing.js
M src/config/metrics/metricSchema.js
M src/config/metrics/reading.js
5 files changed, 30 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats2 
refs/changes/66/402466/1

diff --git a/src/components/detail/GraphPanel.vue 
b/src/components/detail/GraphPanel.vue
index 520077e..375276b 100644
--- a/src/components/detail/GraphPanel.vue
+++ b/src/components/detail/GraphPanel.vue
@@ -3,7 +3,8 @@
 
 
 
-
+
 {{graphModel.config.fullName || 'No data yet... '}}
 
 {{granularity}}
@@ -51,7 +52,12 @@
 
 {{changeOverRange}}% over this time range.
 
-{{graphModel.config.description}}. More info about this 
metric.
+{{graphModel.config.description}}.
+
+More info about this metric.
+
+
 
 
 
diff --git a/src/config/metrics/content.js b/src/config/metrics/content.js
index b4ec096..1631cef 100644
--- a/src/config/metrics/content.js
+++ b/src/config/metrics/content.js
@@ -1,8 +1,9 @@
 module.exports = {
 'absolute-bytes': {
 fullName: 'Absolute bytes diff',
-description: 'Absolute sum of all diff bytes in a project',
-question: 'How many bytes have been changed?',
+description: 'The sum of the absolute differences in bytes made by 
each edit (or revision), including edits on redirects. In other words, counting 
negative differences as positive',
+question: 'What are the total number of bytes added and removed?',
+infoUrl: 
'https://meta.wikimedia.org/wiki/Research:Wikistats_metrics/Bytes#Absolute_Bytes_Difference',
 defaults: {
 unique: {
 project: ['all-projects'],
@@ -41,8 +42,9 @@
 },
 'edited-pages': {
 fullName: 'Edited pages',
-description: 'Number of pages edited',
+description: 'The number of pages edited, excluding redirect pages',
 question: 'How many pages are edited?',
+infoUrl: 
'https://meta.wikimedia.org/wiki/Research:Wikistats_metrics/Edited_pages',
 defaults: {
 unique: {
 project: ['all-projects'],
@@ -90,8 +92,9 @@
 },
 'net-bytes': {
 fullName: 'Net bytes difference',
-description: 'Net difference between current byte size of a project 
and last period\'s',
-question: 'How did the size in bytes change since last period?',
+description: 'The sum of the differences in bytes made by each edit 
(or revision), including edits on redirects',
+question: 'How did the overall size in bytes change since last 
period?',
+infoUrl: 
'https://meta.wikimedia.org/wiki/Research:Wikistats_metrics/Bytes#Net_Bytes_Difference',
 defaults: {
 unique: {
 project: ['all-projects'],
diff --git a/src/config/metrics/contributing.js 
b/src/config/metrics/contributing.js
index 7308dea..0335596 100644
--- a/src/config/metrics/contributing.js
+++ b/src/config/metrics/contributing.js
@@ -2,8 +2,9 @@
 'editors': {
 disabled: true,
 fullName: 'Editors',
-description: 'Number of editors at a time period.',
+description: 'The count of editors performing edits, including on 
redirect pages',
 question: 'How many editors are there?',
+infoUrl: 
'https://meta.wikimedia.org/wiki/Research:Wikistats_metrics/Editors',
 defaults: {
 unique: {
 project: ['all-projects'],
@@ -51,8 +52,9 @@
 },
 'edits': {
 fullName: 'Edits',
-description: 'Number of wiki edits in a time period',
+description: 'The count of edits (or revisions), including edits on 
redirects',
 question: 'How many edits have been made?',
+infoUrl: 
'https://meta.wikimedia.org/wiki/Research:Wikistats_metrics/Edits',
 defaults: {
 unique: {
 project: ['all-projects'],
@@ -91,8 +93,9 @@
 'new-pages': {
 disabled: true,
 fullName: 'New 

[MediaWiki-commits] [Gerrit] operations/dns[master]: Revert "Revert "add research.wikimedia.org""

2018-01-05 Thread Dzahn (Code Review)
Hello jenkins-bot, Bmansurov,

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

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

to review the following change.


Change subject: Revert "Revert "add research.wikimedia.org""
..

Revert "Revert "add research.wikimedia.org""

This reverts commit 37365d1b648d4952285eeecc9f934e395716f4e0.

Change-Id: I81787c8eac6b2984db0818b45c845aee1f5ad13c
---
M templates/wikimedia.org
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/65/402465/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 8ce2232..bacf2c5 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -614,6 +614,8 @@
 releases 600 IN DYNA geoip!misc-addrs
 releases-jenkins 600 IN DYNA geoip!misc-addrs
 
+research 600 IN DYNA geoip!misc-addrs
+
 reports.frdev   1H  IN CNAMEfrdev-eqiad
 
 rt  600 IN DYNA geoip!misc-addrs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81787c8eac6b2984db0818b45c845aee1f5ad13c
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Bmansurov 
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]: research: re-enable git cloning of page content

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

Change subject: research: re-enable git cloning of page content
..


research: re-enable git cloning of page content

Change-Id: Ie209278198d05516d1b90e01c494e82d5f9426f1
---
M modules/profile/manifests/microsites/research.pp
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/modules/profile/manifests/microsites/research.pp 
b/modules/profile/manifests/microsites/research.pp
index 0e4e043..0d4fc0e 100644
--- a/modules/profile/manifests/microsites/research.pp
+++ b/modules/profile/manifests/microsites/research.pp
@@ -12,12 +12,12 @@
 ensure_resource('file', '/srv/org/wikimedia', {'ensure' => 'directory' })
 ensure_resource('file', '/srv/org/wikimedia/research', {'ensure' => 
'directory' })
 
-#git::clone { 'research/landing-page':
-#ensure=> 'present',
-#source=> 'gerrit',
-#directory => '/srv/org/wikimedia/research',
-#branch=> 'master',
-#}
+git::clone { 'research/landing-page':
+ensure=> 'present',
+source=> 'gerrit',
+directory => '/srv/org/wikimedia/research',
+branch=> 'master',
+}
 
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: [WIP] Split large reading lists

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

Change subject: [WIP] Split large reading lists
..

[WIP] Split large reading lists

- Split existing lists > 1000 on version update
- Split lists when articles are added, if they exceed 1000 counts
- Show UI feedback before splitting

Bug: T180229
Change-Id: Ife8b1c4adea5e67f82d6d033d6800fd1ed5f2e4c
---
M app/src/main/java/org/wikipedia/readinglist/database/ReadingListDbHelper.java
M app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java
M app/src/main/res/values/strings.xml
3 files changed, 36 insertions(+), 0 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/readinglist/database/ReadingListDbHelper.java 
b/app/src/main/java/org/wikipedia/readinglist/database/ReadingListDbHelper.java
index 3b90199..885c7a8 100644
--- 
a/app/src/main/java/org/wikipedia/readinglist/database/ReadingListDbHelper.java
+++ 
b/app/src/main/java/org/wikipedia/readinglist/database/ReadingListDbHelper.java
@@ -1,14 +1,17 @@
 package org.wikipedia.readinglist.database;
 
 import android.content.ContentValues;
+import android.content.Context;
 import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 
+import org.wikipedia.R;
 import org.wikipedia.WikipediaApp;
 import org.wikipedia.database.contract.ReadingListContract;
 import org.wikipedia.database.contract.ReadingListPageContract;
+import org.wikipedia.dataclient.WikiSite;
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.savedpages.SavedPageSyncService;
 import org.wikipedia.util.log.L;
@@ -19,6 +22,7 @@
 
 public class ReadingListDbHelper {
 private static ReadingListDbHelper INSTANCE;
+private static final int MAX_ARTICLE_LIMIT = 1000;
 
 public static ReadingListDbHelper instance() {
 if (INSTANCE == null) {
@@ -116,6 +120,7 @@
 } finally {
 db.endTransaction();
 }
+spiltLargeList(list);
 SavedPageSyncService.enqueue();
 }
 
@@ -130,6 +135,7 @@
 for (ReadingListPage page : pages) {
 insertPageInDb(db, list, page);
 }
+spiltLargeList(list);
 db.setTransactionSuccessful();
 } finally {
 db.endTransaction();
@@ -149,6 +155,7 @@
 addPageToList(db, list, title);
 numAdded++;
 }
+spiltLargeList(list);
 db.setTransactionSuccessful();
 } finally {
 db.endTransaction();
@@ -483,4 +490,24 @@
 private SQLiteDatabase getWritableDatabase() {
 return WikipediaApp.getInstance().getDatabase().getWritableDatabase();
 }
+
+public synchronized void spiltLargeList(ReadingList readingList) {
+int index = readingList.title().split("_").length == 1 ? 1 : 
Integer.valueOf(readingList.title().split("_")[1]) + 1;
+WikiSite wikiSite = WikipediaApp.getInstance().getWikiSite();
+Context context = WikipediaApp.getInstance();
+List pageTitleList = new ArrayList<>();
+List toBeAddedList = new ArrayList<>();
+if (readingList.pages().size() <= MAX_ARTICLE_LIMIT) {
+return;
+}
+for (int j = MAX_ARTICLE_LIMIT - 1; j < readingList.pages().size(); 
j++) {
+pageTitleList.add(readingList.pages().get(j));
+toBeAddedList.add(new 
PageTitle(readingList.pages().get(j).title(), wikiSite));
+}
+markPagesForDeletion(pageTitleList);
+purgeDeletedPages();
+ReadingList newList = 
createList(String.format(context.getString(R.string.split_list_name), 
readingList.title().split("_")[0], index), readingList.description());
+addPagesToListIfNotExist(newList, toBeAddedList);
+spiltLargeList(newList);
+}
 }
diff --git 
a/app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java
 
b/app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java
index 0f4f6f7..cb6db3b 100644
--- 
a/app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java
+++ 
b/app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java
@@ -81,10 +81,18 @@
 importOldLists(db, currentLists);
 }
 createDefaultList(db, currentLists);
+//splitLargeLists(db, currentLists);
 // TODO: add other one-time conversions here.
 }
 }
 
+
+private void splitLargeLists(SQLiteDatabase db, List 
currentLists) {
+for (ReadingList list : currentLists) {
+ReadingListDbHelper.instance().spiltLargeList(list);
+}
+}
+
 @Override protected ContentValues toContentValues(@NonNull 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: research: re-enable git cloning of page content

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

Change subject: research: re-enable git cloning of page content
..

research: re-enable git cloning of page content

Change-Id: Ie209278198d05516d1b90e01c494e82d5f9426f1
---
M modules/profile/manifests/microsites/research.pp
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/modules/profile/manifests/microsites/research.pp 
b/modules/profile/manifests/microsites/research.pp
index 0e4e043..0d4fc0e 100644
--- a/modules/profile/manifests/microsites/research.pp
+++ b/modules/profile/manifests/microsites/research.pp
@@ -12,12 +12,12 @@
 ensure_resource('file', '/srv/org/wikimedia', {'ensure' => 'directory' })
 ensure_resource('file', '/srv/org/wikimedia/research', {'ensure' => 
'directory' })
 
-#git::clone { 'research/landing-page':
-#ensure=> 'present',
-#source=> 'gerrit',
-#directory => '/srv/org/wikimedia/research',
-#branch=> 'master',
-#}
+git::clone { 'research/landing-page':
+ensure=> 'present',
+source=> 'gerrit',
+directory => '/srv/org/wikimedia/research',
+branch=> 'master',
+}
 
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: research: re-enable Apache, disable cloning

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

Change subject: research: re-enable Apache, disable cloning
..


research: re-enable Apache, disable cloning

Bug: T179871
Change-Id: I8abeddc490e452fce470978774bf2ab6f6acc702
---
M modules/profile/manifests/microsites/research.pp
1 file changed, 6 insertions(+), 7 deletions(-)

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



diff --git a/modules/profile/manifests/microsites/research.pp 
b/modules/profile/manifests/microsites/research.pp
index fa4acaa..0e4e043 100644
--- a/modules/profile/manifests/microsites/research.pp
+++ b/modules/profile/manifests/microsites/research.pp
@@ -5,7 +5,6 @@
 ) {
 
 httpd::site { 'research.wikimedia.org':
-ensure  => 'absent',
 content => 
template('profile/research/apache-research.wikimedia.org.erb'),
 }
 
@@ -13,12 +12,12 @@
 ensure_resource('file', '/srv/org/wikimedia', {'ensure' => 'directory' })
 ensure_resource('file', '/srv/org/wikimedia/research', {'ensure' => 
'directory' })
 
-git::clone { 'research/landing-page':
-ensure=> 'present',
-source=> 'gerrit',
-directory => '/srv/org/wikimedia/research',
-branch=> 'master',
-}
+#git::clone { 'research/landing-page':
+#ensure=> 'present',
+#source=> 'gerrit',
+#directory => '/srv/org/wikimedia/research',
+#branch=> 'master',
+#}
 
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: research: re-enable Apache, disable cloning

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

Change subject: research: re-enable Apache, disable cloning
..

research: re-enable Apache, disable cloning

Bug: T179871
Change-Id: I8abeddc490e452fce470978774bf2ab6f6acc702
---
M modules/profile/manifests/microsites/research.pp
1 file changed, 6 insertions(+), 7 deletions(-)


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

diff --git a/modules/profile/manifests/microsites/research.pp 
b/modules/profile/manifests/microsites/research.pp
index fa4acaa..0e4e043 100644
--- a/modules/profile/manifests/microsites/research.pp
+++ b/modules/profile/manifests/microsites/research.pp
@@ -5,7 +5,6 @@
 ) {
 
 httpd::site { 'research.wikimedia.org':
-ensure  => 'absent',
 content => 
template('profile/research/apache-research.wikimedia.org.erb'),
 }
 
@@ -13,12 +12,12 @@
 ensure_resource('file', '/srv/org/wikimedia', {'ensure' => 'directory' })
 ensure_resource('file', '/srv/org/wikimedia/research', {'ensure' => 
'directory' })
 
-git::clone { 'research/landing-page':
-ensure=> 'present',
-source=> 'gerrit',
-directory => '/srv/org/wikimedia/research',
-branch=> 'master',
-}
+#git::clone { 'research/landing-page':
+#ensure=> 'present',
+#source=> 'gerrit',
+#directory => '/srv/org/wikimedia/research',
+#branch=> 'master',
+#}
 
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] research/landing-page[refs/meta/config]: Edit Project Config

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

Change subject: Edit Project Config
..


Edit Project Config

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f3532a55bd37085314d6f9a7d6b157a5d0e7896
Gerrit-PatchSet: 1
Gerrit-Project: research/landing-page
Gerrit-Branch: refs/meta/config
Gerrit-Owner: Bmansurov 
Gerrit-Reviewer: Bmansurov 

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


[MediaWiki-commits] [Gerrit] research/landing-page[refs/meta/config]: Edit Project Config

2018-01-05 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402461 )

Change subject: Edit Project Config
..

Edit Project Config

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


  git pull ssh://gerrit.wikimedia.org:29418/research/landing-page 
refs/changes/61/402461/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f3532a55bd37085314d6f9a7d6b157a5d0e7896
Gerrit-PatchSet: 1
Gerrit-Project: research/landing-page
Gerrit-Branch: refs/meta/config
Gerrit-Owner: Bmansurov 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wikireplica: Remove dns for deleted wikis als.wiki* and mo....

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

Change subject: wikireplica: Remove dns for deleted wikis als.wiki* and  mo.wik*
..


wikireplica: Remove dns for deleted wikis als.wiki* and  mo.wik*

Remove dns entries for Remove als.wik(ibooks|iquote|tionary),
mo.wik(ipedia|tionary) views from replicas. alswiki still exists.

Bug: T181925
Change-Id: I595c9031d9774e3434318e7f1e5bad5bb45f1f5f
---
M modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone 
b/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
index ce5ac89..f19bcdf 100644
--- a/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
+++ b/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
@@ -46,9 +46,6 @@
 akwikibooks1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 akwiktionary   1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 alswiki1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
-alswikibooks   1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
-alswikiquote   1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
-alswiktionary  1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 amwiki 1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 amwikimedia1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 amwikiquote1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
@@ -524,8 +521,6 @@
 mnwikibooks1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 mnwiktionary   1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 movementroleswiki  1H  IN  CNAME   
s3.analytics.db.svc.eqiad.wmflabs.
-mowiki 1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
-mowiktionary   1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 mrjwiki1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 mrwiki 1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 mrwikibooks1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add missing jQueryMsg dependency

2018-01-05 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402459 )

Change subject: Add missing jQueryMsg dependency
..

Add missing jQueryMsg dependency

Some of these messages use jQueryMsg-only features, like PLURAL.

Bug: T184320
Change-Id: I7f5a4979bb5ed5779e9d24d18189f89a9453c54e
---
M resources/Resources.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/59/402459/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 7d37b50..536933c 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1776,6 +1776,7 @@
'oojs',
'mediawiki.api',
'mediawiki.api.options',
+   'mediawiki.jqueryMsg',
'mediawiki.Uri',
'mediawiki.user',
],
@@ -1934,6 +1935,7 @@
'dependencies' => [
'oojs-ui-widgets',
'jquery.makeCollapsible',
+   'mediawiki.jqueryMsg',
'mediawiki.language',
'mediawiki.user',
'mediawiki.util',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wikireplica: Remove dns for deleted wikis als.wiki* and mo....

2018-01-05 Thread Madhuvishy (Code Review)
Madhuvishy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402458 )

Change subject: wikireplica: Remove dns for deleted wikis als.wiki* and  mo.wik*
..

wikireplica: Remove dns for deleted wikis als.wiki* and  mo.wik*

Remove dns entries for Remove als.wik(ibooks|iquote|tionary),
mo.wik(ipedia|tionary) views from replicas. alswiki still exists.

Bug: T181925
Change-Id: I595c9031d9774e3434318e7f1e5bad5bb45f1f5f
---
M modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/402458/1

diff --git a/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone 
b/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
index ce5ac89..f19bcdf 100644
--- a/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
+++ b/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
@@ -46,9 +46,6 @@
 akwikibooks1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 akwiktionary   1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 alswiki1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
-alswikibooks   1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
-alswikiquote   1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
-alswiktionary  1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 amwiki 1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 amwikimedia1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 amwikiquote1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
@@ -524,8 +521,6 @@
 mnwikibooks1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 mnwiktionary   1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 movementroleswiki  1H  IN  CNAME   
s3.analytics.db.svc.eqiad.wmflabs.
-mowiki 1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
-mowiktionary   1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 mrjwiki1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 mrwiki 1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.
 mrwikibooks1H  IN  CNAME   s3.analytics.db.svc.eqiad.wmflabs.

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

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

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


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

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

Change subject: Use SPDX 3.0 license identifier
..


Use SPDX 3.0 license identifier

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

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

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



diff --git a/extension.json b/extension.json
index 7434cd9..a3c574b 100644
--- a/extension.json
+++ b/extension.json
@@ -4,7 +4,7 @@
"author": [
"Roan Kattouw"
],
-   "license-name": "GPL-3.0+",
+   "license-name": "GPL-3.0-or-later",
"url": "https://www.mediawiki.org/wiki/Extension:ChangeAuthor;,
"descriptionmsg": "changeauthor-desc",
"type": "specialpage",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37146187cd23ad7dda53ce9ccd382cba4957fcc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ChangeAuthor
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


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

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

Change subject: Use SPDX 3.0 license identifier
..


Use SPDX 3.0 license identifier

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

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

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



diff --git a/extension.json b/extension.json
index fc21a1b..2e499cd 100644
--- a/extension.json
+++ b/extension.json
@@ -8,7 +8,7 @@
],
"url": "https://www.mediawiki.org/wiki/Extension:Challenge;,
"descriptionmsg": "challenge-desc",
-   "license-name": "GPL-2.0+",
+   "license-name": "GPL-2.0-or-later",
"type": "other",
"GroupPermissions": {
"sysop": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03c8b9adbd180f3627468e8f56f75a60579bd40d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Challenge
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Revert "add research.wikimedia.org"

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

Change subject: Revert "add research.wikimedia.org"
..


Revert "add research.wikimedia.org"

This reverts commit dbb52a7bb4cd96d26f81bb6a6e2f9003b49c34e6.

Change-Id: I344b5f08cf9a21eb5eaa3bcf01a95a682cfdffcd
---
M templates/wikimedia.org
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index bacf2c5..8ce2232 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -614,8 +614,6 @@
 releases 600 IN DYNA geoip!misc-addrs
 releases-jenkins 600 IN DYNA geoip!misc-addrs
 
-research 600 IN DYNA geoip!misc-addrs
-
 reports.frdev   1H  IN CNAMEfrdev-eqiad
 
 rt  600 IN DYNA geoip!misc-addrs

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Revert "add research.wikimedia.org"

2018-01-05 Thread Dzahn (Code Review)
Hello jenkins-bot, Bmansurov,

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

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

to review the following change.


Change subject: Revert "add research.wikimedia.org"
..

Revert "add research.wikimedia.org"

This reverts commit dbb52a7bb4cd96d26f81bb6a6e2f9003b49c34e6.

Change-Id: I344b5f08cf9a21eb5eaa3bcf01a95a682cfdffcd
---
M templates/wikimedia.org
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/57/402457/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index bacf2c5..8ce2232 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -614,8 +614,6 @@
 releases 600 IN DYNA geoip!misc-addrs
 releases-jenkins 600 IN DYNA geoip!misc-addrs
 
-research 600 IN DYNA geoip!misc-addrs
-
 reports.frdev   1H  IN CNAMEfrdev-eqiad
 
 rt  600 IN DYNA geoip!misc-addrs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I344b5f08cf9a21eb5eaa3bcf01a95a682cfdffcd
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Bmansurov 
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]: research: temp disable landing page

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

Change subject: research: temp disable landing page
..


research: temp disable landing page

Bug: T179871
Change-Id: I549a741793b37506287b6d5bd66737e8c422
---
M modules/profile/manifests/microsites/research.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/profile/manifests/microsites/research.pp 
b/modules/profile/manifests/microsites/research.pp
index 0d4fc0e..fa4acaa 100644
--- a/modules/profile/manifests/microsites/research.pp
+++ b/modules/profile/manifests/microsites/research.pp
@@ -5,6 +5,7 @@
 ) {
 
 httpd::site { 'research.wikimedia.org':
+ensure  => 'absent',
 content => 
template('profile/research/apache-research.wikimedia.org.erb'),
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: research: temp disable landing page

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

Change subject: research: temp disable landing page
..

research: temp disable landing page

Bug: T179871
Change-Id: I549a741793b37506287b6d5bd66737e8c422
---
M modules/profile/manifests/microsites/research.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/402456/1

diff --git a/modules/profile/manifests/microsites/research.pp 
b/modules/profile/manifests/microsites/research.pp
index 0d4fc0e..fc32c75 100644
--- a/modules/profile/manifests/microsites/research.pp
+++ b/modules/profile/manifests/microsites/research.pp
@@ -6,6 +6,7 @@
 
 httpd::site { 'research.wikimedia.org':
 content => 
template('profile/research/apache-research.wikimedia.org.erb'),
+ensure  => 'absent',
 }
 
 ensure_resource('file', '/srv/org', {'ensure' => 'directory' })

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: add research.wikimedia.org

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

Change subject: add research.wikimedia.org
..


add research.wikimedia.org

Add research.wikimedia.org to point it to a static
landing page created with I96d74f563d518a1b3.

Bug: T183916
Change-Id: Ia047f9835e110d2236d4679b86ee9be3061ee2d4
---
M templates/wikimedia.org
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 8ce2232..bacf2c5 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -614,6 +614,8 @@
 releases 600 IN DYNA geoip!misc-addrs
 releases-jenkins 600 IN DYNA geoip!misc-addrs
 
+research 600 IN DYNA geoip!misc-addrs
+
 reports.frdev   1H  IN CNAMEfrdev-eqiad
 
 rt  600 IN DYNA geoip!misc-addrs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia047f9835e110d2236d4679b86ee9be3061ee2d4
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add a function to create the references node uniformly

2018-01-05 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402454 )

Change subject: Add a function to create the references node uniformly
..

Add a function to create the references node uniformly

Change-Id: I58fd7ea7c692b1a38dab160083d3d9a529527fb0
---
M lib/ext/Cite/index.js
M tests/citeParserTests-blacklist.js
2 files changed, 43 insertions(+), 38 deletions(-)


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

diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js
index 4679ce8..0c32c92 100644
--- a/lib/ext/Cite/index.js
+++ b/lib/ext/Cite/index.js
@@ -332,6 +332,28 @@
this.cite = cite;
 }
 
+var createReferences = function(doc, about, refsOpts, modifyDp) {
+   var ol = doc.createElement('ol');
+   DU.addAttributes(ol, {
+   class: 'mw-references references',
+   typeof: 'mw:Extension/references',
+   about: about,
+   });
+   var dp = DU.getDataParsoid(ol);
+   if (refsOpts.group) {  // No group for the empty string either
+   dp.group = refsOpts.group;
+   ol.setAttribute('data-mw-group', refsOpts.group);
+   }
+   if (refsOpts.responsive !== null) {
+   // Pass along the `responsive` parameter
+   dp.tmp.responsive = refsOpts.responsive;
+   }
+   if (typeof modifyDp === 'function') {
+   modifyDp(dp);
+   }
+   return ol;
+};
+
 var dummyDoc = domino.createDocument();
 
 /**
@@ -339,11 +361,13 @@
  */
 References.prototype.tokenHandler = function(manager, pipelineOpts, refsTok, 
cb) {
var env = manager.env;
+   var kvs = refsTok.getAttribute('options');
+   var opts = Util.kvToHash(kvs, true);
 
-   // group is the only recognized option?
var refsOpts = Object.assign({
group: null,
-   }, Util.kvToHash(refsTok.getAttribute("options"), true));
+   responsive: null,
+   }, opts);
 
// Assign an about id and intialize the nested refs html
var referencesId = env.newAboutId();
@@ -352,37 +376,23 @@
// token so that the dom post processor can generate
// and emit references at this point in the DOM.
var emitReferencesFragment = function(toks, body) {
-   var ol;
-   if (body) {
-   ol = body.ownerDocument.createElement('ol');
-   DU.migrateChildren(body, ol);
-   } else {
-   ol = dummyDoc.createElement('ol');
+   var doc = body ? body.ownerDocument : dummyDoc;
+   var ol = createReferences(doc, referencesId, refsOpts, 
function(dp) {
+   dp.src = refsTok.getAttribute('source');
+   });
+   if (!body) {
body = dummyDoc.createElement('body');
+   } else {
+   DU.migrateChildren(body, ol);
}
body.appendChild(ol);
-   DU.addAttributes(ol, {
-   'class': 'mw-references references',
-   typeof: 'mw:Extension/references',
-   about: referencesId,
-   });
-   var olProcessor = function(ol) {
-   var dp = DU.getDataParsoid(ol);
-   dp.src = refsTok.getAttribute('source');
-   if (refsOpts.group) {
-   dp.group = refsOpts.group;
-   ol.setAttribute('data-mw-group', 
refsOpts.group);
-   }
-   // Pass along the `responsive` parameter
-   dp.tmp.responsive = refsOpts.responsive;
-   };
cb({
async: false,
tokens: DU.buildDOMFragmentTokens(
manager.env,
refsTok,
body,
-   olProcessor,
+   null,
// The  HTML above is wrapper HTML added on 
and doesn't
// have any DSR on it. We want DSR added to it.
{ aboutId: referencesId, setDSR: true, 
isForeignContent: true }
@@ -612,25 +622,20 @@
var self = this;
 
refsData.refGroups.forEach(function(refsValue, refsGroup) {
-   var ol = doc.createElement('ol');
-   var dp = DU.getDataParsoid(ol);
-   DU.addAttributes(ol, {
-   'class': 'mw-references references',
-   typeof: 'mw:Extension/references',
-   about: env.newAboutId(),
+   var ol = createReferences(doc, env.newAboutId(), {
+   group: refsGroup,
+ 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Rethink responsive references wrappers

2018-01-05 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402455 )

Change subject: Rethink responsive references wrappers
..

Rethink responsive references wrappers

This needs testing with VE and a better description.

Bug: T181408
Change-Id: I2b5c7ff552b3322be74f79a81936c41d58fecabc
---
M lib/ext/Cite/index.js
M lib/wt2html/pp/processors/linter.js
M tests/citeParserTests.txt
3 files changed, 70 insertions(+), 69 deletions(-)


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

diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js
index 0c32c92..12185c2 100644
--- a/lib/ext/Cite/index.js
+++ b/lib/ext/Cite/index.js
@@ -332,17 +332,40 @@
this.cite = cite;
 }
 
-var createReferences = function(doc, about, refsOpts, modifyDp) {
-   var ol = doc.createElement('ol');
-   DU.addAttributes(ol, {
-   class: 'mw-references references',
+var dummyDoc = domino.createDocument();
+
+var createReferences = function(env, body, about, refsOpts, modifyDp) {
+   var doc = body ? body.ownerDocument : dummyDoc;
+
+   var frag = doc.createElement('ol');
+   frag.classList.add('mw-references');
+   frag.classList.add('references');
+
+   if (body) {
+   DU.migrateChildren(body, frag);
+   }
+
+   // Support the `responsive` parameter
+   var rrOpts = env.conf.wiki.responsiveReferences;
+   var responsiveWrap = rrOpts.enabled;
+   if (refsOpts.responsive !== null) {
+   responsiveWrap = refsOpts.responsive !== '0';
+   }
+   if (responsiveWrap) {
+   var div = doc.createElement('div');
+   div.classList.add('mw-references-wrap');
+   div.appendChild(frag);
+   frag = div;
+   }
+
+   DU.addAttributes(frag, {
typeof: 'mw:Extension/references',
about: about,
});
-   var dp = DU.getDataParsoid(ol);
+   var dp = DU.getDataParsoid(frag);
if (refsOpts.group) {  // No group for the empty string either
dp.group = refsOpts.group;
-   ol.setAttribute('data-mw-group', refsOpts.group);
+   frag.setAttribute('data-mw-group', refsOpts.group);
}
if (refsOpts.responsive !== null) {
// Pass along the `responsive` parameter
@@ -351,10 +374,9 @@
if (typeof modifyDp === 'function') {
modifyDp(dp);
}
-   return ol;
-};
 
-var dummyDoc = domino.createDocument();
+   return frag;
+};
 
 /**
  * Sanitize the references tag and convert it into a meta-token
@@ -376,27 +398,20 @@
// token so that the dom post processor can generate
// and emit references at this point in the DOM.
var emitReferencesFragment = function(toks, body) {
-   var doc = body ? body.ownerDocument : dummyDoc;
-   var ol = createReferences(doc, referencesId, refsOpts, 
function(dp) {
+   if (!body) { body = dummyDoc.createElement('body'); }
+   var frag = createReferences(env, body, referencesId, refsOpts, 
function(dp) {
dp.src = refsTok.getAttribute('source');
});
-   if (!body) {
-   body = dummyDoc.createElement('body');
-   } else {
-   DU.migrateChildren(body, ol);
-   }
-   body.appendChild(ol);
+   body.appendChild(frag);
cb({
async: false,
-   tokens: DU.buildDOMFragmentTokens(
-   manager.env,
-   refsTok,
-   body,
-   null,
+   tokens: DU.buildDOMFragmentTokens(env, refsTok, body, 
null, {
+   aboutId: referencesId,
+   isForeignContent: true,
// The  HTML above is wrapper HTML added on 
and doesn't
// have any DSR on it. We want DSR added to it.
-   { aboutId: referencesId, setDSR: true, 
isForeignContent: true }
-   ),
+   setDSR: true,
+   }),
});
};
 
@@ -569,6 +584,17 @@
DU.setDataMw(refsNode, dataMw);
}
 
+   var refGroup = refsData.getRefGroup(group);
+
+   // Deal with responsive warpper
+   if (refsNode.classList.contains('mw-references-wrap')) {
+   var rrOpts = env.conf.wiki.responsiveReferences;
+   if (refGroup && refGroup.refs.length > rrOpts.threshold) {
+   refsNode.classList.add('mw-references-columns');
+   }
+   refsNode = refsNode.firstChild;
+   }
+
 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add semantic tags to license info text

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

Change subject: Add semantic tags to license info text
..


Add semantic tags to license info text

Surround uppercased parts of the text in emphasis or strong importance
tags, and then change the style of those tags to remove their special
font weight or style. In normal browsers, there should be no visible
difference, but other user agents might be able to utilize the
additional semantic information.

Change-Id: Ief505e28fe971da537726afd75238b87204b85dd
---
M includes/specials/SpecialVersion.php
M languages/i18n/en.json
M resources/src/mediawiki.special/mediawiki.special.version.css
3 files changed, 12 insertions(+), 2 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, but someone else must approve



diff --git a/includes/specials/SpecialVersion.php 
b/includes/specials/SpecialVersion.php
index f176b40..1088d72 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -169,7 +169,9 @@
$ret .= '';
$ret .= "__NOTOC__
" . self::getCopyrightAndAuthorList() . "\n
-   " . wfMessage( 'version-license-info' )->text();
+   " . '' .
+   wfMessage( 'version-license-info' )->text() .
+   '';
$ret .= '';
 
return str_replace( "\t\t", '', $ret ) . "\n";
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 301408f..ae34398 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -3806,7 +3806,7 @@
"version-poweredby-others": "others",
"version-poweredby-translators": "translatewiki.net translators",
"version-credits-summary": "We would like to recognize the following 
persons for their contribution to [[Special:Version|MediaWiki]].",
-   "version-license-info": "MediaWiki is free software; you can 
redistribute it and/or modify it under the terms of the GNU General Public 
License as published by the Free Software Foundation; either version 2 of the 
License, or (at your option) any later version.\n\nMediaWiki is distributed in 
the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 
the GNU General Public License for more details.\n\nYou should have received 
[{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU General Public License] 
along with this program; if not, write to the Free Software Foundation, Inc., 
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA or 
[//www.gnu.org/licenses/old-licenses/gpl-2.0.html read it online].",
+   "version-license-info": "MediaWiki is free software; you can 
redistribute it and/or modify it under the terms of the GNU General Public 
License as published by the Free Software Foundation; either version 2 of the 
License, or (at your option) any later version.\n\nMediaWiki is distributed in 
the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 
License for more details.\n\nYou should have received 
[{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU General Public License] 
along with this program; if not, write to the Free Software Foundation, Inc., 
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA or 
[//www.gnu.org/licenses/old-licenses/gpl-2.0.html read it online].",
"version-software": "Installed software",
"version-software-product": "Product",
"version-software-version": "Version",
diff --git a/resources/src/mediawiki.special/mediawiki.special.version.css 
b/resources/src/mediawiki.special/mediawiki.special.version.css
index ebb6b48..acc9f13 100644
--- a/resources/src/mediawiki.special/mediawiki.special.version.css
+++ b/resources/src/mediawiki.special/mediawiki.special.version.css
@@ -24,3 +24,11 @@
-moz-column-width: 18em;
-webkit-column-width: 18em;
 }
+
+.mw-version-license-info strong {
+   font-weight: normal;
+}
+
+.mw-version-license-info em {
+   font-style: normal;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief505e28fe971da537726afd75238b87204b85dd
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Siebrand 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Make swift role more developer-friendly

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

Change subject: Make swift role more developer-friendly
..

Make swift role more developer-friendly

Change-Id: If3dc9d2532ec154772ce9c96282cfc7ed14ce73b
---
M puppet/modules/role/manifests/swift.pp
A puppet/modules/role/templates/swift/VagrantRoleSwift.wiki.erb
2 files changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/53/402453/1

diff --git a/puppet/modules/role/manifests/swift.pp 
b/puppet/modules/role/manifests/swift.pp
index dd84806..dcdb9c5 100644
--- a/puppet/modules/role/manifests/swift.pp
+++ b/puppet/modules/role/manifests/swift.pp
@@ -14,4 +14,19 @@
 site=> $::mediawiki::wiki_name,
 content => template('role/swift/apache2.conf.erb'),
 }
+
+# configuration for debugging with the 'swift' command
+env::var { 'ST_AUTH':
+value => "http://127.0.0.1:${::swift::port}/auth/v1.0;,
+}
+env::var { 'ST_USER':
+value => "${::swift::project}:${::swift::user}",
+}
+env::var { 'ST_KEY':
+value => $::swift::key,
+}
+
+   mediawiki::import::text { 'VagrantRoleSwift':
+content => template('role/swift/VagrantRoleSwift.wiki.erb'),
+}
 }
diff --git a/puppet/modules/role/templates/swift/VagrantRoleSwift.wiki.erb 
b/puppet/modules/role/templates/swift/VagrantRoleSwift.wiki.erb
new file mode 100644
index 000..404ec02
--- /dev/null
+++ b/puppet/modules/role/templates/swift/VagrantRoleSwift.wiki.erb
@@ -0,0 +1,15 @@
+[https://en.wikipedia.org/wiki/OpenStack OpenStack] Swift is a highly 
available, distributed, eventually consistent object/blob store, which 
MediaWiki can use as a storage backend for media files and their derivatives 
(thumbnails, transcodes etc), together with associated headers and metadata.
+
+== Debugging ==
+The swift command-line client can be used for debugging:
+* swift list to list containers ("directories" for different 
types of files, like original vs. thumb vs. deleted)
+* swift list  to see files in a container
+* swift stat   to see data stored for a file
+
+A log of recent operations is in 
/vagrant/logs/swift/object-server.log.
+
+== More information ==
+* [https://docs.openstack.org/swift/latest/ Swift docs]
+* [https://developer.openstack.org/api-ref/object-store/index.html Swift API 
docs]
+* [https://wikitech.wikimedia.org/wiki/Swift Wikimedia instructure docs for 
Swift]
+* 
[https://github.com/wikimedia/mediawiki/blob/master/includes/libs/filebackend/SwiftFileBackend.php
 SwiftFileBackend.php] in MediaWiki

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

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

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


[MediaWiki-commits] [Gerrit] research...wheels[master]: Updates revscoring wheel to 2.1.0 (again)

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

Change subject: Updates revscoring wheel to 2.1.0 (again)
..


Updates revscoring wheel to 2.1.0 (again)

Change-Id: I34a33bcfbcf281f2762939075faab7a2bff96e32
---
D revscoring-2.0.11-py2.py3-none-any.whl
A revscoring-2.1.0-py2.py3-none-any.whl
2 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/revscoring-2.0.11-py2.py3-none-any.whl 
b/revscoring-2.0.11-py2.py3-none-any.whl
deleted file mode 100644
index 45ad993..000
--- a/revscoring-2.0.11-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/revscoring-2.1.0-py2.py3-none-any.whl 
b/revscoring-2.1.0-py2.py3-none-any.whl
new file mode 100644
index 000..86384b5
--- /dev/null
+++ b/revscoring-2.1.0-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I34a33bcfbcf281f2762939075faab7a2bff96e32
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] research...wheels[master]: Updates revscoring wheel to 2.1.0 (again)

2018-01-05 Thread Halfak (Code Review)
Halfak has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402452 )

Change subject: Updates revscoring wheel to 2.1.0 (again)
..

Updates revscoring wheel to 2.1.0 (again)

Change-Id: I34a33bcfbcf281f2762939075faab7a2bff96e32
---
D revscoring-2.0.11-py2.py3-none-any.whl
A revscoring-2.1.0-py2.py3-none-any.whl
2 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels 
refs/changes/52/402452/1

diff --git a/revscoring-2.0.11-py2.py3-none-any.whl 
b/revscoring-2.0.11-py2.py3-none-any.whl
deleted file mode 100644
index 45ad993..000
--- a/revscoring-2.0.11-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/revscoring-2.1.0-py2.py3-none-any.whl 
b/revscoring-2.1.0-py2.py3-none-any.whl
new file mode 100644
index 000..86384b5
--- /dev/null
+++ b/revscoring-2.1.0-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34a33bcfbcf281f2762939075faab7a2bff96e32
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: microsites: create research.wikimedia.org static page

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

Change subject: microsites: create research.wikimedia.org static page
..


microsites: create research.wikimedia.org static page

Create a static HTML landing page for the research team.

Bug: T183916
Change-Id: I96d74f563d518a1b31832eead4b51cb39f2534dd
---
M hieradata/role/common/cache/misc.yaml
M hieradata/role/common/webserver_misc_static.yaml
A modules/profile/manifests/microsites/research.pp
A modules/profile/templates/research/apache-research.wikimedia.org.erb
M modules/role/manifests/webserver_misc_static.pp
5 files changed, 51 insertions(+), 0 deletions(-)

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



diff --git a/hieradata/role/common/cache/misc.yaml 
b/hieradata/role/common/cache/misc.yaml
index 0ad6bf9..3f552b5 100644
--- a/hieradata/role/common/cache/misc.yaml
+++ b/hieradata/role/common/cache/misc.yaml
@@ -256,6 +256,8 @@
 director: 'releases'
   releases-jenkins.wikimedia.org:
 director: 'releases_jenkins'
+  research.wikimedia.org:
+director: 'bromine'
   rt.wikimedia.org:
 director: 'ununpentium'
   scholarships.wikimedia.org:
diff --git a/hieradata/role/common/webserver_misc_static.yaml 
b/hieradata/role/common/webserver_misc_static.yaml
index ff1f796..ae7a7da 100644
--- a/hieradata/role/common/webserver_misc_static.yaml
+++ b/hieradata/role/common/webserver_misc_static.yaml
@@ -1,3 +1,5 @@
 admin::groups:
   - releasers-mediawiki
   - releasers-mobile
+profile::microsites::research::server_name: 'research.wikimedia.org'
+profile::microsites::research::server_admin: 'n...@wikimedia.org'
diff --git a/modules/profile/manifests/microsites/research.pp 
b/modules/profile/manifests/microsites/research.pp
new file mode 100644
index 000..0d4fc0e
--- /dev/null
+++ b/modules/profile/manifests/microsites/research.pp
@@ -0,0 +1,23 @@
+# https://research.wikimedia.org (T183916)
+class profile::microsites::research(
+  $server_name = hiera('profile::microsites::research::server_name'),
+  $server_admin = hiera('profile::microsites::research::server_admin'),
+) {
+
+httpd::site { 'research.wikimedia.org':
+content => 
template('profile/research/apache-research.wikimedia.org.erb'),
+}
+
+ensure_resource('file', '/srv/org', {'ensure' => 'directory' })
+ensure_resource('file', '/srv/org/wikimedia', {'ensure' => 'directory' })
+ensure_resource('file', '/srv/org/wikimedia/research', {'ensure' => 
'directory' })
+
+git::clone { 'research/landing-page':
+ensure=> 'present',
+source=> 'gerrit',
+directory => '/srv/org/wikimedia/research',
+branch=> 'master',
+}
+
+}
+
diff --git 
a/modules/profile/templates/research/apache-research.wikimedia.org.erb 
b/modules/profile/templates/research/apache-research.wikimedia.org.erb
new file mode 100644
index 000..74bafa6
--- /dev/null
+++ b/modules/profile/templates/research/apache-research.wikimedia.org.erb
@@ -0,0 +1,23 @@
+
+ServerName <%= @server_name %>
+ServerAdmin <%= @server_admin %>
+DocumentRoot /srv/org/wikimedia/research
+
+ServerSignature On
+
+LogLevel warn
+ErrorLog /var/log/apache2/<%= @server_name %>.error.log
+CustomLog /var/log/apache2/<%= @server_name %>.access.log wmf
+
+
+Options FollowSymLinks
+AllowOverride None
+
+
+
+Options Indexes FollowSymLinks MultiViews
+AllowOverride None
+Require all granted
+
+
+
diff --git a/modules/role/manifests/webserver_misc_static.pp 
b/modules/role/manifests/webserver_misc_static.pp
index 710bc39..a1ca4e4 100644
--- a/modules/role/manifests/webserver_misc_static.pp
+++ b/modules/role/manifests/webserver_misc_static.pp
@@ -13,5 +13,6 @@
 include ::profile::microsites::static_bugzilla # 
https://static-bugzilla.wikimedia.org
 include ::profile::microsites::transparency# 
https://transparency.wikimedia.org
 include ::profile::microsites::wikibase# https://wikiba.se
+include ::profile::microsites::research# 
https://research.wikimedia.org (T183916)
 
 }

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

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

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


[MediaWiki-commits] [Gerrit] research...wheels[master]: Adds pip back (again)

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

Change subject: Adds pip back (again)
..


Adds pip back (again)

Change-Id: I104d5c17d0819d58016c078f80c8278dd8af06ed
---
A pip-9.0.1-py2.py3-none-any.whl
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/pip-9.0.1-py2.py3-none-any.whl b/pip-9.0.1-py2.py3-none-any.whl
new file mode 100644
index 000..4b8ecc6
--- /dev/null
+++ b/pip-9.0.1-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I104d5c17d0819d58016c078f80c8278dd8af06ed
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] research...wheels[master]: Adds pip back (again)

2018-01-05 Thread Halfak (Code Review)
Halfak has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402451 )

Change subject: Adds pip back (again)
..

Adds pip back (again)

Change-Id: I104d5c17d0819d58016c078f80c8278dd8af06ed
---
A pip-9.0.1-py2.py3-none-any.whl
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels 
refs/changes/51/402451/1

diff --git a/pip-9.0.1-py2.py3-none-any.whl b/pip-9.0.1-py2.py3-none-any.whl
new file mode 100644
index 000..4b8ecc6
--- /dev/null
+++ b/pip-9.0.1-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I104d5c17d0819d58016c078f80c8278dd8af06ed
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 

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


[MediaWiki-commits] [Gerrit] research...wheels[master]: Downgrade to celery 3.1

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

Change subject: Downgrade to celery 3.1
..


Downgrade to celery 3.1

Change-Id: I0d0215c27c3752672c7e4dd34b27545e08e459a6
---
A amqp-1.4.9-py2.py3-none-any.whl
D amqp-2.2.2-py2.py3-none-any.whl
A billiard-3.3.0.23-cp35-none-any.whl
D billiard-3.5.0.3-py3-none-any.whl
A celery-3.1.25-py2.py3-none-any.whl
D celery-4.1.0-py2.py3-none-any.whl
A kombu-3.0.37-py2.py3-none-any.whl
D kombu-4.1.0-py2.py3-none-any.whl
D pip-9.0.1-py2.py3-none-any.whl
A revscoring-2.0.11-py2.py3-none-any.whl
D revscoring-2.1.0-py2.py3-none-any.whl
D vine-1.1.4-py2.py3-none-any.whl
12 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/amqp-1.4.9-py2.py3-none-any.whl b/amqp-1.4.9-py2.py3-none-any.whl
new file mode 100644
index 000..d36c0d9
--- /dev/null
+++ b/amqp-1.4.9-py2.py3-none-any.whl
Binary files differ
diff --git a/amqp-2.2.2-py2.py3-none-any.whl b/amqp-2.2.2-py2.py3-none-any.whl
deleted file mode 100644
index 49b917f..000
--- a/amqp-2.2.2-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/billiard-3.3.0.23-cp35-none-any.whl 
b/billiard-3.3.0.23-cp35-none-any.whl
new file mode 100644
index 000..6ff55e1
--- /dev/null
+++ b/billiard-3.3.0.23-cp35-none-any.whl
Binary files differ
diff --git a/billiard-3.5.0.3-py3-none-any.whl 
b/billiard-3.5.0.3-py3-none-any.whl
deleted file mode 100644
index fedd742..000
--- a/billiard-3.5.0.3-py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/celery-3.1.25-py2.py3-none-any.whl 
b/celery-3.1.25-py2.py3-none-any.whl
new file mode 100644
index 000..a5aa1cd
--- /dev/null
+++ b/celery-3.1.25-py2.py3-none-any.whl
Binary files differ
diff --git a/celery-4.1.0-py2.py3-none-any.whl 
b/celery-4.1.0-py2.py3-none-any.whl
deleted file mode 100644
index 7fcf7a2..000
--- a/celery-4.1.0-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/kombu-3.0.37-py2.py3-none-any.whl 
b/kombu-3.0.37-py2.py3-none-any.whl
new file mode 100644
index 000..6a4a50b
--- /dev/null
+++ b/kombu-3.0.37-py2.py3-none-any.whl
Binary files differ
diff --git a/kombu-4.1.0-py2.py3-none-any.whl b/kombu-4.1.0-py2.py3-none-any.whl
deleted file mode 100644
index f1473e8..000
--- a/kombu-4.1.0-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/pip-9.0.1-py2.py3-none-any.whl b/pip-9.0.1-py2.py3-none-any.whl
deleted file mode 100644
index 4b8ecc6..000
--- a/pip-9.0.1-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/revscoring-2.0.11-py2.py3-none-any.whl 
b/revscoring-2.0.11-py2.py3-none-any.whl
new file mode 100644
index 000..45ad993
--- /dev/null
+++ b/revscoring-2.0.11-py2.py3-none-any.whl
Binary files differ
diff --git a/revscoring-2.1.0-py2.py3-none-any.whl 
b/revscoring-2.1.0-py2.py3-none-any.whl
deleted file mode 100644
index 86384b5..000
--- a/revscoring-2.1.0-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/vine-1.1.4-py2.py3-none-any.whl b/vine-1.1.4-py2.py3-none-any.whl
deleted file mode 100644
index 2b655c1..000
--- a/vine-1.1.4-py2.py3-none-any.whl
+++ /dev/null
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d0215c27c3752672c7e4dd34b27545e08e459a6
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 
Gerrit-Reviewer: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] research...wheels[master]: Downgrade to celery 3.1

2018-01-05 Thread Halfak (Code Review)
Halfak has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402450 )

Change subject: Downgrade to celery 3.1
..

Downgrade to celery 3.1

Change-Id: I0d0215c27c3752672c7e4dd34b27545e08e459a6
---
A amqp-1.4.9-py2.py3-none-any.whl
D amqp-2.2.2-py2.py3-none-any.whl
A billiard-3.3.0.23-cp35-none-any.whl
D billiard-3.5.0.3-py3-none-any.whl
A celery-3.1.25-py2.py3-none-any.whl
D celery-4.1.0-py2.py3-none-any.whl
A kombu-3.0.37-py2.py3-none-any.whl
D kombu-4.1.0-py2.py3-none-any.whl
D pip-9.0.1-py2.py3-none-any.whl
A revscoring-2.0.11-py2.py3-none-any.whl
D revscoring-2.1.0-py2.py3-none-any.whl
D vine-1.1.4-py2.py3-none-any.whl
12 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels 
refs/changes/50/402450/1

diff --git a/amqp-1.4.9-py2.py3-none-any.whl b/amqp-1.4.9-py2.py3-none-any.whl
new file mode 100644
index 000..d36c0d9
--- /dev/null
+++ b/amqp-1.4.9-py2.py3-none-any.whl
Binary files differ
diff --git a/amqp-2.2.2-py2.py3-none-any.whl b/amqp-2.2.2-py2.py3-none-any.whl
deleted file mode 100644
index 49b917f..000
--- a/amqp-2.2.2-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/billiard-3.3.0.23-cp35-none-any.whl 
b/billiard-3.3.0.23-cp35-none-any.whl
new file mode 100644
index 000..6ff55e1
--- /dev/null
+++ b/billiard-3.3.0.23-cp35-none-any.whl
Binary files differ
diff --git a/billiard-3.5.0.3-py3-none-any.whl 
b/billiard-3.5.0.3-py3-none-any.whl
deleted file mode 100644
index fedd742..000
--- a/billiard-3.5.0.3-py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/celery-3.1.25-py2.py3-none-any.whl 
b/celery-3.1.25-py2.py3-none-any.whl
new file mode 100644
index 000..a5aa1cd
--- /dev/null
+++ b/celery-3.1.25-py2.py3-none-any.whl
Binary files differ
diff --git a/celery-4.1.0-py2.py3-none-any.whl 
b/celery-4.1.0-py2.py3-none-any.whl
deleted file mode 100644
index 7fcf7a2..000
--- a/celery-4.1.0-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/kombu-3.0.37-py2.py3-none-any.whl 
b/kombu-3.0.37-py2.py3-none-any.whl
new file mode 100644
index 000..6a4a50b
--- /dev/null
+++ b/kombu-3.0.37-py2.py3-none-any.whl
Binary files differ
diff --git a/kombu-4.1.0-py2.py3-none-any.whl b/kombu-4.1.0-py2.py3-none-any.whl
deleted file mode 100644
index f1473e8..000
--- a/kombu-4.1.0-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/pip-9.0.1-py2.py3-none-any.whl b/pip-9.0.1-py2.py3-none-any.whl
deleted file mode 100644
index 4b8ecc6..000
--- a/pip-9.0.1-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/revscoring-2.0.11-py2.py3-none-any.whl 
b/revscoring-2.0.11-py2.py3-none-any.whl
new file mode 100644
index 000..45ad993
--- /dev/null
+++ b/revscoring-2.0.11-py2.py3-none-any.whl
Binary files differ
diff --git a/revscoring-2.1.0-py2.py3-none-any.whl 
b/revscoring-2.1.0-py2.py3-none-any.whl
deleted file mode 100644
index 86384b5..000
--- a/revscoring-2.1.0-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/vine-1.1.4-py2.py3-none-any.whl b/vine-1.1.4-py2.py3-none-any.whl
deleted file mode 100644
index 2b655c1..000
--- a/vine-1.1.4-py2.py3-none-any.whl
+++ /dev/null
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d0215c27c3752672c7e4dd34b27545e08e459a6
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Releases: Include all contint PHP packages

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

Change subject: Releases: Include all contint PHP packages
..


Releases: Include all contint PHP packages

Right now I'm missing php-mbstring, but continuing to
install these one by one is just a game of whack-a-mole.

Install all of them.

Change-Id: Id777364fa468d8eec73320a539056fe3f834a49f
---
M modules/profile/manifests/releases/mediawiki.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/profile/manifests/releases/mediawiki.pp 
b/modules/profile/manifests/releases/mediawiki.pp
index 525689a..2c49f70 100644
--- a/modules/profile/manifests/releases/mediawiki.pp
+++ b/modules/profile/manifests/releases/mediawiki.pp
@@ -24,6 +24,7 @@
 }
 
 class { '::contint::composer': }
+class { '::contint::packages::php': }
 
 class { '::apache::mod::rewrite': }
 class { '::apache::mod::headers': }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Improve ConstraintParameterParserTest function names

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

Change subject: Improve ConstraintParameterParserTest function names
..


Improve ConstraintParameterParserTest function names

The pattern of all the test functions here is “test”, then the name of
the function under test (“parse*Parameter”), and then optionally some
kind of qualifying detail. To improve readability of these names, add
underscores between the name of the tested function and the details, and
within some of the details as well.

Change-Id: I2a74c79265fae1286a5e7f2eee2108e6d59e4cf2
---
M tests/phpunit/Helper/ConstraintParameterParserTest.php
1 file changed, 52 insertions(+), 52 deletions(-)

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



diff --git a/tests/phpunit/Helper/ConstraintParameterParserTest.php 
b/tests/phpunit/Helper/ConstraintParameterParserTest.php
index 42bd87a..1d783c0 100644
--- a/tests/phpunit/Helper/ConstraintParameterParserTest.php
+++ b/tests/phpunit/Helper/ConstraintParameterParserTest.php
@@ -107,7 +107,7 @@
$this->assertEquals( [ 'Q100', 'Q101' ], $parsed );
}
 
-   public function testParseClassParameterMissing() {
+   public function testParseClassParameter_Missing() {
$this->assertThrowsConstraintParameterException(
'parseClassParameter',
[ [], 'constraint' ],
@@ -115,7 +115,7 @@
);
}
 
-   public function testParseClassParameterNoValue() {
+   public function testParseClassParameter_NoValue() {
$config = $this->getDefaultConfig();
$classId = $config->get( 'WBQualityConstraintsClassId' );
$this->assertThrowsConstraintParameterException(
@@ -132,7 +132,7 @@
);
}
 
-   public function testParseClassParameterStringValue() {
+   public function testParseClassParameter_StringValue() {
$config = $this->getDefaultConfig();
$classId = $config->get( 'WBQualityConstraintsClassId' );
$this->assertThrowsConstraintParameterException(
@@ -163,7 +163,7 @@
$this->assertEquals( 'instance', $parsed );
}
 
-   public function testParseRelationParameterMissing() {
+   public function testParseRelationParameter_Missing() {
$this->assertThrowsConstraintParameterException(
'parseRelationParameter',
[ [], 'constraint' ],
@@ -171,7 +171,7 @@
);
}
 
-   public function testParseRelationParameterNoValue() {
+   public function testParseRelationParameter_NoValue() {
$config = $this->getDefaultConfig();
$relationId = $config->get( 'WBQualityConstraintsRelationId' );
$this->assertThrowsConstraintParameterException(
@@ -188,7 +188,7 @@
);
}
 
-   public function testParseRelationParameterStringValue() {
+   public function testParseRelationParameter_StringValue() {
$config = $this->getDefaultConfig();
$relationId = $config->get( 'WBQualityConstraintsRelationId' );
$this->assertThrowsConstraintParameterException(
@@ -208,7 +208,7 @@
);
}
 
-   public function testParseRelationParameterMultiValue() {
+   public function testParseRelationParameter_MultiValue() {
$config = $this->getDefaultConfig();
$relationId = $config->get( 'WBQualityConstraintsRelationId' );
$instanceOfId = $config->get( 
'WBQualityConstraintsInstanceOfRelationId' );
@@ -228,7 +228,7 @@
);
}
 
-   public function testParseRelationParameterWrongValue() {
+   public function testParseRelationParameter_WrongValue() {
$config = $this->getDefaultConfig();
$relationId = $config->get( 'WBQualityConstraintsRelationId' );
$this->assertThrowsConstraintParameterException(
@@ -253,7 +253,7 @@
$this->assertEquals( new PropertyId( 'P100' ), $parsed );
}
 
-   public function testParsePropertyParameterMissing() {
+   public function testParsePropertyParameter_Missing() {
$this->assertThrowsConstraintParameterException(
'parsePropertyParameter',
[ [], 'constraint' ],
@@ -261,7 +261,7 @@
);
}
 
-   public function testParsePropertyParameterNoValue() {
+   public function testParsePropertyParameter_NoValue() {
$config = $this->getDefaultConfig();
$propertyId = $config->get( 'WBQualityConstraintsPropertyId' );
$this->assertThrowsConstraintParameterException(
@@ -278,7 +278,7 @@
);
}
 
-   

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Move test request from enwiki beta to testwiki

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

Change subject: Hygiene: Move test request from enwiki beta to testwiki
..

Hygiene: Move test request from enwiki beta to testwiki

We should only test against the Beta Cluster when we specifically mean
to test the beta cluster. This also makes it easier to test Parsoid
locally.

Change-Id: I37b90a5d77606fba1426ebb5b2456112b2efbe52
---
M test/features/summary/pagecontent.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/test/features/summary/pagecontent.js 
b/test/features/summary/pagecontent.js
index 82a6cd8..69d5d2e 100644
--- a/test/features/summary/pagecontent.js
+++ b/test/features/summary/pagecontent.js
@@ -36,7 +36,7 @@
 });
 
 it('empty summary (not 204) should be sent for empty page', () => {
-const uri = localUri('PreviewsEmpty%2Fsandbox', 
'en.wikipedia.beta.wmflabs.org');
+const uri = localUri('Empty', 'test.wikipedia.org');
 return preq.get({ uri })
 .then((res) => {
 assert.deepEqual(res.status, 200);

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

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

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


[MediaWiki-commits] [Gerrit] research...wheels[master]: Adds back the pip wheel.

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

Change subject: Adds back the pip wheel.
..


Adds back the pip wheel.

Change-Id: I3304766cf0b85bfec442958a569ddb78231ba136
---
A pip-9.0.1-py2.py3-none-any.whl
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/pip-9.0.1-py2.py3-none-any.whl b/pip-9.0.1-py2.py3-none-any.whl
new file mode 100644
index 000..4b8ecc6
--- /dev/null
+++ b/pip-9.0.1-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3304766cf0b85bfec442958a569ddb78231ba136
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] research...wheels[master]: Adds back the pip wheel.

2018-01-05 Thread Halfak (Code Review)
Halfak has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402448 )

Change subject: Adds back the pip wheel.
..

Adds back the pip wheel.

Change-Id: I3304766cf0b85bfec442958a569ddb78231ba136
---
A pip-9.0.1-py2.py3-none-any.whl
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels 
refs/changes/48/402448/1

diff --git a/pip-9.0.1-py2.py3-none-any.whl b/pip-9.0.1-py2.py3-none-any.whl
new file mode 100644
index 000..4b8ecc6
--- /dev/null
+++ b/pip-9.0.1-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3304766cf0b85bfec442958a569ddb78231ba136
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 

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


[MediaWiki-commits] [Gerrit] operations...scap[master]: add explicit name of dumps key id for scap

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

Change subject: add explicit name of dumps key id for scap
..


add explicit name of dumps key id for scap

Change-Id: I4224f3e7c16eeed75b97ace9e3465f64361f685c
---
M scap.cfg
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Thcipriani: Looks good to me, but someone else must approve
  ArielGlenn: Verified; Looks good to me, approved



diff --git a/scap.cfg b/scap.cfg
index ac1f466..86373e1 100644
--- a/scap.cfg
+++ b/scap.cfg
@@ -6,3 +6,4 @@
 
 [deployment-prep.eqiad.wmflabs]
 dsh_targets: dumps_targets_betacluster
+keyholder_key: dumpsdeploy

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4224f3e7c16eeed75b97ace9e3465f64361f685c
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps/scap
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Thcipriani 

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


[MediaWiki-commits] [Gerrit] operations...scap[master]: add explicit name of dumps key id for scap

2018-01-05 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402447 )

Change subject: add explicit name of dumps key id for scap
..

add explicit name of dumps key id for scap

Change-Id: I4224f3e7c16eeed75b97ace9e3465f64361f685c
---
M scap.cfg
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/scap 
refs/changes/47/402447/1

diff --git a/scap.cfg b/scap.cfg
index ac1f466..86373e1 100644
--- a/scap.cfg
+++ b/scap.cfg
@@ -6,3 +6,4 @@
 
 [deployment-prep.eqiad.wmflabs]
 dsh_targets: dumps_targets_betacluster
+keyholder_key: dumpsdeploy

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4224f3e7c16eeed75b97ace9e3465f64361f685c
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps/scap
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] mediawiki...cookiecutter-library[master]: Add minus-x to bootstrap

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

Change subject: Add minus-x to bootstrap
..


Add minus-x to bootstrap

Change-Id: Iff4a5a801c6bb101964bc47c06483d460f836793
---
M hooks/post_gen_project.py
M {{ cookiecutter.library_name }}/composer.json
2 files changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py
index 2599471..04fe5e3 100644
--- a/hooks/post_gen_project.py
+++ b/hooks/post_gen_project.py
@@ -26,6 +26,7 @@
 'jakub-onderka/php-parallel-lint': '0.9.2',
 'jakub-onderka/php-console-highlighter': '0.3.2',
 'mediawiki/mediawiki-codesniffer': '13.0.0',
+'mediawiki/minus-x': '0.2.1',
 'phpunit/phpunit': '4.8.36',
 }
 
diff --git "a/\173\173 cookiecutter.library_name \175\175/composer.json" 
"b/\173\173 cookiecutter.library_name \175\175/composer.json"
index 4226881..8859b3e 100644
--- "a/\173\173 cookiecutter.library_name \175\175/composer.json"
+++ "b/\173\173 cookiecutter.library_name \175\175/composer.json"
@@ -22,10 +22,12 @@
"test": [
"parallel-lint . --exclude vendor",
"phpunit",
-   "phpcs -sp"
+   "phpcs -sp",
+   "minus-x check ."
],
"fix": [
-   "phpcbf"
+   "phpcbf",
+   "minus-x fix ."
]
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...cookiecutter-library[master]: Add minus-x to bootstrap

2018-01-05 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402446 )

Change subject: Add minus-x to bootstrap
..

Add minus-x to bootstrap

Change-Id: Iff4a5a801c6bb101964bc47c06483d460f836793
---
M hooks/post_gen_project.py
M {{ cookiecutter.library_name }}/composer.json
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/tools/cookiecutter-library 
refs/changes/46/402446/1

diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py
index 2599471..04fe5e3 100644
--- a/hooks/post_gen_project.py
+++ b/hooks/post_gen_project.py
@@ -26,6 +26,7 @@
 'jakub-onderka/php-parallel-lint': '0.9.2',
 'jakub-onderka/php-console-highlighter': '0.3.2',
 'mediawiki/mediawiki-codesniffer': '13.0.0',
+'mediawiki/minus-x': '0.2.1',
 'phpunit/phpunit': '4.8.36',
 }
 
diff --git "a/\173\173 cookiecutter.library_name \175\175/composer.json" 
"b/\173\173 cookiecutter.library_name \175\175/composer.json"
index 4226881..8859b3e 100644
--- "a/\173\173 cookiecutter.library_name \175\175/composer.json"
+++ "b/\173\173 cookiecutter.library_name \175\175/composer.json"
@@ -22,10 +22,12 @@
"test": [
"parallel-lint . --exclude vendor",
"phpunit",
-   "phpcs -sp"
+   "phpcs -sp",
+   "minus-x check ."
],
"fix": [
-   "phpcbf"
+   "phpcbf",
+   "minus-x fix ."
]
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff4a5a801c6bb101964bc47c06483d460f836793
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/cookiecutter-library
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add test2wiki as a group1 wiki

2018-01-05 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402445 )

Change subject: Add test2wiki as a group1 wiki
..

Add test2wiki as a group1 wiki

Right now, it's on group2 which was not what I intended

Change-Id: Ife1077862e7753fc6583a9dad3ee83032043dd2e
---
M dblists/group1-wikipedia.dblist
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/dblists/group1-wikipedia.dblist b/dblists/group1-wikipedia.dblist
index 2f6144e..e1189a7 100644
--- a/dblists/group1-wikipedia.dblist
+++ b/dblists/group1-wikipedia.dblist
@@ -1,2 +1,3 @@
 cawiki
 hewiki
+test2wiki

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: network::constants: add fake CACHE_MISC for labs

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

Change subject: network::constants: add fake CACHE_MISC for labs
..


network::constants: add fake CACHE_MISC for labs

The CACHE_MISC variable doesn't exist in labs but we use it in
ferm rules all over the place now.

This means that none of the roles for services behind misc-web
can be used/tested on labs.

It will simply fail for not finding this variable.

Add it in the labs section and use
novaproxy-01.project-proxy.eqiad.wmflabs
since that is the closest thing to misc-varnish in prod.

Change-Id: I1b119c9170f9d709fb652976868e96816f6c46dc
---
M modules/network/manifests/constants.pp
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/modules/network/manifests/constants.pp 
b/modules/network/manifests/constants.pp
index 4be6e71..efe5506 100644
--- a/modules/network/manifests/constants.pp
+++ b/modules/network/manifests/constants.pp
@@ -217,6 +217,9 @@
 '208.80.155.120',   # 
labpuppetmaster1002.wikimedia.org
 '2620:0:861:4:208:80:155:120',  # 
labpuppetmaster1002.wikimedia.org
 ],
+'cache_misc' => [ # So that roles with CACHE_MISC in ferm rules 
can be used in labs
+'10.68.21.68', # novaproxy-01.project-proxy.eqiad.wmflabs
+],
 }
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceUserPreferences[master]: Fix tests by using composer to install BlueSpiceFoundation

2018-01-05 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402443 )

Change subject: Fix tests by using composer to install BlueSpiceFoundation
..

Fix tests by using composer to install BlueSpiceFoundation

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e635ff4f11d8a6130efd0bc58684c1c126ea3e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceUserPreferences
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: [WIP] Shows an option dialog when logging out

2018-01-05 Thread Cooltey (Code Review)
Cooltey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402444 )

Change subject: [WIP] Shows an option dialog when logging out
..

[WIP] Shows an option dialog when logging out

 - Waiting for the Integrate with Reading List service patch

Bug: T183607
Change-Id: I850fa13adb6bd959f6cf07b0b50da05a66e8851a
---
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
3 files changed, 39 insertions(+), 1 deletion(-)


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

diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index 1c9b4e7..33f21f5 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -1,5 +1,6 @@
 package org.wikipedia.feed;
 
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.net.Uri;
 import android.os.Bundle;
@@ -10,6 +11,7 @@
 import android.support.v4.app.ActivityOptionsCompat;
 import android.support.v4.app.Fragment;
 import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v7.app.AlertDialog;
 import android.support.v7.widget.RecyclerView;
 import android.view.LayoutInflater;
 import android.view.Menu;
@@ -41,6 +43,8 @@
 import org.wikipedia.offline.LocalCompilationsActivity;
 import org.wikipedia.offline.OfflineTutorialActivity;
 import org.wikipedia.random.RandomActivity;
+import org.wikipedia.readinglist.database.ReadingList;
+import org.wikipedia.readinglist.database.ReadingListDbHelper;
 import org.wikipedia.settings.Prefs;
 import org.wikipedia.settings.SettingsActivity;
 import org.wikipedia.util.DeviceUtil;
@@ -49,6 +53,8 @@
 import org.wikipedia.util.ThrowableUtil;
 import org.wikipedia.util.UriUtil;
 import org.wikipedia.views.ExploreOverflowView;
+
+import java.util.List;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
@@ -534,6 +540,30 @@
 overflowView.show(anchor, overflowCallback);
 }
 
+private void showSyncOptionDialogWhenLogout() {
+new AlertDialog.Builder(getActivity())
+
.setTitle(R.string.reading_list_logout_option_reminder_dialog_title)
+
.setMessage(R.string.reading_list_logout_option_reminder_dialog_text)
+
.setPositiveButton(R.string.reading_list_logout_option_reminder_dialog_yes,
+(DialogInterface dialogInterface, int i) -> 
dialogInterface.dismiss())
+
.setNegativeButton(R.string.reading_list_logout_option_reminder_dialog_no,
+(DialogInterface dialogInterface, int i) -> {
+dialogInterface.dismiss();
+
+// removes all articles including default list
+List lists = 
ReadingListDbHelper.instance().getAllLists();
+for (ReadingList list : lists) {
+ReadingListDbHelper.instance().deleteList(list);
+
ReadingListDbHelper.instance().markPagesForDeletion(list.pages());
+}
+
+// creates an empty default list
+ReadingListDbHelper.instance().createList("", 
getString(R.string.default_reading_list_description));
+})
+.setOnDismissListener((DialogInterface dialog) -> 
FeedbackUtil.showMessage(FeedFragment.this, R.string.toast_logout_complete))
+.show();
+}
+
 private class OverflowCallback implements ExploreOverflowView.Callback {
 @Override
 public void loginClick() {
@@ -564,7 +594,7 @@
 @Override
 public void logoutClick() {
 WikipediaApp.getInstance().logOut();
-FeedbackUtil.showMessage(FeedFragment.this, 
R.string.toast_logout_complete);
+showSyncOptionDialogWhenLogout();
 }
 
 @Override
diff --git a/app/src/main/res/values-qq/strings.xml 
b/app/src/main/res/values-qq/strings.xml
index 7b992e6..b19a225 100644
--- a/app/src/main/res/values-qq/strings.xml
+++ b/app/src/main/res/values-qq/strings.xml
@@ -362,6 +362,10 @@
   Message shown when the 
article is in the process of being downloaded, and is not yet available for 
offline access.
   Message shown to the 
user when the user tries to add pages to a reading list but the list already 
contains all of the chosen pages.
   Message shown when 
the user adds articles to a named reading list.  The %1$d symbol is replaced 
with the number of articles added, and the %2$s symbol is replaced with the 
list name.
+  Title of 
warning message shown to a user to keep articles after the user logs 
out
+  Warning 
message shown to a user to keep articles after the user logs out
+  >Affirmative 
answer to confirm that keeps articles from 

[MediaWiki-commits] [Gerrit] research...wheels[master]: Rebuilds wheels using Debian Stretch

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

Change subject: Rebuilds wheels using Debian Stretch
..


Rebuilds wheels using Debian Stretch

Bug: T184135
Change-Id: I7424733b19e05f1f1d03666b4be8bb9a9531c31e
---
R Flask-0.10.1-cp35-none-any.whl
A Flask_Jsonpify-1.5.0-cp35-none-any.whl
D Flask_Jsonpify-1.5.0-py3-none-any.whl
A Jinja2-2.10-py2.py3-none-any.whl
D Jinja2-2.9.6-py2.py3-none-any.whl
D MarkupSafe-1.0-cp34-cp34m-linux_x86_64.whl
A MarkupSafe-1.0-cp35-cp35m-linux_x86_64.whl
R PyYAML-3.11-cp35-cp35m-linux_x86_64.whl
D Werkzeug-0.12.2-py2.py3-none-any.whl
A Werkzeug-0.14.1-py2.py3-none-any.whl
D amqp-1.4.9-py2.py3-none-any.whl
A amqp-2.2.2-py2.py3-none-any.whl
A anyjson-0.3.3-cp35-none-any.whl
D anyjson-0.3.3-py3-none-any.whl
D billiard-3.3.0.23-py3-none-any.whl
A billiard-3.5.0.3-py3-none-any.whl
D celery-3.1.25-py2.py3-none-any.whl
A celery-4.1.0-py2.py3-none-any.whl
A certifi-2017.11.5-py2.py3-none-any.whl
D certifi-2017.7.27.1-py2.py3-none-any.whl
M docopt-0.6.2-py2.py3-none-any.whl
A docutils-0.14-py3-none-any.whl
R itsdangerous-0.24-cp35-none-any.whl
A json2tsv-0.1.2-py2.py3-none-any.whl
D kombu-3.0.37-py2.py3-none-any.whl
A kombu-4.1.0-py2.py3-none-any.whl
D mmh3-2.3.1-cp34-cp34m-linux_x86_64.whl
A mmh3-2.3.1-cp35-cp35m-linux_x86_64.whl
R more_itertools-2.2-cp35-none-any.whl
A mwbase-0.0.6-py3-none-any.whl
D mwparserfromhell-0.4.4-cp34-cp34m-linux_x86_64.whl
A mwparserfromhell-0.4.4-cp35-cp35m-linux_x86_64.whl
A mwreverts-0.0.6-py2.py3-none-any.whl
D mwreverts-0.1.5-py2.py3-none-any.whl
D mysqltsv-0.0.7-cp34-none-any.whl
A mysqltsv-0.0.7-cp35-none-any.whl
R nltk-3.0.5-cp35-none-any.whl
D nose-1.3.7-py3-none-any.whl
R numpy-1.10.4-cp35-cp35m-manylinux1_x86_64.whl
A para-0.0.5-cp35-none-any.whl
D para-0.0.6-py3-none-any.whl
D pip-9.0.1-py2.py3-none-any.whl
A py-1.5.2-py2.py3-none-any.whl
R pyenchant-1.6.11-cp35-none-any.whl
A pytest-3.2.5-py2.py3-none-any.whl
D revscoring-2.0.10-py2.py3-none-any.whl
A revscoring-2.1.0-py2.py3-none-any.whl
D scikit_learn-0.17.1-cp34-cp34m-manylinux1_x86_64.whl
A scikit_learn-0.17.1-cp35-cp35m-manylinux1_x86_64.whl
D scipy-0.17.1-cp34-cp34m-manylinux1_x86_64.whl
A scipy-0.17.1-cp35-cp35m-manylinux1_x86_64.whl
A socketIO_client-0.5.6-cp35-none-any.whl
A sseclient-0.0.18-cp35-none-any.whl
D sseclient-0.0.18-py3-none-any.whl
A statistics-1.0.3.5-cp35-none-any.whl
D statsd-3.2.1-py2.py3-none-any.whl
A statsd-3.2.2-py2.py3-none-any.whl
A stopit-1.1.1-cp35-none-any.whl
D stopit-1.1.1-py3-none-any.whl
R textstat-0.3.1-cp35-none-any.whl
A vine-1.1.4-py2.py3-none-any.whl
A websocket_client-0.46.0-py2.py3-none-any.whl
62 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/Flask-0.10.1-py3-none-any.whl b/Flask-0.10.1-cp35-none-any.whl
similarity index 93%
rename from Flask-0.10.1-py3-none-any.whl
rename to Flask-0.10.1-cp35-none-any.whl
index 12109b9..b8e0ef5 100644
--- a/Flask-0.10.1-py3-none-any.whl
+++ b/Flask-0.10.1-cp35-none-any.whl
Binary files differ
diff --git a/Flask_Jsonpify-1.5.0-cp35-none-any.whl 
b/Flask_Jsonpify-1.5.0-cp35-none-any.whl
new file mode 100644
index 000..d4784b4
--- /dev/null
+++ b/Flask_Jsonpify-1.5.0-cp35-none-any.whl
Binary files differ
diff --git a/Flask_Jsonpify-1.5.0-py3-none-any.whl 
b/Flask_Jsonpify-1.5.0-py3-none-any.whl
deleted file mode 100644
index de8c6bb..000
--- a/Flask_Jsonpify-1.5.0-py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/Jinja2-2.10-py2.py3-none-any.whl b/Jinja2-2.10-py2.py3-none-any.whl
new file mode 100644
index 000..7bc4e35
--- /dev/null
+++ b/Jinja2-2.10-py2.py3-none-any.whl
Binary files differ
diff --git a/Jinja2-2.9.6-py2.py3-none-any.whl 
b/Jinja2-2.9.6-py2.py3-none-any.whl
deleted file mode 100644
index 9fb201e..000
--- a/Jinja2-2.9.6-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/MarkupSafe-1.0-cp34-cp34m-linux_x86_64.whl 
b/MarkupSafe-1.0-cp34-cp34m-linux_x86_64.whl
deleted file mode 100644
index ed26616..000
--- a/MarkupSafe-1.0-cp34-cp34m-linux_x86_64.whl
+++ /dev/null
Binary files differ
diff --git a/MarkupSafe-1.0-cp35-cp35m-linux_x86_64.whl 
b/MarkupSafe-1.0-cp35-cp35m-linux_x86_64.whl
new file mode 100644
index 000..7041c1b
--- /dev/null
+++ b/MarkupSafe-1.0-cp35-cp35m-linux_x86_64.whl
Binary files differ
diff --git a/PyYAML-3.11-cp34-cp34m-linux_x86_64.whl 
b/PyYAML-3.11-cp35-cp35m-linux_x86_64.whl
similarity index 87%
rename from PyYAML-3.11-cp34-cp34m-linux_x86_64.whl
rename to PyYAML-3.11-cp35-cp35m-linux_x86_64.whl
index 5f249f6..bc62a30 100644
--- a/PyYAML-3.11-cp34-cp34m-linux_x86_64.whl
+++ b/PyYAML-3.11-cp35-cp35m-linux_x86_64.whl
Binary files differ
diff --git a/Werkzeug-0.12.2-py2.py3-none-any.whl 
b/Werkzeug-0.12.2-py2.py3-none-any.whl
deleted file mode 100644
index 9a81bf8..000
--- a/Werkzeug-0.12.2-py2.py3-none-any.whl
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: WIP: finish promisifying AttributeExpander

2018-01-05 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402442 )

Change subject: WIP: finish promisifying AttributeExpander
..

WIP: finish promisifying AttributeExpander

Change-Id: I1281d3865044fb6559fe2bf2d7d4a643fdf31dd2
---
M lib/wt2html/tt/AttributeExpander.js
M lib/wt2html/tt/TemplateHandler.js
2 files changed, 14 insertions(+), 16 deletions(-)


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

diff --git a/lib/wt2html/tt/AttributeExpander.js 
b/lib/wt2html/tt/AttributeExpander.js
index fa16784..0e5df4e 100644
--- a/lib/wt2html/tt/AttributeExpander.js
+++ b/lib/wt2html/tt/AttributeExpander.js
@@ -181,7 +181,7 @@
 
if (!this.options.standalone) {
// XXX: only register for tag tokens?
-   this.manager.addTransform(this.onToken.bind(this),
+   this.manager.addTransformP(this, this.onToken,
'AttributeExpander:onToken', this.rank, 'any');
}
 };
@@ -198,7 +198,7 @@
  * @param {Frame} frame -- unused here, passed in by AsyncTTM to all handlers
  * @param {Function} cb -- callback receiving the expanded token
  */
-AttributeExpander.prototype.onToken = function(token, frame, cb) {
+AttributeExpander.prototype.onToken = Promise.async(function *(token, frame) {
// console.warn( 'AttributeExpander.onToken: ', JSON.stringify( token ) 
);
if ((token.constructor === TagTk || token.constructor === 
SelfclosingTagTk) &&
// Do not process dom-fragment tokens: a separate handler deals 
with them.
@@ -207,21 +207,19 @@
(token.name !== 'meta' ||

!/mw:(TSRMarker|Placeholder|Transclusion|Param|Includes|Extension\/ref\/Marker)/.test(token.getAttribute('typeof')))
) {
-   cb({ async: true });
-   var self = this;
-   (new AttributeTransformManager(
-   this.manager,
-   { wrapTemplates: this.options.wrapTemplates },
-   function(expandedAttrs) {
-   self._returnAttributes(token, 
expandedAttrs).then(function(t) {
-   cb(t);
-   });
-   }
-   )).process(token.attribs);
+   var expandedAttrs = yield new Promise(function(resolve, reject) 
{
+   // XXX this could be refactored better, I bet.
+   (new AttributeTransformManager(
+   this.manager,
+   { wrapTemplates: this.options.wrapTemplates },
+   function cb(v) { resolve(v); }
+   )).process(token.attribs);
+   });
+   return this._returnAttributes(token, expandedAttrs);
} else {
-   cb({ tokens: [token] });
+   return { tokens: [token] };
}
-};
+});
 
 /**
  * Callback for attribute expansion in AttributeTransformManager
diff --git a/lib/wt2html/tt/TemplateHandler.js 
b/lib/wt2html/tt/TemplateHandler.js
index f8093a9..30d47a0 100644
--- a/lib/wt2html/tt/TemplateHandler.js
+++ b/lib/wt2html/tt/TemplateHandler.js
@@ -77,7 +77,7 @@
if (hasTemplateToken(token.attribs[0].k)) {
cb({ async: true });
var th = this;
-   this.ae.onToken(token, frame, function(ret) {
+   this.ae.onToken(token, frame).then(function(ret) {
if (ret.tokens) {
// Force reprocessing of the token by demoting 
its rank.
//

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1281d3865044fb6559fe2bf2d7d4a643fdf31dd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Promisify AttributeExpander transformation.

2018-01-05 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402441 )

Change subject: Promisify AttributeExpander transformation.
..

Promisify AttributeExpander transformation.

Change-Id: Iad2b9e2510b1013b48e3ab02e583f09578f82d2a
Depends-On: I78be0965fac6df9a58e5851a1deeccfa53e3
Depends-On: If175d8e4cff38e8de59a5636ab1f1d9da44c7460
---
M lib/wt2html/tt/AttributeExpander.js
1 file changed, 49 insertions(+), 46 deletions(-)


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

diff --git a/lib/wt2html/tt/AttributeExpander.js 
b/lib/wt2html/tt/AttributeExpander.js
index 9a76502..fa16784 100644
--- a/lib/wt2html/tt/AttributeExpander.js
+++ b/lib/wt2html/tt/AttributeExpander.js
@@ -5,11 +5,13 @@
 'use strict';
 
 var coreutil = require('util');
-var Util = require('../../utils/Util.js').Util;
-var TokenHandler = require('./TokenHandler.js');
+var defines = require('../parser.defines.js');
+
 var AttributeTransformManager = 
require('../TokenTransformManager.js').AttributeTransformManager;
 var PegTokenizer = require('../tokenizer.js').PegTokenizer;
-var defines = require('../parser.defines.js');
+var Promise = require('../../utils/promise.js');
+var TokenHandler = require('./TokenHandler.js');
+var Util = require('../../utils/Util.js').Util;
 
 // define some constructor shortcuts
 var NlTk = defines.NlTk;
@@ -206,10 +208,15 @@

!/mw:(TSRMarker|Placeholder|Transclusion|Param|Includes|Extension\/ref\/Marker)/.test(token.getAttribute('typeof')))
) {
cb({ async: true });
+   var self = this;
(new AttributeTransformManager(
this.manager,
{ wrapTemplates: this.options.wrapTemplates },
-   this._returnAttributes.bind(this, token, cb)
+   function(expandedAttrs) {
+   self._returnAttributes(token, 
expandedAttrs).then(function(t) {
+   cb(t);
+   });
+   }
)).process(token.attribs);
} else {
cb({ tokens: [token] });
@@ -221,7 +228,7 @@
  *
  * @private
  */
-AttributeExpander.prototype._returnAttributes = function(token, cb, 
expandedAttrs) {
+AttributeExpander.prototype._returnAttributes = Promise.async(function 
*(token, expandedAttrs) {
// SSS FIXME: This is mostly useless.
//
// wrapTemplates will always be true for all tokens from the top-level
@@ -492,7 +499,6 @@
// can be used then.
 
if (!token.getAttribute('about') && tmpDataMW && tmpDataMW.size 
> 0) {
-   cb({ async: true });
 
// Flatten k-v pairs.
var vals = [];
@@ -503,47 +509,44 @@
var manager = this.manager;
 
// Async-expand all token arrays to DOM.
-   Util.expandValuesToDOM(manager.env, manager.frame, vals,
-   wrapTemplates, function(err, eVals) {  // 
eslint-disable-line
-   // FIXME: Do something with `err`?
+   var eVals = yield Util.expandValuesToDOM(
+   manager.env, manager.frame, vals, wrapTemplates
+   );
 
-   // Rebuild flattened k-v pairs.
-   var expAttrs = [];
-   for (var j = 0; j < eVals.length; j += 
2) {
-   expAttrs.push([eVals[j], 
eVals[j + 1]]);
-   }
+   // Rebuild flattened k-v pairs.
+   var expAttrs = [];
+   for (var j = 0; j < eVals.length; j += 2) {
+   expAttrs.push([eVals[j], eVals[j + 1]]);
+   }
 
-   if (token.name === 'template') {
-   // Don't add Parsoid about, 
typeof, data-mw attributes here since
-   // we won't be able to 
distinguish between Parsoid-added attributes
-   // and actual template 
attributes in cases like:
-   //   
{{some-tpl|about=#mwt1|typeof=mw:Transclusion}}
-   // In both cases, we will 
encounter a template token that looks like:
-   //   { ... 
"attribs":[{"k":"about","v":"#mwt1"},{"k":"typeof","v":"mw:Transclusion"}] .. }
-   // So, record these in the tmp 
attribute for the template hander
- 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add `TokenTransformManager.addTransformP` helper.

2018-01-05 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402438 )

Change subject: Add `TokenTransformManager.addTransformP` helper.
..

Add `TokenTransformManager.addTransformP` helper.

This allows easier registration of async transforms that return a Promise
for an eventual tokens object.

Change-Id: If175d8e4cff38e8de59a5636ab1f1d9da44c7460
---
M lib/wt2html/TokenTransformManager.js
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/lib/wt2html/TokenTransformManager.js 
b/lib/wt2html/TokenTransformManager.js
index 67ddbc0..70c9b6b 100644
--- a/lib/wt2html/TokenTransformManager.js
+++ b/lib/wt2html/TokenTransformManager.js
@@ -190,6 +190,19 @@
}
 };
 
+// Helper to register transforms that return a promise for the value,
+// instead of invoking the callback synchronously.
+TokenTransformManager.prototype.addTransformP = function(context, 
transformation, debugName, rank, type, name) {
+   this.addTransform(function(token, frame, cb) {
+   // this is an async transformation
+   cb({ async: true });
+   // invoke the transformation to get a promise
+   transformation.call(context, token, frame)
+   .then(function(result) { cb(result); })
+   .done();
+   }, debugName, rank, type, name);
+};
+
 function removeMatchingTransform(transformers, rank) {
var i = 0;
var n = transformers.length;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If175d8e4cff38e8de59a5636ab1f1d9da44c7460
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Promisify LanguageVariantHandler.

2018-01-05 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402439 )

Change subject: Promisify LanguageVariantHandler.
..

Promisify LanguageVariantHandler.

Change-Id: I5552e1d9c046e84bc0294ea5e7588a3f11697e13
Depends-On: If175d8e4cff38e8de59a5636ab1f1d9da44c7460
---
M lib/wt2html/tt/LanguageVariantHandler.js
1 file changed, 132 insertions(+), 138 deletions(-)


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

diff --git a/lib/wt2html/tt/LanguageVariantHandler.js 
b/lib/wt2html/tt/LanguageVariantHandler.js
index cb9c7fe..a4afe4b 100644
--- a/lib/wt2html/tt/LanguageVariantHandler.js
+++ b/lib/wt2html/tt/LanguageVariantHandler.js
@@ -25,7 +25,7 @@
  */
 function LanguageVariantHandler(manager, options) {
this.manager = manager;
-   this.manager.addTransform(this.onLanguageVariant.bind(this), 
"LanguageVariantHandler:onLanguageVariant", this.rank, 'tag', 
'language-variant');
+   this.manager.addTransformP(this, this.onLanguageVariant, 
"LanguageVariantHandler:onLanguageVariant", this.rank, 'tag', 
'language-variant');
 }
 
 // Indicates where in the pipeline this handler should be run.
@@ -35,7 +35,7 @@
  * Main handler.
  * See {@link TokenTransformManager#addTransform}'s transformation parameter
  */
-LanguageVariantHandler.prototype.onLanguageVariant = function(token, frame, 
cb) {
+LanguageVariantHandler.prototype.onLanguageVariant = Promise.async(function 
*(token, frame) {
var manager = this.manager;
var attribs = token.attribs;
var dataAttribs = token.dataAttribs;
@@ -45,15 +45,13 @@
var isMeta = false;
var sawFlagA = false;
 
-   cb({ async: true });
-
// convert one variant text to dom.
-   var convertOne = function(t) {
+   var convertOne = Promise.async(function *(t) {
// we're going to fetch the actual token list from attribs
// (this ensures that it has gone through the earlier stages
// of the pipeline already to be expanded)
t = +(t.replace(/^mw:lv/, ''));
-   return Util.promiseToProcessContent(
+   var doc = yield Util.promiseToProcessContent(
manager.env, manager.frame, attribs[t].v.concat([new 
EOFTk()]),
{
pipelineType: 'tokens/x-mediawiki/expanded',
@@ -64,13 +62,12 @@
},
srcOffsets: attribs[t].srcOffsets,
}
-   ).then(function(doc) {
-   return {
-   xmlstr: DU.ppToXML(doc.body, { innerXML: true 
}),
-   isBlock: DU.hasBlockElementDescendant(doc.body)
-   };
-   });
-   };
+   );
+   return {
+   xmlstr: DU.ppToXML(doc.body, { innerXML: true }),
+   isBlock: DU.hasBlockElementDescendant(doc.body)
+   };
+   });
// compress a whitespace sequence
var compressSpArray = function(a) {
var result = [];
@@ -102,146 +99,143 @@
}
// convert all variant texts to DOM
var isBlock = false;
-   return Promise.map(dataAttribs.texts, function(t) {
+   var texts = yield Promise.map(dataAttribs.texts, Promise.async(function 
*(t) {
+   var text, from, to;
if (t.twoway) {
-   return convertOne(t.text).then(function(text) {
-   isBlock = isBlock || text.isBlock;
-   return { lang: t.lang, text: text.xmlstr, 
twoway: true, sp: t.sp };
-   });
+   text = yield convertOne(t.text);
+   isBlock = isBlock || text.isBlock;
+   return { lang: t.lang, text: text.xmlstr, twoway: true, 
sp: t.sp };
} else if (t.lang) {
-   return Promise.all([convertOne(t.from), 
convertOne(t.to)]).
-   spread(function(from, to) {
-   isBlock = isBlock || from.isBlock || 
to.isBlock;
-   return { lang: t.lang, from: 
from.xmlstr, to: to.xmlstr, sp: t.sp };
-   });
+   from = yield convertOne(t.from);
+   to = yield convertOne(t.to);
+   isBlock = isBlock || from.isBlock || to.isBlock;
+   return { lang: t.lang, from: from.xmlstr, to: 
to.xmlstr, sp: t.sp };
} else {
-   return convertOne(t.text).then(function(text) {
-   isBlock = isBlock || text.isBlock;
-   return { text: text.xmlstr, 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Have expandValuesToDOM return a Promise.

2018-01-05 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402437 )

Change subject: Have expandValuesToDOM return a Promise.
..

Have expandValuesToDOM return a Promise.

Change-Id: I78be0965fac6df9a58e5851a1deeccfa53e3
---
M lib/utils/Util.js
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index 9d3e18d..9890976 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -1242,6 +1242,7 @@
 */
expandValuesToDOM: function(env, frame, vals, wrapTemplates, finalCB) {
if (!DU) { DU = require('./DOMUtils.js').DOMUtils; }
+   var deferred = Promise.defer();
async.map(vals, function(v, cb) {
if (Array.isArray(v.html)) {
// Set up pipeline options
@@ -1271,7 +1272,10 @@
} else {
cb(null, v);
}
-   }, finalCB);
+   }, function(e, v) {
+   if (e) { deferred.reject(e); } else { 
deferred.resolve(v); }
+   });
+   return deferred.promise.nodify(finalCB);
},
 
extractExtBody: function(token) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78be0965fac6df9a58e5851a1deeccfa53e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Use Promise.async/yield for lib/api/ParsoidService.js

2018-01-05 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402435 )

Change subject: Use Promise.async/yield for lib/api/ParsoidService.js
..

Use Promise.async/yield for lib/api/ParsoidService.js

Change-Id: I61a349dacc7da7d46f7057c029f5a24809f005fd
---
M lib/api/ParsoidService.js
1 file changed, 21 insertions(+), 21 deletions(-)


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

diff --git a/lib/api/ParsoidService.js b/lib/api/ParsoidService.js
index b36b7c8..a6b8a6b 100644
--- a/lib/api/ParsoidService.js
+++ b/lib/api/ParsoidService.js
@@ -44,7 +44,7 @@
  *   Don't expect it to exit after you've logged "fatal" and other such things.
  * @return {Promise} server
  */
-ParsoidService.init = Promise.method(function(parsoidOptions, processLogger) {
+ParsoidService.init = Promise.async(function *(parsoidOptions, processLogger) {
processLogger.log('info', 'loading ...');
 
var parsoidConfig = new ParsoidConfig(null, parsoidOptions);
@@ -226,30 +226,30 @@
}
 
var server;
-   return new Promise(function(resolve, reject) {
+   yield new Promise(function(resolve, reject) {
app.on('error', function(err) {
processLogger.log('error', err);
reject(err);
});
server = app.listen(port, host, resolve);
-   })
-   .then(function() {
-   port = server.address().port;
-   processLogger.log('info',
-   util.format('ready on %s:%s', host || '', port));
-   return {
-   close: function() {
-   return Promise.promisify(server.close, false, 
server)()
-   .tap(function() {
-   if (parsoidConfig.useWorker) { 
workerFarm.end(workers); }
-   // The conf cache is reused across 
requests, but shouldn't
-   // be shared between services.  This 
conflict arises when
-   // service-runner num_workers is zero, 
and mocha spawns
-   // services in succession.
-   
require('../config/MWParserEnvironment.js').MWParserEnvironment.resetConfCache();
-   });
-   },
-   port: port,
-   };
});
+   port = server.address().port;
+   processLogger.log(
+   'info',
+   util.format('ready on %s:%s', host || '', port)
+   );
+   return {
+   close: function() {
+   return Promise.promisify(server.close, false, server)()
+   .tap(function() {
+   if (parsoidConfig.useWorker) { 
workerFarm.end(workers); }
+   // The conf cache is reused across requests, 
but shouldn't
+   // be shared between services.  This conflict 
arises when
+   // service-runner num_workers is zero, and 
mocha spawns
+   // services in succession.
+   
require('../config/MWParserEnvironment.js').MWParserEnvironment.resetConfCache();
+   });
+   },
+   port: port,
+   };
 });

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61a349dacc7da7d46f7057c029f5a24809f005fd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Use Promise.async/yield for lib/api/routes.js

2018-01-05 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402436 )

Change subject: Use Promise.async/yield for lib/api/routes.js
..

Use Promise.async/yield for lib/api/routes.js

Change-Id: If181edf096861e31dc8d5fa20910fb8ab8a511d4
---
M lib/api/apiUtils.js
M lib/api/routes.js
2 files changed, 140 insertions(+), 135 deletions(-)


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

diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index 7bf3c76..4071c0b 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -166,6 +166,12 @@
env.log('fatal/request', err);
 };
 
+apiUtils.errorWrapper = function(env, promiseOrValue) {
+   return Promise.resolve(promiseOrValue).catch(function(err) {
+   apiUtils.errorHandler(env, err);
+   });
+};
+
 // To support the 'subst' API parameter, we need to prefix each
 // top-level template with 'subst'. To make sure we do this for the
 // correct templates, tokenize the starting wikitext and use that to
diff --git a/lib/api/routes.js b/lib/api/routes.js
index 089dbe5..4a30106 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -254,7 +254,7 @@
 
// Spec'd in https://phabricator.wikimedia.org/T75955 and the API tests.
 
-   var wt2html = Promise.method(function(req, res, wt, reuseExpansions) {
+   var wt2html = Promise.async(function *(req, res, wt, reuseExpansions) {
var env = res.locals.env;
var opts = res.locals.opts;
var oldid = res.locals.oldid;
@@ -271,134 +271,132 @@
startTimers.set('wt2html.total', Date.now());
}
 
-   var p = Promise.resolve(wt);
-
if (oldid || typeof wt !== 'string') {
// Always fetch the page info if we have an oldid.
// Otherwise, if no wt was passed, we need to figure out
// the latest revid to which we'll redirect.
-   p = p.tap(function() {
-   return TemplateRequest.setPageSrcInfo(env, 
target, oldid);
-   });
+   yield TemplateRequest.setPageSrcInfo(env, target, 
oldid);
}
 
+   // Calling this `wikitext` so that it's easily distinguishable.
+   // It may be modified by substTopLevelTemplates.
+   var wikitext;
var doSubst = (typeof wt === 'string' && res.locals.subst);
if (doSubst) {
-   p = p.then(function(wikitext) {
-   return apiUtils.substTopLevelTemplates(env, 
target, wikitext);
-   });
+   wikitext = yield apiUtils.substTopLevelTemplates(env, 
target, wt);
+   } else {
+   wikitext = wt;
}
 
-   return p.then(function(wikitext) {
-   // Calling this `wikitext` so that it's easily 
distinguishable.
-   // It may have been modified by substTopLevelTemplates.
+   // Now that we have a revid, we can redirect
+   if (typeof wikitext !== 'string' && !oldid) {
+   return apiUtils.redirectToOldid(req, res);
+   }
 
-   // Now that we have a revid, we can redirect
-   if (typeof wikitext !== 'string' && !oldid) {
-   return apiUtils.redirectToOldid(req, res);
+   // Follow redirects if asked
+   if (parsoidConfig.devAPI && req.query.follow_redirects) {
+   // Get localized redirect matching regexp
+   var reSrc = 
env.conf.wiki.getMagicWordMatcher('redirect').source;
+   reSrc = '^[ \\t\\n\\r\\0\\x0b]*' +
+   reSrc.substring(1, reSrc.length - 1) + // Strip 
^ and $
+   '[ \\t\\n\\r\\x0c]*(?::[ \\t\\n\\r\\x0c]*)?' +
+   '\\[\\[([^\\]]+)\\]\\]';
+   var re = new RegExp(reSrc, 'i');
+   var s = wikitext || env.page.src;
+   var redirMatch = s.match(re);
+   if (redirMatch) {
+   return apiUtils._redirectToPage(redirMatch[2], 
req, res);
}
+   }
 
-   // Follow redirects if asked
-   if (parsoidConfig.devAPI && req.query.follow_redirects) 
{
-   // Get localized redirect matching regexp
-   var reSrc = 
env.conf.wiki.getMagicWordMatcher('redirect').source;
-   reSrc = '^[ \\t\\n\\r\\0\\x0b]*' +
-   

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: WIP: Promisify LinkHandler

2018-01-05 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402440 )

Change subject: WIP: Promisify LinkHandler
..

WIP: Promisify LinkHandler

Change-Id: I71211d42e74c983b21f87c57bb7c76cf82489dc8
Depends-On: If175d8e4cff38e8de59a5636ab1f1d9da44c7460
Depends-On: I78be0965fac6df9a58e5851a1deeccfa53e3
---
M lib/wt2html/tt/LinkHandler.js
1 file changed, 108 insertions(+), 117 deletions(-)


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

diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js
index 5aea514..924db38 100644
--- a/lib/wt2html/tt/LinkHandler.js
+++ b/lib/wt2html/tt/LinkHandler.js
@@ -41,11 +41,11 @@
 
 WikiLinkHandler.prototype.init = function() {
// Handle redirects first (since they used to emit additional link 
tokens)
-   this.manager.addTransform(this.onRedirect.bind(this),
+   this.manager.addTransformP(this, this.onRedirect,
'WikiLinkHandler:onRedirect', this.rank, 'tag', 'mw:redirect');
 
// Now handle regular wikilinks.
-   this.manager.addTransform(this.onWikiLink.bind(this),
+   this.manager.addTransformP(this, this.onWikiLink,
'WikiLinkHandler:onWikiLink', this.rank + 0.001, 'tag', 
'wikilink');
 
// Create a new peg parser for image options.
@@ -161,7 +161,7 @@
 /**
  * Handle mw:redirect tokens.
  */
-WikiLinkHandler.prototype.onRedirect = function(token, frame, cb) {
+WikiLinkHandler.prototype.onRedirect = Promise.async(function *(token, frame) {
// Avoid duplicating the link-processing code by invoking the
// standard onWikiLink handler on the embedded link, intercepting
// the generated tokens using the callback mechanism, reading
@@ -186,34 +186,33 @@
 
// Render the wikilink (including interwiki links, etc) then collect
// the resulting href and transfer it to rlink.
-   this.onWikiLink(wikiLinkTk, frame, function(r) {
-   var isValid = r && r.tokens && r.tokens[0] &&
-   /^(a|link)$/.test(r.tokens[0].name);
-   if (isValid) {
-   var da = r.tokens[0].dataAttribs;
-   rlink.addNormalizedAttribute('href', da.a.href, 
da.sa.href);
-   cb({ tokens: [rlink] });
-   } else {
-   // Bail!  Emit tokens as if they were parsed as a list 
item:
-   //  #REDIRECT
-   var src = rlink.dataAttribs.src;
-   var tsr = rlink.dataAttribs.tsr;
-   var srcMatch = /^([^#]*)(#)/.exec(src);
-   var ntokens = srcMatch[1].length ? [ srcMatch[1] ] : [];
-   var hashPos = tsr[0] + srcMatch[1].length;
-   var li = new TagTk('listItem', [], { tsr: [hashPos, 
hashPos + 1] });
-   li.bullets = [ '#' ];
-   ntokens.push(li);
-   ntokens.push(src.slice(srcMatch[0].length));
-   cb({ tokens: ntokens.concat(r.tokens) });
-   }
-   });
-};
+   var r = yield this.onWikiLink(wikiLinkTk, frame);
+   var isValid = r && r.tokens && r.tokens[0] &&
+   /^(a|link)$/.test(r.tokens[0].name);
+   if (isValid) {
+   var da = r.tokens[0].dataAttribs;
+   rlink.addNormalizedAttribute('href', da.a.href, da.sa.href);
+   return { tokens: [rlink] };
+   } else {
+   // Bail!  Emit tokens as if they were parsed as a list item:
+   //  #REDIRECT
+   var src = rlink.dataAttribs.src;
+   var tsr = rlink.dataAttribs.tsr;
+   var srcMatch = /^([^#]*)(#)/.exec(src);
+   var ntokens = srcMatch[1].length ? [ srcMatch[1] ] : [];
+   var hashPos = tsr[0] + srcMatch[1].length;
+   var li = new TagTk('listItem', [], { tsr: [hashPos, hashPos + 
1] });
+   li.bullets = [ '#' ];
+   ntokens.push(li);
+   ntokens.push(src.slice(srcMatch[0].length));
+   return { tokens: ntokens.concat(r.tokens) };
+   }
+});
 
 /**
  * Handle a mw:WikiLink token.
  */
-WikiLinkHandler.prototype.onWikiLink = function(token, frame, cb) {
+WikiLinkHandler.prototype.onWikiLink = Promise.async(function *(token, frame) {
var env = this.manager.env;
var hrefKV = Util.lookupKV(token.attribs, 'href');
var target, tokens, tsr;
@@ -266,8 +265,7 @@
});
 
tokens.push("]]");
-   cb({ tokens: tokens });
-   return;
+   return { tokens: tokens };
}
 
// First check if the expanded href contains a pipe.
@@ -279,8 +277,7 @@
// TODO: add useful debugging info for editors ('if you would 
like to
   

[MediaWiki-commits] [Gerrit] integration/config[master]: Add BlueSpice extensions

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

Change subject: Add BlueSpice extensions
..


Add BlueSpice extensions

BlueSpiceHideTitle
BlueSpiceInsertCategory
BlueSpiceInsertFile
BlueSpiceInsertLink
BlueSpiceInsertMagic
BlueSpiceSaferEdit
BlueSpiceUEModulePDF
BlueSpiceUniversalExport
BlueSpiceUsageTracker

Bug: T130811
Change-Id: Iff2c4679b19d0a08637a45b51d5db2ec948ce409
---
M zuul/layout.yaml
1 file changed, 45 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 581ae20..4bbfae3 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4482,6 +4482,31 @@
   - name: extension-unittests-composer-non-voting
   - name: mwgate-npm
 
+  - name: mediawiki/extensions/BlueSpiceHideTitle
+template:
+  - name: extension-unittests-composer-non-voting
+  - name: mwgate-npm
+
+  - name: mediawiki/extensions/BlueSpiceInsertCategory
+template:
+  - name: extension-unittests-composer-non-voting
+  - name: mwgate-npm
+
+  - name: mediawiki/extensions/BlueSpiceInsertFile
+template:
+  - name: extension-unittests-composer-non-voting
+  - name: mwgate-npm
+
+  - name: mediawiki/extensions/BlueSpiceInsertLink
+template:
+  - name: extension-unittests-composer-non-voting
+  - name: mwgate-npm
+
+  - name: mediawiki/extensions/BlueSpiceInsertMagic
+template:
+  - name: extension-unittests-composer-non-voting
+  - name: mwgate-npm
+
   - name: mediawiki/extensions/BlueSpiceInsertTemplate
 template:
   - name: extension-unittests-composer
@@ -4532,6 +4557,11 @@
   - name: extension-unittests-composer
   - name: mwgate-npm
 
+  - name: mediawiki/extensions/BlueSpiceSaferEdit
+template:
+  - name: extension-unittests-composer-non-voting
+  - name: mwgate-npm
+
   - name: mediawiki/extensions/BlueSpiceSignHere
 template:
   - name: extension-unittests-composer
@@ -4557,6 +4587,21 @@
   - name: extension-unittests-composer
   - name: mwgate-npm
 
+  - name: mediawiki/extensions/BlueSpiceUEModulePDF
+template:
+  - name: extension-unittests-composer-non-voting
+  - name: mwgate-npm
+
+  - name: mediawiki/extensions/BlueSpiceUniversalExport
+template:
+  - name: extension-unittests-composer-non-voting
+  - name: mwgate-npm
+
+  - name: mediawiki/extensions/BlueSpiceUsageTracker
+template:
+  - name: extension-unittests-composer-non-voting
+  - name: mwgate-npm
+
   - name: mediawiki/extensions/BlueSpiceUserManager
 template:
   - name: extension-unittests-composer

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff2c4679b19d0a08637a45b51d5db2ec948ce409
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wmcs: Add database drop support to maintain-views

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

Change subject: wmcs: Add database drop support to maintain-views
..


wmcs: Add database drop support to maintain-views

Add a new `--drop` argument to maintain-views that can be used to remove
the _p database for a Wiki Replica. This option requires that
`--database` also be given to explicitly name the databases to be
dropped.

Bug: T181925
Change-Id: I91f3b49cade4ccbd822d95a906dbe738ac0d370c
---
M modules/role/files/labs/db/views/maintain-views.py
1 file changed, 37 insertions(+), 9 deletions(-)

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



diff --git a/modules/role/files/labs/db/views/maintain-views.py 
b/modules/role/files/labs/db/views/maintain-views.py
index 23a7dc9..23abc15 100644
--- a/modules/role/files/labs/db/views/maintain-views.py
+++ b/modules/role/files/labs/db/views/maintain-views.py
@@ -113,9 +113,10 @@
 if self.table_exists(view, self.db):
 # If it does, create or replace the view for it.
 logging.info("[{}] ".format(view))
-if (self.replace_all or not self.table_exists(view, self.db_p) or
-input('View already exists. Replace? [y/N] ').lower()
-in ['y', 'yes']):
+if (
+not self.table_exists(view, self.db_p) or
+self._confirm('View already exists. Replace?')
+):
 # Can't use pymysql to build this
 self.write_execute("""
 CREATE OR REPLACE
@@ -194,10 +195,10 @@
 
 if len(sources) == len(sources_checked):
 
-if (self.replace_all or
-not self.table_exists(view_name, self.db_p) or
-input('View already exists. Replace? [y/N] ').lower()
-in ['y', 'yes']):
+if (
+not self.table_exists(view_name, self.db_p) or
+self._confirm('View already exists. Replace?')
+):
 logging.info("[{}] ".format(view_name))
 self.create_customview(
 view_name,
@@ -275,6 +276,21 @@
 for view_name, view_details in customviews.items():
 self.do_customview(view_name, view_details)
 
+def drop_public_database(self):
+"""Drop a public database entirely."""
+if self.database_exists(self.db_p):
+if self._confirm('Drop {}?'.format(self.db_p)):
+self.write_execute("DROP DATABASE `{}`;".format(self.db_p))
+else:
+logging.warning('DB {} does not exist'.format(self.db_p))
+
+def _confirm(self, msg):
+"""Prompt for confirmation unless self.replace_all is true."""
+return (
+self.replace_all or
+input("{} [y/N] ".format(msg)).lower() in ['y', 'yes']
+)
+
 
 if __name__ == "__main__":
 
@@ -313,8 +329,12 @@
 )
 argparser.add_argument(
 "--clean",
-help=("Clean out views from _p varient that are no longer specified"
-  " make changes."),
+help="Clean out views from _p db that are no longer specified.",
+action="store_true"
+)
+argparser.add_argument(
+"--drop",
+help="Remove _p db entirely.",
 action="store_true"
 )
 argparser.add_argument(
@@ -347,6 +367,10 @@
 # argparse mutually exclusive is weird http://bugs.python.org/issue10984
 if args.table and args.clean:
 logging.critical("cannot specify a single table and cleanup")
+sys.exit(1)
+
+if args.drop and not args.databases:
+logging.critical("--drop must specify database names")
 sys.exit(1)
 
 with open(args.config_location, 'r') as stream:
@@ -449,6 +473,10 @@
 logging.critical("Definer has not been created")
 sys.exit(1)
 
+if args.drop:
+ops.drop_public_database()
+continue
+
 ops.execute(fullviews, customviews)
 
 if args.clean:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91f3b49cade4ccbd822d95a906dbe738ac0d370c
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Archive mediawiki/extensions/DataTypes

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

Change subject: Archive mediawiki/extensions/DataTypes
..


Archive mediawiki/extensions/DataTypes

See Ia52d81ed62b38c73fb202d787936398e7fbb0205

Change-Id: I5321aa042c811bb7971c9e52ec4a62954aeae050
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index dc9be6f..581ae20 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4721,8 +4721,7 @@
 
   - name: mediawiki/extensions/DataTypes
 template:
-  - name: extension-unittests-generic
-  - name: extension-qunit-generic
+  - name: archived
 
   - name: mediawiki/extensions/DeleteOwn
 template:

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from c6bef6f66554b4e7ecae3436f10d7b72af575183:

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

Change subject: Merging from c6bef6f66554b4e7ecae3436f10d7b72af575183:
..


Merging from c6bef6f66554b4e7ecae3436f10d7b72af575183:

Remove unused wdqs-app-footer-updated-seconds message

The message has been unused since commit 39ce7595f5 (change I9fd9a760a8)
replaced it with the more generic wdqs-app-footer-updated message.

Change-Id: Ic508d997aa03a870609ca84bdb835af44cff9998
---
R css/embed.style.min.01b58028998fdfe870f4.css
R css/style.min.a5d18cd4be4cdf5a3fa8.css
M embed.html
M i18n/en.json
M i18n/qqq.json
M i18n/tr.json
M index.html
D js/wdqs.min.42116438ed7a4ffe2803.js
A js/wdqs.min.79a73e826fc0ce4194ec.js
9 files changed, 8 insertions(+), 8 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic508d997aa03a870609ca84bdb835af44cff9998
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Smalyshev 

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


[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from c6bef6f66554b4e7ecae3436f10d7b72af575183:

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

Change subject: Merging from c6bef6f66554b4e7ecae3436f10d7b72af575183:
..

Merging from c6bef6f66554b4e7ecae3436f10d7b72af575183:

Remove unused wdqs-app-footer-updated-seconds message

The message has been unused since commit 39ce7595f5 (change I9fd9a760a8)
replaced it with the more generic wdqs-app-footer-updated message.

Change-Id: Ic508d997aa03a870609ca84bdb835af44cff9998
---
R css/embed.style.min.01b58028998fdfe870f4.css
R css/style.min.a5d18cd4be4cdf5a3fa8.css
M embed.html
M i18n/en.json
M i18n/qqq.json
M i18n/tr.json
M index.html
D js/wdqs.min.42116438ed7a4ffe2803.js
A js/wdqs.min.79a73e826fc0ce4194ec.js
9 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui-deploy 
refs/changes/34/402434/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic508d997aa03a870609ca84bdb835af44cff9998
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add DELETE to list of allowed methods for text varnish

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

Change subject: Add DELETE to list of allowed methods for text varnish
..

Add DELETE to list of allowed methods for text varnish

Follow-up to I6f7fba56731da3d72dab34f8eb6b3eebc57f4879.
DELETE is also used by reading lists service.

Bug: T182825
Change-Id: Ifd779d9090aa555dcdb961470405a0496b5e054c
---
M modules/profile/manifests/cache/text.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/profile/manifests/cache/text.pp 
b/modules/profile/manifests/cache/text.pp
index d4225b8..a691da4 100644
--- a/modules/profile/manifests/cache/text.pp
+++ b/modules/profile/manifests/cache/text.pp
@@ -49,7 +49,7 @@
 }
 
 $common_vcl_config = {
-'allowed_methods'  => '^(GET|HEAD|OPTIONS|POST|PURGE|PUT)$',
+'allowed_methods'  => '^(GET|HEAD|OPTIONS|POST|PURGE|PUT|DELETE)$',
 'purge_host_regex' => 
$::profile::cache::base::purge_host_not_upload_re,
 'static_host'  => $static_host,
 'top_domain'   => $top_domain,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd779d9090aa555dcdb961470405a0496b5e054c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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/puppet[production]: apt: Do not use experimental on stretch

2018-01-05 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402432 )

Change subject: apt: Do not use experimental on stretch
..

apt: Do not use experimental on stretch

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/32/402432/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82c76be493e7483c5945014b454a4097fa6e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Remove unused wdqs-app-footer-updated-seconds message

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

Change subject: Remove unused wdqs-app-footer-updated-seconds message
..


Remove unused wdqs-app-footer-updated-seconds message

The message has been unused since commit 39ce7595f5 (change I9fd9a760a8)
replaced it with the more generic wdqs-app-footer-updated message.

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

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



diff --git a/i18n/en.json b/i18n/en.json
index b0eebff..9c2679a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -36,7 +36,6 @@
 "wdqs-app-help-queryhelper": "Query Helper",
 "wdqs-app-footer-help": "Press [CTRL-SPACE] to activate auto 
completion.",
 "wdqs-app-footer-updated": "Data updated $1 ago",
-"wdqs-app-footer-updated-seconds": "Data updated $1 seconds ago",
 "wdqs-app-result-shorturl": "Short URL to result",
 "wdqs-app-result-shorturl-title": "Short URL to this result",
 "wdqs-app-result-rawgraphs": "Open in RAWGraphs.io",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 56247e2..63ab7ba 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -38,7 +38,6 @@
"wdqs-app-help-queryhelper": "Heading of the Query Helper widget",
"wdqs-app-footer-help": "Help message at the footer of the editor",
"wdqs-app-footer-updated": "Message displaying how long ago data was 
updated",
-   "wdqs-app-footer-updated-seconds": "Message displaying how many seconds 
ago data was updated",
"wdqs-app-result-shorturl": "Link message in the footer link dropdown",
"wdqs-app-result-shorturl-title": "Title of link message in the footer 
link dropdown",
"wdqs-app-result-rawgraphs": "Link message in the footer link dropdown",

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Only generate coverage information for master

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

Change subject: Only generate coverage information for master
..


Only generate coverage information for master

Change-Id: I34f6c738fc63b186f59c36d0b4cdea4ff969127f
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index be396fd..dc9be6f 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -851,6 +851,10 @@
 files:
  - '^(\.js.*|\.stylelintrc|.*\.(css|js|json|less)$)'
 
+# Only generate coverage information for master
+  - name: ^.*-coverage-publish$
+branch: master
+
   - name: jsduck
 files:
  - '^.*\.(js|json|css)$'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I34f6c738fc63b186f59c36d0b4cdea4ff969127f
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Cleanup skins before setting up extension coverage job

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

Change subject: Cleanup skins before setting up extension coverage job
..


Cleanup skins before setting up extension coverage job

Any skins present on the filesystem will get autoloaded by MediaWiki,
and we don't want that. So just remove them and if they are needed by this
job, zuul-cloner will clone them again.

Change-Id: Ia035b87fd3320c24b8b5c9a58af6a7b44d072388
---
M jjb/mediawiki-extensions.yaml
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 396f266..7f8e025 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -471,6 +471,11 @@
 node: contintLabsSlave && DebianJessie
 concurrent: false
 builders:
+ - shell: |
+# XXX: MediaWiki auto-enables any skins it can find
+# But we only want to enable the skins that this extension
+# needs, so remove any other skins that might be laying around.
+rm -rf "$WORKSPACE/src/skins/"
  - prepare-mediawiki-zuul-project
  - mw-fetch-composer-dev
  # FIXME should use the mw-phpunit.sh wrapper

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia035b87fd3320c24b8b5c9a58af6a7b44d072388
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: aptrepo: Add experimental to stretch (distributions-wikimedia)

2018-01-05 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402431 )

Change subject: aptrepo: Add experimental to stretch (distributions-wikimedia)
..

aptrepo: Add experimental to stretch (distributions-wikimedia)

Bug: T184239
Change-Id: I88d59ef94f32ad5bb81eae6c9734f710408f38f8
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/402431/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88d59ef94f32ad5bb81eae6c9734f710408f38f8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/private[master]: add scap keys for dumpsdeploy for beta

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

Change subject: add scap keys for dumpsdeploy for beta
..


add scap keys for dumpsdeploy for beta

Change-Id: I8ea442cc38dbfc652e6222b431a52866a93def76
---
M modules/secret/secrets/keyholder/dumpsdeploy
M modules/secret/secrets/keyholder/dumpsdeploy.pub
2 files changed, 53 insertions(+), 4 deletions(-)

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



diff --git a/modules/secret/secrets/keyholder/dumpsdeploy 
b/modules/secret/secrets/keyholder/dumpsdeploy
index 2a6330d..023d96a 100644
--- a/modules/secret/secrets/keyholder/dumpsdeploy
+++ b/modules/secret/secrets/keyholder/dumpsdeploy
@@ -1,4 +1,54 @@
 -BEGIN RSA PRIVATE KEY-
-SNAKEOIL
--END RSA PRIVATE KEY-
+Proc-Type: 4,ENCRYPTED
+DEK-Info: AES-128-CBC,B163082F7412A16197AF66B3CDA3A759
 
+hu/Vq0O69xjFzl+AGPU16Z0nt0iNYIcwKK8cENbciebv+CLDmbVigifBr3uSlle2
+d6d+oGVDDePNVMSHYz64M4P72WfthFkPNOb4Q8QND3oLExLWBnUlV+RIZm2LDN28
+hl7ZfJnTW5+OIuPIuZxkJD6MINqUc2++2cK+NTZQG9mO0qHf4NFxAKBRGD3hk1cW
+obPHe3i7Z3igJgvjxBwWmuJEnKzOwvbK+J+tRS51O3OARKNh8W+AzIZ1hEILG9qR
+0dIrZcQS9IgER8Xc1Rv6AGARQvaqc9fyMDVRPFmZwr1+bTY7edl7tT1Hsxntl0c0
+O3GzhBrU64Fdhf2tO+Sm9J0nrdB9jtklhrZKaGzprm/uvIKxaYCAX6UBzueMJ7cy
+aucD0yVeeeK616a/SWGVtX3TKY+1j9dZDPRrOuPDFvPd1t/qqnCFMWcqQxo3p7AT
+SOJmBIT/GoH08Y63jOUqB9+UShGlXVlO4JmkxICAN2r8D78s7WfOYUz3cW/NYDmm
+gUb+cpjqs0nlU2IhGvymn20utgASGxV2beu0vMIJPZfvz5xnJ1L/BMJZ3lyKRMU3
+GMDCZxYaiKYq8dp+UPVGpINpAX9VMRQvuSINwad9SsDDsa9G4EiZ0QNisb0EuUx3
+/UDPvJ36iXXbMvSIYChSODvsUngHJQ4ElM2c9TqX0HsaKLaIUkq9Y9pcCUHMSPfv
+WGwiVyNW336fNHPigeCSB4jeVyfWQl1r5JFXUK+W6G16GY8x5TPTm/xVBhZjpQbL
+kZI1Z/F56pCwzZG0OrJI173/pXyufE+Hvv12PpZuOuakbAKLqIk3PfAJlUVYXfzT
+cIm85UBqNBhKQ5JDGlVVISbXEOnozFL2THlvvOO/wVQeHDZUmy+xnTLdUynXMv74
+V1u6EJZRcOzbWZiydCmDProLAPXp3xsjDEE0RTIxLyTVKVLAfwiv9J/YncN6rNIZ
+t/pdn7SrLmKvFYYVzGlVuRwzSS/mEjV9CpufemXg5VvZ5iK50XdhBMOOWqtf+pKT
+pK62y7SQuICldzxnGoZgGQUOwuHTSIYZymZ+MeRtYMHd4BbSGCFlEotMwHxYPHd4
+BFvmfI3IDq065k1MHUXKmcCUg37Y4UGiY9EwF0iYmtoIWtTIpojd3qmI//fkZimN
+jFcPvKvj5KDi7ONeYCYSHw3Kghr4rzKv44+WtAU4Ea+Pskzmx3fCCjNs45mnqFT2
+79krk+7544C0fF67AjnY7J9gYAsqVbrlkegvgG9JWx2QLDkxutQhaJQNgjbioozF
+7ymg+8SOSdpELfMqXKbnXSaRcBP5PuOBoJc6SFx6PNSUVYtiuJzvvzVsrnHyqzyx
+r7C4jFZ4U5b9lR9povEJmDWby/OBgHndhARiLfSW15vBuC8cjvV0hjnaf8SlAWPi
+fvL+ObFMBKqagfc1h2KOHubY9qcrNYH0/jSrSYnAijDO8zBfoaBjR5xGpHMlFRFy
+QYwr9SS8yzvFhDDfI1O/znk1I+J0hOWk1LD4XRKzfBmNI61HGsvJmPW3uFoAVBm6
+PGZDLQksYgOBtDSAgEkNjdmrNn3B+rv8nsWnPkX00Q6rxlLCcE/NeDxI0nihRmPm
+YRI2DI6j2qw1StKbF3T7xO+3sPpt507HoE597vHPRAykZ0IlbVzW4sGFmVEEZCP7
+gKBIa3yVd38zVtN6JWzObJfOaMnQnlKhpv5ApbQJM4GiTmsc2Whuv55yHZOi3XmP
+1gWdZ9HgcUomK54hgYuZ5Do/eIq1whCMG+9PJYbE3VtXOHoxZQBE9CRjjHdEOrUX
+DZ3EGM9RAOjMVMamAyABX67OSgVsL8F1sKozw9LsbmQ1YpT0hne1PlIC/Nj3EbcW
+P6F/DpNYfprP05f9487CEsYxRYFAmHXXVXenJp0BaIqiHErhlIsRWUgUeOtIFwq3
+SzE2CYqEiJa0yqG7/92voI830aE1ixLVaBUaiSae8JSt3o+qSHFVgXmr2N0F4+b+
+yEzdvX+b5PNwS2UL9OaYZrjveZQRgFx090gEtcYeTMOmFPqV/wu5iAP2+XR+9ChZ
+DP/MuKhFnF0sGBS3yS9aChEi/oxNjRPSJSGm/NRuBmE7KSBQqzfPjyIIqMAxdsDC
+4zfrEvixyQ0V9IYIDfxOZp+LM3SgTMgApIV1gefAtPZo0l4m4sFLqQvkO1xMYhrT
+JjitzSUoKC9UxPbn3287gPtUvcxeb07DdXNYhcTIzFQX/lgo637T6GBikwdndwbB
+FNn2sBt/aKPk3+2p3ciVpY0E/IoZw8PlV6ddByAVJ5owFKUKSu5h6bHZ8FzeRefS
++ZRHPO6zQ/BHPhnk1J+H1h72Tbl3X0yx6U8kAX93TvIAG33aUsZpcrwWPIaN9icy
+NtyPl63GMv440io+hhxHV0e/CNjeqIPJh0SDICoOCWi8uB+QQtkjPi6RPqZQwWr1
+U+y8a6tzGDPSiL1VHFsqnYNipHNP+y5EPBOY6EQ5JfVL/fzVfmucXj80ID728QzD
+UwW/Pw7vZzIsqSsjDhbDYFpueYM8aFmEIDFKM3v0dcWXk3rGX8Hn7exy1aP7Oz7b
+Y+vNfiTXoGeQNADgmM9Yu6CUHUeP+P7pKmyA7fAr8OjT1svnKadkuYsB0CHOYpCd
+EAVe6XARznFBfW87lqY1skAnlCjk8hpt0EZOpLYLk4blofD+DTRMrfOyrtQ36KN5
+A8KPYeTbc2s3IeT1pXhfULcIuK55SCh/gPIBl4GN/FTelsKLzWaJcGboL55q08kp
+nvrEvzINHIZ9KixQh7vu62UMZMjRE4nYvJFoKHahEpeP4TpWEiJzwYca2/Sx4yzB
+POD8t2CfeQnl9NfIUUHPlPNSxRmyyelxSPeyirU8W4/lFVH/h97pAuG4uXTO19Uz
+vF/admj5x8fkHl2T6JRXjpDhYV1sVuWangrurYTEXOY3DrHyq2q/yU6GTl9Iehr9
+5J+8tiK3hpbVRDph0vgxaYacZPBhRXpsQ/pFDZLoqgIspa3BvTbUtqX43I6X4V8s
+1CnivZN9mFSWydsc0JbPQj7cbGkUgwy99YVUr+qdm415ECzP8LlPk9Q/MC8wbNs/
+S2d43Or2LNQITe7z+yVDaRzrAh1eCACEcoyUZivunnZRaN1VoyffoukKZGxFyKP4
+-END RSA PRIVATE KEY-
diff --git a/modules/secret/secrets/keyholder/dumpsdeploy.pub 
b/modules/secret/secrets/keyholder/dumpsdeploy.pub
index 96c961c..1fce40b 100644
--- a/modules/secret/secrets/keyholder/dumpsdeploy.pub
+++ b/modules/secret/secrets/keyholder/dumpsdeploy.pub
@@ -1,2 +1 @@
-ssh-rsa 
XXX 
dumpsdeploy
-
+ssh-rsa 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Releases: Include all contint PHP packages

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

Change subject: Releases: Include all contint PHP packages
..

Releases: Include all contint PHP packages

Right now I'm missing php-mbstring, but continuing to
install these one by one is just a game of whack-a-mole.

Install all of them.

Change-Id: Id777364fa468d8eec73320a539056fe3f834a49f
---
M modules/profile/manifests/releases/mediawiki.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/profile/manifests/releases/mediawiki.pp 
b/modules/profile/manifests/releases/mediawiki.pp
index 525689a..2c49f70 100644
--- a/modules/profile/manifests/releases/mediawiki.pp
+++ b/modules/profile/manifests/releases/mediawiki.pp
@@ -24,6 +24,7 @@
 }
 
 class { '::contint::composer': }
+class { '::contint::packages::php': }
 
 class { '::apache::mod::rewrite': }
 class { '::apache::mod::headers': }

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Cleanup skins before setting up extension coverage job

2018-01-05 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402428 )

Change subject: Cleanup skins before setting up extension coverage job
..

Cleanup skins before setting up extension coverage job

Any skins present on the filesystem will get autoloaded by MediaWiki,
and we don't want that. So just remove them and if they are needed by this
job, zuul-cloner will clone them again.

Change-Id: Ia035b87fd3320c24b8b5c9a58af6a7b44d072388
---
M jjb/mediawiki-extensions.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/28/402428/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 396f266..7f8e025 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -471,6 +471,11 @@
 node: contintLabsSlave && DebianJessie
 concurrent: false
 builders:
+ - shell: |
+# XXX: MediaWiki auto-enables any skins it can find
+# But we only want to enable the skins that this extension
+# needs, so remove any other skins that might be laying around.
+rm -rf "$WORKSPACE/src/skins/"
  - prepare-mediawiki-zuul-project
  - mw-fetch-composer-dev
  # FIXME should use the mw-phpunit.sh wrapper

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Only generate coverage information for master

2018-01-05 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402429 )

Change subject: Only generate coverage information for master
..

Only generate coverage information for master

Change-Id: I34f6c738fc63b186f59c36d0b4cdea4ff969127f
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/29/402429/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index be396fd..dc9be6f 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -851,6 +851,10 @@
 files:
  - '^(\.js.*|\.stylelintrc|.*\.(css|js|json|less)$)'
 
+# Only generate coverage information for master
+  - name: ^.*-coverage-publish$
+branch: master
+
   - name: jsduck
 files:
  - '^.*\.(js|json|css)$'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Add discuss link to constraint reports

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

Change subject: Add discuss link to constraint reports
..


Add discuss link to constraint reports

Bug: T164351
Change-Id: I5814ef1866ac13023d307036c92f957dc961a9c7
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/ui/ConstraintReportList.js
M modules/ui/ConstraintReportPanel.js
M src/Api/CheckingResultsBuilder.php
M tests/phpunit/Api/CheckingResultsBuilderTest.php
7 files changed, 36 insertions(+), 7 deletions(-)

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



diff --git a/extension.json b/extension.json
index 7be24ea..4e5a372 100644
--- a/extension.json
+++ b/extension.json
@@ -73,6 +73,8 @@
"wbqc-parameterissues-long",
"wbqc-constrainttypehelp-short",
"wbqc-constrainttypehelp-long",
+   "wbqc-constraintdiscuss-short",
+   "wbqc-constraintdiscuss-long",
"wbqc-cached-generic",
"wbqc-cached-minutes",
"wbqc-cached-hours",
diff --git a/i18n/en.json b/i18n/en.json
index fbd6779..d05be94 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -42,6 +42,8 @@
"wbqc-parameterissues-long": "These issues are problems with the 
constraint definition on the property, not with this statement.",
"wbqc-constrainttypehelp-short": "Help",
"wbqc-constrainttypehelp-long": "Help page for this constraint type",
+   "wbqc-constraintdiscuss-short": "Discuss",
+   "wbqc-constraintdiscuss-long": "Discussion page about this constraint",
"wbqc-cached-generic": "This result is cached and might be out of 
date.",
"wbqc-cached-minutes": "This result is cached and might be out of date 
by up to {{PLURAL:$1|1=one minute|$1minutes}}.",
"wbqc-cached-hours": "This result is cached and might be out of date by 
up to {{PLURAL:$1|1=one hour|$1hours}}.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index e4b35ce..6384551 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -44,6 +44,8 @@
"wbqc-parameterissues-long": "Longer explanation of the section of the 
constraint parameter report popup that contains problems about the constraint 
parameters.\n{{Related|wbqc-parameterissues-short}}",
"wbqc-constrainttypehelp-short": "Text for the help link shown next to 
the constraint type in a constraint violation report. The link leads to a help 
page on Wikidata about the constraint type.\n{{Identical|Help}}",
"wbqc-constrainttypehelp-long": "Title for the help link shown next to 
the constraint type in a constraint violation report. The link leads to a help 
page on Wikidata about the constraint 
type.\n{{Related|wbqc-constrainttypehelp-short}}",
+   "wbqc-constraintdiscuss-short": "Text for the discussion link shown 
next to the constraint type in a constraint violation report. The link leads to 
the talk page of the property on which the constraint is 
defined.\n{{Identical|Discuss}}",
+   "wbqc-constraintdiscuss-long": "Title for the discussion link shown 
next to the constraint type in a constraint violation report. The link leads to 
the talk page of the property on which the constraint is 
defined.\n{{Related|wbqc-constraintdiscuss-short}}",
"wbqc-cached-generic": "Generic message informing the user that a 
constraint check result might be outdated. There is no information on how old 
the cached result is; if more information is available, a more specific message 
is used.",
"wbqc-cached-minutes": "Message informing the user that a constraint 
check result might be outdated by up to ''n'' 
minutes.\n{{Related|wbqc-cached-generic}}",
"wbqc-cached-hours": "Message informing the user that a constraint 
check result might be outdated by up to ''n'' hours.\n{{Related|Wbqc-cached}}",
diff --git a/modules/ui/ConstraintReportList.js 
b/modules/ui/ConstraintReportList.js
index a7fe8d8..5fabc26 100644
--- a/modules/ui/ConstraintReportList.js
+++ b/modules/ui/ConstraintReportList.js
@@ -15,7 +15,8 @@
 * constraint: {
 * type: 'Q1',
 * typeLabel: 'my constraint',
-* link: 'http://example.com/my-constraint'
+* link: 'http://example.com/my-constraint',
+* discussLink: 
'https://wikidata.org/Property_talk:P2'
 * },
 * message: 'everything okay'
 * } ),
@@ -24,7 +25,8 @@
 * constraint: {
 * type: 'Q2',
 * typeLabel: 'my other constraint',
-* link: 

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Make constraint report border flush with help link

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

Change subject: Make constraint report border flush with help link
..


Make constraint report border flush with help link

Several refactorings in ConstraintReportPanel. The main visible effect
is that the border between constraint report panels (added by the
gadget’s style sheet) is now flush on the right side with the “help”
text, since the margin is on the whole panel (including the border)
instead of only on the help text.

In preparation for I5814ef1866, the help link is also wrapped inside a
container, and it’s this whole container which floats to the right (and
has a margin, etc.), not just the individual help link.

And finally, the heading gains a class, instead of being identified in
the style sheet as “the first heading inside the panel”.

Bug: T164351
Change-Id: I548b6072191fc5a06bff06858026062047d7a004
---
M modules/ui/ConstraintReportPanel.js
M modules/ui/ConstraintReportPanel.less
2 files changed, 22 insertions(+), 18 deletions(-)

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



diff --git a/modules/ui/ConstraintReportPanel.js 
b/modules/ui/ConstraintReportPanel.js
index 0289eb7..142d799 100644
--- a/modules/ui/ConstraintReportPanel.js
+++ b/modules/ui/ConstraintReportPanel.js
@@ -27,7 +27,8 @@
 * @cfg {Object} constraint The constraint of the report, as returned 
by the wbcheckconstraints API.
 * @cfg {string} [message=''] The message (HTML) of the report, if 
present.
 * @cfg {string[]} [ancillaryMessages=[]] Additional messages (HTML) 
attached to the report, if any.
-* @cfg {jQuery} [$heading] The heading element of the panel. Should 
not contain the help link.
+* @cfg {jQuery} [$heading] The heading element of the panel. Should 
not yet contain the heading links.
+* @cfg {jQuery} [$headingLinks] The container for the links in the 
heading of the panel. Should not yet contain the help link.
 * @cfg {jQuery} [$helpLink] The help link for the heading.
 * @cfg {jQuery} [$message] The message paragraph of the panel.
 * @cfg {jQuery} [$ancillaryMessages] The container of the additional 
messages.
@@ -49,19 +50,18 @@
// Properties
this.status = config.status;
this.constraint = config.constraint;
-   this.$heading = config.$heading || $( '' ).append(
+   this.$heading = config.$heading || $( '' ).append(
$( '' )
.text( this.constraint.typeLabel )
.attr( 'href', this.constraint.link )
.attr( 'target', '_blank' )
);
-   this.$helpLink = config.$helpLink || $( '' ).append(
-   $( '' )
-   .text( mw.message( 
'wbqc-constrainttypehelp-short' ).text() )
-   .attr( 'title', mw.message( 
'wbqc-constrainttypehelp-long' ).text() )
-   .attr( 'href', 
'https://www.wikidata.org/wiki/Help:Property_constraints_portal/' + 
this.constraint.type )
-   .attr( 'target', '_blank' )
-   );
+   this.$headingLinks = config.$headingLinks || $( '' );
+   this.$helpLink = config.$helpLink || $( '' )
+   .text( mw.message( 'wbqc-constrainttypehelp-short' 
).text() )
+   .attr( 'title', mw.message( 
'wbqc-constrainttypehelp-long' ).text() )
+   .attr( 'href', 
'https://www.wikidata.org/wiki/Help:Property_constraints_portal/' + 
this.constraint.type )
+   .attr( 'target', '_blank' );
this.message = config.message;
this.$message = config.$message || $( '' ).html( 
this.message );
this.ancillaryMessages = config.ancillaryMessages;
@@ -78,7 +78,8 @@
this.$element
.addClass( 'wbqc-report' )
.addClass( 'wbqc-report-status-' + this.status );
-   this.$heading.append( this.$helpLink );
+   this.$headingLinks.append( this.$helpLink );
+   this.$heading.append( this.$headingLinks );
this.$element.append( this.$heading );
this.$element.append( this.$message );
this.$element.append( this.$ancillaryMessages );
diff --git a/modules/ui/ConstraintReportPanel.less 
b/modules/ui/ConstraintReportPanel.less
index 78da6d9..b9b936d 100644
--- a/modules/ui/ConstraintReportPanel.less
+++ b/modules/ui/ConstraintReportPanel.less
@@ -1,15 +1,18 @@
 @import 'mediawiki.ui/variables';
 
 .wbqc-report {
-   h4:first-child + p {
-   margin-top: 0;
-   }
+   margin-right: 0.5em;
 
-   

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Make FormatMetadata::flattenArrayReal() work for an associat...

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

Change subject: Make FormatMetadata::flattenArrayReal() work for an associative 
array
..


Make FormatMetadata::flattenArrayReal() work for an associative array

Bug: T87572
Change-Id: I19490ebbbdc3613ae2116c6890ca470bb9f332db
(cherry picked from commit 47a7977b150910562588de89d4c0b684fb25b091)
---
M RELEASE-NOTES-1.27
M includes/media/FormatMetadata.php
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 7917537..0147daa 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -5,6 +5,7 @@
 === Changes since 1.27.4 ===
 * Upgraded Moment.js from v2.8.4 to v2.19.3.
 * (T160298) Fixed Special:ActiveUsers due to bad backport.
+* (T87572) Make FormatMetadata::flattenArrayReal() work for an associative 
array.
 
 == MediaWiki 1.27.4 ==
 This is a security and maintenance release of the MediaWiki 1.27 branch.
diff --git a/includes/media/FormatMetadata.php 
b/includes/media/FormatMetadata.php
index f392bd1..f734386 100644
--- a/includes/media/FormatMetadata.php
+++ b/includes/media/FormatMetadata.php
@@ -1041,7 +1041,7 @@
 
if ( !is_array( $vals ) ) {
return $vals; // do nothing if not an array;
-   } elseif ( count( $vals ) === 1 && $type !== 'lang' ) {
+   } elseif ( count( $vals ) === 1 && $type !== 'lang' && isset( 
$vals[0] ) ) {
return $vals[0];
} elseif ( count( $vals ) === 0 ) {
wfDebug( __METHOD__ . " metadata array with 0 
elements!\n" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19490ebbbdc3613ae2116c6890ca470bb9f332db
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MarkAHershberger 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Make FormatMetadata::flattenArrayReal() work for an associat...

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

Change subject: Make FormatMetadata::flattenArrayReal() work for an associative 
array
..


Make FormatMetadata::flattenArrayReal() work for an associative array

Bug: T87572
Change-Id: I19490ebbbdc3613ae2116c6890ca470bb9f332db
(cherry picked from commit 47a7977b150910562588de89d4c0b684fb25b091)
---
M RELEASE-NOTES-1.30
M includes/media/FormatMetadata.php
2 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index 6823e7b..71b2ebb8 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -1,5 +1,10 @@
 == MediaWiki 1.30 ==
 
+THIS IS NOT A RELEASE YET!
+
+=== Changes since MediaWiki 1.30.0 ===
+* (T87572) Make FormatMetadata::flattenArrayReal() work for an associative 
array.
+
 === Changes since MediaWiki 1.30.0-rc.0 ===
 * Upgraded Moment.js from v2.15.0 to v2.19.3.
 * Add ip_changes to postgres/tables.sql.
diff --git a/includes/media/FormatMetadata.php 
b/includes/media/FormatMetadata.php
index 6cac126..7903223 100644
--- a/includes/media/FormatMetadata.php
+++ b/includes/media/FormatMetadata.php
@@ -1042,7 +1042,7 @@
 
if ( !is_array( $vals ) ) {
return $vals; // do nothing if not an array;
-   } elseif ( count( $vals ) === 1 && $type !== 'lang' ) {
+   } elseif ( count( $vals ) === 1 && $type !== 'lang' && isset( 
$vals[0] ) ) {
return $vals[0];
} elseif ( count( $vals ) === 0 ) {
wfDebug( __METHOD__ . " metadata array with 0 
elements!\n" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19490ebbbdc3613ae2116c6890ca470bb9f332db
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MarkAHershberger 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   >