[MediaWiki-commits] [Gerrit] operations...wikistats[master]: (WIP) - re-add XML output

2017-05-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355743 )

Change subject: (WIP) - re-add XML output
..

(WIP) - re-add XML output

Change-Id: Ied20333805e85cf5719dc7c1ef55fceac0ed7ea3
---
M usr/share/php/wikistats/functions.php
M var/www/wikistats/api.php
2 files changed, 33 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/43/355743/1

diff --git a/usr/share/php/wikistats/functions.php 
b/usr/share/php/wikistats/functions.php
index c0455f9..6e9bbb4 100644
--- a/usr/share/php/wikistats/functions.php
+++ b/usr/share/php/wikistats/functions.php
@@ -280,6 +280,34 @@
 return $result;
 }
 
+function xml_dumper($table) {
+   global $dbhost,$dbuser,$dbpass,$dbname,$valid_api_tables;
+try {
+  $wdb = new PDO("mysql:host=${dbhost};dbname=${dbname}", $dbuser, 
$dbpass);
+} catch (PDOException $e) {
+  print "Error!: " . $e->getMessage() . "";
+  die();
+}
+
+$query = "SELECT *,good/total AS ratio FROM $table ORDER BY good 
desc,total desc";
+
+$output = fopen('php://output', 'w');
+
+$select = $wdb->prepare($query);
+$select -> execute();
+
+$xmldoc = new DOMDocument('1.0', 'UTF-8');
+$wikis = $xmldoc->createElement('wikis');
+
+while ($row = $select->fetch(PDO::FETCH_ASSOC)) {
+$entry->appendChild($xmldoc->createElement('total', $row['total']));
+}
+
+header('Content-type: application/xml');
+echo $xmldoc->saveXML();
+exit;
+}
+
 # dump csv/ssv data
 function data_dumper($table, $format) {
 global $dbhost,$dbuser,$dbpass,$dbname,$valid_api_tables;
@@ -297,11 +325,11 @@
 
 if (in_array($table,$valid_api_tables)) {
 
-try {
-$wdb = new PDO("mysql:host=${dbhost};dbname=${dbname}", $dbuser, 
$dbpass);
+  try {
+  $wdb = new PDO("mysql:host=${dbhost};dbname=${dbname}", $dbuser, 
$dbpass);
 } catch (PDOException $e) {
- print "Error!: " . $e->getMessage() . "";
-die();
+  print "Error!: " . $e->getMessage() . "";
+  die();
 }
 
 switch($table) {
diff --git a/var/www/wikistats/api.php b/var/www/wikistats/api.php
index 6f274db..9c47da2 100644
--- a/var/www/wikistats/api.php
+++ b/var/www/wikistats/api.php
@@ -55,7 +55,7 @@
 print data_dumper("$table","ssv");
 exit(0);
 case "xml":
-#print xml_dumper("$table");
+print xml_dumper("$table");
 exit(0);
 default:
 print "dump format not set or unknown. please specify 
a known format. f.e. =csv";

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied20333805e85cf5719dc7c1ef55fceac0ed7ea3
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
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]: wikistats: install php7.0-xml if on stretch

2017-05-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355742 )

Change subject: wikistats: install php7.0-xml if on stretch
..

wikistats: install php7.0-xml if on stretch

Change-Id: I03f04886dbdcfd616cd199d5fd2b5131f76fdd93
---
M modules/wikistats/manifests/web.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/wikistats/manifests/web.pp 
b/modules/wikistats/manifests/web.pp
index cd69b08..0029121 100644
--- a/modules/wikistats/manifests/web.pp
+++ b/modules/wikistats/manifests/web.pp
@@ -5,6 +5,7 @@
 
 if os_version('debian >= stretch') {
 $php_version = '7.0'
+require_package('php7.0-xml')
 } else {
 $php_version = '5'
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03f04886dbdcfd616cd199d5fd2b5131f76fdd93
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]: stop using exim4::ganglia

2017-05-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355741 )

Change subject: stop using exim4::ganglia
..

stop using exim4::ganglia

Ganglia is deprecated so we should be able to remove
this, unless we think it has not been replaced by prometheus/grafana
, but then that would be a general blocker to remove Ganglia.

Starting with this one is also effective against the spam
issue from labs described on T166322, because the root cause
there was the cron that gets created by this Ganglia plugin.

Also adding to T145659 because that is for
"Port application-specific metrics from ganglia to prometheus".

Bug:T166322
Bug:T145659
Change-Id: I4aa55c831b048880e3a5720063d1a17d7d389570
---
D modules/exim4/manifests/ganglia.pp
M modules/otrs/manifests/mail.pp
M modules/profile/manifests/lists.pp
M modules/profile/manifests/requesttracker/server.pp
M modules/role/manifests/mail/mx.pp
M modules/role/manifests/phabricator_server.pp
6 files changed, 0 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/41/355741/1

diff --git a/modules/exim4/manifests/ganglia.pp 
b/modules/exim4/manifests/ganglia.pp
deleted file mode 100644
index ac948d2..000
--- a/modules/exim4/manifests/ganglia.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-# == Class exim4::ganglia
-# This installs a Ganglia plugin for exim4, using gmetric
-#
-class exim4::ganglia {
-file { '/usr/local/bin/exim-to-gmetric':
-owner  => 'root',
-group  => 'root',
-mode   => '0755',
-source => 'puppet:///modules/exim4/ganglia/exim-to-gmetric',
-}
-
-cron { 'collect_exim_stats_via_gmetric':
-ensure  => present,
-user=> 'root',
-command => '/usr/local/bin/exim-to-gmetric',
-require => File['/usr/local/bin/exim-to-gmetric'],
-}
-}
diff --git a/modules/otrs/manifests/mail.pp b/modules/otrs/manifests/mail.pp
index 63d4257..a441230 100644
--- a/modules/otrs/manifests/mail.pp
+++ b/modules/otrs/manifests/mail.pp
@@ -35,8 +35,6 @@
 proxy => "webproxy.${::site}.wmnet:8080",
 }
 
-include ::exim4::ganglia
-
 class { '::exim4':
 variant => 'heavy',
 config  => template('otrs/exim4.conf.otrs.erb'),
diff --git a/modules/profile/manifests/lists.pp 
b/modules/profile/manifests/lists.pp
index 4ff9ae0..2ba4e79 100644
--- a/modules/profile/manifests/lists.pp
+++ b/modules/profile/manifests/lists.pp
@@ -3,7 +3,6 @@
 include ::network::constants
 include ::mailman
 include ::privateexim::listserve
-include ::exim4::ganglia
 
 mailalias { 'root': recipient => 'r...@wikimedia.org' }
 
diff --git a/modules/profile/manifests/requesttracker/server.pp 
b/modules/profile/manifests/requesttracker/server.pp
index d9c374c..7295a10 100644
--- a/modules/profile/manifests/requesttracker/server.pp
+++ b/modules/profile/manifests/requesttracker/server.pp
@@ -18,8 +18,6 @@
 filter  => template('role/exim/system_filter.conf.erb'),
 }
 
-include exim4::ganglia
-
 include ::base::firewall
 
 # allow RT to receive mail from mail smarthosts
diff --git a/modules/role/manifests/mail/mx.pp 
b/modules/role/manifests/mail/mx.pp
index d7394c8..40fdf68 100644
--- a/modules/role/manifests/mail/mx.pp
+++ b/modules/role/manifests/mail/mx.pp
@@ -41,7 +41,6 @@
 filter  => template('role/exim/system_filter.conf.erb'),
 require => Class['spamassassin'],
 }
-include exim4::ganglia
 
 file { '/etc/exim4/defer_domains':
 ensure  => present,
diff --git a/modules/role/manifests/phabricator_server.pp 
b/modules/role/manifests/phabricator_server.pp
index e75dfac..055e69d 100644
--- a/modules/role/manifests/phabricator_server.pp
+++ b/modules/role/manifests/phabricator_server.pp
@@ -16,5 +16,4 @@
 include ::profile::phabricator::rsync
 include ::phabricator::monitoring
 include ::phabricator::mpm
-# include ::exim4::ganglia
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4aa55c831b048880e3a5720063d1a17d7d389570
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...wikistats[master]: go back to data_dumper, add ssv format back

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

Change subject: go back to data_dumper, add ssv format back
..


go back to data_dumper, add ssv format back

Go back to the data_dumper function name and offer
both CSV and SSV formats again.

Changed my mind about the SSV thing since it's easy to
just pass the $delimiter parameter and leave existing URLs
working like they did in the past.

Bug: T165879
Change-Id: I05a187dee71060dc402d03881172e2ddc7f3bd63
---
M usr/share/php/wikistats/functions.php
M var/www/wikistats/api.php
M var/www/wikistats/index.php
3 files changed, 24 insertions(+), 12 deletions(-)

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



diff --git a/usr/share/php/wikistats/functions.php 
b/usr/share/php/wikistats/functions.php
index 753c533..c0455f9 100644
--- a/usr/share/php/wikistats/functions.php
+++ b/usr/share/php/wikistats/functions.php
@@ -280,9 +280,20 @@
 return $result;
 }
 
-# dump csv data
-function csv_dumper($table) {
+# dump csv/ssv data
+function data_dumper($table, $format) {
 global $dbhost,$dbuser,$dbpass,$dbname,$valid_api_tables;
+
+switch ($format) {
+  case "csv":
+$delimiter=",";
+break;
+  case "ssv":
+$delimiter=";";
+break;
+  default:
+$delimiter=",";
+}
 
 if (in_array($table,$valid_api_tables)) {
 
@@ -302,7 +313,7 @@
 }
 
 header("Content-type: application/octet-stream");
-header("Content-Disposition: attachment; filename=${table}.csv");
+header("Content-Disposition: attachment; filename=${table}.${format}");
 header("Pragma: no-cache");
 header("Expires: 0");
 
@@ -318,10 +329,10 @@
  $column[] = $meta['name'];
 }
 
-fputcsv($output, $column);
+fputcsv($output, $column, $delimiter);
 
 while ($row = $select->fetch(PDO::FETCH_ASSOC)) {
-fputcsv($output, $row);
+fputcsv($output, $row, $delimiter);
 }
 
 $wdb = null;
diff --git a/var/www/wikistats/api.php b/var/www/wikistats/api.php
index 298993e..6f274db 100644
--- a/var/www/wikistats/api.php
+++ b/var/www/wikistats/api.php
@@ -48,11 +48,11 @@
 
 switch ($format) {
 case "csv":
-print csv_dumper("$table");
+print data_dumper("$table", "csv");
 exit(0);
 break;
 case "ssv":
-#print data_dumper("$table","ssv");
+print data_dumper("$table","ssv");
 exit(0);
 case "xml":
 #print xml_dumper("$table");
diff --git a/var/www/wikistats/index.php b/var/www/wikistats/index.php
index 7cf7331..8f852fb 100644
--- a/var/www/wikistats/index.php
+++ b/var/www/wikistats/index.php
@@ -35,7 +35,7 @@
 
 
 WikiStats - Mediawiki statistics
-
+
 
 
 
@@ -105,7 +105,7 @@
 
 
 
-List of MediaWikis
+List of MediaWikis
 
 
 
@@ -118,7 +118,7 @@
 Users
 Admins
 Stub ratio
-Formats
+Formats
 Last update
 
 
@@ -133,7 +133,7 @@
 Users
 Admins
 Stub ratio
-Formats
+Formats
 Last update
 
 ";
@@ -204,6 +204,7 @@
 " .$row['gadmins'] . "
 " . $stubratio . "
 csv
+ssv
 xml";
 
 if ($project == 'wp') {
@@ -305,7 +306,7 @@
 $name = "coalesced";
 /*
 echo <
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: RobiH 
Gerrit-Reviewer: Southparkfan 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...wikistats[master]: go back to data_dumper, add ssv format back

2017-05-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355740 )

Change subject: go back to data_dumper, add ssv format back
..

go back to data_dumper, add ssv format back

Go back to the data_dumper function name and offer
both CSV and SSV formats again.

Changed my mind about the SSV thing since it's easy to
just pass the $delimiter parameter and leave existing URLs
working like they did in the past.

Bug: T165879
Change-Id: I05a187dee71060dc402d03881172e2ddc7f3bd63
---
M usr/share/php/wikistats/functions.php
M var/www/wikistats/api.php
M var/www/wikistats/index.php
3 files changed, 24 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/40/355740/1

diff --git a/usr/share/php/wikistats/functions.php 
b/usr/share/php/wikistats/functions.php
index 753c533..230d3c3 100644
--- a/usr/share/php/wikistats/functions.php
+++ b/usr/share/php/wikistats/functions.php
@@ -280,9 +280,20 @@
 return $result;
 }
 
-# dump csv data
-function csv_dumper($table) {
+# dump csv/ssv data
+function data_dumper($table, $format) {
 global $dbhost,$dbuser,$dbpass,$dbname,$valid_api_tables;
+
+switch ($format) {
+  case "csv":
+ $delimiter=",";
+  break;
+  case "ssv":
+ $delimiter=";";
+ break;
+  default:
+   $delimiter=",";
+}
 
 if (in_array($table,$valid_api_tables)) {
 
@@ -302,7 +313,7 @@
 }
 
 header("Content-type: application/octet-stream");
-header("Content-Disposition: attachment; filename=${table}.csv");
+header("Content-Disposition: attachment; filename=${table}.${format}");
 header("Pragma: no-cache");
 header("Expires: 0");
 
@@ -318,10 +329,10 @@
  $column[] = $meta['name'];
 }
 
-fputcsv($output, $column);
+fputcsv($output, $column, $delimiter);
 
 while ($row = $select->fetch(PDO::FETCH_ASSOC)) {
-fputcsv($output, $row);
+fputcsv($output, $row, $delimiter);
 }
 
 $wdb = null;
diff --git a/var/www/wikistats/api.php b/var/www/wikistats/api.php
index 298993e..6f274db 100644
--- a/var/www/wikistats/api.php
+++ b/var/www/wikistats/api.php
@@ -48,11 +48,11 @@
 
 switch ($format) {
 case "csv":
-print csv_dumper("$table");
+print data_dumper("$table", "csv");
 exit(0);
 break;
 case "ssv":
-#print data_dumper("$table","ssv");
+print data_dumper("$table","ssv");
 exit(0);
 case "xml":
 #print xml_dumper("$table");
diff --git a/var/www/wikistats/index.php b/var/www/wikistats/index.php
index 7cf7331..8f852fb 100644
--- a/var/www/wikistats/index.php
+++ b/var/www/wikistats/index.php
@@ -35,7 +35,7 @@
 
 
 WikiStats - Mediawiki statistics
-
+
 
 
 
@@ -105,7 +105,7 @@
 
 
 
-List of MediaWikis
+List of MediaWikis
 
 
 
@@ -118,7 +118,7 @@
 Users
 Admins
 Stub ratio
-Formats
+Formats
 Last update
 
 
@@ -133,7 +133,7 @@
 Users
 Admins
 Stub ratio
-Formats
+Formats
 Last update
 
 ";
@@ -204,6 +204,7 @@
 " .$row['gadmins'] . "
 " . $stubratio . "
 csv
+ssv
 xml";
 
 if ($project == 'wp') {
@@ -305,7 +306,7 @@
 $name = "coalesced";
 /*
 echo <

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Always (re-)initialize logger when setting provider configur...

2017-05-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355739 )

Change subject: Always (re-)initialize logger when setting provider 
configuration
..

Always (re-)initialize logger when setting provider configuration

Relies on the __destruct code in LogHandlerContext actually firing
when we set the reference to null.

Bug: T143831
Change-Id: I279eb6dcbcf9add7f9e01f88d0b91962a3fef09c
---
M Core/Context.php
M Core/Logging/Logger.php
M Tests/BaseSmashPigUnitTestCase.php
3 files changed, 16 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/39/355739/1

diff --git a/Core/Context.php b/Core/Context.php
index e1ce04d..0f18975 100644
--- a/Core/Context.php
+++ b/Core/Context.php
@@ -34,25 +34,6 @@
}
}
 
-   public static function initWithLogger(
-   GlobalConfiguration $config,
-   $providerConfig = null,
-   $loggerPrefix = ''
-   ) {
-   self::init( $config, $providerConfig );
-   $providerConfig = self::$instance->getProviderConfiguration();
-   if ( !self::$loggerInitialized ) {
-   // FIXME: Terminate logger crap with extreme prejudice
-   Logger::init(
-   $providerConfig->val( 'logging/root-context' ),
-   $providerConfig->val( 'logging/log-level' ),
-   $providerConfig,
-   $loggerPrefix
-   );
-   self::$loggerInitialized = true;
-   }
-   }
-
/**
 * Obtains the current context object
 * @return Context
@@ -144,8 +125,14 @@
}
 
public function setProviderConfiguration( ProviderConfiguration 
$configuration ) {
-   // FIXME: this should do something to the logger
$this->providerConfiguration = $configuration;
+   // FIXME: Terminate logger crap with extreme prejudice
+   Logger::init(
+   $configuration->val( 'logging/root-context' ),
+   $configuration->val( 'logging/log-level' ),
+   $configuration,
+   $configuration->getProviderName()
+   );
}
 
 /**
diff --git a/Core/Logging/Logger.php b/Core/Logging/Logger.php
index ed29392..43c58e0 100644
--- a/Core/Logging/Logger.php
+++ b/Core/Logging/Logger.php
@@ -24,8 +24,7 @@
 */
public static function init( $name, $threshold, ProviderConfiguration 
$config, $prefix ) {
if ( self::$context ) {
-   // FIXME: is this necessary?
-   throw new SmashPigException( "Attempting to 
reinitialize the logger is not allowed!" );
+   self::$context = null; // should fire __destruct code
}
 
// Init all the log streams
@@ -64,6 +63,11 @@
return new TaggedLogger( $tag );
}
 
+   public static function setPrefix( $prefix ) {
+   self::$context->leaveContext();
+   self::$context->enterContext( $prefix );
+   }
+
/* --- CONTEXT HELPER METHODS --- */
/**
 * Obtain the logging context. Only one context will be present in an
diff --git a/Tests/BaseSmashPigUnitTestCase.php 
b/Tests/BaseSmashPigUnitTestCase.php
index 5001c80..25b90df 100644
--- a/Tests/BaseSmashPigUnitTestCase.php
+++ b/Tests/BaseSmashPigUnitTestCase.php
@@ -10,9 +10,9 @@
public function setUp() {
parent::setUp();
$globalConfig = TestingGlobalConfiguration::create();
-   // TODO: standard issue CurlWrapper mock would be nice too
-   $providerConfig = TestingProviderConfiguration::createDefault();
-   Context::initWithLogger( $globalConfig, $providerConfig );
+   Context::init( $globalConfig );
+   // TODO: create tables for all dbs/queues.
+   // Standard issue CurlWrapper mock would be nice too
}
 
public function tearDown() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I279eb6dcbcf9add7f9e01f88d0b91962a3fef09c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
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]: Add skipping to nth page functionality for dump importing pr...

2017-05-25 Thread Mertyildiran (Code Review)
Mertyildiran has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355738 )

Change subject: Add skipping to nth page functionality for dump importing 
process
..

Add skipping to nth page functionality for dump importing process

Change-Id: Ib36063b69d6846fc197800bba44287493b0632c0
---
M includes/import/WikiImporter.php
M maintenance/importDump.php
2 files changed, 34 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/355738/1

diff --git a/includes/import/WikiImporter.php b/includes/import/WikiImporter.php
index 06b579a..6f459cb 100644
--- a/includes/import/WikiImporter.php
+++ b/includes/import/WikiImporter.php
@@ -39,6 +39,7 @@
private $mNoticeCallback, $mDebug;
private $mImportUploads, $mImageBasePath;
private $mNoUpdates = false;
+   private $skipTo = null;
/** @var Config */
private $config;
/** @var ImportTitleFactory */
@@ -144,6 +145,14 @@
 */
function setNoUpdates( $noupdates ) {
$this->mNoUpdates = $noupdates;
+   }
+
+   /**
+* Set 'skip-to' value. It will skip the first n-1 pages and start from 
the nth page
+* @param int $nthRecord
+*/
+   function setSkipTo( $nthPage ) {
+   $this->skipTo = $nthPage;
}
 
/**
@@ -562,9 +571,26 @@
$keepReading = $this->reader->read();
$skip = false;
$rethrow = null;
+   $pageCount = 0;
+   if ( isset( $this->skipTo ) ) {
+   $skipping = true;
+   } else {
+   $skipping = false;
+   }
try {
while ( $keepReading ) {
$tag = $this->reader->localName;
+   if ($skipping) {
+   if ( $tag == 'page' ) {
+   $pageCount++;
+   }
+   if ( $pageCount < $this->skipTo ) {
+   $keepReading = 
$this->reader->next();
+   continue;
+   } else {
+   $skipping = false;
+   }
+   }
$type = $this->reader->nodeType;
 
if ( !Hooks::run( 'ImportHandleToplevelXMLTag', 
[ $this ] ) ) {
diff --git a/maintenance/importDump.php b/maintenance/importDump.php
index 6717a8e..d34bb15 100644
--- a/maintenance/importDump.php
+++ b/maintenance/importDump.php
@@ -81,6 +81,7 @@
);
$this->addOption( 'image-base-path', 'Import files from a 
specified path', false, true );
$this->addArg( 'file', 'Dump file to import [else use stdin]', 
false );
+   $this->addArg( 'skip-to', 'Start from nth page by skipping 
first n-1 pages', false );
}
 
public function execute() {
@@ -102,8 +103,8 @@
$this->setNsfilter( explode( '|', $this->getOption( 
'namespaces' ) ) );
}
 
-   if ( $this->hasArg() ) {
-   $this->importFromFile( $this->getArg() );
+   if ( $this->hasArg( 0 ) ) {
+   $this->importFromFile( $this->getArg( 0 ) );
} else {
$this->importFromStdin();
}
@@ -301,6 +302,11 @@
return false;
}
}
+   if ( $this->hasArg( 1 ) ) {
+   $nthPage = (int)$this->getArg( 1 );
+   $importer->setSkipTo( $nthPage );
+   $this->pageCount = $nthPage - 1;
+   }
$importer->setPageCallback( [ $this, 'reportPage' ] );
$this->importCallback = $importer->setRevisionCallback(
[ $this, 'handleRevision' ] );

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

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

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


[MediaWiki-commits] [Gerrit] operations...wikistats[master]: fix colspan in index after removing the ssv column

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

Change subject: fix colspan in index after removing the ssv column
..


fix colspan in index after removing the ssv column

Change-Id: Ibd7bb269f7456dd694348c8dac96eba99abf47de
---
M var/www/wikistats/index.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/var/www/wikistats/index.php b/var/www/wikistats/index.php
index 3e7c289..7cf7331 100644
--- a/var/www/wikistats/index.php
+++ b/var/www/wikistats/index.php
@@ -105,7 +105,7 @@
 
 
 
-List of MediaWikis
+List of MediaWikis
 
 
 
@@ -118,7 +118,7 @@
 Users
 Admins
 Stub ratio
-Formats
+Formats
 Last update
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd7bb269f7456dd694348c8dac96eba99abf47de
Gerrit-PatchSet: 2
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 

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


[MediaWiki-commits] [Gerrit] operations...wikistats[master]: fix colspan in index after removing the ssv column

2017-05-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355737 )

Change subject: fix colspan in index after removing the ssv column
..

fix colspan in index after removing the ssv column

Change-Id: Ibd7bb269f7456dd694348c8dac96eba99abf47de
---
M var/www/wikistats/index.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/37/355737/1

diff --git a/var/www/wikistats/index.php b/var/www/wikistats/index.php
index 3e7c289..7cf7331 100644
--- a/var/www/wikistats/index.php
+++ b/var/www/wikistats/index.php
@@ -105,7 +105,7 @@
 
 
 
-List of MediaWikis
+List of MediaWikis
 
 
 
@@ -118,7 +118,7 @@
 Users
 Admins
 Stub ratio
-Formats
+Formats
 Last update
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd7bb269f7456dd694348c8dac96eba99abf47de
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] operations...wikistats[master]: add new csv_dumper function, remove old code for xml_dump

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

Change subject: add new csv_dumper function, remove old code for xml_dump
..


add new csv_dumper function, remove old code for xml_dump

Add a new function csv_dumper that uses PDO and fputscsv
to output CSV format in a much nicer way.

http://php.net/manual/en/function.fputcsv.php

Remove the commented old code for "ssv" and "xml" output and
deactivate the links in index.php for now.

Fixes CSV output. Will probably remove "ssv" since that's stupid
anyways, just for a different delimeter.

About XML i'll see in a second step.

Bug: T165879
Change-Id: Id276147a2cfa0c598e006b1fa034d18ddffc7a0a
---
M usr/share/php/wikistats/functions.php
M var/www/wikistats/api.php
M var/www/wikistats/index.php
3 files changed, 57 insertions(+), 120 deletions(-)

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



diff --git a/usr/share/php/wikistats/functions.php 
b/usr/share/php/wikistats/functions.php
index 4529c18..753c533 100644
--- a/usr/share/php/wikistats/functions.php
+++ b/usr/share/php/wikistats/functions.php
@@ -280,121 +280,59 @@
 return $result;
 }
 
-# dump csv / ssv data
+# dump csv data
+function csv_dumper($table) {
+global $dbhost,$dbuser,$dbpass,$dbname,$valid_api_tables;
 
-#function data_dumper($table,$format) {
-#global $dbhost,$dbuser,$dbpass,$dbname,$valid_api_tables;
-#
-#if (in_array($table,$valid_api_tables)) {
-#
-## db connect
-#try {
-#$wdb = new PDO("mysql:host=${dbhost};dbname=${dbname}", $dbuser, 
$dbpass);
-#} catch (PDOException $e) {
-# print "Error!: " . $e->getMessage() . "";
-#die();
-#}
-#
-#$count=1;
-#$cr = "\n";
-#
-#switch($format) {
-#case "csv":
-#$delimiter=",";
-#break;
-#case "ssv":
-#$delimiter=";";
-#break;
-#default:
-#$delimiter=",";
-#}
-#
-#switch($table) {
-#case "wikipedias":
-#$my_query = "select *,good/total as ratio from $table where 
lang not like \"%articles%\" order by good desc,total desc";
-#break;
-#default:
-#$my_query = "select *,good/total as ratio from $table order by 
good desc,total desc";
-#}
-#
-#header("Content-type: application/octet-stream");
-#header("Content-Disposition: attachment; filename=$table.$format");
-#header("Pragma: no-cache");
-#header("Expires: 0");
-#
-### modified from an example on 
http://php.net/manual/en/function.mysql-fetch-field.php (mewsterus at yahoo dot 
com  07-Jul-2009 06:18)
-#
-#$result = mysql_query("SELECT * FROM $table LIMIT 1");
-#$describe = mysql_query("SHOW COLUMNS FROM $table");
-#$num = mysql_num_fields($result);
-#$output = array();
-#for ($i = 0; $i < $num; ++$i) {
-#$field = mysql_fetch_field($result, $i);
-#// Analyze 'extra' field
-#$field->auto_increment = (strpos(mysql_result($describe, $i, 
'Extra'), 'auto_increment') === FALSE ? 0 : 1);
-#// Create the column_definition
-#$field->definition = mysql_result($describe, $i, 'Type');
-#if ($field->not_null && !$field->primary_key) $field->definition 
.= ' NOT NULL';
-#if ($field->def) $field->definition .= " DEFAULT '" . $field->def 
. "'";
-#if ($field->auto_increment) $field->definition .= ' 
AUTO_INCREMENT';
-#if ($key = mysql_result($describe, $i, 'Key')) {
-#if ($field->primary_key) $field->definition .= ' PRIMARY KEY';
-#else $field->definition .= ' UNIQUE KEY';
-#}
-#// Create the field length
-#$field->len = mysql_field_len($result, $i);
-#// Store the field into the output
-## $output[$field->name] = $field;
-## we just want the column names (mutante)
-#$columns.=$field->name."$delimiter";
-#}
-#$columns=substr($columns,0,-1);
-## /from
-#
-#$output=$columns."\n";
-#$columns=explode($delimiter,$columns);
-#
-#$fnord = $wdb->prepare($my_query);
-#$fnord -> execute();
-#
-#while ($row = $fnord->fetch()) {
-#foreach ($columns as &$column) {
-#$myrow=mb_convert_encoding($row[$column], "UTF-8", 
"HTML-ENTITIES");
-#$output.=$myrow.$delimiter;
-#}
-#$count++;
-#$output.="\n";
-#}
-#
-## close db connection
-#$wdb = null;
-#
-#} else {
-#
-#$output="unknown or invalid table.";
-#}
-#
-#return $output;
-#}
-#
-# dump XML data, the lazy way
+if (in_array($table,$valid_api_tables)) {
 
-#function xml_dumper($table) {
-#global $dbuser,$dbpass,$dbname,$valid_api_tables;
-#

[MediaWiki-commits] [Gerrit] operations...wikistats[master]: add new csv_dumper function, remove old code for xml_dump

2017-05-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355736 )

Change subject: add new csv_dumper function, remove old code for xml_dump
..

add new csv_dumper function, remove old code for xml_dump

Add a new function csv_dumper that uses PDO and fputscsv
to output CSV format in a much nicer way.

Remove the commented old code for "ssv" and "xml" output and
deactivate the links in index.php for now.

Fixes CSV output. Will probably remove "ssv" since that's stupid
anyways, just for a different delimeter.

About XML i'll see in a second step.

Bug: T165879
Change-Id: Id276147a2cfa0c598e006b1fa034d18ddffc7a0a
---
M usr/share/php/wikistats/functions.php
M var/www/wikistats/api.php
M var/www/wikistats/index.php
3 files changed, 56 insertions(+), 115 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/36/355736/1

diff --git a/usr/share/php/wikistats/functions.php 
b/usr/share/php/wikistats/functions.php
index 4529c18..54437ea 100644
--- a/usr/share/php/wikistats/functions.php
+++ b/usr/share/php/wikistats/functions.php
@@ -280,121 +280,62 @@
 return $result;
 }
 
-# dump csv / ssv data
+# dump csv data
+function csv_dumper($table) {
+global $dbhost,$dbuser,$dbpass,$dbname,$valid_api_tables;
 
-#function data_dumper($table,$format) {
-#global $dbhost,$dbuser,$dbpass,$dbname,$valid_api_tables;
-#
-#if (in_array($table,$valid_api_tables)) {
-#
-## db connect
-#try {
-#$wdb = new PDO("mysql:host=${dbhost};dbname=${dbname}", $dbuser, 
$dbpass);
-#} catch (PDOException $e) {
-# print "Error!: " . $e->getMessage() . "";
-#die();
-#}
-#
-#$count=1;
-#$cr = "\n";
-#
-#switch($format) {
-#case "csv":
-#$delimiter=",";
-#break;
-#case "ssv":
-#$delimiter=";";
-#break;
-#default:
-#$delimiter=",";
-#}
-#
-#switch($table) {
-#case "wikipedias":
-#$my_query = "select *,good/total as ratio from $table where 
lang not like \"%articles%\" order by good desc,total desc";
-#break;
-#default:
-#$my_query = "select *,good/total as ratio from $table order by 
good desc,total desc";
-#}
-#
-#header("Content-type: application/octet-stream");
-#header("Content-Disposition: attachment; filename=$table.$format");
-#header("Pragma: no-cache");
-#header("Expires: 0");
-#
-### modified from an example on 
http://php.net/manual/en/function.mysql-fetch-field.php (mewsterus at yahoo dot 
com  07-Jul-2009 06:18)
-#
-#$result = mysql_query("SELECT * FROM $table LIMIT 1");
-#$describe = mysql_query("SHOW COLUMNS FROM $table");
-#$num = mysql_num_fields($result);
-#$output = array();
-#for ($i = 0; $i < $num; ++$i) {
-#$field = mysql_fetch_field($result, $i);
-#// Analyze 'extra' field
-#$field->auto_increment = (strpos(mysql_result($describe, $i, 
'Extra'), 'auto_increment') === FALSE ? 0 : 1);
-#// Create the column_definition
-#$field->definition = mysql_result($describe, $i, 'Type');
-#if ($field->not_null && !$field->primary_key) $field->definition 
.= ' NOT NULL';
-#if ($field->def) $field->definition .= " DEFAULT '" . $field->def 
. "'";
-#if ($field->auto_increment) $field->definition .= ' 
AUTO_INCREMENT';
-#if ($key = mysql_result($describe, $i, 'Key')) {
-#if ($field->primary_key) $field->definition .= ' PRIMARY KEY';
-#else $field->definition .= ' UNIQUE KEY';
-#}
-#// Create the field length
-#$field->len = mysql_field_len($result, $i);
-#// Store the field into the output
-## $output[$field->name] = $field;
-## we just want the column names (mutante)
-#$columns.=$field->name."$delimiter";
-#}
-#$columns=substr($columns,0,-1);
-## /from
-#
-#$output=$columns."\n";
-#$columns=explode($delimiter,$columns);
-#
-#$fnord = $wdb->prepare($my_query);
-#$fnord -> execute();
-#
-#while ($row = $fnord->fetch()) {
-#foreach ($columns as &$column) {
-#$myrow=mb_convert_encoding($row[$column], "UTF-8", 
"HTML-ENTITIES");
-#$output.=$myrow.$delimiter;
-#}
-#$count++;
-#$output.="\n";
-#}
-#
-## close db connection
-#$wdb = null;
-#
-#} else {
-#
-#$output="unknown or invalid table.";
-#}
-#
-#return $output;
-#}
-#
-# dump XML data, the lazy way
+if (in_array($table,$valid_api_tables)) {
 
-#function xml_dumper($table) {
-#global $dbuser,$dbpass,$dbname,$valid_api_tables;
-#$table=strip_tags(trim($table));
+   

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

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

Change subject: Update mobileapps to db6493c
..


Update mobileapps to db6493c

List of changes:
db6493c Remove HTML from text in iOS survey
xxx Update node module dependencies

Change-Id: I1ff48965c2ffa72c4ea7d3f13e78ba9997dad2fb
---
M node_modules/kad/package.json
M src
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/node_modules/kad/package.json b/node_modules/kad/package.json
index 51d285e..0530146 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": "415e87b839f14c1caa2f9f903aabbcac40a24524",
+  "_shasum": "cceaf84080aa8c68d94ba74467d798019a1d0301",
   "_shrinkwrap": null,
   "_spec": "kad@git+https://github.com/gwicke/kad.git#master;,
   "_where": "/opt/service/node_modules/limitation",
diff --git a/src b/src
index 946fe1f..db6493c 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 946fe1fa80239784d28bce6741fd983a8bc3b0fd
+Subproject commit db6493caa278db7b04597d389760e88e526f63ee

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ff48965c2ffa72c4ea7d3f13e78ba9997dad2fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/deploy
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: BearND 
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 db6493c

2017-05-25 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355735 )

Change subject: Update mobileapps to db6493c
..

Update mobileapps to db6493c

List of changes:
db6493c Remove HTML from text in iOS survey
xxx Update node module dependencies

Change-Id: I1ff48965c2ffa72c4ea7d3f13e78ba9997dad2fb
---
M node_modules/kad/package.json
M src
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/node_modules/kad/package.json b/node_modules/kad/package.json
index 51d285e..0530146 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": "415e87b839f14c1caa2f9f903aabbcac40a24524",
+  "_shasum": "cceaf84080aa8c68d94ba74467d798019a1d0301",
   "_shrinkwrap": null,
   "_spec": "kad@git+https://github.com/gwicke/kad.git#master;,
   "_where": "/opt/service/node_modules/limitation",
diff --git a/src b/src
index 946fe1f..db6493c 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 946fe1fa80239784d28bce6741fd983a8bc3b0fd
+Subproject commit db6493caa278db7b04597d389760e88e526f63ee

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Remove HTML from text in iOS survey

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

Change subject: Remove HTML from text in iOS survey
..


Remove HTML from text in iOS survey

iOS treats it like text, not HTML, so the HTML tags get displayed, too.

Bug: T165546
Bug: T166001
Change-Id: I5b26be8106c728e8310616db9a2e6d90c56fc774
---
M routes/announcements.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/routes/announcements.js b/routes/announcements.js
index cf07ffe..07f2fb7 100644
--- a/routes/announcements.js
+++ b/routes/announcements.js
@@ -9,6 +9,8 @@
 const router = sUtil.router();
 
 function getEnwikiAnnouncements() {
+// Notes: for iOS text: HTML is not supported.
+// iOS uses image_url instead of the image Android uses.
 return [
 {
 id: "EN0517SURVEYIOS",
@@ -18,7 +20,7 @@
 platforms: [
 "iOSApp",
 ],
-text: "Hi iOS readers,Have you been using save for later? 
Help us learn more about how you are using this saved articles feature by 
taking a short survey, so that we can continue making reading lists even 
better.", // eslint-disable-line max-len
+text: "Hi iOS readers,\n\nHave you been using save for later? Help 
us learn more about how you are using this saved articles feature by taking a 
short survey, so that we can continue making reading lists even better.", // 
eslint-disable-line max-len
 image_url: 
"https://upload.wikimedia.org/wikipedia/commons/8/8f/Reading_list_survey_-_iOS.png;,
 action: {
 title: "Take survey",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Remove HTML from text in iOS survey

2017-05-25 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355734 )

Change subject: Remove HTML from text in iOS survey
..

Remove HTML from text in iOS survey

iOS treats it like text, not HTML, so the HTML tags get displayed, too.

Bug: T165546
Bug: T166001
Change-Id: I5b26be8106c728e8310616db9a2e6d90c56fc774
---
M routes/announcements.js
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/routes/announcements.js b/routes/announcements.js
index cf07ffe..07f2fb7 100644
--- a/routes/announcements.js
+++ b/routes/announcements.js
@@ -9,6 +9,8 @@
 const router = sUtil.router();
 
 function getEnwikiAnnouncements() {
+// Notes: for iOS text: HTML is not supported.
+// iOS uses image_url instead of the image Android uses.
 return [
 {
 id: "EN0517SURVEYIOS",
@@ -18,7 +20,7 @@
 platforms: [
 "iOSApp",
 ],
-text: "Hi iOS readers,Have you been using save for later? 
Help us learn more about how you are using this saved articles feature by 
taking a short survey, so that we can continue making reading lists even 
better.", // eslint-disable-line max-len
+text: "Hi iOS readers,\n\nHave you been using save for later? Help 
us learn more about how you are using this saved articles feature by taking a 
short survey, so that we can continue making reading lists even better.", // 
eslint-disable-line max-len
 image_url: 
"https://upload.wikimedia.org/wikipedia/commons/8/8f/Reading_list_survey_-_iOS.png;,
 action: {
 title: "Take survey",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Moving setting env properties closer to where they're used

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

Change subject: Moving setting env properties closer to where they're used
..


Moving setting env properties closer to where they're used

Change-Id: I3496ab7668c48f93d1a98baccdb1b5caf7ea0327
---
M lib/api/ParsoidService.js
M lib/api/apiUtils.js
M lib/api/routes.js
3 files changed, 46 insertions(+), 52 deletions(-)

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



diff --git a/lib/api/ParsoidService.js b/lib/api/ParsoidService.js
index e5d3bb6..b4d52ae 100644
--- a/lib/api/ParsoidService.js
+++ b/lib/api/ParsoidService.js
@@ -115,6 +115,15 @@
req.pipe(req.busboy);
});
 
+   // Allow cross-domain requests (CORS) so that parsoid service can be 
used
+   // by third-party sites.
+   if (parsoidConfig.allowCORS) {
+   app.use(function(req, res, next) {
+   res.set('Access-Control-Allow-Origin', 
parsoidConfig.allowCORS);
+   next();
+   });
+   }
+
// just a timer
app.use(function(req, res, next) {
res.locals.start = Date.now();
diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index 5a2f00e..4ed3168 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -556,7 +556,7 @@
  * @param {Object} pb
  */
 apiUtils.wt2htmlRes = function(env, res, html, pb) {
-   if (env.pageBundle) {
+   if (pb) {
var response = {
contentmodel: env.page.meta.revision.contentmodel,
html: {
@@ -579,3 +579,21 @@
apiUtils.htmlResponse(res, html, undefined, 
apiUtils.htmlContentType(env), true);
}
 };
+
+apiUtils.shouldScrub = function(req, def) {
+   // Check hasOwnProperty to avoid overwriting the default when
+   // this isn't set.  `scrubWikitext` was renamed in RESTBase to
+   // `scrub_wikitext`.  Support both for backwards compatibility,
+   // but prefer the newer form.
+   if (req.body.hasOwnProperty('scrub_wikitext')) {
+   return !(!req.body.scrub_wikitext || req.body.scrub_wikitext 
=== 'false');
+   } else if (req.query.hasOwnProperty('scrub_wikitext')) {
+   return !(!req.query.scrub_wikitext || req.query.scrub_wikitext 
=== 'false');
+   } else if (req.body.hasOwnProperty('scrubWikitext')) {
+   return !(!req.body.scrubWikitext || req.body.scrubWikitext === 
'false');
+   } else if (req.query.hasOwnProperty('scrubWikitext')) {
+   return !(!req.query.scrubWikitext || req.query.scrubWikitext 
=== 'false');
+   } else {
+   return def;
+   }
+};
diff --git a/lib/api/routes.js b/lib/api/routes.js
index be7a1bb..b3d1de7 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -169,11 +169,13 @@
}
res.once('finish', resolve);
apiUtils.errorResponse(res, 
logData.fullMsg(), logData.flatLogObject().httpStatus);
-   }).catch(function(e) {
+   })
+   .catch(function(e) {
console.error(e.stack || e);
res.end();
return Promise.reject(e);
-   }).nodify(callback);
+   })
+   .nodify(callback);
}
return Promise.resolve().nodify(callback);
}
@@ -184,37 +186,13 @@
reqId: req.headers['x-request-id'],
userAgent: req.headers['user-agent'],
};
-   MWParserEnv.getParserEnv(parsoidConfig, 
options).then(function(env) {
+   MWParserEnv.getParserEnv(parsoidConfig, options)
+   .then(function(env) {
env.logger.registerBackend(/fatal(\/.*)?/, errBack);
-   if (env.conf.parsoid.allowCORS) {
-   // Allow cross-domain requests (CORS) so that 
parsoid service
-   // can be used by third-party sites.
-   apiUtils.setHeader(res, 
'Access-Control-Allow-Origin',
-   env.conf.parsoid.allowCORS);
-   }
-   if (res.locals.opts && res.locals.opts.format === 
'pagebundle') {
-   env.pageBundle = true;
-   }
-   // Check hasOwnProperty to avoid overwriting the 
default when
-   // this isn't set.  `scrubWikitext` was renamed in 
RESTBase to
-   // 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T161151: Use already resolved href when available

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

Change subject: T161151: Use already resolved href when available
..


T161151: Use already resolved href when available

 * Avoids trying to resolve titles potentially containing template
   syntax.

Change-Id: I5a62052fb5ec800f169de687beb8ab3edc3af67e
---
M lib/wt2html/pp/handlers/linter.js
M tests/mocha/linter.js
2 files changed, 18 insertions(+), 7 deletions(-)

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



diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 749538c..102ff54 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -92,10 +92,11 @@
var dmw = DU.getDataMw(tplInfo.first);
if (dmw.parts && dmw.parts.length === 1) {
var p0 = dmw.parts[0];
-   var name = (p0.template || p0.templatearg).target.wt.trim();
-   // Fully resolve template paths where required
-   if (/^\.*\//.test(name)) {
-   name = env.resolveTitle(Util.decodeURI(name));
+   var name;
+   if (p0.template && p0.template.target.href) {  // Could be 
"function"
+   name = p0.template.target.href.replace(/^\.\//, '');
+   } else {
+   name = (p0.template || p0.templatearg).target.wt.trim();
}
return { name: name };
} else {
diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index fe9675d..969e63e 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -44,7 +44,7 @@
result[0].should.have.a.property("type", 
"missing-end-tag");
result[0].dsr.should.deep.equal([ 0, 27, null, 
null ]);

result[0].should.have.a.property("templateInfo");
-   
result[0].templateInfo.should.have.a.property("name", "1x");
+   
result[0].templateInfo.should.have.a.property("name", "Template:1x");
result[0].should.have.a.property("params");
result[0].params.should.have.a.property("name", 
"p");
});
@@ -65,6 +65,8 @@
result[0].should.have.a.property("params");
result[0].params.should.have.a.property("name", 
"DIV");
result[0].dsr.should.deep.equal([ 0, 27, null, 
null ]);
+   
result[0].should.have.a.property("templateInfo");
+   
result[0].templateInfo.should.have.a.property("name", "Template:1x");
});
});
it('should lint stripped tags correctly in misnested tag 
situations ( is stripped)', function() {
@@ -83,6 +85,8 @@
result[0].dsr.should.deep.equal([ 0, 22, null, 
null ]);
result[0].should.have.a.property("params");
result[0].params.should.have.a.property("name", 
"i");
+   
result[0].should.have.a.property("templateInfo");
+   
result[0].templateInfo.should.have.a.property("name", "Template:1x");
});
});
it('should lint stripped tags correctly in misnested tag 
situations ( is auto-inserted)', function() {
@@ -133,6 +137,8 @@
result[0].dsr.should.deep.equal([ 0, 30, null, 
null ]);
result[0].should.have.a.property("params");
result[0].params.should.have.a.property("name", 
"tt");
+   
result[0].should.have.a.property("templateInfo");
+   
result[0].templateInfo.should.have.a.property("name", "Template:1x");
});
});
it('should not lint auto-inserted obsolete tags', function() {
@@ -186,6 +192,8 @@
result.should.have.length(1);
result[0].should.have.a.property("type", 
"ignored-table-attr");
result[0].dsr.should.deep.equal([ 0, 43, null, 
null]);
+   
result[0].should.have.a.property("templateInfo");
+   
result[0].templateInfo.should.have.a.property("name", "Template:1x");
});
});
it('should not lint whitespaces as ignored table attributes', 
function() {
@@ -217,6 +225,8 @@
result[0].dsr.should.deep.equal([ 0, 29, null, 
null ]);

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Refactor Statsd classes to enable null collector to work.

2017-05-25 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355733 )

Change subject: Refactor Statsd classes to enable null collector to work.
..

Refactor Statsd classes to enable null collector to work.

The following changes are added:
- Created MediawikiStatsdDataFactory interface
- Added hasData() method to see if there are any data to send
- Added getData() method to fetch data
- Made service infrastructure use MediawikiStatsdDataFactory interface
- Made wfLogProfilingData() use MediawikiStatsdDataFactory interface
- Added capability to enable/disable buffering collector

Change-Id: I2874175647e987996a9a399829b3319674471aaa
---
M autoload.php
M includes/GlobalFunctions.php
M includes/MediaWikiServices.php
M includes/libs/stats/BufferingStatsdDataFactory.php
A includes/libs/stats/MediawikiStatsdDataFactory.php
M includes/libs/stats/NullStatsdDataFactory.php
6 files changed, 99 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/355733/1

diff --git a/autoload.php b/autoload.php
index fbdee83..018c4fc 100644
--- a/autoload.php
+++ b/autoload.php
@@ -960,6 +960,7 @@
'MediaWiki\\Widget\\TitleInputWidget' => __DIR__ . 
'/includes/widget/TitleInputWidget.php',
'MediaWiki\\Widget\\UserInputWidget' => __DIR__ . 
'/includes/widget/UserInputWidget.php',
'MediaWiki\\Widget\\UsersMultiselectWidget' => __DIR__ . 
'/includes/widget/UsersMultiselectWidget.php',
+   'MediawikiStatsdDataFactory' => __DIR__ . 
'/includes/libs/stats/MediawikiStatsdDataFactory.php',
'MemCachedClientforWiki' => __DIR__ . 
'/includes/compat/MemcachedClientCompat.php',
'MemcLockManager' => __DIR__ . 
'/includes/libs/lockmanager/MemcLockManager.php',
'MemcachedBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/MemcachedBagOStuff.php',
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 9c70639..8f2c24e 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1191,7 +1191,8 @@
$profiler->logData();
 
$config = $context->getConfig();
-   if ( $config->get( 'StatsdServer' ) ) {
+   $stats = MediaWikiServices::getInstance()->getStatsdDataFactory();
+   if ( $config->get( 'StatsdServer' ) && $stats->hasData() ) {
try {
$statsdServer = explode( ':', $config->get( 
'StatsdServer' ) );
$statsdHost = $statsdServer[0];
@@ -1199,9 +1200,7 @@
$statsdSender = new SocketSender( $statsdHost, 
$statsdPort );
$statsdClient = new SamplingStatsdClient( 
$statsdSender, true, false );
$statsdClient->setSamplingRates( $config->get( 
'StatsdSamplingRates' ) );
-   $statsdClient->send(
-   
MediaWikiServices::getInstance()->getStatsdDataFactory()->getBuffer()
-   );
+   $statsdClient->send( $stats->getData() );
} catch ( Exception $ex ) {
MWExceptionHandler::logException( $ex );
}
diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index 3bf6d78..b63c769 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -9,9 +9,9 @@
 use GenderCache;
 use GlobalVarConfig;
 use Hooks;
+use MediawikiStatsdDataFactory;
 use Wikimedia\Rdbms\LBFactory;
 use LinkCache;
-use Liuggio\StatsdClient\Factory\StatsdDataFactory;
 use Wikimedia\Rdbms\LoadBalancer;
 use MediaHandlerFactory;
 use MediaWiki\Linker\LinkRenderer;
@@ -446,7 +446,7 @@
 
/**
 * @since 1.27
-* @return StatsdDataFactory
+* @return MediawikiStatsdDataFactory
 */
public function getStatsdDataFactory() {
return $this->getService( 'StatsdDataFactory' );
diff --git a/includes/libs/stats/BufferingStatsdDataFactory.php 
b/includes/libs/stats/BufferingStatsdDataFactory.php
index 9c18b10..ab32cc3 100644
--- a/includes/libs/stats/BufferingStatsdDataFactory.php
+++ b/includes/libs/stats/BufferingStatsdDataFactory.php
@@ -32,8 +32,17 @@
  *
  * @since 1.25
  */
-class BufferingStatsdDataFactory extends StatsdDataFactory {
+class BufferingStatsdDataFactory extends StatsdDataFactory implements 
MediawikiStatsdDataFactory {
protected $buffer = [];
+   /**
+* Collection enabled?
+* @var bool
+*/
+   protected $enabled = true;
+   /**
+* @var string
+*/
+   private $prefix;
 
public function __construct( $prefix ) {
parent::__construct();
@@ -49,6 +58,7 @@
 *
 * @param string $key
 * @since 1.26
+* @return string
 */
private static function normalizeMetricKey( $key ) {
$key = preg_replace( '/[:.]+/', '.', $key );
@@ 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[wmf/1.30.0-wmf.2]: Revert "Disable stats collection for maintenance scripts."

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

Change subject: Revert "Disable stats collection for maintenance scripts."
..


Revert "Disable stats collection for maintenance scripts."

This reverts commit c0a8d2643a986f1925326a17407e85037acaf843.

Change-Id: I42da4ee98d97f903905fa4f411b0cc099ff67863
---
M includes/Maintenance/Maintenance.php
1 file changed, 0 insertions(+), 11 deletions(-)

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



diff --git a/includes/Maintenance/Maintenance.php 
b/includes/Maintenance/Maintenance.php
index 33a71f8..11fe094 100644
--- a/includes/Maintenance/Maintenance.php
+++ b/includes/Maintenance/Maintenance.php
@@ -6,7 +6,6 @@
 use CirrusSearch\SearchConfig;
 use MediaWiki\MediaWikiServices;
 use CirrusSearch\UserTesting;
-use MediaWiki\Services\CannotReplaceActiveServiceException;
 
 /**
  * Cirrus helpful extensions to Maintenance.
@@ -203,15 +202,5 @@
// Don't skew the dashboards by logging these requests to
// the global request log.
$wgCirrusSearchLogElasticRequests = false;
-   // Disable statsd data collection.
-   try {
-   $services = \MediaWiki\MediaWikiServices::getInstance();
-   $services->redefineService( "StatsdDataFactory",
-   function ( MediaWikiServices $services ) {
-   return new \NullStatsdDataFactory();
-   } );
-   } catch ( CannotReplaceActiveServiceException $e ) {
-   // ignore it, failing to disable stats is tolerable
-   }
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42da4ee98d97f903905fa4f411b0cc099ff67863
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.30.0-wmf.2
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Search empty view design tweaks

2017-05-25 Thread Jcasariego (Code Review)
Jcasariego has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355732 )

Change subject: Search empty view design tweaks
..

Search empty view design tweaks

* Make background @base80
* Increase text line-height

Bug: T137116
Change-Id: I92ff9343f202a08da2ddab56a5187658d599bbb8
---
M app/src/main/res/layout/fragment_search_recent.xml
1 file changed, 9 insertions(+), 8 deletions(-)


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

diff --git a/app/src/main/res/layout/fragment_search_recent.xml 
b/app/src/main/res/layout/fragment_search_recent.xml
index 5ad7163..23cccf6 100644
--- a/app/src/main/res/layout/fragment_search_recent.xml
+++ b/app/src/main/res/layout/fragment_search_recent.xml
@@ -9,19 +9,18 @@
 
 
+android:visibility="gone"
+android:background="@color/base80">
 
 
 
@@ -29,11 +28,13 @@
 android:id="@+id/search_empty_message"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
-android:layout_gravity="center_horizontal"
 android:layout_marginTop="32dp"
+android:layout_marginLeft="30dp"
+android:layout_marginRight="30dp"
 android:gravity="center"
 android:text="@string/search_empty_message"
-android:textSize="16sp" />
+android:textSize="16sp"
+android:lineSpacingMultiplier="1.25"/>
 
 
 https://gerrit.wikimedia.org/r/355732
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Revert "Disable stats collection for maintenance scripts."

2017-05-25 Thread Smalyshev (Code Review)
Hello EBernhardson, Cindy-the-browser-test-bot, jenkins-bot, DCausse,

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

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

to review the following change.


Change subject: Revert "Disable stats collection for maintenance scripts."
..

Revert "Disable stats collection for maintenance scripts."

This reverts commit 5a01b91190782d71e6e821c7a849a734f3429122.

Change-Id: I1006536dc8e891f7073ee1342de9b65e3cf07d40
---
M includes/Maintenance/Maintenance.php
1 file changed, 0 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/31/355731/1

diff --git a/includes/Maintenance/Maintenance.php 
b/includes/Maintenance/Maintenance.php
index 33a71f8..11fe094 100644
--- a/includes/Maintenance/Maintenance.php
+++ b/includes/Maintenance/Maintenance.php
@@ -6,7 +6,6 @@
 use CirrusSearch\SearchConfig;
 use MediaWiki\MediaWikiServices;
 use CirrusSearch\UserTesting;
-use MediaWiki\Services\CannotReplaceActiveServiceException;
 
 /**
  * Cirrus helpful extensions to Maintenance.
@@ -203,15 +202,5 @@
// Don't skew the dashboards by logging these requests to
// the global request log.
$wgCirrusSearchLogElasticRequests = false;
-   // Disable statsd data collection.
-   try {
-   $services = \MediaWiki\MediaWikiServices::getInstance();
-   $services->redefineService( "StatsdDataFactory",
-   function ( MediaWikiServices $services ) {
-   return new \NullStatsdDataFactory();
-   } );
-   } catch ( CannotReplaceActiveServiceException $e ) {
-   // ignore it, failing to disable stats is tolerable
-   }
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1006536dc8e891f7073ee1342de9b65e3cf07d40
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
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...CirrusSearch[wmf/1.30.0-wmf.2]: Revert "Disable stats collection for maintenance scripts."

2017-05-25 Thread Smalyshev (Code Review)
Hello Thcipriani, EBernhardson, jenkins-bot, DCausse,

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

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

to review the following change.


Change subject: Revert "Disable stats collection for maintenance scripts."
..

Revert "Disable stats collection for maintenance scripts."

This reverts commit c0a8d2643a986f1925326a17407e85037acaf843.

Change-Id: I42da4ee98d97f903905fa4f411b0cc099ff67863
---
M includes/Maintenance/Maintenance.php
1 file changed, 0 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/30/355730/1

diff --git a/includes/Maintenance/Maintenance.php 
b/includes/Maintenance/Maintenance.php
index 33a71f8..11fe094 100644
--- a/includes/Maintenance/Maintenance.php
+++ b/includes/Maintenance/Maintenance.php
@@ -6,7 +6,6 @@
 use CirrusSearch\SearchConfig;
 use MediaWiki\MediaWikiServices;
 use CirrusSearch\UserTesting;
-use MediaWiki\Services\CannotReplaceActiveServiceException;
 
 /**
  * Cirrus helpful extensions to Maintenance.
@@ -203,15 +202,5 @@
// Don't skew the dashboards by logging these requests to
// the global request log.
$wgCirrusSearchLogElasticRequests = false;
-   // Disable statsd data collection.
-   try {
-   $services = \MediaWiki\MediaWikiServices::getInstance();
-   $services->redefineService( "StatsdDataFactory",
-   function ( MediaWikiServices $services ) {
-   return new \NullStatsdDataFactory();
-   } );
-   } catch ( CannotReplaceActiveServiceException $e ) {
-   // ignore it, failing to disable stats is tolerable
-   }
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42da4ee98d97f903905fa4f411b0cc099ff67863
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.30.0-wmf.2
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Thcipriani 
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[wmf/1.30.0-wmf.2]: Revert "Rename amount to gross"

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

Change subject: Revert "Rename amount to gross"
..


Revert "Rename amount to gross"

This was a step too far. Amount is more understandable, and 'gross'
is only used on the wire. Civi uses total_amount.

This reverts commit 7eb79df9487f533f7e5b377593caff11d18f6154.

Change-Id: I69c11f90f549d38eb37079961233602b9187dda8
(cherry picked from commit 1fd042e306574bb89c2848d385477556af78d55b)
---
M adyen_gateway/AmountInMinorUnits.php
M adyen_gateway/config/var_map.yaml
M amazon_gateway/amazon.adapter.php
M amazon_gateway/amazon.api.php
M amazon_gateway/amazon.js
M amazon_gateway/config/transformers.yaml
M amazon_gateway/i18n/en.json
M amazon_gateway/i18n/qqq.json
M astropay_gateway/AstroPaySignature.php
M astropay_gateway/astropay.adapter.php
M astropay_gateway/config/var_map.yaml
M astropay_gateway/scripts/status.php
M extension.json
M extras/custom_filters/filters/minfraud/minfraud.body.php
M gateway_common/Amount.php
M gateway_common/AmountInCents.php
M gateway_common/DataValidator.php
M gateway_common/DonationData.php
M gateway_common/DonationQueue.php
M gateway_common/donation.api.php
M gateway_common/gateway.adapter.php
M gateway_common/i18n/interface/af.json
M gateway_common/i18n/interface/aln.json
M gateway_common/i18n/interface/anp.json
M gateway_common/i18n/interface/ar.json
M gateway_common/i18n/interface/arz.json
M gateway_common/i18n/interface/ast.json
M gateway_common/i18n/interface/az.json
M gateway_common/i18n/interface/ba.json
M gateway_common/i18n/interface/be-tarask.json
M gateway_common/i18n/interface/be.json
M gateway_common/i18n/interface/bg.json
M gateway_common/i18n/interface/bn.json
M gateway_common/i18n/interface/br.json
M gateway_common/i18n/interface/bs.json
M gateway_common/i18n/interface/ca.json
M gateway_common/i18n/interface/ce.json
M gateway_common/i18n/interface/cs.json
M gateway_common/i18n/interface/cy.json
M gateway_common/i18n/interface/da.json
M gateway_common/i18n/interface/de.json
M gateway_common/i18n/interface/diq.json
M gateway_common/i18n/interface/dsb.json
M gateway_common/i18n/interface/el.json
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/eo.json
M gateway_common/i18n/interface/es.json
M gateway_common/i18n/interface/et.json
M gateway_common/i18n/interface/eu.json
M gateway_common/i18n/interface/fa.json
M gateway_common/i18n/interface/fi.json
M gateway_common/i18n/interface/fr.json
M gateway_common/i18n/interface/frp.json
M gateway_common/i18n/interface/frr.json
M gateway_common/i18n/interface/gl.json
M gateway_common/i18n/interface/gsw.json
M gateway_common/i18n/interface/gu.json
M gateway_common/i18n/interface/he.json
M gateway_common/i18n/interface/hi.json
M gateway_common/i18n/interface/hr.json
M gateway_common/i18n/interface/hsb.json
M gateway_common/i18n/interface/hu.json
M gateway_common/i18n/interface/hy.json
M gateway_common/i18n/interface/ia.json
M gateway_common/i18n/interface/id.json
M gateway_common/i18n/interface/io.json
M gateway_common/i18n/interface/is.json
M gateway_common/i18n/interface/it.json
M gateway_common/i18n/interface/ja.json
M gateway_common/i18n/interface/jv.json
M gateway_common/i18n/interface/ka.json
M gateway_common/i18n/interface/kk-cyrl.json
M gateway_common/i18n/interface/km.json
M gateway_common/i18n/interface/ko.json
M gateway_common/i18n/interface/ksh.json
M gateway_common/i18n/interface/lb.json
M gateway_common/i18n/interface/li.json
M gateway_common/i18n/interface/lij.json
M gateway_common/i18n/interface/lt.json
M gateway_common/i18n/interface/lus.json
M gateway_common/i18n/interface/lv.json
M gateway_common/i18n/interface/map-bms.json
M gateway_common/i18n/interface/mk.json
M gateway_common/i18n/interface/ml.json
M gateway_common/i18n/interface/mr.json
M gateway_common/i18n/interface/ms.json
M gateway_common/i18n/interface/mt.json
M gateway_common/i18n/interface/myv.json
M gateway_common/i18n/interface/nb.json
M gateway_common/i18n/interface/nds-nl.json
M gateway_common/i18n/interface/nds.json
M gateway_common/i18n/interface/ne.json
M gateway_common/i18n/interface/nl.json
M gateway_common/i18n/interface/nn.json
M gateway_common/i18n/interface/oc.json
M gateway_common/i18n/interface/or.json
M gateway_common/i18n/interface/pl.json
M gateway_common/i18n/interface/pms.json
M gateway_common/i18n/interface/ps.json
M gateway_common/i18n/interface/pt-br.json
M gateway_common/i18n/interface/pt.json
M gateway_common/i18n/interface/qqq.json
M gateway_common/i18n/interface/qu.json
M gateway_common/i18n/interface/ro.json
M gateway_common/i18n/interface/roa-tara.json
M gateway_common/i18n/interface/ru.json
M gateway_common/i18n/interface/rue.json
M gateway_common/i18n/interface/sa.json
M gateway_common/i18n/interface/sah.json
M gateway_common/i18n/interface/sh.json
M gateway_common/i18n/interface/si.json
M gateway_common/i18n/interface/sk.json
M 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[wmf/1.30.0-wmf.2]: Revert "Rename amount to gross"

2017-05-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355729 )

Change subject: Revert "Rename amount to gross"
..

Revert "Rename amount to gross"

This was a step too far. Amount is more understandable, and 'gross'
is only used on the wire. Civi uses total_amount.

This reverts commit 7eb79df9487f533f7e5b377593caff11d18f6154.

Change-Id: I69c11f90f549d38eb37079961233602b9187dda8
(cherry picked from commit 1fd042e306574bb89c2848d385477556af78d55b)
---
M adyen_gateway/AmountInMinorUnits.php
M adyen_gateway/config/var_map.yaml
M amazon_gateway/amazon.adapter.php
M amazon_gateway/amazon.api.php
M amazon_gateway/amazon.js
M amazon_gateway/config/transformers.yaml
M amazon_gateway/i18n/en.json
M amazon_gateway/i18n/qqq.json
M astropay_gateway/AstroPaySignature.php
M astropay_gateway/astropay.adapter.php
M astropay_gateway/config/var_map.yaml
M astropay_gateway/scripts/status.php
M extension.json
M extras/custom_filters/filters/minfraud/minfraud.body.php
M gateway_common/Amount.php
M gateway_common/AmountInCents.php
M gateway_common/DataValidator.php
M gateway_common/DonationData.php
M gateway_common/DonationQueue.php
M gateway_common/donation.api.php
M gateway_common/gateway.adapter.php
M gateway_common/i18n/interface/af.json
M gateway_common/i18n/interface/aln.json
M gateway_common/i18n/interface/anp.json
M gateway_common/i18n/interface/ar.json
M gateway_common/i18n/interface/arz.json
M gateway_common/i18n/interface/ast.json
M gateway_common/i18n/interface/az.json
M gateway_common/i18n/interface/ba.json
M gateway_common/i18n/interface/be-tarask.json
M gateway_common/i18n/interface/be.json
M gateway_common/i18n/interface/bg.json
M gateway_common/i18n/interface/bn.json
M gateway_common/i18n/interface/br.json
M gateway_common/i18n/interface/bs.json
M gateway_common/i18n/interface/ca.json
M gateway_common/i18n/interface/ce.json
M gateway_common/i18n/interface/cs.json
M gateway_common/i18n/interface/cy.json
M gateway_common/i18n/interface/da.json
M gateway_common/i18n/interface/de.json
M gateway_common/i18n/interface/diq.json
M gateway_common/i18n/interface/dsb.json
M gateway_common/i18n/interface/el.json
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/eo.json
M gateway_common/i18n/interface/es.json
M gateway_common/i18n/interface/et.json
M gateway_common/i18n/interface/eu.json
M gateway_common/i18n/interface/fa.json
M gateway_common/i18n/interface/fi.json
M gateway_common/i18n/interface/fr.json
M gateway_common/i18n/interface/frp.json
M gateway_common/i18n/interface/frr.json
M gateway_common/i18n/interface/gl.json
M gateway_common/i18n/interface/gsw.json
M gateway_common/i18n/interface/gu.json
M gateway_common/i18n/interface/he.json
M gateway_common/i18n/interface/hi.json
M gateway_common/i18n/interface/hr.json
M gateway_common/i18n/interface/hsb.json
M gateway_common/i18n/interface/hu.json
M gateway_common/i18n/interface/hy.json
M gateway_common/i18n/interface/ia.json
M gateway_common/i18n/interface/id.json
M gateway_common/i18n/interface/io.json
M gateway_common/i18n/interface/is.json
M gateway_common/i18n/interface/it.json
M gateway_common/i18n/interface/ja.json
M gateway_common/i18n/interface/jv.json
M gateway_common/i18n/interface/ka.json
M gateway_common/i18n/interface/kk-cyrl.json
M gateway_common/i18n/interface/km.json
M gateway_common/i18n/interface/ko.json
M gateway_common/i18n/interface/ksh.json
M gateway_common/i18n/interface/lb.json
M gateway_common/i18n/interface/li.json
M gateway_common/i18n/interface/lij.json
M gateway_common/i18n/interface/lt.json
M gateway_common/i18n/interface/lus.json
M gateway_common/i18n/interface/lv.json
M gateway_common/i18n/interface/map-bms.json
M gateway_common/i18n/interface/mk.json
M gateway_common/i18n/interface/ml.json
M gateway_common/i18n/interface/mr.json
M gateway_common/i18n/interface/ms.json
M gateway_common/i18n/interface/mt.json
M gateway_common/i18n/interface/myv.json
M gateway_common/i18n/interface/nb.json
M gateway_common/i18n/interface/nds-nl.json
M gateway_common/i18n/interface/nds.json
M gateway_common/i18n/interface/ne.json
M gateway_common/i18n/interface/nl.json
M gateway_common/i18n/interface/nn.json
M gateway_common/i18n/interface/oc.json
M gateway_common/i18n/interface/or.json
M gateway_common/i18n/interface/pl.json
M gateway_common/i18n/interface/pms.json
M gateway_common/i18n/interface/ps.json
M gateway_common/i18n/interface/pt-br.json
M gateway_common/i18n/interface/pt.json
M gateway_common/i18n/interface/qqq.json
M gateway_common/i18n/interface/qu.json
M gateway_common/i18n/interface/ro.json
M gateway_common/i18n/interface/roa-tara.json
M gateway_common/i18n/interface/ru.json
M gateway_common/i18n/interface/rue.json
M gateway_common/i18n/interface/sa.json
M gateway_common/i18n/interface/sah.json
M gateway_common/i18n/interface/sh.json
M gateway_common/i18n/interface/si.json
M gateway_common/i18n/interface/sk.json
M 

[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.2]: jquery.makeCollapsible: Restore considering empty as par...

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

Change subject: jquery.makeCollapsible: Restore considering empty  as part 
of toggle
..


jquery.makeCollapsible: Restore considering empty  as part of toggle

Before 2d95d36a8e, clicks on links inside toggles with non-empty
targets that are not '#', were ignored ("pass through") since they
are not intended for the toggle.

In 2d95d36a8e, this was simplified to ignoring clicks from all 
elements inside toggles. However this ignored too much as links
without 'href' attribute are also sometimes used inside toggles
to look like links and have no href-target, which means clicking
them does nothing and is in fact meant to toggle the element.

Restore previous behaviour and restore previous test + add a new
test for this specific case.

Bug: T166298
Change-Id: Ia3a0648f809f94be0977a83b469fbd184aa72aff
(cherry picked from commit 15b88fc2807c21c4fbefbb75ba2433d3d150b34a)
---
M resources/src/jquery/jquery.makeCollapsible.js
M tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
2 files changed, 19 insertions(+), 2 deletions(-)

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



diff --git a/resources/src/jquery/jquery.makeCollapsible.js 
b/resources/src/jquery/jquery.makeCollapsible.js
index 9d3df8c..ac4a392 100644
--- a/resources/src/jquery/jquery.makeCollapsible.js
+++ b/resources/src/jquery/jquery.makeCollapsible.js
@@ -152,7 +152,8 @@
if ( e ) {
if (
e.type === 'click' &&
-   e.target.nodeName.toLowerCase() === 'a'
+   e.target.nodeName.toLowerCase() === 'a' &&
+   $( e.target ).attr( 'href' )
) {
// Don't fire if a link was clicked (for 
premade togglers)
return;
diff --git a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js 
b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
index 44a2305..53d29cf 100644
--- a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
@@ -266,7 +266,7 @@
var $collapsible = prepareCollapsible(
'' +
'' +
-   'Toggle toggle 
toggle toggle' +
+   'Toggle toggle toggle toggle' +
'' +
'' 
+ loremIpsum + '' +
'',
@@ -282,6 +282,22 @@
assert.assertTrue( $content.is( ':hidden' ), 'click event on 
non-link inside toggle toggles content' );
} );
 
+   QUnit.test( 'click on non-link inside toggler counts as trigger', 
function ( assert ) {
+   var $collapsible = prepareCollapsible(
+   '' +
+   '' +
+   'Toggle toggle toggle 
toggle' +
+   '' +
+   '' 
+ loremIpsum + '' +
+   '',
+   { instantHide: true }
+   ),
+   $content = $collapsible.find( '.mw-collapsible-content' 
);
+
+   $collapsible.find( '.mw-collapsible-toggle a' ).trigger( 
'click' );
+   assert.assertTrue( $content.is( ':hidden' ), 'click event on 
link (with no href) inside toggle toggles content' );
+   } );
+
QUnit.test( 'collapse/expand text (data-collapsetext, 
data-expandtext)', function ( assert ) {
var $collapsible = prepareCollapsible(
'' +

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3a0648f809f94be0977a83b469fbd184aa72aff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.2
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Thcipriani 
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[wmf/1.30.0-wmf.2]: Allow old keys in session values

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

Change subject: Allow old keys in session values
..


Allow old keys in session values

Transitional code, revert after deploy.

Bug: T165818
Change-Id: If784e7d4f398d98a943acdcf6bcbbd0d2b7c16c9
(cherry picked from commit 021d456cc08007396eac7268ed7bc670b96afb66)
---
M gateway_common/DonationData.php
1 file changed, 17 insertions(+), 4 deletions(-)

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



diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 128eb03..8b2c418 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -189,14 +189,27 @@
if ( is_null( $donorData ) ) {
return;
}
+   // Transitional code, used for a few hours after deploy.
+   // Please delete before next deploy
+   $rekey = array(
+   'amount' => 'gross',
+   'currency_code' => 'currency',
+   'fname' => 'first_name',
+   'lname' => 'last_name',
+   'state' => 'state_province',
+   );
//fields that should always overwrite with their original values
$overwrite = array( 'referrer', 'contribution_tracking_id' );
foreach ( $donorData as $key => $val ) {
-   if ( !$this->isSomething( $key ) ) {
-   $this->setVal( $key, $val );
+   $newKey = $key;
+   if ( isset( $rekey[$key] ) ) {
+   $newKey = $rekey[$key];
+   }
+   if ( !$this->isSomething( $newKey ) ) {
+   $this->setVal( $newKey, $val );
} else {
-   if ( in_array( $key, $overwrite ) ) {
-   $this->setVal( $key, $val );
+   if ( in_array( $newKey, $overwrite ) ) {
+   $this->setVal( $newKey, $val );
}
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If784e7d4f398d98a943acdcf6bcbbd0d2b7c16c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: wmf/1.30.0-wmf.2
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...CirrusSearch[wmf/1.30.0-wmf.2]: Disable stats collection for maintenance scripts.

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

Change subject: Disable stats collection for maintenance scripts.
..


Disable stats collection for maintenance scripts.

Some long scripts collect tons of useless stats which makes them very slow,
also maintenance stats are probably not the stats we're generally after.

Bug: T165203
Change-Id: Icb9e3d7c45ff6d2dd00c23eac926c312b48f325e
---
M includes/Maintenance/Maintenance.php
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/includes/Maintenance/Maintenance.php 
b/includes/Maintenance/Maintenance.php
index 11fe094..33a71f8 100644
--- a/includes/Maintenance/Maintenance.php
+++ b/includes/Maintenance/Maintenance.php
@@ -6,6 +6,7 @@
 use CirrusSearch\SearchConfig;
 use MediaWiki\MediaWikiServices;
 use CirrusSearch\UserTesting;
+use MediaWiki\Services\CannotReplaceActiveServiceException;
 
 /**
  * Cirrus helpful extensions to Maintenance.
@@ -202,5 +203,15 @@
// Don't skew the dashboards by logging these requests to
// the global request log.
$wgCirrusSearchLogElasticRequests = false;
+   // Disable statsd data collection.
+   try {
+   $services = \MediaWiki\MediaWikiServices::getInstance();
+   $services->redefineService( "StatsdDataFactory",
+   function ( MediaWikiServices $services ) {
+   return new \NullStatsdDataFactory();
+   } );
+   } catch ( CannotReplaceActiveServiceException $e ) {
+   // ignore it, failing to disable stats is tolerable
+   }
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb9e3d7c45ff6d2dd00c23eac926c312b48f325e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.30.0-wmf.2
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Thcipriani 
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[wmf/1.30.0-wmf.2]: Allow old keys in session values

2017-05-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355728 )

Change subject: Allow old keys in session values
..

Allow old keys in session values

Transitional code, revert after deploy.

Bug: T165818
Change-Id: If784e7d4f398d98a943acdcf6bcbbd0d2b7c16c9
(cherry picked from commit 021d456cc08007396eac7268ed7bc670b96afb66)
---
M gateway_common/DonationData.php
1 file changed, 17 insertions(+), 4 deletions(-)


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

diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 128eb03..8b2c418 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -189,14 +189,27 @@
if ( is_null( $donorData ) ) {
return;
}
+   // Transitional code, used for a few hours after deploy.
+   // Please delete before next deploy
+   $rekey = array(
+   'amount' => 'gross',
+   'currency_code' => 'currency',
+   'fname' => 'first_name',
+   'lname' => 'last_name',
+   'state' => 'state_province',
+   );
//fields that should always overwrite with their original values
$overwrite = array( 'referrer', 'contribution_tracking_id' );
foreach ( $donorData as $key => $val ) {
-   if ( !$this->isSomething( $key ) ) {
-   $this->setVal( $key, $val );
+   $newKey = $key;
+   if ( isset( $rekey[$key] ) ) {
+   $newKey = $rekey[$key];
+   }
+   if ( !$this->isSomething( $newKey ) ) {
+   $this->setVal( $newKey, $val );
} else {
-   if ( in_array( $key, $overwrite ) ) {
-   $this->setVal( $key, $val );
+   if ( in_array( $newKey, $overwrite ) ) {
+   $this->setVal( $newKey, $val );
}
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If784e7d4f398d98a943acdcf6bcbbd0d2b7c16c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: wmf/1.30.0-wmf.2
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Revert "Add Code of Conduct footer links to wikitech...

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

Change subject: Revert "Revert "Add Code of Conduct footer links to wikitech 
and mw.o""
..


Revert "Revert "Add Code of Conduct footer links to wikitech and mw.o""

This was not the cause of the HHVM errors, and then wikis that are affected are 
in groups 0 and 1 so it can deploy at any time.

This reverts commit 868096efe229913211d7e13bbef4a90103a8e9e4.

Change-Id: I58460c1b2c9eb0e021724981f42ef6fb5824fc97
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 79ca61d..50af02a 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1170,6 +1170,15 @@
return true;
};
 }
+if ( $wmgUseFooterCodeOfConductLink ) {
+   $wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) 
{
+   $contactLink = Html::element( 'a', [ 'href' => $sk->msg( 
'wm-codeofconduct-url' )->escaped() ],
+   $sk->msg( 'wm-codeofconduct' )->text() );
+   $tpl->set( 'wm-codeofconduct', $contactLink );
+   $tpl->data['footerlinks']['places'][] = 'wm-codeofconduct';
+   return true;
+   };
+}
 
 // T35186: turn off incomplete feature action=imagerotate
 $wgAPIModules['imagerotate'] = 'ApiDisabled';
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5c79619..4711cb8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12863,6 +12863,13 @@
'ukwiki' => true, // T104924
 ],
 
+'wmgUseFooterCodeOfConductLink' => [
+   'default' => false,
+   'mediawikiwiki' => true,
+   'labswiki' => true,
+   'labstestwiki' => true,
+],
+
 'wgMaxMsgCacheEntrySize' => [
'default' => 1024,
 ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58460c1b2c9eb0e021724981f42ef6fb5824fc97
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Thcipriani 
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]: Revert "Revert "Revert "all wikis to 1.30.0-wmf.2"""

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

Change subject: Revert "Revert "Revert "all wikis to 1.30.0-wmf.2"""
..


Revert "Revert "Revert "all wikis to 1.30.0-wmf.2"""

This reverts commit b4edc1cf7e4cb768d3c3aa4dba3f6126c6ffe05b.

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

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



diff --git a/wikiversions.json b/wikiversions.json
index 73096d0..c1d0cc0 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,40 +1,40 @@
 {
-"aawiki": "php-1.30.0-wmf.2",
+"aawiki": "php-1.30.0-wmf.1",
 "aawikibooks": "php-1.30.0-wmf.2",
 "aawiktionary": "php-1.30.0-wmf.2",
-"abwiki": "php-1.30.0-wmf.2",
+"abwiki": "php-1.30.0-wmf.1",
 "abwiktionary": "php-1.30.0-wmf.2",
-"acewiki": "php-1.30.0-wmf.2",
+"acewiki": "php-1.30.0-wmf.1",
 "advisorywiki": "php-1.30.0-wmf.2",
-"adywiki": "php-1.30.0-wmf.2",
-"afwiki": "php-1.30.0-wmf.2",
+"adywiki": "php-1.30.0-wmf.1",
+"afwiki": "php-1.30.0-wmf.1",
 "afwikibooks": "php-1.30.0-wmf.2",
 "afwikiquote": "php-1.30.0-wmf.2",
 "afwiktionary": "php-1.30.0-wmf.2",
-"akwiki": "php-1.30.0-wmf.2",
+"akwiki": "php-1.30.0-wmf.1",
 "akwikibooks": "php-1.30.0-wmf.2",
 "akwiktionary": "php-1.30.0-wmf.2",
-"alswiki": "php-1.30.0-wmf.2",
+"alswiki": "php-1.30.0-wmf.1",
 "alswikibooks": "php-1.30.0-wmf.2",
 "alswikiquote": "php-1.30.0-wmf.2",
 "alswiktionary": "php-1.30.0-wmf.2",
-"amwiki": "php-1.30.0-wmf.2",
+"amwiki": "php-1.30.0-wmf.1",
 "amwikiquote": "php-1.30.0-wmf.2",
 "amwiktionary": "php-1.30.0-wmf.2",
-"angwiki": "php-1.30.0-wmf.2",
+"angwiki": "php-1.30.0-wmf.1",
 "angwikibooks": "php-1.30.0-wmf.2",
 "angwikiquote": "php-1.30.0-wmf.2",
 "angwikisource": "php-1.30.0-wmf.2",
 "angwiktionary": "php-1.30.0-wmf.2",
-"anwiki": "php-1.30.0-wmf.2",
+"anwiki": "php-1.30.0-wmf.1",
 "anwiktionary": "php-1.30.0-wmf.2",
-"arbcom_cswiki": "php-1.30.0-wmf.2",
-"arbcom_dewiki": "php-1.30.0-wmf.2",
-"arbcom_enwiki": "php-1.30.0-wmf.2",
-"arbcom_fiwiki": "php-1.30.0-wmf.2",
-"arbcom_nlwiki": "php-1.30.0-wmf.2",
-"arcwiki": "php-1.30.0-wmf.2",
-"arwiki": "php-1.30.0-wmf.2",
+"arbcom_cswiki": "php-1.30.0-wmf.1",
+"arbcom_dewiki": "php-1.30.0-wmf.1",
+"arbcom_enwiki": "php-1.30.0-wmf.1",
+"arbcom_fiwiki": "php-1.30.0-wmf.1",
+"arbcom_nlwiki": "php-1.30.0-wmf.1",
+"arcwiki": "php-1.30.0-wmf.1",
+"arwiki": "php-1.30.0-wmf.1",
 "arwikibooks": "php-1.30.0-wmf.2",
 "arwikimedia": "php-1.30.0-wmf.2",
 "arwikinews": "php-1.30.0-wmf.2",
@@ -42,80 +42,80 @@
 "arwikisource": "php-1.30.0-wmf.2",
 "arwikiversity": "php-1.30.0-wmf.2",
 "arwiktionary": "php-1.30.0-wmf.2",
-"arzwiki": "php-1.30.0-wmf.2",
-"astwiki": "php-1.30.0-wmf.2",
+"arzwiki": "php-1.30.0-wmf.1",
+"astwiki": "php-1.30.0-wmf.1",
 "astwikibooks": "php-1.30.0-wmf.2",
 "astwikiquote": "php-1.30.0-wmf.2",
 "astwiktionary": "php-1.30.0-wmf.2",
-"aswiki": "php-1.30.0-wmf.2",
+"aswiki": "php-1.30.0-wmf.1",
 "aswikibooks": "php-1.30.0-wmf.2",
 "aswikisource": "php-1.30.0-wmf.2",
 "aswiktionary": "php-1.30.0-wmf.2",
 "auditcomwiki": "php-1.30.0-wmf.2",
-"avwiki": "php-1.30.0-wmf.2",
+"avwiki": "php-1.30.0-wmf.1",
 "avwiktionary": "php-1.30.0-wmf.2",
-"aywiki": "php-1.30.0-wmf.2",
+"aywiki": "php-1.30.0-wmf.1",
 "aywikibooks": "php-1.30.0-wmf.2",
 "aywiktionary": "php-1.30.0-wmf.2",
-"azbwiki": "php-1.30.0-wmf.2",
-"azwiki": "php-1.30.0-wmf.2",
+"azbwiki": "php-1.30.0-wmf.1",
+"azwiki": "php-1.30.0-wmf.1",
 "azwikibooks": "php-1.30.0-wmf.2",
 "azwikiquote": "php-1.30.0-wmf.2",
 "azwikisource": "php-1.30.0-wmf.2",
 "azwiktionary": "php-1.30.0-wmf.2",
-"barwiki": "php-1.30.0-wmf.2",
-"bat_smgwiki": "php-1.30.0-wmf.2",
-"bawiki": "php-1.30.0-wmf.2",
+"barwiki": "php-1.30.0-wmf.1",
+"bat_smgwiki": "php-1.30.0-wmf.1",
+"bawiki": "php-1.30.0-wmf.1",
 "bawikibooks": "php-1.30.0-wmf.2",
-"bclwiki": "php-1.30.0-wmf.2",
+"bclwiki": "php-1.30.0-wmf.1",
 "bdwikimedia": "php-1.30.0-wmf.2",
-"be_x_oldwiki": "php-1.30.0-wmf.2",
+"be_x_oldwiki": "php-1.30.0-wmf.1",
 "betawikiversity": "php-1.30.0-wmf.2",
-"bewiki": "php-1.30.0-wmf.2",
+"bewiki": "php-1.30.0-wmf.1",
 "bewikibooks": "php-1.30.0-wmf.2",
 "bewikimedia": "php-1.30.0-wmf.2",
 "bewikiquote": "php-1.30.0-wmf.2",
 "bewikisource": "php-1.30.0-wmf.2",
 "bewiktionary": "php-1.30.0-wmf.2",
-"bgwiki": "php-1.30.0-wmf.2",
+"bgwiki": "php-1.30.0-wmf.1",
 "bgwikibooks": "php-1.30.0-wmf.2",
 "bgwikinews": 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Revert "Revert "all wikis to 1.30.0-wmf.2"""

2017-05-25 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355727 )

Change subject: Revert "Revert "Revert "all wikis to 1.30.0-wmf.2"""
..

Revert "Revert "Revert "all wikis to 1.30.0-wmf.2"""

This reverts commit b4edc1cf7e4cb768d3c3aa4dba3f6126c6ffe05b.

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


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

diff --git a/wikiversions.json b/wikiversions.json
index 73096d0..c1d0cc0 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,40 +1,40 @@
 {
-"aawiki": "php-1.30.0-wmf.2",
+"aawiki": "php-1.30.0-wmf.1",
 "aawikibooks": "php-1.30.0-wmf.2",
 "aawiktionary": "php-1.30.0-wmf.2",
-"abwiki": "php-1.30.0-wmf.2",
+"abwiki": "php-1.30.0-wmf.1",
 "abwiktionary": "php-1.30.0-wmf.2",
-"acewiki": "php-1.30.0-wmf.2",
+"acewiki": "php-1.30.0-wmf.1",
 "advisorywiki": "php-1.30.0-wmf.2",
-"adywiki": "php-1.30.0-wmf.2",
-"afwiki": "php-1.30.0-wmf.2",
+"adywiki": "php-1.30.0-wmf.1",
+"afwiki": "php-1.30.0-wmf.1",
 "afwikibooks": "php-1.30.0-wmf.2",
 "afwikiquote": "php-1.30.0-wmf.2",
 "afwiktionary": "php-1.30.0-wmf.2",
-"akwiki": "php-1.30.0-wmf.2",
+"akwiki": "php-1.30.0-wmf.1",
 "akwikibooks": "php-1.30.0-wmf.2",
 "akwiktionary": "php-1.30.0-wmf.2",
-"alswiki": "php-1.30.0-wmf.2",
+"alswiki": "php-1.30.0-wmf.1",
 "alswikibooks": "php-1.30.0-wmf.2",
 "alswikiquote": "php-1.30.0-wmf.2",
 "alswiktionary": "php-1.30.0-wmf.2",
-"amwiki": "php-1.30.0-wmf.2",
+"amwiki": "php-1.30.0-wmf.1",
 "amwikiquote": "php-1.30.0-wmf.2",
 "amwiktionary": "php-1.30.0-wmf.2",
-"angwiki": "php-1.30.0-wmf.2",
+"angwiki": "php-1.30.0-wmf.1",
 "angwikibooks": "php-1.30.0-wmf.2",
 "angwikiquote": "php-1.30.0-wmf.2",
 "angwikisource": "php-1.30.0-wmf.2",
 "angwiktionary": "php-1.30.0-wmf.2",
-"anwiki": "php-1.30.0-wmf.2",
+"anwiki": "php-1.30.0-wmf.1",
 "anwiktionary": "php-1.30.0-wmf.2",
-"arbcom_cswiki": "php-1.30.0-wmf.2",
-"arbcom_dewiki": "php-1.30.0-wmf.2",
-"arbcom_enwiki": "php-1.30.0-wmf.2",
-"arbcom_fiwiki": "php-1.30.0-wmf.2",
-"arbcom_nlwiki": "php-1.30.0-wmf.2",
-"arcwiki": "php-1.30.0-wmf.2",
-"arwiki": "php-1.30.0-wmf.2",
+"arbcom_cswiki": "php-1.30.0-wmf.1",
+"arbcom_dewiki": "php-1.30.0-wmf.1",
+"arbcom_enwiki": "php-1.30.0-wmf.1",
+"arbcom_fiwiki": "php-1.30.0-wmf.1",
+"arbcom_nlwiki": "php-1.30.0-wmf.1",
+"arcwiki": "php-1.30.0-wmf.1",
+"arwiki": "php-1.30.0-wmf.1",
 "arwikibooks": "php-1.30.0-wmf.2",
 "arwikimedia": "php-1.30.0-wmf.2",
 "arwikinews": "php-1.30.0-wmf.2",
@@ -42,80 +42,80 @@
 "arwikisource": "php-1.30.0-wmf.2",
 "arwikiversity": "php-1.30.0-wmf.2",
 "arwiktionary": "php-1.30.0-wmf.2",
-"arzwiki": "php-1.30.0-wmf.2",
-"astwiki": "php-1.30.0-wmf.2",
+"arzwiki": "php-1.30.0-wmf.1",
+"astwiki": "php-1.30.0-wmf.1",
 "astwikibooks": "php-1.30.0-wmf.2",
 "astwikiquote": "php-1.30.0-wmf.2",
 "astwiktionary": "php-1.30.0-wmf.2",
-"aswiki": "php-1.30.0-wmf.2",
+"aswiki": "php-1.30.0-wmf.1",
 "aswikibooks": "php-1.30.0-wmf.2",
 "aswikisource": "php-1.30.0-wmf.2",
 "aswiktionary": "php-1.30.0-wmf.2",
 "auditcomwiki": "php-1.30.0-wmf.2",
-"avwiki": "php-1.30.0-wmf.2",
+"avwiki": "php-1.30.0-wmf.1",
 "avwiktionary": "php-1.30.0-wmf.2",
-"aywiki": "php-1.30.0-wmf.2",
+"aywiki": "php-1.30.0-wmf.1",
 "aywikibooks": "php-1.30.0-wmf.2",
 "aywiktionary": "php-1.30.0-wmf.2",
-"azbwiki": "php-1.30.0-wmf.2",
-"azwiki": "php-1.30.0-wmf.2",
+"azbwiki": "php-1.30.0-wmf.1",
+"azwiki": "php-1.30.0-wmf.1",
 "azwikibooks": "php-1.30.0-wmf.2",
 "azwikiquote": "php-1.30.0-wmf.2",
 "azwikisource": "php-1.30.0-wmf.2",
 "azwiktionary": "php-1.30.0-wmf.2",
-"barwiki": "php-1.30.0-wmf.2",
-"bat_smgwiki": "php-1.30.0-wmf.2",
-"bawiki": "php-1.30.0-wmf.2",
+"barwiki": "php-1.30.0-wmf.1",
+"bat_smgwiki": "php-1.30.0-wmf.1",
+"bawiki": "php-1.30.0-wmf.1",
 "bawikibooks": "php-1.30.0-wmf.2",
-"bclwiki": "php-1.30.0-wmf.2",
+"bclwiki": "php-1.30.0-wmf.1",
 "bdwikimedia": "php-1.30.0-wmf.2",
-"be_x_oldwiki": "php-1.30.0-wmf.2",
+"be_x_oldwiki": "php-1.30.0-wmf.1",
 "betawikiversity": "php-1.30.0-wmf.2",
-"bewiki": "php-1.30.0-wmf.2",
+"bewiki": "php-1.30.0-wmf.1",
 "bewikibooks": "php-1.30.0-wmf.2",
 "bewikimedia": "php-1.30.0-wmf.2",
 "bewikiquote": "php-1.30.0-wmf.2",
 "bewikisource": "php-1.30.0-wmf.2",
 "bewiktionary": "php-1.30.0-wmf.2",
-"bgwiki": "php-1.30.0-wmf.2",
+"bgwiki": "php-1.30.0-wmf.1",
 "bgwikibooks": "php-1.30.0-wmf.2",
 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T161151: Use already resolved href when available

2017-05-25 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355726 )

Change subject: T161151: Use already resolved href when available
..

T161151: Use already resolved href when available

 * Avoids trying to resolve titles potentially containing template
   syntax.

Change-Id: I5a62052fb5ec800f169de687beb8ab3edc3af67e
---
M lib/wt2html/pp/handlers/linter.js
1 file changed, 5 insertions(+), 4 deletions(-)


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

diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 749538c..102ff54 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -92,10 +92,11 @@
var dmw = DU.getDataMw(tplInfo.first);
if (dmw.parts && dmw.parts.length === 1) {
var p0 = dmw.parts[0];
-   var name = (p0.template || p0.templatearg).target.wt.trim();
-   // Fully resolve template paths where required
-   if (/^\.*\//.test(name)) {
-   name = env.resolveTitle(Util.decodeURI(name));
+   var name;
+   if (p0.template && p0.template.target.href) {  // Could be 
"function"
+   name = p0.template.target.href.replace(/^\.\//, '');
+   } else {
+   name = (p0.template || p0.templatearg).target.wt.trim();
}
return { name: name };
} else {

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Update GUI

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

Change subject: Update GUI
..


Update GUI

Change-Id: I73720bfddeccdcb8f4cf9ee08d873823cf6bddb0
---
M gui
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/gui b/gui
index cffe5b3..03163e7 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit cffe5b3ea5f726b5e88dbbeb9aa6ccdd306e5285
+Subproject commit 03163e7532aef5894add94b4358764e5f95e79ce

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I73720bfddeccdcb8f4cf9ee08d873823cf6bddb0
Gerrit-PatchSet: 1
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] wikidata...gui-deploy[production]: Merging from 03163e7532aef5894add94b4358764e5f95e79ce:

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

Change subject: Merging from 03163e7532aef5894add94b4358764e5f95e79ce:
..


Merging from 03163e7532aef5894add94b4358764e5f95e79ce:

Sanitize query template definition input

Change-Id: Iacfeea92840ff4c82677ccd0988bdb34312ac7a0
---
M embed.html
M index.html
D js/embed.wdqs.min.84434972d24d5966b235.js
A js/embed.wdqs.min.9d034d6ab0e1d48d94d1.js
A js/wdqs.min.200ff03b26080e329692.js
D js/wdqs.min.f8aee51a695ba146023e.js
6 files changed, 9 insertions(+), 9 deletions(-)

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




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

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

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Update GUI

2017-05-25 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355725 )

Change subject: Update GUI
..

Update GUI

Change-Id: I73720bfddeccdcb8f4cf9ee08d873823cf6bddb0
---
M gui
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/25/355725/1

diff --git a/gui b/gui
index cffe5b3..03163e7 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit cffe5b3ea5f726b5e88dbbeb9aa6ccdd306e5285
+Subproject commit 03163e7532aef5894add94b4358764e5f95e79ce

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73720bfddeccdcb8f4cf9ee08d873823cf6bddb0
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


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

2017-05-25 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355724 )

Change subject: Merging from 03163e7532aef5894add94b4358764e5f95e79ce:
..

Merging from 03163e7532aef5894add94b4358764e5f95e79ce:

Sanitize query template definition input

Change-Id: Iacfeea92840ff4c82677ccd0988bdb34312ac7a0
---
M embed.html
M index.html
D js/embed.wdqs.min.84434972d24d5966b235.js
A js/embed.wdqs.min.9d034d6ab0e1d48d94d1.js
A js/wdqs.min.200ff03b26080e329692.js
D js/wdqs.min.f8aee51a695ba146023e.js
6 files changed, 9 insertions(+), 9 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Revert "all wikis to 1.30.0-wmf.2""

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

Change subject: Revert "Revert "all wikis to 1.30.0-wmf.2""
..


Revert "Revert "all wikis to 1.30.0-wmf.2""

This reverts commit b253af0c65d72798b78598b6aaa472d6aeaacd25.

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

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



diff --git a/wikiversions.json b/wikiversions.json
index c1d0cc0..73096d0 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,40 +1,40 @@
 {
-"aawiki": "php-1.30.0-wmf.1",
+"aawiki": "php-1.30.0-wmf.2",
 "aawikibooks": "php-1.30.0-wmf.2",
 "aawiktionary": "php-1.30.0-wmf.2",
-"abwiki": "php-1.30.0-wmf.1",
+"abwiki": "php-1.30.0-wmf.2",
 "abwiktionary": "php-1.30.0-wmf.2",
-"acewiki": "php-1.30.0-wmf.1",
+"acewiki": "php-1.30.0-wmf.2",
 "advisorywiki": "php-1.30.0-wmf.2",
-"adywiki": "php-1.30.0-wmf.1",
-"afwiki": "php-1.30.0-wmf.1",
+"adywiki": "php-1.30.0-wmf.2",
+"afwiki": "php-1.30.0-wmf.2",
 "afwikibooks": "php-1.30.0-wmf.2",
 "afwikiquote": "php-1.30.0-wmf.2",
 "afwiktionary": "php-1.30.0-wmf.2",
-"akwiki": "php-1.30.0-wmf.1",
+"akwiki": "php-1.30.0-wmf.2",
 "akwikibooks": "php-1.30.0-wmf.2",
 "akwiktionary": "php-1.30.0-wmf.2",
-"alswiki": "php-1.30.0-wmf.1",
+"alswiki": "php-1.30.0-wmf.2",
 "alswikibooks": "php-1.30.0-wmf.2",
 "alswikiquote": "php-1.30.0-wmf.2",
 "alswiktionary": "php-1.30.0-wmf.2",
-"amwiki": "php-1.30.0-wmf.1",
+"amwiki": "php-1.30.0-wmf.2",
 "amwikiquote": "php-1.30.0-wmf.2",
 "amwiktionary": "php-1.30.0-wmf.2",
-"angwiki": "php-1.30.0-wmf.1",
+"angwiki": "php-1.30.0-wmf.2",
 "angwikibooks": "php-1.30.0-wmf.2",
 "angwikiquote": "php-1.30.0-wmf.2",
 "angwikisource": "php-1.30.0-wmf.2",
 "angwiktionary": "php-1.30.0-wmf.2",
-"anwiki": "php-1.30.0-wmf.1",
+"anwiki": "php-1.30.0-wmf.2",
 "anwiktionary": "php-1.30.0-wmf.2",
-"arbcom_cswiki": "php-1.30.0-wmf.1",
-"arbcom_dewiki": "php-1.30.0-wmf.1",
-"arbcom_enwiki": "php-1.30.0-wmf.1",
-"arbcom_fiwiki": "php-1.30.0-wmf.1",
-"arbcom_nlwiki": "php-1.30.0-wmf.1",
-"arcwiki": "php-1.30.0-wmf.1",
-"arwiki": "php-1.30.0-wmf.1",
+"arbcom_cswiki": "php-1.30.0-wmf.2",
+"arbcom_dewiki": "php-1.30.0-wmf.2",
+"arbcom_enwiki": "php-1.30.0-wmf.2",
+"arbcom_fiwiki": "php-1.30.0-wmf.2",
+"arbcom_nlwiki": "php-1.30.0-wmf.2",
+"arcwiki": "php-1.30.0-wmf.2",
+"arwiki": "php-1.30.0-wmf.2",
 "arwikibooks": "php-1.30.0-wmf.2",
 "arwikimedia": "php-1.30.0-wmf.2",
 "arwikinews": "php-1.30.0-wmf.2",
@@ -42,80 +42,80 @@
 "arwikisource": "php-1.30.0-wmf.2",
 "arwikiversity": "php-1.30.0-wmf.2",
 "arwiktionary": "php-1.30.0-wmf.2",
-"arzwiki": "php-1.30.0-wmf.1",
-"astwiki": "php-1.30.0-wmf.1",
+"arzwiki": "php-1.30.0-wmf.2",
+"astwiki": "php-1.30.0-wmf.2",
 "astwikibooks": "php-1.30.0-wmf.2",
 "astwikiquote": "php-1.30.0-wmf.2",
 "astwiktionary": "php-1.30.0-wmf.2",
-"aswiki": "php-1.30.0-wmf.1",
+"aswiki": "php-1.30.0-wmf.2",
 "aswikibooks": "php-1.30.0-wmf.2",
 "aswikisource": "php-1.30.0-wmf.2",
 "aswiktionary": "php-1.30.0-wmf.2",
 "auditcomwiki": "php-1.30.0-wmf.2",
-"avwiki": "php-1.30.0-wmf.1",
+"avwiki": "php-1.30.0-wmf.2",
 "avwiktionary": "php-1.30.0-wmf.2",
-"aywiki": "php-1.30.0-wmf.1",
+"aywiki": "php-1.30.0-wmf.2",
 "aywikibooks": "php-1.30.0-wmf.2",
 "aywiktionary": "php-1.30.0-wmf.2",
-"azbwiki": "php-1.30.0-wmf.1",
-"azwiki": "php-1.30.0-wmf.1",
+"azbwiki": "php-1.30.0-wmf.2",
+"azwiki": "php-1.30.0-wmf.2",
 "azwikibooks": "php-1.30.0-wmf.2",
 "azwikiquote": "php-1.30.0-wmf.2",
 "azwikisource": "php-1.30.0-wmf.2",
 "azwiktionary": "php-1.30.0-wmf.2",
-"barwiki": "php-1.30.0-wmf.1",
-"bat_smgwiki": "php-1.30.0-wmf.1",
-"bawiki": "php-1.30.0-wmf.1",
+"barwiki": "php-1.30.0-wmf.2",
+"bat_smgwiki": "php-1.30.0-wmf.2",
+"bawiki": "php-1.30.0-wmf.2",
 "bawikibooks": "php-1.30.0-wmf.2",
-"bclwiki": "php-1.30.0-wmf.1",
+"bclwiki": "php-1.30.0-wmf.2",
 "bdwikimedia": "php-1.30.0-wmf.2",
-"be_x_oldwiki": "php-1.30.0-wmf.1",
+"be_x_oldwiki": "php-1.30.0-wmf.2",
 "betawikiversity": "php-1.30.0-wmf.2",
-"bewiki": "php-1.30.0-wmf.1",
+"bewiki": "php-1.30.0-wmf.2",
 "bewikibooks": "php-1.30.0-wmf.2",
 "bewikimedia": "php-1.30.0-wmf.2",
 "bewikiquote": "php-1.30.0-wmf.2",
 "bewikisource": "php-1.30.0-wmf.2",
 "bewiktionary": "php-1.30.0-wmf.2",
-"bgwiki": "php-1.30.0-wmf.1",
+"bgwiki": "php-1.30.0-wmf.2",
 "bgwikibooks": "php-1.30.0-wmf.2",
 "bgwikinews": "php-1.30.0-wmf.2",

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Revert "all wikis to 1.30.0-wmf.2""

2017-05-25 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355723 )

Change subject: Revert "Revert "all wikis to 1.30.0-wmf.2""
..

Revert "Revert "all wikis to 1.30.0-wmf.2""

This reverts commit b253af0c65d72798b78598b6aaa472d6aeaacd25.

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


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

diff --git a/wikiversions.json b/wikiversions.json
index c1d0cc0..73096d0 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,40 +1,40 @@
 {
-"aawiki": "php-1.30.0-wmf.1",
+"aawiki": "php-1.30.0-wmf.2",
 "aawikibooks": "php-1.30.0-wmf.2",
 "aawiktionary": "php-1.30.0-wmf.2",
-"abwiki": "php-1.30.0-wmf.1",
+"abwiki": "php-1.30.0-wmf.2",
 "abwiktionary": "php-1.30.0-wmf.2",
-"acewiki": "php-1.30.0-wmf.1",
+"acewiki": "php-1.30.0-wmf.2",
 "advisorywiki": "php-1.30.0-wmf.2",
-"adywiki": "php-1.30.0-wmf.1",
-"afwiki": "php-1.30.0-wmf.1",
+"adywiki": "php-1.30.0-wmf.2",
+"afwiki": "php-1.30.0-wmf.2",
 "afwikibooks": "php-1.30.0-wmf.2",
 "afwikiquote": "php-1.30.0-wmf.2",
 "afwiktionary": "php-1.30.0-wmf.2",
-"akwiki": "php-1.30.0-wmf.1",
+"akwiki": "php-1.30.0-wmf.2",
 "akwikibooks": "php-1.30.0-wmf.2",
 "akwiktionary": "php-1.30.0-wmf.2",
-"alswiki": "php-1.30.0-wmf.1",
+"alswiki": "php-1.30.0-wmf.2",
 "alswikibooks": "php-1.30.0-wmf.2",
 "alswikiquote": "php-1.30.0-wmf.2",
 "alswiktionary": "php-1.30.0-wmf.2",
-"amwiki": "php-1.30.0-wmf.1",
+"amwiki": "php-1.30.0-wmf.2",
 "amwikiquote": "php-1.30.0-wmf.2",
 "amwiktionary": "php-1.30.0-wmf.2",
-"angwiki": "php-1.30.0-wmf.1",
+"angwiki": "php-1.30.0-wmf.2",
 "angwikibooks": "php-1.30.0-wmf.2",
 "angwikiquote": "php-1.30.0-wmf.2",
 "angwikisource": "php-1.30.0-wmf.2",
 "angwiktionary": "php-1.30.0-wmf.2",
-"anwiki": "php-1.30.0-wmf.1",
+"anwiki": "php-1.30.0-wmf.2",
 "anwiktionary": "php-1.30.0-wmf.2",
-"arbcom_cswiki": "php-1.30.0-wmf.1",
-"arbcom_dewiki": "php-1.30.0-wmf.1",
-"arbcom_enwiki": "php-1.30.0-wmf.1",
-"arbcom_fiwiki": "php-1.30.0-wmf.1",
-"arbcom_nlwiki": "php-1.30.0-wmf.1",
-"arcwiki": "php-1.30.0-wmf.1",
-"arwiki": "php-1.30.0-wmf.1",
+"arbcom_cswiki": "php-1.30.0-wmf.2",
+"arbcom_dewiki": "php-1.30.0-wmf.2",
+"arbcom_enwiki": "php-1.30.0-wmf.2",
+"arbcom_fiwiki": "php-1.30.0-wmf.2",
+"arbcom_nlwiki": "php-1.30.0-wmf.2",
+"arcwiki": "php-1.30.0-wmf.2",
+"arwiki": "php-1.30.0-wmf.2",
 "arwikibooks": "php-1.30.0-wmf.2",
 "arwikimedia": "php-1.30.0-wmf.2",
 "arwikinews": "php-1.30.0-wmf.2",
@@ -42,80 +42,80 @@
 "arwikisource": "php-1.30.0-wmf.2",
 "arwikiversity": "php-1.30.0-wmf.2",
 "arwiktionary": "php-1.30.0-wmf.2",
-"arzwiki": "php-1.30.0-wmf.1",
-"astwiki": "php-1.30.0-wmf.1",
+"arzwiki": "php-1.30.0-wmf.2",
+"astwiki": "php-1.30.0-wmf.2",
 "astwikibooks": "php-1.30.0-wmf.2",
 "astwikiquote": "php-1.30.0-wmf.2",
 "astwiktionary": "php-1.30.0-wmf.2",
-"aswiki": "php-1.30.0-wmf.1",
+"aswiki": "php-1.30.0-wmf.2",
 "aswikibooks": "php-1.30.0-wmf.2",
 "aswikisource": "php-1.30.0-wmf.2",
 "aswiktionary": "php-1.30.0-wmf.2",
 "auditcomwiki": "php-1.30.0-wmf.2",
-"avwiki": "php-1.30.0-wmf.1",
+"avwiki": "php-1.30.0-wmf.2",
 "avwiktionary": "php-1.30.0-wmf.2",
-"aywiki": "php-1.30.0-wmf.1",
+"aywiki": "php-1.30.0-wmf.2",
 "aywikibooks": "php-1.30.0-wmf.2",
 "aywiktionary": "php-1.30.0-wmf.2",
-"azbwiki": "php-1.30.0-wmf.1",
-"azwiki": "php-1.30.0-wmf.1",
+"azbwiki": "php-1.30.0-wmf.2",
+"azwiki": "php-1.30.0-wmf.2",
 "azwikibooks": "php-1.30.0-wmf.2",
 "azwikiquote": "php-1.30.0-wmf.2",
 "azwikisource": "php-1.30.0-wmf.2",
 "azwiktionary": "php-1.30.0-wmf.2",
-"barwiki": "php-1.30.0-wmf.1",
-"bat_smgwiki": "php-1.30.0-wmf.1",
-"bawiki": "php-1.30.0-wmf.1",
+"barwiki": "php-1.30.0-wmf.2",
+"bat_smgwiki": "php-1.30.0-wmf.2",
+"bawiki": "php-1.30.0-wmf.2",
 "bawikibooks": "php-1.30.0-wmf.2",
-"bclwiki": "php-1.30.0-wmf.1",
+"bclwiki": "php-1.30.0-wmf.2",
 "bdwikimedia": "php-1.30.0-wmf.2",
-"be_x_oldwiki": "php-1.30.0-wmf.1",
+"be_x_oldwiki": "php-1.30.0-wmf.2",
 "betawikiversity": "php-1.30.0-wmf.2",
-"bewiki": "php-1.30.0-wmf.1",
+"bewiki": "php-1.30.0-wmf.2",
 "bewikibooks": "php-1.30.0-wmf.2",
 "bewikimedia": "php-1.30.0-wmf.2",
 "bewikiquote": "php-1.30.0-wmf.2",
 "bewikisource": "php-1.30.0-wmf.2",
 "bewiktionary": "php-1.30.0-wmf.2",
-"bgwiki": "php-1.30.0-wmf.1",
+"bgwiki": "php-1.30.0-wmf.2",
 "bgwikibooks": "php-1.30.0-wmf.2",
 "bgwikinews": 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Revert "Add Code of Conduct footer links to wikitech...

2017-05-25 Thread BryanDavis (Code Review)
Hello Thcipriani, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "Revert "Add Code of Conduct footer links to wikitech 
and mw.o""
..

Revert "Revert "Add Code of Conduct footer links to wikitech and mw.o""

This was not the cause of the HHVM errors, and then wikis that are affected are 
in groups 0 and 1 so it can deploy at any time.

This reverts commit 868096efe229913211d7e13bbef4a90103a8e9e4.

Change-Id: I58460c1b2c9eb0e021724981f42ef6fb5824fc97
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 16 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 79ca61d..50af02a 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1170,6 +1170,15 @@
return true;
};
 }
+if ( $wmgUseFooterCodeOfConductLink ) {
+   $wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) 
{
+   $contactLink = Html::element( 'a', [ 'href' => $sk->msg( 
'wm-codeofconduct-url' )->escaped() ],
+   $sk->msg( 'wm-codeofconduct' )->text() );
+   $tpl->set( 'wm-codeofconduct', $contactLink );
+   $tpl->data['footerlinks']['places'][] = 'wm-codeofconduct';
+   return true;
+   };
+}
 
 // T35186: turn off incomplete feature action=imagerotate
 $wgAPIModules['imagerotate'] = 'ApiDisabled';
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5c79619..4711cb8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12863,6 +12863,13 @@
'ukwiki' => true, // T104924
 ],
 
+'wmgUseFooterCodeOfConductLink' => [
+   'default' => false,
+   'mediawikiwiki' => true,
+   'labswiki' => true,
+   'labstestwiki' => true,
+],
+
 'wgMaxMsgCacheEntrySize' => [
'default' => 1024,
 ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58460c1b2c9eb0e021724981f42ef6fb5824fc97
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Thcipriani 
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[wmf/1.30.0-wmf.2]: jquery.makeCollapsible: Restore considering empty as par...

2017-05-25 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355721 )

Change subject: jquery.makeCollapsible: Restore considering empty  as part 
of toggle
..

jquery.makeCollapsible: Restore considering empty  as part of toggle

Before 2d95d36a8e, clicks on links inside toggles with non-empty
targets that are not '#', were ignored ("pass through") since they
are not intended for the toggle.

In 2d95d36a8e, this was simplified to ignoring clicks from all 
elements inside toggles. However this ignored too much as links
without 'href' attribute are also sometimes used inside toggles
to look like links and have no href-target, which means clicking
them does nothing and is in fact meant to toggle the element.

Restore previous behaviour and restore previous test + add a new
test for this specific case.

Bug: T166298
Change-Id: Ia3a0648f809f94be0977a83b469fbd184aa72aff
(cherry picked from commit 15b88fc2807c21c4fbefbb75ba2433d3d150b34a)
---
M resources/src/jquery/jquery.makeCollapsible.js
M tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
2 files changed, 19 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/355721/1

diff --git a/resources/src/jquery/jquery.makeCollapsible.js 
b/resources/src/jquery/jquery.makeCollapsible.js
index 9d3df8c..ac4a392 100644
--- a/resources/src/jquery/jquery.makeCollapsible.js
+++ b/resources/src/jquery/jquery.makeCollapsible.js
@@ -152,7 +152,8 @@
if ( e ) {
if (
e.type === 'click' &&
-   e.target.nodeName.toLowerCase() === 'a'
+   e.target.nodeName.toLowerCase() === 'a' &&
+   $( e.target ).attr( 'href' )
) {
// Don't fire if a link was clicked (for 
premade togglers)
return;
diff --git a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js 
b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
index 44a2305..53d29cf 100644
--- a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
@@ -266,7 +266,7 @@
var $collapsible = prepareCollapsible(
'' +
'' +
-   'Toggle toggle 
toggle toggle' +
+   'Toggle toggle toggle toggle' +
'' +
'' 
+ loremIpsum + '' +
'',
@@ -282,6 +282,22 @@
assert.assertTrue( $content.is( ':hidden' ), 'click event on 
non-link inside toggle toggles content' );
} );
 
+   QUnit.test( 'click on non-link inside toggler counts as trigger', 
function ( assert ) {
+   var $collapsible = prepareCollapsible(
+   '' +
+   '' +
+   'Toggle toggle toggle 
toggle' +
+   '' +
+   '' 
+ loremIpsum + '' +
+   '',
+   { instantHide: true }
+   ),
+   $content = $collapsible.find( '.mw-collapsible-content' 
);
+
+   $collapsible.find( '.mw-collapsible-toggle a' ).trigger( 
'click' );
+   assert.assertTrue( $content.is( ':hidden' ), 'click event on 
link (with no href) inside toggle toggles content' );
+   } );
+
QUnit.test( 'collapse/expand text (data-collapsetext, 
data-expandtext)', function ( assert ) {
var $collapsible = prepareCollapsible(
'' +

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3a0648f809f94be0977a83b469fbd184aa72aff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.2
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Krinkle 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wikistats: ensure Apache PHP module is installed before site

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

Change subject: wikistats: ensure Apache PHP module is installed before site
..


wikistats: ensure Apache PHP module is installed before site

With the current setup puppet runs and libapache2-mod-php-* gets
installed but the PHP site won't work until a manual
'dpkg-reconfigure libapache2-mod-php7.0'.

This is because it gets installed before the rest of the Apache
packages get pulled in. Add missing Require to fix that, also
move things around a bit and make more obvious how
the PHP version influences package names.

Change-Id: Idb4205bee82051a36c3b22588a2fce98c975e89f
---
M modules/wikistats/manifests/web.pp
1 file changed, 15 insertions(+), 10 deletions(-)

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



diff --git a/modules/wikistats/manifests/web.pp 
b/modules/wikistats/manifests/web.pp
index 9c761fa..cd69b08 100644
--- a/modules/wikistats/manifests/web.pp
+++ b/modules/wikistats/manifests/web.pp
@@ -3,22 +3,27 @@
 $wikistats_host,
 ) {
 
-# Apache site from template
-apache::site { $wikistats_host:
-content => template('wikistats/apache/wikistats.erb'),
+if os_version('debian >= stretch') {
+$php_version = '7.0'
+} else {
+$php_version = '5'
 }
 
-# document root
+$apache_php_package = "libapache2-mod-php${php_version}"
+
+require_package($apache_php_package)
+
+include ::apache::mod::rewrite
+
+apache::site { $wikistats_host:
+content => template('wikistats/apache/wikistats.erb'),
+require => Package[$apache_php_package],
+}
+
 file { '/var/www/wikistats':
 ensure => directory,
 mode   => '0755',
 owner  => 'wikistatsuser',
 group  => 'www-data',
-}
-
-include ::apache::mod::rewrite
-
-if os_version('debian >= stretch') {
-require_package('libapache2-mod-php7.0')
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: jquery.makeCollapsible: Restore considering empty as par...

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

Change subject: jquery.makeCollapsible: Restore considering empty  as part 
of toggle
..


jquery.makeCollapsible: Restore considering empty  as part of toggle

Before 2d95d36a8e, clicks on links inside toggles with non-empty
targets that are not '#', were ignored ("pass through") since they
are not intended for the toggle.

In 2d95d36a8e, this was simplified to ignoring clicks from all 
elements inside toggles. However this ignored too much as links
without 'href' attribute are also sometimes used inside toggles
to look like links and have no href-target, which means clicking
them does nothing and is in fact meant to toggle the element.

Restore previous behaviour and restore previous test + add a new
test for this specific case.

Bug: T166298
Change-Id: Ia3a0648f809f94be0977a83b469fbd184aa72aff
---
M resources/src/jquery/jquery.makeCollapsible.js
M tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
2 files changed, 19 insertions(+), 2 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/src/jquery/jquery.makeCollapsible.js 
b/resources/src/jquery/jquery.makeCollapsible.js
index 9d3df8c..ac4a392 100644
--- a/resources/src/jquery/jquery.makeCollapsible.js
+++ b/resources/src/jquery/jquery.makeCollapsible.js
@@ -152,7 +152,8 @@
if ( e ) {
if (
e.type === 'click' &&
-   e.target.nodeName.toLowerCase() === 'a'
+   e.target.nodeName.toLowerCase() === 'a' &&
+   $( e.target ).attr( 'href' )
) {
// Don't fire if a link was clicked (for 
premade togglers)
return;
diff --git a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js 
b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
index 44a2305..53d29cf 100644
--- a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
@@ -266,7 +266,7 @@
var $collapsible = prepareCollapsible(
'' +
'' +
-   'Toggle toggle 
toggle toggle' +
+   'Toggle toggle toggle toggle' +
'' +
'' 
+ loremIpsum + '' +
'',
@@ -282,6 +282,22 @@
assert.assertTrue( $content.is( ':hidden' ), 'click event on 
non-link inside toggle toggles content' );
} );
 
+   QUnit.test( 'click on non-link inside toggler counts as trigger', 
function ( assert ) {
+   var $collapsible = prepareCollapsible(
+   '' +
+   '' +
+   'Toggle toggle toggle 
toggle' +
+   '' +
+   '' 
+ loremIpsum + '' +
+   '',
+   { instantHide: true }
+   ),
+   $content = $collapsible.find( '.mw-collapsible-content' 
);
+
+   $collapsible.find( '.mw-collapsible-toggle a' ).trigger( 
'click' );
+   assert.assertTrue( $content.is( ':hidden' ), 'click event on 
link (with no href) inside toggle toggles content' );
+   } );
+
QUnit.test( 'collapse/expand text (data-collapsetext, 
data-expandtext)', function ( assert ) {
var $collapsible = prepareCollapsible(
'' +

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3a0648f809f94be0977a83b469fbd184aa72aff
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Mollgear 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: Register wgMinervaApplyKnownTemplateHacks via a Min...

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

Change subject: Hygiene: Register wgMinervaApplyKnownTemplateHacks via a 
Minerva hook
..


Hygiene: Register wgMinervaApplyKnownTemplateHacks via a Minerva hook

Any globals prefixed with wgMinerva should be defined inside the Minerva
hooks as they configure the Minerva skin part of MobileFrontend.

Change-Id: I6c451125532752c6d3865bce608145bd30821524
---
M extension.json
M includes/Minerva.hooks.php
M includes/MobileFrontend.hooks.php
3 files changed, 19 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 15b455d..329af48 100644
--- a/extension.json
+++ b/extension.json
@@ -1720,6 +1720,7 @@
"MobileFrontendHooks::onLoginFormValidErrorMessages"
],
"ResourceLoaderGetLessVars": [
+   "MinervaHooks::onResourceLoaderGetLessVars",
"MobileFrontendHooks::onResourceLoaderGetLessVars"
],
"ThumbnailBeforeProduceHTML": [
diff --git a/includes/Minerva.hooks.php b/includes/Minerva.hooks.php
index 4ba1a96..5e0956b 100644
--- a/includes/Minerva.hooks.php
+++ b/includes/Minerva.hooks.php
@@ -13,6 +13,24 @@
  */
 class MinervaHooks {
/**
+* ResourceLoaderGetLessVars hook handler
+*
+* Add the context-based less variables.
+*
+* @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetLessVars
+* @param array &$lessVars Variables already added
+*/
+   public static function onResourceLoaderGetLessVars( &$lessVars ) {
+   // FIXME: Load from Minerva.Config when MobileFrontend and 
Minerva are separated
+   $config = MobileContext::singleton()->getMFConfig();
+   $lessVars = array_merge( $lessVars,
+   [
+   'wgMinervaApplyKnownTemplateHacks' => 
"{$config->get( 'MinervaApplyKnownTemplateHacks' )}",
+   ]
+   );
+   }
+
+   /**
 * Invocation of hook SpecialPageBeforeExecute
 *
 * We use this hook to ensure that login/account creation pages
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 6e86efa..4073c06 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1053,7 +1053,6 @@
$lessVars = array_merge( $lessVars,
[
'wgMFDeviceWidthMobileSmall' => "{$config->get( 
'MFDeviceWidthMobileSmall' )}px",
-   'wgMinervaApplyKnownTemplateHacks' => 
"{$config->get( 'MinervaApplyKnownTemplateHacks' )}",
'wgMFThumbnailTiny' =>  
MobilePage::TINY_IMAGE_WIDTH . 'px',
'wgMFThumbnailSmall' =>  
MobilePage::SMALL_IMAGE_WIDTH . 'px'
]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c451125532752c6d3865bce608145bd30821524
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Pmiazga 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: POC: Switch from jsduck to jsdoc in MobileFrontend extension

2017-05-25 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355720 )

Change subject: POC: Switch from jsduck to jsdoc in MobileFrontend extension
..

POC: Switch from jsduck to jsdoc in MobileFrontend extension

Problems:
* No support for @inheritdoc
* Methods are being documented as globals rather than part
of the class. As demonstrated in View.js our existing style
would require us to use memberof in all method declarations
** The lack of support for detecting whether memberof declarations
are missing is concerning. It could lead to bad documentation.
Manual steps always create this problem.

Bug: T146917
Change-Id: I5bd64f923bb630323b6254ee1294e23d8f28ed1e
---
D jsduck.json
M package.json
M resources/mobile.search/SearchOverlay.js
M resources/mobile.startup/View.js
M resources/skins.minerva.notifications/init.js
5 files changed, 22 insertions(+), 35 deletions(-)


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

diff --git a/jsduck.json b/jsduck.json
deleted file mode 100644
index aa84a93..000
--- a/jsduck.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-   "--title": "MobileFrontend - Documentation",
-   "--output": "docs",
-   "--processes": "0",
-   "--tags": ".docs/jsduckCustomTags.rb",
-   "--warnings-exit-nonzero": true,
-   "--builtin-classes": true,
-   "--external": [
-   "Hogan.Template",
-   "HandleBars.Template",
-   "jQuery.Deferred",
-   "jQuery.Promise",
-   "jQuery.Event",
-   "jQuery.Object",
-   "jqXHR",
-   "File",
-   "Router",
-   "mw.user",
-   "mw.Api",
-   "mw.ForeignApi",
-   "OO.ui.ToolGroup",
-   "OO.ui.Tool",
-   "OO.ui.mixin.LookupElement",
-   "OO.EventEmitter",
-   "ve.init.mw.MobileArticleTarget",
-   "mw.echo.dm.NotificationItem"
-   ],
-   "--warnings": ["-nodoc(class,public)", "-dup_member", 
"-link_ambiguous"],
-   "--": [
-   "resources"
-   ]
-}
diff --git a/package.json b/package.json
index 7717800..01f2077 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,8 @@
"private": true,
"scripts": {
"test": "grunt test && npm run doc && dev-scripts/svg_check.sh",
-   "doc": "jsduck",
+   "doc": "npm run jsdoc",
+   "jsdoc": "jsdoc -r resources -d docs/",
"lint:modules": "resource-modules ./"
},
"dependencies": {
diff --git a/resources/mobile.search/SearchOverlay.js 
b/resources/mobile.search/SearchOverlay.js
index 0246ed0..8763d41 100644
--- a/resources/mobile.search/SearchOverlay.js
+++ b/resources/mobile.search/SearchOverlay.js
@@ -107,9 +107,9 @@
 
/**
 * Hide self when the route is visited
+* FIXME: Remove when search registers route with overlay 
manager
 * @method
 * @private
-* FIXME: Remove when search registers route with overlay 
manager
 */
_hideOnRoute: function () {
var self = this;
diff --git a/resources/mobile.startup/View.js b/resources/mobile.startup/View.js
index b66927a..a05fb76 100644
--- a/resources/mobile.startup/View.js
+++ b/resources/mobile.startup/View.js
@@ -91,28 +91,33 @@
/**
 * A css class to apply to the containing element of the View.
 * @property {string} className
+* @memberof View
 */
className: undefined,
/**
 * Name of tag that contains the rendered template
 * @property String
+* @memberof View
 */
tagName: 'div',
/**
 * Tells the View to ignore tagName and className when 
constructing the element
 * and to rely solely on the template
 * @property {boolean} isTemplateMode
+* @memberof View
 */
isTemplateMode: false,
 
/**
 * Whether border box box sizing model should be used
 * @property {boolean} isBorderBox
+* @memberof View
 */
isBorderBox: true,
/**
 * @property {Mixed}
 * Specifies the template used in render(). 
Object|string|HoganTemplate
+* @memberof View
 */
template: undefined,
 
@@ -131,6 +136,7 @@
 * }
 *
 * @property {Object}
+* @memberof View
 */
templatePartials: {},
 
@@ 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add missing ampersand to getMultiWithSetCallback() callback

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

Change subject: Add missing ampersand to getMultiWithSetCallback() callback
..


Add missing ampersand to getMultiWithSetCallback() callback

Also fixed a php example block comment

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

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



diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index f0a439a..bc6047f 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -1073,7 +1073,7 @@
 * // Time-to-live (in seconds)
 * $cache::TTL_DAY,
 * // Function that derives the new key value
-* return function ( $id, $oldValue, &$ttl, array &$setOpts ) {
+* function ( $id, $oldValue, &$ttl, array &$setOpts ) {
 * $dbr = wfGetDB( DB_REPLICA );
 * // Account for any snapshot/replica DB lag
 * $setOpts += Database::getCacheSetOptions( $dbr );
@@ -1118,7 +1118,7 @@
 
// Wrap $callback to match the getWithSetCallback() format 
while passing $id to $callback
$id = null;
-   $func = function ( $oldValue, &$ttl, array $setOpts, $oldAsOf ) 
use ( $callback, &$id ) {
+   $func = function ( $oldValue, &$ttl, array &$setOpts, $oldAsOf 
) use ( $callback, &$id ) {
return $callback( $id, $oldValue, $ttl, $setOpts, 
$oldAsOf );
};
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator: Install the lighter version of exim4 on labs only

2017-05-25 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355717 )

Change subject: Phabricator: Install the lighter version of exim4 on labs only
..

Phabricator: Install the lighter version of exim4 on labs only

the heavier one causes a lot of problems.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/355717/1


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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "all wikis to 1.30.0-wmf.2"

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

Change subject: Revert "all wikis to 1.30.0-wmf.2"
..


Revert "all wikis to 1.30.0-wmf.2"

This reverts commit 7e7c5f44f6736d83f067561e25614b35b215a4e4.

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

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



diff --git a/wikiversions.json b/wikiversions.json
index 73096d0..c1d0cc0 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,40 +1,40 @@
 {
-"aawiki": "php-1.30.0-wmf.2",
+"aawiki": "php-1.30.0-wmf.1",
 "aawikibooks": "php-1.30.0-wmf.2",
 "aawiktionary": "php-1.30.0-wmf.2",
-"abwiki": "php-1.30.0-wmf.2",
+"abwiki": "php-1.30.0-wmf.1",
 "abwiktionary": "php-1.30.0-wmf.2",
-"acewiki": "php-1.30.0-wmf.2",
+"acewiki": "php-1.30.0-wmf.1",
 "advisorywiki": "php-1.30.0-wmf.2",
-"adywiki": "php-1.30.0-wmf.2",
-"afwiki": "php-1.30.0-wmf.2",
+"adywiki": "php-1.30.0-wmf.1",
+"afwiki": "php-1.30.0-wmf.1",
 "afwikibooks": "php-1.30.0-wmf.2",
 "afwikiquote": "php-1.30.0-wmf.2",
 "afwiktionary": "php-1.30.0-wmf.2",
-"akwiki": "php-1.30.0-wmf.2",
+"akwiki": "php-1.30.0-wmf.1",
 "akwikibooks": "php-1.30.0-wmf.2",
 "akwiktionary": "php-1.30.0-wmf.2",
-"alswiki": "php-1.30.0-wmf.2",
+"alswiki": "php-1.30.0-wmf.1",
 "alswikibooks": "php-1.30.0-wmf.2",
 "alswikiquote": "php-1.30.0-wmf.2",
 "alswiktionary": "php-1.30.0-wmf.2",
-"amwiki": "php-1.30.0-wmf.2",
+"amwiki": "php-1.30.0-wmf.1",
 "amwikiquote": "php-1.30.0-wmf.2",
 "amwiktionary": "php-1.30.0-wmf.2",
-"angwiki": "php-1.30.0-wmf.2",
+"angwiki": "php-1.30.0-wmf.1",
 "angwikibooks": "php-1.30.0-wmf.2",
 "angwikiquote": "php-1.30.0-wmf.2",
 "angwikisource": "php-1.30.0-wmf.2",
 "angwiktionary": "php-1.30.0-wmf.2",
-"anwiki": "php-1.30.0-wmf.2",
+"anwiki": "php-1.30.0-wmf.1",
 "anwiktionary": "php-1.30.0-wmf.2",
-"arbcom_cswiki": "php-1.30.0-wmf.2",
-"arbcom_dewiki": "php-1.30.0-wmf.2",
-"arbcom_enwiki": "php-1.30.0-wmf.2",
-"arbcom_fiwiki": "php-1.30.0-wmf.2",
-"arbcom_nlwiki": "php-1.30.0-wmf.2",
-"arcwiki": "php-1.30.0-wmf.2",
-"arwiki": "php-1.30.0-wmf.2",
+"arbcom_cswiki": "php-1.30.0-wmf.1",
+"arbcom_dewiki": "php-1.30.0-wmf.1",
+"arbcom_enwiki": "php-1.30.0-wmf.1",
+"arbcom_fiwiki": "php-1.30.0-wmf.1",
+"arbcom_nlwiki": "php-1.30.0-wmf.1",
+"arcwiki": "php-1.30.0-wmf.1",
+"arwiki": "php-1.30.0-wmf.1",
 "arwikibooks": "php-1.30.0-wmf.2",
 "arwikimedia": "php-1.30.0-wmf.2",
 "arwikinews": "php-1.30.0-wmf.2",
@@ -42,80 +42,80 @@
 "arwikisource": "php-1.30.0-wmf.2",
 "arwikiversity": "php-1.30.0-wmf.2",
 "arwiktionary": "php-1.30.0-wmf.2",
-"arzwiki": "php-1.30.0-wmf.2",
-"astwiki": "php-1.30.0-wmf.2",
+"arzwiki": "php-1.30.0-wmf.1",
+"astwiki": "php-1.30.0-wmf.1",
 "astwikibooks": "php-1.30.0-wmf.2",
 "astwikiquote": "php-1.30.0-wmf.2",
 "astwiktionary": "php-1.30.0-wmf.2",
-"aswiki": "php-1.30.0-wmf.2",
+"aswiki": "php-1.30.0-wmf.1",
 "aswikibooks": "php-1.30.0-wmf.2",
 "aswikisource": "php-1.30.0-wmf.2",
 "aswiktionary": "php-1.30.0-wmf.2",
 "auditcomwiki": "php-1.30.0-wmf.2",
-"avwiki": "php-1.30.0-wmf.2",
+"avwiki": "php-1.30.0-wmf.1",
 "avwiktionary": "php-1.30.0-wmf.2",
-"aywiki": "php-1.30.0-wmf.2",
+"aywiki": "php-1.30.0-wmf.1",
 "aywikibooks": "php-1.30.0-wmf.2",
 "aywiktionary": "php-1.30.0-wmf.2",
-"azbwiki": "php-1.30.0-wmf.2",
-"azwiki": "php-1.30.0-wmf.2",
+"azbwiki": "php-1.30.0-wmf.1",
+"azwiki": "php-1.30.0-wmf.1",
 "azwikibooks": "php-1.30.0-wmf.2",
 "azwikiquote": "php-1.30.0-wmf.2",
 "azwikisource": "php-1.30.0-wmf.2",
 "azwiktionary": "php-1.30.0-wmf.2",
-"barwiki": "php-1.30.0-wmf.2",
-"bat_smgwiki": "php-1.30.0-wmf.2",
-"bawiki": "php-1.30.0-wmf.2",
+"barwiki": "php-1.30.0-wmf.1",
+"bat_smgwiki": "php-1.30.0-wmf.1",
+"bawiki": "php-1.30.0-wmf.1",
 "bawikibooks": "php-1.30.0-wmf.2",
-"bclwiki": "php-1.30.0-wmf.2",
+"bclwiki": "php-1.30.0-wmf.1",
 "bdwikimedia": "php-1.30.0-wmf.2",
-"be_x_oldwiki": "php-1.30.0-wmf.2",
+"be_x_oldwiki": "php-1.30.0-wmf.1",
 "betawikiversity": "php-1.30.0-wmf.2",
-"bewiki": "php-1.30.0-wmf.2",
+"bewiki": "php-1.30.0-wmf.1",
 "bewikibooks": "php-1.30.0-wmf.2",
 "bewikimedia": "php-1.30.0-wmf.2",
 "bewikiquote": "php-1.30.0-wmf.2",
 "bewikisource": "php-1.30.0-wmf.2",
 "bewiktionary": "php-1.30.0-wmf.2",
-"bgwiki": "php-1.30.0-wmf.2",
+"bgwiki": "php-1.30.0-wmf.1",
 "bgwikibooks": "php-1.30.0-wmf.2",
 "bgwikinews": "php-1.30.0-wmf.2",
 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Add Code of Conduct footer links to wikitech and mw.o"

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

Change subject: Revert "Add Code of Conduct footer links to wikitech and mw.o"
..


Revert "Add Code of Conduct footer links to wikitech and mw.o"

This reverts commit 1f6e689455fa3727c8d611a092a43762a684c3c1.

Change-Id: I3b11e179a2ccce7ae177474f695803264f1ae495
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 0 insertions(+), 16 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 50af02a..79ca61d 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1170,15 +1170,6 @@
return true;
};
 }
-if ( $wmgUseFooterCodeOfConductLink ) {
-   $wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) 
{
-   $contactLink = Html::element( 'a', [ 'href' => $sk->msg( 
'wm-codeofconduct-url' )->escaped() ],
-   $sk->msg( 'wm-codeofconduct' )->text() );
-   $tpl->set( 'wm-codeofconduct', $contactLink );
-   $tpl->data['footerlinks']['places'][] = 'wm-codeofconduct';
-   return true;
-   };
-}
 
 // T35186: turn off incomplete feature action=imagerotate
 $wgAPIModules['imagerotate'] = 'ApiDisabled';
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4711cb8..5c79619 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12863,13 +12863,6 @@
'ukwiki' => true, // T104924
 ],
 
-'wmgUseFooterCodeOfConductLink' => [
-   'default' => false,
-   'mediawikiwiki' => true,
-   'labswiki' => true,
-   'labstestwiki' => true,
-],
-
 'wgMaxMsgCacheEntrySize' => [
'default' => 1024,
 ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b11e179a2ccce7ae177474f695803264f1ae495
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Thcipriani 
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 "Creating new WMF 1.30.0-wmf.2 branch"

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

Change subject: Revert "Creating new WMF 1.30.0-wmf.2 branch"
..


Revert "Creating new WMF 1.30.0-wmf.2 branch"

Also revert the automatic "Update git submodules" commits since then.

This reverts commit 264fc98588a4851324d3e5f2e39ece01e993127e.

Change-Id: Ica6ad77c46cc8a7f6b5576da2580ea9e07ac8637
---
D .gitmodules
A extensions/.gitignore
D extensions/AbuseFilter
D extensions/AccountAudit
D extensions/ActiveAbstract
D extensions/AntiSpoof
D extensions/ApiFeatureUsage
D extensions/Babel
D extensions/BetaFeatures
D extensions/BounceHandler
D extensions/Calendar
D extensions/Campaigns
D extensions/Capiunto
D extensions/Cards
D extensions/CategoryTree
D extensions/CentralAuth
D extensions/CentralNotice
D extensions/CharInsert
D extensions/CheckUser
D extensions/CirrusSearch
D extensions/Cite
D extensions/CiteThisPage
D extensions/Citoid
D extensions/CleanChanges
D extensions/CodeEditor
D extensions/CodeReview
D extensions/Cognate
D extensions/CollaborationKit
D extensions/Collection
D extensions/CommonsMetadata
D extensions/ConfirmEdit
D extensions/ContactPage
D extensions/ContentTranslation
D extensions/ContributionTracking
D extensions/CreditsSource
D extensions/Dashiki
D extensions/DisableAccount
D extensions/Disambiguator
D extensions/DismissableSiteNotice
D extensions/DonationInterface
D extensions/DoubleWiki
D extensions/DynamicSidebar
D extensions/Echo
D extensions/EducationProgram
D extensions/Elastica
D extensions/ElectronPdfService
D extensions/EventBus
D extensions/EventLogging
D extensions/ExtensionDistributor
D extensions/FeaturedFeeds
D extensions/FlaggedRevs
D extensions/Flow
D extensions/FundraiserLandingPage
D extensions/FundraisingTranslateWorkflow
D extensions/GWToolset
D extensions/Gadgets
D extensions/GeoCrumbs
D extensions/GeoData
D extensions/GettingStarted
D extensions/GlobalBlocking
D extensions/GlobalCssJs
D extensions/GlobalUsage
D extensions/GlobalUserPage
D extensions/GoogleNewsSitemap
D extensions/Graph
D extensions/GuidedTour
D extensions/ImageMap
D extensions/InputBox
D extensions/Insider
D extensions/Interwiki
D extensions/InterwikiSorting
D extensions/Josa
D extensions/JsonConfig
D extensions/Kartographer
D extensions/LabeledSectionTransclusion
D extensions/LandingCheck
D extensions/LdapAuthentication
D extensions/Linter
D extensions/LiquidThreads
D extensions/Listings
D extensions/LocalisationUpdate
D extensions/LoginNotify
D extensions/MapSources
D extensions/MassMessage
D extensions/Math
D extensions/MobileApp
D extensions/MobileFrontend
D extensions/MultimediaViewer
D extensions/MwEmbedSupport
D extensions/NavigationTiming
D extensions/NewUserMessage
D extensions/Nuke
D extensions/OATHAuth
D extensions/OAuth
D extensions/ORES
D extensions/OpenStackManager
D extensions/PageAssessments
D extensions/PageImages
D extensions/PageTriage
D extensions/PageViewInfo
D extensions/PagedTiffHandler
D extensions/ParserFunctions
D extensions/ParserMigration
D extensions/ParsoidBatchAPI
D extensions/PdfHandler
D extensions/Petition
D extensions/Poem
D extensions/PoolCounter
D extensions/Popups
D extensions/ProofreadPage
D extensions/QuickSurveys
D extensions/Quiz
A extensions/README
D extensions/RSS
D extensions/RelatedArticles
D extensions/RelatedSites
D extensions/Renameuser
D extensions/RevisionSlider
D extensions/SandboxLink
D extensions/Score
D extensions/Scribunto
D extensions/SearchExtraNS
D extensions/SecurePoll
D extensions/ShortUrl
D extensions/SiteMatrix
D extensions/SpamBlacklist
D extensions/SubPageList3
D extensions/SubpageSortkey
D extensions/SyntaxHighlight_GeSHi
D extensions/TemplateData
D extensions/TemplateSandbox
D extensions/TextExtracts
D extensions/Thanks
D extensions/TimedMediaHandler
D extensions/TitleBlacklist
D extensions/TocTree
D extensions/TorBlock
D extensions/Translate
D extensions/TranslationNotifications
D extensions/TrustedXFF
D extensions/TwoColConflict
D extensions/UnicodeConverter
D extensions/UniversalLanguageSelector
D extensions/UploadWizard
D extensions/UploadsLink
D extensions/UrlShortener
D extensions/UserMerge
D extensions/VectorBeta
D extensions/VipsScaler
D extensions/VisualEditor
D extensions/WikiEditor
D extensions/WikiLove
D extensions/Wikidata
D extensions/WikidataPageBanner
D extensions/WikimediaEvents
D extensions/WikimediaIncubator
D extensions/WikimediaMaintenance
D extensions/WikimediaMessages
D extensions/XAnalytics
D extensions/ZeroBanner
D extensions/ZeroPortal
D extensions/cldr
D extensions/intersection
D extensions/timeline
D extensions/wikihiero
M includes/DefaultSettings.php
D skins/CologneBlue
D skins/Modern
D skins/MonoBook
D skins/Nostalgia
D skins/Vector
D vendor
172 files changed, 34 insertions(+), 841 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
deleted file mode 

[MediaWiki-commits] [Gerrit] mediawiki...LdapAuthentication[master]: Add SQLite Support to LDAP Authentication extension

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

Change subject: Add SQLite Support to LDAP Authentication extension
..


Add SQLite Support to LDAP Authentication extension

Bug: T108355
Change-Id: Ie142ae60637d85e3829f3f7e189388be23e4c4ca
---
M LdapAuthentication.php
M schema/ldap-mysql.sql
M schema/ldap-postgres.sql
3 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/LdapAuthentication.php b/LdapAuthentication.php
index 44e47d4..2f69715 100644
--- a/LdapAuthentication.php
+++ b/LdapAuthentication.php
@@ -102,6 +102,7 @@
$base = __DIR__;
switch ( $updater->getDB()->getType() ) {
case 'mysql':
+   case 'sqlite':
$updater->addExtensionTable( 'ldap_domains', 
"$base/schema/ldap-mysql.sql" );
break;
case 'postgres':
diff --git a/schema/ldap-mysql.sql b/schema/ldap-mysql.sql
index fa96916..5f381e4 100644
--- a/schema/ldap-mysql.sql
+++ b/schema/ldap-mysql.sql
@@ -2,7 +2,7 @@
-- IF for domain
domain_id int not null primary key auto_increment,
 
-   -- domain itself
+   -- Domain itself
domain varchar(255) binary not null,
 
-- User to which this domain belongs
diff --git a/schema/ldap-postgres.sql b/schema/ldap-postgres.sql
index 61509fb..ff2bf6f 100644
--- a/schema/ldap-postgres.sql
+++ b/schema/ldap-postgres.sql
@@ -2,7 +2,7 @@
-- IF for domain
domain_id serial PRIMARY KEY,
 
-   -- domain itself
+   -- Domain itself
domain varchar(255) not null,
 
-- User to which this domain belongs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie142ae60637d85e3829f3f7e189388be23e4c4ca
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/LdapAuthentication
Gerrit-Branch: master
Gerrit-Owner: saper 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Ryan Lane 
Gerrit-Reviewer: Springle 
Gerrit-Reviewer: jenkins-bot <>
Gerrit-Reviewer: saper 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "all wikis to 1.30.0-wmf.2"

2017-05-25 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355719 )

Change subject: Revert "all wikis to 1.30.0-wmf.2"
..

Revert "all wikis to 1.30.0-wmf.2"

This reverts commit 7e7c5f44f6736d83f067561e25614b35b215a4e4.

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


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

diff --git a/wikiversions.json b/wikiversions.json
index 73096d0..c1d0cc0 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,40 +1,40 @@
 {
-"aawiki": "php-1.30.0-wmf.2",
+"aawiki": "php-1.30.0-wmf.1",
 "aawikibooks": "php-1.30.0-wmf.2",
 "aawiktionary": "php-1.30.0-wmf.2",
-"abwiki": "php-1.30.0-wmf.2",
+"abwiki": "php-1.30.0-wmf.1",
 "abwiktionary": "php-1.30.0-wmf.2",
-"acewiki": "php-1.30.0-wmf.2",
+"acewiki": "php-1.30.0-wmf.1",
 "advisorywiki": "php-1.30.0-wmf.2",
-"adywiki": "php-1.30.0-wmf.2",
-"afwiki": "php-1.30.0-wmf.2",
+"adywiki": "php-1.30.0-wmf.1",
+"afwiki": "php-1.30.0-wmf.1",
 "afwikibooks": "php-1.30.0-wmf.2",
 "afwikiquote": "php-1.30.0-wmf.2",
 "afwiktionary": "php-1.30.0-wmf.2",
-"akwiki": "php-1.30.0-wmf.2",
+"akwiki": "php-1.30.0-wmf.1",
 "akwikibooks": "php-1.30.0-wmf.2",
 "akwiktionary": "php-1.30.0-wmf.2",
-"alswiki": "php-1.30.0-wmf.2",
+"alswiki": "php-1.30.0-wmf.1",
 "alswikibooks": "php-1.30.0-wmf.2",
 "alswikiquote": "php-1.30.0-wmf.2",
 "alswiktionary": "php-1.30.0-wmf.2",
-"amwiki": "php-1.30.0-wmf.2",
+"amwiki": "php-1.30.0-wmf.1",
 "amwikiquote": "php-1.30.0-wmf.2",
 "amwiktionary": "php-1.30.0-wmf.2",
-"angwiki": "php-1.30.0-wmf.2",
+"angwiki": "php-1.30.0-wmf.1",
 "angwikibooks": "php-1.30.0-wmf.2",
 "angwikiquote": "php-1.30.0-wmf.2",
 "angwikisource": "php-1.30.0-wmf.2",
 "angwiktionary": "php-1.30.0-wmf.2",
-"anwiki": "php-1.30.0-wmf.2",
+"anwiki": "php-1.30.0-wmf.1",
 "anwiktionary": "php-1.30.0-wmf.2",
-"arbcom_cswiki": "php-1.30.0-wmf.2",
-"arbcom_dewiki": "php-1.30.0-wmf.2",
-"arbcom_enwiki": "php-1.30.0-wmf.2",
-"arbcom_fiwiki": "php-1.30.0-wmf.2",
-"arbcom_nlwiki": "php-1.30.0-wmf.2",
-"arcwiki": "php-1.30.0-wmf.2",
-"arwiki": "php-1.30.0-wmf.2",
+"arbcom_cswiki": "php-1.30.0-wmf.1",
+"arbcom_dewiki": "php-1.30.0-wmf.1",
+"arbcom_enwiki": "php-1.30.0-wmf.1",
+"arbcom_fiwiki": "php-1.30.0-wmf.1",
+"arbcom_nlwiki": "php-1.30.0-wmf.1",
+"arcwiki": "php-1.30.0-wmf.1",
+"arwiki": "php-1.30.0-wmf.1",
 "arwikibooks": "php-1.30.0-wmf.2",
 "arwikimedia": "php-1.30.0-wmf.2",
 "arwikinews": "php-1.30.0-wmf.2",
@@ -42,80 +42,80 @@
 "arwikisource": "php-1.30.0-wmf.2",
 "arwikiversity": "php-1.30.0-wmf.2",
 "arwiktionary": "php-1.30.0-wmf.2",
-"arzwiki": "php-1.30.0-wmf.2",
-"astwiki": "php-1.30.0-wmf.2",
+"arzwiki": "php-1.30.0-wmf.1",
+"astwiki": "php-1.30.0-wmf.1",
 "astwikibooks": "php-1.30.0-wmf.2",
 "astwikiquote": "php-1.30.0-wmf.2",
 "astwiktionary": "php-1.30.0-wmf.2",
-"aswiki": "php-1.30.0-wmf.2",
+"aswiki": "php-1.30.0-wmf.1",
 "aswikibooks": "php-1.30.0-wmf.2",
 "aswikisource": "php-1.30.0-wmf.2",
 "aswiktionary": "php-1.30.0-wmf.2",
 "auditcomwiki": "php-1.30.0-wmf.2",
-"avwiki": "php-1.30.0-wmf.2",
+"avwiki": "php-1.30.0-wmf.1",
 "avwiktionary": "php-1.30.0-wmf.2",
-"aywiki": "php-1.30.0-wmf.2",
+"aywiki": "php-1.30.0-wmf.1",
 "aywikibooks": "php-1.30.0-wmf.2",
 "aywiktionary": "php-1.30.0-wmf.2",
-"azbwiki": "php-1.30.0-wmf.2",
-"azwiki": "php-1.30.0-wmf.2",
+"azbwiki": "php-1.30.0-wmf.1",
+"azwiki": "php-1.30.0-wmf.1",
 "azwikibooks": "php-1.30.0-wmf.2",
 "azwikiquote": "php-1.30.0-wmf.2",
 "azwikisource": "php-1.30.0-wmf.2",
 "azwiktionary": "php-1.30.0-wmf.2",
-"barwiki": "php-1.30.0-wmf.2",
-"bat_smgwiki": "php-1.30.0-wmf.2",
-"bawiki": "php-1.30.0-wmf.2",
+"barwiki": "php-1.30.0-wmf.1",
+"bat_smgwiki": "php-1.30.0-wmf.1",
+"bawiki": "php-1.30.0-wmf.1",
 "bawikibooks": "php-1.30.0-wmf.2",
-"bclwiki": "php-1.30.0-wmf.2",
+"bclwiki": "php-1.30.0-wmf.1",
 "bdwikimedia": "php-1.30.0-wmf.2",
-"be_x_oldwiki": "php-1.30.0-wmf.2",
+"be_x_oldwiki": "php-1.30.0-wmf.1",
 "betawikiversity": "php-1.30.0-wmf.2",
-"bewiki": "php-1.30.0-wmf.2",
+"bewiki": "php-1.30.0-wmf.1",
 "bewikibooks": "php-1.30.0-wmf.2",
 "bewikimedia": "php-1.30.0-wmf.2",
 "bewikiquote": "php-1.30.0-wmf.2",
 "bewikisource": "php-1.30.0-wmf.2",
 "bewiktionary": "php-1.30.0-wmf.2",
-"bgwiki": "php-1.30.0-wmf.2",
+"bgwiki": "php-1.30.0-wmf.1",
 "bgwikibooks": "php-1.30.0-wmf.2",
 "bgwikinews": "php-1.30.0-wmf.2",
 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Add Code of Conduct footer links to wikitech and mw.o"

2017-05-25 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355718 )

Change subject: Revert "Add Code of Conduct footer links to wikitech and mw.o"
..

Revert "Add Code of Conduct footer links to wikitech and mw.o"

This reverts commit 1f6e689455fa3727c8d611a092a43762a684c3c1.

Change-Id: I3b11e179a2ccce7ae177474f695803264f1ae495
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 0 insertions(+), 16 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 50af02a..79ca61d 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1170,15 +1170,6 @@
return true;
};
 }
-if ( $wmgUseFooterCodeOfConductLink ) {
-   $wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) 
{
-   $contactLink = Html::element( 'a', [ 'href' => $sk->msg( 
'wm-codeofconduct-url' )->escaped() ],
-   $sk->msg( 'wm-codeofconduct' )->text() );
-   $tpl->set( 'wm-codeofconduct', $contactLink );
-   $tpl->data['footerlinks']['places'][] = 'wm-codeofconduct';
-   return true;
-   };
-}
 
 // T35186: turn off incomplete feature action=imagerotate
 $wgAPIModules['imagerotate'] = 'ApiDisabled';
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4711cb8..5c79619 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12863,13 +12863,6 @@
'ukwiki' => true, // T104924
 ],
 
-'wmgUseFooterCodeOfConductLink' => [
-   'default' => false,
-   'mediawikiwiki' => true,
-   'labswiki' => true,
-   'labstestwiki' => true,
-],
-
 'wgMaxMsgCacheEntrySize' => [
'default' => 1024,
 ],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump to deploy-2017-05-25

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

Change subject: Bump to deploy-2017-05-25
..


Bump to deploy-2017-05-25

Bug: T166068
Change-Id: Ie502bc4adfd6417640feb0c37b4bdcf2acae74c9
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src b/src
index ebac189..5b52d07 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit ebac189004d6edc4801719a5802766113bc84beb
+Subproject commit 5b52d07ba74ab80419664f0dc88119baf920084e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie502bc4adfd6417640feb0c37b4bdcf2acae74c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Visual Diff: add internal list diff

2017-05-25 Thread Tchanders (Code Review)
Tchanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355716 )

Change subject: Visual Diff: add internal list diff
..

Visual Diff: add internal list diff

Display changes to references in the visual diff.

Bug: T162819
Change-Id: If603a1861b32c1241396608ea1bd1927ebba9049
---
M src/dm/ve.dm.VisualDiff.js
M src/ui/elements/ve.ui.DiffElement.js
2 files changed, 173 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/16/355716/1

diff --git a/src/dm/ve.dm.VisualDiff.js b/src/dm/ve.dm.VisualDiff.js
index 750d112..6782614 100644
--- a/src/dm/ve.dm.VisualDiff.js
+++ b/src/dm/ve.dm.VisualDiff.js
@@ -21,16 +21,19 @@
 
this.oldDoc = oldDoc.cloneFromRange();
this.newDoc = newDoc.cloneFromRange();
-   this.oldDocNode = oldDoc.getDocumentNode();
-   this.newDocNode = newDoc.getDocumentNode();
+   this.oldDocNode = this.oldDoc.getDocumentNode();
+   this.newDocNode = this.newDoc.getDocumentNode();
this.oldDocChildren = this.oldDocNode.children;
this.newDocChildren = this.newDocNode.children;
+   this.oldDocInternalListNode = this.oldDocChildren[ 
this.oldDocChildren.length - 1 ];
+   this.newDocInternalListNode = this.newDocChildren[ 
this.newDocChildren.length - 1 ];
this.treeDiffer = treeDiffer;
// eslint-disable-next-line camelcase,new-cap
this.linearDiffer = new ve.DiffMatchPatch( this.oldDoc.getStore(), 
this.newDoc.getStore() );
this.endTime = new Date().getTime() + ( timeout || 1000 );
 
this.diff = this.getDiff();
+   this.diff.internalListDiff = this.getInternalListDiffInfo();
 };
 
 /**
@@ -364,6 +367,7 @@
if ( keepLength < 0.5 * diffLength ) {
return false;
}
+
return {
treeDiff: treeDiff,
diffInfo: diffInfo,
@@ -372,3 +376,81 @@
};
 
 };
+
+/*
+ * Get the diff between the old document's internal list and the new document's
+ * internal list. The diff is grouped by list group, and each node in each list
+ * group is marked as removed, inserted, the same, or changed (in which case 
the
+ * linear diff is given).
+ *
+ * @return {Object} Internal list diff object
+ */
+ve.dm.VisualDiff.prototype.getInternalListDiffInfo = function () {
+   var i, ilen, diff,
+   group, groupIndexOrder, nodeIndex,
+   oldDocInternalListNodes = this.oldDoc.internalList.nodes,
+   newDocInternalListNodes = this.newDoc.internalList.nodes,
+   retainedInternalListItems = {},
+   removedInternalListItems = {},
+   internalListDiffInfo = {};
+
+   // Find all nodes referenced by the new document's internal list
+   for ( group in newDocInternalListNodes ) {
+   groupIndexOrder = newDocInternalListNodes[ group ].indexOrder;
+   internalListDiffInfo[ group ] = {};
+   for ( i = 0, ilen = groupIndexOrder.length; i < ilen; i++ ) {
+   nodeIndex = groupIndexOrder[ i ];
+   retainedInternalListItems[ nodeIndex ] = group;
+   internalListDiffInfo[ group ] = {
+   changes: false
+   };
+   }
+   }
+
+   // Find all nodes referenced by the old document's internal list
+   for ( group in oldDocInternalListNodes ) {
+   groupIndexOrder = oldDocInternalListNodes[ group ].indexOrder;
+   for ( i = 0, ilen = groupIndexOrder.length; i < ilen; i++ ) {
+   nodeIndex = groupIndexOrder[ i ];
+   if ( retainedInternalListItems[ nodeIndex ] ) {
+   continue;
+   }
+   removedInternalListItems[ nodeIndex ] = group;
+   // TODO: Work out what should happen if the whole list 
group was removed
+   internalListDiffInfo[ group ] = {
+   changes: false
+   };
+   }
+   }
+
+   for ( i = 0, ilen = this.newDocInternalListNode.children.length; i < 
ilen; i++ ) {
+   nodeIndex = i;
+   group = retainedInternalListItems[ nodeIndex ] || 
removedInternalListItems[ nodeIndex ];
+   if ( i > this.oldDocInternalListNode.children.length - 1 ) {
+   // Item was inserted
+   internalListDiffInfo[ group ][ nodeIndex ] = 1;
+   internalListDiffInfo[ group ].changes = true;
+   } else if ( i in removedInternalListItems ) {
+   // Item was removed
+   internalListDiffInfo[ group ][ nodeIndex ] = -1;
+   internalListDiffInfo[ group ].changes = true;
+   } else {
+ 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Prevent massive loop by binding to the wrong method

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

Change subject: Prevent massive loop by binding to the wrong method
..


Prevent massive loop by binding to the wrong method

We were bind 'select' to 'toggleMenu' so a truthy selection
was getting passed as the first argument, instead of undefined.

Bug: T166259
Change-Id: I8882072a3998f5afa21b89a49a6285018464a773
---
M src/ui/contexts/ve.ui.TableLineContext.js
1 file changed, 10 insertions(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/ui/contexts/ve.ui.TableLineContext.js 
b/src/ui/contexts/ve.ui.TableLineContext.js
index 8694aab..fb26b23 100644
--- a/src/ui/contexts/ve.ui.TableLineContext.js
+++ b/src/ui/contexts/ve.ui.TableLineContext.js
@@ -115,6 +115,15 @@
 };
 
 /**
+ * Handle model select events
+ *
+ * @param {ve.dm.Selection} selection
+ */
+ve.ui.TableLineContext.prototype.onModelSelect = function () {
+   this.toggleMenu();
+};
+
+/**
  * @inheritdoc
  */
 ve.ui.TableLineContext.prototype.toggleMenu = function ( show ) {
@@ -126,7 +135,7 @@
this.popup.toggle( show );
if ( this.popup.isVisible() ) {
this.tableNode.setEditing( false );
-   surfaceModel.connect( this, { select: 'toggleMenu' } );
+   surfaceModel.connect( this, { select: 'onModelSelect' } );
surfaceView.$document.on( 'mousedown', 
this.onDocumentMouseDownHandler );
dir = surfaceView.getSelection().getDirection();
this.$element

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8882072a3998f5afa21b89a49a6285018464a773
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Bartosz Dziewoński 
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]: jquery.makeCollapsible: Restore considering empty as par...

2017-05-25 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355715 )

Change subject: jquery.makeCollapsible: Restore considering empty  as part 
of toggle
..

jquery.makeCollapsible: Restore considering empty  as part of toggle

Before 2d95d36a8e, clicks on links inside toggles with non-empty
targets that are not '#', were ignored ("pass through") since they
are not intended for the toggle.

In 2d95d36a8e, this was simplified to ignoring clicks from all 
elements inside toggles. However this ignored too much as links
without 'href' attribute are also sometimes used inside toggles
to look like links and have no href-target, which means clicking
them does nothing and is in fact meant to toggle the element.

Restore previous behaviour and restore previous test + add a new
test for this specific case.

Change-Id: Ia3a0648f809f94be0977a83b469fbd184aa72aff
---
M resources/src/jquery/jquery.makeCollapsible.js
M tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
2 files changed, 20 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/15/355715/1

diff --git a/resources/src/jquery/jquery.makeCollapsible.js 
b/resources/src/jquery/jquery.makeCollapsible.js
index 9d3df8c..ac4a392 100644
--- a/resources/src/jquery/jquery.makeCollapsible.js
+++ b/resources/src/jquery/jquery.makeCollapsible.js
@@ -152,7 +152,8 @@
if ( e ) {
if (
e.type === 'click' &&
-   e.target.nodeName.toLowerCase() === 'a'
+   e.target.nodeName.toLowerCase() === 'a' &&
+   $( e.target ).attr( 'href' )
) {
// Don't fire if a link was clicked (for 
premade togglers)
return;
diff --git a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js 
b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
index 44a2305..0179929 100644
--- a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
@@ -266,7 +266,7 @@
var $collapsible = prepareCollapsible(
'' +
'' +
-   'Toggle toggle 
toggle toggle' +
+   'Toggle toggle toggle toggle' +
'' +
'' 
+ loremIpsum + '' +
'',
@@ -282,6 +282,23 @@
assert.assertTrue( $content.is( ':hidden' ), 'click event on 
non-link inside toggle toggles content' );
} );
 
+   QUnit.test( 'click on non-link inside toggler counts as trigger', 
function ( assert ) {
+   var $collapsible = prepareCollapsible(
+   '' +
+   '' +
+   'Toggle toggle toggle 
toggle' +
+   '' +
+   '' 
+ loremIpsum + '' +
+   '',
+   // Can't do asynchronous because we're testing 
that the event *doesn't* happen
+   { instantHide: true }
+   ),
+   $content = $collapsible.find( '.mw-collapsible-content' 
);
+
+   $collapsible.find( '.mw-collapsible-toggle a' ).trigger( 
'click' );
+   assert.assertTrue( $content.is( ':hidden' ), 'click event on 
link inside toggle passes through (content not toggled)' );
+   } );
+
QUnit.test( 'collapse/expand text (data-collapsetext, 
data-expandtext)', function ( assert ) {
var $collapsible = prepareCollapsible(
'' +

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add kbp language code

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

Change subject: Add kbp language code
..


Add kbp language code

Bug: T160915
Change-Id: I1de0c2eb0228697544f2e3bfedf76bc37ac3f679
---
M RELEASE-NOTES-1.30
M languages/data/Names.php
2 files changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Nemo bis: Looks good to me, but someone else must approve
  Raimond Spekking: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index 9ff7e97..e61277a 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -32,6 +32,10 @@
   X-Content-Dimensions header for originals that contain the media's dimensions
   as page ranges keyed by dimensions.
 
+=== Languages updated in 1.30 ===
+
+* Support for kbp (Kabɩyɛ / Kabiyè) was added.
+
 === External library changes in 1.30 ===
 
  Upgraded external libraries 
diff --git a/languages/data/Names.php b/languages/data/Names.php
index d1715d2..76ced3e 100644
--- a/languages/data/Names.php
+++ b/languages/data/Names.php
@@ -222,6 +222,7 @@
'kab' => 'Taqbaylit', # Kabyle
'kbd' => 'Адыгэбзэ', # Kabardian
'kbd-cyrl' => 'Адыгэбзэ', # Kabardian (Cyrillic)
+   'kbp' => 'Kabɩyɛ', # Kabiyè
'kg' => 'Kongo', # Kongo, (FIXME!) should probaly be KiKongo or 
KiKoongo
'khw' => 'کھوار', # Khowar
'ki' => 'Gĩkũyũ', # Gikuyu

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1de0c2eb0228697544f2e3bfedf76bc37ac3f679
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Nemo bis 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Raimond Spekking 
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...Popups[master]: eventLogging: Add perceivedWait prop to all events

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

Change subject: eventLogging: Add perceivedWait prop to all events
..


eventLogging: Add perceivedWait prop to all events

... and the previewType property as well.

Per the Popups schema [0], the "opened" action should have the
perceivedWait and previewType properties set.

Bug: T166323
Change-Id: I957d123434a6b750aff6f5279865321a08367382
---
M resources/dist/index.js
M resources/dist/index.js.map
M src/reducers/eventLogging.js
M tests/node-qunit/reducers/eventLogging.test.js
4 files changed, 56 insertions(+), 9 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I957d123434a6b750aff6f5279865321a08367382
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Phuedx 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Prevent massive loop by binding to the wrong method

2017-05-25 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355712 )

Change subject: Prevent massive loop by binding to the wrong method
..

Prevent massive loop by binding to the wrong method

We were bind 'select' to 'toggleMenu' so a truthy selection
was getting passed as the first argument, instead of undefined.

Bug: T166259
Change-Id: I8882072a3998f5afa21b89a49a6285018464a773
---
M src/ui/contexts/ve.ui.TableLineContext.js
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/12/355712/1

diff --git a/src/ui/contexts/ve.ui.TableLineContext.js 
b/src/ui/contexts/ve.ui.TableLineContext.js
index 8694aab..fb26b23 100644
--- a/src/ui/contexts/ve.ui.TableLineContext.js
+++ b/src/ui/contexts/ve.ui.TableLineContext.js
@@ -115,6 +115,15 @@
 };
 
 /**
+ * Handle model select events
+ *
+ * @param {ve.dm.Selection} selection
+ */
+ve.ui.TableLineContext.prototype.onModelSelect = function () {
+   this.toggleMenu();
+};
+
+/**
  * @inheritdoc
  */
 ve.ui.TableLineContext.prototype.toggleMenu = function ( show ) {
@@ -126,7 +135,7 @@
this.popup.toggle( show );
if ( this.popup.isVisible() ) {
this.tableNode.setEditing( false );
-   surfaceModel.connect( this, { select: 'toggleMenu' } );
+   surfaceModel.connect( this, { select: 'onModelSelect' } );
surfaceView.$document.on( 'mousedown', 
this.onDocumentMouseDownHandler );
dir = surfaceView.getSelection().getDirection();
this.$element

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8882072a3998f5afa21b89a49a6285018464a773
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wikistats: ensure Apache PHP module is installed before site

2017-05-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355706 )

Change subject: wikistats: ensure Apache PHP module is installed before site
..

wikistats: ensure Apache PHP module is installed before site

With the current setup puppet runs and libapache2-mod-php-* gets
installed but the PHP site won't work until a manual
'dpkg-reconfigure libapache2-mod-php7.0'.

This is because it gets installed before the rest of the Apache
packages get pulled in. Add missing Require to fix that, also
move things around a bit and make more obvious how
the PHP version influences package names.

Change-Id: Idb4205bee82051a36c3b22588a2fce98c975e89f
---
M modules/wikistats/manifests/web.pp
1 file changed, 15 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/355706/1

diff --git a/modules/wikistats/manifests/web.pp 
b/modules/wikistats/manifests/web.pp
index 9c761fa..f88c40e 100644
--- a/modules/wikistats/manifests/web.pp
+++ b/modules/wikistats/manifests/web.pp
@@ -3,22 +3,27 @@
 $wikistats_host,
 ) {
 
-# Apache site from template
-apache::site { $wikistats_host:
-content => template('wikistats/apache/wikistats.erb'),
+if os_version('debian >= stretch') {
+$php_version = '7.0'
+} else {
+$php_version = '5'
 }
 
-# document root
+$apache_php_package = "libapache2-mod-php${php_version}"
+
+require_package($apache_php_package')
+
+include ::apache::mod::rewrite
+
+apache::site { $wikistats_host:
+content => template('wikistats/apache/wikistats.erb'),
+require => Package[$apache_php_package],
+}
+
 file { '/var/www/wikistats':
 ensure => directory,
 mode   => '0755',
 owner  => 'wikistatsuser',
 group  => 'www-data',
-}
-
-include ::apache::mod::rewrite
-
-if os_version('debian >= stretch') {
-require_package('libapache2-mod-php7.0')
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb4205bee82051a36c3b22588a2fce98c975e89f
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/core[master]: Revert "Creating new WMF 1.30.0-wmf.2 branch"

2017-05-25 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355704 )

Change subject: Revert "Creating new WMF 1.30.0-wmf.2 branch"
..

Revert "Creating new WMF 1.30.0-wmf.2 branch"

Also revert the automatic "Update git submodules" commits since then.

This reverts commit 264fc98588a4851324d3e5f2e39ece01e993127e.

Change-Id: Ica6ad77c46cc8a7f6b5576da2580ea9e07ac8637
---
D .gitmodules
A extensions/.gitignore
D extensions/AbuseFilter
D extensions/AccountAudit
D extensions/ActiveAbstract
D extensions/AntiSpoof
D extensions/ApiFeatureUsage
D extensions/Babel
D extensions/BetaFeatures
D extensions/BounceHandler
D extensions/Calendar
D extensions/Campaigns
D extensions/Capiunto
D extensions/Cards
D extensions/CategoryTree
D extensions/CentralAuth
D extensions/CentralNotice
D extensions/CharInsert
D extensions/CheckUser
D extensions/CirrusSearch
D extensions/Cite
D extensions/CiteThisPage
D extensions/Citoid
D extensions/CleanChanges
D extensions/CodeEditor
D extensions/CodeReview
D extensions/Cognate
D extensions/CollaborationKit
D extensions/Collection
D extensions/CommonsMetadata
D extensions/ConfirmEdit
D extensions/ContactPage
D extensions/ContentTranslation
D extensions/ContributionTracking
D extensions/CreditsSource
D extensions/Dashiki
D extensions/DisableAccount
D extensions/Disambiguator
D extensions/DismissableSiteNotice
D extensions/DonationInterface
D extensions/DoubleWiki
D extensions/DynamicSidebar
D extensions/Echo
D extensions/EducationProgram
D extensions/Elastica
D extensions/ElectronPdfService
D extensions/EventBus
D extensions/EventLogging
D extensions/ExtensionDistributor
D extensions/FeaturedFeeds
D extensions/FlaggedRevs
D extensions/Flow
D extensions/FundraiserLandingPage
D extensions/FundraisingTranslateWorkflow
D extensions/GWToolset
D extensions/Gadgets
D extensions/GeoCrumbs
D extensions/GeoData
D extensions/GettingStarted
D extensions/GlobalBlocking
D extensions/GlobalCssJs
D extensions/GlobalUsage
D extensions/GlobalUserPage
D extensions/GoogleNewsSitemap
D extensions/Graph
D extensions/GuidedTour
D extensions/ImageMap
D extensions/InputBox
D extensions/Insider
D extensions/Interwiki
D extensions/InterwikiSorting
D extensions/Josa
D extensions/JsonConfig
D extensions/Kartographer
D extensions/LabeledSectionTransclusion
D extensions/LandingCheck
D extensions/LdapAuthentication
D extensions/Linter
D extensions/LiquidThreads
D extensions/Listings
D extensions/LocalisationUpdate
D extensions/LoginNotify
D extensions/MapSources
D extensions/MassMessage
D extensions/Math
D extensions/MobileApp
D extensions/MobileFrontend
D extensions/MultimediaViewer
D extensions/MwEmbedSupport
D extensions/NavigationTiming
D extensions/NewUserMessage
D extensions/Nuke
D extensions/OATHAuth
D extensions/OAuth
D extensions/ORES
D extensions/OpenStackManager
D extensions/PageAssessments
D extensions/PageImages
D extensions/PageTriage
D extensions/PageViewInfo
D extensions/PagedTiffHandler
D extensions/ParserFunctions
D extensions/ParserMigration
D extensions/ParsoidBatchAPI
D extensions/PdfHandler
D extensions/Petition
D extensions/Poem
D extensions/PoolCounter
D extensions/Popups
D extensions/ProofreadPage
D extensions/QuickSurveys
D extensions/Quiz
A extensions/README
D extensions/RSS
D extensions/RelatedArticles
D extensions/RelatedSites
D extensions/Renameuser
D extensions/RevisionSlider
D extensions/SandboxLink
D extensions/Score
D extensions/Scribunto
D extensions/SearchExtraNS
D extensions/SecurePoll
D extensions/ShortUrl
D extensions/SiteMatrix
D extensions/SpamBlacklist
D extensions/SubPageList3
D extensions/SubpageSortkey
D extensions/SyntaxHighlight_GeSHi
D extensions/TemplateData
D extensions/TemplateSandbox
D extensions/TextExtracts
D extensions/Thanks
D extensions/TimedMediaHandler
D extensions/TitleBlacklist
D extensions/TocTree
D extensions/TorBlock
D extensions/Translate
D extensions/TranslationNotifications
D extensions/TrustedXFF
D extensions/TwoColConflict
D extensions/UnicodeConverter
D extensions/UniversalLanguageSelector
D extensions/UploadWizard
D extensions/UploadsLink
D extensions/UrlShortener
D extensions/UserMerge
D extensions/VectorBeta
D extensions/VipsScaler
D extensions/VisualEditor
D extensions/WikiEditor
D extensions/WikiLove
D extensions/Wikidata
D extensions/WikidataPageBanner
D extensions/WikimediaEvents
D extensions/WikimediaIncubator
D extensions/WikimediaMaintenance
D extensions/WikimediaMessages
D extensions/XAnalytics
D extensions/ZeroBanner
D extensions/ZeroPortal
D extensions/cldr
D extensions/intersection
D extensions/timeline
D extensions/wikihiero
M includes/DefaultSettings.php
D skins/CologneBlue
D skins/Modern
D skins/MonoBook
D skins/Nostalgia
D skins/Vector
D vendor
172 files changed, 34 insertions(+), 841 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/355704/1

diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Fix spec for various modules

2017-05-25 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355695 )

Change subject: Fix spec for various modules
..

Fix spec for various modules

base::service seems to now invoke logstash::conf, add 'logstash' to the
list of fixtures.
nrpe specs were failling with 'unknown init system'. Set the fact to
'systemd'.

Change-Id: I0a4e9c41329bf71c9a5dc11ef3c033fb8ce0c74f
---
M modules/jenkins/.fixtures.yml
M modules/nrpe/.fixtures.yml
M modules/nrpe/spec/classes/nrpe_spec.rb
M modules/nrpe/spec/defines/check_spec.rb
M modules/service/.fixtures.yml
M modules/squid3/.fixtures.yml
6 files changed, 19 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/355695/1

diff --git a/modules/jenkins/.fixtures.yml b/modules/jenkins/.fixtures.yml
index 503f8a9..128b3a1 100644
--- a/modules/jenkins/.fixtures.yml
+++ b/modules/jenkins/.fixtures.yml
@@ -3,6 +3,7 @@
 jenkins: "#{source_dir}"
 base: "../../../../base"
 alternatives: "../../../../alternatives"
+logrotate: "../../../../logrotate"
 monitoring: "../../../../monitoring"
 nrpe: "../../../../nrpe"
 rsyslog: "../../../../rsyslog"
diff --git a/modules/nrpe/.fixtures.yml b/modules/nrpe/.fixtures.yml
index 2c500f2..e9e98eb 100644
--- a/modules/nrpe/.fixtures.yml
+++ b/modules/nrpe/.fixtures.yml
@@ -1,5 +1,7 @@
 fixtures:
 symlinks:
 nrpe: "#{source_dir}"
+base: "../../../../base"
 ferm: "../../../../ferm"
 monitoring: "../../../../monitoring"
+wmflib: "../../../../wmflib"
diff --git a/modules/nrpe/spec/classes/nrpe_spec.rb 
b/modules/nrpe/spec/classes/nrpe_spec.rb
index 9688e31..a94d622 100644
--- a/modules/nrpe/spec/classes/nrpe_spec.rb
+++ b/modules/nrpe/spec/classes/nrpe_spec.rb
@@ -1,6 +1,7 @@
 require 'spec_helper'
 
 describe 'nrpe', :type => :class do
+let(:facts) { { :initsystem => 'systemd' } }
 it { should contain_package('nagios-nrpe-server') }
 it { should contain_package('nagios-plugins') }
 it { should contain_package('nagios-plugins-basic') }
@@ -11,7 +12,10 @@
 end
 
 describe 'nrpe', :type => :class do
-let(:facts) { { :realm => 'production' } }
+let(:facts) { {
+:realm  => 'production',
+:initsystem => 'systemd',
+} }
 
 it 'should generate valid content for nrpe_local.cfg in production' do
 should 
contain_file('/etc/nagios/nrpe_local.cfg').with_content(/allowed_hosts=127.0.42.42/)
@@ -19,14 +23,20 @@
 end
 
 describe 'nrpe', :type => :class do
-let(:facts) { { :realm => 'labs' } }
+let(:facts) { {
+:realm  => 'labs',
+:initsystem => 'systemd',
+} }
 it 'should generate valid content for nrpe_local.cfg in labs' do
 should 
contain_file('/etc/nagios/nrpe_local.cfg').with_content(/allowed_hosts=10.68.42.42/)
 end
 end
 
 describe 'nrpe', :type => :class do
-let(:facts) { { :realm => 'labs' } }
+let(:facts) { {
+:realm  => 'labs',
+:initsystem => 'systemd',
+} }
 let(:params) { { :allowed_hosts => '10.10.10.10' } }
 
 it 'should generate valid content for nrpe_local.cfg in labs with 
allowed_hosts defined' do
diff --git a/modules/nrpe/spec/defines/check_spec.rb 
b/modules/nrpe/spec/defines/check_spec.rb
index 8c9c1dd..3e73ced 100644
--- a/modules/nrpe/spec/defines/check_spec.rb
+++ b/modules/nrpe/spec/defines/check_spec.rb
@@ -11,6 +11,7 @@
 end
 
 context 'with nrpe class defined' do
+let(:facts) { { :initsystem => 'systemd' } }
 let(:pre_condition) { "class { 'nrpe': }" }
 it 'should create /etc/nagios/nrpe.d/something.cfg' do
 should contain_file('/etc/nagios/nrpe.d/something.cfg')
diff --git a/modules/service/.fixtures.yml b/modules/service/.fixtures.yml
index 7c546bd..9a16361 100644
--- a/modules/service/.fixtures.yml
+++ b/modules/service/.fixtures.yml
@@ -3,6 +3,7 @@
 service: "#{source_dir}"
 base: "../../../../base"
 ferm: "../../../../ferm"
+logrotate: "../../../../logrotate"
 monitoring: "../../../../monitoring"
 rsyslog: "../../../../rsyslog"
 scap: "../../../../scap"
diff --git a/modules/squid3/.fixtures.yml b/modules/squid3/.fixtures.yml
index 20f1b81..2f05e29 100644
--- a/modules/squid3/.fixtures.yml
+++ b/modules/squid3/.fixtures.yml
@@ -1,5 +1,6 @@
 fixtures:
 symlinks:
 squid3: "#{source_dir}"
+logrotate: "../../../../logrotate"
 stdlib: "../../../../stdlib"
 wmflib: "../../../../wmflib"

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump to deploy-2017-05-25

2017-05-25 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355690 )

Change subject: Bump to deploy-2017-05-25
..

Bump to deploy-2017-05-25

Bug: T166068
Change-Id: Ie502bc4adfd6417640feb0c37b4bdcf2acae74c9
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/90/355690/1

diff --git a/src b/src
index ebac189..5b52d07 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit ebac189004d6edc4801719a5802766113bc84beb
+Subproject commit 5b52d07ba74ab80419664f0dc88119baf920084e

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix version of DonationInterface deployed to donatewiki

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

Change subject: Fix version of DonationInterface deployed to donatewiki
..


Fix version of DonationInterface deployed to donatewiki

We had deleted some localization strings that donatewiki needs.

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

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 7eb79df..93fffe1 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 7eb79df9487f533f7e5b377593caff11d18f6154
+Subproject commit 93fffe1dd78dba5b56fea0060d4434002a001e04

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I27a03a64de80bdf58f7d7f2f69173933aa4b23ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] Manage temporary readonly error

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

Change subject: [bugfix] Manage temporary readonly error
..


[bugfix] Manage temporary readonly error

It's look like the API error named internal_api_error_ReadOnlyError was renamed 
to readonly. So, code.startswith(u'internal_api_error_') is not enabled. I've 
edited the code to accept readonly as an error that need edit retry. Need 
investigation to verify if internal_api_error_ReadOnlyError is still enabled, 
and if others error codes are impacted.

Bug: T154011
Change-Id: I9cc80c77532db3d9b71db5c33f91b8a699f41d6c
---
M pywikibot/data/api.py
1 file changed, 10 insertions(+), 3 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index e704023..9a1a585 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -2089,15 +2089,22 @@
 
 pywikibot.warning('API error %s: %s' % (code, info))
 
-if code.startswith(u'internal_api_error_'):
-class_name = code[len(u'internal_api_error_'):]
+if code.startswith('internal_api_error_') or code == 'readonly':
+if code == 'readonly':  # T154011
+class_name = code
+else:
+class_name = code[len(u'internal_api_error_'):]
 
 del error['code']  # is added via class_name
 e = APIMWException(class_name, **error)
 
+# If the error key is in this table, it is probably a 
temporary problem,
+# so we will retry the edit.
+# TODO: T154011: 'ReadOnlyError' seems replaced by 'readonly'
 retry = class_name in ['DBConnectionError',  # T64974
'DBQueryError',  # T60158
-   'ReadOnlyError'  # T61227
+   'ReadOnlyError',  # T61227
+   'readonly',  # T154011
]
 
 pywikibot.error("Detected MediaWiki API exception %s%s"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9cc80c77532db3d9b71db5c33f91b8a699f41d6c
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: Gerrit Patch Uploader 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Multichill 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: Zhuyifei1999 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix version of DonationInterface deployed to donatewiki

2017-05-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355660 )

Change subject: Fix version of DonationInterface deployed to donatewiki
..

Fix version of DonationInterface deployed to donatewiki

We had deleted some localization strings that donatewiki needs.

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


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

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 7eb79df..93fffe1 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 7eb79df9487f533f7e5b377593caff11d18f6154
+Subproject commit 93fffe1dd78dba5b56fea0060d4434002a001e04

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27a03a64de80bdf58f7d7f2f69173933aa4b23ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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]: MessageCache: Avoid deprecated wfMemcKey()

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

Change subject: MessageCache: Avoid deprecated wfMemcKey()
..


MessageCache: Avoid deprecated wfMemcKey()

Change-Id: I31e3cde0a94e355de9f32a17636aaf54aa2d40c4
---
M includes/cache/MessageCache.php
1 file changed, 13 insertions(+), 11 deletions(-)

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



diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 8f88ee9..ad1fffb 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -220,7 +220,7 @@
 * @return array|bool The cache array, or false if not in cache.
 */
protected function getLocalCache( $code ) {
-   $cacheKey = wfMemcKey( __CLASS__, $code );
+   $cacheKey = $this->srvCache->makeKey( __CLASS__, $code );
 
return $this->srvCache->get( $cacheKey );
}
@@ -232,7 +232,7 @@
 * @param array $cache The cache array
 */
protected function saveToLocalCache( $code, $cache ) {
-   $cacheKey = wfMemcKey( __CLASS__, $code );
+   $cacheKey = $this->srvCache->makeKey( __CLASS__, $code );
$this->srvCache->set( $cacheKey, $cache );
}
 
@@ -308,7 +308,7 @@
}
 
if ( !$success ) {
-   $cacheKey = wfMemcKey( 'messages', $code ); # Key in 
memc for messages
+   $cacheKey = $this->clusterCache->makeKey( 'messages', 
$code ); # Key in memc for messages
# Try the global cache. If it is empty, try to acquire 
a lock. If
# the lock can't be acquired, wait for the other thread 
to finish
# and then try the global cache a second time.
@@ -402,7 +402,7 @@
protected function loadFromDBWithLock( $code, array &$where, $mode = 
null ) {
# If cache updates on all levels fail, give up on message 
overrides.
# This is to avoid easy site outages; see $saveSuccess comments 
below.
-   $statusKey = wfMemcKey( 'messages', $code, 'status' );
+   $statusKey = $this->clusterCache->makeKey( 'messages', $code, 
'status' );
$status = $this->clusterCache->get( $statusKey );
if ( $status === 'error' ) {
$where[] = "could not load; method is still globally 
disabled";
@@ -416,7 +416,7 @@
# This lock is non-blocking so stale cache can quickly be used.
# Note that load() will call a blocking getReentrantScopedLock()
# after this if it really need to wait for any current thread.
-   $cacheKey = wfMemcKey( 'messages', $code );
+   $cacheKey = $this->clusterCache->makeKey( 'messages', $code );
$scopedLock = $this->getReentrantScopedLock( $cacheKey, 0 );
if ( !$scopedLock ) {
$where[] = 'could not acquire main lock';
@@ -596,7 +596,9 @@
function () use ( $title, $msg, $code ) {
global $wgContLang, $wgMaxMsgCacheEntrySize;
// Allow one caller at a time to avoid race 
conditions
-   $scopedLock = $this->getReentrantScopedLock( 
wfMemcKey( 'messages', $code ) );
+   $scopedLock = $this->getReentrantScopedLock(
+   $this->clusterCache->makeKey( 
'messages', $code )
+   );
if ( !$scopedLock ) {
LoggerFactory::getInstance( 
'MessageCache' )->error(
__METHOD__ . ': could not 
acquire lock to update {title} ({code})',
@@ -628,7 +630,7 @@
 
// Relay the purge. Touching this check key 
expires cache contents
// and local cache (APC) validation hash across 
all datacenters.
-   $this->wanCache->touchCheckKey( wfMemcKey( 
'messages', $code ) );
+   $this->wanCache->touchCheckKey( 
$this->wanCache->makeKey( 'messages', $code ) );
// Also delete cached sidebar... just in case 
it is affected
// @TODO: shouldn't this be $code === 
$wgLanguageCode?
if ( $code === 'en' ) {
@@ -639,7 +641,7 @@
$codes = [ $code ];
}
foreach ( $codes as $code ) {
-   $this->wanCache->delete( wfMemcKey( 
'sidebar', $code ) );
+  

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Scap clean: Also drop old patch files

2017-05-25 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355653 )

Change subject: Scap clean: Also drop old patch files
..

Scap clean: Also drop old patch files

Clean up docs while here too

Change-Id: I9da6898bde4cf23891a14b7376464b1a8a2843a9
---
M scap/plugins/clean.py
1 file changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/scap/plugins/clean.py b/scap/plugins/clean.py
index 4701c44..f1a0147 100644
--- a/scap/plugins/clean.py
+++ b/scap/plugins/clean.py
@@ -66,14 +66,14 @@
 
 def cleanup_branch(self, branch, delete):
 """
-Given a branch, go through the cleanup proccess
+Given a branch, go through the cleanup proccess on the master:
 
 (1) Prune git branches [if deletion]
 (2) Remove l10nupdate cache
 (3) Remove l10n cache
-(4) Remove files [either all, or keeping static + git]
-(4.1) From master
-(4.2) Then targets
+(4) Remove l10n bootstrap file
+(5) Remove some branch files [all if deletion]
+(6) Remove security patches [if deletion]
 """
 stage_dir = os.path.join(self.config['stage_dir'], 'php-%s' % branch)
 if not os.path.isdir(stage_dir):
@@ -111,6 +111,8 @@
 if subprocess.call(gerrit_prune_cmd) != 0:
 logger.info('Failed to prune core branch')
 commands['cleaning-branch'] = ['rm', '-fR', stage_dir]
+commands['cleaning-patches'] = [
+'rm' '-fR', os.path.join('/srv/patches', branch)]
 else:
 regex = r'".*\.?({0})$"'.format('|'.join(DELETABLE_TYPES))
 commands['cleaning-branch'] = ['find', stage_dir, '-type', 'f',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] varnish: Try to somehow embed errorpage template in VC...

2017-05-25 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355652 )

Change subject: [WIP] varnish: Try to somehow embed errorpage template in VCL 
directly
..

[WIP] varnish: Try to somehow embed errorpage template in VCL directly

Avoid std.fileread(), try to instead keep the string in puppet-land
and embed directly in VCL - escaped.

Change-Id: Ie4e7761916747fb15acf015c458983fbff8deaa7
TODO: Escaping is insufficient.
---
M modules/mediawiki/manifests/errorpage.pp
M modules/varnish/manifests/common/vcl.pp
M modules/varnish/templates/errorpage.inc.vcl.erb
3 files changed, 19 insertions(+), 26 deletions(-)


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

diff --git a/modules/mediawiki/manifests/errorpage.pp 
b/modules/mediawiki/manifests/errorpage.pp
index 3c5ed57..f63c3aa 100644
--- a/modules/mediawiki/manifests/errorpage.pp
+++ b/modules/mediawiki/manifests/errorpage.pp
@@ -25,21 +25,13 @@
 # [*footer*]
 #   Optional HTML content for the footer. (Optional)
 #
-define mediawiki::errorpage(
-$filepath = $name,
-$doctitle = 'Wikimedia Error',
-$content = '',
-$footer = undef,
+function mediawiki::errorpage(
+Hash $params,
 ) {
-$errorpage  = {
-title   => $doctitle,
-content => $content,
-footer  => $footer,
-}
-file { $filepath:
-owner  => 'root',
-group  => 'root',
-mode   => '0444',
-source => template('mediawiki/errorpage.html.erb'),
-}
+$errorpage = merge({
+title   => 'Wikimedia Error',
+content => '',
+footer  => undef,
+}, $params)
+inline_template('mediawiki/errorpage.html.erb')
 }
diff --git a/modules/varnish/manifests/common/vcl.pp 
b/modules/varnish/manifests/common/vcl.pp
index 28fedd0..ecf6956 100644
--- a/modules/varnish/manifests/common/vcl.pp
+++ b/modules/varnish/manifests/common/vcl.pp
@@ -1,13 +1,6 @@
 class varnish::common::vcl {
 require ::varnish::common
 
-file { '/etc/varnish/errorpage.inc.vcl':
-owner   => 'root',
-group   => 'root',
-mode=> '0444',
-content => template('varnish/errorpage.inc.vcl.erb'),
-}
-
 file { '/etc/varnish/analytics.inc.vcl':
 owner   => 'root',
 group   => 'root',
@@ -15,11 +8,19 @@
 content => template('varnish/analytics.inc.vcl.erb'),
 }
 
-mediawiki::errorpage { '/etc/varnish/errorpage.html':
+$errorpage = mediawiki::errorpage({
 doctitle => 'Wikimedia Error',
 content  => 'Our servers are currently under maintenance or 
experiencing a technical problem. Please try again in a 
fewminutes.See the error message at the bottom of this page for 
moreinformation.',
 # Placeholder "%error%" substituted at runtime in errorpage.inc.vcl
 footer   => 'If you report this error to the Wikimedia System 
Administrators, please include the details below.%error%',
+})
+$errorpage_escaped = regsubst($errorpage, '"', '\\"', 'G')
+
+file { '/etc/varnish/errorpage.inc.vcl':
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+content => template('varnish/errorpage.inc.vcl.erb'),
 }
 
 # VTC tests
diff --git a/modules/varnish/templates/errorpage.inc.vcl.erb 
b/modules/varnish/templates/errorpage.inc.vcl.erb
index 5350110..beda22f 100644
--- a/modules/varnish/templates/errorpage.inc.vcl.erb
+++ b/modules/varnish/templates/errorpage.inc.vcl.erb
@@ -1,7 +1,7 @@
 sub backend_error_errorpage {
set beresp.http.Content-Type = "text/html; charset=utf-8";
 
-   synthetic(regsub(std.fileread("/etc/varnish/errorpage.html"), "%error%",
+   synthetic(regsub("<%= @errorpage_escaped %>", "%error%",
"Request from " + bereq.http.X-Client-IP +
" via " + server.hostname + " " + server.identity +
", Varnish XID " + bereq.xid + "" +
@@ -15,7 +15,7 @@
 sub synth_errorpage {
set resp.http.Content-Type = "text/html; charset=utf-8";
 
-   synthetic(regsub(std.fileread("/etc/varnish/errorpage.html"), "%error%",
+   synthetic(regsub("<%= @errorpage_escaped %>", "%error%",
"Request from " + req.http.X-Client-IP +
" via " + server.hostname + " " + server.identity +
", Varnish XID " + req.xid + "" +

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: rebuildrecentchanges.php: Make purgeFeeds() use the correct ...

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

Change subject: rebuildrecentchanges.php: Make purgeFeeds() use the correct 
cache
..


rebuildrecentchanges.php: Make purgeFeeds() use the correct cache

ChangesFeed was updated in 3517be1cf0b7, to use the WAN cache,
so this change updates the purgeFeeds() function to use that cache
too.

Avoid the deprected wfMemcKey() too.

Bug: T166195
Change-Id: I28a8d729737f03ccaf069495a59e80401c59e778
---
M maintenance/rebuildrecentchanges.php
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/maintenance/rebuildrecentchanges.php 
b/maintenance/rebuildrecentchanges.php
index 458dacf..142a4e5 100644
--- a/maintenance/rebuildrecentchanges.php
+++ b/maintenance/rebuildrecentchanges.php
@@ -24,6 +24,7 @@
  */
 
 require_once __DIR__ . '/Maintenance.php';
+use MediaWiki\MediaWikiServices;
 
 /**
  * Maintenance script that rebuilds recent changes from scratch.
@@ -478,15 +479,16 @@
}
 
/**
-* Purge cached feeds in $messageMemc
+* Purge cached feeds in $wanCache
 */
private function purgeFeeds() {
-   global $wgFeedClasses, $messageMemc;
+   global $wgFeedClasses;
 
$this->output( "Deleting feed timestamps.\n" );
 
+   $wanCache = 
MediaWikiServices::getInstance()->getMainWANObjectCache();
foreach ( $wgFeedClasses as $feed => $className ) {
-   $messageMemc->delete( wfMemcKey( 'rcfeed', $feed, 
'timestamp' ) ); # Good enough for now.
+   $wanCache->delete( $wanCache->makeKey( 'rcfeed', $feed, 
'timestamp' ) ); # Good enough for now.
}
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28a8d729737f03ccaf069495a59e80401c59e778
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MtDu 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add kafka_version parameter, s/java_packaage/java_home/ in c...

2017-05-25 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354100 )

Change subject: Add kafka_version parameter, s/java_packaage/java_home/ in 
confluent::kafka::client
..


Add kafka_version parameter, s/java_packaage/java_home/ in 
confluent::kafka::client

This allows for configuration of which Java is used, and which Kafka version 
will be installed.

Change-Id: I577ed3f0fd9c95ba7ba5df1b49ce1e1680754dfb
---
M modules/confluent/files/kafka/kafka.sh
M modules/confluent/manifests/kafka/broker.pp
M modules/confluent/manifests/kafka/client.pp
M modules/confluent/manifests/kafka/mirror/instance.pp
M modules/confluent/templates/kafka/kafka-profile.sh.erb
M modules/confluent/templates/kafka/mirror/kafka-mirror.default.erb
6 files changed, 47 insertions(+), 16 deletions(-)

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



diff --git a/modules/confluent/files/kafka/kafka.sh 
b/modules/confluent/files/kafka/kafka.sh
index 3ef3d65..96b570a 100755
--- a/modules/confluent/files/kafka/kafka.sh
+++ b/modules/confluent/files/kafka/kafka.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# NOTE:  This file is managed by Puppet
+# NOTE: This file is managed by Puppet.
 
 SCRIPT_NAME=$(basename "$0")
 
@@ -22,10 +22,12 @@
 $commands
 
 Environment Variables:
+  KAFKA_JAVA_HOME - Value of JAVA_HOME to use for invoking Kafka 
commands.
   KAFKA_ZOOKEEPER_URL - If this is set, any commands that take a 
--zookeeper
 flag will be given this value.
   KAFKA_BOOTSTRAP_SERVERS - If this is set, any commands that take a 
--broker-list or
 --bootstrap-server flag will be given this value.
+
 "
 
 # Print usage if no  given, or $1 starts with '-'
@@ -38,7 +40,14 @@
 command="kafka-${1}"
 shift
 
-# Set KAFKA_ZOOKEEPER_OPT if ZOOKEEPER_URL is set and --zookeeper has not
+# Export JAVA_HOME as KAFKA_JAVA_HOME if it is set.
+# This makes kafka-run-class use the preferred JAVA_HOME for Kafka.
+if [ -n "${KAFKA_JAVA_HOME}" ]; then
+: ${JAVA_HOME="$KAFKA_JAVA_HOME"}
+export JAVA_HOME
+fi
+
+# Set ZOOKEEPER_OPT if ZOOKEEPER_URL is set and --zookeeper has not
 # also been passed in as a CLI arg.  This will be included
 # in command functions that take a --zookeeper argument.
 if [ -n "${KAFKA_ZOOKEEPER_URL}" -a -z "$(echo $@ | grep -- --zookeeper)" ]; 
then
diff --git a/modules/confluent/manifests/kafka/broker.pp 
b/modules/confluent/manifests/kafka/broker.pp
index 6716ea9..10cf523 100644
--- a/modules/confluent/manifests/kafka/broker.pp
+++ b/modules/confluent/manifests/kafka/broker.pp
@@ -148,9 +148,6 @@
 #   The broker process' number of open files ulimit.
 #   Default: 8192
 #
-# [*java_home*]
-#   Value for the JAVA_HOME environment variable.  Default: undef
-#
 # [*java_opts*]
 #   Extra Java options.  Default: undef
 #
@@ -224,7 +221,6 @@
 
 $inter_broker_protocol_version   = '0.9.0.X',
 $nofiles_ulimit  = 8192,
-$java_home   = undef,
 $java_opts   = undef,
 $classpath   = undef,
 $jmx_port= ,
@@ -255,6 +251,9 @@
 $port = $default_port
 }
 
+# Local variable for rendering in templates.
+$java_home = $::confluent::kafka::client::java_home
+
 group { 'kafka':
 ensure  => 'present',
 system  => true,
diff --git a/modules/confluent/manifests/kafka/client.pp 
b/modules/confluent/manifests/kafka/client.pp
index 608779d..f1396d8 100644
--- a/modules/confluent/manifests/kafka/client.pp
+++ b/modules/confluent/manifests/kafka/client.pp
@@ -5,36 +5,50 @@
 # Most likely you will not use this class directly, and instead
 # just use confluent::kafka::broker to install and start a Kafka broker.
 # You will only use confluent::kafka::client directly if you need to
-# change the version of java or scala that is being installed, or if
+# change the version of java, kafka, or scala that is being installed, or if
 # you want to install the confluent-kafka package without puppet managing
 # a Kafka broker.
 #
 # == Parameters
 #
-# [*java_package*]
-#   Name of java package to require.  This will be passed to require_package().
-#   Default: openjdk-7-jdk
+# [*java_home*]
+#   Path to JAVA_HOME.  This class does not manage installation of Java.
+#   You must do that elsewhere.  Default: undef (will use system default).
+#
+# [*kafka_version*]
+#   Ensure this version of a confluent-kafka package is installed.
+#   Default: undef
 #
 # [*scala_version*]
 #   confluent-kafka-$scala_version will be installed.
 #   Default: 2.11.7
 #
 class confluent::kafka::client(
-$java_package  = 'openjdk-7-jdk',
+$java_home = undef,
+$kafka_version = undef,
 $scala_version = '2.11.7'
 ) {
 $package = "confluent-kafka-${scala_version}"
-require_package([$java_package, 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add $wgMaxJobDBWriteDuration setting for avoiding replicatio...

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

Change subject: Add $wgMaxJobDBWriteDuration setting for avoiding replication 
lag
..

Add $wgMaxJobDBWriteDuration setting for avoiding replication lag

This is similar to $wgMaxUserDBWriteDuration except for jobs.

Bug: T95501
Change-Id: I4949bb99c26451429c7acf82eccbf9fb835f
---
M includes/DefaultSettings.php
M includes/jobqueue/JobRunner.php
2 files changed, 33 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/355651/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 19c585d..5b83347 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -8560,6 +8560,15 @@
  */
 $wgMaxUserDBWriteDuration = false;
 
+/*
+ * Max time (in seconds) a job-generated transaction can spend in writes.
+ * If exceeded, the transaction is rolled back with an error instead of being 
committed.
+ *
+ * @var int|bool Disabled if false
+ * @since 1.30
+ */
+$wgMaxJobDBWriteDuration = false;
+
 /**
  * Mapping of event channels (or channel categories) to EventRelayer 
configuration.
  *
diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index 6415533..18cabc5d 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -38,6 +38,8 @@
  * @since 1.24
  */
 class JobRunner implements LoggerAwareInterface {
+   /** @var Config */
+   protected $config;
/** @var callable|null Debug output handler */
protected $debug;
 
@@ -74,6 +76,7 @@
$logger = LoggerFactory::getInstance( 'runJobs' );
}
$this->setLogger( $logger );
+   $this->config = 
MediaWikiServices::getInstance()->getMainConfig();
}
 
/**
@@ -101,7 +104,8 @@
 * @return array Summary response that can easily be JSON serialized
 */
public function run( array $options ) {
-   global $wgJobClasses, $wgTrxProfilerLimits;
+   $jobClasses = $this->config->get( 'JobClasses' );
+   $profilerLimits = $this->config->get( 'TrxProfilerLimits' );
 
$response = [ 'jobs' => [], 'reached' => 'none-ready' ];
 
@@ -111,7 +115,7 @@
$noThrottle = isset( $options['throttle'] ) && 
!$options['throttle'];
 
// Bail if job type is invalid
-   if ( $type !== false && !isset( $wgJobClasses[$type] ) ) {
+   if ( $type !== false && !isset( $jobClasses[$type] ) ) {
$response['reached'] = 'none-possible';
return $response;
}
@@ -136,7 +140,7 @@
// Catch huge single updates that lead to replica DB lag
$trxProfiler = Profiler::instance()->getTransactionProfiler();
$trxProfiler->setLogger( LoggerFactory::getInstance( 
'DBPerformance' ) );
-   $trxProfiler->setExpectations( 
$wgTrxProfilerLimits['JobRunner'], __METHOD__ );
+   $trxProfiler->setExpectations( $profilerLimits['JobRunner'], 
__METHOD__ );
 
// Some jobs types should not run until a certain timestamp
$backoffs = []; // map of (type => UNIX expiry)
@@ -360,15 +364,13 @@
 * @see $wgJobBackoffThrottling
 */
private function getBackoffTimeToWait( Job $job ) {
-   global $wgJobBackoffThrottling;
+   $throttling = $this->config->get( 'JobBackoffThrottling' );
 
-   if ( !isset( $wgJobBackoffThrottling[$job->getType()] ) ||
-   $job instanceof DuplicateJob // no work was done
-   ) {
+   if ( !isset( $throttling[$job->getType()] ) || $job instanceof 
DuplicateJob ) {
return 0; // not throttled
}
 
-   $itemsPerSecond = $wgJobBackoffThrottling[$job->getType()];
+   $itemsPerSecond = $throttling[$job->getType()];
if ( $itemsPerSecond <= 0 ) {
return 0; // not throttled
}
@@ -516,17 +518,17 @@
 * @throws DBError
 */
private function commitMasterChanges( LBFactory $lbFactory, Job $job, 
$fnameTrxOwner ) {
-   global $wgJobSerialCommitThreshold;
+   $syncThreshold = $this->config->get( 'JobSerialCommitThreshold' 
);
 
$time = false;
$lb = $lbFactory->getMainLB( wfWikiID() );
-   if ( $wgJobSerialCommitThreshold !== false && 
$lb->getServerCount() > 1 ) {
+   if ( $syncThreshold !== false && $lb->getServerCount() > 1 ) {
// Generally, there is one master connection to the 
local DB
$dbwSerial = $lb->getAnyOpenConnection( 
$lb->getWriterIndex() );
  

[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Omit closing tag in `$( '' )` expressions

2017-05-25 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355649 )

Change subject: Omit closing tag in `$( '' )` expressions
..

Omit closing tag in `$( '' )` expressions

https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Creating_elements

Find:  <(\w+)><\/\1>
Replace with:  <$1>

Change-Id: I9cda43ccd55dfc58bd5cdbd307d85a97d84fbf2c
---
M resources/mw.UploadWizardDeedOwnWork.js
M resources/mw.UploadWizardLicenseInput.js
M resources/mw.UploadWizardUpload.js
M resources/ui/steps/uw.ui.Upload.js
4 files changed, 13 insertions(+), 13 deletions(-)


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

diff --git a/resources/mw.UploadWizardDeedOwnWork.js 
b/resources/mw.UploadWizardDeedOwnWork.js
index 9a1d118..1dccf2f 100644
--- a/resources/mw.UploadWizardDeedOwnWork.js
+++ b/resources/mw.UploadWizardDeedOwnWork.js
@@ -128,7 +128,7 @@
this.$form = $( '' );
 
$standardDiv = $( '' ).append(
-   $( '' ).msg(
+   $( '' ).msg(
defaultLicenseMsg,
uploadCount,

this.authorInput.$element,
@@ -144,7 +144,7 @@
 
if ( this.showCustomDiv ) {
$customDiv = $( '' ).append(
-   $( '' ).msg( 
'mwe-upwiz-source-ownwork-assert-custom',
+   $( '' ).msg( 
'mwe-upwiz-source-ownwork-assert-custom',
uploadCount,

this.fakeAuthorInput.$element )
);
diff --git a/resources/mw.UploadWizardLicenseInput.js 
b/resources/mw.UploadWizardLicenseInput.js
index ef8be38..46d0e7b 100644
--- a/resources/mw.UploadWizardLicenseInput.js
+++ b/resources/mw.UploadWizardLicenseInput.js
@@ -140,7 +140,7 @@
var input = this;
$.each( configGroups, function ( i, group ) {
var $body, $head, $licensesDiv,
-   $group = $( '' ).addClass( 
'mwe-upwiz-deed-license-group' );
+   $group = $( '' ).addClass( 
'mwe-upwiz-deed-license-group' );
if ( group.head === undefined ) {
// if there is no header, just append 
licenses to the group div.
$body = $group;
@@ -149,13 +149,13 @@
$head = $( '' )
.addClass( 
'mwe-upwiz-deed-license-group-head mw-collapsible-toggle mw-collapsible-arrow' )
.append( $( '' ).msg( 
group.head, input.count ) );
-   $body = $( '' ).addClass( 
'mwe-upwiz-deed-license-group-body mw-collapsible-content' );
+   $body = $( '' ).addClass( 
'mwe-upwiz-deed-license-group-body mw-collapsible-content' );
$group.append( $head, $body 
).makeCollapsible( { collapsed: true } );
}
if ( group.subhead !== undefined ) {
-   $body.append( $( '' 
).addClass( 'mwe-upwiz-deed-license-group-subhead' ).msg( group.subhead, 
input.count ) );
+   $body.append( $( '' ).addClass( 
'mwe-upwiz-deed-license-group-subhead' ).msg( group.subhead, input.count ) );
}
-   $licensesDiv = $( '' ).addClass( 
'mwe-upwiz-deed-license' );
+   $licensesDiv = $( '' ).addClass( 
'mwe-upwiz-deed-license' );
input.createInputs( $licensesDiv, group );
$body.append( $licensesDiv );
input.$selector.append( $group );
@@ -281,14 +281,14 @@
 
licenseLink = $( '' ).attr( { target: 
'_blank', href: licenseURL } ),
 
-   $icons = $( '' );
+   $icons = $( '' );
 
if ( license.props.languageCodePrefix !== undefined ) {
licenseURL += license.props.languageCodePrefix 
+ languageCode;
}
if ( license.props.icons !== undefined ) {
$.each( license.props.icons, function ( i, icon 
) {
-

[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Fix more jQuery 3 deprecations

2017-05-25 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355650 )

Change subject: Fix more jQuery 3 deprecations
..

Fix more jQuery 3 deprecations

* JQMIGRATE: jQuery.fn.unbind() is deprecated

Follow-up to 2d08f193caa9328a2b120f66ed4a46389f40690c.

Change-Id: Icb5911b533d3fe5bd652fcc6e8c953bc82f88703
---
M resources/mw.UploadWizardUpload.js
M resources/mw.UploadWizardUploadInterface.js
M resources/ui/steps/uw.ui.Upload.js
3 files changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/resources/mw.UploadWizardUpload.js 
b/resources/mw.UploadWizardUpload.js
index 78ed335..d24b092 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -87,7 +87,7 @@
mw.UploadWizardUpload.prototype.remove = function () {
// remove the div that passed along the trigger
var $div = $( this.ui.div );
-   $div.unbind(); // everything
+   $div.off(); // unbind everything
$div.remove();
 
this.state = 'aborted';
diff --git a/resources/mw.UploadWizardUploadInterface.js 
b/resources/mw.UploadWizardUploadInterface.js
index 8ba3d89..1520df6 100644
--- a/resources/mw.UploadWizardUploadInterface.js
+++ b/resources/mw.UploadWizardUploadInterface.js
@@ -67,7 +67,8 @@
$( this.div ).append( this.$form );
 
// this.progressBar = ( no progress bar for individual uploads 
yet )
-   // we bind to the ui div since unbind doesn't work for non-DOM 
objects
+   // we bind to the ui div since .off() doesn't work for non-DOM 
objects
+   // TODO Convert this to an OO.EventEmitter, and use OOjs events
$( this.div ).on( 'transportProgressEvent', function () { 
ui.showTransportProgress(); } );
};
 
diff --git a/resources/ui/steps/uw.ui.Upload.js 
b/resources/ui/steps/uw.ui.Upload.js
index 5c6e271..3491a0a 100644
--- a/resources/ui/steps/uw.ui.Upload.js
+++ b/resources/ui/steps/uw.ui.Upload.js
@@ -561,7 +561,7 @@
uw.ui.Upload.prototype.flickrInterfaceDestroy = function () {
this.$flickrInput.val( '' );
this.$flickrSelectList.empty();
-   this.$flickrSelectListContainer.unbind();
+   this.$flickrSelectListContainer.off();
this.$flickrSelectListContainer.hide();
this.$flickrContainer.hide();
this.flickrButton.setDisabled( true );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb5911b533d3fe5bd652fcc6e8c953bc82f88703
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Correctly test warning in TestTerminalOutput.test_output_stdout

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

Change subject: Correctly test warning in TestTerminalOutput.test_output_stdout
..


Correctly test warning in TestTerminalOutput.test_output_stdout

Instead of testing for a given output, check that the correct
warning is triggered in the warning library.

Change-Id: Ibb83ac2504547e9feef241a7ceb159d8b4f84311
---
M tests/ui_tests.py
1 file changed, 10 insertions(+), 5 deletions(-)

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



diff --git a/tests/ui_tests.py b/tests/ui_tests.py
index 75fd646..228249e 100644
--- a/tests/ui_tests.py
+++ b/tests/ui_tests.py
@@ -33,6 +33,7 @@
 import subprocess
 import sys
 import time
+import warnings
 
 if os.name == "nt":
 from multiprocessing.managers import BaseManager
@@ -285,11 +286,15 @@
 self.assertEqual(newstderr.getvalue(), 'output\n')
 
 def test_output_stdout(self):
-pywikibot.output('output', toStdout=True)
-self.assertEqual(newstdout.getvalue(), 'output\n')
-self.assertIn('DeprecationWarning: "toStdout" parameter is '
-  'deprecated; use pywikibot.stdout() instead.\n',
-  newstderr.getvalue(),)
+with warnings.catch_warnings(record=True) as w:
+pywikibot.output('output', toStdout=True)
+self.assertEqual(newstdout.getvalue(), 'output\n')
+self.assertEqual(len(w), 1)
+self.assertEqual(w[0].category, DeprecationWarning)
+self.assertEqual(
+str(w[0].message),
+'"toStdout" parameter is deprecated; use pywikibot.stdout() 
instead.'
+)
 
 def test_stdout(self):
 pywikibot.stdout('output')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb83ac2504547e9feef241a7ceb159d8b4f84311
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen 
Gerrit-Reviewer: Multichill 
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]: wfIsBadImage: Avoid deprecated wfMemcKey()

2017-05-25 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355647 )

Change subject: wfIsBadImage: Avoid deprecated wfMemcKey()
..

wfIsBadImage: Avoid deprecated wfMemcKey()

Change-Id: I92133ed6a94902bdac2e9723f19a653a9962b757
---
M includes/GlobalFunctions.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/47/355647/1

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 1859c02..c529faa 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -3515,7 +3515,7 @@
}
 
$cache = ObjectCache::getLocalServerInstance( 'hash' );
-   $key = wfMemcKey( 'bad-image-list', ( $blacklist === null ) ? 'default' 
: md5( $blacklist ) );
+   $key = $cache->makeKey( 'bad-image-list', ( $blacklist === null ) ? 
'default' : md5( $blacklist ) );
$badImages = $cache->get( $key );
 
if ( $badImages === false ) { // cache miss

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: eventLogging: Add perceivedWait prop to all events

2017-05-25 Thread Phuedx (Code Review)
Phuedx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355646 )

Change subject: eventLogging: Add perceivedWait prop to all events
..

eventLogging: Add perceivedWait prop to all events

... and the previewType property as well.

Per the Popups schema [0], the "opened" action should have the
perceivedWait and previewType properties set.

Bug: T166323
Change-Id: I957d123434a6b750aff6f5279865321a08367382
---
M resources/dist/index.js
M resources/dist/index.js.map
M src/reducers/eventLogging.js
M tests/node-qunit/reducers/eventLogging.test.js
4 files changed, 56 insertions(+), 9 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I957d123434a6b750aff6f5279865321a08367382
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Phuedx 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: MFEnableManifest should add manifest to all mobile ...

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

Change subject: Hygiene: MFEnableManifest should add manifest to all mobile 
skins
..


Hygiene: MFEnableManifest should add manifest to all mobile skins

There is no reason this should be Minerva specific. Allow other
skins operating in mobile mode to use this

Change-Id: Ia304d83b28db1909b922bdbfe0eb4e58c0f32e43
---
M includes/MobileFrontend.hooks.php
M includes/skins/SkinMinerva.php
M tests/phpunit/MobileFrontend.hooksTest.php
3 files changed, 14 insertions(+), 11 deletions(-)

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



diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index c011bd8..6e86efa 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -765,6 +765,18 @@
$out->setTarget( 'mobile' );
}
 
+   if ( $config->get( 'MFEnableManifest' ) ) {
+   $out->addLink(
+   [
+   'rel' => 'manifest',
+   'href' => wfAppendQuery(
+   wfScript( 'api' ),
+   [ 'action' => 
'webapp-manifest' ]
+   )
+   ]
+   );
+   }
+
// Allow modifications in mobile only mode
Hooks::run( 'BeforePageDisplayMobile', [ &$out, &$sk ] 
);
 
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index c1eb155..67bc6b8 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -132,17 +132,6 @@
$out->addMeta( 'viewport', 'initial-scale=1.0, 
user-scalable=yes, minimum-scale=0.25, ' .
'maximum-scale=5.0, width=device-width'
);
-   if ( $this->getConfig()->get( 'MFEnableManifest' ) ) {
-   $out->addLink(
-   [
-   'rel' => 'manifest',
-   'href' => wfAppendQuery(
-   wfScript( 'api' ),
-   [ 'action' => 'webapp-manifest' 
]
-   )
-   ]
-   );
-   }
 
// Generate skin template
$tpl = parent::prepareQuickTemplate();
diff --git a/tests/phpunit/MobileFrontend.hooksTest.php 
b/tests/phpunit/MobileFrontend.hooksTest.php
index d2c30ac..65eface 100644
--- a/tests/phpunit/MobileFrontend.hooksTest.php
+++ b/tests/phpunit/MobileFrontend.hooksTest.php
@@ -18,6 +18,7 @@
 */
public function testSpecialMobileCiteOnBeforePageDisplay() {
$this->setMwGlobals( [
+   'wgMFEnableManifest' => false,
'wgMobileUrlTemplate' => true,
'wgMFNoindexPages' => true
] );
@@ -43,6 +44,7 @@
) {
// set globals
$this->setMwGlobals( [
+   'wgMFEnableManifest' => false,
'wgMobileUrlTemplate' => $mobileUrlTemplate,
'wgMFNoindexPages' => $mfNoindexPages,
'wgMFEnableXAnalyticsLogging' => 
$mfEnableXAnalyticsLogging,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia304d83b28db1909b922bdbfe0eb4e58c0f32e43
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Pmiazga 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: LanguageConverter: Avoid deprecated wfMemcKey()

2017-05-25 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355643 )

Change subject: LanguageConverter: Avoid deprecated wfMemcKey()
..

LanguageConverter: Avoid deprecated wfMemcKey()

Change-Id: I7fe8e3ad6de2eb0a156b046805fa0eca928d0892
---
M languages/LanguageConverter.php
1 file changed, 3 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/355643/1

diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php
index 4c3e5be..5382df4 100644
--- a/languages/LanguageConverter.php
+++ b/languages/LanguageConverter.php
@@ -60,11 +60,6 @@
// 'bidirectional' 'unidirectional' 'disable' for each variant
public $mManualLevel;
 
-   /**
-* @var string Memcached key name
-*/
-   public $mCacheKey;
-
public $mLangObj;
public $mFlags;
public $mDescCodeSep = ':', $mDescVarSep = ';';
@@ -95,7 +90,6 @@
$this->mVariants = array_diff( $variants, $wgDisabledVariants );
$this->mVariantFallbacks = $variantfallbacks;
$this->mVariantNames = Language::fetchLanguageNames();
-   $this->mCacheKey = wfMemcKey( 'conversiontables', $maincode );
$defaultflags = [
// 'S' show converted text
// '+' add rules for alltext
@@ -866,8 +860,9 @@
$this->mTablesLoaded = true;
$this->mTables = false;
$cache = ObjectCache::getInstance( 
$wgLanguageConverterCacheType );
+   $cacheKey = $cache->makeKey( 'conversiontables', 
$this->mMainLanguageCode );
if ( $fromCache ) {
-   $this->mTables = $cache->get( $this->mCacheKey );
+   $this->mTables = $cache->get( $cacheKey );
}
if ( !$this->mTables || !array_key_exists( 
self::CACHE_VERSION_KEY, $this->mTables ) ) {
// not in cache, or we need a fresh reload.
@@ -882,7 +877,7 @@
$this->postLoadTables();
$this->mTables[self::CACHE_VERSION_KEY] = true;
 
-   $cache->set( $this->mCacheKey, $this->mTables, 43200 );
+   $cache->set( $cacheKey, $this->mTables, 43200 );
}
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: User: Avoid deprecated wfMemcKey()

2017-05-25 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355645 )

Change subject: User: Avoid deprecated wfMemcKey()
..

User: Avoid deprecated wfMemcKey()

And ObjectCache::getMainWANInstance() while we're at it.

Change-Id: Id0280aec72202f3b3098c9c3b563541c2c0f2900
---
M includes/user/User.php
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/45/355645/1

diff --git a/includes/user/User.php b/includes/user/User.php
index 131e419..99610c3 100644
--- a/includes/user/User.php
+++ b/includes/user/User.php
@@ -2527,8 +2527,9 @@
public function touch() {
$id = $this->getId();
if ( $id ) {
-   $key = wfMemcKey( 'user-quicktouched', 'id', $id );
-   ObjectCache::getMainWANInstance()->touchCheckKey( $key 
);
+   $cache = 
MediaWikiServices::getInstance()->getMainWANObjectCache();
+   $key = $cache->makeKey( 'user-quicktouched', 'id', $id 
);
+   $cache->touchCheckKey( $key );
$this->mQuickTouched = null;
}
}
@@ -2555,8 +2556,8 @@
 
if ( $this->mId ) {
if ( $this->mQuickTouched === null ) {
-   $key = wfMemcKey( 'user-quicktouched', 'id', 
$this->mId );
-   $cache = ObjectCache::getMainWANInstance();
+   $cache = 
MediaWikiServices::getInstance()->getMainWANObjectCache();
+   $key = $cache->makeKey( 'user-quicktouched', 
'id', $this->mId );
 
$this->mQuickTouched = wfTimestamp( TS_MW, 
$cache->getCheckKeyTime( $key ) );
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: parser: Avoid deprecated wfMemcKey()

2017-05-25 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355644 )

Change subject: parser: Avoid deprecated wfMemcKey()
..

parser: Avoid deprecated wfMemcKey()

Tested that parser cache keys stay the same, before and after this
change.

Also use the more obvious ObjectCache::getLocalClusterInstance() instead
of looking up the main cache type in config and using
ObjectCache::getInstance().

Change-Id: Icef646b3c05e732ef4079d6900e6bce111debf2b
---
M includes/parser/ParserCache.php
M includes/parser/Preprocessor.php
2 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/355644/1

diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php
index f76c0b5..76a7e1e 100644
--- a/includes/parser/ParserCache.php
+++ b/includes/parser/ParserCache.php
@@ -67,7 +67,7 @@
$pageid = $article->getId();
$renderkey = (int)( $wgRequest->getVal( 'action' ) == 'render' 
);
 
-   $key = wfMemcKey( 'pcache', 'idhash', 
"{$pageid}-{$renderkey}!{$hash}" );
+   $key = $this->mMemc->makeKey( 'pcache', 'idhash', 
"{$pageid}-{$renderkey}!{$hash}" );
return $key;
}
 
@@ -76,7 +76,7 @@
 * @return mixed|string
 */
protected function getOptionsKey( $page ) {
-   return wfMemcKey( 'pcache', 'idoptions', $page->getId() );
+   return $this->mMemc->makeKey( 'pcache', 'idoptions', 
$page->getId() );
}
 
/**
diff --git a/includes/parser/Preprocessor.php b/includes/parser/Preprocessor.php
index cb8e3a7..24474d5 100644
--- a/includes/parser/Preprocessor.php
+++ b/includes/parser/Preprocessor.php
@@ -72,12 +72,12 @@
return false;
}
 
-   $key = wfMemcKey(
+   $cache = ObjectCache::getLocalClusterInstance();
+   $key = $cache->makeKey(
defined( 'static::CACHE_PREFIX' ) ? 
static::CACHE_PREFIX : static::class,
md5( $text ), $flags );
$value = sprintf( "%08d", static::CACHE_VERSION ) . $tree;
 
-   $cache = ObjectCache::getInstance( $config->get( 
'MainCacheType' ) );
$cache->set( $key, $value, 86400 );
 
LoggerFactory::getInstance( 'Preprocessor' )
@@ -101,9 +101,9 @@
return false;
}
 
-   $cache = ObjectCache::getInstance( $config->get( 
'MainCacheType' ) );
+   $cache = ObjectCache::getLocalClusterInstance();
 
-   $key = wfMemcKey(
+   $key = $cache->makeKey(
defined( 'static::CACHE_PREFIX' ) ? 
static::CACHE_PREFIX : static::class,
md5( $text ), $flags );
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add Code of Conduct footer links to wikitech and mw.o

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

Change subject: Add Code of Conduct footer links to wikitech and mw.o
..


Add Code of Conduct footer links to wikitech and mw.o

Not using the 'wikitech' dbgroup for the labswiki & labstestwiki config
because there was another config patch which malfunctioned when using
the dbgroup.

Depends-On: I26d0618fc6d3e7ad96c24ae46b189e51f8cc3f00
Change-Id: I1b4b79b9abc210a64ae5f9b63915863b62c5ae78
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 79ca61d..50af02a 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1170,6 +1170,15 @@
return true;
};
 }
+if ( $wmgUseFooterCodeOfConductLink ) {
+   $wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) 
{
+   $contactLink = Html::element( 'a', [ 'href' => $sk->msg( 
'wm-codeofconduct-url' )->escaped() ],
+   $sk->msg( 'wm-codeofconduct' )->text() );
+   $tpl->set( 'wm-codeofconduct', $contactLink );
+   $tpl->data['footerlinks']['places'][] = 'wm-codeofconduct';
+   return true;
+   };
+}
 
 // T35186: turn off incomplete feature action=imagerotate
 $wgAPIModules['imagerotate'] = 'ApiDisabled';
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5c79619..4711cb8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12863,6 +12863,13 @@
'ukwiki' => true, // T104924
 ],
 
+'wmgUseFooterCodeOfConductLink' => [
+   'default' => false,
+   'mediawikiwiki' => true,
+   'labswiki' => true,
+   'labstestwiki' => true,
+],
+
 'wgMaxMsgCacheEntrySize' => [
'default' => 1024,
 ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b4b79b9abc210a64ae5f9b63915863b62c5ae78
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Thcipriani 
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...UploadWizard[master]: Unbreak usages of $.fn.makeCollapsible with custom `` toggle

2017-05-25 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355642 )

Change subject: Unbreak usages of $.fn.makeCollapsible with custom `` toggle
..

Unbreak usages of $.fn.makeCollapsible with custom `` toggle

Change 2d95d36a8ed296813e686e9b756c2bb7c306950f in MediaWiki core has
made it so that a collapsible box is never expanded if the target of
the 'click' event is an `` element. Our custom toggles are ``
elements, so they all broke.

Work around the problem by wrapping the clickable contents of the
`` toggles with a ``, so that it becomes the event target.

Bug: T166298
Change-Id: I23ddf6de4c5ac01148446bb98344baadae063462
---
M resources/mw.UploadWizardDetails.js
M resources/mw.UploadWizardLicenseInput.js
M resources/uw.CopyMetadataWidget.js
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/42/355642/1

diff --git a/resources/mw.UploadWizardDetails.js 
b/resources/mw.UploadWizardDetails.js
index 34d7a0a..ec0a254 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -159,7 +159,7 @@
 
$moreDetailsWrapperDiv
.append(
-   $( '' ).text( mw.msg( 
'mwe-upwiz-more-options' ) )
+   $( '' ).append( $( '' ).text( 
mw.msg( 'mwe-upwiz-more-options' ) ) )
.addClass( 
'mwe-upwiz-details-more-options mw-collapsible-toggle mw-collapsible-arrow' ),
$moreDetailsDiv.addClass( 
'mw-collapsible-content' )
)
diff --git a/resources/mw.UploadWizardLicenseInput.js 
b/resources/mw.UploadWizardLicenseInput.js
index 246a6c2..ef8be38 100644
--- a/resources/mw.UploadWizardLicenseInput.js
+++ b/resources/mw.UploadWizardLicenseInput.js
@@ -148,7 +148,7 @@
// if there is a header, make a 
toggle-to-expand div and append inputs there.
$head = $( '' )
.addClass( 
'mwe-upwiz-deed-license-group-head mw-collapsible-toggle mw-collapsible-arrow' )
-   .msg( group.head, input.count );
+   .append( $( '' ).msg( 
group.head, input.count ) );
$body = $( '' ).addClass( 
'mwe-upwiz-deed-license-group-body mw-collapsible-content' );
$group.append( $head, $body 
).makeCollapsible( { collapsed: true } );
}
diff --git a/resources/uw.CopyMetadataWidget.js 
b/resources/uw.CopyMetadataWidget.js
index 6545ab3..3f71973 100644
--- a/resources/uw.CopyMetadataWidget.js
+++ b/resources/uw.CopyMetadataWidget.js
@@ -68,7 +68,7 @@
 
$copyMetadataWrapperDiv
.append(
-   $( '' ).text( mw.msg( 
'mwe-upwiz-copy-metadata' ) )
+   $( '' ).append( $( '' ).text( mw.msg( 
'mwe-upwiz-copy-metadata' ) ) )
.addClass( 
'mwe-upwiz-details-copy-metadata mw-collapsible-toggle mw-collapsible-arrow' ),
$copyMetadataDiv.addClass( 
'mw-collapsible-content' )
)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23ddf6de4c5ac01148446bb98344baadae063462
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: all wikis to 1.30.0-wmf.2

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

Change subject: all wikis to 1.30.0-wmf.2
..


all wikis to 1.30.0-wmf.2

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

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



diff --git a/wikiversions.json b/wikiversions.json
index c1d0cc0..73096d0 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,40 +1,40 @@
 {
-"aawiki": "php-1.30.0-wmf.1",
+"aawiki": "php-1.30.0-wmf.2",
 "aawikibooks": "php-1.30.0-wmf.2",
 "aawiktionary": "php-1.30.0-wmf.2",
-"abwiki": "php-1.30.0-wmf.1",
+"abwiki": "php-1.30.0-wmf.2",
 "abwiktionary": "php-1.30.0-wmf.2",
-"acewiki": "php-1.30.0-wmf.1",
+"acewiki": "php-1.30.0-wmf.2",
 "advisorywiki": "php-1.30.0-wmf.2",
-"adywiki": "php-1.30.0-wmf.1",
-"afwiki": "php-1.30.0-wmf.1",
+"adywiki": "php-1.30.0-wmf.2",
+"afwiki": "php-1.30.0-wmf.2",
 "afwikibooks": "php-1.30.0-wmf.2",
 "afwikiquote": "php-1.30.0-wmf.2",
 "afwiktionary": "php-1.30.0-wmf.2",
-"akwiki": "php-1.30.0-wmf.1",
+"akwiki": "php-1.30.0-wmf.2",
 "akwikibooks": "php-1.30.0-wmf.2",
 "akwiktionary": "php-1.30.0-wmf.2",
-"alswiki": "php-1.30.0-wmf.1",
+"alswiki": "php-1.30.0-wmf.2",
 "alswikibooks": "php-1.30.0-wmf.2",
 "alswikiquote": "php-1.30.0-wmf.2",
 "alswiktionary": "php-1.30.0-wmf.2",
-"amwiki": "php-1.30.0-wmf.1",
+"amwiki": "php-1.30.0-wmf.2",
 "amwikiquote": "php-1.30.0-wmf.2",
 "amwiktionary": "php-1.30.0-wmf.2",
-"angwiki": "php-1.30.0-wmf.1",
+"angwiki": "php-1.30.0-wmf.2",
 "angwikibooks": "php-1.30.0-wmf.2",
 "angwikiquote": "php-1.30.0-wmf.2",
 "angwikisource": "php-1.30.0-wmf.2",
 "angwiktionary": "php-1.30.0-wmf.2",
-"anwiki": "php-1.30.0-wmf.1",
+"anwiki": "php-1.30.0-wmf.2",
 "anwiktionary": "php-1.30.0-wmf.2",
-"arbcom_cswiki": "php-1.30.0-wmf.1",
-"arbcom_dewiki": "php-1.30.0-wmf.1",
-"arbcom_enwiki": "php-1.30.0-wmf.1",
-"arbcom_fiwiki": "php-1.30.0-wmf.1",
-"arbcom_nlwiki": "php-1.30.0-wmf.1",
-"arcwiki": "php-1.30.0-wmf.1",
-"arwiki": "php-1.30.0-wmf.1",
+"arbcom_cswiki": "php-1.30.0-wmf.2",
+"arbcom_dewiki": "php-1.30.0-wmf.2",
+"arbcom_enwiki": "php-1.30.0-wmf.2",
+"arbcom_fiwiki": "php-1.30.0-wmf.2",
+"arbcom_nlwiki": "php-1.30.0-wmf.2",
+"arcwiki": "php-1.30.0-wmf.2",
+"arwiki": "php-1.30.0-wmf.2",
 "arwikibooks": "php-1.30.0-wmf.2",
 "arwikimedia": "php-1.30.0-wmf.2",
 "arwikinews": "php-1.30.0-wmf.2",
@@ -42,80 +42,80 @@
 "arwikisource": "php-1.30.0-wmf.2",
 "arwikiversity": "php-1.30.0-wmf.2",
 "arwiktionary": "php-1.30.0-wmf.2",
-"arzwiki": "php-1.30.0-wmf.1",
-"astwiki": "php-1.30.0-wmf.1",
+"arzwiki": "php-1.30.0-wmf.2",
+"astwiki": "php-1.30.0-wmf.2",
 "astwikibooks": "php-1.30.0-wmf.2",
 "astwikiquote": "php-1.30.0-wmf.2",
 "astwiktionary": "php-1.30.0-wmf.2",
-"aswiki": "php-1.30.0-wmf.1",
+"aswiki": "php-1.30.0-wmf.2",
 "aswikibooks": "php-1.30.0-wmf.2",
 "aswikisource": "php-1.30.0-wmf.2",
 "aswiktionary": "php-1.30.0-wmf.2",
 "auditcomwiki": "php-1.30.0-wmf.2",
-"avwiki": "php-1.30.0-wmf.1",
+"avwiki": "php-1.30.0-wmf.2",
 "avwiktionary": "php-1.30.0-wmf.2",
-"aywiki": "php-1.30.0-wmf.1",
+"aywiki": "php-1.30.0-wmf.2",
 "aywikibooks": "php-1.30.0-wmf.2",
 "aywiktionary": "php-1.30.0-wmf.2",
-"azbwiki": "php-1.30.0-wmf.1",
-"azwiki": "php-1.30.0-wmf.1",
+"azbwiki": "php-1.30.0-wmf.2",
+"azwiki": "php-1.30.0-wmf.2",
 "azwikibooks": "php-1.30.0-wmf.2",
 "azwikiquote": "php-1.30.0-wmf.2",
 "azwikisource": "php-1.30.0-wmf.2",
 "azwiktionary": "php-1.30.0-wmf.2",
-"barwiki": "php-1.30.0-wmf.1",
-"bat_smgwiki": "php-1.30.0-wmf.1",
-"bawiki": "php-1.30.0-wmf.1",
+"barwiki": "php-1.30.0-wmf.2",
+"bat_smgwiki": "php-1.30.0-wmf.2",
+"bawiki": "php-1.30.0-wmf.2",
 "bawikibooks": "php-1.30.0-wmf.2",
-"bclwiki": "php-1.30.0-wmf.1",
+"bclwiki": "php-1.30.0-wmf.2",
 "bdwikimedia": "php-1.30.0-wmf.2",
-"be_x_oldwiki": "php-1.30.0-wmf.1",
+"be_x_oldwiki": "php-1.30.0-wmf.2",
 "betawikiversity": "php-1.30.0-wmf.2",
-"bewiki": "php-1.30.0-wmf.1",
+"bewiki": "php-1.30.0-wmf.2",
 "bewikibooks": "php-1.30.0-wmf.2",
 "bewikimedia": "php-1.30.0-wmf.2",
 "bewikiquote": "php-1.30.0-wmf.2",
 "bewikisource": "php-1.30.0-wmf.2",
 "bewiktionary": "php-1.30.0-wmf.2",
-"bgwiki": "php-1.30.0-wmf.1",
+"bgwiki": "php-1.30.0-wmf.2",
 "bgwikibooks": "php-1.30.0-wmf.2",
 "bgwikinews": "php-1.30.0-wmf.2",
 "bgwikiquote": "php-1.30.0-wmf.2",
 "bgwikisource": "php-1.30.0-wmf.2",
 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: all wikis to 1.30.0-wmf.2

2017-05-25 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355641 )

Change subject: all wikis to 1.30.0-wmf.2
..

all wikis to 1.30.0-wmf.2

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


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

diff --git a/wikiversions.json b/wikiversions.json
index c1d0cc0..73096d0 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,40 +1,40 @@
 {
-"aawiki": "php-1.30.0-wmf.1",
+"aawiki": "php-1.30.0-wmf.2",
 "aawikibooks": "php-1.30.0-wmf.2",
 "aawiktionary": "php-1.30.0-wmf.2",
-"abwiki": "php-1.30.0-wmf.1",
+"abwiki": "php-1.30.0-wmf.2",
 "abwiktionary": "php-1.30.0-wmf.2",
-"acewiki": "php-1.30.0-wmf.1",
+"acewiki": "php-1.30.0-wmf.2",
 "advisorywiki": "php-1.30.0-wmf.2",
-"adywiki": "php-1.30.0-wmf.1",
-"afwiki": "php-1.30.0-wmf.1",
+"adywiki": "php-1.30.0-wmf.2",
+"afwiki": "php-1.30.0-wmf.2",
 "afwikibooks": "php-1.30.0-wmf.2",
 "afwikiquote": "php-1.30.0-wmf.2",
 "afwiktionary": "php-1.30.0-wmf.2",
-"akwiki": "php-1.30.0-wmf.1",
+"akwiki": "php-1.30.0-wmf.2",
 "akwikibooks": "php-1.30.0-wmf.2",
 "akwiktionary": "php-1.30.0-wmf.2",
-"alswiki": "php-1.30.0-wmf.1",
+"alswiki": "php-1.30.0-wmf.2",
 "alswikibooks": "php-1.30.0-wmf.2",
 "alswikiquote": "php-1.30.0-wmf.2",
 "alswiktionary": "php-1.30.0-wmf.2",
-"amwiki": "php-1.30.0-wmf.1",
+"amwiki": "php-1.30.0-wmf.2",
 "amwikiquote": "php-1.30.0-wmf.2",
 "amwiktionary": "php-1.30.0-wmf.2",
-"angwiki": "php-1.30.0-wmf.1",
+"angwiki": "php-1.30.0-wmf.2",
 "angwikibooks": "php-1.30.0-wmf.2",
 "angwikiquote": "php-1.30.0-wmf.2",
 "angwikisource": "php-1.30.0-wmf.2",
 "angwiktionary": "php-1.30.0-wmf.2",
-"anwiki": "php-1.30.0-wmf.1",
+"anwiki": "php-1.30.0-wmf.2",
 "anwiktionary": "php-1.30.0-wmf.2",
-"arbcom_cswiki": "php-1.30.0-wmf.1",
-"arbcom_dewiki": "php-1.30.0-wmf.1",
-"arbcom_enwiki": "php-1.30.0-wmf.1",
-"arbcom_fiwiki": "php-1.30.0-wmf.1",
-"arbcom_nlwiki": "php-1.30.0-wmf.1",
-"arcwiki": "php-1.30.0-wmf.1",
-"arwiki": "php-1.30.0-wmf.1",
+"arbcom_cswiki": "php-1.30.0-wmf.2",
+"arbcom_dewiki": "php-1.30.0-wmf.2",
+"arbcom_enwiki": "php-1.30.0-wmf.2",
+"arbcom_fiwiki": "php-1.30.0-wmf.2",
+"arbcom_nlwiki": "php-1.30.0-wmf.2",
+"arcwiki": "php-1.30.0-wmf.2",
+"arwiki": "php-1.30.0-wmf.2",
 "arwikibooks": "php-1.30.0-wmf.2",
 "arwikimedia": "php-1.30.0-wmf.2",
 "arwikinews": "php-1.30.0-wmf.2",
@@ -42,80 +42,80 @@
 "arwikisource": "php-1.30.0-wmf.2",
 "arwikiversity": "php-1.30.0-wmf.2",
 "arwiktionary": "php-1.30.0-wmf.2",
-"arzwiki": "php-1.30.0-wmf.1",
-"astwiki": "php-1.30.0-wmf.1",
+"arzwiki": "php-1.30.0-wmf.2",
+"astwiki": "php-1.30.0-wmf.2",
 "astwikibooks": "php-1.30.0-wmf.2",
 "astwikiquote": "php-1.30.0-wmf.2",
 "astwiktionary": "php-1.30.0-wmf.2",
-"aswiki": "php-1.30.0-wmf.1",
+"aswiki": "php-1.30.0-wmf.2",
 "aswikibooks": "php-1.30.0-wmf.2",
 "aswikisource": "php-1.30.0-wmf.2",
 "aswiktionary": "php-1.30.0-wmf.2",
 "auditcomwiki": "php-1.30.0-wmf.2",
-"avwiki": "php-1.30.0-wmf.1",
+"avwiki": "php-1.30.0-wmf.2",
 "avwiktionary": "php-1.30.0-wmf.2",
-"aywiki": "php-1.30.0-wmf.1",
+"aywiki": "php-1.30.0-wmf.2",
 "aywikibooks": "php-1.30.0-wmf.2",
 "aywiktionary": "php-1.30.0-wmf.2",
-"azbwiki": "php-1.30.0-wmf.1",
-"azwiki": "php-1.30.0-wmf.1",
+"azbwiki": "php-1.30.0-wmf.2",
+"azwiki": "php-1.30.0-wmf.2",
 "azwikibooks": "php-1.30.0-wmf.2",
 "azwikiquote": "php-1.30.0-wmf.2",
 "azwikisource": "php-1.30.0-wmf.2",
 "azwiktionary": "php-1.30.0-wmf.2",
-"barwiki": "php-1.30.0-wmf.1",
-"bat_smgwiki": "php-1.30.0-wmf.1",
-"bawiki": "php-1.30.0-wmf.1",
+"barwiki": "php-1.30.0-wmf.2",
+"bat_smgwiki": "php-1.30.0-wmf.2",
+"bawiki": "php-1.30.0-wmf.2",
 "bawikibooks": "php-1.30.0-wmf.2",
-"bclwiki": "php-1.30.0-wmf.1",
+"bclwiki": "php-1.30.0-wmf.2",
 "bdwikimedia": "php-1.30.0-wmf.2",
-"be_x_oldwiki": "php-1.30.0-wmf.1",
+"be_x_oldwiki": "php-1.30.0-wmf.2",
 "betawikiversity": "php-1.30.0-wmf.2",
-"bewiki": "php-1.30.0-wmf.1",
+"bewiki": "php-1.30.0-wmf.2",
 "bewikibooks": "php-1.30.0-wmf.2",
 "bewikimedia": "php-1.30.0-wmf.2",
 "bewikiquote": "php-1.30.0-wmf.2",
 "bewikisource": "php-1.30.0-wmf.2",
 "bewiktionary": "php-1.30.0-wmf.2",
-"bgwiki": "php-1.30.0-wmf.1",
+"bgwiki": "php-1.30.0-wmf.2",
 "bgwikibooks": "php-1.30.0-wmf.2",
 "bgwikinews": "php-1.30.0-wmf.2",
 "bgwikiquote": "php-1.30.0-wmf.2",
 "bgwikisource": "php-1.30.0-wmf.2",
 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: avoid r...@wm.org mail alias in labs

2017-05-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355640 )

Change subject: phabricator: avoid r...@wm.org mail alias in labs
..

phabricator: avoid r...@wm.org mail alias in labs

Do not use r...@wikimedia.org as root mail alias if not
in production, causing spam for prod roots if applied in labs.

Default to r...@wmflabs.org so we don't have to rely on Hiera
settings in Labs.

Yes, this Hiera lookup and the others around it should all become
parameters of the class, i will do that separately though.

Change-Id: I09c31c083410195aa1f6855959028d2bdf56599a
---
M hieradata/role/common/phabricator_server.yaml
M modules/profile/manifests/phabricator/main.pp
2 files changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/hieradata/role/common/phabricator_server.yaml 
b/hieradata/role/common/phabricator_server.yaml
index 869e978..496e106 100644
--- a/hieradata/role/common/phabricator_server.yaml
+++ b/hieradata/role/common/phabricator_server.yaml
@@ -16,6 +16,8 @@
   - phab1001.eqiad.wmnet
   - phab2001.codfw.wmnet
 
+phabricator_root_mail_alias: 'r...@wikimedia.org'
+
 profile::base::domain_search:
   - eqiad.wmnet
   - codfw.wmnet
@@ -40,4 +42,4 @@
 version: 5
 roles:
   read: true
-  write: true
\ No newline at end of file
+  write: true
diff --git a/modules/profile/manifests/phabricator/main.pp 
b/modules/profile/manifests/phabricator/main.pp
index 881b2bf..f5cb08c 100644
--- a/modules/profile/manifests/phabricator/main.pp
+++ b/modules/profile/manifests/phabricator/main.pp
@@ -3,8 +3,10 @@
 # filtertags: labs-project-deployment-prep labs-project-phabricator
 class profile::phabricator::main {
 
+$root_mail_alias = hiera('phabricator_root_mail_alias', 'r...@wmflabs.org')
+
 mailalias { 'root':
-recipient => 'r...@wikimedia.org',
+recipient => $root_mail_alias,
 }
 
 include passwords::phabricator

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09c31c083410195aa1f6855959028d2bdf56599a
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...parsoid[master]: Don't modify passed in apiConf

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

Change subject: Don't modify passed in apiConf
..


Don't modify passed in apiConf

 * It prevents reuse of parsoidOptions, relevant to an upcoming patch.

Change-Id: Ic27f1e0feba0ae5c3e172d70f0b4c2d6ec079ca2
---
M lib/config/ParsoidConfig.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index 8104935..7ad 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -458,11 +458,14 @@
} else if (typeof arguments[1] === 'object') {
// Note that `apiConf` is aliased to `arguments[0]`.
prefix = arguments[0];
-   apiConf = arguments[1]; // overwrites `arguments[0]`
+   apiConf = Object.assign({}, arguments[1]);  // 
overwrites `arguments[0]`
apiConf.prefix = prefix;
} else {
apiConf = { uri: arguments[0] };
}
+   } else {
+   console.assert(typeof apiConf === 'object');
+   apiConf = Object.assign({}, apiConf);  // Don't modify the 
passed in object
}
console.assert(apiConf.uri, "Action API uri is mandatory.");
if (!apiConf.prefix) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic27f1e0feba0ae5c3e172d70f0b4c2d6ec079ca2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Correctly test warning in TestTerminalOutput.test_output_stdout

2017-05-25 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355639 )

Change subject: Correctly test warning in TestTerminalOutput.test_output_stdout
..

Correctly test warning in TestTerminalOutput.test_output_stdout

Instead of testing for a given output, check that the correct
warning is triggered in the warning library.

Change-Id: Ibb83ac2504547e9feef241a7ceb159d8b4f84311
---
M tests/ui_tests.py
1 file changed, 10 insertions(+), 5 deletions(-)


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

diff --git a/tests/ui_tests.py b/tests/ui_tests.py
index 75fd646..3de74e0 100644
--- a/tests/ui_tests.py
+++ b/tests/ui_tests.py
@@ -33,6 +33,7 @@
 import subprocess
 import sys
 import time
+import warnings
 
 if os.name == "nt":
 from multiprocessing.managers import BaseManager
@@ -285,11 +286,15 @@
 self.assertEqual(newstderr.getvalue(), 'output\n')
 
 def test_output_stdout(self):
-pywikibot.output('output', toStdout=True)
-self.assertEqual(newstdout.getvalue(), 'output\n')
-self.assertIn('DeprecationWarning: "toStdout" parameter is '
-  'deprecated; use pywikibot.stdout() instead.\n',
-  newstderr.getvalue(),)
+with warnings.catch_warnings(record=True) as w:
+pywikibot.output('output', toStdout=True)
+self.assertEqual(newstdout.getvalue(), 'output\n')
+self.assertEqual(len(w), 1)
+self.assertEqual(w[0].category, DeprecationWarning)
+self.assertEqual(
+w[0].message.message,
+'"toStdout" parameter is deprecated; use pywikibot.stdout() 
instead.'
+)
 
 def test_stdout(self):
 pywikibot.stdout('output')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb83ac2504547e9feef241a7ceb159d8b4f84311
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Update kafka.sh wrapper script for Kafka 0.10+

2017-05-25 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/355259 )

Change subject: Update kafka.sh wrapper script for Kafka 0.10+
..


Update kafka.sh wrapper script for Kafka 0.10+

This is safe to be merged now, but it will break some
uses of the kafka wrapper script in older Kafka versions.
Specifically, kafka console-consumer will not work, as it
requires --zookeeper in the older Kafka version, but the newer
one expects --bootstrap-server.

If you need to use the console-consumer, you can bypass this
wrapper script to use /usr/bin/kafka-console-consumer and
manually pass --zookeeper $KAFKA_ZOOKEEPER_URL directly.

Bug: T166164
Change-Id: Ibd24d7f7dd1d897493ed6a61db4704b72954aa25
---
M modules/confluent/files/kafka/kafka.sh
M modules/confluent/templates/kafka/kafka-profile.sh.erb
2 files changed, 44 insertions(+), 21 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved
  Elukey: Looks good to me, but someone else must approve



diff --git a/modules/confluent/files/kafka/kafka.sh 
b/modules/confluent/files/kafka/kafka.sh
index e7db2bb..3ef3d65 100755
--- a/modules/confluent/files/kafka/kafka.sh
+++ b/modules/confluent/files/kafka/kafka.sh
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# NOTE:  This file is managed by Puppet
+
 SCRIPT_NAME=$(basename "$0")
 
 commands=$(ls /usr/bin/kafka-* | xargs -n 1 basename | sed 's@kafka-@  @g')
@@ -8,9 +10,9 @@
 $SCRIPT_NAME  [options]
 
 Handy wrapper around various kafka-* scripts.  Set the environment variables
-ZOOKEEPER_URL and BROKER_LIST so you don't have to keep typing
---zookeeper-connect or --broker-list each time you want to use a kafka-*
-script.
+KAFKA_ZOOKEEPER_URL, KAFKA_BOOTSTRAP_SERVERS so you don't have to keep typing
+--zookeeper-connect, --broker-list or --bootstrap-server each time you want to
+use a kafka-* script.
 
 Usage:
 
@@ -20,11 +22,14 @@
 $commands
 
 Environment Variables:
-  ZOOKEEPER_URL - If this is set, any commands that take a --zookeeper flag 
will be given this value.
-  BROKER_LIST   - If this is set, any commands that take a --broker-list flag 
will be given this value.
+  KAFKA_ZOOKEEPER_URL - If this is set, any commands that take a 
--zookeeper
+flag will be given this value.
+  KAFKA_BOOTSTRAP_SERVERS - If this is set, any commands that take a 
--broker-list or
+--bootstrap-server flag will be given this value.
 "
 
-if [ -z "${1}" -o ${1:0:1} == '-' ]; then
+# Print usage if no  given, or $1 starts with '-'
+if [ -z "${1}" -o "${1:0:1}" == '-' ]; then
 echo "${USAGE}"
 exit 1
 fi
@@ -33,34 +38,49 @@
 command="kafka-${1}"
 shift
 
-# Set ZOOKEEPER_OPT if ZOOKEEPER_URL is set and --zookeeper has not
+# Set KAFKA_ZOOKEEPER_OPT if ZOOKEEPER_URL is set and --zookeeper has not
 # also been passed in as a CLI arg.  This will be included
 # in command functions that take a --zookeeper argument.
-if [ -n "${ZOOKEEPER_URL}" -a -z "$(echo $@ | grep -- --zookeeper)" ]; then
-ZOOKEEPER_OPT="--zookeeper ${ZOOKEEPER_URL}"
+if [ -n "${KAFKA_ZOOKEEPER_URL}" -a -z "$(echo $@ | grep -- --zookeeper)" ]; 
then
+ZOOKEEPER_OPT="--zookeeper ${KAFKA_ZOOKEEPER_URL}"
 fi
 
-# Set BROKER_LIST_OPT if BROKER_LIST is set and --broker-list has not
+# Set BROKER_LIST_OPT if KAFKA_BOOTSTRAP_SERVERS is set and --broker-list has 
not
 # also been passed in as a CLI arg.  This will be included
 # in command functions that take a --broker-list argument.
-if [ -n "${BROKER_LIST}" -a -z "$(echo $@ | grep -- --broker-list)" ]; then
-BROKER_LIST_OPT="--broker-list ${BROKER_LIST}"
+if [ -n "${KAFKA_BOOTSTRAP_SERVERS}" -a -z "$(echo $@ | grep -- 
--broker-list)" ]; then
+BROKER_LIST_OPT="--broker-list ${KAFKA_BOOTSTRAP_SERVERS}"
 fi
 
-# Each of these lists signifies that either --broker-list or --zookeeper needs
-# to be given to the $command.  If $command matches one of these, then we
-# will add the opt if it is not provided already in $@.
+# Set BOOTSTRAP_SERVER_OPT if KAFKA_BOOTSTRAP_SERVERS is set and 
--bootstrap-server has not
+# also been passed in as a CLI arg.  This will be included
+# in command functions that take a --bootstrap-server argument.
+if [ -n "${KAFKA_BOOTSTRAP_SERVERS}" -a -z "$(echo $@ | grep -- 
--bootstrap-server)" ]; then
+BOOTSTRAP_SERVER_OPT="--bootstrap-server ${KAFKA_BOOTSTRAP_SERVERS}"
+fi
+
+# Each of these lists signifies that either --broker-list, --bootstrap-server,
+# or --zookeeper needs to be given to the $command.  If $command matches one 
of these,
+# then we will add the opt if it is not provided already in $@.
+# Until https://issues.apache.org/jira/browse/KAFKA-4307 is available, there 
are
+# inconsistencies in broker CLI parameters.  Some use --bootstrap-server, 
others
+# use --broker-list, so we have to support both for now.
+# --broker-list should be removed in later versions in favor of 
--bootstrap-server
 

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Forward request data to ORES API

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

Change subject: Forward request data to ORES API
..


Forward request data to ORES API

Bug: T161029
Change-Id: I3cad8e0939033b75dc960a53fbc73a63e39414ca
Depends-On: I16a2eec46ae9e0e242fe740be20e39a2422dc867
---
M includes/Api.php
M includes/ApiHooks.php
M includes/FetchScoreJob.php
M includes/Hooks.php
M includes/Scoring.php
M includes/Stats.php
6 files changed, 72 insertions(+), 7 deletions(-)

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



diff --git a/includes/Api.php b/includes/Api.php
index c3c2941..daf74aa 100644
--- a/includes/Api.php
+++ b/includes/Api.php
@@ -5,12 +5,34 @@
 use FormatJson;
 use MediaWiki\Logger\LoggerFactory;
 use MWHttpRequest;
+use RequestContext;
 use RuntimeException;
+use WebRequest;
 
 /**
  * Common methods for accessing an ORES server.
  */
 class Api {
+   /** @var WebRequest|string[]|null */
+   private $originalRequest;
+
+   /**
+* @return Api
+*/
+   public static function newFromContext() {
+   $self = new self();
+   if ( empty( $GLOBALS['wgCommandLineMode'] ) ) {
+   $self->setOriginalRequest( 
RequestContext::getMain()->getRequest() );
+   }
+   return $self;
+   }
+
+   /**
+* @param WebRequest|string[] $originalRequest See 
MwHttpRequest::setOriginalRequest()
+*/
+   public function setOriginalRequest( $originalRequest ) {
+   $this->originalRequest = $originalRequest;
+   }
 
/**
 * @param string|null $model Name of the model to query
@@ -46,7 +68,7 @@
$params['format'] = 'json';
$url = wfAppendQuery( $url, $params );
$logger->debug( "Requesting: {$url}" );
-   $req = MWHttpRequest::factory( $url, null, __METHOD__ );
+   $req = MWHttpRequest::factory( $url, 
$this->getMWHttpRequestOptions(), __METHOD__ );
$status = $req->execute();
if ( !$status->isOK() ) {
throw new RuntimeException( "Failed to make ORES 
request to [{$url}], "
@@ -61,4 +83,8 @@
return $data;
}
 
+   protected function getMWHttpRequestOptions() {
+   return $this->originalRequest ? [ 'originalRequest' => 
$this->originalRequest ] : [];
+   }
+
 }
diff --git a/includes/ApiHooks.php b/includes/ApiHooks.php
index f4768c0..6442bd6 100644
--- a/includes/ApiHooks.php
+++ b/includes/ApiHooks.php
@@ -14,6 +14,7 @@
 use DeferredUpdates;
 use JobQueueGroup;
 use MediaWiki\Logger\LoggerFactory;
+use RequestContext;
 use Title;
 use ResultWrapper;
 use WatchedItem;
@@ -265,8 +266,16 @@
$chunks = array_chunk( $revids, 
$wgOresRevisionsPerBatch );
$revids = array_shift( $chunks );
$title = Title::makeTitle( NS_SPECIAL, 
'Badtitle/API batch score fetch' );
+   $request = 
RequestContext::getMain()->getRequest();
foreach ( array_slice( $chunks, 0, 
$wgOresAPIMaxBatchJobs ) as $batch ) {
-   $job = new FetchScoreJob( $title, [ 
'revid' => $batch, 'extra_params' => [] ] );
+   $job = new FetchScoreJob( $title, [
+   'revid' => $batch,
+   'originalRequest' => [
+   'ip' => 
$request->getIP(),
+   'userAgent' => 
$request->getHeader( 'User-Agent' ),
+   ],
+   'extra_params' => [],
+   ] );
JobQueueGroup::singleton()->push( $job 
);
}
}
diff --git a/includes/FetchScoreJob.php b/includes/FetchScoreJob.php
index f18b255..0d2a965 100644
--- a/includes/FetchScoreJob.php
+++ b/includes/FetchScoreJob.php
@@ -10,7 +10,10 @@
 
/**
 * @param Title $title
-* @param array $params 'revid' key
+* @param array $params
+*   - 'revid': (int|int[]) revision IDs for which to fetch the score
+*   - 'originalRequest': (string[]) request data to forward to the 
upstream API;
+*   see MwHttpRequest::setOriginalRequest()
 */
public function __construct( Title $title, array $params ) {
$expensive = is_array( $params['revid'] );
@@ -50,8 +53,11 @@
}
 
$logger->info( 'Fetching scores for revision ' . json_encode( 
$this->params ) );
-   $scores = 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove UseMathJax from CommonSettings.php

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

Change subject: Remove UseMathJax from CommonSettings.php
..


Remove UseMathJax from CommonSettings.php

Bug: T165475
Change-Id: I19c9c7128115d47dd1a42689f36b2673d64a7ba0
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index df4ecdb..79ca61d 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2372,7 +2372,7 @@
if ( $wmgUseMathML && $wmgUseRestbaseVRS ) {
$wgDefaultUserOptions['math'] = 'mathml';
}
-   $wgUseMathJax  = true;
+
// This variable points to non-WMF servers by default.
// Prevent accidental use.
$wgMathLaTeXMLUrl = null;

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Allow *even more* widgets to be focussed programatically

2017-05-25 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355638 )

Change subject: Allow *even more* widgets to be focussed programatically
..

Allow *even more* widgets to be focussed programatically

A few widgets were missing a .focus() method, but can be meaningfully
focussed. In all these cases, we just focus the first item.

* ButtonGroupWidget
* CheckboxMultiselectWidget
* CheckboxMultiselectInputWidget

Follow-up to 383d0c89477e2a65d700d6e9c31ac352a1f7a97b.

Change-Id: I5dfc9b3fddf03df229e1994dbe517423bc106e69
---
M src/widgets/ButtonGroupWidget.js
M src/widgets/CheckboxMultiselectInputWidget.js
M src/widgets/CheckboxMultiselectWidget.js
3 files changed, 36 insertions(+), 0 deletions(-)


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

diff --git a/src/widgets/ButtonGroupWidget.js b/src/widgets/ButtonGroupWidget.js
index 9d297f0..ea55e68 100644
--- a/src/widgets/ButtonGroupWidget.js
+++ b/src/widgets/ButtonGroupWidget.js
@@ -59,3 +59,17 @@
  * @inheritdoc
  */
 OO.ui.ButtonGroupWidget.static.tagName = 'span';
+
+/* Methods */
+
+/**
+ * @inheritdoc
+ */
+OO.ui.ButtonGroupWidget.prototype.focus = function () {
+   if ( !this.isDisabled() ) {
+   if ( this.items[ 0 ] ) {
+   this.items[ 0 ].focus();
+   }
+   }
+   return this;
+};
diff --git a/src/widgets/CheckboxMultiselectInputWidget.js 
b/src/widgets/CheckboxMultiselectInputWidget.js
index 6e3ce69..09801bb 100644
--- a/src/widgets/CheckboxMultiselectInputWidget.js
+++ b/src/widgets/CheckboxMultiselectInputWidget.js
@@ -175,3 +175,11 @@
 
return this;
 };
+
+/**
+ * @inheritdoc
+ */
+OO.ui.CheckboxMultiselectInputWidget.prototype.focus = function () {
+   this.checkboxMultiselectWidget.focus();
+   return this;
+};
diff --git a/src/widgets/CheckboxMultiselectWidget.js 
b/src/widgets/CheckboxMultiselectWidget.js
index d4d3f74..24e76e9 100644
--- a/src/widgets/CheckboxMultiselectWidget.js
+++ b/src/widgets/CheckboxMultiselectWidget.js
@@ -135,3 +135,17 @@
this.$lastClicked = $nowClicked;
}
 };
+
+/**
+ * @inheritdoc
+ */
+OO.ui.CheckboxMultiselectWidget.prototype.focus = function () {
+   var item;
+   if ( !this.isDisabled() ) {
+   item = this.getRelativeFocusableItem( null, 1 );
+   if ( item ) {
+   item.focus();
+   }
+   }
+   return this;
+};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5dfc9b3fddf03df229e1994dbe517423bc106e69
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove special Math extension settings for hewiki

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

Change subject: Remove special Math extension settings for hewiki
..


Remove special Math extension settings for hewiki

In the discussion in the Hebrew Wikipedia everybody supported it:
http://bit.ly/2r63zec

(This reverts commit 47641556bad3f29f1693407874dcd8f129057248.)

Change-Id: I055b76c5f8f3ccabf37342422a664dd425dd073d
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 0bd4f8f..df4ecdb 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2369,9 +2369,7 @@
$wgMathTexvcCheckExecutable = '/usr/bin/texvccheck';
$wgMathCheckFiles = false;
 
-   if ( $wgDBname === 'hewiki' ) {
-   $wgDefaultUserOptions['math'] = 0;
-   } elseif ( $wmgUseMathML && $wmgUseRestbaseVRS ) {
+   if ( $wmgUseMathML && $wmgUseRestbaseVRS ) {
$wgDefaultUserOptions['math'] = 'mathml';
}
$wgUseMathJax  = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I055b76c5f8f3ccabf37342422a664dd425dd073d
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Thcipriani 
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...MediaWikiFarm[master]: Refactoring: extraction of configuration compilation

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

Change subject: Refactoring: extraction of configuration compilation
..


Refactoring: extraction of configuration compilation

The main class MediaWikiFarm had a lot of responsabilities, one of those was
to compile configuration for a specific wiki. This commits splits out this
configuration compilation into a dedicated class. In number of lines, the
main class MediaWikiFarm drops from 2030 to 1427.

This is a first step to more refactoring to create smaller functions and
possibly multiple classes, in order to facilitate long-term maintenance and
improve understanding. Possibly the 'existence' feature inside the main
class will be also splitted out into a dedicated class, which would become
sort of a (dependency injection) container.

BTW, updated PHPCS rule exceptions for PHPCS-MediaWiki 0.8.

Change-Id: I54d4d2739215f9cc4f59fb2671d2cd7e797d16f9
---
M docs/config/farms.php
M extension.json
M phpcs.xml
M src/MediaWikiFarm.php
M src/MediaWikiFarmComposerScript.php
A src/MediaWikiFarmConfiguration.php
M tests/perfs/MediaWikiFarmTestPerfs.php
M tests/phpunit/ConfigurationTest.php
M tests/phpunit/ConstructionTest.php
M tests/phpunit/InstallationIndependantTest.php
M tests/phpunit/LoadingTest.php
M tests/phpunit/MediaWikiFarmComposerScriptTest.php
M tests/phpunit/MediaWikiFarmScriptTest.php
M tests/phpunit/MediaWikiFarmTestCase.php
M tests/phpunit/MultiversionInstallationTest.php
15 files changed, 1,055 insertions(+), 788 deletions(-)

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



diff --git a/docs/config/farms.php b/docs/config/farms.php
index 317d726..cc285e4 100644
--- a/docs/config/farms.php
+++ b/docs/config/farms.php
@@ -16,7 +16,9 @@
),
 );
 
+// @codingStandardsIgnoreStart 
MediaWiki.Commenting.IllegalSingleLineComment.MissingCommentEndding
 /*
+
 return array(
 
# Configuration similar to the Wikimedia farm
@@ -94,4 +96,5 @@
'redirect' => '$client-$wiki.example.com',
),
 );
+
 */
diff --git a/extension.json b/extension.json
index 0526ebb..5bd8da9 100644
--- a/extension.json
+++ b/extension.json
@@ -29,6 +29,7 @@
},
"AutoloadClasses": {
"MediaWikiFarm": "src/MediaWikiFarm.php",
+   "MediaWikiFarmConfiguration": 
"src/MediaWikiFarmConfiguration.php",
"AbstractMediaWikiFarmScript": 
"src/AbstractMediaWikiFarmScript.php",
"MediaWikiFarmScript": "src/MediaWikiFarmScript.php",
"MediaWikiFarmHooks": "src/Hooks.php",
diff --git a/phpcs.xml b/phpcs.xml
index 9a172ae..f89e22f 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -16,6 +16,18 @@



+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   



diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php
index 6705369..f269008 100644
--- a/src/MediaWikiFarm.php
+++ b/src/MediaWikiFarm.php
@@ -11,6 +11,10 @@
  * PHP 5.2+, so please do not use "new" syntaxes (namespaces, 
arrays with [], etc.).
  */
 
+// @codeCoverageIgnoreStart
+require_once dirname( __FILE__ ) . '/MediaWikiFarmConfiguration.php';
+// @codeCoverageIgnoreEnd
+
 /**
  * Exception triggered when a configuration file is “wrong” or other internal 
issue.
  *
@@ -74,19 +78,8 @@
'$CODE' => '',
);
 
-   /** @var array Environment. */
-   protected $environment = array(
-   'ExtensionRegistry' => null,
-   );
-
-   /** @var array Configuration parameters for this wiki. */
-   protected $configuration = array(
-   'settings' => array(),
-   'arrays' => array(),
-   'extensions' => array(),
-   'execFiles' => array(),
-   'composer' => array(),
-   );
+   /** @var MediaWikiFarmConfiguration|null Object containing the 
configuration of the current (single) wiki. */
+   protected $configuration = null;
 
/** @var array Logs. */
public $log = array();
@@ -110,6 +103,32 @@
return $this->state[$key];
}
return null;
+   }
+
+   /**
+* Get farm this farm code directory.
+*
+* @api
+* @mediawikifarm-const
+* @mediawikifarm-idempotent
+*
+* @return string|null Farm code directory.
+*/
+   function getFarmDir() {
+   return $this->farmDir;
+   }
+
+   /**
+* Get config directory.
+*
+* @api
+* @mediawikifarm-const
+* @mediawikifarm-idempotent
+*
+* @return string|null Config directory.
+*/
+   function 

[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Update getting started and error documentation

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

Change subject: Update getting started and error documentation
..


Update getting started and error documentation

Fix broken links to wikitech documentation and update getting started
documentation and links.

Bug: T166295
Change-Id: Ie953e9c8de8c40ab7d14840f69656198ebeda0b5
---
M www/content/500.php
M www/content/503.php
M www/content/splash.php
3 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/www/content/500.php b/www/content/500.php
index f011017..e839c21 100644
--- a/www/content/500.php
+++ b/www/content/500.php
@@ -22,7 +22,7 @@
 Perhaps its magical script elves are temporarily ill, or the link you've 
followed doesn't actually lead somewhere useful?
 If you're pretty sure this shouldn't be an error, you may wish to notify 
the tool's maintainers (above) about the error and how you ended up here.
 If you maintain this tool
-The error might be caused by incorrect permission, or by an error in the 
script or CGI that was meant to execute here.  You may wish to check your logs 
or https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Logs;>common 
causes for errors in the help documentation.
+The error might be caused by incorrect permission, or by an error in the 
script or CGI that was meant to execute here. Please check the error logs for 
your web service.
 
 Perhaps the webserver has temporarily lost its mind, or the link you've 
followed doesn't actually lead somewhere useful?
 If you're pretty sure this shouldn't be an error, you may wish to notify 
the project administrators about the error and how 
you ended up here.
diff --git a/www/content/503.php b/www/content/503.php
index 75b3897..30a29b1 100644
--- a/www/content/503.php
+++ b/www/content/503.php
@@ -22,7 +22,7 @@
 That tool might not have a web interface, or it may currently be 
disabled.
 If you're pretty sure this shouldn't be an error, you may wish to notify 
the tool's maintainers (above) about the error and how you ended up here.
 If you maintain this tool
-You have not enabled a web service for your tool, or it has stopped working 
because of a fatal error. You may wish to check your logs or https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Logs;>common 
causes for errors in the help documentation.
+You have not enabled a web service for your tool, or it has stopped working 
because of a fatal error. Please check the error logs of your web service.
 
diff --git a/www/content/splash.php b/www/content/splash.php
index 35f92ed..38e8c8f 100644
--- a/www/content/splash.php
+++ b/www/content/splash.php
@@ -1,5 +1,5 @@
 Wikimedia Tool Labs
-Tool Labs (or Tools) is a hosting 
environment for community developers working on tools and bots that help users 
maintain and use Wikimedia wikis. Tool Labs provides access to https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Database;>replicas of 
Wikimedia databases and other services that allow developers to easily 
compute analytics, do bot work, and create tools to help editors and other 
volunteers in their work. The infrastructure is supported by a dedicated https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools;>group of 
Wikimedia Foundation staff and volunteers.
+Tool Labs (or Tools) is a hosting 
environment for community developers working on tools and bots that help users 
maintain and use Wikimedia wikis. Tool Labs provides access to https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Database;>replicas of 
Wikimedia databases and other services that allow developers to easily 
compute analytics, do bot work, and create tools to help editors and other 
volunteers in their work. The infrastructure is supported by a dedicated https://tools.wmflabs.org/openstack-browser/project/tools;>group of 
Wikimedia Foundation staff and volunteers.
 
 Read more about https://wikitech.wikimedia.org/wiki/Portal:Tool_Labs;>Tool Labs on 
wikitech (the Wikimedia technical infrastructure wiki).
 
@@ -11,12 +11,12 @@
 
 Develop your own tool
 
-See also: Getting started and Access
+See also: Getting started
 
 
-https://wikitech.wikimedia.org/w/index.php?title=Special:UserLoginreturnto=Main+Pagetype=signup;>Create
 a Labs account (you must have a Labs account to access the Tools 
project)
-https://wikitech.wikimedia.org/wiki/Special:NovaKey;>Add a public 
SSH key (you will need this to access Labs servers using SSH)
-https://wikitech.wikimedia.org/wiki/Special:FormEdit/Tools_Access_Request;>Request
 access to the Tools project (Join us!)
+https://toolsadmin.wikimedia.org/register/;>Create a new LDAP 
account (you must have an LDAP account to access the Tools project)
+https://toolsadmin.wikimedia.org/profile/settings/ssh-keys;>Add a 
public SSH key (you will need this to access Tools servers using SSH)

[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: Breaking change: Remove Sidebar code from RelatedArticles

2017-05-25 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355637 )

Change subject: Breaking change: Remove Sidebar code from RelatedArticles
..

Breaking change: Remove Sidebar code from RelatedArticles

RelatedArticles will now only render related articles in the footer of
skins.

Bump version to 3.0.0

Bug: T165991
Change-Id: Ia4e28c0ed76b3aff37c0aea8eb713923312ba23c
---
M extension.json
M includes/FooterHooks.php
D includes/SidebarHooks.php
M tests/browser/LocalSettings.php
4 files changed, 1 insertion(+), 125 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedArticles 
refs/changes/37/355637/1

diff --git a/extension.json b/extension.json
index 3532abf..1a0af3e 100644
--- a/extension.json
+++ b/extension.json
@@ -13,7 +13,6 @@
"type": "betafeatures",
"AutoloadClasses": {
"RelatedArticles\\Hooks": "includes/Hooks.php",
-   "RelatedArticles\\SidebarHooks": "includes/SidebarHooks.php",
"RelatedArticles\\FooterHooks": "includes/FooterHooks.php"
},
"ExtensionMessagesFiles": {
@@ -120,8 +119,6 @@
"config": {
"@RelatedArticlesLimit": "Maximum number of articles that 
should be shown in RelatedArticles widget. When set to false no upper limit",
"RelatedArticlesLimit": 3,
-   "RelatedArticlesShowInSidebar": true,
-   "RelatedArticlesShowInFooter": false,
"RelatedArticlesUseCirrusSearch": false,
"RelatedArticlesOnlyUseCirrusSearch": false,
"RelatedArticlesLoggingSamplingRate": 0.01,
diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php
index 097989c..bd4446c 100644
--- a/includes/FooterHooks.php
+++ b/includes/FooterHooks.php
@@ -21,7 +21,7 @@
 *
 * @param array $vars
 * @param OutputPage $out
-* @return boolean Always true
+* @return boolean Always trueincludes/FooterHooks.php
 */
public static function onMakeGlobalVariablesScript( &$vars, OutputPage 
$out ) {
$config = MediaWikiServices::getInstance()->getConfigFactory()
@@ -90,7 +90,6 @@
 * to the output when:
 *
 * 
-*   $wgRelatedArticlesShowInFooter is truthy
 *   On mobile, the output is being rendered with
 * SkinMinervaBeta
 *   The page is in mainspace
@@ -108,13 +107,11 @@
public static function onBeforePageDisplay( OutputPage $out, Skin $skin 
) {
$config = MediaWikiServices::getInstance()->getConfigFactory()
->makeConfig( 'RelatedArticles' );
-   $showReadMore = $config->get( 'RelatedArticlesShowInFooter' );
 
$title = $out->getContext()->getTitle();
$action = $out->getRequest()->getText( 'action', 'view' );
 
if (
-   $showReadMore &&
$title->inNamespace( NS_MAIN ) &&
// T120735
$action === 'view' &&
diff --git a/includes/SidebarHooks.php b/includes/SidebarHooks.php
deleted file mode 100644
index ec7b622..000
--- a/includes/SidebarHooks.php
+++ /dev/null
@@ -1,116 +0,0 @@
-SidebarBeforeOutput hook.
-*
-* Retrieves the list of related pages
-* and adds its HTML representation to the sidebar if the ReadMore 
feature
-* is disabled and the beta feature is enabled by the user.
-*
-* @param Skin $skin
-* @param array $bar
-* @return boolean Always true
-*/
-   public static function onSidebarBeforeOutput( Skin $skin, &$bar ) {
-   $out = $skin->getOutput();
-   $relatedPages = $out->getProperty( 'RelatedArticles' );
-
-   if ( !self::isInSidebar( $relatedPages, $out->getUser() ) ) {
-   return true;
-   }
-
-   $relatedPagesUrls = self::getRelatedPagesUrls( $relatedPages );
-
-   // build relatedarticles 's
-   $relatedPages = [];
-   foreach ( (array) $relatedPagesUrls as $url ) {
-   $relatedPages[] =
-   Html::rawElement( 'li', [ 'class' => 
htmlspecialchars( $url['class'] ) ],
-   Html::element( 'a', [ 'href' => 
htmlspecialchars( $url['href'] ) ],
-   $url['text']
-   )
-   );
-   }
-
-   // build complete html
-   $bar[$skin->msg( 'relatedarticles-title' )->text()] =
-   Html::rawElement( 'ul', [],
-   implode( '', $relatedPages )
-   );
-
-   return true;
-   }
-
-   /**
-* Generates 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add namespace aliases for Hebrew Wikipedia

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

Change subject: Add namespace aliases for Hebrew Wikipedia
..


Add namespace aliases for Hebrew Wikipedia

Bug: T164858
Change-Id: I366e38d63a15eeead27b0bd24945f84e451914f6
---
M wmf-config/InitialiseSettings.php
1 file changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 01c71a7..5c79619 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -3389,6 +3389,33 @@
'+guwiktionary' => [
'વિક્શનરી' => NS_PROJECT // T42776 (old namespace name)
],
+   '+hewiki' => [ // T164858
+   'מי' => NS_SPECIAL,
+   'ש' => NS_TALK,
+   'מש' => NS_USER,
+   'U' => NS_USER,
+   'שמש' => NS_USER_TALK,
+   'וק' => NS_PROJECT,
+   'WP' => NS_PROJECT,
+   'שוק' => NS_PROJECT_TALK,
+   'קו' => NS_FILE,
+   'שקו' => NS_FILE_TALK,
+   'מו' => NS_MEDIAWIKI,
+   'שמו' => NS_MEDIAWIKI_TALK,
+   'תב' => NS_TEMPLATE,
+   'שתב' => NS_TEMPLATE_TALK,
+   'עז' => NS_HELP,
+   'שעז' => NS_HELP_TALK,
+   'קט' => NS_CATEGORY,
+   'שקט' => NS_CATEGORY_TALK,
+   'פ' => /* Portal */ 100,
+   'שפ' => /* Portal talk */ 101,
+   'טי' => /* Draft */ 118,
+   'שטי' => /* Draft talk */ 119,
+   'י' => /* Module */ 828,
+   'שי' => /* Module talk */ 829,
+   'נ' => /* Topic (Flow) */ 2600,
+   ],
'+hewikisource' => [
'Author' => 108,
'Author_talk' => 109,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I366e38d63a15eeead27b0bd24945f84e451914f6
Gerrit-PatchSet: 6
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: XXN 
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...RelatedArticles[master]: Make number of RelatedArticles configurable

2017-05-25 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355636 )

Change subject: Make number of RelatedArticles configurable
..

Make number of RelatedArticles configurable

Wikivoyage pages have more than 3 related articles as they make use
of the {{#relatedarticle:}}  magic word.

After speaking with Nirzar we should allow this project to show more than 3.
This change allows this while keeping the existing behaviour on other wikis and
will pave the way for removing a bunch of code from this extension.

Bug: T164765
Change-Id: I41119de3228c2df799f740d4bd00082101c21b97
---
M extension.json
M includes/FooterHooks.php
M resources/ext.relatedArticles.readMore.bootstrap/index.js
M resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js
4 files changed, 10 insertions(+), 3 deletions(-)


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

diff --git a/extension.json b/extension.json
index 470e9f4..3532abf 100644
--- a/extension.json
+++ b/extension.json
@@ -118,6 +118,8 @@
}
},
"config": {
+   "@RelatedArticlesLimit": "Maximum number of articles that 
should be shown in RelatedArticles widget. When set to false no upper limit",
+   "RelatedArticlesLimit": 3,
"RelatedArticlesShowInSidebar": true,
"RelatedArticlesShowInFooter": false,
"RelatedArticlesUseCirrusSearch": false,
diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php
index 61ac275..097989c 100644
--- a/includes/FooterHooks.php
+++ b/includes/FooterHooks.php
@@ -28,6 +28,7 @@
->makeConfig( 'RelatedArticles' );
 
$vars['wgRelatedArticles'] = $out->getProperty( 
'RelatedArticles' );
+   $vars['wgRelatedArticlesLimit'] = $config->get( 
'RelatedArticlesLimit' );
$vars['wgRelatedArticlesUseCirrusSearch'] = $config->get( 
'RelatedArticlesUseCirrusSearch' );
$vars['wgRelatedArticlesOnlyUseCirrusSearch'] =
$config->get( 'RelatedArticlesOnlyUseCirrusSearch' );
diff --git a/resources/ext.relatedArticles.readMore.bootstrap/index.js 
b/resources/ext.relatedArticles.readMore.bootstrap/index.js
index 2dfb200..bbdea60 100644
--- a/resources/ext.relatedArticles.readMore.bootstrap/index.js
+++ b/resources/ext.relatedArticles.readMore.bootstrap/index.js
@@ -7,7 +7,7 @@
mw.config.get( 'wgRelatedArticlesUseCirrusSearch' ),
mw.config.get( 'wgRelatedArticlesOnlyUseCirrusSearch' )
),
-   LIMIT = 3,
+   LIMIT = mw.config.get( 'wgRelatedArticlesLimit' ),
debouncedLoad = $.debounce( 100, function () {
loadRelatedArticles(); // eslint-disable-line
} ),
diff --git 
a/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js 
b/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js
index 2645074..1a90066 100644
--- a/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js
+++ b/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js
@@ -59,7 +59,7 @@
 * * The Wikidata description, if any
 *
 * @method
-* @param {number} limit of pages to get
+* @param {number} [limit] of pages to get
 * @return {jQuery.Promise}
 */
RelatedPagesGateway.prototype.getForCurrentPage = function ( limit ) {
@@ -71,7 +71,11 @@
pithumbsize: 160, // FIXME: Revert to 80 once 
pithumbmode is implemented
wbptterms: 'description'
},
-   relatedPages = ( this.editorCuratedPages ).slice( 0, 
limit );
+   relatedPages = this.editorCuratedPages;
+
+   if ( limit ) {
+   relatedPages = relatedPages.slice( 0, limit );
+   }
 
if ( relatedPages.length ) {
parameters.pilimit = relatedPages.length;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: doc: Add doc:start script

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

Change subject: doc: Add doc:start script
..


doc: Add doc:start script

Like npm run start, npm run doc:start will rebuild the documentation if
any file in the src directory changes.

Supporting changes:
* Use nodemon@1.11.0.

Change-Id: I7b528525874e377533e92c0a80c8aae9f6a18620
---
M package.json
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/package.json b/package.json
index a78240d..54f475b 100644
--- a/package.json
+++ b/package.json
@@ -7,6 +7,7 @@
 "test:dev": "grunt lint && npm run test:node",
 "test": " npm run check-built-assets && npm run test:dev",
 "doc": "jsdoc -c jsdoc.json",
+"doc:start": "nodemon --watch src --exec 'npm run doc'",
 "check-built-assets": "echo 'CHECKING BUILD SOURCES ARE COMMITED' && rm 
-rf test-build && mv resources/dist test-build && npm run build && diff -x 
'*.map' -r test-build resources/dist && rm -rf test-build",
 "coverage": "istanbul cover node_modules/.bin/mw-node-qunit 
tests/node-qunit/*.js tests/node-qunit/**/*.js",
 "precommit": "npm run test:dev && npm run build && git add resources/dist"
@@ -25,6 +26,7 @@
 "jsdoc": "^3.4.3",
 "mock-require": "^2.0.1",
 "mw-node-qunit": "^2.0.0",
+"nodemon": "^1.11.0",
 "redux": "3.6.0",
 "redux-thunk": "2.2.0",
 "stylelint-config-wikimedia": "0.4.1",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b528525874e377533e92c0a80c8aae9f6a18620
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Phuedx 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: doc: Document userSettings module

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

Change subject: doc: Document userSettings module
..


doc: Document userSettings module

Bug: T158236
Change-Id: Ia2365c7d6d1b9bc7438a3824656f1dde2a0170fb
---
M resources/dist/index.js.map
M src/userSettings.js
2 files changed, 28 insertions(+), 12 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2365c7d6d1b9bc7438a3824656f1dde2a0170fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Phuedx 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   >