[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Allow FormId to be prefixed, as required via EntityId

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

Change subject: Allow FormId to be prefixed, as required via EntityId
..


Allow FormId to be prefixed, as required via EntityId

Bug: T180469
Change-Id: Ieee80058fb1b2de7a4a13c6ab108ce2db6ffa7c4
---
M src/DataModel/FormId.php
M tests/phpunit/composer/DataModel/FormIdTest.php
2 files changed, 20 insertions(+), 15 deletions(-)

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



diff --git a/src/DataModel/FormId.php b/src/DataModel/FormId.php
index f5008eb..af6fe77 100644
--- a/src/DataModel/FormId.php
+++ b/src/DataModel/FormId.php
@@ -17,16 +17,14 @@
 * @param string $serialization
 */
public function __construct( $serialization ) {
-   Assert::parameterType( 'string', $serialization, 
'$serialization' );
-   Assert::parameter(
-   preg_match( self::PATTERN, $serialization ),
-   '$serialization',
-   'Form ID must match "' . self::PATTERN . '", given: ' . 
$serialization
-   );
+   parent::__construct( $serialization );
 
-   $this->serialization = $serialization;
-   $this->repositoryName = '';
-   $this->localPart = $serialization;
+   list( , , $id ) = self::splitSerialization( $this->localPart );
+   Assert::parameter(
+   preg_match( self::PATTERN, $id ),
+   '$serialization',
+   'Form ID must match "' . self::PATTERN . '", given: ' . 
$id
+   );
}
 
/**
@@ -55,8 +53,9 @@
 */
public function unserialize( $serialized ) {
$this->serialization = $serialized;
-   $this->repositoryName = '';
-   $this->localPart = $serialized;
+   list( $this->repositoryName, $this->localPart ) = 
$this->extractRepositoryNameAndLocalPart(
+   $serialized
+   );
}
 
 }
diff --git a/tests/phpunit/composer/DataModel/FormIdTest.php 
b/tests/phpunit/composer/DataModel/FormIdTest.php
index 9b3df39..57ae229 100644
--- a/tests/phpunit/composer/DataModel/FormIdTest.php
+++ b/tests/phpunit/composer/DataModel/FormIdTest.php
@@ -16,11 +16,19 @@
 class FormIdTest extends PHPUnit_Framework_TestCase {
 
public function 
testGivenValidSerialization_allGettersBehaveConsistent() {
-   $id = new FormId( 'L1-F1' );
+   $id = new FormId( ':L1-F1' );
$this->assertSame( 'L1-F1', $id->getSerialization() );
$this->assertSame( '', $id->getRepositoryName(), 
'getRepositoryName' );
$this->assertSame( 'L1-F1', $id->getLocalPart(), 'getLocalPart' 
);
$this->assertFalse( $id->isForeign(), 'isForeign' );
+   }
+
+   public function testGivenNonEmptyPrefix_allGettersBehaveConsistent() {
+   $id = new FormId( 'repo:L1-F1' );
+   $this->assertSame( 'repo:L1-F1', $id->getSerialization() );
+   $this->assertSame( 'repo', $id->getRepositoryName(), 
'getRepositoryName' );
+   $this->assertSame( 'L1-F1', $id->getLocalPart(), 'getLocalPart' 
);
+   $this->assertTrue( $id->isForeign(), 'isForeign' );
}
 
public function provideInvalidSerializations() {
@@ -35,8 +43,6 @@
[ '  L1-F1  ' ],
[ "L1-F1\n" ],
[ 'P1' ],
-   [ ':L1-F1' ],
-   [ 'repo:L1-F1' ],
];
}
 
@@ -49,7 +55,7 @@
}
 
public function testPhpSerializationRoundtrip() {
-   $id = new FormId( 'L1-F1' );
+   $id = new FormId( 'repo:L1-F1' );
$this->assertEquals( $id, unserialize( serialize( $id ) ) );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieee80058fb1b2de7a4a13c6ab108ce2db6ffa7c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: WMDE-leszek 
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...WikibaseLexeme[master]: Make FormId extend EntityId

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

Change subject: Make FormId extend EntityId
..


Make FormId extend EntityId

This patch is intentionally as small as it can be. The FormId class is
now an EntityId, but it does not allow prefixed ("foreign") IDs. This is
currently not needed. I'm aware this violates LSP, but I suggest to accept
this for now and change it later when we need FormIds that point to foreign
Wikibase repositories.

Bug: T180469
Change-Id: I505e5dd96d665196885a019c73754aea350b1ac0
---
M src/DataModel/FormId.php
M tests/phpunit/composer/DataModel/FormIdTest.php
2 files changed, 38 insertions(+), 7 deletions(-)

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



diff --git a/src/DataModel/FormId.php b/src/DataModel/FormId.php
index 63a1c3f..f5008eb 100644
--- a/src/DataModel/FormId.php
+++ b/src/DataModel/FormId.php
@@ -2,20 +2,16 @@
 
 namespace Wikibase\Lexeme\DataModel;
 
+use Wikibase\DataModel\Entity\EntityId;
 use Wikimedia\Assert\Assert;
 
 /**
  * @license GPL-2.0+
  * @author Thiemo Mättig
  */
-class FormId {
+class FormId extends EntityId {
 
const PATTERN = '/^L[1-9]\d*-F[1-9]\d*\z/';
-
-   /**
-* @var string
-*/
-   private $serialization;
 
/**
 * @param string $serialization
@@ -29,6 +25,15 @@
);
 
$this->serialization = $serialization;
+   $this->repositoryName = '';
+   $this->localPart = $serialization;
+   }
+
+   /**
+* @return string
+*/
+   public function getEntityType() {
+   return 'form';
}
 
/**
@@ -38,4 +43,20 @@
return $this->serialization;
}
 
+   /**
+* @return string
+*/
+   public function serialize() {
+   return $this->serialization;
+   }
+
+   /**
+* @param string $serialized
+*/
+   public function unserialize( $serialized ) {
+   $this->serialization = $serialized;
+   $this->repositoryName = '';
+   $this->localPart = $serialized;
+   }
+
 }
diff --git a/tests/phpunit/composer/DataModel/FormIdTest.php 
b/tests/phpunit/composer/DataModel/FormIdTest.php
index 65052c7..9b3df39 100644
--- a/tests/phpunit/composer/DataModel/FormIdTest.php
+++ b/tests/phpunit/composer/DataModel/FormIdTest.php
@@ -15,9 +15,12 @@
  */
 class FormIdTest extends PHPUnit_Framework_TestCase {
 
-   public function testGivenValidSerialization_getSerializationReturnsIt() 
{
+   public function 
testGivenValidSerialization_allGettersBehaveConsistent() {
$id = new FormId( 'L1-F1' );
$this->assertSame( 'L1-F1', $id->getSerialization() );
+   $this->assertSame( '', $id->getRepositoryName(), 
'getRepositoryName' );
+   $this->assertSame( 'L1-F1', $id->getLocalPart(), 'getLocalPart' 
);
+   $this->assertFalse( $id->isForeign(), 'isForeign' );
}
 
public function provideInvalidSerializations() {
@@ -32,6 +35,8 @@
[ '  L1-F1  ' ],
[ "L1-F1\n" ],
[ 'P1' ],
+   [ ':L1-F1' ],
+   [ 'repo:L1-F1' ],
];
}
 
@@ -43,4 +48,9 @@
new FormId( $id );
}
 
+   public function testPhpSerializationRoundtrip() {
+   $id = new FormId( 'L1-F1' );
+   $this->assertEquals( $id, unserialize( serialize( $id ) ) );
+   }
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I505e5dd96d665196885a019c73754aea350b1ac0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: WMDE-leszek 
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]: profile::mariadb::misc::el::replication: fix el cleaner cronjob

2017-11-21 Thread Elukey (Code Review)
Elukey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392788 )

Change subject: profile::mariadb::misc::el::replication: fix el cleaner cronjob
..

profile::mariadb::misc::el::replication: fix el cleaner cronjob

Bug: T156933
Change-Id: I5ee086190e48e1dfb75058ca4d3d7f480e1adb50
---
M modules/profile/files/mariadb/misc/eventlogging/eventlogging_sync_rsyslog.conf
M modules/profile/manifests/mariadb/misc/eventlogging/replication.pp
2 files changed, 17 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/392788/1

diff --git 
a/modules/profile/files/mariadb/misc/eventlogging/eventlogging_sync_rsyslog.conf
 
b/modules/profile/files/mariadb/misc/eventlogging/eventlogging_sync_rsyslog.conf
index bf8daca..8ef2eba 100644
--- 
a/modules/profile/files/mariadb/misc/eventlogging/eventlogging_sync_rsyslog.conf
+++ 
b/modules/profile/files/mariadb/misc/eventlogging/eventlogging_sync_rsyslog.conf
@@ -1,3 +1,3 @@
 # rsyslogd(8) configuration file for eventlogging_sync.
 # This file is managed by Puppet.
-:programname, startswith, "eventlogging_sync" /var/log/eventlogging_sync.log
+:programname, startswith, "eventlogging_sync" 
/var/log/eventlogging/eventlogging_sync.log
diff --git a/modules/profile/manifests/mariadb/misc/eventlogging/replication.pp 
b/modules/profile/manifests/mariadb/misc/eventlogging/replication.pp
index 2697e43..7d7ede5 100644
--- a/modules/profile/manifests/mariadb/misc/eventlogging/replication.pp
+++ b/modules/profile/manifests/mariadb/misc/eventlogging/replication.pp
@@ -57,6 +57,13 @@
 mode   => '0755',
 }
 
+file { '/var/log/eventlogging':
+ensure => 'directory',
+owner  => 'root',
+group  => 'eventlog',
+mode   => '0775',
+}
+
 file { '/etc/eventlogging/whitelist.tsv':
 ensure  => 'present',
 owner   => 'root',
@@ -76,7 +83,7 @@
 
 logrotate::rule { 'eventlogging':
 ensure=> present,
-file_glob => '/var/log/eventlogging_*.log',
+file_glob => '/var/log/eventlogging/eventlogging_*.log',
 frequency => 'daily',
 copy_truncate => true,
 compress  => true,
@@ -123,15 +130,18 @@
 # without doing any action to the db. This is useful to avoid gaps in
 # records sanitized if the script fails and does not commit a new 
timestamp.
 $eventlogging_cleaner_command = '/usr/local/bin/eventlogging_cleaner 
--whitelist /etc/eventlogging/whitelist.tsv --older-than 90 --start-ts-file 
/var/run/eventlogging_cleaner --batch-size 1 --sleep-between-batches 2'
-$command = "/usr/bin/flock --verbose -n /var/lock/eventlogging_cleaner 
${eventlogging_cleaner_command} >> /var/log/eventlogging_cleaner.log"
+$command = "/usr/bin/flock --verbose -n /var/lock/eventlogging_cleaner 
${eventlogging_cleaner_command} >> 
/var/log/eventlogging/eventlogging_cleaner.log"
 cron { 'eventlogging_cleaner daily sanitization':
-ensure  => present,
-command => $command,
-user=> 'eventlogcleaner',
-hour=> 1,
+ensure  => present,
+command => $command,
+user=> 'eventlogcleaner',
+minute  => 0,
+hour=> 11,
+environment => 'MAILTO=analytics-ale...@wikimedia.org',
 require => [
 File['/usr/local/bin/eventlogging_cleaner'],
 File['/etc/eventlogging/whitelist.tsv'],
+File['/var/log/eventlogging'],
 User['eventlogcleaner'],
 ]
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Add references to the documentation of all DataModel classes

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

Change subject: Add references to the documentation of all DataModel classes
..


Add references to the documentation of all DataModel classes

Change-Id: Ife9c2d74e8046e00ee89648024882407e6acaca0
---
M src/DataModel/Form.php
M src/DataModel/FormId.php
M src/DataModel/Lexeme.php
M src/DataModel/LexemeId.php
M src/DataModel/Sense.php
M src/DataModel/SenseId.php
6 files changed, 25 insertions(+), 2 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/DataModel/Form.php b/src/DataModel/Form.php
index 2ba1464..f536893 100644
--- a/src/DataModel/Form.php
+++ b/src/DataModel/Form.php
@@ -10,6 +10,11 @@
 use Wikimedia\Assert\Assert;
 
 /**
+ * Mutable (e.g. the provided StatementList can be changed) implementation of 
a Lexeme's form in the
+ * lexiographical data model.
+ *
+ * @see https://www.mediawiki.org/wiki/Extension:WikibaseLexeme/Data_Model#Form
+ *
  * @license GPL-2.0+
  */
 class Form implements StatementListProvider {
diff --git a/src/DataModel/FormId.php b/src/DataModel/FormId.php
index 63a1c3f..8ae3cd4 100644
--- a/src/DataModel/FormId.php
+++ b/src/DataModel/FormId.php
@@ -5,6 +5,10 @@
 use Wikimedia\Assert\Assert;
 
 /**
+ * Immutable ID of a Lexeme' form in the lexiographical data model.
+ *
+ * @see https://www.mediawiki.org/wiki/Extension:WikibaseLexeme/Data_Model#Form
+ *
  * @license GPL-2.0+
  * @author Thiemo Mättig
  */
diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php
index 2f5dd43..2b64c7d 100644
--- a/src/DataModel/Lexeme.php
+++ b/src/DataModel/Lexeme.php
@@ -13,6 +13,11 @@
 use Wikibase\DataModel\Term\TermList;
 
 /**
+ * Mutable (e.g. the provided StatementList can be changed) implementation of 
a Lexeme in the
+ * lexiographical data model.
+ *
+ * @see 
https://www.mediawiki.org/wiki/Extension:WikibaseLexeme/Data_Model#Lexeme
+ *
  * @license GPL-2.0+
  */
 class Lexeme implements EntityDocument, StatementListProvider {
diff --git a/src/DataModel/LexemeId.php b/src/DataModel/LexemeId.php
index 9a95d9a..28312b7 100644
--- a/src/DataModel/LexemeId.php
+++ b/src/DataModel/LexemeId.php
@@ -9,6 +9,10 @@
 use RuntimeException;
 
 /**
+ * Immutable ID of a Lexeme in the lexiographical data model.
+ *
+ * @see 
https://www.mediawiki.org/wiki/Extension:WikibaseLexeme/Data_Model#Lexeme
+ *
  * @license GPL-2.0+
  */
 class LexemeId extends EntityId implements Int32EntityId {
diff --git a/src/DataModel/Sense.php b/src/DataModel/Sense.php
index bf48aab..e8469bd 100644
--- a/src/DataModel/Sense.php
+++ b/src/DataModel/Sense.php
@@ -6,7 +6,10 @@
 use Wikibase\DataModel\Term\TermList;
 
 /**
- * A sense of a Lexeme.
+ * Mutable (e.g. the provided StatementList can be changed) implementation of 
a Lexeme's sense in
+ * the lexiographical data model.
+ *
+ * @see 
https://www.mediawiki.org/wiki/Extension:WikibaseLexeme/Data_Model#Sense
  *
  * @license GPL-2.0+
  */
diff --git a/src/DataModel/SenseId.php b/src/DataModel/SenseId.php
index 61e8060..b5437b6 100644
--- a/src/DataModel/SenseId.php
+++ b/src/DataModel/SenseId.php
@@ -3,7 +3,9 @@
 namespace Wikibase\Lexeme\DataModel;
 
 /**
- * An ID of a sense of a lexeme.
+ * Immutable ID of a Lexeme's sense in the lexiographical data model.
+ *
+ * @see 
https://www.mediawiki.org/wiki/Extension:WikibaseLexeme/Data_Model#Sense
  *
  * @license GPL-2.0+
  */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife9c2d74e8046e00ee89648024882407e6acaca0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/software[master]: s1, s5.hosts: Move db1051 from s1 to s5

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

Change subject: s1,s5.hosts: Move db1051 from s1 to s5
..


s1,s5.hosts: Move db1051 from s1 to s5

Remove db1051 from s1 and move it to s5. It will become the new
vslow,dump server for s5.
It will be cloned from db1063 which will be vslow,dump for s8.

Bug: T177208
Change-Id: Ib4669161dc6a61d68e78c2cc9c9acc755a301a9e
---
M dbtools/s1.hosts
M dbtools/s5.hosts
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/dbtools/s1.hosts b/dbtools/s1.hosts
index 32cdc7c..1fb5084 100644
--- a/dbtools/s1.hosts
+++ b/dbtools/s1.hosts
@@ -26,7 +26,6 @@
 db1066.eqiad.wmnet 3306
 db1065.eqiad.wmnet 3306
 db1055.eqiad.wmnet 3306
-db1051.eqiad.wmnet 3306
 db1067.eqiad.wmnet 3306
 db1105.eqiad.wmnet 3311
 db1052.eqiad.wmnet 3306
diff --git a/dbtools/s5.hosts b/dbtools/s5.hosts
index a791d60..cff2b7a 100644
--- a/dbtools/s5.hosts
+++ b/dbtools/s5.hosts
@@ -36,4 +36,5 @@
 db1109.eqiad.wmnet 3306
 db1110.eqiad.wmnet 3306
 db1063.eqiad.wmnet 3306
+db1051.eqiad.wmnet 3306
 db1070.eqiad.wmnet 3306

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4669161dc6a61d68e78c2cc9c9acc755a301a9e
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/software[master]: s1, s5.hosts: Move db1051 from s1 to s5

2017-11-21 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392787 )

Change subject: s1,s5.hosts: Move db1051 from s1 to s5
..

s1,s5.hosts: Move db1051 from s1 to s5

Remove db1051 from s1 and move it to s5. It will become the new
vslow,dump server for s5.
It will be cloned from db1063 which will be vslow,dump for s8.

Bug: T177208
Change-Id: Ib4669161dc6a61d68e78c2cc9c9acc755a301a9e
---
M dbtools/s1.hosts
M dbtools/s5.hosts
2 files changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/87/392787/1

diff --git a/dbtools/s1.hosts b/dbtools/s1.hosts
index 32cdc7c..1fb5084 100644
--- a/dbtools/s1.hosts
+++ b/dbtools/s1.hosts
@@ -26,7 +26,6 @@
 db1066.eqiad.wmnet 3306
 db1065.eqiad.wmnet 3306
 db1055.eqiad.wmnet 3306
-db1051.eqiad.wmnet 3306
 db1067.eqiad.wmnet 3306
 db1105.eqiad.wmnet 3311
 db1052.eqiad.wmnet 3306
diff --git a/dbtools/s5.hosts b/dbtools/s5.hosts
index a791d60..cff2b7a 100644
--- a/dbtools/s5.hosts
+++ b/dbtools/s5.hosts
@@ -36,4 +36,5 @@
 db1109.eqiad.wmnet 3306
 db1110.eqiad.wmnet 3306
 db1063.eqiad.wmnet 3306
+db1051.eqiad.wmnet 3306
 db1070.eqiad.wmnet 3306

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4669161dc6a61d68e78c2cc9c9acc755a301a9e
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Marostegui 

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


[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Build the lineardoc in Pageloader and pass to segmenter

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

Change subject: Build the lineardoc in Pageloader and pass to segmenter
..


Build the lineardoc in Pageloader and pass to segmenter

This will allow us to segmentation, section wrapping, category
adaptation etc in pageloader without requiring to build the doc
more than once.

Change-Id: I49204f07a11e149e2867b35d250d46023eecbcc5
Ref: I94d5250847a6287becf411eacfc1bdd64bfe7ad3
---
M bin/segment
M lib/mw/MWPageLoader.js
M lib/segmentation/CXSegmenter.js
M test/segmentation/CXSegmenter.test.js
4 files changed, 41 insertions(+), 38 deletions(-)

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



diff --git a/bin/segment b/bin/segment
index c32dc2a..2a18675 100755
--- a/bin/segment
+++ b/bin/segment
@@ -10,6 +10,13 @@
return normalizer.getHtml();
 }
 
+function getParsedDoc( content ) {
+   const parser = new LinearDoc.Parser( new LinearDoc.MwContextualizer() );
+   parser.init();
+   parser.write( content );
+   return parser.builder.doc;
+}
+
 const html = fs.readFileSync( '/dev/stdin', 'utf8' );
 if ( html.trim() === '' ) {
const script = process.argv[ 1 ];
@@ -21,7 +28,8 @@
 
 }
 
-const segmenter = new Segmenter( html, 'en' );
-segmenter.segment();
-const result = normalize( segmenter.getSegmentedContent() );
+let parsedDoc = getParsedDoc( html );
+let segmenter = new Segmenter();
+let segmentedLinearDoc = segmenter.segment( parsedDoc, 'en' );
+const result = normalize( segmentedLinearDoc.getHtml() );
 process.stdout.write( result + '\n' );
diff --git a/lib/mw/MWPageLoader.js b/lib/mw/MWPageLoader.js
index 57147fd..e9c5941 100644
--- a/lib/mw/MWPageLoader.js
+++ b/lib/mw/MWPageLoader.js
@@ -1,18 +1,27 @@
 'use strict';
 
 const ApiRequest = require( '../mw/ApiRequest' ),
+   LinearDoc = require( '../lineardoc' ),
CXSegmenter = require( '../segmentation/CXSegmenter' );
 
 class MWPageLoader extends ApiRequest {
getPage( page, revision ) {
return this.fetch( page, revision ).then( ( response ) => {
-   let segmentedDoc = this.segment( response.body );
+   const parsedDoc = this.getParsedDoc( response.body );
+   const segmentedDoc = new CXSegmenter().segment( 
parsedDoc, this.sourceLanguage );
// TODO: segmentedDoc.wrapSections();
return {
content: segmentedDoc.getHtml(),
revision: response.revision
};
} );
+   }
+
+   getParsedDoc( content ) {
+   const parser = new LinearDoc.Parser( new 
LinearDoc.MwContextualizer() );
+   parser.init();
+   parser.write( content );
+   return parser.builder.doc;
}
 
/**
@@ -46,13 +55,6 @@
};
} );
}
-
-   segment( pageContent ) {
-   const segmenter = new CXSegmenter( pageContent, 
this.sourceLanguage );
-   segmenter.segment();
-   return segmenter.getSegmentedDoc();
-   }
-
 }
 
 module.exports = MWPageLoader;
diff --git a/lib/segmentation/CXSegmenter.js b/lib/segmentation/CXSegmenter.js
index a1f793c..0df6630 100644
--- a/lib/segmentation/CXSegmenter.js
+++ b/lib/segmentation/CXSegmenter.js
@@ -1,22 +1,17 @@
 'use strict';
 
-var LinearDoc = require( '../lineardoc' ),
-   segmenters = require( __dirname + '/languages' ).Segmenters;
+var segmenters = require( __dirname + '/languages' ).Segmenters;
 
 class CXSegmenter {
-   constructor( content, language ) {
-   this.parser = new LinearDoc.Parser( new 
LinearDoc.MwContextualizer() );
-   this.parser.init();
-   this.getBoundaries = this.getSegmenter( language );
-   this.content = content;
-   this.originalDoc = null;
-   this.segmentedDoc = null;
-   }
 
-   segment() {
-   this.parser.write( this.content );
-   this.originalDoc = this.parser.builder.doc;
-   this.segmentedDoc = this.originalDoc.segment( 
this.getBoundaries );
+   /**
+* Segment the given parsed linear document object
+* @param {Object} parsedDoc
+* @param {string} language
+* @return {Object}
+*/
+   segment( parsedDoc, language ) {
+   return parsedDoc.segment( this.getSegmenter( language ) );
}
 
/**
@@ -36,15 +31,6 @@
 
return segmenter.getBoundaries;
}
-
-   getSegmentedContent() {
-   return this.segmentedDoc.getHtml();
-   }
-
-   getSegmentedDoc() {
-   return this.segmentedDoc;
-   }
-
 }
 
 module.exports = CXSegmenter;
diff --git 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb: Move db1051 from s1 to s5

2017-11-21 Thread Marostegui (Code Review)
Marostegui has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392786 )

Change subject: mariadb: Move db1051 from s1 to s5
..


mariadb: Move db1051 from s1 to s5

Remove db1051 from s1 and move it to s5. It will become the new
vslow,dump server for s5.
It will be cloned from db1063 which will be vslow,dump for s8.

Bug: T177208
Change-Id: I993d25153548d0bf4267c8d11f9679236ee530cc
---
M hieradata/hosts/db1051.yaml
M manifests/site.pp
M modules/role/files/prometheus/mysql-core_eqiad.yaml
3 files changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/hieradata/hosts/db1051.yaml b/hieradata/hosts/db1051.yaml
index b1bf6dc..0d8bce2 100644
--- a/hieradata/hosts/db1051.yaml
+++ b/hieradata/hosts/db1051.yaml
@@ -1,2 +1 @@
-mariadb::shard: 's1'
-mariadb::socket: '/tmp/mysql.sock'
+mariadb::shard: 's5'
diff --git a/manifests/site.pp b/manifests/site.pp
index 1a8ebb3..c1d8a57 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -331,7 +331,7 @@
 role(mariadb::core)
 }
 # eqiad replicas
-node /^db10(51|55|65|66|67|73|80|83|89)\.eqiad\.wmnet/ {
+node /^db10(55|65|66|67|73|80|83|89)\.eqiad\.wmnet/ {
 role(mariadb::core)
 }
 
@@ -430,7 +430,7 @@
 role(mariadb::core)
 }
 
-node /^db1(063|071|082|087|092|096|099|100|104|106|109|110)\.eqiad\.wmnet/ {
+node /^db1(051|063|071|082|087|092|096|099|100|104|106|109|110)\.eqiad\.wmnet/ 
{
 role(mariadb::core)
 }
 
diff --git a/modules/role/files/prometheus/mysql-core_eqiad.yaml 
b/modules/role/files/prometheus/mysql-core_eqiad.yaml
index 97ce308..5170fe2 100644
--- a/modules/role/files/prometheus/mysql-core_eqiad.yaml
+++ b/modules/role/files/prometheus/mysql-core_eqiad.yaml
@@ -2,7 +2,6 @@
 shard: s1
 role: slave
   targets:
-  - db1051:9104
   - db1055:9104
   - db1065:9104
   - db1066:9104
@@ -71,6 +70,7 @@
 shard: s5
 role: slave
   targets:
+  - db1051:9104
   - db1070:9104
   - db1071:9104
   - db1082:9104

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I993d25153548d0bf4267c8d11f9679236ee530cc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Move db1051 to s5

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

Change subject: db-eqiad.php: Move db1051 to s5
..


db-eqiad.php: Move db1051 to s5

Remove db1051 from s1 and move it to s5. It will become the new
vslow,dump server for s5.
It will be cloned from db1063 which will be vslow,dump for s8.

Bug: T177208
Change-Id: I1250ebdd06f5e9838254bcc4129da0a39633a056
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index f1645cc..519d75b 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -103,7 +103,6 @@
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
'db1067' => 0,   # D1 2.8TB 160GB, old master
-   # 'db1051' => 1,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager #T177208
'db1055' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
'db1066' => 50,  # D1 2.8TB 160GB, api
@@ -144,7 +143,8 @@
],
's5' => [
'db1070' => 0,   # D1 2.8TB 160GB, master
-   # 'db1063' => 0,   # C5 2.8TB 128GB, master, crashed #T180714
+   # 'db1051' => 1,  # B3 2.8TB  96GB, vslow, dump in s5
+   # 'db1063' => 0,   # C5 2.8TB 128GB, vslow, dump in s8
# 'db1071' => 1,   # D1 2.8TB 160GB, future s8 master
'db1082' => 300, # A2 3.6TB 512GB, api
'db1087' => 500, # C2 3.6TB 512GB
@@ -249,27 +249,22 @@
 'groupLoadsBySection' => [
's1' => [
'watchlist' => [
-   # 'db1051' => 1,
'db1055' => 1,
'db1105:3311' => 1,
],
'recentchanges' => [
-   # 'db1051' => 1,
'db1055' => 1,
'db1105:3311' => 1,
],
'recentchangeslinked' => [
-   # 'db1051' => 1,
'db1055' => 1,
'db1105:3311' => 1,
],
'contributions' => [
-   # 'db1051' => 1,
'db1055' => 1,
'db1105:3311' => 1,
],
'logpager' => [
-   # 'db1051' => 1,
'db1055' => 1,
'db1105:3311' => 1,
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1250ebdd06f5e9838254bcc4129da0a39633a056
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
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] operations/puppet[production]: mariadb: Move db1051 from s1 to s5

2017-11-21 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392786 )

Change subject: mariadb: Move db1051 from s1 to s5
..

mariadb: Move db1051 from s1 to s5

Remove db1051 from s1 and move it to s5. It will become the new
vslow,dump server for s5.
It will be cloned from db1063 which will be vslow,dump for s8.

Bug: T177208
Change-Id: I993d25153548d0bf4267c8d11f9679236ee530cc
---
M hieradata/hosts/db1051.yaml
M manifests/site.pp
M modules/role/files/prometheus/mysql-core_eqiad.yaml
3 files changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/392786/1

diff --git a/hieradata/hosts/db1051.yaml b/hieradata/hosts/db1051.yaml
index b1bf6dc..0d8bce2 100644
--- a/hieradata/hosts/db1051.yaml
+++ b/hieradata/hosts/db1051.yaml
@@ -1,2 +1 @@
-mariadb::shard: 's1'
-mariadb::socket: '/tmp/mysql.sock'
+mariadb::shard: 's5'
diff --git a/manifests/site.pp b/manifests/site.pp
index 1a8ebb3..c1d8a57 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -331,7 +331,7 @@
 role(mariadb::core)
 }
 # eqiad replicas
-node /^db10(51|55|65|66|67|73|80|83|89)\.eqiad\.wmnet/ {
+node /^db10(55|65|66|67|73|80|83|89)\.eqiad\.wmnet/ {
 role(mariadb::core)
 }
 
@@ -430,7 +430,7 @@
 role(mariadb::core)
 }
 
-node /^db1(063|071|082|087|092|096|099|100|104|106|109|110)\.eqiad\.wmnet/ {
+node /^db1(051|063|071|082|087|092|096|099|100|104|106|109|110)\.eqiad\.wmnet/ 
{
 role(mariadb::core)
 }
 
diff --git a/modules/role/files/prometheus/mysql-core_eqiad.yaml 
b/modules/role/files/prometheus/mysql-core_eqiad.yaml
index 97ce308..5170fe2 100644
--- a/modules/role/files/prometheus/mysql-core_eqiad.yaml
+++ b/modules/role/files/prometheus/mysql-core_eqiad.yaml
@@ -2,7 +2,6 @@
 shard: s1
 role: slave
   targets:
-  - db1051:9104
   - db1055:9104
   - db1065:9104
   - db1066:9104
@@ -71,6 +70,7 @@
 shard: s5
 role: slave
   targets:
+  - db1051:9104
   - db1070:9104
   - db1071:9104
   - db1082:9104

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Move db1051 to s5

2017-11-21 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392785 )

Change subject: db-eqiad.php: Move db1051 to s5
..

db-eqiad.php: Move db1051 to s5

Remove db1051 from s1 and move it to s5. It will become the new
vslow,dump server for s5.
It will be cloned from db1063 which will be vslow,dump for s8.

Bug: T177208
Change-Id: I1250ebdd06f5e9838254bcc4129da0a39633a056
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 7 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index f1645cc..519d75b 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -103,7 +103,6 @@
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
'db1067' => 0,   # D1 2.8TB 160GB, old master
-   # 'db1051' => 1,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager #T177208
'db1055' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
'db1066' => 50,  # D1 2.8TB 160GB, api
@@ -144,7 +143,8 @@
],
's5' => [
'db1070' => 0,   # D1 2.8TB 160GB, master
-   # 'db1063' => 0,   # C5 2.8TB 128GB, master, crashed #T180714
+   # 'db1051' => 1,  # B3 2.8TB  96GB, vslow, dump in s5
+   # 'db1063' => 0,   # C5 2.8TB 128GB, vslow, dump in s8
# 'db1071' => 1,   # D1 2.8TB 160GB, future s8 master
'db1082' => 300, # A2 3.6TB 512GB, api
'db1087' => 500, # C2 3.6TB 512GB
@@ -249,27 +249,22 @@
 'groupLoadsBySection' => [
's1' => [
'watchlist' => [
-   # 'db1051' => 1,
'db1055' => 1,
'db1105:3311' => 1,
],
'recentchanges' => [
-   # 'db1051' => 1,
'db1055' => 1,
'db1105:3311' => 1,
],
'recentchangeslinked' => [
-   # 'db1051' => 1,
'db1055' => 1,
'db1105:3311' => 1,
],
'contributions' => [
-   # 'db1051' => 1,
'db1055' => 1,
'db1105:3311' => 1,
],
'logpager' => [
-   # 'db1051' => 1,
'db1055' => 1,
'db1105:3311' => 1,
],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master]: Remove dead code to mess with $wgVersion

2017-11-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392784 )

Change subject: Remove dead code to mess with $wgVersion
..

Remove dead code to mess with $wgVersion

This code was supposed to set the Debian version of the package as $wgVersion,
but it was broken. Regardless of that, it's a bad idea as it would break the
compatibility checking used in extension.json since the version number would
no longer be semver compliant.

Change-Id: I83d1ba1f51a45d352000df840106c488b78485ca
---
M debian/changelog
M debian/rules
2 files changed, 2 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/84/392784/1

diff --git a/debian/changelog b/debian/changelog
index 9adb278..61435fa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,8 +7,9 @@
   * Use debhelper compat 10
   * Add a systemd unit to run runJobs.php as a service
   * Get rid of unnecessary dh_installdeb override
+  * Remove dead code to mess with $wgVersion
 
- -- Kunal Mehta   Tue, 21 Nov 2017 22:16:34 -0800
+ -- Kunal Mehta   Tue, 21 Nov 2017 22:20:52 -0800
 
 mediawiki (1:1.27.4-1) unstable; urgency=medium
 
diff --git a/debian/rules b/debian/rules
index efea41f..ab8ace8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,9 +1,5 @@
 #!/usr/bin/make -f
 
-DEB_VERSION:=$(shell dpkg-parsechangelog -n1 | sed -n '/^Version: /s///p')
-DEB_NOEPOCH_VERSION:=$(shell DEB_VERSION=${DEB_VERSION}; echo 
$${DEB_VERSION\#*:})
-DEB_UPSTREAM_VERSION:=$(shell DEB_NOEPOCH_VERSION=${DEB_NOEPOCH_VERSION}; echo 
$${DEB_NOEPOCH_VERSION%+dfsg-*})
-
 override_dh_install:
dh_install
# Now some tidying up is required
@@ -28,9 +24,6 @@
done
# Remove Makefiles
find debian/mediawiki/ -iname makefile -exec rm {} \;
-   # Put debian version for mediawiki version..
-   sed -e "s#$(DEB_UPSTREAM_VERSION)#$(DEB_NOEPOCH_VERSION)#" \
-   -i 
debian/mediawiki/usr/share/mediawiki/includes/DefaultSettings.php
# Move extensions
mkdir -p debian/mediawiki/usr/share/doc/mediawiki
mv debian/mediawiki/var/lib/mediawiki/extensions/README \

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83d1ba1f51a45d352000df840106c488b78485ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
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/core[master]: SpecialUnblock: Remove addModules( 'mediawiki.special' )

2017-11-21 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392783 )

Change subject: SpecialUnblock: Remove addModules( 'mediawiki.special' )
..

SpecialUnblock: Remove addModules( 'mediawiki.special' )

The special page Special:Unblock does not use the styles from the style
module 'mediawiki.special'.

Change-Id: Ia24a71b1b1fc7c7da9423a07adf9b67db336a1ff
---
M includes/specials/SpecialUnblock.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/83/392783/1

diff --git a/includes/specials/SpecialUnblock.php 
b/includes/specials/SpecialUnblock.php
index 0da9b7a..b2d5a16 100644
--- a/includes/specials/SpecialUnblock.php
+++ b/includes/specials/SpecialUnblock.php
@@ -57,7 +57,7 @@
 
$out = $this->getOutput();
$out->setPageTitle( $this->msg( 'unblockip' ) );
-   $out->addModules( [ 'mediawiki.special', 
'mediawiki.userSuggest' ] );
+   $out->addModules( [ 'mediawiki.userSuggest' ] );
 
$form = HTMLForm::factory( 'ooui', $this->getFields(), 
$this->getContext() );
$form->setWrapperLegendMsg( 'unblockip' );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master]: Get rid of unnecessary dh_installdeb override

2017-11-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392782 )

Change subject: Get rid of unnecessary dh_installdeb override
..

Get rid of unnecessary dh_installdeb override

CVS hasn't been used in ages, .gitignore files are stripped out during the
tarball build process, and I haven't seen any .arch-ids files.

Change-Id: Id309ccbb820668e1fd41d0335075fb4fb9b62ade
---
M debian/changelog
M debian/rules
2 files changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/82/392782/1

diff --git a/debian/changelog b/debian/changelog
index 0349d93..9adb278 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,9 @@
   * Upgrade php-apcu to a Recommends
   * Use debhelper compat 10
   * Add a systemd unit to run runJobs.php as a service
+  * Get rid of unnecessary dh_installdeb override
 
- -- Kunal Mehta   Tue, 21 Nov 2017 22:10:02 -0800
+ -- Kunal Mehta   Tue, 21 Nov 2017 22:16:34 -0800
 
 mediawiki (1:1.27.4-1) unstable; urgency=medium
 
diff --git a/debian/rules b/debian/rules
index 57eb05d..efea41f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,10 +46,6 @@
# includes/libs is provided by mediawiki-classes
rm -rf debian/mediawiki/usr/share/mediawiki/includes/libs
 
-override_dh_installdeb:
-   find debian/mediawiki -depth \( -name ".cvsignore" -o -name 
".gitignore" -o -name ".arch-ids" \) -exec rm -rf {} \;
-   dh_installdeb
-
 override_dh_systemd_enable:
# Do not enable by default, the user needs to manually
# configure MediaWiki first.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id309ccbb820668e1fd41d0335075fb4fb9b62ade
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
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/core[fundraising/REL1_27]: Update DonationInterface submodule

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

Change subject: Update DonationInterface submodule
..


Update DonationInterface submodule

Change-Id: I6e2c2d53a0e325de52c0a5d5c018611d83f0161a
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index f03cbc2..cb15382 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit f03cbc2c9431624afcac7ef60d1ce1a6ac7cc408
+Subproject commit cb15382dbc4c8cef6c4d50fade56a6b1e8dee772

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e2c2d53a0e325de52c0a5d5c018611d83f0161a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master]: Add a systemd unit to run runJobs.php as a service

2017-11-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392781 )

Change subject: Add a systemd unit to run runJobs.php as a service
..

Add a systemd unit to run runJobs.php as a service

Using --wait, the script will act as a daemon and just wait for new jobs
to come in and then immediately process them.

The main concern with such a setup is that runJobs.php needs to restart to
pick up code and configuration changes. We set --maxjobs=50 so it restarts
somewhat regularly, and set a timeout of 5 minutes, after which it will sleep
for 15 seconds and then restart.

This service is not enabled by default since after installing the package you
still need to manually install MediaWiki before this can be run.

Ideally we could set something like `After=mysql.service` but we don't
actually know the database backend being used. It's possible this will
be a race condition but the script will just crash and restart in 15
seconds, hopefully by then MySQL would be up.

This is inspired by the setup translatewiki.net has, and thanks to Nikerabbit
for explaining it to me.

Bug: T160035
Change-Id: Iec3ee0ab72f8caf8cbc1da005cd53b7b6d20e2c1
---
A debian/mediawiki.mediawiki-jobrunner.service
M debian/rules
2 files changed, 28 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/81/392781/1

diff --git a/debian/mediawiki.mediawiki-jobrunner.service 
b/debian/mediawiki.mediawiki-jobrunner.service
new file mode 100644
index 000..6ac53da
--- /dev/null
+++ b/debian/mediawiki.mediawiki-jobrunner.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=MediaWiki job runner
+Documentation=https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:RunJobs.php
+
+[Service]
+User=www-data
+Group=www-data
+ExecStart=/usr/bin/php /var/lib/mediawiki/maintenance/runJobs.php --wait 
--maxjobs=50
+Restart=always
+RestartSec=15
+RuntimeMaxSec=300
+PrivateDevices=true
+PrivateTmp=true
+ProtectHome=read-only
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/debian/rules b/debian/rules
index 5f43c70..57eb05d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -50,5 +50,15 @@
find debian/mediawiki -depth \( -name ".cvsignore" -o -name 
".gitignore" -o -name ".arch-ids" \) -exec rm -rf {} \;
dh_installdeb
 
+override_dh_systemd_enable:
+   # Do not enable by default, the user needs to manually
+   # configure MediaWiki first.
+   dh_systemd_enable --no-enable --name=mediawiki-jobrunner
+
+override_dh_installinit:
+   # We only have a systemd unit, not sysvinit.
+   # Can be removed in debhelper compat 11
+   dh_installinit -Nmediawiki
+
 %:
dh $@ --with apache2

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec3ee0ab72f8caf8cbc1da005cd53b7b6d20e2c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
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/core[fundraising/REL1_27]: Update DonationInterface submodule

2017-11-21 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392780 )

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

Change-Id: I6e2c2d53a0e325de52c0a5d5c018611d83f0161a
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index e46f409..cb15382 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit e46f40932dab08a49b6fca8ca913d5d748416a1e
+Subproject commit cb15382dbc4c8cef6c4d50fade56a6b1e8dee772

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e2c2d53a0e325de52c0a5d5c018611d83f0161a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: One more mobile fix

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

Change subject: One more mobile fix
..


One more mobile fix

Change-Id: I61b88ba605588ef64170a61e2642a21c8125c8a6
---
M gateway_forms/mustache/forms.css
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index 0ffd111..b6f6756 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -476,7 +476,6 @@
 #cards li {
 position: relative;
 background: #fff;
-padding: 0;
 font-size: 13px;
 border: 1px solid #ccc;
 }
@@ -484,6 +483,8 @@
 display: block;
 font-size: 13px;
 float: none;
+margin: 0;
+padding: 0;
 }
 #cards li label {
 margin: 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61b88ba605588ef64170a61e2642a21c8125c8a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: XenoRyet 
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...DonationInterface[deployment]: Merge branch 'master' into deployment

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

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

c8fd187d7 Un-shrink mobile card logos
63c2497ed One more mobile fix

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: If36b398e24dd29b399a765df19e73ef5ca872020
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-11-21 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392779 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

c8fd187d7 Un-shrink mobile card logos
63c2497ed One more mobile fix

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If36b398e24dd29b399a765df19e73ef5ca872020
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...ThrottleOverride[master]: Move expired record purge to a job

2017-11-21 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392778 )

Change subject: Move expired record purge to a job
..

Move expired record purge to a job

Purge expired throttle override records using a job queued after any
creation or edit of another record. Expired records are hidden from the
list special page. Expired records are also filtered out when searching
for rules that apply to a request. These changes ensure that GET
requests remain idempotent.

Bug: T181025
Change-Id: I31e8f464e097a7d62cb02f717cdf68a02256a204
---
M SpecialOverrideThrottle.php
M SpecialThrottleOverrideList.php
M ThrottleOverride.hooks.php
M ThrottleOverridePager.php
A ThrottleOverridePurgeJob.php
M extension.json
6 files changed, 60 insertions(+), 32 deletions(-)


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

diff --git a/SpecialOverrideThrottle.php b/SpecialOverrideThrottle.php
index 0785f9a..9134ada 100644
--- a/SpecialOverrideThrottle.php
+++ b/SpecialOverrideThrottle.php
@@ -202,6 +202,11 @@
$dbw->insert( 'throttle_override', $row, __METHOD__ );
}
 
+   // Queue a job that will delete expired records
+   JobQueueGroup::singleton()->lazyPush(
+   new ThrottleOverridePurgeJob()
+   );
+
return true;
}
 
diff --git a/SpecialThrottleOverrideList.php b/SpecialThrottleOverrideList.php
index 6edfe93..c4af7c1 100644
--- a/SpecialThrottleOverrideList.php
+++ b/SpecialThrottleOverrideList.php
@@ -65,23 +65,6 @@
}
 
function onSubmit( array $data, HTMLForm $form = null ) {
-   if ( !wfReadOnly() && !mt_rand( 0, 10 ) ) {
-   // Purge expired entries on one in every 10 queries
-   $dbw = ThrottleOverrideUtils::getCentraDB( DB_MASTER );
-   $method = __METHOD__;
-   $dbw->onTransactionIdle( function () use ( $dbw, 
$method ) {
-   $dbw->delete(
-   'throttle_override',
-   [
-   $dbw->addIdentifierQuotes( 
'thr_expiry' ) .
-   ' < ' .
-   $dbw->addQuotes( 
$dbw->timestamp() )
-   ],
-   $method
-   );
-   } );
-   }
-
$pager = new ThrottleOverridePager( $this, [
'throttleType' => $data['ThrottleType'],
] );
diff --git a/ThrottleOverride.hooks.php b/ThrottleOverride.hooks.php
index 1dc4e59..c0e2fe7 100644
--- a/ThrottleOverride.hooks.php
+++ b/ThrottleOverride.hooks.php
@@ -68,9 +68,17 @@
$dbr = ThrottleOverrideUtils::getCentraDB( 
DB_REPLICA );
$setOpts += Database::getCacheSetOptions( $dbr 
);
 
+   $quotedIp = $db->addQuotes( $hexIp );
$expiry = $dbr->selectField(
'throttle_override',
'thr_expiry',
+   [
+   "thr_range_start <= $quotedIp",
+   "thr_range_end >= $quotedIp",
+   'thr_expiry > ' . 
$dbr->addQuotes( $dbr->timestamp() ),
+   'thr_type' . $dbr->buildLike(
+   $dbr->anyString(), 
$action, $dbr->anyString() ),
+   ],
ThrottleOverrideHooks::makeConds( $dbr, 
$hexIp, $action ),
'ThrottleOverrideHooks::onPingLimiter',
[ 'ORDER BY' => 'thr_expiry DESC' ]
@@ -112,14 +120,6 @@
 
$result = false;
return false;
-   } elseif ( $expiry !== false ) {
-   // Expired exemption. Delete it from the DB.
-   $dbw = ThrottleOverrideUtils::getCentraDB( DB_MASTER );
-   $dbw->delete(
-   'throttle_override',
-   self::makeConds( $dbw, $hexIp, $action ),
-   __METHOD__
-   );
}
 
return true;
@@ -134,13 +134,6 @@
 * @return array Conditions
 */
private static function makeConds( $db, $hexIp, $action ) {
-   $quotedIp = $db->addQuotes( $hexIp );
- 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: One more mobile fix

2017-11-21 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392777 )

Change subject: One more mobile fix
..

One more mobile fix

Change-Id: I61b88ba605588ef64170a61e2642a21c8125c8a6
---
M gateway_forms/mustache/forms.css
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index 0ffd111..b6f6756 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -476,7 +476,6 @@
 #cards li {
 position: relative;
 background: #fff;
-padding: 0;
 font-size: 13px;
 border: 1px solid #ccc;
 }
@@ -484,6 +483,8 @@
 display: block;
 font-size: 13px;
 float: none;
+margin: 0;
+padding: 0;
 }
 #cards li label {
 margin: 0;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Merge mediawiki.special.userrights.styles into mediawiki.spe...

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

Change subject: Merge mediawiki.special.userrights.styles into mediawiki.special
..


Merge mediawiki.special.userrights.styles into mediawiki.special

Follows-up 5f18aae76eecf5.

This reduces the number of modules.

Bug: T180914
Change-Id: I4143e876495bad6530afe290ba686d7f26a43c58
---
M includes/specials/SpecialUserrights.php
M resources/Resources.php
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/includes/specials/SpecialUserrights.php 
b/includes/specials/SpecialUserrights.php
index cf8c3f5..a5f9ab3 100644
--- a/includes/specials/SpecialUserrights.php
+++ b/includes/specials/SpecialUserrights.php
@@ -140,7 +140,7 @@
$this->setHeaders();
$this->outputHeader();
 
-   $out->addModuleStyles( 'mediawiki.special.userrights.styles' );
+   $out->addModuleStyles( 'mediawiki.special' );
$this->addHelpLink( 'Help:Assigning permissions' );
 
$this->switchForm();
diff --git a/resources/Resources.php b/resources/Resources.php
index 55bf65d..b6fcfee 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1922,7 +1922,10 @@
],
],
'mediawiki.special' => [
-   'styles' => 
'resources/src/mediawiki.special/mediawiki.special.css',
+   'styles' => [
+   'resources/src/mediawiki.special/mediawiki.special.css',
+   
'resources/src/mediawiki.special/mediawiki.special.userrights.css',
+   ],
'targets' => [ 'desktop', 'mobile' ],
],
'mediawiki.special.apisandbox.styles' => [
@@ -2236,9 +2239,6 @@
'dependencies' => [
'mediawiki.notification.convertmessagebox',
],
-   ],
-   'mediawiki.special.userrights.styles' => [
-   'styles' => 
'resources/src/mediawiki.special/mediawiki.special.userrights.css',
],
'mediawiki.special.watchlist' => [
'scripts' => 
'resources/src/mediawiki.special/mediawiki.special.watchlist.js',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4143e876495bad6530afe290ba686d7f26a43c58
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Un-shrink mobile card logos

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

Change subject: Un-shrink mobile card logos
..


Un-shrink mobile card logos

Change-Id: I34102d8aab72aeb203a8cb4992d85ea8219adef0
---
M gateway_forms/mustache/forms.css
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index 30f12c5..0ffd111 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -490,7 +490,7 @@
 height: 96px;
 }
 #cards li label img {
-width: 80%;
+width: 100%;
 }
 #cards li:hover {
 background: #EAF3FF;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I34102d8aab72aeb203a8cb4992d85ea8219adef0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: XenoRyet 
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...DonationInterface[master]: Un-shrink mobile card logos

2017-11-21 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392776 )

Change subject: Un-shrink mobile card logos
..

Un-shrink mobile card logos

Change-Id: I34102d8aab72aeb203a8cb4992d85ea8219adef0
---
M gateway_forms/mustache/forms.css
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index 30f12c5..0ffd111 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -490,7 +490,7 @@
 height: 96px;
 }
 #cards li label img {
-width: 80%;
+width: 100%;
 }
 #cards li:hover {
 background: #EAF3FF;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

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

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

6413b324a Localisation updates from https://translatewiki.net.
0bf4f8b6f Fix card type selection spacing on mobile
e65972737 Filter for ios and safari
0413d5934 Use padding instead of margin to close a gap
4b7743ec7 Clicky to the edges on mobile too

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8332ee5bafe29292a413cb2a26d01bd40fe0abc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-11-21 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392775 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

6413b324a Localisation updates from https://translatewiki.net.
0bf4f8b6f Fix card type selection spacing on mobile
e65972737 Filter for ios and safari
0413d5934 Use padding instead of margin to close a gap
4b7743ec7 Clicky to the edges on mobile too

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8332ee5bafe29292a413cb2a26d01bd40fe0abc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Clicky to the edges on mobile too

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

Change subject: Clicky to the edges on mobile too
..


Clicky to the edges on mobile too

Keep the radio button centered

Change-Id: I8fa5a12c792e41b4f3df8bb55818dfcfd8d3136e
---
M gateway_forms/mustache/forms.css
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index cf0dc1e..30f12c5 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -477,17 +477,17 @@
 position: relative;
 background: #fff;
 padding: 0;
-height: 96px;
 font-size: 13px;
 border: 1px solid #ccc;
 }
 #cards li input.cardradio {
 display: block;
-width: auto;
 font-size: 13px;
+float: none;
 }
 #cards li label {
 margin: 0;
+height: 96px;
 }
 #cards li label img {
 width: 80%;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fa5a12c792e41b4f3df8bb55818dfcfd8d3136e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: XenoRyet 
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...DonationInterface[master]: Clicky to the edges on mobile too

2017-11-21 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392774 )

Change subject: Clicky to the edges on mobile too
..

Clicky to the edges on mobile too

Keep the radio button centered

Change-Id: I8fa5a12c792e41b4f3df8bb55818dfcfd8d3136e
---
M gateway_forms/mustache/forms.css
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index cf0dc1e..db4ed78 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -483,8 +483,8 @@
 }
 #cards li input.cardradio {
 display: block;
-width: auto;
 font-size: 13px;
+float: none;
 }
 #cards li label {
 margin: 0;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Use padding instead of margin to close a gap

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

Change subject: Use padding instead of margin to close a gap
..


Use padding instead of margin to close a gap

Clicking between the radio button and the logo should count as
a click on the thing.

Change-Id: I871fcbdd3a67e44be5a0ab2cec14e2d2ddbabb4c
---
M gateway_forms/mustache/forms.css
M gateway_forms/mustache/payment_method.html.mustache
2 files changed, 4 insertions(+), 8 deletions(-)

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



diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index c74fd0f..cf0dc1e 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -274,14 +274,12 @@
 
 #cards.three-per-line li {
 width: 32.63%;
-padding: 1em;
 }
 #cards.three-per-line > li:nth-child(3),
 #cards.three-per-line > li:nth-child(6) { margin-right: 0; }
 
 #cards.four-per-line li {
 width: 24.29%;
-padding: 1em 0.5em;
 }
 #cards.four-per-line > li:nth-child(4),
 #cards.four-per-line > li:nth-child(8) { margin-right: 0; }
@@ -300,16 +298,16 @@
 #cards li input {
 display: block;
 width: 100%;
-margin: 0 0 .7em;
+margin: 0;
 box-shadow: none;
 }
 #cards li label {
 cursor: pointer;
-margin-top: .5em;
+padding: 1em;
 display: block;
 }
 #cards li label img {
-margin: 0 auto;
+margin: 0.7em auto 0;
 height: auto;
 }
 #cards li.has_sub_text label {
@@ -484,8 +482,6 @@
 border: 1px solid #ccc;
 }
 #cards li input.cardradio {
-padding: 10px;
-margin: 5px 0;
 display: block;
 width: auto;
 font-size: 13px;
diff --git a/gateway_forms/mustache/payment_method.html.mustache 
b/gateway_forms/mustache/payment_method.html.mustache
index 27e688a..b39a439 100644
--- a/gateway_forms/mustache/payment_method.html.mustache
+++ b/gateway_forms/mustache/payment_method.html.mustache
@@ -6,8 +6,8 @@


 {{# submethods }} {{! TODO: give every submethod a label_key, remove 
conditionals }}
 
-
 
+
 
 {{# sub_text_key }}
 {{ l10n . }}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I871fcbdd3a67e44be5a0ab2cec14e2d2ddbabb4c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: XenoRyet 
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]: Revert "Move styles for Special:UserRights to separate style...

2017-11-21 Thread Krinkle (Code Review)
Hello Bartosz Dziewoński, Fomafix, Reedy, Florianschmidtwelzow, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "Move styles for Special:UserRights to separate style 
module"
..

Revert "Move styles for Special:UserRights to separate style module"

This reverts commit 5f18aae76eecf54665d4301da021afb3d1ae6e13.

Change-Id: I4143e876495bad6530afe290ba686d7f26a43c58
---
M includes/specials/SpecialUserrights.php
M resources/Resources.php
M resources/src/mediawiki.special/mediawiki.special.css
M resources/src/mediawiki.special/mediawiki.special.userrights.css
4 files changed, 15 insertions(+), 16 deletions(-)


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

diff --git a/includes/specials/SpecialUserrights.php 
b/includes/specials/SpecialUserrights.php
index 4e4394d..0a712ef 100644
--- a/includes/specials/SpecialUserrights.php
+++ b/includes/specials/SpecialUserrights.php
@@ -140,7 +140,7 @@
$this->setHeaders();
$this->outputHeader();
 
-   $out->addModuleStyles( 'mediawiki.special.userrights.styles' );
+   $out->addModuleStyles( 'mediawiki.special' );
$this->addHelpLink( 'Help:Assigning permissions' );
 
$this->switchForm();
diff --git a/resources/Resources.php b/resources/Resources.php
index d9fa8e0..715f339 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -2230,13 +2230,11 @@
],
],
'mediawiki.special.userrights' => [
+   'styles' => 
'resources/src/mediawiki.special/mediawiki.special.userrights.css',
'scripts' => 
'resources/src/mediawiki.special/mediawiki.special.userrights.js',
'dependencies' => [
'mediawiki.notification.convertmessagebox',
],
-   ],
-   'mediawiki.special.userrights.styles' => [
-   'styles' => 
'resources/src/mediawiki.special/mediawiki.special.userrights.css',
],
'mediawiki.special.watchlist' => [
'scripts' => 
'resources/src/mediawiki.special/mediawiki.special.watchlist.js',
diff --git a/resources/src/mediawiki.special/mediawiki.special.css 
b/resources/src/mediawiki.special/mediawiki.special.css
index 5d0ec49..7f3b09a 100644
--- a/resources/src/mediawiki.special/mediawiki.special.css
+++ b/resources/src/mediawiki.special/mediawiki.special.css
@@ -122,3 +122,16 @@
color: #72777d;
font-size: 90%;
 }
+
+/* Special:UserRights */
+.mw-userrights-disabled {
+   color: #72777d;
+}
+.mw-userrights-groups * td,
+.mw-userrights-groups * th {
+   padding-right: 1.5em;
+}
+
+.mw-userrights-groups * th {
+   text-align: left;
+}
diff --git a/resources/src/mediawiki.special/mediawiki.special.userrights.css 
b/resources/src/mediawiki.special/mediawiki.special.userrights.css
index acfdb56..a4b4087 100644
--- a/resources/src/mediawiki.special/mediawiki.special.userrights.css
+++ b/resources/src/mediawiki.special/mediawiki.special.userrights.css
@@ -10,15 +10,3 @@
display: inline-block;
vertical-align: middle;
 }
-
-.mw-userrights-disabled {
-   color: #72777d;
-}
-.mw-userrights-groups * td,
-.mw-userrights-groups * th {
-   padding-right: 1.5em;
-}
-
-.mw-userrights-groups * th {
-   text-align: left;
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4143e876495bad6530afe290ba686d7f26a43c58
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Use padding instead of margin to close a gap

2017-11-21 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392772 )

Change subject: Use padding instead of margin to close a gap
..

Use padding instead of margin to close a gap

Clicking between the radio button and the logo should count as
a click on the thing.

Change-Id: I871fcbdd3a67e44be5a0ab2cec14e2d2ddbabb4c
---
M gateway_forms/mustache/forms.css
1 file changed, 2 insertions(+), 4 deletions(-)


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

diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index c74fd0f..74c9e6c 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -300,12 +300,12 @@
 #cards li input {
 display: block;
 width: 100%;
-margin: 0 0 .7em;
+margin: 0;
 box-shadow: none;
 }
 #cards li label {
 cursor: pointer;
-margin-top: .5em;
+padding-top: .7em;
 display: block;
 }
 #cards li label img {
@@ -484,8 +484,6 @@
 border: 1px solid #ccc;
 }
 #cards li input.cardradio {
-padding: 10px;
-margin: 5px 0;
 display: block;
 width: auto;
 font-size: 13px;

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: nagios_common: remove krinkle from perf-team contactgroup

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

Change subject: nagios_common: remove krinkle from perf-team contactgroup
..


nagios_common: remove krinkle from perf-team contactgroup

Change-Id: Ie341dfe376336b8412c15239978f96135fbe404a
---
M modules/nagios_common/files/contactgroups.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/nagios_common/files/contactgroups.cfg 
b/modules/nagios_common/files/contactgroups.cfg
index 7b861f6..0321b28 100644
--- a/modules/nagios_common/files/contactgroups.cfg
+++ b/modules/nagios_common/files/contactgroups.cfg
@@ -98,7 +98,7 @@
 
 define contactgroup {
 contactgroup_name   team-performance
-members 
irc-performance,team-performance,gilles,aaron,krinkle,phedenskog
+members 
irc-performance,team-performance,gilles,aaron,phedenskog
 }
 
 define contactgroup {

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: nagios_common: remove krinkle from perf-team contactgroup

2017-11-21 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392771 )

Change subject: nagios_common: remove krinkle from perf-team contactgroup
..

nagios_common: remove krinkle from perf-team contactgroup

Change-Id: Ie341dfe376336b8412c15239978f96135fbe404a
---
M modules/nagios_common/files/contactgroups.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/nagios_common/files/contactgroups.cfg 
b/modules/nagios_common/files/contactgroups.cfg
index 7b861f6..0321b28 100644
--- a/modules/nagios_common/files/contactgroups.cfg
+++ b/modules/nagios_common/files/contactgroups.cfg
@@ -98,7 +98,7 @@
 
 define contactgroup {
 contactgroup_name   team-performance
-members 
irc-performance,team-performance,gilles,aaron,krinkle,phedenskog
+members 
irc-performance,team-performance,gilles,aaron,phedenskog
 }
 
 define contactgroup {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie341dfe376336b8412c15239978f96135fbe404a
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]: archiva: move standard include, use profile::b::firewall

2017-11-21 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392770 )

Change subject: archiva: move standard include, use profile::b::firewall
..

archiva: move standard include, use profile::b::firewall

Change-Id: Ic03480d849a8a31413ebeace787411054f86994b
---
M manifests/site.pp
M modules/role/manifests/archiva.pp
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/392770/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 1a8ebb3..f0309d9 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1552,7 +1552,6 @@
 # archiva.wikimedia.org
 node 'meitnerium.wikimedia.org' {
 role(archiva)
-include ::standard
 }
 
 # OTRS - ticket.wikimedia.org
diff --git a/modules/role/manifests/archiva.pp 
b/modules/role/manifests/archiva.pp
index 8ec1c4a..5d3aebe 100644
--- a/modules/role/manifests/archiva.pp
+++ b/modules/role/manifests/archiva.pp
@@ -7,7 +7,8 @@
 class role::archiva {
 system::role { 'archiva': description => 'Apache Archiva Host' }
 
-include ::base::firewall
+include ::standard
+include ::profile::base::firewall
 
 require_package('openjdk-7-jdk')
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic03480d849a8a31413ebeace787411054f86994b
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]: labnodepool: move standard/firewall includes to role

2017-11-21 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392769 )

Change subject: labnodepool: move standard/firewall includes to role
..

labnodepool: move standard/firewall includes to role

Change-Id: I8ac8c0e768be1512c8a6102a6a5cd14326fece51
---
M manifests/site.pp
M modules/role/manifests/wmcs/openstack/main/nodepool.pp
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/392769/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 1a8ebb3..e435846 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1304,8 +1304,6 @@
 node 'labnodepool1001.eqiad.wmnet' {
 $nagios_contact_group = 'admins,contint'
 role(wmcs::openstack::main::nodepool)
-include ::standard
-include ::base::firewall
 }
 
 ## labsdb dbs
diff --git a/modules/role/manifests/wmcs/openstack/main/nodepool.pp 
b/modules/role/manifests/wmcs/openstack/main/nodepool.pp
index 7e77871..d367c7c 100644
--- a/modules/role/manifests/wmcs/openstack/main/nodepool.pp
+++ b/modules/role/manifests/wmcs/openstack/main/nodepool.pp
@@ -1,4 +1,6 @@
 class role::wmcs::openstack::main::nodepool {
 system::role { $name: }
+include ::standard
+include ::profile::base::firewall
 include ::profile::openstack::main::nodepool::service
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ac8c0e768be1512c8a6102a6a5cd14326fece51
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]: mw_canary_appserver: mv firewall incl to role, use profile

2017-11-21 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392768 )

Change subject: mw_canary_appserver: mv firewall incl to role, use profile
..

mw_canary_appserver: mv firewall incl to role, use profile

Change-Id: Iaf2c7273fe9990eddc639a533214c90dfc6d9e1e
---
M manifests/site.pp
M modules/role/manifests/mediawiki/canary_appserver.pp
2 files changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/68/392768/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 1a8ebb3..f0116e2 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1633,7 +1633,6 @@
 # They replace mw1017 and mw1099
 node /^mwdebug100[12]\.eqiad\.wmnet$/ {
 role(mediawiki::canary_appserver)
-include ::base::firewall
 }
 
 # mw1180-1188 are apaches
@@ -1676,7 +1675,6 @@
 
 node /^mw126[1-5]\.eqiad\.wmnet$/ {
 role(mediawiki::canary_appserver)
-include ::base::firewall
 }
 
 node /^mw12(6[6-9]|7[0-5])\.eqiad\.wmnet$/ {
@@ -1742,7 +1740,6 @@
 # mw2017/mw2099 are codfw test appservers
 node /^mw20(17|99)\.codfw\.wmnet$/ {
 role(mediawiki::canary_appserver)
-include ::base::firewall
 }
 
 #mw2097, mw2100-mw2117 are appservers
diff --git a/modules/role/manifests/mediawiki/canary_appserver.pp 
b/modules/role/manifests/mediawiki/canary_appserver.pp
index 47c2c2a..10b3327 100644
--- a/modules/role/manifests/mediawiki/canary_appserver.pp
+++ b/modules/role/manifests/mediawiki/canary_appserver.pp
@@ -1,7 +1,7 @@
 # Class for a subgroup of appservers where we can test experimental features
 class role::mediawiki::canary_appserver {
 include role::mediawiki::appserver
-
+include ::profile::base::firewall
 # include the deployment scripts because mwscript can occasionally be 
useful
 # here: T112174
 include scap::scripts

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf2c7273fe9990eddc639a533214c90dfc6d9e1e
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]: dumps/site: remove outdated comment about firewall

2017-11-21 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392767 )

Change subject: dumps/site: remove outdated comment about firewall
..

dumps/site: remove outdated comment about firewall

role::dumps::public::server already includes
::profile::base::firewall so this comment is not
accurate anymore.

Change-Id: Iee15d7caf2f46ec0e86ae29df729b0926b1bf120
---
M manifests/site.pp
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/392767/1

diff --git a/manifests/site.pp b/manifests/site.pp
index f17b9b5..568c965 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1357,8 +1357,6 @@
 
 node /labstore100[67]\.wikimedia\.org/ {
 role(dumps::public::server)
-# Do not enable yet
-# include ::base::firewall
 }
 
 node /labstore200[1-2]\.codfw\.wmnet/ {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...wikidiff2[master]: Revert "Add placeholder for title tags to the moved indicators"

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

Change subject: Revert "Add placeholder for title tags to the moved indicators"
..


Revert "Add placeholder for title tags to the moved indicators"

See discussion in T180602

Version number is updated to 1.5.3

This reverts commit 3dcda7efdd35c64ee31db47767f325d0ad2073da.

Change-Id: I0dfc947a627bc90fc905870c87b65b347d02b7b5
---
M TableDiff.cpp
M Wikidiff2.h
M tests/001.phpt
M tests/007.phpt
4 files changed, 14 insertions(+), 14 deletions(-)

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



diff --git a/TableDiff.cpp b/TableDiff.cpp
index 3914811..964f1c8 100644
--- a/TableDiff.cpp
+++ b/TableDiff.cpp
@@ -39,7 +39,7 @@
if (printLeft) {
result += "  ";
if(dstAnchor != "")
-   result += "";
+   result += "";
else
result += "−";
result += "\n";
@@ -56,7 +56,7 @@
if (printRight) {
result += "  ";
if(dstAnchor != "")
-   result += "";
+   result += "";
else
result += "+";
result += "\n";
diff --git a/Wikidiff2.h b/Wikidiff2.h
index 5ae1c76..244109f 100644
--- a/Wikidiff2.h
+++ b/Wikidiff2.h
@@ -16,7 +16,7 @@
 #include 
 #include 
 
-#define WIKIDIFF2_VERSION_STRING   "1.5.2"
+#define WIKIDIFF2_VERSION_STRING   "1.5.3"
 
 class Wikidiff2 {
public:
diff --git a/tests/001.phpt b/tests/001.phpt
index 96271bd..716d470 100644
--- a/tests/001.phpt
+++ b/tests/001.phpt
@@ -171,7 +171,7 @@
   a
 
 
-  
+  
   ---line---
   
 
@@ -205,7 +205,7 @@
 
 
   
-  
+  
   ---line---
 
 
@@ -237,12 +237,12 @@
   a
 
 
-  
+  
   --line1--
   
 
 
-  
+  
   --line2--
   
 
@@ -276,12 +276,12 @@
 
 
   
-  
+  
   --line1--
 
 
   
-  
+  
   --line2--
 
 
@@ -395,4 +395,4 @@
   
   
   
-
\ No newline at end of file
+
diff --git a/tests/007.phpt b/tests/007.phpt
index ecc8364..f37fe16 100644
--- a/tests/007.phpt
+++ b/tests/007.phpt
@@ -43,7 +43,7 @@
   
 
 
-  
+  
   Substance, 
in the truest and primary and 
most definite sense of the word, is that which is neither predicable of a 
subject nor present in a subject; for instance, the individual man or horse. 
But in a secondary sense those things are called substances within which, as 
species, the primary substances are included; also those which, as genera, 
include the species. For instance, the individual man is included in the 
species 'man', and the genus to which the species belongs is 'animal'; these, 
therefore—that is to say, the species 'man' and the genus 'animal,-are termed 
secondary substances.
   
 
@@ -65,7 +65,7 @@
 
 
   
-  
+  
   Everything 
except primary substances is either predicable of a primary substance or 
present in a primary substance. This becomes evident by reference to particular 
instances which occur. 'Animal' is predicated of the species 'man', therefore 
of the individual man, for if there were no individual man of whom it could be 
predicated, it could not be predicated of the species 'man' at all. Again, 
colour is present in body, therefore in individual bodies, for if there were no 
individual body in which it was present, it could not be present in body at 
all. Thus everything except primary substances is either predicated of primary 
substances, or is present in them, and if these last did not exist, it would be 
impossible for anything else to exist. Never underestimate lawns.
 
 
@@ -86,7 +86,7 @@
   
 
 
-  
+  
   Everything 
except primary substances is either predicable of a primary substance or 
present in a primary substance. This becomes evident by reference to particular 
instances which occur. 'Animal' is predicated of the species 'man', therefore 
of the individual man, for if there were no individual man of whom it could be 
predicated, it could not be predicated of the species 'man' at all. Again, 
colour is present in body, therefore in individual bodies, for if there were no 
individual body in which it was present, it could not be present in body at 
all. Thus everything except primary substances is either predicated of primary 
substances, or is present in them, and if these last did not exist, it would be 
impossible for anything else to exist.
   
 
@@ -109,6 +109,6 @@
 
 
   
-  
+  
   Substance, 
in the truest and most definite sense of the word, is that which is neither 
predicable of a subject nor present in a subject; for instance, the individual 
man or horse. But in a secondary sense those things are called substances 
within which, as species, the primary substances are included; also those 
which, as genera, include the species. For instance, the individual man is 
included in the species 'man', and the genus to which the 

[MediaWiki-commits] [Gerrit] mediawiki/debian[master]: Use debhelper compat 10

2017-11-21 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392766 )

Change subject: Use debhelper compat 10
..


Use debhelper compat 10

Change-Id: I2a3c1e95a4724ee178235f07d964f3ebd7d253af
---
M debian/changelog
M debian/compat
M debian/control
3 files changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/debian/changelog b/debian/changelog
index b9887ef..cd7af19 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,9 @@
   * Set Rules-Requires-Root: no
   * Remove unused lintian overrides
   * Upgrade php-apcu to a Recommends
+  * Use debhelper compat 10
 
- -- Kunal Mehta   Fri, 17 Nov 2017 01:06:29 -0800
+ -- Kunal Mehta   Tue, 21 Nov 2017 18:34:50 -0800
 
 mediawiki (1:1.27.4-1) unstable; urgency=medium
 
diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index 3b17d6d..9c6ddb9 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@
 Section: web
 Priority: optional
 Maintainer: Kunal Mehta 
-Build-Depends: debhelper (>= 9),
+Build-Depends: debhelper (>= 10),
  dh-buildinfo,
  apache2-dev
 Homepage: https://www.mediawiki.org/

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a3c1e95a4724ee178235f07d964f3ebd7d253af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master]: Use debhelper compat 10

2017-11-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392766 )

Change subject: Use debhelper compat 10
..

Use debhelper compat 10

Change-Id: I2a3c1e95a4724ee178235f07d964f3ebd7d253af
---
M debian/changelog
M debian/compat
M debian/control
3 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/66/392766/1

diff --git a/debian/changelog b/debian/changelog
index b9887ef..cd7af19 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,9 @@
   * Set Rules-Requires-Root: no
   * Remove unused lintian overrides
   * Upgrade php-apcu to a Recommends
+  * Use debhelper compat 10
 
- -- Kunal Mehta   Fri, 17 Nov 2017 01:06:29 -0800
+ -- Kunal Mehta   Tue, 21 Nov 2017 18:34:50 -0800
 
 mediawiki (1:1.27.4-1) unstable; urgency=medium
 
diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index 3b17d6d..9c6ddb9 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@
 Section: web
 Priority: optional
 Maintainer: Kunal Mehta 
-Build-Depends: debhelper (>= 9),
+Build-Depends: debhelper (>= 10),
  dh-buildinfo,
  apache2-dev
 Homepage: https://www.mediawiki.org/

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a3c1e95a4724ee178235f07d964f3ebd7d253af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
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]: Enable MP3 uploading on Commons on Beta Cluster

2017-11-21 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392765 )

Change subject: Enable MP3 uploading on Commons on Beta Cluster
..

Enable MP3 uploading on Commons on Beta Cluster

For testing and preparation for production deployment.

Bug: T120288
Change-Id: I380ddc0156d6046093d3051ca3e0dde96d279867
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings-labs.php
M wmf-config/InitialiseSettings.php
3 files changed, 17 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 984519e..c6a4775 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -906,6 +906,9 @@
// overwrite enabling of local TimedText namespace
$wgEnableLocalTimedText = $wmgEnableLocalTimedText;
 
+   // enable uploading MP3s
+   $wgTmhEnableMp3Uploads = $wmgTmhEnableMp3Uploads;
+
// enable transcoding on all wikis that allow uploads
$wgEnableTranscode = $wgEnableUploads;
 
diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 09f7dd0..db702bc 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -275,6 +275,16 @@
'-wgCopyUploadProxy' => [
'default' => false,
],
+   
+   'wmgFileExtensions' => [
+   '+commonswiki' => [
+   'mp3', // T120288
+   ],
+   ],
+   
+   'wmgTmhEnableMp3Uploads' => [
+   'commonswiki' => true, // T120288
+   ],
 
///
/// --- BetaFeatures start --
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index dd734f2..5928b64 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13641,6 +13641,10 @@
'foundationwiki' => true,
 ],
 
+'wmgTmhEnableMp3Uploads' => [
+   'default' => false,
+],
+
 'wmgTmhWebPlayer' => [
'default' => 'mwembed',
'test2wiki' => 'videojs',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Revert "hhvm: remove ganglia monitoring""

2017-11-21 Thread Dzahn (Code Review)
Hello Giuseppe Lavagetto, jenkins-bot, Volans,

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

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

to review the following change.


Change subject: Revert "Revert "hhvm: remove ganglia monitoring""
..

Revert "Revert "hhvm: remove ganglia monitoring""

This reverts commit 3ee659a1db5c8a655d3cf189df25ae505f663def.

Change-Id: I1c9a17d274067aada470c7f4d8765b058730b0f3
---
D modules/hhvm/files/monitoring/hhvm_health.py
D modules/hhvm/files/monitoring/hhvm_health.pyconf
D modules/hhvm/files/monitoring/hhvm_mem.py
D modules/hhvm/files/monitoring/hhvm_mem.pyconf
M modules/hhvm/manifests/monitoring.pp
5 files changed, 1 insertion(+), 378 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/392764/1

diff --git a/modules/hhvm/files/monitoring/hhvm_health.py 
b/modules/hhvm/files/monitoring/hhvm_health.py
deleted file mode 100644
index 763dfcd..000
--- a/modules/hhvm/files/monitoring/hhvm_health.py
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-"""
-  Ganglia metric-gathering module for HHVM health stats
-
-"""
-import json
-import logging
-import re
-import sys
-import time
-import urllib2
-
-
-logging.basicConfig(level=logging.INFO, stream=sys.stderr)
-
-
-def flatten(mapping, prefix=''):
-flat = {}
-for k, v in mapping.items():
-k = prefix + re.sub('\W', '', k.replace(' ', '_'))
-flat.update(flatten(v, k + '.') if isinstance(v, dict) else {k: v})
-return flat
-
-
-class HealthStats(object):
-def __init__(self, url, expiry=5):
-self.url = url
-self.expiry = expiry
-self.data = {}
-self.update()
-
-def update(self):
-try:
-req = urllib2.urlopen(self.url)
-res = flatten(json.load(req), 'HHVM.')
-self.data.update(res)
-self.last_fetched = time.time()
-except (AttributeError, EnvironmentError, ValueError):
-logging.exception('Failed to update stats:')
-
-def expired(self):
-return time.time() - self.last_fetched > self.expiry
-
-def get(self, stat):
-if self.expired():
-self.update()
-return self.data[stat]
-
-
-def guess_unit(metric):
-if 'size' in metric or 'capac' in metric or 'byte' in metric:
-return 'bytes'
-return 'count'
-
-
-def metric_init(params):
-url = params.get('url', 'http://localhost:9002/check-health')
-stats = HealthStats(url)
-return [{
-'name': str(key),
-'value_type': 'uint',
-'format': '%u',
-'units': guess_unit(key),
-'slope': 'both',
-'groups': 'HHVM',
-'call_back': stats.get,
-} for key in stats.data]
-
-
-def metric_cleanup():
-pass
-
-
-def self_test():
-params = dict(arg.split('=') for arg in sys.argv[1:])
-metrics = metric_init(params)
-while 1:
-for metric in metrics:
-name = metric['name']
-call_back = metric['call_back']
-logging.info('%s: %s', name, call_back(name))
-time.sleep(5)
-
-
-if __name__ == '__main__':
-self_test()
diff --git a/modules/hhvm/files/monitoring/hhvm_health.pyconf 
b/modules/hhvm/files/monitoring/hhvm_health.pyconf
deleted file mode 100644
index 6c898a3..000
--- a/modules/hhvm/files/monitoring/hhvm_health.pyconf
+++ /dev/null
@@ -1,96 +0,0 @@
-# Ganglia metric module for HHVM health statistics.
-
-modules {
-module {
-name = "hhvm_health"
-language = "python"
-}
-}
-
-collection_group {
-collect_every  = 20
-time_threshold = 60
-
-metric {
-name= "HHVM.targetcache"
-title   = "Target Cache"
-value_threshold = 1.0
-}
-
-
-metric {
-name= "HHVM.tcprofsize"
-title   = "Translation Cache - Prof Size"
-value_threshold = 1.0
-}
-
-
-metric {
-name= "HHVM.units"
-title   = "Units"
-value_threshold = 1.0
-}
-
-
-metric {
-name= "HHVM.tcfrozensize"
-title   = "Translation Cache - Frozen Size"
-value_threshold = 1.0
-}
-
-
-metric {
-name= "HHVM.hhbcroarenacapac"
-title   = "HHBC RO Arena Capacity"
-value_threshold = 1.0
-}
-
-
-metric {
-name= "HHVM.rds"
-title   = "RDS"
-value_threshold = 1.0
-}
-
-
-metric {
-name= "HHVM.tchotsize"
-title   = "Translation Cache - Hot Size"
-value_threshold = 1.0
-}
-
-
-metric {
-name= "HHVM.funcs"
-title   = "Funcs"
-value_threshold = 1.0
-}
-
-
-metric {
-name= "HHVM.queued"
-title   = "Queued"
-value_threshold = 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Revert "apache: remove ganglia monitoring""

2017-11-21 Thread Dzahn (Code Review)
Hello Giuseppe Lavagetto, jenkins-bot, Filippo Giunchedi, Volans,

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

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

to review the following change.


Change subject: Revert "Revert "apache: remove ganglia monitoring""
..

Revert "Revert "apache: remove ganglia monitoring""

This reverts commit 63686242937af81b9c67124998c032dfec5842ca.

Change-Id: I3001acbde8b318ffc75944af7a48381d52d6d64a
---
M hieradata/role/common/mediawiki/appserver.yaml
M hieradata/role/common/mediawiki/appserver/api.yaml
M hieradata/role/common/mediawiki/appserver/canary_api.yaml
M hieradata/role/common/mediawiki/canary_appserver.yaml
M hieradata/role/common/mediawiki/imagescaler.yaml
M hieradata/role/common/mediawiki/jobrunner.yaml
M hieradata/role/common/mediawiki/memcached.yaml
M hieradata/role/common/mediawiki/videoscaler.yaml
D modules/apache/files/apache_status.py
D modules/apache/files/apache_status.pyconf
M modules/apache/manifests/monitoring.pp
11 files changed, 8 insertions(+), 573 deletions(-)


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

diff --git a/hieradata/role/common/mediawiki/appserver.yaml 
b/hieradata/role/common/mediawiki/appserver.yaml
index 28e1f2f..7d14664 100644
--- a/hieradata/role/common/mediawiki/appserver.yaml
+++ b/hieradata/role/common/mediawiki/appserver.yaml
@@ -18,3 +18,4 @@
 apache::logrotate::rotate: 12
 nutcracker::verbosity: "4"
 role::mediawiki::webserver::tls: true
+standard::has_ganglia: false
diff --git a/hieradata/role/common/mediawiki/appserver/api.yaml 
b/hieradata/role/common/mediawiki/appserver/api.yaml
index 1195204..7f01396 100644
--- a/hieradata/role/common/mediawiki/appserver/api.yaml
+++ b/hieradata/role/common/mediawiki/appserver/api.yaml
@@ -18,3 +18,4 @@
 apache::logrotate::rotate: 12
 nutcracker::verbosity: "4"
 role::mediawiki::webserver::tls: true
+standard::has_ganglia: false
diff --git a/hieradata/role/common/mediawiki/appserver/canary_api.yaml 
b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
index 99cde6f..575a080 100644
--- a/hieradata/role/common/mediawiki/appserver/canary_api.yaml
+++ b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
@@ -23,3 +23,4 @@
 apache::logrotate::rotate: 12
 nutcracker::verbosity: "4"
 role::mediawiki::webserver::tls: true
+standard::has_ganglia: false
diff --git a/hieradata/role/common/mediawiki/canary_appserver.yaml 
b/hieradata/role/common/mediawiki/canary_appserver.yaml
index a33df65..10e7a9e 100644
--- a/hieradata/role/common/mediawiki/canary_appserver.yaml
+++ b/hieradata/role/common/mediawiki/canary_appserver.yaml
@@ -23,3 +23,4 @@
 apache::logrotate::rotate: 12
 nutcracker::verbosity: "4"
 role::mediawiki::webserver::tls: true
+standard::has_ganglia: false
diff --git a/hieradata/role/common/mediawiki/imagescaler.yaml 
b/hieradata/role/common/mediawiki/imagescaler.yaml
index 201ab70..7a6a277 100644
--- a/hieradata/role/common/mediawiki/imagescaler.yaml
+++ b/hieradata/role/common/mediawiki/imagescaler.yaml
@@ -13,3 +13,4 @@
   light_process_count: "10"
 apache::mpm::mpm: worker
 role::mediawiki::webserver::tls: true
+standard::has_ganglia: false
diff --git a/hieradata/role/common/mediawiki/jobrunner.yaml 
b/hieradata/role/common/mediawiki/jobrunner.yaml
index aae358f..10b4bf2 100644
--- a/hieradata/role/common/mediawiki/jobrunner.yaml
+++ b/hieradata/role/common/mediawiki/jobrunner.yaml
@@ -20,3 +20,4 @@
 role::lvs::realserver::pools:
   hhvm:
 lvs_name: jobrunner
+standard::has_ganglia: false
diff --git a/hieradata/role/common/mediawiki/memcached.yaml 
b/hieradata/role/common/mediawiki/memcached.yaml
index 70221d7..c695d12 100644
--- a/hieradata/role/common/mediawiki/memcached.yaml
+++ b/hieradata/role/common/mediawiki/memcached.yaml
@@ -22,3 +22,4 @@
 profile::memcached::extended_options:
   - 'slab_reassign'
 profile::memcached::port: '11211'
+standard::has_ganglia: false
diff --git a/hieradata/role/common/mediawiki/videoscaler.yaml 
b/hieradata/role/common/mediawiki/videoscaler.yaml
index 5fbe653..253052e 100644
--- a/hieradata/role/common/mediawiki/videoscaler.yaml
+++ b/hieradata/role/common/mediawiki/videoscaler.yaml
@@ -12,3 +12,4 @@
   connection_timeout_seconds: 86400
   thread_count: 15
   max_execution_time: 86400
+standard::has_ganglia: false
diff --git a/modules/apache/files/apache_status.py 
b/modules/apache/files/apache_status.py
deleted file mode 100755
index 15c0f2b..000
--- a/modules/apache/files/apache_status.py
+++ /dev/null
@@ -1,439 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import os
-import time
-import urllib2
-import traceback
-import re
-import copy
-
-# global to store state for "total accesses"
-METRICS = {
-'time': 0,
-'data': {}
-}
-
-LAST_METRICS = copy.deepcopy(METRICS)
-METRICS_CACHE_MAX = 5
-
-# Metric prefix
-NAME_PREFIX = "ap_"
-SSL_NAME_PREFIX = "apssl_"
-
-SERVER_STATUS_URL = ""
-

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Enable Timeless everywhere"

2017-11-21 Thread Iniquity (Code Review)
Hello Paladox, Urbanecm, Brian Wolff, jenkins-bot, MaxSem, Zoranzoki21, 
Dereckson,

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

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

to review the following change.


Change subject: Revert "Enable Timeless everywhere"
..

Revert "Enable Timeless everywhere"

This reverts commit 45f255ec49602c99c021bf81a2e924c8cfaed15e.

Change-Id: Id7d0a585cdb72bef57b551f3424d87c663007718
---
M wmf-config/InitialiseSettings.php
1 file changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d764602..a095196 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19716,7 +19716,17 @@
 ],
 
 'wmgUseTimeless' => [
-   'default' => true,
+   'default' => false,
+   'testwiki' => true,
+   'test2wiki' => true,
+   'mediawikiwiki' => true,
+   'labswiki' => true,
+   'labtestwiki' => true,
+   'frwiki' => true, // T154371
+   'frwikinews' => true,
+   'frwikisource' => true,
+   'frwikiversity' => true,
+   'frwiktionary' => true,
 ],
 
 // T152540

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7d0a585cdb72bef57b551f3424d87c663007718
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Iniquity 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Urbanecm 
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] wikimedia...autoreporter[master]: small fix of survival plots

2017-11-21 Thread Chelsyx (Code Review)
Chelsyx has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392761 )

Change subject: small fix of survival plots
..


small fix of survival plots

Change-Id: I7167c7ea7c628aa3cf63d1d9171eaf922e8be6c5
---
M modules/interleaved_test/page_dwelltime.R
M modules/stat_test/serp_from_autocomplete.R
M modules/stat_test/visited_page.R
M modules/test_summary/browser_os.R
4 files changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/modules/interleaved_test/page_dwelltime.R 
b/modules/interleaved_test/page_dwelltime.R
index a01926c..4f57fc7 100644
--- a/modules/interleaved_test/page_dwelltime.R
+++ b/modules/interleaved_test/page_dwelltime.R
@@ -25,7 +25,7 @@
 ggtheme = wmf::theme_facet()
   )
   p <- ggsurv$plot +
-facet_wrap(~ group, scales = "free_y") +
+facet_wrap(~ group) +
 labs(
   title = "How long users stay on each team's results",
   subtitle = "With 95% confidence intervals."
@@ -50,7 +50,7 @@
 ggtheme = wmf::theme_facet()
   )
   p <- ggsurv$plot +
-facet_wrap(~ wiki, ncol = 3, scales = "free_y") +
+facet_wrap(~ wiki, ncol = 3) +
 labs(
   title = paste0("How long users stay on each team's results, by wiki 
(Group = ", this_group, ")"),
   subtitle = "With 95% confidence intervals."
diff --git a/modules/stat_test/serp_from_autocomplete.R 
b/modules/stat_test/serp_from_autocomplete.R
index d89fa58..c982e9f 100644
--- a/modules/stat_test/serp_from_autocomplete.R
+++ b/modules/stat_test/serp_from_autocomplete.R
@@ -67,7 +67,7 @@
   ggtheme = wmf::theme_facet()
 )
 p <- ggsurv$plot +
-  facet_wrap(~ wiki, ncol = 3, scales = "free_y") +
+  facet_wrap(~ wiki, ncol = 3) +
   labs(
 title = "Proportion of search results pages from autocomplete last 
longer than T, by test group and wiki",
 subtitle = "With 95% confidence intervals."
diff --git a/modules/stat_test/visited_page.R b/modules/stat_test/visited_page.R
index e8383b6..e608606 100644
--- a/modules/stat_test/visited_page.R
+++ b/modules/stat_test/visited_page.R
@@ -56,7 +56,7 @@
   ggtheme = wmf::theme_facet()
 )
 p <- ggsurv$plot +
-  facet_wrap(~ wiki, ncol = 3, scales = "free_y") +
+  facet_wrap(~ wiki, ncol = 3) +
   labs(
 title = "Proportion of visited search results last longer than T, by 
test group and wiki",
 subtitle = "With 95% confidence intervals."
diff --git a/modules/test_summary/browser_os.R 
b/modules/test_summary/browser_os.R
index b73886d..741e639 100644
--- a/modules/test_summary/browser_os.R
+++ b/modules/test_summary/browser_os.R
@@ -1,7 +1,6 @@
 if ("user_agent" %in% names(events)) {
 
   user_agents <- dplyr::distinct(events, wiki, session_id, group, user_agent)
-  user_agents$user_agent <- gsub('(Kindle Fire HD[X]? [0-9\\.]{1,3})"', '\\1', 
user_agents$user_agent, fixed = FALSE) # remove double quote in kindle name
   user_agents <- user_agents %>%
 cbind(., purrr::map_df(.$user_agent, ~ wmf::null2na(jsonlite::fromJSON(.x, 
simplifyVector = FALSE %>%
 mutate(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7167c7ea7c628aa3cf63d1d9171eaf922e8be6c5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/autoreporter
Gerrit-Branch: master
Gerrit-Owner: Chelsyx 
Gerrit-Reviewer: Chelsyx 

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


[MediaWiki-commits] [Gerrit] wikimedia...autoreporter[master]: small fix of survival plots

2017-11-21 Thread Chelsyx (Code Review)
Chelsyx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392761 )

Change subject: small fix of survival plots
..

small fix of survival plots

Change-Id: I7167c7ea7c628aa3cf63d1d9171eaf922e8be6c5
---
M modules/interleaved_test/page_dwelltime.R
M modules/stat_test/serp_from_autocomplete.R
M modules/stat_test/visited_page.R
M modules/test_summary/browser_os.R
4 files changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/autoreporter 
refs/changes/61/392761/1

diff --git a/modules/interleaved_test/page_dwelltime.R 
b/modules/interleaved_test/page_dwelltime.R
index a01926c..4f57fc7 100644
--- a/modules/interleaved_test/page_dwelltime.R
+++ b/modules/interleaved_test/page_dwelltime.R
@@ -25,7 +25,7 @@
 ggtheme = wmf::theme_facet()
   )
   p <- ggsurv$plot +
-facet_wrap(~ group, scales = "free_y") +
+facet_wrap(~ group) +
 labs(
   title = "How long users stay on each team's results",
   subtitle = "With 95% confidence intervals."
@@ -50,7 +50,7 @@
 ggtheme = wmf::theme_facet()
   )
   p <- ggsurv$plot +
-facet_wrap(~ wiki, ncol = 3, scales = "free_y") +
+facet_wrap(~ wiki, ncol = 3) +
 labs(
   title = paste0("How long users stay on each team's results, by wiki 
(Group = ", this_group, ")"),
   subtitle = "With 95% confidence intervals."
diff --git a/modules/stat_test/serp_from_autocomplete.R 
b/modules/stat_test/serp_from_autocomplete.R
index d89fa58..c982e9f 100644
--- a/modules/stat_test/serp_from_autocomplete.R
+++ b/modules/stat_test/serp_from_autocomplete.R
@@ -67,7 +67,7 @@
   ggtheme = wmf::theme_facet()
 )
 p <- ggsurv$plot +
-  facet_wrap(~ wiki, ncol = 3, scales = "free_y") +
+  facet_wrap(~ wiki, ncol = 3) +
   labs(
 title = "Proportion of search results pages from autocomplete last 
longer than T, by test group and wiki",
 subtitle = "With 95% confidence intervals."
diff --git a/modules/stat_test/visited_page.R b/modules/stat_test/visited_page.R
index e8383b6..e608606 100644
--- a/modules/stat_test/visited_page.R
+++ b/modules/stat_test/visited_page.R
@@ -56,7 +56,7 @@
   ggtheme = wmf::theme_facet()
 )
 p <- ggsurv$plot +
-  facet_wrap(~ wiki, ncol = 3, scales = "free_y") +
+  facet_wrap(~ wiki, ncol = 3) +
   labs(
 title = "Proportion of visited search results last longer than T, by 
test group and wiki",
 subtitle = "With 95% confidence intervals."
diff --git a/modules/test_summary/browser_os.R 
b/modules/test_summary/browser_os.R
index b73886d..741e639 100644
--- a/modules/test_summary/browser_os.R
+++ b/modules/test_summary/browser_os.R
@@ -1,7 +1,6 @@
 if ("user_agent" %in% names(events)) {
 
   user_agents <- dplyr::distinct(events, wiki, session_id, group, user_agent)
-  user_agents$user_agent <- gsub('(Kindle Fire HD[X]? [0-9\\.]{1,3})"', '\\1', 
user_agents$user_agent, fixed = FALSE) # remove double quote in kindle name
   user_agents <- user_agents %>%
 cbind(., purrr::map_df(.$user_agent, ~ wmf::null2na(jsonlite::fromJSON(.x, 
simplifyVector = FALSE %>%
 mutate(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7167c7ea7c628aa3cf63d1d9171eaf922e8be6c5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/autoreporter
Gerrit-Branch: master
Gerrit-Owner: Chelsyx 

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


[MediaWiki-commits] [Gerrit] mediawiki...Contributors[REL1_27]: makeSpecialUrlSubpage() expects parameter to not be url encoded

2017-11-21 Thread Brian Wolff (Code Review)
Brian Wolff has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392760 )

Change subject: makeSpecialUrlSubpage() expects parameter to not be url encoded
..


makeSpecialUrlSubpage() expects parameter to not be url encoded

It's also not supposed to take a subpage at all (Triggers a warning
about aliases when $wgDevelopmentalWarnings is on) so replace with
makeSpecialUrlSubpage.

This fixes issue where Contributors extension didn't work on pages
containing apostrophes or non-ascii characters.

Bug: T152492
Change-Id: I424703f99adf837f6217872b882d1ea26bfdd123
---
M Contributors.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)



diff --git a/Contributors.hooks.php b/Contributors.hooks.php
index 3a4fa3b..dc7cbbd 100644
--- a/Contributors.hooks.php
+++ b/Contributors.hooks.php
@@ -79,8 +79,8 @@
if ( $skintemplate->getTitle()->getNamespace() === NS_MAIN && 
$revid !== 0 ) {
$nav_urls['contributors'] = array(
'text' => $skintemplate->msg( 
'contributors-toolbox' ),
-   'href' => $skintemplate->makeSpecialUrl(
-   'Contributors/' . wfUrlencode( 
$skintemplate->thispage )
+   'href' => $skintemplate->makeSpecialUrlSubpage(
+   'Contributors', $skintemplate->thispage
),
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I424703f99adf837f6217872b882d1ea26bfdd123
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Contributors
Gerrit-Branch: REL1_27
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...Contributors[REL1_27]: makeSpecialUrlSubpage() expects parameter to not be url encoded

2017-11-21 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392760 )

Change subject: makeSpecialUrlSubpage() expects parameter to not be url encoded
..

makeSpecialUrlSubpage() expects parameter to not be url encoded

It's also not supposed to take a subpage at all (Triggers a warning
about aliases when $wgDevelopmentalWarnings is on) so replace with
makeSpecialUrlSubpage.

This fixes issue where Contributors extension didn't work on pages
containing apostrophes or non-ascii characters.

Bug: T152492
Change-Id: I424703f99adf837f6217872b882d1ea26bfdd123
---
M Contributors.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Contributors 
refs/changes/60/392760/1

diff --git a/Contributors.hooks.php b/Contributors.hooks.php
index 3a4fa3b..dc7cbbd 100644
--- a/Contributors.hooks.php
+++ b/Contributors.hooks.php
@@ -79,8 +79,8 @@
if ( $skintemplate->getTitle()->getNamespace() === NS_MAIN && 
$revid !== 0 ) {
$nav_urls['contributors'] = array(
'text' => $skintemplate->msg( 
'contributors-toolbox' ),
-   'href' => $skintemplate->makeSpecialUrl(
-   'Contributors/' . wfUrlencode( 
$skintemplate->thispage )
+   'href' => $skintemplate->makeSpecialUrlSubpage(
+   'Contributors', $skintemplate->thispage
),
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I424703f99adf837f6217872b882d1ea26bfdd123
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Contributors
Gerrit-Branch: REL1_27
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...Contributors[master]: Fix message missing parameter

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

Change subject: Fix message missing parameter
..


Fix message missing parameter

Change-Id: Id844fe905de6e25e35c431a5715b4a91d496e123
---
M includes/SpecialContributors.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/SpecialContributors.php b/includes/SpecialContributors.php
index 9d92895..f847ee7 100644
--- a/includes/SpecialContributors.php
+++ b/includes/SpecialContributors.php
@@ -163,7 +163,9 @@
Xml::tags( 'ul', [ 'class' => 'plainlinks' ], 
$pager->getBody() ) .
$pager->getNavigationBar() );
} else {
-   $out->addWikiMsg( 'contributors-nosuchpage' );
+   $out->addWikiMsg( 'contributors-nosuchpage',
+   $this->contributorsClass->getTargetText()
+   );
}
 
$others = $this->contributorsClass->getNumOthers();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id844fe905de6e25e35c431a5715b4a91d496e123
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Contributors
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Brian Wolff 
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...Contributors[REL1_30]: makeSpecialUrlSubpage() expects parameter to not be url encoded

2017-11-21 Thread Brian Wolff (Code Review)
Brian Wolff has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392759 )

Change subject: makeSpecialUrlSubpage() expects parameter to not be url encoded
..


makeSpecialUrlSubpage() expects parameter to not be url encoded

It's also not supposed to take a subpage at all (Triggers a warning
about aliases when $wgDevelopmentalWarnings is on) so replace with
makeSpecialUrlSubpage.

This fixes issue where Contributors extension didn't work on pages
containing apostrophes or non-ascii characters.

Bug: T152492
Change-Id: I424703f99adf837f6217872b882d1ea26bfdd123
(cherry picked from commit 4bff21a5c09aeab2d1b492841d3360f31f9d52f7)
---
M includes/ContributorsHooks.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Brian Wolff: Verified; Looks good to me, approved



diff --git a/includes/ContributorsHooks.php b/includes/ContributorsHooks.php
index 5c203cc..c02fdc0 100644
--- a/includes/ContributorsHooks.php
+++ b/includes/ContributorsHooks.php
@@ -70,8 +70,8 @@
if ( $skintemplate->getTitle()->getNamespace() === NS_MAIN && 
$revid !== 0 ) {
$nav_urls['contributors'] = [
'text' => $skintemplate->msg( 
'contributors-toolbox' ),
-   'href' => $skintemplate->makeSpecialUrl(
-   'Contributors/' . wfUrlencode( 
$skintemplate->thispage )
+   'href' => $skintemplate->makeSpecialUrlSubpage(
+   'Contributors', $skintemplate->thispage
),
];
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I424703f99adf837f6217872b882d1ea26bfdd123
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Contributors
Gerrit-Branch: REL1_30
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...Contributors[REL1_30]: makeSpecialUrlSubpage() expects parameter to not be url encoded

2017-11-21 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392759 )

Change subject: makeSpecialUrlSubpage() expects parameter to not be url encoded
..

makeSpecialUrlSubpage() expects parameter to not be url encoded

It's also not supposed to take a subpage at all (Triggers a warning
about aliases when $wgDevelopmentalWarnings is on) so replace with
makeSpecialUrlSubpage.

This fixes issue where Contributors extension didn't work on pages
containing apostrophes or non-ascii characters.

Bug: T152492
Change-Id: I424703f99adf837f6217872b882d1ea26bfdd123
(cherry picked from commit 4bff21a5c09aeab2d1b492841d3360f31f9d52f7)
---
M includes/ContributorsHooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Contributors 
refs/changes/59/392759/1

diff --git a/includes/ContributorsHooks.php b/includes/ContributorsHooks.php
index 5c203cc..c02fdc0 100644
--- a/includes/ContributorsHooks.php
+++ b/includes/ContributorsHooks.php
@@ -70,8 +70,8 @@
if ( $skintemplate->getTitle()->getNamespace() === NS_MAIN && 
$revid !== 0 ) {
$nav_urls['contributors'] = [
'text' => $skintemplate->msg( 
'contributors-toolbox' ),
-   'href' => $skintemplate->makeSpecialUrl(
-   'Contributors/' . wfUrlencode( 
$skintemplate->thispage )
+   'href' => $skintemplate->makeSpecialUrlSubpage(
+   'Contributors', $skintemplate->thispage
),
];
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I424703f99adf837f6217872b882d1ea26bfdd123
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Contributors
Gerrit-Branch: REL1_30
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...Contributors[master]: Fix message missing parameter

2017-11-21 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392758 )

Change subject: Fix message missing parameter
..

Fix message missing parameter

Change-Id: Id844fe905de6e25e35c431a5715b4a91d496e123
---
M includes/SpecialContributors.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Contributors 
refs/changes/58/392758/1

diff --git a/includes/SpecialContributors.php b/includes/SpecialContributors.php
index 9d92895..f847ee7 100644
--- a/includes/SpecialContributors.php
+++ b/includes/SpecialContributors.php
@@ -163,7 +163,9 @@
Xml::tags( 'ul', [ 'class' => 'plainlinks' ], 
$pager->getBody() ) .
$pager->getNavigationBar() );
} else {
-   $out->addWikiMsg( 'contributors-nosuchpage' );
+   $out->addWikiMsg( 'contributors-nosuchpage',
+   $this->contributorsClass->getTargetText()
+   );
}
 
$others = $this->contributorsClass->getNumOthers();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id844fe905de6e25e35c431a5715b4a91d496e123
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Contributors
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Add a filter for learners (newly autoconfirmed users)

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

Change subject: Add a filter for learners (newly autoconfirmed users)
..


Add a filter for learners (newly autoconfirmed users)

Put the user's experience level in the DB as a string rather than
as a learner/not-learner boolean, so it's easier to add filters
for e.g. experienced users in the future.

Bonus: actually run PageTriageTagsPatch.sql from update.php

Bug: T175225
Change-Id: I27fd98fb8003525e6b512aaa5780b6375e0e6850
---
M PageTriage.hooks.php
M SpecialNewPagesFeed.php
M api/ApiPageTriageList.php
M api/ApiPageTriageStats.php
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/ArticleMetadata.php
M modules/ext.pageTriage.views.list/ext.pageTriage.listControlNav.js
M sql/PageTriageTags.sql
M sql/PageTriageTagsPatch.sql
M tests/phpunit/ArticleMetadataTest.php
12 files changed, 46 insertions(+), 4 deletions(-)

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



diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php
index 733df56..2f395a5 100644
--- a/PageTriage.hooks.php
+++ b/PageTriage.hooks.php
@@ -839,6 +839,12 @@
'ptrl_comment',
$base . '/PageTriageLogPatch_Drop_ptrl_comment.sql'
);
+   $updater->addExtensionUpdate( [
+   'modifyTable',
+   'pagetriage_tags',
+   $base . '/PageTriageTagsPatch.sql',
+   true
+   ] );
 
return true;
}
diff --git a/SpecialNewPagesFeed.php b/SpecialNewPagesFeed.php
index f82775e..00181ab 100644
--- a/SpecialNewPagesFeed.php
+++ b/SpecialNewPagesFeed.php
@@ -245,6 +245,11 @@

<%= mw.msg( 'pagetriage-filter-non-autoconfirmed' ) %>

 

+   
+   
<%= mw.msg( 'pagetriage-filter-learners' ) %>
+   

+   


<%= mw.msg( 'pagetriage-filter-blocked' ) %>
diff --git a/api/ApiPageTriageList.php b/api/ApiPageTriageList.php
index c8766c7..036f8a4 100644
--- a/api/ApiPageTriageList.php
+++ b/api/ApiPageTriageList.php
@@ -238,6 +238,8 @@
'no_inbound_links' => [ 'name' => 'linkcount', 'op' => 
'=', 'val' => '0' ],
// non auto confirmed users
'non_autoconfirmed_users' => [ 'name' => 
'user_autoconfirmed', 'op' => '=', 'val' => '0' ],
+   // learning users (newly autoconfirmed)
+   'learners' => [ 'name' => 'user_experience', 'op' => 
'=', 'val' => 'learner' ],
// blocked users
'blocked_users' => [ 'name' => 'user_block_status', 
'op' => '=', 'val' => '1' ],
// bots
@@ -316,6 +318,9 @@
'non_autoconfirmed_users' => [
ApiBase::PARAM_TYPE => 'boolean',
],
+   'learners' => [
+   ApiBase::PARAM_TYPE => 'boolean',
+   ],
'blocked_users' => [
ApiBase::PARAM_TYPE => 'boolean',
],
diff --git a/api/ApiPageTriageStats.php b/api/ApiPageTriageStats.php
index 228b46d..1e64621 100644
--- a/api/ApiPageTriageStats.php
+++ b/api/ApiPageTriageStats.php
@@ -56,6 +56,9 @@
'non_autoconfirmed_users' => [
ApiBase::PARAM_TYPE => 'boolean',
],
+   'learners' => [
+   ApiBase::PARAM_TYPE => 'boolean',
+   ],
'blocked_users' => [
ApiBase::PARAM_TYPE => 'boolean',
],
diff --git a/extension.json b/extension.json
index 04f0e9c..ecfc0f5 100644
--- a/extension.json
+++ b/extension.json
@@ -262,6 +262,7 @@
"pagetriage-filter-no-categories",
"pagetriage-filter-orphan",
"pagetriage-filter-non-autoconfirmed",
+   "pagetriage-filter-learners",

[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: PageTriageHooks: Use modifyExtensionTable() now that it exists

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

Change subject: PageTriageHooks: Use modifyExtensionTable() now that it exists
..


PageTriageHooks: Use modifyExtensionTable() now that it exists

Depends-On: I20368bf3c007a01718513a435de24907dc0aaf81
Change-Id: I65e647669cb11c18e092645c27e36655d51dc699
---
M PageTriage.hooks.php
1 file changed, 3 insertions(+), 5 deletions(-)

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



diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php
index 2f395a5..debd516 100644
--- a/PageTriage.hooks.php
+++ b/PageTriage.hooks.php
@@ -839,12 +839,10 @@
'ptrl_comment',
$base . '/PageTriageLogPatch_Drop_ptrl_comment.sql'
);
-   $updater->addExtensionUpdate( [
-   'modifyTable',
+   $updater->modifyExtensionTable(
'pagetriage_tags',
-   $base . '/PageTriageTagsPatch.sql',
-   true
-   ] );
+   $base . '/PageTriageTagsPatch.sql'
+   );
 
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65e647669cb11c18e092645c27e36655d51dc699
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Form[master]: Axing old reCAPTCHA support

2017-11-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392741 )

Change subject: Axing old reCAPTCHA support
..


Axing old reCAPTCHA support

Use $wgCaptchaTriggers['form'] to configure CAPTCHA for forms.

Change-Id: If38683947deb116b9edd2599b37c9f41a88c4f6b
---
M SpecialForm.php
M extension.json
M i18n/en.json
3 files changed, 0 insertions(+), 32 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/SpecialForm.php b/SpecialForm.php
index 710c51f..56921ca 100644
--- a/SpecialForm.php
+++ b/SpecialForm.php
@@ -156,8 +156,6 @@
}
 
private function showForm( $form, $errMsg = null ) {
-   global $wgSpecialFormRecaptcha;
-
$out = $this->getOutput();
$request = $this->getRequest();
$user = $this->getUser();
@@ -199,13 +197,6 @@
);
}
 
-   # Anonymous user, use reCAPTCHA
-   if ( $user->isAnon() && $wgSpecialFormRecaptcha ) {
-   require_once 'recaptchalib.php';
-   global $recaptcha_public_key; # same as used by 
reCAPTCHA extension
-   $out->addHTML( recaptcha_get_html( 
$recaptcha_public_key ) );
-   }
-
# CAPTCHA enabled?
if ( $this->useCaptcha() ) {
$out->addHTML( $this->getCaptcha() );
@@ -226,28 +217,9 @@
 * @param Form $form
 */
private function createArticle( $form ) {
-   global $wgSpecialFormRecaptcha;
-
$out = $this->getOutput();
$request = $this->getRequest();
$user = $this->getUser();
-
-   # Check reCAPTCHA
-   if ( $user->isAnon() && $wgSpecialFormRecaptcha ) {
-   require_once 'recaptchalib.php';
-   global $recaptcha_private_key; # same as used by 
reCAPTCHA extension
-   $resp = recaptcha_check_answer(
-   $recaptcha_private_key,
-   $_SERVER['REMOTE_ADDR'],
-   $request->getText( 'recaptcha_challenge_field' 
),
-   $request->getText( 'recaptcha_response_field' )
-   );
-
-   if ( !$resp->is_valid ) {
-   $this->showForm( $form, $this->msg( 
'form-bad-recaptcha' )->text() );
-   return;
-   }
-   }
 
# Check ordinary CAPTCHA
if ( $this->useCaptcha() && 
!ConfirmEditHooks::getInstance()->passCaptchaFromRequest( $request, $user ) ) {
diff --git a/extension.json b/extension.json
index 437c297..af98792 100644
--- a/extension.json
+++ b/extension.json
@@ -9,9 +9,6 @@
"url": "https://www.mediawiki.org/wiki/Extension:Form;,
"descriptionmsg": "form-desc",
"type": "specialpage",
-   "config": {
-   "SpecialFormRecaptcha": false
-   },
"SpecialPages": {
"Form": "SpecialForm"
},
diff --git a/i18n/en.json b/i18n/en.json
index 7cbbc22..5ca2299 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -21,7 +21,6 @@
"form-article-exists": "Page exists",
"form-article-existstext": "The page [[$1]] already exists.",
"form-bad-page-name": "Bad page name",
-   "form-bad-recaptcha": "Incorrect values for reCaptcha. Try again.",
"form-bad-page-name-text": "The form data you entered makes a bad page 
name, \"$1\".",
"form-required-field-error": "The {{PLURAL:$2|field $1 is|fields $1 
are}} required for this form.\nPlease fill {{PLURAL:$2|it|them}} in.",
"form-save-summary": "New page using [[Special:Form/$1|form $1]]",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If38683947deb116b9edd2599b37c9f41a88c4f6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Form
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Siebrand 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Update URL even when we skip fetching

2017-11-21 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392757 )

Change subject: RCFilters: Update URL even when we skip fetching
..

RCFilters: Update URL even when we skip fetching

In some cases, when the selected value of the filters have not
changed, we don't reload the results. However, we should still
update the URL values.

Change-Id: Iff81b4ca1b78848813b2eb8d55f0f5f5e614b424
---
M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
1 file changed, 8 insertions(+), 1 deletion(-)


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

diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
index 5386291..0cec3ff 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
@@ -400,9 +400,12 @@
 * Reset to default filters
 */
mw.rcfilters.Controller.prototype.resetToDefaults = function () {
-   if ( this.applyParamChange( this._getDefaultParams() ) ) {
+   var params = this._getDefaultParams();
+   if ( this.applyParamChange( params ) ) {
// Only update the changes list if there was a change 
to actual filters
this.updateChangesList();
+   } else {
+   this.uriProcessor.updateURL( params );
}
};
 
@@ -425,6 +428,8 @@
if ( this.applyParamChange( {} ) ) {
// Only update the changes list if there was a change 
to actual filters
this.updateChangesList();
+   } else {
+   this.uriProcessor.updateURL();
}
 
if ( highlightedFilterNames ) {
@@ -712,6 +717,8 @@
if ( this.applyParamChange( params ) ) {
// Update changes list only if there was a difference 
in filter selection
this.updateChangesList();
+   } else {
+   this.uriProcessor.updateURL( params );
}
 
// Log filter grouping

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Add API action for dumping cirrus articles

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

Change subject: Add API action for dumping cirrus articles
..


Add API action for dumping cirrus articles

This is particularly convenient for the browser tests to use, so they
can ping the api to see if an article that it created/updated is now
in cirrussearch.

Change-Id: I5dbd02592eebb166362c7cb9dabcd2b93bae66c5
---
M CirrusSearch.php
M autoload.php
M i18n/en.json
M i18n/qqq.json
R includes/Api/ApiTrait.php
M includes/Api/ConfigDump.php
M includes/Api/FreezeWritesToCluster.php
M includes/Api/MappingDump.php
A includes/Api/QueryCirrusDoc.php
M includes/Api/SettingsDump.php
M includes/Api/SuggestIndex.php
M tests/integration/features/step_definitions/page_step_helpers.js
12 files changed, 157 insertions(+), 9 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/CirrusSearch.php b/CirrusSearch.php
index bf53382..0bd827c 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -1336,6 +1336,7 @@
 $wgAPIModules['cirrus-config-dump'] = 'CirrusSearch\Api\ConfigDump';
 $wgAPIModules['cirrus-mapping-dump'] = 'CirrusSearch\Api\MappingDump';
 $wgAPIModules['cirrus-settings-dump'] = 'CirrusSearch\Api\SettingsDump';
+$wgAPIPropModules['cirrusdoc'] = 'CirrusSearch\Api\QueryCirrusDoc';
 
 /**
  * Configs
diff --git a/autoload.php b/autoload.php
index 1cb17de..f098fcc 100644
--- a/autoload.php
+++ b/autoload.php
@@ -5,10 +5,11 @@
 
 $wgAutoloadClasses += [
'CirrusSearch' => __DIR__ . '/includes/CirrusSearch.php',
-   'CirrusSearch\\Api\\ApiBase' => __DIR__ . '/includes/Api/ApiBase.php',
+   'CirrusSearch\\Api\\ApiTrait' => __DIR__ . '/includes/Api/ApiTrait.php',
'CirrusSearch\\Api\\ConfigDump' => __DIR__ . 
'/includes/Api/ConfigDump.php',
'CirrusSearch\\Api\\FreezeWritesToCluster' => __DIR__ . 
'/includes/Api/FreezeWritesToCluster.php',
'CirrusSearch\\Api\\MappingDump' => __DIR__ . 
'/includes/Api/MappingDump.php',
+   'CirrusSearch\\Api\\QueryCirrusDoc' => __DIR__ . 
'/includes/Api/QueryCirrusDoc.php',
'CirrusSearch\\Api\\SettingsDump' => __DIR__ . 
'/includes/Api/SettingsDump.php',
'CirrusSearch\\Api\\SuggestIndex' => __DIR__ . 
'/includes/Api/SuggestIndex.php',
'CirrusSearch\\BaseInterwikiResolver' => __DIR__ . 
'/includes/BaseInterwikiResolver.php',
diff --git a/i18n/en.json b/i18n/en.json
index ab44497..428c84c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -23,6 +23,9 @@
"apihelp-cirrus-settings-dump-description": "Dump of CirrusSearch 
settings for this wiki.",
"apihelp-cirrus-settings-dump-summary": "Dump of CirrusSearch settings 
for this wiki.",
"apihelp-cirrus-settings-dump-example": "Get a dump of CirrusSearch 
settings for this wiki.",
+   "apihelp-query+cirrusdoc-description": "Dump of a CirrusSearch article 
document",
+   "apihelp-query+cirrusdoc-summary": "Dump of a CirrusSearch article 
document",
+   "apihelp-query+cirrusdoc-example": "Get a dump of a single CirrusSearch 
article.",
"apierror-cirrus-requesttoolong": "Prefix search request was longer 
than the maximum allowed length. ($1  $2)",
"cirrussearch-give-feedback": "Give us your feedback",
"cirrussearch-morelikethis-settings": " # \n# This message lets you configure the settings of the 
\"more like this\" feature.\n# Changes to this take effect immediately.\n# The 
syntax is as follows:\n#   * Everything from a \"#\" character to the end of 
the line is a comment.\n#   * Every non-blank line is the setting name followed 
by a \":\" character followed by the setting value\n# The settings are:\n#   * 
min_doc_freq (integer): Minimum number of documents (per shard) that need a 
term for it to be considered.\n#   * max_doc_freq (integer): Maximum number of 
documents (per shard) that have a term for it to be considered.\n#  
 High frequency terms are generally \"stop words\".\n#   * max_query_terms 
(integer): Maximum number of terms to be considered. This value is limited to 
$wgCirrusSearchMoreLikeThisMaxQueryTermsLimit (100).\n#   * min_term_freq 
(integer): Minimum number of times the term appears in the input to doc to be 
considered. For small fields (title) this value should be 1.\n#   * 
minimum_should_match (percentage -100% to 100%, or integer number of terms): 
The percentage of terms to match on. Defaults to 30%.\n#   * min_word_len 
(integer): Minimal length of a term to be considered. Defaults to 0.\n#   * 
max_word_len (integer): The maximum word length above which words will be 
ignored. Defaults to unbounded (0).\n#   * fields (comma separated list of 
values): These are the fields to use. Allowed fields are title, text, 
auxiliary_text, opening_text, headings.\n# Examples of good lines:\n# 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Respect subpage in RCLinked

2017-11-21 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392756 )

Change subject: RCFilters: Respect subpage in RCLinked
..

RCFilters: Respect subpage in RCLinked

Make sure that when we redirect a URL when there's a saved query,
we retain the information about a subpage.

Then, normalize the URL to always use =xxx so that the
system knows to correct the value if the user uses the form that
is, for the moment, outside the regular RCFilters interface.

Bug: T181100
Change-Id: I75cfb2b56a4da6357e6117b3f34f3178bfb2c90c
---
M includes/specials/SpecialRecentchangeslinked.php
M resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
2 files changed, 27 insertions(+), 2 deletions(-)


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

diff --git a/includes/specials/SpecialRecentchangeslinked.php 
b/includes/specials/SpecialRecentchangeslinked.php
index 358a309..c5a2e1a 100644
--- a/includes/specials/SpecialRecentchangeslinked.php
+++ b/includes/specials/SpecialRecentchangeslinked.php
@@ -30,6 +30,8 @@
/** @var bool|Title */
protected $rclTargetTitle;
 
+   protected $rclTarget;
+
function __construct() {
parent::__construct( 'Recentchangeslinked' );
}
@@ -44,6 +46,7 @@
 
public function parseParameters( $par, FormOptions $opts ) {
$opts['target'] = $par;
+   $this->rclTarget = $par;
}
 
/**
@@ -293,4 +296,15 @@
public function prefixSearchSubpages( $search, $limit, $offset ) {
return $this->prefixSearchString( $search, $limit, $offset );
}
+
+   /**
+* Get a self-referential title object
+*
+* @param string|bool $subpage
+* @return Title
+* @since 1.23
+*/
+   public function getPageTitle() {
+   return parent::getPageTitle( $this->rclTarget );
+   }
 }
diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
index 621c200..6eeeb33 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
@@ -63,13 +63,25 @@
 * @return {mw.Uri} Updated Uri
 */
mw.rcfilters.UriProcessor.prototype.getUpdatedUri = function ( uriQuery 
) {
-   var uri = new mw.Uri(),
+   var titlePieces,
+   uri = new mw.Uri(),
unrecognizedParams = this.getUnrecognizedParams( 
uriQuery || uri.query );
 
if ( uriQuery ) {
// This is mainly for tests, to be able to give the 
method
// an initial URI Query and test that it retains 
parameters
uri.query = uriQuery;
+   }
+
+   // Normalize subpage to use = so we are always
+   // consistent in Special:RecentChangesLinked between the
+   // ?title=Special:RecentChangesLinked/TargetPage and
+   // ?title=Special:RecentChangesLinked=TargetPage
+   if ( uri.query.title.indexOf( '/' ) !== -1 ) {
+   titlePieces = uri.query.title.split( '/' );
+
+   unrecognizedParams.title = titlePieces.shift();
+   unrecognizedParams.target = titlePieces.join( '/' );
}
 
uri.query = this.filtersModel.getMinimizedParamRepresentation(
@@ -87,7 +99,6 @@
 
// Reapply unrecognized params and url version
uri.query = $.extend( true, {}, uri.query, unrecognizedParams, 
{ urlversion: '2' } );
-
return uri;
};
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[wmf_deploy]: large banner limit: debugging instrumentation

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

Change subject: large banner limit: debugging instrumentation
..


large banner limit: debugging instrumentation

Bug: T180478
Change-Id: I2639b4dcb382746f6fb2c2f34555477d75d02e65
---
M resources/subscribing/ext.centralNotice.largeBannerLimit.js
1 file changed, 26 insertions(+), 9 deletions(-)

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



diff --git a/resources/subscribing/ext.centralNotice.largeBannerLimit.js 
b/resources/subscribing/ext.centralNotice.largeBannerLimit.js
index 9ec1f81..7e7cf37 100644
--- a/resources/subscribing/ext.centralNotice.largeBannerLimit.js
+++ b/resources/subscribing/ext.centralNotice.largeBannerLimit.js
@@ -40,6 +40,7 @@
 
if ( mw.cookie.get( identifier, '' ) ) {
 
+   cn.setDebugInfo( 'lbl: setting flag from legacy cookie' 
);
setFlag();
 
// Remove the legacy cookie
@@ -111,6 +112,8 @@
 
mixin.setPreBannerHandler( function ( mixinParams ) {
 
+   var switchToHigherBucket = false;
+
// Forced URL param. If we're showing a banner, it'll be the 
one for
// whichever bucket we're already in. No changes to storage.
if ( forced ) {
@@ -130,21 +133,34 @@
 
// No need to switch if the banner's already hidden or we're 
already
// on a small banner bucket
-   if ( cn.isBannerCanceled() || !isLarge() ) {
+   if ( cn.isBannerCanceled() ) {
+   cn.setDebugInfo( 'lbl: hidden' );
+   return;
+   }
+
+   if ( !isLarge() ) {
+   cn.setDebugInfo( 'lbl: previously switched' );
return;
}
 
// If we can't store a flag, or if there is a flag, go to a 
small banner
 
-   // Note: if there was a legacy cookie flag, either it was 
migrated (in
-   // which case checkFlag() will return true) or it was deleted 
and couldn't
-   // be set on the current system, due to having no storage 
options (in
-   // which case we'll always switch to small banners).
+   if ( multiStorageOption === 
cn.kvStore.multiStorageOptions.NO_STORAGE ) {
+   cn.setDebugInfo( 'lbl: no storage, switching' );
+   switchToHigherBucket = true;
 
-   if (
-   multiStorageOption === 
cn.kvStore.multiStorageOptions.NO_STORAGE ||
-   checkFlag()
-   ) {
+   } else if ( checkFlag() ) {
+
+   // Note: if there was a legacy cookie flag, either it 
was migrated (in
+   // which case checkFlag() will return true) or it was 
deleted and couldn't
+   // be set on the current system, due to having no 
storage options (in
+   // which case we'll always switch to small banners).
+
+   cn.setDebugInfo( 'lbl: flag found, switching' );
+   switchToHigherBucket = true;
+   }
+
+   if ( switchToHigherBucket ) {
if ( mixinParams.randomize ) {
cn.setBucket( Math.floor( Math.random() * 2 ) + 
2 );
} else {
@@ -167,6 +183,7 @@
!forced &&
cn.isBannerShown()
) {
+   cn.setDebugInfo( 'lbl: setting flag' );
setFlag();
}
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2639b4dcb382746f6fb2c2f34555477d75d02e65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: XenoRyet 
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...CentralNotice[wmf_deploy]: Add client-side setDebugInfo() method

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

Change subject: Add client-side setDebugInfo() method
..


Add client-side setDebugInfo() method

Also fixes a small bug in cn.internal.state.registerTest()

Bug: T180478
Change-Id: Iecece883eca7e507edfc613c2c481c8ce8d8e25a
---
M resources/subscribing/ext.centralNotice.display.js
M resources/subscribing/ext.centralNotice.display.state.js
2 files changed, 27 insertions(+), 1 deletion(-)

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



diff --git a/resources/subscribing/ext.centralNotice.display.js 
b/resources/subscribing/ext.centralNotice.display.js
index 9ced44b..8ea9a9a 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -712,6 +712,17 @@
},
 
/**
+* Set a string with information for debugging. (All strings 
set here will be
+* sent to the server via the debugInfo parameter on the record 
impression call).
+*
+* @param {string} str A string with the debugging information; 
should not
+*   contain pipe characters ('|').
+*/
+   setDebugInfo: function ( str ) {
+   cn.internal.state.setDebugInfo( str );
+   },
+
+   /**
 * Request that, if possible, the record impression call be 
delayed until a
 * promise is resolved. If the promise does not resolve before
 * MAX_RECORD_IMPRESSION_DELAY milliseconds after the banner is 
injected,
diff --git a/resources/subscribing/ext.centralNotice.display.state.js 
b/resources/subscribing/ext.centralNotice.display.state.js
index 407e048..0f10d79 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -405,11 +405,26 @@
if ( tests.length === 1 ) {
state.data.testIdentifiers = identifier;
} else {
-   state.data.testIdentifiers.concat( ',' 
+ identifier );
+   state.data.testIdentifiers += ',' + 
identifier;
}
}
},
 
+   /**
+* Set a string with information for debugging. (All strings 
set here will be
+* added to state data).
+*
+* @param {string} str A string with the debugging information; 
should not
+*   contain pipe characters ('|').
+*/
+   setDebugInfo: function ( str ) {
+   if ( !state.data.debugInfo ) {
+   state.data.debugInfo = str;
+   } else {
+   state.data.debugInfo += '|' + str;
+   }
+   },
+
lookupReasonCode: function ( reasonName ) {
if ( reasonName in REASONS ) {
return REASONS[ reasonName ];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iecece883eca7e507edfc613c2c481c8ce8d8e25a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: XenoRyet 
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...CentralNotice[wmf_deploy]: large banner limit: debugging instrumentation

2017-11-21 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392755 )

Change subject: large banner limit: debugging instrumentation
..

large banner limit: debugging instrumentation

Bug: T180478
Change-Id: I2639b4dcb382746f6fb2c2f34555477d75d02e65
---
M resources/subscribing/ext.centralNotice.largeBannerLimit.js
1 file changed, 26 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/55/392755/1

diff --git a/resources/subscribing/ext.centralNotice.largeBannerLimit.js 
b/resources/subscribing/ext.centralNotice.largeBannerLimit.js
index 9ec1f81..7e7cf37 100644
--- a/resources/subscribing/ext.centralNotice.largeBannerLimit.js
+++ b/resources/subscribing/ext.centralNotice.largeBannerLimit.js
@@ -40,6 +40,7 @@
 
if ( mw.cookie.get( identifier, '' ) ) {
 
+   cn.setDebugInfo( 'lbl: setting flag from legacy cookie' 
);
setFlag();
 
// Remove the legacy cookie
@@ -111,6 +112,8 @@
 
mixin.setPreBannerHandler( function ( mixinParams ) {
 
+   var switchToHigherBucket = false;
+
// Forced URL param. If we're showing a banner, it'll be the 
one for
// whichever bucket we're already in. No changes to storage.
if ( forced ) {
@@ -130,21 +133,34 @@
 
// No need to switch if the banner's already hidden or we're 
already
// on a small banner bucket
-   if ( cn.isBannerCanceled() || !isLarge() ) {
+   if ( cn.isBannerCanceled() ) {
+   cn.setDebugInfo( 'lbl: hidden' );
+   return;
+   }
+
+   if ( !isLarge() ) {
+   cn.setDebugInfo( 'lbl: previously switched' );
return;
}
 
// If we can't store a flag, or if there is a flag, go to a 
small banner
 
-   // Note: if there was a legacy cookie flag, either it was 
migrated (in
-   // which case checkFlag() will return true) or it was deleted 
and couldn't
-   // be set on the current system, due to having no storage 
options (in
-   // which case we'll always switch to small banners).
+   if ( multiStorageOption === 
cn.kvStore.multiStorageOptions.NO_STORAGE ) {
+   cn.setDebugInfo( 'lbl: no storage, switching' );
+   switchToHigherBucket = true;
 
-   if (
-   multiStorageOption === 
cn.kvStore.multiStorageOptions.NO_STORAGE ||
-   checkFlag()
-   ) {
+   } else if ( checkFlag() ) {
+
+   // Note: if there was a legacy cookie flag, either it 
was migrated (in
+   // which case checkFlag() will return true) or it was 
deleted and couldn't
+   // be set on the current system, due to having no 
storage options (in
+   // which case we'll always switch to small banners).
+
+   cn.setDebugInfo( 'lbl: flag found, switching' );
+   switchToHigherBucket = true;
+   }
+
+   if ( switchToHigherBucket ) {
if ( mixinParams.randomize ) {
cn.setBucket( Math.floor( Math.random() * 2 ) + 
2 );
} else {
@@ -167,6 +183,7 @@
!forced &&
cn.isBannerShown()
) {
+   cn.setDebugInfo( 'lbl: setting flag' );
setFlag();
}
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2639b4dcb382746f6fb2c2f34555477d75d02e65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[wmf_deploy]: Add client-side setDebugInfo() method

2017-11-21 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392754 )

Change subject: Add client-side setDebugInfo() method
..

Add client-side setDebugInfo() method

Also fixes a small bug in cn.internal.state.registerTest()

Bug: T180478
Change-Id: Iecece883eca7e507edfc613c2c481c8ce8d8e25a
---
M resources/subscribing/ext.centralNotice.display.js
M resources/subscribing/ext.centralNotice.display.state.js
2 files changed, 27 insertions(+), 1 deletion(-)


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

diff --git a/resources/subscribing/ext.centralNotice.display.js 
b/resources/subscribing/ext.centralNotice.display.js
index 9ced44b..8ea9a9a 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -712,6 +712,17 @@
},
 
/**
+* Set a string with information for debugging. (All strings 
set here will be
+* sent to the server via the debugInfo parameter on the record 
impression call).
+*
+* @param {string} str A string with the debugging information; 
should not
+*   contain pipe characters ('|').
+*/
+   setDebugInfo: function ( str ) {
+   cn.internal.state.setDebugInfo( str );
+   },
+
+   /**
 * Request that, if possible, the record impression call be 
delayed until a
 * promise is resolved. If the promise does not resolve before
 * MAX_RECORD_IMPRESSION_DELAY milliseconds after the banner is 
injected,
diff --git a/resources/subscribing/ext.centralNotice.display.state.js 
b/resources/subscribing/ext.centralNotice.display.state.js
index 407e048..0f10d79 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -405,11 +405,26 @@
if ( tests.length === 1 ) {
state.data.testIdentifiers = identifier;
} else {
-   state.data.testIdentifiers.concat( ',' 
+ identifier );
+   state.data.testIdentifiers += ',' + 
identifier;
}
}
},
 
+   /**
+* Set a string with information for debugging. (All strings 
set here will be
+* added to state data).
+*
+* @param {string} str A string with the debugging information; 
should not
+*   contain pipe characters ('|').
+*/
+   setDebugInfo: function ( str ) {
+   if ( !state.data.debugInfo ) {
+   state.data.debugInfo = str;
+   } else {
+   state.data.debugInfo += '|' + str;
+   }
+   },
+
lookupReasonCode: function ( reasonName ) {
if ( reasonName in REASONS ) {
return REASONS[ reasonName ];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iecece883eca7e507edfc613c2c481c8ce8d8e25a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: large banner limit: debugging instrumentation

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

Change subject: large banner limit: debugging instrumentation
..


large banner limit: debugging instrumentation

Bug: T180478
Change-Id: I2639b4dcb382746f6fb2c2f34555477d75d02e65
---
M resources/subscribing/ext.centralNotice.largeBannerLimit.js
1 file changed, 26 insertions(+), 9 deletions(-)

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



diff --git a/resources/subscribing/ext.centralNotice.largeBannerLimit.js 
b/resources/subscribing/ext.centralNotice.largeBannerLimit.js
index 9ec1f81..7e7cf37 100644
--- a/resources/subscribing/ext.centralNotice.largeBannerLimit.js
+++ b/resources/subscribing/ext.centralNotice.largeBannerLimit.js
@@ -40,6 +40,7 @@
 
if ( mw.cookie.get( identifier, '' ) ) {
 
+   cn.setDebugInfo( 'lbl: setting flag from legacy cookie' 
);
setFlag();
 
// Remove the legacy cookie
@@ -111,6 +112,8 @@
 
mixin.setPreBannerHandler( function ( mixinParams ) {
 
+   var switchToHigherBucket = false;
+
// Forced URL param. If we're showing a banner, it'll be the 
one for
// whichever bucket we're already in. No changes to storage.
if ( forced ) {
@@ -130,21 +133,34 @@
 
// No need to switch if the banner's already hidden or we're 
already
// on a small banner bucket
-   if ( cn.isBannerCanceled() || !isLarge() ) {
+   if ( cn.isBannerCanceled() ) {
+   cn.setDebugInfo( 'lbl: hidden' );
+   return;
+   }
+
+   if ( !isLarge() ) {
+   cn.setDebugInfo( 'lbl: previously switched' );
return;
}
 
// If we can't store a flag, or if there is a flag, go to a 
small banner
 
-   // Note: if there was a legacy cookie flag, either it was 
migrated (in
-   // which case checkFlag() will return true) or it was deleted 
and couldn't
-   // be set on the current system, due to having no storage 
options (in
-   // which case we'll always switch to small banners).
+   if ( multiStorageOption === 
cn.kvStore.multiStorageOptions.NO_STORAGE ) {
+   cn.setDebugInfo( 'lbl: no storage, switching' );
+   switchToHigherBucket = true;
 
-   if (
-   multiStorageOption === 
cn.kvStore.multiStorageOptions.NO_STORAGE ||
-   checkFlag()
-   ) {
+   } else if ( checkFlag() ) {
+
+   // Note: if there was a legacy cookie flag, either it 
was migrated (in
+   // which case checkFlag() will return true) or it was 
deleted and couldn't
+   // be set on the current system, due to having no 
storage options (in
+   // which case we'll always switch to small banners).
+
+   cn.setDebugInfo( 'lbl: flag found, switching' );
+   switchToHigherBucket = true;
+   }
+
+   if ( switchToHigherBucket ) {
if ( mixinParams.randomize ) {
cn.setBucket( Math.floor( Math.random() * 2 ) + 
2 );
} else {
@@ -167,6 +183,7 @@
!forced &&
cn.isBannerShown()
) {
+   cn.setDebugInfo( 'lbl: setting flag' );
setFlag();
}
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2639b4dcb382746f6fb2c2f34555477d75d02e65
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Timeless everywhere

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

Change subject: Enable Timeless everywhere
..


Enable Timeless everywhere

It has been tested in a few places, and there are requests at many
more. Given that it only enables an option in preferences, and is
not enabled by default unless the user selects the option, I think
it makes more sense to enable it everywhere, than to keep enabling
on an ever-expanding list of wikis.

Bug: T154371
Change-Id: I887eb8e30061e2e8fac448c7512ee420142b6213
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 11 deletions(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  MaxSem: Looks good to me, approved
  jenkins-bot: Verified
  Zoranzoki21: Looks good to me, but someone else must approve



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a095196..d764602 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19716,17 +19716,7 @@
 ],
 
 'wmgUseTimeless' => [
-   'default' => false,
-   'testwiki' => true,
-   'test2wiki' => true,
-   'mediawikiwiki' => true,
-   'labswiki' => true,
-   'labtestwiki' => true,
-   'frwiki' => true, // T154371
-   'frwikinews' => true,
-   'frwikisource' => true,
-   'frwikiversity' => true,
-   'frwiktionary' => true,
+   'default' => true,
 ],
 
 // T152540

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I887eb8e30061e2e8fac448c7512ee420142b6213
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Urbanecm 
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...InputBox[wmf/1.31.0-wmf.8]: Have inputbox langconvert certain attributes

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

Change subject: Have inputbox langconvert certain attributes
..


Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
(cherry picked from commit b9e0005c715cbb668af530736b3e3728fe96d77e)
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 52 insertions(+), 1 deletion(-)

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



diff --git a/InputBox.classes.php b/InputBox.classes.php
index f504468..d65a7ac 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -641,9 +641,19 @@
'searchfilter' => 'mSearchFilter',
'tour' => 'mTour'
];
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -695,4 +705,26 @@
private function shouldUseVE() {
return ExtensionRegistry::getInstance()->isLoaded( 
'VisualEditor' ) && $this->mUseVE !== null;
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }
diff --git a/tests/inputBoxParserTests.txt b/tests/inputBoxParserTests.txt
index 63e0d62..cd629dd 100644
--- a/tests/inputBoxParserTests.txt
+++ b/tests/inputBoxParserTests.txt
@@ -328,4 +328,23 @@
 
 
 
-!! end
\ No newline at end of file
+!! end
+
+!! test
+InputBox langconvert
+!! options
+language=sr variant=sr-el
+!! wikitext
+
+type=create
+default=-{sr-el: Some latin; sr-ec: Not latin }-
+placeholder=-{sr-el: el; sr-ec: ec}-
+
+!! html+tidy
+
+
+
+
+
+
+!! end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: wmf/1.31.0-wmf.8
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: objectcache: add WANObjectCache::STALE_TTL_NONE constant

2017-11-21 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392752 )

Change subject: objectcache: add WANObjectCache::STALE_TTL_NONE constant
..

objectcache: add WANObjectCache::STALE_TTL_NONE constant

Also improved the documentation around "staleTTL".

Change-Id: Iae3377cbf58d8aa2c70f75586f183089a8bec92f
---
M includes/libs/objectcache/WANObjectCache.php
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/392752/1

diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index 51c4669..a3c9d71 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -135,6 +135,9 @@
const TTL_LAGGED = 30;
/** Idiom for delete() for "no hold-off" */
const HOLDOFF_NONE = 0;
+   /** Idiom for set() for "do not augment the storage medium TTL" */
+   const STALE_TTL_NONE = 0;
+
/** Idiom for getWithSetCallback() for "no minimum required as-of 
timestamp" */
const MIN_TIMESTAMP_NONE = 0.0;
 
@@ -426,24 +429,25 @@
 *  they certainly should not see ones that ended up getting rolled 
back.
 *  Default: false
 *   - lockTSE : if excessive replication/snapshot lag is detected, 
then store the value
-*  with this TTL and flag it as stale. This is only useful if the 
reads for
-*  this key use getWithSetCallback() with "lockTSE" set.
+*  with this TTL and flag it as stale. This is only useful if the 
reads for this key
+*  use getWithSetCallback() with "lockTSE" set. Note that if 
"staleTTL" is set
+*  then it will still add on to this TTL in the excessive lag 
scenario.
 *  Default: WANObjectCache::TSE_NONE
 *   - staleTTL : Seconds to keep the key around if it is stale. The 
get()/getMulti()
 *  methods return such stale values with a $curTTL of 0, and 
getWithSetCallback()
 *  will call the regeneration callback in such cases, passing in 
the old value
 *  and its as-of time to the callback. This is useful if 
adaptiveTTL() is used
 *  on the old value's as-of time when it is verified as still 
being correct.
-*  Default: 0.
+*  Default: WANObjectCache::STALE_TTL_NONE.
 * @note Options added in 1.28: staleTTL
 * @return bool Success
 */
final public function set( $key, $value, $ttl = 0, array $opts = [] ) {
$now = microtime( true );
$lockTSE = isset( $opts['lockTSE'] ) ? $opts['lockTSE'] : 
self::TSE_NONE;
+   $staleTTL = isset( $opts['staleTTL'] ) ? $opts['staleTTL'] : 
self::STALE_TTL_NONE;
$age = isset( $opts['since'] ) ? max( 0, $now - $opts['since'] 
) : 0;
$lag = isset( $opts['lag'] ) ? $opts['lag'] : 0;
-   $staleTTL = isset( $opts['staleTTL'] ) ? $opts['staleTTL'] : 0;
 
// Do not cache potentially uncommitted data as it might get 
rolled back
if ( !empty( $opts['pending'] ) ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] objectcache: add "staleTTL" into WANObjectCache::getWi...

2017-11-21 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392753 )

Change subject: [WIP] objectcache: add "staleTTL" into 
WANObjectCache::getWithSetCallback()
..

[WIP] objectcache: add "staleTTL" into WANObjectCache::getWithSetCallback()

This simply involves passing it through to the set() call

Also added some related commons to adaptiveTTL() involving
usage of this option.

Change-Id: Id5833a5d4efb6cad2eb646832e5b0188e86e12fc
---
M includes/libs/objectcache/WANObjectCache.php
1 file changed, 47 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/392753/1

diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index a3c9d71..6008342 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -135,7 +135,7 @@
const TTL_LAGGED = 30;
/** Idiom for delete() for "no hold-off" */
const HOLDOFF_NONE = 0;
-   /** Idiom for set() for "do not augment the storage medium TTL" */
+   /** Idiom for set()/getWithSetCallback() for "do not augment the 
storage medium TTL" */
const STALE_TTL_NONE = 0;
 
/** Idiom for getWithSetCallback() for "no minimum required as-of 
timestamp" */
@@ -868,6 +868,11 @@
 *  Default: WANObjectCache::LOW_TTL.
 *   - ageNew: Consider popularity refreshes only once a key reaches 
this age in seconds.
 *  Default: WANObjectCache::AGE_NEW.
+*   - staleTTL : Seconds to keep the key around if it is stale. This 
means that on cache
+*  miss the callback may get $oldValue/$oldAsOf values for keys 
that have already been
+*  expired for this specified time. This is useful if 
adaptiveTTL() is used on the old
+*  value's as-of time when it is verified as still being correct.
+*  Default: WANObjectCache::STALE_TTL_NONE
 * @return mixed Value found or written to the key
 * @note Options added in 1.28: version, busyValue, hotTTR, ageNew, 
pcGroup, minAsOf
 * @note Callable type hints are not used to avoid class-autoloading
@@ -957,6 +962,7 @@
protected function doGetWithSetCallback( $key, $ttl, $callback, array 
$opts, &$asOf = null ) {
$lowTTL = isset( $opts['lowTTL'] ) ? $opts['lowTTL'] : min( 
self::LOW_TTL, $ttl );
$lockTSE = isset( $opts['lockTSE'] ) ? $opts['lockTSE'] : 
self::TSE_NONE;
+   $staleTTL = isset( $opts['staleTTL'] ) ? $opts['staleTTL'] : 
self::STALE_TTL_NONE;
$checkKeys = isset( $opts['checkKeys'] ) ? $opts['checkKeys'] : 
[];
$busyValue = isset( $opts['busyValue'] ) ? $opts['busyValue'] : 
null;
$popWindow = isset( $opts['hotTTR'] ) ? $opts['hotTTR'] : 
self::HOT_TTR;
@@ -1056,6 +1062,7 @@
 
if ( $valueIsCacheable ) {
$setOpts['lockTSE'] = $lockTSE;
+   $setOpts['staleTTL'] = $staleTTL;
// Use best known "since" timestamp if not provided
$setOpts += [ 'since' => $preCallbackTime ];
// Update the cache; this will fail if the key is 
tombstoned
@@ -1496,6 +1503,45 @@
 * $ttl = $cache->adaptiveTTL( $mtime, $cache::TTL_DAY );
 * @endcode
 *
+* Another use case is when there are no applicable "last modified" 
fields in the DB,
+* and there are too many dependencies for explicit purges to be 
viable, and the rate of
+* change to relevant content is unstable, and it is highly valued to 
have the cached value
+* be as up-to-date as possible.
+*
+* Example usage:
+* @code
+* $query = "";
+* $idListFromComplexQuery = $cache->getWithSetCallback(
+* $cache->makeKey( 'complex-graph-query', $hashOfQuery ),
+* GraphQueryClass::STARTING_TTL,
+* function ( $oldValue, &$ttl, array &$setOpts, $oldAsOf ) use 
( $query, $cache ) {
+* $gdb = $this->getReplicaGraphDbConnection();
+* // Account for any snapshot/replica DB lag
+* $setOpts += GraphDatabase::getCacheSetOptions( $gdb );
+*
+* $newList = iterator_to_array( $gdb->query( $query ) );
+* sort( $newList, SORT_NUMERIC ); // normalize
+*
+* $minTTL = GraphQueryClass::MIN_TTL;
+* $maxTTL = GraphQueryClass::MAX_TTL;
+* if ( $oldValue !== false ) {
+* // Note that $oldAsOf is the last time this callback 
ran
+* $ttl = ( $newList === $oldValue )
+* // No change: cache for 150% of the age of 
$oldValue
+*

[MediaWiki-commits] [Gerrit] mediawiki...InputBox[REL1_29]: Have inputbox langconvert certain attributes

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

Change subject: Have inputbox langconvert certain attributes
..


Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 52 insertions(+), 0 deletions(-)

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



diff --git a/InputBox.classes.php b/InputBox.classes.php
index b03ccd4..2aebfa1 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -600,9 +600,20 @@
'prefix' => 'mPrefix',
'dir' => 'mDir',
);
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
+
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -642,4 +653,26 @@
}
return '';
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }
diff --git a/tests/inputBoxParserTests.txt b/tests/inputBoxParserTests.txt
index 9d9749c..f727f65 100644
--- a/tests/inputBoxParserTests.txt
+++ b/tests/inputBoxParserTests.txt
@@ -87,3 +87,22 @@
 
 
 !! end
+
+!! test
+InputBox langconvert
+!! options
+language=sr variant=sr-el
+!! wikitext
+
+type=create
+default=-{sr-el: Some latin; sr-ec: Not latin }-
+placeholder=-{sr-el: el; sr-ec: ec}-
+
+!! html+tidy
+
+
+
+
+
+
+!! end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: REL1_29
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...InputBox[REL1_27]: Have inputbox langconvert certain attributes

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

Change subject: Have inputbox langconvert certain attributes
..


Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
---
M InputBox.classes.php
1 file changed, 33 insertions(+), 0 deletions(-)

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



diff --git a/InputBox.classes.php b/InputBox.classes.php
index b03ccd4..2aebfa1 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -600,9 +600,20 @@
'prefix' => 'mPrefix',
'dir' => 'mDir',
);
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
+
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -642,4 +653,26 @@
}
return '';
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: REL1_27
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...InputBox[REL1_27]: Have inputbox langconvert certain attributes

2017-11-21 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392751 )

Change subject: Have inputbox langconvert certain attributes
..

Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
---
M InputBox.classes.php
1 file changed, 33 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InputBox 
refs/changes/51/392751/1

diff --git a/InputBox.classes.php b/InputBox.classes.php
index b03ccd4..2aebfa1 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -600,9 +600,20 @@
'prefix' => 'mPrefix',
'dir' => 'mDir',
);
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
+
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -642,4 +653,26 @@
}
return '';
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: REL1_27
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...InputBox[REL1_28]: Have inputbox langconvert certain attributes

2017-11-21 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392750 )

Change subject: Have inputbox langconvert certain attributes
..

Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 52 insertions(+), 0 deletions(-)


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

diff --git a/InputBox.classes.php b/InputBox.classes.php
index b03ccd4..2aebfa1 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -600,9 +600,20 @@
'prefix' => 'mPrefix',
'dir' => 'mDir',
);
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
+
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -642,4 +653,26 @@
}
return '';
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }
diff --git a/tests/inputBoxParserTests.txt b/tests/inputBoxParserTests.txt
index 9d9749c..e01ae26 100644
--- a/tests/inputBoxParserTests.txt
+++ b/tests/inputBoxParserTests.txt
@@ -87,3 +87,22 @@
 
 
 !! end
+
+!! test
+InputBox langconvert
+!! options
+language=sr variant=sr-el
+!! wikitext
+
+type=create
+default=-{sr-el: Some latin; sr-ec: Not latin }-
+placeholder=-{sr-el: el; sr-ec: ec}-
+
+!! html+tidy
+
+
+
+
+
+
+!! end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: REL1_28
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...InputBox[REL1_29]: Have inputbox langconvert certain attributes

2017-11-21 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392749 )

Change subject: Have inputbox langconvert certain attributes
..

Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 52 insertions(+), 0 deletions(-)


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

diff --git a/InputBox.classes.php b/InputBox.classes.php
index b03ccd4..2aebfa1 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -600,9 +600,20 @@
'prefix' => 'mPrefix',
'dir' => 'mDir',
);
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
+
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -642,4 +653,26 @@
}
return '';
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }
diff --git a/tests/inputBoxParserTests.txt b/tests/inputBoxParserTests.txt
index 9d9749c..e01ae26 100644
--- a/tests/inputBoxParserTests.txt
+++ b/tests/inputBoxParserTests.txt
@@ -87,3 +87,22 @@
 
 
 !! end
+
+!! test
+InputBox langconvert
+!! options
+language=sr variant=sr-el
+!! wikitext
+
+type=create
+default=-{sr-el: Some latin; sr-ec: Not latin }-
+placeholder=-{sr-el: el; sr-ec: ec}-
+
+!! html+tidy
+
+
+
+
+
+
+!! end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: REL1_29
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...ReadingLists[master]: Add some things to .gitignore

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

Change subject: Add some things to .gitignore
..

Add some things to .gitignore

Change-Id: Ic5bc446be73c4c0e8393e8c3c9f0f45e957e16b9
---
M .gitignore
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index 59a2a36..bae1b3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
+.ackrc
 .*.swp
 *~
 /.project
+/.coverage
 /composer.lock
 /vendor
 /node_modules

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ReadingLists[master]: Deduplicate projects into their own table

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

Change subject: Deduplicate projects into their own table
..

Deduplicate projects into their own table

Create a reading_list_project table for projects (domains).
Use it to normalize the project column and not waste space e.g.
storing 'en.wikipedia.org' a million times; also to validate
projects (the table needs to be pregenerated, projects that are
not found in it are rejected).

The extension is agnostic about what values are supposed to be
used as projects, but a maintenance script is provided which
puts the wikifarm's wgCanonicalServer values (things like
'https://en.wikipedia.org') into the new table.

Change-Id: I047d1493f1d9f51d733c1925a38c080829589f35
---
M i18n/en.json
M i18n/qqq.json
A maintenance/populateProjectsFromSiteMatrix.php
A sql/patches/02-add-reading_list_project.sql
M sql/readinglists.sql
M src/Api/ApiQueryReadingListEntries.php
M src/Api/ApiReadingListsCreateEntry.php
M src/Doc/ReadingListEntryRow.php
M src/HookHandler.php
M src/ReadingListRepository.php
M tests/src/ReadingListRepositoryTest.php
11 files changed, 277 insertions(+), 61 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index ee02621..d66ee58 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -21,6 +21,7 @@
"readinglists-db-error-list-limit": "Users cannot have more than $1 
{{PLURAL:$1|list|lists}}.",
"readinglists-db-error-entry-limit": "List $1 cannot have more than $2 
{{PLURAL:$2|entry|entries}}.",
"readinglists-db-error-too-long": "Value for field $1 cannot be longer 
than $2 bytes.",
+   "readinglists-db-error-no-such-project": "'$1' is not a recognized 
project.",
"readinglists-apierror-project-title-param": "$1project and 
$1title must be used together.",
"readinglists-apierror-too-old": "Timestamps passed to 
$1changedsince cannot be older than $2.",
"apihelp-query+readinglists-summary": "List or filter the user's 
reading lists and show metadata about them.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 5334ebb..d4ed940 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -22,6 +22,7 @@
"readinglists-db-error-list-limit": "Error message used when the user 
has as many or more lists than the maximum allowed, and tries to add another 
one.\n\nParameters:\n* $1 - the maximum allowed number of lists per user.",
"readinglists-db-error-entry-limit": "Error message used when the user 
has as many or more entries in the given list than the maximum allowed, and 
tries to add another one.\n\nParameters:\n* $1 - the ID of the list in 
question.\n$2 - the maximum allowed number of entries per list.",
"readinglists-db-error-too-long": "Error message used when the user 
tries to set list/entry string fields to a longer value than what the database 
schema allows.\n\nParameters:\n* $1 - DB field name.\n$2 - DB field maximum 
length (in bytes).",
+   "readinglists-db-error-no-such-project": "Error message used when the 
user tries to add a new list entry, but the project does not match any of the 
known ones.\n\nParameters:\n* $1 - the project.",
"readinglists-apierror-project-title-param": "{{doc-apierror}}\n$1 is 
the module prefix.",
"readinglists-apierror-too-old": "{{doc-apierror}}\n$1 is the module 
prefix, $2 is the expiry date for deleted lists/entries.",
"apihelp-query+readinglists-summary": 
"{{doc-apihelp-summary|query+readinglists}}",
diff --git a/maintenance/populateProjectsFromSiteMatrix.php 
b/maintenance/populateProjectsFromSiteMatrix.php
new file mode 100644
index 000..0a5fb0e
--- /dev/null
+++ b/maintenance/populateProjectsFromSiteMatrix.php
@@ -0,0 +1,102 @@
+addDescription(
+   'Populate (or update) the reading_list_project table 
from SiteMatrix data.' );
+   $this->setBatchSize( 100 );
+   $this->requireExtension( 'SiteMatrix' );
+   $this->siteMatrix = new SiteMatrix();
+   }
+
+   /**
+* @inheritDoc
+*/
+   public function execute() {
+   $services = MediaWikiServices::getInstance();
+   $loadBalancerFactory = $services->getDBLoadBalancerFactory();
+   $dbw = Utils::getDB( DB_MASTER, $services );
+   $inserted = 0;
+
+   $this->output( "populating...\n" );
+   foreach ( $this->generateAllowedDomains() as list( $project ) ) 
{
+   $dbw->insert(
+   'reading_list_project',
+   [ 'rlp_project' => $project ],
+   __METHOD__,
+   [ 'IGNORE' ]
+   );
+   if ( $dbw->affectedRows() ) {
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: bird: add local source IP for BGP+BFD

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

Change subject: bird: add local source IP for BGP+BFD
..


bird: add local source IP for BGP+BFD

Change-Id: Ifdcfec75dbfca2ac199856ce860e7c8d1834d745
---
M modules/bird/templates/bird_anycast.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/bird/templates/bird_anycast.conf.erb 
b/modules/bird/templates/bird_anycast.conf.erb
index 57c68bc..0ce3d51 100644
--- a/modules/bird/templates/bird_anycast.conf.erb
+++ b/modules/bird/templates/bird_anycast.conf.erb
@@ -35,7 +35,7 @@
 import none;
 multihop 2;
 export filter vips_filter;
-local as 64605;
+local <%= @routerid %> as 64605;
 neighbor <%= neighbor %> as 14907;
 <%- if @bfd -%>
 bfd yes;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...InputBox[wmf/1.31.0-wmf.8]: Have inputbox langconvert certain attributes

2017-11-21 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392745 )

Change subject: Have inputbox langconvert certain attributes
..

Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
(cherry picked from commit b9e0005c715cbb668af530736b3e3728fe96d77e)
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 52 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InputBox 
refs/changes/45/392745/1

diff --git a/InputBox.classes.php b/InputBox.classes.php
index f504468..d65a7ac 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -641,9 +641,19 @@
'searchfilter' => 'mSearchFilter',
'tour' => 'mTour'
];
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -695,4 +705,26 @@
private function shouldUseVE() {
return ExtensionRegistry::getInstance()->isLoaded( 
'VisualEditor' ) && $this->mUseVE !== null;
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }
diff --git a/tests/inputBoxParserTests.txt b/tests/inputBoxParserTests.txt
index 63e0d62..cd629dd 100644
--- a/tests/inputBoxParserTests.txt
+++ b/tests/inputBoxParserTests.txt
@@ -328,4 +328,23 @@
 
 
 
-!! end
\ No newline at end of file
+!! end
+
+!! test
+InputBox langconvert
+!! options
+language=sr variant=sr-el
+!! wikitext
+
+type=create
+default=-{sr-el: Some latin; sr-ec: Not latin }-
+placeholder=-{sr-el: el; sr-ec: ec}-
+
+!! html+tidy
+
+
+
+
+
+
+!! end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: wmf/1.31.0-wmf.8
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: bird: add local source IP for BGP+BFD

2017-11-21 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392746 )

Change subject: bird: add local source IP for BGP+BFD
..

bird: add local source IP for BGP+BFD

Change-Id: Ifdcfec75dbfca2ac199856ce860e7c8d1834d745
---
M modules/bird/templates/bird_anycast.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/bird/templates/bird_anycast.conf.erb 
b/modules/bird/templates/bird_anycast.conf.erb
index 57c68bc..0ce3d51 100644
--- a/modules/bird/templates/bird_anycast.conf.erb
+++ b/modules/bird/templates/bird_anycast.conf.erb
@@ -35,7 +35,7 @@
 import none;
 multihop 2;
 export filter vips_filter;
-local as 64605;
+local <%= @routerid %> as 64605;
 neighbor <%= neighbor %> as 14907;
 <%- if @bfd -%>
 bfd yes;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Add client-side setDebugInfo() method

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

Change subject: Add client-side setDebugInfo() method
..


Add client-side setDebugInfo() method

Also fixes a small bug in cn.internal.state.registerTest()

Bug: T180478
Change-Id: Iecece883eca7e507edfc613c2c481c8ce8d8e25a
---
M resources/subscribing/ext.centralNotice.display.js
M resources/subscribing/ext.centralNotice.display.state.js
2 files changed, 27 insertions(+), 1 deletion(-)

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



diff --git a/resources/subscribing/ext.centralNotice.display.js 
b/resources/subscribing/ext.centralNotice.display.js
index 9ced44b..8ea9a9a 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -712,6 +712,17 @@
},
 
/**
+* Set a string with information for debugging. (All strings 
set here will be
+* sent to the server via the debugInfo parameter on the record 
impression call).
+*
+* @param {string} str A string with the debugging information; 
should not
+*   contain pipe characters ('|').
+*/
+   setDebugInfo: function ( str ) {
+   cn.internal.state.setDebugInfo( str );
+   },
+
+   /**
 * Request that, if possible, the record impression call be 
delayed until a
 * promise is resolved. If the promise does not resolve before
 * MAX_RECORD_IMPRESSION_DELAY milliseconds after the banner is 
injected,
diff --git a/resources/subscribing/ext.centralNotice.display.state.js 
b/resources/subscribing/ext.centralNotice.display.state.js
index 407e048..0f10d79 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -405,11 +405,26 @@
if ( tests.length === 1 ) {
state.data.testIdentifiers = identifier;
} else {
-   state.data.testIdentifiers.concat( ',' 
+ identifier );
+   state.data.testIdentifiers += ',' + 
identifier;
}
}
},
 
+   /**
+* Set a string with information for debugging. (All strings 
set here will be
+* added to state data).
+*
+* @param {string} str A string with the debugging information; 
should not
+*   contain pipe characters ('|').
+*/
+   setDebugInfo: function ( str ) {
+   if ( !state.data.debugInfo ) {
+   state.data.debugInfo = str;
+   } else {
+   state.data.debugInfo += '|' + str;
+   }
+   },
+
lookupReasonCode: function ( reasonName ) {
if ( reasonName in REASONS ) {
return REASONS[ reasonName ];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iecece883eca7e507edfc613c2c481c8ce8d8e25a
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: XenoRyet 
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...InputBox[REL1_30]: Have inputbox langconvert certain attributes

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

Change subject: Have inputbox langconvert certain attributes
..


Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
(cherry picked from commit b9e0005c715cbb668af530736b3e3728fe96d77e)
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 52 insertions(+), 1 deletion(-)

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



diff --git a/InputBox.classes.php b/InputBox.classes.php
index 5b80928..c2c0d40 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -632,9 +632,19 @@
'searchfilter' => 'mSearchFilter',
'tour' => 'mTour'
];
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -684,4 +694,26 @@
private function shouldUseVE() {
return ExtensionRegistry::getInstance()->isLoaded( 
'VisualEditor' ) && $this->mUseVE !== null;
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }
diff --git a/tests/inputBoxParserTests.txt b/tests/inputBoxParserTests.txt
index 63e0d62..cd629dd 100644
--- a/tests/inputBoxParserTests.txt
+++ b/tests/inputBoxParserTests.txt
@@ -328,4 +328,23 @@
 
 
 
-!! end
\ No newline at end of file
+!! end
+
+!! test
+InputBox langconvert
+!! options
+language=sr variant=sr-el
+!! wikitext
+
+type=create
+default=-{sr-el: Some latin; sr-ec: Not latin }-
+placeholder=-{sr-el: el; sr-ec: ec}-
+
+!! html+tidy
+
+
+
+
+
+
+!! end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Jackmcbarn 
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...parsoid[master]: Sync parserTests and citeParserTests with core/Cite.

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

Change subject: Sync parserTests and citeParserTests with core/Cite.
..


Sync parserTests and citeParserTests with core/Cite.

The newly-added test case "T29694 - [] in reference names in HTML5 fragment
mode" fails and has been added to the blacklist;
I12b2a148f7170d20bd9aacd3b5b8ee1965859592 is expected to fix this.

Change-Id: Ie2d9628a83e888af4cb0dd8321b1fa58b3fe1a6a
---
M tests/citeParserTests-blacklist.js
M tests/citeParserTests.txt
M tests/parserTests.json
M tests/parserTests.txt
4 files changed, 79 insertions(+), 6 deletions(-)

Approvals:
  C. Scott Ananian: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/citeParserTests-blacklist.js 
b/tests/citeParserTests-blacklist.js
index eb5093f..92f88bb 100644
--- a/tests/citeParserTests-blacklist.js
+++ b/tests/citeParserTests-blacklist.js
@@ -72,6 +72,7 @@
 add("wt2html", "Multiple definition (inside )", "[1]\n↑  abc");
 add("wt2html", "Multiple definition (mixed outside/inside)", "[1]\n↑  abc");
 add("wt2html", "Multiple definition (inside {{#tag:references}})", "[1]\n\n[1]\n[1]\n\n1 
2 3 
 abc");
+add("wt2html", "T29694 - [] in reference names in HTML5 fragment mode", "[1]\n↑  \">[bar]");
 
 
 // Blacklist for wt2wt
@@ -105,6 +106,7 @@
 add("wt2wt", "Multiple definition (inside )", "\n\nabc\ndef\n");
 add("wt2wt", "Multiple definition (mixed outside/inside)", "abc\n\ndef\n");
 add("wt2wt", "Multiple definition (inside {{#tag:references}})", "\n{{#tag:references|\nabc\ndef\n}}\n");
+add("wt2wt", "T29694 - [] in reference names in HTML5 fragment mode", "\">[bar]\n");
 add("wt2wt", "Ref: 3. spaces in ref-names should be ignored", "A foo\nB \nC \n");
 add("wt2wt", "Ref: 5. body should accept generic wikitext", "A This is a 
'''[[bolded link]]''' and this is a 
{{echo|transclusion}}\n\n\n");
 add("wt2wt", "Ref: 6. indent-pres should not be output in ref-body", "A 
foo\n bar\n baz\n\n\n");
@@ -143,6 +145,7 @@
 add("html2html", "Multiple definition (inside )", "[1]\n\n ↑
 abc Cite error: Invalid 
ref> tag; name \"a\" 
defined multiple times with different content\n");
 add("html2html", "Multiple definition (mixed outside/inside)", "[1]\n\n ↑
 abc Cite error: Invalid 
ref> tag; name \"a\" 
defined multiple times with different content\n");
 add("html2html", "Multiple definition (inside {{#tag:references}})", "[1]\n\n ↑
 abc Cite error: Invalid 
ref> tag; name \"a\" 
defined multiple times with different content\n");
+add("html2html", "T29694 - [] in reference names in HTML5 fragment mode", "[[#cite_note-[#foo]_{bar}_baz-1|[1]]]\n [[#cite_ref-[#foo]_{bar}_baz_1-0|↑]]
 \">[bar]\n");
 add("html2html", "Ref: 8. transclusion wikitext has lower precedence", "A [1] B C}}\n↑  foo {{echo|");
 add("html2html", "References: 9. Generate missing references list at the end", 
"A [1] B [inexistent 
1]\n↑  foo\n↑  bar");
 
@@ -181,6 +184,7 @@
 add("html2wt", "Multiple definition (inside )", "[[#cite_note-a-1|[1]]]\n\n# 
[[#cite_ref-a_1-0|↑]] abc Cite error: Invalid  
tag; name \"a\" defined multiple times with different content\n");
 add("html2wt", "Multiple definition (mixed outside/inside)", "[[#cite_note-a-1|[1]]]\n\n# 
[[#cite_ref-a_1-0|↑]] abc Cite error: Invalid  
tag; name \"a\" defined multiple times with different content\n");
 add("html2wt", "Multiple definition (inside {{#tag:references}})", "[[#cite_note-a-1|[1]]]\n\n# 
[[#cite_ref-a_1-0|↑]] abc Cite error: Invalid  
tag; name \"a\" defined multiple times with different content\n");
+add("html2wt", "T29694 - [] in reference names in HTML5 fragment mode", "[[#cite_note-#foo_{bar}_baz-1|[1]]]\n#
 [[#cite_ref-#foo_{bar}_baz_1-0|↑]]
 \">[bar]\n");
 add("html2wt", "Ref: 3. spaces in ref-names should be ignored", "A foo\nB \nC \n");
 add("html2wt", "Ref: 5. body should accept generic wikitext", "A This is 
a '''[[bolded link]]''' and this is a 
{{echo|transclusion}}\n\n\n");
 add("html2wt", "Ref: 6. indent-pres should not be output in ref-body", "A 
foo\n bar\n baz\n\n\n");
@@ -730,6 +734,25 @@
 add("selser", "Multiple definition (inside {{#tag:references}}) [4,0,0]", 
"c6o25q\n");
 add("selser", "Multiple definition (inside {{#tag:references}}) [2,3,0]", 
"r5lb7d\n\n\n{{#tag:references|\nabc\ndef\n}}");
 add("selser", "Multiple definition (inside {{#tag:references}}) [1,4,0]", 
"\n{{#tag:references|\nabc\ndef\n}}\n\n1sdxf2c");
+add("selser", "T29694 - [] in reference names in HTML5 fragment mode [3,0,0]", 
"\n");
+add("selser", "T29694 - [] in reference names in HTML5 fragment mode [2,3,0]", 
"1r8kw2d\n\n\">[bar]");
+add("selser", "T29694 - [] in reference names in HTML5 fragment mode [4,4,0]", 
"17gsx88\n\n1ysi8vn");
+add("selser", "T29694 - [] in reference names in HTML5 fragment mode [0,3,0]", 
"\">[bar]");
+add("selser", "T29694 - [] in reference names in HTML5 fragment mode [2,0,0]", 
"1t44xvn\n\n\">[bar]");
+add("selser", 

[MediaWiki-commits] [Gerrit] mediawiki...InputBox[REL1_30]: Have inputbox langconvert certain attributes

2017-11-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392744 )

Change subject: Have inputbox langconvert certain attributes
..

Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
(cherry picked from commit b9e0005c715cbb668af530736b3e3728fe96d77e)
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 52 insertions(+), 1 deletion(-)


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

diff --git a/InputBox.classes.php b/InputBox.classes.php
index 5b80928..c2c0d40 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -632,9 +632,19 @@
'searchfilter' => 'mSearchFilter',
'tour' => 'mTour'
];
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -684,4 +694,26 @@
private function shouldUseVE() {
return ExtensionRegistry::getInstance()->isLoaded( 
'VisualEditor' ) && $this->mUseVE !== null;
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }
diff --git a/tests/inputBoxParserTests.txt b/tests/inputBoxParserTests.txt
index 63e0d62..cd629dd 100644
--- a/tests/inputBoxParserTests.txt
+++ b/tests/inputBoxParserTests.txt
@@ -328,4 +328,23 @@
 
 
 
-!! end
\ No newline at end of file
+!! end
+
+!! test
+InputBox langconvert
+!! options
+language=sr variant=sr-el
+!! wikitext
+
+type=create
+default=-{sr-el: Some latin; sr-ec: Not latin }-
+placeholder=-{sr-el: el; sr-ec: ec}-
+
+!! html+tidy
+
+
+
+
+
+
+!! end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: large banner limit: debugging instrumentation

2017-11-21 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392743 )

Change subject: large banner limit: debugging instrumentation
..

large banner limit: debugging instrumentation

Bug: T180478
Change-Id: I2639b4dcb382746f6fb2c2f34555477d75d02e65
---
M resources/subscribing/ext.centralNotice.largeBannerLimit.js
1 file changed, 25 insertions(+), 9 deletions(-)


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

diff --git a/resources/subscribing/ext.centralNotice.largeBannerLimit.js 
b/resources/subscribing/ext.centralNotice.largeBannerLimit.js
index 9ec1f81..a19bbaa 100644
--- a/resources/subscribing/ext.centralNotice.largeBannerLimit.js
+++ b/resources/subscribing/ext.centralNotice.largeBannerLimit.js
@@ -111,6 +111,8 @@
 
mixin.setPreBannerHandler( function ( mixinParams ) {
 
+   var switchToHigherBucket = false;
+
// Forced URL param. If we're showing a banner, it'll be the 
one for
// whichever bucket we're already in. No changes to storage.
if ( forced ) {
@@ -130,21 +132,34 @@
 
// No need to switch if the banner's already hidden or we're 
already
// on a small banner bucket
-   if ( cn.isBannerCanceled() || !isLarge() ) {
+   if ( cn.isBannerCanceled() ) {
+   cn.setDebugInfo( 'largeBannerLimit: hidden' );
+   return;
+   }
+
+   if ( !isLarge() ) {
+   cn.setDebugInfo( 'largeBannerLimit: previously 
switched' );
return;
}
 
// If we can't store a flag, or if there is a flag, go to a 
small banner
 
-   // Note: if there was a legacy cookie flag, either it was 
migrated (in
-   // which case checkFlag() will return true) or it was deleted 
and couldn't
-   // be set on the current system, due to having no storage 
options (in
-   // which case we'll always switch to small banners).
+   if ( multiStorageOption === 
cn.kvStore.multiStorageOptions.NO_STORAGE ) {
+   cn.setDebugInfo( 'largeBannerLimit: no storage, 
switching' );
+   switchToHigherBucket = true;
 
-   if (
-   multiStorageOption === 
cn.kvStore.multiStorageOptions.NO_STORAGE ||
-   checkFlag()
-   ) {
+   } else if ( checkFlag() ) {
+
+   // Note: if there was a legacy cookie flag, either it 
was migrated (in
+   // which case checkFlag() will return true) or it was 
deleted and couldn't
+   // be set on the current system, due to having no 
storage options (in
+   // which case we'll always switch to small banners).
+
+   cn.setDebugInfo( 'largeBannerLimit: flag found, 
switching' );
+   switchToHigherBucket = true;
+   }
+
+   if ( switchToHigherBucket ) {
if ( mixinParams.randomize ) {
cn.setBucket( Math.floor( Math.random() * 2 ) + 
2 );
} else {
@@ -167,6 +182,7 @@
!forced &&
cn.isBannerShown()
) {
+   cn.setDebugInfo( 'largeBannerLimit: setting flag' );
setFlag();
}
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2639b4dcb382746f6fb2c2f34555477d75d02e65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] mediawiki...InputBox[master]: Have inputbox langconvert certain attributes

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

Change subject: Have inputbox langconvert certain attributes
..


Have inputbox langconvert certain attributes

This approximates the behaviour prior to core change for
T119158. It will language convert the options: default,
buttonlabel, searchbuttonlabel, and placeholder if they
contain a "-{".

The old behaviour was to handle the insides
of -{ glossary rules here }- and convert text if there was a
glossary rule both prior to the beginning of the attribute and
prior to the end of the attribute (So default=foo-{}-bar-{}-baz
only bar would be converted). I believe that just looking for
-{ is probably close enough. It also opens the question of if these
options should always be language converted, but I'll leave that
for someone else to decide.

Bug: T180485
Change-Id: I3aa10890950afce445075e895baf6b10327bc222
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 52 insertions(+), 1 deletion(-)

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



diff --git a/InputBox.classes.php b/InputBox.classes.php
index f504468..d65a7ac 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -641,9 +641,19 @@
'searchfilter' => 'mSearchFilter',
'tour' => 'mTour'
];
+   // Options we should maybe run through lang converter.
+   $convertOptions = [
+   'default' => true,
+   'buttonlabel' => true,
+   'searchbuttonlabel' => true,
+   'placeholder' => true
+   ];
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
$this->$var = $values[$name];
+   if ( isset( $convertOptions[$name] ) ) {
+   $this->$var = $this->languageConvert( 
$this->$var );
+   }
}
}
 
@@ -695,4 +705,26 @@
private function shouldUseVE() {
return ExtensionRegistry::getInstance()->isLoaded( 
'VisualEditor' ) && $this->mUseVE !== null;
}
+
+   /**
+* For compatability with pre T119158 behaviour
+*
+* If a field that is going to be used as an attribute
+* and it contains "-{" in it, run it through language
+* converter.
+*
+* Its not really clear if it would make more sense to
+* always convert instead of only if -{ is present. This
+* function just more or less restores the previous
+* accidental behaviour.
+*
+* @see https://phabricator.wikimedia.org/T180485
+*/
+   private function languageConvert( $text ) {
+   $lang = $this->mParser->getConverterLanguage();
+   if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
+   $text = $lang->convert( $text );
+   }
+   return $text;
+   }
 }
diff --git a/tests/inputBoxParserTests.txt b/tests/inputBoxParserTests.txt
index 63e0d62..cd629dd 100644
--- a/tests/inputBoxParserTests.txt
+++ b/tests/inputBoxParserTests.txt
@@ -328,4 +328,23 @@
 
 
 
-!! end
\ No newline at end of file
+!! end
+
+!! test
+InputBox langconvert
+!! options
+language=sr variant=sr-el
+!! wikitext
+
+type=create
+default=-{sr-el: Some latin; sr-ec: Not latin }-
+placeholder=-{sr-el: el; sr-ec: ec}-
+
+!! html+tidy
+
+
+
+
+
+
+!! end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aa10890950afce445075e895baf6b10327bc222
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Bird: use multihop eBGP (peer with router's loopback)

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

Change subject: Bird: use multihop eBGP (peer with router's loopback)
..


Bird: use multihop eBGP (peer with router's loopback)

Change-Id: Ia82c9a9c8766c6bae57fdeedde29ec4085c56384
---
M modules/bird/templates/bird_anycast.conf.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/bird/templates/bird_anycast.conf.erb 
b/modules/bird/templates/bird_anycast.conf.erb
index dc2693d..57c68bc 100644
--- a/modules/bird/templates/bird_anycast.conf.erb
+++ b/modules/bird/templates/bird_anycast.conf.erb
@@ -33,6 +33,7 @@
 <%- @neighbors.each do |neighbor| -%>
 protocol bgp {
 import none;
+multihop 2;
 export filter vips_filter;
 local as 64605;
 neighbor <%= neighbor %> as 14907;

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Bird: use multihop eBGP (peer with router's loopback)

2017-11-21 Thread Ayounsi (Code Review)
Ayounsi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392742 )

Change subject: Bird: use multihop eBGP (peer with router's loopback)
..

Bird: use multihop eBGP (peer with router's loopback)

Change-Id: Ia82c9a9c8766c6bae57fdeedde29ec4085c56384
---
M modules/bird/templates/bird_anycast.conf.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/392742/1

diff --git a/modules/bird/templates/bird_anycast.conf.erb 
b/modules/bird/templates/bird_anycast.conf.erb
index dc2693d..57c68bc 100644
--- a/modules/bird/templates/bird_anycast.conf.erb
+++ b/modules/bird/templates/bird_anycast.conf.erb
@@ -33,6 +33,7 @@
 <%- @neighbors.each do |neighbor| -%>
 protocol bgp {
 import none;
+multihop 2;
 export filter vips_filter;
 local as 64605;
 neighbor <%= neighbor %> as 14907;

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: anycast dns: use router loopbacks for neighbors

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

Change subject: anycast dns: use router loopbacks for neighbors
..


anycast dns: use router loopbacks for neighbors

Change-Id: If739f18a0c4a53a83ffe00e333d889dc9a3892d6
---
M hieradata/role/codfw/dnsrecursor.yaml
M hieradata/role/eqiad/dnsrecursor.yaml
M hieradata/role/esams/dnsrecursor.yaml
3 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/hieradata/role/codfw/dnsrecursor.yaml 
b/hieradata/role/codfw/dnsrecursor.yaml
index 219afcd..d3fb55e 100644
--- a/hieradata/role/codfw/dnsrecursor.yaml
+++ b/hieradata/role/codfw/dnsrecursor.yaml
@@ -1,3 +1,3 @@
 profile::bird::neighbors_list:
-  - 208.80.153.2 # cr1-codfw ae1:2001
-  - 208.80.153.3 # cr2-codfw ae1:2001
+  - 208.80.153.192 # cr1-codfw loopback
+  - 208.80.153.193 # cr2-codfw loopback
diff --git a/hieradata/role/eqiad/dnsrecursor.yaml 
b/hieradata/role/eqiad/dnsrecursor.yaml
index 0e3bddd..446f990 100644
--- a/hieradata/role/eqiad/dnsrecursor.yaml
+++ b/hieradata/role/eqiad/dnsrecursor.yaml
@@ -1,3 +1,3 @@
 profile::bird::neighbors_list:
-  - 208.80.154.2 # cr1-eqiad ae1:1001
-  - 208.80.154.3 # cr2-eqiad ae1:1001
+  - 208.80.154.196 # cr1-eqiad loopback
+  - 208.80.154.197 # cr2-eqiad loopback
diff --git a/hieradata/role/esams/dnsrecursor.yaml 
b/hieradata/role/esams/dnsrecursor.yaml
index 4594144..cdd7851 100644
--- a/hieradata/role/esams/dnsrecursor.yaml
+++ b/hieradata/role/esams/dnsrecursor.yaml
@@ -1,3 +1,3 @@
 profile::bird::neighbors_list:
-  - 91.198.174.2 # cr1-esams ae1:100
-  - 91.198.174.3 # cr2-esams ae1:100
+  - 91.198.174.245 # cr1-esams loopback
+  - 91.198.174.244 # cr2-esams loopback

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update mobileapps to 52d6a83

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

Change subject: Update mobileapps to 52d6a83
..


Update mobileapps to 52d6a83

List of changes:
52d6a83 Get mobile base URL from siteinfo and re-enable checks for mobile URLs
xxx Update node module dependencies

Change-Id: Idf8697e06301990d75e99805af7295a4278067b9
---
M node_modules/kad/package.json
M node_modules/swagger-ui/package.json
M src
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/node_modules/kad/package.json b/node_modules/kad/package.json
index 52f8ef1..6661663 100644
--- a/node_modules/kad/package.json
+++ b/node_modules/kad/package.json
@@ -49,7 +49,7 @@
 "/limitation"
   ],
   "_resolved": 
"git+https://github.com/gwicke/kad.git#936c91652d757ea6f9dd30e44698afb0daaa1d17;,
-  "_shasum": "2dc88cd063d8240d85ae522e10a6e7f766c73439",
+  "_shasum": "ba64e50d7bfa7e99a91d4a3db7611acc1f4cec0b",
   "_shrinkwrap": null,
   "_spec": "kad@git+https://github.com/gwicke/kad.git#master;,
   "_where": "/opt/service/node_modules/limitation",
diff --git a/node_modules/swagger-ui/package.json 
b/node_modules/swagger-ui/package.json
index 476e16e..e040bea 100644
--- a/node_modules/swagger-ui/package.json
+++ b/node_modules/swagger-ui/package.json
@@ -49,7 +49,7 @@
 "/"
   ],
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;,
-  "_shasum": "972cb711d12f0ecd1995fe048e5c90ad0190a86f",
+  "_shasum": "e423d32db4f9dfb6806f13ae9f9fbe00ebcdb5db",
   "_shrinkwrap": null,
   "_spec": "swagger-ui@git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_where": "/opt/service",
diff --git a/src b/src
index 9d1602d..52d6a83 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 9d1602d4c47e93758c8d1c15b32601027ea8a54b
+Subproject commit 52d6a83d4af42f21d77af6a7e16889dc75a6746a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf8697e06301990d75e99805af7295a4278067b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/deploy
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Form[master]: Axing old reCAPTCHA support

2017-11-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392741 )

Change subject: Axing old reCAPTCHA support
..

Axing old reCAPTCHA support

Use $wgCaptchaTriggers['form'] to configure CAPTCHA for forms.

Change-Id: If38683947deb116b9edd2599b37c9f41a88c4f6b
---
M SpecialForm.php
M extension.json
M i18n/en.json
3 files changed, 0 insertions(+), 32 deletions(-)


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

diff --git a/SpecialForm.php b/SpecialForm.php
index 710c51f..56921ca 100644
--- a/SpecialForm.php
+++ b/SpecialForm.php
@@ -156,8 +156,6 @@
}
 
private function showForm( $form, $errMsg = null ) {
-   global $wgSpecialFormRecaptcha;
-
$out = $this->getOutput();
$request = $this->getRequest();
$user = $this->getUser();
@@ -199,13 +197,6 @@
);
}
 
-   # Anonymous user, use reCAPTCHA
-   if ( $user->isAnon() && $wgSpecialFormRecaptcha ) {
-   require_once 'recaptchalib.php';
-   global $recaptcha_public_key; # same as used by 
reCAPTCHA extension
-   $out->addHTML( recaptcha_get_html( 
$recaptcha_public_key ) );
-   }
-
# CAPTCHA enabled?
if ( $this->useCaptcha() ) {
$out->addHTML( $this->getCaptcha() );
@@ -226,28 +217,9 @@
 * @param Form $form
 */
private function createArticle( $form ) {
-   global $wgSpecialFormRecaptcha;
-
$out = $this->getOutput();
$request = $this->getRequest();
$user = $this->getUser();
-
-   # Check reCAPTCHA
-   if ( $user->isAnon() && $wgSpecialFormRecaptcha ) {
-   require_once 'recaptchalib.php';
-   global $recaptcha_private_key; # same as used by 
reCAPTCHA extension
-   $resp = recaptcha_check_answer(
-   $recaptcha_private_key,
-   $_SERVER['REMOTE_ADDR'],
-   $request->getText( 'recaptcha_challenge_field' 
),
-   $request->getText( 'recaptcha_response_field' )
-   );
-
-   if ( !$resp->is_valid ) {
-   $this->showForm( $form, $this->msg( 
'form-bad-recaptcha' )->text() );
-   return;
-   }
-   }
 
# Check ordinary CAPTCHA
if ( $this->useCaptcha() && 
!ConfirmEditHooks::getInstance()->passCaptchaFromRequest( $request, $user ) ) {
diff --git a/extension.json b/extension.json
index 437c297..af98792 100644
--- a/extension.json
+++ b/extension.json
@@ -9,9 +9,6 @@
"url": "https://www.mediawiki.org/wiki/Extension:Form;,
"descriptionmsg": "form-desc",
"type": "specialpage",
-   "config": {
-   "SpecialFormRecaptcha": false
-   },
"SpecialPages": {
"Form": "SpecialForm"
},
diff --git a/i18n/en.json b/i18n/en.json
index 7cbbc22..5ca2299 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -21,7 +21,6 @@
"form-article-exists": "Page exists",
"form-article-existstext": "The page [[$1]] already exists.",
"form-bad-page-name": "Bad page name",
-   "form-bad-recaptcha": "Incorrect values for reCaptcha. Try again.",
"form-bad-page-name-text": "The form data you entered makes a bad page 
name, \"$1\".",
"form-required-field-error": "The {{PLURAL:$2|field $1 is|fields $1 
are}} required for this form.\nPlease fill {{PLURAL:$2|it|them}} in.",
"form-save-summary": "New page using [[Special:Form/$1|form $1]]",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If38683947deb116b9edd2599b37c9f41a88c4f6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Form
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: anycast dns: use router loopbacks for neighbors

2017-11-21 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392740 )

Change subject: anycast dns: use router loopbacks for neighbors
..

anycast dns: use router loopbacks for neighbors

Change-Id: If739f18a0c4a53a83ffe00e333d889dc9a3892d6
---
M hieradata/role/codfw/dnsrecursor.yaml
M hieradata/role/eqiad/dnsrecursor.yaml
M hieradata/role/esams/dnsrecursor.yaml
3 files changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/hieradata/role/codfw/dnsrecursor.yaml 
b/hieradata/role/codfw/dnsrecursor.yaml
index 219afcd..d3fb55e 100644
--- a/hieradata/role/codfw/dnsrecursor.yaml
+++ b/hieradata/role/codfw/dnsrecursor.yaml
@@ -1,3 +1,3 @@
 profile::bird::neighbors_list:
-  - 208.80.153.2 # cr1-codfw ae1:2001
-  - 208.80.153.3 # cr2-codfw ae1:2001
+  - 208.80.153.192 # cr1-codfw loopback
+  - 208.80.153.193 # cr2-codfw loopback
diff --git a/hieradata/role/eqiad/dnsrecursor.yaml 
b/hieradata/role/eqiad/dnsrecursor.yaml
index 0e3bddd..446f990 100644
--- a/hieradata/role/eqiad/dnsrecursor.yaml
+++ b/hieradata/role/eqiad/dnsrecursor.yaml
@@ -1,3 +1,3 @@
 profile::bird::neighbors_list:
-  - 208.80.154.2 # cr1-eqiad ae1:1001
-  - 208.80.154.3 # cr2-eqiad ae1:1001
+  - 208.80.154.196 # cr1-eqiad loopback
+  - 208.80.154.197 # cr2-eqiad loopback
diff --git a/hieradata/role/esams/dnsrecursor.yaml 
b/hieradata/role/esams/dnsrecursor.yaml
index 4594144..cdd7851 100644
--- a/hieradata/role/esams/dnsrecursor.yaml
+++ b/hieradata/role/esams/dnsrecursor.yaml
@@ -1,3 +1,3 @@
 profile::bird::neighbors_list:
-  - 91.198.174.2 # cr1-esams ae1:100
-  - 91.198.174.3 # cr2-esams ae1:100
+  - 91.198.174.245 # cr1-esams loopback
+  - 91.198.174.244 # cr2-esams loopback

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update mobileapps to 52d6a83

2017-11-21 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392739 )

Change subject: Update mobileapps to 52d6a83
..

Update mobileapps to 52d6a83

List of changes:
52d6a83 Get mobile base URL from siteinfo and re-enable checks for mobile URLs
xxx Update node module dependencies

Change-Id: Idf8697e06301990d75e99805af7295a4278067b9
---
M node_modules/kad/package.json
M node_modules/swagger-ui/package.json
M src
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps/deploy 
refs/changes/39/392739/1

diff --git a/node_modules/kad/package.json b/node_modules/kad/package.json
index 52f8ef1..6661663 100644
--- a/node_modules/kad/package.json
+++ b/node_modules/kad/package.json
@@ -49,7 +49,7 @@
 "/limitation"
   ],
   "_resolved": 
"git+https://github.com/gwicke/kad.git#936c91652d757ea6f9dd30e44698afb0daaa1d17;,
-  "_shasum": "2dc88cd063d8240d85ae522e10a6e7f766c73439",
+  "_shasum": "ba64e50d7bfa7e99a91d4a3db7611acc1f4cec0b",
   "_shrinkwrap": null,
   "_spec": "kad@git+https://github.com/gwicke/kad.git#master;,
   "_where": "/opt/service/node_modules/limitation",
diff --git a/node_modules/swagger-ui/package.json 
b/node_modules/swagger-ui/package.json
index 476e16e..e040bea 100644
--- a/node_modules/swagger-ui/package.json
+++ b/node_modules/swagger-ui/package.json
@@ -49,7 +49,7 @@
 "/"
   ],
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;,
-  "_shasum": "972cb711d12f0ecd1995fe048e5c90ad0190a86f",
+  "_shasum": "e423d32db4f9dfb6806f13ae9f9fbe00ebcdb5db",
   "_shrinkwrap": null,
   "_spec": "swagger-ui@git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_where": "/opt/service",
diff --git a/src b/src
index 9d1602d..52d6a83 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 9d1602d4c47e93758c8d1c15b32601027ea8a54b
+Subproject commit 52d6a83d4af42f21d77af6a7e16889dc75a6746a

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Sync parserTests and citeParserTests with core/Cite.

2017-11-21 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392737 )

Change subject: Sync parserTests and citeParserTests with core/Cite.
..

Sync parserTests and citeParserTests with core/Cite.

The newly-added test case "T29694 - [] in reference names in HTML5 fragment
mode" fails and has been added to the blacklist;
I12b2a148f7170d20bd9aacd3b5b8ee1965859592 is expected to fix this.

Change-Id: Ie2d9628a83e888af4cb0dd8321b1fa58b3fe1a6a
---
M tests/citeParserTests-blacklist.js
M tests/citeParserTests.txt
M tests/parserTests.json
M tests/parserTests.txt
4 files changed, 79 insertions(+), 6 deletions(-)


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

diff --git a/tests/citeParserTests-blacklist.js 
b/tests/citeParserTests-blacklist.js
index eb5093f..92f88bb 100644
--- a/tests/citeParserTests-blacklist.js
+++ b/tests/citeParserTests-blacklist.js
@@ -72,6 +72,7 @@
 add("wt2html", "Multiple definition (inside )", "[1]\n↑  abc");
 add("wt2html", "Multiple definition (mixed outside/inside)", "[1]\n↑  abc");
 add("wt2html", "Multiple definition (inside {{#tag:references}})", "[1]\n\n[1]\n[1]\n\n1 
2 3 
 abc");
+add("wt2html", "T29694 - [] in reference names in HTML5 fragment mode", "[1]\n↑  \">[bar]");
 
 
 // Blacklist for wt2wt
@@ -105,6 +106,7 @@
 add("wt2wt", "Multiple definition (inside )", "\n\nabc\ndef\n");
 add("wt2wt", "Multiple definition (mixed outside/inside)", "abc\n\ndef\n");
 add("wt2wt", "Multiple definition (inside {{#tag:references}})", "\n{{#tag:references|\nabc\ndef\n}}\n");
+add("wt2wt", "T29694 - [] in reference names in HTML5 fragment mode", "\">[bar]\n");
 add("wt2wt", "Ref: 3. spaces in ref-names should be ignored", "A foo\nB \nC \n");
 add("wt2wt", "Ref: 5. body should accept generic wikitext", "A This is a 
'''[[bolded link]]''' and this is a 
{{echo|transclusion}}\n\n\n");
 add("wt2wt", "Ref: 6. indent-pres should not be output in ref-body", "A 
foo\n bar\n baz\n\n\n");
@@ -143,6 +145,7 @@
 add("html2html", "Multiple definition (inside )", "[1]\n\n ↑
 abc Cite error: Invalid 
ref> tag; name \"a\" 
defined multiple times with different content\n");
 add("html2html", "Multiple definition (mixed outside/inside)", "[1]\n\n ↑
 abc Cite error: Invalid 
ref> tag; name \"a\" 
defined multiple times with different content\n");
 add("html2html", "Multiple definition (inside {{#tag:references}})", "[1]\n\n ↑
 abc Cite error: Invalid 
ref> tag; name \"a\" 
defined multiple times with different content\n");
+add("html2html", "T29694 - [] in reference names in HTML5 fragment mode", "[[#cite_note-[#foo]_{bar}_baz-1|[1]]]\n [[#cite_ref-[#foo]_{bar}_baz_1-0|↑]]
 \">[bar]\n");
 add("html2html", "Ref: 8. transclusion wikitext has lower precedence", "A [1] B C}}\n↑  foo {{echo|");
 add("html2html", "References: 9. Generate missing references list at the end", 
"A [1] B [inexistent 
1]\n↑  foo\n↑  bar");
 
@@ -181,6 +184,7 @@
 add("html2wt", "Multiple definition (inside )", "[[#cite_note-a-1|[1]]]\n\n# 
[[#cite_ref-a_1-0|↑]] abc Cite error: Invalid  
tag; name \"a\" defined multiple times with different content\n");
 add("html2wt", "Multiple definition (mixed outside/inside)", "[[#cite_note-a-1|[1]]]\n\n# 
[[#cite_ref-a_1-0|↑]] abc Cite error: Invalid  
tag; name \"a\" defined multiple times with different content\n");
 add("html2wt", "Multiple definition (inside {{#tag:references}})", "[[#cite_note-a-1|[1]]]\n\n# 
[[#cite_ref-a_1-0|↑]] abc Cite error: Invalid  
tag; name \"a\" defined multiple times with different content\n");
+add("html2wt", "T29694 - [] in reference names in HTML5 fragment mode", "[[#cite_note-#foo_{bar}_baz-1|[1]]]\n#
 [[#cite_ref-#foo_{bar}_baz_1-0|↑]]
 \">[bar]\n");
 add("html2wt", "Ref: 3. spaces in ref-names should be ignored", "A foo\nB \nC \n");
 add("html2wt", "Ref: 5. body should accept generic wikitext", "A This is 
a '''[[bolded link]]''' and this is a 
{{echo|transclusion}}\n\n\n");
 add("html2wt", "Ref: 6. indent-pres should not be output in ref-body", "A 
foo\n bar\n baz\n\n\n");
@@ -730,6 +734,25 @@
 add("selser", "Multiple definition (inside {{#tag:references}}) [4,0,0]", 
"c6o25q\n");
 add("selser", "Multiple definition (inside {{#tag:references}}) [2,3,0]", 
"r5lb7d\n\n\n{{#tag:references|\nabc\ndef\n}}");
 add("selser", "Multiple definition (inside {{#tag:references}}) [1,4,0]", 
"\n{{#tag:references|\nabc\ndef\n}}\n\n1sdxf2c");
+add("selser", "T29694 - [] in reference names in HTML5 fragment mode [3,0,0]", 
"\n");
+add("selser", "T29694 - [] in reference names in HTML5 fragment mode [2,3,0]", 
"1r8kw2d\n\n\">[bar]");
+add("selser", "T29694 - [] in reference names in HTML5 fragment mode [4,4,0]", 
"17gsx88\n\n1ysi8vn");
+add("selser", "T29694 - [] in reference names in HTML5 fragment mode [0,3,0]", 
"\">[bar]");
+add("selser", "T29694 - [] in reference names in HTML5 fragment mode [2,0,0]", 
"1t44xvn\n\n\">[bar]");

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Get mobile base URL from siteinfo and re-enable checks for m...

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

Change subject: Get mobile base URL from siteinfo and re-enable checks for 
mobile URLs
..


Get mobile base URL from siteinfo and re-enable checks for mobile URLs

Bug: T177431
Change-Id: Ifdf545f345e24eefb16fba5ceda658e507fde1ff
---
M lib/mwapi.js
M spec.yaml
2 files changed, 9 insertions(+), 8 deletions(-)

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



diff --git a/lib/mwapi.js b/lib/mwapi.js
index ef8c211..80f7bcb 100644
--- a/lib/mwapi.js
+++ b/lib/mwapi.js
@@ -116,7 +116,8 @@
 mainpage: general.mainpage,
 lang: general.lang,
 legaltitlechars: general.legaltitlechars,
-case: general.case
+case: general.case,
+mobileserver: general.mobileserver
 },
 namespaces: res.body.query.namespaces,
 namespacealiases: res.body.query.namespacealiases,
diff --git a/spec.yaml b/spec.yaml
index 033a999..dae621c 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -708,11 +708,11 @@
   revisions: /.+/
   edit: /.+/
   talk: /.+/
-#mobile:
-#  page: /.+/
-#  revisions: /.+/
-#  edit: /.+/
-#  talk: /.+/
+mobile:
+  page: /.+/
+  revisions: /.+/
+  edit: /.+/
+  talk: /.+/
   api_urls:
 summary: /.+/
 #read_html: /.+/
@@ -934,8 +934,8 @@
   content_urls:
 desktop:
   $ref: '#/definitions/content_urls'
-#mobile:
-#  $ref: '#/definitions/content_urls'
+mobile:
+  $ref: '#/definitions/content_urls'
   api_urls:
 $ref: '#/definitions/api_urls'
   coordinates:

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Create script for automatic reload of categories

2017-11-21 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392736 )

Change subject: Create script for automatic reload of categories
..

Create script for automatic reload of categories

Bug: T173772
Change-Id: I96e0863aff73a3cece8c93c8f03ee4901759b7b1
---
M modules/wdqs/manifests/gui.pp
A modules/wdqs/templates/cron/reloadCategories.sh.erb
M modules/wdqs/templates/vars.yaml.erb
3 files changed, 39 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/392736/1

diff --git a/modules/wdqs/manifests/gui.pp b/modules/wdqs/manifests/gui.pp
index 9ed953a..44c2ed8 100644
--- a/modules/wdqs/manifests/gui.pp
+++ b/modules/wdqs/manifests/gui.pp
@@ -39,4 +39,13 @@
 group  => 'wikidev',
 mode   => '0775',
 }
+
+file { '/usr/local/bin/reloadCategories.sh':
+ensure  => present,
+content => template('cron/reloadCategories.sh.erb'),
+owner   => 'root',
+group   => 'root',
+mode=> '0755',
+}
+
 }
diff --git a/modules/wdqs/templates/cron/reloadCategories.sh.erb 
b/modules/wdqs/templates/cron/reloadCategories.sh.erb
new file mode 100755
index 000..7cf8c3d
--- /dev/null
+++ b/modules/wdqs/templates/cron/reloadCategories.sh.erb
@@ -0,0 +1,29 @@
+#!/bin/bash
+# This script is reloading categories into a new namespace
+# NOTE: This should be run under user that has rights to
+# sudo service nginx restart
+if [ -r /etc/wdqs/vars.sh ]; then
+  . /etc/wdqs/vars.sh
+fi
+
+DEPLOY_DIR=${DEPLOY_DIR:-"<%= @package_dir %>"}
+DATA_DIR=${DATA_DIR:-"<%= @data_dir %>"}
+ALIAS_FILE="<%= @alias_map %>"
+
+today=$(date -u +'%Y%m%d')
+newNamespace="categories{$today}"
+# Drop old dumps
+rm -f "${DATA_DIR}/*-categories.ttl.gz"
+# Drop old logs
+rm -f "${DATA_DIR}/categories*.log"
+cd $DEPLOY_DIR
+bash createNamespace.sh $newNamespace || exit 1
+# Load the data
+bash forAllCategoryWikis.sh loadCategoryDump.sh $newNamespace >> 
"${DATA_DIR}/${newNamespace}.log"
+# Get old namespace
+oldNamespace=$(cat $ALIAS_FILE | grep categories | cut -d' ' -f2)
+# Switch the map
+echo "categories ${newNamespace}" > $ALIAS_FILE
+sudo service nginx restart
+# Drop old namespace
+curl -s -X DELETE http://localhost:/bigdata/namespace/${oldNamespace}
\ No newline at end of file
diff --git a/modules/wdqs/templates/vars.yaml.erb 
b/modules/wdqs/templates/vars.yaml.erb
index 3ba5b15..21c6a1f 100644
--- a/modules/wdqs/templates/vars.yaml.erb
+++ b/modules/wdqs/templates/vars.yaml.erb
@@ -1,3 +1,4 @@
 ---
 data_dir: <%= @data_dir %>
 endpoint: <%= @endpoint %>
+package_dir: <%= @package_dir %>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96e0863aff73a3cece8c93c8f03ee4901759b7b1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
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] mediawiki...CentralNotice[master]: Add client-side setDebug() method

2017-11-21 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392735 )

Change subject: Add client-side setDebug() method
..

Add client-side setDebug() method

Bug: T180478
Change-Id: Iecece883eca7e507edfc613c2c481c8ce8d8e25a
---
M resources/subscribing/ext.centralNotice.display.js
M resources/subscribing/ext.centralNotice.display.state.js
2 files changed, 27 insertions(+), 1 deletion(-)


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

diff --git a/resources/subscribing/ext.centralNotice.display.js 
b/resources/subscribing/ext.centralNotice.display.js
index 9ced44b..4798bcb 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -712,6 +712,17 @@
},
 
/**
+* Set a string with information for debugging. (All strings 
set here will be
+* sent to the server via the debug parameter on the record 
impression call).
+*
+* @param {string} str A string with the debugging information; 
should not
+*   contain pipe characters ('|').
+*/
+   setDebug: function ( str ) {
+   cn.internal.state.setDebug( str );
+   },
+
+   /**
 * Request that, if possible, the record impression call be 
delayed until a
 * promise is resolved. If the promise does not resolve before
 * MAX_RECORD_IMPRESSION_DELAY milliseconds after the banner is 
injected,
diff --git a/resources/subscribing/ext.centralNotice.display.state.js 
b/resources/subscribing/ext.centralNotice.display.state.js
index 407e048..a4b234c 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -405,11 +405,26 @@
if ( tests.length === 1 ) {
state.data.testIdentifiers = identifier;
} else {
-   state.data.testIdentifiers.concat( ',' 
+ identifier );
+   state.data.testIdentifiers += ',' + 
identifier;
}
}
},
 
+   /**
+* Set a string with information for debugging. (All strings 
set here will be
+* added to state data).
+*
+* @param {string} str A string with the debugging information; 
should not
+*   contain pipe characters ('|').
+*/
+   setDebug: function ( str ) {
+   if ( !state.data.debug ) {
+   state.data.debug = str;
+   } else {
+   state.data.debug += '|' + str;
+   }
+   },
+
lookupReasonCode: function ( reasonName ) {
if ( reasonName in REASONS ) {
return REASONS[ reasonName ];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iecece883eca7e507edfc613c2c481c8ce8d8e25a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Allow specifying namespace for category load

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

Change subject: Allow specifying namespace for category load
..


Allow specifying namespace for category load

Change-Id: Id3a412e85e446f64645d7f253c83d6213ce651ff
---
M dist/src/script/forAllCategoryWikis.sh
M dist/src/script/loadCategoryDump.sh
2 files changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/dist/src/script/forAllCategoryWikis.sh 
b/dist/src/script/forAllCategoryWikis.sh
index 1f4521e..7364691 100755
--- a/dist/src/script/forAllCategoryWikis.sh
+++ b/dist/src/script/forAllCategoryWikis.sh
@@ -9,7 +9,8 @@
fetch="curl -s -XGET"
 fi
 
+shift
 $fetch $DUMP_LIST | while read wiki; do
echo "Processing $wiki..."
-   $DIR/$COMMAND $wiki
+   $DIR/$COMMAND $wiki "$@"
 done 
diff --git a/dist/src/script/loadCategoryDump.sh 
b/dist/src/script/loadCategoryDump.sh
index e3e2aa1..6431143 100755
--- a/dist/src/script/loadCategoryDump.sh
+++ b/dist/src/script/loadCategoryDump.sh
@@ -10,6 +10,10 @@
 NAMESPACE=categories
 WIKI=$1
 
+if [ "x$2" != "x" ]; then
+   NAMESPACE=$2
+fi
+
 if [ -z "$WIKI" ]; then
echo "Use: $0 WIKI-NAME"
exit 1
@@ -17,7 +21,7 @@
 
 TS=$(curl -s -f -XGET $SOURCE/lastdump/$WIKI-categories.last | cut -c1-8)
 if [ -z "$TS" ]; then
-   echo "Could not load timestamp"
+   echo "Could not load timestamp from 
$SOURCE/lastdump/$WIKI-categories.last"
exit 1
 fi
 FILENAME=$WIKI-$TS-categories.ttl.gz

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3a412e85e446f64645d7f253c83d6213ce651ff
Gerrit-PatchSet: 2
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: recdns anycast: bird class requires ferm service

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

Change subject: recdns anycast: bird class requires ferm service
..


recdns anycast: bird class requires ferm service

Change-Id: Ica6186ee7c90c06052fc35265c8412242a6f20e4
---
M modules/profile/manifests/bird/anycast.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/profile/manifests/bird/anycast.pp 
b/modules/profile/manifests/bird/anycast.pp
index ea43159..add66aea 100644
--- a/modules/profile/manifests/bird/anycast.pp
+++ b/modules/profile/manifests/bird/anycast.pp
@@ -49,5 +49,6 @@
   neighbors   => $neighbors_list,
   bind_service=> $bind_service,
   bfd => $bfd,
+  require => Service['ferm'],
   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: recdns anycast: bird class requires ferm service

2017-11-21 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392734 )

Change subject: recdns anycast: bird class requires ferm service
..

recdns anycast: bird class requires ferm service

Change-Id: Ica6186ee7c90c06052fc35265c8412242a6f20e4
---
M modules/profile/manifests/bird/anycast.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/profile/manifests/bird/anycast.pp 
b/modules/profile/manifests/bird/anycast.pp
index ea43159..add66aea 100644
--- a/modules/profile/manifests/bird/anycast.pp
+++ b/modules/profile/manifests/bird/anycast.pp
@@ -49,5 +49,6 @@
   neighbors   => $neighbors_list,
   bind_service=> $bind_service,
   bfd => $bfd,
+  require => Service['ferm'],
   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Sync up with Parsoid parserTests.txt

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

Change subject: Sync up with Parsoid parserTests.txt
..


Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 0723e5c47845ff4361b9635b591e7d386c975fdf

Change-Id: Ic78ee28a5cdeb9d32147332bf6c06bbe6ab19acd
---
M tests/parser/parserTests.txt
1 file changed, 406 insertions(+), 2 deletions(-)

Approvals:
  C. Scott Ananian: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index c3cea04..7af3a36 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -15181,7 +15181,7 @@
 http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png; 
width="180" height="135" class="thumbimage" 
srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 
1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" 
/>  lang=invalid:language:code
 
 !! html/parsoid
-lang=invalid.language.code
+lang=invalid:language:code
 !! end
 
 !! test
@@ -18549,10 +18549,14 @@
 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
 
 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
-!! html
+!! html/php
 
 http://example.com/images/3/3a/Foobar.jpg; width="1941" height="220" />
 
+!! html/parsoid
+
+
+
 !! end
 
 !! test
@@ -29740,3 +29744,403 @@
 #foo
 
 !! end
+
+## --
+## Parsoid section-wrapping tests
+## --
+!! test
+Section wrapping for well-nested sections (no leading content)
+!! options
+parsoid={
+  "wrapSections": true
+}
+!! wikitext
+= 1 =
+a
+
+= 2 =
+b
+
+== 2.1 ==
+c
+
+== 2.2 ==
+d
+
+=== 2.2.1 ===
+e
+
+= 3 =
+f
+!! html/parsoid
+ 1 
+a
+
+ 2 
+b
+
+ 2.1 
+c
+
+ 2.2 
+d
+
+ 2.2.1 
+e
+
+ 3 

+f
+
+
+!! end
+
+!! test
+Section wrapping for well-nested sections (with leading content)
+!! options
+parsoid={
+  "wrapSections": true
+}
+!! wikitext
+Para 1.
+
+Para 2 with a nested in it
+
+Para 3.
+
+= 1 =
+a
+
+= 2 =
+b
+
+== 2.1 ==
+c
+!! html/parsoid
+Para 1.
+
+Para 2 with a nested in it
+
+Para 3.
+
+ 1 
+a
+
+ 2 
+b
+
+ 2.1 
+c
+
+
+!! end
+
+!! test
+Section wrapping with template-generated sections (good nesting 1)
+!! options
+parsoid={
+  "wrapSections": true
+}
+!! wikitext
+= 1 =
+a
+
+{{echo|1=
+== 1.1 ==
+b
+}}
+
+== 1.2 ==
+c
+
+= 2 =
+d
+!! html/parsoid
+ 1 
+a
+
+ 1.1 
+b
+ 1.2 
+c
+
+ 2 
+d
+!! end
+
+# In this example, the template scope is mildly expanded to incorporate the
+# trailing newline after the transclusion since that is part of section 1.1.1
+!! test
+Section wrapping with template-generated sections (good nesting 2)
+!! options
+parsoid={
+  "wrapSections": true,
+  "modes": ["wt2html", "wt2wt"]
+}
+!! wikitext
+= 1 =
+a
+
+{{echo|1=
+== 1.1 ==
+b
+=== 1.1.1 ===
+d
+}}
+= 2 =
+e
+!! html/parsoid
+ 1 
+a
+
+ 1.1 
+b
+ 1.1.1 
+d
+ 2 
+e
+!! end
+
+# In this example, the template scope is mildly expanded to incorporate the
+# trailing newline after the transclusion since that is part of section 1.2.1
+!! test
+Section wrapping with template-generated sections (good nesting 3)
+!! options
+parsoid={
+  "wrapSections": true,
+  "modes": ["wt2html", "wt2wt"]
+}
+!! wikitext
+= 1 =
+a
+
+{{echo|1=
+x
+== 1.1 ==
+b
+==1.2==
+c
+===1.2.1===
+d
+}}
+= 2 =
+e
+!! html/parsoid
+ 1 
+a
+
+x
+ 1.1 
+b
+1.2
+c
+1.2.1
+d
+ 2 
+e
+!! end
+
+# Because of section-wrapping and template-wrapping interactions,
+# the scope of the template is expanded so that the template markup
+# is valid in the presence of  tags.
+!! test
+Section wrapping with template-generated sections (bad nesting 1)
+!! options
+parsoid={
+  "wrapSections": true
+}
+!! wikitext
+= 1 =
+a
+
+{{echo|1=
+= 2 =
+b
+== 2.1 ==
+c
+}}
+
+d
+
+= 3 =
+e
+!! html/parsoid
+ 1 
+a
+
+ 2 
+b
+ 2.1 
+c
+
+d
+
+ 3 
+e
+!! end
+
+# Because of section-wrapping and template-wrapping interactions,
+# additional template wrappers are added to  tags
+# so that template wrapping semantics are valid whether section
+# tags are retained or stripped. But, the template scope can expand
+# greatly when accounting for section tags.
+!! test
+Section wrapping with template-generated sections (bad nesting 2)
+!! options
+parsoid={
+  "wrapSections": true,
+  "modes": ["wt2html", "wt2wt"]
+}
+!! wikitext
+= 1 =
+a
+
+{{echo|1=
+== 1.2 ==
+b
+= 2 =
+c
+}}
+
+d
+
+= 3 =
+e
+!! html/parsoid
+ 1 
+a
+
+ 1.2 
+b
+ 2 
+c
+
+d
+ 3 
+e
+!! end
+
+!! test
+Section wrapping with uneditable lead section + div wrapping multiple sections
+!! options
+parsoid={
+  "wrapSections": true
+}
+!! wikitext
+foo
+
+
+= 1 =
+a
+
+== 1.1 ==
+b
+
+= 2 =
+c
+
+
+= 3 =
+d
+
+== 3.1 ==
+e
+!! html/parsoid
+foo
+
+
+ 1 
+a
+
+ 1.1 
+b
+
+ 2 
+c
+
+
+ 3 
+d
+
+ 3.1 
+e
+
+!! end
+
+!! test
+Section wrapping with editable lead section + div overlapping multiple sections
+!! options
+parsoid={
+  "wrapSections": true
+}
+!! 

[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: Sync up with Parsoid citeParserTests.txt

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

Change subject: Sync up with Parsoid citeParserTests.txt
..


Sync up with Parsoid citeParserTests.txt

This now aligns with Parsoid commit 0723e5c47845ff4361b9635b591e7d386c975fdf

Change-Id: Ic5b30a88189e5a8809d0f330d8b399bdb1994c60
---
M tests/parser/citeParserTests.txt
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  C. Scott Ananian: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/parser/citeParserTests.txt b/tests/parser/citeParserTests.txt
index c3f97a7..9e22840 100644
--- a/tests/parser/citeParserTests.txt
+++ b/tests/parser/citeParserTests.txt
@@ -10,6 +10,12 @@
 {{{1}}}
 !! endarticle
 
+!! article
+Template:refinref
+!! text
+ho
+!! endarticle
+
 !! test
 Simple , no 
 !! wikitext
@@ -1200,6 +1206,16 @@
 foo
 !! end
 
+!! test
+Ref in ref
+!! wikitext
+test hi {{refinref}}
+
+!! html/parsoid
+test [1]
+↑  hi [2]↑  ho
+!! end
+
 ## Parsoid responsive references tests
 
 !! test

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5b30a88189e5a8809d0f330d8b399bdb1994c60
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   >